@everfur/sdk 0.9.2 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +1 -1
  3. package/dist/{Chat-B7oN62ww.d.cts → Chat-Bkv-MLLu.d.cts} +3 -3
  4. package/dist/{Chat-Cugs9Dsl.d.ts → Chat-Dy1L27a8.d.ts} +3 -3
  5. package/dist/{DepthViews-GxV7wSzT.d.cts → DepthViews-BwyzpEyX.d.ts} +1 -1
  6. package/dist/{DepthViews-C6qFJ3fV.d.ts → DepthViews-CBalhef3.d.cts} +1 -1
  7. package/dist/{DepthViews-CUNmy99u.d.cts → DepthViews-De6yb5Tq.d.ts} +1 -1
  8. package/dist/{DepthViews-CiYBIBEZ.d.ts → DepthViews-eRdy2ayE.d.cts} +1 -1
  9. package/dist/animations/index.d.cts +3 -3
  10. package/dist/animations/index.d.ts +3 -3
  11. package/dist/{attachments-DN2cNGwe.d.ts → attachments-BAcQdIz7.d.ts} +5 -5
  12. package/dist/{attachments-20X7Vuip.d.ts → attachments-Brt7ivEo.d.ts} +2 -2
  13. package/dist/{attachments-CkaPnIUw.d.cts → attachments-DhGAelCA.d.cts} +2 -2
  14. package/dist/{attachments-HXFmzk-D.d.cts → attachments-tPWJ0DJI.d.cts} +5 -5
  15. package/dist/{bookingCopy-B5igVNE0.d.ts → bookingCopy-CJLAgEgK.d.ts} +2 -2
  16. package/dist/{bookingCopy-pJpizqgz.d.cts → bookingCopy-Ds2JGcPE.d.cts} +2 -2
  17. package/dist/{casesRepository-DFoK5N1O.d.cts → casesRepository-D0aQSXkb.d.cts} +1 -1
  18. package/dist/{casesRepository-qAkKKgji.d.ts → casesRepository-DjhMfm_n.d.ts} +1 -1
  19. package/dist/chat/index.cjs +9 -8
  20. package/dist/chat/index.d.cts +9 -9
  21. package/dist/chat/index.d.ts +9 -9
  22. package/dist/chat/index.js +9 -8
  23. package/dist/client/index.cjs +1 -1
  24. package/dist/client/index.d.cts +6 -6
  25. package/dist/client/index.d.ts +6 -6
  26. package/dist/client/index.js +1 -1
  27. package/dist/{config-u6rK4mKt.d.cts → config-C68HTCf4.d.cts} +1 -1
  28. package/dist/{config-BB7e52FP.d.ts → config-DeUmccwl.d.ts} +1 -1
  29. package/dist/consent/index.d.cts +5 -5
  30. package/dist/consent/index.d.ts +5 -5
  31. package/dist/{context-BZ1k4qE3.d.cts → context-DY9pcjdK.d.cts} +5 -5
  32. package/dist/{context-CJYmubjx.d.ts → context-D_2sCvoo.d.ts} +5 -5
  33. package/dist/{copy-DCO_lUXd.d.cts → copy-tYW0C83H.d.cts} +2 -2
  34. package/dist/{copy-CtfctY-J.d.ts → copy-wAnv8ldC.d.ts} +2 -2
  35. package/dist/core/index.cjs +1 -1
  36. package/dist/core/index.d.cts +12 -12
  37. package/dist/core/index.d.ts +12 -12
  38. package/dist/core/index.js +1 -1
  39. package/dist/{depth-_vMRMm4x.d.ts → depth-C7RIscDR.d.ts} +2 -2
  40. package/dist/{depth-C_ym3qyi.d.cts → depth-jbSWsweM.d.cts} +2 -2
  41. package/dist/{entitlementRepository-DA04yM54.d.cts → entitlementRepository-Ccc6K6wB.d.cts} +2 -2
  42. package/dist/{entitlementRepository-tSY9WWad.d.ts → entitlementRepository-D7Fc7OdG.d.ts} +2 -2
  43. package/dist/{identity-D5uywCtp.d.ts → identity-BTT6YtH5.d.ts} +1 -1
  44. package/dist/{identity-CUynm8S2.d.cts → identity-ScajqjK5.d.cts} +1 -1
  45. package/dist/index.cjs +10 -9
  46. package/dist/index.d.cts +12 -12
  47. package/dist/index.d.ts +12 -12
  48. package/dist/index.js +10 -9
  49. package/dist/notifications/index.d.cts +2 -2
  50. package/dist/notifications/index.d.ts +2 -2
  51. package/dist/{pets-mnbN0kZG.d.ts → pets-CqeoV1Jv.d.ts} +1 -1
  52. package/dist/{pets-BrdkpNJH.d.cts → pets-uKMldfz0.d.cts} +1 -1
  53. package/dist/{petsRepository-CQgzEFyz.d.cts → petsRepository-BYe7_MUo.d.cts} +1 -1
  54. package/dist/{petsRepository-RGI_xPK1.d.ts → petsRepository-BdfbY9Oe.d.ts} +1 -1
  55. package/dist/{ports-Cu_Wc5Aw.d.ts → ports-D4FQKTBS.d.ts} +4 -4
  56. package/dist/{ports-DibY-h60.d.cts → ports-okLpXkpu.d.cts} +4 -4
  57. package/dist/records/depth/index.d.cts +7 -7
  58. package/dist/records/depth/index.d.ts +7 -7
  59. package/dist/records/index.d.cts +9 -9
  60. package/dist/records/index.d.ts +9 -9
  61. package/dist/{requestFunnel-BkSFsLKh.d.ts → requestFunnel-Dhaj0yUq.d.ts} +2 -2
  62. package/dist/{requestFunnel-nmhlEdbM.d.cts → requestFunnel-u8qnM5Ll.d.cts} +2 -2
  63. package/dist/{runtimeTypes-CU2xVmiQ.d.ts → runtimeTypes-BFes64Vp.d.ts} +4 -4
  64. package/dist/{runtimeTypes-CWG1Cm4N.d.cts → runtimeTypes-C67itXfp.d.cts} +4 -4
  65. package/dist/server/events/index.cjs +1 -1
  66. package/dist/server/events/index.d.cts +2 -2
  67. package/dist/server/events/index.d.ts +2 -2
  68. package/dist/server/events/index.js +1 -1
  69. package/dist/server/index.cjs +1 -1
  70. package/dist/server/index.d.cts +3 -3
  71. package/dist/server/index.d.ts +3 -3
  72. package/dist/server/index.js +1 -1
  73. package/dist/televet/booking/index.d.cts +6 -6
  74. package/dist/televet/booking/index.d.ts +6 -6
  75. package/dist/testing/index.d.cts +1 -1
  76. package/dist/testing/index.d.ts +1 -1
  77. package/dist/testing/rn/index.d.cts +7 -7
  78. package/dist/testing/rn/index.d.ts +7 -7
  79. package/dist/testing/web/index.d.cts +7 -7
  80. package/dist/testing/web/index.d.ts +7 -7
  81. package/dist/{timelineRows-CYF_I5Aq.d.cts → timelineRows-CDSO3ElK.d.cts} +1 -1
  82. package/dist/{timelineRows-PWRoTntZ.d.ts → timelineRows-pd4wYVbe.d.ts} +1 -1
  83. package/dist/{useRecordsDepth-eS9BJv_a.d.ts → useRecordsDepth-CqSMkcyR.d.ts} +1 -1
  84. package/dist/{useRecordsDepth-Cg4cc4bQ.d.cts → useRecordsDepth-W3UAKQRN.d.cts} +1 -1
  85. package/dist/{view-n_oSGiiT.d.ts → view-CKfIaJYp.d.ts} +2 -2
  86. package/dist/{view-D4UOm-yo.d.cts → view-h7RPJAEe.d.cts} +2 -2
  87. package/dist/web/consent/index.d.cts +5 -5
  88. package/dist/web/consent/index.d.ts +5 -5
  89. package/dist/web/index.cjs +7 -5
  90. package/dist/web/index.d.cts +14 -14
  91. package/dist/web/index.d.ts +14 -14
  92. package/dist/web/index.js +7 -5
  93. package/dist/web/notifications/index.d.cts +3 -3
  94. package/dist/web/notifications/index.d.ts +3 -3
  95. package/dist/web/records/depth/index.d.cts +7 -7
  96. package/dist/web/records/depth/index.d.ts +7 -7
  97. package/dist/web/records/index.d.cts +9 -9
  98. package/dist/web/records/index.d.ts +9 -9
  99. package/dist/web/televet/booking/index.d.cts +6 -6
  100. package/dist/web/televet/booking/index.d.ts +6 -6
  101. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -96,7 +96,7 @@ return Object.freeze({kind:"done",terminal:true,conversationId:fields.conversati
96
96
  return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fields.retryable,wireMessage:fields.wireMessage,synthesized:fields.synthesized,lastEventId:fields.lastEventId,serverRequestId:fields.serverRequestId??null})}function analysisStartedFrame(requestId,lastEventId,serverRequestId=null){/* @__PURE__ */
97
97
  return Object.freeze({kind:"analysisStarted",requestId:requestId,lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}function analysisCompleteFrame(fields,serverRequestId=null){/* @__PURE__ */
98
98
  return Object.freeze({kind:"analysisComplete",terminal:false,resultId:fields.resultId,analysisType:fields.analysisType,modelVersion:fields.modelVersion,confidence:fields.confidence,detections:/* @__PURE__ */Object.freeze([...fields.detections]),interpretation:fields.interpretation,lastEventId:fields.lastEventId,serverRequestId:serverRequestId})}function unknownFrame(raw,lastEventId,serverRequestId=null){/* @__PURE__ */
99
- return Object.freeze({kind:"unknown",raw:{...raw},lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}function createIdentityProvider(userRef2,getToken,onMinted){let cached=null,inFlight3=null,revoked=false,load=()=>inFlight3||(inFlight3=(async()=>{try{let minted=await getToken(),token=typeof minted=="string"?minted:minted?.token;if(typeof token!="string"||token.length===0)throw new EverfurConfigError("invalid-argument","TokenProvider returned an empty token");return cached=token,onMinted?.(typeof minted=="string"?null:expiryMs(minted.expiresAt)),token}finally{inFlight3=null}})(),inFlight3);return{userRef:userRef2,async currentToken(opts){if(revoked)throw new EverfurConfigError("not-initialized","This identity was cleared (sign-out); mint a new one.");return opts?.forceRefresh&&(cached=null),cached!==null?cached:load()},hasToken(){return!revoked&&cached!==null},clear(){revoked=true,cached=null}}}function expiryMs(value){if(value===void 0)return null;let ms=typeof value=="number"?value<1e11?value*1e3:value:new Date(value).getTime();return Number.isFinite(ms)?ms:null}function newSessionId(){let bytes=new Uint8Array(16),cryptoObj=globalThis.crypto;if(typeof cryptoObj?.getRandomValues=="function")cryptoObj.getRandomValues(bytes);else for(let i=0;i<bytes.length;i+=1)bytes[i]=Math.floor(Math.random()*256);bytes[6]=bytes[6]&15|64,bytes[8]=bytes[8]&63|128;let hex=[];for(let i=0;i<bytes.length;i+=1)hex.push(bytes[i].toString(16).padStart(2,"0"));return hex.slice(0,4).join("")+"-"+hex.slice(4,6).join("")+"-"+hex.slice(6,8).join("")+"-"+hex.slice(8,10).join("")+"-"+hex.slice(10,16).join("")}function authHeaders(auth){let headers={};return auth.mode==="personalized"?headers.authorization=`Bearer ${auth.token}`:headers["x-everfur-partner-key"]=auth.publishableKey,auth.userRef&&(headers["x-everfur-user-ref"]=auth.userRef),auth.sessionId&&(headers["x-everfur-session-id"]=auth.sessionId),headers}function withAuthHeaders(req,auth){return{...req,headers:{...stripAuthHeaders(req.headers),...authHeaders(auth)}}}function stripAuthHeaders(headers){if(!headers)return{};let out={};for(let[key,value]of Object.entries(headers)){let lower=key.toLowerCase();lower==="authorization"||lower==="x-everfur-partner-key"||(out[key]=value)}return out}async function authedSend(req,ctx){if(ctx.mode==="anonymous")return ctx.transport.request(withAuthHeaders(req,{mode:"anonymous",publishableKey:ctx.publishableKey,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));let token;try{token=await ctx.identity.currentToken()}catch{return err(authRejectedError())}let first=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:token,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));if(first.ok||first.error.httpStatus!==401)return first;let refreshed;try{refreshed=await ctx.identity.currentToken({forceRefresh:!0})}catch{return err(authRejectedError())}let retry=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:refreshed,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));return!retry.ok&&retry.error.httpStatus===401?err(authRejectedError(retry.error.httpStatus)):retry}function authRejectedError(httpStatus){return makeEverfurError("authRejected",{retryable:false,...httpStatus!==void 0?{httpStatus:httpStatus}:{}})}var BLOCK_SEPARATOR=`\n\n`,MAX_PENDING_BLOCK_CHARS=1048576,wireObjectSchema=/* @__PURE__ */zod.z.record(/* @__PURE__ */zod.z.string(),/* @__PURE__ */zod.z.unknown()),URGENCY_LEVELS=["emergency","schedule_soon","home_care"];async function*parseSse(bytes,serverRequestId=null){let resolvedRequestId=null,requestIdNow=()=>(resolvedRequestId!==null||(resolvedRequestId=typeof serverRequestId=="function"?serverRequestId():serverRequestId),resolvedRequestId),decoder=new TextDecoder("utf-8"),buffer="",scanFrom=0,sawDelta=false;for await(let chunk of bytes){for(buffer+=decoder.decode(chunk,{stream:true});;){let sep=buffer.indexOf(BLOCK_SEPARATOR,scanFrom);if(sep===-1)break;let block=buffer.slice(0,sep);buffer=buffer.slice(sep+BLOCK_SEPARATOR.length),scanFrom=0;let frame=parseBlock(block,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}if(scanFrom=buffer.length>0?buffer.length-1:0,buffer.length>MAX_PENDING_BLOCK_CHARS){yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()});return}}if(buffer+=decoder.decode(),buffer.trim().length>0){let frame=parseBlock(buffer,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()})}function parseBlock(block,serverRequestId){let id=null,dataLines=[];for(let rawLine of block.split(`\n`)){let line=rawLine.replace(/\s+$/,"");line.length===0||line.startsWith(":")||(line.startsWith("id:")?id=line.slice(3).trim():line.startsWith("data:")&&dataLines.push(line.slice(5).replace(/^ /,"")))}if(dataLines.length===0)return null;let decoded;try{decoded=JSON.parse(dataLines.join(`\n`))}catch{return null}if(typeof decoded!="object"||decoded===null||Array.isArray(decoded))return null;let parsed=wireObjectSchema.safeParse(decoded);return parsed.success?frameFromWire(parsed.data,id,serverRequestId):null}function frameFromWire(json,lastEventId,serverRequestId){let type=json.type,event=json.event;if(type==="error"||"error"in json)return errorFrame({code:asString(json.code)??"unknown",retryable:json.retryable===true,wireMessage:asString(json.error),synthesized:false,lastEventId:lastEventId,serverRequestId:serverRequestId});if(type==="done"||json.done===true)return doneFrame({conversationId:asString(json.conversation_id)??"",messageId:asString(json.message_id),title:asString(json.title),followUpQuestions:asStringList(json.follow_up_questions),citations:asMapList(json.citations),citationStatus:asString(json.citation_status),urgencyLevel:asUrgency(json.urgency_level),urgencyReason:asString(json.urgency_reason),urgencyProvided:urgencySlotProvided(json),resultId:asString(json.result_id),lastEventId:lastEventId},serverRequestId);if(type==="accepted"||json.status==="reasoning")return acceptedFrame(asString(json.stream_id),lastEventId,serverRequestId);if(type==="heartbeat"||json.heartbeat===true)return heartbeatFrame(lastEventId,serverRequestId);if(type==="text.delta"||"delta"in json||"token"in json){let delta=asString(json.delta)??asString(json.token)??"";return deltaFrame(delta,lastEventId,serverRequestId)}return event==="analysis_started"?analysisStartedFrame(asString(json.request_id),lastEventId,serverRequestId):event==="analysis_complete"?analysisCompleteFrame({resultId:asString(json.result_id),analysisType:asString(json.analysis_type),modelVersion:asString(json.model_version),confidence:asNumber(json.confidence),detections:asMapList(json.detections),interpretation:asString(json.interpretation),lastEventId:lastEventId},serverRequestId):unknownFrame(json,lastEventId,serverRequestId)}function asString(v){return typeof v=="string"?v:null}function asNumber(v){return typeof v=="number"&&Number.isFinite(v)?v:null}function asUrgency(v){return typeof v=="string"&&URGENCY_LEVELS.includes(v)?v:null}function urgencySlotProvided(json){if(!Object.prototype.hasOwnProperty.call(json,"urgency_level"))return false;let raw=json.urgency_level;return raw===null||asUrgency(raw)!==null}function asStringList(v){return Array.isArray(v)?v.map(e=>typeof e=="string"?e:String(e)):[]}function isPlainObject(v){return typeof v=="object"&&v!==null&&!Array.isArray(v)}function asMapList(v){return Array.isArray(v)?v.filter(isPlainObject):[]}var SDK_VERSION="0.9.2",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
99
+ return Object.freeze({kind:"unknown",raw:{...raw},lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}function createIdentityProvider(userRef2,getToken,onMinted){let cached=null,inFlight3=null,revoked=false,load=()=>inFlight3||(inFlight3=(async()=>{try{let minted=await getToken(),token=typeof minted=="string"?minted:minted?.token;if(typeof token!="string"||token.length===0)throw new EverfurConfigError("invalid-argument","TokenProvider returned an empty token");return cached=token,onMinted?.(typeof minted=="string"?null:expiryMs(minted.expiresAt)),token}finally{inFlight3=null}})(),inFlight3);return{userRef:userRef2,async currentToken(opts){if(revoked)throw new EverfurConfigError("not-initialized","This identity was cleared (sign-out); mint a new one.");return opts?.forceRefresh&&(cached=null),cached!==null?cached:load()},hasToken(){return!revoked&&cached!==null},clear(){revoked=true,cached=null}}}function expiryMs(value){if(value===void 0)return null;let ms=typeof value=="number"?value<1e11?value*1e3:value:new Date(value).getTime();return Number.isFinite(ms)?ms:null}function newSessionId(){let bytes=new Uint8Array(16),cryptoObj=globalThis.crypto;if(typeof cryptoObj?.getRandomValues=="function")cryptoObj.getRandomValues(bytes);else for(let i=0;i<bytes.length;i+=1)bytes[i]=Math.floor(Math.random()*256);bytes[6]=bytes[6]&15|64,bytes[8]=bytes[8]&63|128;let hex=[];for(let i=0;i<bytes.length;i+=1)hex.push(bytes[i].toString(16).padStart(2,"0"));return hex.slice(0,4).join("")+"-"+hex.slice(4,6).join("")+"-"+hex.slice(6,8).join("")+"-"+hex.slice(8,10).join("")+"-"+hex.slice(10,16).join("")}function authHeaders(auth){let headers={};return auth.mode==="personalized"?headers.authorization=`Bearer ${auth.token}`:headers["x-everfur-partner-key"]=auth.publishableKey,auth.userRef&&(headers["x-everfur-user-ref"]=auth.userRef),auth.sessionId&&(headers["x-everfur-session-id"]=auth.sessionId),headers}function withAuthHeaders(req,auth){return{...req,headers:{...stripAuthHeaders(req.headers),...authHeaders(auth)}}}function stripAuthHeaders(headers){if(!headers)return{};let out={};for(let[key,value]of Object.entries(headers)){let lower=key.toLowerCase();lower==="authorization"||lower==="x-everfur-partner-key"||(out[key]=value)}return out}async function authedSend(req,ctx){if(ctx.mode==="anonymous")return ctx.transport.request(withAuthHeaders(req,{mode:"anonymous",publishableKey:ctx.publishableKey,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));let token;try{token=await ctx.identity.currentToken()}catch{return err(authRejectedError())}let first=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:token,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));if(first.ok||first.error.httpStatus!==401)return first;let refreshed;try{refreshed=await ctx.identity.currentToken({forceRefresh:!0})}catch{return err(authRejectedError())}let retry=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:refreshed,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));return!retry.ok&&retry.error.httpStatus===401?err(authRejectedError(retry.error.httpStatus)):retry}function authRejectedError(httpStatus){return makeEverfurError("authRejected",{retryable:false,...httpStatus!==void 0?{httpStatus:httpStatus}:{}})}var BLOCK_SEPARATOR=`\n\n`,MAX_PENDING_BLOCK_CHARS=1048576,wireObjectSchema=/* @__PURE__ */zod.z.record(/* @__PURE__ */zod.z.string(),/* @__PURE__ */zod.z.unknown()),URGENCY_LEVELS=["emergency","schedule_soon","home_care"];async function*parseSse(bytes,serverRequestId=null){let resolvedRequestId=null,requestIdNow=()=>(resolvedRequestId!==null||(resolvedRequestId=typeof serverRequestId=="function"?serverRequestId():serverRequestId),resolvedRequestId),decoder=new TextDecoder("utf-8"),buffer="",scanFrom=0,sawDelta=false;for await(let chunk of bytes){for(buffer+=decoder.decode(chunk,{stream:true});;){let sep=buffer.indexOf(BLOCK_SEPARATOR,scanFrom);if(sep===-1)break;let block=buffer.slice(0,sep);buffer=buffer.slice(sep+BLOCK_SEPARATOR.length),scanFrom=0;let frame=parseBlock(block,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}if(scanFrom=buffer.length>0?buffer.length-1:0,buffer.length>MAX_PENDING_BLOCK_CHARS){yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()});return}}if(buffer+=decoder.decode(),buffer.trim().length>0){let frame=parseBlock(buffer,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()})}function parseBlock(block,serverRequestId){let id=null,dataLines=[];for(let rawLine of block.split(`\n`)){let line=rawLine.replace(/\s+$/,"");line.length===0||line.startsWith(":")||(line.startsWith("id:")?id=line.slice(3).trim():line.startsWith("data:")&&dataLines.push(line.slice(5).replace(/^ /,"")))}if(dataLines.length===0)return null;let decoded;try{decoded=JSON.parse(dataLines.join(`\n`))}catch{return null}if(typeof decoded!="object"||decoded===null||Array.isArray(decoded))return null;let parsed=wireObjectSchema.safeParse(decoded);return parsed.success?frameFromWire(parsed.data,id,serverRequestId):null}function frameFromWire(json,lastEventId,serverRequestId){let type=json.type,event=json.event;if(type==="error"||"error"in json)return errorFrame({code:asString(json.code)??"unknown",retryable:json.retryable===true,wireMessage:asString(json.error),synthesized:false,lastEventId:lastEventId,serverRequestId:serverRequestId});if(type==="done"||json.done===true)return doneFrame({conversationId:asString(json.conversation_id)??"",messageId:asString(json.message_id),title:asString(json.title),followUpQuestions:asStringList(json.follow_up_questions),citations:asMapList(json.citations),citationStatus:asString(json.citation_status),urgencyLevel:asUrgency(json.urgency_level),urgencyReason:asString(json.urgency_reason),urgencyProvided:urgencySlotProvided(json),resultId:asString(json.result_id),lastEventId:lastEventId},serverRequestId);if(type==="accepted"||json.status==="reasoning")return acceptedFrame(asString(json.stream_id),lastEventId,serverRequestId);if(type==="heartbeat"||json.heartbeat===true)return heartbeatFrame(lastEventId,serverRequestId);if(type==="text.delta"||"delta"in json||"token"in json){let delta=asString(json.delta)??asString(json.token)??"";return deltaFrame(delta,lastEventId,serverRequestId)}return event==="analysis_started"?analysisStartedFrame(asString(json.request_id),lastEventId,serverRequestId):event==="analysis_complete"?analysisCompleteFrame({resultId:asString(json.result_id),analysisType:asString(json.analysis_type),modelVersion:asString(json.model_version),confidence:asNumber(json.confidence),detections:asMapList(json.detections),interpretation:asString(json.interpretation),lastEventId:lastEventId},serverRequestId):unknownFrame(json,lastEventId,serverRequestId)}function asString(v){return typeof v=="string"?v:null}function asNumber(v){return typeof v=="number"&&Number.isFinite(v)?v:null}function asUrgency(v){return typeof v=="string"&&URGENCY_LEVELS.includes(v)?v:null}function urgencySlotProvided(json){if(!Object.prototype.hasOwnProperty.call(json,"urgency_level"))return false;let raw=json.urgency_level;return raw===null||asUrgency(raw)!==null}function asStringList(v){return Array.isArray(v)?v.map(e=>typeof e=="string"?e:String(e)):[]}function isPlainObject(v){return typeof v=="object"&&v!==null&&!Array.isArray(v)}function asMapList(v){return Array.isArray(v)?v.filter(isPlainObject):[]}var SDK_VERSION="0.9.3",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
100
100
  return Object.freeze({ok:false,failure:/* @__PURE__ */Object.freeze({reason:reason,message:message})})}function checkPublishableKey(raw){let publishableKey=typeof raw=="string"?raw.trim():"";return publishableKey.length===0?{reason:"missing-publishable-key",message:"publishableKey is required"}:/^sk[_-]/i.test(publishableKey)?{reason:"secret-key-as-publishable-key",message:"publishableKey looks like a SECRET key (sk_...). A device must never hold a partner secret key: use the pk_ publishable key here, and keep the secret key on your server."}:null}function tryResolveClientConfig(config,options){let keyFailure=checkPublishableKey(config?.publishableKey);if(keyFailure!==null)/* @__PURE__ */
101
101
  return Object.freeze({ok:false,failure:keyFailure});let publishableKey=config.publishableKey.trim(),baseUrl=tryResolveApiBaseUrl(config.apiBaseUrl);if(!baseUrl.ok)return baseUrl;let contractVersion=config.contractVersion?.trim()||DEFAULT_CONTRACT_VERSION;/* @__PURE__ */
102
102
  return Object.freeze({ok:true,config:/* @__PURE__ */Object.freeze({publishableKey:publishableKey,apiBaseUrl:baseUrl.value,contractVersion:contractVersion,sdkVersion:SDK_VERSION,platform:options?.platform??SDK_PLATFORM,debug:config.debug===true})})}function tryResolveApiBaseUrl(apiBaseUrl){let explicit=apiBaseUrl?.trim(),candidate=explicit&&explicit.length>0?explicit:readEnv(ENV_API_BASE_URL);return candidate?normalizeBaseUrl(candidate):configFailure("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${ENV_API_BASE_URL}. The SDK never ships a hardcoded host.`)}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function hostOf(authority){return authority.slice(authority.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}function isPrintableHost(host){return host.length===0||host.includes("@")?false:host.startsWith("[")&&host.endsWith("]")?true:!host.includes(":")}function canEchoOrigin(rawTrimmed,host){let schemeEnd=rawTrimmed.indexOf("://");return schemeEnd<0||rawTrimmed.slice(schemeEnd+3).includes("@")?false:isPrintableHost(host)}function safeOrigin(scheme,host){return`${scheme}://${host}`}function normalizeBaseUrl(raw){let trimmed=raw.trim(),match=ABSOLUTE_URL.exec(trimmed);if(match===null||match[2]===void 0||match[2].length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let scheme=(match[1]??"").toLowerCase(),host=hostOf(match[2]);if(host.length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let shown=canEchoOrigin(trimmed,host)?`: ${safeOrigin(scheme,host)}`:"";if(scheme!=="https"){if(!(scheme==="http"&&isLoopbackHost(host)))return scheme==="http"?configFailure("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${shown}`):configFailure("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${shown}`)}let value=trimmed.endsWith("/")?trimmed.slice(0,-1):trimmed;/* @__PURE__ */
@@ -207,7 +207,7 @@ return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[null,
207
207
  return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[
208
208
  /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:()=>{if(!(busy||settling.current)){if(!redirecting){let request={...petRef2!==void 0?{petRef:petRef2}:{},...usState!==void 0?{usState:usState}:{},...visitRef!=null?{visitRef:visitRef,intent:intent??null}:{}};openVetVisitInApp(request,onStartInApp)===null&&callHost(onError,"unavailable",null);return}settling.current=true,(visitRef==null?visit.open():visit.openVisit(visitRef,intent??null)).then(result=>{result.opened?callHost(onOpened,result.flowId??null):result.reason!=="cancelled"&&callHost(onError,result.reason,result.error)}).finally(()=>{settling.current=false})}},accessibilityRole:"button",accessibilityLabel:text3,accessibilityState:{busy:busy,disabled:busy},style:[styles2.button,busy?styles2.busy:null,style],children:/* @__PURE__ */jsxRuntime.jsx(Text,{style:[styles2.label,labelStyle],children:text3})}),
209
209
  /* @__PURE__ */jsxRuntime.jsx(EverfurTelevetHost,{})]})}function makeStyles4(theme){let{color:color,space:space,radius:radius,type:type,slots:slots}=theme;return reactNative.StyleSheet.create({button:{minHeight:MIN_TOUCH_TARGET,minWidth:MIN_TOUCH_TARGET,alignItems:"center",justifyContent:"center",paddingHorizontal:space.xl,paddingVertical:space.sm,borderRadius:radius.pill,backgroundColor:color.primary,...slotBox(slots.vetVisitButton)},busy:{opacity:BUSY_OPACITY},label:{...face(theme,"medium"),color:color.onPrimary,fontSize:type.size.body,lineHeight:type.size.body*type.lineHeight.snug,...slotText(slots.vetVisitButton)}})}function useBrandImage(uri){let[failed,setFailed]=react.useState(null);return{shown:uri!==null&&failed!==uri,onError:()=>setFailed(uri)}}function BrandImage({uri:uri,label:label,decorative:decorative=false,style:style,resizeMode:resizeMode="contain",fallback:fallback=null,onError:onError,testID:testID}){let image=useBrandImage(uri);if(uri===null||!image.shown)return fallback;let a11y=decorative?{accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"}:{accessible:true,accessibilityRole:"image",...label===void 0?{}:{accessibilityLabel:label}};/* @__PURE__ */
210
- return jsxRuntime.jsx(reactNative.Image,{source:{uri:uri},style:style,resizeMode:resizeMode,...a11y,onError:()=>{image.onError(),onError?.()},...testID===void 0?{}:{testID:testID}})}function BrandLogo({logoUrl:logoUrl,name:name,barStyle:barStyle,logoStyle:logoStyle,testID:testID}){let image=useBrandImage(logoUrl);return logoUrl===null||!image.shown?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:barStyle,...testID===void 0?{}:{testID:testID},children:/* @__PURE__ */jsxRuntime.jsx(reactNative.Image,{source:{uri:logoUrl},style:logoStyle,resizeMode:"contain",accessible:true,accessibilityRole:"image",accessibilityLabel:name,onError:image.onError})})}function grounds(c){return[c.surface,c.surfaceCream,c.surfaceSubtle,c.background,c.chatGround,c.composerFill]}function isEverfurLightLook(theme){if(theme.brightness!=="light")return false;let compiled=EVERFUR_LIGHT.color,c=theme.color,same3=(a,b)=>parseColor(a)===parseColor(b),own=new Set(grounds(compiled));return same3(c.brand,compiled.brand)&&same3(c.accent,compiled.accent)&&grounds(c).every(ground=>own.has(ground))}function brandedStatus(theme){let compiled=(theme.brightness==="dark"?EVERFUR_DARK:EVERFUR_LIGHT).color,c=theme.color,same3=(a,b)=>parseColor(a)===parseColor(b);return{success:!same3(c.success,compiled.success),warning:!same3(c.warningStrong,compiled.warningStrong)||!same3(c.cautionAccent,compiled.cautionAccent),info:!(same3(c.info,c.brandInk)&&same3(c.badgeBgInfo,c.brandSoft)&&same3(c.infoEdge,c.structureEdge))}}function speciesOf(species){return canonicalPetSpecies(species)==="cat"?"cat":"dog"}function petAgeYears(ageYears){return typeof ageYears!="number"||!Number.isFinite(ageYears)||ageYears<0?null:Math.floor(ageYears)}function formatPetMeta(pet){let ageYears=petAgeYears(pet.ageYears),speciesLabel=speciesOf(pet.species)==="cat"?"Cat":"Dog";if(ageYears==null)return speciesLabel;let ageLabel=ageYears===1?"1 yr":`${ageYears} yrs`;return`${speciesLabel} · ${ageLabel}`}var INITIALS_PALETTE=/* @__PURE__ */Object.freeze([
210
+ return jsxRuntime.jsx(reactNative.Image,{source:{uri:uri},style:style,resizeMode:resizeMode,...a11y,onError:()=>{image.onError(),onError?.()},...testID===void 0?{}:{testID:testID}})}function BrandLogo({logoUrl:logoUrl,name:name,barStyle:barStyle,logoStyle:logoStyle,testID:testID}){let image=useBrandImage(logoUrl);return logoUrl===null||!image.shown?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:barStyle,...testID===void 0?{}:{testID:testID},children:/* @__PURE__ */jsxRuntime.jsx(reactNative.Image,{source:{uri:logoUrl},style:logoStyle,resizeMode:"contain",accessible:true,accessibilityRole:"image",accessibilityLabel:name,onError:image.onError})})}var UNMEASURED=/* @__PURE__ */Object.freeze({row:null,leading:null,trailing:null}),NO_BALANCE=/* @__PURE__ */Object.freeze({leading:void 0,trailing:void 0});function balanceHeaderSides(m,reserved,logoWidth){if(m.row===null||m.leading===null||m.trailing===null)return NO_BALANCE;let difference=Math.abs(m.leading-m.trailing);if(difference<.5)return NO_BALANCE;let centre=m.row-reserved-m.leading-m.trailing,spare=Math.min(difference,Math.max(0,centre-logoWidth));return spare<.5?NO_BALANCE:m.leading<m.trailing?{leading:m.leading+spare,trailing:void 0}:{leading:void 0,trailing:m.trailing+spare}}function nextMeasures(prev,key,width){let old=prev[key];return old!==null&&Math.abs(old-width)<.5?prev:{...prev,[key]:width}}function grounds(c){return[c.surface,c.surfaceCream,c.surfaceSubtle,c.background,c.chatGround,c.composerFill]}function isEverfurLightLook(theme){if(theme.brightness!=="light")return false;let compiled=EVERFUR_LIGHT.color,c=theme.color,same3=(a,b)=>parseColor(a)===parseColor(b),own=new Set(grounds(compiled));return same3(c.brand,compiled.brand)&&same3(c.accent,compiled.accent)&&grounds(c).every(ground=>own.has(ground))}function brandedStatus(theme){let compiled=(theme.brightness==="dark"?EVERFUR_DARK:EVERFUR_LIGHT).color,c=theme.color,same3=(a,b)=>parseColor(a)===parseColor(b);return{success:!same3(c.success,compiled.success),warning:!same3(c.warningStrong,compiled.warningStrong)||!same3(c.cautionAccent,compiled.cautionAccent),info:!(same3(c.info,c.brandInk)&&same3(c.badgeBgInfo,c.brandSoft)&&same3(c.infoEdge,c.structureEdge))}}function speciesOf(species){return canonicalPetSpecies(species)==="cat"?"cat":"dog"}function petAgeYears(ageYears){return typeof ageYears!="number"||!Number.isFinite(ageYears)||ageYears<0?null:Math.floor(ageYears)}function formatPetMeta(pet){let ageYears=petAgeYears(pet.ageYears),speciesLabel=speciesOf(pet.species)==="cat"?"Cat":"Dog";if(ageYears==null)return speciesLabel;let ageLabel=ageYears===1?"1 yr":`${ageYears} yrs`;return`${speciesLabel} · ${ageLabel}`}var INITIALS_PALETTE=/* @__PURE__ */Object.freeze([
211
211
  /* @__PURE__ */Object.freeze({background:"#ffbdbd",foreground:"#6d1d14"}),
212
212
  /* @__PURE__ */Object.freeze({background:"#a0c4f6",foreground:"#0b3a73"}),
213
213
  /* @__PURE__ */Object.freeze({background:"#fbc558",foreground:"#10462e"}),
@@ -226,16 +226,17 @@ return jsxRuntime.jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel
226
226
  /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"compact",style:styles2.meta,numberOfLines:1,children:isActive?`${CHAT_COPY.activePrefix}${meta}`:meta})]}),isActive?/* @__PURE__ */jsxRuntime.jsx(CheckGlyph,{size:CHECK_SIZE,color:theme.color.brandInk}):null]},pet.petRef)})}),onAddPet!==null?/* @__PURE__ */jsxRuntime.jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:CHAT_COPY.addAnotherPet,style:styles2.addRow,onPress:onAddPet,children:[
227
227
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.addDisc,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles2.addPlus,children:"+"})}),
228
228
  /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.addLabel,children:CHAT_COPY.addAnotherPet})]}):null,
