@everfur/sdk 0.9.0 → 0.9.1

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 (169) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +1 -1
  3. package/dist/{Chat-ClhB_8sp.d.ts → Chat-BoVmqEeF.d.ts} +3 -3
  4. package/dist/{Chat-Cb3Y8VwS.d.cts → Chat-DbHkTbqz.d.cts} +3 -3
  5. package/dist/{DepthViews-CSCS-tZg.d.ts → DepthViews-BzwflaJ3.d.ts} +1 -1
  6. package/dist/{DepthViews-CW1z8pnl.d.cts → DepthViews-Chyp69Ue.d.cts} +1 -1
  7. package/dist/{DepthViews-DDiPxyzg.d.cts → DepthViews-DK7EJ6Hp.d.cts} +1 -1
  8. package/dist/{DepthViews-BSkuUGBB.d.ts → DepthViews-yO1H371y.d.ts} +1 -1
  9. package/dist/{ErrorPolicyPort-NFDPe-5w.d.cts → ErrorPolicyPort-10s3HJCt.d.cts} +1 -1
  10. package/dist/{ErrorPolicyPort-DwSnmGcX.d.ts → ErrorPolicyPort-C3nNSS_j.d.ts} +1 -1
  11. package/dist/{EverfurError-pEXDbUJ1.d.cts → EverfurError-DeBqRpQV.d.cts} +1 -1
  12. package/dist/{EverfurError-pEXDbUJ1.d.ts → EverfurError-DeBqRpQV.d.ts} +1 -1
  13. package/dist/{EverfurResult-dtl8ERAw.d.cts → EverfurResult-COlXj1wq.d.cts} +1 -1
  14. package/dist/{EverfurResult-sKkoXew0.d.ts → EverfurResult-ClPTS0P2.d.ts} +1 -1
  15. package/dist/{IntakeMedia-BFZfBLjB.d.cts → IntakeMedia-B-_vA9ZB.d.cts} +2 -1
  16. package/dist/{IntakeMedia-C8GlN_GK.d.ts → IntakeMedia-CIoTXAWs.d.ts} +2 -1
  17. package/dist/animations/index.cjs +1 -1
  18. package/dist/animations/index.d.cts +6 -6
  19. package/dist/animations/index.d.ts +6 -6
  20. package/dist/animations/index.js +1 -1
  21. package/dist/{attachments-BD70jZZL.d.cts → attachments-B7TrtyfH.d.cts} +3 -3
  22. package/dist/{attachments-CC7aHpwZ.d.ts → attachments-BmMrn9tU.d.ts} +7 -7
  23. package/dist/{attachments-DAUy3vPR.d.ts → attachments-Dcb19rMP.d.ts} +3 -3
  24. package/dist/{attachments-DaOaIBNf.d.cts → attachments-Dnpqk1Gl.d.cts} +7 -7
  25. package/dist/{bookingCopy-oEjqkiNA.d.cts → bookingCopy-C153FHEC.d.cts} +7 -6
  26. package/dist/{bookingCopy-CUW9Gdzc.d.ts → bookingCopy-DR0-SmqH.d.ts} +7 -6
  27. package/dist/{branding-ctD0B2Th.d.cts → branding-BCfwLj0h.d.cts} +1 -1
  28. package/dist/{branding-aGleD_ki.d.ts → branding-DJf4h12Q.d.ts} +1 -1
  29. package/dist/{callRoom-B1qq_D-4.d.ts → callRoom-B92eH_ij.d.ts} +1 -1
  30. package/dist/{callRoom-DfZTWFXh.d.cts → callRoom-BhIdadyV.d.cts} +1 -1
  31. package/dist/{casesRepository-CywqL6mj.d.ts → casesRepository-BXdwCWQF.d.ts} +2 -2
  32. package/dist/{casesRepository-Bzs7aw4t.d.cts → casesRepository-DC9lEQez.d.cts} +2 -2
  33. package/dist/chat/index.cjs +9 -9
  34. package/dist/chat/index.d.cts +12 -12
  35. package/dist/chat/index.d.ts +12 -12
  36. package/dist/chat/index.js +9 -9
  37. package/dist/client/index.cjs +4 -4
  38. package/dist/client/index.d.cts +14 -14
  39. package/dist/client/index.d.ts +14 -14
  40. package/dist/client/index.js +4 -4
  41. package/dist/{config-EZzEyS-c.d.cts → config-BRyNmzhx.d.cts} +3 -3
  42. package/dist/{config-BysLVhku.d.ts → config-DdK2czhD.d.ts} +3 -3
  43. package/dist/consent/index.cjs +2 -2
  44. package/dist/consent/index.d.cts +9 -9
  45. package/dist/consent/index.d.ts +9 -9
  46. package/dist/consent/index.js +2 -2
  47. package/dist/{context-DpfgbnOU.d.ts → context-_EyjBNKI.d.ts} +9 -9
  48. package/dist/{context-DUwYArkM.d.cts → context-jaONuHXM.d.cts} +9 -9
  49. package/dist/{copy-LxZGnFXJ.d.ts → copy-BJpRsqK-.d.ts} +5 -5
  50. package/dist/{copy-DK4r9oGz.d.cts → copy-D8iSBQE6.d.cts} +5 -5
  51. package/dist/core/index.cjs +4 -4
  52. package/dist/core/index.d.cts +19 -19
  53. package/dist/core/index.d.ts +19 -19
  54. package/dist/core/index.js +4 -4
  55. package/dist/{depth-DAd77kRe.d.cts → depth-DJ1KGMww.d.cts} +6 -6
  56. package/dist/{depth-Mk7quUNa.d.ts → depth-bKpg3L9r.d.ts} +6 -6
  57. package/dist/{entitlementRepository-Dra_4FU_.d.cts → entitlementRepository-4x_tBE73.d.cts} +4 -4
  58. package/dist/{entitlementRepository-CrD0O7VR.d.ts → entitlementRepository-CojBLazH.d.ts} +4 -4
  59. package/dist/{identity-BiyMDMrR.d.ts → identity-A8fVB518.d.ts} +2 -2
  60. package/dist/{identity-75whJXyP.d.cts → identity-CmxZ4GR0.d.cts} +2 -2
  61. package/dist/index.cjs +14 -14
  62. package/dist/index.d.cts +19 -19
  63. package/dist/index.d.ts +19 -19
  64. package/dist/index.js +14 -14
  65. package/dist/{models-DzvqEjMm.d.cts → models-A4A5S7AG.d.cts} +1 -1
  66. package/dist/{models-CrbUwbuS.d.ts → models-CnXY5LuO.d.ts} +1 -1
  67. package/dist/notifications/index.cjs +1 -1
  68. package/dist/notifications/index.d.cts +5 -5
  69. package/dist/notifications/index.d.ts +5 -5
  70. package/dist/notifications/index.js +1 -1
  71. package/dist/{pets-DoXxTw4x.d.cts → pets-DjBlY7yg.d.cts} +2 -2
  72. package/dist/{pets-W2BuLYko.d.ts → pets-e5RjSP6O.d.ts} +2 -2
  73. package/dist/{petsRepository-ByMzq1Z9.d.ts → petsRepository-CQh8paML.d.ts} +2 -2
  74. package/dist/{petsRepository-yyoo0k2I.d.cts → petsRepository-DkQ2fwZY.d.cts} +2 -2
  75. package/dist/photo/index.cjs +1 -1
  76. package/dist/photo/index.d.cts +3 -3
  77. package/dist/photo/index.d.ts +3 -3
  78. package/dist/photo/index.js +1 -1
  79. package/dist/{ports-BeVJYP0_.d.cts → ports-2voZkqty.d.cts} +7 -7
  80. package/dist/{ports-zYl8S_lI.d.ts → ports-CzVBbI_A.d.ts} +7 -7
  81. package/dist/records/depth/index.cjs +1 -1
  82. package/dist/records/depth/index.d.cts +11 -11
  83. package/dist/records/depth/index.d.ts +11 -11
  84. package/dist/records/depth/index.js +1 -1
  85. package/dist/records/index.cjs +5 -5
  86. package/dist/records/index.d.cts +14 -14
  87. package/dist/records/index.d.ts +14 -14
  88. package/dist/records/index.js +5 -5
  89. package/dist/{requestFunnel-DHeSzCT6.d.cts → requestFunnel-CA0ANsWj.d.cts} +5 -5
  90. package/dist/{requestFunnel-BPeBZdKp.d.ts → requestFunnel-CQ42Kf9G.d.ts} +5 -5
  91. package/dist/{runtimeTypes-DgMizQKz.d.cts → runtimeTypes-BxtQXaYi.d.cts} +7 -7
  92. package/dist/{runtimeTypes-Cc207nbn.d.ts → runtimeTypes-C0tI7s-V.d.ts} +7 -7
  93. package/dist/server/events/index.cjs +2 -2
  94. package/dist/server/events/index.d.cts +4 -4
  95. package/dist/server/events/index.d.ts +4 -4
  96. package/dist/server/events/index.js +2 -2
  97. package/dist/server/index.cjs +2 -2
  98. package/dist/server/index.d.cts +5 -5
  99. package/dist/server/index.d.ts +5 -5
  100. package/dist/server/index.js +2 -2
  101. package/dist/televet/booking/index.cjs +9 -8
  102. package/dist/televet/booking/index.d.cts +12 -12
  103. package/dist/televet/booking/index.d.ts +12 -12
  104. package/dist/televet/booking/index.js +9 -8
  105. package/dist/televet/call/index.d.cts +2 -2
  106. package/dist/televet/call/index.d.ts +2 -2
  107. package/dist/televet/index.cjs +2 -2
  108. package/dist/televet/index.d.cts +7 -7
  109. package/dist/televet/index.d.ts +7 -7
  110. package/dist/televet/index.js +2 -2
  111. package/dist/testing/index.cjs +2 -2
  112. package/dist/testing/index.d.cts +3 -3
  113. package/dist/testing/index.d.ts +3 -3
  114. package/dist/testing/index.js +2 -2
  115. package/dist/testing/rn/index.cjs +2 -2
  116. package/dist/testing/rn/index.d.cts +13 -13
  117. package/dist/testing/rn/index.d.ts +13 -13
  118. package/dist/testing/rn/index.js +2 -2
  119. package/dist/testing/web/index.cjs +1 -1
  120. package/dist/testing/web/index.d.cts +14 -14
  121. package/dist/testing/web/index.d.ts +14 -14
  122. package/dist/testing/web/index.js +1 -1
  123. package/dist/{timelineRows-D22vGN9t.d.ts → timelineRows-GSpzKLla.d.ts} +1 -1
  124. package/dist/{timelineRows-DUQIWSjc.d.cts → timelineRows-WFv_3EOi.d.cts} +1 -1
  125. package/dist/{tokens-RAKZj7M8.d.cts → tokens-DLj8OnLH.d.cts} +4 -2
  126. package/dist/{tokens-RAKZj7M8.d.ts → tokens-DLj8OnLH.d.ts} +4 -2
  127. package/dist/{typeStyle-DVj8iCC1.d.ts → typeStyle-BxVyF71R.d.ts} +2 -2
  128. package/dist/{typeStyle-Nt7w0rhE.d.cts → typeStyle-DJedEu14.d.cts} +2 -2
  129. package/dist/{useRecordsDepth-Mbysp548.d.cts → useRecordsDepth-BL5Pf3oK.d.cts} +4 -4
  130. package/dist/{useRecordsDepth-C0Qfoghi.d.ts → useRecordsDepth-BQF0Zynl.d.ts} +4 -4
  131. package/dist/{useVetVisit-RPBOabl8.d.ts → useVetVisit-DmWa7lt1.d.ts} +2 -2
  132. package/dist/{useVetVisit-BQX_aTJs.d.cts → useVetVisit-PtBjNwZr.d.cts} +2 -2
  133. package/dist/video/index.cjs +1 -1
  134. package/dist/video/index.d.cts +3 -3
  135. package/dist/video/index.d.ts +3 -3
  136. package/dist/video/index.js +1 -1
  137. package/dist/{view-CskIgOFV.d.cts → view-D3kOelPL.d.cts} +5 -5
  138. package/dist/{view-DqKXtxEZ.d.ts → view-rgB1iqWO.d.ts} +5 -5
  139. package/dist/web/consent/index.cjs +2 -2
  140. package/dist/web/consent/index.d.cts +9 -9
  141. package/dist/web/consent/index.d.ts +9 -9
  142. package/dist/web/consent/index.js +2 -2
  143. package/dist/web/index.cjs +10 -10
  144. package/dist/web/index.d.cts +22 -22
  145. package/dist/web/index.d.ts +22 -22
  146. package/dist/web/index.js +10 -10
  147. package/dist/web/notifications/index.cjs +1 -1
  148. package/dist/web/notifications/index.d.cts +7 -7
  149. package/dist/web/notifications/index.d.ts +7 -7
  150. package/dist/web/notifications/index.js +1 -1
  151. package/dist/web/records/depth/index.cjs +1 -1
  152. package/dist/web/records/depth/index.d.cts +11 -11
  153. package/dist/web/records/depth/index.d.ts +11 -11
  154. package/dist/web/records/depth/index.js +1 -1
  155. package/dist/web/records/index.cjs +4 -3
  156. package/dist/web/records/index.d.cts +15 -15
  157. package/dist/web/records/index.d.ts +15 -15
  158. package/dist/web/records/index.js +4 -3
  159. package/dist/web/televet/booking/index.cjs +5 -5
  160. package/dist/web/televet/booking/index.d.cts +14 -11
  161. package/dist/web/televet/booking/index.d.ts +14 -11
  162. package/dist/web/televet/booking/index.js +5 -5
  163. package/dist/web/televet/call/index.d.cts +2 -2
  164. package/dist/web/televet/call/index.d.ts +2 -2
  165. package/dist/web/televet/index.cjs +1 -1
  166. package/dist/web/televet/index.d.cts +5 -5
  167. package/dist/web/televet/index.d.ts +5 -5
  168. package/dist/web/televet/index.js +1 -1
  169. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  "use strict";var react=require("react"),zod=require("zod"),jsxRuntime=require("react/jsx-runtime");function assertNever(x){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(x)}`)}function errorFrame(fields){/* @__PURE__ */
3
- return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fields.retryable,wireMessage:fields.wireMessage,synthesized:fields.synthesized,lastEventId:fields.lastEventId,serverRequestId:null})}function reportHostFailure(error){let globalConsole=globalThis.console;try{globalConsole?.error?.("[everfur] A host callback threw; the SDK ignored it.",error)}catch{}}function isThenable(value){return(typeof value=="object"||typeof value=="function")&&value!==null&&typeof value.then=="function"}function callHost(fn,...args){if(typeof fn=="function")try{let result=fn(...args);return isThenable(result)&&Promise.resolve(result).then(void 0,reportHostFailure),result}catch(error){reportHostFailure(error);return}}var GUARDED=/* @__PURE__ */new WeakMap;function guardHost(fn){if(typeof fn!="function")return;let cached=GUARDED.get(fn);if(cached!==void 0)return cached;let guarded=(...args)=>{callHost(fn,...args)};return GUARDED.set(fn,guarded),guarded}function guardHostProps(props,names){let guarded=null;for(let name of names){let fn=props[name];typeof fn=="function"&&(guarded??={...props},guarded[name]=guardHost(fn))}return guarded??props}function callHostAsync(fn,...args){let started;try{started=fn(...args)}catch(error){return reportHostFailure(error),Promise.resolve({ok:false,error:error})}return Promise.resolve(started).then(value=>({ok:true,value:value}),error=>({ok:false,error:error}))}var DRAFT=s=>s,PLACEHOLDER_MARKERS=["[PLACEHOLDER","[PLAN NAME]","[LINK]","[Last]","TODO","TBD"];function isPlaceholderCopy(value){return PLACEHOLDER_MARKERS.some(m=>value.toUpperCase().includes(m.toUpperCase()))}function fill(template,slots){let out=template;for(let[key,value]of Object.entries(slots))out=out.split(`{${key}}`).join(value);return out}var TELEVET_BOOKING_COPY=/* @__PURE__ */Object.freeze({stateBlockedTitle:DRAFT("Not available in this state yet"),noCliniciansTitle:DRAFT("No vets available right now"),noCliniciansBody:DRAFT("Nobody is free in your area at the moment. This changes through the day."),noCliniciansRetryCta:DRAFT("Check again"),noCliniciansRegionBody:DRAFT("Video visits have to be with a vet licensed in your state, and we don’t have one there yet."),yourVetTitle:DRAFT("Your vet"),licensedPillTemplate:DRAFT("Licensed in {state}"),reviewsLabel:DRAFT("reviews"),rescheduleFromTemplate:DRAFT("Moving your visit on {when}"),rescheduleFailed:DRAFT("That did not move. Your original time is unchanged."),rescheduleStepLabel:DRAFT("Reschedule"),rescheduleTitleTemplate:DRAFT("Pick a new time for {pet}"),rescheduleNowLabel:DRAFT("Now"),rescheduleMoveTemplate:DRAFT("Move to {when}"),rescheduleMoving:DRAFT("Moving…"),rescheduleKeepLabel:DRAFT("Keep the visit as it is"),keepExistingCta:DRAFT("Keep my current time"),bookingPausedTitle:DRAFT("Booking is not available right now."),slotsErrorTitle:DRAFT("Could not load times"),noSlotsTitle:DRAFT("No times available"),nextOpeningTemplate:DRAFT("Next opening across our vets: {when}"),seeOtherVetsCta:DRAFT("See other vets"),retryCta:DRAFT("Try again"),holdExpired:DRAFT("That time is no longer held. Pick another."),slotTaken:DRAFT("That time was just taken. Pick another."),reasonPlaceholder:DRAFT("What is going on with your pet?"),reasonTooLong:DRAFT("That is too long. Please shorten it."),shareRecordsOff:DRAFT("Share health records with this vet"),confirmNotEntitled:DRAFT("A Pro membership is needed to book a video visit."),confirmFailed:DRAFT("That did not book. Try again."),checkAvailabilityCta:DRAFT("Check availability"),stateInterest:/* @__PURE__ */Object.freeze({cta:DRAFT("Add me to the list"),submitting:DRAFT("Adding you to the list…"),joinedTitle:DRAFT("You are on the list"),joinedBody:DRAFT("We will let you know when this changes."),failed:DRAFT("That did not save. Try again.")}),media:/* @__PURE__ */Object.freeze({droppedTemplate:DRAFT("{n} attachment did not upload."),droppedPluralTemplate:DRAFT("{n} attachments did not upload."),refusedSizeTemplate:DRAFT("{n} attachment was too large to send."),refusedSizePluralTemplate:DRAFT("{n} attachments were too large to send."),refusedTypeTemplate:DRAFT("{n} attachment is a file type that cannot be sent."),refusedTypePluralTemplate:DRAFT("{n} attachments are file types that cannot be sent."),refusedUnreadableTemplate:DRAFT("{n} attachment could not be read."),refusedUnreadablePluralTemplate:DRAFT("{n} attachments could not be read.")}),navTitle:DRAFT("Book a visit"),petFallback:"your pet",whereTitleTemplate:DRAFT("Where will {pet} be during the visit?"),whereLeadTemplate:DRAFT("Pick where {pronoun} be for the call, not where you live. It decides what the vet can do."),wherePronounFallback:"they’ll",whereFormLabelTemplate:DRAFT("Where {pet} will be"),whereLegend:DRAFT("State"),wherePrescribeMetaTemplate:DRAFT("Video visit, and prescriptions if {pet} needs them"),whereWellnessMeta:DRAFT("Wellness visit: advice and a care plan, no prescriptions yet"),whereAnotherState:DRAFT("Another state"),whereWhichState:DRAFT("Which state?"),whereLicensedTemplate:DRAFT("{vet} is licensed in {state}, so a prescription can be part of {pet}’s plan."),whereAskEveryTime:DRAFT("We ask every time: state rules require it."),issuesTitleTemplate:DRAFT("What’s going on with {pet}?"),issuesHint:DRAFT("Pick as many as you like."),issuesFormLabel:DRAFT("What’s going on"),issuesLegend:DRAFT("Main issues"),issuesPickOne:DRAFT("Pick at least one. Not sure? Choose Something else."),otherIssue:DRAFT("Something else"),describeHeadingTemplate:DRAFT("Tell {vet} what you’re seeing"),describeFieldLabel:DRAFT("What you’re seeing"),emergencyCheck:/* @__PURE__ */Object.freeze({titleTemplate:DRAFT("Is {pet} doing any of these right now?"),lead:DRAFT("A scheduled video visit isn’t the right place for an emergency."),signs:/* @__PURE__ */Object.freeze([DRAFT("Trouble breathing, or blue, grey or very pale gums"),DRAFT("Collapsed, or can’t stand up"),DRAFT("A seizure"),DRAFT("Ate something toxic, like grapes, chocolate, xylitol or medicine"),DRAFT("A swollen, hard belly, or retching with nothing coming up"),DRAFT("Bleeding that won’t stop"),DRAFT("Straining to pee with nothing coming out")]),formLabel:DRAFT("Emergency check"),legend:DRAFT("Any of these now?"),noneCta:DRAFT("No, none of these"),someCta:DRAFT("Yes, at least one")}),timeHeading:DRAFT("Pick a time"),timeMorning:DRAFT("Morning"),timeAfternoon:DRAFT("Afternoon"),timeEvening:DRAFT("Evening"),timeLegendTemplate:DRAFT("Time on {day}"),dayLegend:DRAFT("Day"),reviewHeading:DRAFT("Does this look right?"),summaryWhere:DRAFT("Where"),changeCta:DRAFT("Change"),whereAttestTemplate:DRAFT("{pet} and I will be in {state} during the visit."),attestBoth:DRAFT("Check both boxes to book the visit."),bookedStepLabel:DRAFT("Booked"),bookedTitleTemplate:DRAFT("You’re booked with {vet}"),bookedLeadTemplate:DRAFT("{when}, for {pet}."),footnote:DRAFT("Video visits are with a licensed veterinarian. Prescriptions where allowed, starting with California. In an emergency, go to the nearest emergency animal hospital."),rescheduleNavTitle:DRAFT("Change your visit"),close:DRAFT("Close"),continueCta:DRAFT("Continue"),petSelectTitle:DRAFT("Who is this visit for?"),addPetCta:DRAFT("Add a pet"),addAnotherPetCta:DRAFT("Add another pet"),locationUnknownTitle:DRAFT("We need your location to find a vet"),locationUnknownBody:DRAFT("Turn on location for Everfur, then try again."),locationUnknownCta:DRAFT("Allow location"),locationBlockedTitle:DRAFT("Location is turned off"),locationBlockedBody:DRAFT("Everfur needs your location to match you with a vet in your area."),locationBlockedCta:DRAFT("Open Settings"),locationUnavailableTitle:DRAFT("We could not read your location"),locationUnavailableBody:DRAFT("Try again in a moment."),stateAttestTemplate:DRAFT("I confirm my pet and I are in {state} right now."),describeHeading:DRAFT("Tell the vet what you are seeing"),describeHelpLong:DRAFT("When it started, what’s changed, what you’ve tried. Anything helps."),addPhotoCta:DRAFT("Add photos or videos"),addPhotoMeta:DRAFT("Optional. A close-up in good light helps."),removePhotoLabel:DRAFT("Remove photo"),summaryPet:DRAFT("Pet"),summaryVet:DRAFT("Vet"),summaryWhen:DRAFT("When"),summaryLength:DRAFT("Length"),summaryReason:DRAFT("About"),summaryLengthTemplate:DRAFT("{n} minutes"),confirmCta:DRAFT("Book the visit"),confirmBusy:DRAFT("Booking…"),bookedTitle:DRAFT("You are booked."),addToCalendarCta:DRAFT("Add to calendar"),doneCta:DRAFT("Done"),booked:/* @__PURE__ */Object.freeze({remindPromise:DRAFT("We will notify you 30 minutes before."),summaryPromise:DRAFT("{pet}'s summary goes to the vet ahead of the call."),recordsPromiseTemplate:DRAFT("{pet}’s records and your notes go to {vet} ahead of the call."),recordsPhotoPromiseTemplate:DRAFT("{pet}’s records, your notes and the photo go to {vet} ahead of the call."),stepsLabel:DRAFT("What happens next"),joinPromise:DRAFT("Join right here in the app. No links to hunt for."),backToPet:DRAFT("Back to {pet}"),calendarAdded:DRAFT("Added to your calendar"),calendarFailedBody:DRAFT("That did not save to your calendar.")}),chrome:/* @__PURE__ */Object.freeze({closeHint:DRAFT("Closes without saving"),discardTitle:DRAFT("Leave without booking?"),discardBody:DRAFT("Your answers will not be saved."),discardConfirmCta:DRAFT("Leave"),discardKeepCta:DRAFT("Keep going"),noPetsTitle:DRAFT("No pets on this account"),loadFailedTitle:DRAFT("Could not load"),retryCta:DRAFT("Try again")}),emergency:/* @__PURE__ */Object.freeze({bannerTitle:DRAFT("This can’t wait for a scheduled visit."),keepBookingCta:DRAFT("I’ve handled this, continue booking"),lede:DRAFT("What you’re describing is the kind of thing vets want to see in person, now. Call one of these first."),ledeWithoutExits:DRAFT("What you’re describing is the kind of thing vets want to see in person, now."),exitPrimaryVetTitle:DRAFT("Call {petName}’s regular vet"),exitFindErTitle:DRAFT("Find an emergency vet near you"),startCallHint:DRAFT("Starts a phone call"),poisonControl:DRAFT("ASPCA Animal Poison Control"),poisonControlDetail:DRAFT("(888) 426-4435 · a fee may apply"),poisonControlTel:"tel:+18884264435"}),visit:/* @__PURE__ */Object.freeze({title:DRAFT("Your visit")}),loading:/* @__PURE__ */Object.freeze({pets:"Loading pets. Nothing to read yet.",clinicians:"Loading vets. Nothing to read yet.",slots:"Loading times. Nothing to read yet.",consult:"Loading your visit. Nothing to read yet.",progressTemplate:"Step {step} of {total}"})});function televetBookingCopyValues(node=TELEVET_BOOKING_COPY){return typeof node=="string"?[node]:typeof node!="object"||node===null?[]:Object.values(node).flatMap(v=>televetBookingCopyValues(v))}function isTelevetBookingCopyReady(){return televetBookingCopyValues().every(value=>value.trim().length>0&&!isPlaceholderCopy(value))}var TELEVET_EMERGENCY_EXITS_WEB=/* @__PURE__ */Object.freeze({findEmergencyVet:TELEVET_BOOKING_COPY.emergency.exitFindErTitle,poisonControl:TELEVET_BOOKING_COPY.emergency.poisonControl,poisonControlDetail:TELEVET_BOOKING_COPY.emergency.poisonControlDetail,poisonControlTel:TELEVET_BOOKING_COPY.emergency.poisonControlTel}),TELEVET_BOOKING_COPY_WEB=/* @__PURE__ */Object.freeze({...TELEVET_BOOKING_COPY,close:"Close booking",reasonPlaceholder:"She's been scratching her left ear a lot this week...",backLabel:"Back"});var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
3
+ return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fields.retryable,wireMessage:fields.wireMessage,synthesized:fields.synthesized,lastEventId:fields.lastEventId,serverRequestId:null})}function reportHostFailure(error){let globalConsole=globalThis.console;try{globalConsole?.error?.("[everfur] A host callback threw; the SDK ignored it.",error)}catch{}}function isThenable(value){return(typeof value=="object"||typeof value=="function")&&value!==null&&typeof value.then=="function"}function callHost(fn,...args){if(typeof fn=="function")try{let result=fn(...args);return isThenable(result)&&Promise.resolve(result).then(void 0,reportHostFailure),result}catch(error){reportHostFailure(error);return}}var GUARDED=/* @__PURE__ */new WeakMap;function guardHost(fn){if(typeof fn!="function")return;let cached=GUARDED.get(fn);if(cached!==void 0)return cached;let guarded=(...args)=>{callHost(fn,...args)};return GUARDED.set(fn,guarded),guarded}function guardHostProps(props,names){let guarded=null;for(let name of names){let fn=props[name];typeof fn=="function"&&(guarded??={...props},guarded[name]=guardHost(fn))}return guarded??props}function callHostAsync(fn,...args){let started;try{started=fn(...args)}catch(error){return reportHostFailure(error),Promise.resolve({ok:false,error:error})}return Promise.resolve(started).then(value=>({ok:true,value:value}),error=>({ok:false,error:error}))}var EMERGENCY_ER_LINE="Go to the nearest emergency vet now.";var DRAFT=s=>s,PLACEHOLDER_MARKERS=["[PLACEHOLDER","[PLAN NAME]","[LINK]","[Last]","TODO","TBD"];function isPlaceholderCopy(value){return PLACEHOLDER_MARKERS.some(m=>value.toUpperCase().includes(m.toUpperCase()))}function fill(template,slots){let out=template;for(let[key,value]of Object.entries(slots))out=out.split(`{${key}}`).join(value);return out}var TELEVET_BOOKING_COPY=/* @__PURE__ */Object.freeze({stateBlockedTitle:DRAFT("Not available in this state yet"),noCliniciansTitle:DRAFT("No vets available right now"),noCliniciansBody:DRAFT("Nobody is free in your area at the moment. This changes through the day."),noCliniciansRetryCta:DRAFT("Check again"),noCliniciansRegionBody:DRAFT("Video visits have to be with a vet licensed in your state, and we don’t have one there yet."),yourVetTitle:DRAFT("Your vet"),licensedPillTemplate:DRAFT("Licensed in {state}"),reviewsLabel:DRAFT("reviews"),rescheduleFromTemplate:DRAFT("Moving your visit on {when}"),rescheduleFailed:DRAFT("That did not move. Your original time is unchanged."),rescheduleStepLabel:DRAFT("Reschedule"),rescheduleTitleTemplate:DRAFT("Pick a new time for {pet}"),rescheduleNowLabel:DRAFT("Now"),rescheduleMoveTemplate:DRAFT("Move to {when}"),rescheduleMoving:DRAFT("Moving…"),rescheduleKeepLabel:DRAFT("Keep the visit as it is"),keepExistingCta:DRAFT("Keep my current time"),bookingPausedTitle:DRAFT("Booking is not available right now."),slotsErrorTitle:DRAFT("Could not load times"),noSlotsTitle:DRAFT("No times available"),nextOpeningTemplate:DRAFT("Next opening across our vets: {when}"),seeOtherVetsCta:DRAFT("See other vets"),retryCta:DRAFT("Try again"),holdExpired:DRAFT("That time is no longer held. Pick another."),slotTaken:DRAFT("That time was just taken. Pick another."),reasonPlaceholder:DRAFT("What is going on with your pet?"),reasonTooLong:DRAFT("That is too long. Please shorten it."),shareRecordsOff:DRAFT("Share health records with this vet"),confirmNotEntitled:DRAFT("A Pro membership is needed to book a video visit."),confirmFailed:DRAFT("That did not book. Try again."),checkAvailabilityCta:DRAFT("Check availability"),stateInterest:/* @__PURE__ */Object.freeze({cta:DRAFT("Add me to the list"),submitting:DRAFT("Adding you to the list…"),joinedTitle:DRAFT("You are on the list"),joinedBody:DRAFT("We will let you know when this changes."),failed:DRAFT("That did not save. Try again.")}),media:/* @__PURE__ */Object.freeze({droppedTemplate:DRAFT("{n} attachment did not upload."),droppedPluralTemplate:DRAFT("{n} attachments did not upload."),refusedSizeTemplate:DRAFT("{n} attachment was too large to send."),refusedSizePluralTemplate:DRAFT("{n} attachments were too large to send."),refusedTypeTemplate:DRAFT("{n} attachment is a file type that cannot be sent."),refusedTypePluralTemplate:DRAFT("{n} attachments are file types that cannot be sent."),refusedUnreadableTemplate:DRAFT("{n} attachment could not be read."),refusedUnreadablePluralTemplate:DRAFT("{n} attachments could not be read.")}),navTitle:DRAFT("Book a visit"),petFallback:"your pet",whereTitleTemplate:DRAFT("Where will {pet} be during the visit?"),whereLeadTemplate:DRAFT("Pick where {pronoun} be for the call, not where you live. It decides what the vet can do."),wherePronounFallback:"they’ll",whereFormLabelTemplate:DRAFT("Where {pet} will be"),whereLegend:DRAFT("State"),wherePrescribeMetaTemplate:DRAFT("Video visit, and prescriptions if {pet} needs them"),whereWellnessMeta:DRAFT("Wellness visit: advice and a care plan, no prescriptions yet"),whereAnotherState:DRAFT("Another state"),whereWhichState:DRAFT("Which state?"),whereLicensedTemplate:DRAFT("{vet} is licensed in {state}, so a prescription can be part of {pet}’s plan."),whereAskEveryTime:DRAFT("We ask every time: state rules require it."),issuesTitleTemplate:DRAFT("What’s going on with {pet}?"),issuesHint:DRAFT("Pick as many as you like."),issuesFormLabel:DRAFT("What’s going on"),issuesLegend:DRAFT("Main issues"),issuesPickOne:DRAFT("Pick at least one. Not sure? Choose Something else."),otherIssue:DRAFT("Something else"),describeHeadingTemplate:DRAFT("Tell {vet} what you’re seeing"),describeFieldLabel:DRAFT("What you’re seeing"),emergencyCheck:/* @__PURE__ */Object.freeze({titleTemplate:DRAFT("Is {pet} doing any of these right now?"),lead:DRAFT("A scheduled video visit isn’t the right place for an emergency."),signs:/* @__PURE__ */Object.freeze([DRAFT("Trouble breathing, or blue, grey or very pale gums"),DRAFT("Collapsed, or can’t stand up"),DRAFT("A seizure"),DRAFT("Ate something toxic, like grapes, chocolate, xylitol or medicine"),DRAFT("A swollen, hard belly, or retching with nothing coming up"),DRAFT("Bleeding that won’t stop"),DRAFT("Straining to pee with nothing coming out")]),formLabel:DRAFT("Emergency check"),legend:DRAFT("Any of these now?"),noneCta:DRAFT("No, none of these"),someCta:DRAFT("Yes, at least one")}),timeHeading:DRAFT("Pick a time"),timeMorning:DRAFT("Morning"),timeAfternoon:DRAFT("Afternoon"),timeEvening:DRAFT("Evening"),timeLegendTemplate:DRAFT("Time on {day}"),dayLegend:DRAFT("Day"),reviewHeading:DRAFT("Does this look right?"),summaryWhere:DRAFT("Where"),changeCta:DRAFT("Change"),whereAttestTemplate:DRAFT("{pet} and I will be in {state} during the visit."),attestBoth:DRAFT("Check both boxes to book the visit."),bookedStepLabel:DRAFT("Booked"),bookedTitleTemplate:DRAFT("You’re booked with {vet}"),bookedLeadTemplate:DRAFT("{when}, for {pet}."),footnote:DRAFT("Video visits are with a licensed veterinarian. Prescriptions where allowed, starting with California. In an emergency, go to the nearest emergency animal hospital."),rescheduleNavTitle:DRAFT("Change your visit"),close:DRAFT("Close"),continueCta:DRAFT("Continue"),petSelectTitle:DRAFT("Who is this visit for?"),addPetCta:DRAFT("Add a pet"),addAnotherPetCta:DRAFT("Add another pet"),locationUnknownTitle:DRAFT("We need your location to find a vet"),locationUnknownBody:DRAFT("Turn on location for Everfur, then try again."),locationUnknownCta:DRAFT("Allow location"),locationBlockedTitle:DRAFT("Location is turned off"),locationBlockedBody:DRAFT("Everfur needs your location to match you with a vet in your area."),locationBlockedCta:DRAFT("Open Settings"),locationUnavailableTitle:DRAFT("We could not read your location"),locationUnavailableBody:DRAFT("Try again in a moment."),stateAttestTemplate:DRAFT("I confirm my pet and I are in {state} right now."),describeHeading:DRAFT("Tell the vet what you are seeing"),describeHelpLong:DRAFT("When it started, what’s changed, what you’ve tried. Anything helps."),addPhotoCta:DRAFT("Add photos or videos"),addPhotoMeta:DRAFT("Optional. A close-up in good light helps."),removePhotoLabel:DRAFT("Remove photo"),summaryPet:DRAFT("Pet"),summaryVet:DRAFT("Vet"),summaryWhen:DRAFT("When"),summaryLength:DRAFT("Length"),summaryReason:DRAFT("About"),summaryLengthTemplate:DRAFT("{n} minutes"),confirmCta:DRAFT("Book the visit"),confirmBusy:DRAFT("Booking…"),bookedTitle:DRAFT("You are booked."),addToCalendarCta:DRAFT("Add to calendar"),doneCta:DRAFT("Done"),booked:/* @__PURE__ */Object.freeze({remindPromise:DRAFT("We will notify you 30 minutes before."),summaryPromise:DRAFT("{pet}'s summary goes to the vet ahead of the call."),recordsPromiseTemplate:DRAFT("{pet}’s records and your notes go to {vet} ahead of the call."),recordsPhotoPromiseTemplate:DRAFT("{pet}’s records, your notes and the photo go to {vet} ahead of the call."),stepsLabel:DRAFT("What happens next"),joinPromise:DRAFT("Join right here in the app. No links to hunt for."),backToPet:DRAFT("Back to {pet}"),calendarAdded:DRAFT("Added to your calendar"),calendarFailedBody:DRAFT("That did not save to your calendar.")}),chrome:/* @__PURE__ */Object.freeze({closeHint:DRAFT("Closes without saving"),discardTitle:DRAFT("Leave without booking?"),discardBody:DRAFT("Your answers will not be saved."),discardConfirmCta:DRAFT("Leave"),discardKeepCta:DRAFT("Keep going"),noPetsTitle:DRAFT("No pets on this account"),loadFailedTitle:DRAFT("Could not load"),retryCta:DRAFT("Try again")}),emergency:/* @__PURE__ */Object.freeze({bannerTitle:DRAFT("This can’t wait for a scheduled visit."),keepBookingCta:DRAFT("I’ve handled this, continue booking"),lede:DRAFT("What you’re describing is the kind of thing vets want to see in person, now. Call one of these first."),ledeWithoutExits:DRAFT("What you’re describing is the kind of thing vets want to see in person, now."),exitPrimaryVetTitle:DRAFT("Call {petName}’s regular vet"),exitFindErTitle:DRAFT("Find an emergency vet near you"),exitGoToErTitle:EMERGENCY_ER_LINE,startCallHint:DRAFT("Starts a phone call"),poisonControl:DRAFT("ASPCA Animal Poison Control"),poisonControlDetail:DRAFT("(888) 426-4435 · a fee may apply"),poisonControlTel:"tel:+18884264435"}),visit:/* @__PURE__ */Object.freeze({title:DRAFT("Your visit")}),loading:/* @__PURE__ */Object.freeze({pets:"Loading pets. Nothing to read yet.",clinicians:"Loading vets. Nothing to read yet.",slots:"Loading times. Nothing to read yet.",consult:"Loading your visit. Nothing to read yet.",progressTemplate:"Step {step} of {total}"})});function televetBookingCopyValues(node=TELEVET_BOOKING_COPY){return typeof node=="string"?[node]:typeof node!="object"||node===null?[]:Object.values(node).flatMap(v=>televetBookingCopyValues(v))}function isTelevetBookingCopyReady(){return televetBookingCopyValues().every(value=>value.trim().length>0&&!isPlaceholderCopy(value))}var TELEVET_EMERGENCY_EXITS_WEB=/* @__PURE__ */Object.freeze({goToEmergencyVet:TELEVET_BOOKING_COPY.emergency.exitGoToErTitle,findEmergencyVet:TELEVET_BOOKING_COPY.emergency.exitFindErTitle,poisonControl:TELEVET_BOOKING_COPY.emergency.poisonControl,poisonControlDetail:TELEVET_BOOKING_COPY.emergency.poisonControlDetail,poisonControlTel:TELEVET_BOOKING_COPY.emergency.poisonControlTel}),TELEVET_BOOKING_COPY_WEB=/* @__PURE__ */Object.freeze({...TELEVET_BOOKING_COPY,close:"Close booking",reasonPlaceholder:"She's been scratching her left ear a lot this week...",backLabel:"Back"});var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
4
4
  /* @__PURE__ */Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),
5
5
  /* @__PURE__ */Object.freeze({wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false}),
6
6
  /* @__PURE__ */Object.freeze({wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true}),
@@ -87,7 +87,7 @@ return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fiel
87
87
  /* @__PURE__ */Object.freeze({wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),
88
88
  /* @__PURE__ */Object.freeze({wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false}),
89
89
  /* @__PURE__ */Object.freeze({wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),
90
- /* @__PURE__ */Object.freeze({wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false})]);/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(row2=>row2.wireCode));var NORMALIZED_FOLD=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict"}),CONTRACT_ERROR_ROWS=/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(generated=>/* @__PURE__ */Object.freeze({wireCode:generated.wireCode,envelope:generated.envelope,retryable:generated.retryable,normalized:NORMALIZED_FOLD[generated.wireCode]}))),BY_KEY=new Map(CONTRACT_ERROR_ROWS.map(r=>[r.envelope+r.wireCode.toUpperCase(),r])),ENVELOPE_LOOKUP_ORDER=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(CONTRACT_ERROR_ROWS.map(r=>r.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(wireCode,envelope){if(typeof wireCode!="string")return;let key=wireCode.trim().toUpperCase();if(key.length!==0)for(let candidate of[envelope??"http_envelope",...ENVELOPE_LOOKUP_ORDER]){let row2=BY_KEY.get(candidate+key);if(row2)return row2}}var CATEGORY_OF=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(code){return CATEGORY_OF[code]}function fromWire(wire){let contractRow=contractErrorFor(wire);if(contractRow)return contractRow.normalized;let upper=(wire??"").trim().toUpperCase(),canonical=upper.replace(/[^A-Z0-9]/g,"");if(canonical==="AUTHREJECTED")return"authRejected";if(upper.startsWith("AUTH"))return"authExpired";switch(canonical){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var AUTO_RETRYABLE_CODES=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(code){return AUTO_RETRYABLE_CODES.has(code)}var RETRYABLE_CONTRACT_CODES=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(code){return isAutoRetryable(code)||RETRYABLE_CONTRACT_CODES.has(code)}var BACKOFF_BASE_MS=500,BACKOFF_CAP_MS=8e3,MAX_RETRY_ATTEMPTS=4;function backoffDelayMs(attempt,rng=Math.random){let bounded=Math.max(0,attempt),ceiling=Math.min(BACKOFF_BASE_MS*2**bounded,BACKOFF_CAP_MS);return Math.floor(rng()*ceiling)}var ACCESS_DENIED_COPY="This feature isn't available on your account right now.",USER_FACING_COPY=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:ACCESS_DENIED_COPY,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:"Something in that request was not right. Check the details and try again.",sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:ACCESS_DENIED_COPY,unknown:"Something went wrong. Please try again."});function userFacingError(code){return USER_FACING_COPY[code]}function defineHidden(target,key,value){Object.defineProperty(target,key,{value:value,enumerable:false,writable:false,configurable:false})}var REASON_CODE_SHAPE=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(code,opts){let row2=contractErrorFor(opts?.wireCode,opts?.wireEnvelope),error={code:code,category:categoryFor(code),retryable:opts?.retryable??isRetryableCode(code),displayMessage:userFacingError(code)};opts?.httpStatus!==void 0&&(error.httpStatus=opts.httpStatus),opts?.requestId&&(error.requestId=opts.requestId),typeof opts?.reasonCode=="string"&&REASON_CODE_SHAPE.test(opts.reasonCode)&&(error.reasonCode=opts.reasonCode);let wait=opts?.retryAfterSeconds;if(typeof wait=="number"&&Number.isFinite(wait)&&wait>=0&&(error.retryAfterSeconds=Math.round(wait)),row2);return opts?.wireMessage&&defineHidden(error,"wireMessage",opts.wireMessage),opts?.raw!==void 0&&opts.raw!==null&&defineHidden(error,"raw",opts.raw),/* @__PURE__ */Object.freeze(error)}function ok(value,warning){/* @__PURE__ */
90
+ /* @__PURE__ */Object.freeze({wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false})]);/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(row2=>row2.wireCode));var NORMALIZED_FOLD=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict"}),CONTRACT_ERROR_ROWS=/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(generated=>/* @__PURE__ */Object.freeze({wireCode:generated.wireCode,envelope:generated.envelope,retryable:generated.retryable,normalized:NORMALIZED_FOLD[generated.wireCode]}))),BY_KEY=new Map(CONTRACT_ERROR_ROWS.map(r=>[r.envelope+r.wireCode.toUpperCase(),r])),ENVELOPE_LOOKUP_ORDER=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(CONTRACT_ERROR_ROWS.map(r=>r.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(wireCode,envelope){if(typeof wireCode!="string")return;let key=wireCode.trim().toUpperCase();if(key.length!==0)for(let candidate of[envelope??"http_envelope",...ENVELOPE_LOOKUP_ORDER]){let row2=BY_KEY.get(candidate+key);if(row2)return row2}}var CATEGORY_OF=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(code){return CATEGORY_OF[code]}function fromWire(wire){let contractRow=contractErrorFor(wire);if(contractRow)return contractRow.normalized;let upper=(wire??"").trim().toUpperCase(),canonical=upper.replace(/[^A-Z0-9]/g,"");if(canonical==="AUTHREJECTED")return"authRejected";if(upper.startsWith("AUTH"))return"authExpired";switch(canonical){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var AUTO_RETRYABLE_CODES=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(code){return AUTO_RETRYABLE_CODES.has(code)}var RETRYABLE_CONTRACT_CODES=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(code){return isAutoRetryable(code)||RETRYABLE_CONTRACT_CODES.has(code)}var BACKOFF_BASE_MS=500,BACKOFF_CAP_MS=8e3,MAX_RETRY_ATTEMPTS=4;function backoffDelayMs(attempt,rng=Math.random){let bounded=Math.max(0,attempt),ceiling=Math.min(BACKOFF_BASE_MS*2**bounded,BACKOFF_CAP_MS);return Math.floor(rng()*ceiling)}var ACCESS_DENIED_COPY="This feature isn't available on your account right now.",VALIDATION_FAILED_COPY="Something in that request was not right. Check the details and try again.",USER_FACING_COPY=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:ACCESS_DENIED_COPY,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:VALIDATION_FAILED_COPY,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:ACCESS_DENIED_COPY,runtimeDisposed:VALIDATION_FAILED_COPY,unknown:"Something went wrong. Please try again."});function userFacingError(code){return USER_FACING_COPY[code]}function defineHidden(target,key,value){Object.defineProperty(target,key,{value:value,enumerable:false,writable:false,configurable:false})}var REASON_CODE_SHAPE=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(code,opts){let row2=contractErrorFor(opts?.wireCode,opts?.wireEnvelope),error={code:code,category:categoryFor(code),retryable:opts?.retryable??isRetryableCode(code),displayMessage:userFacingError(code)};opts?.httpStatus!==void 0&&(error.httpStatus=opts.httpStatus),opts?.requestId&&(error.requestId=opts.requestId),typeof opts?.reasonCode=="string"&&REASON_CODE_SHAPE.test(opts.reasonCode)&&(error.reasonCode=opts.reasonCode);let wait=opts?.retryAfterSeconds;if(typeof wait=="number"&&Number.isFinite(wait)&&wait>=0&&(error.retryAfterSeconds=Math.round(wait)),row2);return opts?.wireMessage&&defineHidden(error,"wireMessage",opts.wireMessage),opts?.raw!==void 0&&opts.raw!==null&&defineHidden(error,"raw",opts.raw),/* @__PURE__ */Object.freeze(error)}function ok(value,warning){/* @__PURE__ */
91
91
  return Object.freeze({ok:true,value:value})}function err(error){/* @__PURE__ */
92
92
  return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};function authHeaders(auth){let headers={};return auth.mode==="personalized"?headers.authorization=`Bearer ${auth.token}`:headers["x-everfur-partner-key"]=auth.publishableKey,auth.userRef&&(headers["x-everfur-user-ref"]=auth.userRef),auth.sessionId&&(headers["x-everfur-session-id"]=auth.sessionId),headers}function withAuthHeaders(req,auth){return{...req,headers:{...stripAuthHeaders(req.headers),...authHeaders(auth)}}}function stripAuthHeaders(headers){if(!headers)return{};let out={};for(let[key,value]of Object.entries(headers)){let lower=key.toLowerCase();lower==="authorization"||lower==="x-everfur-partner-key"||(out[key]=value)}return out}async function authedSend(req,ctx){if(ctx.mode==="anonymous")return ctx.transport.request(withAuthHeaders(req,{mode:"anonymous",publishableKey:ctx.publishableKey,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));let token;try{token=await ctx.identity.currentToken()}catch{return err(authRejectedError())}let first=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:token,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));if(first.ok||first.error.httpStatus!==401)return first;let refreshed;try{refreshed=await ctx.identity.currentToken({forceRefresh:!0})}catch{return err(authRejectedError())}let retry=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:refreshed,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));return!retry.ok&&retry.error.httpStatus===401?err(authRejectedError(retry.error.httpStatus)):retry}function authRejectedError(httpStatus){return makeEverfurError("authRejected",{retryable:false,...httpStatus!==void 0?{httpStatus:httpStatus}:{}})}function networkError(cause){return makeEverfurError("internalError",{retryable:true,wireMessage:describeCause(cause)})}function describeCause(cause){return cause instanceof Error?cause.message:typeof cause=="string"?cause:"network request failed"}var FUNNEL_UNARY_TIMEOUT_MS=3e4,RETRY_OVERRIDE_MAX_MS=BACKOFF_CAP_MS*2,IDEMPOTENCY_HEADER="idempotency-key",MUTATING_METHODS=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),NOOP_OBSERVER=/* @__PURE__ */Object.freeze({onEvent(){}}),defaultFunnelTimers=/* @__PURE__ */Object.freeze({setTimeout:(handler,ms)=>setTimeout(handler,ms),clearTimeout:handle=>clearTimeout(handle),now:()=>Date.now()});function seededIdempotencyKey(seed){let safe=seed.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return safe.length===0?null:`efs_${safe}`.slice(0,128)}function createRequestFunnel(deps){let observer=deps.observer??NOOP_OBSERVER,timers=deps.timers??defaultFunnelTimers,rng=deps.rng??Math.random,sleep=deps.sleep??((ms,signal)=>delayAbortable(ms,timers,signal)),ceiling=deps.maxAttempts??MAX_RETRY_ATTEMPTS,timeoutMs=deps.unaryTimeoutMs??FUNNEL_UNARY_TIMEOUT_MS,mintKey=deps.newIdempotencyKey??defaultIdempotencyKeyFactory(),emit=event=>{try{observer.onEvent(event)}catch{}};async function send(call,req,opts){let perCallMaxAttempts=opts?.maxAttempts,maxAttempts=Math.max(1,perCallMaxAttempts??ceiling),idempotent=opts?.idempotent??MUTATING_METHODS.has(req.method),seeded=opts?.idempotencyKey===void 0?null:seededIdempotencyKey(opts.idempotencyKey),idempotencyKey=idempotent?seeded??mintKey():null,base=assembleHeaders(req,idempotencyKey),attempt=0;for(;;){let stamp2=extra=>/* @__PURE__ */Object.freeze({call:call,method:req.method,path:req.path,attempt:attempt,...idempotencyKey?{idempotencyKey:idempotencyKey}:{},...extra});emit(stamp2({phase:"attempt"}));let deadline=boundedSignal(timeoutMs,timers),merged=mergeSignals(deadline.signal,req.signal),settled;try{settled=await authedSend({...base,signal:merged.signal},deps.auth)}catch(cause){settled=err(networkError(cause))}finally{merged.dispose(),deadline.cancel()}if(settled.ok)return emit(stamp2({phase:"settled",ok:true,reason:"ok"})),settled;let error=settled.error,decision=decideRetry(error,attempt,{maxAttempts:maxAttempts,rng:rng,now:timers.now(),aborted:req.signal?.aborted===true,...perCallMaxAttempts!==void 0?{perCallMaxAttempts:perCallMaxAttempts}:{},...deps.errorPolicy!==void 0?{policy:deps.errorPolicy}:{}}),settledEvent={ok:false,code:error.code,reason:decision.reason,...error.httpStatus!==void 0?{httpStatus:error.httpStatus}:{},...error.requestId!==void 0?{requestId:error.requestId}:{}};if(!decision.retry)return emit(stamp2({phase:"settled",...settledEvent})),err(error);if(emit(stamp2({phase:"retry",...settledEvent,delayMs:decision.delayMs})),await sleep(decision.delayMs,req.signal),req.signal?.aborted===true)return emit(stamp2({phase:"settled",...settledEvent,reason:"aborted"})),err(error);attempt+=1}}async function authorize(req){return withAuthHeaders(req,await resolveDeviceAuth(deps.auth))}async function*stream(call,req,signal){emit(
93
93
  /* @__PURE__ */Object.freeze({call:call,phase:"stream.open",method:req.method,path:req.path,attempt:0}));try{yield*deps.auth.transport.stream(req,signal)}catch{yield errorFrame({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null})}}/* @__PURE__ */
@@ -131,13 +131,13 @@ return Object.freeze(cause==="dark"?{title:TELEVET_BOOKING_COPY.noCliniciansTitl
131
131
  return Object.freeze({code:code,retryable:retryable,filename:filename,...{}})}async function uploadAttachmentBytes(transport,policy,attachment,opts){let cancelled=()=>opts?.signal?.aborted===true;if(cancelled())return err2(failure("cancelled",true,attachment.filename));try{return await transport.postMultipart(policy,attachment.file,{...opts?.signal?{signal:opts.signal}:{},...opts?.onProgress?{onProgress:opts.onProgress}:{}}),ok2(void 0)}catch{return cancelled()?err2(failure("cancelled",true,attachment.filename)):err2(failure("server",true,attachment.filename))}}var NO_MEDIA_SHORTFALL=/* @__PURE__ */Object.freeze({failed:0,refused:/* @__PURE__ */Object.freeze({size:0,type:0,unreadable:0})});function isMediaShortfallEmpty(shortfall){let{failed:failed,refused:refused}=shortfall;return failed<=0&&refused.size<=0&&refused.type<=0&&refused.unreadable<=0}function televetMediaShortfallLines(shortfall){let count=n=>Number.isFinite(n)&&n>0?Math.floor(n):0,c=TELEVET_BOOKING_COPY.media;return[{n:count(shortfall.failed),one:c.droppedTemplate,many:c.droppedPluralTemplate},{n:count(shortfall.refused.size),one:c.refusedSizeTemplate,many:c.refusedSizePluralTemplate},{n:count(shortfall.refused.type),one:c.refusedTypeTemplate,many:c.refusedTypePluralTemplate},{n:count(shortfall.refused.unreadable),one:c.refusedUnreadableTemplate,many:c.refusedUnreadablePluralTemplate}].filter(line=>line.n>0).map(line=>fill(line.n===1?line.one:line.many,{n:String(line.n)}))}function mediaShortfallFromUnsentPicks(pickCount){let n=Number.isFinite(pickCount)&&pickCount>0?Math.floor(pickCount):0;return n===0?NO_MEDIA_SHORTFALL:/* @__PURE__ */Object.freeze({failed:n,refused:NO_MEDIA_SHORTFALL.refused})}function withUnsentPicks(shortfall,pickCount){let extra=mediaShortfallFromUnsentPicks(pickCount);return extra.failed===0?shortfall:/* @__PURE__ */Object.freeze({failed:shortfall.failed+extra.failed,refused:shortfall.refused})}var PRESIGN_MARGIN_MS=6e4;function validated(pick2){let contentType=televetAttachmentContentType(pick2.filename,pick2.mimeType);return contentType===null?null:{file:{uri:pick2.uri,name:pick2.filename,mimeType:contentType,sizeBytes:pick2.fileSize},filename:pick2.filename,contentType:contentType,sizeBytes:pick2.fileSize}}function fresh(state,now){if(state?.kind!=="ready")return null;let lifetime=state.policy.expires_in_seconds*1e3;return now-state.at<lifetime-PRESIGN_MARGIN_MS?state.policy:null}function useTelevetBookingMedia({media:media,controller:controller,transport:transport}){let[states,setStates]=react.useState(()=>/* @__PURE__ */new Map),[darkAnswered,setDarkAnswered]=react.useState(false),[sending,setSending]=react.useState(false),statesRef=react.useRef(states),mediaRef=react.useRef(media);mediaRef.current=media;let darkRef=react.useRef(false),sendingRef=react.useRef(false),alive=react.useRef(new AbortController);react.useEffect(()=>{let controllerForThisMount=new AbortController;return alive.current=controllerForThisMount,()=>controllerForThisMount.abort()},[]);let initiate=controller?.initiateAttachment?.bind(controller),dark=darkAnswered||initiate===void 0,put=react.useCallback((uri,next)=>{let map=new Map(statesRef.current);map.set(uri,next),statesRef.current=map,setStates(map)},[]),goDark=react.useCallback(()=>{darkRef.current=true,setDarkAnswered(true)},[]),presign=react.useCallback(async(pick2,file)=>{if(initiate===void 0)return"dark";let res=await initiate({filename:file.filename,contentType:file.contentType,fileSize:file.sizeBytes},alive.current.signal);if(alive.current.signal.aborted)return null;if(res.ok)return put(pick2.uri,{kind:"ready",policy:res.value,at:Date.now()}),res.value;let cause=televetAttachmentInitiateFailure(res.error);return cause==="dark"?"dark":(put(pick2.uri,cause==="failed"?{kind:"retry"}:{kind:"refused",cause:cause}),null)},[initiate,put]);react.useEffect(()=>{if(!dark)for(let pick2 of media){if(statesRef.current.has(pick2.uri))continue;let refusal=televetAttachmentRefusal(pick2),file=validated(pick2);if(refusal!==null||file===null){put(pick2.uri,{kind:"refused",cause:refusal??"type"});continue}put(pick2.uri,{kind:"checking"}),presign(pick2,file).then(answer=>{answer==="dark"&&goDark()})}},[media,dark,presign,put,goDark]);let send=react.useCallback(async()=>{if(darkRef.current||initiate===void 0||sendingRef.current)return[];sendingRef.current=true,setSending(true);let keys=[];try{for(let pick2 of mediaRef.current){let state=statesRef.current.get(pick2.uri);if(state?.kind==="sent"){keys.push(state.s3Key);continue}if(state?.kind==="refused")continue;let file=validated(pick2);if(file===null)continue;let policy=fresh(state,Date.now());if(policy===null){let answer=await presign(pick2,file);if(answer==="dark")return goDark(),[];if(answer===null){statesRef.current.get(pick2.uri)?.kind==="retry"&&put(pick2.uri,{kind:"failed"});continue}policy=answer}if(alive.current.signal.aborted)return[];let staged=await uploadAttachmentBytes(transport,policy,file,{signal:alive.current.signal});if(alive.current.signal.aborted)return[];staged.ok?(put(pick2.uri,{kind:"sent",s3Key:policy.s3_key}),keys.push(policy.s3_key)):put(pick2.uri,{kind:"failed"})}return keys}catch{return keys}finally{sendingRef.current=false,alive.current.signal.aborted||setSending(false)}},[initiate,presign,put,goDark,transport]),shortfall=react.useMemo(()=>{if(media.length===0)return NO_MEDIA_SHORTFALL;if(dark)return mediaShortfallFromUnsentPicks(media.length);let refused={size:0,type:0,unreadable:0},failed=0;for(let pick2 of media){let state=states.get(pick2.uri);state?.kind==="refused"?refused[state.cause]+=1:state?.kind==="failed"&&(failed+=1)}return failed===0&&refused.size+refused.type+refused.unreadable===0?NO_MEDIA_SHORTFALL:/* @__PURE__ */Object.freeze({failed:failed,refused:/* @__PURE__ */Object.freeze(refused)})},[media,dark,states]),sentKeys=react.useMemo(()=>media.flatMap(pick2=>{let state=states.get(pick2.uri);return state?.kind==="sent"?[{key:state.s3Key,pick:pick2}]:[]}),[media,states]),bookedShortfall=react.useCallback(consult=>{if(dark)return shortfall;let kept=new Set(consult.mediaRefs),dropped=sentKeys.filter(sent=>!kept.has(sent.key)).length;return dropped===0?shortfall:/* @__PURE__ */Object.freeze({failed:shortfall.failed+dropped,refused:shortfall.refused})},[dark,shortfall,sentKeys]),sentOnePhoto=react.useCallback(consult=>{if(dark||sentKeys.length!==1)return false;let[only]=sentKeys;return only===void 0||!consult.mediaRefs.includes(only.key)?false:(televetAttachmentContentType(only.pick.filename,only.pick.mimeType)??"").startsWith("image/")},[dark,sentKeys]),live=!dark&&[...states.values()].some(state=>state.kind==="ready"||state.kind==="sent");return react.useMemo(()=>({shortfall:shortfall,sending:sending,live:live,send:send,bookedShortfall:bookedShortfall,sentOnePhoto:sentOnePhoto}),[shortfall,sending,live,send,bookedShortfall,sentOnePhoto])}var FILE_FIELD="file",NO_BYTES="chat attachment upload: the file handle carries no bytes",FAILED="chat attachment upload failed";function createWebAttachmentTransport(options={}){let doFetch=options.fetch??((input,init)=>fetch(input,init));/* @__PURE__ */
132
132
  return Object.freeze({postMultipart(policy,file,opts){let blob=file.blob;if(blob===void 0)return Promise.reject(new Error(NO_BYTES));if(opts.signal?.aborted===true)return Promise.reject(new Error(FAILED));let form=new FormData;for(let[name,value]of Object.entries(policy.upload_fields))form.append(name,value);return form.append(FILE_FIELD,blob,"image"),doFetch(policy.upload_url,{method:"POST",body:form,mode:"cors",credentials:"omit",...opts.signal?{signal:opts.signal}:{}}).then(response=>{if(!(response.status>=200&&response.status<300))return Promise.reject(new Error(FAILED));opts.onProgress?.(1)},()=>Promise.reject(new Error(FAILED)))}})}var UNREADABLE="booking attachment upload: the picked file could not be read";function createWebTelevetMediaTransport(options={}){let doFetch=options.fetch??((input,init)=>fetch(input,init)),post=createWebAttachmentTransport({fetch:doFetch});/* @__PURE__ */
133
133
  return Object.freeze({postMultipart(policy,file,opts){return file.blob!==void 0?post.postMultipart(policy,file,opts):doFetch(file.uri,opts.signal?{signal:opts.signal}:void 0).then(response=>response.blob()).then(blob=>post.postMultipart(policy,{...file,blob:new Blob([blob],{type:file.mimeType})},opts),()=>Promise.reject(new Error(UNREADABLE)))}})}var TELEVET_SIMULATOR_COPY=/* @__PURE__ */Object.freeze({title:"Vet test mode (sandbox tenants)",create:"Create a simulated visit for this pet",createLabel:"Create",visitTemplate:"Visit {visitRef}: {status}, scheduled {scheduledAt}.",eventsNote:"Raise one of the visit events that is not a status change, to see what a tap on it opens:",advance:/* @__PURE__ */Object.freeze({completed:"Complete it",cancelled:"Cancel it",no_show:"Mark no-show"}),events:/* @__PURE__ */Object.freeze({rescheduled:"Rescheduled",reminder:"Reminder (24h)",followup_sent:"Follow-up sent",message_received:"Vet replied",ended:"Ended"}),resultTemplate:"{label}: {result}.",errorTemplate:"{label}: {message}"});var VET_VISIT_SANDBOX_VISITS_PATH="/widget/v1/televet/sandbox/visits",PET_REF_MAX2=128,VISIT_REF_MAX=64,STATUSES=/* @__PURE__ */new Set(["booked","cancelled","completed","no_show"]),RESULTS=/* @__PURE__ */new Set(["applied","already_applied","not_applicable"]),EVENTS=/* @__PURE__ */new Set(["rescheduled","reminder","followup_sent","message_received","ended"]),REMINDER_STAGES=/* @__PURE__ */new Set(["24h","30m"]);function invalid4(wireMessage){return makeEverfurError("validationFailed",{retryable:false,wireMessage:wireMessage})}function textError(name,value,max){return typeof value!="string"||value.length===0?invalid4(`${name} is required and must be a non-empty string`):hasLoneSurrogate(value)?invalid4(`${name} contains an unpaired surrogate and cannot be encoded`):serverLength(value)>max?invalid4(`${name} is longer than ${max} characters`):null}function mapActionResult(wire){if(typeof wire!="object"||wire===null)return null;let{result:result,visit:visit}=wire;if(typeof result!="string"||!RESULTS.has(result)||typeof visit!="object"||visit===null)return null;let{visit_ref:visit_ref,pet_ref:pet_ref,status:status,scheduled_at:scheduled_at}=visit;return typeof visit_ref!="string"||visit_ref.length===0||typeof pet_ref!="string"||pet_ref.length===0||typeof status!="string"||!STATUSES.has(status)||typeof scheduled_at!="string"||scheduled_at.length===0?null:/* @__PURE__ */Object.freeze({result:result,visit:/* @__PURE__ */Object.freeze({visitRef:visit_ref,petRef:pet_ref,status:status,scheduledAt:scheduled_at})})}function createVetVisitSandboxController(deps){let funnel=deps.funnel??createRequestFunnel({auth:deps.auth,...deps.errorPolicy?{errorPolicy:deps.errorPolicy}:{}}),run=async(call,path,body)=>{let res=await funnel.send(call,{method:"POST",path:path,body:body},{idempotent:false,maxAttempts:1});if(!res.ok)return err(res.error);let mapped=mapActionResult(res.value);return mapped===null?err(makeEverfurError("internalError",{retryable:false})):ok(mapped)};return{createVisit(petRef){let bad=textError("pet_ref",petRef,PET_REF_MAX2);return bad!==null?Promise.resolve(err(bad)):run("televet.sandbox.createVisit",VET_VISIT_SANDBOX_VISITS_PATH,{pet_ref:petRef})},advanceVisit(visitRef,to){let bad=textError("visit_ref",visitRef,VISIT_REF_MAX);if(bad!==null)return Promise.resolve(err(bad));if(typeof to!="string"||!STATUSES.has(to))return Promise.resolve(err(invalid4("to must be booked, cancelled, completed or no_show")));let path=`${VET_VISIT_SANDBOX_VISITS_PATH}/${encodeURIComponent(visitRef)}/advance`;return run("televet.sandbox.advanceVisit",path,{to:to})},simulateVisitEvent(visitRef,event,stage){let bad=textError("visit_ref",visitRef,VISIT_REF_MAX);if(bad!==null)return Promise.resolve(err(bad));if(typeof event!="string"||!EVENTS.has(event))return Promise.resolve(err(invalid4(`event must be one of ${[...EVENTS].join(", ")}`)));if(event==="reminder"){if(typeof stage!="string"||!REMINDER_STAGES.has(stage))return Promise.resolve(err(invalid4(`stage must be one of ${[...REMINDER_STAGES].join(", ")} for a reminder`)))}else if(stage!==void 0)return Promise.resolve(err(invalid4("stage is only for a reminder")));let path=`${VET_VISIT_SANDBOX_VISITS_PATH}/${encodeURIComponent(visitRef)}/simulate`;return run("televet.sandbox.simulateVisitEvent",path,stage===void 0?{event:event}:{event:event,stage:stage})}}}function useEverfurVetVisitSandbox(){let{runtime:runtime,userRef:userRef,scopeEpoch:scopeEpoch}=useEverfurContext();return react.useMemo(()=>{let{services:services}=runtime.registry;return createVetVisitSandboxController({auth:services.authFor(userRef),...services.errorPolicy?{errorPolicy:services.errorPolicy}:{}})},[runtime,userRef,scopeEpoch])}function televetOpensSimulator(sandboxTenant,allowance){return!sandboxTenant||!allowance.enabled?false:allowance.data!==null&&allowance.data.active===false||televetReadIsDark({error:allowance.error??null})}var isSandbox=snapshot=>snapshot.livemode===false;function useTelevetSandboxTenant(){let store=useEverfurContext().runtime.entitlements,read=react.useCallback(()=>isSandbox(store.getSnapshot()),[store]);return react.useSyncExternalStore(store.subscribe,read,read)}function useTelevetSimulatorRoute(allowance,notEntitled){let simulate=televetOpensSimulator(useTelevetSandboxTenant(),allowance);return{simulate:simulate,fundingRefused:notEntitled&&!simulate}}function televetRosterReadsAllowed(sandboxTenant,allowance){return!sandboxTenant||!allowance.enabled?true:(allowance.data!==null||(allowance.error??null)!==null)&&!televetOpensSimulator(true,allowance)}function useTelevetRosterController(controller,allowance){return televetRosterReadsAllowed(useTelevetSandboxTenant(),allowance)?controller:null}function useTelevetVisitSimulator(petRef){let sandbox=useEverfurVetVisitSandbox(),[visit,setVisit]=react.useState(null),[line,setLine]=react.useState(null),[busy,setBusy]=react.useState(false),inFlight=react.useRef(false),alive=react.useRef(true);react.useEffect(()=>(alive.current=true,()=>{alive.current=false}),[]);let run=react.useCallback((label,send,keepVisit)=>{inFlight.current||(inFlight.current=true,setBusy(true),send().then(res=>{if(inFlight.current=false,!!alive.current){if(setBusy(false),!res.ok){setLine({tone:"danger",text:fill(TELEVET_SIMULATOR_COPY.errorTemplate,{label:label,message:res.error.displayMessage})});return}keepVisit&&setVisit(res.value.visit),setLine({tone:"ok",text:fill(TELEVET_SIMULATOR_COPY.resultTemplate,{label:label,result:res.value.result})})}}))},[]),create=react.useCallback(()=>{run(TELEVET_SIMULATOR_COPY.createLabel,()=>sandbox.createVisit(petRef),true)},[petRef,run,sandbox]),advance=react.useCallback(to=>{visit!==null&&run(TELEVET_SIMULATOR_COPY.advance[to],()=>sandbox.advanceVisit(visit.visitRef,to),true)},[run,sandbox,visit]),raise=react.useCallback(event=>{if(visit===null)return;let stage=event==="reminder"?"24h":void 0;run(TELEVET_SIMULATOR_COPY.events[event],()=>sandbox.simulateVisitEvent(visit.visitRef,event,stage),false)},[run,sandbox,visit]),visitLine=visit===null?null:fill(TELEVET_SIMULATOR_COPY.visitTemplate,{visitRef:visit.visitRef,status:visit.status,scheduledAt:visit.scheduledAt});return{visit:visit,visitLine:visitLine,line:line,busy:busy,create:create,advance:advance,raise:raise}}var TELEVET_SIMULATOR_MOVES=/* @__PURE__ */Object.freeze(["completed","cancelled","no_show"]),TELEVET_SIMULATOR_EVENTS=/* @__PURE__ */Object.freeze(["rescheduled","reminder","followup_sent","message_received","ended"]);function televetTriageReadFrom(controller){let triage=controller?.triage;return!controller||!triage?null:async(reasonText,signal)=>{let res=await triage.call(controller,reasonText,signal);return res.ok?res.value:null}}function useEarlyTriage(read){let[open,setOpen]=react.useState(false),[checking,setChecking]=react.useState(false),[acknowledgedReason,setAcknowledgedReason]=react.useState(null),triaged=react.useRef(null),inFlight=react.useRef(null),live=react.useRef(true);react.useEffect(()=>(live.current=true,()=>{live.current=false,inFlight.current?.abort(),inFlight.current=null}),[]);let cancel=react.useCallback(()=>{inFlight.current?.abort(),inFlight.current=null,live.current&&setChecking(false)},[]),check=react.useCallback(async reasonText=>{if(inFlight.current!==null)return false;let reason=reasonText.trim();if(acknowledgedReason!==null&&acknowledgedReason===reason||!read)return true;let emergency=triaged.current!==null&&triaged.current.reason===reason?triaged.current.emergency:null;if(emergency===null){let controller=new AbortController;inFlight.current=controller,setChecking(true);try{let verdict=await read(reason,controller.signal);if(controller.signal.aborted||!live.current)return!1;verdict===null?emergency=!1:(emergency=verdict.isEmergency||verdict.fallback,triaged.current=/* @__PURE__ */Object.freeze({reason:reason,emergency:emergency}))}catch{if(controller.signal.aborted||!live.current)return false;emergency=false}finally{inFlight.current===controller&&(inFlight.current=null,live.current&&setChecking(false))}}return emergency===true?(setOpen(true),false):true},[acknowledgedReason,read]),acknowledge=react.useCallback(reasonText=>{setAcknowledgedReason(reasonText.trim()),setOpen(false)},[]),close=react.useCallback(()=>setOpen(false),[]),reset=react.useCallback(()=>{cancel(),triaged.current=null,setAcknowledgedReason(null),setOpen(false)},[cancel]),isAcknowledged=react.useCallback(reasonText=>acknowledgedReason!==null&&acknowledgedReason===reasonText.trim(),[acknowledgedReason]);return{open:open,checking:checking,check:check,acknowledge:acknowledge,close:close,cancel:cancel,reset:reset,isAcknowledged:isAcknowledged}}function normalizeStateCode(state){let code=state?.trim().toUpperCase()??"";return/^[A-Z]{2}$/.test(code)?code:null}function useStateInterest(state,write){let normalized=normalizeStateCode(state),[phases,setPhases]=react.useState(()=>/* @__PURE__ */Object.freeze({})),revision=react.useRef(0),lastKey=react.useRef(null),actionFor=react.useCallback(reason=>{if(!write||normalized===null)return null;let key=`${normalized}:${reason}`;lastKey.current!==null&&lastKey.current!==key&&(revision.current+=1),lastKey.current=key;let phase=phases[key]??"idle";return{joined:phase==="joined",pending:phase==="pending",failed:phase==="failed",onPress:()=>{if(phase==="pending"||phase==="joined")return;let mine=revision.current+=1;setPhases(prev=>/* @__PURE__ */Object.freeze({...prev,[key]:"pending"})),(async()=>{let joined=false;try{joined=await write(normalized,reason)}catch{joined=false}revision.current===mine&&setPhases(prev=>/* @__PURE__ */Object.freeze({...prev,[key]:joined?"joined":"failed"}))})()}}},[normalized,phases,write]);return react.useMemo(()=>({actionFor:actionFor}),[actionFor])}var ARTIFACT_ISSUES=/* @__PURE__ */Object.freeze([{id:"itchy-skin",label:"Itchy skin and allergies"},{id:"ear-infections",label:"Ear problems"},{id:"upset-stomach",label:"Upset stomach"},{id:"anxiety",label:"Anxiety and behavior"},{id:"parasites",label:"Fleas, ticks and heartworm"},{id:"joint-pain",label:"Joints and mobility"},{id:"eye-issues",label:"Eyes"},{id:"urinary",label:"Peeing and urinary"},{id:"surgery-aftercare",label:"Surgery aftercare"},{id:"senior-care",label:"Senior care"},{id:"wellness",label:"A wellness check-in"}].map(chip=>/* @__PURE__ */Object.freeze(chip))),TELEVET_OTHER_ISSUE_ID="other";function televetIssueChips(species){/* @__PURE__ */
134
- return Object.freeze([...ARTIFACT_ISSUES/* @__PURE__ */,Object.freeze({id:TELEVET_OTHER_ISSUE_ID,label:TELEVET_BOOKING_COPY.otherIssue})])}function composeTelevetReason(chipLabels,detail){let labels=chipLabels.filter(label=>label.trim().length>0),text2=detail.trim();return labels.length===0?text2:text2.length===0?labels.join(", "):`${labels.join(", ")}\n${text2}`}var TELEVET_US_STATES=/* @__PURE__ */Object.freeze([["AL","Alabama"],["AK","Alaska"],["AZ","Arizona"],["AR","Arkansas"],["CA","California"],["CO","Colorado"],["CT","Connecticut"],["DE","Delaware"],["DC","District of Columbia"],["FL","Florida"],["GA","Georgia"],["HI","Hawaii"],["ID","Idaho"],["IL","Illinois"],["IN","Indiana"],["IA","Iowa"],["KS","Kansas"],["KY","Kentucky"],["LA","Louisiana"],["ME","Maine"],["MD","Maryland"],["MA","Massachusetts"],["MI","Michigan"],["MN","Minnesota"],["MS","Mississippi"],["MO","Missouri"],["MT","Montana"],["NE","Nebraska"],["NV","Nevada"],["NH","New Hampshire"],["NJ","New Jersey"],["NM","New Mexico"],["NY","New York"],["NC","North Carolina"],["ND","North Dakota"],["OH","Ohio"],["OK","Oklahoma"],["OR","Oregon"],["PA","Pennsylvania"],["RI","Rhode Island"],["SC","South Carolina"],["SD","South Dakota"],["TN","Tennessee"],["TX","Texas"],["UT","Utah"],["VT","Vermont"],["VA","Virginia"],["WA","Washington"],["WV","West Virginia"],["WI","Wisconsin"],["WY","Wyoming"]].map(([code,name])=>/* @__PURE__ */Object.freeze({code:code,name:name})));function televetStateName(code){let upper=code?.trim().toUpperCase()??"";return TELEVET_US_STATES.find(s=>s.code===upper)?.name??upper}function televetWhereMeta(policy,petName){return policy?policy.wellnessAvailable?policy.prescriptionsAvailable?fill(TELEVET_BOOKING_COPY.wherePrescribeMetaTemplate,{pet:petName}):TELEVET_BOOKING_COPY.whereWellnessMeta:TELEVET_BOOKING_COPY.stateBlockedTitle:null}function televetWhereLicensedLine(clinician,policy,state,petName){if(!clinician||!policy||!state||!policy.prescriptionsAvailable)return null;let code=state.trim().toUpperCase();return clinician.licensedStates.some(l=>l.state.trim().toUpperCase()===code&&l.canPrescribe)?fill(TELEVET_BOOKING_COPY.whereLicensedTemplate,{vet:clinician.displayName,state:televetStateName(code),pet:petName}):null}function useTelevetWhere(args){let{hostState:hostState,state:state,policy:policy,clinician:clinician,petName:petName,controller:controller,onState:onState}=args,host=hostState&&isWellFormedStateCode(hostState)?hostState.trim().toUpperCase():null,current=state&&isWellFormedStateCode(state)?state.trim().toUpperCase():null,hostPolicy=useTelevetStatePolicy(host,controller),[otherMode,setOtherMode]=react.useState(host===null||current!==null&&current!==host),otherSelected=host===null||otherMode,pickHost=react.useCallback(()=>{host!==null&&(setOtherMode(false),onState(host))},[host,onState]),pickOther=react.useCallback(()=>{setOtherMode(true),current===host&&onState(null)},[current,host,onState]),pickState=react.useCallback(code=>{setOtherMode(true),onState(code.trim().toUpperCase())},[onState]),hostPlace=host===null?null:{code:host,name:televetStateName(host),meta:televetWhereMeta(hostPolicy.data,petName)},otherCode=otherSelected&&current!==null&&(host===null||current!==host||otherMode)?current:null,otherPlace=otherCode===null?null:{code:otherCode,name:televetStateName(otherCode),meta:televetWhereMeta(policy.data,petName)};return{hostPlace:hostPlace,otherSelected:otherSelected,otherPlace:otherPlace,licensedLine:televetWhereLicensedLine(clinician,policy.data,current,petName),stateName:current===null?null:televetStateName(current),canContinue:current!==null,pickHost:pickHost,pickOther:pickOther,pickState:pickState}}function useTelevetBookingIntake(args){let{reasonText:reasonText,state:state,hostState:hostState,clinicianId:clinicianId,clinicians:clinicians,policy:policy,petName:petName,controller:controller,dispatch:dispatch}=args,[concernIds,setConcernIds]=react.useState([]),[emergencyAnswer,setEmergencyAnswer]=react.useState(null),whereTouched=react.useRef(false),issueChips=react.useMemo(()=>televetIssueChips(),[]),concernLabels=concernIds.map(id=>issueChips.find(chip=>chip.id===id)?.label??"").filter(Boolean),composedReason=composeTelevetReason(concernLabels,reasonText),aboutLine=concernLabels.length>0?concernLabels.join(", "):reasonText.trim(),toggleConcern=react.useCallback(id=>setConcernIds(current=>current.includes(id)?current.filter(entry=>entry!==id):[...current,id]),[]),matchedClinician=clinicians?.find(c=>c.clinicianId===clinicianId)??clinicians?.[0]??null,where=useTelevetWhere({hostState:hostState,state:state,policy:policy,clinician:matchedClinician,petName:petName??TELEVET_BOOKING_COPY.petFallback,controller:controller,onState:react.useCallback(code=>{whereTouched.current=true,dispatch({type:"patch",patch:{state:code,clinicianId:null}})},[dispatch])});return{issueChips:issueChips,concernIds:concernIds,toggleConcern:toggleConcern,composedReason:composedReason,aboutLine:aboutLine,emergencyAnswer:emergencyAnswer,setEmergencyAnswer:setEmergencyAnswer,where:where,matchedClinician:matchedClinician,whereTouched:whereTouched}}var DEFAULT_ROOT_HEADING_LEVEL=2;function headingLevel(value){return typeof value!="number"||!Number.isInteger(value)?DEFAULT_ROOT_HEADING_LEVEL:value<1?1:value>6?6:value}function nextHeadingLevel(level){return level>=6?6:level+1}function headingTag(level){return`h${String(level)}`}var NESTED_HEADING_LEVEL_DEFAULT=nextHeadingLevel(DEFAULT_ROOT_HEADING_LEVEL),NestedHeadingLevelContext=react.createContext(NESTED_HEADING_LEVEL_DEFAULT);function useNestedHeadingLevel(){return react.useContext(NestedHeadingLevelContext)}function slotBox(slot,borderWidth){if(slot===void 0)return{};let out={};return slot.backgroundColor!==void 0&&(out.backgroundColor=slot.backgroundColor),slot.borderColor!==void 0&&(out.borderColor=slot.borderColor,out.borderWidth=borderWidth??1),slot.borderRadius!==void 0&&(out.borderRadius=slot.borderRadius),out}function slotText(slot){return slot?.textColor===void 0?{}:{color:slot.textColor}}function slotBoxCss(slot,borderWidth){let box=slotBox(slot,borderWidth),out={};return box.backgroundColor!==void 0&&(out.backgroundColor=box.backgroundColor),box.borderColor!==void 0&&(out.border=`${box.borderWidth??1}px solid ${box.borderColor}`),box.borderRadius!==void 0&&(out.borderRadius=box.borderRadius),out}var VISUALLY_HIDDEN=/* @__PURE__ */Object.freeze({position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0});function slotCss(slot,borderWidth){return{...slotBoxCss(slot,borderWidth),...slotText(slot)}}function slotLonghandCss(slot,borderWidth){let box=slotBox(slot,borderWidth),out={};return box.backgroundColor!==void 0&&(out.backgroundColor=box.backgroundColor),box.borderColor!==void 0&&(out.borderStyle="solid",out.borderWidth=box.borderWidth??1,out.borderColor=box.borderColor),box.borderRadius!==void 0&&(out.borderRadius=box.borderRadius),{...out,...slotText(slot)}}function slotInset(slot,inset){return slot?.backgroundColor===void 0&&slot?.borderColor===void 0?{}:{paddingLeft:inset,paddingRight:inset}}function slotRadius(slot){return slot?.borderRadius===void 0?{}:{borderRadius:slot.borderRadius}}var MIN_TOUCH_TARGET=44;function useBookingStyles(){let theme=useEverfurTheme();return react.useMemo(()=>makeBookingStyles(theme),[theme])}function TelevetButton({label:label,onPress:onPress,kind:kind="primary",size:size="md",disabled:disabled=false,loading:loading=false,fullWidth:fullWidth=true,accessibilityLabel:accessibilityLabel,describedBy:describedBy,busyAnnouncement:busyAnnouncement,testID:testID,style:style}){let styles=useBookingStyles(),blocked=disabled||loading,press=useTelevetPress(blocked),button=/* @__PURE__ */jsxRuntime.jsx("button",{type:"button",onClick:blocked?void 0:onPress,...press.handlers,"aria-disabled":blocked||void 0,"aria-busy":loading||void 0,...accessibilityLabel&&accessibilityLabel!==label?{"aria-label":accessibilityLabel}:{},...describedBy?{"aria-describedby":describedBy}:{},"data-testid":testID,style:{...styles.button,...kind==="primary"?styles.buttonPrimary:kind==="danger"?styles.buttonDanger:kind==="quiet"?styles.buttonQuiet:styles.buttonSecondary,...size==="lg"?styles.buttonLarge:null,...fullWidth?styles.buttonFull:styles.buttonAuto,...blocked?styles.buttonDisabled:null,...press.style,...style},children:label});return busyAnnouncement===void 0?button:/* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[button,
134
+ return Object.freeze([...ARTIFACT_ISSUES/* @__PURE__ */,Object.freeze({id:TELEVET_OTHER_ISSUE_ID,label:TELEVET_BOOKING_COPY.otherIssue})])}function composeTelevetReason(chipLabels,detail){let labels=chipLabels.filter(label=>label.trim().length>0),text2=detail.trim();return labels.length===0?text2:text2.length===0?labels.join(", "):`${labels.join(", ")}\n${text2}`}var TELEVET_US_STATES=/* @__PURE__ */Object.freeze([["AL","Alabama"],["AK","Alaska"],["AZ","Arizona"],["AR","Arkansas"],["CA","California"],["CO","Colorado"],["CT","Connecticut"],["DE","Delaware"],["DC","District of Columbia"],["FL","Florida"],["GA","Georgia"],["HI","Hawaii"],["ID","Idaho"],["IL","Illinois"],["IN","Indiana"],["IA","Iowa"],["KS","Kansas"],["KY","Kentucky"],["LA","Louisiana"],["ME","Maine"],["MD","Maryland"],["MA","Massachusetts"],["MI","Michigan"],["MN","Minnesota"],["MS","Mississippi"],["MO","Missouri"],["MT","Montana"],["NE","Nebraska"],["NV","Nevada"],["NH","New Hampshire"],["NJ","New Jersey"],["NM","New Mexico"],["NY","New York"],["NC","North Carolina"],["ND","North Dakota"],["OH","Ohio"],["OK","Oklahoma"],["OR","Oregon"],["PA","Pennsylvania"],["RI","Rhode Island"],["SC","South Carolina"],["SD","South Dakota"],["TN","Tennessee"],["TX","Texas"],["UT","Utah"],["VT","Vermont"],["VA","Virginia"],["WA","Washington"],["WV","West Virginia"],["WI","Wisconsin"],["WY","Wyoming"]].map(([code,name])=>/* @__PURE__ */Object.freeze({code:code,name:name})));function televetStateName(code){let upper=code?.trim().toUpperCase()??"";return TELEVET_US_STATES.find(s=>s.code===upper)?.name??upper}function televetWhereMeta(policy,petName){return policy?policy.wellnessAvailable?policy.prescriptionsAvailable?fill(TELEVET_BOOKING_COPY.wherePrescribeMetaTemplate,{pet:petName}):TELEVET_BOOKING_COPY.whereWellnessMeta:TELEVET_BOOKING_COPY.stateBlockedTitle:null}function televetWhereLicensedLine(clinician,policy,state,petName){if(!clinician||!policy||!state||!policy.prescriptionsAvailable)return null;let code=state.trim().toUpperCase();return clinician.licensedStates.some(l=>l.state.trim().toUpperCase()===code&&l.canPrescribe)?fill(TELEVET_BOOKING_COPY.whereLicensedTemplate,{vet:clinician.displayName,state:televetStateName(code),pet:petName}):null}function useTelevetWhere(args){let{hostState:hostState,state:state,policy:policy,clinician:clinician,petName:petName,controller:controller,onState:onState}=args,host=hostState&&isWellFormedStateCode(hostState)?hostState.trim().toUpperCase():null,current=state&&isWellFormedStateCode(state)?state.trim().toUpperCase():null,hostPolicy=useTelevetStatePolicy(host,controller),[otherMode,setOtherMode]=react.useState(host===null||current!==null&&current!==host),otherSelected=host===null||otherMode,pickHost=react.useCallback(()=>{host!==null&&(setOtherMode(false),onState(host))},[host,onState]),pickOther=react.useCallback(()=>{setOtherMode(true),current===host&&onState(null)},[current,host,onState]),pickState=react.useCallback(code=>{setOtherMode(true),onState(code.trim().toUpperCase())},[onState]),hostPlace=host===null?null:{code:host,name:televetStateName(host),meta:televetWhereMeta(hostPolicy.data,petName)},otherCode=otherSelected&&current!==null&&(host===null||current!==host||otherMode)?current:null,otherPlace=otherCode===null?null:{code:otherCode,name:televetStateName(otherCode),meta:televetWhereMeta(policy.data,petName)};return{hostPlace:hostPlace,otherSelected:otherSelected,otherPlace:otherPlace,licensedLine:televetWhereLicensedLine(clinician,policy.data,current,petName),stateName:current===null?null:televetStateName(current),canContinue:current!==null,pickHost:pickHost,pickOther:pickOther,pickState:pickState}}function useTelevetBookingIntake(args){let{reasonText:reasonText,state:state,hostState:hostState,clinicianId:clinicianId,clinicians:clinicians,policy:policy,petName:petName,controller:controller,dispatch:dispatch}=args,[concernIds,setConcernIds]=react.useState([]),[emergencyAnswer,setEmergencyAnswer]=react.useState(null),whereTouched=react.useRef(false),issueChips=react.useMemo(()=>televetIssueChips(),[]),concernLabels=concernIds.map(id=>issueChips.find(chip=>chip.id===id)?.label??"").filter(Boolean),composedReason=composeTelevetReason(concernLabels,reasonText),aboutLine=concernLabels.length>0?concernLabels.join(", "):reasonText.trim(),toggleConcern=react.useCallback(id=>setConcernIds(current=>current.includes(id)?current.filter(entry=>entry!==id):[...current,id]),[]),matchedClinician=clinicians?.find(c=>c.clinicianId===clinicianId)??clinicians?.[0]??null,where=useTelevetWhere({hostState:hostState,state:state,policy:policy,clinician:matchedClinician,petName:petName??TELEVET_BOOKING_COPY.petFallback,controller:controller,onState:react.useCallback(code=>{whereTouched.current=true,dispatch({type:"patch",patch:{state:code,clinicianId:null}})},[dispatch])});return{issueChips:issueChips,concernIds:concernIds,toggleConcern:toggleConcern,composedReason:composedReason,aboutLine:aboutLine,emergencyAnswer:emergencyAnswer,setEmergencyAnswer:setEmergencyAnswer,where:where,matchedClinician:matchedClinician,whereTouched:whereTouched}}var DEFAULT_ROOT_HEADING_LEVEL=2;function headingLevel(value){return typeof value!="number"||!Number.isInteger(value)?DEFAULT_ROOT_HEADING_LEVEL:value<1?1:value>6?6:value}function nextHeadingLevel(level){return level>=6?6:level+1}function headingTag(level){return`h${String(level)}`}var NESTED_HEADING_LEVEL_DEFAULT=nextHeadingLevel(DEFAULT_ROOT_HEADING_LEVEL),NestedHeadingLevelContext=react.createContext(NESTED_HEADING_LEVEL_DEFAULT);function useNestedHeadingLevel(){return react.useContext(NestedHeadingLevelContext)}function slotBox(slot,borderWidth){if(slot===void 0)return{};let out={};return slot.backgroundColor!==void 0&&(out.backgroundColor=slot.backgroundColor),slot.borderColor!==void 0&&(out.borderColor=slot.borderColor,out.borderWidth=borderWidth??1),slot.borderRadius!==void 0&&(out.borderRadius=slot.borderRadius),out}function insetSlot(slot,corner){return slot===void 0||slot.borderRadius!==void 0||slot.backgroundColor===void 0&&slot.borderColor===void 0?slot:{...slot,borderRadius:corner}}function slotText(slot){return slot?.textColor===void 0?{}:{color:slot.textColor}}function slotBoxCss(slot,borderWidth){let box=slotBox(slot,borderWidth),out={};return box.backgroundColor!==void 0&&(out.backgroundColor=box.backgroundColor),box.borderColor!==void 0&&(out.border=`${box.borderWidth??1}px solid ${box.borderColor}`),box.borderRadius!==void 0&&(out.borderRadius=box.borderRadius),out}var VISUALLY_HIDDEN=/* @__PURE__ */Object.freeze({position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0});function slotCss(slot,borderWidth){return{...slotBoxCss(slot,borderWidth),...slotText(slot)}}function slotLonghandCss(slot,borderWidth){let box=slotBox(slot,borderWidth),out={};return box.backgroundColor!==void 0&&(out.backgroundColor=box.backgroundColor),box.borderColor!==void 0&&(out.borderStyle="solid",out.borderWidth=box.borderWidth??1,out.borderColor=box.borderColor),box.borderRadius!==void 0&&(out.borderRadius=box.borderRadius),{...out,...slotText(slot)}}function slotInset(slot,inset){return slot?.backgroundColor===void 0&&slot?.borderColor===void 0?{}:{paddingLeft:inset,paddingRight:inset}}function slotRadius(slot){return slot?.borderRadius===void 0?{}:{borderRadius:slot.borderRadius}}var MIN_TOUCH_TARGET=44;function useBookingStyles(){let theme=useEverfurTheme();return react.useMemo(()=>makeBookingStyles(theme),[theme])}function TelevetButton({label:label,onPress:onPress,kind:kind="primary",size:size="md",disabled:disabled=false,loading:loading=false,fullWidth:fullWidth=true,accessibilityLabel:accessibilityLabel,describedBy:describedBy,busyAnnouncement:busyAnnouncement,testID:testID,style:style}){let styles=useBookingStyles(),blocked=disabled||loading,press=useTelevetPress(blocked),button=/* @__PURE__ */jsxRuntime.jsx("button",{type:"button",onClick:blocked?void 0:onPress,...press.handlers,"aria-disabled":blocked||void 0,"aria-busy":loading||void 0,...accessibilityLabel&&accessibilityLabel!==label?{"aria-label":accessibilityLabel}:{},...describedBy?{"aria-describedby":describedBy}:{},"data-testid":testID,style:{...styles.button,...kind==="primary"?styles.buttonPrimary:kind==="danger"?styles.buttonDanger:kind==="quiet"?styles.buttonQuiet:styles.buttonSecondary,...size==="lg"?styles.buttonLarge:null,...fullWidth?styles.buttonFull:styles.buttonAuto,...blocked?styles.buttonDisabled:null,...press.style,...style},children:label});return busyAnnouncement===void 0?button:/* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[button,
135
135
  /* @__PURE__ */jsxRuntime.jsx("span",{role:"status",style:VISUALLY_HIDDEN,children:loading?busyAnnouncement:""})]})}function TelevetStateCard({title:title,message:message,actionLabel:actionLabel,onAction:onAction,testID:testID}){let styles=useBookingStyles(),Title=headingTag(useNestedHeadingLevel()),actionable=typeof actionLabel=="string"&&actionLabel.length>0&&typeof onAction=="function";/* @__PURE__ */
136
136
  return jsxRuntime.jsxs("div",{style:styles.stateCard,"data-testid":testID,children:[
137
137
  /* @__PURE__ */jsxRuntime.jsx(Title,{style:styles.stateTitle,children:title}),message?/* @__PURE__ */jsxRuntime.jsx("p",{style:{...styles.stateMessage,...styles.cardInk},children:message}):null,actionable?/* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:actionLabel,onPress:onAction,kind:"secondary",fullWidth:false}):null]})}function useTelevetPress(disabled=false,scale=.97){let theme=useEverfurTheme(),[pressed,setPressed]=react.useState(false);if(theme.motion.reducedMotion||disabled)return{handlers:{},style:{}};let up=()=>setPressed(false);return{handlers:{onPointerDown:()=>setPressed(true),onPointerUp:up,onPointerLeave:up,onPointerCancel:up},style:{transform:pressed?`scale(${String(scale)})`:void 0,transition:`transform ${String(TELEVET_PRESS_MS)}ms ${theme.motion.easing.emphasized}, background-color ${String(theme.motion.duration.normal)}ms ease, border-color ${String(theme.motion.duration.normal)}ms ease`}}}var TELEVET_PRESS_MS=160;function TelevetSkeletonBlock({height:height,width:width="100%",testID:testID}){let styles=useBookingStyles();/* @__PURE__ */
138
138
  return jsxRuntime.jsx("span",{"aria-hidden":"true","data-testid":testID,style:{...styles.skeleton,height:height,width:width}})}function TelevetFailureLine({message:message,assertive:assertive=false,id:id,testID:testID,style:style}){let styles=useBookingStyles();/* @__PURE__ */
139
139
  return jsxRuntime.jsx("p",{role:assertive?"alert":"status",...id===void 0?{}:{id:id},"data-testid":testID,style:{...styles.failure,...style},children:message})}function makeBookingStyles(theme){let{color:color,space:space,radius:radius,type:type,slots:slots}=theme,{size:size,lineHeight:lineHeight}=type,rem=n=>`${String(n)}px`;return{screen:{...SURFACE_ROOT_RESET,display:"flex",flexDirection:"column",minHeight:0,flex:"1 1 auto",gap:rem(space.md),paddingLeft:rem(space.xl),paddingRight:rem(space.xl),boxSizing:"border-box"},stepFill:{display:"flex",flexDirection:"column",flex:"1 1 auto",minHeight:0,gap:rem(space.md)},list:{display:"flex",flexDirection:"column",gap:rem(space.sm)},button:{minHeight:MIN_TOUCH_TARGET,display:"inline-flex",alignItems:"center",justifyContent:"center",gap:rem(space.sm),paddingLeft:rem(20),paddingRight:rem(20),paddingTop:rem(space.xs),paddingBottom:rem(space.xs),borderRadius:rem(radius.pill),borderStyle:"solid",borderWidth:1.5,borderColor:"transparent",cursor:"pointer",textAlign:"center",...faceCss(theme,"bold"),fontSize:rem(size.bodyTight),lineHeight:String(lineHeight.snug),boxSizing:"border-box"},buttonLarge:{minHeight:52,paddingLeft:rem(26),paddingRight:rem(26),fontSize:rem(16)},buttonFull:{alignSelf:"stretch",width:"100%"},buttonAuto:{alignSelf:"flex-start",minWidth:MIN_TOUCH_TARGET},buttonPrimary:{backgroundColor:color.primary,borderColor:color.primaryEdge,color:color.onPrimary,...slotBoxCss(slots.primaryButton),...slotText(slots.primaryButton)},buttonSecondary:{borderColor:color.brandInk,backgroundColor:color.surface,color:color.brandInk,...slots.primaryButton?.borderRadius===void 0?null:{borderRadius:rem(slots.primaryButton.borderRadius)},...slots.primaryButton?.borderColor===void 0?null:{borderColor:slots.primaryButton.borderColor}},buttonDanger:{backgroundColor:color.danger,borderColor:color.danger,color:color.onDanger},buttonQuiet:{backgroundColor:"transparent",borderColor:"transparent",color:color.brandInk,paddingLeft:rem(space.sm),paddingRight:rem(space.sm)},buttonDisabled:{opacity:.45,cursor:"not-allowed"},stateCard:{minHeight:140,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:rem(space.sm),padding:rem(space.lg),borderRadius:rem(radius.lg),borderStyle:"solid",borderWidth:1,borderColor:color.brandBorder,boxSizing:"border-box",...slotLonghandCss(slots.card,1)},stateTitle:{margin:0,...headingFaceCss(theme,"medium"),color:slots.card?.textColor??color.brandInk,fontSize:rem(size.subtitle),lineHeight:String(lineHeight.snug)},cardInk:slots.card?.textColor===void 0?{}:{color:slots.card.textColor},stateMessage:{margin:0,...faceCss(theme,"regular"),color:color.text.metaCool,fontSize:rem(size.body),lineHeight:String(lineHeight.normal)},skeleton:{display:"block",borderRadius:rem(radius.md),backgroundColor:color.skeleton,flexShrink:0},failure:{margin:0,...faceCss(theme,"regular"),color:color.danger,fontSize:rem(size.caption),lineHeight:String(lineHeight.normal)},stepTitle:{margin:0,...headingFaceCss(theme,"medium"),color:color.brandInk,fontSize:rem(tierPx(theme,"heading",30)),lineHeight:"1.1",letterSpacing:"-0.03em",textAlign:"left",textWrap:"balance"},stepHelp:{margin:0,...faceCss(theme,"regular"),color:color.text.primary,fontSize:rem(size.body),lineHeight:String(lineHeight.relaxed),textAlign:"left",maxWidth:"62ch"},divider:{height:1,backgroundColor:color.brandBorder,flexShrink:0},scrollRoot:{display:"flex",flexDirection:"column",flex:"1 1 auto",minHeight:0},scrollBody:{position:"relative",flex:"1 1 auto",minHeight:0,overflowY:"auto",overscrollBehavior:"contain"},scrollFooter:{flexShrink:0,paddingTop:rem(space.md),paddingBottom:rem(space.lg)}}}function TelevetEmergencyExits({petName:petName,primaryVet:primaryVet,onFindEmergencyVet:onFindEmergencyVet,testIDPrefix:testIDPrefix}){let theme=useEverfurTheme(),local=react.useMemo(()=>makeExitStyles(theme),[theme]),name=petName?.trim()??"",hintId=`${react.useId()}-primary-vet-hint`;/* @__PURE__ */
140
- return jsxRuntime.jsxs("div",{style:local.exits,"data-testid":`${testIDPrefix}-exits`,children:[onFindEmergencyVet?/* @__PURE__ */jsxRuntime.jsxs("button",{type:"button",onClick:()=>{callHost(onFindEmergencyVet)},style:{...local.card,...local.cardButton},"data-testid":`${testIDPrefix}-find-vet`,children:[
140
+ return jsxRuntime.jsxs("div",{style:local.exits,"data-testid":`${testIDPrefix}-exits`,children:[onFindEmergencyVet?null:/* @__PURE__ */jsxRuntime.jsx("div",{style:local.card,"data-testid":`${testIDPrefix}-go-to-er`,children:/* @__PURE__ */jsxRuntime.jsx("span",{style:local.text,children:/* @__PURE__ */jsxRuntime.jsx("span",{style:local.title,children:TELEVET_EMERGENCY_EXITS_WEB.goToEmergencyVet})})}),onFindEmergencyVet?/* @__PURE__ */jsxRuntime.jsxs("button",{type:"button",onClick:()=>{callHost(onFindEmergencyVet)},style:{...local.card,...local.cardButton},"data-testid":`${testIDPrefix}-find-vet`,children:[
141
141
  /* @__PURE__ */jsxRuntime.jsx("span",{style:local.text,children:/* @__PURE__ */jsxRuntime.jsx("span",{style:local.title,children:TELEVET_EMERGENCY_EXITS_WEB.findEmergencyVet})}),
142
142
  /* @__PURE__ */jsxRuntime.jsx(Chevron,{})]}):null,
143
143
  /* @__PURE__ */jsxRuntime.jsxs("a",{href:TELEVET_EMERGENCY_EXITS_WEB.poisonControlTel,style:local.card,"data-testid":`${testIDPrefix}-poison-control`,children:[
@@ -194,7 +194,7 @@ return jsxRuntime.jsxs("dialog",{ref:dialogRef,onKeyDown:onKeyDown,onCancel:onCa
194
194
  /* @__PURE__ */jsxRuntime.jsx("p",{id:bodyId,style:styles.dialogBody,children:TELEVET_BOOKING_COPY_WEB.chrome.discardBody}),
195
195
  /* @__PURE__ */jsxRuntime.jsxs("div",{style:styles.dialogActions,children:[
196
196
  /* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_BOOKING_COPY_WEB.chrome.discardKeepCta,onPress:onKeep,kind:"primary",fullWidth:false,testID:"televet-booking-discard-keep"}),
197
- /* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_BOOKING_COPY_WEB.chrome.discardConfirmCta,onPress:onLeave,kind:"secondary",fullWidth:false,testID:"televet-booking-discard-leave"})]})]})}var BACK_LABEL="Back";function makeStyles3(theme){let{color:color,space:space,radius:radius,type:type,slots:slots}=theme,{size:size,lineHeight:lineHeight}=type,rem=n=>`${String(n)}px`,reduced=theme.motion.reducedMotion,headerInk=slots.header?.textColor??color.brandInk,headerBoxed=slots.header?.backgroundColor!==void 0||slots.header?.borderColor!==void 0,dialogText=slots.dialog?.textColor;return{wrap:{flexShrink:0},bar:{display:"flex",flexDirection:"row",alignItems:"center",gap:rem(14),paddingTop:rem(space.xs),paddingBottom:rem(space.xl),minHeight:56,boxSizing:"border-box",...slotLonghandCss(slots.header,1),...slotInset(slots.header,space.md),...headerBoxed?{paddingBottom:rem(space.xs),marginBottom:rem(space.xl-space.xs)}:null},logo:{logo:{display:"block",height:28,width:"auto",maxWidth:96,objectFit:"contain",flexShrink:0}},ring:{width:MIN_TOUCH_TARGET,height:MIN_TOUCH_TARGET,flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,borderRadius:"50%",borderStyle:"solid",borderWidth:1.5,borderColor:color.borderRingCream,backgroundColor:color.surface,color:color.brandInk,cursor:"pointer",boxSizing:"border-box"},back:{flexShrink:0,minHeight:MIN_TOUCH_TARGET,padding:`0 ${rem(space.sm)}`,background:"transparent",borderStyle:"none",cursor:"pointer",...faceCss(theme,"bold"),color:headerInk,fontSize:rem(size.bodyTight)},track:{flex:"1 1 auto",minWidth:0,height:6,borderRadius:rem(6),backgroundColor:color.surfaceSubtle,overflow:"hidden"},fill:{display:"block",height:"100%",borderRadius:rem(6),backgroundColor:color.brandInk,transformOrigin:"0 50%",transition:reduced?"none":`transform 600ms ${TELEVET_EASE_IO}`},stepLabel:{margin:0,flexShrink:0,...faceCss(theme,"monoBold"),color:headerInk,fontSize:rem(12),letterSpacing:"0.1em",textTransform:"uppercase",whiteSpace:"nowrap",lineHeight:String(lineHeight.snug)},dialog:{margin:"auto",maxWidth:420,width:"calc(100% - 32px)",boxSizing:"border-box",padding:rem(space.lg),borderRadius:rem(radius.lg),borderStyle:"solid",borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,color:color.text.primary,...slotLonghandCss(slots.dialog,1)},dialogTitle:{margin:0,...headingFaceCss(theme,"medium"),color:dialogText??color.brandInk,fontSize:rem(size.subtitle),lineHeight:String(lineHeight.snug)},dialogBody:{margin:0,paddingTop:rem(space.sm),...faceCss(theme,"regular"),color:dialogText??color.text.metaCool,fontSize:rem(size.body),lineHeight:String(lineHeight.normal)},dialogActions:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:rem(space.sm),paddingTop:rem(space.lg)}}}function formatTelevetPetMetaLine(pet){let parts=[],breed=pet.breed?.trim();breed&&parts.push(breed);let years=wholeYears(pet.ageYears);years!==null&&parts.push(`${String(years)} year${years===1?"":"s"}`);let weight=pet.weightKg;return typeof weight=="number"&&Number.isFinite(weight)&&weight>0&&parts.push(`${String(Math.round(weight))} kg`),parts.join(" · ")}function wholeYears(ageYears){if(typeof ageYears!="number"||!Number.isFinite(ageYears))return null;let years=Math.floor(ageYears);return years>=0?years:null}function TelevetIntakeMedia({media:media,onChange:onChange,onPickMedia:onPickMedia,listLabel:listLabel,meta:meta}){let theme=useEverfurTheme(),styles=react.useMemo(()=>makeStyles4(theme),[theme]),remaining=MEDIA_REFS_MAX-media.length,[busy,setBusy]=react.useState(false);if(!onPickMedia)return null;let pick2=async()=>{if(!(busy||remaining<=0)){setBusy(true);try{let outcome=await callHostAsync(onPickMedia,remaining);if(!outcome.ok||outcome.value===null||outcome.value.length===0)return;let existing=new Set(media.map(m=>m.uri)),fresh2=outcome.value.filter(p=>typeof p?.uri=="string"&&p.uri.length>0&&!existing.has(p.uri));if(fresh2.length===0)return;onChange([...media,...fresh2].slice(0,MEDIA_REFS_MAX))}finally{setBusy(false)}}};/* @__PURE__ */
197
+ /* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_BOOKING_COPY_WEB.chrome.discardConfirmCta,onPress:onLeave,kind:"secondary",fullWidth:false,testID:"televet-booking-discard-leave"})]})]})}var BACK_LABEL="Back";function makeStyles3(theme){let{color:color,space:space,radius:radius,type:type,slots:slots}=theme,{size:size,lineHeight:lineHeight}=type,rem=n=>`${String(n)}px`,reduced=theme.motion.reducedMotion,headerInk=slots.header?.textColor??color.brandInk,headerBoxed=slots.header?.backgroundColor!==void 0||slots.header?.borderColor!==void 0,headerBox=insetSlot(slots.header,radius.lg),dialogText=slots.dialog?.textColor;return{wrap:{flexShrink:0},bar:{display:"flex",flexDirection:"row",alignItems:"center",gap:rem(14),paddingTop:rem(space.xs),paddingBottom:rem(space.xl),minHeight:56,boxSizing:"border-box",...slotLonghandCss(headerBox,1),...slotInset(headerBox,space.md),...headerBoxed?{paddingBottom:rem(space.xs),marginBottom:rem(space.xl-space.xs)}:null},logo:{logo:{display:"block",height:28,width:"auto",maxWidth:96,objectFit:"contain",flexShrink:0}},ring:{width:MIN_TOUCH_TARGET,height:MIN_TOUCH_TARGET,flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,borderRadius:"50%",borderStyle:"solid",borderWidth:1.5,borderColor:color.borderRingCream,backgroundColor:color.surface,color:color.brandInk,cursor:"pointer",boxSizing:"border-box"},back:{flexShrink:0,minHeight:MIN_TOUCH_TARGET,padding:`0 ${rem(space.sm)}`,background:"transparent",borderStyle:"none",cursor:"pointer",...faceCss(theme,"bold"),color:headerInk,fontSize:rem(size.bodyTight)},track:{flex:"1 1 auto",minWidth:0,height:6,borderRadius:rem(6),backgroundColor:color.surfaceSubtle,overflow:"hidden"},fill:{display:"block",height:"100%",borderRadius:rem(6),backgroundColor:color.brandInk,transformOrigin:"0 50%",transition:reduced?"none":`transform 600ms ${TELEVET_EASE_IO}`},stepLabel:{margin:0,flexShrink:0,...faceCss(theme,"monoBold"),color:headerInk,fontSize:rem(12),letterSpacing:"0.1em",textTransform:"uppercase",whiteSpace:"nowrap",lineHeight:String(lineHeight.snug)},dialog:{margin:"auto",maxWidth:420,width:"calc(100% - 32px)",boxSizing:"border-box",padding:rem(space.lg),borderRadius:rem(radius.lg),borderStyle:"solid",borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,color:color.text.primary,...slotLonghandCss(slots.dialog,1)},dialogTitle:{margin:0,...headingFaceCss(theme,"medium"),color:dialogText??color.brandInk,fontSize:rem(size.subtitle),lineHeight:String(lineHeight.snug)},dialogBody:{margin:0,paddingTop:rem(space.sm),...faceCss(theme,"regular"),color:dialogText??color.text.metaCool,fontSize:rem(size.body),lineHeight:String(lineHeight.normal)},dialogActions:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:rem(space.sm),paddingTop:rem(space.lg)}}}function formatTelevetPetMetaLine(pet){let parts=[],breed=pet.breed?.trim();breed&&parts.push(breed);let years=wholeYears(pet.ageYears);years!==null&&parts.push(`${String(years)} year${years===1?"":"s"}`);let weight=pet.weightKg;return typeof weight=="number"&&Number.isFinite(weight)&&weight>0&&parts.push(`${String(Math.round(weight))} kg`),parts.join(" · ")}function wholeYears(ageYears){if(typeof ageYears!="number"||!Number.isFinite(ageYears))return null;let years=Math.floor(ageYears);return years>=0?years:null}function TelevetIntakeMedia({media:media,onChange:onChange,onPickMedia:onPickMedia,listLabel:listLabel,meta:meta}){let theme=useEverfurTheme(),styles=react.useMemo(()=>makeStyles4(theme),[theme]),remaining=MEDIA_REFS_MAX-media.length,[busy,setBusy]=react.useState(false);if(!onPickMedia)return null;let pick2=async()=>{if(!(busy||remaining<=0)){setBusy(true);try{let outcome=await callHostAsync(onPickMedia,remaining);if(!outcome.ok||outcome.value===null||outcome.value.length===0)return;let existing=new Set(media.map(m=>m.uri)),fresh2=outcome.value.filter(p=>typeof p?.uri=="string"&&p.uri.length>0&&!existing.has(p.uri));if(fresh2.length===0)return;onChange([...media,...fresh2].slice(0,MEDIA_REFS_MAX))}finally{setBusy(false)}}};/* @__PURE__ */
198
198
  return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[
199
199
  /* @__PURE__ */jsxRuntime.jsxs("ul",{role:"list","aria-label":listLabel,style:styles.row,children:[media.map((m,i)=>/* @__PURE__ */jsxRuntime.jsxs("li",{style:styles.thumb,children:[
200
200
  /* @__PURE__ */jsxRuntime.jsx("img",{src:m.uri,alt:m.filename,style:styles.thumbImage}),m.mimeType.startsWith("video/")?/* @__PURE__ */jsxRuntime.jsx("span",{"aria-hidden":"true",style:styles.videoBadge,"data-testid":`televet-intake-media-video-${String(i)}`,children:VIDEO_GLYPH}):null,
@@ -1,22 +1,22 @@
1
1
  import { ReactNode, CSSProperties } from 'react';
2
2
  import { P as PetRef } from '../../../ids-B2GAAifq.cjs';
3
3
  export { B as Brand, _ as __brand } from '../../../ids-B2GAAifq.cjs';
4
- import { c as TelevetBookingStep, d as TelevetBookingContext, e as TelevetBookingController, f as TelevetTriageRead, g as TelevetStateInterestWrite, T as TelevetEmptyRosterCause, a as TelevetStateInterestAction$1, b as TelevetMediaShortfall, h as TelevetVetThreadTarget, i as TelevetDayPeriod } from '../../../bookingCopy-oEjqkiNA.cjs';
5
- export { C as CONSULT_MINUTES, N as NO_MEDIA_SHORTFALL, j as TELEVET_BOOKING_BASE, k as TELEVET_BOOKING_COPY, l as TELEVET_BOOKING_STEPS, m as TELEVET_CONSULT_PAGE_LIMIT, n as TELEVET_JOIN_CLOSES_MINUTES_AFTER, o as TELEVET_JOIN_OPENS_MINUTES_BEFORE, p as TELEVET_MESSAGE_THREADS_PATH, q as TelevetAttachmentMeta, r as TelevetAttachmentPolicy, s as TelevetBookingAction, t as TelevetBookingControllerDeps, u as TelevetBookingCopy, v as TelevetBookingDraft, w as TelevetBookingFailure, x as TelevetBookingRefusal, y as TelevetBookingState, z as TelevetEarlyTriage, A as TelevetEmptyRosterView, aR as TelevetJoinBlock, aS as TelevetJoinDecision, D as TelevetJoinState, E as TelevetMediaRefusal, F as TelevetRead, G as TelevetStateInterestReason, H as TelevetWrite, U as UseVetThreadOptions, V as VET_MESSAGES_COPY, I as VET_MESSAGE_CONTENT_MAX, J as VET_MESSAGE_PAGE_DEFAULT, K as VET_MESSAGE_PAGE_MAX, L as VetMessage, M as VetMessagePage, O as VetMessageRole, P as VetMessagesAvailability, Q as VetSendFailure, R as VetThread, S as VetThreadState, W as VetThreadsState, X as VisitSummary, Y as VisitSummaryMedication, Z as VisitSummaryState, _ as attestation, $ as canConfirm, a0 as canManageTelevetVisit, a1 as createTelevetBookingController, a2 as currentStep, a3 as emptyTelevetDraft, a4 as formatVisitRange, a5 as formatWhen, a6 as formatWhenWithDay, a7 as hasPreviousStep, a8 as initialTelevetBookingState, a9 as isHoldExpired, aa as isMediaShortfallEmpty, ab as isSkipped, ac as isTelevetBookingCopyReady, ad as isVetMessagesDark, ae as isVetThreadVetFirst, af as mediaShortfallFromUnsentPicks, ag as splitTelevetVisits, ah as televetBookingKey, ai as televetBookingReducer, aj as televetBookingRefusal, ak as televetCancelCall, al as televetConsultCall, am as televetEmptyRosterCause, an as televetEmptyRosterView, ao as televetHoldCall, ap as televetJoinCall, aT as televetJoinDecision, aq as televetJoinOpensAtMs, as as televetMediaShortfallLines, at as televetRescheduleCall, au as televetThreadMessagesCall, av as televetThreadReadCall, aw as televetVisitSummaryCall, ax as useEarlyTriage, ay as useStateInterest, az as useTelevetBookConsult, aA as useTelevetBookingAvailable, aB as useTelevetBookingController, aC as useTelevetBookingEntitlement, aD as useTelevetCancellationPolicy, aE as useTelevetClinicians, aF as useTelevetHoldSlot, aG as useTelevetJoin, aH as useTelevetNextSlot, aI as useTelevetRescheduleConsult, aJ as useTelevetSlots, aK as useTelevetStatePolicy, aL as useVetThread, aM as useVetThreads, aN as useVisitSummary, aO as validateBookingBody, aP as vetThreadPetRef, aQ as withUnsentPicks } from '../../../bookingCopy-oEjqkiNA.cjs';
4
+ import { c as TelevetBookingStep, d as TelevetBookingContext, e as TelevetBookingController, f as TelevetTriageRead, g as TelevetStateInterestWrite, T as TelevetEmptyRosterCause, a as TelevetStateInterestAction$1, b as TelevetMediaShortfall, h as TelevetVetThreadTarget, i as TelevetDayPeriod } from '../../../bookingCopy-C153FHEC.cjs';
5
+ export { C as CONSULT_MINUTES, N as NO_MEDIA_SHORTFALL, j as TELEVET_BOOKING_BASE, k as TELEVET_BOOKING_COPY, l as TELEVET_BOOKING_STEPS, m as TELEVET_CONSULT_PAGE_LIMIT, n as TELEVET_JOIN_CLOSES_MINUTES_AFTER, o as TELEVET_JOIN_OPENS_MINUTES_BEFORE, p as TELEVET_MESSAGE_THREADS_PATH, q as TelevetAttachmentMeta, r as TelevetAttachmentPolicy, s as TelevetBookingAction, t as TelevetBookingControllerDeps, u as TelevetBookingCopy, v as TelevetBookingDraft, w as TelevetBookingFailure, x as TelevetBookingRefusal, y as TelevetBookingState, z as TelevetEarlyTriage, A as TelevetEmptyRosterView, aR as TelevetJoinBlock, aS as TelevetJoinDecision, D as TelevetJoinState, E as TelevetMediaRefusal, F as TelevetRead, G as TelevetStateInterestReason, H as TelevetWrite, U as UseVetThreadOptions, V as VET_MESSAGES_COPY, I as VET_MESSAGE_CONTENT_MAX, J as VET_MESSAGE_PAGE_DEFAULT, K as VET_MESSAGE_PAGE_MAX, L as VetMessage, M as VetMessagePage, O as VetMessageRole, P as VetMessagesAvailability, Q as VetSendFailure, R as VetThread, S as VetThreadState, W as VetThreadsState, X as VisitSummary, Y as VisitSummaryMedication, Z as VisitSummaryState, _ as attestation, $ as canConfirm, a0 as canManageTelevetVisit, a1 as createTelevetBookingController, a2 as currentStep, a3 as emptyTelevetDraft, a4 as formatVisitRange, a5 as formatWhen, a6 as formatWhenWithDay, a7 as hasPreviousStep, a8 as initialTelevetBookingState, a9 as isHoldExpired, aa as isMediaShortfallEmpty, ab as isSkipped, ac as isTelevetBookingCopyReady, ad as isVetMessagesDark, ae as isVetThreadVetFirst, af as mediaShortfallFromUnsentPicks, ag as splitTelevetVisits, ah as televetBookingKey, ai as televetBookingReducer, aj as televetBookingRefusal, ak as televetCancelCall, al as televetConsultCall, am as televetEmptyRosterCause, an as televetEmptyRosterView, ao as televetHoldCall, ap as televetJoinCall, aT as televetJoinDecision, aq as televetJoinOpensAtMs, as as televetMediaShortfallLines, at as televetRescheduleCall, au as televetThreadMessagesCall, av as televetThreadReadCall, aw as televetVisitSummaryCall, ax as useEarlyTriage, ay as useStateInterest, az as useTelevetBookConsult, aA as useTelevetBookingAvailable, aB as useTelevetBookingController, aC as useTelevetBookingEntitlement, aD as useTelevetCancellationPolicy, aE as useTelevetClinicians, aF as useTelevetHoldSlot, aG as useTelevetJoin, aH as useTelevetNextSlot, aI as useTelevetRescheduleConsult, aJ as useTelevetSlots, aK as useTelevetStatePolicy, aL as useVetThread, aM as useVetThreads, aN as useVisitSummary, aO as validateBookingBody, aP as vetThreadPetRef, aQ as withUnsentPicks } from '../../../bookingCopy-C153FHEC.cjs';
6
6
  import { T as TelevetConsult, E as EverfurTelevetFlowRequest, c as TelevetSlot } from '../../../televetGlobal-C5dTUACe.cjs';
7
7
  export { C as CANCELLATION_POLICY_VERSION_MAX, d as CANCEL_REASON_MAX, e as CONSULT_KINDS, f as CONSULT_STATUSES, g as ConsultKind, h as ConsultStatus, M as MEDIA_REFS_MAX, R as REASON_TEXT_MAX, i as TERMINAL_CONSULT_STATUSES, j as TelevetBookingBody, k as TelevetBookingEntitlement, b as TelevetCancelReceipt, l as TelevetCancellationPolicy, m as TelevetClinician, n as TelevetSlotHold, o as TelevetStatePolicy, p as TelevetTriageVerdict, q as isWellFormedStateCode } from '../../../televetGlobal-C5dTUACe.cjs';
8
8
  import { V as VetVisitIntent } from '../../../visitIntent-D7_yVp1I.cjs';
9
9
  import { a as TelevetMediaPicker, T as TelevetCalendarWriter, b as TelevetPrimaryVet } from '../../../IntakeMedia-BH0fYDT2.cjs';
10
10
  export { e as TelevetBookedScreen, f as TelevetBookedScreenProps, c as TelevetCalendarEvent, g as TelevetEmergencyExits, h as TelevetEmergencyExitsProps, i as TelevetIntakeMedia, d as TelevetIntakeMediaItem, j as TelevetIntakeMediaProps, t as televetConsultCalendarKey } from '../../../IntakeMedia-BH0fYDT2.cjs';
11
- import { m as EverfurTheme } from '../../../tokens-RAKZj7M8.cjs';
12
- export { b as VetCallCredential, c as VetCallJoinRefusal, d as VetCallLimits, p as parseVetCallCredential, v as vetCallJoinReason, e as vetCallJoinRefusal } from '../../../callRoom-DfZTWFXh.cjs';
13
- export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../../EverfurError-pEXDbUJ1.cjs';
14
- export { E as EverfurResult } from '../../../EverfurResult-dtl8ERAw.cjs';
15
- export { W as WidgetPet } from '../../../petsRepository-yyoo0k2I.cjs';
16
- import '../../../requestFunnel-DHeSzCT6.cjs';
17
- import '../../../ErrorPolicyPort-NFDPe-5w.cjs';
18
- import '../../../config-EZzEyS-c.cjs';
19
- import '../../../identity-75whJXyP.cjs';
11
+ import { m as EverfurTheme } from '../../../tokens-DLj8OnLH.cjs';
12
+ export { b as VetCallCredential, c as VetCallJoinRefusal, d as VetCallLimits, p as parseVetCallCredential, v as vetCallJoinReason, e as vetCallJoinRefusal } from '../../../callRoom-BhIdadyV.cjs';
13
+ export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../../EverfurError-DeBqRpQV.cjs';
14
+ export { E as EverfurResult } from '../../../EverfurResult-COlXj1wq.cjs';
15
+ export { W as WidgetPet } from '../../../petsRepository-DkQ2fwZY.cjs';
16
+ import '../../../requestFunnel-CA0ANsWj.cjs';
17
+ import '../../../ErrorPolicyPort-10s3HJCt.cjs';
18
+ import '../../../config-BRyNmzhx.cjs';
19
+ import '../../../identity-CmxZ4GR0.cjs';
20
20
  import '../../../TelemetryPort-BDNr00hu.cjs';
21
21
  import '../../../profile-CSs1wlXT.cjs';
22
22
 
@@ -563,6 +563,8 @@ declare function TelevetVisitSummaryScreen({ consult, controller: injected, onBa
563
563
  * number is the ASPCA's own line, dialled from `poisonControlTel`, never parsed back out of the displayed line.
564
564
  */
565
565
  declare const TELEVET_EMERGENCY_EXITS_WEB: Readonly<{
566
+ /** The box's first row when the host passes no locator. Owner-approved 2026-10-04, exact wording. */
567
+ goToEmergencyVet: string;
566
568
  findEmergencyVet: string;
567
569
  poisonControl: string;
568
570
  poisonControlDetail: string;
@@ -725,6 +727,7 @@ declare const TELEVET_BOOKING_COPY_WEB: Readonly<{
725
727
  ledeWithoutExits: string;
726
728
  exitPrimaryVetTitle: string;
727
729
  exitFindErTitle: string;
730
+ exitGoToErTitle: string;
728
731
  startCallHint: string;
729
732
  poisonControl: string;
730
733
  poisonControlDetail: string;
@@ -1,22 +1,22 @@
1
1
  import { ReactNode, CSSProperties } from 'react';
2
2
  import { P as PetRef } from '../../../ids-B2GAAifq.js';
3
3
  export { B as Brand, _ as __brand } from '../../../ids-B2GAAifq.js';
4
- import { c as TelevetBookingStep, d as TelevetBookingContext, e as TelevetBookingController, f as TelevetTriageRead, g as TelevetStateInterestWrite, T as TelevetEmptyRosterCause, a as TelevetStateInterestAction$1, b as TelevetMediaShortfall, h as TelevetVetThreadTarget, i as TelevetDayPeriod } from '../../../bookingCopy-CUW9Gdzc.js';
5
- export { C as CONSULT_MINUTES, N as NO_MEDIA_SHORTFALL, j as TELEVET_BOOKING_BASE, k as TELEVET_BOOKING_COPY, l as TELEVET_BOOKING_STEPS, m as TELEVET_CONSULT_PAGE_LIMIT, n as TELEVET_JOIN_CLOSES_MINUTES_AFTER, o as TELEVET_JOIN_OPENS_MINUTES_BEFORE, p as TELEVET_MESSAGE_THREADS_PATH, q as TelevetAttachmentMeta, r as TelevetAttachmentPolicy, s as TelevetBookingAction, t as TelevetBookingControllerDeps, u as TelevetBookingCopy, v as TelevetBookingDraft, w as TelevetBookingFailure, x as TelevetBookingRefusal, y as TelevetBookingState, z as TelevetEarlyTriage, A as TelevetEmptyRosterView, aR as TelevetJoinBlock, aS as TelevetJoinDecision, D as TelevetJoinState, E as TelevetMediaRefusal, F as TelevetRead, G as TelevetStateInterestReason, H as TelevetWrite, U as UseVetThreadOptions, V as VET_MESSAGES_COPY, I as VET_MESSAGE_CONTENT_MAX, J as VET_MESSAGE_PAGE_DEFAULT, K as VET_MESSAGE_PAGE_MAX, L as VetMessage, M as VetMessagePage, O as VetMessageRole, P as VetMessagesAvailability, Q as VetSendFailure, R as VetThread, S as VetThreadState, W as VetThreadsState, X as VisitSummary, Y as VisitSummaryMedication, Z as VisitSummaryState, _ as attestation, $ as canConfirm, a0 as canManageTelevetVisit, a1 as createTelevetBookingController, a2 as currentStep, a3 as emptyTelevetDraft, a4 as formatVisitRange, a5 as formatWhen, a6 as formatWhenWithDay, a7 as hasPreviousStep, a8 as initialTelevetBookingState, a9 as isHoldExpired, aa as isMediaShortfallEmpty, ab as isSkipped, ac as isTelevetBookingCopyReady, ad as isVetMessagesDark, ae as isVetThreadVetFirst, af as mediaShortfallFromUnsentPicks, ag as splitTelevetVisits, ah as televetBookingKey, ai as televetBookingReducer, aj as televetBookingRefusal, ak as televetCancelCall, al as televetConsultCall, am as televetEmptyRosterCause, an as televetEmptyRosterView, ao as televetHoldCall, ap as televetJoinCall, aT as televetJoinDecision, aq as televetJoinOpensAtMs, as as televetMediaShortfallLines, at as televetRescheduleCall, au as televetThreadMessagesCall, av as televetThreadReadCall, aw as televetVisitSummaryCall, ax as useEarlyTriage, ay as useStateInterest, az as useTelevetBookConsult, aA as useTelevetBookingAvailable, aB as useTelevetBookingController, aC as useTelevetBookingEntitlement, aD as useTelevetCancellationPolicy, aE as useTelevetClinicians, aF as useTelevetHoldSlot, aG as useTelevetJoin, aH as useTelevetNextSlot, aI as useTelevetRescheduleConsult, aJ as useTelevetSlots, aK as useTelevetStatePolicy, aL as useVetThread, aM as useVetThreads, aN as useVisitSummary, aO as validateBookingBody, aP as vetThreadPetRef, aQ as withUnsentPicks } from '../../../bookingCopy-CUW9Gdzc.js';
4
+ import { c as TelevetBookingStep, d as TelevetBookingContext, e as TelevetBookingController, f as TelevetTriageRead, g as TelevetStateInterestWrite, T as TelevetEmptyRosterCause, a as TelevetStateInterestAction$1, b as TelevetMediaShortfall, h as TelevetVetThreadTarget, i as TelevetDayPeriod } from '../../../bookingCopy-DR0-SmqH.js';
5
+ export { C as CONSULT_MINUTES, N as NO_MEDIA_SHORTFALL, j as TELEVET_BOOKING_BASE, k as TELEVET_BOOKING_COPY, l as TELEVET_BOOKING_STEPS, m as TELEVET_CONSULT_PAGE_LIMIT, n as TELEVET_JOIN_CLOSES_MINUTES_AFTER, o as TELEVET_JOIN_OPENS_MINUTES_BEFORE, p as TELEVET_MESSAGE_THREADS_PATH, q as TelevetAttachmentMeta, r as TelevetAttachmentPolicy, s as TelevetBookingAction, t as TelevetBookingControllerDeps, u as TelevetBookingCopy, v as TelevetBookingDraft, w as TelevetBookingFailure, x as TelevetBookingRefusal, y as TelevetBookingState, z as TelevetEarlyTriage, A as TelevetEmptyRosterView, aR as TelevetJoinBlock, aS as TelevetJoinDecision, D as TelevetJoinState, E as TelevetMediaRefusal, F as TelevetRead, G as TelevetStateInterestReason, H as TelevetWrite, U as UseVetThreadOptions, V as VET_MESSAGES_COPY, I as VET_MESSAGE_CONTENT_MAX, J as VET_MESSAGE_PAGE_DEFAULT, K as VET_MESSAGE_PAGE_MAX, L as VetMessage, M as VetMessagePage, O as VetMessageRole, P as VetMessagesAvailability, Q as VetSendFailure, R as VetThread, S as VetThreadState, W as VetThreadsState, X as VisitSummary, Y as VisitSummaryMedication, Z as VisitSummaryState, _ as attestation, $ as canConfirm, a0 as canManageTelevetVisit, a1 as createTelevetBookingController, a2 as currentStep, a3 as emptyTelevetDraft, a4 as formatVisitRange, a5 as formatWhen, a6 as formatWhenWithDay, a7 as hasPreviousStep, a8 as initialTelevetBookingState, a9 as isHoldExpired, aa as isMediaShortfallEmpty, ab as isSkipped, ac as isTelevetBookingCopyReady, ad as isVetMessagesDark, ae as isVetThreadVetFirst, af as mediaShortfallFromUnsentPicks, ag as splitTelevetVisits, ah as televetBookingKey, ai as televetBookingReducer, aj as televetBookingRefusal, ak as televetCancelCall, al as televetConsultCall, am as televetEmptyRosterCause, an as televetEmptyRosterView, ao as televetHoldCall, ap as televetJoinCall, aT as televetJoinDecision, aq as televetJoinOpensAtMs, as as televetMediaShortfallLines, at as televetRescheduleCall, au as televetThreadMessagesCall, av as televetThreadReadCall, aw as televetVisitSummaryCall, ax as useEarlyTriage, ay as useStateInterest, az as useTelevetBookConsult, aA as useTelevetBookingAvailable, aB as useTelevetBookingController, aC as useTelevetBookingEntitlement, aD as useTelevetCancellationPolicy, aE as useTelevetClinicians, aF as useTelevetHoldSlot, aG as useTelevetJoin, aH as useTelevetNextSlot, aI as useTelevetRescheduleConsult, aJ as useTelevetSlots, aK as useTelevetStatePolicy, aL as useVetThread, aM as useVetThreads, aN as useVisitSummary, aO as validateBookingBody, aP as vetThreadPetRef, aQ as withUnsentPicks } from '../../../bookingCopy-DR0-SmqH.js';
6
6
  import { T as TelevetConsult, E as EverfurTelevetFlowRequest, c as TelevetSlot } from '../../../televetGlobal-CnjrfhT4.js';
7
7
  export { C as CANCELLATION_POLICY_VERSION_MAX, d as CANCEL_REASON_MAX, e as CONSULT_KINDS, f as CONSULT_STATUSES, g as ConsultKind, h as ConsultStatus, M as MEDIA_REFS_MAX, R as REASON_TEXT_MAX, i as TERMINAL_CONSULT_STATUSES, j as TelevetBookingBody, k as TelevetBookingEntitlement, b as TelevetCancelReceipt, l as TelevetCancellationPolicy, m as TelevetClinician, n as TelevetSlotHold, o as TelevetStatePolicy, p as TelevetTriageVerdict, q as isWellFormedStateCode } from '../../../televetGlobal-CnjrfhT4.js';
8
8
  import { V as VetVisitIntent } from '../../../visitIntent-D7_yVp1I.js';
9
9
  import { a as TelevetMediaPicker, T as TelevetCalendarWriter, b as TelevetPrimaryVet } from '../../../IntakeMedia-Bavl7E4Z.js';
10
10
  export { e as TelevetBookedScreen, f as TelevetBookedScreenProps, c as TelevetCalendarEvent, g as TelevetEmergencyExits, h as TelevetEmergencyExitsProps, i as TelevetIntakeMedia, d as TelevetIntakeMediaItem, j as TelevetIntakeMediaProps, t as televetConsultCalendarKey } from '../../../IntakeMedia-Bavl7E4Z.js';
11
- import { m as EverfurTheme } from '../../../tokens-RAKZj7M8.js';
12
- export { b as VetCallCredential, c as VetCallJoinRefusal, d as VetCallLimits, p as parseVetCallCredential, v as vetCallJoinReason, e as vetCallJoinRefusal } from '../../../callRoom-B1qq_D-4.js';
13
- export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../../EverfurError-pEXDbUJ1.js';
14
- export { E as EverfurResult } from '../../../EverfurResult-sKkoXew0.js';
15
- export { W as WidgetPet } from '../../../petsRepository-ByMzq1Z9.js';
16
- import '../../../requestFunnel-BPeBZdKp.js';
17
- import '../../../ErrorPolicyPort-DwSnmGcX.js';
18
- import '../../../config-BysLVhku.js';
19
- import '../../../identity-BiyMDMrR.js';
11
+ import { m as EverfurTheme } from '../../../tokens-DLj8OnLH.js';
12
+ export { b as VetCallCredential, c as VetCallJoinRefusal, d as VetCallLimits, p as parseVetCallCredential, v as vetCallJoinReason, e as vetCallJoinRefusal } from '../../../callRoom-B92eH_ij.js';
13
+ export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../../EverfurError-DeBqRpQV.js';
14
+ export { E as EverfurResult } from '../../../EverfurResult-ClPTS0P2.js';
15
+ export { W as WidgetPet } from '../../../petsRepository-CQh8paML.js';
16
+ import '../../../requestFunnel-CQ42Kf9G.js';
17
+ import '../../../ErrorPolicyPort-C3nNSS_j.js';
18
+ import '../../../config-DdK2czhD.js';
19
+ import '../../../identity-A8fVB518.js';
20
20
  import '../../../TelemetryPort-BDNr00hu.js';
21
21
  import '../../../profile-CSs1wlXT.js';
22
22
 
@@ -563,6 +563,8 @@ declare function TelevetVisitSummaryScreen({ consult, controller: injected, onBa
563
563
  * number is the ASPCA's own line, dialled from `poisonControlTel`, never parsed back out of the displayed line.
564
564
  */
565
565
  declare const TELEVET_EMERGENCY_EXITS_WEB: Readonly<{
566
+ /** The box's first row when the host passes no locator. Owner-approved 2026-10-04, exact wording. */
567
+ goToEmergencyVet: string;
566
568
  findEmergencyVet: string;
567
569
  poisonControl: string;
568
570
  poisonControlDetail: string;
@@ -725,6 +727,7 @@ declare const TELEVET_BOOKING_COPY_WEB: Readonly<{
725
727
  ledeWithoutExits: string;
726
728
  exitPrimaryVetTitle: string;
727
729
  exitFindErTitle: string;
730
+ exitGoToErTitle: string;
728
731
  startCallHint: string;
729
732
  poisonControl: string;
730
733
  poisonControlDetail: string;