@everfur/sdk 1.6.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Chat.d-B4GybUU4.d.ts → Chat.d-BIr_4AJt.d.ts} +1 -1
- package/dist/{Chat.d-DPM2ncxi.d.cts → Chat.d-BhevtXn9.d.cts} +1 -1
- package/dist/{DepthViews.d-BGspxovy.d.cts → DepthViews.d-C8KdfzwR.d.cts} +1 -1
- package/dist/{DepthViews.d-BaLh7Lsi.d.cts → DepthViews.d-DWQ-J208.d.cts} +1 -1
- package/dist/{DepthViews.d-BIHVrf9r.d.ts → DepthViews.d-DYVUq4Xk.d.ts} +1 -1
- package/dist/{DepthViews.d-CEVk9poG.d.ts → DepthViews.d-oKr9R0Ql.d.ts} +1 -1
- package/dist/{IntakeMedia.d-CwSkSLNM.d.ts → IntakeMedia.d-B-ZZK6vd.d.ts} +1 -1
- package/dist/{IntakeMedia.d-LRXO38_z.d.cts → IntakeMedia.d-CuVkzIsO.d.cts} +1 -1
- package/dist/{IntakeMedia.d-DmaeGU6T.d.cts → IntakeMedia.d-CyF6NPHx.d.cts} +1 -1
- package/dist/{IntakeMedia.d-Dyb9R8b0.d.ts → IntakeMedia.d-vU8g9OM5.d.ts} +1 -1
- package/dist/{RecordsPage.d-D10RIgdc.d.ts → RecordsPage.d-DU8Nswzh.d.ts} +1 -1
- package/dist/{RecordsPage.d-DbhYNSbq.d.cts → RecordsPage.d-DzPhqMHW.d.cts} +1 -1
- package/dist/animations/index.d.cts +3 -3
- package/dist/animations/index.d.ts +3 -3
- package/dist/{attachments.d-CF4lLuGK.d.cts → attachments.d-0nOPDIng.d.cts} +1 -1
- package/dist/{attachments.d-BlukNfIf.d.ts → attachments.d-BlyI-RCY.d.ts} +1 -1
- package/dist/{bookingCopy.d-Bn8bdo89.d.ts → bookingCopy.d-ClL8OxBS.d.ts} +3 -3
- package/dist/{bookingCopy.d-Dg7bPM-U.d.cts → bookingCopy.d-DUVqhF5f.d.cts} +3 -3
- package/dist/{branding.d-XrZYClN4.d.ts → branding.d-D0LV3aFE.d.ts} +1 -1
- package/dist/{branding.d-CqDLKj1U.d.cts → branding.d-DzSPLZKl.d.cts} +1 -1
- package/dist/{casesRepository.d-CVuKTkJo.d.cts → casesRepository.d-DnanKXJ1.d.cts} +1 -1
- package/dist/{casesRepository.d-Dn1fK1b2.d.ts → casesRepository.d-_4QucKVC.d.ts} +1 -1
- package/dist/chat/index.cjs +239 -238
- package/dist/chat/index.d.cts +11 -11
- package/dist/chat/index.d.ts +11 -11
- package/dist/chat/index.js +241 -240
- package/dist/chat/lite/index.cjs +239 -238
- package/dist/chat/lite/index.d.cts +11 -11
- package/dist/chat/lite/index.d.ts +11 -11
- package/dist/chat/lite/index.js +239 -238
- package/dist/{chatHandoffToken.d-zdp23Ukr.d.ts → chatHandoffToken.d-BoZGGbIB.d.ts} +5 -5
- package/dist/{chatHandoffToken.d-Cap2z62P.d.cts → chatHandoffToken.d-DhhGdLNH.d.cts} +5 -5
- package/dist/{checkin.d-CuIUahcd.d.cts → checkin.d-DB-HlK7r.d.cts} +9 -4
- package/dist/{checkin.d-BoZXWjxX.d.ts → checkin.d-DogrR06X.d.ts} +9 -4
- package/dist/{chunk-ZSCVH4UW.js → chunk-6E3J6IVM.js} +16 -16
- package/dist/{chunk-CQUKIPRU.js → chunk-J5ZUBY3S.js} +1 -1
- package/dist/{chunk-RF4N4WUN.js → chunk-LPHBCDJP.js} +18 -18
- package/dist/{chunk-DBQYQLJT.js → chunk-ULQDOC75.js} +1 -1
- package/dist/client/index.cjs +28 -27
- package/dist/client/index.d.cts +13 -13
- package/dist/client/index.d.ts +13 -13
- package/dist/client/index.js +25 -24
- package/dist/{clinicBatch.d-C0xx5L4j.d.cts → clinicBatch.d-BvPF6vXS.d.cts} +2 -2
- package/dist/{clinicBatch.d-DNi4UURs.d.ts → clinicBatch.d-CF0GIvpx.d.ts} +2 -2
- package/dist/{config.d-B7Z-KTGq.d.ts → config.d-Bc41Ax6M.d.ts} +5 -1
- package/dist/{config.d-ClAI2RZ6.d.cts → config.d-Bn6GEGfl.d.cts} +5 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/{context.d-D7zX6Q0J.d.ts → context.d-0QfLaI3W.d.ts} +5 -5
- package/dist/{context.d-guaLkx5t.d.cts → context.d-CyQpedoU.d.cts} +5 -5
- package/dist/{copy.d--F5A9cXK.d.cts → copy.d-B55PpLxr.d.cts} +2 -2
- package/dist/{copy.d-DmxuFJFe.d.ts → copy.d-B8wIE6cH.d.ts} +2 -2
- package/dist/core/index.cjs +32 -31
- package/dist/core/index.d.cts +16 -16
- package/dist/core/index.d.ts +16 -16
- package/dist/core/index.js +32 -31
- package/dist/{depth.d-CgzYE6_n.d.ts → depth.d-CrtZXnLy.d.ts} +2 -2
- package/dist/{depth.d-DLaP0o8Y.d.cts → depth.d-Cxz6VisZ.d.cts} +2 -2
- package/dist/{entitlementRepository.d-CkUTlVAb.d.ts → entitlementRepository.d-BaZTIe1B.d.ts} +3 -3
- package/dist/{entitlementRepository.d-DVTp-BB9.d.cts → entitlementRepository.d-YeNG2TKI.d.cts} +3 -3
- package/dist/{focus.d-u-HYvim0.d.ts → focus.d-520VEHKB.d.ts} +1 -1
- package/dist/{focus.d-CLTjm6In.d.cts → focus.d-DoempN1I.d.cts} +1 -1
- package/dist/health-plan/index.cjs +236 -235
- package/dist/health-plan/index.d.cts +15 -15
- package/dist/health-plan/index.d.ts +15 -15
- package/dist/health-plan/index.js +236 -235
- package/dist/{healthPlanRepository.d-CwRXeoM7.d.ts → healthPlanRepository.d-BHu9LO0r.d.ts} +2 -2
- package/dist/{healthPlanRepository.d-B22kjrYa.d.cts → healthPlanRepository.d-tUR1f_5s.d.cts} +2 -2
- package/dist/{idempotency.d-DrxKLPPe.d.cts → idempotency.d-CcFLvzYW.d.cts} +1 -1
- package/dist/{idempotency.d-CbB07p64.d.ts → idempotency.d-CvqKG3Uq.d.ts} +1 -1
- package/dist/{identity.d-D4VtpqRr.d.ts → identity.d-Bex_XJZx.d.ts} +1 -1
- package/dist/{identity.d-DDpXOtas.d.cts → identity.d-Dm0Buvn8.d.cts} +1 -1
- package/dist/{inbox.d-B2JXK0uI.d.ts → inbox.d-9ajb0oiJ.d.ts} +1 -1
- package/dist/{inbox.d-CwA1ogzV.d.cts → inbox.d-CGCYOZIq.d.cts} +1 -1
- package/dist/index.cjs +362 -361
- package/dist/index.d.cts +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.js +253 -252
- package/dist/{introEvents.d-DW3gLljE.d.ts → introEvents.d-CuVaufTy.d.ts} +1 -1
- package/dist/{introEvents.d-B7acmGwf.d.cts → introEvents.d-DU6feqx4.d.cts} +1 -1
- package/dist/{layout.d-C8y_ki1V.d.ts → layout.d-BQ5IVS-m.d.ts} +1 -1
- package/dist/{layout.d-DfaFM_lp.d.cts → layout.d-CSPr33BP.d.cts} +1 -1
- package/dist/notifications/inbox/index.d.cts +6 -6
- package/dist/notifications/inbox/index.d.ts +6 -6
- package/dist/notifications/index.d.cts +7 -7
- package/dist/notifications/index.d.ts +7 -7
- package/dist/{optInView.d-Cps7aLQN.d.ts → optInView.d-DpGXnpGw.d.ts} +21 -3
- package/dist/{optInView.d-ChJyJMBA.d.cts → optInView.d-dLjrI3co.d.cts} +21 -3
- package/dist/{pets.d-BpLObpfM.d.ts → pets.d-CHdSIoBf.d.ts} +1 -1
- package/dist/{pets.d-DXhzTNuI.d.cts → pets.d-jnhrJhqm.d.cts} +1 -1
- package/dist/{petsRepository.d-ai_tZ3lu.d.cts → petsRepository.d-BeKRiNao.d.cts} +1 -1
- package/dist/{petsRepository.d-_QfM7F6T.d.ts → petsRepository.d-BjwB1vku.d.ts} +1 -1
- package/dist/{presentation.d-BkIvMtIl.d.cts → presentation.d-Br3TnwA6.d.cts} +17 -1
- package/dist/{presentation.d-BkIvMtIl.d.ts → presentation.d-Br3TnwA6.d.ts} +17 -1
- package/dist/records/depth/index.d.cts +9 -9
- package/dist/records/depth/index.d.ts +9 -9
- package/dist/records/index.cjs +237 -228
- package/dist/records/index.d.cts +39 -12
- package/dist/records/index.d.ts +39 -12
- package/dist/records/index.js +155 -146
- package/dist/{requestFunnel.d-DKBPTpsy.d.ts → requestFunnel.d-C_NMgz9R.d.ts} +2 -2
- package/dist/{requestFunnel.d-BwZDfWVD.d.cts → requestFunnel.d-DoJWLySc.d.cts} +2 -2
- package/dist/{route.d-QBCoO62z.d.cts → route.d-BW2abFVK.d.cts} +2 -2
- package/dist/{route.d-B3u14HJT.d.ts → route.d-Olr_gXaa.d.ts} +2 -2
- package/dist/{runtimeTypes.d-hjN6xvxm.d.ts → runtimeTypes.d-Bp2VW6YE.d.ts} +6 -6
- package/dist/{runtimeTypes.d-BSxuUCOX.d.cts → runtimeTypes.d-StvJY45N.d.cts} +6 -6
- package/dist/{screenProps.d-fHBKArt_.d.ts → screenProps.d-BTLSji0N.d.ts} +1 -1
- package/dist/{screenProps.d-6xmE1C-V.d.cts → screenProps.d-B_5Bh7aQ.d.cts} +1 -1
- package/dist/server/events/index.cjs +2 -2
- package/dist/server/events/index.d.cts +19 -5
- package/dist/server/events/index.d.ts +19 -5
- package/dist/server/events/index.js +2 -2
- 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/shop/index.d.cts +3 -3
- package/dist/shop/index.d.ts +3 -3
- package/dist/slots/index.cjs +200 -199
- package/dist/slots/index.d.cts +5 -5
- package/dist/slots/index.d.ts +5 -5
- package/dist/slots/index.js +200 -199
- package/dist/tabs/index.cjs +200 -190
- package/dist/tabs/index.d.cts +68 -11
- package/dist/tabs/index.d.ts +68 -11
- package/dist/tabs/index.js +201 -191
- package/dist/tabs-bar/index.cjs +247 -0
- package/dist/tabs-bar/index.d.cts +10 -0
- package/dist/tabs-bar/index.d.ts +10 -0
- package/dist/tabs-bar/index.js +247 -0
- package/dist/{tabsModel.d-D9GWPFrL.d.ts → tabsModel.d-B4MSQB57.d.cts} +5 -2
- package/dist/{tabsModel.d-D9GWPFrL.d.cts → tabsModel.d-C8pd-DP3.d.ts} +5 -2
- package/dist/televet/booking/index.cjs +147 -145
- package/dist/televet/booking/index.d.cts +10 -10
- package/dist/televet/booking/index.d.ts +10 -10
- package/dist/televet/booking/index.js +163 -161
- package/dist/televet/call/index.cjs +52 -52
- package/dist/televet/call/index.d.cts +5 -0
- package/dist/televet/call/index.d.ts +5 -0
- package/dist/televet/call/index.js +25 -25
- package/dist/televet/index.d.cts +3 -3
- package/dist/televet/index.d.ts +3 -3
- package/dist/{televetGlobal.d-gZrXPaLl.d.cts → televetGlobal.d-B_I_fy7O.d.cts} +9 -0
- package/dist/{televetGlobal.d-DkJkV55Y.d.ts → televetGlobal.d-DN7o45WJ.d.ts} +9 -0
- package/dist/testing/index.cjs +3 -3
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +3 -3
- package/dist/testing/rn/index.d.cts +9 -9
- package/dist/testing/rn/index.d.ts +9 -9
- package/dist/testing/web/index.d.cts +9 -9
- package/dist/testing/web/index.d.ts +9 -9
- package/dist/texting/index.cjs +32 -27
- package/dist/texting/index.d.cts +5 -5
- package/dist/texting/index.d.ts +5 -5
- package/dist/texting/index.js +52 -47
- package/dist/{threadOptions.d-NSlFx-Lp.d.ts → threadOptions.d-D_3hk79R.d.ts} +5 -5
- package/dist/{threadOptions.d-Dc57dm7h.d.cts → threadOptions.d-D_GU6lp9.d.cts} +5 -5
- package/dist/{timelineRows.d-CthNM5hV.d.ts → timelineRows.d-BbVuARtc.d.ts} +1 -1
- package/dist/{timelineRows.d-7w8NsNi4.d.cts → timelineRows.d-BiLAAbYl.d.cts} +1 -1
- package/dist/{typeStyle.d-8mcLhtbH.d.ts → typeStyle.d-DSk99BuZ.d.ts} +1 -1
- package/dist/{typeStyle.d-CLrQZW-r.d.cts → typeStyle.d-DqR6mWCF.d.cts} +1 -1
- package/dist/{useHealthPlanSubscription.d-CV7M21HS.d.ts → useHealthPlanSubscription.d-CpE6l1VW.d.ts} +3 -3
- package/dist/{useHealthPlanSubscription.d-SA9-SuKe.d.cts → useHealthPlanSubscription.d-DRiWDJXq.d.cts} +3 -3
- package/dist/{useInboxUnread.d-0DrQPn7J.d.ts → useInboxUnread.d-BV7PkWDH.d.ts} +1 -1
- package/dist/{useInboxUnread.d-CRcOTkmu.d.cts → useInboxUnread.d-CElyXBkY.d.cts} +1 -1
- package/dist/{usePresentation.d-BJzFicRQ.d.cts → usePresentation.d-BcazazQH.d.cts} +3 -3
- package/dist/{usePresentation.d-DgSGIWS-.d.ts → usePresentation.d-CMOypLlH.d.ts} +3 -3
- package/dist/{useRecordsDepth.d-ZX2rhcUx.d.ts → useRecordsDepth.d-Bka4KQhq.d.ts} +1 -1
- package/dist/{useRecordsDepth.d-C9W45gwS.d.cts → useRecordsDepth.d-TgmpxKdX.d.cts} +1 -1
- package/dist/{useUnread.d-4SbFChbd.d.ts → useUnread.d-CGqaP-dB.d.ts} +27 -5
- package/dist/{useUnread.d-B0YhhR_D.d.cts → useUnread.d-DVVnYNPU.d.cts} +27 -5
- package/dist/{view.d-3lxzyJlL.d.cts → view.d-CwruYhQy.d.cts} +3 -3
- package/dist/{view.d-DRiYNQJ8.d.ts → view.d-DamH8TQF.d.ts} +3 -3
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/health-plan/index.cjs +9 -8
- package/dist/web/health-plan/index.d.cts +16 -16
- package/dist/web/health-plan/index.d.ts +16 -16
- package/dist/web/health-plan/index.js +49 -48
- package/dist/web/inbox/index.d.cts +7 -7
- package/dist/web/inbox/index.d.ts +7 -7
- package/dist/web/index.cjs +185 -184
- package/dist/web/index.d.cts +32 -32
- package/dist/web/index.d.ts +32 -32
- package/dist/web/index.js +179 -178
- package/dist/web/intro/index.d.cts +7 -7
- package/dist/web/intro/index.d.ts +7 -7
- package/dist/web/notifications/index.d.cts +6 -6
- package/dist/web/notifications/index.d.ts +6 -6
- package/dist/web/records/depth/index.d.cts +9 -9
- package/dist/web/records/depth/index.d.ts +9 -9
- package/dist/web/records/index.d.cts +11 -11
- package/dist/web/records/index.d.ts +11 -11
- package/dist/web/records-sheet/index.cjs +111 -110
- package/dist/web/records-sheet/index.js +111 -110
- package/dist/web/shop/index.cjs +1 -1
- package/dist/web/shop/index.d.cts +3 -3
- package/dist/web/shop/index.d.ts +3 -3
- package/dist/web/shop/index.js +1 -1
- package/dist/web/televet/booking/index.cjs +3 -3
- package/dist/web/televet/booking/index.d.cts +10 -10
- package/dist/web/televet/booking/index.d.ts +10 -10
- package/dist/web/televet/booking/index.js +69 -69
- package/dist/web/televet/call/index.cjs +1 -1
- package/dist/web/televet/call/index.js +1 -1
- package/dist/web/televet/index.d.cts +3 -3
- package/dist/web/televet/index.d.ts +3 -3
- package/dist/web/texting/index.cjs +34 -29
- package/dist/web/texting/index.d.cts +5 -5
- package/dist/web/texting/index.d.ts +5 -5
- package/dist/web/texting/index.js +45 -40
- package/dist/web/ui/index.cjs +1 -1
- package/dist/web/ui/index.js +41 -41
- package/package.json +16 -1
- package/tabs-bar/package.json +8 -0
package/dist/tabs/index.js
CHANGED
|
@@ -1,206 +1,216 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
-
import{EverfurChat as e,useEverfurUnread,EverfurPoweredBy as t}from"@everfur/sdk/chat";import{useHealthPlanPage,HealthPlanScrollScope as n,EverfurHealthPlan as r,useEverfurHealthPlan}from"@everfur/sdk/health-plan";import{useEverfurRecordsClinic,EverfurRecords as o,EverfurRecordsConsent as i,useEverfurRecords}from"@everfur/sdk/records";import{createContext,forwardRef as a,createElement as l,useRef as s,useState as d,useMemo as c,useEffect as u,useCallback as p,useContext as f,useLayoutEffect as h,useSyncExternalStore as g}from"react";import*as b from"react-native";import{TextInput as m,StyleSheet as y,View as v,Pressable as k,Easing as w,Platform as _,Text as S,Image as x,Animated as C,PanResponder as R,Modal as F,KeyboardAvoidingView as A,ScrollView as I,Dimensions as T,AccessibilityInfo as E,AppState as D,useWindowDimensions as O,ActivityIndicator as z}from"react-native";import{jsx as P,jsxs as B,Fragment as N}from"react/jsx-runtime";import{EverfurInboxBell as $,EverfurInboxSheet as L}from"@everfur/sdk/notifications/inbox";import{useVetVisit}from"@everfur/sdk/televet";import{SafeAreaInsetsContext as j,SafeAreaProvider as W,initialWindowMetrics as U,useSafeAreaInsets as V}from"react-native-safe-area-context";var M=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanSignals@v1"),q=globalThis;function H(e){if(typeof e!="object"||e===null)return false;let t=e;return t.landed instanceof Set&&t.noVet instanceof Set&&t.noVetByPet instanceof Map}var K=q[M],Y=()=>({landed:/* @__PURE__ */new Set,noVet:/* @__PURE__ */new Set,noVetByPet:/* @__PURE__ */new Map}),G=H(K)?K:q[M]=Y(),J=G.landed,Q=G.noVet,Z=G.noVetByPet;function notifyHealthPlanRecordsLanded(petRef,e="host"){for(let t of[...J])try{t(petRef,e)}catch{}}function onHealthPlanRecordsLanded(e){return J.add(e),()=>{J.delete(e)}}function setHealthPlanNoVet(petRef,e){if((Z.get(petRef)??false)!==e){e?Z.set(petRef,true):Z.delete(petRef);for(let t of[...Q])try{t(petRef,e)}catch{}}}function healthPlanNoVet(petRef){return Z.get(petRef)??false}function onHealthPlanNoVet(e){return Q.add(e),()=>{Q.delete(e)}}var X=[{wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true},{wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false},{wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false},{wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"anchor_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"anchor_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"anonTokenInvalid",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true},{wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"before_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_not_uploaded",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundles_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"catalog_empty_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"catalog_shrink_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"endpoint_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"environment_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"inbox_cursor_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false},{wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"item_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"linked_account_read_only",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false},{wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"open_url_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false},{wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"read_target_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"restricted_key",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_revoked",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false},{wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true},{wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"subscription_keys_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"ticket_not_resolved",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tickets_disabled",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"timezone_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"unrestrictedKeyRequired",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"user_ref_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"web_push_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false}],ee=/* @__PURE__ */Object.freeze(X.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(ee.map(e=>e.wireCode));var te=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",session_revoked:"authExpired",anonTokenInvalid:"authRejected",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",unrestrictedKeyRequired:"accessDenied",user_ref_invalid:"validationFailed",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict",linked_account_read_only:"conflict",catalog_empty_refused:"conflict",catalog_shrink_refused:"conflict",endpoint_not_allowed:"validationFailed",event_id_invalid:"validationFailed",inbox_cursor_invalid:"validationFailed",item_id_invalid:"validationFailed",open_url_not_allowed:"validationFailed",read_target_invalid:"validationFailed",subscription_keys_invalid:"validationFailed",web_push_unavailable:"serviceUnavailable",anchor_not_found:"resourceNotFound",anchor_ref_invalid:"validationFailed",before_invalid:"validationFailed",bundle_mismatch:"validationFailed",bundle_not_uploaded:"validationFailed",bundles_unavailable:"serviceUnavailable",environment_mismatch:"validationFailed",restricted_key:"accessDenied",ticket_not_resolved:"conflict",tickets_disabled:"resourceNotFound",timezone_invalid:"validationFailed"}),ne=/* @__PURE__ */Object.freeze(ee.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:te[e.wireCode]}))),re=new Map(ne.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),oe=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(ne.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(e,t){if(typeof e!="string")return;let n=e.trim().toUpperCase();if(n.length!==0)for(let e of[t??"http_envelope",...oe]){let t=re.get(e+n);if(t)return t}}var ie=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(e){return ie[e]}function fromWire(e){let t=contractErrorFor(e);if(t)return t.normalized;let n=(e??"").trim().toUpperCase(),r=n.replace(/[^A-Z0-9]/g,"");if(r==="AUTHREJECTED")return"authRejected";if(n.startsWith("AUTH"))return"authExpired";switch(r){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"FREECAPREACHED":return"paymentRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var ae=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return ae.has(e)}var le=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||le.has(e)}var se=500,de=8e3,ce=4;function backoffDelayMs(e,t=Math.random){let n=Math.max(0,e),r=Math.min(se*2**n,de);return Math.floor(t()*r)}var ue="This feature isn't available on your account right now.",pe="Something in that request was not right. Check the details and try again.",fe=/* @__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:ue,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:pe,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:ue,runtimeDisposed:pe,unknown:"Something went wrong. Please try again."}),he="This session has ended. Please sign in again.",ge="linked_account_read_only";function be(e,t,n){return e==="conflict"&&n===ge?ue:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?he:userFacingError(e)}function userFacingError(e){return fe[e]}function me(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:false,writable:false,configurable:false})}var ye=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let n=contractErrorFor(t?.wireCode,t?.wireEnvelope),r=e==="conflict"&&t?.reasonCode===ge,o={code:e,category:categoryFor(e),retryable:t?.retryable??(r?false:isRetryableCode(e)),displayMessage:be(e,t?.wireCode,r?ge:null)};t?.httpStatus!==void 0&&(o.httpStatus=t.httpStatus),t?.requestId&&(o.requestId=t.requestId),typeof t?.reasonCode=="string"&&ye.test(t.reasonCode)&&(o.reasonCode=t.reasonCode);let i=t?.retryAfterSeconds;if(typeof i=="number"&&Number.isFinite(i)&&i>=0&&(o.retryAfterSeconds=Math.round(i)),n);return t?.wireMessage&&me(o,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&me(o,"raw",t.raw),/* @__PURE__ */Object.freeze(o)}function ok(e,t){/* @__PURE__ */
|
|
2
|
+
import{EverfurChat as e,useEverfurUnread,EverfurPoweredBy as t}from"@everfur/sdk/chat";import{useHealthPlanPage,HealthPlanScrollScope as n,EverfurHealthPlan as r,useEverfurHealthPlan}from"@everfur/sdk/health-plan";import{useEverfurRecordsClinic,EverfurRecords as o,EverfurRecordsConsent as i,useEverfurRecords}from"@everfur/sdk/records";import{EverfurTelevetHost as a,VetVisitButton as l,useVetVisit}from"@everfur/sdk/televet";import{createContext,forwardRef as s,createElement as d,useRef as c,useState as u,useMemo as p,useEffect as f,useCallback as h,useContext as g,useLayoutEffect as b,useSyncExternalStore as m}from"react";import*as y from"react-native";import{TextInput as v,StyleSheet as k,View as w,Pressable as _,Easing as S,Platform as x,Text as C,Image as R,Animated as F,PanResponder as A,Modal as T,KeyboardAvoidingView as I,ScrollView as E,Dimensions as D,AccessibilityInfo as O,AppState as P,useWindowDimensions as z,ActivityIndicator as B}from"react-native";import{jsx as N,jsxs as $,Fragment as L}from"react/jsx-runtime";import{EverfurInboxBell as j,EverfurInboxSheet as U}from"@everfur/sdk/notifications/inbox";import{SafeAreaInsetsContext as W,SafeAreaProvider as V,initialWindowMetrics as M,useSafeAreaInsets as q}from"react-native-safe-area-context";var H=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanSignals@v1"),K=globalThis;function Y(e){if(typeof e!="object"||e===null)return false;let t=e;return t.landed instanceof Set&&t.noVet instanceof Set&&t.noVetByPet instanceof Map}var G=K[H],J=()=>({landed:/* @__PURE__ */new Set,noVet:/* @__PURE__ */new Set,noVetByPet:/* @__PURE__ */new Map}),Q=Y(G)?G:K[H]=J(),Z=Q.landed,X=Q.noVet,ee=Q.noVetByPet;function notifyHealthPlanRecordsLanded(petRef,e="host"){for(let t of[...Z])try{t(petRef,e)}catch{}}function onHealthPlanRecordsLanded(e){return Z.add(e),()=>{Z.delete(e)}}function setHealthPlanNoVet(petRef,e){if((ee.get(petRef)??false)!==e){e?ee.set(petRef,true):ee.delete(petRef);for(let t of[...X])try{t(petRef,e)}catch{}}}function healthPlanNoVet(petRef){return ee.get(petRef)??false}function onHealthPlanNoVet(e){return X.add(e),()=>{X.delete(e)}}var te=[{wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true},{wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false},{wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false},{wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"anchor_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"anchor_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"anonTokenInvalid",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true},{wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"before_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_not_uploaded",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundles_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"catalog_empty_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"catalog_shrink_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"endpoint_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"environment_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"inbox_cursor_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false},{wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"item_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"linked_account_read_only",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false},{wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"open_url_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false},{wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"read_target_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"restricted_key",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_revoked",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false},{wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true},{wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"subscription_keys_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"ticket_not_resolved",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tickets_disabled",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"timezone_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"unrestrictedKeyRequired",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"user_ref_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"web_push_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false}],ne=/* @__PURE__ */Object.freeze(te.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(ne.map(e=>e.wireCode));var re=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",session_revoked:"authExpired",anonTokenInvalid:"authRejected",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",unrestrictedKeyRequired:"accessDenied",user_ref_invalid:"validationFailed",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict",linked_account_read_only:"conflict",catalog_empty_refused:"conflict",catalog_shrink_refused:"conflict",endpoint_not_allowed:"validationFailed",event_id_invalid:"validationFailed",inbox_cursor_invalid:"validationFailed",item_id_invalid:"validationFailed",open_url_not_allowed:"validationFailed",read_target_invalid:"validationFailed",subscription_keys_invalid:"validationFailed",web_push_unavailable:"serviceUnavailable",anchor_not_found:"resourceNotFound",anchor_ref_invalid:"validationFailed",before_invalid:"validationFailed",bundle_mismatch:"validationFailed",bundle_not_uploaded:"validationFailed",bundles_unavailable:"serviceUnavailable",environment_mismatch:"validationFailed",restricted_key:"accessDenied",ticket_not_resolved:"conflict",tickets_disabled:"resourceNotFound",timezone_invalid:"validationFailed"}),oe=/* @__PURE__ */Object.freeze(ne.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:re[e.wireCode]}))),ie=new Map(oe.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),ae=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(oe.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(e,t){if(typeof e!="string")return;let n=e.trim().toUpperCase();if(n.length!==0)for(let e of[t??"http_envelope",...ae]){let t=ie.get(e+n);if(t)return t}}var le=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(e){return le[e]}function fromWire(e){let t=contractErrorFor(e);if(t)return t.normalized;let n=(e??"").trim().toUpperCase(),r=n.replace(/[^A-Z0-9]/g,"");if(r==="AUTHREJECTED")return"authRejected";if(n.startsWith("AUTH"))return"authExpired";switch(r){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"FREECAPREACHED":return"paymentRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var se=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return se.has(e)}var de=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||de.has(e)}var ce=500,ue=8e3,pe=4;function backoffDelayMs(e,t=Math.random){let n=Math.max(0,e),r=Math.min(ce*2**n,ue);return Math.floor(t()*r)}var fe="This feature isn't available on your account right now.",he="Something in that request was not right. Check the details and try again.",ge=/* @__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:fe,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:he,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:fe,runtimeDisposed:he,unknown:"Something went wrong. Please try again."}),be="This session has ended. Please sign in again.",me="linked_account_read_only";function ye(e,t,n){return e==="conflict"&&n===me?fe:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?be:userFacingError(e)}function userFacingError(e){return ge[e]}function ve(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:false,writable:false,configurable:false})}var ke=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let n=contractErrorFor(t?.wireCode,t?.wireEnvelope),r=e==="conflict"&&t?.reasonCode===me,o={code:e,category:categoryFor(e),retryable:t?.retryable??(r?false:isRetryableCode(e)),displayMessage:ye(e,t?.wireCode,r?me:null)};t?.httpStatus!==void 0&&(o.httpStatus=t.httpStatus),t?.requestId&&(o.requestId=t.requestId),typeof t?.reasonCode=="string"&&ke.test(t.reasonCode)&&(o.reasonCode=t.reasonCode);let i=t?.retryAfterSeconds;if(typeof i=="number"&&Number.isFinite(i)&&i>=0&&(o.retryAfterSeconds=Math.round(i)),n);return t?.wireMessage&&ve(o,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&ve(o,"raw",t.raw),/* @__PURE__ */Object.freeze(o)}function ok(e,t){/* @__PURE__ */
|
|
3
3
|
return Object.freeze({ok:true,value:e})}function err(e){/* @__PURE__ */
|
|
4
|
-
return Object.freeze({ok:false,error:e})}var
|
|
5
|
-
return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:null,...e.freeCap?{freeCap:/* @__PURE__ */Object.freeze({...e.freeCap})}:{}})}var
|
|
4
|
+
return Object.freeze({ok:false,error:e})}var we=class _EverfurConfigError extends Error{constructor(e,t){super(t),this.name="EverfurConfigError",this.kind=e,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};function errorFrame(e){/* @__PURE__ */
|
|
5
|
+
return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:null,...e.freeCap?{freeCap:/* @__PURE__ */Object.freeze({...e.freeCap})}:{}})}var _e="x-everfur-anon-token",Se="anonTokenInvalid";async function xe(e){if(e.userRef!==null||e.anonIdentity===void 0)return null;try{return await e.anonIdentity.token()}catch{return null}}function Ce(e,t){let n=e instanceof Error?e.message:typeof e=="string"?e:null;return makeEverfurError("authRejected",{retryable:false,...t?.wireCode?{wireCode:t.wireCode}:{},...t?.requestId?{requestId:t.requestId}:{},...n?{wireMessage:n}:{},...e!=null?{raw:e}:{}})}function authHeaders(e){let t={};return e.mode==="personalized"?t.authorization=`Bearer ${e.token}`:(t["x-everfur-partner-key"]=e.publishableKey,e.anonToken&&(t[_e]=e.anonToken)),e.userRef&&(t["x-everfur-user-ref"]=e.userRef),e.sessionId&&(t["x-everfur-session-id"]=e.sessionId),t}function withAuthHeaders(e,t){return{...e,headers:{...Re(e.headers),...authHeaders(t)}}}function Re(e){if(!e)return{};let t={};for(let[n,r]of Object.entries(e)){let e=n.toLowerCase();e==="authorization"||e==="x-everfur-partner-key"||e===_e||(t[n]=r)}return t}async function authedSend(e,t){if(t.mode==="anonymous"){let n=await xe(t),r=await t.transport.request(withAuthHeaders(e,Fe(t,n)));if(r.ok||Te(r.error.raw)!==Se||t.anonIdentity===void 0||t.userRef!==null)return r;let o=await t.anonIdentity.token({forceRefresh:true});return o===null||o===n?r:t.transport.request(withAuthHeaders(e,Fe(t,o)))}let n;try{n=await t.identity.currentToken()}catch(e){return t.identity.reportRejected?.(),err(Ce(e))}let r=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:n,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(r.ok||r.error.httpStatus!==401)return r;let o;try{o=await t.identity.currentToken({forceRefresh:!0})}catch(e){return t.identity.reportRejected?.(),err(Ce(e,{wireCode:Te(r.error.raw),requestId:r.error.requestId}))}let i=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:o,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return!i.ok&&i.error.httpStatus===401?(t.identity.reportRejected?.(),err(Ae(i.error))):i}function Fe(e,t){return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}function Ae(e){let t=e.raw,n=Te(t);return makeEverfurError("authRejected",{retryable:false,...e.httpStatus!==void 0?{httpStatus:e.httpStatus}:{},...e.requestId?{requestId:e.requestId}:{},...n?{wireCode:n}:{},...e.reasonCode?{reasonCode:e.reasonCode}:{},...e.wireMessage?{wireMessage:e.wireMessage}:{},...t!=null?{raw:t}:{}})}function Te(e){if(typeof e!="object"||e===null)return null;let t=e,n=(typeof t.error=="object"&&t.error!==null?t.error.code:void 0)??t.code;return typeof n=="string"&&n.length>0?n:null}function networkError(e){return makeEverfurError("internalError",{retryable:true,wireMessage:Ie(e)})}function Ie(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}var Ee=3e4,De=ue*2,Oe="idempotency-key",Pe=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),ze=/* @__PURE__ */Object.freeze({onEvent(){}}),Be=/* @__PURE__ */Object.freeze({setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),now:()=>Date.now()});function Ne(e){let t=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return t.length===0?null:`efs_${t}`.slice(0,128)}function createRequestFunnel(e){let t=e.observer??ze,n=e.timers??Be,r=e.rng??Math.random,o=e.sleep??((e,t)=>Xe(e,n,t)),i=e.maxAttempts??pe,a=e.unaryTimeoutMs??Ee,l=e.newIdempotencyKey??Le(),s=e=>{try{t.onEvent(e)}catch{}};async function d(t,d,c){let u=c?.maxAttempts,p=Math.max(1,u??i),f=c?.idempotent??Pe.has(d.method),h=c?.idempotencyKey===void 0?null:Ne(c.idempotencyKey),g=f?h??l():null,b=$e(d,g),m=0;for(;;){let i=e=>/* @__PURE__ */Object.freeze({call:t,method:d.method,path:d.path,attempt:m,...g?{idempotencyKey:g}:{},...e});s(i({phase:"attempt"}));let l=Qe(a,n),c=Ze(l.signal,d.signal),f;try{f=await authedSend({...b,signal:c.signal},e.auth)}catch(e){f=err(networkError(e))}finally{c.dispose(),l.cancel()}if(f.ok)return s(i({phase:"settled",ok:true,reason:"ok"})),f;let h=f.error,y=Ue(h,m,{maxAttempts:p,rng:r,now:n.now(),aborted:d.signal?.aborted===true,...u!==void 0?{perCallMaxAttempts:u}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),v={ok:false,code:h.code,reason:y.reason,...h.httpStatus!==void 0?{httpStatus:h.httpStatus}:{},...h.requestId!==void 0?{requestId:h.requestId}:{}};if(!y.retry)return s(i({phase:"settled",...v})),err(h);if(s(i({phase:"retry",...v,delayMs:y.delayMs})),await o(y.delayMs,d.signal),d.signal?.aborted===true)return s(i({phase:"settled",...v,reason:"aborted"})),err(h);m+=1}}async function c(t){return withAuthHeaders(t,await Je(e.auth))}async function*u(t,n,r){s(
|
|
6
6
|
/* @__PURE__ */Object.freeze({call:t,phase:"stream.open",method:n.method,path:n.path,attempt:0}));try{yield*e.auth.transport.stream(n,r)}catch{yield errorFrame({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null})}}/* @__PURE__ */
|
|
7
|
-
return Object.freeze({send:d,authorize:c,stream:u})}function Be(e,t){let n={};for(let[t,r]of Object.entries(e.headers??{}))t.toLowerCase()!==Ee&&(n[t]=r);return t!==null&&(n["Idempotency-Key"]=t),{...e,headers:n}}function Ne(){let e=0;return()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var $e=10;function Le(e,t,n){if(n.aborted)return{retry:false,reason:"aborted"};let r=je(e);if(r==="quota")return{retry:false,reason:"daily-quota-exhausted"};if(r!=="burst"&&!isAutoRetryable(e.code))return{retry:false,reason:"terminal-code"};let o=r==="burst"?"burst-throttle":"retryable-code";if((()=>{if(n.policy===void 0)return false;try{return!n.policy.shouldRetry(e.code,t)}catch{return false}})())return{retry:false,reason:"terminal-code"};let i=()=>{if(n.policy===void 0)return null;let t;try{t=n.policy.maxAttempts(e.code)}catch{return null}return typeof t!="number"||!Number.isFinite(t)?null:Math.max(1,Math.min($e,Math.floor(t)))},a=n.perCallMaxAttempts??i()??n.maxAttempts;if(t+1>=a)return{retry:false,reason:"attempts-exhausted"};let l=We(e,n.now);return l!==null?l>Te?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:o,delayMs:l}:{retry:true,reason:o,delayMs:backoffDelayMs(t,n.rng)}}function je(e){let t=e.code==="unknown"?fromWire(He(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}function We(e,t){let n=Ve(e.raw);if(n!==null){let e=n-t;return e>0?e:0}let r=Ue(e.raw);return r===null?null:Math.round(r*1e3)}function Ue(e){for(let t of Me(e)){let e=t.retry_after_seconds;if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return e}return null}function Ve(e){for(let t of Me(e)){let e=t.resets_at,n=qe(e);if(n!==null)return n}return null}function Me(e){if(!Ke(e))return[];let t=[e];for(let n of["error","detail"]){let r=e[n];Ke(r)&&t.push(r)}return t}function qe(e){if(typeof e=="number"&&Number.isFinite(e))return e<1e11?Math.round(e*1e3):Math.round(e);if(typeof e=="string"&&e.trim().length>0){let t=Date.parse(e);return Number.isFinite(t)?t:null}return null}function He(e){for(let t of Me(e)){let e=t.code;if(typeof e=="string"&&e.length>0)return e}return null}function Ke(e){return typeof e=="object"&&e!==null}async function Ye(e){if(e.mode==="anonymous"){let t=await _e(e);return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}return{mode:"personalized",token:await e.identity.currentToken(),userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}}function Ge(e,t){let n=new AbortController,r=t.setTimeout(()=>n.abort(),e);return{signal:n.signal,cancel:()=>t.clearTimeout(r)}}function Je(e,t){let n=()=>{};if(!t)return{signal:e,dispose:n};let r=new AbortController;if(e.aborted||t.aborted)return r.abort(),{signal:r.signal,dispose:n};let o=()=>r.abort();return e.addEventListener("abort",o,{once:true}),t.addEventListener("abort",o,{once:true}),{signal:r.signal,dispose:()=>{e.removeEventListener("abort",o),t.removeEventListener("abort",o)}}}function Qe(e,t,n){return e<=0||n?.aborted===true?Promise.resolve():new Promise(r=>{let o=t.setTimeout(()=>{n?.removeEventListener("abort",i),r()},e),i=()=>{t.clearTimeout(o),r()};n?.addEventListener("abort",i,{once:true})})}var Ze="/widget/v1/me/intro";function Xe(e){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}function et(e){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${e}: the response was not the documented shape`})}function tt(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e;if(!("seen_at"in t))return null;let n=t.seen_at;return n===null?/* @__PURE__ */Object.freeze({seenAt:null}):typeof n!="string"||n.length===0||n.length>64||Number.isNaN(Date.parse(n))?null:/* @__PURE__ */Object.freeze({seenAt:n})}function nt(e){let t=()=>{let{services:t}=e.registry;return rt({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})},n=e=>Promise.resolve(err(Xe(e)));return{read:r=>e.isDisposed?n("read"):t().read(r),markSeen:()=>e.isDisposed?n("markSeen"):t().markSeen()}}function rt(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),n=async(e,n,r)=>{let o=await t.send(e,n,r);if(!o.ok)return err(o.error);let i=tt(o.value);return i===null?err(et(e)):ok(i)};return{read(e){let t=e?.signal?{method:"GET",path:Ze,signal:e.signal}:{method:"GET",path:Ze};return n("intro.read",t,{maxAttempts:1})},markSeen(){return n("intro.markSeen",{method:"PUT",path:Ze,body:{seen:true}})}}}var ot="everfur.intro.seen.v1:",it=userRef=>`${ot}${userRef}`;async function at(e,userRef){try{return await e.getItem(it(userRef))!==null}catch{return false}}async function lt(e,userRef,t){try{await e.setItem(it(userRef),t)}catch{}}async function st(e){let{repo:t,kv:n,userRef:userRef,signal:r}=e;if(userRef===null||await at(n,userRef))return false;let o;try{o=await t.read(r?{signal:r}:void 0)}catch{return false}return r?.aborted===true||!o.ok?false:o.value.seenAt!==null?(await lt(n,userRef,o.value.seenAt),false):true}async function dt(e){let{repo:t,kv:n,userRef:userRef}=e;if(userRef!==null){await lt(n,userRef,(e.now?.()??/* @__PURE__ */new Date).toISOString());try{await t.markSeen()}catch{}}}var ct=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),ut=globalThis,pt=ut[ct]??(ut[ct]=createContext(null));pt.displayName??="EverfurContext";function ft(){let e=f(pt);if(e===null)throw new ve("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}function healthPlanPetWords(e,t){let n=e?.trim()??"",r=n===""?"your pet":n,o=n===""?"Your pet":n;return t==="female"?{name:r,Name:o,poss:"her",Poss:"Her",obj:"her"}:t==="male"?{name:r,Name:o,poss:"his",Poss:"His",obj:"him"}:{name:r,Name:o,poss:`${r}'s`,Poss:`${o}'s`,obj:r}}var ht=e=>e===null?"":`${e.productName} renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`;function healthPlanFocusCopyFor(e){let t=healthPlanPetWords(e.name,e.sex),n=e=>e.petName?.trim()||t.name,NameOf=e=>e.petName?.trim()||t.Name,r=/* @__PURE__ */Object.freeze({jumpKicker:(e,n)=>n?`In ${t.poss} plan, every ${e.intervalDays} days`:e.offer?`${e.discountPercent}% off ${t.poss} first box`:e.intervalDays>0?`Ships every ${e.intervalDays} days`:r.onceLine(e),optionsLabel:"How to buy",subscribe:"Subscribe",bestValue:"Best value",subscribeLine:e=>e.offer?`First box, then ${e.box??""}`:`${e.box??""} every ${e.intervalDays} days`,priceLine:e=>e.offer?`${e.discountPercent}% off the first box. Ships every ${e.intervalDays} days.`:e.intervalDays>0?`Ships every ${e.intervalDays} days.`:r.onceOffer(e),once:"One box",onceLine:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once`:"Ships once",buyOnce:e=>`Buy one box, ${e.once??e.box??""}`,subscribed:"Subscribed",subscribedLine:(e,t)=>t===null?`Every ${e.intervalDays} days`:`Every ${e.intervalDays} days · next box ${t}`,manage:"Manage",checkoutKicker:"Checkout",checkoutTitle:e=>`Checkout: ${e.productName}`,checkoutOffer:e=>`${e.discountPercent}% off your first box.`,shipsEvery:"Ships every",days:e=>`${e} days`,buyOnceOption:"Buy once",checkoutGo:(e,t,n)=>`${t?"Subscribe":"Buy now"} · ${n} today`,renews:e=>`Renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`,onceFine:"One box, ships tomorrow.",onceOffer:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once.`:"Ships once.",checkoutNote:"",close:"Close",startedTitle:e=>`${NameOf(e)}'s plan has started.`,orderedTitle:()=>"Order placed.",startedWhat:e=>`${e.productName} ships tomorrow.`,startedNote:"",startedSteps:"What happens next",tomorrow:"Tomorrow",firstBoxShips:`${t.Poss} first box ships.`,trackingComesByText:"Tracking comes by text.",checkin:e=>e===null?"A 2-week check-in by text.":`A 2-week check-in by text: ${e}`,refill:`A text 3 days before ${t.poss} next box. Reply SKIP to skip it.`,nextBoxShips:e=>`${t.Poss} next box ships, ${e.box??""}.`,startedDone:`Back to ${t.poss} plan`,manageKicker:"Your subscription",manageTitle:e=>`Manage ${e.productName}`,skip:"Skip the next box",cancel:"Cancel subscription",skipped:(e,n)=>n===null?"Skipped.":`Skipped. ${t.Poss} next box ships ${n}.`,cancelled:e=>`${e.productName} is cancelled. Restart it from ${t.poss} plan anytime.`,orders:"Orders",startedHeader:"Subscribed",placedHeader:"Order placed",cartCheckoutTitle:"Checkout",orderNote:"",cartLabel:e=>e>0?`Cart, ${e} item${e>1?"s":""}`:"Cart, empty",addToCart:e=>`Add to cart · ${e}`,viewCart:"View cart",addedToCart:(e,t)=>`${e.productName} is in your cart${t?", as a subscription":""}.`,removedFromCart:e=>`${e} is out of your cart.`,cartTitle:"Cart",cartEmptyTitle:"Your cart is empty",cartEmptyBody:e=>`${NameOf(e)}'s plan pick lands here when you add it.`,seeOrders:`See ${t.poss} orders`,quantityLabel:e=>`How many: ${e}`,fewer:"One fewer",more:"One more",remove:"Remove",cartSubLine:e=>e.offer?`First box ${e.discountPercent}% off, then ${e.box??""} every ${e.intervalDays} days`:`Every ${e.intervalDays} days`,cartOnceLine:(e,n)=>n?`An extra box. ${t.Poss} plan keeps shipping.`:e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",cartModeLabel:e=>`How to buy ${e}`,cartModeSubscribe:e=>e.offer?`Subscribe, ${e.discountPercent}% off the first box`:"Subscribe",cartModeOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",subtotal:"Subtotal",shipping:"Shipping",shippingValue:"",shippingTag:"",total:"Total",dueToday:"Due today",thenRenews:e=>`Then ${e.productName}`,renewsEvery:e=>`${e.box??""} every ${e.intervalDays} days`,checkoutCart:e=>`Checkout · ${e}`,cartOneAtATime:"",cartSubscriptionApart:"",cartItemSubscription:e=>`Subscription, every ${e.intervalDays} days`,cartItemQuantity:e=>`Qty ${e}`,placeOrder:(e,t)=>`${t?"Place order and subscribe":"Place order"} · ${e}`,cartFine:e=>`${e===null?"":`${ht(e)} `}Ships tomorrow.`,placedSteps:"What's coming",placedShips:"It ships.",placedArrives:"It arrives at home.",viewOrder:"View order",herSubscription:`${t.Poss} subscription`,nextBox:e=>`Next box ${e}`,everyDays:e=>`Every ${e} days`,ordersHeading:e=>e?"Orders":`${t.Poss} orders`,ordersFine:"",ordersEmptyTitle:"No orders yet",ordersEmptyBody:e=>`The boxes from ${n(e)}'s plan show up here.`,moreOrders:"",orderSteps:["Ordered","Shipped","Out for delivery","Delivered"],subscriptionBox:"Subscription box",orderTitle:e=>e===null?"Order":`Order ${e}`,arrivesBy:e=>`Arrives by ${e}`,deliveredOn:e=>`Delivered ${e}`,expected:e=>`Expected ${e}`,tracking:"Tracking",trackingByText:"The tracking number comes by text when it ships.",trackOn:e=>`Track on ${e}`,trackLink:"",inThisOrder:"In this order",orderItemLine:(e,t)=>`Qty ${e}${t?" · subscription box":""}`,paidWith:"Paid with",buyAgain:"Buy again",orderHelp:"Get help with this order",addWeightTitle:`Add ${t.poss} weight to size ${t.poss} dose`,addWeightBody:`From a home scale or ${t.poss} last vet visit.`,connectRecordsTitle:`Connect ${t.poss} vet records`,connectRecordsBody:`${t.Poss} weight, visits and labs make ${t.poss} plan sharper.`,weightKicker:`${t.Poss} weight`,weightTitle:e=>`Add ${n(e)}'s weight`,weightBody:`From a home scale or ${t.poss} last vet visit. ${t.Poss} plan uses it to size ${t.poss} dose.`,weightField:`${t.Poss} weight`,weightUnit:"lb",weightUnitKg:"kg",weightErrorKg:"Enter your pet’s weight",weightError:`Enter ${t.poss} weight in pounds, like 14.1.`,weightSave:`Save ${t.poss} weight`,weightSaved:e=>`Saved: ${e} lb. ${t.Poss} dose is sized for ${t.obj}.`,weightSavedKg:e=>`Saved: ${e} kg. ${t.Poss} dose is sized for ${t.obj}.`,checkoutFailed:"That didn't go through. Please try again.",builtWith:e=>`Built with ${e}`,fromVet:e=>`From ${e}`,waitVetTips:e=>`Free tips from ${e}, built around that risk`,signalsFit:e=>`${e} of ${e} signals fit ${t.Name}`,signalsValue:e=>`${e}/${e}`,noPick:`No supplement for this one. ${t.Poss} vet comes first.`,callYourVet:"Call your vet today",callAVet:"Call a vet today",saveForCheckup:`Save for ${t.poss} next checkup`,savedForCheckup:`Saved for ${t.poss} next checkup`,blanksLabel:`${t.Poss} three blanks`,blanksAsked:e=>`Asked ${e}`,blanksAskedNoClinic:"",blanksWaitPill:"2 to 5 days",blanksFilledKicker:`From ${t.poss} vet records`,blanksFilled:(e,t)=>`${e} of ${t} filled`,blanksWeight:`Keep ${t.obj} at `,blanksWeightSource:`From ${t.poss} vet visits`,blanksDose:(e,t)=>`${e} of ${t}`,blanksDoseSource:`Sized to ${t.poss} weight`,blanksShots:`${t.Poss} next shots are due `,blanksShotsSource:`From ${t.poss} clinic`,blankEmpty:"blank",recordsLanded:`${t.Poss} records are in. ${t.Poss} plan now uses ${t.poss} weight and ${t.poss} visits.`,todayLabel:`${t.Poss} Health Plan`,poweredBy:"powered by",poweredByName:"Everfur",seeMore:"See more",seeLess:"See less",reportActions:"Actions to take",openReport:`Open it in ${t.poss} report`,askReport:"Ask about it",fullOpen:`See ${t.poss} full plan`,fullOpenLine:`${t.Poss} vet, reviews and ${t.poss} checkup`,fullClose:`Show ${t.poss} brief plan`,fullCloseLine:`${t.Poss} risk, tips, pick and signs`,hopeNoted:e=>`Noted. When ${t.poss} results land, we'll start with ${e}.`,productLink:e=>`${e}, see the product`,productPhotos:e=>`${e} photos, swipe for more`,shopAll:"Shop all",madeFor:`Made for ${t.name}`,ratingLine:e=>`· ${e} reviews`,productOffer:e=>`${e.discountPercent}% off ${t.poss} first box`,productEvery:e=>`Every ${e.intervalDays} days`,productOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",productExtraBox:"An extra box",productOnPlan:e=>`On ${t.poss} plan, every ${e.intervalDays} days. This adds one extra box.`,quantity:"Quantity",description:"Description",readMore:"Read more",readLess:"Read less",whatsInside:"What's inside",howMuch:"How much",reviewsTitle:"Reviews",reviewCount:e=>`${e} reviews`,reviewsSwipe:"Reviews, swipe for more",readAllReviews:e=>`Read all ${e} reviews`,starsLabel:e=>`${e} out of 5 stars`,buyNow:"Buy now"});return r}healthPlanFocusCopyFor({sex:"female"});var gt=/* @__PURE__ */Object.freeze({eyebrow:"",lede:"",pendingLede:"",recordsRowMore:"",planTopic:"",askTitle:"",noVetTitle:"",sentFine:"",clinicEta:"",blanksDetail:"",bannerBody:"",appName:""});function introPetWords(e,t){let n=healthPlanPetWords(e,t);return{...n,subj:t==="female"?"she":t==="male"?"he":n.name}}var bt=["","one","two","three","four","five","six","seven","eight","nine","ten"];function numberWord(e){return Number.isInteger(e)&&e>=1&&e<=10?bt[e]??null:null}var mt=e=>e===""?e:e.charAt(0).toUpperCase()+e.slice(1);function defaultIntroBlanks(e){return[{before:`Keep ${e.obj} at `,after:" lb",source:`From ${e.poss} vet visits`},{before:`${e.Poss} next shots are due `,after:"",source:`From ${e.poss} clinic`,width:"l"}]}function introFacts(e,t){let n=e?.pet.name??t??null,r=e?.page??null,o=r?.byline?.name?.trim()??"";return{pet:introPetWords(n,e?.pet.sex??null),planTitle:r?.title.trim()??"",vetName:e?.vetReviewed===true&&o!==""?o:null,tips:r?.routine?.steps.length??0}}function introText(e){let{facts:t,copy:n,resultsPending:r}=e,o=t.pet,i=numberWord(e.blanks),a=numberWord(t.tips),l=n.planTopic.trim(),s=t.vetName===null?null:t.vetName.replace(/ /g," "),d=l===""?"":`One plan for ${o.poss} ${l}${s===null?"":`, built with ${s}`}.`,c=a===null?"":`${mt(a)} tips, one thing to add.`,u=r?`${o.Poss} plan arrives with ${o.poss} results.`:[d,c].filter(e=>e!=="").join(" "),p=[`What could go wrong for ${o.name}, and what's changed.`,n.recordsRowMore.trim()].filter(e=>e!=="").join(" ");return{sheetLabel:{intro:`Welcome to ${o.Name}'s tab`,records:`Request ${o.poss} records`},back:"Back",skip:"Skip",close:"Close",poweredBy:"powered by",tabs:{eyebrow:n.eyebrow,title:`${o.Name}'s health, in three tabs.`,lede:r?n.pendingLede:n.lede,ask:`Trained on 50,000+ peer-reviewed vet publications. Ask about ${o.name} any hour (the 2 am ones too).`,plan:u,records:p,next:"Next",seePlan:`See ${o.poss} plan`},ask:{title:n.askTitle,lede:i===null?"":`${o.Poss} plan has ${i} blanks only ${o.poss} vet can fill (we ask the clinic for you).`,blanksPill:`${e.blanks} blanks`,blankLabel:"blank",later:"Later",connect:`Connect ${o.poss} vet`,fine:`We send ${o.poss} clinic a secure request and read every page they send back.`,noVet:`${o.Name} doesn't have a vet yet`},clinic:{title:`Where does ${o.name} see ${o.poss} vet?`,search:"Clinic name, city or zip",searchLabel:`Search for ${o.poss} clinic`,list:"Clinics",more:`Sees more than one? Start with the one ${o.subj} sees most.`,request:`Request ${o.poss} records`,upload:"Upload a PDF or a photo instead",add:`Add ${o.poss} clinic`},sent:{eyebrow:"Request sent",title:"Sent. Now it's the clinic's turn.",track:`${o.Poss} records request`,sentStep:"Request sent",sentTo:e=>`Today, to ${e}`,clinicStep:`${o.Poss} clinic sends ${o.poss} records`,clinicEta:n.clinicEta,blanksStep:i===null?"":`${o.Poss} ${i} blanks fill in`,blanksDetail:n.blanksDetail,lede:`Turn on notifications and we'll tell you the minute ${o.name}'s records are in.`,notify:"Turn on notifications",notNow:"Not now",fine:n.sentFine},noVet:{title:n.noVetTitle,lede:i===null?"":`When ${o.subj} does, connect ${o.poss} vet in Records and ${o.poss} ${i} blanks fill in.`,seePlan:`See ${o.poss} plan`},toast:{on:`Notifications on. We'll tell you the minute ${o.name}'s records are in.`,off:`Requested. ${o.Name}'s records will show up here when they're in.`,landed:`${o.Poss} records are in. ${o.Poss} plan now uses ${o.poss} weight and ${o.poss} visits.`},banner:{app:n.appName,now:"now",title:`${o.Name}'s records are in`,body:n.bannerBody}}}var yt=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),vt=globalThis;function kt(e){if(typeof e!="object"||e===null)return false;let t=e;return t.holds instanceof Set&&t.listeners instanceof Set}var wt=vt[yt],_t=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),St=kt(wt)?wt:vt[yt]=_t();function xt(){for(let e of[...St.listeners])try{e()}catch{}}function Ct(){let e={};return St.holds.add(e),St.holds.size===1&&xt(),()=>{St.holds.delete(e)&&St.holds.size===0&&xt()}}function Rt(e){u(()=>e?Ct():void 0,[e])}function Ft(e){let t={};if(e==null)return t;for(let n of Object.keys(e))e[n]!==void 0&&(t[n]=e[n]);return t}var At=/* @__PURE__ */Object.freeze({heading:"Chats",empty:"No chats yet",emptyBody:"Start a new conversation to see it here.",noMatch:"No chats match that.",loading:"Loading your chats…",loadFailed:"Couldn’t load your chats",loadingMore:"Loading more…",untitled:"New conversation",newChat:"New chat",searchPlaceholder:"Search chats…",search:"Search chats",countLabel:"Chats and vet messages",countSeparator:" · ",newReply:"New reply · {date}",retry:"Try again",close:"Close",closeA11y:"Close history",more:"Load more",earlier:"Load earlier messages",loadingEarlier:"Loading earlier messages…",openConversation:"Open conversation",unreadPrefix:"Unread. "});var It=/* @__PURE__ */Object.freeze({title:"Notifications",loading:"Loading notifications",emptyTitle:"You’re all caught up",emptyBody:"Updates about your pet’s care will show up here.",errorTitle:"Could not load your notifications",errorBody:"Check your connection and try again.",retry:"Try again",rowFallbackTitle:"Notification",unreadPrefix:"Unread.",timeAgoSuffix:"ago",now:"Now",more:"Show more",detailErrorTitle:"Could not load this notification",detailErrorBody:"Check your connection and try again.",notFoundTitle:"This notification is no longer available",notFoundBody:"The notification may have expired or been removed.",back:"Back to inbox"});function surfaceForNotification(e){let{target:t}=e;switch(t.kind){case"case":case"chat":/* @__PURE__ */
|
|
7
|
+
return Object.freeze({send:d,authorize:c,stream:u})}function $e(e,t){let n={};for(let[t,r]of Object.entries(e.headers??{}))t.toLowerCase()!==Oe&&(n[t]=r);return t!==null&&(n["Idempotency-Key"]=t),{...e,headers:n}}function Le(){let e=0;return()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var je=10;function Ue(e,t,n){if(n.aborted)return{retry:false,reason:"aborted"};let r=We(e);if(r==="quota")return{retry:false,reason:"daily-quota-exhausted"};if(r!=="burst"&&!isAutoRetryable(e.code))return{retry:false,reason:"terminal-code"};let o=r==="burst"?"burst-throttle":"retryable-code";if((()=>{if(n.policy===void 0)return false;try{return!n.policy.shouldRetry(e.code,t)}catch{return false}})())return{retry:false,reason:"terminal-code"};let i=()=>{if(n.policy===void 0)return null;let t;try{t=n.policy.maxAttempts(e.code)}catch{return null}return typeof t!="number"||!Number.isFinite(t)?null:Math.max(1,Math.min(je,Math.floor(t)))},a=n.perCallMaxAttempts??i()??n.maxAttempts;if(t+1>=a)return{retry:false,reason:"attempts-exhausted"};let l=Ve(e,n.now);return l!==null?l>De?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:o,delayMs:l}:{retry:true,reason:o,delayMs:backoffDelayMs(t,n.rng)}}function We(e){let t=e.code==="unknown"?fromWire(Ye(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}function Ve(e,t){let n=qe(e.raw);if(n!==null){let e=n-t;return e>0?e:0}let r=Me(e.raw);return r===null?null:Math.round(r*1e3)}function Me(e){for(let t of He(e)){let e=t.retry_after_seconds;if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return e}return null}function qe(e){for(let t of He(e)){let e=t.resets_at,n=Ke(e);if(n!==null)return n}return null}function He(e){if(!Ge(e))return[];let t=[e];for(let n of["error","detail"]){let r=e[n];Ge(r)&&t.push(r)}return t}function Ke(e){if(typeof e=="number"&&Number.isFinite(e))return e<1e11?Math.round(e*1e3):Math.round(e);if(typeof e=="string"&&e.trim().length>0){let t=Date.parse(e);return Number.isFinite(t)?t:null}return null}function Ye(e){for(let t of He(e)){let e=t.code;if(typeof e=="string"&&e.length>0)return e}return null}function Ge(e){return typeof e=="object"&&e!==null}async function Je(e){if(e.mode==="anonymous"){let t=await xe(e);return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}return{mode:"personalized",token:await e.identity.currentToken(),userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}}function Qe(e,t){let n=new AbortController,r=t.setTimeout(()=>n.abort(),e);return{signal:n.signal,cancel:()=>t.clearTimeout(r)}}function Ze(e,t){let n=()=>{};if(!t)return{signal:e,dispose:n};let r=new AbortController;if(e.aborted||t.aborted)return r.abort(),{signal:r.signal,dispose:n};let o=()=>r.abort();return e.addEventListener("abort",o,{once:true}),t.addEventListener("abort",o,{once:true}),{signal:r.signal,dispose:()=>{e.removeEventListener("abort",o),t.removeEventListener("abort",o)}}}function Xe(e,t,n){return e<=0||n?.aborted===true?Promise.resolve():new Promise(r=>{let o=t.setTimeout(()=>{n?.removeEventListener("abort",i),r()},e),i=()=>{t.clearTimeout(o),r()};n?.addEventListener("abort",i,{once:true})})}var et="/widget/v1/me/intro";function tt(e){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}function nt(e){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${e}: the response was not the documented shape`})}function rt(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e;if(!("seen_at"in t))return null;let n=t.seen_at;return n===null?/* @__PURE__ */Object.freeze({seenAt:null}):typeof n!="string"||n.length===0||n.length>64||Number.isNaN(Date.parse(n))?null:/* @__PURE__ */Object.freeze({seenAt:n})}function ot(e){let t=()=>{let{services:t}=e.registry;return it({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})},n=e=>Promise.resolve(err(tt(e)));return{read:r=>e.isDisposed?n("read"):t().read(r),markSeen:()=>e.isDisposed?n("markSeen"):t().markSeen()}}function it(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),n=async(e,n,r)=>{let o=await t.send(e,n,r);if(!o.ok)return err(o.error);let i=rt(o.value);return i===null?err(nt(e)):ok(i)};return{read(e){let t=e?.signal?{method:"GET",path:et,signal:e.signal}:{method:"GET",path:et};return n("intro.read",t,{maxAttempts:1})},markSeen(){return n("intro.markSeen",{method:"PUT",path:et,body:{seen:true}})}}}var at="everfur.intro.seen.v1:",lt=userRef=>`${at}${userRef}`;async function st(e,userRef){try{return await e.getItem(lt(userRef))!==null}catch{return false}}async function dt(e,userRef,t){try{await e.setItem(lt(userRef),t)}catch{}}async function ct(e){let{repo:t,kv:n,userRef:userRef,signal:r}=e;if(userRef===null||await st(n,userRef))return false;let o;try{o=await t.read(r?{signal:r}:void 0)}catch{return false}return r?.aborted===true||!o.ok?false:o.value.seenAt!==null?(await dt(n,userRef,o.value.seenAt),false):true}async function ut(e){let{repo:t,kv:n,userRef:userRef}=e;if(userRef!==null){await dt(n,userRef,(e.now?.()??/* @__PURE__ */new Date).toISOString());try{await t.markSeen()}catch{}}}var pt=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),ft=globalThis,ht=ft[pt]??(ft[pt]=createContext(null));ht.displayName??="EverfurContext";function gt(){let e=g(ht);if(e===null)throw new we("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}function healthPlanPetWords(e,t){let n=e?.trim()??"",r=n===""?"your pet":n,o=n===""?"Your pet":n;return t==="female"?{name:r,Name:o,poss:"her",Poss:"Her",obj:"her"}:t==="male"?{name:r,Name:o,poss:"his",Poss:"His",obj:"him"}:{name:r,Name:o,poss:`${r}'s`,Poss:`${o}'s`,obj:r}}var bt=e=>e===null?"":`${e.productName} renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`;function healthPlanFocusCopyFor(e){let t=healthPlanPetWords(e.name,e.sex),n=e=>e.petName?.trim()||t.name,NameOf=e=>e.petName?.trim()||t.Name,r=/* @__PURE__ */Object.freeze({jumpKicker:(e,n)=>n?`In ${t.poss} plan, every ${e.intervalDays} days`:e.offer?`${e.discountPercent}% off ${t.poss} first box`:e.intervalDays>0?`Ships every ${e.intervalDays} days`:r.onceLine(e),optionsLabel:"How to buy",subscribe:"Subscribe",bestValue:"Best value",subscribeLine:e=>e.offer?`First box, then ${e.box??""}`:`${e.box??""} every ${e.intervalDays} days`,priceLine:e=>e.offer?`${e.discountPercent}% off the first box. Ships every ${e.intervalDays} days.`:e.intervalDays>0?`Ships every ${e.intervalDays} days.`:r.onceOffer(e),once:"One box",onceLine:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once`:"Ships once",buyOnce:e=>`Buy one box, ${e.once??e.box??""}`,subscribed:"Subscribed",subscribedLine:(e,t)=>t===null?`Every ${e.intervalDays} days`:`Every ${e.intervalDays} days · next box ${t}`,manage:"Manage",checkoutKicker:"Checkout",checkoutTitle:e=>`Checkout: ${e.productName}`,checkoutOffer:e=>`${e.discountPercent}% off your first box.`,shipsEvery:"Ships every",days:e=>`${e} days`,buyOnceOption:"Buy once",checkoutGo:(e,t,n)=>`${t?"Subscribe":"Buy now"} · ${n} today`,renews:e=>`Renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`,onceFine:"One box, ships tomorrow.",onceOffer:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once.`:"Ships once.",checkoutNote:"",close:"Close",startedTitle:e=>`${NameOf(e)}'s plan has started.`,orderedTitle:()=>"Order placed.",startedWhat:e=>`${e.productName} ships tomorrow.`,startedNote:"",startedSteps:"What happens next",tomorrow:"Tomorrow",firstBoxShips:`${t.Poss} first box ships.`,trackingComesByText:"Tracking comes by text.",checkin:e=>e===null?"A 2-week check-in by text.":`A 2-week check-in by text: ${e}`,refill:`A text 3 days before ${t.poss} next box. Reply SKIP to skip it.`,nextBoxShips:e=>`${t.Poss} next box ships, ${e.box??""}.`,startedDone:`Back to ${t.poss} plan`,manageKicker:"Your subscription",manageTitle:e=>`Manage ${e.productName}`,skip:"Skip the next box",cancel:"Cancel subscription",skipped:(e,n)=>n===null?"Skipped.":`Skipped. ${t.Poss} next box ships ${n}.`,cancelled:e=>`${e.productName} is cancelled. Restart it from ${t.poss} plan anytime.`,orders:"Orders",startedHeader:"Subscribed",placedHeader:"Order placed",cartCheckoutTitle:"Checkout",orderNote:"",cartLabel:e=>e>0?`Cart, ${e} item${e>1?"s":""}`:"Cart, empty",addToCart:e=>`Add to cart · ${e}`,viewCart:"View cart",addedToCart:(e,t)=>`${e.productName} is in your cart${t?", as a subscription":""}.`,removedFromCart:e=>`${e} is out of your cart.`,cartTitle:"Cart",cartEmptyTitle:"Your cart is empty",cartEmptyBody:e=>`${NameOf(e)}'s plan pick lands here when you add it.`,seeOrders:`See ${t.poss} orders`,quantityLabel:e=>`How many: ${e}`,fewer:"One fewer",more:"One more",remove:"Remove",cartSubLine:e=>e.offer?`First box ${e.discountPercent}% off, then ${e.box??""} every ${e.intervalDays} days`:`Every ${e.intervalDays} days`,cartOnceLine:(e,n)=>n?`An extra box. ${t.Poss} plan keeps shipping.`:e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",cartModeLabel:e=>`How to buy ${e}`,cartModeSubscribe:e=>e.offer?`Subscribe, ${e.discountPercent}% off the first box`:"Subscribe",cartModeOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",subtotal:"Subtotal",shipping:"Shipping",shippingValue:"",shippingTag:"",total:"Total",dueToday:"Due today",thenRenews:e=>`Then ${e.productName}`,renewsEvery:e=>`${e.box??""} every ${e.intervalDays} days`,checkoutCart:e=>`Checkout · ${e}`,cartOneAtATime:"",cartSubscriptionApart:"",cartItemSubscription:e=>`Subscription, every ${e.intervalDays} days`,cartItemQuantity:e=>`Qty ${e}`,placeOrder:(e,t)=>`${t?"Place order and subscribe":"Place order"} · ${e}`,cartFine:e=>`${e===null?"":`${bt(e)} `}Ships tomorrow.`,placedSteps:"What's coming",placedShips:"It ships.",placedArrives:"It arrives at home.",viewOrder:"View order",herSubscription:`${t.Poss} subscription`,nextBox:e=>`Next box ${e}`,everyDays:e=>`Every ${e} days`,ordersHeading:e=>e?"Orders":`${t.Poss} orders`,ordersFine:"",ordersEmptyTitle:"No orders yet",ordersEmptyBody:e=>`The boxes from ${n(e)}'s plan show up here.`,moreOrders:"",orderSteps:["Ordered","Shipped","Out for delivery","Delivered"],subscriptionBox:"Subscription box",orderTitle:e=>e===null?"Order":`Order ${e}`,arrivesBy:e=>`Arrives by ${e}`,deliveredOn:e=>`Delivered ${e}`,expected:e=>`Expected ${e}`,tracking:"Tracking",trackingByText:"The tracking number comes by text when it ships.",trackOn:e=>`Track on ${e}`,trackLink:"",inThisOrder:"In this order",orderItemLine:(e,t)=>`Qty ${e}${t?" · subscription box":""}`,paidWith:"Paid with",buyAgain:"Buy again",orderHelp:"Get help with this order",addWeightTitle:`Add ${t.poss} weight to size ${t.poss} dose`,addWeightBody:`From a home scale or ${t.poss} last vet visit.`,connectRecordsTitle:`Connect ${t.poss} vet records`,connectRecordsBody:`${t.Poss} weight, visits and labs make ${t.poss} plan sharper.`,weightKicker:`${t.Poss} weight`,weightTitle:e=>`Add ${n(e)}'s weight`,weightBody:`From a home scale or ${t.poss} last vet visit. ${t.Poss} plan uses it to size ${t.poss} dose.`,weightField:`${t.Poss} weight`,weightUnit:"lb",weightUnitKg:"kg",weightErrorKg:"Enter your pet’s weight",weightError:`Enter ${t.poss} weight in pounds, like 14.1.`,weightSave:`Save ${t.poss} weight`,weightSaved:e=>`Saved: ${e} lb. ${t.Poss} dose is sized for ${t.obj}.`,weightSavedKg:e=>`Saved: ${e} kg. ${t.Poss} dose is sized for ${t.obj}.`,checkoutFailed:"That didn't go through. Please try again.",builtWith:e=>`Built with ${e}`,fromVet:e=>`From ${e}`,waitVetTips:e=>`Free tips from ${e}, built around that risk`,signalsFit:e=>`${e} of ${e} signals fit ${t.Name}`,signalsValue:e=>`${e}/${e}`,noPick:`No supplement for this one. ${t.Poss} vet comes first.`,callYourVet:"Call your vet today",callAVet:"Call a vet today",saveForCheckup:`Save for ${t.poss} next checkup`,savedForCheckup:`Saved for ${t.poss} next checkup`,blanksLabel:`${t.Poss} three blanks`,blanksAsked:e=>`Asked ${e}`,blanksAskedNoClinic:"",blanksWaitPill:"2 to 5 days",blanksFilledKicker:`From ${t.poss} vet records`,blanksFilled:(e,t)=>`${e} of ${t} filled`,blanksWeight:`Keep ${t.obj} at `,blanksWeightSource:`From ${t.poss} vet visits`,blanksDose:(e,t)=>`${e} of ${t}`,blanksDoseSource:`Sized to ${t.poss} weight`,blanksShots:`${t.Poss} next shots are due `,blanksShotsSource:`From ${t.poss} clinic`,blankEmpty:"blank",recordsLanded:`${t.Poss} records are in. ${t.Poss} plan now uses ${t.poss} weight and ${t.poss} visits.`,todayLabel:`${t.Poss} Health Plan`,poweredBy:"powered by",poweredByName:"Everfur",seeMore:"See more",seeLess:"See less",reportActions:"Actions to take",openReport:`Open it in ${t.poss} report`,askReport:"Ask about it",fullOpen:`See ${t.poss} full plan`,fullOpenLine:`${t.Poss} vet, reviews and ${t.poss} checkup`,fullClose:`Show ${t.poss} brief plan`,fullCloseLine:`${t.Poss} risk, tips, pick and signs`,hopeNoted:e=>`Noted. When ${t.poss} results land, we'll start with ${e}.`,productLink:e=>`${e}, see the product`,productPhotos:e=>`${e} photos, swipe for more`,shopAll:"Shop all",madeFor:`Made for ${t.name}`,ratingLine:e=>`· ${e} reviews`,productOffer:e=>`${e.discountPercent}% off ${t.poss} first box`,productEvery:e=>`Every ${e.intervalDays} days`,productOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",productExtraBox:"An extra box",productOnPlan:e=>`On ${t.poss} plan, every ${e.intervalDays} days. This adds one extra box.`,quantity:"Quantity",description:"Description",readMore:"Read more",readLess:"Read less",whatsInside:"What's inside",howMuch:"How much",reviewsTitle:"Reviews",reviewCount:e=>`${e} reviews`,reviewsSwipe:"Reviews, swipe for more",readAllReviews:e=>`Read all ${e} reviews`,starsLabel:e=>`${e} out of 5 stars`,buyNow:"Buy now"});return r}healthPlanFocusCopyFor({sex:"female"});var mt=/* @__PURE__ */Object.freeze({eyebrow:"",lede:"",pendingLede:"",recordsRowMore:"",planTopic:"",askTitle:"",noVetTitle:"",sentFine:"",clinicEta:"",blanksDetail:"",bannerBody:"",appName:""});function introPetWords(e,t){let n=healthPlanPetWords(e,t);return{...n,subj:t==="female"?"she":t==="male"?"he":n.name}}var yt=["","one","two","three","four","five","six","seven","eight","nine","ten"];function numberWord(e){return Number.isInteger(e)&&e>=1&&e<=10?yt[e]??null:null}var vt=e=>e===""?e:e.charAt(0).toUpperCase()+e.slice(1);function defaultIntroBlanks(e){return[{before:`Keep ${e.obj} at `,after:" lb",source:`From ${e.poss} vet visits`},{before:`${e.Poss} next shots are due `,after:"",source:`From ${e.poss} clinic`,width:"l"}]}function introFacts(e,t){let n=e?.pet.name??t??null,r=e?.page??null,o=r?.byline?.name?.trim()??"";return{pet:introPetWords(n,e?.pet.sex??null),planTitle:r?.title.trim()??"",vetName:e?.vetReviewed===true&&o!==""?o:null,tips:r?.routine?.steps.length??0}}function introText(e){let{facts:t,copy:n,resultsPending:r}=e,o=t.pet,i=numberWord(e.blanks),a=numberWord(t.tips),l=n.planTopic.trim(),s=t.vetName===null?null:t.vetName.replace(/ /g," "),d=l===""?"":`One plan for ${o.poss} ${l}${s===null?"":`, built with ${s}`}.`,c=a===null?"":`${vt(a)} tips, one thing to add.`,u=r?`${o.Poss} plan arrives with ${o.poss} results.`:[d,c].filter(e=>e!=="").join(" "),p=[`What could go wrong for ${o.name}, and what's changed.`,n.recordsRowMore.trim()].filter(e=>e!=="").join(" ");return{sheetLabel:{intro:`Welcome to ${o.Name}'s tab`,records:`Request ${o.poss} records`},back:"Back",skip:"Skip",close:"Close",poweredBy:"powered by",tabs:{eyebrow:n.eyebrow,title:`${o.Name}'s health, in three tabs.`,lede:r?n.pendingLede:n.lede,ask:`Trained on 50,000+ peer-reviewed vet publications. Ask about ${o.name} any hour (the 2 am ones too).`,plan:u,records:p,next:"Next",seePlan:`See ${o.poss} plan`},ask:{title:n.askTitle,lede:i===null?"":`${o.Poss} plan has ${i} blanks only ${o.poss} vet can fill (we ask the clinic for you).`,blanksPill:`${e.blanks} blanks`,blankLabel:"blank",later:"Later",connect:`Connect ${o.poss} vet`,fine:`We send ${o.poss} clinic a secure request and read every page they send back.`,noVet:`${o.Name} doesn't have a vet yet`},clinic:{title:`Where does ${o.name} see ${o.poss} vet?`,search:"Clinic name, city or zip",searchLabel:`Search for ${o.poss} clinic`,list:"Clinics",more:`Sees more than one? Start with the one ${o.subj} sees most.`,request:`Request ${o.poss} records`,upload:"Upload a PDF or a photo instead",add:`Add ${o.poss} clinic`},sent:{eyebrow:"Request sent",title:"Sent. Now it's the clinic's turn.",track:`${o.Poss} records request`,sentStep:"Request sent",sentTo:e=>`Today, to ${e}`,clinicStep:`${o.Poss} clinic sends ${o.poss} records`,clinicEta:n.clinicEta,blanksStep:i===null?"":`${o.Poss} ${i} blanks fill in`,blanksDetail:n.blanksDetail,lede:`Turn on notifications and we'll tell you the minute ${o.name}'s records are in.`,notify:"Turn on notifications",notNow:"Not now",fine:n.sentFine},noVet:{title:n.noVetTitle,lede:i===null?"":`When ${o.subj} does, connect ${o.poss} vet in Records and ${o.poss} ${i} blanks fill in.`,seePlan:`See ${o.poss} plan`},toast:{on:`Notifications on. We'll tell you the minute ${o.name}'s records are in.`,off:`Requested. ${o.Name}'s records will show up here when they're in.`,landed:`${o.Poss} records are in. ${o.Poss} plan now uses ${o.poss} weight and ${o.poss} visits.`},banner:{app:n.appName,now:"now",title:`${o.Name}'s records are in`,body:n.bannerBody}}}var kt=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),wt=globalThis;function _t(e){if(typeof e!="object"||e===null)return false;let t=e;return t.holds instanceof Set&&t.listeners instanceof Set}var St=wt[kt],xt=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),Ct=_t(St)?St:wt[kt]=xt();function Rt(){for(let e of[...Ct.listeners])try{e()}catch{}}function Ft(){let e={};return Ct.holds.add(e),Ct.holds.size===1&&Rt(),()=>{Ct.holds.delete(e)&&Ct.holds.size===0&&Rt()}}function At(e){f(()=>e?Ft():void 0,[e])}function Tt(e){let t={};if(e==null)return t;for(let n of Object.keys(e))e[n]!==void 0&&(t[n]=e[n]);return t}var It=/* @__PURE__ */Object.freeze({heading:"Chats",empty:"No chats yet",emptyBody:"Start a new conversation to see it here.",noMatch:"No chats match that.",loading:"Loading your chats…",loadFailed:"Couldn’t load your chats",loadingMore:"Loading more…",untitled:"New conversation",newChat:"New chat",searchPlaceholder:"Search chats…",search:"Search chats",countLabel:"Chats and vet messages",countSeparator:" · ",newReply:"New reply · {date}",retry:"Try again",close:"Close",closeA11y:"Close history",more:"Load more",earlier:"Load earlier messages",loadingEarlier:"Loading earlier messages…",openConversation:"Open conversation",unreadPrefix:"Unread. "});var Et=/* @__PURE__ */Object.freeze({title:"Notifications",loading:"Loading notifications",emptyTitle:"You’re all caught up",emptyBody:"Updates about your pet’s care will show up here.",errorTitle:"Could not load your notifications",errorBody:"Check your connection and try again.",retry:"Try again",rowFallbackTitle:"Notification",unreadPrefix:"Unread.",timeAgoSuffix:"ago",now:"Now",more:"Show more",detailErrorTitle:"Could not load this notification",detailErrorBody:"Check your connection and try again.",notFoundTitle:"This notification is no longer available",notFoundBody:"The notification may have expired or been removed.",back:"Back to inbox"});function surfaceForNotification(e){let{target:t}=e;switch(t.kind){case"case":case"chat":/* @__PURE__ */
|
|
8
8
|
return Object.freeze({surface:"chat",petRef:t.petRef,checkinTarget:t});case"pet":return e.eventType==="chat.reminder_due"?/* @__PURE__ */Object.freeze({surface:"chat",petRef:t.petRef,checkinTarget:/* @__PURE__ */Object.freeze({kind:"chat",petRef:t.petRef,conversationId:null})}):e.eventType.startsWith("care.")?null:/* @__PURE__ */Object.freeze({surface:"records",petRef:t.petRef,requestId:null});case"tip":/* @__PURE__ */
|
|
9
9
|
return Object.freeze({surface:"chat",petRef:t.petRef,checkinTarget:null});case"record_request":/* @__PURE__ */
|
|
10
10
|
return Object.freeze({surface:"records",petRef:t.petRef,requestId:t.requestId});case"records":case"vaccine":case"labs":/* @__PURE__ */
|
|
11
11
|
return Object.freeze({surface:"records",petRef:t.petRef,requestId:null});case"visit":/* @__PURE__ */
|
|
12
12
|
return Object.freeze({surface:"visit",visitRef:t.visitRef,intent:t.intent,petRef:t.petRef});case"health_plan":/* @__PURE__ */
|
|
13
|
-
return Object.freeze({surface:"health_plan",petRef:t.petRef});default:return null}}function
|
|
13
|
+
return Object.freeze({surface:"health_plan",petRef:t.petRef});default:return null}}function Dt(e,t,n){let r=new Date(e),o=r.getTime();if(Number.isNaN(o))return null;let i=t-o;if(i<6e4)return n;if(i<36e5)return`${Math.floor(i/6e4)}m`;if(i<864e5)return`${Math.floor(i/36e5)}h`;if(i<6048e5)return`${Math.floor(i/864e5)}d`;if(i<5*6048e5)return`${Math.floor(i/6048e5)}w`;let a=r.getFullYear()===new Date(t).getFullYear();try{return r.toLocaleDateString("en-US",{month:"short",day:"numeric",...a?{}:{year:"numeric"}})}catch{return r.toISOString().slice(0,10)}}function Ot(e){return typeof e=="string"&&/^\d+[mhdw]$/.test(e)}function Pt(e,t,n){let r=e.notification===null?null:surfaceForNotification(e.notification);if(r?.surface==="health_plan")return{tab:"plan"};if(r?.surface==="records")return{tab:"records"};if(r?.surface==="visit")return null;let{item:o}=e;if(o.title.trim()==="")return null;let i=Dt(o.createdAt,n,t.now),a=i!==null&&Ot(i)?`${i} ${t.ago}`:i,l=a===null?t.kicker.replace(/\s*·\s*\{time\}/g,"").replace(/\{time\}/g,""):t.kicker.replace(/\{time\}/g,a);return{tab:"ask",prompt:o.title,card:{kicker:l,title:o.title,...o.body.trim()===""?{}:{body:o.body}}}}var zt="your pet";var Bt=/* @__PURE__ */Symbol.for("everfur.sdk.rn.askHome");function Nt(){let e=globalThis,t=e[Bt];if(t!==void 0)return t;let n={factory:createContext(null),home:createContext(null)};return e[Bt]=n,n}var $t=Nt().factory;Nt().home;var Lt=()=>{};function jt(){try{return P.currentState==="active"}catch{return false}}function createAppStateLifecycle(){return{onForeground(e){let t;try{let n=P.currentState==="background";t=P.addEventListener("change",t=>{t==="background"?n=!0:t==="active"&&n&&(n=!1,e())})}catch{return Lt}return()=>t.remove()},isVisible:jt}}var Ut=/* @__PURE__ */Symbol.for("everfur.sdk.rn.chatPaneShown");function Wt(){let e=globalThis,t=e[Ut];if(t!==void 0)return t;let n=createContext(true);return e[Ut]=n,n}var Vt=Wt();var Mt=/* @__PURE__ */Symbol.for("everfur.sdk.rn.chatShellTabsBar");function qt(){let e=globalThis,t=e[Mt];if(t!==void 0)return t;let n=createContext(false);return e[Mt]=n,n}var Ht=qt();function Kt(e){return e!=null&&(e.wait!==void 0||e.pick.hidden===true)}var Yt=/* @__PURE__ */Object.freeze({ask:"Ask",vet:"Vet",plan:"Health Plan",records:"Records",listAll:"Ask, Health Plan and Records",listNoPlan:"Ask and Records"}),Gt=/* @__PURE__ */Object.freeze(["ask","plan","records"]),Jt=Gt,Qt=/* @__PURE__ */Object.freeze(["ask","records"]);function Zt(e,t=Gt){if(t===Gt)return e?Qt:Jt;let n=e?t.filter(e=>e!=="plan"):t;return n.length===0?["ask"]:n}function Xt(e,t,n=Gt){let r=Zt(t,n);return r.includes(e)?e:r.includes("ask")?"ask":r[0]??"ask"}function en(e,t){if(tn(e,Jt))return t.listAll;if(tn(e,Qt))return t.listNoPlan;let n=e.map(e=>t[e]);return n.length<=1?n[0]??"":`${n.slice(0,-1).join(", ")} and ${n[n.length-1]??""}`}function tn(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function nn(e,t,n=Gt){return e.via==="link"?Xt(e.ask!==void 0?"ask":e.tab,t,n):Xt("plan",t,n)}function rn(e){let t=e.key===void 0?"":String(e.key);return e.via==="link"?`link:${e.tab}:${e.ask?.prompt??""}:${t}`:`plain:${t}`}var on=6e4;function an(e,t,n=on){return e!==null&&t-e>=n}function ln(e){return e.pageVisible&&e.watching&&an(e.lastReadAt,e.now)}function sn(e){return JSON.stringify(e,(e,t)=>{if(t===null||typeof t!="object"||Array.isArray(t))return t;let n={};for(let e of Object.keys(t).sort())n[e]=t[e];return n})}function dn(e){if(e===null)return"";let t=e.items.map(e=>[e.productId,e.partnerSku,e.title,e.description,e.category,e.price,e.currency,e.imageUrl,e.url,e.sample]).sort((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0);return JSON.stringify([e.headline,t])}function cn(e){return e===null?"":sn([e.checkout,e.page])}function un(e,t){return JSON.stringify([dn(e),cn(t)])}function pn(e,t){return e!=="empty"&&e!=="ready"?false:t==="ready"||t==="failed"||t==="idle"}function fn(e,t){return e==="empty"&&!Kt(t?.page)}function hn(e,t){return e===void 0?{empty:t.empty,signature:t.signature,epoch:0}:e.empty===t.empty&&e.signature===t.signature?e:{empty:t.empty,signature:t.signature,epoch:e.signature===t.signature?e.epoch:e.epoch+1}}var gn=5e3;function bn(e){return e.sameOpen?e.plan===void 0?e.planFailed?"drop":"wait":e.plan.empty?"drop":e.recordsPending?"wait":"play":"drop"}function mn(){let e=/* @__PURE__ */new Set;return{listen(t){let n=()=>t();return e.add(n),()=>{e.delete(n)}},fire(){for(let t of[...e])try{t()}catch{}}}}function yn(e,t){return{...{onForeground(n){let r=e.onForeground(n),o=t.listen(n);return()=>{o(),r()}}},...e.onOnline===void 0?{}:{onOnline:e.onOnline.bind(e)},...e.onAnnounced===void 0?{}:{onAnnounced:e.onAnnounced.bind(e)},...e.isOffline===void 0?{}:{isOffline:e.isOffline.bind(e)}}}function vn(e,t){return{...{onForeground(n){return e.onForeground(()=>{t()&&n()})}},...e.onOnline===void 0?{}:{onOnline:e.onOnline.bind(e)},...e.onAnnounced===void 0?{}:{onAnnounced:e.onAnnounced.bind(e)},...e.isOffline===void 0?{}:{isOffline:e.isOffline.bind(e)}}}function kn(e,t){return!e&&t}var wn=/* @__PURE__ */Object.freeze({chat:/* @__PURE__ */Object.freeze(["chat.message.create"]),records:/* @__PURE__ */Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:/* @__PURE__ */Object.freeze(["records.clinic.create"]),video:/* @__PURE__ */Object.freeze(["video.gait.execute"]),photo:/* @__PURE__ */Object.freeze(["photo.checkup.execute"]),animations:/* @__PURE__ */Object.freeze(["animations.state.read"]),televet:/* @__PURE__ */Object.freeze(["televet.visit.create"]),texting:/* @__PURE__ */Object.freeze(["sms.identity.read","sms.identity.update"]),healthPlan:/* @__PURE__ */Object.freeze(["shop.plan.read","shop.plan.update"])});function requires(e){return wn[e]}function decideCapability(e,t,n){let r=requires(e),o=/* @__PURE__ */new Map;for(let e of t)o.set(e.resource,e);if(n?.isPending===true&&r.some(e=>!o.has(e)))return xn({name:e,enabled:false,isPending:true,limits:{}});let i=_n(r,o);return r.filter(e=>o.get(e)?.granted!==true).length===0?xn({name:e,enabled:true,isPending:false,limits:i}):xn({name:e,enabled:false,isPending:false,limits:i,disabled:Sn(r,o)})}function _n(e,t){let n={};for(let r of e){let e=t.get(r)?.limits;if(e)for(let[t,r]of Object.entries(e)){let e=n[t];n[t]=e===void 0?r:Math.min(e,r)}}return n}function Sn(e,t){for(let n of e){let e=t.get(n)?.disabled;if(e)/* @__PURE__ */
|
|
14
14
|
return Object.freeze({reason:e.reason,level:e.level,recoverable:e.recoverable})}/* @__PURE__ */
|
|
15
|
-
return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitlement",recoverable:false})}function bn(e){let t={name:e.name,enabled:e.enabled,isPending:e.isPending,limits:/* @__PURE__ */Object.freeze({...e.limits})};return e.disabled!==void 0&&(t.disabled=e.disabled),/* @__PURE__ */Object.freeze(t)}function mn(e){let{runtime:t}=ft(),n=t.entitlements,r=p(e=>n===void 0?()=>{}:n.subscribe(e),[n]),o=p(()=>{if(n===void 0)return false;let t=n.getSnapshot();return decideCapability(e,t.decisions,{isPending:t.isPending}).enabled},[n,e]);return g(r,o,o)}var yn=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(e,t){let n=e.type,r=n.families[t];return t==="mono"||n.namedFaces[t]?{fontFamily:r}:{fontFamily:r,fontWeight:n.weight[yn[t]]}}function headingFace(e,t="bold"){let{headingFamily:n,headingWeight:r}=e.type;if(n===null&&r===null)return face(e,t);if(n!==null)return{fontFamily:n,fontWeight:r??e.type.weight[yn[t]]};let o=face(e,t);return o.fontWeight===void 0||r===null?o:{fontFamily:o.fontFamily,fontWeight:r}}function vn(e){return e<=450?"regular":e<=650?"medium":"bold"}var kn={regular:"mono",medium:"monoMedium",bold:"monoBold"};function textRole(e,t){let n=wn.get(e);n===void 0&&(n=/* @__PURE__ */new Map,wn.set(e,n));let r=n.get(t);if(r!==void 0)return r;let o=_n(e,t);return n.set(t,o),o}var wn=/* @__PURE__ */new WeakMap;function _n(e,t){let n=e.type.roles[t],r=n.weight==="400"&&n.face!=="mono"?e.type.weight.regular:n.weight,o=vn(Number(r)),i=n.face==="mono"?face(e,kn[o]):n.face==="heading"?headingFace(e,o):face(e,o),a=n.face==="heading"?e.type.headingWeight??r:r,l=i.fontWeight===void 0?i:{fontFamily:i.fontFamily,fontWeight:a},s=n.size,d={...l,fontSize:s,lineHeight:Math.round(s*n.lineHeight*100)/100};return n.letterSpacing!==0&&(d.letterSpacing=Math.round(s*n.letterSpacing*100)/100),n.uppercase&&(d.textTransform="uppercase"),/* @__PURE__ */Object.freeze(d)}var Sn=/* @__PURE__ */Object.freeze({display:/* @__PURE__ */Object.freeze({size:29,lineHeight:1.06,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),title:/* @__PURE__ */Object.freeze({size:23,lineHeight:1.12,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),cardTitle:/* @__PURE__ */Object.freeze({size:19,lineHeight:1.22,weight:"800",face:"sans",letterSpacing:0,uppercase:false,tier:"heading"}),rowTitle:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.4,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),body:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),message:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),bodySmall:/* @__PURE__ */Object.freeze({size:14.5,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),caption:/* @__PURE__ */Object.freeze({size:13,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),label:/* @__PURE__ */Object.freeze({size:10.5,lineHeight:1.4,weight:"400",face:"mono",letterSpacing:.05,uppercase:true,tier:"compact"}),eyebrow:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"mono",letterSpacing:.07,uppercase:true,tier:"compact"}),chip:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.3,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),tab:/* @__PURE__ */Object.freeze({size:16,lineHeight:1.5,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),button:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"control"}),badge:/* @__PURE__ */Object.freeze({size:12,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"badge"})});var xn=Object.freeze;function deepFreeze(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){xn(e);for(let t of Object.keys(e))deepFreeze(e[t])}return e}var Cn=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var Rn={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},Fn={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},An={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},In={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},Tn={regular:"400",medium:"500",bold:"700"},En={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},Dn=0,On="System",zn="monospace",Pn=["content","heading","control","compact","badge"];function Bn(e){let t={};for(let n of Pn)t[n]=e;return t}var Nn=[];function $n(){return{family:On,mono:zn,fontUrl:null,families:{regular:On,medium:On,bold:On,mono:zn,monoMedium:zn,monoBold:zn},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:An,tierSizes:Bn(An),lineHeight:In,weight:Tn,letterSpacing:En,scale:1,maxScale:Dn,scaleCaps:Cn,headingFamily:null,headingWeight:null,fontSources:Nn,roles:Sn,typeScale:1}}var Ln={},jn=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(e){return`cubic-bezier(${e.join(", ")})`}var Wn={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(jn.standard),emphasized:cssCubicBezier(jn.emphasized),exit:cssCubicBezier(jn.exit)},reducedMotion:false},Un={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},Vn=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:Un,space:Rn,radius:Fn,type:$n(),motion:Wn,slots:Ln}),Mn={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"};deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:Mn,space:Rn,radius:Fn,type:$n(),motion:Wn,slots:Ln});var qn=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),Hn=globalThis,Kn=Hn[qn]??(Hn[qn]=createContext(Vn));Kn.displayName??="EverfurThemeContext";function useEverfurTheme(){return f(Kn)}function Yn(e,t){let n=e.scaleCaps[t];return n>0?n:void 0}function Text({tier:e,variant:t,...n}){let r=useEverfurTheme(),o=t===void 0?void 0:r.type.roles[t],i=Yn(r.type,e??o?.tier??"content"),a=t===void 0?n:{...n,style:[{...textRole(r,t),color:r.color.text.primary,flexShrink:1},n.style]};return l(S,i===void 0?a:{maxFontSizeMultiplier:i,...a})}var Gn=a(function(e,t){return l(m,{...e,...t===null?{}:{ref:t}})});var Jn=640,Qn=600,Zn=/* @__PURE__ */Object.freeze({width:0,height:0}),Xn="useWindowDimensions"in b&&typeof b.useWindowDimensions=="function"?b.useWindowDimensions:()=>Zn,er=/* @__PURE__ */Object.freeze({width:"100%",maxWidth:Jn,alignSelf:"center"}),tr=/* @__PURE__ */Object.freeze({...er,flex:1}),nr=/* @__PURE__ */Object.freeze({...er,flexGrow:1,flexShrink:1});function rr(){return Xn().width>=Qn}function or(){let e=rr();return{tablet:e,column:e?tr:{flex:1}}}function ir(e="flow"){let{width:t}=Xn();if(t<Qn)return null;if(e==="flow")return er;let n=Math.max(0,Math.round((t-Jn)/2));return{left:n,right:n}}function ar(e,t){return t===null?e:[e,t]}var lr=/* @__PURE__ */Symbol.for("@everfur/sdk#InSdkColumn@v1"),sr=globalThis,dr=sr[lr]??(sr[lr]=createContext(false));dr.displayName??="EverfurInSdkColumn";function SdkColumnScope({children:e}){/* @__PURE__ */
|
|
16
|
-
return P(dr.Provider,{value:true,children:e})}function SdkTabletColumn({children:e,style:t,testID:n}){let r=rr(),o=f(dr);return!r||o?e:/* @__PURE__ */P(v,{style:t===void 0?nr:[nr,t],testID:n??"everfur-tablet-column",children:/* @__PURE__ */P(dr.Provider,{value:true,children:e})})}function parseColor(e){let t=cr(e);return t===null?null:mr(t)}function cr(e){if(typeof e=="number")return fr(e);if(typeof e!="string")return null;let t=e.trim();if(t.length===0)return null;if(t.startsWith("#"))return ur(t.slice(1));if(t.toLowerCase().startsWith("0x"))return ur(t.slice(2));if(t.toLowerCase().startsWith("rgb"))return pr(t);if(/^[0-9a-fA-F]+$/.test(t)){let e=ur(t);if(e!==null)return e}return/^\d+$/.test(t)?fr(Number.parseInt(t,10)):null}function ur(e){let t=e.trim();if(!/^[0-9a-fA-F]+$/.test(t))return null;if(t.length===3)return{r:gr(t[0]),g:gr(t[1]),b:gr(t[2]),a:1};if(t.length===6)return{r:hr(t,0),g:hr(t,2),b:hr(t,4),a:1};if(t.length===8){let e=hr(t,0);return{r:hr(t,2),g:hr(t,4),b:hr(t,6),a:e/255}}return null}function pr(e){let t=e.indexOf("("),n=e.indexOf(")");if(t<0||n<0||n<t)return null;let r=e.slice(t+1,n).split(",").map(e=>e.trim());if(r.length<3)return null;let o=br(Number(r[0])),i=br(Number(r[1])),a=br(Number(r[2]));if(o===null||i===null||a===null)return null;let l=1;if(r.length>=4){let e=Number(r[3]);if(!Number.isFinite(e))return null;l=Math.min(1,Math.max(0,e))}return{r:o,g:i,b:a,a:l}}function fr(e){if(!Number.isFinite(e))return null;let t=Math.trunc(e)>>>0,n=t>>>24&255;return{r:t>>>16&255,g:t>>>8&255,b:t&255,a:n===0?1:n/255}}function hr(e,t){return Number.parseInt(e.slice(t,t+2),16)}function gr(e){return Number.parseInt(`${e??"0"}${e??"0"}`,16)}function br(e){return Number.isFinite(e)?Math.min(255,Math.max(0,Math.round(e))):null}function mr(e){if(e.a>=1)return yr(e.r,e.g,e.b);let t=Math.round(e.a*1e3)/1e3;return`rgba(${e.r},${e.g},${e.b},${t})`}function yr(e,t,n){return`#${vr(e)}${vr(t)}${vr(n)}`.toUpperCase()}function vr(e){return e.toString(16).padStart(2,"0")}var kr="#111111",wr="#FFFFFF",_r="#000000";function readableOn(e){let t=cr(e);if(t===null)return wr;let n=Cr(t),r=Cr({r:17,g:17,b:17}),o=Cr({r:255,g:255,b:255});return Fr(n,o)>=Fr(n,r)?wr:kr}function Sr(e,t){let n=readableOn(e);return contrastRatio(n,e)>=t?n:contrastRatio(wr,e)>=contrastRatio(_r,e)?wr:_r}function xr(e){let t=t=>e.reduce((e,n)=>Math.min(e,contrastRatio(t,n)),Number.POSITIVE_INFINITY);return t(wr)>=t(_r)?wr:_r}function Cr(e){let t=Rr(e.r/255),n=Rr(e.g/255),r=Rr(e.b/255);return.2126*t+.7152*n+.0722*r}function Rr(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Fr(e,t){let n=Math.max(e,t),r=Math.min(e,t);return(n+.05)/(r+.05)}function contrastRatio(e,t){let n=cr(e),r=cr(t);if(n===null||r===null)return 1;let o=r.a>=1?r:{...r},i=n.a>=1?n:Ar(n,o);return Fr(Cr(i),Cr(o))}function Ar(e,t){let n=e.a,r=(e,t)=>Math.round(e*n+t*(1-n));return{r:r(e.r,t.r),g:r(e.g,t.g),b:r(e.b,t.b),a:1}}function Ir(e,t){let n=cr(e),r=cr(t);if(n===null||r===null)return null;let o=n.a>=1?n:Ar(n,{...r});return yr(o.r,o.g,o.b)}function Tr(e,t){let n=cr(e);if(n===null)return null;let r=Math.min(1,Math.max(0,t));return`rgba(${n.r}, ${n.g}, ${n.b}, ${r})`}var Er=.05;function Dr(e,t,n,r){let o=t[0];if(o===void 0)return n;let i=e=>t.every(t=>contrastRatio(e,t)>=r);if(cr(e)===null)return n;if(i(e))return e;let a=Ir(e,o),l=a===null?null:cr(a),s=cr(n);if(l===null||s===null)return n;for(let e=1;e<1/Er;e+=1){let t=e*Er,n=(e,n)=>Math.round(e+(n-e)*t),r=yr(n(l.r,s.r),n(l.g,s.g),n(l.b,s.b));if(i(r))return r}return n}var Or=/* @__PURE__ */Object.freeze({ink:"#262523",ink2:"#4A4845",ink3:"#6B6863",paper:"#F8F7F4",card:"#FFFFFF",line:"#E7E6E2",tile:"#F2F1EE",shadow:"rgba(38, 37, 35, .07)",riskBg:"#FFE3E1",riskInk:"#B0231B",riskDot:"#E5372B",clearBg:"#E6F4D3",clearInk:"#2F6A12",clearDot:"#5FA82B",watchDot:"#E5A000"}),zr=/* @__PURE__ */new WeakMap;function Pr(e){let t=zr.get(e);if(t!==void 0)return t;let n=e.color,r=e.brightness==="dark",o=r?{dark:r,ink:n.text.primary,ink2:n.text.secondary,ink3:n.text.muted,paper:n.background,card:n.surface,line:n.borderRingCream,tile:n.surfaceSubtle,shadow:n.shadow,riskBg:n.badgeBgCritical,riskInk:n.danger,riskDot:n.danger,clearBg:n.badgeBgPositive,clearInk:n.success,clearDot:n.success,watchDot:n.warningStrong}:{dark:r,...Or},i=(e,t)=>Dr(e,t,xr(t),Br),a=(e,t)=>contrastRatio(e,t)>=Br?e:Sr(t,Br),l=[o.card,o.paper].map(e=>Ir(n.brandSoft,e)??e),s={primary:n.primary,onPrimary:a(n.onPrimary,n.primary),accent:n.accent,onAccent:a(n.onAccent,n.accent),link:i(n.linkInk,[o.card,o.paper,o.tile]),badge:n.brandSoft,onBadge:i(n.brandInk,l)},d=/* @__PURE__ */Object.freeze({...o,...s});return zr.set(e,d),d}var Br=4.5;function Nr(e,t){for(let n of t)if(contrastRatio(n,e)>=Br)return n;return Sr(e,Br)}function $r(e,t,n){let r=Tr(e,t);return(r===null?null:Ir(r,n))??n}function Lr(e){let t=Pr(e),n=e.color,r=t.card;return{ink:t.ink,ink2:t.ink2,ink3:t.ink3,paper:t.paper,tile:t.tile,line:t.line,card:r,onInk:t.dark?n.background:"#FFFFFF",primary:t.primary,onPrimary:t.onPrimary,accent:t.accent,onAccent:Nr(t.accent,[t.ink,t.onAccent]),accent2:$r(t.accent,.75,r),accent4:$r(t.accent,.17,r),accentChip:$r(t.accent,.47,r),link:t.link,linkChip:$r(t.link,.2,r),riskDot:t.riskDot,riskChip:t.dark?n.badgeBgCritical:"#FFD8D6",clearBg:t.clearBg,clearInk:t.clearInk,clearChip:t.dark?n.badgeBgPositive:"#DDEFC4",byInk:n.brandInk}}var jr=/* @__PURE__ */new Set(["color","fontSize","fontWeight","fontStyle","lh","ls","family","textAlign","textTransform","textDecorationLine"]),Wr=/* @__PURE__ */new Set(["dur","delay","stagger","ease","tint","k","cols","nowrap"]),Ur=["paddingTop","paddingRight","paddingBottom","paddingLeft"],Vr=17,Mr=1.5,qr=400,Hr=700;function Kr(e){return e<=450?"regular":e<=650?"medium":"bold"}function Yr(e){let t=Math.min(900,Math.max(100,Math.round(e/100)*100));return String(t)}function Gr(e,t,n){if(t==="$mono"){let t=n<=450?"mono":n<=650?"monoMedium":"monoBold",r=face(e,t);return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:Yr(n)}}let r=t==="$serif"?headingFace(e,Kr(n)):face(e,Kr(n));return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:Yr(n)}}function Jr(e,t,n={}){let r=Lr(e),o=e.brightness==="dark",i=e.motion.reducedMotion,a=e=>{if(typeof e=="string"&&e.startsWith("$")){let t=e.slice(1);return t.startsWith("n_")?o?r.line??e:`#${t.slice(2)}`:t==="sans"||t==="serif"||t==="mono"?e:r[t]??e}return Array.isArray(e)?e.map(e=>a(e)):e},l=/* @__PURE__ */new Map,s=e=>{let r=e.filter(e=>typeof e=="string"&&e!==""),o=r.join("|"),s=l.get(o);if(s!==void 0)return s;let d={},c=e=>{if(e!==void 0)for(let[t,n]of Object.entries(e))d[t]=a(n)};for(let e of r)c(t[e]),i&&c(n[e]);let u=/* @__PURE__ */Object.freeze(d);return l.set(o,u),u},d=/* @__PURE__ */new Map,c=(...e)=>{let t=e.filter(Boolean).join("|"),n=d.get(t);if(n!==void 0)return n;let r=s(e),o={};for(let[e,t]of Object.entries(r))jr.has(e)||Wr.has(e)||e==="ring"||e==="edge"||e==="shadow"||e==="round"||e==="zIndex"&&typeof t=="number"&&t<0||t!==null&&(o[e]=t);if((typeof r.fontSize=="number"||r.flexDirection==="row")&&r.position!=="absolute"&&typeof r.height=="number"&&typeof r.width!="number"){let e=o.height;delete o.height,typeof o.minHeight!="number"&&(o.minHeight=e)}let i=r.ring;if(Array.isArray(i)){let[e,t]=i;o.borderWidth=e,o.borderColor=t;for(let t of Ur){let n=o[t];typeof n=="number"&&(o[t]=Math.max(0,n-e))}}let a=r.edge;if(Array.isArray(a)){let[e,t]=a;o.borderBottomWidth=e,o.borderBottomColor=t}let l=r.shadow;if(Array.isArray(l)){let[e,t,n,r]=l;o.shadowColor=r,o.shadowOffset={width:e,height:t},o.shadowOpacity=1,o.shadowRadius=n/2}if(r.round===1){let e=typeof r.width=="number"?r.width:typeof r.height=="number"?r.height:999;o.borderRadius=e/2}let c=/* @__PURE__ */Object.freeze(o);return d.set(t,c),c},u=/* @__PURE__ */new Map,p=(t,n)=>{let o=`${t}|${n.filter(Boolean).join("|")}`,i=u.get(o);if(i!==void 0)return i;let a=s(n),l=typeof a.fontSize=="number"?a.fontSize:Vr,d=typeof a.lh=="number"?a.lh:Mr,c=typeof a.fontWeight=="string"?Number(a.fontWeight):t,p=typeof a.family=="string"?a.family:"$sans",f={...Gr(e,p,c),fontSize:l,lineHeight:Math.round(l*d*100)/100,color:typeof a.color=="string"?a.color:r.ink};typeof a.ls=="number"&&(f.letterSpacing=Math.round(a.ls*l*100)/100);for(let e of["fontStyle","textAlign","textTransform","textDecorationLine"])typeof a[e]=="string"&&(f[e]=a[e]);let h=/* @__PURE__ */Object.freeze(f);return u.set(o,h),h};return{reduced:i,colors:r,view:c,text:(...e)=>p(qr,e),strong:(...e)=>p(Hr,e),icon:(...e)=>{let t=s(e),n={tintColor:typeof t.color=="string"?t.color:r.ink};for(let e of["width","height","opacity"])typeof t[e]=="number"&&(n[e]=t[e]);return n},col:(e,t)=>{let n=s([e]).cols;if(!Array.isArray(n))return{};let r=n[Math.min(t,n.length-1)];if(typeof r=="number")return{width:r,flexShrink:0};let o=typeof r=="string"?Number.parseFloat(r):1;return{flex:Number.isFinite(o)?o:1,minWidth:0}},motion:(...e)=>{let t=s(e),n=t.ease;return{dur:typeof t.dur=="number"?t.dur:0,delay:typeof t.delay=="number"?t.delay:0,stagger:typeof t.stagger=="number"?t.stagger:0,ease:Array.isArray(n)&&n.length===4?n:null}},raw:(e,...t)=>s(t)[e]}}var Qr={".serif":{family:"$serif",fontWeight:"800",ls:-.01},".emb-btn":{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:48,paddingTop:0,paddingRight:22,paddingBottom:0,paddingLeft:22,borderRadius:999,backgroundColor:"$primary",color:"$onPrimary",fontWeight:"700",fontSize:16,textDecorationLine:"none",dur:160,ease:[.23,1,.32,1],gap:8},".emb-btn--sm":{minHeight:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,fontSize:15},".dot":{width:9,height:9,round:1,flexGrow:0,flexShrink:0},".dot--risk":{backgroundColor:"$riskDot"},".ask-chips":{flexDirection:"column",alignItems:"center",marginTop:22,gap:10},".chip":{paddingTop:10,paddingRight:16,paddingBottom:10,paddingLeft:16,borderRadius:999,fontSize:15,fontWeight:"600",lh:1.3,textAlign:"center",dur:160,ease:[.23,1,.32,1]},".ask-empty":{minHeight:"100%",flexDirection:"column",alignItems:"center",paddingTop:14,paddingRight:16,paddingBottom:22,paddingLeft:16,textAlign:"center"},".ask-empty h2":{fontSize:23,lh:1.12},".ask-start":{width:"100%",marginTop:"auto",marginRight:0,marginBottom:"auto",marginLeft:0,paddingTop:18,paddingRight:0,paddingBottom:18,paddingLeft:0,flexDirection:"column",alignItems:"center"},".ask-empty .ask-chips":{marginTop:14,alignSelf:"center",alignItems:"stretch",width:"100%",maxWidth:340},".hp-need__k":{flexDirection:"row",alignItems:"center",fontSize:15,fontWeight:"800",gap:8},".hp-srcs":{marginLeft:"auto",flexDirection:"row",gap:4},".hp-src":{height:24,paddingTop:0,paddingRight:9,paddingBottom:0,paddingLeft:9,borderRadius:999,backgroundColor:"$tile",color:"$ink2",fontSize:12,fontWeight:"700",flexDirection:"row",alignItems:"center",nowrap:1},".hp-src--dna":{backgroundColor:"$n_E0FDFF",color:"$link"},".hp-need__s":{alignItems:"baseline",marginTop:6,fontSize:15,lh:1.45,color:"$ink2",flexDirection:"row",cols:[9,"1fr"],gap:9},".hp-need__s b":{color:"$ink",fontWeight:"800"},".ask-focus":{width:"100%",paddingTop:14,paddingRight:16,paddingBottom:16,paddingLeft:16,borderRadius:20,backgroundColor:"$card",textAlign:"left",shadow:[0,1,3,"rgba(38, 37, 35, .07)"]},".ask-focus h3":{marginTop:10,fontSize:18,fontWeight:"800",lh:1.22},".ask-focus__x":{width:36,height:36,marginTop:-8,marginRight:-10,marginBottom:-8,marginLeft:-2,alignItems:"center",justifyContent:"center",round:1,color:"$ink2"},".ask-focus__x svg":{width:18,height:18},".ask-focus-pill":{marginLeft:"auto",flexDirection:"row",alignItems:"center",minHeight:36,paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,borderRadius:999,backgroundColor:"$n_FFE3E1",color:"$n_B0231B",fontSize:15,fontWeight:"800",gap:7},".ask-focus-pill i":{width:8,height:8,round:1,backgroundColor:"$riskDot"},".ask-focus .hp-need__s":{fontSize:14.5},".ask-focus__acts":{flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginTop:12,rowGap:4,columnGap:16},".ask-focus__q":{minHeight:36,fontSize:14.5,fontWeight:"700",color:"$link",textDecorationLine:"underline"},".ask-top":{alignSelf:"stretch",flexDirection:"row",marginTop:-8,marginRight:0,marginBottom:6,marginLeft:0},".thread__hist":{flexDirection:"row",alignItems:"center",minHeight:36,paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:4,fontSize:15,fontWeight:"700",color:"$link",gap:6},".thread__hist svg":{width:18,height:18},".thread__count":{minWidth:22,height:20,paddingTop:0,paddingRight:6,paddingBottom:0,paddingLeft:6,borderRadius:999,backgroundColor:"$card",color:"$ink2",fontSize:12,fontWeight:"800",alignItems:"center",justifyContent:"center",ring:[1,"$line"]}},Zr=16;var Xr=4e3,eo=.5;function to(e,t,n){let r=1,o=-1;for(let i of e)o<0?o=i:o+t+i<=n?o+=t+i:(r+=1,o=i);return r}function no(e,t,n){if(e.length===0)return n;let r=to(e,t,n),o=[];for(let r=0;r<e.length;r+=1){let i=0;for(let a=r;a<e.length;a+=1)i+=(a>r?t:0)+e[a],i<=n&&o.push(i)}o.sort((e,t)=>e-t);let i=eo*e.length+1;for(let a of o)if(to(e,t,a)<=r)return Math.min(n,a+i);return n}function BalancedTitle({text:e,style:t,measureCh:n}){let r=c(()=>e.split(/\s+/).filter(e=>e!==""),[e]),o=y.flatten(t),i=[e,o.fontFamily,o.fontSize,o.fontWeight,o.letterSpacing].join("|"),a=s({key:"",ch:null,line:null,words:[]});a.current.key!==i&&(a.current={key:i,ch:null,line:null,words:r.map(()=>null)});let[l,u]=d(null),p=l!==null&&l.key===i?l.value:null,f=()=>{let e=a.current;if(e.ch===null||e.line===null||e.words.some(e=>e===null))return;let t=e.words,r=t.reduce((e,t)=>e+t,0),o=t.length>1?Math.max(0,(e.line-r)/(t.length-1)):0,i=no(t,o,(e.ch+eo)*n);u(t=>t!==null&&t.key===e.key&&t.value===i?t:{key:e.key,value:i})},h=e=>t=>{a.current.key===i&&(e(a.current,t.nativeEvent.layout.width),f())};/* @__PURE__ */
|
|
17
|
-
return B(v,{style:ro.wrap,children:[
|
|
18
|
-
/* @__PURE__ */P(Text,{tier:"heading",style:p===null?t:[t,{maxWidth:p}],accessibilityRole:"header",children:e}),
|
|
19
|
-
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
|
|
23
|
-
return Object.freeze({key:e?.id??`free:${t??""}`,clinic:e,freeText:t,email:n,idempotencyKey:r})}var Mo={".serif":{family:"$serif",fontWeight:"800",ls:-.01},".emb-btn":{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:48,paddingTop:0,paddingRight:22,paddingBottom:0,paddingLeft:22,borderRadius:999,backgroundColor:"$primary",color:"$onPrimary",fontWeight:"700",fontSize:16,textDecorationLine:"none",dur:160,ease:[.23,1,.32,1],gap:8},".emb-btn svg":{width:20,height:20},".emb-btn--block":{width:"100%"},".emb-btn--ghost":{backgroundColor:"transparent",color:"$ink",ring:[1.5,"$ink"]},".emb-btn--sm":{minHeight:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,fontSize:15},".emb-btn--lg":{minHeight:56,paddingTop:0,paddingRight:28,paddingBottom:0,paddingLeft:28,fontSize:17},".emb-btn[disabled]":{opacity:.32},".ph-sub":{flexGrow:0,flexShrink:0,height:46,backgroundColor:"$paper",edge:[1,"$line"],flexDirection:"row",cols:["1fr","1fr","1fr"]},".ph-sub button":{position:"relative",fontSize:16,fontWeight:"600",color:"$ink3",textAlign:"center",dur:240},'.ph-sub button[aria-selected="true"]':{color:"$ink",fontWeight:"800"},'.ph-sub button[aria-selected="true"]::after':{position:"absolute",left:"18%",right:"18%",bottom:0,height:3,borderTopLeftRadius:3,borderTopRightRadius:3,borderBottomRightRadius:0,borderBottomLeftRadius:0,backgroundColor:"$ink"},".ph-sub button .ph-new":{position:"absolute",top:12,marginLeft:3,width:7,height:7,round:1,backgroundColor:"$riskDot"},".ph-toast":{position:"absolute",left:16,right:16,top:112,zIndex:50,backgroundColor:"$ink",color:"$onInk",borderRadius:16,paddingTop:12,paddingRight:15,paddingBottom:12,paddingLeft:15,fontSize:14.5,lh:1.4,opacity:0,dur:160},".ph-toast.is-on":{opacity:1,dur:220},".cp-tag":{family:"$mono",fontSize:10,ls:.06,textTransform:"uppercase",backgroundColor:"$ink",color:"$onInk",paddingTop:2,paddingRight:6,paddingBottom:2,paddingLeft:6,borderRadius:5},".cp-tag--s":{backgroundColor:"$card",color:"$ink"},".sh-track":{marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},".sh-track li":{position:"relative",paddingBottom:16,flexDirection:"row",cols:[22,"1fr"],gap:12},".sh-track li:last-child":{paddingBottom:0},".sh-track li::before":{position:"absolute",left:10,top:20,bottom:-2,width:2,borderRadius:1,backgroundColor:"$n_E2DFD9"},".sh-track li:last-child::before":{display:"none"},".sh-track li.is-done:has(+ li.is-done)::before":{backgroundColor:"$primary"},".sh-track__dot":{width:22,height:22,round:1,alignItems:"center",justifyContent:"center",backgroundColor:"$card",ring:[2,"$n_CFCBC4"],position:"relative",zIndex:1},".sh-track__dot svg":{width:13,height:13,color:"$card"},".sh-track .is-done .sh-track__dot":{backgroundColor:"$ink",ring:null,shadow:null},".sh-track .is-now .sh-track__dot":{backgroundColor:"$accent",ring:[2,"$ink"]},".sh-track strong":{fontSize:15.5,fontWeight:"800",lh:1.3},".sh-track small":{marginTop:1,fontSize:14,lh:1.35,color:"$ink3"},".sh-track li:not(.is-done):not(.is-now) strong":{color:"$ink3",fontWeight:"700"},".ph-intro":{position:"absolute",top:0,right:0,bottom:0,left:0,zIndex:45},".in-dim":{position:"absolute",left:0,right:0,backgroundColor:"rgba(38, 37, 35, .5)",opacity:0,dur:240},".in-dim--top":{top:0},".in-dim--bot":{bottom:0},".ph-intro.is-on .in-dim--top":{opacity:1,dur:380},".ph-intro.is-on .in-dim--bot":{opacity:1,dur:380},".ph-intro.is-on.is-all .in-dim--mid":{opacity:1,dur:380},".in-sheet":{position:"absolute",left:0,right:0,bottom:0,backgroundColor:"$card",borderTopLeftRadius:28,borderTopRightRadius:28,borderBottomRightRadius:0,borderBottomLeftRadius:0,paddingTop:10,paddingRight:20,paddingBottom:30,paddingLeft:20,shadow:[0,-10,30,"rgba(38, 37, 35, .14)"],dur:240,ease:[.23,1,.32,1]},".ph-intro.is-on .in-sheet":{dur:380,ease:[.32,.72,0,1]},".in-sheet.is-drag":{dur:0},".in-grab":{width:40,height:5,borderRadius:3,backgroundColor:"$n_DAD7D1",marginTop:0,marginRight:"auto",marginBottom:8,marginLeft:"auto"},".in-top":{flexDirection:"row",alignItems:"center",minHeight:40,gap:12},".in-back":{width:40,height:40,marginLeft:-10,alignItems:"center",justifyContent:"center",round:1,flexGrow:0,flexShrink:0},".in-x":{width:40,height:40,marginLeft:"auto",alignItems:"center",justifyContent:"center",round:1,flexGrow:0,flexShrink:0,marginTop:0,marginRight:-10,marginBottom:0},".in-back svg":{width:22,height:22},".in-x svg":{width:22,height:22},".in-bars":{flex:1,flexDirection:"row",gap:6},".in-bars b":{flex:1,height:4,borderRadius:2,backgroundColor:"$line",overflow:"hidden",position:"relative"},".in-bars b::after":{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:"$ink",borderRadius:2,dur:240,ease:[.23,1,.32,1]},".in-skip":{minHeight:40,paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:10,marginRight:-4,fontSize:15.5,fontWeight:"700",color:"$ink2",flexGrow:0,flexShrink:0},'.in-sheet[data-mode="records"] .in-bars':{display:"none"},'.in-sheet[data-mode="records"] .in-skip':{display:"none"},'.in-sheet[data-mode="intro"] .in-x':{display:"none"},'.in-sheet[data-mode="records"] .in-top':{justifyContent:"space-between"},".in-body":{paddingTop:6,gap:14},".in-eyebrow":{flexDirection:"row",alignItems:"center",flexWrap:"wrap",fontSize:12.5,fontWeight:"800",ls:.07,textTransform:"uppercase",color:"$ink3",rowGap:4,columnGap:8},".in-by":{flexDirection:"row",alignItems:"center",textTransform:"none",ls:0,fontWeight:"500",fontSize:13,gap:5},".in-by svg":{width:54,height:19,color:"$n_10462E"},".in-h":{fontSize:29,lh:1.08,marginTop:-2,marginRight:0,marginBottom:0,marginLeft:0},".in-p":{fontSize:16,lh:1.45,color:"$ink2"},".in-p--s":{fontSize:15},".in-rows":{marginTop:2,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,gap:9},".in-rows li":{alignItems:"flex-start",backgroundColor:"$paper",borderRadius:18,paddingTop:13,paddingRight:14,paddingBottom:13,paddingLeft:14,flexDirection:"row",cols:[40,"1fr"],gap:12},".in-rows b":{fontSize:17,fontWeight:"800",lh:1.25},".in-rows li > span:last-child > span":{fontSize:15,lh:1.4,color:"$ink2",marginTop:1},".in-ic":{width:40,height:40,borderRadius:12,alignItems:"center",justifyContent:"center"},".in-ic svg":{width:22,height:22},".in-ic--y":{backgroundColor:"$accentChip"},".in-ic--c":{backgroundColor:"$linkChip"},".in-ic--g":{backgroundColor:"$clearChip"},".ph-sub button::before":{position:"absolute",top:7,right:8,bottom:7,left:8,zIndex:-1,borderRadius:999,opacity:0,dur:200},'.ph-sub [data-sub="ask"]':{tint:"$accentChip",k:0},'.ph-sub [data-sub="plan"]':{tint:"$linkChip",k:1},'.ph-sub [data-sub="records"]':{tint:"$clearChip",k:2},'#ph[data-in-frame="tabs"] .ph-sub button':{color:"$ink",fontWeight:"800"},'#ph[data-in-frame="tabs"] .ph-sub button::before':{opacity:1,dur:260,delay:560,stagger:60},'#ph[data-in-frame="tabs"] .ph-sub button::after':{opacity:0},".in-pair":{flexDirection:"row",cols:["1fr","1.5fr"],gap:10},".in-stack":{gap:8},".in-body .emb-btn":{dur:120,ease:[.23,1,.32,1]},".in-fine":{fontSize:13.5,lh:1.4,color:"$ink3",textAlign:"center"},".in-link":{alignSelf:"center",minHeight:40,paddingTop:0,paddingRight:8,paddingBottom:0,paddingLeft:8,fontSize:15,fontWeight:"700",color:"$link",textDecorationLine:"underline",dur:120,ease:[.23,1,.32,1]},".blanks":{backgroundColor:"$paper",borderRadius:20,paddingTop:12,paddingRight:12,paddingBottom:13,paddingLeft:12,gap:8},".blanks__h":{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:0,paddingRight:2,paddingBottom:2,paddingLeft:2,fontSize:12.5,fontWeight:"800",ls:.07,textTransform:"uppercase",color:"$ink3",gap:10},".blanks__h em":{fontStyle:"normal",ls:.01,textTransform:"none",fontSize:13,fontWeight:"800",color:"$onAccent",backgroundColor:"$accent",borderRadius:999,paddingTop:2,paddingRight:10,paddingBottom:2,paddingLeft:10,nowrap:1},'.blanks[data-st="filled"] .blanks__h em':{backgroundColor:"$clearBg",color:"$clearInk"},".blanks ol":{marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,gap:7},".blanks li":{columnGap:11,alignItems:"center",backgroundColor:"$card",borderRadius:15,paddingTop:9,paddingRight:12,paddingBottom:9,paddingLeft:9,flexDirection:"row",cols:[34,"1fr"]},".blanks li > b":{width:34,height:40,borderRadius:11,alignItems:"center",justifyContent:"center",family:"$serif",fontSize:22,fontWeight:"800",backgroundColor:"$accentChip"},".blanks li > span":{fontSize:16,fontWeight:"700",lh:1.35},".blanks li > small":{fontSize:13.5,color:"$ink3"},".blank":{minWidth:36,height:20,borderRadius:6,backgroundColor:"$accent4",ring:[1.5,"$accent"],fontStyle:"normal"},".blank--s":{minWidth:24},".blank--l":{minWidth:64},'.blanks[data-st="filled"] .blank':{height:"auto",minWidth:0,backgroundColor:"transparent",ring:null,shadow:null,paddingTop:0,paddingRight:3,paddingBottom:0,paddingLeft:3,marginTop:0,marginRight:-3,marginBottom:0,marginLeft:-3,borderRadius:6},".in-search":{flexDirection:"row",alignItems:"center",height:50,borderRadius:14,backgroundColor:"$paper",ring:[1.5,"$ink"],paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,gap:10},".in-search svg":{width:20,height:20,color:"$ink3",flexGrow:0,flexShrink:0},".in-search input":{flex:1,minWidth:0,borderWidth:0,backgroundColor:"transparent",fontSize:16,color:"$ink"},".in-clinics":{gap:8},".in-clinic":{width:"100%",alignItems:"center",textAlign:"left",backgroundColor:"$paper",borderRadius:16,paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,dur:120,ease:[.23,1,.32,1],flexDirection:"row",cols:["1fr",24],gap:10},".in-clinic b":{fontSize:16,lh:1.3},".in-clinic b .cp-tag":{marginLeft:6,ring:[1,"$line"]},".in-clinic small":{fontSize:14,color:"$ink3",marginTop:1},'.in-clinic[aria-checked="true"]':{backgroundColor:"$accent4",ring:[1.5,"$accent"]},".in-tick":{width:24,height:24,round:1,alignItems:"center",justifyContent:"center",ring:[1.5,"$n_CFCBC4"]},".in-tick svg":{width:14,height:14,color:"$card",opacity:0},'.in-clinic[aria-checked="true"] .in-tick':{backgroundColor:"$ink",ring:null,shadow:null},'.in-clinic[aria-checked="true"] .in-tick svg':{opacity:1},".in-none":{fontSize:15,color:"$ink2",backgroundColor:"$paper",borderRadius:16,paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,gap:4},".in-none .in-link":{alignSelf:"flex-start",paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},".in-prog":{fontSize:15,color:"$ink2",gap:7},".in-prog__bar":{height:5,borderRadius:3,backgroundColor:"$tile",overflow:"hidden"},".in-prog__bar i":{height:"100%",width:0,backgroundColor:"$ink",borderRadius:3,dur:600,ease:[.23,1,.32,1]},".in-sent":{backgroundColor:"$paper",borderRadius:20,paddingTop:16,paddingRight:16,paddingBottom:16,paddingLeft:14},".in-sent .sh-track li":{paddingBottom:14},".in-sent .sh-track li:last-child":{paddingBottom:0},".in-stack .emb-btn svg":{width:20,height:20},".ph-banner":{position:"absolute",left:10,right:10,top:54,zIndex:55,alignItems:"flex-start",textAlign:"left",paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,borderRadius:22,backgroundColor:"rgba(250, 250, 249, .97)",shadow:[0,14,34,"rgba(38, 37, 35, .4)"],ring:[1,"rgba(38, 37, 35, .06)"],dur:240,ease:[.23,1,.32,1],flexDirection:"row",cols:[38,"1fr"],gap:11},".ph-banner.is-on":{dur:380,ease:[.32,.72,0,1]},".ph-banner__app":{width:38,height:38,borderRadius:10,backgroundColor:"$accent",alignItems:"center",justifyContent:"center"},".ph-banner__app svg":{width:24,height:23},".ph-banner__meta":{flexDirection:"row",justifyContent:"space-between",fontSize:13,color:"$ink3"},".ph-banner__meta strong":{fontSize:13,fontWeight:"600",color:"$ink3"},".ph-banner__txt > strong":{fontSize:15.5,fontWeight:"700",lh:1.3,marginTop:1},".ph-banner__txt > span:last-child":{fontSize:15,lh:1.35,color:"$ink2"}},qo={".ph-sub button::before":{dur:150,delay:0},'#ph[data-in-frame="tabs"] .ph-sub button::before':{dur:150,delay:0},".in-sheet":{opacity:0,dur:150},".ph-intro.is-on .in-sheet":{opacity:1,dur:150},".in-sheet.is-drag":{opacity:1},".in-dim":{dur:150},".ph-intro.is-on .in-dim--top":{dur:150},".ph-intro.is-on .in-dim--bot":{dur:150},".ph-intro.is-on.is-all .in-dim--mid":{dur:150},".ph-banner":{opacity:0,dur:150},".ph-banner.is-on":{opacity:1,dur:150}},Ho=[.23,1,.32,1],Ko=[.32,.72,0,1],Yo={opacity:0,translateY:8},Go={tabTop:140,tabHeight:46,sheetGap:10,sheetTopAll:56},Jo={toastY:-8,bannerY:-60,pillScale:.94,pressScale:.97,blankDrop:3,rows:{dur:260,delay:560,stagger:60},blanks:{dur:520,delay:300,stagger:80}},Qo={chat:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAB/ElEQVR4Ae3BPWicZQAA4CfvvUMxNSqp/dHJUeogiSUpWRQKDi6djFKV/k1OHdqhTipSih1LQzYR2rg5iZNQDiFYijlCK4KLUDi4SgsNDRVqEyV8HHfvXQ+a9vvgBb/nUavVarXaNo15nFedMe1NO5VnXct1F3QMGTPsIxe9qBr3nPC9AQ2Djrhsh6rsMO8PNyWC1D4LqrZot0SUOmlC1+/+Up7dXleYcNx5faLUrK5pK8o15VeFgxJBakbhmhVlW3FNYVYiSL2k0FGFjsKkRJCBIANBBoIMBBkIMhBkIMhAkIEgA0EGggwEGQgyEGQgyECQgSADQQaCDAQZCDIQpNYU9qjCXoU1iSC1qjBrv7K9YUahJRGlVr2tcNM3bmn7UduwA94VbcdrPtHVkohSC04aVzhmy0O73NfvBVe85+k9cEmiIXVX22H9Gn5zQ8+sq97yLI76WSIa9K1/LHpezyt6zjrnWaz51JIB0bAlTWdMmTKu38uWHPK01rVc97XbhkSP03bKjF8Uxmx5x3f26HrotItKEj2Jhi+cFXTdclhLaaJRNnTt0zSn5wcfu6dE0SgNXaf0PPKZC0oWbUfb+5aVLhpl06CffOiOCkSjBP02fe4r/6pENMqGntvmNVUmGuVPDzxnS9MHOirUMMrfls2Z9KWj1tVqtf+v/wAyK17WT9+2hwAAAABJRU5ErkJggg=="},heartcheck:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAEgklEQVR4Ae3Bf4yWdQEA8M/zPgzFzsmlOSkk2QAHaHMRdCIXevxydWCTGZIzmYySQJcJS3MTl1lsxvqDwpuyGs2kLIhByLU7qqkUFgWtA71onHbUnQFGlngRd+duz757ee953vfe91b/vZ+PqqqqqqqqqmGKlOd6k4w1zlg9jnldh90GG6XBeFcZ70KdOh33qpeVITK0Ot9UZ7CTvm2jUxLvc5+VLjXYfvc6YAiR0iZbb5HiNlkr8oSVittprT8pIVLKNK1GK+2gyHVK+4c5DioqVtx0e11iKGNcYSijLNWsWxGRYj6qVY28Zs971VHdxvuQmy2T9l17tOkwxkRXazRf3r80OCBTpJgjJgu2e8whhabZbpy8Drc6pNCHPWqhoM21MsWyfd5dgofdq9tgXb5vocskDrvBMYN12arPTRKX6/Y7GWJZauxwkcR9Nsh2xnPmGoPfavCmbC94ywKJGZqclRLLstSnJdosU9wZz+j0lLV6FLffUpcZ8B5H/FFKTpZ6wTqlva3JLkNZJ6iXISdLvcRZO/wv/FivxCwZctLea5LEK/pU6iarXKpQr3aJqS6WkpNWL2hTqa/7uW856gMKtQnqpeSk9QhGqcw6DxpQ6xGFRgrOSclJ6xBMUInVHhWMVGii4JiUnLRj+iUmKt89Ngp6rVdogqBDSk7aOX+VGGWM8txpk6DPEu3Od6ULJF7TKyUnS4dggUJ32uE2g91mi0jwOdsUWiA4JkNOllbBauf7jO+5xXO+5HyNtooEa2w22P2CVhlysjytT2Ka6YIRHpNYb43gY7aJBettMFidKRJ9npIhJ0uXPYJV8voFT1hjQJ09RgqaPCRtpWCnUzLEsv3bUolrbHfCgD6nfVIwX48ee9UInrVc2hSb5CS+6M8yxLId9VkXG5Bzvc36DTjkQrMEc92hRvBTt+szWOxn3i/RbaVMsWz93rJQYoy37ZPYq8ZMwUjBrzQ6K+1BdwhWOyRTrJjfW+BKidl+6E2JFjVmKvQHc5yRNsGPxBIv+IIiYsW9ZIURBsRm2CxocYF6eUfc6J/SInuMk3jHPKcVESvulH4NEmPVahbsVWOmRKfZ/i7Lk24RPOx5RcVK+bVbXS5R55wXBS0iN+Koef4iyzprBAfdrV9RsVL6/MYKkUSD1x0S/NJOP/BVf5PlHt8Q9JrvDSXESuvyhkbBIoe9Iuj2mh5ZFtsiEizXoqTYUA74rzkSkU85qF1pi/xEJHjAk4YQG9qLatUJljjhgOJWeEYkeNzjhhQrR7OrXCcR+YSLtMoS2eBrIkGTB5QhVp5dJrlWcIOpdupVaKQd7pK31XJliZWn3zZX+Ihgqtm2+4+8Wi3myGtytzLFyrfbO+aKJD7odi87LjHTL0wR9Puyh5QtVol9jlhkhMRoy/R7Sc5XfMclgrOWeFoFIpWaZZfR8vaLTZd3WqN9KhKp3GTNxsnWaZ52FYpV7qQtrjFJ2m7zHVex2HD0eNZJH1dolfv1GIbI8E21zdUS7RY7bJhiw3fCZrVmYKPFulRVVVX937wLjmYiRAD5+2oAAAAASUVORK5CYII="},file:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACN0lEQVR4Ae3BP4scZRwA4Of9Zc5NQkStch6IcqARK4tTsXJFDuQsFOFABW0sYqmfQRDyAcTGIoiS8rTYJIho0MIPEPwTo6ggnN0hmHDN7lgsw2bvMu/MnBsZYZ/H0tJSnyXN3rFhTdLGr875UUdJk+88posbtnytk2Py3va6bu7yqm/8roOQt6G74y4b6iDknXYUJ1z0rNYKeWHqL/fK+8GjZk645HlXtBLulIHLhloJeaW2xqZuqgxc8pwWQl7SVpj6zcvGpo4b2dQoLN6ObWNTAyObGoRFSaYSdmwbm1oxsikr3Bk7to1NrRjZlBHySm1NTJ00NDS05wOVFZ/bUquwaA/6yu18bM2+2wr/lfs8rEZYlO81GagRFuW8G/KSGoVFGTnlaQMHveKsBoW8pItvHfaUSlIj9EDogdADoQdCDxTySoedcb96u6651USlVKPQzUlXrcv7yRmdhLxk3pZ1TR7xoplQSWqEbibaSDoJeaV5F+1q8odPzUxUSjUK3exb84Z19a77xK2SSlKjkJcc9pEukkahB0IPhB4o5JUO+tALVtX702feMlNqFPKSeU9406qcVWc9biZpFPJK8za08aSZUqOQl8z7QhtfmkkaFfJK8657zUtOq7drx89mJiqlGoW85KALLugiVJIaoQdCD4QeCD0QeiD0QOiBQl5p6h5XHM0DKhM1Cnl7Ks/4t/bUCHnXLM4vaoS89920GO+qdUze33Y85JS7Hd2+q95zztLS0v/TP569YMkUqobUAAAAAElFTkSuQmCC"},back:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACGklEQVR4Ae3Bra4eRQAA0LPf9AXYKwbRkPIASzAoSLoXBGRUDaS8HcFNr6rBIO6aipqKu7ICjeimwQwO0hCyg5v9wX3nuLq6urpqFJztme/87r0NOmfqvfSVD35wp1lwnt69L/zjez97r9HFWW5MPrN6qtnFOW7cG9TeanZxht69Qe1XrzS7OK43GdRmz23QOao3GdRmo8UGnWN6k0FtNlps0jmiNxnUZqPFRp39epNBbTZabNbZqzcZ1GajxQ6dfXqTQW02WuzS2aM3GdRmo8VOne16k0FtNlrs1tmqNxnUZqPFAZ1tepNBbTZaHNLZojcZ1GajxUGddr3JoDYbLQ7rtOpNBrXZaHGCR9p8ZDKoPbi1OMVFmzuD2oNbi5NctHjsG7XZrcVpLloU//XOqYIWxac+t3oiyYqTBG0mSbSKvnWnOEXQ5k8vJNHqY0lWnCBoVWRJtIqSrDgsaFdkSbSKkqw4KNiiyJJoFSVZcUiwTZEl0SpKsuKAYKsiS6JVlGTFbsF2RZZEqyjJip2CPYosiVZRkhW7BPsUWRKtoiQrdgj2KrIkWkVJVmwW7FdkSbSKkqzYKDiiyJJoFSVZsUlwTJEl0SpKsmKD4KgiS6JVlGRFs+C4IkuiVfTUT/7SKDhDkSXR6rHX3mp0cY7FrQe1G80uzvLO1x786w+/aBacp3jhS5/44EdvNOuc7ZknXvrN1dXV1dX/4G9ZtJHJgYcMcQAAAABJRU5ErkJggg=="},x:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACb0lEQVR4Ae3BPaokVRgA0DP3y3SMBM3E2FQ0MprEBdzb/QpEcAmCoShmJmLoGgpeoQgDGohoJJi/TxNxViDjAmoQKYp+81dd1ZlS59jtdrvdbvdfFs75yDc+kB7Y7p77PvXILxaFZR/60l2veF9K2zTfetVd7/rLrxYUyz4xCb1mi6YXJp9ZVKwVes1aTS+sFJb94WhWHN1I5x1cK07e87sFYdlvblTFrEppWdMrZqMrX1sUzkmpKiZFldLzNb0wG3UGZ4TzUqqKSVGl9GxNL8xGncFZYY2UqmJSVCk9remF2agzWCGsk1JVTIoqpcc1vTAbdQarhLVSqopJUaV00vTCbNQZrBTWS6kqJkWV0qTphdmoM1gtbJFSVUyKKiWaXpiNOoMNwjYpHc2Koxtv6IXZqDPY5I7tmmvPdzDYKGyXblTF00ZXBpuFS6RUFY8bdQYXCJdJqSpORp3BRYpL3fHQbQ9dLFym6b3othdUKV0gXKLphScVVUqbhe2aa8WzFEc30kZhq+babQfXqmJWpbRJ2KbpFbPRlUFKVTEpqpQ2CFs0vTAbdQb/SqkqJkWV0mphvaYXZqPOYJZSVUyKKqWVwlpNL8xGncFtKVXFpKhSWiWs0/TCbNQZPCmlqpgUVUorhDWaXpiNOoNnSakqJkWV0lnhvKYXZqPO4HlSqopJUaV0Rjin6YXZqDNYklJVTIoqpUVh2T33FSdXBuekdDQrjn72wIKw7HsvOzkYrJFuHJ285SsLimWvOTkYrDU4OHndorDsJe+YHAy2SDeOJl/40YKw7Ad/e9OfDr6zVfrJ2x752Od2u91ut9v9f/0DIGjD825hJnwAAAAASUVORK5CYII="},search:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAADJklEQVR4Ae3BXWhVdQAA8N89By2n82PWFBfLQfQQ5MWupuWTRaXlQ1hBZvjWLMMK+0IShEgiI0gU+rBArKiQwNvUagoavWgGQiwqH0qFWRKOyu85W8ifg657ds49wl5iv59hw4YNu1IlRTWZqAk9jutxxUrqNc4C95tvtEtO2mGr7f5WWEk9rrHSE0ZJd9oGr+lRSEm+1V40SrZT1nhVAbFsDbZ6zAh5RrrTNJ/rU6eSLM2+NN3lDtjhiG6RKVrNN93lvnOvP9SlJMt+MyROWO8dRww01eOWaZTY71Z1KRncFg9KfGCZk9KN8a5FEh97RB1ig1niJYm1ntRrML0+02CO4GYHdckVS9fgCw2CDVbIs0uzmYLbveW8HLF0L7tbsNti/fJ95Q6tLmrUb7cckTQjPS0451EX1OOCh50VPCWWI5LmHqMEax1Vr25vCsa6S45ImoWCfusUsV5ioRyRWrEHBHsdV8RR3woWKskUqdWqUbBPUXsFE10nU6RWo8Svijok0ShTpNZYiV8UdUiiUaZIrbMS/YrqlTgvU6TWMYlmRU2W+F2mSK1jEs2Kmizo95tMkVq9fhLMVtRtgi79MkXSdAruM0ERE8wTdMoRSdMpGGG5IlaIBTvliKTZo0/wgmb1utbzgnP2yBFJc8r7gtE+EalH7FNXCd5zTo5IupVOCOZ6Qz3WmSv40yq5YunOOm2eYLYGu2R73TMSz/lGrthg9pnpRsEcN9ipV7oxNlkqcdhidYgNrmqBSYJplpvoZ38ZaKrVPlJxyXiTbZerJMsk28xwuQN2OKJbZIpW802XZqN2OUqyXW2zh9TnsOslNmqXKZatzxY/mmWcbIe1W6pNWVDRokOGWL4fvK3PLCOkO+0Vi3yPqjZlQUWLDoOK1aPP1zbo8o9WI11yUtUaS3XqE1S1KQsqWnQYRElRTSZqwnE9etQq2WSJxEbtUsWKOqNHt249zkhX1aYsqGjRIUVsKFS1KQsqWnSoERsaVW3KgooWHf4jNlSq2pQFFQd1GSA2dKpa3CIYb7MBYkNpmzZlF63SZYDY0NrqkJs860PDhg373/kXh1m18JaQSPQAAAAASUVORK5CYII="},bell:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAACX0lEQVR4Ae3BX2hVdQAA4O/87n2oxCw3ckG6IB+kZUE9tL0YI0iSQYiROOwhgmjTAqF66o9URNRDFG3BeggiiShBgxp7irB/BGUEYlhCkVzTxpAgshKMw+GitrPfPT+7cHq436enp6enp6rMxVhrSL9+Z82bd8hRyTJpBtznbje70Nfe9YYTEmSqW+Yxj7hMud+94EV/qChT1QbvGBDXco9PVZKpZtKU833lB8ew2nVucb5Jr6kgU8UzHtd20sv2+Mk517rXw/q1Pe0pHWU6G7dH26Neddpil9jlOW3j3tZBQycj9mvIHTdqrzPKnPGJOXdZJjdmTktUQ1zTASvlThlxSMwx+2x3KZpGTTkrIojbZo3CnY7q5HtjCmuNiwridihM+UIVn5lRmBQVxAy4Ve60Z1W1219yw64WEcRsVXjfL6o67gO5zGYRQcyIwqwUswrDIoKY1QoHpTioMCgiiFmj0JKipTAoIoi5RuFXKVoKgyKCmgQ1CWoS1CSoSVCToCZBTYKaBDUJahLUJKhJsLRp/9W0JQVL2WlCYa9U+xUm7LCEhnIbvSWTO2LMn9J8aIs+uY0O+FGJTJnrfe5yhe+ckG6VdQq/GXbYIpky37hJ98zaZJGgzCrdNKpEUGZGN+1SIlNuwDrd8a0FXbDcg7b6t20esFySphR9PjaEFWacM2EaD7nNgsqCFFcZknvFjdrWe0nuBldK0JBi3v1WoOkOJy3os8nr+uV+9qQEmTRbvKfcZvskaEhz2BWGLfa8KUkaUs1p2uBCuz0hUeZirLTd7Ub87UsfedMpPf9f/wDy4XMuWu1V4gAAAABJRU5ErkJggg=="},check:{width:14,height:14,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAQAAABvygHQAAABdUlEQVR4Ae3BvWpTYQAA0NN8ubVUcNZFaJUOgpti8QcKesHSpa1Cqr6APoHPIYib7jZILelVIVtFXAQfQa2DD5EvKJePyk2atGk66JBzTExM/FdmLegTnMxtnzx1zo6K4CSWvHcGV7T88lfN+JZ8cEryW0XduO4oTEuavqqoG0+uZVrS9kiPKePIFTJJ24qOHlOOL1fIJG0rOvpMOa5cIZMU1nQcUNNvwYzhlr2TSbat6hgg6PXKS4998d0gd7XUJS33RAMFVYueY1bDZ9/0y+3IJIU10RA1VTXJjMJNvXKFTFJYFQ0VVP102SWlugc++mHfsh2ZZNu66BBBr7euuqiUadi1p5RrySSFddGhgl5dTTfMKWU27NqTK2SSwqroCEG/rk3XXFDKNJz2QiZ5477oSMFBUdN1c0rTbqlJtjREIwgGiZoWzatqaugaSTBY1LRo3r5ND3WNKBgm2rTkvNKWDV0jC4aLXjtrzjNPdE1MTPwjfwDF5lTRg1trxQAAAABJRU5ErkJggg=="},wordmark:{width:54,height:19,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKIAAAA5CAQAAAAfWjgQAAAIE0lEQVR4Ae3BC5hWZYEA4HeO89jITFeQBNFgKSREQiwYaoNAN0V5EAxyiREGTc0NL6UmmJuYEhQaFCQSXgbLFtYL5mVdtBDaEk1xXVwuQjgRTGPgKLcZ6Fm3y+l7Tuf/Z/75x5EZYabet8Dfgi8Ybwh+bbH5XtXCCrR3JZ5QKtN1ZmhRR2jvVvuYbMN9xFItKNK+fdMADfXXogq1Z8f7isQ+S1Q5V29UaFGF2rOrJJ402h5Md7Xp7tKiCrRffawTvOwkdVpNpP2aL/FZdVpRpL0aZJhgkTVaVaS9uklihlYWaZ/6OE1wl61aWaR9ukJiulYXaY+Oc6Fgtd9odZH26BKJ2d4GkfanyHmCzZZ5GxSqr4vBRuqhQKzOC+ap1pJ6GGy4Dwr+2/94yGvenCGGi+31gEq5naWbYI6W1smpejrS/1nnWVX+okCmo93gEg1VuE6V2FRnyOX/nSqYq7/69hsh+LArXKS+Hea5SeLLRsm2wFJ80iInSD2iXI33eEAkUy9dBC/YLdN898l0qz6yzfAE7nGsbJNV4mrXK5aaZZo/K5QabZFOcil3lnFWobeh8utvqPpqBRe7TS6d3eh8Z3tRrJehsj2CUX4s20irDPGaKmVy6y/bg7INMEi228UG6SlbMRabKNtU/ZxFocQV5gheM929XkFPk3zR+3C0lU7zUwdjgS8IXjLXA3agh0ku9T70sMonbJDbYD9GjWttwkfNFjvRnUabqUzrm2ciqk23CZcZI3amC9xRIBjvR4LNRtgi9V5LfFqsTn+bMcCPnCB42UA1GurlJbG9Jrtf7GtuECx3hky9PeW9Ylv0t09QrMJYwRwTdPaSESpR4gmlEu+3Q6qDWsG9PivW21L9BF8yV0ODVeglOM8PJXq7V1/BlW7BKqPsQanVEuv0jcS6WCTYZrAtMr1utG1iHSwWe94IewW/VyOXTQ6IjXe/2Ag3CNY4R7aNRgt6ukmi1mUSl+jsdaepFPucUqkBMpVLzBJsNFV+q90ol41ulZiB9c60R+wGqRMVRWLfUiyYokZ9+31FMNgEsUpLBB9WKpcyRdjgUUGFxBh16vuZWwWX6yrxukQRvmq7YIBMnWWaKFjpeYlqTdkht50SRShXJ+gnUxShjzJBtYfkssRuwQWCuyUmyOVyse8JJuks+Hfb5LJQ4mK57LRAYptM26VOMEgwX3NEmvaAZyW2S9WqizBB4t805knBMMHPbRBMVKy+431U7B7BuRL3ym2tHYJ/kkuF1J1SlVZInSuocr+WNkdqrtRCIpwhsUZjnpP4lGCe4F3K1HeJ2J12CYZI/JfGrBUMlssyqWqnqBR71HCZLhXM1tJe8XOpe1yoBlWmuZJC9JHYpjGvSnQX3O3rOoldbKFsnxe7TXCKYonfacxvJT5ks2x1Vsv0vH/Q0DidxGp8X0t7Srbb3e6vCnVVJDHPLrkdK9FRUKvCVWInK/W01DidsNazgp5Sq/xRbr0l3q2+F70ZUwQ/tF/z/FFT1sujUInURzStQGKRqwSf87TURWLflThSaoimlahvm6b1N0QwR3OVaMrL8ij0B6lVmrZBYpPlThebbJpawQlOw05L5fKYDvJ7w071VWlaueBBWzVXB02pkUehGqlrPKM5ljhdrMRYiwWTxRbbJ1Endaa34g1N6aBMcLPmO1ZTdssj8rrdEt01T4VqwSSJiWILpTZIddU6husotswvNF8/Tfm9PCI8KzFQPjOttFI/me4SDDNAbIwueNSvpDbYJTFIPg9b6XFvxYWCad6KUgclwt0S4+VTZqihsi2QuEJskliFbMskxmtcNyMNdbLmO94osZ96SfP11cNBifCwA4IuyjRmmG7Yaa1M2z0o+Aw+5Gy86j7ZbpMY53iNmST2guabIpghv0guUx2kCLt8Q2K2TnKbL1ahvtmCDv7Zv4h9V32/9JjELLl1dZ3Y7ZpvvNhaT8pll8QADZ1sgoMUid3ofwXHWKJIQxX6oNbN6ntKpWCK88SWaOhSuwTjzdJQRw8pwjpLJd4hcZR8RugmNl1uv1YrOMcxshWpwB6JSKYjJUrkEQnOUSU41SrdZRroZyaJXWyHhm4VfEJHLLNZQ1ucaY/gGsu9X6ZhnnOKWLnUaInROmrc5WIvW6YxqwRHuUOxVHc/0Q9XS4yWaazEFHkUSBznPgMlVnheLd7pHw0UXGaeXEpUK5E43eNyO8lDugsOeMx6b+AYY3UU2+1cy/Flo/AOpVI7rRfc4QcyHWu72GQVGjPI0xJbXW+r2BDTFGGm76uU2KRa0FFfqUq/EVxkkyyFEtsMMsVsRWLDDZfpt86zQm773Kdc8CuPa8yLTvYdE8WKjDFGpo0+Y71YL0PVd7Shgp/IdqHYHks17hnX+KbgAypkmula3aV66SWXHnoIOqinUKb5/sO1Sp0o0zrL3Gy3xn1PuWChfHaZZK6vGqyrTMvd5kFvzefFZtovn2/ZZ4b3yHbAdW5x0Ark0t8xPuYIPGeDLZr2SUeIrbHXm/FxXfXFG56x1SaZPqibxm2xTep0/4n9unlNU44yxlinehe2esoKj3hF8Clv3hp7ZSnQtj1sJL7tSodQpC072kixmx1SkbbsfLH5qh1SkbbsfBwwyyEWabsG6oWZqhxikbbrcuyxwCEXaauKnY2v2emQi7RVZym20XccBiJt1QX4osNCpG06zqfdYYXDQqRtKvOqf3WYiLRN5a5W7TARaYvOsE+Fw0akLbreVIeRSNtzkp2e8HcHZZwPOKz8CdAtAnYO9l4QAAAAAElFTkSuQmCC"}};function IntroIcon({name:e,style:t,testID:n}){let r=Qo[e];/* @__PURE__ */
|
|
24
|
-
return
|
|
25
|
-
return B(k,{accessibilityRole:"button",accessibilityState:{disabled:o,busy:i},disabled:o||i,onPress:n,style:({pressed:t})=>[e.view(...d),l,t&&!e.reduced?Zo:null],...s===void 0?{}:{testID:s},children:[a===void 0?null:/* @__PURE__ */P(IntroIcon,{name:a,style:e.icon(...d,".emb-btn svg",".in-stack .emb-btn svg")}),
|
|
26
|
-
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
return
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
40
|
-
/* @__PURE__
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
/* @__PURE__
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
|
|
81
|
-
/* @__PURE__
|
|
82
|
-
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
/* @__PURE__
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
/* @__PURE__
|
|
97
|
-
/* @__PURE__
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
15
|
+
return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitlement",recoverable:false})}function xn(e){let t={name:e.name,enabled:e.enabled,isPending:e.isPending,limits:/* @__PURE__ */Object.freeze({...e.limits})};return e.disabled!==void 0&&(t.disabled=e.disabled),/* @__PURE__ */Object.freeze(t)}function Cn(e){let{runtime:t}=gt(),n=t.entitlements,r=h(e=>n===void 0?()=>{}:n.subscribe(e),[n]),o=h(()=>{if(n===void 0)return false;let t=n.getSnapshot();return decideCapability(e,t.decisions,{isPending:t.isPending}).enabled},[n,e]);return m(r,o,o)}var Rn=()=>()=>{},Fn=()=>null;function An(e,t){return m(t?.subscribe??Rn,t?.get??Fn,t?.get??Fn)??e}var Tn=/* @__PURE__ */Object.freeze(["ask","vet","plan","records"]),In=/* @__PURE__ */Object.freeze({chatAnswerStyle:"cards",chatHistoryStyle:"sheet",chatTopCard:"focus",chatFollowUpCount:3,chatFollowUpsExcludeTelevet:false,chatComposerMic:true,chatComposerUpload:true,safetyDisclaimerPlacement:"composer",healthPlanLayout:"focus_plan",recordsTopRiskLine:true,recordsClearResultsFilter:true,chatComposerStyle:"compact",chatComposerPlaceholder:"pet_name",chatHistoryBar:"scroll",chatGeneralBanner:true,chatSendButton:"always_dark",chatTextingAsk:true,serverSlots:false,shellTabs:null,shellHeader:"classic"}),En=/* @__PURE__ */Object.freeze({chatAnswerStyle:"chat_answer_style",chatHistoryStyle:"chat_history_style",chatTopCard:"chat_top_card",chatFollowUpCount:"chat_follow_up_count",chatFollowUpsExcludeTelevet:"chat_follow_ups_exclude_televet",chatComposerMic:"chat_composer_mic",chatComposerUpload:"chat_composer_upload",safetyDisclaimerPlacement:"safety_disclaimer_placement",healthPlanLayout:"health_plan_layout",recordsTopRiskLine:"records_top_risk_line",recordsClearResultsFilter:"records_clear_results_filter",chatComposerStyle:"chat_composer_style",chatComposerPlaceholder:"chat_composer_placeholder",chatHistoryBar:"chat_history_bar",chatGeneralBanner:"chat_general_banner",chatSendButton:"chat_send_button",chatTextingAsk:"chat_texting_ask",serverSlots:"server_slots",shellTabs:"shell_tabs",shellHeader:"shell_header"}),Dn=Object.keys(En),On="presentation",Pn="presentation.";var zn={chatAnswerStyle:["bubbles","cards"],chatHistoryStyle:["drawer","sheet"],chatTopCard:["none","focus"],safetyDisclaimerPlacement:["composer","answer_footer","none"],healthPlanLayout:["standard","focus_plan"],chatComposerStyle:["standard","compact"],chatComposerPlaceholder:["generic","pet_name"],chatHistoryBar:["pinned","scroll"],chatSendButton:["always_dark","dim_when_empty"],shellHeader:["classic","tabs_bar"]};function Bn(e){if(!Array.isArray(e)||e.length===0)return;let t=/* @__PURE__ */new Set;for(let n of e){if(typeof n!="string"||!Tn.includes(n)||t.has(n))return;t.add(n)}/* @__PURE__ */
|
|
16
|
+
return Object.freeze([...e])}var Nn=/* @__PURE__ */new Set(["chatFollowUpsExcludeTelevet","chatComposerMic","chatComposerUpload","recordsTopRiskLine","recordsClearResultsFilter","chatGeneralBanner","chatTextingAsk","serverSlots"]);function $n(e,t){if(t==null)return;if(e==="shellTabs")return Bn(t);let n=zn[e];return n!==void 0?typeof t=="string"&&n.includes(t)?t:void 0:Nn.has(e)?typeof t=="boolean"?t:void 0:typeof t=="number"&&Number.isInteger(t)&&t>=0&&t<=3?t:void 0}function parsePresentation(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e,n={};for(let e of Dn){let r=En[e],o=Object.prototype.hasOwnProperty.call(t,r)?t[r]:t[e],i=$n(e,o);i!==void 0&&(n[e]=i)}return Object.keys(n).length===0?null:/* @__PURE__ */Object.freeze(n)}function isPresentationFieldLocked(e,t){if(t==null)return false;let n=`${Pn}${En[e]}`;for(let e of t)if(e===On||e===n)return true;return false}function resolvePresentation(e){let t=parsePresentation(e?.server??null)??{},{safetyDisclaimerPlacement:n,...r}=t,o=n==="none"||n===void 0?r:{...r,safetyDisclaimerPlacement:n},i=parsePresentation(e?.client??null)??{},a=e?.locked?[...e.locked]:null,l={};for(let e of Dn){let t=o[e],n=isPresentationFieldLocked(e,a)?void 0:i[e];l[e]=n??t??In[e]}/* @__PURE__ */
|
|
17
|
+
return Object.freeze(l)}var Ln=/* @__PURE__ */Object.freeze({branding:null}),jn=/* @__PURE__ */Object.freeze({subscribe:()=>()=>{},getSnapshot:()=>Ln});function Un(e){return e?Object.keys(e).sort().map(t=>`${t}=${String(e[t])}`).join("&"):""}function useEverfurPresentation(e){return Wn(e).presentation}function Wn(e){let{runtime:t}=gt(),n=t?.entitlements??jn,r=h(()=>n.getSnapshot()?.branding??null,[n]),o=An(m(n.subscribe,r,r),t?.sdkConfigHost?.branding),i=Un(e);return p(()=>{let t=o?.lockedFields??null;return{presentation:resolvePresentation({server:o?.presentation??null,locked:t,client:e??null}),isLocked:e=>isPresentationFieldLocked(e,t)}},[o,i])}var Vn=/* @__PURE__ */Symbol.for("@everfur/sdk#TelevetShellLook@v1");function Mn(){let e=globalThis,t=e[Vn];if(t!==void 0)return t;let n={mounted:0,listeners:/* @__PURE__ */new Set};return e[Vn]=n,n}function qn(e){let t=Mn();t.mounted=Math.max(0,t.mounted+e);for(let e of[...t.listeners])e()}function Hn(e){f(()=>{if(e)return qn(1),()=>qn(-1)},[e])}var Kn=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(e,t){let n=e.type,r=n.families[t];return t==="mono"||n.namedFaces[t]?{fontFamily:r}:{fontFamily:r,fontWeight:n.weight[Kn[t]]}}function headingFace(e,t="bold"){let{headingFamily:n,headingWeight:r}=e.type;if(n===null&&r===null)return face(e,t);if(n!==null)return{fontFamily:n,fontWeight:r??e.type.weight[Kn[t]]};let o=face(e,t);return o.fontWeight===void 0||r===null?o:{fontFamily:o.fontFamily,fontWeight:r}}function Yn(e){return e<=450?"regular":e<=650?"medium":"bold"}var Gn={regular:"mono",medium:"monoMedium",bold:"monoBold"};function textRole(e,t){let n=Jn.get(e);n===void 0&&(n=/* @__PURE__ */new Map,Jn.set(e,n));let r=n.get(t);if(r!==void 0)return r;let o=Qn(e,t);return n.set(t,o),o}var Jn=/* @__PURE__ */new WeakMap;function Qn(e,t){let n=e.type.roles[t],r=n.weight==="400"&&n.face!=="mono"?e.type.weight.regular:n.weight,o=Yn(Number(r)),i=n.face==="mono"?face(e,Gn[o]):n.face==="heading"?headingFace(e,o):face(e,o),a=n.face==="heading"?e.type.headingWeight??r:r,l=i.fontWeight===void 0?i:{fontFamily:i.fontFamily,fontWeight:a},s=n.size,d={...l,fontSize:s,lineHeight:Math.round(s*n.lineHeight*100)/100};return n.letterSpacing!==0&&(d.letterSpacing=Math.round(s*n.letterSpacing*100)/100),n.uppercase&&(d.textTransform="uppercase"),/* @__PURE__ */Object.freeze(d)}var Zn=/* @__PURE__ */Object.freeze({display:/* @__PURE__ */Object.freeze({size:29,lineHeight:1.06,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),title:/* @__PURE__ */Object.freeze({size:23,lineHeight:1.12,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),cardTitle:/* @__PURE__ */Object.freeze({size:19,lineHeight:1.22,weight:"800",face:"sans",letterSpacing:0,uppercase:false,tier:"heading"}),rowTitle:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.4,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),body:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),message:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),bodySmall:/* @__PURE__ */Object.freeze({size:14.5,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),caption:/* @__PURE__ */Object.freeze({size:13,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),label:/* @__PURE__ */Object.freeze({size:10.5,lineHeight:1.4,weight:"400",face:"mono",letterSpacing:.05,uppercase:true,tier:"compact"}),eyebrow:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"mono",letterSpacing:.07,uppercase:true,tier:"compact"}),chip:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.3,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),tab:/* @__PURE__ */Object.freeze({size:16,lineHeight:1.5,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),button:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"control"}),badge:/* @__PURE__ */Object.freeze({size:12,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"badge"})});var Xn=Object.freeze;function deepFreeze(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Xn(e);for(let t of Object.keys(e))deepFreeze(e[t])}return e}var er=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var tr={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},nr={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},rr={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},or={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},ir={regular:"400",medium:"500",bold:"700"},ar={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},lr=0,sr="System",dr="monospace",cr=["content","heading","control","compact","badge"];function ur(e){let t={};for(let n of cr)t[n]=e;return t}var pr=[];function fr(){return{family:sr,mono:dr,fontUrl:null,families:{regular:sr,medium:sr,bold:sr,mono:dr,monoMedium:dr,monoBold:dr},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:rr,tierSizes:ur(rr),lineHeight:or,weight:ir,letterSpacing:ar,scale:1,maxScale:lr,scaleCaps:er,headingFamily:null,headingWeight:null,fontSources:pr,roles:Zn,typeScale:1}}var hr={},gr=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(e){return`cubic-bezier(${e.join(", ")})`}var br={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(gr.standard),emphasized:cssCubicBezier(gr.emphasized),exit:cssCubicBezier(gr.exit)},reducedMotion:false},mr={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},yr=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:mr,space:tr,radius:nr,type:fr(),motion:br,slots:hr}),vr={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"};deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:vr,space:tr,radius:nr,type:fr(),motion:br,slots:hr});var kr=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),wr=globalThis,_r=wr[kr]??(wr[kr]=createContext(yr));_r.displayName??="EverfurThemeContext";function useEverfurTheme(){return g(_r)}function Sr(e,t){let n=e.scaleCaps[t];return n>0?n:void 0}function Text({tier:e,variant:t,...n}){let r=useEverfurTheme(),o=t===void 0?void 0:r.type.roles[t],i=Sr(r.type,e??o?.tier??"content"),a=t===void 0?n:{...n,style:[{...textRole(r,t),color:r.color.text.primary,flexShrink:1},n.style]};return d(C,i===void 0?a:{maxFontSizeMultiplier:i,...a})}var xr=s(function(e,t){return d(v,{...e,...t===null?{}:{ref:t}})});var Cr=640,Rr=600,Fr=/* @__PURE__ */Object.freeze({width:0,height:0}),Ar="useWindowDimensions"in y&&typeof y.useWindowDimensions=="function"?y.useWindowDimensions:()=>Fr,Tr=/* @__PURE__ */Object.freeze({width:"100%",maxWidth:Cr,alignSelf:"center"}),Ir=/* @__PURE__ */Object.freeze({...Tr,flex:1}),Er=/* @__PURE__ */Object.freeze({...Tr,flexGrow:1,flexShrink:1});function Dr(){return Ar().width>=Rr}function Or(){let e=Dr();return{tablet:e,column:e?Ir:{flex:1}}}function Pr(e="flow"){let{width:t}=Ar();if(t<Rr)return null;if(e==="flow")return Tr;let n=Math.max(0,Math.round((t-Cr)/2));return{left:n,right:n}}function zr(e,t){return t===null?e:[e,t]}var Br=/* @__PURE__ */Symbol.for("@everfur/sdk#InSdkColumn@v1"),Nr=globalThis,$r=Nr[Br]??(Nr[Br]=createContext(false));$r.displayName??="EverfurInSdkColumn";function SdkColumnScope({children:e}){/* @__PURE__ */
|
|
18
|
+
return N($r.Provider,{value:true,children:e})}function SdkTabletColumn({children:e,style:t,testID:n}){let r=Dr(),o=g($r);return!r||o?e:/* @__PURE__ */N(w,{style:t===void 0?Er:[Er,t],testID:n??"everfur-tablet-column",children:/* @__PURE__ */N($r.Provider,{value:true,children:e})})}function parseColor(e){let t=Lr(e);return t===null?null:Hr(t)}function Lr(e){if(typeof e=="number")return Wr(e);if(typeof e!="string")return null;let t=e.trim();if(t.length===0)return null;if(t.startsWith("#"))return jr(t.slice(1));if(t.toLowerCase().startsWith("0x"))return jr(t.slice(2));if(t.toLowerCase().startsWith("rgb"))return Ur(t);if(/^[0-9a-fA-F]+$/.test(t)){let e=jr(t);if(e!==null)return e}return/^\d+$/.test(t)?Wr(Number.parseInt(t,10)):null}function jr(e){let t=e.trim();if(!/^[0-9a-fA-F]+$/.test(t))return null;if(t.length===3)return{r:Mr(t[0]),g:Mr(t[1]),b:Mr(t[2]),a:1};if(t.length===6)return{r:Vr(t,0),g:Vr(t,2),b:Vr(t,4),a:1};if(t.length===8){let e=Vr(t,0);return{r:Vr(t,2),g:Vr(t,4),b:Vr(t,6),a:e/255}}return null}function Ur(e){let t=e.indexOf("("),n=e.indexOf(")");if(t<0||n<0||n<t)return null;let r=e.slice(t+1,n).split(",").map(e=>e.trim());if(r.length<3)return null;let o=qr(Number(r[0])),i=qr(Number(r[1])),a=qr(Number(r[2]));if(o===null||i===null||a===null)return null;let l=1;if(r.length>=4){let e=Number(r[3]);if(!Number.isFinite(e))return null;l=Math.min(1,Math.max(0,e))}return{r:o,g:i,b:a,a:l}}function Wr(e){if(!Number.isFinite(e))return null;let t=Math.trunc(e)>>>0,n=t>>>24&255;return{r:t>>>16&255,g:t>>>8&255,b:t&255,a:n===0?1:n/255}}function Vr(e,t){return Number.parseInt(e.slice(t,t+2),16)}function Mr(e){return Number.parseInt(`${e??"0"}${e??"0"}`,16)}function qr(e){return Number.isFinite(e)?Math.min(255,Math.max(0,Math.round(e))):null}function Hr(e){if(e.a>=1)return Kr(e.r,e.g,e.b);let t=Math.round(e.a*1e3)/1e3;return`rgba(${e.r},${e.g},${e.b},${t})`}function Kr(e,t,n){return`#${Yr(e)}${Yr(t)}${Yr(n)}`.toUpperCase()}function Yr(e){return e.toString(16).padStart(2,"0")}var Gr="#111111",Jr="#FFFFFF",Qr="#000000";function readableOn(e){let t=Lr(e);if(t===null)return Jr;let n=eo(t),r=eo({r:17,g:17,b:17}),o=eo({r:255,g:255,b:255});return no(n,o)>=no(n,r)?Jr:Gr}function Zr(e,t){let n=readableOn(e);return contrastRatio(n,e)>=t?n:contrastRatio(Jr,e)>=contrastRatio(Qr,e)?Jr:Qr}function Xr(e){let t=t=>e.reduce((e,n)=>Math.min(e,contrastRatio(t,n)),Number.POSITIVE_INFINITY);return t(Jr)>=t(Qr)?Jr:Qr}function eo(e){let t=to(e.r/255),n=to(e.g/255),r=to(e.b/255);return.2126*t+.7152*n+.0722*r}function to(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function no(e,t){let n=Math.max(e,t),r=Math.min(e,t);return(n+.05)/(r+.05)}function contrastRatio(e,t){let n=Lr(e),r=Lr(t);if(n===null||r===null)return 1;let o=r.a>=1?r:{...r},i=n.a>=1?n:ro(n,o);return no(eo(i),eo(o))}function ro(e,t){let n=e.a,r=(e,t)=>Math.round(e*n+t*(1-n));return{r:r(e.r,t.r),g:r(e.g,t.g),b:r(e.b,t.b),a:1}}function oo(e,t){let n=Lr(e),r=Lr(t);if(n===null||r===null)return null;let o=n.a>=1?n:ro(n,{...r});return Kr(o.r,o.g,o.b)}function io(e,t){let n=Lr(e);if(n===null)return null;let r=Math.min(1,Math.max(0,t));return`rgba(${n.r}, ${n.g}, ${n.b}, ${r})`}var ao=.05;function lo(e,t,n,r){let o=t[0];if(o===void 0)return n;let i=e=>t.every(t=>contrastRatio(e,t)>=r);if(Lr(e)===null)return n;if(i(e))return e;let a=oo(e,o),l=a===null?null:Lr(a),s=Lr(n);if(l===null||s===null)return n;for(let e=1;e<1/ao;e+=1){let t=e*ao,n=(e,n)=>Math.round(e+(n-e)*t),r=Kr(n(l.r,s.r),n(l.g,s.g),n(l.b,s.b));if(i(r))return r}return n}var so=/* @__PURE__ */Object.freeze({ink:"#262523",ink2:"#4A4845",ink3:"#6B6863",paper:"#F8F7F4",card:"#FFFFFF",line:"#E7E6E2",tile:"#F2F1EE",shadow:"rgba(38, 37, 35, .07)",riskBg:"#FFE3E1",riskInk:"#B0231B",riskDot:"#E5372B",clearBg:"#E6F4D3",clearInk:"#2F6A12",clearDot:"#5FA82B",watchDot:"#E5A000"}),co=/* @__PURE__ */new WeakMap;function uo(e){let t=co.get(e);if(t!==void 0)return t;let n=e.color,r=e.brightness==="dark",o=r?{dark:r,ink:n.text.primary,ink2:n.text.secondary,ink3:n.text.muted,paper:n.background,card:n.surface,line:n.borderRingCream,tile:n.surfaceSubtle,shadow:n.shadow,riskBg:n.badgeBgCritical,riskInk:n.danger,riskDot:n.danger,clearBg:n.badgeBgPositive,clearInk:n.success,clearDot:n.success,watchDot:n.warningStrong}:{dark:r,...so},i=(e,t)=>lo(e,t,Xr(t),po),a=(e,t)=>contrastRatio(e,t)>=po?e:Zr(t,po),l=[o.card,o.paper].map(e=>oo(n.brandSoft,e)??e),s={primary:n.primary,onPrimary:a(n.onPrimary,n.primary),accent:n.accent,onAccent:a(n.onAccent,n.accent),link:i(n.linkInk,[o.card,o.paper,o.tile]),badge:n.brandSoft,onBadge:i(n.brandInk,l)},d=/* @__PURE__ */Object.freeze({...o,...s});return co.set(e,d),d}var po=4.5;function fo(e,t){for(let n of t)if(contrastRatio(n,e)>=po)return n;return Zr(e,po)}function ho(e,t,n){let r=io(e,t);return(r===null?null:oo(r,n))??n}function go(e){let t=uo(e),n=e.color,r=t.card;return{ink:t.ink,ink2:t.ink2,ink3:t.ink3,paper:t.paper,tile:t.tile,line:t.line,card:r,onInk:t.dark?n.background:"#FFFFFF",primary:t.primary,onPrimary:t.onPrimary,accent:t.accent,onAccent:fo(t.accent,[t.ink,t.onAccent]),accent2:ho(t.accent,.75,r),accent4:ho(t.accent,.17,r),accentChip:ho(t.accent,.47,r),link:t.link,linkChip:ho(t.link,.2,r),riskDot:t.riskDot,riskChip:t.dark?n.badgeBgCritical:"#FFD8D6",clearBg:t.clearBg,clearInk:t.clearInk,clearChip:t.dark?n.badgeBgPositive:"#DDEFC4",byInk:n.brandInk}}var bo=/* @__PURE__ */new Set(["color","fontSize","fontWeight","fontStyle","lh","ls","family","textAlign","textTransform","textDecorationLine"]),mo=/* @__PURE__ */new Set(["dur","delay","stagger","ease","tint","k","cols","nowrap"]),yo=["paddingTop","paddingRight","paddingBottom","paddingLeft"],vo=17,ko=1.5,wo=400,_o=700;function So(e){return e<=450?"regular":e<=650?"medium":"bold"}function xo(e){let t=Math.min(900,Math.max(100,Math.round(e/100)*100));return String(t)}function Co(e,t,n){if(t==="$mono"){let t=n<=450?"mono":n<=650?"monoMedium":"monoBold",r=face(e,t);return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:xo(n)}}let r=t==="$serif"?headingFace(e,So(n)):face(e,So(n));return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:xo(n)}}function Ro(e,t,n={}){let r=go(e),o=e.brightness==="dark",i=e.motion.reducedMotion,a=e=>{if(typeof e=="string"&&e.startsWith("$")){let t=e.slice(1);return t.startsWith("n_")?o?r.line??e:`#${t.slice(2)}`:t==="sans"||t==="serif"||t==="mono"?e:r[t]??e}return Array.isArray(e)?e.map(e=>a(e)):e},l=/* @__PURE__ */new Map,s=e=>{let r=e.filter(e=>typeof e=="string"&&e!==""),o=r.join("|"),s=l.get(o);if(s!==void 0)return s;let d={},c=e=>{if(e!==void 0)for(let[t,n]of Object.entries(e))d[t]=a(n)};for(let e of r)c(t[e]),i&&c(n[e]);let u=/* @__PURE__ */Object.freeze(d);return l.set(o,u),u},d=/* @__PURE__ */new Map,c=(...e)=>{let t=e.filter(Boolean).join("|"),n=d.get(t);if(n!==void 0)return n;let r=s(e),o={};for(let[e,t]of Object.entries(r))bo.has(e)||mo.has(e)||e==="ring"||e==="edge"||e==="shadow"||e==="round"||e==="zIndex"&&typeof t=="number"&&t<0||t!==null&&(o[e]=t);if((typeof r.fontSize=="number"||r.flexDirection==="row")&&r.position!=="absolute"&&typeof r.height=="number"&&typeof r.width!="number"){let e=o.height;delete o.height,typeof o.minHeight!="number"&&(o.minHeight=e)}let i=r.ring;if(Array.isArray(i)){let[e,t]=i;o.borderWidth=e,o.borderColor=t;for(let t of yo){let n=o[t];typeof n=="number"&&(o[t]=Math.max(0,n-e))}}let a=r.edge;if(Array.isArray(a)){let[e,t]=a;o.borderBottomWidth=e,o.borderBottomColor=t}let l=r.shadow;if(Array.isArray(l)){let[e,t,n,r]=l;o.shadowColor=r,o.shadowOffset={width:e,height:t},o.shadowOpacity=1,o.shadowRadius=n/2}if(r.round===1){let e=typeof r.width=="number"?r.width:typeof r.height=="number"?r.height:999;o.borderRadius=e/2}let c=/* @__PURE__ */Object.freeze(o);return d.set(t,c),c},u=/* @__PURE__ */new Map,p=(t,n)=>{let o=`${t}|${n.filter(Boolean).join("|")}`,i=u.get(o);if(i!==void 0)return i;let a=s(n),l=typeof a.fontSize=="number"?a.fontSize:vo,d=typeof a.lh=="number"?a.lh:ko,c=typeof a.fontWeight=="string"?Number(a.fontWeight):t,p=typeof a.family=="string"?a.family:"$sans",f={...Co(e,p,c),fontSize:l,lineHeight:Math.round(l*d*100)/100,color:typeof a.color=="string"?a.color:r.ink};typeof a.ls=="number"&&(f.letterSpacing=Math.round(a.ls*l*100)/100);for(let e of["fontStyle","textAlign","textTransform","textDecorationLine"])typeof a[e]=="string"&&(f[e]=a[e]);let h=/* @__PURE__ */Object.freeze(f);return u.set(o,h),h};return{reduced:i,colors:r,view:c,text:(...e)=>p(wo,e),strong:(...e)=>p(_o,e),icon:(...e)=>{let t=s(e),n={tintColor:typeof t.color=="string"?t.color:r.ink};for(let e of["width","height","opacity"])typeof t[e]=="number"&&(n[e]=t[e]);return n},col:(e,t)=>{let n=s([e]).cols;if(!Array.isArray(n))return{};let r=n[Math.min(t,n.length-1)];if(typeof r=="number")return{width:r,flexShrink:0};let o=typeof r=="string"?Number.parseFloat(r):1;return{flex:Number.isFinite(o)?o:1,minWidth:0}},motion:(...e)=>{let t=s(e),n=t.ease;return{dur:typeof t.dur=="number"?t.dur:0,delay:typeof t.delay=="number"?t.delay:0,stagger:typeof t.stagger=="number"?t.stagger:0,ease:Array.isArray(n)&&n.length===4?n:null}},raw:(e,...t)=>s(t)[e]}}var Fo={".serif":{family:"$serif",fontWeight:"800",ls:-.01},".emb-btn":{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:48,paddingTop:0,paddingRight:22,paddingBottom:0,paddingLeft:22,borderRadius:999,backgroundColor:"$primary",color:"$onPrimary",fontWeight:"700",fontSize:16,textDecorationLine:"none",dur:160,ease:[.23,1,.32,1],gap:8},".emb-btn--sm":{minHeight:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,fontSize:15},".dot":{width:9,height:9,round:1,flexGrow:0,flexShrink:0},".dot--risk":{backgroundColor:"$riskDot"},".ask-chips":{flexDirection:"column",alignItems:"center",marginTop:22,gap:10},".chip":{paddingTop:10,paddingRight:16,paddingBottom:10,paddingLeft:16,borderRadius:999,fontSize:15,fontWeight:"600",lh:1.3,textAlign:"center",dur:160,ease:[.23,1,.32,1]},".ask-empty":{minHeight:"100%",flexDirection:"column",alignItems:"center",paddingTop:14,paddingRight:16,paddingBottom:22,paddingLeft:16,textAlign:"center"},".ask-empty h2":{fontSize:23,lh:1.12},".ask-start":{width:"100%",marginTop:"auto",marginRight:0,marginBottom:"auto",marginLeft:0,paddingTop:18,paddingRight:0,paddingBottom:18,paddingLeft:0,flexDirection:"column",alignItems:"center"},".ask-empty .ask-chips":{marginTop:14,alignSelf:"center",alignItems:"stretch",width:"100%",maxWidth:340},".hp-need__k":{flexDirection:"row",alignItems:"center",fontSize:15,fontWeight:"800",gap:8},".hp-srcs":{marginLeft:"auto",flexDirection:"row",gap:4},".hp-src":{height:24,paddingTop:0,paddingRight:9,paddingBottom:0,paddingLeft:9,borderRadius:999,backgroundColor:"$tile",color:"$ink2",fontSize:12,fontWeight:"700",flexDirection:"row",alignItems:"center",nowrap:1},".hp-src--dna":{backgroundColor:"$n_E0FDFF",color:"$link"},".hp-need__s":{alignItems:"baseline",marginTop:6,fontSize:15,lh:1.45,color:"$ink2",flexDirection:"row",cols:[9,"1fr"],gap:9},".hp-need__s b":{color:"$ink",fontWeight:"800"},".ask-focus":{width:"100%",paddingTop:14,paddingRight:16,paddingBottom:16,paddingLeft:16,borderRadius:20,backgroundColor:"$card",textAlign:"left",shadow:[0,1,3,"rgba(38, 37, 35, .07)"]},".ask-focus h3":{marginTop:10,fontSize:18,fontWeight:"800",lh:1.22},".ask-focus__x":{width:36,height:36,marginTop:-8,marginRight:-10,marginBottom:-8,marginLeft:-2,alignItems:"center",justifyContent:"center",round:1,color:"$ink2"},".ask-focus__x svg":{width:18,height:18},".ask-focus-pill":{marginLeft:"auto",flexDirection:"row",alignItems:"center",minHeight:36,paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,borderRadius:999,backgroundColor:"$n_FFE3E1",color:"$n_B0231B",fontSize:15,fontWeight:"800",gap:7},".ask-focus-pill i":{width:8,height:8,round:1,backgroundColor:"$riskDot"},".ask-focus .hp-need__s":{fontSize:14.5},".ask-focus__acts":{flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginTop:12,rowGap:4,columnGap:16},".ask-focus__q":{minHeight:36,fontSize:14.5,fontWeight:"700",color:"$link",textDecorationLine:"underline"},".ask-top":{alignSelf:"stretch",flexDirection:"row",marginTop:-8,marginRight:0,marginBottom:6,marginLeft:0},".thread__hist":{flexDirection:"row",alignItems:"center",minHeight:36,paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:4,fontSize:15,fontWeight:"700",color:"$link",gap:6},".thread__hist svg":{width:18,height:18},".thread__count":{minWidth:22,height:20,paddingTop:0,paddingRight:6,paddingBottom:0,paddingLeft:6,borderRadius:999,backgroundColor:"$card",color:"$ink2",fontSize:12,fontWeight:"800",alignItems:"center",justifyContent:"center",ring:[1,"$line"]}},Ao=16;var To=4e3,Io=.5;function Eo(e,t,n){let r=1,o=-1;for(let i of e)o<0?o=i:o+t+i<=n?o+=t+i:(r+=1,o=i);return r}function Do(e,t,n){if(e.length===0)return n;let r=Eo(e,t,n),o=[];for(let r=0;r<e.length;r+=1){let i=0;for(let a=r;a<e.length;a+=1)i+=(a>r?t:0)+e[a],i<=n&&o.push(i)}o.sort((e,t)=>e-t);let i=Io*e.length+1;for(let a of o)if(Eo(e,t,a)<=r)return Math.min(n,a+i);return n}function BalancedTitle({text:e,style:t,measureCh:n}){let r=p(()=>e.split(/\s+/).filter(e=>e!==""),[e]),o=k.flatten(t),i=[e,o.fontFamily,o.fontSize,o.fontWeight,o.letterSpacing].join("|"),a=c({key:"",ch:null,line:null,words:[]});a.current.key!==i&&(a.current={key:i,ch:null,line:null,words:r.map(()=>null)});let[l,s]=u(null),d=l!==null&&l.key===i?l.value:null,f=()=>{let e=a.current;if(e.ch===null||e.line===null||e.words.some(e=>e===null))return;let t=e.words,r=t.reduce((e,t)=>e+t,0),o=t.length>1?Math.max(0,(e.line-r)/(t.length-1)):0,i=Do(t,o,(e.ch+Io)*n);s(t=>t!==null&&t.key===e.key&&t.value===i?t:{key:e.key,value:i})},h=e=>t=>{a.current.key===i&&(e(a.current,t.nativeEvent.layout.width),f())};/* @__PURE__ */
|
|
19
|
+
return $(w,{style:Oo.wrap,children:[
|
|
20
|
+
/* @__PURE__ */N(Text,{tier:"heading",style:d===null?t:[t,{maxWidth:d}],accessibilityRole:"header",children:e}),
|
|
21
|
+
/* @__PURE__ */N(w,{style:Oo.probeClip,pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */$(w,{style:Oo.probeRow,children:[
|
|
22
|
+
/* @__PURE__ */N(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.ch=t}),children:"0"}),
|
|
23
|
+
/* @__PURE__ */N(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.line=t}),children:r.join(" ")}),r.map((e,n)=>/* @__PURE__ */N(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.words[n]=t}),children:e},`${n}:${e}`))]})})]})}var Oo=k.create({wrap:{alignSelf:"stretch",alignItems:"center"},probeClip:{position:"absolute",left:0,top:0,width:0,height:0,overflow:"hidden",opacity:0},probeRow:{width:To,flexDirection:"row",alignItems:"flex-start"}});function Po(e){return{kit:Ro(e,Fo),Title:BalancedTitle,titleCh:Ao}}function zo(e){let t=e.raw;if(typeof t!="object"||t===null)return null;let n=t.code;return typeof n=="string"&&n.length>0?n:null}function Bo(e,t){let n=zo(e);if(n===null)return e;let r=t[n];return r===void 0?e:makeEverfurError(r.code,{retryable:r.retryable,...e.httpStatus!==void 0?{httpStatus:e.httpStatus}:{},...e.requestId!==void 0?{requestId:e.requestId}:{},wireCode:n,reasonCode:n,...e.wireMessage!==void 0?{wireMessage:e.wireMessage}:{},raw:e.raw})}var No=/* @__PURE__ */new Set(["expo","fcm","apns"]),$o=/* @__PURE__ */new Set(["ios","android"]),Lo=4096,jo=128,Uo=64,Wo=/[\0- ]/;function Vo(e,t){return makeEverfurError("validationFailed",{retryable:false,wireMessage:e,...t?{reasonCode:t}:{}})}function Mo(e){if(typeof e!="object"||e===null)return Vo("registerDevice needs an input object");let{token:t,provider:n,platform:r,installationId:o}=e;return typeof n!="string"||!No.has(n)?Vo("provider must be expo, fcm or apns"):typeof r!="string"||!$o.has(r)?Vo("platform must be ios or android"):typeof t!="string"||t.trim().length===0||t.length>Lo||Wo.test(t)?Vo(`token must be a push token of 1..${Lo} characters with no whitespace`,"token_invalid"):o!==void 0&&(typeof o!="string"||o.length===0||o.length>jo)?Vo(`installationId must be 1..${jo} characters`):null}var qo=/^[A-Za-z][A-Za-z0-9_+-]*(\/[A-Za-z0-9_+-]+){0,2}$/,Ho=64,Ko=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/,Yo=35;function Go(e){return e.httpStatus===400&&e.code==="validationFailed"}function Jo(e){let t={...e};return delete t.timezone,delete t.locale,t}function Qo(e,t,n){return typeof e=="string"&&e.length<=n&&t.test(e)?e:null}function Zo(e){return typeof e!="string"||e.length===0||e.length>Uo?Vo(`deviceId must be 1..${Uo} characters`):Wo.test(e)||e.includes("/")||e==="."||e===".."?Vo("deviceId is not a device id"):null}function Xo(e){if(typeof e!="object"||e===null)return Vo("setPreferences needs an input object");let{pushEnabled:t,emailEnabled:n}=e;return typeof t!="boolean"||typeof n!="boolean"?Vo("pushEnabled and emailEnabled must both be booleans: the route replaces both switches"):null}function ei(e){return typeof e=="string"&&e.length>0?e:null}function ti(e){if(typeof e!="object"||e===null)return null;let t=e,n=ei(t.device_id),r=ei(t.provider),o=ei(t.platform),i=ei(t.registered_at),a=ei(t.last_seen_at);if(n===null||r===null||o===null||i===null||a===null||!No.has(r)||!$o.has(o))return null;let l=t.installation_id;/* @__PURE__ */
|
|
24
|
+
return Object.freeze({deviceId:n,provider:r,platform:o,installationId:typeof l=="string"&&l.length>0?l:null,registeredAt:i,lastSeenAt:a})}function ni(e){if(typeof e!="object"||e===null)return null;let t=e,n=ei(t.updated_at);return typeof t.push_enabled!="boolean"||typeof t.email_enabled!="boolean"||n===null?null:/* @__PURE__ */Object.freeze({pushEnabled:t.push_enabled,emailEnabled:t.email_enabled,updatedAt:n})}function ri(e){return makeEverfurError("internalError",{retryable:false,wireMessage:`${e}: the response was not the documented shape`})}var oi=/* @__PURE__ */Object.freeze({provider_unsupported:{code:"validationFailed",retryable:false},token_invalid:{code:"validationFailed",retryable:false},device_cipher_unavailable:{code:"serviceUnavailable",retryable:true}});function ii(e){return Bo(e,oi)}function ai(e){return makeEverfurError("validationFailed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}function createNotificationsClient(e){let t=()=>{let{services:t}=e.registry;return li({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})};return{registerDevice:(n,r)=>e.isDisposed?Promise.resolve(err(ai("registerDevice"))):t().registerDevice(n,r),unregisterDevice:(n,r)=>e.isDisposed?Promise.resolve(err(ai("unregisterDevice"))):t().unregisterDevice(n,r),setPreferences:(n,r)=>e.isDisposed?Promise.resolve(err(ai("setPreferences"))):t().setPreferences(n,r)}}function li(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),n=(e,t)=>t?{...e,signal:t}:e;return{async registerDevice(e,r){let o=Mo(e);if(o!==null)return err(o);let i={token:e.token,provider:e.provider,platform:e.platform};e.installationId!==void 0&&(i.installation_id=e.installationId);let a=Qo(e.timezone,qo,Ho);a!==null&&(i.timezone=a);let l=Qo(e.locale,Ko,Yo);l!==null&&(i.locale=l);let s=e=>t.send("notifications.registerDevice",n({method:"POST",path:"/widget/v1/me/devices",body:e},r?.signal)),d=await s(i);if(!d.ok&&Go(d.error)&&(a!==null||l!==null)&&(d=await s(Jo(i))),!d.ok)return err(ii(d.error));let c=ti(d.value);return c===null?err(ri("registerDevice")):ok(c)},async unregisterDevice(e,r){let o=Zo(e);if(o!==null)return err(o);let i=await t.send("notifications.unregisterDevice",n({method:"DELETE",path:`/widget/v1/me/devices/${encodeURIComponent(e)}`},r?.signal));return i.ok?ok(void 0):err(ii(i.error))},async setPreferences(e,r){let o=Xo(e);if(o!==null)return err(o);let i=await t.send("notifications.setPreferences",n({method:"PUT",path:"/widget/v1/me/notification-preferences",body:{push_enabled:e.pushEnabled,email_enabled:e.emailEnabled}},r?.signal));if(!i.ok)return err(ii(i.error));let a=ni(i.value);return a===null?err(ri("setPreferences")):ok(a)}}}function si(e,t){let n=`${t.key}\n${t.email}`,r=e.get(n);return r===void 0?(e.set(n,t.idempotencyKey),t):r===t.idempotencyKey?t:/* @__PURE__ */Object.freeze({...t,idempotencyKey:r})}function isIntroSwipeOut(e,t){let n=t>0?Math.abs(e)/t:0;return e>90||e>12&&n>.11}var di=/* @__PURE__ */Object.freeze({title:"Request records",clinic:"Clinic",search:"Search clinics by name or location",placeholder:"Clinic name, city, or ZIP",email:"Clinic email",emailPlaceholder:"records@clinic.com",ownerName:"Your full name",scopeHeading:"What you’re authorizing",send:"Send request",sending:"Sending…",cancel:"Cancel",sign:"Signature",draw:"Draw your signature",type:"Type your name to sign",toType:"Can’t draw? Type your name instead",toDraw:"Draw your signature instead",clear:"Clear",drawHint:"Draw your signature in the box above.",clearA11y:"Clear signature",typedSignatureA11y:e=>`Typed signature: ${e}`,missingSignature:"Please add your signature before submitting.",recentlyUsed:"Recently used",moreClinics:"Load more"});var ci=/* @__PURE__ */Object.freeze({title:di.title,titleFor:e=>{let t=e?.trim()??"";return t.length>0?`Request ${t}’s records`:di.title},leadWeb:"Find the clinic that has them. We send a secure request and read every page they send back.",leadNative:"Find the clinic that has them.",searchLabelWeb:"Find the clinic",howItWorks:"How it works",howSteps:e=>[{title:"We send a secure request",body:"With your permission, straight to the clinic’s records team."},{title:"The clinic sends the file",body:"Most clinics respond within 3 to 5 business days. We follow up for you."},{title:"Everfur reads every page",body:`Visits, vaccines, labs and prescriptions land in ${e}’s records.`}],placeholder:di.placeholder,searchA11y:di.search,clearSearch:"Clear search",loading:"Loading clinics",uploadOwn:"I already have the records",uploadOwnStarting:"Setting up your upload…",noPet:"Add a pet first, then come back to request their records.",recentlyUsed:di.recentlyUsed,noMatch:e=>`No clinics match “${e}”. You can still request records using the option above.`,loadingMore:"Loading more…",loadMoreFailed:"Couldn’t load more. Tap to retry.",selectA11y:e=>`Request records from ${e}`,resultsCount:e=>e===1?"Showing 1 clinic":`Showing ${String(e)} clinics`,fallback:/* @__PURE__ */Object.freeze({title:"Can’t find your clinic?",subtitle:"Add it by email and we’ll request your records.",nameLabel:"Clinic name",namePlaceholder:"Your clinic’s name",emailLabel:"Clinic email",emailPlaceholder:"records@clinic.com",reviewNote:"We review every request by hand before reaching out to the clinic.",submit:"Continue"})});var ui=1.609344;function pi(e){return e===null||!Number.isFinite(e)?null:(e/ui).toFixed(1)}function fi(e){let t=pi(e);return t===null?"":`${t} mi`}var hi=300,gi=2;var bi=/* @__PURE__ */Object.freeze({loading:"Loading",empty:"No records yet",upload:"Upload records",consentRequired:"Consent required",allow:"Allow",allPetsConsent:"This covers all your pets. You can withdraw it at any time.",sessionRequired:"Sign in required",recordUnavailable:"Record unavailable",retry:"Try again",records:"Records",beingReviewed:"being reviewed"});function mi(e,t){let[n,r]=u(""),[o,i]=u(""),[a,l]=u([]),[s,d]=u(null),[g,b]=u([]),[m,y]=u(true),[v,k]=u(false),[w,_]=u(false),[S,x]=u(null),[C,R]=u(null),[F,A]=u(0),T=c(0),I=c(true),E=t?.latitude,D=t?.longitude,O=p(()=>void 0,[E,D]);f(()=>(I.current=true,()=>{I.current=false,T.current+=1}),[e]),f(()=>{let t=true;return y(true),e.recentClinics({limit:5}).then(e=>{t&&(e.ok&&b(e.value.clinics),y(false))}).catch(()=>{t&&y(false)}),()=>{t=false}},[e]),f(()=>{let e=n.trim();if(e.length<gi){i("");return}let t=setTimeout(()=>i(e),hi);return()=>clearTimeout(t)},[n]);let P=o.length>=gi;f(()=>{let t=T.current+=1;if(l([]),d(null),x(null),R(null),!P){k(false);return}k(true),e.searchClinics({query:o,limit:25,...O?{location:O}:{}}).then(e=>{!I.current||t!==T.current||(e.ok?(l(e.value.clinics),d(e.value.nextCursor)):x(e.error),k(false))}).catch(()=>{I.current&&t===T.current&&k(false)})},[e,o,P,O,F]);let z=h(()=>{if(!P||s===null||w)return;let t=T.current;_(true),R(null),e.searchClinics({query:o,limit:25,cursor:s,...O?{location:O}:{}}).then(e=>{!I.current||t!==T.current||(e.ok?(l(t=>[...t,...e.value.clinics]),d(e.value.nextCursor)):R(e.error),_(false))}).catch(()=>{I.current&&t===T.current&&_(false)})},[e,s,o,P,w,O]),B=h(e=>r(e),[]),N=h(()=>A(e=>e+1),[]);return p(()=>({query:n,debouncedQuery:o,isSearchActive:P,clinics:a,recent:g,recentLoading:m,initialLoading:v,loadingMore:w,hasNextPage:s!==null,error:S,pageError:C,setQuery:B,loadMore:z,retry:N}),[n,o,P,a,g,m,v,w,s,S,C,B,z,N])}function yi(e,t,n,r){/* @__PURE__ */
|
|
25
|
+
return Object.freeze({key:e?.id??`free:${t??""}`,clinic:e,freeText:t,email:n,idempotencyKey:r})}var vi={".serif":{family:"$serif",fontWeight:"800",ls:-.01},".emb-btn":{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:48,paddingTop:0,paddingRight:22,paddingBottom:0,paddingLeft:22,borderRadius:999,backgroundColor:"$primary",color:"$onPrimary",fontWeight:"700",fontSize:16,textDecorationLine:"none",dur:160,ease:[.23,1,.32,1],gap:8},".emb-btn svg":{width:20,height:20},".emb-btn--block":{width:"100%"},".emb-btn--ghost":{backgroundColor:"transparent",color:"$ink",ring:[1.5,"$ink"]},".emb-btn--sm":{minHeight:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,fontSize:15},".emb-btn--lg":{minHeight:56,paddingTop:0,paddingRight:28,paddingBottom:0,paddingLeft:28,fontSize:17},".emb-btn[disabled]":{opacity:.32},".ph-sub":{flexGrow:0,flexShrink:0,height:46,backgroundColor:"$paper",edge:[1,"$line"],flexDirection:"row",cols:["1fr","1fr","1fr"]},".ph-sub button":{position:"relative",fontSize:16,fontWeight:"600",color:"$ink3",textAlign:"center",dur:240},'.ph-sub button[aria-selected="true"]':{color:"$ink",fontWeight:"800"},'.ph-sub button[aria-selected="true"]::after':{position:"absolute",left:"18%",right:"18%",bottom:0,height:3,borderTopLeftRadius:3,borderTopRightRadius:3,borderBottomRightRadius:0,borderBottomLeftRadius:0,backgroundColor:"$ink"},".ph-sub button .ph-new":{position:"absolute",top:12,marginLeft:3,width:7,height:7,round:1,backgroundColor:"$riskDot"},".ph-toast":{position:"absolute",left:16,right:16,top:112,zIndex:50,backgroundColor:"$ink",color:"$onInk",borderRadius:16,paddingTop:12,paddingRight:15,paddingBottom:12,paddingLeft:15,fontSize:14.5,lh:1.4,opacity:0,dur:160},".ph-toast.is-on":{opacity:1,dur:220},".cp-tag":{family:"$mono",fontSize:10,ls:.06,textTransform:"uppercase",backgroundColor:"$ink",color:"$onInk",paddingTop:2,paddingRight:6,paddingBottom:2,paddingLeft:6,borderRadius:5},".cp-tag--s":{backgroundColor:"$card",color:"$ink"},".sh-track":{marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},".sh-track li":{position:"relative",paddingBottom:16,flexDirection:"row",cols:[22,"1fr"],gap:12},".sh-track li:last-child":{paddingBottom:0},".sh-track li::before":{position:"absolute",left:10,top:20,bottom:-2,width:2,borderRadius:1,backgroundColor:"$n_E2DFD9"},".sh-track li:last-child::before":{display:"none"},".sh-track li.is-done:has(+ li.is-done)::before":{backgroundColor:"$primary"},".sh-track__dot":{width:22,height:22,round:1,alignItems:"center",justifyContent:"center",backgroundColor:"$card",ring:[2,"$n_CFCBC4"],position:"relative",zIndex:1},".sh-track__dot svg":{width:13,height:13,color:"$card"},".sh-track .is-done .sh-track__dot":{backgroundColor:"$ink",ring:null,shadow:null},".sh-track .is-now .sh-track__dot":{backgroundColor:"$accent",ring:[2,"$ink"]},".sh-track strong":{fontSize:15.5,fontWeight:"800",lh:1.3},".sh-track small":{marginTop:1,fontSize:14,lh:1.35,color:"$ink3"},".sh-track li:not(.is-done):not(.is-now) strong":{color:"$ink3",fontWeight:"700"},".ph-intro":{position:"absolute",top:0,right:0,bottom:0,left:0,zIndex:45},".in-dim":{position:"absolute",left:0,right:0,backgroundColor:"rgba(38, 37, 35, .5)",opacity:0,dur:240},".in-dim--top":{top:0},".in-dim--bot":{bottom:0},".ph-intro.is-on .in-dim--top":{opacity:1,dur:380},".ph-intro.is-on .in-dim--bot":{opacity:1,dur:380},".ph-intro.is-on.is-all .in-dim--mid":{opacity:1,dur:380},".in-sheet":{position:"absolute",left:0,right:0,bottom:0,backgroundColor:"$card",borderTopLeftRadius:28,borderTopRightRadius:28,borderBottomRightRadius:0,borderBottomLeftRadius:0,paddingTop:10,paddingRight:20,paddingBottom:30,paddingLeft:20,shadow:[0,-10,30,"rgba(38, 37, 35, .14)"],dur:240,ease:[.23,1,.32,1]},".ph-intro.is-on .in-sheet":{dur:380,ease:[.32,.72,0,1]},".in-sheet.is-drag":{dur:0},".in-grab":{width:40,height:5,borderRadius:3,backgroundColor:"$n_DAD7D1",marginTop:0,marginRight:"auto",marginBottom:8,marginLeft:"auto"},".in-top":{flexDirection:"row",alignItems:"center",minHeight:40,gap:12},".in-back":{width:40,height:40,marginLeft:-10,alignItems:"center",justifyContent:"center",round:1,flexGrow:0,flexShrink:0},".in-x":{width:40,height:40,marginLeft:"auto",alignItems:"center",justifyContent:"center",round:1,flexGrow:0,flexShrink:0,marginTop:0,marginRight:-10,marginBottom:0},".in-back svg":{width:22,height:22},".in-x svg":{width:22,height:22},".in-bars":{flex:1,flexDirection:"row",gap:6},".in-bars b":{flex:1,height:4,borderRadius:2,backgroundColor:"$line",overflow:"hidden",position:"relative"},".in-bars b::after":{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:"$ink",borderRadius:2,dur:240,ease:[.23,1,.32,1]},".in-skip":{minHeight:40,paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:10,marginRight:-4,fontSize:15.5,fontWeight:"700",color:"$ink2",flexGrow:0,flexShrink:0},'.in-sheet[data-mode="records"] .in-bars':{display:"none"},'.in-sheet[data-mode="records"] .in-skip':{display:"none"},'.in-sheet[data-mode="intro"] .in-x':{display:"none"},'.in-sheet[data-mode="records"] .in-top':{justifyContent:"space-between"},".in-body":{paddingTop:6,gap:14},".in-eyebrow":{flexDirection:"row",alignItems:"center",flexWrap:"wrap",fontSize:12.5,fontWeight:"800",ls:.07,textTransform:"uppercase",color:"$ink3",rowGap:4,columnGap:8},".in-by":{flexDirection:"row",alignItems:"center",textTransform:"none",ls:0,fontWeight:"500",fontSize:13,gap:5},".in-by svg":{width:54,height:19,color:"$n_10462E"},".in-h":{fontSize:29,lh:1.08,marginTop:-2,marginRight:0,marginBottom:0,marginLeft:0},".in-p":{fontSize:16,lh:1.45,color:"$ink2"},".in-p--s":{fontSize:15},".in-rows":{marginTop:2,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,gap:9},".in-rows li":{alignItems:"flex-start",backgroundColor:"$paper",borderRadius:18,paddingTop:13,paddingRight:14,paddingBottom:13,paddingLeft:14,flexDirection:"row",cols:[40,"1fr"],gap:12},".in-rows b":{fontSize:17,fontWeight:"800",lh:1.25},".in-rows li > span:last-child > span":{fontSize:15,lh:1.4,color:"$ink2",marginTop:1},".in-ic":{width:40,height:40,borderRadius:12,alignItems:"center",justifyContent:"center"},".in-ic svg":{width:22,height:22},".in-ic--y":{backgroundColor:"$accentChip"},".in-ic--c":{backgroundColor:"$linkChip"},".in-ic--g":{backgroundColor:"$clearChip"},".ph-sub button::before":{position:"absolute",top:7,right:8,bottom:7,left:8,zIndex:-1,borderRadius:999,opacity:0,dur:200},'.ph-sub [data-sub="ask"]':{tint:"$accentChip",k:0},'.ph-sub [data-sub="plan"]':{tint:"$linkChip",k:1},'.ph-sub [data-sub="records"]':{tint:"$clearChip",k:2},'#ph[data-in-frame="tabs"] .ph-sub button':{color:"$ink",fontWeight:"800"},'#ph[data-in-frame="tabs"] .ph-sub button::before':{opacity:1,dur:260,delay:560,stagger:60},'#ph[data-in-frame="tabs"] .ph-sub button::after':{opacity:0},".in-pair":{flexDirection:"row",cols:["1fr","1.5fr"],gap:10},".in-stack":{gap:8},".in-body .emb-btn":{dur:120,ease:[.23,1,.32,1]},".in-fine":{fontSize:13.5,lh:1.4,color:"$ink3",textAlign:"center"},".in-link":{alignSelf:"center",minHeight:40,paddingTop:0,paddingRight:8,paddingBottom:0,paddingLeft:8,fontSize:15,fontWeight:"700",color:"$link",textDecorationLine:"underline",dur:120,ease:[.23,1,.32,1]},".blanks":{backgroundColor:"$paper",borderRadius:20,paddingTop:12,paddingRight:12,paddingBottom:13,paddingLeft:12,gap:8},".blanks__h":{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:0,paddingRight:2,paddingBottom:2,paddingLeft:2,fontSize:12.5,fontWeight:"800",ls:.07,textTransform:"uppercase",color:"$ink3",gap:10},".blanks__h em":{fontStyle:"normal",ls:.01,textTransform:"none",fontSize:13,fontWeight:"800",color:"$onAccent",backgroundColor:"$accent",borderRadius:999,paddingTop:2,paddingRight:10,paddingBottom:2,paddingLeft:10,nowrap:1},'.blanks[data-st="filled"] .blanks__h em':{backgroundColor:"$clearBg",color:"$clearInk"},".blanks ol":{marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,gap:7},".blanks li":{columnGap:11,alignItems:"center",backgroundColor:"$card",borderRadius:15,paddingTop:9,paddingRight:12,paddingBottom:9,paddingLeft:9,flexDirection:"row",cols:[34,"1fr"]},".blanks li > b":{width:34,height:40,borderRadius:11,alignItems:"center",justifyContent:"center",family:"$serif",fontSize:22,fontWeight:"800",backgroundColor:"$accentChip"},".blanks li > span":{fontSize:16,fontWeight:"700",lh:1.35},".blanks li > small":{fontSize:13.5,color:"$ink3"},".blank":{minWidth:36,height:20,borderRadius:6,backgroundColor:"$accent4",ring:[1.5,"$accent"],fontStyle:"normal"},".blank--s":{minWidth:24},".blank--l":{minWidth:64},'.blanks[data-st="filled"] .blank':{height:"auto",minWidth:0,backgroundColor:"transparent",ring:null,shadow:null,paddingTop:0,paddingRight:3,paddingBottom:0,paddingLeft:3,marginTop:0,marginRight:-3,marginBottom:0,marginLeft:-3,borderRadius:6},".in-search":{flexDirection:"row",alignItems:"center",height:50,borderRadius:14,backgroundColor:"$paper",ring:[1.5,"$ink"],paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,gap:10},".in-search svg":{width:20,height:20,color:"$ink3",flexGrow:0,flexShrink:0},".in-search input":{flex:1,minWidth:0,borderWidth:0,backgroundColor:"transparent",fontSize:16,color:"$ink"},".in-clinics":{gap:8},".in-clinic":{width:"100%",alignItems:"center",textAlign:"left",backgroundColor:"$paper",borderRadius:16,paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,dur:120,ease:[.23,1,.32,1],flexDirection:"row",cols:["1fr",24],gap:10},".in-clinic b":{fontSize:16,lh:1.3},".in-clinic b .cp-tag":{marginLeft:6,ring:[1,"$line"]},".in-clinic small":{fontSize:14,color:"$ink3",marginTop:1},'.in-clinic[aria-checked="true"]':{backgroundColor:"$accent4",ring:[1.5,"$accent"]},".in-tick":{width:24,height:24,round:1,alignItems:"center",justifyContent:"center",ring:[1.5,"$n_CFCBC4"]},".in-tick svg":{width:14,height:14,color:"$card",opacity:0},'.in-clinic[aria-checked="true"] .in-tick':{backgroundColor:"$ink",ring:null,shadow:null},'.in-clinic[aria-checked="true"] .in-tick svg':{opacity:1},".in-none":{fontSize:15,color:"$ink2",backgroundColor:"$paper",borderRadius:16,paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,gap:4},".in-none .in-link":{alignSelf:"flex-start",paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},".in-prog":{fontSize:15,color:"$ink2",gap:7},".in-prog__bar":{height:5,borderRadius:3,backgroundColor:"$tile",overflow:"hidden"},".in-prog__bar i":{height:"100%",width:0,backgroundColor:"$ink",borderRadius:3,dur:600,ease:[.23,1,.32,1]},".in-sent":{backgroundColor:"$paper",borderRadius:20,paddingTop:16,paddingRight:16,paddingBottom:16,paddingLeft:14},".in-sent .sh-track li":{paddingBottom:14},".in-sent .sh-track li:last-child":{paddingBottom:0},".in-stack .emb-btn svg":{width:20,height:20},".ph-banner":{position:"absolute",left:10,right:10,top:54,zIndex:55,alignItems:"flex-start",textAlign:"left",paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,borderRadius:22,backgroundColor:"rgba(250, 250, 249, .97)",shadow:[0,14,34,"rgba(38, 37, 35, .4)"],ring:[1,"rgba(38, 37, 35, .06)"],dur:240,ease:[.23,1,.32,1],flexDirection:"row",cols:[38,"1fr"],gap:11},".ph-banner.is-on":{dur:380,ease:[.32,.72,0,1]},".ph-banner__app":{width:38,height:38,borderRadius:10,backgroundColor:"$accent",alignItems:"center",justifyContent:"center"},".ph-banner__app svg":{width:24,height:23},".ph-banner__meta":{flexDirection:"row",justifyContent:"space-between",fontSize:13,color:"$ink3"},".ph-banner__meta strong":{fontSize:13,fontWeight:"600",color:"$ink3"},".ph-banner__txt > strong":{fontSize:15.5,fontWeight:"700",lh:1.3,marginTop:1},".ph-banner__txt > span:last-child":{fontSize:15,lh:1.35,color:"$ink2"}},ki={".ph-sub button::before":{dur:150,delay:0},'#ph[data-in-frame="tabs"] .ph-sub button::before':{dur:150,delay:0},".in-sheet":{opacity:0,dur:150},".ph-intro.is-on .in-sheet":{opacity:1,dur:150},".in-sheet.is-drag":{opacity:1},".in-dim":{dur:150},".ph-intro.is-on .in-dim--top":{dur:150},".ph-intro.is-on .in-dim--bot":{dur:150},".ph-intro.is-on.is-all .in-dim--mid":{dur:150},".ph-banner":{opacity:0,dur:150},".ph-banner.is-on":{opacity:1,dur:150}},wi=[.23,1,.32,1],_i=[.32,.72,0,1],Si={opacity:0,translateY:8},xi={tabTop:140,tabHeight:46,sheetGap:10,sheetTopAll:56},Ci={toastY:-8,bannerY:-60,pillScale:.94,pressScale:.97,blankDrop:3,rows:{dur:260,delay:560,stagger:60},blanks:{dur:520,delay:300,stagger:80}},Ri={chat:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAB/ElEQVR4Ae3BPWicZQAA4CfvvUMxNSqp/dHJUeogiSUpWRQKDi6djFKV/k1OHdqhTipSih1LQzYR2rg5iZNQDiFYijlCK4KLUDi4SgsNDRVqEyV8HHfvXQ+a9vvgBb/nUavVarXaNo15nFedMe1NO5VnXct1F3QMGTPsIxe9qBr3nPC9AQ2Djrhsh6rsMO8PNyWC1D4LqrZot0SUOmlC1+/+Up7dXleYcNx5faLUrK5pK8o15VeFgxJBakbhmhVlW3FNYVYiSL2k0FGFjsKkRJCBIANBBoIMBBkIMhBkIMhAkIEgA0EGggwEGQgyEGQgyECQgSADQQaCDAQZCDIQpNYU9qjCXoU1iSC1qjBrv7K9YUahJRGlVr2tcNM3bmn7UduwA94VbcdrPtHVkohSC04aVzhmy0O73NfvBVe85+k9cEmiIXVX22H9Gn5zQ8+sq97yLI76WSIa9K1/LHpezyt6zjrnWaz51JIB0bAlTWdMmTKu38uWHPK01rVc97XbhkSP03bKjF8Uxmx5x3f26HrotItKEj2Jhi+cFXTdclhLaaJRNnTt0zSn5wcfu6dE0SgNXaf0PPKZC0oWbUfb+5aVLhpl06CffOiOCkSjBP02fe4r/6pENMqGntvmNVUmGuVPDzxnS9MHOirUMMrfls2Z9KWj1tVqtf+v/wAyK17WT9+2hwAAAABJRU5ErkJggg=="},heartcheck:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAEgklEQVR4Ae3Bf4yWdQEA8M/zPgzFzsmlOSkk2QAHaHMRdCIXevxydWCTGZIzmYySQJcJS3MTl1lsxvqDwpuyGs2kLIhByLU7qqkUFgWtA71onHbUnQFGlngRd+duz757ee953vfe91b/vZ+PqqqqqqqqqmGKlOd6k4w1zlg9jnldh90GG6XBeFcZ70KdOh33qpeVITK0Ot9UZ7CTvm2jUxLvc5+VLjXYfvc6YAiR0iZbb5HiNlkr8oSVittprT8pIVLKNK1GK+2gyHVK+4c5DioqVtx0e11iKGNcYSijLNWsWxGRYj6qVY28Zs971VHdxvuQmy2T9l17tOkwxkRXazRf3r80OCBTpJgjJgu2e8whhabZbpy8Drc6pNCHPWqhoM21MsWyfd5dgofdq9tgXb5vocskDrvBMYN12arPTRKX6/Y7GWJZauxwkcR9Nsh2xnPmGoPfavCmbC94ywKJGZqclRLLstSnJdosU9wZz+j0lLV6FLffUpcZ8B5H/FFKTpZ6wTqlva3JLkNZJ6iXISdLvcRZO/wv/FivxCwZctLea5LEK/pU6iarXKpQr3aJqS6WkpNWL2hTqa/7uW856gMKtQnqpeSk9QhGqcw6DxpQ6xGFRgrOSclJ6xBMUInVHhWMVGii4JiUnLRj+iUmKt89Ngp6rVdogqBDSk7aOX+VGGWM8txpk6DPEu3Od6ULJF7TKyUnS4dggUJ32uE2g91mi0jwOdsUWiA4JkNOllbBauf7jO+5xXO+5HyNtooEa2w22P2CVhlysjytT2Ka6YIRHpNYb43gY7aJBettMFidKRJ9npIhJ0uXPYJV8voFT1hjQJ09RgqaPCRtpWCnUzLEsv3bUolrbHfCgD6nfVIwX48ee9UInrVc2hSb5CS+6M8yxLId9VkXG5Bzvc36DTjkQrMEc92hRvBTt+szWOxn3i/RbaVMsWz93rJQYoy37ZPYq8ZMwUjBrzQ6K+1BdwhWOyRTrJjfW+BKidl+6E2JFjVmKvQHc5yRNsGPxBIv+IIiYsW9ZIURBsRm2CxocYF6eUfc6J/SInuMk3jHPKcVESvulH4NEmPVahbsVWOmRKfZ/i7Lk24RPOx5RcVK+bVbXS5R55wXBS0iN+Koef4iyzprBAfdrV9RsVL6/MYKkUSD1x0S/NJOP/BVf5PlHt8Q9JrvDSXESuvyhkbBIoe9Iuj2mh5ZFtsiEizXoqTYUA74rzkSkU85qF1pi/xEJHjAk4YQG9qLatUJljjhgOJWeEYkeNzjhhQrR7OrXCcR+YSLtMoS2eBrIkGTB5QhVp5dJrlWcIOpdupVaKQd7pK31XJliZWn3zZX+Ihgqtm2+4+8Wi3myGtytzLFyrfbO+aKJD7odi87LjHTL0wR9Puyh5QtVol9jlhkhMRoy/R7Sc5XfMclgrOWeFoFIpWaZZfR8vaLTZd3WqN9KhKp3GTNxsnWaZ52FYpV7qQtrjFJ2m7zHVex2HD0eNZJH1dolfv1GIbI8E21zdUS7RY7bJhiw3fCZrVmYKPFulRVVVX937wLjmYiRAD5+2oAAAAASUVORK5CYII="},file:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACN0lEQVR4Ae3BP4scZRwA4Of9Zc5NQkStch6IcqARK4tTsXJFDuQsFOFABW0sYqmfQRDyAcTGIoiS8rTYJIho0MIPEPwTo6ggnN0hmHDN7lgsw2bvMu/MnBsZYZ/H0tJSnyXN3rFhTdLGr875UUdJk+88posbtnytk2Py3va6bu7yqm/8roOQt6G74y4b6iDknXYUJ1z0rNYKeWHqL/fK+8GjZk645HlXtBLulIHLhloJeaW2xqZuqgxc8pwWQl7SVpj6zcvGpo4b2dQoLN6ObWNTAyObGoRFSaYSdmwbm1oxsikr3Bk7to1NrRjZlBHySm1NTJ00NDS05wOVFZ/bUquwaA/6yu18bM2+2wr/lfs8rEZYlO81GagRFuW8G/KSGoVFGTnlaQMHveKsBoW8pItvHfaUSlIj9EDogdADoQdCDxTySoedcb96u6651USlVKPQzUlXrcv7yRmdhLxk3pZ1TR7xoplQSWqEbibaSDoJeaV5F+1q8odPzUxUSjUK3exb84Z19a77xK2SSlKjkJcc9pEukkahB0IPhB4o5JUO+tALVtX702feMlNqFPKSeU9406qcVWc9biZpFPJK8za08aSZUqOQl8z7QhtfmkkaFfJK8657zUtOq7drx89mJiqlGoW85KALLugiVJIaoQdCD4QeCD0QeiD0QOiBQl5p6h5XHM0DKhM1Cnl7Ks/4t/bUCHnXLM4vaoS89920GO+qdUze33Y85JS7Hd2+q95zztLS0v/TP569YMkUqobUAAAAAElFTkSuQmCC"},back:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACGklEQVR4Ae3Bra4eRQAA0LPf9AXYKwbRkPIASzAoSLoXBGRUDaS8HcFNr6rBIO6aipqKu7ICjeimwQwO0hCyg5v9wX3nuLq6urpqFJztme/87r0NOmfqvfSVD35wp1lwnt69L/zjez97r9HFWW5MPrN6qtnFOW7cG9TeanZxht69Qe1XrzS7OK43GdRmz23QOao3GdRmo8UGnWN6k0FtNlps0jmiNxnUZqPFRp39epNBbTZabNbZqzcZ1GajxQ6dfXqTQW02WuzS2aM3GdRmo8VOne16k0FtNlrs1tmqNxnUZqPFAZ1tepNBbTZaHNLZojcZ1GajxUGddr3JoDYbLQ7rtOpNBrXZaHGCR9p8ZDKoPbi1OMVFmzuD2oNbi5NctHjsG7XZrcVpLloU//XOqYIWxac+t3oiyYqTBG0mSbSKvnWnOEXQ5k8vJNHqY0lWnCBoVWRJtIqSrDgsaFdkSbSKkqw4KNiiyJJoFSVZcUiwTZEl0SpKsuKAYKsiS6JVlGTFbsF2RZZEqyjJip2CPYosiVZRkhW7BPsUWRKtoiQrdgj2KrIkWkVJVmwW7FdkSbSKkqzYKDiiyJJoFSVZsUlwTJEl0SpKsmKD4KgiS6JVlGRFs+C4IkuiVfTUT/7SKDhDkSXR6rHX3mp0cY7FrQe1G80uzvLO1x786w+/aBacp3jhS5/44EdvNOuc7ZknXvrN1dXV1dX/4G9ZtJHJgYcMcQAAAABJRU5ErkJggg=="},x:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACb0lEQVR4Ae3BPaokVRgA0DP3y3SMBM3E2FQ0MprEBdzb/QpEcAmCoShmJmLoGgpeoQgDGohoJJi/TxNxViDjAmoQKYp+81dd1ZlS59jtdrvdbvdfFs75yDc+kB7Y7p77PvXILxaFZR/60l2veF9K2zTfetVd7/rLrxYUyz4xCb1mi6YXJp9ZVKwVes1aTS+sFJb94WhWHN1I5x1cK07e87sFYdlvblTFrEppWdMrZqMrX1sUzkmpKiZFldLzNb0wG3UGZ4TzUqqKSVGl9GxNL8xGncFZYY2UqmJSVCk9remF2agzWCGsk1JVTIoqpcc1vTAbdQarhLVSqopJUaV00vTCbNQZrBTWS6kqJkWV0qTphdmoM1gtbJFSVUyKKiWaXpiNOoMNwjYpHc2Koxtv6IXZqDPY5I7tmmvPdzDYKGyXblTF00ZXBpuFS6RUFY8bdQYXCJdJqSpORp3BRYpL3fHQbQ9dLFym6b3othdUKV0gXKLphScVVUqbhe2aa8WzFEc30kZhq+babQfXqmJWpbRJ2KbpFbPRlUFKVTEpqpQ2CFs0vTAbdQb/SqkqJkWV0mphvaYXZqPOYJZSVUyKKqWVwlpNL8xGncFtKVXFpKhSWiWs0/TCbNQZPCmlqpgUVUorhDWaXpiNOoNnSakqJkWV0lnhvKYXZqPO4HlSqopJUaV0Rjin6YXZqDNYklJVTIoqpUVh2T33FSdXBuekdDQrjn72wIKw7HsvOzkYrJFuHJ285SsLimWvOTkYrDU4OHndorDsJe+YHAy2SDeOJl/40YKw7Ad/e9OfDr6zVfrJ2x752Od2u91ut9v9f/0DIGjD825hJnwAAAAASUVORK5CYII="},search:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAADJklEQVR4Ae3BXWhVdQAA8N89By2n82PWFBfLQfQQ5MWupuWTRaXlQ1hBZvjWLMMK+0IShEgiI0gU+rBArKiQwNvUagoavWgGQiwqH0qFWRKOyu85W8ifg657ds49wl5iv59hw4YNu1IlRTWZqAk9jutxxUrqNc4C95tvtEtO2mGr7f5WWEk9rrHSE0ZJd9oGr+lRSEm+1V40SrZT1nhVAbFsDbZ6zAh5RrrTNJ/rU6eSLM2+NN3lDtjhiG6RKVrNN93lvnOvP9SlJMt+MyROWO8dRww01eOWaZTY71Z1KRncFg9KfGCZk9KN8a5FEh97RB1ig1niJYm1ntRrML0+02CO4GYHdckVS9fgCw2CDVbIs0uzmYLbveW8HLF0L7tbsNti/fJ95Q6tLmrUb7cckTQjPS0451EX1OOCh50VPCWWI5LmHqMEax1Vr25vCsa6S45ImoWCfusUsV5ioRyRWrEHBHsdV8RR3woWKskUqdWqUbBPUXsFE10nU6RWo8Svijok0ShTpNZYiV8UdUiiUaZIrbMS/YrqlTgvU6TWMYlmRU2W+F2mSK1jEs2Kmizo95tMkVq9fhLMVtRtgi79MkXSdAruM0ERE8wTdMoRSdMpGGG5IlaIBTvliKTZo0/wgmb1utbzgnP2yBFJc8r7gtE+EalH7FNXCd5zTo5IupVOCOZ6Qz3WmSv40yq5YunOOm2eYLYGu2R73TMSz/lGrthg9pnpRsEcN9ipV7oxNlkqcdhidYgNrmqBSYJplpvoZ38ZaKrVPlJxyXiTbZerJMsk28xwuQN2OKJbZIpW802XZqN2OUqyXW2zh9TnsOslNmqXKZatzxY/mmWcbIe1W6pNWVDRokOGWL4fvK3PLCOkO+0Vi3yPqjZlQUWLDoOK1aPP1zbo8o9WI11yUtUaS3XqE1S1KQsqWnQYRElRTSZqwnE9etQq2WSJxEbtUsWKOqNHt249zkhX1aYsqGjRIUVsKFS1KQsqWnSoERsaVW3KgooWHf4jNlSq2pQFFQd1GSA2dKpa3CIYb7MBYkNpmzZlF63SZYDY0NrqkJs860PDhg373/kXh1m18JaQSPQAAAAASUVORK5CYII="},bell:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAACX0lEQVR4Ae3BX2hVdQAA4O/87n2oxCw3ckG6IB+kZUE9tL0YI0iSQYiROOwhgmjTAqF66o9URNRDFG3BeggiiShBgxp7irB/BGUEYlhCkVzTxpAgshKMw+GitrPfPT+7cHq436enp6enp6rMxVhrSL9+Z82bd8hRyTJpBtznbje70Nfe9YYTEmSqW+Yxj7hMud+94EV/qChT1QbvGBDXco9PVZKpZtKU833lB8ew2nVucb5Jr6kgU8UzHtd20sv2+Mk517rXw/q1Pe0pHWU6G7dH26Neddpil9jlOW3j3tZBQycj9mvIHTdqrzPKnPGJOXdZJjdmTktUQ1zTASvlThlxSMwx+2x3KZpGTTkrIojbZo3CnY7q5HtjCmuNiwridihM+UIVn5lRmBQVxAy4Ve60Z1W1219yw64WEcRsVXjfL6o67gO5zGYRQcyIwqwUswrDIoKY1QoHpTioMCgiiFmj0JKipTAoIoi5RuFXKVoKgyKCmgQ1CWoS1CSoSVCToCZBTYKaBDUJahLUJKhJsLRp/9W0JQVL2WlCYa9U+xUm7LCEhnIbvSWTO2LMn9J8aIs+uY0O+FGJTJnrfe5yhe+ckG6VdQq/GXbYIpky37hJ98zaZJGgzCrdNKpEUGZGN+1SIlNuwDrd8a0FXbDcg7b6t20esFySphR9PjaEFWacM2EaD7nNgsqCFFcZknvFjdrWe0nuBldK0JBi3v1WoOkOJy3os8nr+uV+9qQEmTRbvKfcZvskaEhz2BWGLfa8KUkaUs1p2uBCuz0hUeZirLTd7Ub87UsfedMpPf9f/wDy4XMuWu1V4gAAAABJRU5ErkJggg=="},check:{width:14,height:14,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAQAAABvygHQAAABdUlEQVR4Ae3BvWpTYQAA0NN8ubVUcNZFaJUOgpti8QcKesHSpa1Cqr6APoHPIYib7jZILelVIVtFXAQfQa2DD5EvKJePyk2atGk66JBzTExM/FdmLegTnMxtnzx1zo6K4CSWvHcGV7T88lfN+JZ8cEryW0XduO4oTEuavqqoG0+uZVrS9kiPKePIFTJJ24qOHlOOL1fIJG0rOvpMOa5cIZMU1nQcUNNvwYzhlr2TSbat6hgg6PXKS4998d0gd7XUJS33RAMFVYueY1bDZ9/0y+3IJIU10RA1VTXJjMJNvXKFTFJYFQ0VVP102SWlugc++mHfsh2ZZNu66BBBr7euuqiUadi1p5RrySSFddGhgl5dTTfMKWU27NqTK2SSwqroCEG/rk3XXFDKNJz2QiZ5477oSMFBUdN1c0rTbqlJtjREIwgGiZoWzatqaugaSTBY1LRo3r5ND3WNKBgm2rTkvNKWDV0jC4aLXjtrzjNPdE1MTPwjfwDF5lTRg1trxQAAAABJRU5ErkJggg=="},wordmark:{width:54,height:19,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKIAAAA5CAQAAAAfWjgQAAAIE0lEQVR4Ae3BC5hWZYEA4HeO89jITFeQBNFgKSREQiwYaoNAN0V5EAxyiREGTc0NL6UmmJuYEhQaFCQSXgbLFtYL5mVdtBDaEk1xXVwuQjgRTGPgKLcZ6Fm3y+l7Tuf/Z/75x5EZYabet8Dfgi8Ybwh+bbH5XtXCCrR3JZ5QKtN1ZmhRR2jvVvuYbMN9xFItKNK+fdMADfXXogq1Z8f7isQ+S1Q5V29UaFGF2rOrJJ402h5Md7Xp7tKiCrRffawTvOwkdVpNpP2aL/FZdVpRpL0aZJhgkTVaVaS9uklihlYWaZ/6OE1wl61aWaR9ukJiulYXaY+Oc6Fgtd9odZH26BKJ2d4GkfanyHmCzZZ5GxSqr4vBRuqhQKzOC+ap1pJ6GGy4Dwr+2/94yGvenCGGi+31gEq5naWbYI6W1smpejrS/1nnWVX+okCmo93gEg1VuE6V2FRnyOX/nSqYq7/69hsh+LArXKS+Hea5SeLLRsm2wFJ80iInSD2iXI33eEAkUy9dBC/YLdN898l0qz6yzfAE7nGsbJNV4mrXK5aaZZo/K5QabZFOcil3lnFWobeh8utvqPpqBRe7TS6d3eh8Z3tRrJehsj2CUX4s20irDPGaKmVy6y/bg7INMEi228UG6SlbMRabKNtU/ZxFocQV5gheM929XkFPk3zR+3C0lU7zUwdjgS8IXjLXA3agh0ku9T70sMonbJDbYD9GjWttwkfNFjvRnUabqUzrm2ciqk23CZcZI3amC9xRIBjvR4LNRtgi9V5LfFqsTn+bMcCPnCB42UA1GurlJbG9Jrtf7GtuECx3hky9PeW9Ylv0t09QrMJYwRwTdPaSESpR4gmlEu+3Q6qDWsG9PivW21L9BF8yV0ODVeglOM8PJXq7V1/BlW7BKqPsQanVEuv0jcS6WCTYZrAtMr1utG1iHSwWe94IewW/VyOXTQ6IjXe/2Ag3CNY4R7aNRgt6ukmi1mUSl+jsdaepFPucUqkBMpVLzBJsNFV+q90ol41ulZiB9c60R+wGqRMVRWLfUiyYokZ9+31FMNgEsUpLBB9WKpcyRdjgUUGFxBh16vuZWwWX6yrxukQRvmq7YIBMnWWaKFjpeYlqTdkht50SRShXJ+gnUxShjzJBtYfkssRuwQWCuyUmyOVyse8JJuks+Hfb5LJQ4mK57LRAYptM26VOMEgwX3NEmvaAZyW2S9WqizBB4t805knBMMHPbRBMVKy+431U7B7BuRL3ym2tHYJ/kkuF1J1SlVZInSuocr+WNkdqrtRCIpwhsUZjnpP4lGCe4F3K1HeJ2J12CYZI/JfGrBUMlssyqWqnqBR71HCZLhXM1tJe8XOpe1yoBlWmuZJC9JHYpjGvSnQX3O3rOoldbKFsnxe7TXCKYonfacxvJT5ks2x1Vsv0vH/Q0DidxGp8X0t7Srbb3e6vCnVVJDHPLrkdK9FRUKvCVWInK/W01DidsNazgp5Sq/xRbr0l3q2+F70ZUwQ/tF/z/FFT1sujUInURzStQGKRqwSf87TURWLflThSaoimlahvm6b1N0QwR3OVaMrL8ij0B6lVmrZBYpPlThebbJpawQlOw05L5fKYDvJ7w071VWlaueBBWzVXB02pkUehGqlrPKM5ljhdrMRYiwWTxRbbJ1Endaa34g1N6aBMcLPmO1ZTdssj8rrdEt01T4VqwSSJiWILpTZIddU6husotswvNF8/Tfm9PCI8KzFQPjOttFI/me4SDDNAbIwueNSvpDbYJTFIPg9b6XFvxYWCad6KUgclwt0S4+VTZqihsi2QuEJskliFbMskxmtcNyMNdbLmO94osZ96SfP11cNBifCwA4IuyjRmmG7Yaa1M2z0o+Aw+5Gy86j7ZbpMY53iNmST2guabIpghv0guUx2kCLt8Q2K2TnKbL1ahvtmCDv7Zv4h9V32/9JjELLl1dZ3Y7ZpvvNhaT8pll8QADZ1sgoMUid3ofwXHWKJIQxX6oNbN6ntKpWCK88SWaOhSuwTjzdJQRw8pwjpLJd4hcZR8RugmNl1uv1YrOMcxshWpwB6JSKYjJUrkEQnOUSU41SrdZRroZyaJXWyHhm4VfEJHLLNZQ1ucaY/gGsu9X6ZhnnOKWLnUaInROmrc5WIvW6YxqwRHuUOxVHc/0Q9XS4yWaazEFHkUSBznPgMlVnheLd7pHw0UXGaeXEpUK5E43eNyO8lDugsOeMx6b+AYY3UU2+1cy/Flo/AOpVI7rRfc4QcyHWu72GQVGjPI0xJbXW+r2BDTFGGm76uU2KRa0FFfqUq/EVxkkyyFEtsMMsVsRWLDDZfpt86zQm773Kdc8CuPa8yLTvYdE8WKjDFGpo0+Y71YL0PVd7Shgp/IdqHYHks17hnX+KbgAypkmula3aV66SWXHnoIOqinUKb5/sO1Sp0o0zrL3Gy3xn1PuWChfHaZZK6vGqyrTMvd5kFvzefFZtovn2/ZZ4b3yHbAdW5x0Ark0t8xPuYIPGeDLZr2SUeIrbHXm/FxXfXFG56x1SaZPqibxm2xTep0/4n9unlNU44yxlinehe2esoKj3hF8Clv3hp7ZSnQtj1sJL7tSodQpC072kixmx1SkbbsfLH5qh1SkbbsfBwwyyEWabsG6oWZqhxikbbrcuyxwCEXaauKnY2v2emQi7RVZym20XccBiJt1QX4osNCpG06zqfdYYXDQqRtKvOqf3WYiLRN5a5W7TARaYvOsE+Fw0akLbreVIeRSNtzkp2e8HcHZZwPOKz8CdAtAnYO9l4QAAAAAElFTkSuQmCC"}};function IntroIcon({name:e,style:t,testID:n}){let r=Ri[e];/* @__PURE__ */
|
|
26
|
+
return N(R,{source:{uri:r.uri,width:r.width*3,height:r.height*3},style:[{width:r.width,height:r.height},t],resizeMode:"contain",accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",...n===void 0?{}:{testID:n}})}var Fi={transform:[{scale:Ci.pressScale}]};function IntroButton({kit:e,label:t,onPress:n,rules:r=[],disabled:o=false,busy:i=false,icon:a,style:l,testID:s}){let d=[".emb-btn",".in-body .emb-btn",...r,o&&".emb-btn[disabled]"];/* @__PURE__ */
|
|
27
|
+
return $(_,{accessibilityRole:"button",accessibilityState:{disabled:o,busy:i},disabled:o||i,onPress:n,style:({pressed:t})=>[e.view(...d),l,t&&!e.reduced?Fi:null],...s===void 0?{}:{testID:s},children:[a===void 0?null:/* @__PURE__ */N(IntroIcon,{name:a,style:e.icon(...d,".emb-btn svg",".in-stack .emb-btn svg")}),
|
|
28
|
+
/* @__PURE__ */N(Text,{tier:"control",style:e.text(...d),children:t})]})}function IntroLink({kit:e,label:t,onPress:n,rules:r=[],testID:o}){/* @__PURE__ */
|
|
29
|
+
return N(_,{accessibilityRole:"link",onPress:n,style:({pressed:t})=>[e.view(".in-link",...r),{justifyContent:"center"},t&&!e.reduced?Fi:null],...o===void 0?{}:{testID:o},children:/* @__PURE__ */N(Text,{tier:"control",style:e.text(".in-link",...r),children:t})})}var Ai=s(function({kit:e,words:t,testID:n},r){/* @__PURE__ */
|
|
30
|
+
return N(w,{ref:r,accessible:true,accessibilityRole:"header",accessibilityLabel:t,style:e.view(".in-h"),...n===void 0?{}:{testID:n},children:/* @__PURE__ */N(Text,{tier:"heading",style:e.text(".serif",".in-h"),children:t})})});function IntroLine({kit:e,words:t,rules:n,testID:r}){return t===""?null:/* @__PURE__ */N(Text,{style:[e.view(...n),e.text(...n)],...r===void 0?{}:{testID:r},children:t})}var Ti=/^[^@\s]+@[^@\s]+\.[^@\s]+$/,Ii={transform:[{scale:Ci.pressScale}]};function Ei(e){return[e.address?.trim()??"",fi(e.distanceKm)].filter(e=>e!=="").join(" · ")}function Field({kit:e,icon:t,value:n,placeholder:r,label:o,onChange:i,onSubmit:a,kind:l,maxLength:s,testID:d}){/* @__PURE__ */
|
|
31
|
+
return $(w,{style:e.view(".in-search"),children:[t?/* @__PURE__ */N(IntroIcon,{name:"search",style:e.icon(".in-search svg")}):null,
|
|
32
|
+
/* @__PURE__ */N(xr,{value:n,placeholder:r,placeholderTextColor:e.colors.ink3,accessibilityLabel:o,autoComplete:"off",autoCorrect:false,autoCapitalize:l==="email"?"none":"words",inputMode:l==="email"?"email":l==="search"?"search":"text",returnKeyType:l==="search"?"search":"next",...s===void 0?{}:{maxLength:s},style:[e.view(".in-search input"),e.text(".in-search input"),{paddingVertical:0}],onChangeText:i,...a===void 0?{}:{onSubmitEditing:a},testID:d})]})}var Di=s(function({kit:e,text:t,onPick:n,onUpload:r},o){let i=useEverfurRecordsClinic(),a=mi(i),l=c(Le()),[s,d]=u(null),[p,f]=u(false),[h,g]=u(""),[b,m]=u(""),y=a.isSearchActive?a.clinics:a.recent,v=y.find(e=>e.id===s)??y[0]??null,k=a.isSearchActive&&!a.initialLoading&&a.error===null&&y.length===0,S=h.trim()===""?a.query.trim():h.trim(),x=S!==""&&Ti.test(b.trim()),C=()=>{if(p){x&&n(yi(null,S,b.trim().toLowerCase(),l.current()));return}v!==null&&n(yi(v,null,"",l.current()))},R=p?x:v!==null,F=a.initialLoading||!a.isSearchActive&&a.recentLoading;/* @__PURE__ */
|
|
33
|
+
return $(L,{children:[
|
|
34
|
+
/* @__PURE__ */N(Ai,{ref:o,kit:e,words:t.title,testID:"everfur-intro-title"}),
|
|
35
|
+
/* @__PURE__ */N(Field,{kit:e,icon:true,kind:"search",value:a.query,placeholder:t.search,label:t.searchLabel,onChange:e=>{a.setQuery(e),f(false)},onSubmit:C,testID:"everfur-intro-clinic-search"}),p?/* @__PURE__ */$(w,{style:e.view(".in-clinics"),children:[
|
|
36
|
+
/* @__PURE__ */N(Field,{kit:e,icon:false,kind:"text",value:h===""?a.query:h,placeholder:ci.fallback.namePlaceholder,label:ci.fallback.nameLabel,maxLength:200,onChange:g,testID:"everfur-intro-clinic-name"}),
|
|
37
|
+
/* @__PURE__ */N(Field,{kit:e,icon:false,kind:"email",value:b,placeholder:ci.fallback.emailPlaceholder,label:ci.fallback.emailLabel,maxLength:320,onChange:m,onSubmit:C,testID:"everfur-intro-clinic-email"}),
|
|
38
|
+
/* @__PURE__ */N(IntroLine,{kit:e,words:ci.fallback.reviewNote,rules:[".in-p",".in-p--s"]})]}):/* @__PURE__ */$(w,{accessibilityRole:"radiogroup",accessibilityLabel:t.list,accessibilityState:{busy:F},style:e.view(".in-clinics"),testID:"everfur-intro-clinics",children:[y.map(t=>{let n=v?.id===t.id,r=Ei(t),o=n&&'.in-clinic[aria-checked="true"]';/* @__PURE__ */
|
|
39
|
+
return $(_,{accessibilityRole:"radio",accessibilityState:{checked:n},accessibilityLabel:r===""?t.name:`${t.name}, ${r}`,onPress:()=>d(t.id),style:({pressed:t})=>[e.view(".in-clinic",o),t&&!e.reduced?Ii:null],testID:`everfur-intro-clinic-${t.id}`,children:[
|
|
40
|
+
/* @__PURE__ */$(w,{style:e.col(".in-clinic",0),children:[
|
|
41
|
+
/* @__PURE__ */N(Text,{style:e.strong(".in-clinic",".in-clinic b"),children:t.name}),r===""?null:/* @__PURE__ */N(Text,{style:[e.view(".in-clinic small"),e.text(".in-clinic",".in-clinic small")],children:r})]}),
|
|
42
|
+
/* @__PURE__ */N(w,{style:[e.view(".in-tick",n&&'.in-clinic[aria-checked="true"] .in-tick'),e.col(".in-clinic",1)],children:/* @__PURE__ */N(IntroIcon,{name:"check",style:e.icon(".in-tick svg",n&&'.in-clinic[aria-checked="true"] .in-tick svg')})})]},t.id)}),a.error!==null&&a.isSearchActive?/* @__PURE__ */$(w,{accessibilityRole:"alert",style:e.view(".in-none"),testID:"everfur-intro-clinic-error",children:[
|
|
43
|
+
/* @__PURE__ */N(Text,{style:e.text(".in-none"),children:a.error.displayMessage}),a.error.retryable?/* @__PURE__ */N(IntroLink,{kit:e,label:bi.retry,onPress:a.retry,rules:[".in-none .in-link"],testID:"everfur-intro-clinic-retry"}):null]}):null,k?/* @__PURE__ */$(w,{style:e.view(".in-none"),testID:"everfur-intro-clinic-none",children:[
|
|
44
|
+
/* @__PURE__ */N(Text,{style:e.text(".in-none"),children:`${ci.fallback.title} ${ci.fallback.subtitle}`}),
|
|
45
|
+
/* @__PURE__ */N(IntroLink,{kit:e,label:t.add,onPress:()=>f(true),rules:[".in-none .in-link"],testID:"everfur-intro-clinic-add"})]}):null]}),
|
|
46
|
+
/* @__PURE__ */N(IntroLine,{kit:e,words:t.more,rules:[".in-p",".in-p--s"]}),
|
|
47
|
+
/* @__PURE__ */N(IntroButton,{kit:e,label:t.request,onPress:C,rules:[".emb-btn--block"],disabled:!R,testID:"everfur-intro-clinic-request"}),r===void 0?null:/* @__PURE__ */N(IntroLink,{kit:e,label:t.upload,onPress:r,testID:"everfur-intro-clinic-upload"})]})});function IntroConsentFrame({petRef:petRef,petName:e,draft:t,ownerName:n,onCaptureSignature:r,onCreated:o}){/* @__PURE__ */
|
|
48
|
+
return N(i,{petRef:petRef,...e===void 0?{}:{petName:e},clinic:t,...n===void 0?{}:{ownerName:n},...r===void 0?{}:{onCaptureSignature:r},onCreated:o,style:{flex:1}})}function Oi(e){return Ro(e,vi,ki)}var Pi=60,zi=24,Bi=240,Ni=S.bezier(.25,.1,.25,1),$i=S.bezier(.42,0,.58,1),Li=S.bezier(...wi),ji=S.bezier(..._i),Ui=8,Wi=x.OS==="ios",Vi=x.OS!=="web";function Mi(e){return e===null?Ni:S.bezier(...e)}function qi(e){if(e===null)return;let t=O.sendAccessibilityEvent;typeof t=="function"&&t.call(O,e,"focus")}function EverfurIntro(e){let{petRef:petRef,onClose:t,onClosed:n,onFrame:r}=e,o=e.mode??"intro",i=useEverfurTheme(),a=p(()=>Oi(i),[i]),l=Pr("pinned"),s=a.reduced,{runtime:d}=gt(),g=p(()=>({...mt,...e.copy}),[e.copy]),b=p(()=>introFacts(e.page??null,e.petName),[e.page,e.petName]),m=p(()=>e.blanks??defaultIntroBlanks(b.pet),[e.blanks,b.pet]),y=p(()=>introText({facts:b,copy:g,blanks:m.length,resultsPending:e.resultsPending===true}),[b,g,m.length,e.resultsPending]),[v,k]=u(o==="records"?"clinic":"tabs"),[S,x]=u(false),[C,R]=u(false),[D,O]=u(null),P=c(/* @__PURE__ */new Map),[z,B]=u(""),[j,U]=u(false),[W,V]=u(0),[M,q]=u(0),H=c(false),K=c(0),Y=c(0),G=c(null),J=c(null),Q=c([]),Z=h((e,t)=>{Q.current.push(setTimeout(e,t))},[]);f(()=>()=>Q.current.forEach(clearTimeout),[]);let X=c(new F.Value(0)).current,ee=c(new F.Value(0)).current,te=c(new F.Value(0)).current,ne=c(new F.Value(0)).current,re=c(new F.Value(1)).current,oe=c([0,1,2].map(()=>new F.Value(s?1:0))).current,ie=v!=="tabs",ae=c(new F.Value(ie?1:0)).current,le=c(false);f(()=>{r?.(C?null:v)},[v,C,r]),f(()=>()=>r?.(null),[r]);let se=c(v);se.current=v;let de=h(()=>{Z(()=>qi(se.current==="consent"?J.current:G.current),Pi)},[Z]),ce=e=>{let t=Math.round(e.nativeEvent.layout.height);if(t!==M&&q(t),le.current||H.current)return;le.current=true;let n=a.motion(".in-sheet",".ph-intro.is-on .in-sheet"),r=a.motion(".in-dim",".ph-intro.is-on .in-dim--top"),o=[F.timing(X,{toValue:1,duration:n.dur,easing:s?Ni:ji,useNativeDriver:Vi}),F.timing(ee,{toValue:1,duration:r.dur,easing:Mi(r.ease),useNativeDriver:Vi})];if(!s&&v==="tabs"){let e=Ci.rows;oe.forEach((t,n)=>o.push(F.timing(t,{toValue:1,duration:e.dur,delay:e.delay+n*e.stagger,easing:Li,useNativeDriver:Vi})))}F.parallel(o).start(),de()};f(()=>{if(H.current)return;let e=ie?a.motion(".in-dim",".ph-intro.is-on.is-all .in-dim--mid"):a.motion(".in-dim");F.timing(te,{toValue:ie?1:0,duration:e.dur,easing:Mi(e.ease),useNativeDriver:Vi}).start();let t=a.motion(".in-bars b::after");F.timing(ae,{toValue:ie?1:0,duration:t.dur,easing:Mi(t.ease),useNativeDriver:false}).start()},[ie,a,te,ae]);let ue=p(()=>m.map(()=>new F.Value(0)),[m]);f(()=>{if(v!=="ask"||s)return;let e=Ci.blanks;ue.forEach(e=>e.setValue(0));let t=F.parallel(ue.map((t,n)=>F.timing(t,{toValue:1,duration:e.dur,delay:e.delay+n*e.stagger,easing:$i,useNativeDriver:false})));return t.start(),()=>t.stop()},[v,s,ue]);let pe=h((e,t=false)=>{x(t),k(e),K.current=0,re.setValue(0),F.timing(re,{toValue:1,duration:s?150:Bi,easing:s?Ni:Li,useNativeDriver:Vi}).start(),de()},[re,s,de]),fe=h((e,r=null,o=null)=>{if(H.current)return;H.current=true,R(true),t({exit:e,toast:r,notifications:o});let i=a.motion(".in-sheet"),l=a.motion(".in-dim");F.parallel([F.timing(X,{toValue:0,duration:i.dur,easing:s?Ni:Li,useNativeDriver:Vi}),F.timing(ee,{toValue:0,duration:l.dur,easing:Mi(l.ease),useNativeDriver:Vi}),F.timing(te,{toValue:0,duration:l.dur,easing:Mi(l.ease),useNativeDriver:Vi})]).start(),Z(()=>n?.(),s?160:260)},[t,n,Z,s,a,X,ee,te]),he=h(()=>fe(o==="records"?"stay":"ask"),[fe,o]),ge=h(e=>fe("plan",e?y.toast.on:y.toast.off,e),[fe,y]),be=e.onUpload,me=p(()=>be===void 0?void 0:()=>{fe("stay"),be()},[be,fe]),ye=c(false),ve=h(async()=>{if(ye.current)return;ye.current=true,U(true);let t=false;try{e.onEnableNotifications!==void 0?t=await e.onEnableNotifications()===!0:t=(await createNotificationsClient(d).setPreferences({pushEnabled:!0,emailEnabled:!0})).ok}catch{t=false}ye.current=false,U(false),ge(t)},[e,d,ge]),ke=()=>{H.current||(v==="sent"?ge(false):he())},we=c(he);we.current=he;let _e=c(true);_e.current=v!=="sent"&&v!=="consent"&&!C;let Se=p(()=>A.create({onMoveShouldSetPanResponderCapture:(e,t)=>_e.current&&K.current<=0&&t.dy>Ui&&Math.abs(t.dy)>Math.abs(t.dx),onPanResponderGrant:()=>{Y.current===0&&(Y.current=Date.now())},onPanResponderMove:(e,t)=>ne.setValue(t.dy>0?t.dy:t.dy/4),onPanResponderRelease:(e,t)=>{let n=Date.now()-(Y.current||Date.now());Y.current=0,isIntroSwipeOut(t.dy,n)?we.current():F.timing(ne,{toValue:0,duration:a.motion(".in-sheet",".ph-intro.is-on .in-sheet").dur,easing:ji,useNativeDriver:Vi}).start()},onPanResponderTerminate:()=>{Y.current=0,F.timing(ne,{toValue:0,duration:Bi,easing:Li,useNativeDriver:Vi}).start()}}),[ne,a]),xe=h(t=>{let n=D===null?"":D.clinic?.name??D.freeText??"",r={petRef:petRef,clinicName:n,requestId:t.id,at:/* @__PURE__ */(new Date).toISOString()};B(n),e.onRequested?.(r),pe("sent")},[D,petRef,e,pe]),Ce=e.tabBar?.top??xi.tabTop,Re=e.tabBar?.height??xi.tabHeight,Fe=W===0?void 0:ie?W-xi.sheetTopAll:W-Ce-Re-xi.sheetGap,Ae=v==="clinic"&&o!=="records"||v==="novet"||v==="consent",Te=v!=="sent",Ie=M>0?M:W>0?W:1e3,Ee=s?{opacity:X,transform:[{translateY:ne}]}:{transform:[{translateY:F.add(X.interpolate({inputRange:[0,1],outputRange:[Ie,0]}),ne)}]},De=s?{opacity:re}:{opacity:re,transform:[{translateX:re.interpolate({inputRange:[0,1],outputRange:[S?-zi:zi,0]})}]},Oe=e=>{let t=i.meta.hidePoweredBy?null:/* @__PURE__ */$(w,{style:a.view(".in-by"),children:[
|
|
49
|
+
/* @__PURE__ */N(Text,{tier:"compact",style:a.text(".in-eyebrow",".in-by"),children:y.poweredBy}),
|
|
50
|
+
/* @__PURE__ */N(IntroIcon,{name:"wordmark",style:a.icon(".in-by svg")})]});return e===""&&t===null?null:/* @__PURE__ */$(w,{style:a.view(".in-eyebrow"),children:[e===""?null:/* @__PURE__ */N(Text,{tier:"compact",style:a.text(".in-eyebrow"),children:e}),t]})},Pe=e=>e===""?null:/* @__PURE__ */N(Ai,{ref:G,kit:a,words:e,testID:"everfur-intro-title"}),ze=(e,t)=>e===""?null:t?/* @__PURE__ */N(w,{ref:G,accessible:true,accessibilityLabel:e,children:/* @__PURE__ */N(IntroLine,{kit:a,words:e,rules:[".in-p"]})}):/* @__PURE__ */N(IntroLine,{kit:a,words:e,rules:[".in-p"]}),Be=null;if(v==="tabs"){let t=[["ask","chat",".in-ic--y",e.tabLabels?.ask??"Ask",y.tabs.ask],["plan","heartcheck",".in-ic--c",e.tabLabels?.plan??"Health Plan",y.tabs.plan],["records","file",".in-ic--g",e.tabLabels?.records??"Records",y.tabs.records]];Be=/* @__PURE__ */$(L,{children:[Oe(y.tabs.eyebrow),Pe(y.tabs.title),
|
|
51
|
+
/* @__PURE__ */N(IntroLine,{kit:a,words:y.tabs.lede,rules:[".in-p"]}),
|
|
52
|
+
/* @__PURE__ */N(w,{accessibilityRole:"list",style:a.view(".in-rows"),children:t.map(([e,t,n,r,o],i)=>{let l=oe[i],d=s?null:{opacity:l.interpolate({inputRange:[0,1],outputRange:[Si.opacity,1]}),transform:[{translateY:l.interpolate({inputRange:[0,1],outputRange:[Si.translateY,0]})}]};/* @__PURE__ */
|
|
53
|
+
return $(F.View,{style:[a.view(".in-rows li"),d],testID:`everfur-intro-row-${e}`,children:[
|
|
54
|
+
/* @__PURE__ */N(w,{style:[a.view(".in-ic",n),a.col(".in-rows li",0)],children:/* @__PURE__ */N(IntroIcon,{name:t,style:a.icon(".in-ic svg")})}),
|
|
55
|
+
/* @__PURE__ */$(w,{style:a.col(".in-rows li",1),children:[
|
|
56
|
+
/* @__PURE__ */N(Text,{style:a.text(".in-rows b"),children:r}),o===""?null:/* @__PURE__ */N(Text,{style:[a.view(".in-rows li > span:last-child > span"),a.text(".in-rows li > span:last-child > span")],children:o})]})]},e)})}),e.recordsConnected===true?/* @__PURE__ */N(IntroButton,{kit:a,label:y.tabs.seePlan,onPress:()=>fe("plan"),rules:[".emb-btn--block"],testID:"everfur-intro-see-plan"}):/* @__PURE__ */N(IntroButton,{kit:a,label:y.tabs.next,onPress:()=>pe("ask"),rules:[".emb-btn--block"],testID:"everfur-intro-next"})]})}else if(v==="ask")Be=/* @__PURE__ */$(L,{children:[Oe(y.tabs.eyebrow),Pe(y.ask.title),ze(y.ask.lede,y.ask.title===""),
|
|
57
|
+
/* @__PURE__ */N(Blanks,{kit:a,title:b.planTitle,pill:y.ask.blanksPill,label:y.ask.blankLabel,blanks:m,pulses:s?null:ue}),
|
|
58
|
+
/* @__PURE__ */$(w,{style:a.view(".in-pair"),children:[
|
|
59
|
+
/* @__PURE__ */N(IntroButton,{kit:a,label:y.ask.later,onPress:he,rules:[".emb-btn--ghost"],style:a.col(".in-pair",0),testID:"everfur-intro-later"}),
|
|
60
|
+
/* @__PURE__ */N(IntroButton,{kit:a,label:y.ask.connect,onPress:()=>pe("clinic"),style:a.col(".in-pair",1),testID:"everfur-intro-connect"})]}),
|
|
61
|
+
/* @__PURE__ */N(IntroLine,{kit:a,words:y.ask.fine,rules:[".in-fine"]}),
|
|
62
|
+
/* @__PURE__ */N(IntroLink,{kit:a,label:y.ask.noVet,onPress:()=>pe("novet"),testID:"everfur-intro-novet"})]});else if(v==="clinic")Be=/* @__PURE__ */N(Di,{ref:G,kit:a,text:y.clinic,onPick:e=>{O(si(P.current,e)),pe("consent")},...me===void 0?{}:{onUpload:me}});else if(v==="consent")Be=D===null?null:/* @__PURE__ */N(IntroConsentFrame,{petRef:petRef,...b.pet.name==="your pet"?{}:{petName:b.pet.name},draft:D,...e.ownerName===void 0?{}:{ownerName:e.ownerName},...e.onCaptureSignature===void 0?{}:{onCaptureSignature:e.onCaptureSignature},onCreated:xe});else if(v==="sent"){let e=[[y.sent.sentStep,z===""?"":y.sent.sentTo(z),"done"],[y.sent.clinicStep,y.sent.clinicEta,"now"],[y.sent.blanksStep,y.sent.blanksDetail,""]];Be=/* @__PURE__ */$(L,{children:[Oe(y.sent.eyebrow),Pe(y.sent.title),
|
|
63
|
+
/* @__PURE__ */N(w,{style:a.view(".in-sent"),children:/* @__PURE__ */N(Track,{kit:a,label:y.sent.track,steps:e.filter(([e])=>e!=="")})}),
|
|
64
|
+
/* @__PURE__ */N(IntroLine,{kit:a,words:y.sent.lede,rules:[".in-p"]}),
|
|
65
|
+
/* @__PURE__ */$(w,{style:a.view(".in-stack"),children:[
|
|
66
|
+
/* @__PURE__ */N(IntroButton,{kit:a,label:y.sent.notify,icon:"bell",busy:j,onPress:()=>{ve()},rules:[".emb-btn--block"],testID:"everfur-intro-notify"}),
|
|
67
|
+
/* @__PURE__ */N(IntroButton,{kit:a,label:y.sent.notNow,onPress:()=>ge(false),rules:[".emb-btn--block",".emb-btn--ghost"],testID:"everfur-intro-not-now"})]}),
|
|
68
|
+
/* @__PURE__ */N(IntroLine,{kit:a,words:y.sent.fine,rules:[".in-fine"]})]})}else Be=/* @__PURE__ */$(L,{children:[Oe(y.tabs.eyebrow),Pe(y.noVet.title),ze(y.noVet.lede,y.noVet.title===""),
|
|
69
|
+
/* @__PURE__ */N(IntroButton,{kit:a,label:y.noVet.seePlan,onPress:()=>fe("plan"),rules:[".emb-btn--block"],testID:"everfur-intro-novet-plan"})]});let Ne=v==="consent",$e=[zr(a.view(".in-sheet",".ph-intro.is-on .in-sheet"),l),Fe===void 0?null:Ne?{height:Fe}:{maxHeight:Fe},Ee],Le={accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"};/* @__PURE__ */
|
|
70
|
+
return N(T,{transparent:true,visible:true,animationType:"none",statusBarTranslucent:true,onRequestClose:ke,children:/* @__PURE__ */$(w,{style:{flex:1},onLayout:e=>V(Math.round(e.nativeEvent.layout.height)),testID:e.testID??"everfur-intro",children:[
|
|
71
|
+
/* @__PURE__ */N(F.View,{...Le,pointerEvents:"none",style:[a.view(".in-dim",".in-dim--top"),{height:Ce,opacity:ee}]}),
|
|
72
|
+
/* @__PURE__ */N(F.View,{...Le,pointerEvents:"none",style:[a.view(".in-dim"),{top:Ce,height:Re,opacity:te}]}),
|
|
73
|
+
/* @__PURE__ */N(F.View,{...Le,pointerEvents:"none",style:[a.view(".in-dim",".in-dim--bot"),{top:Ce+Re,opacity:ee}]}),
|
|
74
|
+
/* @__PURE__ */N(I,{behavior:Wi?"padding":void 0,enabled:!Ne,pointerEvents:"box-none",style:{position:"absolute",top:0,right:0,bottom:0,left:0},children:/* @__PURE__ */$(F.View,{accessibilityViewIsModal:true,accessibilityLabel:o==="intro"?y.sheetLabel.intro:y.sheetLabel.records,style:$e,onLayout:ce,onTouchStart:()=>{Y.current=Date.now()},...Se.panHandlers,testID:"everfur-intro-sheet",children:[
|
|
75
|
+
/* @__PURE__ */N(w,{...Le,style:a.view(".in-grab")}),
|
|
76
|
+
/* @__PURE__ */$(w,{style:a.view(".in-top",o==="records"&&'.in-sheet[data-mode="records"] .in-top'),children:[Ae?/* @__PURE__ */N(_,{ref:J,accessibilityRole:"button",accessibilityLabel:y.back,style:a.view(".in-back"),onPress:()=>pe(v==="consent"?"clinic":"ask",true),testID:"everfur-intro-back",children:/* @__PURE__ */N(IntroIcon,{name:"back",style:a.icon(".in-back svg")})}):null,o==="intro"?/* @__PURE__ */N(Bars,{kit:a,fill:ae}):null,Te&&o==="intro"?/* @__PURE__ */N(_,{accessibilityRole:"button",style:[a.view(".in-skip"),{justifyContent:"center"}],onPress:he,testID:"everfur-intro-skip",children:/* @__PURE__ */N(Text,{tier:"control",style:a.text(".in-skip"),children:y.skip})}):null,Te&&o==="records"?/* @__PURE__ */N(_,{accessibilityRole:"button",accessibilityLabel:y.close,style:a.view(".in-x"),onPress:he,testID:"everfur-intro-close",children:/* @__PURE__ */N(IntroIcon,{name:"x",style:a.icon(".in-x svg")})}):null]}),Ne?/* @__PURE__ */N(w,{style:{flex:1},children:Be}):/* @__PURE__ */N(E,{style:{flexGrow:0,flexShrink:1},bounces:false,keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:false,scrollEventThrottle:16,onScroll:e=>{K.current=e.nativeEvent.contentOffset.y},children:/* @__PURE__ */N(F.View,{style:[a.view(".in-body"),De],testID:`everfur-intro-frame-${v}`,children:Be})},v)]})})]})})}function Bars({kit:e,fill:t}){let n=t.interpolate({inputRange:[0,1],outputRange:["0%","100%"]}),r=[e.view(".in-bars b::after"),{right:void 0}];/* @__PURE__ */
|
|
77
|
+
return $(w,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:e.view(".in-bars"),children:[
|
|
78
|
+
/* @__PURE__ */N(w,{style:e.view(".in-bars b"),children:/* @__PURE__ */N(w,{style:[...r,{width:"100%"}]})}),
|
|
79
|
+
/* @__PURE__ */N(w,{style:e.view(".in-bars b"),children:/* @__PURE__ */N(F.View,{style:[...r,{width:n}],testID:"everfur-intro-bar-2"})})]})}function Blanks({kit:e,title:t,pill:n,label:r,blanks:o,pulses:i}){let a=e.colors.accent4??"",l=e.colors.accent2??a;/* @__PURE__ */
|
|
80
|
+
return $(w,{style:e.view(".blanks"),children:[
|
|
81
|
+
/* @__PURE__ */$(w,{style:e.view(".blanks__h"),children:[
|
|
82
|
+
/* @__PURE__ */N(Text,{tier:"compact",style:[e.text(".blanks__h"),{flexShrink:1}],children:t}),n===""?null:/* @__PURE__ */N(w,{style:e.view(".blanks__h em"),children:/* @__PURE__ */N(Text,{tier:"compact",numberOfLines:1,style:e.text(".blanks__h",".blanks__h em"),children:n})})]}),
|
|
83
|
+
/* @__PURE__ */N(w,{accessibilityRole:"list",style:e.view(".blanks ol"),children:o.map((t,n)=>{let o=i?.[n],s=o===void 0?null:{backgroundColor:o.interpolate({inputRange:[0,.5,1],outputRange:[a,l,a]})};/* @__PURE__ */
|
|
84
|
+
return $(w,{style:e.view(".blanks li"),testID:`everfur-intro-blank-${n}`,children:[
|
|
85
|
+
/* @__PURE__ */N(w,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:[e.view(".blanks li > b"),e.col(".blanks li",0)],children:/* @__PURE__ */N(Text,{style:e.text(".blanks li > b"),children:n+1})}),
|
|
86
|
+
/* @__PURE__ */$(w,{style:e.col(".blanks li",1),children:[
|
|
87
|
+
/* @__PURE__ */$(Text,{accessibilityLabel:`${t.before}${r}${t.after}`,style:e.text(".blanks li > span"),children:[t.before,
|
|
88
|
+
/* @__PURE__ */N(F.View,{style:[e.view(".blank",t.width==="s"&&".blank--s",t.width==="l"&&".blank--l"),{top:Ci.blankDrop,marginTop:-3},s]}),t.after]}),t.source===""?null:/* @__PURE__ */N(Text,{style:e.text(".blanks li > small"),children:t.source})]})]},n)})})]})}function Track({kit:e,label:t,steps:n}){/* @__PURE__ */
|
|
89
|
+
return N(w,{accessibilityRole:"list",accessibilityLabel:t,style:e.view(".sh-track"),children:n.map(([t,r,o],i)=>{let a=i===n.length-1,l=n[i+1]?.[2]==="done";/* @__PURE__ */
|
|
90
|
+
return $(w,{style:e.view(".sh-track li",".in-sent .sh-track li",a&&".sh-track li:last-child",a&&".in-sent .sh-track li:last-child"),children:[a?null:/* @__PURE__ */N(w,{style:e.view(".sh-track li::before",o==="done"&&l&&".sh-track li.is-done:has(+ li.is-done)::before")}),
|
|
91
|
+
/* @__PURE__ */N(w,{style:[e.view(".sh-track__dot",o==="done"&&".sh-track .is-done .sh-track__dot",o==="now"&&".sh-track .is-now .sh-track__dot"),e.col(".sh-track li",0)],children:o==="done"?/* @__PURE__ */N(IntroIcon,{name:"check",style:e.icon(".sh-track__dot svg")}):null}),
|
|
92
|
+
/* @__PURE__ */$(w,{style:e.col(".sh-track li",1),children:[
|
|
93
|
+
/* @__PURE__ */N(Text,{style:e.text(".sh-track strong",o===""&&".sh-track li:not(.is-done):not(.is-now) strong"),children:t}),r===""?null:/* @__PURE__ */N(Text,{style:[e.view(".sh-track small"),e.text(".sh-track small")],children:r})]})]},t)})})}function PlanProbe({petRef:petRef,pagePhase:e,page:t,refreshPage:n,watching:r,onPlan:o,onPlanFailed:i}){let{status:a,plan:l,refresh:s}=useEverfurHealthPlan({petRef:petRef}),d=c(null),u=c({plan:s,page:n,watching:r});u.current={plan:s,page:n,watching:r},f(()=>{let n=pn(a,e);(a==="failed"||n)&&(d.current=Date.now()),n?o(petRef,{empty:fn(a,t),signature:un(l,t)}):a==="failed"&&i(petRef)},[a,l,e,t,petRef,o,i]);let p=c(()=>{});return p.current=e=>{let t=u.current;ln({pageVisible:e,watching:t.watching,lastReadAt:d.current,now:Date.now()})&&(d.current=null,t.plan(),t.page())},f(()=>{let e=P.addEventListener("change",e=>{e==="active"&&p.current(true)});return()=>e.remove()},[]),f(()=>{r&&p.current(P.currentState!=="background")},[r]),null}function RecordsProbe({petRef:petRef,onRecords:e}){let{status:t}=useEverfurRecords({petRef:petRef});return f(()=>{e(petRef,t==="empty"?"none":t==="populated"?"some":null)},[t,petRef,e]),null}var Hi=6e3,Ki=50,Yi=x.OS!=="web";function EverfurRecordsLandedBanner({text:e,icon:t,onLand:n,testID:r}){let o=useEverfurTheme(),i=p(()=>Oi(o),[o]),[a,l]=u(0),s=c(new F.Value(0)).current,d=c(false),h=c(false),g=c(n);g.current=n,f(()=>{let e=setTimeout(()=>{h.current||(h.current=true,g.current())},Hi);return()=>clearTimeout(e)},[]);let b=e=>{let t=Math.round(e.nativeEvent.layout.height);if(t!==a&&l(t),d.current)return;d.current=true;let n=i.motion(".ph-banner",".ph-banner.is-on");F.timing(s,{toValue:1,duration:n.dur,easing:i.reduced?S.bezier(.25,.1,.25,1):S.bezier(..._i),useNativeDriver:Yi}).start()},m=-((a>0?a:200)-Ci.bannerY),y=i.reduced?{opacity:s}:{transform:[{translateY:s.interpolate({inputRange:[0,1],outputRange:[m,0]})}]},{position:v,left:k,right:x,zIndex:C,top:R,...A}=i.view(".ph-banner",".ph-banner.is-on"),T=typeof R=="number"?Math.max(0,R-Ki):0;/* @__PURE__ */
|
|
94
|
+
return N(F.View,{pointerEvents:"box-none",style:[{position:v,left:k,right:x,zIndex:C,top:T},y],onLayout:b,children:/* @__PURE__ */$(_,{accessibilityRole:"button",accessibilityLiveRegion:"polite",onPress:()=>{h.current||(h.current=true,n())},style:A,testID:r??"everfur-records-banner",children:[
|
|
95
|
+
/* @__PURE__ */N(w,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:[i.view(".ph-banner__app"),i.col(".ph-banner",0)],children:t}),
|
|
96
|
+
/* @__PURE__ */$(w,{style:i.col(".ph-banner",1),children:[
|
|
97
|
+
/* @__PURE__ */$(w,{style:i.view(".ph-banner__meta"),children:[e.app===""?/* @__PURE__ */N(w,{}):/* @__PURE__ */N(Text,{tier:"compact",style:i.text(".ph-banner__meta",".ph-banner__meta strong"),children:e.app}),
|
|
98
|
+
/* @__PURE__ */N(Text,{tier:"compact",style:i.text(".ph-banner__meta"),children:e.now})]}),
|
|
99
|
+
/* @__PURE__ */N(Text,{style:[i.view(".ph-banner__txt > strong"),i.text(".ph-banner__txt > strong")],children:e.title}),e.body===""?null:/* @__PURE__ */N(Text,{style:i.text(".ph-banner__txt > span:last-child"),children:e.body})]})]})})}var Gi={pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"};function Ji(e){return{width:e,height:e,alignItems:"center",justifyContent:"center"}}function Qi(e,t){return t??Math.max(1.5,Math.round(e/11*10)/10)}function Ring({size:e,strokeWidth:t,color:n,children:r}){/* @__PURE__ */
|
|
100
|
+
return N(w,{style:[Ji(e),{borderRadius:e/2,borderWidth:t??k.hairlineWidth,borderColor:n}],children:r})}function ArrowUpGlyph({size:e,color:t,strokeWidth:n,testID:r}){let o=Qi(e,n),i=e*.46;/* @__PURE__ */
|
|
101
|
+
return $(w,{style:Ji(e),testID:r,...Gi,children:[
|
|
102
|
+
/* @__PURE__ */N(w,{style:{position:"absolute",top:e*.16,bottom:e*.12,width:o,borderRadius:o,backgroundColor:t}}),
|
|
103
|
+
/* @__PURE__ */N(w,{style:{position:"absolute",top:e*.16+o/2,width:i,height:i,borderLeftWidth:o,borderTopWidth:o,borderColor:t,transform:[{rotate:"45deg"}]}})]})}var Zi={".ph-head":{flexGrow:0,flexShrink:0,height:58,alignItems:"center",paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,position:"relative",zIndex:6,backgroundColor:"$paper"},".ph-head__start":{flexDirection:"row",alignItems:"center",minWidth:0},".ph-head__end":{flexDirection:"row",alignItems:"center",justifyContent:"flex-end",marginRight:-6,gap:10},".ph-pet":{flexDirection:"row",alignItems:"center",minHeight:44,fontSize:17,color:"$ink2",gap:9},".ph-pet img":{width:36,height:36,round:1},".ph-back":{display:"none",width:44,height:44,marginLeft:-6,alignItems:"center",justifyContent:"center"},".ph-back svg":{width:26,height:26},".ph-mark":{width:31,height:29,color:"$accent"},".ph-lockup":{display:"none",alignItems:"center",gap:9},".ph-lockup .ph-mark":{width:26,height:25},".ph-lockup__rule":{width:1,height:24,backgroundColor:"$n_D9D6D0"},".ph-lockup__by":{family:"$mono",fontSize:9,lh:1,color:"$ink3",gap:0},".ph-lockup__by svg":{width:62,height:22,marginTop:-1,marginRight:0,marginBottom:-6,marginLeft:0,color:"$byInk"},".ph-title":{display:"none",fontSize:17,fontWeight:"800",nowrap:1},'.ph[data-tab="ask"]:not([data-pushed="1"]) .ph-lockup':{flexDirection:"row"},".askbar":{flexDirection:"row",alignItems:"center",height:52,paddingTop:0,paddingRight:6,paddingBottom:0,paddingLeft:8,borderRadius:999,backgroundColor:"$card",ring:[1.5,"$ink"],gap:6},".askbar input":{flex:1,minWidth:0,height:"100%",borderWidth:0,backgroundColor:"transparent",fontSize:16},".askbar__send":{width:40,height:40,round:1,alignItems:"center",justifyContent:"center",backgroundColor:"$primary",color:"$onPrimary",flexGrow:0,flexShrink:0,dur:160,ease:[.23,1,.32,1]},".askbar__send svg":{width:20,height:20},".askbar__send[disabled]":{opacity:.3},".ph-askbar":{flexGrow:0,flexShrink:0,paddingTop:10,paddingRight:14,paddingBottom:10,paddingLeft:14,backgroundColor:"$paper"}};var Xi=/* @__PURE__ */new WeakMap;function ea(e){let t=Xi.get(e);if(t!==void 0)return t;let n=Ro(e,Zi);return Xi.set(e,n),n}function ShellIcon({name:e,style:t}){let n=Ri[e];/* @__PURE__ */
|
|
104
|
+
return N(R,{source:{uri:n.uri,width:n.width*3,height:n.height*3},style:[{width:n.width,height:n.height},t],resizeMode:"contain",accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"})}var ta=1.35;function ShellAskBar({placeholder:e,field:t,send:n,onAsk:r,testID:o}){let i=useEverfurTheme(),a=ea(i),[l,s]=u(""),d=i.slots.composerInput,c=i.slots.sendButton,p=l.trim()==="",f=()=>{let e=l.trim();e!==""&&(s(""),r(e))},h=a.view(".askbar__send");/* @__PURE__ */
|
|
105
|
+
return N(w,{style:a.view(".ph-askbar"),testID:o,children:/* @__PURE__ */$(w,{style:[a.view(".askbar"),{height:void 0,minHeight:52},d?.backgroundColor===void 0?null:{backgroundColor:d.backgroundColor},d?.borderColor===void 0?null:{borderColor:d.borderColor}],children:[
|
|
106
|
+
/* @__PURE__ */N(xr,{value:l,onChangeText:s,placeholder:e,placeholderTextColor:d?.textColor??i.color.text.placeholder,accessibilityLabel:t,onSubmitEditing:f,returnKeyType:"send",maxFontSizeMultiplier:ta,style:[a.text(".askbar input"),{flex:1,minWidth:0,paddingVertical:12,color:d?.textColor??a.colors.ink}],testID:`${o}-input`}),
|
|
107
|
+
/* @__PURE__ */N(_,{onPress:f,disabled:p,accessibilityRole:"button",accessibilityLabel:n,accessibilityState:{disabled:p},style:[h,c?.backgroundColor===void 0?null:{backgroundColor:c.backgroundColor}],testID:`${o}-send`,children:/* @__PURE__ */N(ArrowUpGlyph,{size:20,color:c?.textColor??a.colors.onPrimary??i.color.surface})})]})})}function na(e){let[t,n]=u(null);return{shown:e!==null&&t!==e,onError:()=>n(e)}}function BrandImage({uri:e,label:t,decorative:n=false,style:r,resizeMode:o="contain",fallback:i=null,onError:a,testID:l}){let s=na(e);if(e===null||!s.shown)return i;let d=n?{accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"}:{accessible:true,accessibilityRole:"image",...t===void 0?{}:{accessibilityLabel:t}};/* @__PURE__ */
|
|
108
|
+
return N(R,{source:{uri:e},style:r,resizeMode:o,...d,onError:()=>{s.onError(),a?.()},...l===void 0?{}:{testID:l}})}function ra(e){return[e.surface,e.surfaceCream,e.surfaceSubtle,e.background,e.chatGround,e.composerFill]}function oa(e){if(e.brightness!=="light")return false;let t=yr.color,n=e.color,r=(e,t)=>parseColor(e)===parseColor(t),o=new Set(ra(t));return r(n.brand,t.brand)&&r(n.accent,t.accent)&&ra(n).every(e=>o.has(e))}var ia=/* @__PURE__ */Object.freeze([
|
|
107
109
|
/* @__PURE__ */Object.freeze({background:"#ffbdbd",foreground:"#6d1d14"}),
|
|
108
110
|
/* @__PURE__ */Object.freeze({background:"#a0c4f6",foreground:"#0b3a73"}),
|
|
109
111
|
/* @__PURE__ */Object.freeze({background:"#fbc558",foreground:"#10462e"}),
|
|
110
112
|
/* @__PURE__ */Object.freeze({background:"#bde7c5",foreground:"#0e3b22"}),
|
|
111
113
|
/* @__PURE__ */Object.freeze({background:"#dcc7f4",foreground:"#3a1d6a"}),
|
|
112
|
-
/* @__PURE__ */Object.freeze({background:"#ffd8a8",foreground:"#5a2a04"})]);function
|
|
113
|
-
return
|
|
114
|
-
return Object.freeze(t)}function
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
/* @__PURE__
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
return
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
return
|
|
124
|
-
/* @__PURE__
|
|
125
|
-
/* @__PURE__
|
|
126
|
-
/* @__PURE__
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
|
|
131
|
-
return
|
|
132
|
-
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__
|
|
135
|
-
|
|
136
|
-
return P(C.View,{pointerEvents:"none",accessibilityLiveRegion:"polite",style:[e.view(".ph-toast"),{top:Vi},r],testID:"everfur-tabs-toast",children:/* @__PURE__ */P(Text,{style:e.text(".ph-toast"),children:t})})}function useEverfurIntroSeen(){let{runtime:e,userRef:userRef}=ft();return c(()=>{let t=nt(e),n=e.registry.services.kv;return{shouldPlay:e=>st({repo:t,kv:n,userRef:userRef,...e===void 0?{}:{signal:e}}),markSeen:()=>dt({repo:t,kv:n,userRef:userRef})}},[e,userRef])}var Ji=[{key:"look.color.primary",kind:"color",default:"#10462E"},{key:"look.color.on_primary",kind:"color",default:"#FFFFFF"},{key:"look.color.accent",kind:"color",default:"#07C168"},{key:"look.color.tint",kind:"color",default:"#DAF6E8"},{key:"look.color.chips",kind:"hexList",default:["#97E4C0","#F3CD73","#FFC3BC"]},{key:"look.color.surface",kind:"color",default:"#FFFFFF"},{key:"look.color.heading",kind:"color",default:"#10462E"},{key:"look.color.ink",kind:"color",default:"#000000"},{key:"look.color.muted",kind:"color",default:"#6B6B6B"},{key:"look.color.line",kind:"color",default:"#E4E4E4"},{key:"look.color.bubble",kind:"colorOrNone",default:"#10462E"},{key:"look.color.launcher",kind:"color",default:"#10462E"},{key:"look.color.on_launcher",kind:"color",default:"#07C168"},{key:"look.color.dot",kind:"color",default:"#07C168"},{key:"look.chat_wash",kind:"hexList",default:[]},{key:"look.font.heading",kind:"text",default:"Azeret"},{key:"look.font.body",kind:"text",default:"Azeret"},{key:"look.font.chat",kind:"text",default:"body"},{key:"look.font.label",kind:"text",default:"Azeret Mono"},{key:"look.font.heading_weight",kind:"number",default:700,oneOf:[500,600,700,800]},{key:"look.font.files",kind:"fontFiles",default:[{family:"Azeret",weight:"400",url:"brand/fonts/Azeret/Azeret-Regular.woff2"},{family:"Azeret",weight:"500",url:"brand/fonts/Azeret/Azeret-Medium.woff2"},{family:"Azeret",weight:"700",url:"brand/fonts/Azeret/Azeret-Bold.woff2"},{family:"Azeret Mono",weight:"400",url:"brand/fonts/Azeret-Mono/AzeretMono-Regular.woff2"}]},{key:"look.radius.card",kind:"number",default:20,range:[0,28]},{key:"look.radius.sheet",kind:"number",default:28,range:[0,28]},{key:"look.logo.wordmark",kind:"text",default:"brand/guide/img/wordmark-green.png"},{key:"look.logo.mark",kind:"text",default:"brand/guide/img/wordmark-green.png"},{key:"look.ask_icon",kind:"text",default:"everfur-ask"},{key:"look.lockup",kind:"choice",default:"side_by_side",oneOf:["side_by_side","stacked"]},{key:"text.partner_name",kind:"string",default:"Everfur",max:20},{key:"text.ask.name",kind:"string",default:"Everfur",max:16},{key:"text.ask.greeting",kind:"string",default:"What can we help {pet} with today?",max:56},{key:"text.ask.placeholder",kind:"string",default:"Ask anything about {pet}…",max:34},{key:"text.ask.dock_placeholder",kind:"string",default:"Ask {assistant} about {pet}…",max:34},{key:"text.ask.memory_chip",kind:"string",default:"Remembers {pet}",max:22},{key:"text.ask.from_history",kind:"string",default:"From {pet}'s history",max:28},{key:"text.ask.watch_for",kind:"string",default:"Watch for",max:24},{key:"text.ask.new_chat",kind:"string",default:"New chat",max:12},{key:"text.tabs.ask",kind:"string",default:"Ask",max:12},{key:"text.tabs.vet",kind:"string",default:"Vet",max:10},{key:"text.tabs.records",kind:"string",default:"Health",max:16},{key:"text.launcher.tip",kind:"string",default:"New: ask anything about your pets, 24/7.",max:48},{key:"text.nav.page_title",kind:"string",default:"",max:14,emptyOk:true},{key:"text.vet.book",kind:"string",default:"Book a video visit",max:22},{key:"text.vet.booked",kind:"string",default:"{pet}'s visit is booked",max:40},{key:"text.vet.see_times",kind:"string",default:"Find a time",max:16},{key:"text.vet.join",kind:"string",default:"Get ready",max:14},{key:"text.vet.add_calendar",kind:"string",default:"Add to calendar",max:20},{key:"text.records.empty_title",kind:"string",default:"Add {pet}'s records",max:36},{key:"text.records.empty_body",kind:"string",default:"Records can come from more than one clinic over a lifetime.",max:160},{key:"text.records.request",kind:"string",default:"Request from a clinic",max:34},{key:"text.records.upload",kind:"string",default:"Upload a document",max:24},{key:"text.cap.counter",kind:"string",default:"{left} of {cap} free messages left this month",max:48},{key:"text.cap.reached",kind:"string",default:"You've used your {cap} free messages this month.",max:64},{key:"text.cap.button",kind:"string",default:"See {plan}",max:24},{key:"text.members.title",kind:"string",default:"Ask anything about your pets, anytime",max:48},{key:"text.members.badge",kind:"string",default:"Members only",max:32},{key:"text.members.button",kind:"string",default:"Join membership",max:24},{key:"text.ui.not_now",kind:"string",default:"Not now",max:12},{key:"text.notify.records_ready",kind:"string",default:"When records arrive",max:28,reference:true},{key:"text.notify.visit_reminder",kind:"string",default:"Visit reminders",max:28,reference:true},{key:"text.notify.vet_reply",kind:"string",default:"Replies from the vet",max:28,reference:true},{key:"text.notify.care_due",kind:"string",default:"Care that's due",max:28,reference:true},{key:"layout.nav",kind:"choice",default:"bottom_tabs",oneOf:["bottom_tabs","top_tabs","sections_page","chat_first"]},{key:"layout.sections",kind:"itemList",default:["ask","records"],items:["ask","vet","records"]},{key:"layout.vet_on_ask",kind:"choice",default:"top",oneOf:["top","header_button","own_tab","in_answers"]},{key:"layout.vet_badge",kind:"choice",default:"tab_dot",oneOf:["none","header_pill","tab_dot"]},{key:"layout.memory_chip",kind:"boolean",default:false},{key:"layout.severity",kind:"choice",default:"four_levels",oneOf:["off","three_levels","four_levels"]},{key:"layout.suggestions",kind:"choice",default:"center",oneOf:["center","above_bar"]},{key:"layout.opens_on",kind:"choice",default:"new_chat",oneOf:["new_chat","last_chat"]},{key:"layout.answer_byline",kind:"choice",default:"avatar",oneOf:["none","avatar","wordmark"]},{key:"layout.launcher",kind:"choice",default:"none",oneOf:["none","floating_button"]},{key:"layout.presentation",kind:"choice",default:"in_tab",oneOf:["in_tab","full_screen"]},{key:"features.chat",kind:"boolean",default:true},{key:"features.records",kind:"boolean",default:true},{key:"features.video_visits",kind:"boolean",default:true},{key:"features.prescriptions",kind:"boolean",default:true},{key:"features.shop",kind:"choice",default:"everfur_care",oneOf:["off","everfur_care","partner_pick","partner_cart"],reference:true},{key:"features.partner_data",kind:"itemList",default:[],items:["park_checkins","camera_events","dna_results"]},{key:"features.texting",kind:"boolean",default:true,reference:true},{key:"features.texting_cap",kind:"numberOrNull",default:null,range:[1,999],reference:true},{key:"features.notify.records_ready",kind:"boolean",default:true,reference:true},{key:"features.notify.visit_reminder",kind:"boolean",default:true,reference:true},{key:"features.notify.vet_reply",kind:"boolean",default:true,reference:true},{key:"features.notify.care_due",kind:"boolean",default:true,reference:true},{key:"access.mode",kind:"choice",default:"open",oneOf:["open","free_cap","members_only"]},{key:"access.free_messages",kind:"number",default:0,range:[0,50]},{key:"access.locked",kind:"itemList",default:["video_visits"],items:["video_visits","texting","link_records","previous_results","dashboard","goals"]},{key:"plan.name",kind:"string",default:"Everfur Pro",max:20},{key:"plan.sold_by",kind:"choice",default:"everfur",oneOf:["everfur","partner"]},{key:"plan.price_display",kind:"choice",default:"full",oneOf:["full","monthly_equivalent","hidden"]},{key:"plan.price_year",kind:"money",default:"$144.99"},{key:"plan.price_month",kind:"money",default:"$15.00"},{key:"vet.visits_per_year",kind:"numberOrNull",default:null,range:[1,24]},{key:"vet.extra_visit_price",kind:"moneyOrNull",default:null},{key:"vet.name",kind:"string",default:"Licensed Everfur vet",max:28},{key:"vet.title",kind:"string",default:"",max:32,emptyOk:true},{key:"vet.photo",kind:"text",default:"prototypes/televet-photos/r5/vet.jpg"},{key:"units.weight",kind:"choice",default:"lb",oneOf:["lb","kg"]},{key:"units.temperature",kind:"choice",default:"F",oneOf:["F","C"]},{key:"units.distance",kind:"choice",default:"mi",oneOf:["mi","km"],reference:true},{key:"units.currency",kind:"choice",default:"$",oneOf:["$","US$"]}],Qi={"look.color.primary":"#10462E","look.color.on_primary":"#FFFFFF","look.color.accent":"#07C168","look.color.tint":"#DAF6E8","look.color.chips":["#97E4C0","#F3CD73","#FFC3BC"],"look.color.surface":"#FFFFFF","look.color.heading":"#10462E","look.color.ink":"#000000","look.color.muted":"#6B6B6B","look.color.line":"#E4E4E4","look.color.bubble":"#10462E","look.color.launcher":"#10462E","look.color.on_launcher":"#07C168","look.color.dot":"#07C168","look.chat_wash":[],"look.font.heading":"Azeret","look.font.body":"Azeret","look.font.chat":"body","look.font.label":"Azeret Mono","look.font.heading_weight":700,"look.font.files":[{family:"Azeret",weight:"400",url:"brand/fonts/Azeret/Azeret-Regular.woff2"},{family:"Azeret",weight:"500",url:"brand/fonts/Azeret/Azeret-Medium.woff2"},{family:"Azeret",weight:"700",url:"brand/fonts/Azeret/Azeret-Bold.woff2"},{family:"Azeret Mono",weight:"400",url:"brand/fonts/Azeret-Mono/AzeretMono-Regular.woff2"}],"look.radius.card":20,"look.radius.sheet":28,"look.logo.wordmark":"brand/guide/img/wordmark-green.png","look.logo.mark":"brand/guide/img/wordmark-green.png","look.ask_icon":"everfur-ask","look.lockup":"side_by_side","text.partner_name":"Everfur","text.ask.name":"Everfur","text.ask.greeting":"What can we help {pet} with today?","text.ask.placeholder":"Ask anything about {pet}…","text.ask.dock_placeholder":"Ask {assistant} about {pet}…","text.ask.memory_chip":"Remembers {pet}","text.ask.from_history":"From {pet}'s history","text.ask.watch_for":"Watch for","text.ask.new_chat":"New chat","text.tabs.ask":"Ask","text.tabs.vet":"Vet","text.tabs.records":"Health","text.launcher.tip":"New: ask anything about your pets, 24/7.","text.nav.page_title":"","text.vet.book":"Book a video visit","text.vet.booked":"{pet}'s visit is booked","text.vet.see_times":"Find a time","text.vet.join":"Get ready","text.vet.add_calendar":"Add to calendar","text.records.empty_title":"Add {pet}'s records","text.records.empty_body":"Records can come from more than one clinic over a lifetime.","text.records.request":"Request from a clinic","text.records.upload":"Upload a document","text.cap.counter":"{left} of {cap} free messages left this month","text.cap.reached":"You've used your {cap} free messages this month.","text.cap.button":"See {plan}","text.members.title":"Ask anything about your pets, anytime","text.members.badge":"Members only","text.members.button":"Join membership","text.ui.not_now":"Not now","text.notify.records_ready":"When records arrive","text.notify.visit_reminder":"Visit reminders","text.notify.vet_reply":"Replies from the vet","text.notify.care_due":"Care that's due","layout.nav":"bottom_tabs","layout.sections":["ask","records"],"layout.vet_on_ask":"top","layout.vet_badge":"tab_dot","layout.memory_chip":false,"layout.severity":"four_levels","layout.suggestions":"center","layout.opens_on":"new_chat","layout.answer_byline":"avatar","layout.launcher":"none","layout.presentation":"in_tab","features.chat":true,"features.records":true,"features.video_visits":true,"features.prescriptions":true,"features.shop":"everfur_care","features.partner_data":[],"features.texting":true,"features.texting_cap":null,"features.notify.records_ready":true,"features.notify.visit_reminder":true,"features.notify.vet_reply":true,"features.notify.care_due":true,"access.mode":"open","access.free_messages":0,"access.locked":["video_visits"],"plan.name":"Everfur Pro","plan.sold_by":"everfur","plan.price_display":"full","plan.price_year":"$144.99","plan.price_month":"$15.00","vet.visits_per_year":null,"vet.extra_visit_price":null,"vet.name":"Licensed Everfur vet","vet.title":"","vet.photo":"prototypes/televet-photos/r5/vet.jpg","units.weight":"lb","units.temperature":"F","units.distance":"mi","units.currency":"$"},Zi={"ask.emergency":"Emergency? Call a vet.","ask.privacy":"Confidential. {partner} can't see this chat.","ask.you":"You","ask.today":"Today","ask.follow_ups":"Follow-up questions","ask.attach.photo":"Photo","ask.attach.camera":"Camera","banner.four.0":"Good to know","banner.four.1":"Monitor at home","banner.four.2":"See a vet today","banner.four.3":"Call a vet now","banner.three.0":"All clear","banner.three.1":"Monitor at home","banner.three.2":"See a vet now","banner.body.lowest":"Just general info about {pet}. Nothing here needs action right now.","locked.video_visits":"Video visits with a vet","locked.texting":"Ask by text","locked.link_records":"Link {pet}'s vet records","locked.previous_results":"Previous results","locked.dashboard":"Health dashboard","locked.goals":"Goals for {pet}","plan.price.year":"a year","plan.price.month":"/month","plan.price.billed":"Billed Annually","vet.wellness_tab":"Wellness","vet.opening":"Next opening {when}","vet.next_visit":"Next video visit","vet.badge":"Booked","vet.length":"10 minutes","vet.kind_wellness":"wellness video call","vet.reschedule":"Reschedule","vet.cancel":"Cancel","vet.note":"The vet has {pet}'s records and what you've asked {assistant}. The visit opens right here, 15 minutes before.","vet.book_another":"Book another visit","vet.past_visits":"Past visits","vet.allowance":"{left} of {visits} video visits left this year","vet.extra":"Extra visits are {price} each","vet.gate.visits":"{pet} lives in {state}: a licensed vet can see {them} by video.","vet.gate.wellness":"{pet} lives in {state}: a vet gives general advice by video. No prescriptions.","vet.rx":"Prescriptions, if the vet decides {pet} needs one.","vet.card.when":"Video visit, tomorrow from {when}","vet.card.wellness_when":"Wellness video call, general advice","vet.card.wellness":"A vet can talk it through with you by video: general advice, no exam.","vet.next.text":"We'll text you and send a notification 30 minutes before.","vet.next.notify":"We'll send a notification 30 minutes before.","vet.next.summary":"{pet}'s summary goes to the vet ahead of the call.","vet.next.join":"Join right here in the app. No links to hunt for.","vet.done":"Done","vet.legal":"Video visits are with a licensed veterinarian.","vet.legal.rx":"Prescriptions where allowed, starting with California.","vet.legal.emergency":"In an emergency, go to the nearest emergency animal hospital.","vet.privacy":"Everfur is a separate provider. Your visits and messages are confidential, and {partner} can't see them.","records.status.in_range":"In range","records.status.watch":"Watch","records.vitals.temperature":"Temperature","records.vitals.heart_rate":"Heart rate","records.vitals.weight":"Weight","records.needs":"Needs a look","records.care":"Upcoming care","records.tiles":"Records & history","records.tile.labs":"Labs & bloodwork","records.tile.vaccines":"Vaccines","records.tile.visits":"Visits & records","records.tile.screenings":"Screenings","records.chart.over":"Over","records.chart.under":"Under","records.history":"History","pdata.park_checkins":"Park check-ins","pdata.camera_events":"Camera events","pdata.dna_results":"{partner} DNA","pdata.tag.park_checkins":"Park check-in","pdata.tag.camera_events":"Camera","pdata.tag.dna_results":"{partner} DNA","ask.tag.records":"Records","vet.book_another.for":"For {pet}","upload.title":"Upload a document","upload.body":"A PDF, or a photo of a paper record. Add them all; we sort them by date.","upload.photo":"Take a photo","upload.photo.note":"of a paper record","upload.library":"Choose from photos","upload.file":"Choose a file","upload.file.note":"PDF","load.error":"Couldn't load","load.retry":"Try again"},Xi={vetOnAskByNav:{bottom_tabs:["top","own_tab","header_button","in_answers"],top_tabs:["own_tab","header_button","in_answers"],sections_page:["own_tab","in_answers"],chat_first:["header_button","in_answers"]},presentationByNav:{bottom_tabs:["in_tab"],top_tabs:["in_tab","full_screen"],sections_page:["in_tab"],chat_first:["in_tab"]}};function vetLevelFor(e,t){if(t==null||(t.country??"US").toUpperCase()!=="US")return"none";let n=(t.state??"").toUpperCase();return n===""?"none":e.videoAndRx.includes(n)?"visits":e.adviceOnly.includes(n)?"wellness":"none"}function resolveLayout(e,t){let n=[],r=e["layout.nav"],o=e["features.video_visits"]&&t!=="none",i=e["layout.vet_on_ask"],a=Xi.vetOnAskByNav[r];e["features.video_visits"]&&!a.includes(i)&&(n.push("layout.vet_on_ask"),i=e["layout.sections"].includes("vet")&&a.includes("own_tab")?"own_tab":"in_answers"),o||(i="none");let l=/* @__PURE__ */new Set,s=[];for(let t of e["layout.sections"]){if(l.has(t)){n.push("layout.sections");continue}l.add(t),!(t==="vet"&&i!=="own_tab")&&(t==="ask"&&!e["features.chat"]||t==="records"&&!e["features.records"]||s.push(t))}i==="own_tab"&&!s.includes("vet")&&s.push("vet"),r==="chat_first"&&!s.includes("ask")&&(n.push("layout.sections"),s.unshift("ask")),s.length===0&&s.push(e["features.records"]&&!e["features.chat"]?"records":"ask");let d=e["layout.presentation"];(!Xi.presentationByNav[r].includes(d)||d==="full_screen"&&e["layout.launcher"]!=="floating_button")&&(d!=="in_tab"&&n.push("layout.presentation"),d="in_tab");let c=e["layout.vet_badge"];c==="header_pill"&&d==="full_screen"&&i==="own_tab"&&(c="tab_dot");let u=d==="full_screen"?"close":r==="chat_first"?"down":"none";/* @__PURE__ */
|
|
137
|
-
|
|
138
|
-
return
|
|
139
|
-
return Object.freeze({kind:"members",title:sdkText(e,"text.members.title"),badge:sdkText(e,"text.members.badge"),price:priceLines(e),locked:[],button:sdkText(e,"text.members.button"),dismiss:sdkText(e,"text.ui.not_now"),soldBy:t["plan.sold_by"]})}function vetTabLabel(e,t){return t==="wellness"?sdkFixed(e,"vet.wellness_tab"):sdkText(e,"text.tabs.vet")}var oa="Licensed Everfur vet";function prescriptionsAllowed(e,t){return e["features.prescriptions"]&&t==="visits"}function vetHome(e,t){let n=e.settings,r=n["vet.name"],o=n["vet.photo"].trim()===""?null:n["vet.photo"],i=r!==oa,a=t.pet===void 0?{}:{pet:t.pet},l=n["vet.visits_per_year"],s=l!==null&&t.visitsUsed!==null&&t.visitsUsed!==void 0?sdkFixed(e,"vet.allowance",{left:Math.max(0,l-t.visitsUsed),visits:l}):null,d=n["vet.extra_visit_price"],c=t.stateName?.trim()??"",u={...a,state:c,them:objectPronoun(t.petSex)},p=c!==""&&t.level==="visits"?sdkFixed(e,"vet.gate.visits",u):c!==""&&t.level==="wellness"?sdkFixed(e,"vet.gate.wellness",u):null,f=[sdkFixed(e,"vet.legal")];return n["features.prescriptions"]&&f.push(sdkFixed(e,"vet.legal.rx")),f.push(sdkFixed(e,"vet.legal.emergency")),/* @__PURE__ */Object.freeze({level:t.level,name:r,title:n["vet.title"].trim()===""?null:n["vet.title"],photo:o,initial:o===null&&i?r.trim().charAt(0).toUpperCase():null,book:sdkText(e,"text.vet.book"),seeTimes:sdkText(e,"text.vet.see_times"),allowance:s,extra:d===null?null:sdkFixed(e,"vet.extra",{price:formatPrice(n,d)}),gate:p,rx:prescriptionsAllowed(n,t.level)?sdkFixed(e,"vet.rx",a):null,legal:/* @__PURE__ */Object.freeze(f),privacy:isInsidePartner(n)?sdkFixed(e,"vet.privacy"):null})}function chipInk(e,t){return contrastRatio(t,e)>=contrastRatio("#FFFFFF",e)?t:"#FFFFFF"}function bubbleInk(e,t){return contrastRatio(e,"#FFFFFF")>=contrastRatio(e,t)?"#FFFFFF":t}function buttonFill(e){let t=e["look.color.primary"];return contrastRatio(t,e["look.color.surface"])<1.3?{fill:e["look.color.heading"],ink:"#FFFFFF"}:{fill:t,ink:e["look.color.on_primary"]}}function memoryChip(e,t){return e.settings["layout.memory_chip"]?sdkText(e,"text.ask.memory_chip",t===void 0?{}:{pet:t}):null}function partnerDataSources(e){let t={park_checkins:"pdata.park_checkins",camera_events:"pdata.camera_events",dna_results:"pdata.dna_results"};/* @__PURE__ */
|
|
140
|
-
return Object.freeze(e
|
|
141
|
-
return Object.freeze(
|
|
142
|
-
return Object.freeze(t)}function
|
|
143
|
-
return Object.freeze({
|
|
144
|
-
return Object.freeze(
|
|
114
|
+
/* @__PURE__ */Object.freeze({background:"#ffd8a8",foreground:"#5a2a04"})]);function aa(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)>>>0;return ia[t%ia.length]}function la(e){let t=(e??"").trim();return(Array.from(t)[0]??"?").toUpperCase()}function sa(e){return{...aa(e.petRef),initial:la(e.name)}}function da(e,t,n){let r=sa(e);return t?r:{background:n.fill,foreground:n.ink,initial:r.initial}}function ca(e){return Math.max(12,Math.round(e*.42))}function PetDisc({pet:e,size:t,ringStroke:n}){let r=useEverfurTheme(),o=p(()=>ua(r),[r]),i=t-n*2,a=e===null?null:da(e,oa(r),{fill:r.color.highlight,ink:r.color.onHighlight}),l=ca(i);/* @__PURE__ */
|
|
115
|
+
return N(Ring,{size:t,strokeWidth:n,color:r.color.mark,children:/* @__PURE__ */N(w,{style:[o.disc,{width:i,height:i,borderRadius:i/2},a===null?o.discEmpty:{backgroundColor:a.background}],children:/* @__PURE__ */N(Text,{tier:"badge",style:[o.letter,{fontSize:l,lineHeight:Math.round(l*1.2),color:a===null?r.color.text.muted:a.foreground}],children:a===null?la(null):a.initial})})})}function ua(e){return k.create({disc:{alignItems:"center",justifyContent:"center",overflow:"hidden"},discEmpty:{backgroundColor:e.color.brandSoft},letter:{...face(e,"bold"),textAlign:"center",includeFontPadding:false}})}var pa=/* @__PURE__ */Object.freeze({planPlaceholder:"Ask what’s right for {petName}…",recordsPlaceholder:"Ask about {petName}’s records…",field:"Message",send:"Send",back:"Back",close:"Close",poweredBy:"powered by",poweredByLabel:"powered by Everfur",notificationKicker:"Notification · {time}",switchPet:"{petName}. Switch pet",choosePet:"Choose pet"});function fa(e){if(e===void 0)return pa;let t={...pa};for(let n of Object.keys(pa)){let r=e[n];typeof r=="string"&&r.trim().length>0&&(t[n]=r)}/* @__PURE__ */
|
|
116
|
+
return Object.freeze(t)}function ha(e,t){return e.replace(/\{([a-zA-Z]+)\}/g,(e,n)=>t[n]??(n==="pet"?t.petName:void 0)??"")}var ga=360;function ShellHeader({options:e,tab:n,pushed:r,petRef:petRef,petName:o,copy:i,onInboxOpen:a}){let l=useEverfurTheme(),s=ea(l),{width:d}=z(),[c,p]=u(false),f=l.slots.header,h=f?.backgroundColor??s.colors.paper??l.color.surface,g=f?.textColor??s.colors.ink??l.color.text.primary,b=n==="ask"&&r===null,m=b?".ph-lockup .ph-mark":".ph-mark",y=e.mark??(l.meta.logoUrl===null?null:/* @__PURE__ */N(BrandImage,{uri:l.meta.logoUrl,label:l.meta.displayName,decorative:b,style:s.icon(m)})),v=r!==null?/* @__PURE__ */N(_,{onPress:r.onBack,accessibilityRole:"button",accessibilityLabel:i.back,hitSlop:4,style:[s.view(".ph-back"),{display:"flex"}],testID:"everfur-shell-back",children:/* @__PURE__ */N(ShellIcon,{name:"back",style:[s.icon(".ph-back svg"),{tintColor:g}]})}):/* @__PURE__ */N(Pet,{options:e,kit:s,petRef:petRef,petName:o,ink:g}),k=r!==null?/* @__PURE__ */N(Text,{tier:"heading",numberOfLines:1,accessibilityRole:"header",style:[s.text(".ph-title"),{display:"flex",color:g,textAlign:"center"}],testID:"everfur-shell-title",children:r.title}):b?/* @__PURE__ */N(t,{children:/* @__PURE__ */$(w,{accessible:true,accessibilityLabel:ha("{name}, {by}",{name:l.meta.displayName,by:i.poweredByLabel}),style:[s.view(".ph-lockup",'.ph[data-tab="ask"]:not([data-pushed="1"]) .ph-lockup'),{display:"flex"}],testID:"everfur-shell-lockup",children:[y,d>=ga?/* @__PURE__ */$(L,{children:[
|
|
117
|
+
/* @__PURE__ */N(w,{style:s.view(".ph-lockup__rule")}),
|
|
118
|
+
/* @__PURE__ */$(w,{style:s.view(".ph-lockup__by"),children:[
|
|
119
|
+
/* @__PURE__ */N(Text,{tier:"badge",style:s.text(".ph-lockup__by"),children:i.poweredBy}),
|
|
120
|
+
/* @__PURE__ */N(ShellIcon,{name:"wordmark",style:[s.icon(".ph-lockup__by svg"),{tintColor:s.colors.byInk??g}]})]})]}):null]})}):/* @__PURE__ */N(w,{testID:"everfur-shell-mark",children:y}),S=e.bell!==false,x=e.inbox?.onOpen;/* @__PURE__ */
|
|
121
|
+
return $(w,{style:[s.view(".ph-head"),{flexDirection:"row",backgroundColor:h}],testID:"everfur-shell-header",children:[
|
|
122
|
+
/* @__PURE__ */N(w,{style:[s.view(".ph-head__start"),{flex:1,flexBasis:0}],children:v}),
|
|
123
|
+
/* @__PURE__ */N(w,{style:{flexShrink:1,alignItems:"center",justifyContent:"center"},children:k}),
|
|
124
|
+
/* @__PURE__ */N(w,{style:[s.view(".ph-head__end"),{flex:1,flexBasis:0}],children:S&&r===null?/* @__PURE__ */N(j,{onPress:e.onBell??(()=>p(true)),color:g,ground:h}):null}),S&&e.onBell===void 0?/* @__PURE__ */N(U,{...e.inbox,visible:c,onClose:()=>p(false),onOpen:x??a}):null]})}function Pet({options:e,kit:t,petRef:petRef,petName:n,ink:r}){let o=t.view(".ph-pet img"),i=typeof o.width=="number"?o.width:36,a=e.petPhotoUrl!==void 0&&e.petPhotoUrl!==null&&e.petPhotoUrl!==""?/* @__PURE__ */N(BrandImage,{uri:e.petPhotoUrl,label:n,decorative:true,style:[t.icon(".ph-pet img"),{borderRadius:i/2}],resizeMode:"cover",fallback:/* @__PURE__ */N(PetDisc,{pet:petRef===null?null:{petRef:petRef,name:n},size:i,ringStroke:0})}):/* @__PURE__ */N(PetDisc,{pet:petRef===null?null:{petRef:petRef,name:n},size:i,ringStroke:0}),l=/* @__PURE__ */$(L,{children:[a,n===""?null:/* @__PURE__ */N(Text,{tier:"heading",numberOfLines:1,style:[t.text(".ph-pet"),{color:r===t.colors.ink?t.colors.ink2:r,flexShrink:1}],children:n})]}),s=[t.view(".ph-pet"),{minWidth:0,flexShrink:1}];return e.onPet===void 0?/* @__PURE__ */N(w,{style:s,testID:"everfur-shell-pet",children:l}):/* @__PURE__ */N(_,{onPress:e.onPet,accessibilityRole:"button",accessibilityLabel:n===""?void 0:n,style:s,testID:"everfur-shell-pet",children:l})}var ba=/* @__PURE__ */Symbol.for("everfur.sdk.tabsBar.v1");function ma(){return globalThis[ba]??null}function ya(e){return e==="tabs_bar"&&ma()!==null}var va=/* @__PURE__ */createContext(null);function useEverfurTabs(){return g(va)}var ka=200,wa=4,_a=2600,Sa=600,xa=S.bezier(.25,.1,.25,1),Ca=x.OS!=="web",Ra=/* @__PURE__ */Object.freeze({chats:It.heading,newChat:It.newChat}),Fa={position:"relative",top:0,alignSelf:"flex-start"};function EverfurTabs(t){let{petRef:petRef,opened:i,onTabChange:a,onRecordsRequested:l,onRecordsLanded:s,onToast:d}=t,g=t.visible??true,m=useEverfurTheme(),y=p(()=>Oi(m),[m]),v=p(()=>({...Yt,...t.copy}),[t.copy]),{runtime:k,userRef:userRef}=gt(),_=Cn("healthPlan"),S=Cn("records"),x=Cn("recordsClinic"),C=Cn("televet"),R=useEverfurPresentation({...t.tabs===void 0?{}:{shellTabs:t.tabs},...t.headerStyle===void 0?{}:{shellHeader:t.headerStyle}}),F=R.shellTabs??Gt,A=c(F);A.current=F;let T=p(()=>C||!F.includes("vet")?F:F.filter(e=>e!=="vet"),[F,C]),I=c(T);I.current=T;let O=ya(R.shellHeader),P=O?ma()?.header??null:null;Hn(O);let[z,B]=u(()=>/* @__PURE__ */new Map),[L,j]=u(()=>/* @__PURE__ */new Set),U=h((e,t)=>{B(n=>{let r=n.get(e),o=hn(r,t);return o===r?n:new Map(n).set(e,o)}),j(t=>t.has(e)?new Set([...t].filter(t=>t!==e)):t)},[]),W=h(e=>{j(t=>t.has(e)?t:new Set(t).add(e))},[]),V=petRef===null?void 0:z.get(petRef),M=!_||V?.empty===true,q=`${petRef??"none"}:${V?.epoch??0}`,H=Zt(M,T),K=c(M);K.current=M;let Y=useHealthPlanPage({petRef:petRef,enabled:_&&petRef!==null}),[G,J]=u(()=>nn(i,false,T)),[Q,Z]=u(()=>/* @__PURE__ */new Set(["ask",nn(i,false,T)])),X=h(e=>{let t=Xt(e,K.current,I.current);J(t),Z(e=>e.has(t)?e:new Set(e).add(t))},[]);f(()=>{let e=Xt(G,M,T);e!==G&&J(e)},[M,G,T]);let ee=c(null);f(()=>{let e=ee.current;e===null||!Zt(M,T).includes(e)||(ee.current=null,X(e))},[M,T,X]);let te=h(e=>{ee.current=null,X(e)},[X]),ne=c(a);ne.current=a,f(()=>{ne.current?.(G)},[G]);let[re,oe]=u(null),ie=h((e,t)=>{e!==""&&oe(n=>({id:(n?.id??0)+1,prompt:e,petRef:petRef,...t===void 0?{}:{card:t}})),ee.current=null,X("ask")},[petRef,X]),ae=re===null||re.petRef!==petRef?null:re,le=rn(i),se=c(null),[de,ce]=u(null);f(()=>{if(se.current===le)return;se.current=le;let e=i.via==="link"?i.ask!==void 0?"ask":i.tab:"plan",t=i.via==="link"&&(e==="plan"||e==="vet")&&A.current.includes(e)&&!Zt(K.current,I.current).includes(e);ee.current=t?e:null,i.via==="link"&&i.ask!==void 0?ie(i.ask.prompt,i.ask.card):X(nn(i,K.current,I.current)),ce(i.via==="plain"?le:null)},[le,i,ie,X]);let ue=p(()=>mn(),[]),pe=g&&G==="ask",fe=c(pe);fe.current=pe;let he=t.chat?.lifecycle,ge=p(()=>he===null?null:yn(vn(he??createAppStateLifecycle(),()=>fe.current),ue),[he,ue]),be=c(pe);f(()=>{let e=kn(be.current,pe);be.current=pe,e&&ue.fire()},[pe,ue]);let[me,ye]=u(null),ve=h(e=>{e!==""&&(d!==void 0?d(e):ye(t=>({id:(t?.id??0)+1,text:e})))},[d]),ke=t.intro===false?null:t.intro??{},[we,_e]=u(null),[Se,xe]=u(null),[Ce,Re]=u(null),[Fe,Ae]=u(null),[Te,Ie]=u(()=>/* @__PURE__ */new Map),[Ee,De]=u(false),[Oe,Pe]=u(false),ze=c(null),[Be,Ne]=u(null),$e=c(null),Le=c(null),je=p(()=>ot(k),[k]),Ue=k.registry.services.kv,We=ke?.maxWidth??Sa,Ve=ke!==null&&_,Me=Ve&&de!==null&&g&&userRef!==null&&petRef!==null,[qe,He]=u(null);f(()=>{if(!Me)return;let e=de;if(D.get("window").width>=We){He(e);return}let t=new AbortController,n=petRef;return ct({repo:je,kv:Ue,userRef:userRef,signal:t.signal}).then(r=>{t.signal.aborted||(He(e),r&&Re({key:e,petRef:n}))},()=>{t.signal.aborted||He(e)}),()=>t.abort()},[Me,de,userRef,petRef,je,Ue,We]);let Ke=Ve&&de!==null&&g&&(userRef===null||petRef===null)&&D.get("window").width<We,[Ye,Ge]=u(null);f(()=>{if(!Ke)return;let e=de,t=setTimeout(()=>Ge(e),gn);return()=>clearTimeout(t)},[Ke,de]),At(Ke&&Ye!==de||Me&&qe!==de||Ce!==null||we!==null);let Je=h((e,t)=>{Ie(n=>n.get(e)===t?n:new Map(n).set(e,t))},[]),Qe=petRef===null?void 0:Te.get(petRef),Ze=Qe==="some";f(()=>{petRef!==null&&Ze&&setHealthPlanNoVet(petRef,false)},[petRef,Ze]);let Xe=h(()=>{let e=$e.current;e===null||typeof e.measureInWindow!="function"||e.measureInWindow((e,t,n,r)=>{Number.isFinite(t)&&r>0&&Ne({top:Math.round(t),height:Math.round(r)})})},[]);f(()=>{if(Ce===null||we!==null)return;let e=bn({sameOpen:Ce.key===de&&Ce.petRef===petRef,plan:V,planFailed:L.has(Ce.petRef),recordsPending:S&&Qe===void 0});if(e==="drop"&&Re(null),e!=="play")return;X("ask"),Xe();let t=setTimeout(()=>{Re(null),_e(e=>({mode:"intro",id:(e?.id??0)+1}))},ka);return()=>clearTimeout(t)},[Ce,we,de,petRef,V,L,S,Qe,X,Xe]),f(()=>{if(Ce===null)return;let e=setTimeout(()=>Re(e=>e===Ce?null:e),gn);return()=>clearTimeout(e)},[Ce]);let et=h(()=>{petRef!==null&&(Xe(),_e(e=>({mode:"records",id:(e?.id??0)+1})))},[petRef,Xe]),tt=h(e=>{(we?.mode??"intro")==="intro"&&ut({repo:je,kv:Ue,userRef:userRef}),ze.current==="novet"&&petRef!==null&&setHealthPlanNoVet(petRef,true),e.exit==="plan"?X("plan"):e.exit==="ask"&&X("ask"),e.notifications!==null&&Ae(t=>t===null?t:{...t,notified:e.notifications}),e.toast!==null&&ve(e.toast)},[we,je,Ue,userRef,petRef,X,ve]),nt=h(()=>_e(null),[]),rt=h(e=>{Ae({petRef:e.petRef,notified:null}),setHealthPlanNoVet(e.petRef,false),l?.(e)},[l]),it=h(e=>{e!==null&&(ze.current=e),xe(e)},[]);f(()=>{if(petRef===null){Pe(false);return}return Pe(healthPlanNoVet(petRef)),onHealthPlanNoVet((e,t)=>{e===petRef&&Pe(t)})},[petRef]),f(()=>onHealthPlanRecordsLanded(e=>setHealthPlanNoVet(e,false)),[]);let at=ke?.copy,lt=h(()=>introText({facts:introFacts(Y.page,t.petName),copy:{...mt,...at},blanks:0,resultsPending:false}),[Y.page,t.petName,at]),st=c(void 0),dt=h(()=>{De(false),X("plan"),petRef!==null&&ve(lt().toast.landed)},[X,petRef,ve,lt]);f(()=>{let e=st.current;if(st.current=Qe,Fe===null||petRef===null||Fe.petRef!==petRef||e!=="none"||Qe!=="some")return;let t={petRef:petRef,at:/* @__PURE__ */(new Date).toISOString()};s?.(t),notifyHealthPlanRecordsLanded(petRef),Ae(null),Fe.notified===true?De(true):dt()},[Qe,Fe,petRef,s,dt]);let pt=t.chat,ft=t.resultsPending??Y.page?.page?.wait!==void 0,ht=p(()=>{let e=O?{shellHeader:"tabs_bar",...pt?.presentation}:pt?.presentation;return ft?{...e,chatTopCard:"none"}:e},[ft,pt?.presentation,O]),bt=h(()=>X("plan"),[X]),yt=h(()=>X("records"),[X]),vt=h(()=>X("ask"),[X]),kt=t.plan,wt=p(()=>kt?.focus===void 0?void 0:{...kt.focus,onConnectRecords:kt.focus.onConnectRecords??yt,onWaitAction:kt.focus.onWaitAction??vt},[kt?.focus,yt,vt]),_t=t.petName??Y.page?.pet.name??"",St=_t.trim()||zt,xt=t.records,Ct=xt?.sheet,Rt=h(()=>{et()},[et]),Ft=typeof t.header=="object"?t.header.petPhotoUrl:void 0,[It,Dt]=u([]),Ot=It.length===0?null:It[It.length-1]??null,Bt=h(e=>{let t={...e};return Dt(e=>[...e,t]),()=>Dt(e=>e.filter(e=>e!==t))},[]),Nt={active:g&&G==="records",askBar:false,layout:O?"tabs_bar":"hub",...O?{shellPush:Bt}:{},...O&&Ft!==void 0?{petPhotoUrl:Ft}:{}},Lt={onRequestFromClinic:Rt,noVet:Oe,onOpenPlan:bt},jt=Tt(xt),Ut=Ct===false?false:{...Nt,...typeof Ct=="object"?Tt(Ct):{}},Wt=petRef===null?null:/* @__PURE__ */N(o,{...Lt,...jt,sheet:Ut,petRef:petRef,..._t===""?{}:{petName:_t},onAsk:xt?.onAsk??(e=>ie(e)),style:[{flex:1},xt?.style]},petRef),Mt=p(()=>fa(t.shellCopy),[t.shellCopy]),qt=h(e=>{let t=ha(Mt.notificationKicker,{petName:St,time:"{time}"}),n=Pt(e,{kicker:t,now:Et.now,ago:Et.timeAgoSuffix},Date.now());return n===null?false:(n.tab==="ask"?ie(n.prompt,n.card):te(n.tab),true)},[Mt,St,ie,te]),Kt=p(()=>({tab:G,open:te,ask:ie,requestRecords:et,push:Bt,openInboxItem:qt}),[G,te,ie,et,Bt,qt]),Jt=t.tabsRef;b(()=>{if(Jt!==void 0)return Jt.current=Kt,()=>{Jt.current===Kt&&(Jt.current=null)}},[Jt,Kt]);let Qt=Se==="tabs",en=t.header===void 0||t.header===false?null:t.header===true?{}:t.header,tn=h(e=>ie(e),[ie]),on=P?.TabsAskBar??ShellAskBar,an=e=>t.composer===false?null:/* @__PURE__ */N(on,{placeholder:Ot?.askPlaceholder??ha(e==="plan"?Mt.planPlaceholder:e==="vet"?P.askWords.vet:Mt.recordsPlaceholder,{petName:St}),...P&&pt?.attachments?{onUpload:vt,uploadLabel:P.askWords.upload}:{},field:Mt.field,send:Mt.send,onAsk:tn,testID:`everfur-askbar-${e}`}),ln=e=>G===e?{flex:1,minHeight:0}:{display:"none"};/* @__PURE__ */
|
|
125
|
+
return N(va.Provider,{value:Kt,children:/* @__PURE__ */$(w,{style:[{flex:1,minHeight:0,position:"relative"},t.style],testID:t.testID??"everfur-tabs",children:[
|
|
126
|
+
/* @__PURE__ */$(SdkTabletColumn,{style:{minHeight:0},children:[P!==null?/* @__PURE__ */N(P.TabsBarHeader,{options:en??{},pushed:Ot,petRef:petRef,petName:_t,copy:Mt,onClose:t.onClose,onAddToCalendar:t.vet?.onAddToCalendar}):en===null?null:/* @__PURE__ */N(ShellHeader,{options:en,tab:G,pushed:Ot,petRef:petRef,petName:_t,copy:Mt,onInboxOpen:qt}),Ot!==null?null:P!==null?/* @__PURE__ */N(P.SubTabs,{barRef:$e,tabs:H,sub:G,copy:v,badges:t.badges,onOpen:te}):/* @__PURE__ */N(TabBar,{kit:y,barRef:$e,tabs:H,sub:G,lit:Qt,copy:v,badges:t.badges,onOpen:te}),petRef===null||!_?null:/* @__PURE__ */N(PlanProbe,{petRef:petRef,pagePhase:Y.phase,page:Y.page,refreshPage:Y.refresh,watching:g&&(G==="plan"||M),onPlan:U,onPlanFailed:W}),petRef!==null&&S&&(Ce!==null||we!==null||Fe!==null)?/* @__PURE__ */N(RecordsProbe,{petRef:petRef,onRecords:Je}):null,
|
|
127
|
+
/* @__PURE__ */$(w,{style:{flex:1,minHeight:0},children:[
|
|
128
|
+
/* @__PURE__ */$(w,{style:ln("ask"),testID:"everfur-pane-ask",children:[
|
|
129
|
+
/* @__PURE__ */N(w,{style:{flex:1,minHeight:0},children:/* @__PURE__ */N(Vt.Provider,{value:pe,children:/* @__PURE__ */N(Ht.Provider,{value:O,children:/* @__PURE__ */N($t.Provider,{value:Po,children:/* @__PURE__ */N(e,{header:false,historyBar:Ra,...pt,style:[{flex:1,paddingTop:0},pt?.style],...ht===void 0?{}:{presentation:ht},...ft&&t.pendingStarterPrompts!==void 0?{starterPrompts:t.pendingStarterPrompts}:{},...petRef===null?{}:{petRef:petRef},lifecycle:ge,onOpenHealthPlan:bt,...O?{onOpenRecord:pt?.onOpenRecord??yt}:pt?.onOpenRecord?{onOpenRecord:pt.onOpenRecord}:{},...ae===null?{}:{initialAsk:ae.prompt,initialAskKey:ae.id,...ae.card===void 0?{}:{initialAskCard:ae.card}}})})})})},petRef??"none"),t.paneFooter?.ask]}),Q.has("plan")&&!M?/* @__PURE__ */$(w,{style:ln("plan"),testID:"everfur-pane-plan",children:[
|
|
130
|
+
/* @__PURE__ */N(E,{ref:Le,style:{flex:1},children:/* @__PURE__ */N(n,{scrollRef:Le,children:/* @__PURE__ */N(r,{...kt,...wt===void 0?{}:{focus:wt},petRef:petRef},q)})},petRef??"none"),t.paneFooter?.plan??an("plan")]}):null,Q.has("vet")&&H.includes("vet")?/* @__PURE__ */$(w,{style:ln("vet"),testID:"everfur-pane-vet",children:[
|
|
131
|
+
/* @__PURE__ */N(w,{style:{flex:1,minHeight:0},children:t.vet?.render===void 0?/* @__PURE__ */N(VetPane,{petRef:petRef,button:t.vet?.button,vetPhotoUrl:t.vet?.vetPhotoUrl,tabsBar:O}):t.vet.render({petRef:petRef,petName:_t})},petRef??"none"),t.paneFooter?.vet??(P&&an("vet"))]}):null,Q.has("records")?/* @__PURE__ */$(w,{style:ln("records"),testID:"everfur-pane-records",children:[
|
|
132
|
+
/* @__PURE__ */N(w,{style:{flex:1,minHeight:0},children:t.renderRecords===void 0?Wt:t.renderRecords(Wt)},petRef??"none"),t.paneFooter?.records??an("records")]}):null]}),me===null||d!==void 0?null:/* @__PURE__ */N(Toast,{kit:y,text:me.text},`toast-${me.id}`),Ee?/* @__PURE__ */N(EverfurRecordsLandedBanner,{text:lt().banner,...ke?.bannerIcon===void 0?{}:{icon:ke.bannerIcon},onLand:dt}):null]}),we===null||petRef===null?null:/* @__PURE__ */N(EverfurIntro,{petRef:petRef,mode:we.mode,page:Y.page,petName:t.petName??null,recordsConnected:we.mode==="intro"&&(Ze||!x),resultsPending:ft,...ke?.copy===void 0?{}:{copy:ke.copy},...ke?.blanks===void 0?{}:{blanks:ke.blanks},tabBar:Be,tabLabels:{ask:v.ask,plan:v.plan,records:v.records},onFrame:it,onClose:tt,onClosed:nt,onRequested:rt,...ke?.onEnableNotifications===void 0?{}:{onEnableNotifications:ke.onEnableNotifications},onUpload:ke?.onUpload??yt,...ke?.ownerName===void 0?{}:{ownerName:ke.ownerName},...ke?.onCaptureSignature===void 0?{}:{onCaptureSignature:ke.onCaptureSignature}},`intro-${we.id}`)]})})}function TabBar({kit:e,barRef:t,tabs:n,sub:r,lit:o,copy:i,badges:a,onOpen:l}){let{borderBottomWidth:s=0,borderBottomColor:d,...c}=e.view(".ph-sub"),u=n.length>3;/* @__PURE__ */
|
|
133
|
+
return $(w,{ref:t,accessibilityRole:"tablist",accessibilityLabel:en(n,i),style:c,testID:"everfur-tabs-bar",children:[s>0?/* @__PURE__ */N(w,{pointerEvents:"none",style:{position:"absolute",left:0,right:0,bottom:0,height:s,backgroundColor:d},testID:"everfur-tabs-edge"}):null,n.map((t,n)=>{let s=r===t,d=[".ph-sub button",`.ph-sub [data-sub="${t}"]`,s&&'.ph-sub button[aria-selected="true"]',o&&'#ph[data-in-frame="tabs"] .ph-sub button'];/* @__PURE__ */
|
|
134
|
+
return $(_,{accessibilityRole:"tab",accessibilityState:{selected:s},onPress:()=>l(t),style:[e.view(...d),e.col(".ph-sub",n),{alignItems:"center",justifyContent:"center"}],testID:`everfur-tab-${t}`,children:[
|
|
135
|
+
/* @__PURE__ */N(TabPill,{kit:e,id:t,index:n,lit:o}),
|
|
136
|
+
/* @__PURE__ */$(w,{style:{flexDirection:"row",alignItems:"center",maxWidth:"100%"},children:[
|
|
137
|
+
/* @__PURE__ */N(Text,{tier:"compact",numberOfLines:1,adjustsFontSizeToFit:true,minimumFontScale:.8,style:[e.text(...d),u?Aa:null,{flexShrink:1}],children:i[t]}),a?.[t]===true?/* @__PURE__ */N(w,{style:[e.view(".ph-sub button .ph-new"),Fa],testID:`everfur-tab-${t}-new`}):null]}),s?/* @__PURE__ */N(w,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:e.view('.ph-sub button[aria-selected="true"]::after',o&&'#ph[data-in-frame="tabs"] .ph-sub button::after')}):null]},t)})]})}function VetPane({petRef:petRef,button:e,vetPhotoUrl:t,tabsBar:n}){let r=n?ma()?.vet.VetHome:void 0;return r!==void 0?/* @__PURE__ */$(w,{style:{flex:1,minHeight:0},children:[
|
|
138
|
+
/* @__PURE__ */N(r,{petRef:petRef,...e?.usState!==void 0?{usState:e.usState}:{},...e?.onStartInApp!==void 0?{onStartInApp:e.onStartInApp}:{},vetPhotoUrl:t}),
|
|
139
|
+
/* @__PURE__ */N(a,{})]}):/* @__PURE__ */N(w,{style:{flex:1,minHeight:0,alignItems:"center",justifyContent:"center",padding:16},testID:"everfur-vet-home",children:/* @__PURE__ */N(l,{...e,petRef:petRef})})}function TabPill({kit:e,id:t,index:n,lit:r}){let o=c(new F.Value(r?1:0)).current,i=`.ph-sub [data-sub="${t}"]`,a=e.raw("k",i)??n,l=e.raw("tint",i)??(t==="vet"?e.colors.riskChip:void 0);f(()=>{let t=r?e.motion(".ph-sub button::before",'#ph[data-in-frame="tabs"] .ph-sub button::before'):e.motion(".ph-sub button::before"),n=typeof a=="number"?a:0;F.timing(o,{toValue:r?1:0,duration:t.dur,delay:r?t.delay+n*t.stagger:0,easing:e.reduced?xa:S.bezier(...wi),useNativeDriver:Ca}).start()},[r,e,a,o]);let s=e.reduced?{opacity:o}:{opacity:o,transform:[{scale:o.interpolate({inputRange:[0,1],outputRange:[Ci.pillScale,1]})}]};/* @__PURE__ */
|
|
140
|
+
return N(F.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:[e.view(".ph-sub button::before"),typeof l=="string"?{backgroundColor:l}:null,s],testID:`everfur-tab-pill-${t}`})}var Aa=/* @__PURE__ */Object.freeze({fontSize:15});function Toast({kit:e,text:t}){let n=c(new F.Value(0)).current;f(()=>{let r=e.motion(".ph-toast",".ph-toast.is-on");F.timing(n,{toValue:1,duration:r.dur,easing:S.bezier(...wi),useNativeDriver:Ca}).start();let o=O.announceForAccessibility;x.OS==="ios"&&typeof o=="function"&&o.call(O,t);let i=setTimeout(()=>{let t=e.motion(".ph-toast");F.timing(n,{toValue:0,duration:t.dur,easing:S.bezier(...wi),useNativeDriver:Ca}).start()},_a);return()=>clearTimeout(i)},[e,n,t]);let r=e.reduced?{opacity:n}:{opacity:n,transform:[{translateY:n.interpolate({inputRange:[0,1],outputRange:[Ci.toastY,0]})}]};/* @__PURE__ */
|
|
141
|
+
return N(F.View,{pointerEvents:"none",accessibilityLiveRegion:"polite",style:[e.view(".ph-toast"),{top:wa},r],testID:"everfur-tabs-toast",children:/* @__PURE__ */N(Text,{style:e.text(".ph-toast"),children:t})})}function useEverfurIntroSeen(){let{runtime:e,userRef:userRef}=gt();return p(()=>{let t=ot(e),n=e.registry.services.kv;return{shouldPlay:e=>ct({repo:t,kv:n,userRef:userRef,...e===void 0?{}:{signal:e}}),markSeen:()=>ut({repo:t,kv:n,userRef:userRef})}},[e,userRef])}var Ta=[{key:"look.color.primary",kind:"color",default:"#10462E"},{key:"look.color.on_primary",kind:"color",default:"#FFFFFF"},{key:"look.color.accent",kind:"color",default:"#07C168"},{key:"look.color.tint",kind:"color",default:"#DAF6E8"},{key:"look.color.chips",kind:"hexList",default:["#97E4C0","#F3CD73","#FFC3BC"]},{key:"look.color.surface",kind:"color",default:"#FFFFFF"},{key:"look.color.heading",kind:"color",default:"#10462E"},{key:"look.color.ink",kind:"color",default:"#000000"},{key:"look.color.muted",kind:"color",default:"#6B6B6B"},{key:"look.color.line",kind:"color",default:"#E4E4E4"},{key:"look.color.bubble",kind:"colorOrNone",default:"#10462E"},{key:"look.color.launcher",kind:"color",default:"#10462E"},{key:"look.color.on_launcher",kind:"color",default:"#07C168"},{key:"look.color.dot",kind:"color",default:"#07C168"},{key:"look.chat_wash",kind:"hexList",default:[]},{key:"look.font.heading",kind:"text",default:"Azeret"},{key:"look.font.body",kind:"text",default:"Azeret"},{key:"look.font.chat",kind:"text",default:"body"},{key:"look.font.label",kind:"text",default:"Azeret Mono"},{key:"look.font.heading_weight",kind:"number",default:700,oneOf:[500,600,700,800]},{key:"look.font.files",kind:"fontFiles",default:[{family:"Azeret",weight:"400",url:"brand/fonts/Azeret/Azeret-Regular.woff2"},{family:"Azeret",weight:"500",url:"brand/fonts/Azeret/Azeret-Medium.woff2"},{family:"Azeret",weight:"700",url:"brand/fonts/Azeret/Azeret-Bold.woff2"},{family:"Azeret Mono",weight:"400",url:"brand/fonts/Azeret-Mono/AzeretMono-Regular.woff2"}]},{key:"look.radius.card",kind:"number",default:20,range:[0,28]},{key:"look.radius.sheet",kind:"number",default:28,range:[0,28]},{key:"look.logo.wordmark",kind:"text",default:"brand/guide/img/wordmark-green.png"},{key:"look.logo.mark",kind:"text",default:"brand/guide/img/wordmark-green.png"},{key:"look.ask_icon",kind:"text",default:"everfur-ask"},{key:"look.lockup",kind:"choice",default:"side_by_side",oneOf:["side_by_side","stacked"]},{key:"text.partner_name",kind:"string",default:"Everfur",max:20},{key:"text.ask.name",kind:"string",default:"Everfur",max:16},{key:"text.ask.greeting",kind:"string",default:"What can we help {pet} with today?",max:56},{key:"text.ask.placeholder",kind:"string",default:"Ask anything about {pet}…",max:34},{key:"text.ask.dock_placeholder",kind:"string",default:"Ask {assistant} about {pet}…",max:34},{key:"text.ask.memory_chip",kind:"string",default:"Remembers {pet}",max:22},{key:"text.ask.from_history",kind:"string",default:"From {pet}'s history",max:28},{key:"text.ask.watch_for",kind:"string",default:"Watch for",max:24},{key:"text.ask.new_chat",kind:"string",default:"New chat",max:12},{key:"text.tabs.ask",kind:"string",default:"Ask",max:12},{key:"text.tabs.vet",kind:"string",default:"Vet",max:10},{key:"text.tabs.records",kind:"string",default:"Health",max:16},{key:"text.launcher.tip",kind:"string",default:"New: ask anything about your pets, 24/7.",max:48},{key:"text.nav.page_title",kind:"string",default:"",max:14,emptyOk:true},{key:"text.vet.book",kind:"string",default:"Book a video visit",max:22},{key:"text.vet.booked",kind:"string",default:"{pet}'s visit is booked",max:40},{key:"text.vet.see_times",kind:"string",default:"Find a time",max:16},{key:"text.vet.join",kind:"string",default:"Get ready",max:14},{key:"text.vet.add_calendar",kind:"string",default:"Add to calendar",max:20},{key:"text.records.empty_title",kind:"string",default:"Add {pet}'s records",max:36},{key:"text.records.empty_body",kind:"string",default:"Records can come from more than one clinic over a lifetime.",max:160},{key:"text.records.request",kind:"string",default:"Request from a clinic",max:34},{key:"text.records.upload",kind:"string",default:"Upload a document",max:24},{key:"text.cap.counter",kind:"string",default:"{left} of {cap} free messages left this month",max:48},{key:"text.cap.reached",kind:"string",default:"You've used your {cap} free messages this month.",max:64},{key:"text.cap.button",kind:"string",default:"See {plan}",max:24},{key:"text.members.title",kind:"string",default:"Ask anything about your pets, anytime",max:48},{key:"text.members.badge",kind:"string",default:"Members only",max:32},{key:"text.members.button",kind:"string",default:"Join membership",max:24},{key:"text.ui.not_now",kind:"string",default:"Not now",max:12},{key:"text.notify.records_ready",kind:"string",default:"When records arrive",max:28,reference:true},{key:"text.notify.visit_reminder",kind:"string",default:"Visit reminders",max:28,reference:true},{key:"text.notify.vet_reply",kind:"string",default:"Replies from the vet",max:28,reference:true},{key:"text.notify.care_due",kind:"string",default:"Care that's due",max:28,reference:true},{key:"layout.nav",kind:"choice",default:"bottom_tabs",oneOf:["bottom_tabs","top_tabs","sections_page","chat_first"]},{key:"layout.sections",kind:"itemList",default:["ask","records"],items:["ask","vet","records"]},{key:"layout.vet_on_ask",kind:"choice",default:"top",oneOf:["top","header_button","own_tab","in_answers"]},{key:"layout.vet_badge",kind:"choice",default:"tab_dot",oneOf:["none","header_pill","tab_dot"]},{key:"layout.memory_chip",kind:"boolean",default:false},{key:"layout.severity",kind:"choice",default:"four_levels",oneOf:["off","three_levels","four_levels"]},{key:"layout.suggestions",kind:"choice",default:"center",oneOf:["center","above_bar"]},{key:"layout.opens_on",kind:"choice",default:"new_chat",oneOf:["new_chat","last_chat"]},{key:"layout.answer_byline",kind:"choice",default:"avatar",oneOf:["none","avatar","wordmark"]},{key:"layout.launcher",kind:"choice",default:"none",oneOf:["none","floating_button"]},{key:"layout.presentation",kind:"choice",default:"in_tab",oneOf:["in_tab","full_screen"]},{key:"features.chat",kind:"boolean",default:true},{key:"features.records",kind:"boolean",default:true},{key:"features.video_visits",kind:"boolean",default:true},{key:"features.prescriptions",kind:"boolean",default:true},{key:"features.shop",kind:"choice",default:"everfur_care",oneOf:["off","everfur_care","partner_pick","partner_cart"],reference:true},{key:"features.partner_data",kind:"itemList",default:[],items:["park_checkins","camera_events","dna_results"]},{key:"features.texting",kind:"boolean",default:true,reference:true},{key:"features.texting_cap",kind:"numberOrNull",default:null,range:[1,999],reference:true},{key:"features.notify.records_ready",kind:"boolean",default:true,reference:true},{key:"features.notify.visit_reminder",kind:"boolean",default:true,reference:true},{key:"features.notify.vet_reply",kind:"boolean",default:true,reference:true},{key:"features.notify.care_due",kind:"boolean",default:true,reference:true},{key:"access.mode",kind:"choice",default:"open",oneOf:["open","free_cap","members_only"]},{key:"access.free_messages",kind:"number",default:0,range:[0,50]},{key:"access.locked",kind:"itemList",default:["video_visits"],items:["video_visits","texting","link_records","previous_results","dashboard","goals"]},{key:"plan.name",kind:"string",default:"Everfur Pro",max:20},{key:"plan.sold_by",kind:"choice",default:"everfur",oneOf:["everfur","partner"]},{key:"plan.price_display",kind:"choice",default:"full",oneOf:["full","monthly_equivalent","hidden"]},{key:"plan.price_year",kind:"money",default:"$144.99"},{key:"plan.price_month",kind:"money",default:"$15.00"},{key:"vet.visits_per_year",kind:"numberOrNull",default:null,range:[1,24]},{key:"vet.extra_visit_price",kind:"moneyOrNull",default:null},{key:"vet.name",kind:"string",default:"Licensed Everfur vet",max:28},{key:"vet.title",kind:"string",default:"",max:32,emptyOk:true},{key:"vet.photo",kind:"text",default:"prototypes/televet-photos/r5/vet.jpg"},{key:"units.weight",kind:"choice",default:"lb",oneOf:["lb","kg"]},{key:"units.temperature",kind:"choice",default:"F",oneOf:["F","C"]},{key:"units.distance",kind:"choice",default:"mi",oneOf:["mi","km"],reference:true},{key:"units.currency",kind:"choice",default:"$",oneOf:["$","US$"]}],Ia={"look.color.primary":"#10462E","look.color.on_primary":"#FFFFFF","look.color.accent":"#07C168","look.color.tint":"#DAF6E8","look.color.chips":["#97E4C0","#F3CD73","#FFC3BC"],"look.color.surface":"#FFFFFF","look.color.heading":"#10462E","look.color.ink":"#000000","look.color.muted":"#6B6B6B","look.color.line":"#E4E4E4","look.color.bubble":"#10462E","look.color.launcher":"#10462E","look.color.on_launcher":"#07C168","look.color.dot":"#07C168","look.chat_wash":[],"look.font.heading":"Azeret","look.font.body":"Azeret","look.font.chat":"body","look.font.label":"Azeret Mono","look.font.heading_weight":700,"look.font.files":[{family:"Azeret",weight:"400",url:"brand/fonts/Azeret/Azeret-Regular.woff2"},{family:"Azeret",weight:"500",url:"brand/fonts/Azeret/Azeret-Medium.woff2"},{family:"Azeret",weight:"700",url:"brand/fonts/Azeret/Azeret-Bold.woff2"},{family:"Azeret Mono",weight:"400",url:"brand/fonts/Azeret-Mono/AzeretMono-Regular.woff2"}],"look.radius.card":20,"look.radius.sheet":28,"look.logo.wordmark":"brand/guide/img/wordmark-green.png","look.logo.mark":"brand/guide/img/wordmark-green.png","look.ask_icon":"everfur-ask","look.lockup":"side_by_side","text.partner_name":"Everfur","text.ask.name":"Everfur","text.ask.greeting":"What can we help {pet} with today?","text.ask.placeholder":"Ask anything about {pet}…","text.ask.dock_placeholder":"Ask {assistant} about {pet}…","text.ask.memory_chip":"Remembers {pet}","text.ask.from_history":"From {pet}'s history","text.ask.watch_for":"Watch for","text.ask.new_chat":"New chat","text.tabs.ask":"Ask","text.tabs.vet":"Vet","text.tabs.records":"Health","text.launcher.tip":"New: ask anything about your pets, 24/7.","text.nav.page_title":"","text.vet.book":"Book a video visit","text.vet.booked":"{pet}'s visit is booked","text.vet.see_times":"Find a time","text.vet.join":"Get ready","text.vet.add_calendar":"Add to calendar","text.records.empty_title":"Add {pet}'s records","text.records.empty_body":"Records can come from more than one clinic over a lifetime.","text.records.request":"Request from a clinic","text.records.upload":"Upload a document","text.cap.counter":"{left} of {cap} free messages left this month","text.cap.reached":"You've used your {cap} free messages this month.","text.cap.button":"See {plan}","text.members.title":"Ask anything about your pets, anytime","text.members.badge":"Members only","text.members.button":"Join membership","text.ui.not_now":"Not now","text.notify.records_ready":"When records arrive","text.notify.visit_reminder":"Visit reminders","text.notify.vet_reply":"Replies from the vet","text.notify.care_due":"Care that's due","layout.nav":"bottom_tabs","layout.sections":["ask","records"],"layout.vet_on_ask":"top","layout.vet_badge":"tab_dot","layout.memory_chip":false,"layout.severity":"four_levels","layout.suggestions":"center","layout.opens_on":"new_chat","layout.answer_byline":"avatar","layout.launcher":"none","layout.presentation":"in_tab","features.chat":true,"features.records":true,"features.video_visits":true,"features.prescriptions":true,"features.shop":"everfur_care","features.partner_data":[],"features.texting":true,"features.texting_cap":null,"features.notify.records_ready":true,"features.notify.visit_reminder":true,"features.notify.vet_reply":true,"features.notify.care_due":true,"access.mode":"open","access.free_messages":0,"access.locked":["video_visits"],"plan.name":"Everfur Pro","plan.sold_by":"everfur","plan.price_display":"full","plan.price_year":"$144.99","plan.price_month":"$15.00","vet.visits_per_year":null,"vet.extra_visit_price":null,"vet.name":"Licensed Everfur vet","vet.title":"","vet.photo":"prototypes/televet-photos/r5/vet.jpg","units.weight":"lb","units.temperature":"F","units.distance":"mi","units.currency":"$"},Ea={"ask.emergency":"Emergency? Call a vet.","ask.privacy":"Confidential. {partner} can't see this chat.","ask.you":"You","ask.today":"Today","ask.follow_ups":"Follow-up questions","ask.attach.photo":"Photo","ask.attach.camera":"Camera","banner.four.0":"Good to know","banner.four.1":"Monitor at home","banner.four.2":"See a vet today","banner.four.3":"Call a vet now","banner.three.0":"All clear","banner.three.1":"Monitor at home","banner.three.2":"See a vet now","banner.body.lowest":"Just general info about {pet}. Nothing here needs action right now.","locked.video_visits":"Video visits with a vet","locked.texting":"Ask by text","locked.link_records":"Link {pet}'s vet records","locked.previous_results":"Previous results","locked.dashboard":"Health dashboard","locked.goals":"Goals for {pet}","plan.price.year":"a year","plan.price.month":"/month","plan.price.billed":"Billed Annually","vet.wellness_tab":"Wellness","vet.opening":"Next opening {when}","vet.next_visit":"Next video visit","vet.badge":"Booked","vet.length":"10 minutes","vet.kind_wellness":"wellness video call","vet.reschedule":"Reschedule","vet.cancel":"Cancel","vet.note":"The vet has {pet}'s records and what you've asked {assistant}. The visit opens right here, 15 minutes before.","vet.book_another":"Book another visit","vet.past_visits":"Past visits","vet.allowance":"{left} of {visits} video visits left this year","vet.extra":"Extra visits are {price} each","vet.gate.visits":"{pet} lives in {state}: a licensed vet can see {them} by video.","vet.gate.wellness":"{pet} lives in {state}: a vet gives general advice by video. No prescriptions.","vet.rx":"Prescriptions, if the vet decides {pet} needs one.","vet.card.when":"Video visit, tomorrow from {when}","vet.card.wellness_when":"Wellness video call, general advice","vet.card.wellness":"A vet can talk it through with you by video: general advice, no exam.","vet.next.text":"We'll text you and send a notification 30 minutes before.","vet.next.notify":"We'll send a notification 30 minutes before.","vet.next.summary":"{pet}'s summary goes to the vet ahead of the call.","vet.next.join":"Join right here in the app. No links to hunt for.","vet.done":"Done","vet.legal":"Video visits are with a licensed veterinarian.","vet.legal.rx":"Prescriptions where allowed, starting with California.","vet.legal.emergency":"In an emergency, go to the nearest emergency animal hospital.","vet.privacy":"Everfur is a separate provider. Your visits and messages are confidential, and {partner} can't see them.","records.status.in_range":"In range","records.status.watch":"Watch","records.vitals.temperature":"Temperature","records.vitals.heart_rate":"Heart rate","records.vitals.weight":"Weight","records.needs":"Needs a look","records.care":"Upcoming care","records.tiles":"Records & history","records.tile.labs":"Labs & bloodwork","records.tile.vaccines":"Vaccines","records.tile.visits":"Visits & records","records.tile.screenings":"Screenings","records.chart.over":"Over","records.chart.under":"Under","records.history":"History","pdata.park_checkins":"Park check-ins","pdata.camera_events":"Camera events","pdata.dna_results":"{partner} DNA","pdata.tag.park_checkins":"Park check-in","pdata.tag.camera_events":"Camera","pdata.tag.dna_results":"{partner} DNA","ask.tag.records":"Records","vet.book_another.for":"For {pet}","upload.title":"Upload a document","upload.body":"A PDF, or a photo of a paper record. Add them all; we sort them by date.","upload.photo":"Take a photo","upload.photo.note":"of a paper record","upload.library":"Choose from photos","upload.file":"Choose a file","upload.file.note":"PDF","load.error":"Couldn't load","load.retry":"Try again"},Da={vetOnAskByNav:{bottom_tabs:["top","own_tab","header_button","in_answers"],top_tabs:["own_tab","header_button","in_answers"],sections_page:["own_tab","in_answers"],chat_first:["header_button","in_answers"]},presentationByNav:{bottom_tabs:["in_tab"],top_tabs:["in_tab","full_screen"],sections_page:["in_tab"],chat_first:["in_tab"]}};function vetLevelFor(e,t){if(t==null||(t.country??"US").toUpperCase()!=="US")return"none";let n=(t.state??"").toUpperCase();return n===""?"none":e.videoAndRx.includes(n)?"visits":e.adviceOnly.includes(n)?"wellness":"none"}function resolveLayout(e,t){let n=[],r=e["layout.nav"],o=e["features.video_visits"]&&t!=="none",i=e["layout.vet_on_ask"],a=Da.vetOnAskByNav[r];e["features.video_visits"]&&!a.includes(i)&&(n.push("layout.vet_on_ask"),i=e["layout.sections"].includes("vet")&&a.includes("own_tab")?"own_tab":"in_answers"),o||(i="none");let l=/* @__PURE__ */new Set,s=[];for(let t of e["layout.sections"]){if(l.has(t)){n.push("layout.sections");continue}l.add(t),!(t==="vet"&&i!=="own_tab")&&(t==="ask"&&!e["features.chat"]||t==="records"&&!e["features.records"]||s.push(t))}i==="own_tab"&&!s.includes("vet")&&s.push("vet"),r==="chat_first"&&!s.includes("ask")&&(n.push("layout.sections"),s.unshift("ask")),s.length===0&&s.push(e["features.records"]&&!e["features.chat"]?"records":"ask");let d=e["layout.presentation"];(!Da.presentationByNav[r].includes(d)||d==="full_screen"&&e["layout.launcher"]!=="floating_button")&&(d!=="in_tab"&&n.push("layout.presentation"),d="in_tab");let c=e["layout.vet_badge"];c==="header_pill"&&d==="full_screen"&&i==="own_tab"&&(c="tab_dot");let u=d==="full_screen"?"close":r==="chat_first"?"down":"none";/* @__PURE__ */
|
|
142
|
+
return Object.freeze({nav:r,sections:/* @__PURE__ */Object.freeze(s),vetOnAsk:i,vetBadge:c,presentation:d,launcher:e["layout.launcher"]==="floating_button",closeControl:u,adjusted:/* @__PURE__ */Object.freeze([...new Set(n)])})}var Oa="your pet",Pa=/\{([a-z]+)\}/g;function za(e,t){return/(^|[.!?]\s+)$/.test(e.slice(0,t))}function fillSdkText(e,t,n={}){let r=typeof n.pet=="string"?n.pet.trim():"",o={partner:t["text.partner_name"],plan:t["plan.name"],assistant:t["text.ask.name"],pet:r===""?void 0:r,cap:String(n.cap??t["access.free_messages"]),left:n.left===void 0?void 0:String(n.left),visits:n.visits===void 0?void 0:String(n.visits),price:n.price,state:n.state,them:n.them??"them",when:n.when};return e.replace(Pa,(t,n,r)=>{let i=o[n];return i!==void 0?i:n==="pet"?za(e,r)?Oa.charAt(0).toUpperCase()+Oa.slice(1):Oa:t})}function sdkText(e,t,n){return fillSdkText(e.settings[t],e.settings,n)}function sdkFixed(e,t,n){return fillSdkText(e.fixedStrings[t],e.settings,n)}function isInsidePartner(e){return e["text.partner_name"]!=="Everfur"}function objectPronoun(e){let t=(e??"").toLowerCase();return t==="female"||t==="f"?"her":t==="male"||t==="m"?"him":"them"}function askAccess(e,t,n){let r=e.settings;if(t==="member")return{kind:"open"};if(r["access.mode"]==="members_only")return{kind:"members_only"};if(r["access.mode"]==="free_cap"){let t=r["access.free_messages"];if(t<1)return{kind:"open"};let o=Math.max(0,t-Math.max(0,Math.floor(n)));return o===0?{kind:"cap_reached",cap:t}:{kind:"counter",left:o,cap:t,line:sdkText(e,"text.cap.counter",{cap:t,left:o})}}return{kind:"open"}}function isLocked(e,t,n){return t==="member"||e.settings["access.mode"]==="open"&&t==="unknown"?false:e.settings["access.locked"].includes(n)}function capMonth(e){let t=e.getUTCMonth()+1;return`${e.getUTCFullYear()}-${t<10?"0":""}${t}`}var Ba={video_visits:"locked.video_visits",texting:"locked.texting",link_records:"locked.link_records",previous_results:"locked.previous_results",dashboard:"locked.dashboard",goals:"locked.goals"};function formatPrice(e,t){let n=t.replace(/^(US)?\$/,"");return`${e["units.currency"]}${n}`}function priceLines(e){let t=e.settings;switch(t["plan.price_display"]){case"full":return[`${formatPrice(t,t["plan.price_year"])} ${sdkFixed(e,"plan.price.year")}`];case"monthly_equivalent":return[`${formatPrice(t,t["plan.price_month"])}${sdkFixed(e,"plan.price.month")}`,sdkFixed(e,"plan.price.billed")];default:return[]}}function planSheet(e,t){let n=e.settings,r=t===void 0?{}:{pet:t};/* @__PURE__ */
|
|
143
|
+
return Object.freeze({kind:"plan",title:n["access.mode"]==="free_cap"?sdkText(e,"text.cap.reached",{cap:n["access.free_messages"]}):null,badge:null,price:priceLines(e),locked:n["access.locked"].map(t=>sdkFixed(e,Ba[t],r)),button:sdkText(e,"text.cap.button"),dismiss:sdkText(e,"text.ui.not_now"),soldBy:n["plan.sold_by"]})}function membersSheet(e){let t=e.settings;/* @__PURE__ */
|
|
144
|
+
return Object.freeze({kind:"members",title:sdkText(e,"text.members.title"),badge:sdkText(e,"text.members.badge"),price:priceLines(e),locked:[],button:sdkText(e,"text.members.button"),dismiss:sdkText(e,"text.ui.not_now"),soldBy:t["plan.sold_by"]})}function vetTabLabel(e,t){return t==="wellness"?sdkFixed(e,"vet.wellness_tab"):sdkText(e,"text.tabs.vet")}var Na="Licensed Everfur vet";function prescriptionsAllowed(e,t){return e["features.prescriptions"]&&t==="visits"}function vetHome(e,t){let n=e.settings,r=n["vet.name"],o=n["vet.photo"].trim()===""?null:n["vet.photo"],i=r!==Na,a=t.pet===void 0?{}:{pet:t.pet},l=n["vet.visits_per_year"],s=l!==null&&t.visitsUsed!==null&&t.visitsUsed!==void 0?sdkFixed(e,"vet.allowance",{left:Math.max(0,l-t.visitsUsed),visits:l}):null,d=n["vet.extra_visit_price"],c=t.stateName?.trim()??"",u={...a,state:c,them:objectPronoun(t.petSex)},p=c!==""&&t.level==="visits"?sdkFixed(e,"vet.gate.visits",u):c!==""&&t.level==="wellness"?sdkFixed(e,"vet.gate.wellness",u):null,f=[sdkFixed(e,"vet.legal")];return n["features.prescriptions"]&&f.push(sdkFixed(e,"vet.legal.rx")),f.push(sdkFixed(e,"vet.legal.emergency")),/* @__PURE__ */Object.freeze({level:t.level,name:r,title:n["vet.title"].trim()===""?null:n["vet.title"],photo:o,initial:o===null&&i?r.trim().charAt(0).toUpperCase():null,book:sdkText(e,"text.vet.book"),seeTimes:sdkText(e,"text.vet.see_times"),allowance:s,extra:d===null?null:sdkFixed(e,"vet.extra",{price:formatPrice(n,d)}),gate:p,rx:prescriptionsAllowed(n,t.level)?sdkFixed(e,"vet.rx",a):null,legal:/* @__PURE__ */Object.freeze(f),privacy:isInsidePartner(n)?sdkFixed(e,"vet.privacy"):null})}function chipInk(e,t){return contrastRatio(t,e)>=contrastRatio("#FFFFFF",e)?t:"#FFFFFF"}function bubbleInk(e,t){return contrastRatio(e,"#FFFFFF")>=contrastRatio(e,t)?"#FFFFFF":t}function buttonFill(e){let t=e["look.color.primary"];return contrastRatio(t,e["look.color.surface"])<1.3?{fill:e["look.color.heading"],ink:"#FFFFFF"}:{fill:t,ink:e["look.color.on_primary"]}}function memoryChip(e,t){return e.settings["layout.memory_chip"]?sdkText(e,"text.ask.memory_chip",t===void 0?{}:{pet:t}):null}function partnerDataSources(e){let t={park_checkins:"pdata.park_checkins",camera_events:"pdata.camera_events",dna_results:"pdata.dna_results"};/* @__PURE__ */
|
|
145
|
+
return Object.freeze(e.settings["features.partner_data"].map(n=>sdkFixed(e,t[n])))}var $a="https:\\/\\/sdk(?:-[a-z]+)?\\.everfur\\.com";function La(e){return e.replace(/[.*+?^${}()|[\]\\/]/g,"\\$&")}var ja=typeof __EVERFUR_BRAND_CDN_ORIGIN__=="string"&&__EVERFUR_BRAND_CDN_ORIGIN__.length>0?La(__EVERFUR_BRAND_CDN_ORIGIN__):$a;var Ua=/^#[0-9A-Fa-f]{6}$/,Wa=/\{([a-z]+)\}/g;function Va(e){return[...e.matchAll(Wa)].map(e=>e[1])}var Ma=/* @__PURE__ */new Set(["pet","partner","plan","assistant","cap"]),qa=/* @__PURE__ */new Set(["text.partner_name","text.ask.name","plan.name"]);function Ha(e,t){return qa.has(e)?!/[{}]/.test(t):Va(t).every(t=>Ma.has(t)||t==="left"&&e==="text.cap.counter")}function Ka(e,t){let n=new Set(Va(e));return Va(t).every(e=>n.has(e)||Ma.has(e))}var Ya=/^(US)?\$\d{1,3}(,\d{3})*(\.\d{2})?$/;function Ga(e){return typeof e=="string"&&Ua.test(e)}function Ja(e){return typeof e=="number"&&Number.isFinite(e)}function Qa(e,t){return!(e.range!==void 0&&(t<e.range[0]||t>e.range[1])||e.oneOf!==void 0&&!e.oneOf.includes(t))}var Za=/* @__PURE__ */new RegExp(`^${ja}\\/brand\\/[0-9a-f]{16}\\.woff2$`);function Xa(e){if(!Array.isArray(e))return;let t=[];for(let n of e){if(n===null||typeof n!="object")continue;let{family:e,weight:r,url:o}=n;if(typeof e!="string"||e.trim()===""||typeof o!="string"||!Za.test(o))continue;let i=typeof r=="number"?String(r):typeof r=="string"?r:"400";t.push(/* @__PURE__ */Object.freeze({family:e,weight:i,url:o}))}/* @__PURE__ */
|
|
146
|
+
return Object.freeze(t)}function parseSettingValue(e,t){switch(e.kind){case"color":return Ga(t)?t.toUpperCase():void 0;case"colorOrNone":return t==="none"?"none":Ga(t)?t.toUpperCase():void 0;case"hexList":{if(!Array.isArray(t))return;let n=t.filter(Ga).map(e=>e.toUpperCase());return n.length!==t.length||n.length>4||e.key==="look.color.chips"&&n.length<1||e.key==="look.chat_wash"&&n.length===1?void 0:/* @__PURE__ */Object.freeze(n)}case"fontFiles":return Xa(t);case"boolean":return typeof t=="boolean"?t:void 0;case"number":return Ja(t)&&Qa(e,t)?t:void 0;case"numberOrNull":return t===null?null:Ja(t)&&Qa(e,t)?t:void 0;case"money":return typeof t=="string"&&Ya.test(t)?t:void 0;case"moneyOrNull":return t===null?null:typeof t=="string"&&Ya.test(t)?t:void 0;case"choice":return e.oneOf!==void 0&&e.oneOf.includes(t)?t:void 0;case"itemList":{if(!Array.isArray(t))return;let n=e.items??[],r=t.filter(e=>typeof e=="string"&&n.includes(e));return r.length!==t.length||new Set(r).size!==r.length&&e.key!=="layout.sections"?void 0:/* @__PURE__ */Object.freeze([...r])}case"string":return typeof t!="string"||t.trim()===""&&e.emptyOk!==true?void 0:Ha(e.key,t)?t:void 0;case"text":return typeof t=="string"?t:void 0;default:return}}function resolveSettings(e){let t=e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{},n={...Ia},r=[];for(let e of Ta){if(!Object.prototype.hasOwnProperty.call(t,e.key))continue;let o=parseSettingValue(e,t[e.key]);o===void 0?r.push(e.key):n[e.key]=o}return{settings:/* @__PURE__ */Object.freeze(n),rejected:/* @__PURE__ */Object.freeze(r)}}function resolveFixedStrings(e){let t={...Ea};if(e!==null&&typeof e=="object"&&!Array.isArray(e))for(let[n,r]of Object.entries(e))!Object.prototype.hasOwnProperty.call(Ea,n)||typeof r!="string"||r===""||Ka(Ea[n],r)&&(t[n]=r);/* @__PURE__ */
|
|
147
|
+
return Object.freeze(t)}function el(e){return Array.isArray(e)?/* @__PURE__ */Object.freeze(e.filter(e=>typeof e=="string").map(e=>e.toUpperCase())):/* @__PURE__ */Object.freeze([])}function parseStateGate(e){let t=e!==null&&typeof e=="object"?e:{};/* @__PURE__ */
|
|
148
|
+
return Object.freeze({videoAndRx:el(t.video_and_rx),adviceOnly:el(t.advice_only)})}function parseSdkConfig(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e,n=t.revision,r=t.settings;if(!Ja(n)||r===null||typeof r!="object"||Array.isArray(r))return null;let o=Ja(t.schema_version)?t.schema_version:3;/* @__PURE__ */
|
|
149
|
+
return Object.freeze({schemaVersion:o,partner:typeof t.partner=="string"?t.partner:"",revision:n,settings:resolveSettings(r).settings,fixedStrings:resolveFixedStrings(t.fixed_strings),stateGate:parseStateGate(t.state_gate)})}function serializeSdkConfig(e){return JSON.stringify({schema_version:e.schemaVersion,partner:e.partner,revision:e.revision,settings:e.settings,fixed_strings:e.fixedStrings,state_gate:{video_and_rx:e.stateGate.videoAndRx,advice_only:e.stateGate.adviceOnly}})}var tl=/* @__PURE__ */Object.freeze(["composerInput","sendButton","userBubble","assistantBubble","vetBubble","recordCard","vetVisitButton","primaryButton","link","header","banner","chip","card","input","tab","bookingStep","dialog","cartBar","planCard","planReasonLabel","planWash","planChip"]);var nl=/* @__PURE__ */Object.freeze(["display_name","logo_url","logo_url_dark","primary_color","accent_color","primary_color_dark","accent_color_dark","brightness","color_scheme","font_family","font_url","fonts","font_urls","chat_placeholder","surface_style","radius_scale","accessibility_max_font_scale","slots","background_color","background_color_dark","text_color","text_color_dark","danger_color","danger_color_dark","font_size_base","border_radius","spacing_unit","success_color","success_color_dark","warning_color","warning_color_dark","info_color","info_color_dark","heading_font_family","font_weight_body","font_weight_heading","line_height","assistant_avatar_url","font_sources"]);function hardenHttpsUrl(e){if(e===null)return null;let t=e.trim();return t.length===0?null:/^https:\/\/\S+$/i.test(t)?t:null}var rl=/* @__PURE__ */new RegExp(`^${ja}\\/brand\\/[0-9a-f]{16}\\.(png|jpg|webp)$`);function hardenBrandAssetUrl(e){let t=hardenHttpsUrl(e);return t!==null&&rl.test(t)?t:null}var ol="everfur-ask";function il(e){let t=e.weight.trim().split(/\s+/).map(Number).filter(e=>Number.isFinite(e)),n=t[0]??400,r=t[1]??n,o=[];for(let e=Math.ceil(n/100)*100;e<=r;e+=100)e>=100&&e<=900&&o.push(String(e));return o.length===0?["400"]:o}function fontSourcesOf(e){let t=[];for(let n of e["look.font.files"])for(let e of il(n))t.push(/* @__PURE__ */Object.freeze({family:n.family,src:n.url,weight:e}));/* @__PURE__ */
|
|
145
150
|
return Object.freeze(t)}function slotsOf(e){let t=buttonFill(e),n=e["look.color.heading"],r=e["look.color.bubble"],o=e["look.color.chips"][0]??e["look.color.tint"],i=e["look.radius.card"];/* @__PURE__ */
|
|
146
|
-
return Object.freeze({primaryButton:{backgroundColor:t.fill,textColor:t.ink},sendButton:{backgroundColor:t.fill,textColor:t.ink},vetVisitButton:{backgroundColor:t.fill,textColor:t.ink},userBubble:r==="none"?{backgroundColor:e["look.color.surface"],textColor:e["look.color.ink"]}:{backgroundColor:r,textColor:bubbleInk(r,e["look.color.ink"])},composerInput:{borderColor:n,backgroundColor:"#FFFFFF",textColor:e["look.color.ink"]},chip:{backgroundColor:o,textColor:chipInk(o,n)},card:{backgroundColor:"#FFFFFF",borderColor:e["look.color.line"],borderRadius:i,textColor:e["look.color.ink"]},recordCard:{backgroundColor:"#FFFFFF",borderColor:e["look.color.line"],borderRadius:i},dialog:{borderRadius:e["look.radius.sheet"]},header:{backgroundColor:e["look.color.surface"],textColor:n},tab:{textColor:n,borderColor:e["look.color.primary"]},link:{textColor:e["look.color.accent"]}})}var
|
|
147
|
-
return Object.freeze({schemaVersion:2,displayName:t["text.partner_name"],logoUrl:t["look.logo.mark"],primaryColor:t["look.color.primary"],accentColor:t["look.color.accent"],brightness:"light",fontFamily:t["look.font.body"],fontUrl:null,headingFontFamily:t["look.font.heading"],fontWeightHeading:String(r),fontSources:fontSourcesOf(t),placeholder:fillSdkText(t["text.ask.placeholder"],t,{pet:"{pet}"}),placeholderFillsPet:true,hidePoweredBy:false,backgroundColor:t["look.color.surface"],textColor:t["look.color.ink"],borderRadius:t["look.radius.card"],assistantAvatarUrl:n===Ra?null:n,slots:slotsOf(t),presentation:{chatComposerMic:true,chatComposerUpload:true,chatComposerStyle:"compact",chatComposerPlaceholder:"generic",safetyDisclaimerPlacement:"composer",chatGeneralBanner:t["layout.severity"]!=="off"},lockedFields:Aa})}var Ia="/widget/v1/sdk-config",Ta="x-everfur-sdk-config-schema";function sdkConfigRequest(e){let t={[Ta]:String(3)};return typeof e=="number"&&Number.isFinite(e)&&(t["if-none-match"]=`"r${e}.s${3}"`),{method:"GET",path:Ia,headers:t}}async function fetchSdkConfig(e,t){let n=await e.send("sdkConfig.fetch",sdkConfigRequest(t));if(!n.ok)return n.error.httpStatus===304?{kind:"notModified"}:n.error.httpStatus===404?{kind:"notEnabled"}:{kind:"failed",error:n.error};let r=parseSdkConfig(n.value);return r===null?{kind:"failed",error:makeEverfurError("internalError",{retryable:true,wireMessage:"malformed sdk-config response"})}:{kind:"updated",config:r}}function Ea(e){let t=[];for(let n of e){let e=n.codePointAt(0);e<128?t.push(e):e<2048?t.push(192|e>>6,128|e&63):e<65536?t.push(224|e>>12,128|e>>6&63,128|e&63):t.push(240|e>>18,128|e>>12&63,128|e>>6&63,128|e&63)}return t}function Da(e){let t=3421674724,n=2216829733;for(let r of Ea(e)){n=(n^r)>>>0;let e=n*435,o=Math.floor(e/4294967296),i=e>>>0;t=t*435+o+n*256>>>0,n=i}return t.toString(16).padStart(8,"0")+n.toString(16).padStart(8,"0")}var Oa="everfur.sdkconfig.v3.";function za(e){return`${Oa}${Da(e)}`}function Pa(e,t,n){return`everfur.sdkconfig.freecap.v1.${Da(`${e}|${t}|${n}`)}`}var Ba=300*1e3,Na=/* @__PURE__ */Object.freeze({status:"idle",active:null,pending:null});async function $a(e,t){try{let n=await e.getItem(za(t));return n===null?null:parseSdkConfig(JSON.parse(n))}catch{return null}}async function La(e,t,n){try{n===null?await e.removeItem(za(t)):await e.setItem(za(t),serializeSdkConfig(n))}catch{}}function ja(e){let t=Na,n=false,r=null,o=false,i=null,a=false,l=e.now??Date.now,s=/* @__PURE__ */new Set,d=/* @__PURE__ */new Map,c=/* @__PURE__ */new Map,u=Promise.resolve(),p=e=>{if(!n){t=/* @__PURE__ */Object.freeze({...t,...e});for(let e of[...s])try{e()}catch{}}},f=t=>{if(d.has(t))return Promise.resolve();let n=c.get(t);return n===void 0&&(n=(async()=>{let n=0;try{let r=await e.kv.getItem(t),o=r===null?0:Number.parseInt(r,10);n=Number.isFinite(o)&&o>0?o:0}catch{n=0}d.has(t)||d.set(t,n)})(),c.set(t,n)),n},h=()=>t.pending??t.active,g=async()=>{let r;try{r=await e.fetch(h()?.revision??null)}catch(e){r={kind:"failed",error:e}}if(!n)switch(i=l(),r.kind){case"updated":{La(e.kv,e.scope,r.config),a=false,t.status==="legacy"?p({pending:r.config}):t.active===null?p({status:"ready",active:r.config,pending:null}):r.config.revision===t.active.revision?p({status:"ready",pending:null}):p({status:"ready",pending:r.config});return}case"notModified":t.pending===null&&(a=false),p({status:t.active===null?"failed":"ready"});return;case"notEnabled":if(La(e.kv,e.scope,null),t.active===null){p({status:"legacy",pending:null});return}a=true,p({status:"ready",pending:null});return;default:p({status:t.active===null?"failed":"ready"})}},b=()=>(r!==null||(r=(async()=>{if(t.active===null&&t.status!=="legacy"&&p({status:"loading"}),!o){o=true;let n=await $a(e.kv,e.scope);n!==null&&t.active===null&&p({status:"ready",active:n})}await g()})().finally(()=>{r=null})),r);return{subscribe(e){return s.add(e),()=>{s.delete(e)}},getSnapshot:()=>t,load(){if(r!==null)return r;let e=i===null||l()-i>=Ba;return t.status==="idle"||t.status==="failed"||e?b():Promise.resolve()},retry:b,readFreeUsed(t,n){let r=Pa(e.scope,t,n);return f(r).then(()=>d.get(r)??0)},peekFreeUsed(t,n){return d.get(Pa(e.scope,t,n))??null},addFreeUsed(t,n){let r=Pa(e.scope,t,n);return f(r).then(()=>{let t=(d.get(r)??0)+1;return d.set(r,t),u=u.then(async()=>{try{await e.kv.setItem(r,String(d.get(r)??t))}catch{}}),t})},setFreeUsed(t,n,r){let o=Pa(e.scope,t,n),i=Number.isInteger(r)&&r>0?r:0;return f(o).then(()=>(d.set(o,i),u=u.then(async()=>{try{await e.kv.setItem(o,String(d.get(o)??i))}catch{}}),i))},adoptLatest(){if(a){a=false,p({status:"legacy",active:null,pending:null});return}t.pending!==null&&p({status:"ready",active:t.pending,pending:null})},dispose(){n=true,s.clear()}}}function Wa(e,t){e.store=t;let n=null,r=()=>{let r=t.getSnapshot().active;r!==n&&(n=r,e.branding.set(r===null?null:sdkConfigBranding(r)))};return t.subscribe(r),r(),t}function Ua(e){return e==null||e.disposed?null:e.store!==null?e.store:Wa(e,ja({kv:e.kv,scope:e.scope,fetch:t=>fetchSdkConfig(e.funnel(),t)}))}var Va=/* @__PURE__ */Object.freeze({status:"legacy",active:null,pending:null}),Ma=()=>()=>{},qa=()=>Va;function Ha(){return Ua(f(pt)?.runtime?.sdkConfigHost)}function useEverfurSdkConfig(){return Ka(Ha())}function Ka(e){return g(e?.subscribe??Ma,e?.getSnapshot??qa,e?.getSnapshot??qa)}function useLoadEverfurSdkConfig(){let e=Ha();return u(()=>{e!==null&&(e.adoptLatest(),e.load())},[e]),useEverfurSdkConfig()}function Ya(){let e=/* @__PURE__ */Symbol.for("@everfur/sdk#SdkSurfaceHooks@v1"),t=globalThis;return t[e]??(t[e]=createContext(null))}var Ga=/* @__PURE__ */Ya();var Ja="Go to the nearest emergency vet now.";var Qa=/* @__PURE__ */Object.freeze({placeholder:"Ask anything about {petName}…",placeholderFollowUpWeb:"Ask a follow-up…",placeholderUrgentWeb:"Tell us what’s happening…",composerLabel:"Message",attachPhotoOrFileNative:"Add a photo or file",suggestions:"Suggestions",reading:"Reading {petName}’s records…",answered:"Everfur answered.",assistantName:"Everfur",followUpsHeadingNative:"Follow-up questions",turnFailedTitleWeb:"Everfur couldn’t answer that just now.",send:"Send",stop:"Stop",retry:"Try again",poweredBy:"powered by everfur",senderUser:"You",senderAssistant:"Assistant",senderVet:"Your vet",loading:"Loading",empty:"No messages yet",transcript:"Chat with Everfur",emptyTitle:"What can we help {petName} with today?",emptyTitlePetFallback:"your pet",copied:"Copied",copyUserMessage:"Copy your message",copyAssistantMessage:"Copy assistant message",feedbackHelpful:"Helpful",feedbackNeutral:"Neutral",feedbackNotHelpful:"Not helpful",feedbackTitle:"What went wrong?",feedbackSubtitle:"Your feedback helps make answers more reliable.",feedbackReasonInaccurate:"Inaccurate",feedbackReasonOutdated:"Out of date",feedbackReasonUnsafe:"Unsafe advice",feedbackReasonUnclear:"Confusing or unclear",feedbackReasonOther:"Something else",feedbackNotesPlaceholder:"Add details (optional)",feedbackSubmit:"Submit feedback",feedbackSkip:"Skip",feedbackSkipA11y:"Skip feedback",feedbackThanks:"Thanks for the feedback",feedbackFailed:"Couldn't send feedback. Please try again.",turnFailedTitle:"Message failed",turnRetry:"Retry",turnUnreachableTitle:"Couldn't reach this chat",turnStartNewChat:"Start a new chat",reconnecting:"Reconnecting…",turnStoppedTitle:"Response stopped",turnStoppedBody:"You stopped this response before it finished. Tap retry to try again.",sourceSingular:"source",sourcePlural:"sources",showSources:"Show",hideSources:"Hide",sourcesHeading:"Sources",openSource:"Open source",urgencyGeneralReason:"Just general info about {petName}. Nothing here needs action right now.",findVet:"Find a vet",findVetA11y:"Find a vet near you",nearestEmergencyVet:"Nearest emergency vet",goToNearestEmergencyVet:Ja,poisonControlWeb:"ASPCA Poison Control",poisonControlNative:"ASPCA Animal Poison Control, (888) 426-4435",showLatestVetAlert:"Show latest vet alert",dismissBanner:"Dismiss {label} banner",openHistoryNative:"Chats and vet messages",openHistoryWeb:"Chats",showChatsWeb:"Show chats",hideChatsWeb:"Hide chats",newReplySuffix:", a new reply",yourPets:"Your pets",yourPet:"Your pet",switchActivePet:"{name}. Switch pet",petCurrentlyActive:"{name}, currently active",switchToPet:"Switch to {name}",activePrefix:"Active · ",close:"Close",addAnotherPet:"Add a pet",addPet:"Add a pet",capReached:"You've used your {cap} free messages this month.",attachmentPhoto:"Photo",attachmentCamera:"Camera",closeAttachmentPicker:"Close attachment picker",addAttachment:"Add attachment, {used} of {total} used",attachmentsFull:"Attachments full, {used} of {total} used",retryUpload:"Retry uploading {filename}",removeAttachment:"Remove {filename}",previewAttachment:"Preview {filename}",closePreview:"Close preview",attachedImage:"Attached image: {filename}, opens a full-screen preview",attachmentTooLarge:"Files must be under {max}. {filename} is {size}.",attachmentTooMany:"You can attach up to {max} files per message.",attachmentUnsupported:"{filename} isn't a supported file type yet.",attachmentNetwork:"Couldn't reach the server. Check your connection and try again.",attachmentServer:"Upload failed{status}. Please try again.",attachmentCancelled:"Upload cancelled.",attachmentRateLimited:"Slow down. Please wait a moment and try again.",attachmentQuota:"Daily image limit reached. Try again tomorrow.",attachmentConflict:"Something went wrong. Tap to retry.",attachmentUnknown:"Something went wrong. Please try again.",attachmentsFailedBlocked:"Some attachments failed to upload. Remove or retry them before sending.",dictate:"Dictate a message",stopDictation:"Stop dictation",listening:"Listening",micBlocked:"Microphone access is blocked. Allow it in your browser settings to dictate.",noSpeech:"We didn't catch that. Tap the mic and try again.",dictationUnavailable:"Voice typing isn't available right now."});var Za=/* @__PURE__ */Symbol.for("everfur.sdk.rn.poweredBy");function Xa(){let e=globalThis,t=e[Za];if(t!==void 0)return t;let n={count:0,listeners:/* @__PURE__ */new Set};return e[Za]=n,n}function EverfurPoweredBy2({children:e,style:t}){let n=useEverfurTheme().meta.hidePoweredBy;return u(()=>{if(n)return;let e=Xa();return e.count+=1,e.listeners.forEach(e=>e()),()=>{e.count-=1,e.listeners.forEach(e=>e())}},[n]),n?null:e??/* @__PURE__ */P(Text,{tier:"compact",style:t,accessibilityRole:"text",children:Qa.poweredBy})}function optionalModule(e,t,n){let r;try{r=t()}catch(t){return tl(`optional peer '${e}' is not installed: ${nl(t)}`)}let o=el(r);return o==null?tl(`optional peer '${e}' resolved to no module`):n&&!n(o)?tl(`optional peer '${e}' is present but failed its shape check`):/* @__PURE__ */Object.freeze({available:true,module:o})}function el(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}function tl(e){/* @__PURE__ */
|
|
148
|
-
return Object.freeze({available:false,module:null,reason:e})}function
|
|
149
|
-
return
|
|
150
|
-
return
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
return
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
return
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
return
|
|
161
|
-
return
|
|
162
|
-
return
|
|
163
|
-
return
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
return
|
|
167
|
-
/* @__PURE__
|
|
168
|
-
/* @__PURE__
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
return
|
|
175
|
-
/* @__PURE__
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
return
|
|
178
|
-
return
|
|
179
|
-
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
return
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
-
return
|
|
188
|
-
/* @__PURE__
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
return
|
|
191
|
-
/* @__PURE__
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
/* @__PURE__
|
|
195
|
-
|
|
196
|
-
return
|
|
197
|
-
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
|
|
200
|
-
return
|
|
201
|
-
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
/* @__PURE__ */
|
|
151
|
+
return Object.freeze({primaryButton:{backgroundColor:t.fill,textColor:t.ink},sendButton:{backgroundColor:t.fill,textColor:t.ink},vetVisitButton:{backgroundColor:t.fill,textColor:t.ink},userBubble:r==="none"?{backgroundColor:e["look.color.surface"],textColor:e["look.color.ink"]}:{backgroundColor:r,textColor:bubbleInk(r,e["look.color.ink"])},composerInput:{borderColor:n,backgroundColor:"#FFFFFF",textColor:e["look.color.ink"]},chip:{backgroundColor:o,textColor:chipInk(o,n)},card:{backgroundColor:"#FFFFFF",borderColor:e["look.color.line"],borderRadius:i,textColor:e["look.color.ink"]},recordCard:{backgroundColor:"#FFFFFF",borderColor:e["look.color.line"],borderRadius:i},dialog:{borderRadius:e["look.radius.sheet"]},header:{backgroundColor:e["look.color.surface"],textColor:n},tab:{textColor:n,borderColor:e["look.color.primary"]},link:{textColor:e["look.color.accent"]}})}var al=/* @__PURE__ */Object.freeze([...nl,...tl.map(e=>`slots.${e}`),"hide_powered_by",On]);function sdkConfigBranding(e){let t=e.settings,n=t["look.ask_icon"],r=t["look.font.heading_weight"];/* @__PURE__ */
|
|
152
|
+
return Object.freeze({schemaVersion:2,displayName:t["text.partner_name"],logoUrl:t["look.logo.mark"],primaryColor:t["look.color.primary"],accentColor:t["look.color.accent"],brightness:"light",fontFamily:t["look.font.body"],fontUrl:null,headingFontFamily:t["look.font.heading"],fontWeightHeading:String(r),fontSources:fontSourcesOf(t),placeholder:fillSdkText(t["text.ask.placeholder"],t,{pet:"{pet}"}),placeholderFillsPet:true,hidePoweredBy:false,backgroundColor:t["look.color.surface"],textColor:t["look.color.ink"],borderRadius:t["look.radius.card"],assistantAvatarUrl:n===ol?null:n,slots:slotsOf(t),presentation:{chatComposerMic:true,chatComposerUpload:true,chatComposerStyle:"compact",chatComposerPlaceholder:"generic",safetyDisclaimerPlacement:"composer",chatGeneralBanner:t["layout.severity"]!=="off"},lockedFields:al})}var ll="/widget/v1/sdk-config",sl="x-everfur-sdk-config-schema";function sdkConfigRequest(e){let t={[sl]:String(3)};return typeof e=="number"&&Number.isFinite(e)&&(t["if-none-match"]=`"r${e}.s${3}"`),{method:"GET",path:ll,headers:t}}async function fetchSdkConfig(e,t){let n=await e.send("sdkConfig.fetch",sdkConfigRequest(t));if(!n.ok)return n.error.httpStatus===304?{kind:"notModified"}:n.error.httpStatus===404?{kind:"notEnabled"}:{kind:"failed",error:n.error};let r=parseSdkConfig(n.value);return r===null?{kind:"failed",error:makeEverfurError("internalError",{retryable:true,wireMessage:"malformed sdk-config response"})}:{kind:"updated",config:r}}function dl(e){let t=[];for(let n of e){let e=n.codePointAt(0);e<128?t.push(e):e<2048?t.push(192|e>>6,128|e&63):e<65536?t.push(224|e>>12,128|e>>6&63,128|e&63):t.push(240|e>>18,128|e>>12&63,128|e>>6&63,128|e&63)}return t}function cl(e){let t=3421674724,n=2216829733;for(let r of dl(e)){n=(n^r)>>>0;let e=n*435,o=Math.floor(e/4294967296),i=e>>>0;t=t*435+o+n*256>>>0,n=i}return t.toString(16).padStart(8,"0")+n.toString(16).padStart(8,"0")}var ul="everfur.sdkconfig.v3.";function pl(e){return`${ul}${cl(e)}`}function fl(e,t,n){return`everfur.sdkconfig.freecap.v1.${cl(`${e}|${t}|${n}`)}`}var hl=300*1e3,gl=/* @__PURE__ */Object.freeze({status:"idle",active:null,pending:null});async function bl(e,t){try{let n=await e.getItem(pl(t));return n===null?null:parseSdkConfig(JSON.parse(n))}catch{return null}}async function ml(e,t,n){try{n===null?await e.removeItem(pl(t)):await e.setItem(pl(t),serializeSdkConfig(n))}catch{}}function yl(e){let t=gl,n=false,r=null,o=false,i=null,a=false,l=e.now??Date.now,s=/* @__PURE__ */new Set,d=/* @__PURE__ */new Map,c=/* @__PURE__ */new Map,u=Promise.resolve(),p=e=>{if(!n){t=/* @__PURE__ */Object.freeze({...t,...e});for(let e of[...s])try{e()}catch{}}},f=t=>{if(d.has(t))return Promise.resolve();let n=c.get(t);return n===void 0&&(n=(async()=>{let n=0;try{let r=await e.kv.getItem(t),o=r===null?0:Number.parseInt(r,10);n=Number.isFinite(o)&&o>0?o:0}catch{n=0}d.has(t)||d.set(t,n)})(),c.set(t,n)),n},h=()=>t.pending??t.active,g=async()=>{let r;try{r=await e.fetch(h()?.revision??null)}catch(e){r={kind:"failed",error:e}}if(!n)switch(i=l(),r.kind){case"updated":{ml(e.kv,e.scope,r.config),a=false,t.status==="legacy"?p({pending:r.config}):t.active===null?p({status:"ready",active:r.config,pending:null}):r.config.revision===t.active.revision?p({status:"ready",pending:null}):p({status:"ready",pending:r.config});return}case"notModified":t.pending===null&&(a=false),p({status:t.active===null?"failed":"ready"});return;case"notEnabled":if(ml(e.kv,e.scope,null),t.active===null){p({status:"legacy",pending:null});return}a=true,p({status:"ready",pending:null});return;default:p({status:t.active===null?"failed":"ready"})}},b=()=>(r!==null||(r=(async()=>{if(t.active===null&&t.status!=="legacy"&&p({status:"loading"}),!o){o=true;let n=await bl(e.kv,e.scope);n!==null&&t.active===null&&p({status:"ready",active:n})}await g()})().finally(()=>{r=null})),r);return{subscribe(e){return s.add(e),()=>{s.delete(e)}},getSnapshot:()=>t,load(){if(r!==null)return r;let e=i===null||l()-i>=hl;return t.status==="idle"||t.status==="failed"||e?b():Promise.resolve()},retry:b,readFreeUsed(t,n){let r=fl(e.scope,t,n);return f(r).then(()=>d.get(r)??0)},peekFreeUsed(t,n){return d.get(fl(e.scope,t,n))??null},addFreeUsed(t,n){let r=fl(e.scope,t,n);return f(r).then(()=>{let t=(d.get(r)??0)+1;return d.set(r,t),u=u.then(async()=>{try{await e.kv.setItem(r,String(d.get(r)??t))}catch{}}),t})},setFreeUsed(t,n,r){let o=fl(e.scope,t,n),i=Number.isInteger(r)&&r>0?r:0;return f(o).then(()=>(d.set(o,i),u=u.then(async()=>{try{await e.kv.setItem(o,String(d.get(o)??i))}catch{}}),i))},adoptLatest(){if(a){a=false,p({status:"legacy",active:null,pending:null});return}t.pending!==null&&p({status:"ready",active:t.pending,pending:null})},dispose(){n=true,s.clear()}}}function vl(e,t){e.store=t;let n=null,r=()=>{let r=t.getSnapshot().active;r!==n&&(n=r,e.branding.set(r===null?null:sdkConfigBranding(r)))};return t.subscribe(r),r(),t}function kl(e){return e==null||e.disposed?null:e.store!==null?e.store:vl(e,yl({kv:e.kv,scope:e.scope,fetch:t=>fetchSdkConfig(e.funnel(),t)}))}var wl=/* @__PURE__ */Object.freeze({status:"legacy",active:null,pending:null}),_l=()=>()=>{},Sl=()=>wl;function xl(){return kl(g(ht)?.runtime?.sdkConfigHost)}function useEverfurSdkConfig(){return Cl(xl())}function Cl(e){return m(e?.subscribe??_l,e?.getSnapshot??Sl,e?.getSnapshot??Sl)}function useLoadEverfurSdkConfig(){let e=xl();return f(()=>{e!==null&&(e.adoptLatest(),e.load())},[e]),useEverfurSdkConfig()}function Rl(){let e=/* @__PURE__ */Symbol.for("@everfur/sdk#SdkSurfaceHooks@v1"),t=globalThis;return t[e]??(t[e]=createContext(null))}var Fl=/* @__PURE__ */Rl();var Al="Go to the nearest emergency vet now.";var Tl=/* @__PURE__ */Object.freeze({placeholder:"Ask anything about {petName}…",placeholderFollowUpWeb:"Ask a follow-up…",placeholderUrgentWeb:"Tell us what’s happening…",composerLabel:"Message",attachPhotoOrFileNative:"Add a photo or file",suggestions:"Suggestions",reading:"Reading {petName}’s records…",answered:"Everfur answered.",assistantName:"Everfur",followUpsHeadingNative:"Follow-up questions",turnFailedTitleWeb:"Everfur couldn’t answer that just now.",send:"Send",stop:"Stop",retry:"Try again",poweredBy:"powered by everfur",senderUser:"You",senderAssistant:"Assistant",senderVet:"Your vet",loading:"Loading",empty:"No messages yet",transcript:"Chat with Everfur",emptyTitle:"What can we help {petName} with today?",emptyTitlePetFallback:"your pet",copied:"Copied",copyUserMessage:"Copy your message",copyAssistantMessage:"Copy assistant message",feedbackHelpful:"Helpful",feedbackNeutral:"Neutral",feedbackNotHelpful:"Not helpful",feedbackTitle:"What went wrong?",feedbackSubtitle:"Your feedback helps make answers more reliable.",feedbackReasonInaccurate:"Inaccurate",feedbackReasonOutdated:"Out of date",feedbackReasonUnsafe:"Unsafe advice",feedbackReasonUnclear:"Confusing or unclear",feedbackReasonOther:"Something else",feedbackNotesPlaceholder:"Add details (optional)",feedbackSubmit:"Submit feedback",feedbackSkip:"Skip",feedbackSkipA11y:"Skip feedback",feedbackThanks:"Thanks for the feedback",feedbackFailed:"Couldn't send feedback. Please try again.",turnFailedTitle:"Message failed",turnRetry:"Retry",turnUnreachableTitle:"Couldn't reach this chat",turnStartNewChat:"Start a new chat",reconnecting:"Reconnecting…",turnStoppedTitle:"Response stopped",turnStoppedBody:"You stopped this response before it finished. Tap retry to try again.",sourceSingular:"source",sourcePlural:"sources",showSources:"Show",hideSources:"Hide",sourcesHeading:"Sources",openSource:"Open source",urgencyGeneralReason:"Just general info about {petName}. Nothing here needs action right now.",findVet:"Find a vet",findVetA11y:"Find a vet near you",nearestEmergencyVet:"Nearest emergency vet",goToNearestEmergencyVet:Al,poisonControlWeb:"ASPCA Poison Control",poisonControlNative:"ASPCA Animal Poison Control, (888) 426-4435",showLatestVetAlert:"Show latest vet alert",dismissBanner:"Dismiss {label} banner",openHistoryNative:"Chats and vet messages",openHistoryWeb:"Chats",showChatsWeb:"Show chats",hideChatsWeb:"Hide chats",newReplySuffix:", a new reply",yourPets:"Your pets",yourPet:"Your pet",switchActivePet:"{name}. Switch pet",petCurrentlyActive:"{name}, currently active",switchToPet:"Switch to {name}",activePrefix:"Active · ",close:"Close",addAnotherPet:"Add a pet",addPet:"Add a pet",capReached:"You've used your {cap} free messages this month.",attachmentPhoto:"Photo",attachmentCamera:"Camera",closeAttachmentPicker:"Close attachment picker",addAttachment:"Add attachment, {used} of {total} used",attachmentsFull:"Attachments full, {used} of {total} used",retryUpload:"Retry uploading {filename}",removeAttachment:"Remove {filename}",previewAttachment:"Preview {filename}",closePreview:"Close preview",attachedImage:"Attached image: {filename}, opens a full-screen preview",attachmentTooLarge:"Files must be under {max}. {filename} is {size}.",attachmentTooMany:"You can attach up to {max} files per message.",attachmentUnsupported:"{filename} isn't a supported file type yet.",attachmentNetwork:"Couldn't reach the server. Check your connection and try again.",attachmentServer:"Upload failed{status}. Please try again.",attachmentCancelled:"Upload cancelled.",attachmentRateLimited:"Slow down. Please wait a moment and try again.",attachmentQuota:"Daily image limit reached. Try again tomorrow.",attachmentConflict:"Something went wrong. Tap to retry.",attachmentUnknown:"Something went wrong. Please try again.",attachmentsFailedBlocked:"Some attachments failed to upload. Remove or retry them before sending.",dictate:"Dictate a message",stopDictation:"Stop dictation",listening:"Listening",micBlocked:"Microphone access is blocked. Allow it in your browser settings to dictate.",noSpeech:"We didn't catch that. Tap the mic and try again.",dictationUnavailable:"Voice typing isn't available right now."});var Il=/* @__PURE__ */Symbol.for("everfur.sdk.rn.poweredBy");function El(){let e=globalThis,t=e[Il];if(t!==void 0)return t;let n={count:0,listeners:/* @__PURE__ */new Set};return e[Il]=n,n}function EverfurPoweredBy2({children:e,style:t}){let n=useEverfurTheme().meta.hidePoweredBy;return f(()=>{if(n)return;let e=El();return e.count+=1,e.listeners.forEach(e=>e()),()=>{e.count-=1,e.listeners.forEach(e=>e())}},[n]),n?null:e??/* @__PURE__ */N(Text,{tier:"compact",style:t,accessibilityRole:"text",children:Tl.poweredBy})}function optionalModule(e,t,n){let r;try{r=t()}catch(t){return Ol(`optional peer '${e}' is not installed: ${Pl(t)}`)}let o=Dl(r);return o==null?Ol(`optional peer '${e}' resolved to no module`):n&&!n(o)?Ol(`optional peer '${e}' is present but failed its shape check`):/* @__PURE__ */Object.freeze({available:true,module:o})}function Dl(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}function Ol(e){/* @__PURE__ */
|
|
153
|
+
return Object.freeze({available:false,module:null,reason:e})}function Pl(e){return e instanceof Error?e.message:typeof e=="string"?e:"unknown load error"}var zl=/* @__PURE__ */new RegExp(`^${ja}\\/brand\\/[0-9a-f]{16}\\.svg$`);function Bl(e){if(typeof e!="object"||e===null)return false;let t=e.SvgUri;return typeof t=="function"||typeof t=="object"&&t!==null}var Nl=null;function registerEverfurSvg(e){if(e===null)return Nl=null,false;let t=optionalModule("react-native-svg",e,Bl);return Nl=t.available?t.module:null,t.available}function $l(e){let t=hardenHttpsUrl(e);return t!==null&&zl.test(t)?t:null}function Ll(e){let t=k.flatten(e),n=t?.width,r=t?.height;return typeof n=="number"&&typeof r=="number"?{width:n,height:r}:null}function SdkBrandArt({url:e,style:t,fallback:n=null,testID:r}){let[o,i]=u(false),a=$l(e);if(a!==null){let e=Ll(t),l=Nl?.SvgUri;return l===void 0||e===null||o?n:/* @__PURE__ */N(w,{style:t,accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:r??"everfur-sdk-svg",children:/* @__PURE__ */N(l,{uri:a,width:e.width,height:e.height,onError:()=>i(true)})})}let l=e.trim()===""?null:hardenBrandAssetUrl(e);/* @__PURE__ */
|
|
154
|
+
return N(BrandImage,{uri:l,decorative:true,style:t,fallback:n,...r===void 0?{}:{testID:r}})}var jl="#10462E",Ul="#FFFFFF",Wl="#8A8A8A";function SdkNeutralScreen({failed:e,onRetry:t}){/* @__PURE__ */
|
|
155
|
+
return N(w,{style:{flex:1,backgroundColor:Ul,alignItems:"center",justifyContent:"center",padding:24},testID:e?"everfur-sdk-error":"everfur-sdk-loading",children:e?/* @__PURE__ */$(L,{children:[
|
|
156
|
+
/* @__PURE__ */N(Text,{tier:"heading",style:{fontSize:16,color:"#1A1A1A",textAlign:"center"},accessibilityRole:"header",children:Ea["load.error"]}),
|
|
157
|
+
/* @__PURE__ */N(_,{accessibilityRole:"button",onPress:t,style:{marginTop:14,minHeight:44,paddingHorizontal:20,borderRadius:22,borderWidth:1,borderColor:"#D9D9D9",alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-retry",children:/* @__PURE__ */N(Text,{tier:"control",style:{fontSize:15,color:"#1A1A1A"},children:Ea["load.retry"]})})]}):/* @__PURE__ */N(B,{color:Wl})})}function Vl(e){return e.trim()===""?null:hardenBrandAssetUrl(e)}function SdkLockup({settings:e}){let t=e["look.lockup"]==="stacked",n=t?e["look.logo.wordmark"]:e["look.logo.mark"],r=e["text.partner_name"],o=/* @__PURE__ */$(w,{style:t?{flexDirection:"row",alignItems:"center",gap:5}:{gap:1,alignItems:"flex-start"},children:[
|
|
158
|
+
/* @__PURE__ */N(Text,{tier:"badge",style:{fontFamily:e["look.font.body"],fontSize:12,lineHeight:12,color:e["look.color.muted"]},children:pa.poweredBy}),
|
|
159
|
+
/* @__PURE__ */N(ShellIcon,{name:"wordmark",style:{width:t?44:52,height:t?16:19,tintColor:jl}})]});/* @__PURE__ */
|
|
160
|
+
return N(EverfurPoweredBy2,{children:/* @__PURE__ */$(w,{accessible:true,accessibilityLabel:`${r}, ${pa.poweredByLabel}`,style:t?{flexDirection:"column",alignItems:"center",gap:3}:{flexDirection:"row",alignItems:"center",gap:8,flexShrink:1},testID:t?"everfur-sdk-lockup-stacked":"everfur-sdk-lockup-side",children:[
|
|
161
|
+
/* @__PURE__ */N(SdkBrandArt,{url:n,style:t?{height:20,width:110}:{height:30,width:92,borderRadius:7}}),t?null:/* @__PURE__ */N(w,{style:{width:1,height:28,backgroundColor:e["look.color.line"]}}),o]})})}function SdkSheet({sheet:e,settings:t,onPrimary:n,onDismiss:r,notice:o=null,bottomInset:i=0}){let{tablet:a}=Or(),l=t["look.color.heading"],s=t["look.font.body"];/* @__PURE__ */
|
|
162
|
+
return N(w,{style:{position:"absolute",left:0,right:0,top:0,bottom:0,justifyContent:"flex-end",backgroundColor:"rgba(0,0,0,0.32)"},testID:`everfur-sdk-sheet-${e.kind}`,children:/* @__PURE__ */$(w,{accessibilityViewIsModal:true,style:[{backgroundColor:Ul,borderTopLeftRadius:t["look.radius.sheet"],borderTopRightRadius:t["look.radius.sheet"],paddingTop:10,paddingHorizontal:18,paddingBottom:(a?40:30)+i,gap:12},a?{width:Cr,alignSelf:"center"}:null],children:[e.badge!==null?/* @__PURE__ */N(Text,{tier:"badge",style:{alignSelf:"flex-start",fontFamily:s,fontSize:12,color:l,backgroundColor:t["look.color.tint"],paddingHorizontal:10,paddingVertical:4,borderRadius:12,overflow:"hidden"},children:e.badge}):null,e.title!==null?/* @__PURE__ */N(Text,{tier:"heading",accessibilityRole:"header",style:{fontFamily:t["look.font.heading"],fontWeight:String(t["look.font.heading_weight"]),fontSize:20,color:l},children:e.title}):null,e.locked.map(e=>/* @__PURE__ */N(Text,{style:{fontFamily:s,fontSize:15,color:t["look.color.ink"]},children:e},e)),e.price.map(e=>/* @__PURE__ */N(Text,{style:{fontFamily:s,fontSize:15,color:t["look.color.muted"]},testID:"everfur-sdk-price",children:e},e)),o!==null?/* @__PURE__ */N(Text,{style:{fontFamily:s,fontSize:15,color:t["look.color.ink"]},testID:"everfur-sdk-sheet-notice",children:o}):null,
|
|
163
|
+
/* @__PURE__ */N(SdkButton,{settings:t,label:e.button,onPress:n,testID:"everfur-sdk-sheet-primary"}),
|
|
164
|
+
/* @__PURE__ */N(_,{accessibilityRole:"button",onPress:r,style:{minHeight:44,alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-sheet-dismiss",children:/* @__PURE__ */N(Text,{tier:"control",style:{fontFamily:s,fontSize:15,color:t["look.color.muted"]},children:e.dismiss})})]})})}function SdkButton({settings:e,label:t,onPress:n,testID:r}){let{fill:o,ink:i}=buttonFill(e);/* @__PURE__ */
|
|
165
|
+
return N(_,{accessibilityRole:"button",onPress:n,style:{minHeight:48,borderRadius:24,backgroundColor:o,alignItems:"center",justifyContent:"center",paddingHorizontal:20},...r===void 0?{}:{testID:r},children:/* @__PURE__ */N(Text,{tier:"control",style:{fontFamily:e["look.font.body"],fontSize:16,fontWeight:"600",color:i},children:t})})}function SdkMemoryChip({settings:e,label:t}){/* @__PURE__ */
|
|
166
|
+
return N(w,{style:{alignSelf:"flex-start",minHeight:30,paddingHorizontal:12,borderRadius:15,borderWidth:1,borderColor:e["look.color.line"],backgroundColor:"rgba(255,255,255,0.75)",justifyContent:"center"},testID:"everfur-sdk-memory-chip",children:/* @__PURE__ */N(Text,{tier:"compact",style:{fontFamily:e["look.font.body"],fontSize:12.5,color:e["look.color.ink"]},children:t})})}function SdkDockBar({config:e,pet:t,onPress:n}){let r=e.settings;/* @__PURE__ */
|
|
167
|
+
return N(_,{accessibilityRole:"button",onPress:n,style:{margin:12,minHeight:50,borderRadius:25,borderWidth:1.5,borderColor:r["look.color.heading"],backgroundColor:Ul,justifyContent:"center",paddingHorizontal:18},testID:"everfur-sdk-dock",children:/* @__PURE__ */N(Text,{numberOfLines:1,ellipsizeMode:"tail",style:{fontFamily:r["look.font.body"],fontSize:15,color:r["look.color.muted"]},children:sdkText(e,"text.ask.dock_placeholder",{pet:t??null})})})}function VetPersonMark({tint:e,ink:t}){/* @__PURE__ */
|
|
168
|
+
return $(w,{style:{width:52,height:52,borderRadius:26,overflow:"hidden",backgroundColor:e,alignItems:"center",justifyContent:"flex-end"},accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:"everfur-sdk-vet-person",children:[
|
|
169
|
+
/* @__PURE__ */N(w,{style:{width:20,height:20,borderRadius:10,marginBottom:3,backgroundColor:t,opacity:.55}}),
|
|
170
|
+
/* @__PURE__ */N(w,{style:{width:34,height:15,borderTopLeftRadius:17,borderTopRightRadius:17,backgroundColor:t,opacity:.55}})]})}function SdkVetHomeView({config:e,home:t,onBook:n,style:r}){let o=e.settings,i=o["look.font.body"],a=o["look.color.ink"],l=o["look.color.muted"],s=t.photo===null?null:Vl(t.photo);/* @__PURE__ */
|
|
171
|
+
return $(E,{style:r,contentContainerStyle:{gap:14,paddingHorizontal:16,paddingTop:16,paddingBottom:22},testID:`everfur-sdk-vet-${t.level}`,children:[
|
|
172
|
+
/* @__PURE__ */$(w,{style:{backgroundColor:Ul,borderWidth:1,borderColor:o["look.color.line"],borderRadius:o["look.radius.card"],padding:16,gap:12},children:[
|
|
173
|
+
/* @__PURE__ */$(w,{style:{flexDirection:"row",alignItems:"center",gap:12},children:[
|
|
174
|
+
/* @__PURE__ */N(BrandImage,{uri:s,decorative:true,resizeMode:"cover",style:{width:52,height:52,borderRadius:26},fallback:t.initial!==null?/* @__PURE__ */N(w,{style:{width:52,height:52,borderRadius:26,backgroundColor:o["look.color.tint"],alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-vet-initial",children:/* @__PURE__ */N(Text,{tier:"heading",style:{fontFamily:o["look.font.heading"],fontSize:20,color:o["look.color.heading"]},children:t.initial})}):/* @__PURE__ */N(VetPersonMark,{tint:o["look.color.tint"],ink:o["look.color.heading"]})}),
|
|
175
|
+
/* @__PURE__ */$(w,{style:{flex:1,gap:2},children:[
|
|
176
|
+
/* @__PURE__ */N(Text,{tier:"heading",style:{fontFamily:o["look.font.heading"],fontWeight:String(o["look.font.heading_weight"]),fontSize:17,color:o["look.color.heading"]},children:t.name}),t.title!==null?/* @__PURE__ */N(Text,{style:{fontFamily:i,fontSize:13,color:l},children:t.title}):null]})]}),t.allowance!==null||t.extra!==null?/* @__PURE__ */$(w,{style:{backgroundColor:o["look.color.tint"],borderRadius:Math.max(8,o["look.radius.card"]-4),padding:12,gap:2},testID:"everfur-sdk-vet-allowance",children:[t.allowance!==null?/* @__PURE__ */N(Text,{style:{fontFamily:i,fontSize:14,fontWeight:"600",color:a},children:t.allowance}):null,t.extra!==null?/* @__PURE__ */N(Text,{style:{fontFamily:i,fontSize:13,color:l},children:t.extra}):null]}):null,
|
|
177
|
+
/* @__PURE__ */N(SdkButton,{settings:o,label:t.seeTimes,onPress:n,testID:"everfur-sdk-vet-book"})]}),t.gate!==null?/* @__PURE__ */N(Text,{style:{fontFamily:i,fontSize:14,color:a},testID:"everfur-sdk-vet-gate",children:t.gate}):null,t.rx!==null?/* @__PURE__ */N(Text,{style:{fontFamily:i,fontSize:14,color:a},testID:"everfur-sdk-vet-rx",children:t.rx}):null,
|
|
178
|
+
/* @__PURE__ */N(w,{style:{gap:4},children:t.legal.map(e=>/* @__PURE__ */N(Text,{style:{fontFamily:i,fontSize:12,color:l},children:e},e))}),t.privacy!==null?/* @__PURE__ */N(Text,{style:{fontFamily:i,fontSize:12,color:l},testID:"everfur-sdk-vet-privacy",children:t.privacy}):null]})}function Ml(e){return sdkText(e,"text.tabs.ask")}function SdkLauncherView({config:e,onPress:t,replyWaiting:n,tipSeen:r,onTipSeen:o,style:i}){let a=e.settings,l=a["layout.presentation"]==="full_screen",s=a["look.ask_icon"]===ol?"":a["look.ask_icon"],[d,c]=u(l&&!r);f(()=>{(!l||r)&&c(false)},[l,r]);let p=()=>{c(false),o()};/* @__PURE__ */
|
|
179
|
+
return $(w,{style:[{alignItems:"flex-end",gap:8},i],pointerEvents:"box-none",testID:"everfur-sdk-launcher",children:[d?/* @__PURE__ */N(_,{accessibilityRole:"button",onPress:p,style:{maxWidth:240,backgroundColor:Ul,borderRadius:14,borderWidth:1,borderColor:a["look.color.line"],paddingHorizontal:14,paddingVertical:10},testID:"everfur-sdk-launcher-tip",children:/* @__PURE__ */N(Text,{style:{fontFamily:a["look.font.body"],fontSize:14,color:a["look.color.ink"]},children:sdkText(e,"text.launcher.tip")})}):null,
|
|
180
|
+
/* @__PURE__ */$(_,{accessibilityRole:"button",accessibilityLabel:Ml(e),onPress:()=>{d&&p(),t()},style:{width:60,height:60,borderRadius:30,backgroundColor:a["look.color.launcher"],alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-launcher-button",children:[
|
|
181
|
+
/* @__PURE__ */N(SdkBrandArt,{url:s,style:{width:l?24:30,height:l?24:30},fallback:/* @__PURE__ */N(ShellIcon,{name:"wordmark",style:{width:36,height:13,tintColor:a["look.color.on_launcher"]}})}),l?/* @__PURE__ */N(Text,{tier:"badge",style:{fontFamily:a["look.font.body"],fontSize:10,color:a["look.color.on_launcher"]},children:Ml(e)}):null,l&&n?/* @__PURE__ */N(w,{style:{position:"absolute",top:2,right:2,width:12,height:12,borderRadius:6,backgroundColor:"#C03410",borderWidth:2,borderColor:Ul},testID:"everfur-sdk-launcher-dot"}):null]})]})}var ql=true;function Hl(e,t,n,r){if(n===null)return e;let o=r&&e.vetOnAsk!=="none",i=Zt(ql,n).filter(e=>e==="vet"?o:e==="ask"?t["features.chat"]:e==="records"?t["features.records"]:false);e.nav==="chat_first"&&!i.includes("ask")&&i.unshift("ask"),i.length===0&&i.push(t["features.records"]&&!t["features.chat"]?"records":"ask");let a=i.includes("vet"),l=o?a?"own_tab":e.vetOnAsk==="own_tab"?"in_answers":e.vetOnAsk:"none",s=e.vetBadge==="header_pill"&&e.presentation==="full_screen"&&l==="own_tab"?"tab_dot":e.vetBadge;/* @__PURE__ */
|
|
182
|
+
return Object.freeze({...e,sections:/* @__PURE__ */Object.freeze(i),vetOnAsk:l,vetBadge:s})}function Kl(e,t,n){let r=t.vetOnAsk!=="none";return n?t.sections.includes(e)?e:e==="vet"&&r?"vet":Gl(Xt(e,ql,t.sections)):e==="vet"&&!r?"ask":e}function Yl(e,t,n){if(!n)return e??t.sections[0]??"ask";let r=nn(e===void 0?{via:"plain"}:{via:"link",tab:e},ql,t.sections);return e==="vet"&&r!=="vet"?Kl("vet",t,true):Gl(r)}function Gl(e){return e==="plan"?"ask":e}function Jl(e){return e===void 0?{section:void 0,key:null}:typeof e=="string"?{section:e,key:null}:{section:e.section,key:e.key}}function Ql(e){let t=e.activePetRef;return e.pets.find(e=>e.petRef===t)??e.pets[0]??null}function EverfurSdkApp(e){let t=xl(),n=useEverfurSdkConfig();f(()=>{if(t===null)return;t.adoptLatest(),t.load();let e=P.addEventListener("change",e=>{e==="active"&&t.retry()});return()=>e.remove()},[t]);let r=h(()=>{t?.retry()},[t]);return n.active!==null?/* @__PURE__ */N(SdkShell,{...e,config:n.active}):n.status==="legacy"?/* @__PURE__ */N(LegacyPath,{...e}):/* @__PURE__ */N(SdkNeutralScreen,{failed:n.status==="failed",onRetry:r})}var Zl=/* @__PURE__ */Object.freeze({branding:null}),Xl=/* @__PURE__ */Object.freeze({subscribe:()=>()=>{},getSnapshot:()=>Zl});function es(e,t){let n=g(ht)?.runtime?.entitlements??Xl,r=h(()=>n.getSnapshot()?.branding??null,[n]),o=m(n.subscribe,r,r),i=e===void 0?"":e.join(",");return p(()=>{let n=resolvePresentation({server:o?.presentation??null,locked:o?.lockedFields??null,client:{...e===void 0?{}:{shellTabs:e},...t===void 0?{}:{shellHeader:t}}});return{shellTabs:n.shellTabs??null,shellHeader:ya(n.shellHeader)?"tabs_bar":"classic"}},[o,i,t])}function ts(e,t){let n=()=>{if(t===null)return;let n=e.pets.findIndex(e=>e.petRef===t.petRef),r=e.pets[(n+1)%e.pets.length];r!==void 0&&r.petRef!==t.petRef&&e.onPetChange?.(r.petRef)},r=e.onPickPet??(e.pets.length>1&&e.onPetChange!==void 0?n:void 0);return{...t?.photoUrl===void 0?{}:{petPhotoUrl:t.photoUrl},...r===void 0?{}:{onPet:r}}}function LegacyPath({host:e,renderLegacy:t,section:n,tabs:r,headerStyle:o}){let i=es(r,o);if(t!==void 0)return t();let a=Ql(e),l=i.shellHeader==="tabs_bar";/* @__PURE__ */
|
|
183
|
+
return N(EverfurTabs,{petRef:a?.petRef??null,petName:a?.name??null,opened:ns(n,i.shellTabs?.includes("vet")===true),...r===void 0?{}:{tabs:r},...o===void 0?{}:{headerStyle:o},...l?{header:ts(e,a)}:{},...l&&e.onClose!==void 0?{onClose:e.onClose}:{},...e.vetMessageWaiting===true?{badges:{vet:true}}:{}})}function ns(e,t){let{section:n,key:r}=Jl(e);return n===void 0||n==="vet"&&!t?{via:"plain"}:r===null?{via:"link",tab:n}:{via:"link",tab:n,key:r}}function rs(e,t,n){let r=xl(),o=e.settings["access.mode"]==="free_cap",i=capMonth(/* @__PURE__ */new Date),[a,l]=u(()=>r?.peekFreeUsed(t,i)??0),s=c(true),d=c(n);d.current=n,f(()=>{if(s.current=true,!(r===null||!o))return r.readFreeUsed(t,i).then(e=>{s.current&&l(e)}),()=>{s.current=false}},[r,o,t,i]);let h=p(()=>!o||r===null?null:{onMessageSent:()=>{r.addFreeUsed(t,i).then(e=>{s.current&&l(e)})},onFreeCapReached:e=>{r.setFreeUsed(t,i,e.used).then(e=>{s.current&&l(e)}),d.current(e)}},[o,r,t,i]);return{used:a,hooks:h}}var os=It.heading;function SdkShell({host:e,section:t,onSectionChange:n,chat:r,records:o,style:i,config:a,tabs:l,headerStyle:s}){let d=a.settings,b=g(ht),m=Ql(e),y=vetLevelFor(a.stateGate,m?.location??null),v=es(l,s),k=v.shellTabs!==null,_=v.shellHeader==="tabs_bar";Hn(_);let S=Cn("televet"),x=p(()=>Hl(resolveLayout(d,y),d,v.shellTabs,S),[d,y,v.shellTabs,S]),C=e.membership??"unknown",R=e.userId??b?.userRef??"anonymous",F=c(()=>{}),{used:A,hooks:T}=rs(a,R,e=>F.current(e)),I=askAccess(a,C,A),{tablet:E,column:D}=Or(),O=Jl(t),[P,z]=u(()=>Yl(O.section,x,k));f(()=>{O.section!==void 0&&z(O.section)},[O.section,O.key]);let B=h(e=>{z(e),n?.(e)},[n]),L=x.vetOnAsk!=="none",j=Kl(P,x,k),U=x.closeControl!=="none",[W,V]=u(null),[M,q]=u(null),H=h(e=>(q(e),()=>q(t=>t===e?null:t)),[]),K=h((e,t=null)=>{let n={sheet:e.kind==="members"?membersSheet(a):planSheet(a,m?.name),reason:e,notice:t};V(r=>t===null&&e.kind==="cap"&&r?.reason.kind==="cap"?{...n,notice:r.notice}:n)},[a,m?.name]);F.current=e=>K({kind:"cap"},e.emergencyGuidance??null);let Y=()=>{W!==null&&(e.onOpenPlan?.(W.reason,W.sheet.soldBy),V(null))};f(()=>{I.kind==="members_only"?K({kind:"members"}):I.kind==="cap_reached"&&K({kind:"cap"})},[I.kind,K]);let G=e=>isLocked(a,C,e),J={flex:1,backgroundColor:d["look.color.surface"]},Q=j==="vet"?/* @__PURE__ */N(VetPane2,{config:a,pet:m,level:y,tabsBar:_,locked:G("video_visits"),onLocked:()=>K({kind:"locked",part:"video_visits"}),onAsk:()=>B("ask")}):j==="records"?/* @__PURE__ */N(RecordsPane,{config:a,host:e,pet:m,tabsBar:_,shellPush:H,vetShown:L,records:o,onPlan:e=>K({kind:"locked",part:e}),onVet:()=>L?B("vet"):void 0,locked:G,onAsk:()=>B("ask")}):/* @__PURE__ */N(AskPane,{config:a,layout:x,pet:m,level:y,access:I,hooks:T,chat:r,locked:G,tabsBar:_,onRecords:()=>B("records"),onVet:()=>B("vet"),onPlan:()=>K({kind:I.kind==="members_only"?"members":"cap"})}),Z=/* @__PURE__ */N(SdkColumnScope,{children:Q});/* @__PURE__ */
|
|
184
|
+
return N(ShellSafeArea,{framed:U,children:t=>/* @__PURE__ */$(w,{style:[J,i],testID:`everfur-sdk-app-${x.nav}`,children:[
|
|
185
|
+
/* @__PURE__ */N(Framed,{framed:U,insets:t,children:/* @__PURE__ */$(w,{style:D,testID:E?"everfur-sdk-column-tablet":"everfur-sdk-column-phone",children:[_?/* @__PURE__ */N(TabsBar,{config:a,layout:x,host:e,pet:m,section:j,level:y,onSection:B,deep:j==="records"?M:null}):/* @__PURE__ */N(Header,{config:a,layout:x,host:e,pet:m,section:j,level:y,onSection:B}),_||x.nav==="bottom_tabs"||x.nav==="chat_first"?null:/* @__PURE__ */N(SectionNav,{config:a,layout:x,level:y,section:j,onSection:B,vetDot:e.vetMessageWaiting===true}),
|
|
186
|
+
/* @__PURE__ */N(w,{style:{flex:1},children:Z}),!_&&x.nav==="bottom_tabs"?/* @__PURE__ */N(SectionNav,{config:a,layout:x,level:y,section:j,onSection:B,vetDot:e.vetMessageWaiting===true,bottom:true}):null]})}),W!==null?/* @__PURE__ */N(SdkSheet,{sheet:W.sheet,settings:d,onPrimary:Y,onDismiss:()=>V(null),notice:W.notice,bottomInset:t.bottom}):null]})})}var is=/* @__PURE__ */Object.freeze({top:0,bottom:0,left:0,right:0});function ShellSafeArea({framed:e,children:t}){let n=g(W);return e?
|
|
187
|
+
/* @__PURE__ */N(V,{initialMetrics:n===null?M:null,children:/* @__PURE__ */N(MeasuredInsets,{children:t})}):t(is)}function MeasuredInsets({children:e}){return e(q())}function Framed({framed:e,insets:t,children:n}){return e?/* @__PURE__ */N(w,{style:{flex:1,paddingTop:t.top,paddingBottom:t.bottom,paddingLeft:t.left,paddingRight:t.right},testID:"everfur-sdk-safe-area",children:n}):n}function as(e,t,n){return t==="vet"?vetTabLabel(e,n):sdkText(e,t==="ask"?"text.tabs.ask":"text.tabs.records")}function SectionNav({config:e,layout:t,level:n,section:r,onSection:o,vetDot:i,bottom:a=false}){let l=e.settings;return t.sections.length<2?null:/* @__PURE__ */N(w,{accessibilityRole:"tablist",style:[{flexDirection:"row",borderColor:l["look.color.line"],backgroundColor:l["look.color.surface"]},a?{borderTopWidth:1,paddingBottom:6}:{borderBottomWidth:1,paddingHorizontal:8}],testID:a?"everfur-sdk-tabs-bottom":"everfur-sdk-tabs-top",children:t.sections.map(s=>{let d=s===r;/* @__PURE__ */
|
|
188
|
+
return $(_,{accessibilityRole:"tab",accessibilityState:{selected:d},onPress:()=>o(s),style:{flex:a?1:0,minHeight:44,paddingHorizontal:12,alignItems:"center",justifyContent:"center",flexDirection:"row",gap:6,borderBottomWidth:a?0:2,borderBottomColor:d?l["look.color.primary"]:"transparent"},testID:`everfur-sdk-tab-${s}`,children:[
|
|
189
|
+
/* @__PURE__ */N(Text,{tier:"control",style:{fontFamily:l["look.font.body"],fontSize:15,fontWeight:d?"600":"400",color:d?l["look.color.heading"]:l["look.color.muted"]},children:as(e,s,n)}),s==="vet"&&i&&t.vetBadge==="tab_dot"?/* @__PURE__ */N(w,{style:{width:7,height:7,borderRadius:4,backgroundColor:l["look.color.dot"]},testID:"everfur-sdk-vet-dot"}):null]},s)})})}function Header({config:e,layout:t,host:n,pet:r,section:o,level:i,onSection:a}){let l=e.settings,s=l["look.color.heading"],d=(e,t,n)=>/* @__PURE__ */N(_,{accessibilityRole:"button",onPress:t,style:{minWidth:44,minHeight:44,alignItems:"center",justifyContent:"center"},testID:n,children:/* @__PURE__ */N(Text,{tier:"control",style:{fontSize:20,color:s},children:e})});if(t.nav==="sections_page"){let t=sdkText(e,"text.nav.page_title"),n=/* @__PURE__ */$(w,{style:{flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:16,paddingTop:12,paddingBottom:8},testID:"everfur-sdk-header-sections",children:[t!==""?/* @__PURE__ */N(Text,{tier:"heading",accessibilityRole:"header",style:{fontFamily:l["look.font.heading"],fontWeight:String(l["look.font.heading_weight"]),fontSize:24,color:s},children:t}):null,
|
|
190
|
+
/* @__PURE__ */N(SdkLockup,{settings:l})]});return o==="ask"?/* @__PURE__ */$(w,{children:[n,
|
|
191
|
+
/* @__PURE__ */N(MemoryRow,{config:e,pet:r})]}):n}if(t.nav==="chat_first"){let c=t.vetOnAsk==="header_button"&&o==="ask";/* @__PURE__ */
|
|
192
|
+
return $(w,{testID:"everfur-sdk-header-chat-first",children:[
|
|
193
|
+
/* @__PURE__ */$(w,{style:{flexDirection:"row",alignItems:"center",paddingHorizontal:8,minHeight:52},children:[d("↓",n.onClose,"everfur-sdk-down"),
|
|
194
|
+
/* @__PURE__ */N(Text,{tier:"heading",numberOfLines:1,style:{flex:1,textAlign:"center",fontFamily:l["look.font.heading"],fontWeight:String(l["look.font.heading_weight"]),fontSize:17,color:s},children:o==="ask"?sdkText(e,"text.ask.name"):as(e,o,i)}),c?/* @__PURE__ */N(VetPill,{config:e,layout:t,level:i,waiting:n.vetMessageWaiting===true,onPress:()=>a("vet")}):o!=="ask"?d("×",()=>a("ask"),"everfur-sdk-back-to-ask"):/* @__PURE__ */N(w,{style:{minWidth:44}})]}),o==="ask"?/* @__PURE__ */N(MemoryRow,{config:e,pet:r,withLockup:true}):null]})}let c=t.presentation==="full_screen",u=t.vetOnAsk==="header_button"&&o==="ask";/* @__PURE__ */
|
|
195
|
+
return $(w,{testID:`everfur-sdk-header-${t.nav}`,children:[
|
|
196
|
+
/* @__PURE__ */$(w,{style:{flexDirection:"row",alignItems:"center",paddingHorizontal:8,minHeight:52,gap:8},children:[
|
|
197
|
+
/* @__PURE__ */N(w,{style:{flex:1,alignItems:"flex-start"},children:c?/* @__PURE__ */N(PetSwitcher,{config:e,host:n,pet:r}):null}),
|
|
198
|
+
/* @__PURE__ */N(SdkLockup,{settings:l}),
|
|
199
|
+
/* @__PURE__ */$(w,{style:{flex:1,alignItems:"flex-end"},children:[u?/* @__PURE__ */N(VetPill,{config:e,layout:t,level:i,waiting:n.vetMessageWaiting===true,onPress:()=>a("vet")}):null,c?d("×",n.onClose,"everfur-sdk-close"):null]})]}),t.nav==="bottom_tabs"&&t.vetOnAsk==="top"&&(o==="ask"||o==="vet")?/* @__PURE__ */N(AskVetSwitch,{config:e,level:i,section:o,onSection:a}):null,o==="ask"?/* @__PURE__ */N(MemoryRow,{config:e,pet:r}):null]})}function ls(e,t){let n=as(e,"ask",t),r=as(e,"records",t),o=Yt.plan;return{ask:n,vet:as(e,"vet",t),plan:o,records:r,listAll:`${n}, ${o} and ${r}`,listNoPlan:`${n} and ${r}`}}function TabsBar({config:e,layout:t,host:n,pet:r,section:o,level:i,onSection:a,deep:l}){let s=p(()=>ls(e,i),[e,i]),d=h(e=>a(e==="plan"?"ask":e),[a]),c=!t.sections.includes(o),u=l??(c?{title:as(e,o,i),onBack:()=>a("ask")}:null),f=t.closeControl==="none"?void 0:n.onClose,g=n.vetMessageWaiting===true&&t.vetBadge!=="none"?{vet:true}:void 0,b=ma()?.header;return b===void 0?null:/* @__PURE__ */$(w,{testID:"everfur-sdk-header-tabs-bar",children:[
|
|
200
|
+
/* @__PURE__ */N(b.TabsBarHeader,{options:ts(n,r),pushed:u,petRef:r?.petRef??null,petName:r?.name??"",copy:pa,onClose:f}),l!==null||t.sections.length<2?null:/* @__PURE__ */N(b.SubTabs,{tabs:t.sections,sub:o,copy:s,badges:g,onOpen:d}),o==="ask"?/* @__PURE__ */N(MemoryRow,{config:e,pet:r}):null]})}function AskVetSwitch({config:e,level:t,section:n,onSection:r}){let o=e.settings;/* @__PURE__ */
|
|
201
|
+
return N(w,{accessibilityRole:"tablist",style:{flexDirection:"row",borderBottomWidth:1,borderColor:o["look.color.line"],paddingHorizontal:8},testID:"everfur-sdk-ask-vet-switch",children:["ask","vet"].map(i=>/* @__PURE__ */N(_,{accessibilityRole:"tab",accessibilityState:{selected:n===i},onPress:()=>r(i),style:{minHeight:44,paddingHorizontal:12,justifyContent:"center",borderBottomWidth:2,borderBottomColor:n===i?o["look.color.primary"]:"transparent"},testID:`everfur-sdk-switch-${i}`,children:/* @__PURE__ */N(Text,{tier:"control",style:{fontFamily:o["look.font.body"],fontSize:15,color:n===i?o["look.color.heading"]:o["look.color.muted"]},children:as(e,i,t)})},i))})}function VetPill({config:e,layout:t,level:n,waiting:r,onPress:o}){let i=e.settings,a=t.vetBadge==="header_pill"&&r;/* @__PURE__ */
|
|
202
|
+
return $(_,{accessibilityRole:"button",onPress:o,style:{flexDirection:"row",alignItems:"center",gap:6,height:32,paddingLeft:10,paddingRight:12,borderRadius:16,backgroundColor:"#FFFFFF",borderWidth:1,borderColor:i["look.color.line"]},testID:"everfur-sdk-vet-pill",children:[a?/* @__PURE__ */N(w,{style:{width:8,height:8,borderRadius:4,backgroundColor:i["look.color.dot"]},testID:"everfur-sdk-vet-pill-dot"}):null,
|
|
203
|
+
/* @__PURE__ */N(Text,{tier:"control",style:{fontFamily:i["look.font.body"],fontSize:14,color:i["look.color.heading"]},children:vetTabLabel(e,n)})]})}function PetSwitcher({config:e,host:t,pet:n}){let r=e.settings;return n===null?null:/* @__PURE__ */$(_,{accessibilityRole:"button",onPress:()=>{if(t.pets.length<2)return;let e=t.pets.findIndex(e=>e.petRef===n.petRef),r=t.pets[(e+1)%t.pets.length];r!==void 0&&t.onPetChange?.(r.petRef)},style:{minHeight:44,flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8},testID:"everfur-sdk-pet-switcher",children:[
|
|
204
|
+
/* @__PURE__ */N(Text,{tier:"control",numberOfLines:1,style:{fontFamily:r["look.font.body"],fontSize:15,fontWeight:"600",color:r["look.color.heading"]},children:n.name}),t.pets.length>1?/* @__PURE__ */N(Text,{tier:"control",style:{fontSize:12,color:r["look.color.heading"]},children:"▾"}):null]})}function MemoryRow({config:e,pet:t,withLockup:n=false}){let r=memoryChip(e,t?.name);return r===null&&!n?null:/* @__PURE__ */$(w,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,paddingHorizontal:16,paddingTop:10},testID:"everfur-sdk-memory-row",children:[r!==null?/* @__PURE__ */N(SdkMemoryChip,{settings:e.settings,label:r}):/* @__PURE__ */N(w,{}),n?/* @__PURE__ */N(SdkLockup,{settings:e.settings}):null]})}function AskPane({config:t,layout:n,pet:r,level:o,access:i,hooks:a,chat:l,locked:s,tabsBar:d,onRecords:c,onVet:u,onPlan:f}){let h=t.settings,g=h["look.color.heading"],b=p(()=>({title:sdkText(t,"text.ask.greeting",r===null?{}:{pet:r.name}),chipTints:h["look.color.chips"].map(e=>({tint:e,ink:chipInk(e,g)}))}),[t,h,g,r]),m=p(()=>({chats:os,newChat:sdkText(t,"text.ask.new_chat")}),[t]),y=i.kind==="members_only"||i.kind==="cap_reached",v=n.vetOnAsk!=="none"&&o!=="none"?r?.location?.state:void 0;/* @__PURE__ */
|
|
205
|
+
return $(w,{style:{flex:1},testID:"everfur-sdk-ask",children:[y?/* @__PURE__ */N(w,{style:{flex:1,alignItems:"center",justifyContent:"center",padding:24},testID:"everfur-sdk-ask-blocked",children:/* @__PURE__ */N(_,{accessibilityRole:"button",onPress:f,style:{minHeight:44,justifyContent:"center"},children:/* @__PURE__ */N(Text,{tier:"control",style:{fontFamily:h["look.font.body"],fontSize:15,color:h["look.color.accent"]},children:i.kind==="members_only"?sdkText(t,"text.members.button"):sdkText(t,"text.cap.button")})})}):/* @__PURE__ */N(Fl.Provider,{value:a,children:/* @__PURE__ */N(Ht.Provider,{value:d,children:/* @__PURE__ */N(e,{header:false,...l,...r===null?{}:{petRef:r.petRef},...v===void 0?{}:{vetUsState:v},...s("texting")||!h["features.texting"]?{textingEntry:false}:{},...n.vetOnAsk==="none"?{}:{onFindVet:u},emptyState:b,historyBar:m,style:{flex:1,paddingTop:0},...d?{onOpenRecord:l?.onOpenRecord??c}:{}})})}),i.kind==="counter"?/* @__PURE__ */N(Text,{style:{textAlign:"center",fontFamily:h["look.font.label"]==="body"?h["look.font.body"]:h["look.font.label"],fontSize:12,color:h["look.color.muted"],paddingVertical:4},testID:"everfur-sdk-counter",children:i.line}):null]})}function VetPane2({config:e,pet:t,level:n,tabsBar:r,locked:o,onLocked:i,onAsk:l}){let s=r?ma()?.vet.VetHome:void 0;if(s!==void 0&&ss(e,n,t)){let e=t?.location?.state;/* @__PURE__ */
|
|
206
|
+
return $(w,{style:{flex:1},testID:"everfur-sdk-vet-tabs-bar",children:[
|
|
207
|
+
/* @__PURE__ */N(s,{petRef:t?.petRef??null,...e===void 0?{}:{usState:e},...o?{onStartInApp:()=>i()}:{},style:{flex:1}}),
|
|
208
|
+
/* @__PURE__ */N(a,{})]})}/* @__PURE__ */
|
|
209
|
+
return N(ConfigVetPane,{config:e,pet:t,level:n,locked:o,onLocked:i,onAsk:l})}function ss(e,t,n){if(t!=="visits")return false;let r=e.settings["vet.visits_per_year"],o=n?.visitsUsed;return r===null||o===null||o===void 0||o<r}function ConfigVetPane({config:e,pet:t,level:n,locked:r,onLocked:o,onAsk:i}){let a=useVetVisit({petRef:t?.petRef??null,usState:t?.location?.state??null}),l=vetHome(e,{level:n,...t===null?{}:{pet:t.name,petSex:t.sex??null,visitsUsed:t.visitsUsed??null},...t?.stateName!==void 0?{stateName:t.stateName}:t?.location?.state!==void 0?{stateName:t.location.state}:{}});/* @__PURE__ */
|
|
210
|
+
return $(w,{style:{flex:1},children:[
|
|
211
|
+
/* @__PURE__ */N(SdkVetHomeView,{config:e,home:l,onBook:()=>{r?o():a.open(t?.petRef??null)},style:{flex:1}}),
|
|
212
|
+
/* @__PURE__ */N(SdkDockBar,{config:e,pet:t?.name,onPress:i})]})}function RecordsPane({config:e,host:t,pet:n,tabsBar:r,shellPush:i,vetShown:a,records:l,onPlan:s,onVet:d,locked:c,onAsk:u}){let p=e.settings,f=new Set(p["features.partner_data"]),h=(t.partnerData??[]).filter(e=>f.has(e.source)),g=partnerDataSources(e),b=t=>sdkFixed(e,t==="park_checkins"?"pdata.tag.park_checkins":t==="camera_events"?"pdata.tag.camera_events":"pdata.tag.dna_results"),m=l?.sheet,y=!r||m===false?m:{layout:"tabs_bar",shellPush:i,...n?.photoUrl===void 0?{}:{petPhotoUrl:n.photoUrl},...typeof m=="object"?m:{}};/* @__PURE__ */
|
|
213
|
+
return $(w,{style:{flex:1},testID:"everfur-sdk-records",children:[n===null?null:/* @__PURE__ */N(o,{...l,...y===void 0?{}:{sheet:y},petRef:n.petRef,petName:n.name,weightUnit:p["units.weight"],noVet:!a,onOpenPlan:()=>s("previous_results"),...a?{onSpeakToVet:d}:{},...c("link_records")?{onRequestFromClinic:()=>s("link_records")}:{},style:{flex:1}}),h.length>0?/* @__PURE__ */N(w,{style:{paddingHorizontal:16,paddingVertical:8,gap:6},testID:"everfur-sdk-partner-data",accessibilityLabel:g.join(", "),children:h.map((e,t)=>/* @__PURE__ */$(w,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[
|
|
214
|
+
/* @__PURE__ */N(Text,{tier:"badge",style:{fontFamily:p["look.font.body"],fontSize:11,color:p["look.color.heading"],backgroundColor:p["look.color.tint"],paddingHorizontal:8,paddingVertical:2,borderRadius:10,overflow:"hidden"},children:b(e.source)}),
|
|
215
|
+
/* @__PURE__ */N(Text,{style:{flex:1,fontFamily:p["look.font.body"],fontSize:14,color:p["look.color.ink"]},children:e.title}),e.date!==void 0?/* @__PURE__ */N(Text,{style:{fontFamily:p["look.font.body"],fontSize:12,color:p["look.color.muted"]},children:e.date}):null]},`${e.source}-${t}`))}):null,
|
|
216
|
+
/* @__PURE__ */N(SdkDockBar,{config:e,pet:n?.name,onPress:u})]})}function EverfurSdkLauncher({onPress:e,tipSeen:t=false,onTipSeen:n,replyWaiting:r,onReplyWaitingChange:o,style:i}){let a=xl(),{active:l}=useEverfurSdkConfig();f(()=>{a?.load()},[a]);let s=useEverfurUnread({petRef:null}),d=r??s.hasUnread===true;return f(()=>{o?.(d)},[d,o]),l===null||l.settings["layout.launcher"]!=="floating_button"?null:/* @__PURE__ */N(SdkLauncherView,{config:l,onPress:e,replyWaiting:d,tipSeen:t,onTipSeen:()=>n?.(),...i===void 0?{}:{style:i}})}export{mt as EVERFUR_INTRO_COPY,Yt as EVERFUR_TABS_COPY,pa as EVERFUR_TABS_SHELL_COPY,EverfurIntro,EverfurRecordsLandedBanner,EverfurSdkApp,EverfurSdkLauncher,EverfurTabs,Hi as RECORDS_BANNER_MS,defaultIntroBlanks,introFacts,introPetWords,introText,isIntroSwipeOut,numberWord,registerEverfurSvg,useEverfurIntroSeen,useEverfurSdkConfig,useEverfurTabs,useLoadEverfurSdkConfig};
|