@everfur/sdk 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +213 -0
- package/dist/{BookedScreen-BJPbXLCG.d.ts → BookedScreen-DFJcgf1e.d.ts} +12 -2
- package/dist/{BookedScreen-Cnld-jB_.d.cts → BookedScreen-R5X_Zrlh.d.cts} +12 -2
- package/dist/{Chat-CHqcgMyw.d.ts → Chat-DZpYH8Uh.d.ts} +4 -4
- package/dist/{Chat-BoAvCWhI.d.cts → Chat-bATY4atj.d.cts} +4 -4
- package/dist/{DepthViews-7Y8Ur058.d.ts → DepthViews-BpHUbjSY.d.cts} +1 -1
- package/dist/{DepthViews-B0g83e_N.d.cts → DepthViews-C4DC4Kom.d.cts} +1 -1
- package/dist/{DepthViews-Dg2bIon_.d.ts → DepthViews-dLTizxjr.d.ts} +1 -1
- package/dist/{DepthViews-CT5mQld9.d.cts → DepthViews-qBIoA48w.d.ts} +1 -1
- package/dist/animations/index.cjs +1 -1
- package/dist/animations/index.d.cts +3 -3
- package/dist/animations/index.d.ts +3 -3
- package/dist/animations/index.js +1 -1
- package/dist/{attachments-CfxsVg7W.d.ts → attachments-CPRFfoHT.d.ts} +2 -2
- package/dist/{attachments-rkox0ewd.d.cts → attachments-CUOGILir.d.cts} +5 -5
- package/dist/{attachments-CThFsH4b.d.ts → attachments-CXAnZcEg.d.ts} +5 -5
- package/dist/{attachments-C3HJNYQ7.d.cts → attachments-Ce06TWqe.d.cts} +2 -2
- package/dist/{bookingCopy-Do3zMeXb.d.cts → bookingCopy-BwVopcoV.d.cts} +451 -50
- package/dist/{bookingCopy-Y3OGdoMT.d.ts → bookingCopy-DFTv9w6J.d.ts} +451 -50
- package/dist/{bookingTypes-DCs8mmBb.d.cts → bookingTypes-D4pD3tHs.d.cts} +13 -1
- package/dist/{bookingTypes-DCs8mmBb.d.ts → bookingTypes-D4pD3tHs.d.ts} +13 -1
- package/dist/{branding-DYWma2il.d.ts → branding-Bio5MM6g.d.cts} +3 -3
- package/dist/{branding-ChXm8gxI.d.cts → branding-ytH4jJq1.d.ts} +3 -3
- package/dist/{callCopy-CPe9mbwG.d.cts → callCopy-DHjem0R-.d.cts} +12 -1
- package/dist/{callCopy-CPe9mbwG.d.ts → callCopy-DHjem0R-.d.ts} +12 -1
- package/dist/{casesRepository-Jj6t60AY.d.cts → casesRepository-CJchNp3x.d.cts} +1 -1
- package/dist/{casesRepository-BbgXYPxa.d.ts → casesRepository-DAVcY3jC.d.ts} +1 -1
- package/dist/chat/index.cjs +1 -1
- package/dist/chat/index.d.cts +9 -9
- package/dist/chat/index.d.ts +9 -9
- package/dist/chat/index.js +1 -1
- package/dist/client/index.cjs +2 -2
- package/dist/client/index.d.cts +10 -10
- package/dist/client/index.d.ts +10 -10
- package/dist/client/index.js +2 -2
- package/dist/{config-Dfbj5mlx.d.ts → config-ZxwCylac.d.ts} +1 -1
- package/dist/{config-BZX97FmW.d.cts → config-h5h6TsHL.d.cts} +1 -1
- package/dist/consent/index.cjs +1 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/consent/index.js +1 -1
- package/dist/{context-DJXnZ1Mx.d.cts → context-CtsAgJnc.d.cts} +7 -7
- package/dist/{context-Cbe0zYym.d.ts → context-DtPIshVA.d.ts} +7 -7
- package/dist/{copy-dKK5KoAQ.d.cts → copy-CaWaplQc.d.cts} +2 -2
- package/dist/{copy-DHekqSKE.d.ts → copy-Cg89Qoal.d.ts} +2 -2
- package/dist/core/index.cjs +7 -7
- package/dist/core/index.d.cts +21 -21
- package/dist/core/index.d.ts +21 -21
- package/dist/core/index.js +7 -7
- package/dist/{depth-CrpRjWGB.d.ts → depth-Bo4bAwcn.d.ts} +132 -38
- package/dist/{depth-NmWSbvfi.d.cts → depth-EXZYEO70.d.cts} +132 -38
- package/dist/{entitlementRepository-iL-9vS1i.d.cts → entitlementRepository-BYtVb1oU.d.cts} +3 -3
- package/dist/{entitlementRepository-tVNazi8R.d.ts → entitlementRepository-DcbIx8yV.d.ts} +3 -3
- package/dist/{identity-B8rp0L9G.d.ts → identity-EC5-apbY.d.ts} +1 -1
- package/dist/{identity-D7PO5s9m.d.cts → identity-b5Vp32Vp.d.cts} +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.js +6 -6
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/{pets-BQbXmICf.d.ts → pets-B_27_agU.d.ts} +1 -1
- package/dist/{pets-BWx9BKea.d.cts → pets-DM8QvKLo.d.cts} +1 -1
- package/dist/{petsRepository-SqIvEMiT.d.cts → petsRepository-BJsJ4cju.d.cts} +1 -1
- package/dist/{petsRepository-0oBVydl6.d.ts → petsRepository-CuYZZaI5.d.ts} +1 -1
- package/dist/photo/index.cjs +1 -1
- package/dist/photo/index.js +1 -1
- package/dist/{ports-ChnzSy4E.d.cts → ports-ZmJYgd5I.d.cts} +10 -9
- package/dist/{ports-iXPWd7Vt.d.ts → ports-nXHf50_X.d.ts} +10 -9
- package/dist/records/depth/index.cjs +2 -2
- package/dist/records/depth/index.d.cts +7 -7
- package/dist/records/depth/index.d.ts +7 -7
- package/dist/records/depth/index.js +2 -2
- package/dist/records/index.cjs +3 -3
- package/dist/records/index.d.cts +19 -10
- package/dist/records/index.d.ts +19 -10
- package/dist/records/index.js +3 -3
- package/dist/{requestFunnel-DAwb7haa.d.cts → requestFunnel-C_cZXhIA.d.cts} +2 -2
- package/dist/{requestFunnel-CQzz2DIW.d.ts → requestFunnel-Ve9BshTB.d.ts} +2 -2
- package/dist/{runtimeTypes-BNOxfmfg.d.ts → runtimeTypes-ByKsp8hm.d.ts} +5 -5
- package/dist/{runtimeTypes-DB9-kigO.d.cts → runtimeTypes-D155OlBW.d.cts} +5 -5
- package/dist/server/events/index.cjs +1 -1
- package/dist/server/events/index.d.cts +2 -2
- package/dist/server/events/index.d.ts +2 -2
- package/dist/server/events/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +1 -1
- package/dist/televet/booking/index.cjs +4 -1
- package/dist/televet/booking/index.d.cts +116 -29
- package/dist/televet/booking/index.d.ts +116 -29
- package/dist/televet/booking/index.js +4 -1
- package/dist/televet/call/index.cjs +1 -1
- package/dist/televet/call/index.d.cts +1 -1
- package/dist/televet/call/index.d.ts +1 -1
- package/dist/televet/call/index.js +1 -1
- package/dist/televet/index.cjs +1 -1
- package/dist/televet/index.js +1 -1
- package/dist/testing/index.cjs +3 -3
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +3 -3
- package/dist/testing/rn/index.cjs +1 -1
- package/dist/testing/rn/index.d.cts +14 -12
- package/dist/testing/rn/index.d.ts +14 -12
- package/dist/testing/rn/index.js +1 -1
- package/dist/testing/web/index.d.cts +9 -9
- package/dist/testing/web/index.d.ts +9 -9
- package/dist/{timelineRows-BuNhzDbH.d.cts → timelineRows-BNF43SXK.d.cts} +1 -1
- package/dist/{timelineRows-Dll2IGFg.d.ts → timelineRows-DXpjECfA.d.ts} +1 -1
- package/dist/{tokens-ARWZtMOU.d.cts → tokens-BYtbKwFh.d.cts} +6 -3
- package/dist/{tokens-ARWZtMOU.d.ts → tokens-BYtbKwFh.d.ts} +6 -3
- package/dist/{typeStyle-YCS8dt19.d.cts → typeStyle-BqfwxZH4.d.cts} +2 -2
- package/dist/{typeStyle-8iEqQmP_.d.ts → typeStyle-DKz02DGU.d.ts} +2 -2
- package/dist/{uploadTransport-C1p8FuG8.d.cts → uploadTransport-BM_pnEWj.d.cts} +5 -0
- package/dist/{uploadTransport-bZIKBTyK.d.ts → uploadTransport-C6kGP1Kd.d.ts} +5 -0
- package/dist/{useRecordsDepth-CNEHZJtj.d.cts → useRecordsDepth-CARTuHKh.d.cts} +1 -1
- package/dist/{useRecordsDepth-CuNdne6E.d.ts → useRecordsDepth-fPSv-GXU.d.ts} +1 -1
- package/dist/video/index.cjs +1 -1
- package/dist/video/index.js +1 -1
- package/dist/{view-BhqWlYrZ.d.cts → view-DGPaVno8.d.cts} +47 -5
- package/dist/{view-DFy8EDwf.d.ts → view-Dc-JlFkf.d.ts} +47 -5
- package/dist/web/consent/index.cjs +1 -1
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/consent/index.js +1 -1
- package/dist/web/index.cjs +7 -7
- package/dist/web/index.d.cts +23 -22
- package/dist/web/index.d.ts +23 -22
- package/dist/web/index.js +7 -7
- package/dist/web/notifications/index.d.cts +3 -3
- package/dist/web/notifications/index.d.ts +3 -3
- package/dist/web/records/depth/index.cjs +2 -2
- package/dist/web/records/depth/index.d.cts +7 -7
- package/dist/web/records/depth/index.d.ts +7 -7
- package/dist/web/records/depth/index.js +2 -2
- package/dist/web/records/index.cjs +3 -3
- package/dist/web/records/index.d.cts +28 -17
- package/dist/web/records/index.d.ts +28 -17
- package/dist/web/records/index.js +3 -3
- package/dist/web/televet/booking/index.cjs +4 -2
- package/dist/web/televet/booking/index.d.cts +228 -90
- package/dist/web/televet/booking/index.d.ts +228 -90
- package/dist/web/televet/booking/index.js +4 -2
- package/dist/web/televet/call/index.cjs +1 -1
- package/dist/web/televet/call/index.d.cts +1 -1
- package/dist/web/televet/call/index.d.ts +1 -1
- package/dist/web/televet/call/index.js +1 -1
- package/dist/web/televet/index.cjs +3 -3
- package/dist/web/televet/index.d.cts +2 -2
- package/dist/web/televet/index.d.ts +2 -2
- package/dist/web/televet/index.js +3 -3
- package/package.json +1 -1
package/dist/video/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {createContext,forwardRef,useState,useEffect,useCallback,useSyncExternalStore,useMemo,createElement,useContext,Component}from'react';import {TextInput,View,ActivityIndicator,Pressable,ScrollView,StyleSheet,Text}from'react-native';import {jsx,jsxs}from'react/jsx-runtime';var Ur=Object.defineProperty;var o=(e,r)=>Ur(e,"name",{value:r,configurable:true});var re=Object.freeze([Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false}),Object.freeze({wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true}),Object.freeze({wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true}),Object.freeze({wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true}),Object.freeze({wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false}),Object.freeze({wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false}),Object.freeze({wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false}),Object.freeze({wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false}),Object.freeze({wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false}),Object.freeze({wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true}),Object.freeze({wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false}),Object.freeze({wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false}),Object.freeze({wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false}),Object.freeze({wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false}),Object.freeze({wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false}),Object.freeze({wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false}),Object.freeze({wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false}),Object.freeze({wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true}),Object.freeze({wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true}),Object.freeze({wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true}),Object.freeze({wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false}),Object.freeze({wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false})]);Object.freeze(re.map(e=>e.wireCode));var Br=Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict"}),Fe=Object.freeze(re.map(e=>Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:Br[e.wireCode]}))),Vr=new Map(Fe.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),qr=Object.freeze(["http_envelope",...[...new Set(Fe.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function V(e,r){if(typeof e!="string")return;let t=e.trim().toUpperCase();if(t.length!==0)for(let n of [r??"http_envelope",...qr]){let i=Vr.get(n+t);if(i)return i}}o(V,"contractErrorFor");function Hr(e){return e.envelope==="sse_frame"?`/errors#sse-${e.wireCode}`:e.envelope==="oauth_error"?`/errors#oauth-${e.wireCode}`:`/errors#${e.wireCode}`}o(Hr,"contractDocUrl");function Oe(e){return null}o(Oe,"publishedDocUrl");var Kr=Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function Ie(e){return Kr[e]}o(Ie,"categoryFor");function Pe(e){let r=V(e);if(r)return r.normalized;let t=(e??"").trim().toUpperCase(),n=t.replace(/[^A-Z0-9]/g,"");if(n==="AUTHREJECTED")return "authRejected";if(t.startsWith("AUTH"))return "authExpired";switch(n){case "DAILYQUOTAEXCEEDED":case "QUOTAEXCEEDED":return "quotaExceeded";case "RATELIMITED":case "TOOMANYREQUESTS":case "TELEVETRATELIMITED":return "rateLimited";case "IDEMPOTENCYKEYCONFLICT":case "IDEMPOTENCYCONFLICT":return "idempotencyConflict";case "ACCESSDENIED":case "FORBIDDEN":return "accessDenied";case "NOTFOUND":case "CONVERSATIONNOTFOUND":return "conversationNotFound";case "PETNOTFOUND":return "petNotFound";case "TIMEOUT":case "STREAMTIMEOUT":return "streamTimeout";case "MEDIAUPLOADFAILED":case "UNRECOGNIZEDVIDEOFORMAT":case "FILETOOSMALL":return "mediaUploadFailed";case "MODERATIONBLOCKED":return "moderationBlocked";case "UPSTREAMLLMTIMEOUT":return "upstreamLlmTimeout";case "INTERNALERROR":case "INTERNALSERVERERROR":return "internalError";case "STREAMINCOMPLETE":case "CHATSTREAMINCOMPLETE":return "streamIncomplete";case "INVALIDANALYSISTYPE":case "INVALIDUPLOADPURPOSE":return "unknown";default:return "unknown"}}o(Pe,"fromWire");var Gr=new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function te(e){return Gr.has(e)}o(te,"isAutoRetryable");var Yr=new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function Ae(e){return te(e)||Yr.has(e)}o(Ae,"isRetryableCode");var Wr=500,ne=8e3,ze=4;function je(e,r=Math.random){let t=Math.max(0,e),n=Math.min(Wr*2**t,ne);return Math.floor(r()*n)}o(je,"backoffDelayMs");var Jr=Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:"This feature isn't available on your account right now.",paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:"Something in that request was not right. Check the details and try again.",sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",unknown:"Something went wrong. Please try again."});function oe(e){return Jr[e]}o(oe,"userFacingError");function De(e,r,t){Object.defineProperty(e,r,{value:t,enumerable:false,writable:false,configurable:false});}o(De,"defineHidden");var $r=/^[a-z][a-z0-9_]{0,63}$/;function m(e,r){let t=V(r?.wireCode,r?.wireEnvelope),n={code:e,category:Ie(e),retryable:r?.retryable??Ae(e),displayMessage:oe(e)};if(r?.httpStatus!==void 0&&(n.httpStatus=r.httpStatus),r?.requestId&&(n.requestId=r.requestId),typeof r?.reasonCode=="string"&&$r.test(r.reasonCode)&&(n.reasonCode=r.reasonCode),t);return r?.wireMessage&&De(n,"wireMessage",r.wireMessage),r?.raw!==void 0&&r.raw!==null&&De(n,"raw",r.raw),Object.freeze(n)}o(m,"makeEverfurError");function j(e,r){return Object.freeze(r===void 0?{ok:true,value:e}:{ok:true,value:e,warning:r})}o(j,"ok");function y(e){return Object.freeze({ok:false,error:e})}o(y,"err");var q=class q extends Error{constructor(r,t){super(t),this.name="EverfurConfigError",this.kind=r,Object.setPrototypeOf(this,q.prototype);}};o(q,"EverfurConfigError");var z=q;function H(e){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(e)}`)}o(H,"assertNever");function Ne(e){return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:e.serverRequestId??null})}o(Ne,"errorFrame");function Zr(e){let r={};return e.mode==="personalized"?r.authorization=`Bearer ${e.token}`:r["x-everfur-partner-key"]=e.publishableKey,e.userRef&&(r["x-everfur-user-ref"]=e.userRef),e.sessionId&&(r["x-everfur-session-id"]=e.sessionId),r}o(Zr,"authHeaders");function D(e,r){return {...e,headers:{...et(e.headers),...Zr(r)}}}o(D,"withAuthHeaders");function et(e){if(!e)return {};let r={};for(let[t,n]of Object.entries(e)){let i=t.toLowerCase();i==="authorization"||i==="x-everfur-partner-key"||(r[t]=n);}return r}o(et,"stripAuthHeaders");async function Me(e,r){if(r.mode==="anonymous")return r.transport.request(D(e,{mode:"anonymous",publishableKey:r.publishableKey,userRef:r.userRef,...r.sessionId?{sessionId:r.sessionId}:{}}));let t;try{t=await r.identity.currentToken();}catch{return y(ie())}let n=await r.transport.request(D(e,{mode:"personalized",token:t,userRef:r.userRef,...r.sessionId?{sessionId:r.sessionId}:{}}));if(n.ok||n.error.httpStatus!==401)return n;let i;try{i=await r.identity.currentToken({forceRefresh:!0});}catch{return y(ie())}let a=await r.transport.request(D(e,{mode:"personalized",token:i,userRef:r.userRef,...r.sessionId?{sessionId:r.sessionId}:{}}));return !a.ok&&a.error.httpStatus===401?y(ie(a.error.httpStatus)):a}o(Me,"authedSend");function ie(e){return m("authRejected",{retryable:false,...e!==void 0?{httpStatus:e}:{}})}o(ie,"authRejectedError");function Le(e){return m("internalError",{retryable:true,wireMessage:rt(e)})}o(Le,"networkError");function rt(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}o(rt,"describeCause");var tt=3e4,nt=ne*2,ot="idempotency-key",it=new Set(["POST","PUT","PATCH","DELETE"]),at=Object.freeze({onEvent(){}}),st=Object.freeze({setTimeout:o((e,r)=>setTimeout(e,r),"setTimeout"),clearTimeout:o(e=>clearTimeout(e),"clearTimeout"),now:o(()=>Date.now(),"now")});function lt(e){let r=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return r.length===0?null:`efs_${r}`.slice(0,128)}o(lt,"seededIdempotencyKey");function Be(e){let r=e.observer??at,t=e.timers??st,n=e.rng??Math.random,i=e.sleep??((h,g)=>Rt(h,t,g)),a=e.maxAttempts??ze,s=e.unaryTimeoutMs??tt,l=e.newIdempotencyKey??ut(),u=o(h=>{try{r.onEvent(h);}catch{}},"emit");async function p(h,g,v){let k=v?.maxAttempts,w=Math.max(1,k??a),Nr=v?.idempotent??it.has(g.method),Mr=v?.idempotencyKey===void 0?null:lt(v.idempotencyKey),Q=Nr?Mr??l():null,Lr=dt(g,Q),X=0;for(;;){let P=o(ee=>Object.freeze({call:h,method:g.method,path:g.path,attempt:X,...Q?{idempotencyKey:Q}:{},...ee}),"stamp");u(P({phase:"attempt"}));let ke=Et(s,t),xe=_t(ke.signal,g.signal),A;try{A=await Me({...Lr,signal:xe.signal},e.auth);}catch(ee){A=y(Le(ee));}finally{xe.dispose(),ke.cancel();}if(A.ok)return u(P({phase:"settled",ok:true,reason:"ok"})),A;let T=A.error,B=pt(T,X,{maxAttempts:w,rng:n,now:t.now(),aborted:g.signal?.aborted===true,...k!==void 0?{perCallMaxAttempts:k}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),Z={ok:false,code:T.code,reason:B.reason,...T.httpStatus!==void 0?{httpStatus:T.httpStatus}:{},...T.requestId!==void 0?{requestId:T.requestId}:{}};if(!B.retry)return u(P({phase:"settled",...Z})),y(T);if(u(P({phase:"retry",...Z,delayMs:B.delayMs})),await i(B.delayMs,g.signal),g.signal?.aborted===true)return u(P({phase:"settled",...Z,reason:"aborted"})),y(T);X+=1;}}o(p,"send");async function f(h){return D(h,await ht(e.auth))}o(f,"authorize");async function*R(h,g,v){u(Object.freeze({call:h,phase:"stream.open",method:g.method,path:g.path,attempt:0}));try{yield*e.auth.transport.stream(g,v);}catch{yield Ne({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:null});}}return o(R,"stream"),Object.freeze({send:p,authorize:f,stream:R})}o(Be,"createRequestFunnel");function dt(e,r){let t={};for(let[n,i]of Object.entries(e.headers??{}))n.toLowerCase()!==ot&&(t[n]=i);return r!==null&&(t["Idempotency-Key"]=r),{...e,headers:t}}o(dt,"assembleHeaders");function ut(){let e=0;return ()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}o(ut,"defaultIdempotencyKeyFactory");var ct=10;function pt(e,r,t){if(t.aborted)return {retry:false,reason:"aborted"};let n=ft(e);if(n==="quota")return {retry:false,reason:"daily-quota-exhausted"};if(n!=="burst"&&!te(e.code))return {retry:false,reason:"terminal-code"};let i=n==="burst"?"burst-throttle":"retryable-code";if(o(()=>{if(t.policy===void 0)return false;try{return !t.policy.shouldRetry(e.code,r)}catch{return false}},"policyVetoedRetry")())return {retry:false,reason:"terminal-code"};let s=o(()=>{if(t.policy===void 0)return null;let p;try{p=t.policy.maxAttempts(e.code);}catch{return null}return typeof p!="number"||!Number.isFinite(p)?null:Math.max(1,Math.min(ct,Math.floor(p)))},"policyCeiling"),l=t.perCallMaxAttempts??s()??t.maxAttempts;if(r+1>=l)return {retry:false,reason:"attempts-exhausted"};let u=yt(e,t.now);return u!==null?u>nt?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:i,delayMs:u}:{retry:true,reason:i,delayMs:je(r,t.rng)}}o(pt,"decideRetry");function ft(e){let r=e.code==="unknown"?Pe(vt(e.raw)):e.code;return r==="quotaExceeded"?"quota":r==="rateLimited"||e.httpStatus===429?"burst":null}o(ft,"throttleKind");function yt(e,r){let t=bt(e.raw);if(t!==null){let i=t-r;return i>0?i:0}let n=mt(e.raw);return n===null?null:Math.round(n*1e3)}o(yt,"retryOverrideMs");function mt(e){for(let r of ae(e)){let t=r.retry_after_seconds;if(typeof t=="number"&&Number.isFinite(t)&&t>=0)return t}return null}o(mt,"findRetryAfterSeconds");function bt(e){for(let r of ae(e)){let t=r.resets_at,n=gt(t);if(n!==null)return n}return null}o(bt,"findResetsAt");function ae(e){if(!Ue(e))return [];let r=[e];for(let t of ["error","detail"]){let n=e[t];Ue(n)&&r.push(n);}return r}o(ae,"candidateScopes");function gt(e){if(typeof e=="number"&&Number.isFinite(e))return e<1e11?Math.round(e*1e3):Math.round(e);if(typeof e=="string"&&e.trim().length>0){let r=Date.parse(e);return Number.isFinite(r)?r:null}return null}o(gt,"parseInstantMs");function vt(e){for(let r of ae(e)){let t=r.code;if(typeof t=="string"&&t.length>0)return t}return null}o(vt,"rawWireCode");function Ue(e){return typeof e=="object"&&e!==null}o(Ue,"isRecord");async function ht(e){return e.mode==="anonymous"?{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}:{mode:"personalized",token:await e.identity.currentToken(),userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}}o(ht,"resolveDeviceAuth");function Et(e,r){let t=new AbortController,n=r.setTimeout(()=>t.abort(),e);return {signal:t.signal,cancel:o(()=>r.clearTimeout(n),"cancel")}}o(Et,"boundedSignal");function _t(e,r){let t=o(()=>{},"noop");if(!r)return {signal:e,dispose:t};let n=new AbortController;if(e.aborted||r.aborted)return n.abort(),{signal:n.signal,dispose:t};let i=o(()=>n.abort(),"onAbort");return e.addEventListener("abort",i,{once:true}),r.addEventListener("abort",i,{once:true}),{signal:n.signal,dispose:o(()=>{e.removeEventListener("abort",i),r.removeEventListener("abort",i);},"dispose")}}o(_t,"mergeSignals");function Rt(e,r,t){return e<=0||t?.aborted===true?Promise.resolve():new Promise(n=>{let i=r.setTimeout(()=>{t?.removeEventListener("abort",a),n();},e),a=o(()=>{r.clearTimeout(i),n();},"onAbort");t?.addEventListener("abort",a,{once:true});})}o(Rt,"delayAbortable");var Ve=Object.freeze({track(){},trackExpectedFailure(){}});function qe(e){let r={uri:e.uri,mimeType:e.mimeType},t=G(e);return t!==null&&(r.sizeBytes=t),Object.freeze(r)}o(qe,"fileHandleFromMedia");function G(e){let r=e.byteSize??e.sizeBytes;return typeof r=="number"&&Number.isFinite(r)&&r>=0?r:null}o(G,"mediaByteSize");function He(e){let r=e.durationSeconds;return typeof r=="number"&&Number.isFinite(r)&&r>=0?Math.round(r*1e3):null}o(He,"mediaDurationMs");function Ke(e,r){return Object.freeze(r===void 0?{mode:e}:{mode:e,maxDurationSeconds:r})}o(Ke,"captureOptionsFor");function se(e){return e!=null&&e.isAvailable===true}o(se,"isCaptureAvailable");var Ge=Object.freeze({setTimeout:o((e,r)=>setTimeout(e,r),"setTimeout"),clearTimeout:o(e=>clearTimeout(e),"clearTimeout"),now:o(()=>Date.now(),"now")});function Ye(e,r,t){return new Promise(n=>{if(r.aborted){n();return}let i={handle:void 0},a=o(()=>{t.clearTimeout(i.handle),r.removeEventListener("abort",a),n();},"done");i.handle=t.setTimeout(a,e),r.addEventListener("abort",a,{once:true});})}o(Ye,"delayAbortable");function Ct(e,r){if(!r)return e;let t=new AbortController;if(e.aborted||r.aborted)return t.abort(),t.signal;let n=o(()=>t.abort(),"onAbort");return e.addEventListener("abort",n,{once:true}),r.addEventListener("abort",n,{once:true}),t.signal}o(Ct,"mergeSignals");var le=class le{constructor(r){this.listeners=new Set;this.epoch=0;this.inFlight=null;this.snapshot=Object.freeze({...r});}subscribe(r){return this.listeners.add(r),()=>{this.listeners.delete(r);}}getSnapshot(){return this.snapshot}patch(r){this.snapshot=Object.freeze({...this.snapshot,...r});for(let t of this.listeners)t();}beginOperation(r){this.inFlight?.abort();let t=new AbortController;this.inFlight=t;let n=this.epoch;return {signal:r?Ct(t.signal,r):t.signal,epoch:n,settle:o(()=>{this.inFlight===t&&(this.inFlight=null);},"settle")}}alive(r){return r===this.epoch}rescope(){this.epoch+=1,this.inFlight?.abort(),this.inFlight=null;}dispose(){this.epoch+=1,this.inFlight?.abort(),this.inFlight=null,this.listeners.clear();}};o(le,"MediaStore");var K=le;function We(e){for(let r=0;r<e.length;r+=1){let t=e.charCodeAt(r);if(t>=55296&&t<=56319){let n=e.charCodeAt(r+1);if(!(n>=56320&&n<=57343))return true;r+=1;}else if(t>=56320&&t<=57343)return true}return false}o(We,"hasLoneSurrogate");var St=Object.freeze(["primary_label","primary_confidence","subtype_label","subtype_display","subtype_confidence","risk_tier","confidence_tier","copy_short","disease_name","disease_framing","model_version","skin_v2","eye_v2","llm_checkup"]),Tt=Object.freeze(["decision_audit","decision_thresholds","per_class_auroc","ood_layers","gate1_score","possible_conditions","top_class"]),kt=new Set(["skin_v2","eye_v2","llm_checkup"]),xt=new Set(["primary_confidence","subtype_confidence"]),wt=new Set(["low_risk","concern","uncertain"]),Ft=new Set(["possible","probable"]),Ot=Object.freeze({primary_label:64,subtype_label:64,subtype_display:128,copy_short:512,disease_name:128,disease_framing:512,model_version:64});function Je(e){let r=c(e)?e:{},t={};for(let i of St){if(!(i in r))continue;let a=r[i],s=It(i,a);s!==F&&(t[i]=s);}let n=0;for(let i of Tt)i in r&&(n+=1);return Object.freeze({metadata:Object.freeze(t),droppedOperatorKeys:n})}o(Je,"projectDetectionMetadata");var F=Symbol("drop");function It(e,r){if(kt.has(e))return typeof r=="boolean"?r:F;if(xt.has(e))return $e(r)?r:F;if(e==="risk_tier")return typeof r=="string"&&wt.has(r)?r:F;if(e==="confidence_tier")return typeof r=="string"&&Ft.has(r)?r:F;if(typeof r!="string")return F;let t=Ot[e]??256;return r.length>t?r.slice(0,t):r}o(It,"acceptKey");function $e(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0&&e<=1}o($e,"isUnitConfidence");function Qe(e){if(!c(e))return null;let r=b(e.summary),t=b(e.disclaimer),n=de(e.recommendations??e.recommendation);return r===null&&t===null&&n.length===0?null:Object.freeze({summary:r??"",recommendations:Object.freeze(n),disclaimer:t??""})}o(Qe,"parseInterpretation");function Xe(e){if(!c(e))return {};if(c(e.metadata))return e.metadata;let r=e.detections;if(Array.isArray(r)&&r.length>0){let t=r[0];if(c(t)&&c(t.metadata))return t.metadata;if(c(t))return t}return e}o(Xe,"locateDetectionMetadata");function Ze(e){return c(e)?c(e.interpretation)?e.interpretation:e:null}o(Ze,"locateInterpretation");function c(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(c,"isRecord");function b(e){return typeof e=="string"&&e.length>0?e:null}o(b,"asString");function de(e){return typeof e=="string"?e.length>0?[e]:[]:Array.isArray(e)?e.filter(r=>typeof r=="string"&&r.length>0):[]}o(de,"asStringList");function er(e){return $e(e)?e:null}o(er,"asUnitNumber");function O(e){return typeof e=="number"&&Number.isFinite(e)?e:null}o(O,"asFiniteNumber");var Y=Object.freeze({initiate:"/widget/v1/uploads/initiate",precheck:"/widget/v1/photo/precheck",photoAnalyze:"/widget/v1/photo/analyze",videoAnalyze:"/widget/v1/video/analyze",job:o(e=>We(e)?null:`/widget/v1/analysis/jobs/${encodeURIComponent(e)}`,"job")});async function tr(e,r){let t={purpose:r.purpose,content_type:r.contentType};r.byteSize!==null&&(t.byte_size=r.byteSize);let n={method:"POST",path:Y.initiate,body:t,...r.signal?{signal:r.signal}:{}},i=await e.send("media.initiateUpload",n);if(!i.ok)return y(i.error);let a=Pt(i.value);return a===null?y(m("mediaUploadFailed",{retryable:false})):j(a)}o(tr,"initiateUpload");function Pt(e){if(!c(e))return null;let r=b(e.url),t=b(e.s3_key);if(r===null||t===null)return null;let n=e.fields,i={};if(c(n))for(let[a,s]of Object.entries(n))typeof s=="string"&&(i[a]=s);return Object.freeze({url:r,fields:Object.freeze(i),s3Key:t,expiresAt:O(e.expires_at)})}o(Pt,"parsePresigned");async function nr(e,r,t,n,i){try{return await e.presignedPut(qe(r),{target:t,idempotencyKey:n,...i?{signal:i}:{}}),j(void 0)}catch{return y(m("mediaUploadFailed",{retryable:false}))}}o(nr,"stageUpload");async function or(e,r,t,n,i){let a={method:"POST",path:r,body:t,...i?{signal:i}:{}},s=await e.send("media.analyze",a);if(s.ok){let u=At(s.value);return u!==null?{kind:"async",job:u}:{kind:"sync",body:s.value}}let l=n(s.error.httpStatus,s.error);return l!==null?{kind:"gate",gate:l}:{kind:"error",error:s.error}}o(or,"submitAnalyze");function At(e){if(!c(e))return null;let r=b(e.job_id);if(r===null)return null;let t=b(e.status);return t!==null&&Nt(t)?null:Object.freeze({jobId:r,estimatedSeconds:O(e.estimated_completion_seconds)})}o(At,"parseAsyncJob");var zt=2e3,rr=5e3,jt=9e4;async function ir(e,r,t){let{timers:n,signal:i,alive:a}=t,s=n.now(),l=Math.max(jt,(t.estimatedSeconds??0)*1e3),u=zt;for(;;){if(i.aborted||!a())return {kind:"aborted"};if(await Ye(u,i,n),i.aborted||!a())return {kind:"aborted"};if(n.now()-s>l)return {kind:"timeout"};let p=Y.job(r);if(p===null)return {kind:"notFound"};let f=await e.send("media.pollJob",{method:"GET",path:p,...i?{signal:i}:{}},{maxAttempts:1});if(i.aborted||!a())return {kind:"aborted"};if(!f.ok){if(f.error.httpStatus===404)return {kind:"notFound"};u=Math.min(rr,u+1e3);continue}let R=Dt(f.value);if(R==="COMPLETED")return {kind:"complete",body:f.value};if(R==="FAILED")return {kind:"failed",error:Mt(f.value)};u=Math.min(rr,u+1e3);}}o(ir,"pollJob");function Dt(e){return c(e)?(b(e.status)??"PROCESSING").toUpperCase():"PROCESSING"}o(Dt,"jobStatusOf");function Nt(e){let r=e.toUpperCase();return r==="COMPLETED"||r==="FAILED"}o(Nt,"isTerminalStatus");function Mt(e){let r=c(e)?b(e.error)??b(e.error_code):null;return m("internalError",{retryable:false,...r?{wireMessage:r}:{}})}o(Mt,"jobFailureError");function ar(){return null}o(ar,"detectNoGate");function sr(e,r){let t={s3_key:e};return r.type!==void 0&&(t.type=r.type),r.petRef!=null&&(t.pet_id=r.petRef),r.precheckToken!=null&&(t.precheck_token=r.precheckToken),t}o(sr,"analyzeBody");function lr(e){return new ue(e)}o(lr,"createVideoController");var ce=class ce extends K{constructor(r){super({status:"idle",job:null,result:null,error:null,isCaptureAvailable:se(r.camera),progress:0}),this.funnel=r.funnel??Be({auth:r.auth,...r.errorPolicy?{errorPolicy:r.errorPolicy}:{}}),this.camera=r.camera,this.upload=r.upload,this.defaultPetRef=r.petRef??null,this.telemetry=r.telemetry??Ve,this.timers=r.timers??Ge,this.makeIdempotencyKey=r.makeIdempotencyKey??qt();}async capture(r){if(!se(this.camera))return y(m("unknown",{retryable:false}));let t;try{t=await this.camera.capture(Ke("video",15));}catch{return this.snapshot.status!=="idle"&&this.patch({status:"idle",progress:0}),y(m("unknown",{retryable:false}))}return this.submit(t,r?.petRef!==void 0?{petRef:r.petRef}:void 0)}async submit(r,t){let n=this.beginOperation(t?.signal),i=t?.petRef??this.defaultPetRef,a=this.makeIdempotencyKey(),s=this.timers.now();this.patch({status:"uploading",progress:0,error:null,result:null,job:null});try{let l=await tr(this.funnel,{purpose:"gait_video",contentType:r.mimeType,byteSize:G(r),signal:n.signal});if(n.signal.aborted||!this.alive(n.epoch))return x();if(!l.ok)return this.fail(n,l.error);let u=await nr(this.upload,r,l.value,a,n.signal);if(n.signal.aborted||!this.alive(n.epoch))return x();if(!u.ok)return this.telemetry.track("analysis.upload",{capability:"video",purpose:"gait_video",outcome:"failed"}),this.fail(n,u.error);this.patch({progress:1}),this.telemetry.track("analysis.upload",{capability:"video",purpose:"gait_video",byteSize:G(r)??0,durationMs:He(r)??0,outcome:"ok"}),this.patch({status:"analyzing"});let p=await or(this.funnel,Y.videoAnalyze,sr(l.value.s3Key,{petRef:i}),ar,n.signal);if(n.signal.aborted||!this.alive(n.epoch))return x();if(p.kind==="error")return this.fail(n,p.error);if(p.kind==="gate")return this.fail(n,m("unknown",{retryable:!1}));if(p.kind==="sync"){let h=Vt(p.body)??"";return this.complete(n,p.body,h,s)}let f=p.job;this.patch({job:{id:f.jobId,state:"processing"}});let R=await ir(this.funnel,f.jobId,{timers:this.timers,signal:n.signal,alive:o(()=>this.alive(n.epoch),"alive"),estimatedSeconds:f.estimatedSeconds});if(n.signal.aborted||!this.alive(n.epoch))return x();switch(R.kind){case "aborted":return x();case "complete":return this.complete(n,R.body,f.jobId,s);case "failed":return this.fail(n,R.error);case "timeout":return this.fail(n,m("streamTimeout",{retryable:!0}));case "notFound":return this.patch({job:null}),this.fail(n,m("conversationNotFound",{retryable:!1,httpStatus:404}));default:return this.fail(n,m("internalError",{retryable:!1}))}}finally{n.settle();}}cancel(){this.inFlight?.abort(),this.inFlight=null,(this.snapshot.status==="uploading"||this.snapshot.status==="analyzing")&&this.patch({status:"idle",progress:0});}complete(r,t,n,i){if(!this.alive(r.epoch))return x();let a=Lt(t,n);return a.droppedOperatorKeys>0&&this.telemetry.track("analysis.metadata_leak_guard",{droppedKeyCount:a.droppedOperatorKeys}),this.telemetry.track("analysis.quality_gate",{usable:a.result.quality.usable,reasons:a.result.quality.reasons}),this.patch({status:"complete",progress:1,result:a.result,error:null,job:{id:n,state:"complete"}}),this.telemetry.track("analysis.result",{capability:"video",modelVersion:a.result.modelVersion??"",timeToResultMs:this.timers.now()-i}),j(n)}fail(r,t){return this.alive(r.epoch)?(this.patch({status:"error",error:t,progress:0}),this.telemetry.trackExpectedFailure("analysis.error",{code:t.code,...t.httpStatus!==void 0?{httpStatus:t.httpStatus}:{}}),y(t)):x()}};o(ce,"VideoController");var ue=ce;function Lt(e,r){let t=Je(Xe(e)),n=Qe(Ze(e)),i=b(t.metadata.model_version)??(c(e)?b(e.model_version):null);return {result:Object.freeze({jobId:r,analysisType:"gait",detections:Ut(e),interpretation:n,modelVersion:i,quality:Bt(e)}),droppedOperatorKeys:t.droppedOperatorKeys}}o(Lt,"mapVideoResult");function Ut(e){let r=c(e)?e.detections:null;if(!Array.isArray(r))return Object.freeze([]);let t=[];for(let n of r){if(!c(n))continue;let i=b(n.label)??b(n.name);i!==null&&t.push(Object.freeze({label:i,confidence:er(n.confidence)??0,timestampMs:O(n.timestamp_ms??n.timestamp),durationMs:O(n.duration_ms??n.duration)}));}return Object.freeze(t)}o(Ut,"parseVideoDetections");function Bt(e){let r=c(e)?e.quality:null;if(!c(r))return Object.freeze({usable:true,reasons:Object.freeze([])});let t=r.usable;return Object.freeze({usable:typeof t=="boolean"?t:true,reasons:Object.freeze(de(r.reasons))})}o(Bt,"parseQuality");function Vt(e){return c(e)?b(e.result_id)??b(e.request_id)??b(e.job_id):null}o(Vt,"resultIdOf");function x(){return y(m("unknown",{retryable:false}))}o(x,"abortedResult");function qt(){let e=0;return ()=>`video-analyze-${Date.now().toString(36)}-${(e++).toString(36)}-${Math.random().toString(36).slice(2,10)}`}o(qt,"defaultIdempotencyFactory");var dr=Symbol.for("@everfur/sdk#EverfurContext@v1"),ur=globalThis,cr=ur[dr]??(ur[dr]=createContext(null));cr.displayName??="EverfurContext";function W(){let e=useContext(cr);if(e===null)throw new z("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}o(W,"useEverfurContext");var $t=Object.freeze({status:"idle",job:null,result:null,error:null,isCaptureAvailable:false,progress:0}),Qt=o(()=>{},"NOOP_UNSUBSCRIBE");function pe(e){let{runtime:r,userRef:t,activePet:n,scopeEpoch:i}=W(),a=e?.petRef??n??null,[s,l]=useState(null);useEffect(()=>{let{services:v}=r.registry,k=r.registry.acquire("video",`${t??""}|${a??""}`,()=>lr({...v.errorPolicy?{errorPolicy:v.errorPolicy}:{},auth:v.authFor(t),camera:v.camera,upload:v.upload,petRef:a,telemetry:v.telemetry}),w=>w.dispose());return l(k),()=>{l(w=>w===k?null:w),r.registry.release(k);}},[r,t,a,i]);let u=useCallback(v=>s?s.subscribe(v):Qt,[s]),p=useCallback(()=>s?s.getSnapshot():$t,[s]),f=useSyncExternalStore(u,p,p),R=useCallback(v=>s?s.submit(v):Promise.resolve(pr()),[s]),h=useCallback(()=>s?s.capture():Promise.resolve(pr()),[s]),g=useCallback(()=>{s?.cancel();},[s]);return useMemo(()=>({status:f.status,job:f.job,result:f.result,error:f.error,isCaptureAvailable:f.isCaptureAvailable,progress:f.progress,isBootstrapping:s===null,submit:R,capture:h,cancel:g}),[f,s,R,h,g])}o(pe,"useEverfurVideo");function pr(){return y(m("internalError",{retryable:true}))}o(pr,"notReadyError");function me(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let r of Object.keys(e))me(e[r]);}return e}o(me,"deepFreeze");var Xt=Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),yr={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},mr={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},fr={nano:8,small:9,micro:10,tiny:11,caption:12,bodyTight:13,body:14,subtitle:16,heading:18,verdict:24},Zt={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},en={regular:"400",medium:"500",bold:"700"},rn={eyebrow:1,monoWide:.9,headerBrand:-0.42,tight:-0.35},tn=0,J="System",$="monospace",nn=["content","heading","control","compact","badge"];function on(e){let r={};for(let t of nn)r[t]=e;return r}o(on,"authoredTierSizes");function br(){return {family:J,mono:$,fontUrl:null,families:{regular:J,medium:J,bold:J,mono:$,monoMedium:$,monoBold:$},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:fr,tierSizes:on(fr),lineHeight:Zt,weight:en,letterSpacing:rn,scale:1,maxScale:tn,scaleCaps:Xt}}o(br,"baseType");var gr={},fe=Object.freeze({standard:Object.freeze([.2,0,0,1]),emphasized:Object.freeze([.2,.8,.2,1]),exit:Object.freeze([.4,0,1,1])});function ye(e){return `cubic-bezier(${e.join(", ")})`}o(ye,"cssCubicBezier");var vr={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:ye(fe.standard),emphasized:ye(fe.emphasized),exit:ye(fe.exit)},reducedMotion:false},an={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FDFBF8",surfaceSubtle:"#EFE9E3",background:"#FFFFFF",borderRingCream:"#D8D2C8",chatGround:"#FFFFFF",composerFill:"#FDFBF8",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#111111",secondary:"#0E462E",muted:"#6E6660",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#B91C1C",onDanger:"#FFFFFF",errorRed:"#CC1600",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(185,28,28,0.12)",badgeBgNeutral:"rgba(110,102,96,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#111111",skeleton:"#EFE9E3",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)"},hr=me({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:an,space:yr,radius:mr,type:br(),motion:vr,slots:gr}),sn={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A938C",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#111111",skeleton:"#23272C",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)"};me({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:sn,space:yr,radius:mr,type:br(),motion:vr,slots:gr});var Er=Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),_r=globalThis,be=_r[Er]??(_r[Er]=createContext(hr));be.displayName??="EverfurThemeContext";function C(){return useContext(be)}o(C,"useEverfurTheme");function fn(e,r){let t=e.scaleCaps[r];return t>0?t:void 0}o(fn,"tierMultiplier");function E({tier:e="content",...r}){let{type:t}=C(),n=fn(t,e);return createElement(Text,n===void 0?r:{maxFontSizeMultiplier:n,...r})}o(E,"Text");forwardRef(o(function(r,t){return createElement(TextInput,{...r,...t===null?{}:{ref:t}})},"TextInput"));var yn=Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function M(e,r){let t=e.type,n=t.families[r];return r==="mono"||t.namedFaces[r]?{fontFamily:n}:{fontFamily:n,fontWeight:t.weight[yn[r]]}}o(M,"face");var he=class he extends Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey};}static getDerivedStateFromError(){return {failed:true}}static getDerivedStateFromProps(t,n){return Object.is(t.resetKey,n.key)?null:{failed:false,key:t.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};o(he,"HostRenderBoundary");var ge=he;function bn({render:e}){return e()}o(bn,"RenderHost");function ve({render:e,fallback:r,resetKey:t}){return createElement(ge,{fallback:r,resetKey:t,children:createElement(bn,{render:e})})}o(ve,"HostRender");var gn=Object.freeze({chat:Object.freeze(["chat.message.create"]),records:Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:Object.freeze(["records.clinic.create"]),video:Object.freeze(["video.gait.execute"]),photo:Object.freeze(["photo.checkup.execute"]),animations:Object.freeze(["animations.state.read"]),televet:Object.freeze(["televet.visit.create"])});function vn(e){return gn[e]}o(vn,"requires");function Sr(e,r,t){let n=vn(e),i=new Map;for(let l of r)i.set(l.resource,l);if(t?.isPending===true&&n.some(l=>!i.has(l)))return Ee({name:e,enabled:false,isPending:true,limits:{}});let a=hn(n,i);return n.filter(l=>i.get(l)?.granted!==true).length===0?Ee({name:e,enabled:true,isPending:false,limits:a}):Ee({name:e,enabled:false,isPending:false,limits:a,disabled:En(n,i)})}o(Sr,"decideCapability");function hn(e,r){let t={};for(let n of e){let i=r.get(n)?.limits;if(i)for(let[a,s]of Object.entries(i)){let l=t[a];t[a]=l===void 0?s:Math.min(l,s);}}return t}o(hn,"mergeLimits");function En(e,r){for(let t of e){let n=r.get(t)?.disabled;if(n)return Object.freeze({reason:n.reason,level:n.level,recoverable:n.recoverable})}return Object.freeze({reason:oe("accessDenied"),level:"user_entitlement",recoverable:false})}o(En,"disabledFor");function Ee(e){let r={name:e.name,enabled:e.enabled,isPending:e.isPending,limits:Object.freeze({...e.limits})};return e.disabled!==void 0&&(r.disabled=e.disabled),Object.freeze(r)}o(Ee,"freezeDecision");function _e(e){let{runtime:r}=W(),t=r.entitlements,n=useSyncExternalStore(t.subscribe,t.getSnapshot,t.getSnapshot);return useMemo(()=>Sr(e,n.decisions,{isPending:n.isPending}),[e,n])}o(_e,"useCapability");var Cn=48;function Sn(e){return e.isPending?"pending":e.enabled?"enabled":"disabled"}o(Sn,"selectView");function wr(e){let{capability:r,children:t,renderDisabled:n,renderPending:i,style:a}=e,s=_e(r),l=useMemo(()=>Sn(s),[s]);switch(l){case "enabled":return t;case "pending":return i?jsx(ve,{render:i,fallback:jsx(kr,{capability:r,style:a})}):jsx(kr,{capability:r,style:a});case "disabled":return n?jsx(ve,{render:()=>n(s),fallback:jsx(xr,{decision:s,style:a}),resetKey:s}):jsx(xr,{decision:s,style:a});default:return H(l)}}o(wr,"CapabilityGate");function kr({capability:e,style:r}){let t=C(),n=useMemo(()=>Fr(t),[t]);return jsx(View,{style:[n.offstate,r],accessible:true,accessibilityState:{busy:true},accessibilityLabel:`Loading ${e}`,children:jsx(View,{style:n.skeletonBar})})}o(kr,"PendingSkeleton");function xr({decision:e,style:r}){let t=C(),n=useMemo(()=>Fr(t),[t]),i=e.disabled?.reason??"";return jsx(View,{style:[n.offstate,r],accessible:true,accessibilityRole:"text",accessibilityLabel:i,children:i.length>0?jsx(E,{style:n.offstateText,children:i}):null})}o(xr,"OffState");function Fr(e){let{color:r,space:t,radius:n,type:i}=e;return StyleSheet.create({offstate:{minHeight:Cn,justifyContent:"center",paddingHorizontal:t.lg,paddingVertical:t.md,backgroundColor:r.surfaceCream,borderRadius:n.md,borderWidth:StyleSheet.hairlineWidth,borderColor:r.brandBorder},offstateText:{...M(e,"regular"),fontSize:i.size.body,lineHeight:Math.round(i.size.body*i.lineHeight.normal),color:r.text.muted},skeletonBar:{height:t.md,borderRadius:n.xs,backgroundColor:r.brandSofter}})}o(Fr,"makeStyles");var L=Object.freeze({title:"For educational use only",body:"Everfur is for educational purposes only. It helps you track visible changes through AI checkups. It does not diagnose, treat, prescribe, or replace veterinary care. For urgent symptoms or emergencies, contact a veterinarian immediately."});function Pr(e){let r=C(),t=useMemo(()=>xn(r),[r]);return jsxs(View,{style:[t.container,e.style],accessible:true,accessibilityRole:"text",accessibilityLabel:`${L.title}. ${L.body}`,children:[jsx(E,{style:t.title,children:L.title}),jsx(E,{style:t.body,children:L.body})]})}o(Pr,"ClinicalDisclaimer");function xn(e){let{color:r,space:t,type:n}=e;return StyleSheet.create({container:{paddingHorizontal:t.lg,paddingVertical:t.md,borderTopWidth:StyleSheet.hairlineWidth,borderTopColor:r.borderHairlineGreen,backgroundColor:r.surfaceCream,gap:t.xs},title:{...M(e,"bold"),fontSize:n.size.caption,lineHeight:Math.round(n.size.caption*n.lineHeight.snug),color:r.text.secondary,letterSpacing:n.letterSpacing.eyebrow},body:{...M(e,"regular"),fontSize:n.size.caption,lineHeight:Math.round(n.size.caption*n.lineHeight.snug),color:r.text.muted}})}o(xn,"makeStyles");var An=300,Te=120,Ar=44,zr=40,zn=160;function jn(e){let{petRef:r,style:t}=e;return jsx(wr,{capability:"video",style:t,children:jsx(Nn,{petRef:r,style:t})})}o(jn,"EverfurVideo");function Dn(e){return e.isBootstrapping||e.status==="uploading"||e.status==="analyzing"?"loading":e.status==="error"&&e.error?"error":e.status==="complete"&&e.result?"populated":e.isCaptureAvailable?"empty":"native"}o(Dn,"selectView");function Nn({petRef:e,style:r}){let t=useMemo(()=>e!==void 0?{petRef:e}:void 0,[e]),n=pe(t),i=Dn(n),{styles:a}=I();return jsxs(View,{style:[a.container,r],children:[jsx(View,{style:a.body,children:Mn(i,n)}),jsx(Pr,{})]})}o(Nn,"VideoBody");function Mn(e,r){switch(e){case "loading":return jsx(Ln,{progress:r.progress});case "native":return jsx(Un,{});case "empty":return jsx(Bn,{onCapture:r.capture});case "error":return jsx(Vn,{error:r.error,onRetry:r.capture});case "populated":return jsx(qn,{result:r.result});default:return H(e)}}o(Mn,"renderView");function Ln({progress:e}){let{theme:r,styles:t}=I(),[n,i]=useState(false);useEffect(()=>{let s=setTimeout(()=>i(true),An);return ()=>clearTimeout(s)},[]);let a=Math.max(0,Math.min(1,e));return jsxs(View,{style:t.centered,accessible:true,accessibilityState:{busy:true},accessibilityLabel:"Analyzing video",children:[n?jsx(ActivityIndicator,{color:r.color.brandInk}):null,n&&a>0&&a<1?jsx(View,{style:t.progressTrack,accessibilityRole:"progressbar",children:jsx(View,{style:[t.progressFill,{width:`${Math.round(a*100)}%`}]})}):null]})}o(Ln,"LoadingState");function Un(){let{styles:e}=I();return jsx(View,{style:e.offstate,accessible:true,accessibilityRole:"text",accessibilityLabel:"Camera is unavailable",children:jsx(View,{style:e.emptyGlyph})})}o(Un,"NativeUnavailableState");function Bn({onCapture:e}){let{styles:r}=I();return jsx(View,{style:r.centered,accessible:true,accessibilityRole:"summary",accessibilityLabel:"Record a short clip to check gait",children:jsx(Pressable,{onPress:e,accessibilityRole:"button",accessibilityLabel:"Record video",style:r.primaryButton,children:jsx(E,{style:r.primaryLabel,children:"Record video"})})})}o(Bn,"EmptyState");function Vn({error:e,onRetry:r}){let{styles:t}=I();return jsxs(View,{style:t.centered,accessible:true,accessibilityRole:"alert",children:[jsx(E,{style:t.errorText,children:e.displayMessage}),e.retryable?jsx(Pressable,{onPress:r,accessibilityRole:"button",accessibilityLabel:"Try again",style:t.primaryButton,children:jsx(E,{style:t.primaryLabel,children:"Try again"})}):null]})}o(Vn,"ErrorState");function qn({result:e}){let{styles:r}=I();return e.quality.usable?jsxs(ScrollView,{style:r.list,contentContainerStyle:r.listContent,accessibilityLabel:"Gait analysis result",children:[e.detections.map((t,n)=>jsx(View,{style:r.resultRow,children:jsx(E,{style:r.resultLabel,children:t.label})},`${t.label}-${n}`)),e.interpretation?jsxs(View,{style:r.interpretationBlock,children:[jsx(E,{style:r.summaryText,children:e.interpretation.summary}),jsx(E,{style:r.disclaimerText,children:e.interpretation.disclaimer})]}):null]}):jsx(View,{style:r.centered,accessible:true,accessibilityRole:"summary",accessibilityLabel:"Result uncertain",children:jsx(E,{style:r.uncertainText,children:"We could not get a clear read from this clip. Try recording again."})})}o(qn,"ResultState");function I(){let e=C();return useMemo(()=>({theme:e,styles:Hn(e)}),[e])}o(I,"useVideoStyles");function Hn(e){let{color:r,space:t,radius:n,type:i}=e,a=i.weight.bold,s=i.weight.medium;return StyleSheet.create({container:{flex:1,minHeight:Te,backgroundColor:r.background},body:{flex:1},centered:{minHeight:Te,flexGrow:1,alignItems:"center",justifyContent:"center",padding:t.xl},offstate:{minHeight:Te,alignItems:"center",justifyContent:"center",padding:t.xl},emptyGlyph:{width:zr,height:zr,borderRadius:n.pill,backgroundColor:r.surfaceCream,borderWidth:StyleSheet.hairlineWidth,borderColor:r.borderHairlineGreen},primaryButton:{minHeight:Ar,minWidth:Ar,alignItems:"center",justifyContent:"center",paddingHorizontal:t.xl,paddingVertical:t.md,borderRadius:n.pill,backgroundColor:r.primary,shadowColor:r.brandSofter,shadowOffset:{width:0,height:t.xs},shadowOpacity:1,shadowRadius:t.sm,elevation:t.xs},primaryLabel:{color:r.onPrimary,fontFamily:i.family,fontSize:i.size.body,fontWeight:a,letterSpacing:i.letterSpacing.tight},errorText:{color:r.danger,fontFamily:i.family,fontSize:i.size.subtitle,lineHeight:i.size.subtitle*i.lineHeight.normal,fontWeight:s,textAlign:"center",marginBottom:t.md},uncertainText:{color:r.text.muted,fontFamily:i.family,fontSize:i.size.subtitle,lineHeight:i.size.subtitle*i.lineHeight.normal,textAlign:"center"},progressTrack:{marginTop:t.lg,height:t.sm,width:zn,borderRadius:n.pill,backgroundColor:r.skeleton,overflow:"hidden"},progressFill:{height:t.sm,borderRadius:n.pill,backgroundColor:r.brand},list:{flex:1},listContent:{padding:t.lg,gap:t.md},resultRow:{paddingVertical:t.sm,paddingHorizontal:t.md,borderRadius:n.sm,backgroundColor:r.surfaceCream,borderWidth:StyleSheet.hairlineWidth,borderColor:r.brandBorder},resultLabel:{color:r.text.primary,fontFamily:i.family,fontSize:i.size.body,lineHeight:i.size.body*i.lineHeight.normal,fontWeight:s},interpretationBlock:{marginTop:t.sm,gap:t.sm},summaryText:{color:r.text.primary,fontFamily:i.family,fontSize:i.size.subtitle,lineHeight:i.size.subtitle*i.lineHeight.normal},disclaimerText:{color:r.text.muted,fontFamily:i.family,fontSize:i.size.caption,lineHeight:i.size.caption*i.lineHeight.relaxed}})}o(Hn,"makeStyles");export{jn as EverfurVideo,pe as useEverfurVideo};
|
|
1
|
+
import {createContext,forwardRef,useState,useEffect,useCallback,useSyncExternalStore,useMemo,createElement,useContext,Component}from'react';import {TextInput,View,ActivityIndicator,Pressable,ScrollView,StyleSheet,Text}from'react-native';import {jsx,jsxs}from'react/jsx-runtime';var Ur=Object.defineProperty;var o=(e,r)=>Ur(e,"name",{value:r,configurable:true});var re=Object.freeze([Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false}),Object.freeze({wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true}),Object.freeze({wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true}),Object.freeze({wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true}),Object.freeze({wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false}),Object.freeze({wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false}),Object.freeze({wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false}),Object.freeze({wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false}),Object.freeze({wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false}),Object.freeze({wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true}),Object.freeze({wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false}),Object.freeze({wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false}),Object.freeze({wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false}),Object.freeze({wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false}),Object.freeze({wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false}),Object.freeze({wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false}),Object.freeze({wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false}),Object.freeze({wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true}),Object.freeze({wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true}),Object.freeze({wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true}),Object.freeze({wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false}),Object.freeze({wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false})]);Object.freeze(re.map(e=>e.wireCode));var Br=Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict"}),Fe=Object.freeze(re.map(e=>Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:Br[e.wireCode]}))),Vr=new Map(Fe.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),qr=Object.freeze(["http_envelope",...[...new Set(Fe.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function V(e,r){if(typeof e!="string")return;let t=e.trim().toUpperCase();if(t.length!==0)for(let n of [r??"http_envelope",...qr]){let i=Vr.get(n+t);if(i)return i}}o(V,"contractErrorFor");function Hr(e){return e.envelope==="sse_frame"?`/errors#sse-${e.wireCode}`:e.envelope==="oauth_error"?`/errors#oauth-${e.wireCode}`:`/errors#${e.wireCode}`}o(Hr,"contractDocUrl");function Oe(e){return null}o(Oe,"publishedDocUrl");var Kr=Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function Ie(e){return Kr[e]}o(Ie,"categoryFor");function Pe(e){let r=V(e);if(r)return r.normalized;let t=(e??"").trim().toUpperCase(),n=t.replace(/[^A-Z0-9]/g,"");if(n==="AUTHREJECTED")return "authRejected";if(t.startsWith("AUTH"))return "authExpired";switch(n){case "DAILYQUOTAEXCEEDED":case "QUOTAEXCEEDED":return "quotaExceeded";case "RATELIMITED":case "TOOMANYREQUESTS":case "TELEVETRATELIMITED":return "rateLimited";case "IDEMPOTENCYKEYCONFLICT":case "IDEMPOTENCYCONFLICT":return "idempotencyConflict";case "ACCESSDENIED":case "FORBIDDEN":return "accessDenied";case "NOTFOUND":case "CONVERSATIONNOTFOUND":return "conversationNotFound";case "PETNOTFOUND":return "petNotFound";case "TIMEOUT":case "STREAMTIMEOUT":return "streamTimeout";case "MEDIAUPLOADFAILED":case "UNRECOGNIZEDVIDEOFORMAT":case "FILETOOSMALL":return "mediaUploadFailed";case "MODERATIONBLOCKED":return "moderationBlocked";case "UPSTREAMLLMTIMEOUT":return "upstreamLlmTimeout";case "INTERNALERROR":case "INTERNALSERVERERROR":return "internalError";case "STREAMINCOMPLETE":case "CHATSTREAMINCOMPLETE":return "streamIncomplete";case "INVALIDANALYSISTYPE":case "INVALIDUPLOADPURPOSE":return "unknown";default:return "unknown"}}o(Pe,"fromWire");var Gr=new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function te(e){return Gr.has(e)}o(te,"isAutoRetryable");var Yr=new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function Ae(e){return te(e)||Yr.has(e)}o(Ae,"isRetryableCode");var Wr=500,ne=8e3,ze=4;function je(e,r=Math.random){let t=Math.max(0,e),n=Math.min(Wr*2**t,ne);return Math.floor(r()*n)}o(je,"backoffDelayMs");var Jr=Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:"This feature isn't available on your account right now.",paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:"Something in that request was not right. Check the details and try again.",sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",unknown:"Something went wrong. Please try again."});function oe(e){return Jr[e]}o(oe,"userFacingError");function De(e,r,t){Object.defineProperty(e,r,{value:t,enumerable:false,writable:false,configurable:false});}o(De,"defineHidden");var $r=/^[a-z][a-z0-9_]{0,63}$/;function m(e,r){let t=V(r?.wireCode,r?.wireEnvelope),n={code:e,category:Ie(e),retryable:r?.retryable??Ae(e),displayMessage:oe(e)};if(r?.httpStatus!==void 0&&(n.httpStatus=r.httpStatus),r?.requestId&&(n.requestId=r.requestId),typeof r?.reasonCode=="string"&&$r.test(r.reasonCode)&&(n.reasonCode=r.reasonCode),t);return r?.wireMessage&&De(n,"wireMessage",r.wireMessage),r?.raw!==void 0&&r.raw!==null&&De(n,"raw",r.raw),Object.freeze(n)}o(m,"makeEverfurError");function j(e,r){return Object.freeze(r===void 0?{ok:true,value:e}:{ok:true,value:e,warning:r})}o(j,"ok");function y(e){return Object.freeze({ok:false,error:e})}o(y,"err");var q=class q extends Error{constructor(r,t){super(t),this.name="EverfurConfigError",this.kind=r,Object.setPrototypeOf(this,q.prototype);}};o(q,"EverfurConfigError");var z=q;function H(e){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(e)}`)}o(H,"assertNever");function Ne(e){return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:e.serverRequestId??null})}o(Ne,"errorFrame");function Zr(e){let r={};return e.mode==="personalized"?r.authorization=`Bearer ${e.token}`:r["x-everfur-partner-key"]=e.publishableKey,e.userRef&&(r["x-everfur-user-ref"]=e.userRef),e.sessionId&&(r["x-everfur-session-id"]=e.sessionId),r}o(Zr,"authHeaders");function D(e,r){return {...e,headers:{...et(e.headers),...Zr(r)}}}o(D,"withAuthHeaders");function et(e){if(!e)return {};let r={};for(let[t,n]of Object.entries(e)){let i=t.toLowerCase();i==="authorization"||i==="x-everfur-partner-key"||(r[t]=n);}return r}o(et,"stripAuthHeaders");async function Me(e,r){if(r.mode==="anonymous")return r.transport.request(D(e,{mode:"anonymous",publishableKey:r.publishableKey,userRef:r.userRef,...r.sessionId?{sessionId:r.sessionId}:{}}));let t;try{t=await r.identity.currentToken();}catch{return y(ie())}let n=await r.transport.request(D(e,{mode:"personalized",token:t,userRef:r.userRef,...r.sessionId?{sessionId:r.sessionId}:{}}));if(n.ok||n.error.httpStatus!==401)return n;let i;try{i=await r.identity.currentToken({forceRefresh:!0});}catch{return y(ie())}let a=await r.transport.request(D(e,{mode:"personalized",token:i,userRef:r.userRef,...r.sessionId?{sessionId:r.sessionId}:{}}));return !a.ok&&a.error.httpStatus===401?y(ie(a.error.httpStatus)):a}o(Me,"authedSend");function ie(e){return m("authRejected",{retryable:false,...e!==void 0?{httpStatus:e}:{}})}o(ie,"authRejectedError");function Le(e){return m("internalError",{retryable:true,wireMessage:rt(e)})}o(Le,"networkError");function rt(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}o(rt,"describeCause");var tt=3e4,nt=ne*2,ot="idempotency-key",it=new Set(["POST","PUT","PATCH","DELETE"]),at=Object.freeze({onEvent(){}}),st=Object.freeze({setTimeout:o((e,r)=>setTimeout(e,r),"setTimeout"),clearTimeout:o(e=>clearTimeout(e),"clearTimeout"),now:o(()=>Date.now(),"now")});function lt(e){let r=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return r.length===0?null:`efs_${r}`.slice(0,128)}o(lt,"seededIdempotencyKey");function Be(e){let r=e.observer??at,t=e.timers??st,n=e.rng??Math.random,i=e.sleep??((h,g)=>Rt(h,t,g)),a=e.maxAttempts??ze,s=e.unaryTimeoutMs??tt,l=e.newIdempotencyKey??ut(),u=o(h=>{try{r.onEvent(h);}catch{}},"emit");async function p(h,g,v){let k=v?.maxAttempts,w=Math.max(1,k??a),Nr=v?.idempotent??it.has(g.method),Mr=v?.idempotencyKey===void 0?null:lt(v.idempotencyKey),Q=Nr?Mr??l():null,Lr=dt(g,Q),X=0;for(;;){let P=o(ee=>Object.freeze({call:h,method:g.method,path:g.path,attempt:X,...Q?{idempotencyKey:Q}:{},...ee}),"stamp");u(P({phase:"attempt"}));let ke=Et(s,t),xe=_t(ke.signal,g.signal),A;try{A=await Me({...Lr,signal:xe.signal},e.auth);}catch(ee){A=y(Le(ee));}finally{xe.dispose(),ke.cancel();}if(A.ok)return u(P({phase:"settled",ok:true,reason:"ok"})),A;let T=A.error,B=pt(T,X,{maxAttempts:w,rng:n,now:t.now(),aborted:g.signal?.aborted===true,...k!==void 0?{perCallMaxAttempts:k}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),Z={ok:false,code:T.code,reason:B.reason,...T.httpStatus!==void 0?{httpStatus:T.httpStatus}:{},...T.requestId!==void 0?{requestId:T.requestId}:{}};if(!B.retry)return u(P({phase:"settled",...Z})),y(T);if(u(P({phase:"retry",...Z,delayMs:B.delayMs})),await i(B.delayMs,g.signal),g.signal?.aborted===true)return u(P({phase:"settled",...Z,reason:"aborted"})),y(T);X+=1;}}o(p,"send");async function f(h){return D(h,await ht(e.auth))}o(f,"authorize");async function*R(h,g,v){u(Object.freeze({call:h,phase:"stream.open",method:g.method,path:g.path,attempt:0}));try{yield*e.auth.transport.stream(g,v);}catch{yield Ne({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:null});}}return o(R,"stream"),Object.freeze({send:p,authorize:f,stream:R})}o(Be,"createRequestFunnel");function dt(e,r){let t={};for(let[n,i]of Object.entries(e.headers??{}))n.toLowerCase()!==ot&&(t[n]=i);return r!==null&&(t["Idempotency-Key"]=r),{...e,headers:t}}o(dt,"assembleHeaders");function ut(){let e=0;return ()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}o(ut,"defaultIdempotencyKeyFactory");var ct=10;function pt(e,r,t){if(t.aborted)return {retry:false,reason:"aborted"};let n=ft(e);if(n==="quota")return {retry:false,reason:"daily-quota-exhausted"};if(n!=="burst"&&!te(e.code))return {retry:false,reason:"terminal-code"};let i=n==="burst"?"burst-throttle":"retryable-code";if(o(()=>{if(t.policy===void 0)return false;try{return !t.policy.shouldRetry(e.code,r)}catch{return false}},"policyVetoedRetry")())return {retry:false,reason:"terminal-code"};let s=o(()=>{if(t.policy===void 0)return null;let p;try{p=t.policy.maxAttempts(e.code);}catch{return null}return typeof p!="number"||!Number.isFinite(p)?null:Math.max(1,Math.min(ct,Math.floor(p)))},"policyCeiling"),l=t.perCallMaxAttempts??s()??t.maxAttempts;if(r+1>=l)return {retry:false,reason:"attempts-exhausted"};let u=yt(e,t.now);return u!==null?u>nt?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:i,delayMs:u}:{retry:true,reason:i,delayMs:je(r,t.rng)}}o(pt,"decideRetry");function ft(e){let r=e.code==="unknown"?Pe(vt(e.raw)):e.code;return r==="quotaExceeded"?"quota":r==="rateLimited"||e.httpStatus===429?"burst":null}o(ft,"throttleKind");function yt(e,r){let t=bt(e.raw);if(t!==null){let i=t-r;return i>0?i:0}let n=mt(e.raw);return n===null?null:Math.round(n*1e3)}o(yt,"retryOverrideMs");function mt(e){for(let r of ae(e)){let t=r.retry_after_seconds;if(typeof t=="number"&&Number.isFinite(t)&&t>=0)return t}return null}o(mt,"findRetryAfterSeconds");function bt(e){for(let r of ae(e)){let t=r.resets_at,n=gt(t);if(n!==null)return n}return null}o(bt,"findResetsAt");function ae(e){if(!Ue(e))return [];let r=[e];for(let t of ["error","detail"]){let n=e[t];Ue(n)&&r.push(n);}return r}o(ae,"candidateScopes");function gt(e){if(typeof e=="number"&&Number.isFinite(e))return e<1e11?Math.round(e*1e3):Math.round(e);if(typeof e=="string"&&e.trim().length>0){let r=Date.parse(e);return Number.isFinite(r)?r:null}return null}o(gt,"parseInstantMs");function vt(e){for(let r of ae(e)){let t=r.code;if(typeof t=="string"&&t.length>0)return t}return null}o(vt,"rawWireCode");function Ue(e){return typeof e=="object"&&e!==null}o(Ue,"isRecord");async function ht(e){return e.mode==="anonymous"?{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}:{mode:"personalized",token:await e.identity.currentToken(),userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}}o(ht,"resolveDeviceAuth");function Et(e,r){let t=new AbortController,n=r.setTimeout(()=>t.abort(),e);return {signal:t.signal,cancel:o(()=>r.clearTimeout(n),"cancel")}}o(Et,"boundedSignal");function _t(e,r){let t=o(()=>{},"noop");if(!r)return {signal:e,dispose:t};let n=new AbortController;if(e.aborted||r.aborted)return n.abort(),{signal:n.signal,dispose:t};let i=o(()=>n.abort(),"onAbort");return e.addEventListener("abort",i,{once:true}),r.addEventListener("abort",i,{once:true}),{signal:n.signal,dispose:o(()=>{e.removeEventListener("abort",i),r.removeEventListener("abort",i);},"dispose")}}o(_t,"mergeSignals");function Rt(e,r,t){return e<=0||t?.aborted===true?Promise.resolve():new Promise(n=>{let i=r.setTimeout(()=>{t?.removeEventListener("abort",a),n();},e),a=o(()=>{r.clearTimeout(i),n();},"onAbort");t?.addEventListener("abort",a,{once:true});})}o(Rt,"delayAbortable");var Ve=Object.freeze({track(){},trackExpectedFailure(){}});function qe(e){let r={uri:e.uri,mimeType:e.mimeType},t=G(e);return t!==null&&(r.sizeBytes=t),Object.freeze(r)}o(qe,"fileHandleFromMedia");function G(e){let r=e.byteSize??e.sizeBytes;return typeof r=="number"&&Number.isFinite(r)&&r>=0?r:null}o(G,"mediaByteSize");function He(e){let r=e.durationSeconds;return typeof r=="number"&&Number.isFinite(r)&&r>=0?Math.round(r*1e3):null}o(He,"mediaDurationMs");function Ke(e,r){return Object.freeze(r===void 0?{mode:e}:{mode:e,maxDurationSeconds:r})}o(Ke,"captureOptionsFor");function se(e){return e!=null&&e.isAvailable===true}o(se,"isCaptureAvailable");var Ge=Object.freeze({setTimeout:o((e,r)=>setTimeout(e,r),"setTimeout"),clearTimeout:o(e=>clearTimeout(e),"clearTimeout"),now:o(()=>Date.now(),"now")});function Ye(e,r,t){return new Promise(n=>{if(r.aborted){n();return}let i={handle:void 0},a=o(()=>{t.clearTimeout(i.handle),r.removeEventListener("abort",a),n();},"done");i.handle=t.setTimeout(a,e),r.addEventListener("abort",a,{once:true});})}o(Ye,"delayAbortable");function St(e,r){if(!r)return e;let t=new AbortController;if(e.aborted||r.aborted)return t.abort(),t.signal;let n=o(()=>t.abort(),"onAbort");return e.addEventListener("abort",n,{once:true}),r.addEventListener("abort",n,{once:true}),t.signal}o(St,"mergeSignals");var le=class le{constructor(r){this.listeners=new Set;this.epoch=0;this.inFlight=null;this.snapshot=Object.freeze({...r});}subscribe(r){return this.listeners.add(r),()=>{this.listeners.delete(r);}}getSnapshot(){return this.snapshot}patch(r){this.snapshot=Object.freeze({...this.snapshot,...r});for(let t of this.listeners)t();}beginOperation(r){this.inFlight?.abort();let t=new AbortController;this.inFlight=t;let n=this.epoch;return {signal:r?St(t.signal,r):t.signal,epoch:n,settle:o(()=>{this.inFlight===t&&(this.inFlight=null);},"settle")}}alive(r){return r===this.epoch}rescope(){this.epoch+=1,this.inFlight?.abort(),this.inFlight=null;}dispose(){this.epoch+=1,this.inFlight?.abort(),this.inFlight=null,this.listeners.clear();}};o(le,"MediaStore");var K=le;function We(e){for(let r=0;r<e.length;r+=1){let t=e.charCodeAt(r);if(t>=55296&&t<=56319){let n=e.charCodeAt(r+1);if(!(n>=56320&&n<=57343))return true;r+=1;}else if(t>=56320&&t<=57343)return true}return false}o(We,"hasLoneSurrogate");var Ct=Object.freeze(["primary_label","primary_confidence","subtype_label","subtype_display","subtype_confidence","risk_tier","confidence_tier","copy_short","disease_name","disease_framing","model_version","skin_v2","eye_v2","llm_checkup"]),Tt=Object.freeze(["decision_audit","decision_thresholds","per_class_auroc","ood_layers","gate1_score","possible_conditions","top_class"]),kt=new Set(["skin_v2","eye_v2","llm_checkup"]),xt=new Set(["primary_confidence","subtype_confidence"]),wt=new Set(["low_risk","concern","uncertain"]),Ft=new Set(["possible","probable"]),Ot=Object.freeze({primary_label:64,subtype_label:64,subtype_display:128,copy_short:512,disease_name:128,disease_framing:512,model_version:64});function Je(e){let r=c(e)?e:{},t={};for(let i of Ct){if(!(i in r))continue;let a=r[i],s=It(i,a);s!==F&&(t[i]=s);}let n=0;for(let i of Tt)i in r&&(n+=1);return Object.freeze({metadata:Object.freeze(t),droppedOperatorKeys:n})}o(Je,"projectDetectionMetadata");var F=Symbol("drop");function It(e,r){if(kt.has(e))return typeof r=="boolean"?r:F;if(xt.has(e))return $e(r)?r:F;if(e==="risk_tier")return typeof r=="string"&&wt.has(r)?r:F;if(e==="confidence_tier")return typeof r=="string"&&Ft.has(r)?r:F;if(typeof r!="string")return F;let t=Ot[e]??256;return r.length>t?r.slice(0,t):r}o(It,"acceptKey");function $e(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0&&e<=1}o($e,"isUnitConfidence");function Qe(e){if(!c(e))return null;let r=b(e.summary),t=b(e.disclaimer),n=de(e.recommendations??e.recommendation);return r===null&&t===null&&n.length===0?null:Object.freeze({summary:r??"",recommendations:Object.freeze(n),disclaimer:t??""})}o(Qe,"parseInterpretation");function Xe(e){if(!c(e))return {};if(c(e.metadata))return e.metadata;let r=e.detections;if(Array.isArray(r)&&r.length>0){let t=r[0];if(c(t)&&c(t.metadata))return t.metadata;if(c(t))return t}return e}o(Xe,"locateDetectionMetadata");function Ze(e){return c(e)?c(e.interpretation)?e.interpretation:e:null}o(Ze,"locateInterpretation");function c(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(c,"isRecord");function b(e){return typeof e=="string"&&e.length>0?e:null}o(b,"asString");function de(e){return typeof e=="string"?e.length>0?[e]:[]:Array.isArray(e)?e.filter(r=>typeof r=="string"&&r.length>0):[]}o(de,"asStringList");function er(e){return $e(e)?e:null}o(er,"asUnitNumber");function O(e){return typeof e=="number"&&Number.isFinite(e)?e:null}o(O,"asFiniteNumber");var Y=Object.freeze({initiate:"/widget/v1/uploads/initiate",precheck:"/widget/v1/photo/precheck",photoAnalyze:"/widget/v1/photo/analyze",videoAnalyze:"/widget/v1/video/analyze",job:o(e=>We(e)?null:`/widget/v1/analysis/jobs/${encodeURIComponent(e)}`,"job")});async function tr(e,r){let t={purpose:r.purpose,content_type:r.contentType};r.byteSize!==null&&(t.byte_size=r.byteSize);let n={method:"POST",path:Y.initiate,body:t,...r.signal?{signal:r.signal}:{}},i=await e.send("media.initiateUpload",n);if(!i.ok)return y(i.error);let a=Pt(i.value);return a===null?y(m("mediaUploadFailed",{retryable:false})):j(a)}o(tr,"initiateUpload");function Pt(e){if(!c(e))return null;let r=b(e.url),t=b(e.s3_key);if(r===null||t===null)return null;let n=e.fields,i={};if(c(n))for(let[a,s]of Object.entries(n))typeof s=="string"&&(i[a]=s);return Object.freeze({url:r,fields:Object.freeze(i),s3Key:t,expiresAt:O(e.expires_at)})}o(Pt,"parsePresigned");async function nr(e,r,t,n,i){try{return await e.presignedPut(qe(r),{target:t,idempotencyKey:n,...i?{signal:i}:{}}),j(void 0)}catch{return y(m("mediaUploadFailed",{retryable:false}))}}o(nr,"stageUpload");async function or(e,r,t,n,i){let a={method:"POST",path:r,body:t,...i?{signal:i}:{}},s=await e.send("media.analyze",a);if(s.ok){let u=At(s.value);return u!==null?{kind:"async",job:u}:{kind:"sync",body:s.value}}let l=n(s.error.httpStatus,s.error);return l!==null?{kind:"gate",gate:l}:{kind:"error",error:s.error}}o(or,"submitAnalyze");function At(e){if(!c(e))return null;let r=b(e.job_id);if(r===null)return null;let t=b(e.status);return t!==null&&Nt(t)?null:Object.freeze({jobId:r,estimatedSeconds:O(e.estimated_completion_seconds)})}o(At,"parseAsyncJob");var zt=2e3,rr=5e3,jt=9e4;async function ir(e,r,t){let{timers:n,signal:i,alive:a}=t,s=n.now(),l=Math.max(jt,(t.estimatedSeconds??0)*1e3),u=zt;for(;;){if(i.aborted||!a())return {kind:"aborted"};if(await Ye(u,i,n),i.aborted||!a())return {kind:"aborted"};if(n.now()-s>l)return {kind:"timeout"};let p=Y.job(r);if(p===null)return {kind:"notFound"};let f=await e.send("media.pollJob",{method:"GET",path:p,...i?{signal:i}:{}},{maxAttempts:1});if(i.aborted||!a())return {kind:"aborted"};if(!f.ok){if(f.error.httpStatus===404)return {kind:"notFound"};u=Math.min(rr,u+1e3);continue}let R=Dt(f.value);if(R==="COMPLETED")return {kind:"complete",body:f.value};if(R==="FAILED")return {kind:"failed",error:Mt(f.value)};u=Math.min(rr,u+1e3);}}o(ir,"pollJob");function Dt(e){return c(e)?(b(e.status)??"PROCESSING").toUpperCase():"PROCESSING"}o(Dt,"jobStatusOf");function Nt(e){let r=e.toUpperCase();return r==="COMPLETED"||r==="FAILED"}o(Nt,"isTerminalStatus");function Mt(e){let r=c(e)?b(e.error)??b(e.error_code):null;return m("internalError",{retryable:false,...r?{wireMessage:r}:{}})}o(Mt,"jobFailureError");function ar(){return null}o(ar,"detectNoGate");function sr(e,r){let t={s3_key:e};return r.type!==void 0&&(t.type=r.type),r.petRef!=null&&(t.pet_id=r.petRef),r.precheckToken!=null&&(t.precheck_token=r.precheckToken),t}o(sr,"analyzeBody");function lr(e){return new ue(e)}o(lr,"createVideoController");var ce=class ce extends K{constructor(r){super({status:"idle",job:null,result:null,error:null,isCaptureAvailable:se(r.camera),progress:0}),this.funnel=r.funnel??Be({auth:r.auth,...r.errorPolicy?{errorPolicy:r.errorPolicy}:{}}),this.camera=r.camera,this.upload=r.upload,this.defaultPetRef=r.petRef??null,this.telemetry=r.telemetry??Ve,this.timers=r.timers??Ge,this.makeIdempotencyKey=r.makeIdempotencyKey??qt();}async capture(r){if(!se(this.camera))return y(m("unknown",{retryable:false}));let t;try{t=await this.camera.capture(Ke("video",15));}catch{return this.snapshot.status!=="idle"&&this.patch({status:"idle",progress:0}),y(m("unknown",{retryable:false}))}return this.submit(t,r?.petRef!==void 0?{petRef:r.petRef}:void 0)}async submit(r,t){let n=this.beginOperation(t?.signal),i=t?.petRef??this.defaultPetRef,a=this.makeIdempotencyKey(),s=this.timers.now();this.patch({status:"uploading",progress:0,error:null,result:null,job:null});try{let l=await tr(this.funnel,{purpose:"gait_video",contentType:r.mimeType,byteSize:G(r),signal:n.signal});if(n.signal.aborted||!this.alive(n.epoch))return x();if(!l.ok)return this.fail(n,l.error);let u=await nr(this.upload,r,l.value,a,n.signal);if(n.signal.aborted||!this.alive(n.epoch))return x();if(!u.ok)return this.telemetry.track("analysis.upload",{capability:"video",purpose:"gait_video",outcome:"failed"}),this.fail(n,u.error);this.patch({progress:1}),this.telemetry.track("analysis.upload",{capability:"video",purpose:"gait_video",byteSize:G(r)??0,durationMs:He(r)??0,outcome:"ok"}),this.patch({status:"analyzing"});let p=await or(this.funnel,Y.videoAnalyze,sr(l.value.s3Key,{petRef:i}),ar,n.signal);if(n.signal.aborted||!this.alive(n.epoch))return x();if(p.kind==="error")return this.fail(n,p.error);if(p.kind==="gate")return this.fail(n,m("unknown",{retryable:!1}));if(p.kind==="sync"){let h=Vt(p.body)??"";return this.complete(n,p.body,h,s)}let f=p.job;this.patch({job:{id:f.jobId,state:"processing"}});let R=await ir(this.funnel,f.jobId,{timers:this.timers,signal:n.signal,alive:o(()=>this.alive(n.epoch),"alive"),estimatedSeconds:f.estimatedSeconds});if(n.signal.aborted||!this.alive(n.epoch))return x();switch(R.kind){case "aborted":return x();case "complete":return this.complete(n,R.body,f.jobId,s);case "failed":return this.fail(n,R.error);case "timeout":return this.fail(n,m("streamTimeout",{retryable:!0}));case "notFound":return this.patch({job:null}),this.fail(n,m("conversationNotFound",{retryable:!1,httpStatus:404}));default:return this.fail(n,m("internalError",{retryable:!1}))}}finally{n.settle();}}cancel(){this.inFlight?.abort(),this.inFlight=null,(this.snapshot.status==="uploading"||this.snapshot.status==="analyzing")&&this.patch({status:"idle",progress:0});}complete(r,t,n,i){if(!this.alive(r.epoch))return x();let a=Lt(t,n);return a.droppedOperatorKeys>0&&this.telemetry.track("analysis.metadata_leak_guard",{droppedKeyCount:a.droppedOperatorKeys}),this.telemetry.track("analysis.quality_gate",{usable:a.result.quality.usable,reasons:a.result.quality.reasons}),this.patch({status:"complete",progress:1,result:a.result,error:null,job:{id:n,state:"complete"}}),this.telemetry.track("analysis.result",{capability:"video",modelVersion:a.result.modelVersion??"",timeToResultMs:this.timers.now()-i}),j(n)}fail(r,t){return this.alive(r.epoch)?(this.patch({status:"error",error:t,progress:0}),this.telemetry.trackExpectedFailure("analysis.error",{code:t.code,...t.httpStatus!==void 0?{httpStatus:t.httpStatus}:{}}),y(t)):x()}};o(ce,"VideoController");var ue=ce;function Lt(e,r){let t=Je(Xe(e)),n=Qe(Ze(e)),i=b(t.metadata.model_version)??(c(e)?b(e.model_version):null);return {result:Object.freeze({jobId:r,analysisType:"gait",detections:Ut(e),interpretation:n,modelVersion:i,quality:Bt(e)}),droppedOperatorKeys:t.droppedOperatorKeys}}o(Lt,"mapVideoResult");function Ut(e){let r=c(e)?e.detections:null;if(!Array.isArray(r))return Object.freeze([]);let t=[];for(let n of r){if(!c(n))continue;let i=b(n.label)??b(n.name);i!==null&&t.push(Object.freeze({label:i,confidence:er(n.confidence)??0,timestampMs:O(n.timestamp_ms??n.timestamp),durationMs:O(n.duration_ms??n.duration)}));}return Object.freeze(t)}o(Ut,"parseVideoDetections");function Bt(e){let r=c(e)?e.quality:null;if(!c(r))return Object.freeze({usable:true,reasons:Object.freeze([])});let t=r.usable;return Object.freeze({usable:typeof t=="boolean"?t:true,reasons:Object.freeze(de(r.reasons))})}o(Bt,"parseQuality");function Vt(e){return c(e)?b(e.result_id)??b(e.request_id)??b(e.job_id):null}o(Vt,"resultIdOf");function x(){return y(m("unknown",{retryable:false}))}o(x,"abortedResult");function qt(){let e=0;return ()=>`video-analyze-${Date.now().toString(36)}-${(e++).toString(36)}-${Math.random().toString(36).slice(2,10)}`}o(qt,"defaultIdempotencyFactory");var dr=Symbol.for("@everfur/sdk#EverfurContext@v1"),ur=globalThis,cr=ur[dr]??(ur[dr]=createContext(null));cr.displayName??="EverfurContext";function W(){let e=useContext(cr);if(e===null)throw new z("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}o(W,"useEverfurContext");var $t=Object.freeze({status:"idle",job:null,result:null,error:null,isCaptureAvailable:false,progress:0}),Qt=o(()=>{},"NOOP_UNSUBSCRIBE");function pe(e){let{runtime:r,userRef:t,activePet:n,scopeEpoch:i}=W(),a=e?.petRef??n??null,[s,l]=useState(null);useEffect(()=>{let{services:v}=r.registry,k=r.registry.acquire("video",`${t??""}|${a??""}`,()=>lr({...v.errorPolicy?{errorPolicy:v.errorPolicy}:{},auth:v.authFor(t),camera:v.camera,upload:v.upload,petRef:a,telemetry:v.telemetry}),w=>w.dispose());return l(k),()=>{l(w=>w===k?null:w),r.registry.release(k);}},[r,t,a,i]);let u=useCallback(v=>s?s.subscribe(v):Qt,[s]),p=useCallback(()=>s?s.getSnapshot():$t,[s]),f=useSyncExternalStore(u,p,p),R=useCallback(v=>s?s.submit(v):Promise.resolve(pr()),[s]),h=useCallback(()=>s?s.capture():Promise.resolve(pr()),[s]),g=useCallback(()=>{s?.cancel();},[s]);return useMemo(()=>({status:f.status,job:f.job,result:f.result,error:f.error,isCaptureAvailable:f.isCaptureAvailable,progress:f.progress,isBootstrapping:s===null,submit:R,capture:h,cancel:g}),[f,s,R,h,g])}o(pe,"useEverfurVideo");function pr(){return y(m("internalError",{retryable:true}))}o(pr,"notReadyError");function me(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let r of Object.keys(e))me(e[r]);}return e}o(me,"deepFreeze");var Xt=Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),yr={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},mr={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},fr={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},Zt={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},en={regular:"400",medium:"500",bold:"700"},rn={eyebrow:1,monoWide:.9,headerBrand:-0.42,tight:-0.35},tn=0,J="System",$="monospace",nn=["content","heading","control","compact","badge"];function on(e){let r={};for(let t of nn)r[t]=e;return r}o(on,"authoredTierSizes");function br(){return {family:J,mono:$,fontUrl:null,families:{regular:J,medium:J,bold:J,mono:$,monoMedium:$,monoBold:$},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:fr,tierSizes:on(fr),lineHeight:Zt,weight:en,letterSpacing:rn,scale:1,maxScale:tn,scaleCaps:Xt}}o(br,"baseType");var gr={},fe=Object.freeze({standard:Object.freeze([.2,0,0,1]),emphasized:Object.freeze([.2,.8,.2,1]),exit:Object.freeze([.4,0,1,1])});function ye(e){return `cubic-bezier(${e.join(", ")})`}o(ye,"cssCubicBezier");var vr={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:ye(fe.standard),emphasized:ye(fe.emphasized),exit:ye(fe.exit)},reducedMotion:false},an={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)"},hr=me({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:an,space:yr,radius:mr,type:br(),motion:vr,slots:gr}),sn={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)"};me({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:sn,space:yr,radius:mr,type:br(),motion:vr,slots:gr});var Er=Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),_r=globalThis,be=_r[Er]??(_r[Er]=createContext(hr));be.displayName??="EverfurThemeContext";function S(){return useContext(be)}o(S,"useEverfurTheme");function fn(e,r){let t=e.scaleCaps[r];return t>0?t:void 0}o(fn,"tierMultiplier");function E({tier:e="content",...r}){let{type:t}=S(),n=fn(t,e);return createElement(Text,n===void 0?r:{maxFontSizeMultiplier:n,...r})}o(E,"Text");forwardRef(o(function(r,t){return createElement(TextInput,{...r,...t===null?{}:{ref:t}})},"TextInput"));var yn=Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function M(e,r){let t=e.type,n=t.families[r];return r==="mono"||t.namedFaces[r]?{fontFamily:n}:{fontFamily:n,fontWeight:t.weight[yn[r]]}}o(M,"face");var he=class he extends Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey};}static getDerivedStateFromError(){return {failed:true}}static getDerivedStateFromProps(t,n){return Object.is(t.resetKey,n.key)?null:{failed:false,key:t.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};o(he,"HostRenderBoundary");var ge=he;function bn({render:e}){return e()}o(bn,"RenderHost");function ve({render:e,fallback:r,resetKey:t}){return createElement(ge,{fallback:r,resetKey:t,children:createElement(bn,{render:e})})}o(ve,"HostRender");var gn=Object.freeze({chat:Object.freeze(["chat.message.create"]),records:Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:Object.freeze(["records.clinic.create"]),video:Object.freeze(["video.gait.execute"]),photo:Object.freeze(["photo.checkup.execute"]),animations:Object.freeze(["animations.state.read"]),televet:Object.freeze(["televet.visit.create"])});function vn(e){return gn[e]}o(vn,"requires");function Cr(e,r,t){let n=vn(e),i=new Map;for(let l of r)i.set(l.resource,l);if(t?.isPending===true&&n.some(l=>!i.has(l)))return Ee({name:e,enabled:false,isPending:true,limits:{}});let a=hn(n,i);return n.filter(l=>i.get(l)?.granted!==true).length===0?Ee({name:e,enabled:true,isPending:false,limits:a}):Ee({name:e,enabled:false,isPending:false,limits:a,disabled:En(n,i)})}o(Cr,"decideCapability");function hn(e,r){let t={};for(let n of e){let i=r.get(n)?.limits;if(i)for(let[a,s]of Object.entries(i)){let l=t[a];t[a]=l===void 0?s:Math.min(l,s);}}return t}o(hn,"mergeLimits");function En(e,r){for(let t of e){let n=r.get(t)?.disabled;if(n)return Object.freeze({reason:n.reason,level:n.level,recoverable:n.recoverable})}return Object.freeze({reason:oe("accessDenied"),level:"user_entitlement",recoverable:false})}o(En,"disabledFor");function Ee(e){let r={name:e.name,enabled:e.enabled,isPending:e.isPending,limits:Object.freeze({...e.limits})};return e.disabled!==void 0&&(r.disabled=e.disabled),Object.freeze(r)}o(Ee,"freezeDecision");function _e(e){let{runtime:r}=W(),t=r.entitlements,n=useSyncExternalStore(t.subscribe,t.getSnapshot,t.getSnapshot);return useMemo(()=>Cr(e,n.decisions,{isPending:n.isPending}),[e,n])}o(_e,"useCapability");var Sn=48;function Cn(e){return e.isPending?"pending":e.enabled?"enabled":"disabled"}o(Cn,"selectView");function wr(e){let{capability:r,children:t,renderDisabled:n,renderPending:i,style:a}=e,s=_e(r),l=useMemo(()=>Cn(s),[s]);switch(l){case "enabled":return t;case "pending":return i?jsx(ve,{render:i,fallback:jsx(kr,{capability:r,style:a})}):jsx(kr,{capability:r,style:a});case "disabled":return n?jsx(ve,{render:()=>n(s),fallback:jsx(xr,{decision:s,style:a}),resetKey:s}):jsx(xr,{decision:s,style:a});default:return H(l)}}o(wr,"CapabilityGate");function kr({capability:e,style:r}){let t=S(),n=useMemo(()=>Fr(t),[t]);return jsx(View,{style:[n.offstate,r],accessible:true,accessibilityState:{busy:true},accessibilityLabel:`Loading ${e}`,children:jsx(View,{style:n.skeletonBar})})}o(kr,"PendingSkeleton");function xr({decision:e,style:r}){let t=S(),n=useMemo(()=>Fr(t),[t]),i=e.disabled?.reason??"";return jsx(View,{style:[n.offstate,r],accessible:true,accessibilityRole:"text",accessibilityLabel:i,children:i.length>0?jsx(E,{style:n.offstateText,children:i}):null})}o(xr,"OffState");function Fr(e){let{color:r,space:t,radius:n,type:i}=e;return StyleSheet.create({offstate:{minHeight:Sn,justifyContent:"center",paddingHorizontal:t.lg,paddingVertical:t.md,backgroundColor:r.surfaceCream,borderRadius:n.md,borderWidth:StyleSheet.hairlineWidth,borderColor:r.brandBorder},offstateText:{...M(e,"regular"),fontSize:i.size.body,lineHeight:Math.round(i.size.body*i.lineHeight.normal),color:r.text.muted},skeletonBar:{height:t.md,borderRadius:n.xs,backgroundColor:r.brandSofter}})}o(Fr,"makeStyles");var L=Object.freeze({title:"For educational use only",body:"Everfur is for educational purposes only. It helps you track visible changes through AI checkups. It does not diagnose, treat, prescribe, or replace veterinary care. For urgent symptoms or emergencies, contact a veterinarian immediately."});function Pr(e){let r=S(),t=useMemo(()=>xn(r),[r]);return jsxs(View,{style:[t.container,e.style],accessible:true,accessibilityRole:"text",accessibilityLabel:`${L.title}. ${L.body}`,children:[jsx(E,{style:t.title,children:L.title}),jsx(E,{style:t.body,children:L.body})]})}o(Pr,"ClinicalDisclaimer");function xn(e){let{color:r,space:t,type:n}=e;return StyleSheet.create({container:{paddingHorizontal:t.lg,paddingVertical:t.md,borderTopWidth:StyleSheet.hairlineWidth,borderTopColor:r.borderHairlineGreen,backgroundColor:r.surfaceCream,gap:t.xs},title:{...M(e,"bold"),fontSize:n.size.caption,lineHeight:Math.round(n.size.caption*n.lineHeight.snug),color:r.text.secondary,letterSpacing:n.letterSpacing.eyebrow},body:{...M(e,"regular"),fontSize:n.size.caption,lineHeight:Math.round(n.size.caption*n.lineHeight.snug),color:r.text.muted}})}o(xn,"makeStyles");var An=300,Te=120,Ar=44,zr=40,zn=160;function jn(e){let{petRef:r,style:t}=e;return jsx(wr,{capability:"video",style:t,children:jsx(Nn,{petRef:r,style:t})})}o(jn,"EverfurVideo");function Dn(e){return e.isBootstrapping||e.status==="uploading"||e.status==="analyzing"?"loading":e.status==="error"&&e.error?"error":e.status==="complete"&&e.result?"populated":e.isCaptureAvailable?"empty":"native"}o(Dn,"selectView");function Nn({petRef:e,style:r}){let t=useMemo(()=>e!==void 0?{petRef:e}:void 0,[e]),n=pe(t),i=Dn(n),{styles:a}=I();return jsxs(View,{style:[a.container,r],children:[jsx(View,{style:a.body,children:Mn(i,n)}),jsx(Pr,{})]})}o(Nn,"VideoBody");function Mn(e,r){switch(e){case "loading":return jsx(Ln,{progress:r.progress});case "native":return jsx(Un,{});case "empty":return jsx(Bn,{onCapture:r.capture});case "error":return jsx(Vn,{error:r.error,onRetry:r.capture});case "populated":return jsx(qn,{result:r.result});default:return H(e)}}o(Mn,"renderView");function Ln({progress:e}){let{theme:r,styles:t}=I(),[n,i]=useState(false);useEffect(()=>{let s=setTimeout(()=>i(true),An);return ()=>clearTimeout(s)},[]);let a=Math.max(0,Math.min(1,e));return jsxs(View,{style:t.centered,accessible:true,accessibilityState:{busy:true},accessibilityLabel:"Analyzing video",children:[n?jsx(ActivityIndicator,{color:r.color.brandInk}):null,n&&a>0&&a<1?jsx(View,{style:t.progressTrack,accessibilityRole:"progressbar",children:jsx(View,{style:[t.progressFill,{width:`${Math.round(a*100)}%`}]})}):null]})}o(Ln,"LoadingState");function Un(){let{styles:e}=I();return jsx(View,{style:e.offstate,accessible:true,accessibilityRole:"text",accessibilityLabel:"Camera is unavailable",children:jsx(View,{style:e.emptyGlyph})})}o(Un,"NativeUnavailableState");function Bn({onCapture:e}){let{styles:r}=I();return jsx(View,{style:r.centered,accessible:true,accessibilityRole:"summary",accessibilityLabel:"Record a short clip to check gait",children:jsx(Pressable,{onPress:e,accessibilityRole:"button",accessibilityLabel:"Record video",style:r.primaryButton,children:jsx(E,{style:r.primaryLabel,children:"Record video"})})})}o(Bn,"EmptyState");function Vn({error:e,onRetry:r}){let{styles:t}=I();return jsxs(View,{style:t.centered,accessible:true,accessibilityRole:"alert",children:[jsx(E,{style:t.errorText,children:e.displayMessage}),e.retryable?jsx(Pressable,{onPress:r,accessibilityRole:"button",accessibilityLabel:"Try again",style:t.primaryButton,children:jsx(E,{style:t.primaryLabel,children:"Try again"})}):null]})}o(Vn,"ErrorState");function qn({result:e}){let{styles:r}=I();return e.quality.usable?jsxs(ScrollView,{style:r.list,contentContainerStyle:r.listContent,accessibilityLabel:"Gait analysis result",children:[e.detections.map((t,n)=>jsx(View,{style:r.resultRow,children:jsx(E,{style:r.resultLabel,children:t.label})},`${t.label}-${n}`)),e.interpretation?jsxs(View,{style:r.interpretationBlock,children:[jsx(E,{style:r.summaryText,children:e.interpretation.summary}),jsx(E,{style:r.disclaimerText,children:e.interpretation.disclaimer})]}):null]}):jsx(View,{style:r.centered,accessible:true,accessibilityRole:"summary",accessibilityLabel:"Result uncertain",children:jsx(E,{style:r.uncertainText,children:"We could not get a clear read from this clip. Try recording again."})})}o(qn,"ResultState");function I(){let e=S();return useMemo(()=>({theme:e,styles:Hn(e)}),[e])}o(I,"useVideoStyles");function Hn(e){let{color:r,space:t,radius:n,type:i}=e,a=i.weight.bold,s=i.weight.medium;return StyleSheet.create({container:{flex:1,minHeight:Te,backgroundColor:r.background},body:{flex:1},centered:{minHeight:Te,flexGrow:1,alignItems:"center",justifyContent:"center",padding:t.xl},offstate:{minHeight:Te,alignItems:"center",justifyContent:"center",padding:t.xl},emptyGlyph:{width:zr,height:zr,borderRadius:n.pill,backgroundColor:r.surfaceCream,borderWidth:StyleSheet.hairlineWidth,borderColor:r.borderHairlineGreen},primaryButton:{minHeight:Ar,minWidth:Ar,alignItems:"center",justifyContent:"center",paddingHorizontal:t.xl,paddingVertical:t.md,borderRadius:n.pill,backgroundColor:r.primary,shadowColor:r.brandSofter,shadowOffset:{width:0,height:t.xs},shadowOpacity:1,shadowRadius:t.sm,elevation:t.xs},primaryLabel:{color:r.onPrimary,fontFamily:i.family,fontSize:i.size.body,fontWeight:a,letterSpacing:i.letterSpacing.tight},errorText:{color:r.danger,fontFamily:i.family,fontSize:i.size.subtitle,lineHeight:i.size.subtitle*i.lineHeight.normal,fontWeight:s,textAlign:"center",marginBottom:t.md},uncertainText:{color:r.text.muted,fontFamily:i.family,fontSize:i.size.subtitle,lineHeight:i.size.subtitle*i.lineHeight.normal,textAlign:"center"},progressTrack:{marginTop:t.lg,height:t.sm,width:zn,borderRadius:n.pill,backgroundColor:r.skeleton,overflow:"hidden"},progressFill:{height:t.sm,borderRadius:n.pill,backgroundColor:r.brand},list:{flex:1},listContent:{padding:t.lg,gap:t.md},resultRow:{paddingVertical:t.sm,paddingHorizontal:t.md,borderRadius:n.sm,backgroundColor:r.surfaceCream,borderWidth:StyleSheet.hairlineWidth,borderColor:r.brandBorder},resultLabel:{color:r.text.primary,fontFamily:i.family,fontSize:i.size.body,lineHeight:i.size.body*i.lineHeight.normal,fontWeight:s},interpretationBlock:{marginTop:t.sm,gap:t.sm},summaryText:{color:r.text.primary,fontFamily:i.family,fontSize:i.size.subtitle,lineHeight:i.size.subtitle*i.lineHeight.normal},disclaimerText:{color:r.text.muted,fontFamily:i.family,fontSize:i.size.caption,lineHeight:i.size.caption*i.lineHeight.relaxed}})}o(Hn,"makeStyles");export{jn as EverfurVideo,pe as useEverfurVideo};
|
|
@@ -2,9 +2,9 @@ import { E as EverfurError } from './EverfurError-DmELDpXp.cjs';
|
|
|
2
2
|
import { E as EverfurResult } from './EverfurResult-ZtH-YV1h.cjs';
|
|
3
3
|
import { R as RecordsRequestId, P as PetRef } from './ids-B2GAAifq.cjs';
|
|
4
4
|
import { F as FileHandle, U as UploadTransport } from './ports-BN6RHF9W.cjs';
|
|
5
|
+
import { am as RecordsFeatures, an as RecordsUploadContentType, L as RecordMarkersView, M as RecordPdfLink, P as RecordShareAudienceScope, O as RecordShareAudience, T as RecordShareLink, Q as RecordShareEmailInput, S as RecordShareEmailReceipt, X as RecordsClinicBatchClient } from './depth-EXZYEO70.cjs';
|
|
5
6
|
import { C as CreateUploadRequestInput, d as RecordsRequestView, U as UploadedDocument, g as RecordsView, h as ConsentState, G as GrantConsentInput, i as RecordsDenialReason, a as RecordEntity } from './models-Bn2z0NNo.cjs';
|
|
6
|
-
import {
|
|
7
|
-
import { c as RecordsDepthStatus, i as RecordsClinicController } from './useRecordsDepth-CNEHZJtj.cjs';
|
|
7
|
+
import { c as RecordsDepthStatus, i as RecordsClinicController } from './useRecordsDepth-CARTuHKh.cjs';
|
|
8
8
|
|
|
9
9
|
interface UploadDocumentInput {
|
|
10
10
|
readonly requestId: RecordsRequestId;
|
|
@@ -33,6 +33,16 @@ interface RecordsController {
|
|
|
33
33
|
peekCachedRecord(pet: PetRef): RecordsView | null;
|
|
34
34
|
/** Emit `records.capability.denied` (the rn CapabilityGate disabled surface calls this once, R12). */
|
|
35
35
|
reportCapabilityDenied(pet: PetRef | null): void;
|
|
36
|
+
/**
|
|
37
|
+
* `GET /widget/v1/records/features`: which records features are live, and the upload types while photo
|
|
38
|
+
* upload is armed. NEVER rejects: a failed or malformed read is `RECORDS_FEATURES_PDF_ONLY`. The answer is
|
|
39
|
+
* also what `uploadDocument`'s client-side gate accepts from then on, so a photo is refused before initiate
|
|
40
|
+
* until a read has armed it (and again after a read that comes back dark).
|
|
41
|
+
*
|
|
42
|
+
* OPTIONAL so a host's own controller still satisfies this interface; a surface given one without it offers
|
|
43
|
+
* PDF upload only, exactly as before the read existed.
|
|
44
|
+
*/
|
|
45
|
+
readFeatures?(): Promise<RecordsFeatures>;
|
|
36
46
|
}
|
|
37
47
|
|
|
38
48
|
type RecordsStatus = 'loading' | 'empty' | 'error' | 'populated';
|
|
@@ -66,6 +76,12 @@ interface UseEverfurRecordsState {
|
|
|
66
76
|
readonly uploadProgress: number | null;
|
|
67
77
|
/** The files of the last pick, one row each, with per-file status and progress. Empty until a pick. */
|
|
68
78
|
readonly uploadQueue: readonly UploadQueueItem[];
|
|
79
|
+
/**
|
|
80
|
+
* What an upload may be: `['application/pdf']`, plus the photo types while the records features read says
|
|
81
|
+
* photo upload is live. Read only for a hook opened with `readUploadFeatures: true`; PDF only otherwise, until
|
|
82
|
+
* the read lands, and whenever it fails. `acceptsPhotos(uploadContentTypes)` is the "photos live" test.
|
|
83
|
+
*/
|
|
84
|
+
readonly uploadContentTypes: readonly RecordsUploadContentType[];
|
|
69
85
|
/** Create a self-upload request the user attaches documents to. */
|
|
70
86
|
createRequest(idempotencyKey: string): Promise<EverfurResult<RecordsRequestView>>;
|
|
71
87
|
/** Two-phase presigned upload of one document to the active request. */
|
|
@@ -95,6 +111,12 @@ declare function useEverfurRecords(opts: {
|
|
|
95
111
|
* at upload time, so a transport created inline on each render does not rebuild the controller.
|
|
96
112
|
*/
|
|
97
113
|
readonly uploadTransport?: UploadTransport;
|
|
114
|
+
/**
|
|
115
|
+
* Read `GET /widget/v1/records/features` on mount, so `uploadContentTypes` (and the upload gate) carry the
|
|
116
|
+
* photo types while photo upload is live. Set by the surfaces that offer an upload; a surface that offers
|
|
117
|
+
* none leaves it off and issues no read.
|
|
118
|
+
*/
|
|
119
|
+
readonly readUploadFeatures?: boolean;
|
|
98
120
|
}): UseEverfurRecordsState;
|
|
99
121
|
|
|
100
122
|
interface UseRecordsMarkersState {
|
|
@@ -140,8 +162,26 @@ interface UseRecordSharesState {
|
|
|
140
162
|
readonly creating: boolean;
|
|
141
163
|
readonly revokingId: string | null;
|
|
142
164
|
readonly preparingPdf: boolean;
|
|
143
|
-
/**
|
|
144
|
-
|
|
165
|
+
/**
|
|
166
|
+
* The audiences the server offers, in its order, each with the scope its link carries: served ONLY while
|
|
167
|
+
* EFBackend's `partner.records_share_audience_enabled` is on, and empty otherwise (and until the features read
|
|
168
|
+
* lands, and when it fails). Empty means every recipient gets the same record.
|
|
169
|
+
*/
|
|
170
|
+
readonly shareAudiences: readonly RecordShareAudienceScope[];
|
|
171
|
+
/** The records features map from the same read (wire names to on/off); empty until it lands or when it fails. */
|
|
172
|
+
readonly features: Readonly<Record<string, boolean>>;
|
|
173
|
+
/** True while an email send is in flight. */
|
|
174
|
+
readonly sending: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Mint a link; on success the list is re-read and the URL is remembered for its row. `audience` is sent only
|
|
177
|
+
* while `shareAudiences` serves it; otherwise the link is minted without one.
|
|
178
|
+
*/
|
|
179
|
+
createLink(audience?: RecordShareAudience): Promise<EverfurResult<RecordShareLink>>;
|
|
180
|
+
/**
|
|
181
|
+
* Mint a link and email it to the recipient. The link is never returned; on success (and on a mail failure,
|
|
182
|
+
* which the server answers after the mint) the list is re-read so the new row is there to turn off.
|
|
183
|
+
*/
|
|
184
|
+
sendEmail(input: RecordShareEmailInput): Promise<EverfurResult<RecordShareEmailReceipt>>;
|
|
145
185
|
revoke(shareId: string): Promise<EverfurResult<void>>;
|
|
146
186
|
/** The presigned PDF link the host opens itself. */
|
|
147
187
|
pdfLink(): Promise<EverfurResult<RecordPdfLink>>;
|
|
@@ -280,7 +320,9 @@ declare const REQUEST_TIMELINE_TITLES: Readonly<Record<RequestTimelineEventKey,
|
|
|
280
320
|
* Build the ordered step-wise timeline for a request. Pure + deterministic: states derive from the status,
|
|
281
321
|
* timestamps from the request's own fields. The terminal event (if any) is always last and carries state `failed`.
|
|
282
322
|
*/
|
|
283
|
-
declare function buildRequestTimeline(request: RecordsRequestView
|
|
323
|
+
declare function buildRequestTimeline(request: RecordsRequestView, options?: {
|
|
324
|
+
readonly petName?: string | null;
|
|
325
|
+
}): readonly RequestTimelineEvent[];
|
|
284
326
|
|
|
285
327
|
/**
|
|
286
328
|
* The card title: the clinic the request went to, else the consumer's own fallback by source
|
|
@@ -2,9 +2,9 @@ import { E as EverfurError } from './EverfurError-DmELDpXp.js';
|
|
|
2
2
|
import { E as EverfurResult } from './EverfurResult-SGvHKsCB.js';
|
|
3
3
|
import { R as RecordsRequestId, P as PetRef } from './ids-B2GAAifq.js';
|
|
4
4
|
import { F as FileHandle, U as UploadTransport } from './ports-BN6RHF9W.js';
|
|
5
|
+
import { am as RecordsFeatures, an as RecordsUploadContentType, L as RecordMarkersView, M as RecordPdfLink, P as RecordShareAudienceScope, O as RecordShareAudience, T as RecordShareLink, Q as RecordShareEmailInput, S as RecordShareEmailReceipt, X as RecordsClinicBatchClient } from './depth-Bo4bAwcn.js';
|
|
5
6
|
import { C as CreateUploadRequestInput, d as RecordsRequestView, U as UploadedDocument, g as RecordsView, h as ConsentState, G as GrantConsentInput, i as RecordsDenialReason, a as RecordEntity } from './models-DSqA5Ahs.js';
|
|
6
|
-
import {
|
|
7
|
-
import { c as RecordsDepthStatus, i as RecordsClinicController } from './useRecordsDepth-CuNdne6E.js';
|
|
7
|
+
import { c as RecordsDepthStatus, i as RecordsClinicController } from './useRecordsDepth-fPSv-GXU.js';
|
|
8
8
|
|
|
9
9
|
interface UploadDocumentInput {
|
|
10
10
|
readonly requestId: RecordsRequestId;
|
|
@@ -33,6 +33,16 @@ interface RecordsController {
|
|
|
33
33
|
peekCachedRecord(pet: PetRef): RecordsView | null;
|
|
34
34
|
/** Emit `records.capability.denied` (the rn CapabilityGate disabled surface calls this once, R12). */
|
|
35
35
|
reportCapabilityDenied(pet: PetRef | null): void;
|
|
36
|
+
/**
|
|
37
|
+
* `GET /widget/v1/records/features`: which records features are live, and the upload types while photo
|
|
38
|
+
* upload is armed. NEVER rejects: a failed or malformed read is `RECORDS_FEATURES_PDF_ONLY`. The answer is
|
|
39
|
+
* also what `uploadDocument`'s client-side gate accepts from then on, so a photo is refused before initiate
|
|
40
|
+
* until a read has armed it (and again after a read that comes back dark).
|
|
41
|
+
*
|
|
42
|
+
* OPTIONAL so a host's own controller still satisfies this interface; a surface given one without it offers
|
|
43
|
+
* PDF upload only, exactly as before the read existed.
|
|
44
|
+
*/
|
|
45
|
+
readFeatures?(): Promise<RecordsFeatures>;
|
|
36
46
|
}
|
|
37
47
|
|
|
38
48
|
type RecordsStatus = 'loading' | 'empty' | 'error' | 'populated';
|
|
@@ -66,6 +76,12 @@ interface UseEverfurRecordsState {
|
|
|
66
76
|
readonly uploadProgress: number | null;
|
|
67
77
|
/** The files of the last pick, one row each, with per-file status and progress. Empty until a pick. */
|
|
68
78
|
readonly uploadQueue: readonly UploadQueueItem[];
|
|
79
|
+
/**
|
|
80
|
+
* What an upload may be: `['application/pdf']`, plus the photo types while the records features read says
|
|
81
|
+
* photo upload is live. Read only for a hook opened with `readUploadFeatures: true`; PDF only otherwise, until
|
|
82
|
+
* the read lands, and whenever it fails. `acceptsPhotos(uploadContentTypes)` is the "photos live" test.
|
|
83
|
+
*/
|
|
84
|
+
readonly uploadContentTypes: readonly RecordsUploadContentType[];
|
|
69
85
|
/** Create a self-upload request the user attaches documents to. */
|
|
70
86
|
createRequest(idempotencyKey: string): Promise<EverfurResult<RecordsRequestView>>;
|
|
71
87
|
/** Two-phase presigned upload of one document to the active request. */
|
|
@@ -95,6 +111,12 @@ declare function useEverfurRecords(opts: {
|
|
|
95
111
|
* at upload time, so a transport created inline on each render does not rebuild the controller.
|
|
96
112
|
*/
|
|
97
113
|
readonly uploadTransport?: UploadTransport;
|
|
114
|
+
/**
|
|
115
|
+
* Read `GET /widget/v1/records/features` on mount, so `uploadContentTypes` (and the upload gate) carry the
|
|
116
|
+
* photo types while photo upload is live. Set by the surfaces that offer an upload; a surface that offers
|
|
117
|
+
* none leaves it off and issues no read.
|
|
118
|
+
*/
|
|
119
|
+
readonly readUploadFeatures?: boolean;
|
|
98
120
|
}): UseEverfurRecordsState;
|
|
99
121
|
|
|
100
122
|
interface UseRecordsMarkersState {
|
|
@@ -140,8 +162,26 @@ interface UseRecordSharesState {
|
|
|
140
162
|
readonly creating: boolean;
|
|
141
163
|
readonly revokingId: string | null;
|
|
142
164
|
readonly preparingPdf: boolean;
|
|
143
|
-
/**
|
|
144
|
-
|
|
165
|
+
/**
|
|
166
|
+
* The audiences the server offers, in its order, each with the scope its link carries: served ONLY while
|
|
167
|
+
* EFBackend's `partner.records_share_audience_enabled` is on, and empty otherwise (and until the features read
|
|
168
|
+
* lands, and when it fails). Empty means every recipient gets the same record.
|
|
169
|
+
*/
|
|
170
|
+
readonly shareAudiences: readonly RecordShareAudienceScope[];
|
|
171
|
+
/** The records features map from the same read (wire names to on/off); empty until it lands or when it fails. */
|
|
172
|
+
readonly features: Readonly<Record<string, boolean>>;
|
|
173
|
+
/** True while an email send is in flight. */
|
|
174
|
+
readonly sending: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Mint a link; on success the list is re-read and the URL is remembered for its row. `audience` is sent only
|
|
177
|
+
* while `shareAudiences` serves it; otherwise the link is minted without one.
|
|
178
|
+
*/
|
|
179
|
+
createLink(audience?: RecordShareAudience): Promise<EverfurResult<RecordShareLink>>;
|
|
180
|
+
/**
|
|
181
|
+
* Mint a link and email it to the recipient. The link is never returned; on success (and on a mail failure,
|
|
182
|
+
* which the server answers after the mint) the list is re-read so the new row is there to turn off.
|
|
183
|
+
*/
|
|
184
|
+
sendEmail(input: RecordShareEmailInput): Promise<EverfurResult<RecordShareEmailReceipt>>;
|
|
145
185
|
revoke(shareId: string): Promise<EverfurResult<void>>;
|
|
146
186
|
/** The presigned PDF link the host opens itself. */
|
|
147
187
|
pdfLink(): Promise<EverfurResult<RecordPdfLink>>;
|
|
@@ -280,7 +320,9 @@ declare const REQUEST_TIMELINE_TITLES: Readonly<Record<RequestTimelineEventKey,
|
|
|
280
320
|
* Build the ordered step-wise timeline for a request. Pure + deterministic: states derive from the status,
|
|
281
321
|
* timestamps from the request's own fields. The terminal event (if any) is always last and carries state `failed`.
|
|
282
322
|
*/
|
|
283
|
-
declare function buildRequestTimeline(request: RecordsRequestView
|
|
323
|
+
declare function buildRequestTimeline(request: RecordsRequestView, options?: {
|
|
324
|
+
readonly petName?: string | null;
|
|
325
|
+
}): readonly RequestTimelineEvent[];
|
|
284
326
|
|
|
285
327
|
/**
|
|
286
328
|
* The card title: the clinic the request went to, else the consumer's own fallback by source
|