229
- /* @__PURE__ */jsxRuntime.jsx(PressScale,{accessibilityRole:"button",accessibilityLabel:CHAT_COPY.close,containerStyle:styles2.closeSlot,style:styles2.closeButton,onPress:onClose,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles2.closeText,children:CHAT_COPY.close})})]})]})}):null}function makeStyles6(theme){let c=theme.color,r=theme.radius,dialogText=slotText(theme.slots.dialog);return reactNative.StyleSheet.create({root:{flex:1,justifyContent:"flex-end"},backdrop:{flex:1,backgroundColor:BACKDROP2},panel:{backgroundColor:c.surface,paddingHorizontal:20,paddingTop:20,paddingBottom:32,borderTopLeftRadius:PANEL_RADIUS,borderTopRightRadius:PANEL_RADIUS,gap:14,maxHeight:PANEL_MAX_HEIGHT,...sheetSlotBox(theme.slots.dialog)},title:{...headingFace(theme,"bold"),fontSize:18,lineHeight:22,color:c.brandInk,...dialogText},list:{maxHeight:LIST_MAX_HEIGHT,flexShrink:1},listContent:{gap:10},addRow:{flexDirection:"row",alignItems:"center",gap:12,minHeight:MIN_TOUCH_TARGET2,paddingHorizontal:8},addDisc:{width:ROW_RING_SIZE,height:ROW_RING_SIZE,borderRadius:r.pill,alignItems:"center",justifyContent:"center",borderWidth:ROW_RING_STROKE,borderStyle:"dashed",borderColor:c.brandBorder,backgroundColor:c.surfaceCream},addPlus:{...face(theme,"bold"),fontSize:20,lineHeight:22,color:c.brandInk},addLabel:{...face(theme,"bold"),fontSize:15,lineHeight:20,color:c.text.primary,...dialogText},row:{flexDirection:"row",alignItems:"center",gap:12,padding:12,borderRadius:r.md,borderWidth:1,borderColor:c.brandBorder,backgroundColor:c.surface},rowActive:{borderColor:c.brandInk,backgroundColor:c.brandSoft},copy:{flex:1,gap:2},name:{...face(theme,"bold"),fontSize:15,lineHeight:18,color:c.text.primary},meta:{...face(theme,"monoBold"),fontSize:11,lineHeight:13,color:c.text.muted,textTransform:"uppercase",letterSpacing:META_TRACKING},closeSlot:{alignSelf:"flex-end"},closeButton:{paddingHorizontal:18,paddingVertical:10,borderRadius:CLOSE_RADIUS,backgroundColor:c.brandSoft},closeText:{...face(theme,"bold"),color:c.brandInk,fontSize:13,lineHeight:16,letterSpacing:META_TRACKING}})}var MIN_TOUCH_TARGET3=44,ICON_BUTTON_SIZE=36,MENU_GLYPH_SIZE=22,UNREAD_DOT_SIZE=9,UNREAD_DOT_RING=1.5,UNREAD_DOT_INSET=6,HEADER_AVATAR_SIZE=35,HEADER_RING_STROKE=1.75,ADD_BADGE_SIZE=12.4,ADD_BADGE_BORDER=.5,ADD_BADGE_GLYPH=8,LOGO_HEIGHT=28,LOGO_MAX_WIDTH=160;function headerPet(pets,petRef2){return headerPetOf(pets,petRef2)}function ChatHeader({pets:pets,petRef:petRef2,historyUnread:historyUnread,onOpenHistory:onOpenHistory,onPetChange:onPetChange,onAddPet:onAddPet,vet:vet}){let theme=useEverfurTheme(),styles2=react.useMemo(()=>makeStyles7(theme),[theme]),[switcherOpen,setSwitcherOpen]=react.useState(false),shown=headerPet(pets.pets,petRef2),canSwitch=pets.pets.length>=2,shownPetRef=petRef2??shown?.petRef??null,name=petDisplayName(shown),select=next=>{setSwitcherOpen(false),pets.setActivePet(next),callHost(onPetChange,next)},addPet=onAddPet===void 0?null:()=>{setSwitcherOpen(false),callHost(onAddPet)};/* @__PURE__ */
230
- return jsxRuntime.jsxs(reactNative.View,{style:styles2.row,children:[
231
- /* @__PURE__ */jsxRuntime.jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:historyUnread?`${CHAT_COPY.openHistoryNative}${CHAT_COPY.newReplySuffix}`:CHAT_COPY.openHistoryNative,containerStyle:styles2.iconSlot,style:styles2.iconButton,onPress:onOpenHistory,children:[
232
- /* @__PURE__ */jsxRuntime.jsx(MenuGlyph,{size:MENU_GLYPH_SIZE,color:theme.slots.header?.textColor??theme.color.text.primary,strokeWidth:2}),historyUnread?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.unreadDot,pointerEvents:"none"}):null]}),
233
- /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.center,pointerEvents:"box-none",children:/* @__PURE__ */jsxRuntime.jsx(BrandLogo,{logoUrl:theme.meta.logoUrl,name:theme.meta.displayName,barStyle:styles2.logoBar,logoStyle:styles2.logo})}),shownPetRef===null?null:/* @__PURE__ */jsxRuntime.jsx(VetVisitButton,{entry:"chat",petRef:shownPetRef,...vet?.returnTo!==void 0?{returnTo:vet.returnTo}:{},...vet?.usState!==void 0?{usState:vet.usState}:{},...vet?.prefer!==void 0?{prefer:vet.prefer}:{},style:styles2.vetEntry,labelStyle:styles2.vetEntryLabel}),
229
+ /* @__PURE__ */jsxRuntime.jsx(PressScale,{accessibilityRole:"button",accessibilityLabel:CHAT_COPY.close,containerStyle:styles2.closeSlot,style:styles2.closeButton,onPress:onClose,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles2.closeText,children:CHAT_COPY.close})})]})]})}):null}function makeStyles6(theme){let c=theme.color,r=theme.radius,dialogText=slotText(theme.slots.dialog);return reactNative.StyleSheet.create({root:{flex:1,justifyContent:"flex-end"},backdrop:{flex:1,backgroundColor:BACKDROP2},panel:{backgroundColor:c.surface,paddingHorizontal:20,paddingTop:20,paddingBottom:32,borderTopLeftRadius:PANEL_RADIUS,borderTopRightRadius:PANEL_RADIUS,gap:14,maxHeight:PANEL_MAX_HEIGHT,...sheetSlotBox(theme.slots.dialog)},title:{...headingFace(theme,"bold"),fontSize:18,lineHeight:22,color:c.brandInk,...dialogText},list:{maxHeight:LIST_MAX_HEIGHT,flexShrink:1},listContent:{gap:10},addRow:{flexDirection:"row",alignItems:"center",gap:12,minHeight:MIN_TOUCH_TARGET2,paddingHorizontal:8},addDisc:{width:ROW_RING_SIZE,height:ROW_RING_SIZE,borderRadius:r.pill,alignItems:"center",justifyContent:"center",borderWidth:ROW_RING_STROKE,borderStyle:"dashed",borderColor:c.brandBorder,backgroundColor:c.surfaceCream},addPlus:{...face(theme,"bold"),fontSize:20,lineHeight:22,color:c.brandInk},addLabel:{...face(theme,"bold"),fontSize:15,lineHeight:20,color:c.text.primary,...dialogText},row:{flexDirection:"row",alignItems:"center",gap:12,padding:12,borderRadius:r.md,borderWidth:1,borderColor:c.brandBorder,backgroundColor:c.surface},rowActive:{borderColor:c.brandInk,backgroundColor:c.brandSoft},copy:{flex:1,gap:2},name:{...face(theme,"bold"),fontSize:15,lineHeight:18,color:c.text.primary},meta:{...face(theme,"monoBold"),fontSize:11,lineHeight:13,color:c.text.muted,textTransform:"uppercase",letterSpacing:META_TRACKING},closeSlot:{alignSelf:"flex-end"},closeButton:{paddingHorizontal:18,paddingVertical:10,borderRadius:CLOSE_RADIUS,backgroundColor:c.brandSoft},closeText:{...face(theme,"bold"),color:c.brandInk,fontSize:13,lineHeight:16,letterSpacing:META_TRACKING}})}var MIN_TOUCH_TARGET3=44,ICON_BUTTON_SIZE=36,MENU_GLYPH_SIZE=22,UNREAD_DOT_SIZE=9,UNREAD_DOT_RING=1.5,UNREAD_DOT_INSET=6,HEADER_AVATAR_SIZE=35,HEADER_RING_STROKE=1.75,ADD_BADGE_SIZE=12.4,ADD_BADGE_BORDER=.5,ADD_BADGE_GLYPH=8,LOGO_HEIGHT=28,LOGO_MAX_WIDTH=160,ROW_PADDING=16,CENTRE_GAP=8;function headerPet(pets,petRef2){return headerPetOf(pets,petRef2)}function ChatHeader({pets:pets,petRef:petRef2,historyUnread:historyUnread,onOpenHistory:onOpenHistory,onPetChange:onPetChange,onAddPet:onAddPet,vet:vet}){let theme=useEverfurTheme(),styles2=react.useMemo(()=>makeStyles7(theme),[theme]),[switcherOpen,setSwitcherOpen]=react.useState(false),shown=headerPet(pets.pets,petRef2),canSwitch=pets.pets.length>=2,shownPetRef=petRef2??shown?.petRef??null,name=petDisplayName(shown),[measures,setMeasures]=react.useState(UNMEASURED),measure=react.useCallback(key=>event=>{let width=event.nativeEvent.layout.width;setMeasures(prev=>nextMeasures(prev,key,width))},[]),onRowLayout=react.useMemo(()=>measure("row"),[measure]),onLeadingLayout=react.useMemo(()=>measure("leading"),[measure]),onTrailingLayout=react.useMemo(()=>measure("trailing"),[measure]),reserved=2*ROW_PADDING+2*(theme.slots.header?.borderColor!==void 0?1:0)+2*CENTRE_GAP,sideMins=balanceHeaderSides(measures,reserved,LOGO_MAX_WIDTH),select=next=>{setSwitcherOpen(false),pets.setActivePet(next),callHost(onPetChange,next)},addPet=onAddPet===void 0?null:()=>{setSwitcherOpen(false),callHost(onAddPet)};/* @__PURE__ */
230
+ return jsxRuntime.jsxs(reactNative.View,{style:styles2.row,onLayout:onRowLayout,children:[
231
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[styles2.leading,sideMins.leading===void 0?null:{minWidth:sideMins.leading}],children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.sideContent,onLayout:onLeadingLayout,children:/* @__PURE__ */jsxRuntime.jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:historyUnread?`${CHAT_COPY.openHistoryNative}${CHAT_COPY.newReplySuffix}`:CHAT_COPY.openHistoryNative,containerStyle:styles2.iconSlot,style:styles2.iconButton,onPress:onOpenHistory,children:[
232
+ /* @__PURE__ */jsxRuntime.jsx(MenuGlyph,{size:MENU_GLYPH_SIZE,color:theme.slots.header?.textColor??theme.color.text.primary,strokeWidth:2}),historyUnread?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.unreadDot,pointerEvents:"none"}):null]})})}),
233
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.centre,pointerEvents:"box-none",children:/* @__PURE__ */jsxRuntime.jsx(BrandLogo,{logoUrl:theme.meta.logoUrl,name:theme.meta.displayName,barStyle:styles2.logoBar,logoStyle:styles2.logo})}),
234
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[styles2.trailing,sideMins.trailing===void 0?null:{minWidth:sideMins.trailing}],children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles2.trailingContent,onLayout:onTrailingLayout,children:[shownPetRef===null?null:/* @__PURE__ */jsxRuntime.jsx(VetVisitButton,{entry:"chat",petRef:shownPetRef,...vet?.returnTo!==void 0?{returnTo:vet.returnTo}:{},...vet?.usState!==void 0?{usState:vet.usState}:{},...vet?.prefer!==void 0?{prefer:vet.prefer}:{},style:styles2.vetEntry,labelStyle:styles2.vetEntryLabel}),
234
235
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.right,children:canSwitch?/* @__PURE__ */jsxRuntime.jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:fillCopy(CHAT_COPY.switchActivePet,{name:name}),containerStyle:styles2.avatarSlot,style:styles2.avatarWrap,onPress:()=>setSwitcherOpen(true),children:[
235
236
  /* @__PURE__ */jsxRuntime.jsx(PetDisc,{pet:shown,size:HEADER_AVATAR_SIZE,ringStroke:HEADER_RING_STROKE}),
236
237
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.addBadge,pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */jsxRuntime.jsx(PlusGlyph,{size:ADD_BADGE_GLYPH,color:theme.color.brandInk,strokeWidth:2})})]}):pets.loading&&shown===null?
237
- /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.avatarWrap,accessible:true,accessibilityLabel:CHAT_COPY.yourPet,children:/* @__PURE__ */jsxRuntime.jsx(Ring,{size:HEADER_AVATAR_SIZE,strokeWidth:HEADER_RING_STROKE,color:theme.color.mark,children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.placeholderDisc})})}):/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.avatarWrap,accessible:true,accessibilityRole:"image",accessibilityLabel:shown===null?CHAT_COPY.yourPet:name,children:/* @__PURE__ */jsxRuntime.jsx(PetDisc,{pet:shown,size:HEADER_AVATAR_SIZE,ringStroke:HEADER_RING_STROKE})})}),
238
- /* @__PURE__ */jsxRuntime.jsx(PetSwitcherSheet,{visible:switcherOpen,pets:pets.pets,activePetRef:shown?.petRef??null,onSelect:select,onAddPet:addPet,onClose:()=>setSwitcherOpen(false)})]})}function makeStyles7(theme){let c=theme.color,placeholderInner=HEADER_AVATAR_SIZE-HEADER_RING_STROKE*2,header=theme.slots.header;return reactNative.StyleSheet.create({vetEntry:{minHeight:MIN_TOUCH_TARGET3,justifyContent:"center",paddingHorizontal:12,borderRadius:theme.radius.pill,backgroundColor:c.surfaceCream,borderWidth:reactNative.StyleSheet.hairlineWidth,borderColor:c.controlEdge},vetEntryLabel:{...face(theme,"bold"),color:c.brandInk,fontSize:theme.type.size.caption},row:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:16,paddingVertical:10,backgroundColor:c.surface,...slotBox(header)},iconSlot:{borderRadius:ICON_BUTTON_SIZE/2},iconButton:{width:ICON_BUTTON_SIZE,height:ICON_BUTTON_SIZE,borderRadius:ICON_BUTTON_SIZE/2,alignItems:"center",justifyContent:"center"},unreadDot:{position:"absolute",top:UNREAD_DOT_INSET,right:UNREAD_DOT_INSET,width:UNREAD_DOT_SIZE,height:UNREAD_DOT_SIZE,borderRadius:UNREAD_DOT_SIZE,backgroundColor:c.danger,borderWidth:UNREAD_DOT_RING,borderColor:header?.backgroundColor??c.surface},center:{...ABSOLUTE_FILL,alignItems:"center",justifyContent:"center"},logoBar:{alignItems:"center",paddingHorizontal:theme.space.lg},logo:{height:LOGO_HEIGHT,width:LOGO_MAX_WIDTH},right:{alignItems:"flex-end"},avatarSlot:{borderRadius:HEADER_AVATAR_SIZE/2},avatarWrap:{width:HEADER_AVATAR_SIZE,height:HEADER_AVATAR_SIZE,position:"relative"},placeholderDisc:{width:placeholderInner,height:placeholderInner,borderRadius:placeholderInner/2,backgroundColor:c.brandSoft},addBadge:{position:"absolute",bottom:0,right:0,width:ADD_BADGE_SIZE,height:ADD_BADGE_SIZE,borderRadius:ADD_BADGE_SIZE/2,borderWidth:ADD_BADGE_BORDER,borderColor:c.mark,backgroundColor:c.surface,alignItems:"center",justifyContent:"center"}})}var MIN_TOUCH_TARGET4=44,SCRIM="rgba(17,17,17,0.55)",SHEET_RADIUS=26,HANDLE_WIDTH=36,HANDLE_HEIGHT=4,RADIO_SIZE=20,BADGE_SIZE=38,BADGE_GLYPH=18,RADIO_CHECK=12;function FeedbackReasons({visible:visible,onSubmit:onSubmit,onSkip:onSkip}){let theme=useEverfurTheme(),styles2=react.useMemo(()=>makeStyles8(theme),[theme]),[reason,setReason]=react.useState(null),[note,setNote]=react.useState(""),[pending,setPending]=react.useState(false),[failed,setFailed]=react.useState(false),reset=()=>{setReason(null),setNote(""),setPending(false),setFailed(false)},skip=()=>{pending||(reset(),onSkip())},submit=async()=>{if(pending)return;setPending(true),setFailed(false);let trimmed=note.trim();await onSubmit(reason,trimmed.length>0?trimmed:null)?reset():(setPending(false),setFailed(true))};if(!visible)return null;let overLimit=[...note].length>FEEDBACK_NOTES_MAX_CHARS;/* @__PURE__ */
238
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.avatarWrap,accessible:true,accessibilityLabel:CHAT_COPY.yourPet,children:/* @__PURE__ */jsxRuntime.jsx(Ring,{size:HEADER_AVATAR_SIZE,strokeWidth:HEADER_RING_STROKE,color:theme.color.mark,children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.placeholderDisc})})}):/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.avatarWrap,accessible:true,accessibilityRole:"image",accessibilityLabel:shown===null?CHAT_COPY.yourPet:name,children:/* @__PURE__ */jsxRuntime.jsx(PetDisc,{pet:shown,size:HEADER_AVATAR_SIZE,ringStroke:HEADER_RING_STROKE})})})]})}),
239
+ /* @__PURE__ */jsxRuntime.jsx(PetSwitcherSheet,{visible:switcherOpen,pets:pets.pets,activePetRef:shown?.petRef??null,onSelect:select,onAddPet:addPet,onClose:()=>setSwitcherOpen(false)})]})}function makeStyles7(theme){let c=theme.color,placeholderInner=HEADER_AVATAR_SIZE-HEADER_RING_STROKE*2,header=theme.slots.header;return reactNative.StyleSheet.create({vetEntry:{minHeight:MIN_TOUCH_TARGET3,justifyContent:"center",paddingHorizontal:12,borderRadius:theme.radius.pill,backgroundColor:c.surfaceCream,borderWidth:reactNative.StyleSheet.hairlineWidth,borderColor:c.controlEdge},vetEntryLabel:{...face(theme,"bold"),color:c.brandInk,fontSize:theme.type.size.caption},row:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:ROW_PADDING,paddingVertical:10,backgroundColor:c.surface,...slotBox(header)},iconSlot:{borderRadius:ICON_BUTTON_SIZE/2},iconButton:{width:ICON_BUTTON_SIZE,height:ICON_BUTTON_SIZE,borderRadius:ICON_BUTTON_SIZE/2,alignItems:"center",justifyContent:"center"},unreadDot:{position:"absolute",top:UNREAD_DOT_INSET,right:UNREAD_DOT_INSET,width:UNREAD_DOT_SIZE,height:UNREAD_DOT_SIZE,borderRadius:UNREAD_DOT_SIZE,backgroundColor:c.danger,borderWidth:UNREAD_DOT_RING,borderColor:header?.backgroundColor??c.surface},leading:{flexShrink:0,alignItems:"flex-start"},trailing:{flexShrink:0,alignItems:"flex-end"},sideContent:{flexDirection:"row",alignItems:"center"},trailingContent:{flexDirection:"row",alignItems:"center",gap:theme.space.sm},centre:{flexGrow:1,flexShrink:1,flexBasis:0,minWidth:0,marginHorizontal:CENTRE_GAP,alignItems:"center",justifyContent:"center"},logoBar:{alignSelf:"stretch",alignItems:"center"},logo:{height:LOGO_HEIGHT,width:LOGO_MAX_WIDTH,maxWidth:"100%"},right:{alignItems:"flex-end"},avatarSlot:{borderRadius:HEADER_AVATAR_SIZE/2},avatarWrap:{width:HEADER_AVATAR_SIZE,height:HEADER_AVATAR_SIZE,position:"relative"},placeholderDisc:{width:placeholderInner,height:placeholderInner,borderRadius:placeholderInner/2,backgroundColor:c.brandSoft},addBadge:{position:"absolute",bottom:0,right:0,width:ADD_BADGE_SIZE,height:ADD_BADGE_SIZE,borderRadius:ADD_BADGE_SIZE/2,borderWidth:ADD_BADGE_BORDER,borderColor:c.mark,backgroundColor:c.surface,alignItems:"center",justifyContent:"center"}})}var MIN_TOUCH_TARGET4=44,SCRIM="rgba(17,17,17,0.55)",SHEET_RADIUS=26,HANDLE_WIDTH=36,HANDLE_HEIGHT=4,RADIO_SIZE=20,BADGE_SIZE=38,BADGE_GLYPH=18,RADIO_CHECK=12;function FeedbackReasons({visible:visible,onSubmit:onSubmit,onSkip:onSkip}){let theme=useEverfurTheme(),styles2=react.useMemo(()=>makeStyles8(theme),[theme]),[reason,setReason]=react.useState(null),[note,setNote]=react.useState(""),[pending,setPending]=react.useState(false),[failed,setFailed]=react.useState(false),reset=()=>{setReason(null),setNote(""),setPending(false),setFailed(false)},skip=()=>{pending||(reset(),onSkip())},submit=async()=>{if(pending)return;setPending(true),setFailed(false);let trimmed=note.trim();await onSubmit(reason,trimmed.length>0?trimmed:null)?reset():(setPending(false),setFailed(true))};if(!visible)return null;let overLimit=[...note].length>FEEDBACK_NOTES_MAX_CHARS;/* @__PURE__ */
239
240
  return jsxRuntime.jsx(reactNative.Modal,{visible:true,transparent:true,animationType:theme.motion.reducedMotion?"none":"slide",onRequestClose:skip,children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.KeyboardAvoidingView,{behavior:reactNative.Platform.OS==="ios"?"padding":void 0,style:styles2.root,children:[
240
241
  /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{style:styles2.scrim,onPress:skip,accessibilityRole:"button",accessibilityLabel:CHAT_COPY.feedbackSkipA11y}),
241
242
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles2.sheet,accessibilityViewIsModal:true,accessibilityLiveRegion:"polite",children:[
package/dist/index.d.cts CHANGED
@@ -1,34 +1,34 @@
1
1
  export { B as Brand, a as ClientId, C as ConversationId, D as DocumentId, J as JobId, P as PetRef, R as RecordsRequestId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, u as userRef } from './ids-B2GAAifq.cjs';
2
2
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode, c as categoryFor, i as isRetryableCode, u as userFacingError } from './EverfurError-DeBqRpQV.cjs';
3
3
  export { a as EverfurConfigError, E as EverfurResult, b as EverfurThrownError, i as isErr, c as isOk, u as unwrap } from './EverfurResult-COlXj1wq.cjs';
4
- export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from './config-u6rK4mKt.cjs';
5
- export { M as MintedToken, T as TokenProvider } from './identity-CUynm8S2.cjs';
4
+ export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from './config-C68HTCf4.cjs';
5
+ export { M as MintedToken, T as TokenProvider } from './identity-ScajqjK5.cjs';
6
6
  export { E as ErrorPolicyPort } from './ErrorPolicyPort-10s3HJCt.cjs';
7
7
  export { E as EverfurFaceStyle, a as EverfurThemeAdjustment, f as face, h as headingFace, p as previewTheme, t as themeAdjustments } from './typeStyle-DJedEu14.cjs';
8
8
  import { C as CapabilityName, a as CapabilityDecision } from './resolve-D4Ywz5OS.cjs';
9
9
  export { b as CapabilityDisabled, D as DisabledLevel } from './resolve-D4Ywz5OS.cjs';
10
10
  export { T as TelemetryPort } from './TelemetryPort-BDNr00hu.cjs';
11
11
  export { I as ImageCachePort, K as KvPort } from './cacheEpoch-DknKn3S0.cjs';
12
- export { L as LogLevel, a as LogRecord, b as LogSink, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, S as SecureStorePort } from './runtimeTypes-CWG1Cm4N.cjs';
12
+ export { L as LogLevel, a as LogRecord, b as LogSink, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, S as SecureStorePort } from './runtimeTypes-C67itXfp.cjs';
13
13
  export { C as CameraPort, a as CaptureOptions, M as MediaSource } from './CameraPort-Cv31Pz7g.cjs';
14
14
  export { F as FileHandle, b as FilePort, a as UploadPolicyWire, U as UploadTransport } from './ports-BN6RHF9W.cjs';
15
- export { C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, j as ChatMessageRole, k as ChatMessageSender, l as ChatStatus, m as Citation, P as PresignedPolicy, S as SendOptions, U as UploadPort } from './ports-DibY-h60.cjs';
15
+ export { C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, j as ChatMessageRole, k as ChatMessageSender, l as ChatStatus, m as Citation, P as PresignedPolicy, S as SendOptions, U as UploadPort } from './ports-okLpXkpu.cjs';
16
16
  export { R as RecordsDocumentPicker, a as RnRecordsUploadFetch, b as RnRecordsUploadTransportOptions, c as createRnRecordsUploadTransport } from './uploadTransport-BM_pnEWj.cjs';
17
- export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from './casesRepository-DFoK5N1O.cjs';
17
+ export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from './casesRepository-D0aQSXkb.cjs';
18
18
  import { ReactNode } from 'react';
19
- import { E as EverfurProviderProps } from './context-BZ1k4qE3.cjs';
20
- export { a as EverfurConfig, b as EverfurHandle, c as EverfurUser, U as UseEverfurPetProfileState, u as useCapability, d as useEverfur, e as useEverfurPetProfile, f as useEverfurTheme } from './context-BZ1k4qE3.cjs';
19
+ import { E as EverfurProviderProps } from './context-DY9pcjdK.cjs';
20
+ export { a as EverfurConfig, b as EverfurHandle, c as EverfurUser, U as UseEverfurPetProfileState, u as useCapability, d as useEverfur, e as useEverfurPetProfile, f as useEverfurTheme } from './context-DY9pcjdK.cjs';
21
21
  import { StyleProp, ViewStyle } from 'react-native';
22
- export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, E as EverfurChatDraftStore, L as LifecyclePort, U as UrgencyDisplayLevel, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from './attachments-HXFmzk-D.cjs';
23
- export { E as EverfurChat, a as EverfurChatAttachments, b as EverfurChatProps } from './Chat-B7oN62ww.cjs';
24
- export { P as PetProfileInput, a as PetProfilePatch, R as RegisteredPet, W as WidgetPet, b as WidgetPetProfile } from './petsRepository-CQgzEFyz.cjs';
25
- export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from './attachments-CkaPnIUw.cjs';
22
+ export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, E as EverfurChatDraftStore, L as LifecyclePort, U as UrgencyDisplayLevel, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from './attachments-tPWJ0DJI.cjs';
23
+ export { E as EverfurChat, a as EverfurChatAttachments, b as EverfurChatProps } from './Chat-Bkv-MLLu.cjs';
24
+ export { P as PetProfileInput, a as PetProfilePatch, R as RegisteredPet, W as WidgetPet, b as WidgetPetProfile } from './petsRepository-BYe7_MUo.cjs';
25
+ export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from './attachments-DhGAelCA.cjs';
26
26
  export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, a as PetHealthProfile, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from './profile-CSs1wlXT.cjs';
27
27
  export { C as CanonicalPetSpecies, c as canonicalPetSpecies } from './species-BXAIMh7I.cjs';
28
28
  import { E as EverfurThemeInput } from './branding-BCfwLj0h.cjs';
29
29
  export { A as APPEARANCE_PRESETS, a as APPEARANCE_PRESET_NAMES, b as APPEARANCE_SIZE_RANGES, c as EverfurAppearance, d as EverfurAppearanceFont, e as EverfurAppearancePreset, f as EverfurAppearanceRules, g as EverfurAppearanceVariables, h as EverfurThemeFontFaceKey, i as EverfurThemeFontUrlsInput, j as EverfurThemeFontsInput, k as EverfurThemeSlotInput, l as EverfurThemeSlotsInput, m as expandAppearance } from './branding-BCfwLj0h.cjs';
30
30
  export { E as EverfurColorTokens, a as EverfurFontFaceKey, b as EverfurFontFamilies, c as EverfurFontSource, d as EverfurFontWeight, e as EverfurLetterSpacingTokens, f as EverfurLineHeightTokens, g as EverfurMotionDurationTokens, h as EverfurMotionTokens, i as EverfurRadiusTokens, j as EverfurSpaceTokens, k as EverfurSpringToken, l as EverfurTextColorTokens, m as EverfurTheme, n as EverfurThemeMeta, o as EverfurThemeSlot, p as EverfurThemeSlotKey, q as EverfurThemeSlotName, r as EverfurThemeSlots, s as EverfurTypeSizeTokens, t as EverfurTypeTokens, u as EverfurWeightTokens, T as THEME_SLOT_KEYS, v as THEME_SLOT_NAMES } from './tokens-DLj8OnLH.cjs';
31
- import './requestFunnel-nmhlEdbM.cjs';
31
+ import './requestFunnel-u8qnM5Ll.cjs';
32
32
 
33
33
  /**
34
34
  * Wrap the tree ONCE, high. Mounting constructs the runtime (transport, identity, registry,
package/dist/index.d.ts CHANGED
@@ -1,34 +1,34 @@
1
1
  export { B as Brand, a as ClientId, C as ConversationId, D as DocumentId, J as JobId, P as PetRef, R as RecordsRequestId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, u as userRef } from './ids-B2GAAifq.js';
2
2
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode, c as categoryFor, i as isRetryableCode, u as userFacingError } from './EverfurError-DeBqRpQV.js';
3
3
  export { a as EverfurConfigError, E as EverfurResult, b as EverfurThrownError, i as isErr, c as isOk, u as unwrap } from './EverfurResult-ClPTS0P2.js';
4
- export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from './config-BB7e52FP.js';
5
- export { M as MintedToken, T as TokenProvider } from './identity-D5uywCtp.js';
4
+ export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from './config-DeUmccwl.js';
5
+ export { M as MintedToken, T as TokenProvider } from './identity-BTT6YtH5.js';
6
6
  export { E as ErrorPolicyPort } from './ErrorPolicyPort-C3nNSS_j.js';
7
7
  export { E as EverfurFaceStyle, a as EverfurThemeAdjustment, f as face, h as headingFace, p as previewTheme, t as themeAdjustments } from './typeStyle-BxVyF71R.js';
8
8
  import { C as CapabilityName, a as CapabilityDecision } from './resolve-D4Ywz5OS.js';
9
9
  export { b as CapabilityDisabled, D as DisabledLevel } from './resolve-D4Ywz5OS.js';
10
10
  export { T as TelemetryPort } from './TelemetryPort-BDNr00hu.js';
11
11
  export { I as ImageCachePort, K as KvPort } from './cacheEpoch-DknKn3S0.js';
12
- export { L as LogLevel, a as LogRecord, b as LogSink, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, S as SecureStorePort } from './runtimeTypes-CU2xVmiQ.js';
12
+ export { L as LogLevel, a as LogRecord, b as LogSink, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, S as SecureStorePort } from './runtimeTypes-BFes64Vp.js';
13
13
  export { C as CameraPort, a as CaptureOptions, M as MediaSource } from './CameraPort-Cv31Pz7g.js';
14
14
  export { F as FileHandle, b as FilePort, a as UploadPolicyWire, U as UploadTransport } from './ports-BN6RHF9W.js';
15
- export { C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, j as ChatMessageRole, k as ChatMessageSender, l as ChatStatus, m as Citation, P as PresignedPolicy, S as SendOptions, U as UploadPort } from './ports-Cu_Wc5Aw.js';
15
+ export { C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, j as ChatMessageRole, k as ChatMessageSender, l as ChatStatus, m as Citation, P as PresignedPolicy, S as SendOptions, U as UploadPort } from './ports-D4FQKTBS.js';
16
16
  export { R as RecordsDocumentPicker, a as RnRecordsUploadFetch, b as RnRecordsUploadTransportOptions, c as createRnRecordsUploadTransport } from './uploadTransport-C6kGP1Kd.js';
17
- export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from './casesRepository-qAkKKgji.js';
17
+ export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from './casesRepository-DjhMfm_n.js';
18
18
  import { ReactNode } from 'react';
19
- import { E as EverfurProviderProps } from './context-CJYmubjx.js';
20
- export { a as EverfurConfig, b as EverfurHandle, c as EverfurUser, U as UseEverfurPetProfileState, u as useCapability, d as useEverfur, e as useEverfurPetProfile, f as useEverfurTheme } from './context-CJYmubjx.js';
19
+ import { E as EverfurProviderProps } from './context-D_2sCvoo.js';
20
+ export { a as EverfurConfig, b as EverfurHandle, c as EverfurUser, U as UseEverfurPetProfileState, u as useCapability, d as useEverfur, e as useEverfurPetProfile, f as useEverfurTheme } from './context-D_2sCvoo.js';
21
21
  import { StyleProp, ViewStyle } from 'react-native';
22
- export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, E as EverfurChatDraftStore, L as LifecyclePort, U as UrgencyDisplayLevel, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from './attachments-DN2cNGwe.js';
23
- export { E as EverfurChat, a as EverfurChatAttachments, b as EverfurChatProps } from './Chat-Cugs9Dsl.js';
24
- export { P as PetProfileInput, a as PetProfilePatch, R as RegisteredPet, W as WidgetPet, b as WidgetPetProfile } from './petsRepository-RGI_xPK1.js';
25
- export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from './attachments-20X7Vuip.js';
22
+ export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, E as EverfurChatDraftStore, L as LifecyclePort, U as UrgencyDisplayLevel, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from './attachments-BAcQdIz7.js';
23
+ export { E as EverfurChat, a as EverfurChatAttachments, b as EverfurChatProps } from './Chat-Dy1L27a8.js';
24
+ export { P as PetProfileInput, a as PetProfilePatch, R as RegisteredPet, W as WidgetPet, b as WidgetPetProfile } from './petsRepository-BdfbY9Oe.js';
25
+ export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from './attachments-Brt7ivEo.js';
26
26
  export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, a as PetHealthProfile, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from './profile-CSs1wlXT.js';
27
27
  export { C as CanonicalPetSpecies, c as canonicalPetSpecies } from './species-BXAIMh7I.js';
28
28
  import { E as EverfurThemeInput } from './branding-DJf4h12Q.js';
29
29
  export { A as APPEARANCE_PRESETS, a as APPEARANCE_PRESET_NAMES, b as APPEARANCE_SIZE_RANGES, c as EverfurAppearance, d as EverfurAppearanceFont, e as EverfurAppearancePreset, f as EverfurAppearanceRules, g as EverfurAppearanceVariables, h as EverfurThemeFontFaceKey, i as EverfurThemeFontUrlsInput, j as EverfurThemeFontsInput, k as EverfurThemeSlotInput, l as EverfurThemeSlotsInput, m as expandAppearance } from './branding-DJf4h12Q.js';
30
30
  export { E as EverfurColorTokens, a as EverfurFontFaceKey, b as EverfurFontFamilies, c as EverfurFontSource, d as EverfurFontWeight, e as EverfurLetterSpacingTokens, f as EverfurLineHeightTokens, g as EverfurMotionDurationTokens, h as EverfurMotionTokens, i as EverfurRadiusTokens, j as EverfurSpaceTokens, k as EverfurSpringToken, l as EverfurTextColorTokens, m as EverfurTheme, n as EverfurThemeMeta, o as EverfurThemeSlot, p as EverfurThemeSlotKey, q as EverfurThemeSlotName, r as EverfurThemeSlots, s as EverfurTypeSizeTokens, t as EverfurTypeTokens, u as EverfurWeightTokens, T as THEME_SLOT_KEYS, v as THEME_SLOT_NAMES } from './tokens-DLj8OnLH.js';
31
- import './requestFunnel-BkSFsLKh.js';
31
+ import './requestFunnel-Dhaj0yUq.js';
32
32
 
33
33
  /**
34
34
  * Wrap the tree ONCE, high. Mounting constructs the runtime (transport, identity, registry,
package/dist/index.js CHANGED
@@ -96,7 +96,7 @@ return Object.freeze({kind:"done",terminal:true,conversationId:fields.conversati
96
96
  return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fields.retryable,wireMessage:fields.wireMessage,synthesized:fields.synthesized,lastEventId:fields.lastEventId,serverRequestId:fields.serverRequestId??null})}function analysisStartedFrame(requestId,lastEventId,serverRequestId=null){/* @__PURE__ */
97
97
  return Object.freeze({kind:"analysisStarted",requestId:requestId,lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}function analysisCompleteFrame(fields,serverRequestId=null){/* @__PURE__ */
98
98
  return Object.freeze({kind:"analysisComplete",terminal:false,resultId:fields.resultId,analysisType:fields.analysisType,modelVersion:fields.modelVersion,confidence:fields.confidence,detections:/* @__PURE__ */Object.freeze([...fields.detections]),interpretation:fields.interpretation,lastEventId:fields.lastEventId,serverRequestId:serverRequestId})}function unknownFrame(raw,lastEventId,serverRequestId=null){/* @__PURE__ */
99
- return Object.freeze({kind:"unknown",raw:{...raw},lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}function createIdentityProvider(userRef2,getToken,onMinted){let cached=null,inFlight3=null,revoked=false,load=()=>inFlight3||(inFlight3=(async()=>{try{let minted=await getToken(),token=typeof minted=="string"?minted:minted?.token;if(typeof token!="string"||token.length===0)throw new EverfurConfigError("invalid-argument","TokenProvider returned an empty token");return cached=token,onMinted?.(typeof minted=="string"?null:expiryMs(minted.expiresAt)),token}finally{inFlight3=null}})(),inFlight3);return{userRef:userRef2,async currentToken(opts){if(revoked)throw new EverfurConfigError("not-initialized","This identity was cleared (sign-out); mint a new one.");return opts?.forceRefresh&&(cached=null),cached!==null?cached:load()},hasToken(){return!revoked&&cached!==null},clear(){revoked=true,cached=null}}}function expiryMs(value){if(value===void 0)return null;let ms=typeof value=="number"?value<1e11?value*1e3:value:new Date(value).getTime();return Number.isFinite(ms)?ms:null}function newSessionId(){let bytes=new Uint8Array(16),cryptoObj=globalThis.crypto;if(typeof cryptoObj?.getRandomValues=="function")cryptoObj.getRandomValues(bytes);else for(let i=0;i<bytes.length;i+=1)bytes[i]=Math.floor(Math.random()*256);bytes[6]=bytes[6]&15|64,bytes[8]=bytes[8]&63|128;let hex=[];for(let i=0;i<bytes.length;i+=1)hex.push(bytes[i].toString(16).padStart(2,"0"));return hex.slice(0,4).join("")+"-"+hex.slice(4,6).join("")+"-"+hex.slice(6,8).join("")+"-"+hex.slice(8,10).join("")+"-"+hex.slice(10,16).join("")}function authHeaders(auth){let headers={};return auth.mode==="personalized"?headers.authorization=`Bearer ${auth.token}`:headers["x-everfur-partner-key"]=auth.publishableKey,auth.userRef&&(headers["x-everfur-user-ref"]=auth.userRef),auth.sessionId&&(headers["x-everfur-session-id"]=auth.sessionId),headers}function withAuthHeaders(req,auth){return{...req,headers:{...stripAuthHeaders(req.headers),...authHeaders(auth)}}}function stripAuthHeaders(headers){if(!headers)return{};let out={};for(let[key,value]of Object.entries(headers)){let lower=key.toLowerCase();lower==="authorization"||lower==="x-everfur-partner-key"||(out[key]=value)}return out}async function authedSend(req,ctx){if(ctx.mode==="anonymous")return ctx.transport.request(withAuthHeaders(req,{mode:"anonymous",publishableKey:ctx.publishableKey,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));let token;try{token=await ctx.identity.currentToken()}catch{return err(authRejectedError())}let first=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:token,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));if(first.ok||first.error.httpStatus!==401)return first;let refreshed;try{refreshed=await ctx.identity.currentToken({forceRefresh:!0})}catch{return err(authRejectedError())}let retry=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:refreshed,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));return!retry.ok&&retry.error.httpStatus===401?err(authRejectedError(retry.error.httpStatus)):retry}function authRejectedError(httpStatus){return makeEverfurError("authRejected",{retryable:false,...httpStatus!==void 0?{httpStatus:httpStatus}:{}})}var BLOCK_SEPARATOR=`\n\n`,MAX_PENDING_BLOCK_CHARS=1048576,wireObjectSchema=/* @__PURE__ */z.record(/* @__PURE__ */z.string(),/* @__PURE__ */z.unknown()),URGENCY_LEVELS=["emergency","schedule_soon","home_care"];async function*parseSse(bytes,serverRequestId=null){let resolvedRequestId=null,requestIdNow=()=>(resolvedRequestId!==null||(resolvedRequestId=typeof serverRequestId=="function"?serverRequestId():serverRequestId),resolvedRequestId),decoder=new TextDecoder("utf-8"),buffer="",scanFrom=0,sawDelta=false;for await(let chunk of bytes){for(buffer+=decoder.decode(chunk,{stream:true});;){let sep=buffer.indexOf(BLOCK_SEPARATOR,scanFrom);if(sep===-1)break;let block=buffer.slice(0,sep);buffer=buffer.slice(sep+BLOCK_SEPARATOR.length),scanFrom=0;let frame=parseBlock(block,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}if(scanFrom=buffer.length>0?buffer.length-1:0,buffer.length>MAX_PENDING_BLOCK_CHARS){yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()});return}}if(buffer+=decoder.decode(),buffer.trim().length>0){let frame=parseBlock(buffer,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()})}function parseBlock(block,serverRequestId){let id=null,dataLines=[];for(let rawLine of block.split(`\n`)){let line=rawLine.replace(/\s+$/,"");line.length===0||line.startsWith(":")||(line.startsWith("id:")?id=line.slice(3).trim():line.startsWith("data:")&&dataLines.push(line.slice(5).replace(/^ /,"")))}if(dataLines.length===0)return null;let decoded;try{decoded=JSON.parse(dataLines.join(`\n`))}catch{return null}if(typeof decoded!="object"||decoded===null||Array.isArray(decoded))return null;let parsed=wireObjectSchema.safeParse(decoded);return parsed.success?frameFromWire(parsed.data,id,serverRequestId):null}function frameFromWire(json,lastEventId,serverRequestId){let type=json.type,event=json.event;if(type==="error"||"error"in json)return errorFrame({code:asString(json.code)??"unknown",retryable:json.retryable===true,wireMessage:asString(json.error),synthesized:false,lastEventId:lastEventId,serverRequestId:serverRequestId});if(type==="done"||json.done===true)return doneFrame({conversationId:asString(json.conversation_id)??"",messageId:asString(json.message_id),title:asString(json.title),followUpQuestions:asStringList(json.follow_up_questions),citations:asMapList(json.citations),citationStatus:asString(json.citation_status),urgencyLevel:asUrgency(json.urgency_level),urgencyReason:asString(json.urgency_reason),urgencyProvided:urgencySlotProvided(json),resultId:asString(json.result_id),lastEventId:lastEventId},serverRequestId);if(type==="accepted"||json.status==="reasoning")return acceptedFrame(asString(json.stream_id),lastEventId,serverRequestId);if(type==="heartbeat"||json.heartbeat===true)return heartbeatFrame(lastEventId,serverRequestId);if(type==="text.delta"||"delta"in json||"token"in json){let delta=asString(json.delta)??asString(json.token)??"";return deltaFrame(delta,lastEventId,serverRequestId)}return event==="analysis_started"?analysisStartedFrame(asString(json.request_id),lastEventId,serverRequestId):event==="analysis_complete"?analysisCompleteFrame({resultId:asString(json.result_id),analysisType:asString(json.analysis_type),modelVersion:asString(json.model_version),confidence:asNumber(json.confidence),detections:asMapList(json.detections),interpretation:asString(json.interpretation),lastEventId:lastEventId},serverRequestId):unknownFrame(json,lastEventId,serverRequestId)}function asString(v){return typeof v=="string"?v:null}function asNumber(v){return typeof v=="number"&&Number.isFinite(v)?v:null}function asUrgency(v){return typeof v=="string"&&URGENCY_LEVELS.includes(v)?v:null}function urgencySlotProvided(json){if(!Object.prototype.hasOwnProperty.call(json,"urgency_level"))return false;let raw=json.urgency_level;return raw===null||asUrgency(raw)!==null}function asStringList(v){return Array.isArray(v)?v.map(e=>typeof e=="string"?e:String(e)):[]}function isPlainObject(v){return typeof v=="object"&&v!==null&&!Array.isArray(v)}function asMapList(v){return Array.isArray(v)?v.filter(isPlainObject):[]}var SDK_VERSION="0.9.2",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
99
+ return Object.freeze({kind:"unknown",raw:{...raw},lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}function createIdentityProvider(userRef2,getToken,onMinted){let cached=null,inFlight3=null,revoked=false,load=()=>inFlight3||(inFlight3=(async()=>{try{let minted=await getToken(),token=typeof minted=="string"?minted:minted?.token;if(typeof token!="string"||token.length===0)throw new EverfurConfigError("invalid-argument","TokenProvider returned an empty token");return cached=token,onMinted?.(typeof minted=="string"?null:expiryMs(minted.expiresAt)),token}finally{inFlight3=null}})(),inFlight3);return{userRef:userRef2,async currentToken(opts){if(revoked)throw new EverfurConfigError("not-initialized","This identity was cleared (sign-out); mint a new one.");return opts?.forceRefresh&&(cached=null),cached!==null?cached:load()},hasToken(){return!revoked&&cached!==null},clear(){revoked=true,cached=null}}}function expiryMs(value){if(value===void 0)return null;let ms=typeof value=="number"?value<1e11?value*1e3:value:new Date(value).getTime();return Number.isFinite(ms)?ms:null}function newSessionId(){let bytes=new Uint8Array(16),cryptoObj=globalThis.crypto;if(typeof cryptoObj?.getRandomValues=="function")cryptoObj.getRandomValues(bytes);else for(let i=0;i<bytes.length;i+=1)bytes[i]=Math.floor(Math.random()*256);bytes[6]=bytes[6]&15|64,bytes[8]=bytes[8]&63|128;let hex=[];for(let i=0;i<bytes.length;i+=1)hex.push(bytes[i].toString(16).padStart(2,"0"));return hex.slice(0,4).join("")+"-"+hex.slice(4,6).join("")+"-"+hex.slice(6,8).join("")+"-"+hex.slice(8,10).join("")+"-"+hex.slice(10,16).join("")}function authHeaders(auth){let headers={};return auth.mode==="personalized"?headers.authorization=`Bearer ${auth.token}`:headers["x-everfur-partner-key"]=auth.publishableKey,auth.userRef&&(headers["x-everfur-user-ref"]=auth.userRef),auth.sessionId&&(headers["x-everfur-session-id"]=auth.sessionId),headers}function withAuthHeaders(req,auth){return{...req,headers:{...stripAuthHeaders(req.headers),...authHeaders(auth)}}}function stripAuthHeaders(headers){if(!headers)return{};let out={};for(let[key,value]of Object.entries(headers)){let lower=key.toLowerCase();lower==="authorization"||lower==="x-everfur-partner-key"||(out[key]=value)}return out}async function authedSend(req,ctx){if(ctx.mode==="anonymous")return ctx.transport.request(withAuthHeaders(req,{mode:"anonymous",publishableKey:ctx.publishableKey,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));let token;try{token=await ctx.identity.currentToken()}catch{return err(authRejectedError())}let first=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:token,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));if(first.ok||first.error.httpStatus!==401)return first;let refreshed;try{refreshed=await ctx.identity.currentToken({forceRefresh:!0})}catch{return err(authRejectedError())}let retry=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:refreshed,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));return!retry.ok&&retry.error.httpStatus===401?err(authRejectedError(retry.error.httpStatus)):retry}function authRejectedError(httpStatus){return makeEverfurError("authRejected",{retryable:false,...httpStatus!==void 0?{httpStatus:httpStatus}:{}})}var BLOCK_SEPARATOR=`\n\n`,MAX_PENDING_BLOCK_CHARS=1048576,wireObjectSchema=/* @__PURE__ */z.record(/* @__PURE__ */z.string(),/* @__PURE__ */z.unknown()),URGENCY_LEVELS=["emergency","schedule_soon","home_care"];async function*parseSse(bytes,serverRequestId=null){let resolvedRequestId=null,requestIdNow=()=>(resolvedRequestId!==null||(resolvedRequestId=typeof serverRequestId=="function"?serverRequestId():serverRequestId),resolvedRequestId),decoder=new TextDecoder("utf-8"),buffer="",scanFrom=0,sawDelta=false;for await(let chunk of bytes){for(buffer+=decoder.decode(chunk,{stream:true});;){let sep=buffer.indexOf(BLOCK_SEPARATOR,scanFrom);if(sep===-1)break;let block=buffer.slice(0,sep);buffer=buffer.slice(sep+BLOCK_SEPARATOR.length),scanFrom=0;let frame=parseBlock(block,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}if(scanFrom=buffer.length>0?buffer.length-1:0,buffer.length>MAX_PENDING_BLOCK_CHARS){yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()});return}}if(buffer+=decoder.decode(),buffer.trim().length>0){let frame=parseBlock(buffer,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()})}function parseBlock(block,serverRequestId){let id=null,dataLines=[];for(let rawLine of block.split(`\n`)){let line=rawLine.replace(/\s+$/,"");line.length===0||line.startsWith(":")||(line.startsWith("id:")?id=line.slice(3).trim():line.startsWith("data:")&&dataLines.push(line.slice(5).replace(/^ /,"")))}if(dataLines.length===0)return null;let decoded;try{decoded=JSON.parse(dataLines.join(`\n`))}catch{return null}if(typeof decoded!="object"||decoded===null||Array.isArray(decoded))return null;let parsed=wireObjectSchema.safeParse(decoded);return parsed.success?frameFromWire(parsed.data,id,serverRequestId):null}function frameFromWire(json,lastEventId,serverRequestId){let type=json.type,event=json.event;if(type==="error"||"error"in json)return errorFrame({code:asString(json.code)??"unknown",retryable:json.retryable===true,wireMessage:asString(json.error),synthesized:false,lastEventId:lastEventId,serverRequestId:serverRequestId});if(type==="done"||json.done===true)return doneFrame({conversationId:asString(json.conversation_id)??"",messageId:asString(json.message_id),title:asString(json.title),followUpQuestions:asStringList(json.follow_up_questions),citations:asMapList(json.citations),citationStatus:asString(json.citation_status),urgencyLevel:asUrgency(json.urgency_level),urgencyReason:asString(json.urgency_reason),urgencyProvided:urgencySlotProvided(json),resultId:asString(json.result_id),lastEventId:lastEventId},serverRequestId);if(type==="accepted"||json.status==="reasoning")return acceptedFrame(asString(json.stream_id),lastEventId,serverRequestId);if(type==="heartbeat"||json.heartbeat===true)return heartbeatFrame(lastEventId,serverRequestId);if(type==="text.delta"||"delta"in json||"token"in json){let delta=asString(json.delta)??asString(json.token)??"";return deltaFrame(delta,lastEventId,serverRequestId)}return event==="analysis_started"?analysisStartedFrame(asString(json.request_id),lastEventId,serverRequestId):event==="analysis_complete"?analysisCompleteFrame({resultId:asString(json.result_id),analysisType:asString(json.analysis_type),modelVersion:asString(json.model_version),confidence:asNumber(json.confidence),detections:asMapList(json.detections),interpretation:asString(json.interpretation),lastEventId:lastEventId},serverRequestId):unknownFrame(json,lastEventId,serverRequestId)}function asString(v){return typeof v=="string"?v:null}function asNumber(v){return typeof v=="number"&&Number.isFinite(v)?v:null}function asUrgency(v){return typeof v=="string"&&URGENCY_LEVELS.includes(v)?v:null}function urgencySlotProvided(json){if(!Object.prototype.hasOwnProperty.call(json,"urgency_level"))return false;let raw=json.urgency_level;return raw===null||asUrgency(raw)!==null}function asStringList(v){return Array.isArray(v)?v.map(e=>typeof e=="string"?e:String(e)):[]}function isPlainObject(v){return typeof v=="object"&&v!==null&&!Array.isArray(v)}function asMapList(v){return Array.isArray(v)?v.filter(isPlainObject):[]}var SDK_VERSION="0.9.3",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
100
100
  return Object.freeze({ok:false,failure:/* @__PURE__ */Object.freeze({reason:reason,message:message})})}function checkPublishableKey(raw){let publishableKey=typeof raw=="string"?raw.trim():"";return publishableKey.length===0?{reason:"missing-publishable-key",message:"publishableKey is required"}:/^sk[_-]/i.test(publishableKey)?{reason:"secret-key-as-publishable-key",message:"publishableKey looks like a SECRET key (sk_...). A device must never hold a partner secret key: use the pk_ publishable key here, and keep the secret key on your server."}:null}function tryResolveClientConfig(config,options){let keyFailure=checkPublishableKey(config?.publishableKey);if(keyFailure!==null)/* @__PURE__ */
101
101
  return Object.freeze({ok:false,failure:keyFailure});let publishableKey=config.publishableKey.trim(),baseUrl=tryResolveApiBaseUrl(config.apiBaseUrl);if(!baseUrl.ok)return baseUrl;let contractVersion=config.contractVersion?.trim()||DEFAULT_CONTRACT_VERSION;/* @__PURE__ */
102
102
  return Object.freeze({ok:true,config:/* @__PURE__ */Object.freeze({publishableKey:publishableKey,apiBaseUrl:baseUrl.value,contractVersion:contractVersion,sdkVersion:SDK_VERSION,platform:options?.platform??SDK_PLATFORM,debug:config.debug===true})})}function tryResolveApiBaseUrl(apiBaseUrl){let explicit=apiBaseUrl?.trim(),candidate=explicit&&explicit.length>0?explicit:readEnv(ENV_API_BASE_URL);return candidate?normalizeBaseUrl(candidate):configFailure("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${ENV_API_BASE_URL}. The SDK never ships a hardcoded host.`)}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function hostOf(authority){return authority.slice(authority.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}function isPrintableHost(host){return host.length===0||host.includes("@")?false:host.startsWith("[")&&host.endsWith("]")?true:!host.includes(":")}function canEchoOrigin(rawTrimmed,host){let schemeEnd=rawTrimmed.indexOf("://");return schemeEnd<0||rawTrimmed.slice(schemeEnd+3).includes("@")?false:isPrintableHost(host)}function safeOrigin(scheme,host){return`${scheme}://${host}`}function normalizeBaseUrl(raw){let trimmed=raw.trim(),match=ABSOLUTE_URL.exec(trimmed);if(match===null||match[2]===void 0||match[2].length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let scheme=(match[1]??"").toLowerCase(),host=hostOf(match[2]);if(host.length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let shown=canEchoOrigin(trimmed,host)?`: ${safeOrigin(scheme,host)}`:"";if(scheme!=="https"){if(!(scheme==="http"&&isLoopbackHost(host)))return scheme==="http"?configFailure("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${shown}`):configFailure("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${shown}`)}let value=trimmed.endsWith("/")?trimmed.slice(0,-1):trimmed;/* @__PURE__ */
@@ -207,7 +207,7 @@ return jsxs(Fragment,{children:[null,
207
207
  return jsxs(Fragment,{children:[
208
208
  /* @__PURE__ */jsx(Pressable,{onPress:()=>{if(!(busy||settling.current)){if(!redirecting){let request={...petRef2!==void 0?{petRef:petRef2}:{},...usState!==void 0?{usState:usState}:{},...visitRef!=null?{visitRef:visitRef,intent:intent??null}:{}};openVetVisitInApp(request,onStartInApp)===null&&callHost(onError,"unavailable",null);return}settling.current=true,(visitRef==null?visit.open():visit.openVisit(visitRef,intent??null)).then(result=>{result.opened?callHost(onOpened,result.flowId??null):result.reason!=="cancelled"&&callHost(onError,result.reason,result.error)}).finally(()=>{settling.current=false})}},accessibilityRole:"button",accessibilityLabel:text3,accessibilityState:{busy:busy,disabled:busy},style:[styles2.button,busy?styles2.busy:null,style],children:/* @__PURE__ */jsx(Text,{style:[styles2.label,labelStyle],children:text3})}),
209
209
  /* @__PURE__ */jsx(EverfurTelevetHost,{})]})}function makeStyles4(theme){let{color:color,space:space,radius:radius,type:type,slots:slots}=theme;return StyleSheet.create({button:{minHeight:MIN_TOUCH_TARGET,minWidth:MIN_TOUCH_TARGET,alignItems:"center",justifyContent:"center",paddingHorizontal:space.xl,paddingVertical:space.sm,borderRadius:radius.pill,backgroundColor:color.primary,...slotBox(slots.vetVisitButton)},busy:{opacity:BUSY_OPACITY},label:{...face(theme,"medium"),color:color.onPrimary,fontSize:type.size.body,lineHeight:type.size.body*type.lineHeight.snug,...slotText(slots.vetVisitButton)}})}function useBrandImage(uri){let[failed,setFailed]=useState(null);return{shown:uri!==null&&failed!==uri,onError:()=>setFailed(uri)}}function BrandImage({uri:uri,label:label,decorative:decorative=false,style:style,resizeMode:resizeMode="contain",fallback:fallback=null,onError:onError,testID:testID}){let image=useBrandImage(uri);if(uri===null||!image.shown)return fallback;let a11y=decorative?{accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"}:{accessible:true,accessibilityRole:"image",...label===void 0?{}:{accessibilityLabel:label}};/* @__PURE__ */
210
- return jsx(Image,{source:{uri:uri},style:style,resizeMode:resizeMode,...a11y,onError:()=>{image.onError(),onError?.()},...testID===void 0?{}:{testID:testID}})}function BrandLogo({logoUrl:logoUrl,name:name,barStyle:barStyle,logoStyle:logoStyle,testID:testID}){let image=useBrandImage(logoUrl);return logoUrl===null||!image.shown?null:/* @__PURE__ */jsx(View,{style:barStyle,...testID===void 0?{}:{testID:testID},children:/* @__PURE__ */jsx(Image,{source:{uri:logoUrl},style:logoStyle,resizeMode:"contain",accessible:true,accessibilityRole:"image",accessibilityLabel:name,onError:image.onError})})}function grounds(c){return[c.surface,c.surfaceCream,c.surfaceSubtle,c.background,c.chatGround,c.composerFill]}function isEverfurLightLook(theme){if(theme.brightness!=="light")return false;let compiled=EVERFUR_LIGHT.color,c=theme.color,same3=(a,b)=>parseColor(a)===parseColor(b),own=new Set(grounds(compiled));return same3(c.brand,compiled.brand)&&same3(c.accent,compiled.accent)&&grounds(c).every(ground=>own.has(ground))}function brandedStatus(theme){let compiled=(theme.brightness==="dark"?EVERFUR_DARK:EVERFUR_LIGHT).color,c=theme.color,same3=(a,b)=>parseColor(a)===parseColor(b);return{success:!same3(c.success,compiled.success),warning:!same3(c.warningStrong,compiled.warningStrong)||!same3(c.cautionAccent,compiled.cautionAccent),info:!(same3(c.info,c.brandInk)&&same3(c.badgeBgInfo,c.brandSoft)&&same3(c.infoEdge,c.structureEdge))}}function speciesOf(species){return canonicalPetSpecies(species)==="cat"?"cat":"dog"}function petAgeYears(ageYears){return typeof ageYears!="number"||!Number.isFinite(ageYears)||ageYears<0?null:Math.floor(ageYears)}function formatPetMeta(pet){let ageYears=petAgeYears(pet.ageYears),speciesLabel=speciesOf(pet.species)==="cat"?"Cat":"Dog";if(ageYears==null)return speciesLabel;let ageLabel=ageYears===1?"1 yr":`${ageYears} yrs`;return`${speciesLabel} · ${ageLabel}`}var INITIALS_PALETTE=/* @__PURE__ */Object.freeze([
210
+ return jsx(Image,{source:{uri:uri},style:style,resizeMode:resizeMode,...a11y,onError:()=>{image.onError(),onError?.()},...testID===void 0?{}:{testID:testID}})}function BrandLogo({logoUrl:logoUrl,name:name,barStyle:barStyle,logoStyle:logoStyle,testID:testID}){let image=useBrandImage(logoUrl);return logoUrl===null||!image.shown?null:/* @__PURE__ */jsx(View,{style:barStyle,...testID===void 0?{}:{testID:testID},children:/* @__PURE__ */jsx(Image,{source:{uri:logoUrl},style:logoStyle,resizeMode:"contain",accessible:true,accessibilityRole:"image",accessibilityLabel:name,onError:image.onError})})}var UNMEASURED=/* @__PURE__ */Object.freeze({row:null,leading:null,trailing:null}),NO_BALANCE=/* @__PURE__ */Object.freeze({leading:void 0,trailing:void 0});function balanceHeaderSides(m,reserved,logoWidth){if(m.row===null||m.leading===null||m.trailing===null)return NO_BALANCE;let difference=Math.abs(m.leading-m.trailing);if(difference<.5)return NO_BALANCE;let centre=m.row-reserved-m.leading-m.trailing,spare=Math.min(difference,Math.max(0,centre-logoWidth));return spare<.5?NO_BALANCE:m.leading<m.trailing?{leading:m.leading+spare,trailing:void 0}:{leading:void 0,trailing:m.trailing+spare}}function nextMeasures(prev,key,width){let old=prev[key];return old!==null&&Math.abs(old-width)<.5?prev:{...prev,[key]:width}}function grounds(c){return[c.surface,c.surfaceCream,c.surfaceSubtle,c.background,c.chatGround,c.composerFill]}function isEverfurLightLook(theme){if(theme.brightness!=="light")return false;let compiled=EVERFUR_LIGHT.color,c=theme.color,same3=(a,b)=>parseColor(a)===parseColor(b),own=new Set(grounds(compiled));return same3(c.brand,compiled.brand)&&same3(c.accent,compiled.accent)&&grounds(c).every(ground=>own.has(ground))}function brandedStatus(theme){let compiled=(theme.brightness==="dark"?EVERFUR_DARK:EVERFUR_LIGHT).color,c=theme.color,same3=(a,b)=>parseColor(a)===parseColor(b);return{success:!same3(c.success,compiled.success),warning:!same3(c.warningStrong,compiled.warningStrong)||!same3(c.cautionAccent,compiled.cautionAccent),info:!(same3(c.info,c.brandInk)&&same3(c.badgeBgInfo,c.brandSoft)&&same3(c.infoEdge,c.structureEdge))}}function speciesOf(species){return canonicalPetSpecies(species)==="cat"?"cat":"dog"}function petAgeYears(ageYears){return typeof ageYears!="number"||!Number.isFinite(ageYears)||ageYears<0?null:Math.floor(ageYears)}function formatPetMeta(pet){let ageYears=petAgeYears(pet.ageYears),speciesLabel=speciesOf(pet.species)==="cat"?"Cat":"Dog";if(ageYears==null)return speciesLabel;let ageLabel=ageYears===1?"1 yr":`${ageYears} yrs`;return`${speciesLabel} · ${ageLabel}`}var INITIALS_PALETTE=/* @__PURE__ */Object.freeze([
211
211
  /* @__PURE__ */Object.freeze({background:"#ffbdbd",foreground:"#6d1d14"}),
212
212
  /* @__PURE__ */Object.freeze({background:"#a0c4f6",foreground:"#0b3a73"}),
213
213
  /* @__PURE__ */Object.freeze({background:"#fbc558",foreground:"#10462e"}),
@@ -226,16 +226,17 @@ return jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:fillCopy(i
226
226
  /* @__PURE__ */jsx(Text,{tier:"compact",style:styles2.meta,numberOfLines:1,children:isActive?`${CHAT_COPY.activePrefix}${meta}`:meta})]}),isActive?/* @__PURE__ */jsx(CheckGlyph,{size:CHECK_SIZE,color:theme.color.brandInk}):null]},pet.petRef)})}),onAddPet!==null?/* @__PURE__ */jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:CHAT_COPY.addAnotherPet,style:styles2.addRow,onPress:onAddPet,children:[
227
227
  /* @__PURE__ */jsx(View,{style:styles2.addDisc,children:/* @__PURE__ */jsx(Text,{tier:"control",style:styles2.addPlus,children:"+"})}),
228
228
  /* @__PURE__ */jsx(Text,{style:styles2.addLabel,children:CHAT_COPY.addAnotherPet})]}):null,
