@everfur/sdk 1.1.0 → 1.2.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 (208) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/dist/{Chat.d-CTVJ_qWQ.d.cts → Chat.d-C76mPD5M.d.cts} +1 -1
  3. package/dist/{Chat.d-Bt0fKiOQ.d.ts → Chat.d-Dn_DEpGG.d.ts} +1 -1
  4. package/dist/{DepthViews.d-Dq8eWBvw.d.cts → DepthViews.d-4teBIBu-.d.cts} +1 -1
  5. package/dist/{DepthViews.d-BIfqdrvX.d.ts → DepthViews.d-B5RHCzGS.d.ts} +1 -1
  6. package/dist/{DepthViews.d-BW3HrhnC.d.ts → DepthViews.d-DXGAGojW.d.ts} +1 -1
  7. package/dist/{DepthViews.d-BHb0Xb-C.d.cts → DepthViews.d-v6sBxjrf.d.cts} +1 -1
  8. package/dist/{LifecyclePort.d-Cr1p33a7.d.cts → LifecyclePort.d-Cb9NtmP-.d.cts} +5 -0
  9. package/dist/{LifecyclePort.d-Cr1p33a7.d.ts → LifecyclePort.d-Cb9NtmP-.d.ts} +5 -0
  10. package/dist/{RecordsPage.d-CLrw-AvZ.d.cts → RecordsPage.d-BF4EIVKg.d.cts} +1 -1
  11. package/dist/{RecordsPage.d-Bs-dghTH.d.ts → RecordsPage.d-D2J5rMWk.d.ts} +1 -1
  12. package/dist/animations/index.d.cts +3 -3
  13. package/dist/animations/index.d.ts +3 -3
  14. package/dist/{attachments.d-DjxmIsNp.d.ts → attachments.d-CedhQFlI.d.ts} +1 -1
  15. package/dist/{attachments.d-DTGYmW8Y.d.cts → attachments.d-DMZ8xCT9.d.cts} +1 -1
  16. package/dist/{bookingCopy.d-CX-DMiwi.d.ts → bookingCopy.d-CnKq4gvc.d.ts} +2 -2
  17. package/dist/{bookingCopy.d-D952V8Tq.d.cts → bookingCopy.d-DJmo8fzQ.d.cts} +2 -2
  18. package/dist/{branding.d-SCzhpyTt.d.ts → branding.d-CNeG_CY3.d.ts} +7 -2
  19. package/dist/{branding.d-eGlNC86j.d.cts → branding.d-KOXyiUqX.d.cts} +7 -2
  20. package/dist/{casesRepository.d-bWJHZD-_.d.cts → casesRepository.d-BcmH2Du1.d.cts} +1 -1
  21. package/dist/{casesRepository.d-CnJZlUZ4.d.ts → casesRepository.d-CG3psWUQ.d.ts} +1 -1
  22. package/dist/chat/index.cjs +19 -20
  23. package/dist/chat/index.d.cts +11 -11
  24. package/dist/chat/index.d.ts +11 -11
  25. package/dist/chat/index.js +20 -21
  26. package/dist/chat/lite/index.cjs +19 -20
  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 +20 -21
  30. package/dist/{chatHandoffToken.d-uKnSnIzN.d.cts → chatHandoffToken.d-BRODOPfQ.d.cts} +11 -6
  31. package/dist/{chatHandoffToken.d-BCEdhZpd.d.ts → chatHandoffToken.d-DETK_czu.d.ts} +11 -6
  32. package/dist/{chatTypes.d-DbdF3ij5.d.ts → checkin.d-CJoVeku7.d.ts} +69 -37
  33. package/dist/{chatTypes.d-CFyYBzps.d.cts → checkin.d-CQaV4WL2.d.cts} +69 -37
  34. package/dist/{chunk-5TWMQIT4.js → chunk-HGQOS366.js} +1 -1
  35. package/dist/{chunk-ZZTNGAS7.js → chunk-PSBCFPJG.js} +1 -1
  36. package/dist/{chunk-LWPM4GD3.js → chunk-PTO64HJN.js} +1 -1
  37. package/dist/{chunk-PDZTFXOO.js → chunk-QMYYV67E.js} +1 -1
  38. package/dist/client/index.cjs +15 -3
  39. package/dist/client/index.d.cts +82 -14
  40. package/dist/client/index.d.ts +82 -14
  41. package/dist/client/index.js +15 -3
  42. package/dist/{clinicBatch.d-C_kZtYt-.d.ts → clinicBatch.d-CSr_YFGU.d.ts} +2 -2
  43. package/dist/{clinicBatch.d-e3Cn5HhA.d.cts → clinicBatch.d-CyXyJab_.d.cts} +2 -2
  44. package/dist/{config.d--6siaeNg.d.ts → config.d-Bf15Q27G.d.ts} +1 -1
  45. package/dist/{config.d-Ba21AaZg.d.cts → config.d-D-7_tLb8.d.cts} +1 -1
  46. package/dist/consent/index.d.cts +5 -5
  47. package/dist/consent/index.d.ts +5 -5
  48. package/dist/{context.d-CzMV_7jD.d.cts → context.d-CCsGIBuw.d.cts} +6 -6
  49. package/dist/{context.d-Bl07_JGt.d.ts → context.d-CFFj57ZA.d.ts} +6 -6
  50. package/dist/{copy.d-GokMma80.d.ts → copy.d-Dan0WfJS.d.ts} +2 -2
  51. package/dist/{copy.d-zWWCn3wB.d.cts → copy.d-uQ8jl0d3.d.cts} +2 -2
  52. package/dist/core/index.cjs +7 -6
  53. package/dist/core/index.d.cts +18 -16
  54. package/dist/core/index.d.ts +18 -16
  55. package/dist/core/index.js +7 -6
  56. package/dist/{depth.d-De5pT7vA.d.cts → depth.d-DFPfFTPF.d.cts} +2 -2
  57. package/dist/{depth.d-C_HL8yAz.d.ts → depth.d-DFsi6qtf.d.ts} +2 -2
  58. package/dist/{entitlementRepository.d-DLMRDNUe.d.ts → entitlementRepository.d-BnvMk7Tc.d.ts} +4 -4
  59. package/dist/{entitlementRepository.d-B4ffomns.d.cts → entitlementRepository.d-t6g97KZm.d.cts} +4 -4
  60. package/dist/{focus.d-B0qweva0.d.cts → focus.d-BkPLN-2r.d.cts} +1 -1
  61. package/dist/{focus.d-7G0BBmA9.d.ts → focus.d-_6rD03Ap.d.ts} +1 -1
  62. package/dist/health-plan/index.cjs +3 -3
  63. package/dist/health-plan/index.d.cts +14 -14
  64. package/dist/health-plan/index.d.ts +14 -14
  65. package/dist/health-plan/index.js +3 -3
  66. package/dist/{healthPlanRepository.d-CdCyUWph.d.ts → healthPlanRepository.d-CuumbPDh.d.ts} +2 -2
  67. package/dist/{healthPlanRepository.d-fPbLceBr.d.cts → healthPlanRepository.d-D6qYjNMQ.d.cts} +2 -2
  68. package/dist/{idempotency.d-IDta7Jjj.d.cts → idempotency.d-BGhv20mx.d.cts} +1 -1
  69. package/dist/{idempotency.d-CoUlC-Yd.d.ts → idempotency.d-RxPkjLqJ.d.ts} +1 -1
  70. package/dist/{identity.d-B7dPRGqm.d.ts → identity.d--2ec4agf.d.ts} +1 -1
  71. package/dist/{identity.d-_MK9Y7a4.d.cts → identity.d-CFc4KrK0.d.cts} +1 -1
  72. package/dist/{inbox.d-CuuPTWyW.d.ts → inbox.d-B6kD0a9r.d.ts} +1 -1
  73. package/dist/{inbox.d-ChNXTovj.d.cts → inbox.d-CzIVX_ji.d.cts} +1 -1
  74. package/dist/index.cjs +28 -28
  75. package/dist/index.d.cts +20 -18
  76. package/dist/index.d.ts +20 -18
  77. package/dist/index.js +29 -29
  78. package/dist/{introEvents.d-JvAWRKYu.d.cts → introEvents.d-BUCbS8oX.d.cts} +1 -1
  79. package/dist/{introEvents.d-D6Ay0ORN.d.ts → introEvents.d-wshlRCrU.d.ts} +1 -1
  80. package/dist/{layout.d-D3d4QMeO.d.ts → layout.d-C8UKQW3I.d.ts} +2 -2
  81. package/dist/{layout.d-ByfOEhpG.d.cts → layout.d-ChcRUbC4.d.cts} +2 -2
  82. package/dist/models.d-DHAQqrQr.d.ts +182 -0
  83. package/dist/models.d-Dml2f9-U.d.cts +182 -0
  84. package/dist/notifications/inbox/index.cjs +1 -1
  85. package/dist/notifications/inbox/index.d.cts +7 -7
  86. package/dist/notifications/inbox/index.d.ts +7 -7
  87. package/dist/notifications/inbox/index.js +1 -1
  88. package/dist/notifications/index.d.cts +7 -7
  89. package/dist/notifications/index.d.ts +7 -7
  90. package/dist/{optInView.d-Bxvg0WLJ.d.cts → optInView.d-Cu3J440l.d.cts} +2 -2
  91. package/dist/{optInView.d-BpFTJaaX.d.ts → optInView.d-DbSRM8qR.d.ts} +2 -2
  92. package/dist/parse.d-DtHmpAMT.d.cts +282 -0
  93. package/dist/parse.d-DtHmpAMT.d.ts +282 -0
  94. package/dist/{pets.d-BtbJcf8T.d.cts → pets.d-BRNg79qq.d.cts} +1 -1
  95. package/dist/{pets.d-Br960ekh.d.ts → pets.d-CS21gvuN.d.ts} +1 -1
  96. package/dist/{petsRepository.d-CSOth5XE.d.ts → petsRepository.d-BRL_wPcE.d.ts} +1 -1
  97. package/dist/{petsRepository.d-Bj9rPnCr.d.cts → petsRepository.d-uMbhgEsh.d.cts} +1 -1
  98. package/dist/records/depth/index.d.cts +9 -9
  99. package/dist/records/depth/index.d.ts +9 -9
  100. package/dist/records/index.cjs +3 -3
  101. package/dist/records/index.d.cts +11 -11
  102. package/dist/records/index.d.ts +11 -11
  103. package/dist/records/index.js +3 -3
  104. package/dist/{requestFunnel.d-LSnmCusf.d.ts → requestFunnel.d-BDuYHZMa.d.ts} +2 -2
  105. package/dist/{requestFunnel.d-BwO-jFLX.d.cts → requestFunnel.d-BdTkSu0W.d.cts} +2 -2
  106. package/dist/{route.d-D70-OHBc.d.cts → route.d-BhfmB7Pl.d.cts} +2 -2
  107. package/dist/{route.d-Bzyamuxa.d.ts → route.d-HALH1t37.d.ts} +2 -2
  108. package/dist/{runtimeTypes.d-6nkdToBS.d.cts → runtimeTypes.d-BrEWaDPX.d.cts} +34 -6
  109. package/dist/{runtimeTypes.d-Byb55WsJ.d.ts → runtimeTypes.d-C7HFG1ev.d.ts} +34 -6
  110. package/dist/{screenProps.d-DB5IMaGZ.d.cts → screenProps.d-BjIsq_NY.d.cts} +1 -1
  111. package/dist/{screenProps.d-HGSPNGHt.d.ts → screenProps.d-C_q_3Lj7.d.ts} +1 -1
  112. package/dist/sdkConfigStore.d-BKqjpahR.d.ts +40 -0
  113. package/dist/sdkConfigStore.d-Cxj2n79d.d.cts +40 -0
  114. package/dist/server/events/index.cjs +1 -1
  115. package/dist/server/events/index.d.cts +2 -2
  116. package/dist/server/events/index.d.ts +2 -2
  117. package/dist/server/events/index.js +1 -1
  118. package/dist/server/index.cjs +1 -1
  119. package/dist/server/index.d.cts +3 -3
  120. package/dist/server/index.d.ts +3 -3
  121. package/dist/server/index.js +1 -1
  122. package/dist/shop/index.d.cts +3 -3
  123. package/dist/shop/index.d.ts +3 -3
  124. package/dist/slots/index.cjs +2 -2
  125. package/dist/slots/index.d.cts +6 -6
  126. package/dist/slots/index.d.ts +6 -6
  127. package/dist/slots/index.js +2 -2
  128. package/dist/tabs/index.cjs +78 -12
  129. package/dist/tabs/index.d.cts +129 -10
  130. package/dist/tabs/index.d.ts +129 -10
  131. package/dist/tabs/index.js +78 -12
  132. package/dist/televet/booking/index.d.cts +6 -6
  133. package/dist/televet/booking/index.d.ts +6 -6
  134. package/dist/testing/index.cjs +1 -1
  135. package/dist/testing/index.d.cts +1 -1
  136. package/dist/testing/index.d.ts +1 -1
  137. package/dist/testing/index.js +1 -1
  138. package/dist/testing/rn/index.d.cts +11 -9
  139. package/dist/testing/rn/index.d.ts +11 -9
  140. package/dist/testing/web/index.d.cts +11 -9
  141. package/dist/testing/web/index.d.ts +11 -9
  142. package/dist/texting/index.cjs +2 -2
  143. package/dist/texting/index.d.cts +22 -8
  144. package/dist/texting/index.d.ts +22 -8
  145. package/dist/texting/index.js +2 -2
  146. package/dist/{threadOptions.d-E-ZxhUSg.d.cts → threadOptions.d-RBSqklk5.d.cts} +5 -5
  147. package/dist/{threadOptions.d-Cjps2yaN.d.ts → threadOptions.d-Suof8GCE.d.ts} +5 -5
  148. package/dist/{timelineRows.d-CPS4admm.d.ts → timelineRows.d-CDA00bav.d.ts} +1 -1
  149. package/dist/{timelineRows.d-BJRCgmdv.d.cts → timelineRows.d-CXIvLZW0.d.cts} +1 -1
  150. package/dist/{tokens.d-DH1mYjZl.d.cts → tokens.d-DxM-tKjz.d.cts} +2 -0
  151. package/dist/{tokens.d-DH1mYjZl.d.ts → tokens.d-DxM-tKjz.d.ts} +2 -0
  152. package/dist/{typeStyle.d-CuKAr0Ly.d.cts → typeStyle.d-DmdB2TfH.d.cts} +2 -2
  153. package/dist/{typeStyle.d-ZszGrWPf.d.ts → typeStyle.d-Ma1uBgn-.d.ts} +2 -2
  154. package/dist/{useHealthPlanSubscription.d-zjsvvlhz.d.cts → useHealthPlanSubscription.d-BJyHm00W.d.cts} +4 -4
  155. package/dist/{useHealthPlanSubscription.d-SQfx-45x.d.ts → useHealthPlanSubscription.d-mOHP3D8V.d.ts} +4 -4
  156. package/dist/{useInboxUnread.d-BxFKFU4o.d.ts → useInboxUnread.d-B6WPb-Qs.d.ts} +2 -2
  157. package/dist/{useInboxUnread.d-7p3IWs_A.d.cts → useInboxUnread.d-BZC4Td0f.d.cts} +2 -2
  158. package/dist/{usePresentation.d-DUHlQyV5.d.cts → usePresentation.d-BP8u0FS2.d.cts} +2 -2
  159. package/dist/{usePresentation.d-CoyGEJOl.d.ts → usePresentation.d-j0xDpOoe.d.ts} +2 -2
  160. package/dist/{useRecordsDepth.d-BinUa8W9.d.ts → useRecordsDepth.d-Cu7-cKAn.d.ts} +1 -1
  161. package/dist/{useRecordsDepth.d-Bk8BSerZ.d.cts → useRecordsDepth.d-CvxrlzGi.d.cts} +1 -1
  162. package/dist/{useUnread.d-D-p7oEW_.d.cts → useUnread.d-C4wKv3th.d.cts} +31 -17
  163. package/dist/{useUnread.d-CFzIPmZt.d.ts → useUnread.d-DMicYM85.d.ts} +31 -17
  164. package/dist/{view.d-CaH6dZPJ.d.ts → view.d-Bq7d05Pv.d.ts} +3 -3
  165. package/dist/{view.d-DV4b1cov.d.cts → view.d-odmWgaGw.d.cts} +3 -3
  166. package/dist/web/consent/index.d.cts +5 -5
  167. package/dist/web/consent/index.d.ts +5 -5
  168. package/dist/web/health-plan/index.cjs +5 -5
  169. package/dist/web/health-plan/index.d.cts +16 -16
  170. package/dist/web/health-plan/index.d.ts +16 -16
  171. package/dist/web/health-plan/index.js +5 -5
  172. package/dist/web/inbox/index.cjs +1 -1
  173. package/dist/web/inbox/index.d.cts +8 -8
  174. package/dist/web/inbox/index.d.ts +8 -8
  175. package/dist/web/inbox/index.js +1 -1
  176. package/dist/web/index.cjs +40 -40
  177. package/dist/web/index.d.cts +59 -44
  178. package/dist/web/index.d.ts +59 -44
  179. package/dist/web/index.js +40 -40
  180. package/dist/web/intro/index.d.cts +7 -7
  181. package/dist/web/intro/index.d.ts +7 -7
  182. package/dist/web/notifications/index.d.cts +6 -6
  183. package/dist/web/notifications/index.d.ts +6 -6
  184. package/dist/web/records/depth/index.d.cts +9 -9
  185. package/dist/web/records/depth/index.d.ts +9 -9
  186. package/dist/web/records/index.cjs +2 -2
  187. package/dist/web/records/index.d.cts +11 -11
  188. package/dist/web/records/index.d.ts +11 -11
  189. package/dist/web/records/index.js +2 -2
  190. package/dist/web/records-sheet/index.cjs +3 -3
  191. package/dist/web/records-sheet/index.js +3 -3
  192. package/dist/web/shop/index.cjs +1 -1
  193. package/dist/web/shop/index.d.cts +3 -3
  194. package/dist/web/shop/index.d.ts +3 -3
  195. package/dist/web/shop/index.js +1 -1
  196. package/dist/web/televet/booking/index.cjs +1 -1
  197. package/dist/web/televet/booking/index.d.cts +7 -7
  198. package/dist/web/televet/booking/index.d.ts +7 -7
  199. package/dist/web/televet/booking/index.js +1 -1
  200. package/dist/web/televet/call/index.cjs +1 -1
  201. package/dist/web/televet/call/index.js +1 -1
  202. package/dist/web/texting/index.cjs +2 -2
  203. package/dist/web/texting/index.d.cts +22 -8
  204. package/dist/web/texting/index.d.ts +22 -8
  205. package/dist/web/texting/index.js +2 -2
  206. package/dist/web/ui/index.cjs +1 -1
  207. package/dist/web/ui/index.js +1 -1
  208. package/package.json +6 -2
