@everfur/sdk 0.21.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/CHANGELOG.md +167 -3
  2. package/dist/{Chat.d-JDtlG_EW.d.cts → Chat.d-DDmNIlJn.d.cts} +1 -1
  3. package/dist/{Chat.d-CoGJrK3t.d.ts → Chat.d-DySDBc6L.d.ts} +1 -1
  4. package/dist/{DepthViews.d-XTv4s3ru.d.cts → DepthViews.d-BHb0Xb-C.d.cts} +1 -1
  5. package/dist/{DepthViews.d-CNQn-eEr.d.ts → DepthViews.d-BIfqdrvX.d.ts} +1 -1
  6. package/dist/{DepthViews.d-D31VlFKU.d.ts → DepthViews.d-BW3HrhnC.d.ts} +1 -1
  7. package/dist/{DepthViews.d-zxM_xbP9.d.cts → DepthViews.d-Dq8eWBvw.d.cts} +1 -1
  8. package/dist/{RecordsPage.d-D_y-ZB3S.d.ts → RecordsPage.d-Bs-dghTH.d.ts} +1 -1
  9. package/dist/{RecordsPage.d-CSZHrtWJ.d.cts → RecordsPage.d-CLrw-AvZ.d.cts} +1 -1
  10. package/dist/animations/index.cjs +2 -2
  11. package/dist/animations/index.d.cts +3 -3
  12. package/dist/animations/index.d.ts +3 -3
  13. package/dist/animations/index.js +2 -2
  14. package/dist/{attachments.d-D74wbmQU.d.cts → attachments.d-DTGYmW8Y.d.cts} +1 -1
  15. package/dist/{attachments.d-Dm6NUJTR.d.ts → attachments.d-DjxmIsNp.d.ts} +1 -1
  16. package/dist/{bookingCopy.d-DMmLKY5Q.d.ts → bookingCopy.d-CX-DMiwi.d.ts} +148 -148
  17. package/dist/{bookingCopy.d-iaYDPvPd.d.cts → bookingCopy.d-D952V8Tq.d.cts} +148 -148
  18. package/dist/{branding.d-DpNGEdDL.d.ts → branding.d-DC4imCYd.d.ts} +72 -4
  19. package/dist/{branding.d-BFauULV6.d.cts → branding.d-G7rpxDhI.d.cts} +72 -4
  20. package/dist/{casesRepository.d-CCJJQXnl.d.ts → casesRepository.d-CnJZlUZ4.d.ts} +1 -1
  21. package/dist/{casesRepository.d-G2dahIKO.d.cts → casesRepository.d-bWJHZD-_.d.cts} +1 -1
  22. package/dist/chat/index.cjs +59 -47
  23. package/dist/chat/index.d.cts +11 -11
  24. package/dist/chat/index.d.ts +11 -11
  25. package/dist/chat/index.js +59 -47
  26. package/dist/chat/lite/index.cjs +59 -47
  27. package/dist/chat/lite/index.d.cts +11 -11
  28. package/dist/chat/lite/index.d.ts +11 -11
  29. package/dist/chat/lite/index.js +59 -47
  30. package/dist/{chatHandoffToken.d-DVv9tl8h.d.ts → chatHandoffToken.d-BCEdhZpd.d.ts} +5 -5
  31. package/dist/{chatHandoffToken.d-xmnHrTA5.d.cts → chatHandoffToken.d-uKnSnIzN.d.cts} +5 -5
  32. package/dist/{chatTypes.d-CQC7GTdE.d.cts → chatTypes.d-CFyYBzps.d.cts} +4 -4
  33. package/dist/{chatTypes.d-hS1AilYl.d.ts → chatTypes.d-DbdF3ij5.d.ts} +4 -4
  34. package/dist/chunk-EMINPX6C.js +14 -0
  35. package/dist/{chunk-2NA7TPUA.js → chunk-NO7LYPKW.js} +1 -1
  36. package/dist/chunk-QG4ZH45Q.js +47 -0
  37. package/dist/chunk-VY5VTLFX.js +34 -0
  38. package/dist/client/index.cjs +9 -8
  39. package/dist/client/index.d.cts +18 -12
  40. package/dist/client/index.d.ts +18 -12
  41. package/dist/client/index.js +9 -8
  42. package/dist/{clinicBatch.d-BpP2NBb3.d.ts → clinicBatch.d-C_kZtYt-.d.ts} +2 -2
  43. package/dist/{clinicBatch.d-4PFwKJfw.d.cts → clinicBatch.d-e3Cn5HhA.d.cts} +2 -2
  44. package/dist/{config.d-D9igq-vT.d.ts → config.d--6siaeNg.d.ts} +14 -6
  45. package/dist/{config.d-cX5E6DAw.d.cts → config.d-Ba21AaZg.d.cts} +14 -6
  46. package/dist/consent/index.cjs +2 -2
  47. package/dist/consent/index.d.cts +5 -5
  48. package/dist/consent/index.d.ts +5 -5
  49. package/dist/consent/index.js +2 -2
  50. package/dist/{context.d-BrRRNw9I.d.cts → context.d-DLHTf-fV.d.cts} +7 -7
  51. package/dist/{context.d-hPfsEsNf.d.ts → context.d-TArU_9lj.d.ts} +7 -7
  52. package/dist/{copy.d-CDlirTR4.d.ts → copy.d-GokMma80.d.ts} +2 -2
  53. package/dist/{copy.d-DWjSkbrZ.d.cts → copy.d-zWWCn3wB.d.cts} +2 -2
  54. package/dist/core/index.cjs +4 -4
  55. package/dist/core/index.d.cts +17 -17
  56. package/dist/core/index.d.ts +17 -17
  57. package/dist/core/index.js +4 -4
  58. package/dist/{depth.d-CfBorxcQ.d.ts → depth.d-C_HL8yAz.d.ts} +2 -2
  59. package/dist/{depth.d-KkrGx98U.d.cts → depth.d-De5pT7vA.d.cts} +2 -2
  60. package/dist/{entitlementRepository.d-DpQrIgW6.d.ts → entitlementRepository.d-CoKN-Ksa.d.ts} +3 -3
  61. package/dist/{entitlementRepository.d-BvnWpcQH.d.cts → entitlementRepository.d-Tj7lvs4e.d.cts} +3 -3
  62. package/dist/{focus.d-CYwVLDvR.d.ts → focus.d-7G0BBmA9.d.ts} +3 -128
  63. package/dist/{focus.d-9loikWy8.d.cts → focus.d-B0qweva0.d.cts} +3 -128
  64. package/dist/health-plan/index.cjs +133 -92
  65. package/dist/health-plan/index.d.cts +33 -18
  66. package/dist/health-plan/index.d.ts +33 -18
  67. package/dist/health-plan/index.js +141 -100
  68. package/dist/healthPlanRepository.d-CdCyUWph.d.ts +131 -0
  69. package/dist/healthPlanRepository.d-fPbLceBr.d.cts +131 -0
  70. package/dist/{idempotency.d-DGQ_xML5.d.ts → idempotency.d-CoUlC-Yd.d.ts} +1 -1
  71. package/dist/{idempotency.d-CVKkUhY4.d.cts → idempotency.d-IDta7Jjj.d.cts} +1 -1
  72. package/dist/{identity.d-DR5YwO6E.d.ts → identity.d-B7dPRGqm.d.ts} +1 -1
  73. package/dist/{identity.d-Bnl5Z0MM.d.cts → identity.d-_MK9Y7a4.d.cts} +1 -1
  74. package/dist/inbox.d-ChNXTovj.d.cts +103 -0
  75. package/dist/inbox.d-CuuPTWyW.d.ts +103 -0
  76. package/dist/index.cjs +69 -56
  77. package/dist/index.d.cts +18 -18
  78. package/dist/index.d.ts +18 -18
  79. package/dist/index.js +69 -56
  80. package/dist/{introEvents.d-D_yL7lnE.d.ts → introEvents.d-D6Ay0ORN.d.ts} +1 -1
  81. package/dist/{introEvents.d-JmPqEqMQ.d.cts → introEvents.d-JvAWRKYu.d.cts} +1 -1
  82. package/dist/{usePresentation.d-CrobH0d_.d.cts → layout.d-ByfOEhpG.d.cts} +2 -136
  83. package/dist/{usePresentation.d-CDNK4MDY.d.ts → layout.d-D3d4QMeO.d.ts} +2 -136
  84. package/dist/notifications/inbox/index.cjs +24 -12
  85. package/dist/notifications/inbox/index.d.cts +87 -6
  86. package/dist/notifications/inbox/index.d.ts +87 -6
  87. package/dist/notifications/inbox/index.js +24 -12
  88. package/dist/notifications/index.d.cts +7 -7
  89. package/dist/notifications/index.d.ts +7 -7
  90. package/dist/{optInView.d-CZvKlq-o.d.ts → optInView.d-BpFTJaaX.d.ts} +2 -2
  91. package/dist/{optInView.d-BizcW_QG.d.cts → optInView.d-Bxvg0WLJ.d.cts} +2 -2
  92. package/dist/{pets.d-uCzgFbGi.d.ts → pets.d-Br960ekh.d.ts} +1 -1
  93. package/dist/{pets.d-C4CWxQPh.d.cts → pets.d-BtbJcf8T.d.cts} +1 -1
  94. package/dist/{petsRepository.d-DOcVv9bd.d.cts → petsRepository.d-Bj9rPnCr.d.cts} +1 -1
  95. package/dist/{petsRepository.d-DRW7NkKm.d.ts → petsRepository.d-CSOth5XE.d.ts} +1 -1
  96. package/dist/photo/index.cjs +1 -1
  97. package/dist/photo/index.js +1 -1
  98. package/dist/{presentation.d-Bs8xQ4gD.d.cts → presentation.d-BvZs_jN-.d.cts} +6 -0
  99. package/dist/{presentation.d-Bs8xQ4gD.d.ts → presentation.d-BvZs_jN-.d.ts} +6 -0
  100. package/dist/records/depth/index.cjs +10 -6
  101. package/dist/records/depth/index.d.cts +9 -9
  102. package/dist/records/depth/index.d.ts +9 -9
  103. package/dist/records/depth/index.js +10 -6
  104. package/dist/records/index.cjs +302 -207
  105. package/dist/records/index.d.cts +144 -17
  106. package/dist/records/index.d.ts +144 -17
  107. package/dist/records/index.js +302 -207
  108. package/dist/{requestFunnel.d-CQ0O8fMG.d.cts → requestFunnel.d-BwO-jFLX.d.cts} +2 -2
  109. package/dist/{requestFunnel.d-BYLycQMI.d.ts → requestFunnel.d-LSnmCusf.d.ts} +2 -2
  110. package/dist/{route.d-DFJ0gXj8.d.ts → route.d-Bzyamuxa.d.ts} +2 -2
  111. package/dist/{route.d-q9yndhFy.d.cts → route.d-D70-OHBc.d.cts} +2 -2
  112. package/dist/{runtimeTypes.d-3LRuzxr7.d.cts → runtimeTypes.d-BHdN-9aB.d.cts} +7 -7
  113. package/dist/{runtimeTypes.d-BJHYj2MI.d.ts → runtimeTypes.d-L_CbeCKS.d.ts} +7 -7
  114. package/dist/{screenProps.d-DfAmuKkr.d.cts → screenProps.d-DB5IMaGZ.d.cts} +1 -1
  115. package/dist/{screenProps.d-tVzlXGaN.d.ts → screenProps.d-HGSPNGHt.d.ts} +1 -1
  116. package/dist/server/events/index.cjs +1 -1
  117. package/dist/server/events/index.d.cts +2 -2
  118. package/dist/server/events/index.d.ts +2 -2
  119. package/dist/server/events/index.js +1 -1
  120. package/dist/server/index.cjs +1 -1
  121. package/dist/server/index.d.cts +3 -3
  122. package/dist/server/index.d.ts +3 -3
  123. package/dist/server/index.js +1 -1
  124. package/dist/shop/index.cjs +26 -13
  125. package/dist/shop/index.d.cts +3 -3
  126. package/dist/shop/index.d.ts +3 -3
  127. package/dist/shop/index.js +26 -13
  128. package/dist/slots/index.cjs +299 -0
  129. package/dist/slots/index.d.cts +155 -0
  130. package/dist/slots/index.d.ts +155 -0
  131. package/dist/slots/index.js +299 -0
  132. package/dist/slots/weather-glyphs/index.cjs +2 -0
  133. package/dist/slots/weather-glyphs/index.d.cts +11 -0
  134. package/dist/slots/weather-glyphs/index.d.ts +11 -0
  135. package/dist/slots/weather-glyphs/index.js +2 -0
  136. package/dist/tabs/index.cjs +43 -12
  137. package/dist/tabs/index.d.cts +79 -8
  138. package/dist/tabs/index.d.ts +79 -8
  139. package/dist/tabs/index.js +43 -12
  140. package/dist/televet/booking/index.cjs +54 -10
  141. package/dist/televet/booking/index.d.cts +51 -10
  142. package/dist/televet/booking/index.d.ts +51 -10
  143. package/dist/televet/booking/index.js +55 -11
  144. package/dist/televet/call/index.cjs +1 -1
  145. package/dist/televet/call/index.js +1 -1
  146. package/dist/televet/index.cjs +1 -1
  147. package/dist/televet/index.d.cts +2 -2
  148. package/dist/televet/index.d.ts +2 -2
  149. package/dist/televet/index.js +1 -1
  150. package/dist/testing/index.d.cts +1 -1
  151. package/dist/testing/index.d.ts +1 -1
  152. package/dist/testing/rn/index.cjs +1 -1
  153. package/dist/testing/rn/index.d.cts +13 -11
  154. package/dist/testing/rn/index.d.ts +13 -11
  155. package/dist/testing/rn/index.js +1 -1
  156. package/dist/testing/web/index.d.cts +10 -10
  157. package/dist/testing/web/index.d.ts +10 -10
  158. package/dist/texting/index.cjs +2 -2
  159. package/dist/texting/index.d.cts +5 -5
  160. package/dist/texting/index.d.ts +5 -5
  161. package/dist/texting/index.js +2 -2
  162. package/dist/{threadOptions.d-I6G3BdlP.d.cts → threadOptions.d-CS-Qu_rR.d.cts} +6 -6
  163. package/dist/{threadOptions.d-DfH26dy7.d.ts → threadOptions.d-FzFN0zsK.d.ts} +6 -6
  164. package/dist/{timelineRows.d-uSfr2IP3.d.cts → timelineRows.d-BJRCgmdv.d.cts} +1 -1
  165. package/dist/{timelineRows.d-CugnCOfZ.d.ts → timelineRows.d-CPS4admm.d.ts} +1 -1
  166. package/dist/{tokens.d-BUVqme2D.d.cts → tokens.d-DH1mYjZl.d.cts} +43 -1
  167. package/dist/{tokens.d-BUVqme2D.d.ts → tokens.d-DH1mYjZl.d.ts} +43 -1
  168. package/dist/{typeStyle.d-Ckdh_S-t.d.cts → typeStyle.d-BIDpuYpg.d.cts} +29 -3
  169. package/dist/{typeStyle.d-B9Jo5mDX.d.ts → typeStyle.d-aRhFhBpG.d.ts} +29 -3
  170. package/dist/ui/index.cjs +26 -13
  171. package/dist/ui/index.js +26 -13
  172. package/dist/{useHealthPlanSubscription.d-CVVQIFpG.d.ts → useHealthPlanSubscription.d-SQfx-45x.d.ts} +3 -2
  173. package/dist/{useHealthPlanSubscription.d-DylPMm_m.d.cts → useHealthPlanSubscription.d-zjsvvlhz.d.cts} +3 -2
  174. package/dist/useInboxUnread.d-7p3IWs_A.d.cts +109 -0
  175. package/dist/useInboxUnread.d-BxFKFU4o.d.ts +109 -0
  176. package/dist/usePresentation.d-BHO_uZ31.d.cts +140 -0
  177. package/dist/usePresentation.d-Dr7iD-4Y.d.ts +140 -0
  178. package/dist/{useRecordsDepth.d-BvBYIPii.d.ts → useRecordsDepth.d-BinUa8W9.d.ts} +1 -1
  179. package/dist/{useRecordsDepth.d-Cd5Vyb7D.d.cts → useRecordsDepth.d-Bk8BSerZ.d.cts} +1 -1
  180. package/dist/{useUnread.d-ElAEfgl1.d.ts → useUnread.d-CAeYh82_.d.ts} +10 -7
  181. package/dist/{useUnread.d-B4Yqcteg.d.cts → useUnread.d-DXcRBQw8.d.cts} +10 -7
  182. package/dist/video/index.cjs +1 -1
  183. package/dist/video/index.js +1 -1
  184. package/dist/{view.d-2RWoY9kd.d.ts → view.d-CaH6dZPJ.d.ts} +3 -3
  185. package/dist/{view.d-utmOR2ee.d.cts → view.d-DV4b1cov.d.cts} +3 -3
  186. package/dist/web/consent/index.cjs +1 -1
  187. package/dist/web/consent/index.d.cts +5 -5
  188. package/dist/web/consent/index.d.ts +5 -5
  189. package/dist/web/consent/index.js +1 -1
  190. package/dist/web/health-plan/index.cjs +15 -13
  191. package/dist/web/health-plan/index.d.cts +20 -13
  192. package/dist/web/health-plan/index.d.ts +20 -13
  193. package/dist/web/health-plan/index.js +7 -7
  194. package/dist/web/health-plan/styles.css +6 -2
  195. package/dist/web/inbox/index.cjs +1 -1
  196. package/dist/web/inbox/index.d.cts +7 -5
  197. package/dist/web/inbox/index.d.ts +7 -5
  198. package/dist/web/inbox/index.js +1 -1
  199. package/dist/web/index.cjs +71 -70
  200. package/dist/web/index.d.cts +53 -31
  201. package/dist/web/index.d.ts +53 -31
  202. package/dist/web/index.js +28 -27
  203. package/dist/web/intro/index.cjs +1 -1
  204. package/dist/web/intro/index.d.cts +7 -6
  205. package/dist/web/intro/index.d.ts +7 -6
  206. package/dist/web/intro/index.js +1 -1
  207. package/dist/web/notifications/index.cjs +1 -1
  208. package/dist/web/notifications/index.d.cts +6 -6
  209. package/dist/web/notifications/index.d.ts +6 -6
  210. package/dist/web/notifications/index.js +1 -1
  211. package/dist/web/records/depth/index.cjs +1 -1
  212. package/dist/web/records/depth/index.d.cts +9 -9
  213. package/dist/web/records/depth/index.d.ts +9 -9
  214. package/dist/web/records/depth/index.js +1 -1
  215. package/dist/web/records/index.cjs +1 -1
  216. package/dist/web/records/index.d.cts +11 -11
  217. package/dist/web/records/index.d.ts +11 -11
  218. package/dist/web/records/index.js +1 -1
  219. package/dist/web/records-sheet/index.cjs +3 -3
  220. package/dist/web/records-sheet/index.js +3 -3
  221. package/dist/web/shop/index.cjs +27 -8
  222. package/dist/web/shop/index.d.cts +4 -3
  223. package/dist/web/shop/index.d.ts +4 -3
  224. package/dist/web/shop/index.js +3 -3
  225. package/dist/web/televet/booking/index.cjs +53 -53
  226. package/dist/web/televet/booking/index.d.cts +44 -44
  227. package/dist/web/televet/booking/index.d.ts +44 -44
  228. package/dist/web/televet/booking/index.js +53 -53
  229. package/dist/web/televet/call/index.cjs +3 -3
  230. package/dist/web/televet/call/index.d.cts +7 -6
  231. package/dist/web/televet/call/index.d.ts +7 -6
  232. package/dist/web/televet/call/index.js +3 -3
  233. package/dist/web/televet/index.cjs +1 -1
  234. package/dist/web/televet/index.js +1 -1
  235. package/dist/web/texting/index.cjs +1 -1
  236. package/dist/web/texting/index.d.cts +5 -5
  237. package/dist/web/texting/index.d.ts +5 -5
  238. package/dist/web/texting/index.js +1 -1
  239. package/dist/web/ui/index.cjs +29 -10
  240. package/dist/web/ui/index.d.cts +32 -32
  241. package/dist/web/ui/index.d.ts +32 -32
  242. package/dist/web/ui/index.js +2 -2
  243. package/dist/web/ui/styles.css +46 -3
  244. package/package.json +36 -5
  245. package/slots/package.json +8 -0
  246. package/slots/weather-glyphs/package.json +8 -0
  247. package/dist/chunk-IJU5TV5N.js +0 -12
  248. package/dist/chunk-TFX6WMDN.js +0 -30
  249. package/dist/chunk-WZNPR5TY.js +0 -34
  250. package/dist/useInboxUnread.d-DDoSII8D.d.ts +0 -206
  251. package/dist/useInboxUnread.d-Dq3CCAa3.d.cts +0 -206
  252. package/dist/{IntakeMedia.d-Dqc5V_YH.d.cts → IntakeMedia.d-CO8weVGO.d.cts} +35 -35
  253. package/dist/{IntakeMedia.d-DNUAks9E.d.ts → IntakeMedia.d-DnUZJsbj.d.ts} +35 -35