229
- /* @__PURE__ */jsx(PressScale,{accessibilityRole:"button",accessibilityLabel:CHAT_COPY.close,containerStyle:styles2.closeSlot,style:styles2.closeButton,onPress:onClose,children:/* @__PURE__ */jsx(Text,{tier:"control",style:styles2.closeText,children:CHAT_COPY.close})})]})]})}):null}function makeStyles6(theme){let c=theme.color,r=theme.radius,dialogText=slotText(theme.slots.dialog);return StyleSheet.create({root:{flex:1,justifyContent:"flex-end"},backdrop:{flex:1,backgroundColor:BACKDROP2},panel:{backgroundColor:c.surface,paddingHorizontal:20,paddingTop:20,paddingBottom:32,borderTopLeftRadius:PANEL_RADIUS,borderTopRightRadius:PANEL_RADIUS,gap:14,maxHeight:PANEL_MAX_HEIGHT,...sheetSlotBox(theme.slots.dialog)},title:{...headingFace(theme,"bold"),fontSize:18,lineHeight:22,color:c.brandInk,...dialogText},list:{maxHeight:LIST_MAX_HEIGHT,flexShrink:1},listContent:{gap:10},addRow:{flexDirection:"row",alignItems:"center",gap:12,minHeight:MIN_TOUCH_TARGET2,paddingHorizontal:8},addDisc:{width:ROW_RING_SIZE,height:ROW_RING_SIZE,borderRadius:r.pill,alignItems:"center",justifyContent:"center",borderWidth:ROW_RING_STROKE,borderStyle:"dashed",borderColor:c.brandBorder,backgroundColor:c.surfaceCream},addPlus:{...face(theme,"bold"),fontSize:20,lineHeight:22,color:c.brandInk},addLabel:{...face(theme,"bold"),fontSize:15,lineHeight:20,color:c.text.primary,...dialogText},row:{flexDirection:"row",alignItems:"center",gap:12,padding:12,borderRadius:r.md,borderWidth:1,borderColor:c.brandBorder,backgroundColor:c.surface},rowActive:{borderColor:c.brandInk,backgroundColor:c.brandSoft},copy:{flex:1,gap:2},name:{...face(theme,"bold"),fontSize:15,lineHeight:18,color:c.text.primary},meta:{...face(theme,"monoBold"),fontSize:11,lineHeight:13,color:c.text.muted,textTransform:"uppercase",letterSpacing:META_TRACKING},closeSlot:{alignSelf:"flex-end"},closeButton:{paddingHorizontal:18,paddingVertical:10,borderRadius:CLOSE_RADIUS,backgroundColor:c.brandSoft},closeText:{...face(theme,"bold"),color:c.brandInk,fontSize:13,lineHeight:16,letterSpacing:META_TRACKING}})}var MIN_TOUCH_TARGET3=44,ICON_BUTTON_SIZE=36,MENU_GLYPH_SIZE=22,UNREAD_DOT_SIZE=9,UNREAD_DOT_RING=1.5,UNREAD_DOT_INSET=6,HEADER_AVATAR_SIZE=35,HEADER_RING_STROKE=1.75,ADD_BADGE_SIZE=12.4,ADD_BADGE_BORDER=.5,ADD_BADGE_GLYPH=8,LOGO_HEIGHT=28,LOGO_MAX_WIDTH=160;function headerPet(pets,petRef2){return headerPetOf(pets,petRef2)}function ChatHeader({pets:pets,petRef:petRef2,historyUnread:historyUnread,onOpenHistory:onOpenHistory,onPetChange:onPetChange,onAddPet:onAddPet,vet:vet}){let theme=useEverfurTheme(),styles2=useMemo(()=>makeStyles7(theme),[theme]),[switcherOpen,setSwitcherOpen]=useState(false),shown=headerPet(pets.pets,petRef2),canSwitch=pets.pets.length>=2,shownPetRef=petRef2??shown?.petRef??null,name=petDisplayName(shown),select=next=>{setSwitcherOpen(false),pets.setActivePet(next),callHost(onPetChange,next)},addPet=onAddPet===void 0?null:()=>{setSwitcherOpen(false),callHost(onAddPet)};/* @__PURE__ */
230
- return jsxs(View,{style:styles2.row,children:[
231
- /* @__PURE__ */jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:historyUnread?`${CHAT_COPY.openHistoryNative}${CHAT_COPY.newReplySuffix}`:CHAT_COPY.openHistoryNative,containerStyle:styles2.iconSlot,style:styles2.iconButton,onPress:onOpenHistory,children:[
232
- /* @__PURE__ */jsx(MenuGlyph,{size:MENU_GLYPH_SIZE,color:theme.slots.header?.textColor??theme.color.text.primary,strokeWidth:2}),historyUnread?/* @__PURE__ */jsx(View,{style:styles2.unreadDot,pointerEvents:"none"}):null]}),
233
- /* @__PURE__ */jsx(View,{style:styles2.center,pointerEvents:"box-none",children:/* @__PURE__ */jsx(BrandLogo,{logoUrl:theme.meta.logoUrl,name:theme.meta.displayName,barStyle:styles2.logoBar,logoStyle:styles2.logo})}),shownPetRef===null?null:/* @__PURE__ */jsx(VetVisitButton,{entry:"chat",petRef:shownPetRef,...vet?.returnTo!==void 0?{returnTo:vet.returnTo}:{},...vet?.usState!==void 0?{usState:vet.usState}:{},...vet?.prefer!==void 0?{prefer:vet.prefer}:{},style:styles2.vetEntry,labelStyle:styles2.vetEntryLabel}),
229
+ /* @__PURE__ */jsx(PressScale,{accessibilityRole:"button",accessibilityLabel:CHAT_COPY.close,containerStyle:styles2.closeSlot,style:styles2.closeButton,onPress:onClose,children:/* @__PURE__ */jsx(Text,{tier:"control",style:styles2.closeText,children:CHAT_COPY.close})})]})]})}):null}function makeStyles6(theme){let c=theme.color,r=theme.radius,dialogText=slotText(theme.slots.dialog);return StyleSheet.create({root:{flex:1,justifyContent:"flex-end"},backdrop:{flex:1,backgroundColor:BACKDROP2},panel:{backgroundColor:c.surface,paddingHorizontal:20,paddingTop:20,paddingBottom:32,borderTopLeftRadius:PANEL_RADIUS,borderTopRightRadius:PANEL_RADIUS,gap:14,maxHeight:PANEL_MAX_HEIGHT,...sheetSlotBox(theme.slots.dialog)},title:{...headingFace(theme,"bold"),fontSize:18,lineHeight:22,color:c.brandInk,...dialogText},list:{maxHeight:LIST_MAX_HEIGHT,flexShrink:1},listContent:{gap:10},addRow:{flexDirection:"row",alignItems:"center",gap:12,minHeight:MIN_TOUCH_TARGET2,paddingHorizontal:8},addDisc:{width:ROW_RING_SIZE,height:ROW_RING_SIZE,borderRadius:r.pill,alignItems:"center",justifyContent:"center",borderWidth:ROW_RING_STROKE,borderStyle:"dashed",borderColor:c.brandBorder,backgroundColor:c.surfaceCream},addPlus:{...face(theme,"bold"),fontSize:20,lineHeight:22,color:c.brandInk},addLabel:{...face(theme,"bold"),fontSize:15,lineHeight:20,color:c.text.primary,...dialogText},row:{flexDirection:"row",alignItems:"center",gap:12,padding:12,borderRadius:r.md,borderWidth:1,borderColor:c.brandBorder,backgroundColor:c.surface},rowActive:{borderColor:c.brandInk,backgroundColor:c.brandSoft},copy:{flex:1,gap:2},name:{...face(theme,"bold"),fontSize:15,lineHeight:18,color:c.text.primary},meta:{...face(theme,"monoBold"),fontSize:11,lineHeight:13,color:c.text.muted,textTransform:"uppercase",letterSpacing:META_TRACKING},closeSlot:{alignSelf:"flex-end"},closeButton:{paddingHorizontal:18,paddingVertical:10,borderRadius:CLOSE_RADIUS,backgroundColor:c.brandSoft},closeText:{...face(theme,"bold"),color:c.brandInk,fontSize:13,lineHeight:16,letterSpacing:META_TRACKING}})}var MIN_TOUCH_TARGET3=44,ICON_BUTTON_SIZE=36,MENU_GLYPH_SIZE=22,UNREAD_DOT_SIZE=9,UNREAD_DOT_RING=1.5,UNREAD_DOT_INSET=6,HEADER_AVATAR_SIZE=35,HEADER_RING_STROKE=1.75,ADD_BADGE_SIZE=12.4,ADD_BADGE_BORDER=.5,ADD_BADGE_GLYPH=8,LOGO_HEIGHT=28,LOGO_MAX_WIDTH=160,ROW_PADDING=16,CENTRE_GAP=8;function headerPet(pets,petRef2){return headerPetOf(pets,petRef2)}function ChatHeader({pets:pets,petRef:petRef2,historyUnread:historyUnread,onOpenHistory:onOpenHistory,onPetChange:onPetChange,onAddPet:onAddPet,vet:vet}){let theme=useEverfurTheme(),styles2=useMemo(()=>makeStyles7(theme),[theme]),[switcherOpen,setSwitcherOpen]=useState(false),shown=headerPet(pets.pets,petRef2),canSwitch=pets.pets.length>=2,shownPetRef=petRef2??shown?.petRef??null,name=petDisplayName(shown),[measures,setMeasures]=useState(UNMEASURED),measure=useCallback(key=>event=>{let width=event.nativeEvent.layout.width;setMeasures(prev=>nextMeasures(prev,key,width))},[]),onRowLayout=useMemo(()=>measure("row"),[measure]),onLeadingLayout=useMemo(()=>measure("leading"),[measure]),onTrailingLayout=useMemo(()=>measure("trailing"),[measure]),reserved=2*ROW_PADDING+2*(theme.slots.header?.borderColor!==void 0?1:0)+2*CENTRE_GAP,sideMins=balanceHeaderSides(measures,reserved,LOGO_MAX_WIDTH),select=next=>{setSwitcherOpen(false),pets.setActivePet(next),callHost(onPetChange,next)},addPet=onAddPet===void 0?null:()=>{setSwitcherOpen(false),callHost(onAddPet)};/* @__PURE__ */
230
+ return jsxs(View,{style:styles2.row,onLayout:onRowLayout,children:[
231
+ /* @__PURE__ */jsx(View,{style:[styles2.leading,sideMins.leading===void 0?null:{minWidth:sideMins.leading}],children:/* @__PURE__ */jsx(View,{style:styles2.sideContent,onLayout:onLeadingLayout,children:/* @__PURE__ */jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:historyUnread?`${CHAT_COPY.openHistoryNative}${CHAT_COPY.newReplySuffix}`:CHAT_COPY.openHistoryNative,containerStyle:styles2.iconSlot,style:styles2.iconButton,onPress:onOpenHistory,children:[
232
+ /* @__PURE__ */jsx(MenuGlyph,{size:MENU_GLYPH_SIZE,color:theme.slots.header?.textColor??theme.color.text.primary,strokeWidth:2}),historyUnread?/* @__PURE__ */jsx(View,{style:styles2.unreadDot,pointerEvents:"none"}):null]})})}),
233
+ /* @__PURE__ */jsx(View,{style:styles2.centre,pointerEvents:"box-none",children:/* @__PURE__ */jsx(BrandLogo,{logoUrl:theme.meta.logoUrl,name:theme.meta.displayName,barStyle:styles2.logoBar,logoStyle:styles2.logo})}),
234
+ /* @__PURE__ */jsx(View,{style:[styles2.trailing,sideMins.trailing===void 0?null:{minWidth:sideMins.trailing}],children:/* @__PURE__ */jsxs(View,{style:styles2.trailingContent,onLayout:onTrailingLayout,children:[shownPetRef===null?null:/* @__PURE__ */jsx(VetVisitButton,{entry:"chat",petRef:shownPetRef,...vet?.returnTo!==void 0?{returnTo:vet.returnTo}:{},...vet?.usState!==void 0?{usState:vet.usState}:{},...vet?.prefer!==void 0?{prefer:vet.prefer}:{},style:styles2.vetEntry,labelStyle:styles2.vetEntryLabel}),
234
235
  /* @__PURE__ */jsx(View,{style:styles2.right,children:canSwitch?/* @__PURE__ */jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:fillCopy(CHAT_COPY.switchActivePet,{name:name}),containerStyle:styles2.avatarSlot,style:styles2.avatarWrap,onPress:()=>setSwitcherOpen(true),children:[
235
236
  /* @__PURE__ */jsx(PetDisc,{pet:shown,size:HEADER_AVATAR_SIZE,ringStroke:HEADER_RING_STROKE}),
236
237
  /* @__PURE__ */jsx(View,{style:styles2.addBadge,pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */jsx(PlusGlyph,{size:ADD_BADGE_GLYPH,color:theme.color.brandInk,strokeWidth:2})})]}):pets.loading&&shown===null?
237
- /* @__PURE__ */jsx(View,{style:styles2.avatarWrap,accessible:true,accessibilityLabel:CHAT_COPY.yourPet,children:/* @__PURE__ */jsx(Ring,{size:HEADER_AVATAR_SIZE,strokeWidth:HEADER_RING_STROKE,color:theme.color.mark,children:/* @__PURE__ */jsx(View,{style:styles2.placeholderDisc})})}):/* @__PURE__ */jsx(View,{style:styles2.avatarWrap,accessible:true,accessibilityRole:"image",accessibilityLabel:shown===null?CHAT_COPY.yourPet:name,children:/* @__PURE__ */jsx(PetDisc,{pet:shown,size:HEADER_AVATAR_SIZE,ringStroke:HEADER_RING_STROKE})})}),
238
- /* @__PURE__ */jsx(PetSwitcherSheet,{visible:switcherOpen,pets:pets.pets,activePetRef:shown?.petRef??null,onSelect:select,onAddPet:addPet,onClose:()=>setSwitcherOpen(false)})]})}function makeStyles7(theme){let c=theme.color,placeholderInner=HEADER_AVATAR_SIZE-HEADER_RING_STROKE*2,header=theme.slots.header;return StyleSheet.create({vetEntry:{minHeight:MIN_TOUCH_TARGET3,justifyContent:"center",paddingHorizontal:12,borderRadius:theme.radius.pill,backgroundColor:c.surfaceCream,borderWidth:StyleSheet.hairlineWidth,borderColor:c.controlEdge},vetEntryLabel:{...face(theme,"bold"),color:c.brandInk,fontSize:theme.type.size.caption},row:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:16,paddingVertical:10,backgroundColor:c.surface,...slotBox(header)},iconSlot:{borderRadius:ICON_BUTTON_SIZE/2},iconButton:{width:ICON_BUTTON_SIZE,height:ICON_BUTTON_SIZE,borderRadius:ICON_BUTTON_SIZE/2,alignItems:"center",justifyContent:"center"},unreadDot:{position:"absolute",top:UNREAD_DOT_INSET,right:UNREAD_DOT_INSET,width:UNREAD_DOT_SIZE,height:UNREAD_DOT_SIZE,borderRadius:UNREAD_DOT_SIZE,backgroundColor:c.danger,borderWidth:UNREAD_DOT_RING,borderColor:header?.backgroundColor??c.surface},center:{...ABSOLUTE_FILL,alignItems:"center",justifyContent:"center"},logoBar:{alignItems:"center",paddingHorizontal:theme.space.lg},logo:{height:LOGO_HEIGHT,width:LOGO_MAX_WIDTH},right:{alignItems:"flex-end"},avatarSlot:{borderRadius:HEADER_AVATAR_SIZE/2},avatarWrap:{width:HEADER_AVATAR_SIZE,height:HEADER_AVATAR_SIZE,position:"relative"},placeholderDisc:{width:placeholderInner,height:placeholderInner,borderRadius:placeholderInner/2,backgroundColor:c.brandSoft},addBadge:{position:"absolute",bottom:0,right:0,width:ADD_BADGE_SIZE,height:ADD_BADGE_SIZE,borderRadius:ADD_BADGE_SIZE/2,borderWidth:ADD_BADGE_BORDER,borderColor:c.mark,backgroundColor:c.surface,alignItems:"center",justifyContent:"center"}})}var MIN_TOUCH_TARGET4=44,SCRIM="rgba(17,17,17,0.55)",SHEET_RADIUS=26,HANDLE_WIDTH=36,HANDLE_HEIGHT=4,RADIO_SIZE=20,BADGE_SIZE=38,BADGE_GLYPH=18,RADIO_CHECK=12;function FeedbackReasons({visible:visible,onSubmit:onSubmit,onSkip:onSkip}){let theme=useEverfurTheme(),styles2=useMemo(()=>makeStyles8(theme),[theme]),[reason,setReason]=useState(null),[note,setNote]=useState(""),[pending,setPending]=useState(false),[failed,setFailed]=useState(false),reset=()=>{setReason(null),setNote(""),setPending(false),setFailed(false)},skip=()=>{pending||(reset(),onSkip())},submit=async()=>{if(pending)return;setPending(true),setFailed(false);let trimmed=note.trim();await onSubmit(reason,trimmed.length>0?trimmed:null)?reset():(setPending(false),setFailed(true))};if(!visible)return null;let overLimit=[...note].length>FEEDBACK_NOTES_MAX_CHARS;/* @__PURE__ */
238
+ /* @__PURE__ */jsx(View,{style:styles2.avatarWrap,accessible:true,accessibilityLabel:CHAT_COPY.yourPet,children:/* @__PURE__ */jsx(Ring,{size:HEADER_AVATAR_SIZE,strokeWidth:HEADER_RING_STROKE,color:theme.color.mark,children:/* @__PURE__ */jsx(View,{style:styles2.placeholderDisc})})}):/* @__PURE__ */jsx(View,{style:styles2.avatarWrap,accessible:true,accessibilityRole:"image",accessibilityLabel:shown===null?CHAT_COPY.yourPet:name,children:/* @__PURE__ */jsx(PetDisc,{pet:shown,size:HEADER_AVATAR_SIZE,ringStroke:HEADER_RING_STROKE})})})]})}),
239
+ /* @__PURE__ */jsx(PetSwitcherSheet,{visible:switcherOpen,pets:pets.pets,activePetRef:shown?.petRef??null,onSelect:select,onAddPet:addPet,onClose:()=>setSwitcherOpen(false)})]})}function makeStyles7(theme){let c=theme.color,placeholderInner=HEADER_AVATAR_SIZE-HEADER_RING_STROKE*2,header=theme.slots.header;return StyleSheet.create({vetEntry:{minHeight:MIN_TOUCH_TARGET3,justifyContent:"center",paddingHorizontal:12,borderRadius:theme.radius.pill,backgroundColor:c.surfaceCream,borderWidth:StyleSheet.hairlineWidth,borderColor:c.controlEdge},vetEntryLabel:{...face(theme,"bold"),color:c.brandInk,fontSize:theme.type.size.caption},row:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:ROW_PADDING,paddingVertical:10,backgroundColor:c.surface,...slotBox(header)},iconSlot:{borderRadius:ICON_BUTTON_SIZE/2},iconButton:{width:ICON_BUTTON_SIZE,height:ICON_BUTTON_SIZE,borderRadius:ICON_BUTTON_SIZE/2,alignItems:"center",justifyContent:"center"},unreadDot:{position:"absolute",top:UNREAD_DOT_INSET,right:UNREAD_DOT_INSET,width:UNREAD_DOT_SIZE,height:UNREAD_DOT_SIZE,borderRadius:UNREAD_DOT_SIZE,backgroundColor:c.danger,borderWidth:UNREAD_DOT_RING,borderColor:header?.backgroundColor??c.surface},leading:{flexShrink:0,alignItems:"flex-start"},trailing:{flexShrink:0,alignItems:"flex-end"},sideContent:{flexDirection:"row",alignItems:"center"},trailingContent:{flexDirection:"row",alignItems:"center",gap:theme.space.sm},centre:{flexGrow:1,flexShrink:1,flexBasis:0,minWidth:0,marginHorizontal:CENTRE_GAP,alignItems:"center",justifyContent:"center"},logoBar:{alignSelf:"stretch",alignItems:"center"},logo:{height:LOGO_HEIGHT,width:LOGO_MAX_WIDTH,maxWidth:"100%"},right:{alignItems:"flex-end"},avatarSlot:{borderRadius:HEADER_AVATAR_SIZE/2},avatarWrap:{width:HEADER_AVATAR_SIZE,height:HEADER_AVATAR_SIZE,position:"relative"},placeholderDisc:{width:placeholderInner,height:placeholderInner,borderRadius:placeholderInner/2,backgroundColor:c.brandSoft},addBadge:{position:"absolute",bottom:0,right:0,width:ADD_BADGE_SIZE,height:ADD_BADGE_SIZE,borderRadius:ADD_BADGE_SIZE/2,borderWidth:ADD_BADGE_BORDER,borderColor:c.mark,backgroundColor:c.surface,alignItems:"center",justifyContent:"center"}})}var MIN_TOUCH_TARGET4=44,SCRIM="rgba(17,17,17,0.55)",SHEET_RADIUS=26,HANDLE_WIDTH=36,HANDLE_HEIGHT=4,RADIO_SIZE=20,BADGE_SIZE=38,BADGE_GLYPH=18,RADIO_CHECK=12;function FeedbackReasons({visible:visible,onSubmit:onSubmit,onSkip:onSkip}){let theme=useEverfurTheme(),styles2=useMemo(()=>makeStyles8(theme),[theme]),[reason,setReason]=useState(null),[note,setNote]=useState(""),[pending,setPending]=useState(false),[failed,setFailed]=useState(false),reset=()=>{setReason(null),setNote(""),setPending(false),setFailed(false)},skip=()=>{pending||(reset(),onSkip())},submit=async()=>{if(pending)return;setPending(true),setFailed(false);let trimmed=note.trim();await onSubmit(reason,trimmed.length>0?trimmed:null)?reset():(setPending(false),setFailed(true))};if(!visible)return null;let overLimit=[...note].length>FEEDBACK_NOTES_MAX_CHARS;/* @__PURE__ */
239
240
  return jsx(Modal,{visible:true,transparent:true,animationType:theme.motion.reducedMotion?"none":"slide",onRequestClose:skip,children:/* @__PURE__ */jsxs(KeyboardAvoidingView,{behavior:Platform.OS==="ios"?"padding":void 0,style:styles2.root,children:[
240
241
  /* @__PURE__ */jsx(Pressable,{style:styles2.scrim,onPress:skip,accessibilityRole:"button",accessibilityLabel:CHAT_COPY.feedbackSkipA11y}),
241
242
  /* @__PURE__ */jsxs(View,{style:styles2.sheet,accessibilityViewIsModal:true,accessibilityLiveRegion:"polite",children:[
@@ -1,8 +1,8 @@
1
1
  import { EverfurNotificationsOptions, EverfurNotificationsState } from '../web/notifications/index.cjs';
2
2
  export { DevicePlatform, EVERFUR_NOTIFICATION_EVENT_TYPES, EVERFUR_NOTIFICATION_TARGET_KINDS, EVERFUR_NOTIFICATION_VERSION, EverfurNotification, EverfurNotificationEventType, EverfurNotificationTarget, EverfurNotificationTargetKind, EverfurNotificationsStatus, NOTIFICATIONS_REASON_MESSAGES, NotificationPreferences, NotificationPreferencesInput, NotificationsClient, NotificationsReasonCode, NotificationsRuntime, PushProvider, RegisterDeviceInput, RegisteredDevice, createNotificationsClient, explainNotificationsReason, parseEverfurNotification, useEverfurNotificationsClient } from '../web/notifications/index.cjs';
3
3
  export { V as VetVisitIntent } from '../visitIntent-D7_yVp1I.cjs';
4
- export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity-CUynm8S2.cjs';
5
- export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config-u6rK4mKt.cjs';
4
+ export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity-ScajqjK5.cjs';
5
+ export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config-C68HTCf4.cjs';
6
6
  export { B as Brand, C as ConversationId, P as PetRef, R as RecordsRequestId, U as UserRef, _ as __brand } from '../ids-B2GAAifq.cjs';
7
7
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError-DeBqRpQV.cjs';
8
8
  export { E as EverfurResult } from '../EverfurResult-COlXj1wq.cjs';
@@ -1,8 +1,8 @@
1
1
  import { EverfurNotificationsOptions, EverfurNotificationsState } from '../web/notifications/index.js';
2
2
  export { DevicePlatform, EVERFUR_NOTIFICATION_EVENT_TYPES, EVERFUR_NOTIFICATION_TARGET_KINDS, EVERFUR_NOTIFICATION_VERSION, EverfurNotification, EverfurNotificationEventType, EverfurNotificationTarget, EverfurNotificationTargetKind, EverfurNotificationsStatus, NOTIFICATIONS_REASON_MESSAGES, NotificationPreferences, NotificationPreferencesInput, NotificationsClient, NotificationsReasonCode, NotificationsRuntime, PushProvider, RegisterDeviceInput, RegisteredDevice, createNotificationsClient, explainNotificationsReason, parseEverfurNotification, useEverfurNotificationsClient } from '../web/notifications/index.js';
3
3
  export { V as VetVisitIntent } from '../visitIntent-D7_yVp1I.js';
4
- export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity-D5uywCtp.js';
5
- export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config-BB7e52FP.js';
4
+ export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity-BTT6YtH5.js';
5
+ export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config-DeUmccwl.js';
6
6
  export { B as Brand, C as ConversationId, P as PetRef, R as RecordsRequestId, U as UserRef, _ as __brand } from '../ids-B2GAAifq.js';
7
7
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError-DeBqRpQV.js';
8
8
  export { E as EverfurResult } from '../EverfurResult-ClPTS0P2.js';
@@ -1,5 +1,5 @@
1
1
  import { E as EverfurResult } from './EverfurResult-ClPTS0P2.js';
2
- import { j as FetchLike } from './config-BB7e52FP.js';
2
+ import { j as FetchLike } from './config-DeUmccwl.js';
3
3
  import { P as PetHealthProfileInput, a as PetHealthProfile } from './profile-CSs1wlXT.js';
4
4
 
5
5
  /** How your backend reaches Everfur for pet writes. Build it once and reuse it. */
@@ -1,5 +1,5 @@
1
1
  import { E as EverfurResult } from './EverfurResult-COlXj1wq.cjs';
2
- import { j as FetchLike } from './config-u6rK4mKt.cjs';
2
+ import { j as FetchLike } from './config-C68HTCf4.cjs';
3
3
  import { P as PetHealthProfileInput, a as PetHealthProfile } from './profile-CSs1wlXT.cjs';
4
4
 
5
5
  /** How your backend reaches Everfur for pet writes. Build it once and reuse it. */
@@ -1,5 +1,5 @@
1
1
  import { E as EverfurResult } from './EverfurResult-COlXj1wq.cjs';
2
- import { A as AuthContext } from './identity-CUynm8S2.cjs';
2
+ import { A as AuthContext } from './identity-ScajqjK5.cjs';
3
3
  import { P as PetRef } from './ids-B2GAAifq.cjs';
4
4
  import { P as PetHealthProfileInput, a as PetHealthProfile } from './profile-CSs1wlXT.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { E as EverfurResult } from './EverfurResult-ClPTS0P2.js';
2
- import { A as AuthContext } from './identity-D5uywCtp.js';
2
+ import { A as AuthContext } from './identity-BTT6YtH5.js';
3
3
  import { P as PetRef } from './ids-B2GAAifq.js';
4
4
  import { P as PetHealthProfileInput, a as PetHealthProfile } from './profile-CSs1wlXT.js';
5
5
 
@@ -1,10 +1,10 @@
1
- import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository-qAkKKgji.js';
2
- import { A as AuthContext } from './identity-D5uywCtp.js';
1
+ import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository-DjhMfm_n.js';
2
+ import { A as AuthContext } from './identity-BTT6YtH5.js';
3
3
  import { E as EverfurError } from './EverfurError-DeBqRpQV.js';
4
4
  import { E as EverfurResult } from './EverfurResult-ClPTS0P2.js';
5
- import { R as RequestFunnel } from './requestFunnel-BkSFsLKh.js';
5
+ import { R as RequestFunnel } from './requestFunnel-Dhaj0yUq.js';
6
6
  import { P as PetRef, C as ConversationId, b as ResponseId } from './ids-B2GAAifq.js';
7
- import { i as UrgencyLevel, F as Frame } from './config-BB7e52FP.js';
7
+ import { i as UrgencyLevel, F as Frame } from './config-DeUmccwl.js';
8
8
  import { E as ErrorPolicyPort } from './ErrorPolicyPort-C3nNSS_j.js';
9
9
  import { T as TelemetryPort } from './TelemetryPort-BDNr00hu.js';
10
10
  import { F as FileHandle } from './ports-BN6RHF9W.js';
@@ -1,10 +1,10 @@
1
- import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository-DFoK5N1O.cjs';
2
- import { A as AuthContext } from './identity-CUynm8S2.cjs';
1
+ import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository-D0aQSXkb.cjs';
2
+ import { A as AuthContext } from './identity-ScajqjK5.cjs';
3
3
  import { E as EverfurError } from './EverfurError-DeBqRpQV.cjs';
4
4
  import { E as EverfurResult } from './EverfurResult-COlXj1wq.cjs';
5
- import { R as RequestFunnel } from './requestFunnel-nmhlEdbM.cjs';
5
+ import { R as RequestFunnel } from './requestFunnel-u8qnM5Ll.cjs';
6
6
  import { P as PetRef, C as ConversationId, b as ResponseId } from './ids-B2GAAifq.cjs';
7
- import { i as UrgencyLevel, F as Frame } from './config-u6rK4mKt.cjs';
7
+ import { i as UrgencyLevel, F as Frame } from './config-C68HTCf4.cjs';
8
8
  import { E as ErrorPolicyPort } from './ErrorPolicyPort-10s3HJCt.cjs';
9
9
  import { T as TelemetryPort } from './TelemetryPort-BDNr00hu.cjs';
10
10
  import { F as FileHandle } from './ports-BN6RHF9W.cjs';
@@ -1,14 +1,14 @@
1
- export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../DepthViews-CUNmy99u.cjs';
2
- export { C as ClinicDraft, a as ClinicLocation, R as RecordsAskEntityRef, b as RecordsAskHandler, c as RecordsDepthStatus, d as RecordsHostSeams, e as RecordsScreen, f as RecordsScreenBaseProps, g as RecordsUrlKind, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, h as useRecordsDepthRead } from '../../useRecordsDepth-Cg4cc4bQ.cjs';
3
- export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../timelineRows-CYF_I5Aq.cjs';
4
- export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordShareAudience, m as RecordsClinic, n as RecordsDepthClient, o as RecordsRequestDocument, p as RecordsTimelineMedication, q as RecordsTimelineVaccine, r as RecordsTimelineView, s as RecordsTimelineVisit, t as RecordsTimelineWeight, u as mapDocumentContributions, v as mapRecordDepth, w as mapRecordsTimeline } from '../../depth-C_ym3qyi.cjs';
1
+ export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../DepthViews-eRdy2ayE.cjs';
2
+ export { C as ClinicDraft, a as ClinicLocation, R as RecordsAskEntityRef, b as RecordsAskHandler, c as RecordsDepthStatus, d as RecordsHostSeams, e as RecordsScreen, f as RecordsScreenBaseProps, g as RecordsUrlKind, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, h as useRecordsDepthRead } from '../../useRecordsDepth-W3UAKQRN.cjs';
3
+ export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../timelineRows-CDSO3ElK.cjs';
4
+ export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordShareAudience, m as RecordsClinic, n as RecordsDepthClient, o as RecordsRequestDocument, p as RecordsTimelineMedication, q as RecordsTimelineVaccine, r as RecordsTimelineView, s as RecordsTimelineVisit, t as RecordsTimelineWeight, u as mapDocumentContributions, v as mapRecordDepth, w as mapRecordsTimeline } from '../../depth-jbSWsweM.cjs';
5
5
  export { B as Brand, P as PetRef, R as RecordsRequestId, _ as __brand } from '../../ids-B2GAAifq.cjs';
6
6
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError-DeBqRpQV.cjs';
7
7
  export { E as EverfurResult } from '../../EverfurResult-COlXj1wq.cjs';
8
8
  export { R as RecordDocumentMeta, a as RecordEntity, b as RecordOrigin } from '../../models-A4A5S7AG.cjs';
9
9
  import 'react';
10
10
  import 'react-native';
11
- import '../../requestFunnel-nmhlEdbM.cjs';
11
+ import '../../requestFunnel-u8qnM5Ll.cjs';
12
12
  import '../../ErrorPolicyPort-10s3HJCt.cjs';
13
- import '../../config-u6rK4mKt.cjs';
14
- import '../../identity-CUynm8S2.cjs';
13
+ import '../../config-C68HTCf4.cjs';
14
+ import '../../identity-ScajqjK5.cjs';
@@ -1,14 +1,14 @@
1
- export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../DepthViews-CiYBIBEZ.js';
2
- export { C as ClinicDraft, a as ClinicLocation, R as RecordsAskEntityRef, b as RecordsAskHandler, c as RecordsDepthStatus, d as RecordsHostSeams, e as RecordsScreen, f as RecordsScreenBaseProps, g as RecordsUrlKind, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, h as useRecordsDepthRead } from '../../useRecordsDepth-eS9BJv_a.js';
3
- export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../timelineRows-PWRoTntZ.js';
4
- export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordShareAudience, m as RecordsClinic, n as RecordsDepthClient, o as RecordsRequestDocument, p as RecordsTimelineMedication, q as RecordsTimelineVaccine, r as RecordsTimelineView, s as RecordsTimelineVisit, t as RecordsTimelineWeight, u as mapDocumentContributions, v as mapRecordDepth, w as mapRecordsTimeline } from '../../depth-_vMRMm4x.js';
1
+ export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../DepthViews-De6yb5Tq.js';
2
+ export { C as ClinicDraft, a as ClinicLocation, R as RecordsAskEntityRef, b as RecordsAskHandler, c as RecordsDepthStatus, d as RecordsHostSeams, e as RecordsScreen, f as RecordsScreenBaseProps, g as RecordsUrlKind, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, h as useRecordsDepthRead } from '../../useRecordsDepth-CqSMkcyR.js';
3
+ export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../timelineRows-pd4wYVbe.js';
4
+ export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordShareAudience, m as RecordsClinic, n as RecordsDepthClient, o as RecordsRequestDocument, p as RecordsTimelineMedication, q as RecordsTimelineVaccine, r as RecordsTimelineView, s as RecordsTimelineVisit, t as RecordsTimelineWeight, u as mapDocumentContributions, v as mapRecordDepth, w as mapRecordsTimeline } from '../../depth-C7RIscDR.js';
5
5
  export { B as Brand, P as PetRef, R as RecordsRequestId, _ as __brand } from '../../ids-B2GAAifq.js';
6
6
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError-DeBqRpQV.js';
7
7
  export { E as EverfurResult } from '../../EverfurResult-ClPTS0P2.js';
8
8
  export { R as RecordDocumentMeta, a as RecordEntity, b as RecordOrigin } from '../../models-CnXY5LuO.js';
9
9
  import 'react';
10
10
  import 'react-native';
11
- import '../../requestFunnel-BkSFsLKh.js';
11
+ import '../../requestFunnel-Dhaj0yUq.js';
12
12
  import '../../ErrorPolicyPort-C3nNSS_j.js';
13
- import '../../config-BB7e52FP.js';
14
- import '../../identity-D5uywCtp.js';
13
+ import '../../config-DeUmccwl.js';
14
+ import '../../identity-BTT6YtH5.js';