@@ -65,7 +65,7 @@ return jsxRuntime.jsxs(reactNative.View,{style:styles.petRow,children:[
65
65
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles.chips,accessibilityRole:"radiogroup",accessibilityLabel:copy.defaultPetLabel,children:pets.map(pet=>{let picked=pet.petRef===value;/* @__PURE__ */
66
66
  return jsxRuntime.jsx(reactNative.Pressable,{onPress:()=>onChoose(pet.petRef),disabled:saving,accessibilityRole:"radio",accessibilityState:{checked:picked,disabled:saving},accessibilityLabel:pet.name??pet.petRef,style:[styles.chip,picked?styles.chipPicked:null],children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"compact",style:[styles.chipLabel,picked?styles.chipLabelPicked:null],children:pet.name??pet.petRef})},pet.petRef)})}),
67
67
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles.links,children:[
68
- /* @__PURE__ */jsxRuntime.jsx(Button,{label:saving?copy.savingPet:copy.savePet,kind:"secondary",busy:saving,disabled:!changed,styles:styles,onPress:()=>{value!==null&&onSave(value)},testID:"texting-pet-save"}),saved&&!changed?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles.footnote,children:copy.petSaved}):null]})]})}function makeStyles2(theme){let{color:color,radius:radius,space:space,type:type,slots:slots}=theme,text3=(size,ink,weight)=>({...face(theme,weight),fontSize:size,lineHeight:Math.round(size*type.lineHeight.snug),color:ink}),cardInk=slots.card?.textColor;return reactNative.StyleSheet.create({card:{gap:space.md,padding:space.lg,borderRadius:radius.lg,borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,...slotBox(slots.card,1)},title:text3(type.size.subtitle,cardInk??color.text.primary,"bold"),subtitle:text3(type.size.body,cardInk??color.text.primary,"bold"),body:text3(type.size.body,cardInk??color.text.secondary,"regular"),footnote:text3(type.size.caption,color.text.muted,"regular"),phone:text3(type.size.body,cardInk??color.text.primary,"bold"),label:text3(type.size.caption,cardInk??color.text.primary,"bold"),input:{minHeight:44,paddingHorizontal:space.md,borderRadius:radius.md,borderWidth:1,borderColor:color.controlEdge,backgroundColor:color.surface,...text3(type.size.body,color.text.primary,"regular"),...slotBox(slots.input,1),...slotText(slots.input)},consentRow:{flexDirection:"row",alignItems:"flex-start",gap:space.sm,minHeight:44},box:{width:24,height:24,borderRadius:radius.xs,borderWidth:2,borderColor:color.controlEdge,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},boxChecked:{backgroundColor:color.brand,borderColor:color.brandInk},tick:{...text3(type.size.caption,color.text.onBrand,"bold")},consentText:{flex:1,...text3(type.size.caption,cardInk??color.text.secondary,"regular")},primary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,alignItems:"center",justifyContent:"center",backgroundColor:color.brand,...slotBox(slots.primaryButton)},primaryLabel:{...text3(type.size.body,color.text.onBrand,"bold"),...slotText(slots.primaryButton)},secondary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,borderWidth:1,borderColor:color.brandBorder,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},secondaryLabel:text3(type.size.caption,color.brandInk,"bold"),link:{minHeight:44,justifyContent:"center",alignSelf:"flex-start"},linkLabel:{...text3(type.size.caption,color.linkInk,"bold"),...slotText(slots.link)},dimmed:{opacity:.5},links:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:space.md},notice:{gap:space.xs},noticeText:text3(type.size.caption,color.errorRed,"regular"),confirm:{gap:space.sm,padding:space.md,borderRadius:radius.md,backgroundColor:color.surfaceSubtle},petRow:{gap:space.xs},chips:{flexDirection:"row",flexWrap:"wrap",gap:space.sm},chip:{minHeight:44,paddingHorizontal:space.md,borderRadius:radius.pill,borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,justifyContent:"center",...slotBox(slots.chip,1)},chipPicked:{backgroundColor:color.brandSoft,borderColor:color.brandInk},chipLabel:{...text3(type.size.caption,color.text.primary,"regular"),...slotText(slots.chip)},chipLabelPicked:{...face(theme,"bold"),color:color.brandInk}})}var INTRO_OPEN_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),host=globalThis;function isIntroOpenState(value){if(typeof value!="object"||value===null)return false;let v=value;return v.holds instanceof Set&&v.listeners instanceof Set}var stored=host[INTRO_OPEN_SYMBOL],fresh=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),state=isIntroOpenState(stored)?stored:host[INTRO_OPEN_SYMBOL]=fresh();function isIntroOpen(){return state.holds.size>0}function subscribe(listener){return state.listeners.add(listener),()=>{state.listeners.delete(listener)}}function useIntroOpen(){return react.useSyncExternalStore(subscribe,isIntroOpen,isIntroOpen)}function resolveTextingAskDue(input){let readEnabled=input.enabled&&input.capabilityGranted&&input.hasProfile&&input.signedIn&&input.scheduleEligible&&!input.offeredThisSession,due=readEnabled&&input.identity==="none"&&input.surfaceReady;return{readEnabled:readEnabled,due:due}}var URGENT_LEVELS=/* @__PURE__ */new Set(["emergency","schedule_soon"]);function textingAskThreadReady(chat){if(chat.isBootstrapping===true||chat.isLoadingHistory===true||chat.isStreaming===true||chat.status==="error"||chat.stopped===true)return false;let last=chat.messages[chat.messages.length-1];return last===void 0||last.role!=="assistant"||last.pending===true||last.checkin!==void 0||last.text.trim().length===0?false:!(typeof last.urgencyLevel=="string"&&URGENT_LEVELS.has(last.urgencyLevel))}var IN_MEMORY_KVS=/* @__PURE__ */new WeakSet;function isInMemoryKv(kv){return IN_MEMORY_KVS.has(kv)}var TEXTING_ASK_SCHEDULE_KEY="everfur.texting.askSchedule.v1",TEXTING_ASK_SNOOZE_MS=2880*60*1e3,TEXTING_ASK_MAX_ASKS=3,EMPTY_TEXTING_ASK_ENTRY=/* @__PURE__ */Object.freeze({askCount:0,nextAskAt:null,completed:false});function isTextingAskEligible(read,now){if(read.status!=="ok")return false;let{entry:entry}=read;return entry.completed||entry.askCount>=TEXTING_ASK_MAX_ASKS?false:entry.nextAskAt===null||now>=entry.nextAskAt}function applyTextingAsk(entry,now){return{askCount:Math.min(entry.askCount+1,TEXTING_ASK_MAX_ASKS),nextAskAt:now+TEXTING_ASK_SNOOZE_MS,completed:entry.completed}}function applyTextingAskSnooze(entry,now){return{...entry,nextAskAt:now+TEXTING_ASK_SNOOZE_MS}}function applyTextingAskCompleted(entry){return{...entry,completed:true}}function nextTextingAskNumber(entry){return entry.askCount<=0?1:entry.askCount===1?2:3}function entryOf(raw){if(raw===null||typeof raw!="object"||Array.isArray(raw))return null;let o=raw,{askCount:askCount,nextAskAt:nextAskAt,completed:completed}=o;return typeof askCount!="number"||!Number.isInteger(askCount)||askCount<0||nextAskAt!==null&&(typeof nextAskAt!="number"||!Number.isFinite(nextAskAt))||typeof completed!="boolean"?null:{askCount:Math.min(askCount,TEXTING_ASK_MAX_ASKS),nextAskAt:nextAskAt,completed:completed}}function parseTextingAskMap(raw){let value;try{value=JSON.parse(raw)}catch{return null}if(value===null||typeof value!="object"||Array.isArray(value))return null;let out={};for(let[key,item]of Object.entries(value)){let entry=entryOf(item);if(entry===null)return null;out[key]=entry}return out}var SLOT=/* @__PURE__ */Symbol.for("@everfur/sdk/texting/ask-schedule@v1");function shared(){let host2=globalThis,state2=host2[SLOT];return state2===void 0&&(state2={sessions:/* @__PURE__ */new Map,sessionListeners:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set,writeChain:Promise.resolve()},host2[SLOT]=state2),state2.sessionListeners===void 0&&(state2.sessionListeners=/* @__PURE__ */new Set),state2}async function load(kv){if(isInMemoryKv(kv))return{status:"unreadable"};let raw;try{raw=await kv.getItem(TEXTING_ASK_SCHEDULE_KEY)}catch{return{status:"unreadable"}}if(raw===null)try{return await kv.setItem(TEXTING_ASK_SCHEDULE_KEY,"{}"),await kv.getItem(TEXTING_ASK_SCHEDULE_KEY)===null?{status:"unreadable"}:{status:"ok",map:{}}}catch{return{status:"unreadable"}}let map=parseTextingAskMap(raw);if(map!==null)return{status:"ok",map:map};try{await kv.removeItem(TEXTING_ASK_SCHEDULE_KEY)}catch{}return{status:"unreadable"}}function subscribeTextingAskSchedule(listener){let{listeners:listeners2}=shared();return listeners2.add(listener),()=>{listeners2.delete(listener)}}function update(kv,userRef,change){let state2=shared(),run=async()=>{let loaded=await load(kv);if(loaded.status!=="ok")return;let current=loaded.map[userRef]??EMPTY_TEXTING_ASK_ENTRY;try{await kv.setItem(TEXTING_ASK_SCHEDULE_KEY,JSON.stringify({...loaded.map,[userRef]:change(current)}))}catch{return}for(let listener of[...state2.listeners])listener()},next=state2.writeChain.then(run,run);return state2.writeChain=next.catch(()=>{}),next}async function readTextingAskSchedule(kv,userRef){let loaded=await load(kv);return loaded.status!=="ok"?{status:"unreadable"}:{status:"ok",entry:loaded.map[userRef]??EMPTY_TEXTING_ASK_ENTRY}}function recordTextingAsk(kv,userRef,now=Date.now()){return update(kv,userRef,entry=>applyTextingAsk(entry,now))}function snoozeTextingAsk(kv,userRef,now=Date.now()){return update(kv,userRef,entry=>applyTextingAskSnooze(entry,now))}function markTextingAskCompleted(kv,userRef){return update(kv,userRef,applyTextingAskCompleted)}function textingAskSession(userRef){return shared().sessions.get(userRef)??null}function setTextingAskSession(userRef,entry){let state2=shared();state2.sessions.set(userRef,entry);for(let listener of[...state2.sessionListeners])listener()}function subscribeTextingAskSessions(listener){let{sessionListeners:sessionListeners}=shared();return sessionListeners.add(listener),()=>{sessionListeners.delete(listener)}}var NO_SNAPSHOT=()=>null;function useTextingGranted(){let{runtime:runtime}=useEverfurContext(),source=runtime.entitlements??null,subscribe2=react.useCallback(listener=>source===null?()=>{}:source.subscribe(listener),[source]),read=source===null?NO_SNAPSHOT:source.getSnapshot,snapshot=react.useSyncExternalStore(subscribe2,read,read);return react.useMemo(()=>snapshot!==null&&decideCapability("texting",snapshot.decisions,{isPending:snapshot.isPending}).enabled,[snapshot])}var IDLE=/* @__PURE__ */Object.freeze({status:"idle"});function useAskSchedule(userRef){let{runtime:runtime}=useEverfurContext(),kv=runtime.registry.services.kv,[state2,setState]=react.useState({user:null,value:IDLE});return react.useEffect(()=>{if(userRef===null)return;let live=true,read=()=>{readTextingAskSchedule(kv,userRef).then(value=>{live&&setState({user:userRef,value:{status:"ready",read:value}})})};read();let unsubscribe=subscribeTextingAskSchedule(read);return()=>{live=false,unsubscribe()}},[kv,userRef]),state2.user===userRef?state2.value:IDLE}function identityOf(texting){switch(texting.status){case"enroll":case"requesting":case"code":case"confirming":return"none";case"verified":case"optingOut":case"optedOut":return"exists";default:return"unknown"}}function useTextingAsk(options={}){let enabled=options.enabled!==false,ready=options.ready!==false,surface=options.surface??"prompt",entryWanted=options.entry===true,{runtime:runtime,userRef:userRef}=useEverfurContext(),kv=runtime.registry.services.kv,granted=useTextingGranted(),schedule=useAskSchedule(enabled&&userRef!==null?userRef:null),readSession=react.useCallback(()=>userRef===null?null:textingAskSession(userRef),[userRef]),current=react.useSyncExternalStore(subscribeTextingAskSessions,readSession,readSession),update2=react.useCallback(entry=>{userRef!==null&&setTextingAskSession(userRef,entry)},[userRef]),mine=current!==null&&current.surface===surface,handedOff=current!==null&&current.fromPrompt===true,stage=mine?current.stage==="handoff"?"hidden":current.stage:surface==="prompt"&&handedOff?"dismissed":"hidden",now=Date.now(),scheduleEligible=schedule.status==="ready"&&isTextingAskEligible(schedule.read,now),[readFor,setReadFor]=react.useState(null),entryRead=entryWanted&&userRef!==null&&granted,texting=useTextingState(userRef!==null&&readFor===userRef||stage!=="hidden"||mine||entryRead),identity=identityOf(texting),{readEnabled:readEnabled,due:due}=resolveTextingAskDue({enabled:enabled,capabilityGranted:granted,hasProfile:texting.profile!==null,signedIn:userRef!==null,scheduleEligible:scheduleEligible,offeredThisSession:current!==null,identity:identity,surfaceReady:ready});react.useEffect(()=>{readEnabled&&userRef!==null&&setReadFor(userRef)},[readEnabled,userRef]);let askNumber=current?.askNumber??(schedule.status==="ready"&&schedule.read.status==="ok"?nextTextingAskNumber(schedule.read.entry):1);react.useEffect(()=>{!due||userRef===null||textingAskSession(userRef)!==null||update2({surface:surface,stage:"offered",answered:false,askNumber:askNumber})},[due,userRef,update2,askNumber,surface]),react.useEffect(()=>{!mine||current.stage!=="handoff"||enabled&&ready&&granted&&texting.profile!==null&&identity==="none"&&update2({...current,stage:"offered"})},[mine,current,enabled,ready,granted,texting.profile,identity,update2]);let completed=schedule.status==="ready"&&schedule.read.status==="ok"&&schedule.read.entry.completed;react.useEffect(()=>{userRef===null||identity!=="exists"||completed||schedule.status!=="ready"||markTextingAskCompleted(kv,userRef)},[identity,completed,schedule.status,kv,userRef]),react.useEffect(()=>{mine&&current.stage==="enrolling"&&texting.status==="verified"&&update2({...current,stage:"verified"})},[mine,current,texting.status,update2]);let answer=react.useCallback(entry=>userRef===null||entry.answered?entry:(recordTextingAsk(kv,userRef),{...entry,answered:true}),[kv,userRef]),accept=react.useCallback(()=>{mine&&current.stage==="offered"&&update2({...current,stage:"enrolling"})},[mine,current,update2]),close=react.useCallback(()=>{if(!mine||current.stage!=="enrolling")return;let{back:back,...rest}=current;update2({...rest,stage:back??"offered"})},[mine,current,update2]),dismiss=react.useCallback(()=>{if(!(!mine||current.stage!=="offered"&&current.stage!=="enrolling")){if(surface==="prompt"){update2({...answer(current),surface:"chat",stage:"handoff",fromPrompt:true});return}current.fromPrompt===true&&current.answered&&userRef!==null&&snoozeTextingAsk(kv,userRef),update2({...answer(current),stage:"dismissed"})}},[mine,current,surface,update2,answer,kv,userRef]),{start:startCode}=texting,start=react.useCallback(async phone=>!mine||current.stage!=="enrolling"?false:(current.answered||update2(answer(current)),startCode(phone)),[mine,current,update2,answer,startCode]),canOpen=entryRead&&texting.profile!==null&&identity==="none"&&stage!=="enrolling"&&stage!=="verified",open=react.useCallback(()=>{if(!canOpen||userRef===null)return;let was=mine?current:null;update2({surface:surface,stage:"enrolling",answered:was?.answered??false,askNumber:current?.askNumber??askNumber,...was?.fromPrompt===true?{fromPrompt:true}:{},back:was?.stage==="offered"?"offered":"dismissed"})},[canOpen,userRef,mine,current,update2,surface,askNumber]),brand=texting.profile?.brandName??"";return react.useMemo(()=>({stage:userRef===null?"hidden":stage,brand:brand,askNumber:askNumber,texting:texting,accept:accept,dismiss:dismiss,close:close,start:start,canOpen:canOpen,open:open}),[userRef,stage,brand,askNumber,texting,accept,dismiss,close,start,canOpen,open])}var ABSOLUTE_FILL=/* @__PURE__ */Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});function ChatTextingAskController({enabled:enabled,ready:ready,onAsk:onAsk,entry:entry=false}){let ask=useTextingAsk({enabled:enabled,ready:ready,surface:"chat",entry:entry});return react.useEffect(()=>{callHost(onAsk,ask)},[ask,onAsk]),null}function textingAskLines(ask){return{line:TEXTING_BRAND_COPY.chatAskLine(ask.brand),accept:TEXTING_COPY.promptAccept,dismiss:TEXTING_COPY.promptDismiss,verified:TEXTING_BRAND_COPY.chatAskVerified(ask.brand)}}function ChatTextingAskComposer({ask:ask}){let theme=useEverfurTheme(),styles=react.useMemo(()=>makeAskStyles(theme),[theme]);/* @__PURE__ */
68
+ /* @__PURE__ */jsxRuntime.jsx(Button,{label:saving?copy.savingPet:copy.savePet,kind:"secondary",busy:saving,disabled:!changed,styles:styles,onPress:()=>{value!==null&&onSave(value)},testID:"texting-pet-save"}),saved&&!changed?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles.footnote,children:copy.petSaved}):null]})]})}function makeStyles2(theme){let{color:color,radius:radius,space:space,type:type,slots:slots}=theme,text3=(size,ink,weight)=>({...face(theme,weight),fontSize:size,lineHeight:Math.round(size*type.lineHeight.snug),color:ink}),cardInk=slots.card?.textColor;return reactNative.StyleSheet.create({card:{gap:space.md,padding:space.lg,borderRadius:radius.lg,borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,...slotBox(slots.card,1)},title:text3(type.size.subtitle,cardInk??color.text.primary,"bold"),subtitle:text3(type.size.body,cardInk??color.text.primary,"bold"),body:text3(type.size.body,cardInk??color.text.secondary,"regular"),footnote:text3(type.size.caption,color.text.muted,"regular"),phone:text3(type.size.body,cardInk??color.text.primary,"bold"),label:text3(type.size.caption,cardInk??color.text.primary,"bold"),input:{minHeight:44,paddingHorizontal:space.md,borderRadius:radius.md,borderWidth:1,borderColor:color.controlEdge,backgroundColor:color.surface,...text3(type.size.body,color.text.primary,"regular"),...slotBox(slots.input,1),...slotText(slots.input)},consentRow:{flexDirection:"row",alignItems:"flex-start",gap:space.sm,minHeight:44},box:{width:24,height:24,borderRadius:radius.xs,borderWidth:2,borderColor:color.controlEdge,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},boxChecked:{backgroundColor:color.brand,borderColor:color.brandInk},tick:{...text3(type.size.caption,color.text.onBrand,"bold")},consentText:{flex:1,...text3(type.size.caption,cardInk??color.text.secondary,"regular")},primary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,alignItems:"center",justifyContent:"center",backgroundColor:color.brand,...slotBox(slots.primaryButton)},primaryLabel:{...text3(type.size.body,color.text.onBrand,"bold"),...slotText(slots.primaryButton)},secondary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,borderWidth:1,borderColor:color.brandBorder,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},secondaryLabel:text3(type.size.caption,color.brandInk,"bold"),link:{minHeight:44,justifyContent:"center",alignSelf:"flex-start"},linkLabel:{...text3(type.size.caption,color.linkInk,"bold"),...slotText(slots.link)},dimmed:{opacity:.5},links:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:space.md},notice:{gap:space.xs},noticeText:text3(type.size.caption,color.errorRed,"regular"),confirm:{gap:space.sm,padding:space.md,borderRadius:radius.md,backgroundColor:color.surfaceSubtle},petRow:{gap:space.xs},chips:{flexDirection:"row",flexWrap:"wrap",gap:space.sm},chip:{minHeight:44,paddingHorizontal:space.md,borderRadius:radius.pill,borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,justifyContent:"center",...slotBox(slots.chip,1)},chipPicked:{backgroundColor:color.brandSoft,borderColor:color.brandInk},chipLabel:{...text3(type.size.caption,color.text.primary,"regular"),...slotText(slots.chip)},chipLabelPicked:{...face(theme,"bold"),color:color.brandInk}})}var INTRO_OPEN_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),host=globalThis;function isIntroOpenState(value){if(typeof value!="object"||value===null)return false;let v=value;return v.holds instanceof Set&&v.listeners instanceof Set}var stored=host[INTRO_OPEN_SYMBOL],fresh=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),state=isIntroOpenState(stored)?stored:host[INTRO_OPEN_SYMBOL]=fresh();function isIntroOpen(){return state.holds.size>0}function subscribe(listener){return state.listeners.add(listener),()=>{state.listeners.delete(listener)}}function useIntroOpen(){return react.useSyncExternalStore(subscribe,isIntroOpen,isIntroOpen)}function resolveTextingAskDue(input){let readEnabled=input.enabled&&input.capabilityGranted&&input.hasProfile&&input.signedIn&&input.scheduleEligible&&!input.offeredThisSession,due=readEnabled&&input.identity==="none"&&input.surfaceReady;return{readEnabled:readEnabled,due:due}}var URGENT_LEVELS=/* @__PURE__ */new Set(["emergency","schedule_soon"]);function textingAskThreadReady(chat){if(chat.isBootstrapping===true||chat.isLoadingHistory===true||chat.isStreaming===true||chat.status==="error"||chat.stopped===true)return false;let last=chat.messages[chat.messages.length-1];return last===void 0||last.role!=="assistant"||last.pending===true||last.checkin!==void 0||last.text.trim().length===0?false:!(typeof last.urgencyLevel=="string"&&URGENT_LEVELS.has(last.urgencyLevel))}var IN_MEMORY_KVS=/* @__PURE__ */new WeakSet;function isInMemoryKv(kv){return IN_MEMORY_KVS.has(kv)}var TEXTING_ASK_SCHEDULE_KEY="everfur.texting.askSchedule.v1",TEXTING_ASK_SNOOZE_MS=2880*60*1e3,TEXTING_ASK_MAX_ASKS=3,EMPTY_TEXTING_ASK_ENTRY=/* @__PURE__ */Object.freeze({askCount:0,nextAskAt:null,completed:false});function isTextingAskEligible(read,now){if(read.status!=="ok")return false;let{entry:entry}=read;return entry.completed||entry.askCount>=TEXTING_ASK_MAX_ASKS?false:entry.nextAskAt===null||now>=entry.nextAskAt}function applyTextingAsk(entry,now){return{askCount:Math.min(entry.askCount+1,TEXTING_ASK_MAX_ASKS),nextAskAt:now+TEXTING_ASK_SNOOZE_MS,completed:entry.completed}}function applyTextingAskSnooze(entry,now){return{...entry,nextAskAt:now+TEXTING_ASK_SNOOZE_MS}}function applyTextingAskCompleted(entry){return{...entry,completed:true}}function nextTextingAskNumber(entry){return entry.askCount<=0?1:entry.askCount===1?2:3}function entryOf(raw){if(raw===null||typeof raw!="object"||Array.isArray(raw))return null;let o=raw,{askCount:askCount,nextAskAt:nextAskAt,completed:completed}=o;return typeof askCount!="number"||!Number.isInteger(askCount)||askCount<0||nextAskAt!==null&&(typeof nextAskAt!="number"||!Number.isFinite(nextAskAt))||typeof completed!="boolean"?null:{askCount:Math.min(askCount,TEXTING_ASK_MAX_ASKS),nextAskAt:nextAskAt,completed:completed}}function parseTextingAskMap(raw){let value;try{value=JSON.parse(raw)}catch{return null}if(value===null||typeof value!="object"||Array.isArray(value))return null;let out={};for(let[key,item]of Object.entries(value)){let entry=entryOf(item);if(entry===null)return null;out[key]=entry}return out}var SLOT=/* @__PURE__ */Symbol.for("@everfur/sdk/texting/ask-schedule@v1");function shared(){let host2=globalThis,state2=host2[SLOT];return state2===void 0&&(state2={sessions:/* @__PURE__ */new Map,sessionListeners:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set,writeChain:Promise.resolve()},host2[SLOT]=state2),state2.sessionListeners===void 0&&(state2.sessionListeners=/* @__PURE__ */new Set),state2}async function load(kv){if(isInMemoryKv(kv))return{status:"unreadable"};let raw;try{raw=await kv.getItem(TEXTING_ASK_SCHEDULE_KEY)}catch{return{status:"unreadable"}}if(raw===null)try{return await kv.setItem(TEXTING_ASK_SCHEDULE_KEY,"{}"),await kv.getItem(TEXTING_ASK_SCHEDULE_KEY)===null?{status:"unreadable"}:{status:"ok",map:{}}}catch{return{status:"unreadable"}}let map=parseTextingAskMap(raw);if(map!==null)return{status:"ok",map:map};try{await kv.removeItem(TEXTING_ASK_SCHEDULE_KEY)}catch{}return{status:"unreadable"}}function subscribeTextingAskSchedule(listener){let{listeners:listeners2}=shared();return listeners2.add(listener),()=>{listeners2.delete(listener)}}function update(kv,userRef,change){let state2=shared(),run=async()=>{let loaded=await load(kv);if(loaded.status!=="ok")return;let current=loaded.map[userRef]??EMPTY_TEXTING_ASK_ENTRY;try{await kv.setItem(TEXTING_ASK_SCHEDULE_KEY,JSON.stringify({...loaded.map,[userRef]:change(current)}))}catch{return}for(let listener of[...state2.listeners])listener()},next=state2.writeChain.then(run,run);return state2.writeChain=next.catch(()=>{}),next}async function readTextingAskSchedule(kv,userRef){let loaded=await load(kv);return loaded.status!=="ok"?{status:"unreadable"}:{status:"ok",entry:loaded.map[userRef]??EMPTY_TEXTING_ASK_ENTRY}}function recordTextingAsk(kv,userRef,now=Date.now()){return update(kv,userRef,entry=>applyTextingAsk(entry,now))}function snoozeTextingAsk(kv,userRef,now=Date.now()){return update(kv,userRef,entry=>applyTextingAskSnooze(entry,now))}function markTextingAskCompleted(kv,userRef){return update(kv,userRef,applyTextingAskCompleted)}function textingAskSession(userRef){return shared().sessions.get(userRef)??null}function setTextingAskSession(userRef,entry){let state2=shared();state2.sessions.set(userRef,entry);for(let listener of[...state2.sessionListeners])listener()}function subscribeTextingAskSessions(listener){let{sessionListeners:sessionListeners}=shared();return sessionListeners.add(listener),()=>{sessionListeners.delete(listener)}}var NO_SNAPSHOT=()=>null;function useTextingGranted(){let{runtime:runtime}=useEverfurContext(),source=runtime.entitlements??null,subscribe2=react.useCallback(listener=>source===null?()=>{}:source.subscribe(listener),[source]),read=source===null?NO_SNAPSHOT:source.getSnapshot,snapshot=react.useSyncExternalStore(subscribe2,read,read);return react.useMemo(()=>snapshot!==null&&decideCapability("texting",snapshot.decisions,{isPending:snapshot.isPending}).enabled,[snapshot])}var IDLE=/* @__PURE__ */Object.freeze({status:"idle"});function useAskSchedule(userRef){let{runtime:runtime}=useEverfurContext(),kv=runtime.registry.services.kv,[state2,setState]=react.useState({user:null,value:IDLE});return react.useEffect(()=>{if(userRef===null)return;let live=true,read=()=>{readTextingAskSchedule(kv,userRef).then(value=>{live&&setState({user:userRef,value:{status:"ready",read:value}})})};read();let unsubscribe=subscribeTextingAskSchedule(read);return()=>{live=false,unsubscribe()}},[kv,userRef]),state2.user===userRef?state2.value:IDLE}function identityOf(texting){switch(texting.status){case"enroll":case"requesting":case"code":case"confirming":return"none";case"verified":case"optingOut":case"optedOut":return"exists";default:return"unknown"}}function useTextingAsk(options={}){let enabled=options.enabled!==false,ready=options.ready!==false,surface=options.surface??"prompt",entryWanted=options.entry===true,{runtime:runtime,userRef:userRef}=useEverfurContext(),kv=runtime.registry.services.kv,granted=useTextingGranted(),schedule=useAskSchedule(enabled&&userRef!==null?userRef:null),readSession=react.useCallback(()=>userRef===null?null:textingAskSession(userRef),[userRef]),current=react.useSyncExternalStore(subscribeTextingAskSessions,readSession,readSession),update2=react.useCallback(entry=>{userRef!==null&&setTextingAskSession(userRef,entry)},[userRef]),mine=current!==null&&current.surface===surface,handedOff=current!==null&&current.fromPrompt===true,stage=mine?current.stage==="handoff"?"hidden":current.stage:surface==="prompt"&&handedOff?"dismissed":"hidden",now=Date.now(),scheduleEligible=schedule.status==="ready"&&isTextingAskEligible(schedule.read,now),[readFor,setReadFor]=react.useState(null),entryRead=entryWanted&&userRef!==null&&granted,texting=useTextingState(userRef!==null&&readFor===userRef||stage!=="hidden"||mine||entryRead),identity=identityOf(texting),{readEnabled:readEnabled,due:due}=resolveTextingAskDue({enabled:enabled,capabilityGranted:granted,hasProfile:texting.profile!==null,signedIn:userRef!==null,scheduleEligible:scheduleEligible,offeredThisSession:current!==null,identity:identity,surfaceReady:ready});react.useEffect(()=>{readEnabled&&userRef!==null&&setReadFor(userRef)},[readEnabled,userRef]);let askNumber=current?.askNumber??(schedule.status==="ready"&&schedule.read.status==="ok"?nextTextingAskNumber(schedule.read.entry):1);react.useEffect(()=>{!due||userRef===null||textingAskSession(userRef)!==null||update2({surface:surface,stage:"offered",answered:false,askNumber:askNumber})},[due,userRef,update2,askNumber,surface]),react.useEffect(()=>{!mine||current.stage!=="handoff"||enabled&&ready&&granted&&texting.profile!==null&&identity==="none"&&update2({...current,stage:"offered"})},[mine,current,enabled,ready,granted,texting.profile,identity,update2]);let completed=schedule.status==="ready"&&schedule.read.status==="ok"&&schedule.read.entry.completed;react.useEffect(()=>{userRef===null||identity!=="exists"||completed||schedule.status!=="ready"||markTextingAskCompleted(kv,userRef)},[identity,completed,schedule.status,kv,userRef]),react.useEffect(()=>{mine&&current.stage==="enrolling"&&texting.status==="verified"&&update2({...current,stage:"verified"})},[mine,current,texting.status,update2]);let answer=react.useCallback(entry=>userRef===null||entry.answered?entry:(recordTextingAsk(kv,userRef),{...entry,answered:true}),[kv,userRef]),accept=react.useCallback(()=>{mine&&current.stage==="offered"&&update2({...current,stage:"enrolling"})},[mine,current,update2]),close=react.useCallback(()=>{if(!mine||current.stage!=="enrolling")return;let{back:back,...rest}=current;update2({...rest,stage:back??"offered"})},[mine,current,update2]),dismiss=react.useCallback(()=>{if(!(!mine||current.stage!=="offered"&&current.stage!=="enrolling")){if(surface==="prompt"){update2({...answer(current),surface:"chat",stage:"handoff",fromPrompt:true});return}current.fromPrompt===true&&current.answered&&userRef!==null&&snoozeTextingAsk(kv,userRef),update2({...answer(current),stage:"dismissed"})}},[mine,current,surface,update2,answer,kv,userRef]),{start:startCode}=texting,start=react.useCallback(async phone=>!mine||current.stage!=="enrolling"?false:(current.answered||update2(answer(current)),startCode(phone)),[mine,current,update2,answer,startCode]),canOpen=entryRead&&texting.profile!==null&&identity==="none"&&stage!=="enrolling"&&stage!=="verified",open=react.useCallback(()=>{if(!canOpen||userRef===null)return;let was=mine?current:null;update2({surface:surface,stage:"enrolling",answered:was?.answered??false,askNumber:current?.askNumber??askNumber,...was?.fromPrompt===true?{fromPrompt:true}:{},back:was?.stage==="offered"?"offered":"dismissed"})},[canOpen,userRef,mine,current,update2,surface,askNumber]),brand=texting.profile?.brandName??"";return react.useMemo(()=>({stage:userRef===null?"hidden":stage,brand:brand,askNumber:askNumber,texting:texting,accept:accept,dismiss:dismiss,close:close,start:start,canOpen:canOpen,open:open}),[userRef,stage,brand,askNumber,texting,accept,dismiss,close,start,canOpen,open])}var NOTHING_TO_ASK=/* @__PURE__ */new Set(["signedOut","unavailable","failed","verified","optingOut","optedOut"]);function useTextingPromptRequest(ask,requested,granted,onResolved){let{userRef:userRef}=useEverfurContext(),handledFor=react.useRef(null),{canOpen:canOpen,open:open,stage:stage,texting:texting}=ask;react.useEffect(()=>{if(!requested){handledFor.current=null;return}if(!(userRef===null||handledFor.current===userRef)){if(canOpen){handledFor.current=userRef,open();return}if(stage==="enrolling"||stage==="verified"){handledFor.current=userRef;return}(!granted||NOTHING_TO_ASK.has(texting.status))&&(handledFor.current=userRef,callHost(onResolved,"skipped"))}},[requested,userRef,canOpen,open,stage,texting.status,granted,onResolved])}var ABSOLUTE_FILL=/* @__PURE__ */Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});function ChatTextingAskController({enabled:enabled,ready:ready,onAsk:onAsk,entry:entry=false}){let ask=useTextingAsk({enabled:enabled,ready:ready,surface:"chat",entry:entry});return react.useEffect(()=>{callHost(onAsk,ask)},[ask,onAsk]),null}function textingAskLines(ask){return{line:TEXTING_BRAND_COPY.chatAskLine(ask.brand),accept:TEXTING_COPY.promptAccept,dismiss:TEXTING_COPY.promptDismiss,verified:TEXTING_BRAND_COPY.chatAskVerified(ask.brand)}}function ChatTextingAskComposer({ask:ask}){let theme=useEverfurTheme(),styles=react.useMemo(()=>makeAskStyles(theme),[theme]);/* @__PURE__ */
69
69
  return jsxRuntime.jsx(AskEntry,{ask:ask,styles:styles})}function AskEntry({ask:ask,styles:styles}){let{texting:texting}=ask,{status:status,profile:profile,snapshot:snapshot}=texting,[phone,setPhone]=react.useState(""),[consented,setConsented]=react.useState(false),[code,setCode]=react.useState(""),[problem,setProblem]=react.useState(null),[fieldFocused,setFieldFocused]=react.useState(false),fieldFocus={onFocus:()=>setFieldFocused(true),onBlur:()=>setFieldFocused(false)},pill=fieldFocused?[styles.pill,styles.pillFocused]:styles.pill,onNumber=status==="enroll"||status==="requesting"&&!snapshot.resending,onCode=status==="code"||status==="confirming"||status==="requesting",phoneRef=react.useRef(null),codeRef=react.useRef(null),numberReady=status==="enroll",codeReady=status==="code";react.useEffect(()=>{setProblem(null)},[status]),react.useEffect(()=>{numberReady?phoneRef.current?.focus():codeReady&&codeRef.current?.focus()},[numberReady,codeReady]);let close=/* @__PURE__ */jsxRuntime.jsxs(reactNative.Pressable,{onPress:ask.close,accessibilityRole:"button",accessibilityLabel:TEXTING_COPY.close,hitSlop:8,style:styles.close,testID:"texting-ask-close",children:[
70
70
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[styles.closeBar,styles.closeBarA]}),
71
71
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[styles.closeBar,styles.closeBarB]})]}),refusalLine=snapshot.error===null?null:textingErrorText(snapshot.error,snapshot.failedAction,snapshot.codeRefusal),supportLine=snapshot.error===null?null:textingSupportText(snapshot.error),refusal=refusalLine===null?null:/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles.notice,accessibilityRole:"alert",accessibilityLiveRegion:"polite",children:[
@@ -93,7 +93,7 @@ return jsxRuntime.jsxs(reactNative.View,{style:styles.root,testID:"texting-ask-c
93
93
  /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:()=>{setCode(""),texting.changeNumber()},disabled:busy,accessibilityRole:"button",accessibilityState:{disabled:busy},style:[styles.link,busy?styles.dimmed:null],children:/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles.linkLabel,children:TEXTING_COPY.changeNumber})})]})]}),close]}),inputProblem,refusal,