@@ -1,6 +1,6 @@
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{createContext,forwardRef,createElement,useState,useEffect,useCallback,useSyncExternalStore,useMemo,useRef,useContext,Component}from"react";import{TextInput,AccessibilityInfo,View,Image,ActivityIndicator,StyleSheet,Text as Text$1}from"react-native";import{jsx,jsxs}from"react/jsx-runtime";import{z}from"zod";var freezeInPlace=Object.freeze;function deepFreeze(value){if(value!==null&&typeof value=="object"&&!Object.isFrozen(value)){freezeInPlace(value);for(let key of Object.keys(value))deepFreeze(value[key])}return value}var TEXT_SCALE_TIER_CAPS=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),SPACE={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},RADIUS={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},TYPE_SIZE={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},LINE_HEIGHT={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},WEIGHT={regular:"400",medium:"500",bold:"700"},LETTER_SPACING={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},DEFAULT_MAX_FONT_SCALE=0,SYSTEM_FONT_FAMILY="System",SYSTEM_MONO_FAMILY="monospace",TIERS=["content","heading","control","compact","badge"];function authoredTierSizes(size){let out={};for(let tier of TIERS)out[tier]=size;return out}var NO_FONT_SOURCES=[];function baseType(){return{family:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,fontUrl:null,families:{regular:SYSTEM_FONT_FAMILY,medium:SYSTEM_FONT_FAMILY,bold:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,monoMedium:SYSTEM_MONO_FAMILY,monoBold:SYSTEM_MONO_FAMILY},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:TYPE_SIZE,tierSizes:authoredTierSizes(TYPE_SIZE),lineHeight:LINE_HEIGHT,weight:WEIGHT,letterSpacing:LETTER_SPACING,scale:1,maxScale:DEFAULT_MAX_FONT_SCALE,scaleCaps:TEXT_SCALE_TIER_CAPS,headingFamily:null,headingWeight:null,fontSources:NO_FONT_SOURCES}}var NO_SLOTS={},EASING_CURVES=/* @__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(curve){return`cubic-bezier(${curve.join(", ")})`}var MOTION={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(EASING_CURVES.standard),emphasized:cssCubicBezier(EASING_CURVES.emphasized),exit:cssCubicBezier(EASING_CURVES.exit)},reducedMotion:false},LIGHT_COLOR={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)"},EVERFUR_LIGHT=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:LIGHT_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS}),DARK_COLOR={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:DARK_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS});var EVERFUR_THEME_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),globalThemeHost=globalThis,EverfurThemeContext=globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]??(globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]=createContext(EVERFUR_LIGHT));EverfurThemeContext.displayName??="EverfurThemeContext";function useEverfurTheme(){return useContext(EverfurThemeContext)}function tierMultiplier(type,tier){let cap=type.scaleCaps[tier];return cap>0?cap:void 0}function Text({tier:tier="content",...props}){let{type:type}=useEverfurTheme(),cap=tierMultiplier(type,tier);return createElement(Text$1,cap===void 0?props:{maxFontSizeMultiplier:cap,...props})}forwardRef(function(props,ref){return createElement(TextInput,{...props,...ref===null?{}:{ref:ref}})});function assertNever(x){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(x)}`)}function errorFrame(fields){/* @__PURE__ */
3
- return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fields.retryable,wireMessage:fields.wireMessage,synthesized:fields.synthesized,lastEventId:fields.lastEventId,serverRequestId:null})}var FACE_WEIGHT=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(theme,weight){let type=theme.type,fontFamily=type.families[weight];return weight==="mono"||type.namedFaces[weight]?{fontFamily:fontFamily}:{fontFamily:fontFamily,fontWeight:type.weight[FACE_WEIGHT[weight]]}}var HostRenderBoundary=class extends Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey}}static getDerivedStateFromError(){return{failed:true}}static getDerivedStateFromProps(props,state){return Object.is(props.resetKey,state.key)?null:{failed:false,key:props.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};function RenderHost({render:render}){return render()}function HostRender({render:render,fallback:fallback,resetKey:resetKey}){return createElement(HostRenderBoundary,{fallback:fallback,resetKey:resetKey,children:createElement(RenderHost,{render:render})})}var RETRYABILITY_ROWS=[{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:"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:"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:"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:"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:"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:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{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}],CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze(RETRYABILITY_ROWS.map(row=>/* @__PURE__ */Object.freeze(row)));/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(row=>row.wireCode));var NORMALIZED_FOLD=/* @__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",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"}),CONTRACT_ERROR_ROWS=/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(generated=>/* @__PURE__ */Object.freeze({wireCode:generated.wireCode,envelope:generated.envelope,retryable:generated.retryable,normalized:NORMALIZED_FOLD[generated.wireCode]}))),BY_KEY=new Map(CONTRACT_ERROR_ROWS.map(r=>[r.envelope+r.wireCode.toUpperCase(),r])),ENVELOPE_LOOKUP_ORDER=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(CONTRACT_ERROR_ROWS.map(r=>r.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(wireCode,envelope){if(typeof wireCode!="string")return;let key=wireCode.trim().toUpperCase();if(key.length!==0)for(let candidate of[envelope??"http_envelope",...ENVELOPE_LOOKUP_ORDER]){let row=BY_KEY.get(candidate+key);if(row)return row}}var CATEGORY_OF=/* @__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(code){return CATEGORY_OF[code]}function fromWire(wire){let contractRow=contractErrorFor(wire);if(contractRow)return contractRow.normalized;let upper=(wire??"").trim().toUpperCase(),canonical=upper.replace(/[^A-Z0-9]/g,"");if(canonical==="AUTHREJECTED")return"authRejected";if(upper.startsWith("AUTH"))return"authExpired";switch(canonical){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"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 AUTO_RETRYABLE_CODES=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(code){return AUTO_RETRYABLE_CODES.has(code)}var RETRYABLE_CONTRACT_CODES=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(code){return isAutoRetryable(code)||RETRYABLE_CONTRACT_CODES.has(code)}var BACKOFF_BASE_MS=500,BACKOFF_CAP_MS=8e3,MAX_RETRY_ATTEMPTS=4;function backoffDelayMs(attempt,rng=Math.random){let bounded=Math.max(0,attempt),ceiling=Math.min(BACKOFF_BASE_MS*2**bounded,BACKOFF_CAP_MS);return Math.floor(rng()*ceiling)}var ACCESS_DENIED_COPY="This feature isn't available on your account right now.",VALIDATION_FAILED_COPY="Something in that request was not right. Check the details and try again.",USER_FACING_COPY=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:ACCESS_DENIED_COPY,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:VALIDATION_FAILED_COPY,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:ACCESS_DENIED_COPY,runtimeDisposed:VALIDATION_FAILED_COPY,unknown:"Something went wrong. Please try again."}),SESSION_REVOKED_COPY="This session has ended. Please sign in again.",LINKED_ACCOUNT_READ_ONLY="linked_account_read_only";function displayFor(code,wireCode,reasonCode){return code==="conflict"&&reasonCode===LINKED_ACCOUNT_READ_ONLY?ACCESS_DENIED_COPY:(code==="authRejected"||code==="authExpired")&&typeof wireCode=="string"&&wireCode.trim().toLowerCase()==="session_revoked"?SESSION_REVOKED_COPY:userFacingError(code)}function userFacingError(code){return USER_FACING_COPY[code]}function defineHidden(target,key,value){Object.defineProperty(target,key,{value:value,enumerable:false,writable:false,configurable:false})}var REASON_CODE_SHAPE=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(code,opts){let row=contractErrorFor(opts?.wireCode,opts?.wireEnvelope),linkedReadOnly=code==="conflict"&&opts?.reasonCode===LINKED_ACCOUNT_READ_ONLY,error={code:code,category:categoryFor(code),retryable:opts?.retryable??(linkedReadOnly?false:isRetryableCode(code)),displayMessage:displayFor(code,opts?.wireCode,linkedReadOnly?LINKED_ACCOUNT_READ_ONLY:null)};opts?.httpStatus!==void 0&&(error.httpStatus=opts.httpStatus),opts?.requestId&&(error.requestId=opts.requestId),typeof opts?.reasonCode=="string"&&REASON_CODE_SHAPE.test(opts.reasonCode)&&(error.reasonCode=opts.reasonCode);let wait=opts?.retryAfterSeconds;if(typeof wait=="number"&&Number.isFinite(wait)&&wait>=0&&(error.retryAfterSeconds=Math.round(wait)),row);return opts?.wireMessage&&defineHidden(error,"wireMessage",opts.wireMessage),opts?.raw!==void 0&&opts.raw!==null&&defineHidden(error,"raw",opts.raw),/* @__PURE__ */Object.freeze(error)}var REQUIRES=/* @__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(name){return REQUIRES[name]}function decideCapability(name,decisions,opts){let keys=requires(name),byResource=/* @__PURE__ */new Map;for(let decision of decisions)byResource.set(decision.resource,decision);if(opts?.isPending===true&&keys.some(key=>!byResource.has(key)))return freezeDecision({name:name,enabled:false,isPending:true,limits:{}});let limits=mergeLimits(keys,byResource);return keys.filter(key=>byResource.get(key)?.granted!==true).length===0?freezeDecision({name:name,enabled:true,isPending:false,limits:limits}):freezeDecision({name:name,enabled:false,isPending:false,limits:limits,disabled:disabledFor(keys,byResource)})}function mergeLimits(keys,byResource){let out={};for(let key of keys){let decisionLimits=byResource.get(key)?.limits;if(decisionLimits)for(let[limitKey,limitValue]of Object.entries(decisionLimits)){let existing=out[limitKey];out[limitKey]=existing===void 0?limitValue:Math.min(existing,limitValue)}}return out}function disabledFor(keys,byResource){for(let key of keys){let explicit=byResource.get(key)?.disabled;if(explicit)/* @__PURE__ */
2
+ import{createContext,forwardRef,createElement,useState,useEffect,useCallback,useSyncExternalStore,useMemo,useRef,useContext,Component}from"react";import{TextInput,AccessibilityInfo,View,Image,ActivityIndicator,StyleSheet,Text as Text$1}from"react-native";import{jsx,jsxs}from"react/jsx-runtime";import{z}from"zod";var FACE_WEIGHT=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(theme,weight){let type=theme.type,fontFamily=type.families[weight];return weight==="mono"||type.namedFaces[weight]?{fontFamily:fontFamily}:{fontFamily:fontFamily,fontWeight:type.weight[FACE_WEIGHT[weight]]}}function headingFace(theme,fallback="bold"){let{headingFamily:headingFamily,headingWeight:headingWeight}=theme.type;if(headingFamily===null&&headingWeight===null)return face(theme,fallback);if(headingFamily!==null)return{fontFamily:headingFamily,fontWeight:headingWeight??theme.type.weight[FACE_WEIGHT[fallback]]};let base=face(theme,fallback);return base.fontWeight===void 0||headingWeight===null?base:{fontFamily:base.fontFamily,fontWeight:headingWeight}}function weightBucket(weight){return weight<=450?"regular":weight<=650?"medium":"bold"}var MONO_OF={regular:"mono",medium:"monoMedium",bold:"monoBold"};function textRole(theme,role){let byRole=roleCache.get(theme);byRole===void 0&&(byRole=/* @__PURE__ */new Map,roleCache.set(theme,byRole));let hit=byRole.get(role);if(hit!==void 0)return hit;let style=buildRole(theme,role);return byRole.set(role,style),style}var roleCache=/* @__PURE__ */new WeakMap;function buildRole(theme,role){let r=theme.type.roles[role],weight=r.weight==="400"&&r.face!=="mono"?theme.type.weight.regular:r.weight,bucket=weightBucket(Number(weight)),f=r.face==="mono"?face(theme,MONO_OF[bucket]):r.face==="heading"?headingFace(theme,bucket):face(theme,bucket),faceWeight=r.face==="heading"?theme.type.headingWeight??weight:weight,faceStyle=f.fontWeight===void 0?f:{fontFamily:f.fontFamily,fontWeight:faceWeight},fontSize=r.size,out={...faceStyle,fontSize:fontSize,lineHeight:Math.round(fontSize*r.lineHeight*100)/100};return r.letterSpacing!==0&&(out.letterSpacing=Math.round(fontSize*r.letterSpacing*100)/100),r.uppercase&&(out.textTransform="uppercase"),/* @__PURE__ */Object.freeze(out)}var TYPE_ROLE_DEFAULTS=/* @__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 freezeInPlace=Object.freeze;function deepFreeze(value){if(value!==null&&typeof value=="object"&&!Object.isFrozen(value)){freezeInPlace(value);for(let key of Object.keys(value))deepFreeze(value[key])}return value}var TEXT_SCALE_TIER_CAPS=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var SPACE={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},RADIUS={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},TYPE_SIZE={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},LINE_HEIGHT={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},WEIGHT={regular:"400",medium:"500",bold:"700"},LETTER_SPACING={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},DEFAULT_MAX_FONT_SCALE=0,SYSTEM_FONT_FAMILY="System",SYSTEM_MONO_FAMILY="monospace",TIERS=["content","heading","control","compact","badge"];function authoredTierSizes(size){let out={};for(let tier of TIERS)out[tier]=size;return out}var NO_FONT_SOURCES=[];function baseType(){return{family:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,fontUrl:null,families:{regular:SYSTEM_FONT_FAMILY,medium:SYSTEM_FONT_FAMILY,bold:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,monoMedium:SYSTEM_MONO_FAMILY,monoBold:SYSTEM_MONO_FAMILY},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:TYPE_SIZE,tierSizes:authoredTierSizes(TYPE_SIZE),lineHeight:LINE_HEIGHT,weight:WEIGHT,letterSpacing:LETTER_SPACING,scale:1,maxScale:DEFAULT_MAX_FONT_SCALE,scaleCaps:TEXT_SCALE_TIER_CAPS,headingFamily:null,headingWeight:null,fontSources:NO_FONT_SOURCES,roles:TYPE_ROLE_DEFAULTS,typeScale:1}}var NO_SLOTS={},EASING_CURVES=/* @__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(curve){return`cubic-bezier(${curve.join(", ")})`}var MOTION={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(EASING_CURVES.standard),emphasized:cssCubicBezier(EASING_CURVES.emphasized),exit:cssCubicBezier(EASING_CURVES.exit)},reducedMotion:false},LIGHT_COLOR={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)"},EVERFUR_LIGHT=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:LIGHT_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS}),DARK_COLOR={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:DARK_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS});var EVERFUR_THEME_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),globalThemeHost=globalThis,EverfurThemeContext=globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]??(globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]=createContext(EVERFUR_LIGHT));EverfurThemeContext.displayName??="EverfurThemeContext";function useEverfurTheme(){return useContext(EverfurThemeContext)}function tierMultiplier(type,tier){let cap=type.scaleCaps[tier];return cap>0?cap:void 0}function Text({tier:tier,variant:variant,...props}){let theme=useEverfurTheme(),role=variant===void 0?void 0:theme.type.roles[variant],cap=tierMultiplier(theme.type,tier??role?.tier??"content"),styled=variant===void 0?props:{...props,style:[{...textRole(theme,variant),color:theme.color.text.primary,flexShrink:1},props.style]};return createElement(Text$1,cap===void 0?styled:{maxFontSizeMultiplier:cap,...styled})}forwardRef(function(props,ref){return createElement(TextInput,{...props,...ref===null?{}:{ref:ref}})});function assertNever(x){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(x)}`)}function errorFrame(fields){/* @__PURE__ */
3
+ return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fields.retryable,wireMessage:fields.wireMessage,synthesized:fields.synthesized,lastEventId:fields.lastEventId,serverRequestId:null})}var HostRenderBoundary=class extends Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey}}static getDerivedStateFromError(){return{failed:true}}static getDerivedStateFromProps(props,state){return Object.is(props.resetKey,state.key)?null:{failed:false,key:props.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};function RenderHost({render:render}){return render()}function HostRender({render:render,fallback:fallback,resetKey:resetKey}){return createElement(HostRenderBoundary,{fallback:fallback,resetKey:resetKey,children:createElement(RenderHost,{render:render})})}var RETRYABILITY_ROWS=[{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:"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:"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:"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:"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:"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:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{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}],CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze(RETRYABILITY_ROWS.map(row=>/* @__PURE__ */Object.freeze(row)));/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(row=>row.wireCode));var NORMALIZED_FOLD=/* @__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",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"}),CONTRACT_ERROR_ROWS=/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(generated=>/* @__PURE__ */Object.freeze({wireCode:generated.wireCode,envelope:generated.envelope,retryable:generated.retryable,normalized:NORMALIZED_FOLD[generated.wireCode]}))),BY_KEY=new Map(CONTRACT_ERROR_ROWS.map(r=>[r.envelope+r.wireCode.toUpperCase(),r])),ENVELOPE_LOOKUP_ORDER=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(CONTRACT_ERROR_ROWS.map(r=>r.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(wireCode,envelope){if(typeof wireCode!="string")return;let key=wireCode.trim().toUpperCase();if(key.length!==0)for(let candidate of[envelope??"http_envelope",...ENVELOPE_LOOKUP_ORDER]){let row=BY_KEY.get(candidate+key);if(row)return row}}var CATEGORY_OF=/* @__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(code){return CATEGORY_OF[code]}function fromWire(wire){let contractRow=contractErrorFor(wire);if(contractRow)return contractRow.normalized;let upper=(wire??"").trim().toUpperCase(),canonical=upper.replace(/[^A-Z0-9]/g,"");if(canonical==="AUTHREJECTED")return"authRejected";if(upper.startsWith("AUTH"))return"authExpired";switch(canonical){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"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 AUTO_RETRYABLE_CODES=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(code){return AUTO_RETRYABLE_CODES.has(code)}var RETRYABLE_CONTRACT_CODES=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(code){return isAutoRetryable(code)||RETRYABLE_CONTRACT_CODES.has(code)}var BACKOFF_BASE_MS=500,BACKOFF_CAP_MS=8e3,MAX_RETRY_ATTEMPTS=4;function backoffDelayMs(attempt,rng=Math.random){let bounded=Math.max(0,attempt),ceiling=Math.min(BACKOFF_BASE_MS*2**bounded,BACKOFF_CAP_MS);return Math.floor(rng()*ceiling)}var ACCESS_DENIED_COPY="This feature isn't available on your account right now.",VALIDATION_FAILED_COPY="Something in that request was not right. Check the details and try again.",USER_FACING_COPY=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:ACCESS_DENIED_COPY,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:VALIDATION_FAILED_COPY,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:ACCESS_DENIED_COPY,runtimeDisposed:VALIDATION_FAILED_COPY,unknown:"Something went wrong. Please try again."}),SESSION_REVOKED_COPY="This session has ended. Please sign in again.",LINKED_ACCOUNT_READ_ONLY="linked_account_read_only";function displayFor(code,wireCode,reasonCode){return code==="conflict"&&reasonCode===LINKED_ACCOUNT_READ_ONLY?ACCESS_DENIED_COPY:(code==="authRejected"||code==="authExpired")&&typeof wireCode=="string"&&wireCode.trim().toLowerCase()==="session_revoked"?SESSION_REVOKED_COPY:userFacingError(code)}function userFacingError(code){return USER_FACING_COPY[code]}function defineHidden(target,key,value){Object.defineProperty(target,key,{value:value,enumerable:false,writable:false,configurable:false})}var REASON_CODE_SHAPE=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(code,opts){let row=contractErrorFor(opts?.wireCode,opts?.wireEnvelope),linkedReadOnly=code==="conflict"&&opts?.reasonCode===LINKED_ACCOUNT_READ_ONLY,error={code:code,category:categoryFor(code),retryable:opts?.retryable??(linkedReadOnly?false:isRetryableCode(code)),displayMessage:displayFor(code,opts?.wireCode,linkedReadOnly?LINKED_ACCOUNT_READ_ONLY:null)};opts?.httpStatus!==void 0&&(error.httpStatus=opts.httpStatus),opts?.requestId&&(error.requestId=opts.requestId),typeof opts?.reasonCode=="string"&&REASON_CODE_SHAPE.test(opts.reasonCode)&&(error.reasonCode=opts.reasonCode);let wait=opts?.retryAfterSeconds;if(typeof wait=="number"&&Number.isFinite(wait)&&wait>=0&&(error.retryAfterSeconds=Math.round(wait)),row);return opts?.wireMessage&&defineHidden(error,"wireMessage",opts.wireMessage),opts?.raw!==void 0&&opts.raw!==null&&defineHidden(error,"raw",opts.raw),/* @__PURE__ */Object.freeze(error)}var REQUIRES=/* @__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(name){return REQUIRES[name]}function decideCapability(name,decisions,opts){let keys=requires(name),byResource=/* @__PURE__ */new Map;for(let decision of decisions)byResource.set(decision.resource,decision);if(opts?.isPending===true&&keys.some(key=>!byResource.has(key)))return freezeDecision({name:name,enabled:false,isPending:true,limits:{}});let limits=mergeLimits(keys,byResource);return keys.filter(key=>byResource.get(key)?.granted!==true).length===0?freezeDecision({name:name,enabled:true,isPending:false,limits:limits}):freezeDecision({name:name,enabled:false,isPending:false,limits:limits,disabled:disabledFor(keys,byResource)})}function mergeLimits(keys,byResource){let out={};for(let key of keys){let decisionLimits=byResource.get(key)?.limits;if(decisionLimits)for(let[limitKey,limitValue]of Object.entries(decisionLimits)){let existing=out[limitKey];out[limitKey]=existing===void 0?limitValue:Math.min(existing,limitValue)}}return out}function disabledFor(keys,byResource){for(let key of keys){let explicit=byResource.get(key)?.disabled;if(explicit)/* @__PURE__ */
4
4
  return Object.freeze({reason:explicit.reason,level:explicit.level,recoverable:explicit.recoverable})}/* @__PURE__ */
5
5
  return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitlement",recoverable:false})}function freezeDecision(d){let base={name:d.name,enabled:d.enabled,isPending:d.isPending,limits:/* @__PURE__ */Object.freeze({...d.limits})};return d.disabled!==void 0&&(base.disabled=d.disabled),/* @__PURE__ */Object.freeze(base)}function ok(value,warning){/* @__PURE__ */
6
6
  return Object.freeze({ok:true,value:value})}function err(error){/* @__PURE__ */
@@ -1,6 +1,6 @@
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
2
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
3
- import { R as RequestFunnel } from './requestFunnel.d-CQ0O8fMG.cjs';
3
+ import { R as RequestFunnel } from './requestFunnel.d-BwO-jFLX.cjs';
4
4
  import { F as FileHandle, U as UploadTransport, a as UploadPolicyWire } from './ports.d-BX4f4UsB.cjs';
5
5
  import { R as ReadableStore, T as Timers } from './unreadStore.d-w5x6lEpR.cjs';
6
6
 
@@ -1,6 +1,6 @@
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
2
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
3
- import { R as RequestFunnel } from './requestFunnel.d-BYLycQMI.js';
3
+ import { R as RequestFunnel } from './requestFunnel.d-LSnmCusf.js';
4
4
  import { F as FileHandle, U as UploadTransport, a as UploadPolicyWire } from './ports.d-BX4f4UsB.js';
5
5
  import { R as ReadableStore, T as Timers } from './unreadStore.d-gCsleb6l.js';
6
6
 
@@ -2,8 +2,8 @@
2
2
  import { o as TelevetStatePolicy, k as TelevetBookingEntitlement, l as TelevetCancellationPolicy, m as TelevetClinician, c as TelevetSlot, n as TelevetSlotHold, j as TelevetBookingBody, T as TelevetConsult, b as TelevetCancelReceipt, p as TelevetTriageVerdict, h as ConsultStatus } from './televetGlobal.d-B0_jbCtC.js';
3
3
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
4
4
  import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
5
- import { R as RequestFunnel } from './requestFunnel.d-BYLycQMI.js';
6
- import { A as AuthContext } from './identity.d-DR5YwO6E.js';
5
+ import { R as RequestFunnel } from './requestFunnel.d-LSnmCusf.js';
6
+ import { A as AuthContext } from './identity.d-B7dPRGqm.js';
7
7
  import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-68yrE3BE.js';
8
8
  import { T as TelemetryPort } from './TelemetryPort.d-BDNr00hu.js';
9
9
  import { b as VetCallCredential, c as VetCallJoinRefusal } from './callRoom.d-Dqm1rUqT.js';
@@ -355,152 +355,6 @@ declare function vetThreadPetRef(pets: readonly {
355
355
  readonly petId: string | null;
356
356
  }[], petId: string | null): string | null;
357
357
 
358
- /**
359
- * The server's own demand bucket. A CLOSED SET, and callers may not substitute free text.
360
- *
361
- * THE TWO ARE CLOSED BY DIFFERENT FIXES, which is why the server distinguishes them and why a call site that
362
- * guesses is wrong in a way nobody can see: `no_licensed_vet` is closed by licensing a clinician in that
363
- * state, `no_prescribing` by a change in what that state permits remotely. The consumer container is explicit
364
- * about picking the first for an empty roster and for a blocked state
365
- * (TelevetBookingContainer.tsx, the `no_licensed_vet, not no_prescribing` comment).
366
- */
367
- type TelevetStateInterestReason = 'no_licensed_vet' | 'no_prescribing';
368
- /** What the control needs to render its lifecycle. Null means there is nothing to render; see the header. */
369
- interface TelevetStateInterestAction {
370
- /** The write SUCCEEDED in this session. Never inferred, never optimistic. */
371
- readonly joined: boolean;
372
- readonly pending: boolean;
373
- readonly failed: boolean;
374
- onPress(): void;
375
- }
376
- /**
377
- * The seam the write goes through. Resolves true on a recorded interest and false otherwise; a rejection is
378
- * caught here and read as false, so a host cannot turn a throw into a silent success.
379
- */
380
- type TelevetStateInterestWrite = (state: string, reason: TelevetStateInterestReason) => Promise<boolean>;
381
- /**
382
- * Local, per-mounted-booking feedback for the owner-initiated state-interest write.
383
- *
384
- * LOCAL SUCCESS IS DELIBERATELY EPHEMERAL, verbatim from the consumer's reasoning: the server is idempotent,
385
- * so this only prevents repeat taps in this session and "does not pretend we know the owner's durable
386
- * subscription state" (useBookingStateInterest.ts:20-25). Nothing here is persisted, because a remembered
387
- * "you are on the list" that outlived a state change would be a claim this client cannot stand behind.
388
- */
389
- declare function useStateInterest(state: string | null | undefined, write: TelevetStateInterestWrite | null | undefined): {
390
- actionFor(reason: TelevetStateInterestReason): TelevetStateInterestAction | null;
391
- };
392
-
393
- /** Why the roster is empty. Closed, because each value picks a different true sentence. */
394
- type TelevetEmptyRosterCause =
395
- /** A real, state-scoped read answered a literal empty list. A licensure gap. */
396
- 'roster'
397
- /** The route is dark for this tenant, so no read happened. Not a licensure fact. */
398
- | 'dark';
399
- /** What the empty-roster screen renders. Derived, never chosen at a call site. */
400
- interface TelevetEmptyRosterView {
401
- readonly title: string;
402
- readonly message: string;
403
- /**
404
- * The retry label, or null when a retry cannot help.
405
- *
406
- * NULL IS LOAD BEARING and is not a styling preference. `TelevetStateCard` renders its action only when a
407
- * label AND a handler are both present, so a null label removes the control rather than disabling it. A
408
- * `Check again` on a licensure gap is a button whose every press repeats the same answer.
409
- */
410
- readonly retryLabel: string | null;
411
- /**
412
- * Which demand bucket a state-interest write would carry from this screen, or null when interest cannot be
413
- * offered here.
414
- *
415
- * `no_licensed_vet`, NOT `no_prescribing`, and only on the licensure cause. The server treats the two as
416
- * distinct fixes; this one is closed by licensing a clinician in the state, which is exactly what an empty
417
- * state-scoped roster reports. Offering interest on the DARK cause would record a demand signal for a
418
- * state nobody established anything about.
419
- */
420
- readonly interestReason: 'no_licensed_vet' | null;
421
- }
422
- /**
423
- * The view for an empty roster, from the cause.
424
- *
425
- * A PURE FUNCTION over the copy deck, so both platform ports read the same three fields and neither can pick
426
- * its own sentence. It takes the CAUSE rather than a boolean, because a boolean at a call site is how the
427
- * dark tenant and the licensure gap got the same words in the first place.
428
- */
429
- declare function televetEmptyRosterView(cause: TelevetEmptyRosterCause): TelevetEmptyRosterView;
430
- /**
431
- * The cause, from what the flow knows.
432
- *
433
- * `surfaceServed` IS THE CALLER'S ONE FACT: has anything on this booking surface answered a real response?
434
- * The container derives it from the reads it has already made, and it is deliberately NOT re-derived here
435
- * from a 404, because `clinicians` has already swallowed that into `ok([])` by the time a screen sees it.
436
- * That swallow is the right call for rendering and the wrong one for this decision, which is exactly why
437
- * the fact has to be carried alongside the empty list rather than recovered from it.
438
- */
439
- declare function televetEmptyRosterCause(surfaceServed: boolean): TelevetEmptyRosterCause;
440
-
441
- /**
442
- * Why a pick was refused before it was ever sent.
443
- *
444
- * THE CONSUMER'S OWN THREE BUCKETS, not a set invented here: mobile's `ConsultAttachmentOutcome.refused` and
445
- * the web app's `ConsultAttachmentRefusal` both carry exactly `size`, `type` and `unreadable`, and each has a
446
- * ported sentence. A fourth cause with no consumer sentence would have nothing to say, so the type is closed.
447
- */
448
- type TelevetMediaRefusal = 'size' | 'type' | 'unreadable';
449
- /** Counts of what did not reach the vet, by cause. The consumer web app's `ConsultAttachmentShortfall`. */
450
- interface TelevetMediaShortfall {
451
- /** Passed the rules, then the send did not carry it. On this surface that is every pick; see the header. */
452
- readonly failed: number;
453
- readonly refused: Readonly<Record<TelevetMediaRefusal, number>>;
454
- }
455
- /** Nothing to say. Frozen and shared so a caller cannot mutate the empty case into a false report. */
456
- declare const NO_MEDIA_SHORTFALL: TelevetMediaShortfall;
457
- /** True when there is literally nothing to tell the owner. */
458
- declare function isMediaShortfallEmpty(shortfall: TelevetMediaShortfall): boolean;
459
- /**
460
- * One sentence per cause, in the consumer's order, or an empty list when there is nothing to say.
461
- *
462
- * THE ORDER IS THE CONSUMER'S AND IS NOT ALPHABETICAL: dropped, then size, then type, then unreadable. Both
463
- * consumer apps list them that way (MediaDropNotice.tsx:31-36 and consultAttachmentUpload.ts:385-403), which
464
- * puts the thing that got furthest through the flow first.
465
- *
466
- * A NEGATIVE OR NON-FINITE COUNT IS TREATED AS ZERO rather than trusted. These numbers can arrive from a
467
- * host's own upload seam, and `{n}` is interpolated straight into a sentence an owner reads: "-1 attachment
468
- * did not upload." is a defect wearing a report. It is floored rather than thrown on, because failing a
469
- * booking confirmation over a bad count would cost the owner the one screen that tells them anything.
470
- */
471
- declare function televetMediaShortfallLines(shortfall: TelevetMediaShortfall): readonly string[];
472
- /**
473
- * The shortfall THIS SURFACE actually has: every pick the owner made, reported as not sent.
474
- *
475
- * WHY THIS FUNCTION EXISTS AT ALL. The consumer apps derive their shortfall from an upload RESULT, and so
476
- * does the SDK when the televet presign is served. When it answers its dark 404 (or a host's controller has no
477
- * presign), `media_refs` leaves as `[]` whatever the owner picked, so the honest count is knowable without an
478
- * upload: it is the length of the tray.
479
- *
480
- * `failed`, NOT A REFUSAL BUCKET. The picks passed every local rule - the row accepted them, capped them at
481
- * `MEDIA_REFS_MAX` and showed them as thumbnails. Nothing about their size, type or readability is why they
482
- * did not arrive. "{n} attachments did not upload." is the true sentence; "too large to send" would be a
483
- * false explanation, and a false explanation invites the owner to re-pick a smaller photo that will be
484
- * dropped in exactly the same way.
485
- *
486
- * IT REPORTS ZERO WHEN THE TRAY IS EMPTY, so the notice mounts unconditionally and renders nothing on the
487
- * common path, which is the property the consumer component was built around (MediaDropNotice.tsx:19-20).
488
- */
489
- declare function mediaShortfallFromUnsentPicks(pickCount: number): TelevetMediaShortfall;
490
- /**
491
- * Add a refusal the ATTACHMENT ROW itself made, so a silently discarded pick is stated.
492
- *
493
- * THE ROW ALREADY DISCARDS PICKS AND SAID NOTHING. `IntakeMedia` drops a pick whose uri is already attached
494
- * and then `.slice(0, MEDIA_REFS_MAX)` cuts whatever is past the cap. Both are correct behaviours and both
495
- * were silent, so an owner who selected eight photos into a tray with three slots left saw five of them
496
- * vanish with no explanation. The consumer mobile app's cap refusal is `size`; this one is neither a size
497
- * nor a type nor an unreadable file, so it is reported as `failed` for the same reason the unsent picks are:
498
- * it is the only one of the four sentences that is TRUE, and a true vague sentence beats a false precise one.
499
- *
500
- * Returns a new object; the input is never mutated (house rule, and these are frozen anyway).
501
- */
502
- declare function withUnsentPicks(shortfall: TelevetMediaShortfall, pickCount: number): TelevetMediaShortfall;
503
-
504
358
  type TelevetBookingStep = 'pet' | 'where' | 'issues' | 'reason' | 'emergency' | 'clinician' | 'time' | 'review' | 'booked';
505
359
  /**
506
360
  * Ordered for the progress rail. `booked` is terminal and counts toward nothing: the flow is over, and
@@ -669,6 +523,152 @@ type TelevetBookingFailure = 'taken' | 'expired' | 'failed' | 'not_entitled'
669
523
  /** The partner booking surface is dark here. No retry can fix it, so the flow says so and offers its exit. */
670
524
  | 'unavailable' | null;
671
525
 
526
+ /** Why the roster is empty. Closed, because each value picks a different true sentence. */
527
+ type TelevetEmptyRosterCause =
528
+ /** A real, state-scoped read answered a literal empty list. A licensure gap. */
529
+ 'roster'
530
+ /** The route is dark for this tenant, so no read happened. Not a licensure fact. */
531
+ | 'dark';
532
+ /** What the empty-roster screen renders. Derived, never chosen at a call site. */
533
+ interface TelevetEmptyRosterView {
534
+ readonly title: string;
535
+ readonly message: string;
536
+ /**
537
+ * The retry label, or null when a retry cannot help.
538
+ *
539
+ * NULL IS LOAD BEARING and is not a styling preference. `TelevetStateCard` renders its action only when a
540
+ * label AND a handler are both present, so a null label removes the control rather than disabling it. A
541
+ * `Check again` on a licensure gap is a button whose every press repeats the same answer.
542
+ */
543
+ readonly retryLabel: string | null;
544
+ /**
545
+ * Which demand bucket a state-interest write would carry from this screen, or null when interest cannot be
546
+ * offered here.
547
+ *
548
+ * `no_licensed_vet`, NOT `no_prescribing`, and only on the licensure cause. The server treats the two as
549
+ * distinct fixes; this one is closed by licensing a clinician in the state, which is exactly what an empty
550
+ * state-scoped roster reports. Offering interest on the DARK cause would record a demand signal for a
551
+ * state nobody established anything about.
552
+ */
553
+ readonly interestReason: 'no_licensed_vet' | null;
554
+ }
555
+ /**
556
+ * The view for an empty roster, from the cause.
557
+ *
558
+ * A PURE FUNCTION over the copy deck, so both platform ports read the same three fields and neither can pick
559
+ * its own sentence. It takes the CAUSE rather than a boolean, because a boolean at a call site is how the
560
+ * dark tenant and the licensure gap got the same words in the first place.
561
+ */
562
+ declare function televetEmptyRosterView(cause: TelevetEmptyRosterCause): TelevetEmptyRosterView;
563
+ /**
564
+ * The cause, from what the flow knows.
565
+ *
566
+ * `surfaceServed` IS THE CALLER'S ONE FACT: has anything on this booking surface answered a real response?
567
+ * The container derives it from the reads it has already made, and it is deliberately NOT re-derived here
568
+ * from a 404, because `clinicians` has already swallowed that into `ok([])` by the time a screen sees it.
569
+ * That swallow is the right call for rendering and the wrong one for this decision, which is exactly why
570
+ * the fact has to be carried alongside the empty list rather than recovered from it.
571
+ */
572
+ declare function televetEmptyRosterCause(surfaceServed: boolean): TelevetEmptyRosterCause;
573
+
574
+ /**
575
+ * Why a pick was refused before it was ever sent.
576
+ *
577
+ * THE CONSUMER'S OWN THREE BUCKETS, not a set invented here: mobile's `ConsultAttachmentOutcome.refused` and
578
+ * the web app's `ConsultAttachmentRefusal` both carry exactly `size`, `type` and `unreadable`, and each has a
579
+ * ported sentence. A fourth cause with no consumer sentence would have nothing to say, so the type is closed.
580
+ */
581
+ type TelevetMediaRefusal = 'size' | 'type' | 'unreadable';
582
+ /** Counts of what did not reach the vet, by cause. The consumer web app's `ConsultAttachmentShortfall`. */
583
+ interface TelevetMediaShortfall {
584
+ /** Passed the rules, then the send did not carry it. On this surface that is every pick; see the header. */
585
+ readonly failed: number;
586
+ readonly refused: Readonly<Record<TelevetMediaRefusal, number>>;
587
+ }
588
+ /** Nothing to say. Frozen and shared so a caller cannot mutate the empty case into a false report. */
589
+ declare const NO_MEDIA_SHORTFALL: TelevetMediaShortfall;
590
+ /** True when there is literally nothing to tell the owner. */
591
+ declare function isMediaShortfallEmpty(shortfall: TelevetMediaShortfall): boolean;
592
+ /**
593
+ * One sentence per cause, in the consumer's order, or an empty list when there is nothing to say.
594
+ *
595
+ * THE ORDER IS THE CONSUMER'S AND IS NOT ALPHABETICAL: dropped, then size, then type, then unreadable. Both
596
+ * consumer apps list them that way (MediaDropNotice.tsx:31-36 and consultAttachmentUpload.ts:385-403), which
597
+ * puts the thing that got furthest through the flow first.
598
+ *
599
+ * A NEGATIVE OR NON-FINITE COUNT IS TREATED AS ZERO rather than trusted. These numbers can arrive from a
600
+ * host's own upload seam, and `{n}` is interpolated straight into a sentence an owner reads: "-1 attachment
601
+ * did not upload." is a defect wearing a report. It is floored rather than thrown on, because failing a
602
+ * booking confirmation over a bad count would cost the owner the one screen that tells them anything.
603
+ */
604
+ declare function televetMediaShortfallLines(shortfall: TelevetMediaShortfall): readonly string[];
605
+ /**
606
+ * The shortfall THIS SURFACE actually has: every pick the owner made, reported as not sent.
607
+ *
608
+ * WHY THIS FUNCTION EXISTS AT ALL. The consumer apps derive their shortfall from an upload RESULT, and so
609
+ * does the SDK when the televet presign is served. When it answers its dark 404 (or a host's controller has no
610
+ * presign), `media_refs` leaves as `[]` whatever the owner picked, so the honest count is knowable without an
611
+ * upload: it is the length of the tray.
612
+ *
613
+ * `failed`, NOT A REFUSAL BUCKET. The picks passed every local rule - the row accepted them, capped them at
614
+ * `MEDIA_REFS_MAX` and showed them as thumbnails. Nothing about their size, type or readability is why they
615
+ * did not arrive. "{n} attachments did not upload." is the true sentence; "too large to send" would be a
616
+ * false explanation, and a false explanation invites the owner to re-pick a smaller photo that will be
617
+ * dropped in exactly the same way.
618
+ *
619
+ * IT REPORTS ZERO WHEN THE TRAY IS EMPTY, so the notice mounts unconditionally and renders nothing on the
620
+ * common path, which is the property the consumer component was built around (MediaDropNotice.tsx:19-20).
621
+ */
622
+ declare function mediaShortfallFromUnsentPicks(pickCount: number): TelevetMediaShortfall;
623
+ /**
624
+ * Add a refusal the ATTACHMENT ROW itself made, so a silently discarded pick is stated.
625
+ *
626
+ * THE ROW ALREADY DISCARDS PICKS AND SAID NOTHING. `IntakeMedia` drops a pick whose uri is already attached
627
+ * and then `.slice(0, MEDIA_REFS_MAX)` cuts whatever is past the cap. Both are correct behaviours and both
628
+ * were silent, so an owner who selected eight photos into a tray with three slots left saw five of them
629
+ * vanish with no explanation. The consumer mobile app's cap refusal is `size`; this one is neither a size
630
+ * nor a type nor an unreadable file, so it is reported as `failed` for the same reason the unsent picks are:
631
+ * it is the only one of the four sentences that is TRUE, and a true vague sentence beats a false precise one.
632
+ *
633
+ * Returns a new object; the input is never mutated (house rule, and these are frozen anyway).
634
+ */
635
+ declare function withUnsentPicks(shortfall: TelevetMediaShortfall, pickCount: number): TelevetMediaShortfall;
636
+
637
+ /**
638
+ * The server's own demand bucket. A CLOSED SET, and callers may not substitute free text.
639
+ *
640
+ * THE TWO ARE CLOSED BY DIFFERENT FIXES, which is why the server distinguishes them and why a call site that
641
+ * guesses is wrong in a way nobody can see: `no_licensed_vet` is closed by licensing a clinician in that
642
+ * state, `no_prescribing` by a change in what that state permits remotely. The consumer container is explicit
643
+ * about picking the first for an empty roster and for a blocked state
644
+ * (TelevetBookingContainer.tsx, the `no_licensed_vet, not no_prescribing` comment).
645
+ */
646
+ type TelevetStateInterestReason = 'no_licensed_vet' | 'no_prescribing';
647
+ /** What the control needs to render its lifecycle. Null means there is nothing to render; see the header. */
648
+ interface TelevetStateInterestAction {
649
+ /** The write SUCCEEDED in this session. Never inferred, never optimistic. */
650
+ readonly joined: boolean;
651
+ readonly pending: boolean;
652
+ readonly failed: boolean;
653
+ onPress(): void;
654
+ }
655
+ /**
656
+ * The seam the write goes through. Resolves true on a recorded interest and false otherwise; a rejection is
657
+ * caught here and read as false, so a host cannot turn a throw into a silent success.
658
+ */
659
+ type TelevetStateInterestWrite = (state: string, reason: TelevetStateInterestReason) => Promise<boolean>;
660
+ /**
661
+ * Local, per-mounted-booking feedback for the owner-initiated state-interest write.
662
+ *
663
+ * LOCAL SUCCESS IS DELIBERATELY EPHEMERAL, verbatim from the consumer's reasoning: the server is idempotent,
664
+ * so this only prevents repeat taps in this session and "does not pretend we know the owner's durable
665
+ * subscription state" (useBookingStateInterest.ts:20-25). Nothing here is persisted, because a remembered
666
+ * "you are on the list" that outlived a state change would be a claim this client cannot stand behind.
667
+ */
668
+ declare function useStateInterest(state: string | null | undefined, write: TelevetStateInterestWrite | null | undefined): {
669
+ actionFor(reason: TelevetStateInterestReason): TelevetStateInterestAction | null;
670
+ };
671
+
672
672
  declare const VET_MESSAGES_COPY: Readonly<{
673
673
  /** ARTIFACT (MOBILE `vet`, `vet-upcoming`; WEB `video`): the card's title. */
674
674
  messagesTitle: "Messages";