94
94
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:pill,children:[
95
95
  /* @__PURE__ */jsxRuntime.jsx(TextInput,{value:code,onChangeText:value=>setCode(value.replace(/\D/g,"")),editable:!busy,keyboardType:"number-pad",textContentType:"oneTimeCode",autoComplete:"sms-otp",maxLength:6,accessibilityLabel:TEXTING_COPY.codeLabel,placeholder:TEXTING_COPY.codeLabel,placeholderTextColor:styles.placeholder.color,ref:codeRef,onSubmitEditing:submit,...fieldFocus,style:[styles.field,styles.digits],testID:"texting-ask-code-input"},"code"),
96
- /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:submit,disabled:busy,accessibilityRole:"button",accessibilityLabel:confirming?TEXTING_COPY.confirmingCode:TEXTING_COPY.confirmCode,accessibilityState:{disabled:busy,busy:confirming},style:[styles.primary,busy?styles.dimmed:null],testID:"texting-ask-confirm",children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles.primaryLabel,children:confirming?TEXTING_COPY.confirmingCode:TEXTING_COPY.confirmCode})})]})]})}return null}function makeAskStyles(theme,align="auto"){let{color:color,radius:radius,space:space,type:type,slots:slots}=theme,text3=(size,ink,weight)=>({...face(theme,weight),fontSize:size,lineHeight:Math.round(size*type.lineHeight.snug),color:ink}),words={textAlign:align};return reactNative.StyleSheet.create({root:{gap:space.sm,width:"100%"},head:{flexDirection:"row",alignItems:"flex-start",gap:space.sm},headBody:{flex:1,minWidth:0,gap:space.xs},consentRow:{flexDirection:"row",alignItems:"flex-start",gap:space.sm,minHeight:44},box:{width:24,height:24,borderRadius:radius.xs,borderWidth:2,borderColor:color.controlEdge,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},boxChecked:{backgroundColor:color.brand,borderColor:color.brandInk},tick:text3(type.size.caption,color.text.onBrand,"bold"),consentText:{...align==="center"?{flexShrink:1}:{flex:1},...text3(type.size.caption,color.text.secondary,"regular"),...words},body:{...text3(type.size.body,color.text.primary,"regular"),...words},footnote:{...text3(type.size.caption,color.text.muted,"regular"),...words},placeholder:{color:color.text.placeholder},pill:{flexDirection:"row",alignItems:"center",gap:space.xs,minHeight:50,paddingVertical:space.xs,paddingLeft:space.md,paddingRight:space.xs,borderRadius:radius.pill,borderWidth:1.5,borderColor:color.controlEdge,backgroundColor:color.surface,...slotBox(slots.input,1)},pillFocused:{borderWidth:1.5,borderColor:slots.input?.borderColor??color.brandInk},field:{flex:1,minWidth:0,minHeight:44,padding:0,...text3(type.size.body,color.text.primary,"regular"),...slotText(slots.input)},digits:{fontVariant:["tabular-nums"]},primary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,alignItems:"center",justifyContent:"center",backgroundColor:color.brand,...slotBox(slots.primaryButton)},primaryLabel:{...text3(type.size.caption,color.text.onBrand,"bold"),...slotText(slots.primaryButton)},dimmed:{opacity:.5},close:{width:44,height:44,alignItems:"center",justifyContent:"center"},closeBar:{position:"absolute",width:18,height:2,borderRadius:1,backgroundColor:color.text.muted},closeBarA:{transform:[{rotate:"45deg"}]},closeBarB:{transform:[{rotate:"-45deg"}]},links:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:space.md},link:{minHeight:44,justifyContent:"center"},linkLabel:{...text3(type.size.caption,color.linkInk,"bold"),...slotText(slots.link)},notice:{gap:space.xs},noticeText:{...text3(type.size.caption,color.errorRed,"regular"),...words}})}var ORIENTATIONS=["portrait","landscape"],OPEN=/* @__PURE__ */new Set(["offered","enrolling"]);function EverfurTextingPrompt({onResolved:onResolved}){let introOpen=useIntroOpen(),ask=useTextingAsk({surface:"prompt",ready:!introOpen}),theme=useEverfurTheme(),styles=react.useMemo(()=>makePromptStyles(theme),[theme]),entryStyles=react.useMemo(()=>makeAskStyles(theme,"center"),[theme]),shown=react.useRef(false),[resolved,setResolved]=react.useState(false);OPEN.has(ask.stage)&&(shown.current=true);let open=shown.current&&(OPEN.has(ask.stage)||ask.stage==="verified")&&!resolved&&!introOpen,finish=()=>{resolved||(ask.stage==="verified"?(setResolved(true),callHost(onResolved,"verified")):ask.dismiss())};if(react.useEffect(()=>{shown.current&&ask.stage==="dismissed"&&!resolved&&(setResolved(true),callHost(onResolved,"dismissed"))},[ask.stage,onResolved,resolved]),!open)return null;let title=ask.stage==="verified"?TEXTING_COPY.verifiedTitle:TEXTING_BRAND_COPY.promptTitle(ask.brand);/* @__PURE__ */
96
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:submit,disabled:busy,accessibilityRole:"button",accessibilityLabel:confirming?TEXTING_COPY.confirmingCode:TEXTING_COPY.confirmCode,accessibilityState:{disabled:busy,busy:confirming},style:[styles.primary,busy?styles.dimmed:null],testID:"texting-ask-confirm",children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles.primaryLabel,children:confirming?TEXTING_COPY.confirmingCode:TEXTING_COPY.confirmCode})})]})]})}return null}function makeAskStyles(theme,align="auto"){let{color:color,radius:radius,space:space,type:type,slots:slots}=theme,text3=(size,ink,weight)=>({...face(theme,weight),fontSize:size,lineHeight:Math.round(size*type.lineHeight.snug),color:ink}),words={textAlign:align};return reactNative.StyleSheet.create({root:{gap:space.sm,width:"100%"},head:{flexDirection:"row",alignItems:"flex-start",gap:space.sm},headBody:{flex:1,minWidth:0,gap:space.xs},consentRow:{flexDirection:"row",alignItems:"flex-start",gap:space.sm,minHeight:44},box:{width:24,height:24,borderRadius:radius.xs,borderWidth:2,borderColor:color.controlEdge,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},boxChecked:{backgroundColor:color.brand,borderColor:color.brandInk},tick:text3(type.size.caption,color.text.onBrand,"bold"),consentText:{...align==="center"?{flexShrink:1}:{flex:1},...text3(type.size.caption,color.text.secondary,"regular"),...words},body:{...text3(type.size.body,color.text.primary,"regular"),...words},footnote:{...text3(type.size.caption,color.text.muted,"regular"),...words},placeholder:{color:color.text.placeholder},pill:{flexDirection:"row",alignItems:"center",gap:space.xs,minHeight:50,paddingVertical:space.xs,paddingLeft:space.md,paddingRight:space.xs,borderRadius:radius.pill,borderWidth:1.5,borderColor:color.controlEdge,backgroundColor:color.surface,...slotBox(slots.input,1)},pillFocused:{borderWidth:1.5,borderColor:slots.input?.borderColor??color.brandInk},field:{flex:1,minWidth:0,minHeight:44,padding:0,...text3(type.size.body,color.text.primary,"regular"),...slotText(slots.input)},digits:{fontVariant:["tabular-nums"]},primary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,alignItems:"center",justifyContent:"center",backgroundColor:color.brand,...slotBox(slots.primaryButton)},primaryLabel:{...text3(type.size.caption,color.text.onBrand,"bold"),...slotText(slots.primaryButton)},dimmed:{opacity:.5},close:{width:44,height:44,alignItems:"center",justifyContent:"center"},closeBar:{position:"absolute",width:18,height:2,borderRadius:1,backgroundColor:color.text.muted},closeBarA:{transform:[{rotate:"45deg"}]},closeBarB:{transform:[{rotate:"-45deg"}]},links:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:space.md},link:{minHeight:44,justifyContent:"center"},linkLabel:{...text3(type.size.caption,color.linkInk,"bold"),...slotText(slots.link)},notice:{gap:space.xs},noticeText:{...text3(type.size.caption,color.errorRed,"regular"),...words}})}var ORIENTATIONS=["portrait","landscape"],OPEN=/* @__PURE__ */new Set(["offered","enrolling"]);function EverfurTextingPrompt({onResolved:onResolved,requested:requested=false}){let introOpen=useIntroOpen(),ask=useTextingAsk({surface:"prompt",ready:!introOpen,entry:requested});useTextingPromptRequest(ask,requested,useTextingGranted(),onResolved);let theme=useEverfurTheme(),styles=react.useMemo(()=>makePromptStyles(theme),[theme]),entryStyles=react.useMemo(()=>makeAskStyles(theme,"center"),[theme]),shown=react.useRef(false),[resolved,setResolved]=react.useState(false);OPEN.has(ask.stage)&&(shown.current=true);let open=shown.current&&(OPEN.has(ask.stage)||ask.stage==="verified")&&!resolved&&!introOpen,finish=()=>{resolved||(ask.stage==="verified"?(setResolved(true),callHost(onResolved,"verified")):ask.dismiss())};if(react.useEffect(()=>{shown.current&&ask.stage==="dismissed"&&!resolved&&(setResolved(true),callHost(onResolved,"dismissed"))},[ask.stage,onResolved,resolved]),!open)return null;let title=ask.stage==="verified"?TEXTING_COPY.verifiedTitle:TEXTING_BRAND_COPY.promptTitle(ask.brand);/* @__PURE__ */
97
97
  return jsxRuntime.jsx(reactNative.Modal,{transparent:true,visible:true,animationType:theme.motion.reducedMotion?"none":"fade",statusBarTranslucent:true,supportedOrientations:ORIENTATIONS,onRequestClose:finish,children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.KeyboardAvoidingView,{behavior:reactNative.Platform.OS==="ios"?"padding":"height",style:styles.backdrop,children:[
98
98
  /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{style:ABSOLUTE_FILL,accessibilityRole:"button",accessibilityLabel:TEXTING_COPY.close,onPress:finish}),
99
99
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles.sheet,accessibilityViewIsModal:true,testID:"everfur-texting-prompt",children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.ScrollView,{style:styles.scroller,contentContainerStyle:styles.sheetBody,keyboardShouldPersistTaps:"handled",bounces:false,testID:"everfur-texting-prompt-scroll",children:[
@@ -4,14 +4,14 @@ import { StyleProp, ViewStyle } from 'react-native';
4
4
  import { a as CapabilityDecision } from '../resolve.d-BTC3b6FW.cjs';
5
5
  import { E as EverfurError } from '../EverfurError.d-8NHtlgzA.cjs';
6
6
  export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError.d-8NHtlgzA.cjs';
7
- import { E as EverfurTextingViewStatus, T as TextingCopy, a as TextingBrandCopy, b as TextingAsk } from '../optInView.d-Bxvg0WLJ.cjs';
8
- export { C as COPY_PLACEHOLDER_PREFIX, c as EVERFUR_TEXTING_STATUSES, d as EverfurTextingChallenge, e as EverfurTextingIdentity, f as EverfurTextingInputProblem, g as EverfurTextingProfile, h as EverfurTextingReason, i as EverfurTextingState, j as EverfurTextingStatus, k as EverfurTextingVerificationInput, l as TEXTING_ASK_MAX_ASKS, m as TEXTING_ASK_SCHEDULE_KEY, n as TEXTING_ASK_SNOOZE_MS, o as TEXTING_BRAND_COPY, p as TEXTING_CODE_PATTERN, q as TEXTING_COPY, r as TEXTING_COPY_PLACEHOLDERS, s as TEXTING_UI_CODE_LENGTH, t as TextingAction, u as TextingAskDue, v as TextingAskDueInput, w as TextingAskEntry, x as TextingAskIdentity, y as TextingAskOptions, z as TextingAskScheduleRead, A as TextingAskStage, B as TextingAskThreadMessage, D as TextingAskThreadState, F as TextingCodeRefusal, G as TextingController, H as TextingPhase, I as TextingRepository, J as TextingRepositoryDeps, K as TextingRuntime, L as TextingSnapshot, M as createTextingRepository, N as createTextingRepositoryOver, O as formatTextingPhone, P as isE164, Q as isTextingAskEligible, R as parseTextingProfile, S as resolveTextingAskDue, U as textingAskThreadReady, V as textingErrorText, W as textingIdentityFromWire, X as textingInputProblemText, Y as textingOptedOutBody, Z as textingReasonOf, _ as textingSupportText, $ as toTextingE164, a0 as useEverfurTexting, a1 as useEverfurTextingProfile, a2 as useEverfurTextingRepository, a3 as useTextingAsk, a4 as validateTextingCode, a5 as validateTextingEnroll } from '../optInView.d-Bxvg0WLJ.cjs';
9
- export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity.d-_MK9Y7a4.cjs';
10
- export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config.d-Ba21AaZg.cjs';
7
+ import { E as EverfurTextingViewStatus, T as TextingCopy, a as TextingBrandCopy, b as TextingAsk } from '../optInView.d-Cu3J440l.cjs';
8
+ export { C as COPY_PLACEHOLDER_PREFIX, c as EVERFUR_TEXTING_STATUSES, d as EverfurTextingChallenge, e as EverfurTextingIdentity, f as EverfurTextingInputProblem, g as EverfurTextingProfile, h as EverfurTextingReason, i as EverfurTextingState, j as EverfurTextingStatus, k as EverfurTextingVerificationInput, l as TEXTING_ASK_MAX_ASKS, m as TEXTING_ASK_SCHEDULE_KEY, n as TEXTING_ASK_SNOOZE_MS, o as TEXTING_BRAND_COPY, p as TEXTING_CODE_PATTERN, q as TEXTING_COPY, r as TEXTING_COPY_PLACEHOLDERS, s as TEXTING_UI_CODE_LENGTH, t as TextingAction, u as TextingAskDue, v as TextingAskDueInput, w as TextingAskEntry, x as TextingAskIdentity, y as TextingAskOptions, z as TextingAskScheduleRead, A as TextingAskStage, B as TextingAskThreadMessage, D as TextingAskThreadState, F as TextingCodeRefusal, G as TextingController, H as TextingPhase, I as TextingRepository, J as TextingRepositoryDeps, K as TextingRuntime, L as TextingSnapshot, M as createTextingRepository, N as createTextingRepositoryOver, O as formatTextingPhone, P as isE164, Q as isTextingAskEligible, R as parseTextingProfile, S as resolveTextingAskDue, U as textingAskThreadReady, V as textingErrorText, W as textingIdentityFromWire, X as textingInputProblemText, Y as textingOptedOutBody, Z as textingReasonOf, _ as textingSupportText, $ as toTextingE164, a0 as useEverfurTexting, a1 as useEverfurTextingProfile, a2 as useEverfurTextingRepository, a3 as useTextingAsk, a4 as validateTextingCode, a5 as validateTextingEnroll } from '../optInView.d-Cu3J440l.cjs';
9
+ export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity.d-CFc4KrK0.cjs';
10
+ export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config.d-D-7_tLb8.cjs';
11
11
  export { B as Brand, C as ConversationId, P as PetRef, R as RecordsRequestId, U as UserRef, _ as __brand } from '../ids.d-B2GAAifq.cjs';
12
12
  export { E as EverfurResult } from '../EverfurResult.d-BFH-3s6E.cjs';
13
13
  export { E as ErrorPolicyPort } from '../ErrorPolicyPort.d-DirW9hgO.cjs';
14
- import '../requestFunnel.d-BwO-jFLX.cjs';
14
+ import '../requestFunnel.d-BdTkSu0W.cjs';
15
15
 
16
16
  interface EverfurTextingOptInProps {
17
17
  /** Called when the member's step changes (for example to `verified` or `optedOut`). A throw is swallowed. */
@@ -34,14 +34,28 @@ interface EverfurTextingOptInProps {
34
34
  /** The texting opt-in in a React Native app. Mount it under the `EverfurProvider` from "@everfur/sdk". */
35
35
  declare function EverfurTextingOptIn(props: EverfurTextingOptInProps): ReactNode;
36
36
 
37
- /** How a showing ended: the member verified a number, or answered "Not now" (or closed the pop-up). */
38
- type EverfurTextingPromptOutcome = 'verified' | 'dismissed';
37
+ /**
38
+ * How a showing ended: the member verified a number, or answered "Not now" (or closed the pop-up). `skipped` answers
39
+ * a `requested` showing that found nothing to ask (see `EverfurTextingPromptProps.requested`).
40
+ */
41
+ type EverfurTextingPromptOutcome = 'verified' | 'dismissed' | 'skipped';
39
42
  interface EverfurTextingPromptProps {
40
43
  /** Called once when a showing ends. A throw is swallowed. */
41
44
  readonly onResolved?: (outcome: EverfurTextingPromptOutcome) => void;
45
+ /**
46
+ * Ask now, at your own moment (your sign-up, a settings row), whatever the schedule says. Set it true once the
47
+ * member is signed in: for a member whose tenant grants texting and who has no linked number, the card opens on the
48
+ * number entry (your tenant's consent words, verbatim, unticked and required, then the code). Requesting a code
49
+ * counts one of the three scheduled asks, closing the entry counts nothing, and a verified number means neither
50
+ * this card nor the chat asks again. When there is nothing to ask (texting not granted or not configured for your
51
+ * tenant, the member already has a number or turned one off, or the identity could not be read) `onResolved` hears
52
+ * `skipped` once, so your flow can carry on. Handled once per member while true; set it false and true again to
53
+ * ask again. Default false: the card shows itself on the schedule only.
54
+ */
55
+ readonly requested?: boolean;
42
56
  }
43
57
  /** The app-open texting pop-up in a React Native app. Renders nothing unless the ask is due for this member. */
44
- declare function EverfurTextingPrompt({ onResolved }: EverfurTextingPromptProps): ReactNode;
58
+ declare function EverfurTextingPrompt({ onResolved, requested }: EverfurTextingPromptProps): ReactNode;
45
59
 
46
60
  interface ChatTextingAskControllerProps {
47
61
  /** The chat's `chatTextingAsk` presentation setting. */
@@ -4,14 +4,14 @@ import { StyleProp, ViewStyle } from 'react-native';
4
4
  import { a as CapabilityDecision } from '../resolve.d-BTC3b6FW.js';
5
5
  import { E as EverfurError } from '../EverfurError.d-8NHtlgzA.js';
6
6
  export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError.d-8NHtlgzA.js';
7
- import { E as EverfurTextingViewStatus, T as TextingCopy, a as TextingBrandCopy, b as TextingAsk } from '../optInView.d-BpFTJaaX.js';
8
- export { C as COPY_PLACEHOLDER_PREFIX, c as EVERFUR_TEXTING_STATUSES, d as EverfurTextingChallenge, e as EverfurTextingIdentity, f as EverfurTextingInputProblem, g as EverfurTextingProfile, h as EverfurTextingReason, i as EverfurTextingState, j as EverfurTextingStatus, k as EverfurTextingVerificationInput, l as TEXTING_ASK_MAX_ASKS, m as TEXTING_ASK_SCHEDULE_KEY, n as TEXTING_ASK_SNOOZE_MS, o as TEXTING_BRAND_COPY, p as TEXTING_CODE_PATTERN, q as TEXTING_COPY, r as TEXTING_COPY_PLACEHOLDERS, s as TEXTING_UI_CODE_LENGTH, t as TextingAction, u as TextingAskDue, v as TextingAskDueInput, w as TextingAskEntry, x as TextingAskIdentity, y as TextingAskOptions, z as TextingAskScheduleRead, A as TextingAskStage, B as TextingAskThreadMessage, D as TextingAskThreadState, F as TextingCodeRefusal, G as TextingController, H as TextingPhase, I as TextingRepository, J as TextingRepositoryDeps, K as TextingRuntime, L as TextingSnapshot, M as createTextingRepository, N as createTextingRepositoryOver, O as formatTextingPhone, P as isE164, Q as isTextingAskEligible, R as parseTextingProfile, S as resolveTextingAskDue, U as textingAskThreadReady, V as textingErrorText, W as textingIdentityFromWire, X as textingInputProblemText, Y as textingOptedOutBody, Z as textingReasonOf, _ as textingSupportText, $ as toTextingE164, a0 as useEverfurTexting, a1 as useEverfurTextingProfile, a2 as useEverfurTextingRepository, a3 as useTextingAsk, a4 as validateTextingCode, a5 as validateTextingEnroll } from '../optInView.d-BpFTJaaX.js';
9
- export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity.d-B7dPRGqm.js';
10
- export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config.d--6siaeNg.js';
7
+ import { E as EverfurTextingViewStatus, T as TextingCopy, a as TextingBrandCopy, b as TextingAsk } from '../optInView.d-DbSRM8qR.js';
8
+ export { C as COPY_PLACEHOLDER_PREFIX, c as EVERFUR_TEXTING_STATUSES, d as EverfurTextingChallenge, e as EverfurTextingIdentity, f as EverfurTextingInputProblem, g as EverfurTextingProfile, h as EverfurTextingReason, i as EverfurTextingState, j as EverfurTextingStatus, k as EverfurTextingVerificationInput, l as TEXTING_ASK_MAX_ASKS, m as TEXTING_ASK_SCHEDULE_KEY, n as TEXTING_ASK_SNOOZE_MS, o as TEXTING_BRAND_COPY, p as TEXTING_CODE_PATTERN, q as TEXTING_COPY, r as TEXTING_COPY_PLACEHOLDERS, s as TEXTING_UI_CODE_LENGTH, t as TextingAction, u as TextingAskDue, v as TextingAskDueInput, w as TextingAskEntry, x as TextingAskIdentity, y as TextingAskOptions, z as TextingAskScheduleRead, A as TextingAskStage, B as TextingAskThreadMessage, D as TextingAskThreadState, F as TextingCodeRefusal, G as TextingController, H as TextingPhase, I as TextingRepository, J as TextingRepositoryDeps, K as TextingRuntime, L as TextingSnapshot, M as createTextingRepository, N as createTextingRepositoryOver, O as formatTextingPhone, P as isE164, Q as isTextingAskEligible, R as parseTextingProfile, S as resolveTextingAskDue, U as textingAskThreadReady, V as textingErrorText, W as textingIdentityFromWire, X as textingInputProblemText, Y as textingOptedOutBody, Z as textingReasonOf, _ as textingSupportText, $ as toTextingE164, a0 as useEverfurTexting, a1 as useEverfurTextingProfile, a2 as useEverfurTextingRepository, a3 as useTextingAsk, a4 as validateTextingCode, a5 as validateTextingEnroll } from '../optInView.d-DbSRM8qR.js';
9
+ export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity.d--2ec4agf.js';
10
+ export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config.d-Bf15Q27G.js';
11
11
  export { B as Brand, C as ConversationId, P as PetRef, R as RecordsRequestId, U as UserRef, _ as __brand } from '../ids.d-B2GAAifq.js';
12
12
  export { E as EverfurResult } from '../EverfurResult.d-D_-254ZY.js';
13
13
  export { E as ErrorPolicyPort } from '../ErrorPolicyPort.d-68yrE3BE.js';
14
- import '../requestFunnel.d-LSnmCusf.js';
14
+ import '../requestFunnel.d-BDuYHZMa.js';
15
15
 
16
16
  interface EverfurTextingOptInProps {
17
17
  /** Called when the member's step changes (for example to `verified` or `optedOut`). A throw is swallowed. */
@@ -34,14 +34,28 @@ interface EverfurTextingOptInProps {
34
34
  /** The texting opt-in in a React Native app. Mount it under the `EverfurProvider` from "@everfur/sdk". */
35
35
  declare function EverfurTextingOptIn(props: EverfurTextingOptInProps): ReactNode;
36
36
 
37
- /** How a showing ended: the member verified a number, or answered "Not now" (or closed the pop-up). */
38
- type EverfurTextingPromptOutcome = 'verified' | 'dismissed';
37
+ /**
38
+ * How a showing ended: the member verified a number, or answered "Not now" (or closed the pop-up). `skipped` answers
39
+ * a `requested` showing that found nothing to ask (see `EverfurTextingPromptProps.requested`).
40
+ */
41
+ type EverfurTextingPromptOutcome = 'verified' | 'dismissed' | 'skipped';
39
42
  interface EverfurTextingPromptProps {
40
43
  /** Called once when a showing ends. A throw is swallowed. */
41
44
  readonly onResolved?: (outcome: EverfurTextingPromptOutcome) => void;
45
+ /**
46
+ * Ask now, at your own moment (your sign-up, a settings row), whatever the schedule says. Set it true once the
47
+ * member is signed in: for a member whose tenant grants texting and who has no linked number, the card opens on the
48
+ * number entry (your tenant's consent words, verbatim, unticked and required, then the code). Requesting a code
49
+ * counts one of the three scheduled asks, closing the entry counts nothing, and a verified number means neither
50
+ * this card nor the chat asks again. When there is nothing to ask (texting not granted or not configured for your
51
+ * tenant, the member already has a number or turned one off, or the identity could not be read) `onResolved` hears
52
+ * `skipped` once, so your flow can carry on. Handled once per member while true; set it false and true again to
53
+ * ask again. Default false: the card shows itself on the schedule only.
54
+ */
55
+ readonly requested?: boolean;
42
56
  }
43
57
  /** The app-open texting pop-up in a React Native app. Renders nothing unless the ask is due for this member. */
44
- declare function EverfurTextingPrompt({ onResolved }: EverfurTextingPromptProps): ReactNode;
58
+ declare function EverfurTextingPrompt({ onResolved, requested }: EverfurTextingPromptProps): ReactNode;
45
59
 
46
60
  interface ChatTextingAskControllerProps {
47
61
  /** The chat's `chatTextingAsk` presentation setting. */
@@ -65,7 +65,7 @@ return jsxs(View,{style:styles.petRow,children:[
65
65
  /* @__PURE__ */jsx(View,{style:styles.chips,accessibilityRole:"radiogroup",accessibilityLabel:copy.defaultPetLabel,children:pets.map(pet=>{let picked=pet.petRef===value;/* @__PURE__ */
66
66
  return jsx(Pressable,{onPress:()=>onChoose(pet.petRef),disabled:saving,accessibilityRole:"radio",accessibilityState:{checked:picked,disabled:saving},accessibilityLabel:pet.name??pet.petRef,style:[styles.chip,picked?styles.chipPicked:null],children:/* @__PURE__ */jsx(Text,{tier:"compact",style:[styles.chipLabel,picked?styles.chipLabelPicked:null],children:pet.name??pet.petRef})},pet.petRef)})}),
67
67
  /* @__PURE__ */jsxs(View,{style:styles.links,children:[
68
- /* @__PURE__ */jsx(Button,{label:saving?copy.savingPet:copy.savePet,kind:"secondary",busy:saving,disabled:!changed,styles:styles,onPress:()=>{value!==null&&onSave(value)},testID:"texting-pet-save"}),saved&&!changed?/* @__PURE__ */jsx(Text,{style:styles.footnote,children:copy.petSaved}):null]})]})}function makeStyles2(theme){let{color:color,radius:radius,space:space,type:type,slots:slots}=theme,text3=(size,ink,weight)=>({...face(theme,weight),fontSize:size,lineHeight:Math.round(size*type.lineHeight.snug),color:ink}),cardInk=slots.card?.textColor;return StyleSheet.create({card:{gap:space.md,padding:space.lg,borderRadius:radius.lg,borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,...slotBox(slots.card,1)},title:text3(type.size.subtitle,cardInk??color.text.primary,"bold"),subtitle:text3(type.size.body,cardInk??color.text.primary,"bold"),body:text3(type.size.body,cardInk??color.text.secondary,"regular"),footnote:text3(type.size.caption,color.text.muted,"regular"),phone:text3(type.size.body,cardInk??color.text.primary,"bold"),label:text3(type.size.caption,cardInk??color.text.primary,"bold"),input:{minHeight:44,paddingHorizontal:space.md,borderRadius:radius.md,borderWidth:1,borderColor:color.controlEdge,backgroundColor:color.surface,...text3(type.size.body,color.text.primary,"regular"),...slotBox(slots.input,1),...slotText(slots.input)},consentRow:{flexDirection:"row",alignItems:"flex-start",gap:space.sm,minHeight:44},box:{width:24,height:24,borderRadius:radius.xs,borderWidth:2,borderColor:color.controlEdge,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},boxChecked:{backgroundColor:color.brand,borderColor:color.brandInk},tick:{...text3(type.size.caption,color.text.onBrand,"bold")},consentText:{flex:1,...text3(type.size.caption,cardInk??color.text.secondary,"regular")},primary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,alignItems:"center",justifyContent:"center",backgroundColor:color.brand,...slotBox(slots.primaryButton)},primaryLabel:{...text3(type.size.body,color.text.onBrand,"bold"),...slotText(slots.primaryButton)},secondary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,borderWidth:1,borderColor:color.brandBorder,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},secondaryLabel:text3(type.size.caption,color.brandInk,"bold"),link:{minHeight:44,justifyContent:"center",alignSelf:"flex-start"},linkLabel:{...text3(type.size.caption,color.linkInk,"bold"),...slotText(slots.link)},dimmed:{opacity:.5},links:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:space.md},notice:{gap:space.xs},noticeText:text3(type.size.caption,color.errorRed,"regular"),confirm:{gap:space.sm,padding:space.md,borderRadius:radius.md,backgroundColor:color.surfaceSubtle},petRow:{gap:space.xs},chips:{flexDirection:"row",flexWrap:"wrap",gap:space.sm},chip:{minHeight:44,paddingHorizontal:space.md,borderRadius:radius.pill,borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,justifyContent:"center",...slotBox(slots.chip,1)},chipPicked:{backgroundColor:color.brandSoft,borderColor:color.brandInk},chipLabel:{...text3(type.size.caption,color.text.primary,"regular"),...slotText(slots.chip)},chipLabelPicked:{...face(theme,"bold"),color:color.brandInk}})}var INTRO_OPEN_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),host=globalThis;function isIntroOpenState(value){if(typeof value!="object"||value===null)return false;let v=value;return v.holds instanceof Set&&v.listeners instanceof Set}var stored=host[INTRO_OPEN_SYMBOL],fresh=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),state=isIntroOpenState(stored)?stored:host[INTRO_OPEN_SYMBOL]=fresh();function isIntroOpen(){return state.holds.size>0}function subscribe(listener){return state.listeners.add(listener),()=>{state.listeners.delete(listener)}}function useIntroOpen(){return useSyncExternalStore(subscribe,isIntroOpen,isIntroOpen)}function resolveTextingAskDue(input){let readEnabled=input.enabled&&input.capabilityGranted&&input.hasProfile&&input.signedIn&&input.scheduleEligible&&!input.offeredThisSession,due=readEnabled&&input.identity==="none"&&input.surfaceReady;return{readEnabled:readEnabled,due:due}}var URGENT_LEVELS=/* @__PURE__ */new Set(["emergency","schedule_soon"]);function textingAskThreadReady(chat){if(chat.isBootstrapping===true||chat.isLoadingHistory===true||chat.isStreaming===true||chat.status==="error"||chat.stopped===true)return false;let last=chat.messages[chat.messages.length-1];return last===void 0||last.role!=="assistant"||last.pending===true||last.checkin!==void 0||last.text.trim().length===0?false:!(typeof last.urgencyLevel=="string"&&URGENT_LEVELS.has(last.urgencyLevel))}var IN_MEMORY_KVS=/* @__PURE__ */new WeakSet;function isInMemoryKv(kv){return IN_MEMORY_KVS.has(kv)}var TEXTING_ASK_SCHEDULE_KEY="everfur.texting.askSchedule.v1",TEXTING_ASK_SNOOZE_MS=2880*60*1e3,TEXTING_ASK_MAX_ASKS=3,EMPTY_TEXTING_ASK_ENTRY=/* @__PURE__ */Object.freeze({askCount:0,nextAskAt:null,completed:false});function isTextingAskEligible(read,now){if(read.status!=="ok")return false;let{entry:entry}=read;return entry.completed||entry.askCount>=TEXTING_ASK_MAX_ASKS?false:entry.nextAskAt===null||now>=entry.nextAskAt}function applyTextingAsk(entry,now){return{askCount:Math.min(entry.askCount+1,TEXTING_ASK_MAX_ASKS),nextAskAt:now+TEXTING_ASK_SNOOZE_MS,completed:entry.completed}}function applyTextingAskSnooze(entry,now){return{...entry,nextAskAt:now+TEXTING_ASK_SNOOZE_MS}}function applyTextingAskCompleted(entry){return{...entry,completed:true}}function nextTextingAskNumber(entry){return entry.askCount<=0?1:entry.askCount===1?2:3}function entryOf(raw){if(raw===null||typeof raw!="object"||Array.isArray(raw))return null;let o=raw,{askCount:askCount,nextAskAt:nextAskAt,completed:completed}=o;return typeof askCount!="number"||!Number.isInteger(askCount)||askCount<0||nextAskAt!==null&&(typeof nextAskAt!="number"||!Number.isFinite(nextAskAt))||typeof completed!="boolean"?null:{askCount:Math.min(askCount,TEXTING_ASK_MAX_ASKS),nextAskAt:nextAskAt,completed:completed}}function parseTextingAskMap(raw){let value;try{value=JSON.parse(raw)}catch{return null}if(value===null||typeof value!="object"||Array.isArray(value))return null;let out={};for(let[key,item]of Object.entries(value)){let entry=entryOf(item);if(entry===null)return null;out[key]=entry}return out}var SLOT=/* @__PURE__ */Symbol.for("@everfur/sdk/texting/ask-schedule@v1");function shared(){let host2=globalThis,state2=host2[SLOT];return state2===void 0&&(state2={sessions:/* @__PURE__ */new Map,sessionListeners:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set,writeChain:Promise.resolve()},host2[SLOT]=state2),state2.sessionListeners===void 0&&(state2.sessionListeners=/* @__PURE__ */new Set),state2}async function load(kv){if(isInMemoryKv(kv))return{status:"unreadable"};let raw;try{raw=await kv.getItem(TEXTING_ASK_SCHEDULE_KEY)}catch{return{status:"unreadable"}}if(raw===null)try{return await kv.setItem(TEXTING_ASK_SCHEDULE_KEY,"{}"),await kv.getItem(TEXTING_ASK_SCHEDULE_KEY)===null?{status:"unreadable"}:{status:"ok",map:{}}}catch{return{status:"unreadable"}}let map=parseTextingAskMap(raw);if(map!==null)return{status:"ok",map:map};try{await kv.removeItem(TEXTING_ASK_SCHEDULE_KEY)}catch{}return{status:"unreadable"}}function subscribeTextingAskSchedule(listener){let{listeners:listeners2}=shared();return listeners2.add(listener),()=>{listeners2.delete(listener)}}function update(kv,userRef,change){let state2=shared(),run=async()=>{let loaded=await load(kv);if(loaded.status!=="ok")return;let current=loaded.map[userRef]??EMPTY_TEXTING_ASK_ENTRY;try{await kv.setItem(TEXTING_ASK_SCHEDULE_KEY,JSON.stringify({...loaded.map,[userRef]:change(current)}))}catch{return}for(let listener of[...state2.listeners])listener()},next=state2.writeChain.then(run,run);return state2.writeChain=next.catch(()=>{}),next}async function readTextingAskSchedule(kv,userRef){let loaded=await load(kv);return loaded.status!=="ok"?{status:"unreadable"}:{status:"ok",entry:loaded.map[userRef]??EMPTY_TEXTING_ASK_ENTRY}}function recordTextingAsk(kv,userRef,now=Date.now()){return update(kv,userRef,entry=>applyTextingAsk(entry,now))}function snoozeTextingAsk(kv,userRef,now=Date.now()){return update(kv,userRef,entry=>applyTextingAskSnooze(entry,now))}function markTextingAskCompleted(kv,userRef){return update(kv,userRef,applyTextingAskCompleted)}function textingAskSession(userRef){return shared().sessions.get(userRef)??null}function setTextingAskSession(userRef,entry){let state2=shared();state2.sessions.set(userRef,entry);for(let listener of[...state2.sessionListeners])listener()}function subscribeTextingAskSessions(listener){let{sessionListeners:sessionListeners}=shared();return sessionListeners.add(listener),()=>{sessionListeners.delete(listener)}}var NO_SNAPSHOT=()=>null;function useTextingGranted(){let{runtime:runtime}=useEverfurContext(),source=runtime.entitlements??null,subscribe2=useCallback(listener=>source===null?()=>{}:source.subscribe(listener),[source]),read=source===null?NO_SNAPSHOT:source.getSnapshot,snapshot=useSyncExternalStore(subscribe2,read,read);return useMemo(()=>snapshot!==null&&decideCapability("texting",snapshot.decisions,{isPending:snapshot.isPending}).enabled,[snapshot])}var IDLE=/* @__PURE__ */Object.freeze({status:"idle"});function useAskSchedule(userRef){let{runtime:runtime}=useEverfurContext(),kv=runtime.registry.services.kv,[state2,setState]=useState({user:null,value:IDLE});return useEffect(()=>{if(userRef===null)return;let live=true,read=()=>{readTextingAskSchedule(kv,userRef).then(value=>{live&&setState({user:userRef,value:{status:"ready",read:value}})})};read();let unsubscribe=subscribeTextingAskSchedule(read);return()=>{live=false,unsubscribe()}},[kv,userRef]),state2.user===userRef?state2.value:IDLE}function identityOf(texting){switch(texting.status){case"enroll":case"requesting":case"code":case"confirming":return"none";case"verified":case"optingOut":case"optedOut":return"exists";default:return"unknown"}}function useTextingAsk(options={}){let enabled=options.enabled!==false,ready=options.ready!==false,surface=options.surface??"prompt",entryWanted=options.entry===true,{runtime:runtime,userRef:userRef}=useEverfurContext(),kv=runtime.registry.services.kv,granted=useTextingGranted(),schedule=useAskSchedule(enabled&&userRef!==null?userRef:null),readSession=useCallback(()=>userRef===null?null:textingAskSession(userRef),[userRef]),current=useSyncExternalStore(subscribeTextingAskSessions,readSession,readSession),update2=useCallback(entry=>{userRef!==null&&setTextingAskSession(userRef,entry)},[userRef]),mine=current!==null&&current.surface===surface,handedOff=current!==null&&current.fromPrompt===true,stage=mine?current.stage==="handoff"?"hidden":current.stage:surface==="prompt"&&handedOff?"dismissed":"hidden",now=Date.now(),scheduleEligible=schedule.status==="ready"&&isTextingAskEligible(schedule.read,now),[readFor,setReadFor]=useState(null),entryRead=entryWanted&&userRef!==null&&granted,texting=useTextingState(userRef!==null&&readFor===userRef||stage!=="hidden"||mine||entryRead),identity=identityOf(texting),{readEnabled:readEnabled,due:due}=resolveTextingAskDue({enabled:enabled,capabilityGranted:granted,hasProfile:texting.profile!==null,signedIn:userRef!==null,scheduleEligible:scheduleEligible,offeredThisSession:current!==null,identity:identity,surfaceReady:ready});useEffect(()=>{readEnabled&&userRef!==null&&setReadFor(userRef)},[readEnabled,userRef]);let askNumber=current?.askNumber??(schedule.status==="ready"&&schedule.read.status==="ok"?nextTextingAskNumber(schedule.read.entry):1);useEffect(()=>{!due||userRef===null||textingAskSession(userRef)!==null||update2({surface:surface,stage:"offered",answered:false,askNumber:askNumber})},[due,userRef,update2,askNumber,surface]),useEffect(()=>{!mine||current.stage!=="handoff"||enabled&&ready&&granted&&texting.profile!==null&&identity==="none"&&update2({...current,stage:"offered"})},[mine,current,enabled,ready,granted,texting.profile,identity,update2]);let completed=schedule.status==="ready"&&schedule.read.status==="ok"&&schedule.read.entry.completed;useEffect(()=>{userRef===null||identity!=="exists"||completed||schedule.status!=="ready"||markTextingAskCompleted(kv,userRef)},[identity,completed,schedule.status,kv,userRef]),useEffect(()=>{mine&&current.stage==="enrolling"&&texting.status==="verified"&&update2({...current,stage:"verified"})},[mine,current,texting.status,update2]);let answer=useCallback(entry=>userRef===null||entry.answered?entry:(recordTextingAsk(kv,userRef),{...entry,answered:true}),[kv,userRef]),accept=useCallback(()=>{mine&&current.stage==="offered"&&update2({...current,stage:"enrolling"})},[mine,current,update2]),close=useCallback(()=>{if(!mine||current.stage!=="enrolling")return;let{back:back,...rest}=current;update2({...rest,stage:back??"offered"})},[mine,current,update2]),dismiss=useCallback(()=>{if(!(!mine||current.stage!=="offered"&&current.stage!=="enrolling")){if(surface==="prompt"){update2({...answer(current),surface:"chat",stage:"handoff",fromPrompt:true});return}current.fromPrompt===true&&current.answered&&userRef!==null&&snoozeTextingAsk(kv,userRef),update2({...answer(current),stage:"dismissed"})}},[mine,current,surface,update2,answer,kv,userRef]),{start:startCode}=texting,start=useCallback(async phone=>!mine||current.stage!=="enrolling"?false:(current.answered||update2(answer(current)),startCode(phone)),[mine,current,update2,answer,startCode]),canOpen=entryRead&&texting.profile!==null&&identity==="none"&&stage!=="enrolling"&&stage!=="verified",open=useCallback(()=>{if(!canOpen||userRef===null)return;let was=mine?current:null;update2({surface:surface,stage:"enrolling",answered:was?.answered??false,askNumber:current?.askNumber??askNumber,...was?.fromPrompt===true?{fromPrompt:true}:{},back:was?.stage==="offered"?"offered":"dismissed"})},[canOpen,userRef,mine,current,update2,surface,askNumber]),brand=texting.profile?.brandName??"";return useMemo(()=>({stage:userRef===null?"hidden":stage,brand:brand,askNumber:askNumber,texting:texting,accept:accept,dismiss:dismiss,close:close,start:start,canOpen:canOpen,open:open}),[userRef,stage,brand,askNumber,texting,accept,dismiss,close,start,canOpen,open])}var ABSOLUTE_FILL=/* @__PURE__ */Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});function ChatTextingAskController({enabled:enabled,ready:ready,onAsk:onAsk,entry:entry=false}){let ask=useTextingAsk({enabled:enabled,ready:ready,surface:"chat",entry:entry});return useEffect(()=>{callHost(onAsk,ask)},[ask,onAsk]),null}function textingAskLines(ask){return{line:TEXTING_BRAND_COPY.chatAskLine(ask.brand),accept:TEXTING_COPY.promptAccept,dismiss:TEXTING_COPY.promptDismiss,verified:TEXTING_BRAND_COPY.chatAskVerified(ask.brand)}}function ChatTextingAskComposer({ask:ask}){let theme=useEverfurTheme(),styles=useMemo(()=>makeAskStyles(theme),[theme]);/* @__PURE__ */
68
+ /* @__PURE__ */jsx(Button,{label:saving?copy.savingPet:copy.savePet,kind:"secondary",busy:saving,disabled:!changed,styles:styles,onPress:()=>{value!==null&&onSave(value)},testID:"texting-pet-save"}),saved&&!changed?/* @__PURE__ */jsx(Text,{style:styles.footnote,children:copy.petSaved}):null]})]})}function makeStyles2(theme){let{color:color,radius:radius,space:space,type:type,slots:slots}=theme,text3=(size,ink,weight)=>({...face(theme,weight),fontSize:size,lineHeight:Math.round(size*type.lineHeight.snug),color:ink}),cardInk=slots.card?.textColor;return StyleSheet.create({card:{gap:space.md,padding:space.lg,borderRadius:radius.lg,borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,...slotBox(slots.card,1)},title:text3(type.size.subtitle,cardInk??color.text.primary,"bold"),subtitle:text3(type.size.body,cardInk??color.text.primary,"bold"),body:text3(type.size.body,cardInk??color.text.secondary,"regular"),footnote:text3(type.size.caption,color.text.muted,"regular"),phone:text3(type.size.body,cardInk??color.text.primary,"bold"),label:text3(type.size.caption,cardInk??color.text.primary,"bold"),input:{minHeight:44,paddingHorizontal:space.md,borderRadius:radius.md,borderWidth:1,borderColor:color.controlEdge,backgroundColor:color.surface,...text3(type.size.body,color.text.primary,"regular"),...slotBox(slots.input,1),...slotText(slots.input)},consentRow:{flexDirection:"row",alignItems:"flex-start",gap:space.sm,minHeight:44},box:{width:24,height:24,borderRadius:radius.xs,borderWidth:2,borderColor:color.controlEdge,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},boxChecked:{backgroundColor:color.brand,borderColor:color.brandInk},tick:{...text3(type.size.caption,color.text.onBrand,"bold")},consentText:{flex:1,...text3(type.size.caption,cardInk??color.text.secondary,"regular")},primary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,alignItems:"center",justifyContent:"center",backgroundColor:color.brand,...slotBox(slots.primaryButton)},primaryLabel:{...text3(type.size.body,color.text.onBrand,"bold"),...slotText(slots.primaryButton)},secondary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,borderWidth:1,borderColor:color.brandBorder,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},secondaryLabel:text3(type.size.caption,color.brandInk,"bold"),link:{minHeight:44,justifyContent:"center",alignSelf:"flex-start"},linkLabel:{...text3(type.size.caption,color.linkInk,"bold"),...slotText(slots.link)},dimmed:{opacity:.5},links:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:space.md},notice:{gap:space.xs},noticeText:text3(type.size.caption,color.errorRed,"regular"),confirm:{gap:space.sm,padding:space.md,borderRadius:radius.md,backgroundColor:color.surfaceSubtle},petRow:{gap:space.xs},chips:{flexDirection:"row",flexWrap:"wrap",gap:space.sm},chip:{minHeight:44,paddingHorizontal:space.md,borderRadius:radius.pill,borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,justifyContent:"center",...slotBox(slots.chip,1)},chipPicked:{backgroundColor:color.brandSoft,borderColor:color.brandInk},chipLabel:{...text3(type.size.caption,color.text.primary,"regular"),...slotText(slots.chip)},chipLabelPicked:{...face(theme,"bold"),color:color.brandInk}})}var INTRO_OPEN_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),host=globalThis;function isIntroOpenState(value){if(typeof value!="object"||value===null)return false;let v=value;return v.holds instanceof Set&&v.listeners instanceof Set}var stored=host[INTRO_OPEN_SYMBOL],fresh=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),state=isIntroOpenState(stored)?stored:host[INTRO_OPEN_SYMBOL]=fresh();function isIntroOpen(){return state.holds.size>0}function subscribe(listener){return state.listeners.add(listener),()=>{state.listeners.delete(listener)}}function useIntroOpen(){return useSyncExternalStore(subscribe,isIntroOpen,isIntroOpen)}function resolveTextingAskDue(input){let readEnabled=input.enabled&&input.capabilityGranted&&input.hasProfile&&input.signedIn&&input.scheduleEligible&&!input.offeredThisSession,due=readEnabled&&input.identity==="none"&&input.surfaceReady;return{readEnabled:readEnabled,due:due}}var URGENT_LEVELS=/* @__PURE__ */new Set(["emergency","schedule_soon"]);function textingAskThreadReady(chat){if(chat.isBootstrapping===true||chat.isLoadingHistory===true||chat.isStreaming===true||chat.status==="error"||chat.stopped===true)return false;let last=chat.messages[chat.messages.length-1];return last===void 0||last.role!=="assistant"||last.pending===true||last.checkin!==void 0||last.text.trim().length===0?false:!(typeof last.urgencyLevel=="string"&&URGENT_LEVELS.has(last.urgencyLevel))}var IN_MEMORY_KVS=/* @__PURE__ */new WeakSet;function isInMemoryKv(kv){return IN_MEMORY_KVS.has(kv)}var TEXTING_ASK_SCHEDULE_KEY="everfur.texting.askSchedule.v1",TEXTING_ASK_SNOOZE_MS=2880*60*1e3,TEXTING_ASK_MAX_ASKS=3,EMPTY_TEXTING_ASK_ENTRY=/* @__PURE__ */Object.freeze({askCount:0,nextAskAt:null,completed:false});function isTextingAskEligible(read,now){if(read.status!=="ok")return false;let{entry:entry}=read;return entry.completed||entry.askCount>=TEXTING_ASK_MAX_ASKS?false:entry.nextAskAt===null||now>=entry.nextAskAt}function applyTextingAsk(entry,now){return{askCount:Math.min(entry.askCount+1,TEXTING_ASK_MAX_ASKS),nextAskAt:now+TEXTING_ASK_SNOOZE_MS,completed:entry.completed}}function applyTextingAskSnooze(entry,now){return{...entry,nextAskAt:now+TEXTING_ASK_SNOOZE_MS}}function applyTextingAskCompleted(entry){return{...entry,completed:true}}function nextTextingAskNumber(entry){return entry.askCount<=0?1:entry.askCount===1?2:3}function entryOf(raw){if(raw===null||typeof raw!="object"||Array.isArray(raw))return null;let o=raw,{askCount:askCount,nextAskAt:nextAskAt,completed:completed}=o;return typeof askCount!="number"||!Number.isInteger(askCount)||askCount<0||nextAskAt!==null&&(typeof nextAskAt!="number"||!Number.isFinite(nextAskAt))||typeof completed!="boolean"?null:{askCount:Math.min(askCount,TEXTING_ASK_MAX_ASKS),nextAskAt:nextAskAt,completed:completed}}function parseTextingAskMap(raw){let value;try{value=JSON.parse(raw)}catch{return null}if(value===null||typeof value!="object"||Array.isArray(value))return null;let out={};for(let[key,item]of Object.entries(value)){let entry=entryOf(item);if(entry===null)return null;out[key]=entry}return out}var SLOT=/* @__PURE__ */Symbol.for("@everfur/sdk/texting/ask-schedule@v1");function shared(){let host2=globalThis,state2=host2[SLOT];return state2===void 0&&(state2={sessions:/* @__PURE__ */new Map,sessionListeners:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set,writeChain:Promise.resolve()},host2[SLOT]=state2),state2.sessionListeners===void 0&&(state2.sessionListeners=/* @__PURE__ */new Set),state2}async function load(kv){if(isInMemoryKv(kv))return{status:"unreadable"};let raw;try{raw=await kv.getItem(TEXTING_ASK_SCHEDULE_KEY)}catch{return{status:"unreadable"}}if(raw===null)try{return await kv.setItem(TEXTING_ASK_SCHEDULE_KEY,"{}"),await kv.getItem(TEXTING_ASK_SCHEDULE_KEY)===null?{status:"unreadable"}:{status:"ok",map:{}}}catch{return{status:"unreadable"}}let map=parseTextingAskMap(raw);if(map!==null)return{status:"ok",map:map};try{await kv.removeItem(TEXTING_ASK_SCHEDULE_KEY)}catch{}return{status:"unreadable"}}function subscribeTextingAskSchedule(listener){let{listeners:listeners2}=shared();return listeners2.add(listener),()=>{listeners2.delete(listener)}}function update(kv,userRef,change){let state2=shared(),run=async()=>{let loaded=await load(kv);if(loaded.status!=="ok")return;let current=loaded.map[userRef]??EMPTY_TEXTING_ASK_ENTRY;try{await kv.setItem(TEXTING_ASK_SCHEDULE_KEY,JSON.stringify({...loaded.map,[userRef]:change(current)}))}catch{return}for(let listener of[...state2.listeners])listener()},next=state2.writeChain.then(run,run);return state2.writeChain=next.catch(()=>{}),next}async function readTextingAskSchedule(kv,userRef){let loaded=await load(kv);return loaded.status!=="ok"?{status:"unreadable"}:{status:"ok",entry:loaded.map[userRef]??EMPTY_TEXTING_ASK_ENTRY}}function recordTextingAsk(kv,userRef,now=Date.now()){return update(kv,userRef,entry=>applyTextingAsk(entry,now))}function snoozeTextingAsk(kv,userRef,now=Date.now()){return update(kv,userRef,entry=>applyTextingAskSnooze(entry,now))}function markTextingAskCompleted(kv,userRef){return update(kv,userRef,applyTextingAskCompleted)}function textingAskSession(userRef){return shared().sessions.get(userRef)??null}function setTextingAskSession(userRef,entry){let state2=shared();state2.sessions.set(userRef,entry);for(let listener of[...state2.sessionListeners])listener()}function subscribeTextingAskSessions(listener){let{sessionListeners:sessionListeners}=shared();return sessionListeners.add(listener),()=>{sessionListeners.delete(listener)}}var NO_SNAPSHOT=()=>null;function useTextingGranted(){let{runtime:runtime}=useEverfurContext(),source=runtime.entitlements??null,subscribe2=useCallback(listener=>source===null?()=>{}:source.subscribe(listener),[source]),read=source===null?NO_SNAPSHOT:source.getSnapshot,snapshot=useSyncExternalStore(subscribe2,read,read);return useMemo(()=>snapshot!==null&&decideCapability("texting",snapshot.decisions,{isPending:snapshot.isPending}).enabled,[snapshot])}var IDLE=/* @__PURE__ */Object.freeze({status:"idle"});function useAskSchedule(userRef){let{runtime:runtime}=useEverfurContext(),kv=runtime.registry.services.kv,[state2,setState]=useState({user:null,value:IDLE});return useEffect(()=>{if(userRef===null)return;let live=true,read=()=>{readTextingAskSchedule(kv,userRef).then(value=>{live&&setState({user:userRef,value:{status:"ready",read:value}})})};read();let unsubscribe=subscribeTextingAskSchedule(read);return()=>{live=false,unsubscribe()}},[kv,userRef]),state2.user===userRef?state2.value:IDLE}function identityOf(texting){switch(texting.status){case"enroll":case"requesting":case"code":case"confirming":return"none";case"verified":case"optingOut":case"optedOut":return"exists";default:return"unknown"}}function useTextingAsk(options={}){let enabled=options.enabled!==false,ready=options.ready!==false,surface=options.surface??"prompt",entryWanted=options.entry===true,{runtime:runtime,userRef:userRef}=useEverfurContext(),kv=runtime.registry.services.kv,granted=useTextingGranted(),schedule=useAskSchedule(enabled&&userRef!==null?userRef:null),readSession=useCallback(()=>userRef===null?null:textingAskSession(userRef),[userRef]),current=useSyncExternalStore(subscribeTextingAskSessions,readSession,readSession),update2=useCallback(entry=>{userRef!==null&&setTextingAskSession(userRef,entry)},[userRef]),mine=current!==null&&current.surface===surface,handedOff=current!==null&&current.fromPrompt===true,stage=mine?current.stage==="handoff"?"hidden":current.stage:surface==="prompt"&&handedOff?"dismissed":"hidden",now=Date.now(),scheduleEligible=schedule.status==="ready"&&isTextingAskEligible(schedule.read,now),[readFor,setReadFor]=useState(null),entryRead=entryWanted&&userRef!==null&&granted,texting=useTextingState(userRef!==null&&readFor===userRef||stage!=="hidden"||mine||entryRead),identity=identityOf(texting),{readEnabled:readEnabled,due:due}=resolveTextingAskDue({enabled:enabled,capabilityGranted:granted,hasProfile:texting.profile!==null,signedIn:userRef!==null,scheduleEligible:scheduleEligible,offeredThisSession:current!==null,identity:identity,surfaceReady:ready});useEffect(()=>{readEnabled&&userRef!==null&&setReadFor(userRef)},[readEnabled,userRef]);let askNumber=current?.askNumber??(schedule.status==="ready"&&schedule.read.status==="ok"?nextTextingAskNumber(schedule.read.entry):1);useEffect(()=>{!due||userRef===null||textingAskSession(userRef)!==null||update2({surface:surface,stage:"offered",answered:false,askNumber:askNumber})},[due,userRef,update2,askNumber,surface]),useEffect(()=>{!mine||current.stage!=="handoff"||enabled&&ready&&granted&&texting.profile!==null&&identity==="none"&&update2({...current,stage:"offered"})},[mine,current,enabled,ready,granted,texting.profile,identity,update2]);let completed=schedule.status==="ready"&&schedule.read.status==="ok"&&schedule.read.entry.completed;useEffect(()=>{userRef===null||identity!=="exists"||completed||schedule.status!=="ready"||markTextingAskCompleted(kv,userRef)},[identity,completed,schedule.status,kv,userRef]),useEffect(()=>{mine&&current.stage==="enrolling"&&texting.status==="verified"&&update2({...current,stage:"verified"})},[mine,current,texting.status,update2]);let answer=useCallback(entry=>userRef===null||entry.answered?entry:(recordTextingAsk(kv,userRef),{...entry,answered:true}),[kv,userRef]),accept=useCallback(()=>{mine&&current.stage==="offered"&&update2({...current,stage:"enrolling"})},[mine,current,update2]),close=useCallback(()=>{if(!mine||current.stage!=="enrolling")return;let{back:back,...rest}=current;update2({...rest,stage:back??"offered"})},[mine,current,update2]),dismiss=useCallback(()=>{if(!(!mine||current.stage!=="offered"&&current.stage!=="enrolling")){if(surface==="prompt"){update2({...answer(current),surface:"chat",stage:"handoff",fromPrompt:true});return}current.fromPrompt===true&&current.answered&&userRef!==null&&snoozeTextingAsk(kv,userRef),update2({...answer(current),stage:"dismissed"})}},[mine,current,surface,update2,answer,kv,userRef]),{start:startCode}=texting,start=useCallback(async phone=>!mine||current.stage!=="enrolling"?false:(current.answered||update2(answer(current)),startCode(phone)),[mine,current,update2,answer,startCode]),canOpen=entryRead&&texting.profile!==null&&identity==="none"&&stage!=="enrolling"&&stage!=="verified",open=useCallback(()=>{if(!canOpen||userRef===null)return;let was=mine?current:null;update2({surface:surface,stage:"enrolling",answered:was?.answered??false,askNumber:current?.askNumber??askNumber,...was?.fromPrompt===true?{fromPrompt:true}:{},back:was?.stage==="offered"?"offered":"dismissed"})},[canOpen,userRef,mine,current,update2,surface,askNumber]),brand=texting.profile?.brandName??"";return useMemo(()=>({stage:userRef===null?"hidden":stage,brand:brand,askNumber:askNumber,texting:texting,accept:accept,dismiss:dismiss,close:close,start:start,canOpen:canOpen,open:open}),[userRef,stage,brand,askNumber,texting,accept,dismiss,close,start,canOpen,open])}var NOTHING_TO_ASK=/* @__PURE__ */new Set(["signedOut","unavailable","failed","verified","optingOut","optedOut"]);function useTextingPromptRequest(ask,requested,granted,onResolved){let{userRef:userRef}=useEverfurContext(),handledFor=useRef(null),{canOpen:canOpen,open:open,stage:stage,texting:texting}=ask;useEffect(()=>{if(!requested){handledFor.current=null;return}if(!(userRef===null||handledFor.current===userRef)){if(canOpen){handledFor.current=userRef,open();return}if(stage==="enrolling"||stage==="verified"){handledFor.current=userRef;return}(!granted||NOTHING_TO_ASK.has(texting.status))&&(handledFor.current=userRef,callHost(onResolved,"skipped"))}},[requested,userRef,canOpen,open,stage,texting.status,granted,onResolved])}var ABSOLUTE_FILL=/* @__PURE__ */Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});function ChatTextingAskController({enabled:enabled,ready:ready,onAsk:onAsk,entry:entry=false}){let ask=useTextingAsk({enabled:enabled,ready:ready,surface:"chat",entry:entry});return useEffect(()=>{callHost(onAsk,ask)},[ask,onAsk]),null}function textingAskLines(ask){return{line:TEXTING_BRAND_COPY.chatAskLine(ask.brand),accept:TEXTING_COPY.promptAccept,dismiss:TEXTING_COPY.promptDismiss,verified:TEXTING_BRAND_COPY.chatAskVerified(ask.brand)}}function ChatTextingAskComposer({ask:ask}){let theme=useEverfurTheme(),styles=useMemo(()=>makeAskStyles(theme),[theme]);/* @__PURE__ */
69
69
  return jsx(AskEntry,{ask:ask,styles:styles})}function AskEntry({ask:ask,styles:styles}){let{texting:texting}=ask,{status:status,profile:profile,snapshot:snapshot}=texting,[phone,setPhone]=useState(""),[consented,setConsented]=useState(false),[code,setCode]=useState(""),[problem,setProblem]=useState(null),[fieldFocused,setFieldFocused]=useState(false),fieldFocus={onFocus:()=>setFieldFocused(true),onBlur:()=>setFieldFocused(false)},pill=fieldFocused?[styles.pill,styles.pillFocused]:styles.pill,onNumber=status==="enroll"||status==="requesting"&&!snapshot.resending,onCode=status==="code"||status==="confirming"||status==="requesting",phoneRef=useRef(null),codeRef=useRef(null),numberReady=status==="enroll",codeReady=status==="code";useEffect(()=>{setProblem(null)},[status]),useEffect(()=>{numberReady?phoneRef.current?.focus():codeReady&&codeRef.current?.focus()},[numberReady,codeReady]);let close=/* @__PURE__ */jsxs(Pressable,{onPress:ask.close,accessibilityRole:"button",accessibilityLabel:TEXTING_COPY.close,hitSlop:8,style:styles.close,testID:"texting-ask-close",children:[
70
70
  /* @__PURE__ */jsx(View,{style:[styles.closeBar,styles.closeBarA]}),
71
71
  /* @__PURE__ */jsx(View,{style:[styles.closeBar,styles.closeBarB]})]}),refusalLine=snapshot.error===null?null:textingErrorText(snapshot.error,snapshot.failedAction,snapshot.codeRefusal),supportLine=snapshot.error===null?null:textingSupportText(snapshot.error),refusal=refusalLine===null?null:/* @__PURE__ */jsxs(View,{style:styles.notice,accessibilityRole:"alert",accessibilityLiveRegion:"polite",children:[
@@ -93,7 +93,7 @@ return jsxs(View,{style:styles.root,testID:"texting-ask-code",children:[
93
93
  /* @__PURE__ */jsx(Pressable,{onPress:()=>{setCode(""),texting.changeNumber()},disabled:busy,accessibilityRole:"button",accessibilityState:{disabled:busy},style:[styles.link,busy?styles.dimmed:null],children:/* @__PURE__ */jsx(Text,{style:styles.linkLabel,children:TEXTING_COPY.changeNumber})})]})]}),close]}),inputProblem,refusal,
94
94
  /* @__PURE__ */jsxs(View,{style:pill,children:[
95
95
  /* @__PURE__ */jsx(TextInput,{value:code,onChangeText:value=>setCode(value.replace(/\D/g,"")),editable:!busy,keyboardType:"number-pad",textContentType:"oneTimeCode",autoComplete:"sms-otp",maxLength:6,accessibilityLabel:TEXTING_COPY.codeLabel,placeholder:TEXTING_COPY.codeLabel,placeholderTextColor:styles.placeholder.color,ref:codeRef,onSubmitEditing:submit,...fieldFocus,style:[styles.field,styles.digits],testID:"texting-ask-code-input"},"code"),
96
- /* @__PURE__ */jsx(Pressable,{onPress:submit,disabled:busy,accessibilityRole:"button",accessibilityLabel:confirming?TEXTING_COPY.confirmingCode:TEXTING_COPY.confirmCode,accessibilityState:{disabled:busy,busy:confirming},style:[styles.primary,busy?styles.dimmed:null],testID:"texting-ask-confirm",children:/* @__PURE__ */jsx(Text,{tier:"control",style:styles.primaryLabel,children:confirming?TEXTING_COPY.confirmingCode:TEXTING_COPY.confirmCode})})]})]})}return null}function makeAskStyles(theme,align="auto"){let{color:color,radius:radius,space:space,type:type,slots:slots}=theme,text3=(size,ink,weight)=>({...face(theme,weight),fontSize:size,lineHeight:Math.round(size*type.lineHeight.snug),color:ink}),words={textAlign:align};return StyleSheet.create({root:{gap:space.sm,width:"100%"},head:{flexDirection:"row",alignItems:"flex-start",gap:space.sm},headBody:{flex:1,minWidth:0,gap:space.xs},consentRow:{flexDirection:"row",alignItems:"flex-start",gap:space.sm,minHeight:44},box:{width:24,height:24,borderRadius:radius.xs,borderWidth:2,borderColor:color.controlEdge,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},boxChecked:{backgroundColor:color.brand,borderColor:color.brandInk},tick:text3(type.size.caption,color.text.onBrand,"bold"),consentText:{...align==="center"?{flexShrink:1}:{flex:1},...text3(type.size.caption,color.text.secondary,"regular"),...words},body:{...text3(type.size.body,color.text.primary,"regular"),...words},footnote:{...text3(type.size.caption,color.text.muted,"regular"),...words},placeholder:{color:color.text.placeholder},pill:{flexDirection:"row",alignItems:"center",gap:space.xs,minHeight:50,paddingVertical:space.xs,paddingLeft:space.md,paddingRight:space.xs,borderRadius:radius.pill,borderWidth:1.5,borderColor:color.controlEdge,backgroundColor:color.surface,...slotBox(slots.input,1)},pillFocused:{borderWidth:1.5,borderColor:slots.input?.borderColor??color.brandInk},field:{flex:1,minWidth:0,minHeight:44,padding:0,...text3(type.size.body,color.text.primary,"regular"),...slotText(slots.input)},digits:{fontVariant:["tabular-nums"]},primary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,alignItems:"center",justifyContent:"center",backgroundColor:color.brand,...slotBox(slots.primaryButton)},primaryLabel:{...text3(type.size.caption,color.text.onBrand,"bold"),...slotText(slots.primaryButton)},dimmed:{opacity:.5},close:{width:44,height:44,alignItems:"center",justifyContent:"center"},closeBar:{position:"absolute",width:18,height:2,borderRadius:1,backgroundColor:color.text.muted},closeBarA:{transform:[{rotate:"45deg"}]},closeBarB:{transform:[{rotate:"-45deg"}]},links:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:space.md},link:{minHeight:44,justifyContent:"center"},linkLabel:{...text3(type.size.caption,color.linkInk,"bold"),...slotText(slots.link)},notice:{gap:space.xs},noticeText:{...text3(type.size.caption,color.errorRed,"regular"),...words}})}var ORIENTATIONS=["portrait","landscape"],OPEN=/* @__PURE__ */new Set(["offered","enrolling"]);function EverfurTextingPrompt({onResolved:onResolved}){let introOpen=useIntroOpen(),ask=useTextingAsk({surface:"prompt",ready:!introOpen}),theme=useEverfurTheme(),styles=useMemo(()=>makePromptStyles(theme),[theme]),entryStyles=useMemo(()=>makeAskStyles(theme,"center"),[theme]),shown=useRef(false),[resolved,setResolved]=useState(false);OPEN.has(ask.stage)&&(shown.current=true);let open=shown.current&&(OPEN.has(ask.stage)||ask.stage==="verified")&&!resolved&&!introOpen,finish=()=>{resolved||(ask.stage==="verified"?(setResolved(true),callHost(onResolved,"verified")):ask.dismiss())};if(useEffect(()=>{shown.current&&ask.stage==="dismissed"&&!resolved&&(setResolved(true),callHost(onResolved,"dismissed"))},[ask.stage,onResolved,resolved]),!open)return null;let title=ask.stage==="verified"?TEXTING_COPY.verifiedTitle:TEXTING_BRAND_COPY.promptTitle(ask.brand);/* @__PURE__ */
96
+ /* @__PURE__ */jsx(Pressable,{onPress:submit,disabled:busy,accessibilityRole:"button",accessibilityLabel:confirming?TEXTING_COPY.confirmingCode:TEXTING_COPY.confirmCode,accessibilityState:{disabled:busy,busy:confirming},style:[styles.primary,busy?styles.dimmed:null],testID:"texting-ask-confirm",children:/* @__PURE__ */jsx(Text,{tier:"control",style:styles.primaryLabel,children:confirming?TEXTING_COPY.confirmingCode:TEXTING_COPY.confirmCode})})]})]})}return null}function makeAskStyles(theme,align="auto"){let{color:color,radius:radius,space:space,type:type,slots:slots}=theme,text3=(size,ink,weight)=>({...face(theme,weight),fontSize:size,lineHeight:Math.round(size*type.lineHeight.snug),color:ink}),words={textAlign:align};return StyleSheet.create({root:{gap:space.sm,width:"100%"},head:{flexDirection:"row",alignItems:"flex-start",gap:space.sm},headBody:{flex:1,minWidth:0,gap:space.xs},consentRow:{flexDirection:"row",alignItems:"flex-start",gap:space.sm,minHeight:44},box:{width:24,height:24,borderRadius:radius.xs,borderWidth:2,borderColor:color.controlEdge,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},boxChecked:{backgroundColor:color.brand,borderColor:color.brandInk},tick:text3(type.size.caption,color.text.onBrand,"bold"),consentText:{...align==="center"?{flexShrink:1}:{flex:1},...text3(type.size.caption,color.text.secondary,"regular"),...words},body:{...text3(type.size.body,color.text.primary,"regular"),...words},footnote:{...text3(type.size.caption,color.text.muted,"regular"),...words},placeholder:{color:color.text.placeholder},pill:{flexDirection:"row",alignItems:"center",gap:space.xs,minHeight:50,paddingVertical:space.xs,paddingLeft:space.md,paddingRight:space.xs,borderRadius:radius.pill,borderWidth:1.5,borderColor:color.controlEdge,backgroundColor:color.surface,...slotBox(slots.input,1)},pillFocused:{borderWidth:1.5,borderColor:slots.input?.borderColor??color.brandInk},field:{flex:1,minWidth:0,minHeight:44,padding:0,...text3(type.size.body,color.text.primary,"regular"),...slotText(slots.input)},digits:{fontVariant:["tabular-nums"]},primary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,alignItems:"center",justifyContent:"center",backgroundColor:color.brand,...slotBox(slots.primaryButton)},primaryLabel:{...text3(type.size.caption,color.text.onBrand,"bold"),...slotText(slots.primaryButton)},dimmed:{opacity:.5},close:{width:44,height:44,alignItems:"center",justifyContent:"center"},closeBar:{position:"absolute",width:18,height:2,borderRadius:1,backgroundColor:color.text.muted},closeBarA:{transform:[{rotate:"45deg"}]},closeBarB:{transform:[{rotate:"-45deg"}]},links:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:space.md},link:{minHeight:44,justifyContent:"center"},linkLabel:{...text3(type.size.caption,color.linkInk,"bold"),...slotText(slots.link)},notice:{gap:space.xs},noticeText:{...text3(type.size.caption,color.errorRed,"regular"),...words}})}var ORIENTATIONS=["portrait","landscape"],OPEN=/* @__PURE__ */new Set(["offered","enrolling"]);function EverfurTextingPrompt({onResolved:onResolved,requested:requested=false}){let introOpen=useIntroOpen(),ask=useTextingAsk({surface:"prompt",ready:!introOpen,entry:requested});useTextingPromptRequest(ask,requested,useTextingGranted(),onResolved);let theme=useEverfurTheme(),styles=useMemo(()=>makePromptStyles(theme),[theme]),entryStyles=useMemo(()=>makeAskStyles(theme,"center"),[theme]),shown=useRef(false),[resolved,setResolved]=useState(false);OPEN.has(ask.stage)&&(shown.current=true);let open=shown.current&&(OPEN.has(ask.stage)||ask.stage==="verified")&&!resolved&&!introOpen,finish=()=>{resolved||(ask.stage==="verified"?(setResolved(true),callHost(onResolved,"verified")):ask.dismiss())};if(useEffect(()=>{shown.current&&ask.stage==="dismissed"&&!resolved&&(setResolved(true),callHost(onResolved,"dismissed"))},[ask.stage,onResolved,resolved]),!open)return null;let title=ask.stage==="verified"?TEXTING_COPY.verifiedTitle:TEXTING_BRAND_COPY.promptTitle(ask.brand);/* @__PURE__ */
97
97
  return jsx(Modal,{transparent:true,visible:true,animationType:theme.motion.reducedMotion?"none":"fade",statusBarTranslucent:true,supportedOrientations:ORIENTATIONS,onRequestClose:finish,children:/* @__PURE__ */jsxs(KeyboardAvoidingView,{behavior:Platform.OS==="ios"?"padding":"height",style:styles.backdrop,children:[
98
98
  /* @__PURE__ */jsx(Pressable,{style:ABSOLUTE_FILL,accessibilityRole:"button",accessibilityLabel:TEXTING_COPY.close,onPress:finish}),
99
99
  /* @__PURE__ */jsx(View,{style:styles.sheet,accessibilityViewIsModal:true,testID:"everfur-texting-prompt",children:/* @__PURE__ */jsxs(ScrollView,{style:styles.scroller,contentContainerStyle:styles.sheetBody,keyboardShouldPersistTaps:"handled",bounces:false,testID:"everfur-texting-prompt-scroll",children:[
@@ -3,12 +3,12 @@ import { ReactNode, CSSProperties } from 'react';
3
3
  import { a as CapabilityDecision } from './resolve.d-BTC3b6FW.cjs';
4
4
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
5
5
  import { P as PetRef } from './ids.d-B2GAAifq.cjs';
6
- import { H as HealthPlanItem } from './healthPlanRepository.d-fPbLceBr.cjs';
7
- import { H as HealthPlanBlanksFacts, a as HealthPlanEmptyCopy } from './usePresentation.d-DUHlQyV5.cjs';
8
- import { H as HealthPlanPriceFormat, a as HealthPlanLayoutProps } from './layout.d-ByfOEhpG.cjs';
9
- import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.cjs';
6
+ import { H as HealthPlanItem } from './healthPlanRepository.d-D6qYjNMQ.cjs';
7
+ import { H as HealthPlanBlanksFacts, a as HealthPlanEmptyCopy } from './usePresentation.d-BP8u0FS2.cjs';
8
+ import { H as HealthPlanPriceFormat, a as HealthPlanLayoutProps } from './layout.d-ChcRUbC4.cjs';
9
+ import { L as LifecyclePort } from './LifecyclePort.d-Cb9NtmP-.cjs';
10
10
  import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
11
- import { c as HealthPlanFocusDesign, d as HealthPlanFocusCopy, e as HealthPlanFocusClassNames, f as HealthPlanFocusIcon, g as HealthPlanSubscription, h as HealthPlanOneBoxOrder, i as HealthPlanSubscriptionRepository, j as HealthPlanPageRepository, k as HealthPlanShopOrder, l as HealthPlanCheckoutProvider } from './focus.d-B0qweva0.cjs';
11
+ import { c as HealthPlanFocusDesign, d as HealthPlanFocusCopy, e as HealthPlanFocusClassNames, f as HealthPlanFocusIcon, g as HealthPlanSubscription, h as HealthPlanOneBoxOrder, i as HealthPlanSubscriptionRepository, j as HealthPlanPageRepository, k as HealthPlanShopOrder, l as HealthPlanCheckoutProvider } from './focus.d-BkPLN-2r.cjs';
12
12
  import { i as EverfurPresentationInput } from './presentation.d-tJe7zo12.cjs';
13
13
  import { a as EverfurChatTopCard$1, b as EverfurChatOpeningCard$1 } from './threadOptions.d-CW51PyVd.cjs';
14
14
 
@@ -3,12 +3,12 @@ import { ReactNode, CSSProperties } from 'react';
3
3
  import { a as CapabilityDecision } from './resolve.d-BTC3b6FW.js';
4
4
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
5
5
  import { P as PetRef } from './ids.d-B2GAAifq.js';
6
- import { H as HealthPlanItem } from './healthPlanRepository.d-CdCyUWph.js';
7
- import { H as HealthPlanBlanksFacts, a as HealthPlanEmptyCopy } from './usePresentation.d-CoyGEJOl.js';
8
- import { H as HealthPlanPriceFormat, a as HealthPlanLayoutProps } from './layout.d-D3d4QMeO.js';
9
- import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.js';
6
+ import { H as HealthPlanItem } from './healthPlanRepository.d-CuumbPDh.js';
7
+ import { H as HealthPlanBlanksFacts, a as HealthPlanEmptyCopy } from './usePresentation.d-j0xDpOoe.js';
8
+ import { H as HealthPlanPriceFormat, a as HealthPlanLayoutProps } from './layout.d-C8UKQW3I.js';
9
+ import { L as LifecyclePort } from './LifecyclePort.d-Cb9NtmP-.js';
10
10
  import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
11
- import { c as HealthPlanFocusDesign, d as HealthPlanFocusCopy, e as HealthPlanFocusClassNames, f as HealthPlanFocusIcon, g as HealthPlanSubscription, h as HealthPlanOneBoxOrder, i as HealthPlanSubscriptionRepository, j as HealthPlanPageRepository, k as HealthPlanShopOrder, l as HealthPlanCheckoutProvider } from './focus.d-7G0BBmA9.js';
11
+ import { c as HealthPlanFocusDesign, d as HealthPlanFocusCopy, e as HealthPlanFocusClassNames, f as HealthPlanFocusIcon, g as HealthPlanSubscription, h as HealthPlanOneBoxOrder, i as HealthPlanSubscriptionRepository, j as HealthPlanPageRepository, k as HealthPlanShopOrder, l as HealthPlanCheckoutProvider } from './focus.d-_6rD03Ap.js';
12
12
  import { i as EverfurPresentationInput } from './presentation.d-tJe7zo12.js';
13
13
  import { a as EverfurChatTopCard$1, b as EverfurChatOpeningCard$1 } from './threadOptions.d-CW51PyVd.js';
14
14
 
@@ -1,5 +1,5 @@
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 { p as RecordsTimelineView } from './depth.d-C_HL8yAz.js';
2
+ import { p as RecordsTimelineView } from './depth.d-DFsi6qtf.js';
3
3
 
4
4
  type TimelineRowKind = 'visit' | 'vaccine' | 'weight' | 'medication';
5
5
  interface TimelineRow {
@@ -1,5 +1,5 @@
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 { p as RecordsTimelineView } from './depth.d-De5pT7vA.cjs';
2
+ import { p as RecordsTimelineView } from './depth.d-DFPfFTPF.cjs';
3
3
 
4
4
  type TimelineRowKind = 'visit' | 'vaccine' | 'weight' | 'medication';
5
5
  interface TimelineRow {
@@ -462,6 +462,8 @@ interface EverfurThemeMeta {
462
462
  readonly logoUrl: string | null;
463
463
  /** Server-overridable composer placeholder (chat_placeholder/placeholder); null keeps Everfur's neutral default. */
464
464
  readonly placeholder: string | null;
465
+ /** True when `placeholder` is a partner config v3 line, whose `{pet}` the composer fills. Absent: drawn whole. */
466
+ readonly placeholderFillsPet?: boolean;
465
467
  /** White-label switch (hide_powered_by): drop the "powered by everfur" attribution. Default false (shown). */
466
468
  readonly hidePoweredBy: boolean;
467
469
  /**
@@ -462,6 +462,8 @@ interface EverfurThemeMeta {
462
462
  readonly logoUrl: string | null;
463
463
  /** Server-overridable composer placeholder (chat_placeholder/placeholder); null keeps Everfur's neutral default. */
464
464
  readonly placeholder: string | null;
465
+ /** True when `placeholder` is a partner config v3 line, whose `{pet}` the composer fills. Absent: drawn whole. */
466
+ readonly placeholderFillsPet?: boolean;
465
467
  /** White-label switch (hide_powered_by): drop the "powered by everfur" attribution. Default false (shown). */
466
468
  readonly hidePoweredBy: boolean;
467
469
  /**
@@ -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 { C as ClientBranding, E as EverfurThemeInput } from './branding.d-eGlNC86j.cjs';
3
- import { n as EverfurTheme, d as EverfurFontWeight, a as EverfurFontFaceKey, t as EverfurTypeRole } from './tokens.d-DH1mYjZl.cjs';
2
+ import { C as ClientBranding, E as EverfurThemeInput } from './branding.d-KOXyiUqX.cjs';
3
+ import { n as EverfurTheme, d as EverfurFontWeight, a as EverfurFontFaceKey, t as EverfurTypeRole } from './tokens.d-DxM-tKjz.cjs';
4
4
 
5
5
  /** One partner input the contrast guard adjusted. */
6
6
  interface EverfurThemeAdjustment {
@@ -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 { C as ClientBranding, E as EverfurThemeInput } from './branding.d-SCzhpyTt.js';
3
- import { n as EverfurTheme, d as EverfurFontWeight, a as EverfurFontFaceKey, t as EverfurTypeRole } from './tokens.d-DH1mYjZl.js';
2
+ import { C as ClientBranding, E as EverfurThemeInput } from './branding.d-CNeG_CY3.js';
3
+ import { n as EverfurTheme, d as EverfurFontWeight, a as EverfurFontFaceKey, t as EverfurTypeRole } from './tokens.d-DxM-tKjz.js';
4
4
 
5
5
  /** One partner input the contrast guard adjusted. */
6
6
  interface EverfurThemeAdjustment {
@@ -1,11 +1,11 @@
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 { f as HealthPlanFocusIcon, m as HealthPlanFocusPrices, c as HealthPlanFocusDesign, n as HealthPlanFocusExtra, o as HealthPlanFocusWait, j as HealthPlanPageRepository, H as HealthPlanPage, i as HealthPlanSubscriptionRepository, p as HealthPlanSubscriptionQuote, g as HealthPlanSubscription, h as HealthPlanOneBoxOrder } from './focus.d-B0qweva0.cjs';
3
- import { H as HealthPlanItem, a as HealthPlan, b as HealthPlanRepository } from './healthPlanRepository.d-fPbLceBr.cjs';
2
+ import { f as HealthPlanFocusIcon, m as HealthPlanFocusPrices, c as HealthPlanFocusDesign, n as HealthPlanFocusExtra, o as HealthPlanFocusWait, j as HealthPlanPageRepository, H as HealthPlanPage, i as HealthPlanSubscriptionRepository, p as HealthPlanSubscriptionQuote, g as HealthPlanSubscription, h as HealthPlanOneBoxOrder } from './focus.d-BkPLN-2r.cjs';
3
+ import { H as HealthPlanItem, a as HealthPlan, b as HealthPlanRepository } from './healthPlanRepository.d-D6qYjNMQ.cjs';
4
4
  import { ReactNode } from 'react';
5
5
  import { P as PetRef } from './ids.d-B2GAAifq.cjs';
6
- import { b as HealthPlanCart } from './layout.d-ByfOEhpG.cjs';
6
+ import { b as HealthPlanCart } from './layout.d-ChcRUbC4.cjs';
7
7
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
8
- import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.cjs';
8
+ import { L as LifecyclePort } from './LifecyclePort.d-Cb9NtmP-.cjs';
9
9
  import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
10
10
 
11
11
  /**
@@ -1,11 +1,11 @@
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 { f as HealthPlanFocusIcon, m as HealthPlanFocusPrices, c as HealthPlanFocusDesign, n as HealthPlanFocusExtra, o as HealthPlanFocusWait, j as HealthPlanPageRepository, H as HealthPlanPage, i as HealthPlanSubscriptionRepository, p as HealthPlanSubscriptionQuote, g as HealthPlanSubscription, h as HealthPlanOneBoxOrder } from './focus.d-7G0BBmA9.js';
3
- import { H as HealthPlanItem, a as HealthPlan, b as HealthPlanRepository } from './healthPlanRepository.d-CdCyUWph.js';
2
+ import { f as HealthPlanFocusIcon, m as HealthPlanFocusPrices, c as HealthPlanFocusDesign, n as HealthPlanFocusExtra, o as HealthPlanFocusWait, j as HealthPlanPageRepository, H as HealthPlanPage, i as HealthPlanSubscriptionRepository, p as HealthPlanSubscriptionQuote, g as HealthPlanSubscription, h as HealthPlanOneBoxOrder } from './focus.d-_6rD03Ap.js';
3
+ import { H as HealthPlanItem, a as HealthPlan, b as HealthPlanRepository } from './healthPlanRepository.d-CuumbPDh.js';
4
4
  import { ReactNode } from 'react';
5
5
  import { P as PetRef } from './ids.d-B2GAAifq.js';
6
- import { b as HealthPlanCart } from './layout.d-D3d4QMeO.js';
6
+ import { b as HealthPlanCart } from './layout.d-C8UKQW3I.js';
7
7
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
8
- import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.js';
8
+ import { L as LifecyclePort } from './LifecyclePort.d-Cb9NtmP-.js';
9
9
  import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
10
10
 
11
11
  /**
@@ -1,9 +1,9 @@
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 EverfurResult } from './EverfurResult.d-D_-254ZY.js';
3
3
  import { P as PetRef } from './ids.d-B2GAAifq.js';
4
- import { E as EverfurInboxItem, b as EverfurInboxOpen, a as EverfurInboxClient } from './inbox.d-CuuPTWyW.js';
4
+ import { E as EverfurInboxItem, b as EverfurInboxOpen, a as EverfurInboxClient } from './inbox.d-B6kD0a9r.js';
5
5
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
6
- import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.js';
6
+ import { L as LifecyclePort } from './LifecyclePort.d-Cb9NtmP-.js';
7
7
 
8
8
  /** The words of the inbox. Every key is a plain string. */
9
9
  interface EverfurInboxCopy {
@@ -1,9 +1,9 @@
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 EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
3
3
  import { P as PetRef } from './ids.d-B2GAAifq.cjs';
4
- import { E as EverfurInboxItem, b as EverfurInboxOpen, a as EverfurInboxClient } from './inbox.d-ChNXTovj.cjs';
4
+ import { E as EverfurInboxItem, b as EverfurInboxOpen, a as EverfurInboxClient } from './inbox.d-CzIVX_ji.cjs';
5
5
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
6
- import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.cjs';
6
+ import { L as LifecyclePort } from './LifecyclePort.d-Cb9NtmP-.cjs';
7
7
 
8
8
  /** The words of the inbox. Every key is a plain string. */
9
9
  interface EverfurInboxCopy {
@@ -1,8 +1,8 @@
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 { c as HealthPlanReasonKind } from './healthPlanRepository.d-fPbLceBr.cjs';
2
+ import { c as HealthPlanReasonKind } from './healthPlanRepository.d-D6qYjNMQ.cjs';
3
3
  import { e as RecordsRequestView, g as RecordsView } from './models.d-BN53M9sU.cjs';
4
4
  import { ReactNode } from 'react';
5
- import { b as HealthPlanPagePet, c as HealthPlanFocusDesign, H as HealthPlanPage } from './focus.d-B0qweva0.cjs';
5
+ import { b as HealthPlanPagePet, c as HealthPlanFocusDesign, H as HealthPlanPage } from './focus.d-BkPLN-2r.cjs';
6
6
  import { c as EverfurChatTopCardRow, a as EverfurChatTopCard } from './threadOptions.d-CW51PyVd.cjs';
7
7
  import { i as EverfurPresentationInput, h as EverfurPresentation } from './presentation.d-tJe7zo12.cjs';
8
8
 
@@ -1,8 +1,8 @@
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 { c as HealthPlanReasonKind } from './healthPlanRepository.d-CdCyUWph.js';
2
+ import { c as HealthPlanReasonKind } from './healthPlanRepository.d-CuumbPDh.js';
3
3
  import { e as RecordsRequestView, g as RecordsView } from './models.d-Bhq9p6Wa.js';
4
4
  import { ReactNode } from 'react';
5
- import { b as HealthPlanPagePet, c as HealthPlanFocusDesign, H as HealthPlanPage } from './focus.d-7G0BBmA9.js';
5
+ import { b as HealthPlanPagePet, c as HealthPlanFocusDesign, H as HealthPlanPage } from './focus.d-_6rD03Ap.js';
6
6
  import { c as EverfurChatTopCardRow, a as EverfurChatTopCard } from './threadOptions.d-CW51PyVd.js';
7
7
  import { i as EverfurPresentationInput, h as EverfurPresentation } from './presentation.d-tJe7zo12.js';
8
8
 
@@ -2,7 +2,7 @@
2
2
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
3
3
  import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
4
4
  import { P as PetRef } from './ids.d-B2GAAifq.js';
5
- import { l as RecordsDepthClient } from './depth.d-C_HL8yAz.js';
5
+ import { l as RecordsDepthClient } from './depth.d-DFsi6qtf.js';
6
6
 
7
7
  type RecordsDepthStatus = 'loading' | 'empty' | 'error' | 'populated';
8
8
  /** One depth read as a render state. `withheld` (no consent, or a fail-closed parse) renders nothing. */
@@ -2,7 +2,7 @@
2
2
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
3
3
  import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
4
4
  import { P as PetRef } from './ids.d-B2GAAifq.cjs';
5
- import { l as RecordsDepthClient } from './depth.d-De5pT7vA.cjs';
5
+ import { l as RecordsDepthClient } from './depth.d-DFPfFTPF.cjs';
6
6
 
7
7
  type RecordsDepthStatus = 'loading' | 'empty' | 'error' | 'populated';
8
8
  /** One depth read as a render state. `withheld` (no consent, or a fail-closed parse) renders nothing. */