@everfur/sdk 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +220 -0
- package/README.md +9 -8
- package/dist/{Chat-BZZ-Py5l.d.ts → Chat-Rzplrf5M.d.ts} +17 -3
- package/dist/{Chat-Dq4fffIO.d.cts → Chat-ypo6miKm.d.cts} +17 -3
- package/dist/{DepthViews-BG3E25MD.d.ts → DepthViews-CeTfPUBX.d.ts} +1 -1
- package/dist/{DepthViews-B_hIypI6.d.cts → DepthViews-ClykXOJj.d.cts} +1 -1
- package/dist/{DepthViews-CL75jyRA.d.cts → DepthViews-Cui3oonj.d.cts} +1 -1
- package/dist/{DepthViews-CkYri51q.d.ts → DepthViews-baYLMNQ-.d.ts} +1 -1
- package/dist/{ErrorPolicyPort-CwbfmxzJ.d.ts → ErrorPolicyPort-D22LUVrK.d.ts} +1 -1
- package/dist/{ErrorPolicyPort-CNf4uQZP.d.cts → ErrorPolicyPort-D6CybiqJ.d.cts} +1 -1
- package/dist/{EverfurResult-DN9pL2Ab.d.cts → EverfurError-DmELDpXp.d.cts} +1 -67
- package/dist/{EverfurResult-DN9pL2Ab.d.ts → EverfurError-DmELDpXp.d.ts} +1 -67
- package/dist/EverfurResult-SGvHKsCB.d.ts +69 -0
- package/dist/EverfurResult-ZtH-YV1h.d.cts +69 -0
- package/dist/animations/index.cjs +1 -1
- package/dist/animations/index.d.cts +6 -5
- package/dist/animations/index.d.ts +6 -5
- package/dist/animations/index.js +1 -1
- package/dist/{attachments-D_SECjr1.d.cts → attachments-CwsR-bPN.d.cts} +7 -6
- package/dist/{attachments-BrUWQYNK.d.ts → attachments-CzZ7in24.d.ts} +7 -6
- package/dist/{attachments-DpldrvIW.d.ts → attachments-D3HCBmOE.d.ts} +3 -3
- package/dist/{attachments-BorG422I.d.cts → attachments-Nk73Lll8.d.cts} +3 -3
- package/dist/{bookingCopy-SREvkG19.d.cts → bookingCopy-Dv8rKqyV.d.cts} +417 -14
- package/dist/{bookingCopy-CqtDYvCR.d.ts → bookingCopy-SDkXaxDf.d.ts} +417 -14
- package/dist/branding-Xb_wL8N1.d.cts +212 -0
- package/dist/branding-xpQ056sM.d.ts +212 -0
- package/dist/callCopy-rDH9JTFo.d.cts +45 -0
- package/dist/callCopy-rDH9JTFo.d.ts +45 -0
- package/dist/callRoom-7wrE3RP2.d.ts +62 -0
- package/dist/callRoom-B_EqaUzx.d.cts +62 -0
- package/dist/{casesRepository-v6QczS9N.d.ts → casesRepository-BTAecTnF.d.ts} +14 -2
- package/dist/{casesRepository-DwtZVsbj.d.cts → casesRepository-aryld7fJ.d.cts} +14 -2
- package/dist/chat/index.cjs +1 -1
- package/dist/chat/index.d.cts +12 -11
- package/dist/chat/index.d.ts +12 -11
- package/dist/chat/index.js +1 -1
- package/dist/client/index.cjs +5 -5
- package/dist/client/index.d.cts +14 -12
- package/dist/client/index.d.ts +14 -12
- package/dist/client/index.js +5 -5
- package/dist/{config-C7eb_IMD.d.ts → config-6qS7Sohy.d.cts} +3 -2
- package/dist/{config--Wu1Umhd.d.cts → config-X6BtwDwQ.d.ts} +3 -2
- package/dist/consent/index.cjs +1 -1
- package/dist/consent/index.d.cts +9 -8
- package/dist/consent/index.d.ts +9 -8
- package/dist/consent/index.js +1 -1
- package/dist/{context-CahAEha8.d.ts → context-7f3Nb_xE.d.ts} +9 -8
- package/dist/{context-CL3lyuy1.d.cts → context-CkqPM4Ml.d.cts} +9 -8
- package/dist/{copy-UeUJVk8X.d.cts → copy-Bd__Pw5s.d.cts} +5 -4
- package/dist/{copy-DdVFDL01.d.ts → copy-NgKgOOET.d.ts} +5 -4
- package/dist/core/index.cjs +9 -9
- package/dist/core/index.d.cts +19 -17
- package/dist/core/index.d.ts +19 -17
- package/dist/core/index.js +9 -9
- package/dist/{depth-DvPwPuT_.d.ts → depth-CYPH92jE.d.ts} +6 -5
- package/dist/{depth-D5HwcvKC.d.cts → depth-CyjaJJ6V.d.cts} +6 -5
- package/dist/{entitlementRepository-B7egEdW6.d.ts → entitlementRepository-DdeFuEKp.d.ts} +4 -4
- package/dist/{entitlementRepository-BpJ7tiwl.d.cts → entitlementRepository-Dl1qRLcJ.d.cts} +4 -4
- package/dist/{identity-C2-08BZW.d.cts → identity-DjqhDm5Z.d.cts} +2 -2
- package/dist/{identity-CEi9GRFZ.d.ts → identity-Dy_L7Yq4.d.ts} +2 -2
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +19 -17
- package/dist/index.d.ts +19 -17
- package/dist/index.js +6 -6
- package/dist/{models-D2EUxPZY.d.cts → models-Bn2z0NNo.d.cts} +1 -1
- package/dist/{models-B-Uh2LTf.d.ts → models-DSqA5Ahs.d.ts} +1 -1
- package/dist/notifications/index.cjs +2 -2
- package/dist/notifications/index.d.cts +5 -4
- package/dist/notifications/index.d.ts +5 -4
- package/dist/notifications/index.js +2 -2
- package/dist/{pets-JVCXgRgR.d.cts → pets-BSG2qbr_.d.cts} +2 -2
- package/dist/{pets-DJv2sj2H.d.ts → pets-D7cZutrX.d.ts} +2 -2
- package/dist/{petsRepository-B_gKbAzJ.d.cts → petsRepository-D1bnxDZg.d.cts} +2 -2
- package/dist/{petsRepository-Bk6GDwLs.d.ts → petsRepository-DhsX3GLw.d.ts} +2 -2
- package/dist/photo/index.cjs +1 -1
- package/dist/photo/index.d.cts +3 -2
- package/dist/photo/index.d.ts +3 -2
- package/dist/photo/index.js +1 -1
- package/dist/{ports-D7YW8qz9.d.ts → ports-C0m1G1fS.d.ts} +13 -6
- package/dist/{ports-BY2ph0_y.d.cts → ports-DNXyyzZF.d.cts} +13 -6
- package/dist/records/depth/index.cjs +2 -2
- package/dist/records/depth/index.d.cts +11 -10
- package/dist/records/depth/index.d.ts +11 -10
- package/dist/records/depth/index.js +2 -2
- package/dist/records/index.cjs +3 -3
- package/dist/records/index.d.cts +25 -14
- package/dist/records/index.d.ts +25 -14
- package/dist/records/index.js +3 -3
- package/dist/{requestFunnel-BjDpqqvm.d.cts → requestFunnel-Bqc1inM9.d.cts} +5 -4
- package/dist/{requestFunnel-DFMGcluw.d.ts → requestFunnel-FvE5yLDD.d.ts} +5 -4
- package/dist/{runtimeTypes-w5KqBMcs.d.ts → runtimeTypes-C0yPBz89.d.ts} +7 -7
- package/dist/{runtimeTypes-gZEJu-da.d.cts → runtimeTypes-RN-VXTFV.d.cts} +7 -7
- package/dist/server/events/index.cjs +1 -1
- package/dist/server/events/index.d.cts +4 -3
- package/dist/server/events/index.d.ts +4 -3
- package/dist/server/events/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +5 -4
- package/dist/server/index.d.ts +5 -4
- package/dist/server/index.js +1 -1
- package/dist/televet/booking/index.cjs +1 -1
- package/dist/televet/booking/index.d.cts +310 -32
- package/dist/televet/booking/index.d.ts +310 -32
- package/dist/televet/booking/index.js +1 -1
- package/dist/televet/call/index.cjs +1 -1
- package/dist/televet/call/index.d.cts +25 -5
- package/dist/televet/call/index.d.ts +25 -5
- package/dist/televet/call/index.js +1 -1
- package/dist/televet/index.cjs +1 -1
- package/dist/televet/index.d.cts +41 -71
- package/dist/televet/index.d.ts +41 -71
- package/dist/televet/index.js +1 -1
- package/dist/televetGlobal-CEk0_cW9.d.cts +34 -0
- package/dist/televetGlobal-Cs9Wbqsy.d.ts +34 -0
- package/dist/testing/index.cjs +3 -3
- package/dist/testing/index.d.cts +3 -2
- package/dist/testing/index.d.ts +3 -2
- package/dist/testing/index.js +3 -3
- package/dist/testing/rn/index.cjs +1 -1
- package/dist/testing/rn/index.d.cts +13 -11
- package/dist/testing/rn/index.d.ts +13 -11
- package/dist/testing/rn/index.js +1 -1
- package/dist/testing/web/index.cjs +1 -1
- package/dist/testing/web/index.d.cts +14 -13
- package/dist/testing/web/index.d.ts +14 -13
- package/dist/testing/web/index.js +1 -1
- package/dist/{timelineRows-C15jxFFH.d.ts → timelineRows-D4U6A8zE.d.ts} +1 -1
- package/dist/{timelineRows-odO8g9r2.d.cts → timelineRows-DAB5dpjF.d.cts} +1 -1
- package/dist/{branding-CsRdeNwK.d.cts → tokens-CIngRkvt.d.cts} +7 -211
- package/dist/{branding-CsRdeNwK.d.ts → tokens-CIngRkvt.d.ts} +7 -211
- package/dist/{typeStyle-DmoyacDG.d.ts → typeStyle-DHJzDaUo.d.cts} +2 -1
- package/dist/{typeStyle-CKqVYD6L.d.cts → typeStyle-YPS_MXeI.d.ts} +2 -1
- package/dist/{useRecordsDepth-crhBllQK.d.ts → useRecordsDepth--ObtMyjH.d.ts} +24 -5
- package/dist/{useRecordsDepth-C6rjEaLn.d.cts → useRecordsDepth-B35y8bV-.d.cts} +24 -5
- package/dist/{useVetVisit-CjmMa896.d.ts → useVetVisit-BsjoDO-n.d.ts} +21 -6
- package/dist/{useVetVisit-Bc84hWUU.d.cts → useVetVisit-Ds8f1peV.d.cts} +21 -6
- package/dist/video/index.cjs +1 -1
- package/dist/video/index.d.cts +3 -2
- package/dist/video/index.d.ts +3 -2
- package/dist/video/index.js +1 -1
- package/dist/{view-DyitEO0m.d.cts → view-B-Toym_j.d.cts} +5 -4
- package/dist/{view-Bxwxp4xD.d.ts → view-D9JqNQai.d.ts} +5 -4
- package/dist/web/consent/index.cjs +1 -1
- package/dist/web/consent/index.d.cts +9 -8
- package/dist/web/consent/index.d.ts +9 -8
- package/dist/web/consent/index.js +1 -1
- package/dist/web/index.cjs +10 -10
- package/dist/web/index.d.cts +42 -19
- package/dist/web/index.d.ts +42 -19
- package/dist/web/index.js +10 -10
- package/dist/web/notifications/index.cjs +2 -2
- package/dist/web/notifications/index.d.cts +7 -6
- package/dist/web/notifications/index.d.ts +7 -6
- package/dist/web/notifications/index.js +2 -2
- package/dist/web/records/depth/index.cjs +2 -2
- package/dist/web/records/depth/index.d.cts +11 -10
- package/dist/web/records/depth/index.d.ts +11 -10
- package/dist/web/records/depth/index.js +2 -2
- package/dist/web/records/index.cjs +3 -3
- package/dist/web/records/index.d.cts +53 -35
- package/dist/web/records/index.d.ts +53 -35
- package/dist/web/records/index.js +3 -3
- package/dist/web/televet/booking/index.cjs +2 -1
- package/dist/web/televet/booking/index.d.cts +458 -33
- package/dist/web/televet/booking/index.d.ts +458 -33
- package/dist/web/televet/booking/index.js +2 -1
- package/dist/web/televet/call/index.cjs +1 -1
- package/dist/web/televet/call/index.d.cts +3 -1
- package/dist/web/televet/call/index.d.ts +3 -1
- package/dist/web/televet/call/index.js +1 -1
- package/dist/web/televet/index.cjs +1 -1
- package/dist/web/televet/index.d.cts +40 -74
- package/dist/web/televet/index.d.ts +40 -74
- package/dist/web/televet/index.js +1 -1
- package/package.json +3 -2
- package/dist/callCopy-DoQKG3-L.d.cts +0 -40
- package/dist/callCopy-DoQKG3-L.d.ts +0 -40
package/dist/testing/rn/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {createContext,forwardRef,useMemo,useRef,useEffect,createElement,useState,useContext}from'react';import {View,Animated,StyleSheet,TextInput,Easing,Text}from'react-native';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {z as z$1}from'zod';var it=Object.defineProperty;var o=(e,t)=>it(e,"name",{value:t,configurable:true});var ie=Object.freeze({placeholder:"Message",send:"Send",stop:"Stop",retry:"Try again",followUps:"Follow up questions",poweredBy:"powered by everfur",senderUser:"You",senderAssistant:"Assistant",typing:"Assistant is typing",loading:"Loading",empty:"No messages yet",transcript:"Conversation",emptyTitle:"What can we help {petName} with today?",emptyTitlePetFallback:"your pet",copied:"Copied",copyUserMessage:"Copy your message",copyAssistantMessage:"Copy assistant message",feedbackHelpful:"Helpful",feedbackNeutral:"Neutral",feedbackNotHelpful:"Not helpful",feedbackTitle:"What went wrong?",feedbackSubtitle:"Your feedback helps make answers more reliable.",feedbackReasonInaccurate:"Inaccurate",feedbackReasonOutdated:"Out of date",feedbackReasonUnsafe:"Unsafe advice",feedbackReasonUnclear:"Confusing or unclear",feedbackReasonOther:"Something else",feedbackNotesPlaceholder:"Add details (optional)",feedbackSubmit:"Submit feedback",feedbackSkip:"Skip",feedbackSkipA11y:"Skip feedback",feedbackThanks:"Thanks for the feedback",feedbackFailed:"Couldn't send feedback. Please try again.",turnFailedTitle:"Message failed",turnRetry:"Retry",turnUnreachableTitle:"Couldn't reach this chat",turnStartNewChat:"Start a new chat",reconnecting:"Reconnecting\u2026",turnStoppedTitle:"Response stopped",turnStoppedBody:"You stopped this response before it finished. Tap retry to try again.",sourceSingular:"source",sourcePlural:"sources",showSources:"Show",hideSources:"Hide",openSource:"Open source",urgencyGeneralReason:"Just general info about {petName}. Nothing here needs action right now.",findVet:"Find a vet",findVetA11y:"Find a vet near you",showLatestVetAlert:"Show latest vet alert",dismissBanner:"Dismiss {label} banner",openMenu:"Open menu",openMenuUnread:"Open menu, unread chats",yourPets:"Your Pets",yourPet:"Your pet",switchActivePet:"Switch active pet, {name}",petCurrentlyActive:"{name}, currently active",switchToPet:"Switch to {name}",activePrefix:"Active \xB7 ",close:"Close",addAnotherPet:"Add another pet",addPet:"Add a pet",attachmentPhoto:"Photo",attachmentCamera:"Camera",closeAttachmentPicker:"Close attachment picker",addAttachment:"Add attachment, {used} of {total} used",attachmentsFull:"Attachments full, {used} of {total} used",retryUpload:"Retry uploading {filename}",removeAttachment:"Remove {filename}",previewAttachment:"Preview {filename}",closePreview:"Close preview",attachedImage:"Attached image: {filename}, opens a full-screen preview",attachmentTooLarge:"Files must be under {max}. {filename} is {size}.",attachmentTooMany:"You can attach up to {max} files per message.",attachmentUnsupported:"{filename} isn't a supported file type yet.",attachmentNetwork:"Couldn't reach the server. Check your connection and try again.",attachmentServer:"Upload failed{status}. Please try again.",attachmentCancelled:"Upload cancelled.",attachmentRateLimited:"Slow down. Please wait a moment and try again.",attachmentQuota:"Daily image limit reached. Try again tomorrow.",attachmentConflict:"Something went wrong. Tap to retry.",attachmentUnknown:"Something went wrong. Please try again.",attachmentsFailedBlocked:"Some attachments failed to upload. Remove or retry them before sending.",dictate:"Dictate a message",stopDictation:"Stop dictation",listening:"Listening",micBlocked:"Microphone access is blocked. Allow it in your browser settings to dictate.",noSpeech:"We didn't catch that. Tap the mic and try again.",dictationUnavailable:"Voice typing isn't available right now."});function G(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.keys(e))G(e[t]);}return e}o(G,"deepFreeze");var st=Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),le={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},ue={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},se={nano:8,small:9,micro:10,tiny:11,caption:12,bodyTight:13,body:14,subtitle:16,heading:18,verdict:24},lt={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},ut={regular:"400",medium:"500",bold:"700"},dt={eyebrow:1,monoWide:.9,headerBrand:-0.42,tight:-0.35},ct=0,k="System",F="monospace",pt=["content","heading","control","compact","badge"];function ft(e){let t={};for(let r of pt)t[r]=e;return t}o(ft,"authoredTierSizes");function de(){return {family:k,mono:F,fontUrl:null,families:{regular:k,medium:k,bold:k,mono:F,monoMedium:F,monoBold:F},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:se,tierSizes:ft(se),lineHeight:lt,weight:ut,letterSpacing:dt,scale:1,maxScale:ct,scaleCaps:st}}o(de,"baseType");var ce={},Y=Object.freeze({standard:Object.freeze([.2,0,0,1]),emphasized:Object.freeze([.2,.8,.2,1]),exit:Object.freeze([.4,0,1,1])});function W(e){return `cubic-bezier(${e.join(", ")})`}o(W,"cssCubicBezier");var pe={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:W(Y.standard),emphasized:W(Y.emphasized),exit:W(Y.exit)},reducedMotion:false},mt={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",errorRed:"#FF1B00",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",skeleton:"#EFE9E3",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)"},fe=G({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:mt,space:le,radius:ue,type:de(),motion:pe,slots:ce}),yt={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",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",skeleton:"#23272C",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)"};G({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:yt,space:le,radius:ue,type:de(),motion:pe,slots:ce});var me=Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),ye=globalThis,K=ye[me]??(ye[me]=createContext(fe));K.displayName??="EverfurThemeContext";function g(){return useContext(K)}o(g,"useEverfurTheme");var ve=6,_e=520,Rt=Math.round(_e*.18),he=.44,St=.5,Ee=[0,.5,1],wt=[0,1,2];function Ct(){let e=g(),t=useMemo(()=>xt(e),[e]),r=!e.motion.reducedMotion;return jsx(View,{style:t.card,accessible:true,accessibilityRole:"text",accessibilityLabel:ie.typing,accessibilityLiveRegion:"polite",accessibilityState:{busy:true},children:wt.map(n=>r?jsx(Tt,{index:n,style:t.dot},n):jsx(View,{style:[t.dot,t.dotStatic]},n))})}o(Ct,"TypingIndicator");function Tt({index:e,style:t}){let r=useRef(new Animated.Value(0)).current;useEffect(()=>{let s=Animated.sequence([Animated.delay(e*Rt),Animated.loop(Animated.timing(r,{toValue:1,duration:_e,useNativeDriver:true}))]);return s.start(),()=>s.stop()},[r,e]);let n=r.interpolate({inputRange:Ee,outputRange:[he,1,he]}),i=r.interpolate({inputRange:Ee,outputRange:[0,-3.5,0]});return jsx(Animated.View,{style:[t,{opacity:n,transform:[{translateY:i}]}]})}o(Tt,"AnimatedDot");function xt(e){let t=e.color,r=e.space,n=e.radius;return StyleSheet.create({card:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:r.xs,paddingHorizontal:r.md,paddingVertical:r.sm,backgroundColor:t.surfaceCream,borderRadius:n.md,borderWidth:StyleSheet.hairlineWidth,borderColor:t.brandBorder},dot:{width:ve,height:ve,borderRadius:n.pill,backgroundColor:t.brand},dotStatic:{opacity:St}})}o(xt,"makeStyles");function At(e,t){let r=e.scaleCaps[t];return r>0?r:void 0}o(At,"tierMultiplier");function A({tier:e="content",...t}){let{type:r}=g(),n=At(r,e);return createElement(Text,n===void 0?t:{maxFontSizeMultiplier:n,...t})}o(A,"Text");forwardRef(o(function(t,r){return createElement(TextInput,{...t,...r===null?{}:{ref:r}})},"TextInput"));var Lt=1400,Nt=300;function Ut(){let e=g(),t=useMemo(()=>Vt(e),[e]),r=e.motion.reducedMotion,[n,i]=useState(false);useEffect(()=>{let d=setTimeout(()=>i(true),Nt);return ()=>clearTimeout(d)},[]);let s=useRef(new Animated.Value(0)).current;useEffect(()=>{if(r||!n)return;let d=Animated.loop(Animated.timing(s,{toValue:1,duration:Lt,easing:Easing.linear,useNativeDriver:true}));return d.start(),()=>d.stop()},[r,n,s]);let l=r?null:{transform:[{rotate:s.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]})}]};return jsx(View,{style:t.wrap,accessible:true,accessibilityState:{busy:true},accessibilityLabel:"Analyzing photo",children:n?jsxs(Fragment,{children:[jsx(Animated.View,{style:[t.ring,l]}),jsx(A,{style:t.statusLine,children:"Analyzing"})]}):null})}o(Ut,"AnalyzingIndicator");function Vt(e){let{color:t,space:r,radius:n,type:i}=e,s=i.weight.medium,l=r.xxl*2,d=r.xs;return StyleSheet.create({wrap:{flexGrow:1,alignItems:"center",justifyContent:"center",padding:r.xl,gap:r.md},ring:{width:l,height:l,borderRadius:n.pill,borderWidth:d,borderTopColor:t.success,borderRightColor:t.success,borderBottomColor:t.borderRingCream,borderLeftColor:t.borderRingCream},statusLine:{color:t.text.secondary,fontFamily:i.family,fontSize:i.size.subtitle,lineHeight:i.size.subtitle*i.lineHeight.snug,fontWeight:s,letterSpacing:i.letterSpacing.tight,textAlign:"center"}})}o(Vt,"makeStyles");var Kt=1100,$t=1.6,Qt=.35;function Xt(e,t){let{color:r}=e;switch(t){case "low_risk":return {accent:r.success,wash:r.badgeBgPositive,label:"Low risk",pulse:false};case "concern":return {accent:r.cautionAccent,wash:r.badgeBgCaution,label:"Concern",pulse:true};case "uncertain":return {accent:r.text.muted,wash:r.badgeBgNeutral,label:"Uncertain",pulse:false}}}o(Xt,"toneSpec");function Jt({riskTier:e}){let t=g(),r=useMemo(()=>Zt(t),[t]),n=useRef(new Animated.Value(0)).current,i=e===null?null:Xt(t,e),s=i!==null&&i.pulse&&!t.motion.reducedMotion;return useEffect(()=>{if(!s)return;let l=Animated.loop(Animated.timing(n,{toValue:1,duration:Kt,easing:Easing.out(Easing.quad),useNativeDriver:true}));return l.start(),()=>l.stop()},[s,n]),i===null?null:jsxs(View,{style:[r.pill,{backgroundColor:i.wash}],accessible:true,accessibilityRole:"text",accessibilityLabel:i.label,children:[jsxs(View,{style:r.dotWrap,children:[s?jsx(Animated.View,{pointerEvents:"none",style:[r.dotRing,{backgroundColor:i.accent,opacity:n.interpolate({inputRange:[0,1],outputRange:[Qt,0]}),transform:[{scale:n.interpolate({inputRange:[0,1],outputRange:[1,$t]})}]}]}):null,jsx(View,{style:[r.dot,{backgroundColor:i.accent}]})]}),jsx(A,{style:[r.label,{color:i.accent}],children:i.label})]})}o(Jt,"SeverityBadge");function Zt(e){let{space:t,radius:r,type:n}=e,i=n.weight.bold,s=t.sm;return StyleSheet.create({pill:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:t.sm,paddingHorizontal:t.md,paddingVertical:t.xs,borderRadius:r.pill},dotWrap:{width:s,height:s,alignItems:"center",justifyContent:"center"},dot:{width:s,height:s,borderRadius:r.pill},dotRing:{position:"absolute",width:s,height:s,borderRadius:r.pill},label:{fontFamily:n.family,fontSize:n.size.caption,lineHeight:n.size.caption*n.lineHeight.snug,fontWeight:i,letterSpacing:n.letterSpacing.eyebrow}})}o(Zt,"makeStyles");function j(e,t){return Object.freeze(t===void 0?{ok:true,value:e}:{ok:true,value:e,warning:t})}o(j,"ok");function u(e){return Object.freeze({ok:false,error:e})}o(u,"err");var z=class z extends Error{constructor(t,r){super(r),this.name="EverfurConfigError",this.kind=t,Object.setPrototypeOf(this,z.prototype);}};o(z,"EverfurConfigError");var w=z;var Te=Symbol.for("@everfur/sdk#EverfurContext@v1"),xe=globalThis,ke=xe[Te]??(xe[Te]=createContext(null));ke.displayName??="EverfurContext";function _(){let e=useContext(ke);if(e===null)throw new w("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}o(_,"useEverfurContext");function nr(){let{runtime:e}=_();return useMemo(()=>({apply:o(t=>e.updateEntitlements(t),"apply")}),[e])}o(nr,"useEverfurTestEntitlements");var J=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(J.map(e=>e.wireCode));var or=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"}),Oe=Object.freeze(J.map(e=>Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:or[e.wireCode]}))),ar=new Map(Oe.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),ir=Object.freeze(["http_envelope",...[...new Set(Oe.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function D(e,t){if(typeof e!="string")return;let r=e.trim().toUpperCase();if(r.length!==0)for(let n of [t??"http_envelope",...ir]){let i=ar.get(n+r);if(i)return i}}o(D,"contractErrorFor");function sr(e){return e.envelope==="sse_frame"?`/errors#sse-${e.wireCode}`:e.envelope==="oauth_error"?`/errors#oauth-${e.wireCode}`:`/errors#${e.wireCode}`}o(sr,"contractDocUrl");function Ae(e){return null}o(Ae,"publishedDocUrl");var lr=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 lr[e]}o(Ie,"categoryFor");function Pe(e){let t=D(e);if(t)return t.normalized;let r=(e??"").trim().toUpperCase(),n=r.replace(/[^A-Z0-9]/g,"");if(n==="AUTHREJECTED")return "authRejected";if(r.startsWith("AUTH"))return "authExpired";switch(n){case "DAILYQUOTAEXCEEDED":case "QUOTAEXCEEDED":return "quotaExceeded";case "RATELIMITED":case "TOOMANYREQUESTS":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 ur=new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function Z(e){return ur.has(e)}o(Z,"isAutoRetryable");var dr=new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function ze(e){return Z(e)||dr.has(e)}o(ze,"isRetryableCode");var cr=500,ee=8e3,je=4;function De(e,t=Math.random){let r=Math.max(0,e),n=Math.min(cr*2**r,ee);return Math.floor(t()*n)}o(De,"backoffDelayMs");var pr=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 fr(e){return pr[e]}o(fr,"userFacingError");function Me(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:false,writable:false,configurable:false});}o(Me,"defineHidden");var mr=/^[a-z][a-z0-9_]{0,63}$/;function m(e,t){let r=D(t?.wireCode,t?.wireEnvelope),n={code:e,category:Ie(e),retryable:t?.retryable??ze(e),displayMessage:fr(e)};if(t?.httpStatus!==void 0&&(n.httpStatus=t.httpStatus),t?.requestId&&(n.requestId=t.requestId),typeof t?.reasonCode=="string"&&mr.test(t.reasonCode)&&(n.reasonCode=t.reasonCode),r);return t?.wireMessage&&Me(n,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&Me(n,"raw",t.raw),Object.freeze(n)}o(m,"makeEverfurError");function Le(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(Le,"errorFrame");function br(e){let t={};return e.mode==="personalized"?t.authorization=`Bearer ${e.token}`:t["x-everfur-partner-key"]=e.publishableKey,e.userRef&&(t["x-everfur-user-ref"]=e.userRef),e.sessionId&&(t["x-everfur-session-id"]=e.sessionId),t}o(br,"authHeaders");function C(e,t){return {...e,headers:{...vr(e.headers),...br(t)}}}o(C,"withAuthHeaders");function vr(e){if(!e)return {};let t={};for(let[r,n]of Object.entries(e)){let i=r.toLowerCase();i==="authorization"||i==="x-everfur-partner-key"||(t[r]=n);}return t}o(vr,"stripAuthHeaders");async function Ne(e,t){if(t.mode==="anonymous")return t.transport.request(C(e,{mode:"anonymous",publishableKey:t.publishableKey,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));let r;try{r=await t.identity.currentToken();}catch{return u(te())}let n=await t.transport.request(C(e,{mode:"personalized",token:r,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(n.ok||n.error.httpStatus!==401)return n;let i;try{i=await t.identity.currentToken({forceRefresh:!0});}catch{return u(te())}let s=await t.transport.request(C(e,{mode:"personalized",token:i,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return !s.ok&&s.error.httpStatus===401?u(te(s.error.httpStatus)):s}o(Ne,"authedSend");function te(e){return m("authRejected",{retryable:false,...e!==void 0?{httpStatus:e}:{}})}o(te,"authRejectedError");function Ue(e){return m("internalError",{retryable:true,wireMessage:hr(e)})}o(Ue,"networkError");function hr(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}o(hr,"describeCause");var Er=3e4,_r=ee*2,Rr="idempotency-key",Sr=new Set(["POST","PUT","PATCH","DELETE"]),wr=Object.freeze({onEvent(){}}),Cr=Object.freeze({setTimeout:o((e,t)=>setTimeout(e,t),"setTimeout"),clearTimeout:o(e=>clearTimeout(e),"clearTimeout"),now:o(()=>Date.now(),"now")});function Tr(e){let t=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return t.length===0?null:`efs_${t}`.slice(0,128)}o(Tr,"seededIdempotencyKey");function M(e){let t=e.observer??wr,r=e.timers??Cr,n=e.rng??Math.random,i=e.sleep??((y,c)=>Nr(y,r,c)),s=e.maxAttempts??je,l=e.unaryTimeoutMs??Er,d=e.newIdempotencyKey??kr(),p=o(y=>{try{t.onEvent(y);}catch{}},"emit");async function f(y,c,h){let U=h?.maxAttempts,rt=Math.max(1,U??s),nt=h?.idempotent??Sr.has(c.method),ot=h?.idempotencyKey===void 0?null:Tr(h.idempotencyKey),V=nt?ot??d():null,at=xr(c,V),q=0;for(;;){let R=o(H=>Object.freeze({call:y,method:c.method,path:c.path,attempt:q,...V?{idempotencyKey:V}:{},...H}),"stamp");p(R({phase:"attempt"}));let oe=Mr(l,r),ae=Lr(oe.signal,c.signal),S;try{S=await Ne({...at,signal:ae.signal},e.auth);}catch(H){S=u(Ue(H));}finally{ae.dispose(),oe.cancel();}if(S.ok)return p(R({phase:"settled",ok:true,reason:"ok"})),S;let b=S.error,x=Or(b,q,{maxAttempts:rt,rng:n,now:r.now(),aborted:c.signal?.aborted===true,...U!==void 0?{perCallMaxAttempts:U}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),B={ok:false,code:b.code,reason:x.reason,...b.httpStatus!==void 0?{httpStatus:b.httpStatus}:{},...b.requestId!==void 0?{requestId:b.requestId}:{}};if(!x.retry)return p(R({phase:"settled",...B})),u(b);if(p(R({phase:"retry",...B,delayMs:x.delayMs})),await i(x.delayMs,c.signal),c.signal?.aborted===true)return p(R({phase:"settled",...B,reason:"aborted"})),u(b);q+=1;}}o(f,"send");async function T(y){return C(y,await Dr(e.auth))}o(T,"authorize");async function*tt(y,c,h){p(Object.freeze({call:y,phase:"stream.open",method:c.method,path:c.path,attempt:0}));try{yield*e.auth.transport.stream(c,h);}catch{yield Le({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:null});}}return o(tt,"stream"),Object.freeze({send:f,authorize:T,stream:tt})}o(M,"createRequestFunnel");function xr(e,t){let r={};for(let[n,i]of Object.entries(e.headers??{}))n.toLowerCase()!==Rr&&(r[n]=i);return t!==null&&(r["Idempotency-Key"]=t),{...e,headers:r}}o(xr,"assembleHeaders");function kr(){let e=0;return ()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}o(kr,"defaultIdempotencyKeyFactory");var Fr=10;function Or(e,t,r){if(r.aborted)return {retry:false,reason:"aborted"};let n=Ar(e);if(n==="quota")return {retry:false,reason:"daily-quota-exhausted"};if(n!=="burst"&&!Z(e.code))return {retry:false,reason:"terminal-code"};let i=n==="burst"?"burst-throttle":"retryable-code";if(o(()=>{if(r.policy===void 0)return false;try{return !r.policy.shouldRetry(e.code,t)}catch{return false}},"policyVetoedRetry")())return {retry:false,reason:"terminal-code"};let l=o(()=>{if(r.policy===void 0)return null;let f;try{f=r.policy.maxAttempts(e.code);}catch{return null}return typeof f!="number"||!Number.isFinite(f)?null:Math.max(1,Math.min(Fr,Math.floor(f)))},"policyCeiling"),d=r.perCallMaxAttempts??l()??r.maxAttempts;if(t+1>=d)return {retry:false,reason:"attempts-exhausted"};let p=Ir(e,r.now);return p!==null?p>_r?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:i,delayMs:p}:{retry:true,reason:i,delayMs:De(t,r.rng)}}o(Or,"decideRetry");function Ar(e){let t=e.code==="unknown"?Pe(jr(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}o(Ar,"throttleKind");function Ir(e,t){let r=Pr(e.raw);if(r===null)return null;let n=r-t;return n>0?n:0}o(Ir,"retryOverrideMs");function Pr(e){for(let t of qe(e)){let r=t.resets_at,n=zr(r);if(n!==null)return n}return null}o(Pr,"findResetsAt");function qe(e){if(!Ve(e))return [];let t=[e];for(let r of ["error","detail"]){let n=e[r];Ve(n)&&t.push(n);}return t}o(qe,"candidateScopes");function zr(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 t=Date.parse(e);return Number.isFinite(t)?t:null}return null}o(zr,"parseInstantMs");function jr(e){for(let t of qe(e)){let r=t.code;if(typeof r=="string"&&r.length>0)return r}return null}o(jr,"rawWireCode");function Ve(e){return typeof e=="object"&&e!==null}o(Ve,"isRecord");async function Dr(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(Dr,"resolveDeviceAuth");function Mr(e,t){let r=new AbortController,n=t.setTimeout(()=>r.abort(),e);return {signal:r.signal,cancel:o(()=>t.clearTimeout(n),"cancel")}}o(Mr,"boundedSignal");function Lr(e,t){let r=o(()=>{},"noop");if(!t)return {signal:e,dispose:r};let n=new AbortController;if(e.aborted||t.aborted)return n.abort(),{signal:n.signal,dispose:r};let i=o(()=>n.abort(),"onAbort");return e.addEventListener("abort",i,{once:true}),t.addEventListener("abort",i,{once:true}),{signal:n.signal,dispose:o(()=>{e.removeEventListener("abort",i),t.removeEventListener("abort",i);},"dispose")}}o(Lr,"mergeSignals");function Nr(e,t,r){return e<=0||r?.aborted===true?Promise.resolve():new Promise(n=>{let i=t.setTimeout(()=>{r?.removeEventListener("abort",s),n();},e),s=o(()=>{t.clearTimeout(i),n();},"onAbort");r?.addEventListener("abort",s,{once:true});})}o(Nr,"delayAbortable");function L(e){for(let t=0;t<e.length;t+=1){let r=e.charCodeAt(t);if(r>=55296&&r<=56319){let n=e.charCodeAt(t+1);if(!(n>=56320&&n<=57343))return true;t+=1;}else if(r>=56320&&r<=57343)return true}return false}o(L,"hasLoneSurrogate");function Be(e){return [...e].length}o(Be,"serverLength");var We=new Set(["requested","awaiting_clinic","awaiting_upload","received","parsing","in_review","published","failed","revoked"]),He=Object.freeze({submitted:"requested",sent:"requested",dispatching:"requested",awaiting_response:"awaiting_clinic",clinic_responded_no_records:"awaiting_clinic",records_received:"received",parsing_failed:"in_review",review_email_failed:"in_review",clinic_declined:"failed"});function Ur(e){let t=Object.prototype.hasOwnProperty.call(He,e)?He[e]:void 0;if(t!==void 0)return t;let r=e;return We.has(r)?r:"parsing"}o(Ur,"normalizeStatus");var Vr=z$1.object({request_id:z$1.string().min(1),pet_ref:z$1.string().min(1),status:z$1.string(),simple_status:z$1.string().nullish(),simple_status_detail:z$1.string().nullish(),status_label:z$1.string().optional(),dispatch_status:z$1.string().nullish(),can_retry_send:z$1.boolean().optional(),can_revoke:z$1.boolean().optional(),can_convert_to_upload:z$1.boolean().optional(),can_update_clinic_email:z$1.boolean().optional(),reminder_count:z$1.number().int().nonnegative().optional(),last_reminder_at:z$1.string().nullish(),waiting_expectation:z$1.string().nullish(),document_count:z$1.number().optional(),held_item_count:z$1.number().optional(),received_at:z$1.string().nullish(),parsing_started_at:z$1.string().nullish(),review_started_at:z$1.string().nullish(),created_at:z$1.string().optional(),updated_at:z$1.string().optional(),source:z$1.string().nullish().catch(null),action_needed_label:z$1.string().nullish().catch(null),failure_reason:z$1.string().nullish().catch(null),failure_code:z$1.string().nullish().catch(null),recovery_stage:z$1.string().nullish().catch(null),show_clinic_phone:z$1.boolean().optional().catch(void 0),clinic_name:z$1.string().nullish().catch(null),clinic_email:z$1.string().nullish().catch(null),clinic_phone:z$1.string().nullish().catch(null),converted_to_upload_at:z$1.string().nullish().catch(null),request_group_id:z$1.string().nullish().catch(null)}).passthrough();function Ge(e){let t=Vr.safeParse(e);if(!t.success)return null;let r=t.data,n=qr(r.simple_status),i=n==="requested"&&(r.status==="awaiting_upload"||r.simple_status_detail==="awaiting_owner_upload")?"awaiting_upload":n==="parsing"&&(r.simple_status_detail==="in_review"||r.simple_status_detail==="review_email_failed")?"in_review":n??Ur(r.status);return Object.freeze({id:r.request_id,petRef:r.pet_ref,status:i,simpleStatus:n,simpleStatusDetail:r.simple_status_detail??null,statusLabel:r.status_label??"",dispatchStatus:r.dispatch_status??null,canRetrySend:r.can_retry_send===true,canRevoke:r.can_revoke===true,canConvertToUpload:r.can_convert_to_upload===true,canUpdateClinicEmail:r.can_update_clinic_email===true,reminderCount:r.reminder_count??0,lastReminderAt:r.last_reminder_at??null,waitingExpectation:r.waiting_expectation??null,documentCount:Ye(r.document_count,0),heldItemCount:Ye(r.held_item_count,0),receivedAt:r.received_at??null,parsingStartedAt:r.parsing_started_at??null,reviewStartedAt:r.review_started_at??null,createdAt:r.created_at??"",updatedAt:r.updated_at??"",wireStatus:r.status,source:r.source??null,actionNeededLabel:r.action_needed_label??null,failureReason:r.failure_reason??null,failureCode:r.failure_code??null,recoveryStage:r.recovery_stage??null,showClinicPhone:r.show_clinic_phone===true,clinicName:r.clinic_name??null,clinicEmail:r.clinic_email??null,clinicPhone:r.clinic_phone??null,convertedToUploadAt:r.converted_to_upload_at??null,requestGroupId:r.request_group_id??null})}o(Ge,"mapRequestView");z$1.object({request_group_id:z$1.string().min(1),pet_ref:z$1.string().min(1),total:z$1.number().int().nonnegative(),responded:z$1.number().int().nonnegative(),pending:z$1.number().int().nonnegative(),members:z$1.array(z$1.unknown())});function qr(e){return !e||e==="awaiting_upload"||e==="in_review"?null:We.has(e)?e:null}o(qr,"normalizeSimpleStatus");z$1.object({source_doc_id:z$1.string().min(1),request_id:z$1.string().min(1)});var Br=z$1.object({label:z$1.string(),value:z$1.string()}),Hr=z$1.object({key:z$1.string(),category:z$1.string().optional(),label:z$1.string().optional(),value:z$1.string().nullish(),unit:z$1.string().nullish(),observed_at:z$1.string().nullish(),status:z$1.string().nullish(),origin:z$1.string().nullish(),canonical_key:z$1.string().nullish()}),Yr=z$1.object({at:z$1.string(),value:z$1.number().nullish(),display:z$1.string().nullish(),origin:z$1.string().nullish()}),Wr=z$1.object({key:z$1.string(),label:z$1.string().optional(),points:z$1.array(Yr).optional()}),Gr=z$1.object({title:z$1.string(),detail:z$1.string().nullish(),due_at:z$1.string().nullish()}),Kr=z$1.object({doc_id:z$1.string(),title:z$1.string().nullish(),page_count:z$1.number().nullish(),received_at:z$1.string().nullish()});z$1.object({identity:z$1.array(Br).optional(),entities:z$1.array(Hr).optional(),entity_series:z$1.array(Wr).optional(),forward_looking:z$1.array(Gr).optional(),documents:z$1.array(Kr).optional()});z$1.object({pet_ref:z$1.string().optional(),granted:z$1.boolean().optional(),version:z$1.string().nullish(),granted_at:z$1.string().nullish()});function Ye(e,t){return typeof e=="number"&&Number.isFinite(e)?e:t}o(Ye,"numberOr");var $r="/widget/v1/records/sandbox/requests",Ke=64,Qr=new Set(["records","no_records","declined"]),Xr=new Set(["applied","already_applied","not_applicable"]);function N(e){return m("validationFailed",{retryable:false,wireMessage:e})}o(N,"invalid");function Jr(e){return typeof e!="string"||e.length===0?N("request_id is required and must be a non-empty string"):L(e)?N("request_id contains an unpaired surrogate and cannot be encoded"):[...e].length>Ke?N(`request_id is longer than ${Ke} characters`):null}o(Jr,"requestIdError");function Zr(e){if(typeof e!="object"||e===null)return null;let{result:t,request:r}=e;if(typeof t!="string"||!Xr.has(t))return null;let n=Ge(r);return n===null?null:Object.freeze({result:t,request:n})}o(Zr,"mapActionResult");function $e(e){let t=e.funnel??M({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),r=o(async(n,i,s,l)=>{let d=Jr(i);if(d!==null)return u(d);let p=`${$r}/${encodeURIComponent(i)}/${s}`,f=await t.send(n,l===void 0?{method:"POST",path:p}:{method:"POST",path:p,body:l});if(!f.ok)return u(f.error);let T=Zr(f.value);return T===null?u(m("internalError",{retryable:false})):j(T)},"run");return {simulateClinicReply(n,i){return typeof i!="string"||!Qr.has(i)?Promise.resolve(u(N("outcome must be records, no_records or declined"))):r("records.sandbox.clinicReply",n,"clinic-reply",{outcome:i})},publishSampleRecord(n){return r("records.sandbox.publishSample",n,"publish-sample")}}}o($e,"createRecordsSandboxController");function tn(){let{runtime:e,userRef:t,scopeEpoch:r}=_();return useMemo(()=>{let{services:n}=e.registry;return $e({auth:n.authFor(t),...n.errorPolicy?{errorPolicy:n.errorPolicy}:{}})},[e,t,r])}o(tn,"useEverfurRecordsSandbox");var re="/widget/v1/televet/sandbox/visits",rn=128,Qe=64,Ze=new Set(["booked","cancelled","completed","no_show"]),nn=new Set(["applied","already_applied","not_applicable"]),Xe=new Set(["rescheduled","reminder","followup_sent","message_received","ended"]),Je=new Set(["24h","30m"]);function v(e){return m("validationFailed",{retryable:false,wireMessage:e})}o(v,"invalid");function ne(e,t,r){return typeof t!="string"||t.length===0?v(`${e} is required and must be a non-empty string`):L(t)?v(`${e} contains an unpaired surrogate and cannot be encoded`):Be(t)>r?v(`${e} is longer than ${r} characters`):null}o(ne,"textError");function on(e){if(typeof e!="object"||e===null)return null;let{result:t,visit:r}=e;if(typeof t!="string"||!nn.has(t)||typeof r!="object"||r===null)return null;let{visit_ref:n,pet_ref:i,status:s,scheduled_at:l}=r;return typeof n!="string"||n.length===0||typeof i!="string"||i.length===0||typeof s!="string"||!Ze.has(s)||typeof l!="string"||l.length===0?null:Object.freeze({result:t,visit:Object.freeze({visitRef:n,petRef:i,status:s,scheduledAt:l})})}o(on,"mapActionResult");function et(e){let t=e.funnel??M({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),r=o(async(n,i,s)=>{let l=await t.send(n,{method:"POST",path:i,body:s},{idempotent:false,maxAttempts:1});if(!l.ok)return u(l.error);let d=on(l.value);return d===null?u(m("internalError",{retryable:false})):j(d)},"run");return {createVisit(n){let i=ne("pet_ref",n,rn);return i!==null?Promise.resolve(u(i)):r("televet.sandbox.createVisit",re,{pet_ref:n})},advanceVisit(n,i){let s=ne("visit_ref",n,Qe);if(s!==null)return Promise.resolve(u(s));if(typeof i!="string"||!Ze.has(i))return Promise.resolve(u(v("to must be booked, cancelled, completed or no_show")));let l=`${re}/${encodeURIComponent(n)}/advance`;return r("televet.sandbox.advanceVisit",l,{to:i})},simulateVisitEvent(n,i,s){let l=ne("visit_ref",n,Qe);if(l!==null)return Promise.resolve(u(l));if(typeof i!="string"||!Xe.has(i))return Promise.resolve(u(v(`event must be one of ${[...Xe].join(", ")}`)));if(i==="reminder"){if(typeof s!="string"||!Je.has(s))return Promise.resolve(u(v(`stage must be one of ${[...Je].join(", ")} for a reminder`)))}else if(s!==void 0)return Promise.resolve(u(v("stage is only for a reminder")));let d=`${re}/${encodeURIComponent(n)}/simulate`;return r("televet.sandbox.simulateVisitEvent",d,s===void 0?{event:i}:{event:i,stage:s})}}}o(et,"createVetVisitSandboxController");function sn(){let{runtime:e,userRef:t,scopeEpoch:r}=_();return useMemo(()=>{let{services:n}=e.registry;return et({auth:n.authFor(t),...n.errorPolicy?{errorPolicy:n.errorPolicy}:{}})},[e,t,r])}o(sn,"useEverfurVetVisitSandbox");export{Ut as AnalyzingIndicator,Jt as SeverityBadge,Ct as TypingIndicator,tn as useEverfurRecordsSandbox,nr as useEverfurTestEntitlements,sn as useEverfurVetVisitSandbox};
|
|
1
|
+
import {createContext,forwardRef,useMemo,useRef,useEffect,createElement,useState,useContext}from'react';import {View,Animated,StyleSheet,TextInput,Easing,Text}from'react-native';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {z as z$1}from'zod';var it=Object.defineProperty;var o=(e,t)=>it(e,"name",{value:t,configurable:true});var se=Object.freeze({placeholder:"Ask me anything!",send:"Send",stop:"Stop",retry:"Try again",followUps:"Helpful follow-ups",poweredBy:"powered by everfur",senderUser:"You",senderAssistant:"Assistant",typing:"Assistant is typing",loading:"Loading",empty:"No messages yet",transcript:"Conversation",emptyTitle:"What can we help {petName} with today?",emptyTitlePetFallback:"your pet",copied:"Copied",copyUserMessage:"Copy your message",copyAssistantMessage:"Copy assistant message",feedbackHelpful:"Helpful",feedbackNeutral:"Neutral",feedbackNotHelpful:"Not helpful",feedbackTitle:"What went wrong?",feedbackSubtitle:"Your feedback helps make answers more reliable.",feedbackReasonInaccurate:"Inaccurate",feedbackReasonOutdated:"Out of date",feedbackReasonUnsafe:"Unsafe advice",feedbackReasonUnclear:"Confusing or unclear",feedbackReasonOther:"Something else",feedbackNotesPlaceholder:"Add details (optional)",feedbackSubmit:"Submit feedback",feedbackSkip:"Skip",feedbackSkipA11y:"Skip feedback",feedbackThanks:"Thanks for the feedback",feedbackFailed:"Couldn't send feedback. Please try again.",turnFailedTitle:"Message failed",turnRetry:"Retry",turnUnreachableTitle:"Couldn't reach this chat",turnStartNewChat:"Start a new chat",reconnecting:"Reconnecting\u2026",turnStoppedTitle:"Response stopped",turnStoppedBody:"You stopped this response before it finished. Tap retry to try again.",sourceSingular:"source",sourcePlural:"sources",showSources:"Show",hideSources:"Hide",openSource:"Open source",urgencyGeneralReason:"Just general info about {petName}. Nothing here needs action right now.",findVet:"Find a vet",findVetA11y:"Find a vet near you",showLatestVetAlert:"Show latest vet alert",dismissBanner:"Dismiss {label} banner",openMenu:"Open menu",openMenuUnread:"Open menu, unread chats",yourPets:"Your Pets",yourPet:"Your pet",switchActivePet:"Switch active pet, {name}",petCurrentlyActive:"{name}, currently active",switchToPet:"Switch to {name}",activePrefix:"Active \xB7 ",close:"Close",addAnotherPet:"Add another pet",addPet:"Add a pet",attachmentPhoto:"Photo",attachmentCamera:"Camera",closeAttachmentPicker:"Close attachment picker",addAttachment:"Add attachment, {used} of {total} used",attachmentsFull:"Attachments full, {used} of {total} used",retryUpload:"Retry uploading {filename}",removeAttachment:"Remove {filename}",previewAttachment:"Preview {filename}",closePreview:"Close preview",attachedImage:"Attached image: {filename}, opens a full-screen preview",attachmentTooLarge:"Files must be under {max}. {filename} is {size}.",attachmentTooMany:"You can attach up to {max} files per message.",attachmentUnsupported:"{filename} isn't a supported file type yet.",attachmentNetwork:"Couldn't reach the server. Check your connection and try again.",attachmentServer:"Upload failed{status}. Please try again.",attachmentCancelled:"Upload cancelled.",attachmentRateLimited:"Slow down. Please wait a moment and try again.",attachmentQuota:"Daily image limit reached. Try again tomorrow.",attachmentConflict:"Something went wrong. Tap to retry.",attachmentUnknown:"Something went wrong. Please try again.",attachmentsFailedBlocked:"Some attachments failed to upload. Remove or retry them before sending.",dictate:"Dictate a message",stopDictation:"Stop dictation",listening:"Listening",micBlocked:"Microphone access is blocked. Allow it in your browser settings to dictate.",noSpeech:"We didn't catch that. Tap the mic and try again.",dictationUnavailable:"Voice typing isn't available right now."});function G(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.keys(e))G(e[t]);}return e}o(G,"deepFreeze");var st=Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),ue={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},de={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},le={nano:8,small:9,micro:10,tiny:11,caption:12,bodyTight:13,body:14,subtitle:16,heading:18,verdict:24},lt={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},ut={regular:"400",medium:"500",bold:"700"},dt={eyebrow:1,monoWide:.9,headerBrand:-0.42,tight:-0.35},ct=0,k="System",F="monospace",pt=["content","heading","control","compact","badge"];function ft(e){let t={};for(let r of pt)t[r]=e;return t}o(ft,"authoredTierSizes");function ce(){return {family:k,mono:F,fontUrl:null,families:{regular:k,medium:k,bold:k,mono:F,monoMedium:F,monoBold:F},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:le,tierSizes:ft(le),lineHeight:lt,weight:ut,letterSpacing:dt,scale:1,maxScale:ct,scaleCaps:st}}o(ce,"baseType");var pe={},Y=Object.freeze({standard:Object.freeze([.2,0,0,1]),emphasized:Object.freeze([.2,.8,.2,1]),exit:Object.freeze([.4,0,1,1])});function W(e){return `cubic-bezier(${e.join(", ")})`}o(W,"cssCubicBezier");var fe={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:W(Y.standard),emphasized:W(Y.emphasized),exit:W(Y.exit)},reducedMotion:false},mt={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",errorRed:"#FF1B00",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",skeleton:"#EFE9E3",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)"},me=G({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:mt,space:ue,radius:de,type:ce(),motion:fe,slots:pe}),yt={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",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",skeleton:"#23272C",scanButtonPink:"#FFC3BC",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)"};G({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:yt,space:ue,radius:de,type:ce(),motion:fe,slots:pe});var ye=Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),ge=globalThis,K=ge[ye]??(ge[ye]=createContext(me));K.displayName??="EverfurThemeContext";function g(){return useContext(K)}o(g,"useEverfurTheme");var he=6,Re=520,Rt=Math.round(Re*.18),Ee=.44,St=.5,_e=[0,.5,1],wt=[0,1,2];function Tt(){let e=g(),t=useMemo(()=>xt(e),[e]),r=!e.motion.reducedMotion;return jsx(View,{style:t.card,accessible:true,accessibilityRole:"text",accessibilityLabel:se.typing,accessibilityLiveRegion:"polite",accessibilityState:{busy:true},children:wt.map(n=>r?jsx(Ct,{index:n,style:t.dot},n):jsx(View,{style:[t.dot,t.dotStatic]},n))})}o(Tt,"TypingIndicator");function Ct({index:e,style:t}){let r=useRef(new Animated.Value(0)).current;useEffect(()=>{let s=Animated.sequence([Animated.delay(e*Rt),Animated.loop(Animated.timing(r,{toValue:1,duration:Re,useNativeDriver:true}))]);return s.start(),()=>s.stop()},[r,e]);let n=r.interpolate({inputRange:_e,outputRange:[Ee,1,Ee]}),i=r.interpolate({inputRange:_e,outputRange:[0,-3.5,0]});return jsx(Animated.View,{style:[t,{opacity:n,transform:[{translateY:i}]}]})}o(Ct,"AnimatedDot");function xt(e){let t=e.color,r=e.space,n=e.radius;return StyleSheet.create({card:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:r.xs,paddingHorizontal:r.md,paddingVertical:r.sm,backgroundColor:t.surfaceCream,borderRadius:n.md,borderWidth:StyleSheet.hairlineWidth,borderColor:t.brandBorder},dot:{width:he,height:he,borderRadius:n.pill,backgroundColor:t.brand},dotStatic:{opacity:St}})}o(xt,"makeStyles");function At(e,t){let r=e.scaleCaps[t];return r>0?r:void 0}o(At,"tierMultiplier");function A({tier:e="content",...t}){let{type:r}=g(),n=At(r,e);return createElement(Text,n===void 0?t:{maxFontSizeMultiplier:n,...t})}o(A,"Text");forwardRef(o(function(t,r){return createElement(TextInput,{...t,...r===null?{}:{ref:r}})},"TextInput"));var Lt=1400,Nt=300;function Ut(){let e=g(),t=useMemo(()=>Vt(e),[e]),r=e.motion.reducedMotion,[n,i]=useState(false);useEffect(()=>{let d=setTimeout(()=>i(true),Nt);return ()=>clearTimeout(d)},[]);let s=useRef(new Animated.Value(0)).current;useEffect(()=>{if(r||!n)return;let d=Animated.loop(Animated.timing(s,{toValue:1,duration:Lt,easing:Easing.linear,useNativeDriver:true}));return d.start(),()=>d.stop()},[r,n,s]);let l=r?null:{transform:[{rotate:s.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]})}]};return jsx(View,{style:t.wrap,accessible:true,accessibilityState:{busy:true},accessibilityLabel:"Analyzing photo",children:n?jsxs(Fragment,{children:[jsx(Animated.View,{style:[t.ring,l]}),jsx(A,{style:t.statusLine,children:"Analyzing"})]}):null})}o(Ut,"AnalyzingIndicator");function Vt(e){let{color:t,space:r,radius:n,type:i}=e,s=i.weight.medium,l=r.xxl*2,d=r.xs;return StyleSheet.create({wrap:{flexGrow:1,alignItems:"center",justifyContent:"center",padding:r.xl,gap:r.md},ring:{width:l,height:l,borderRadius:n.pill,borderWidth:d,borderTopColor:t.success,borderRightColor:t.success,borderBottomColor:t.borderRingCream,borderLeftColor:t.borderRingCream},statusLine:{color:t.text.secondary,fontFamily:i.family,fontSize:i.size.subtitle,lineHeight:i.size.subtitle*i.lineHeight.snug,fontWeight:s,letterSpacing:i.letterSpacing.tight,textAlign:"center"}})}o(Vt,"makeStyles");var Kt=1100,$t=1.6,Qt=.35;function Xt(e,t){let{color:r}=e;switch(t){case "low_risk":return {accent:r.success,wash:r.badgeBgPositive,label:"Low risk",pulse:false};case "concern":return {accent:r.cautionAccent,wash:r.badgeBgCaution,label:"Concern",pulse:true};case "uncertain":return {accent:r.text.muted,wash:r.badgeBgNeutral,label:"Uncertain",pulse:false}}}o(Xt,"toneSpec");function Jt({riskTier:e}){let t=g(),r=useMemo(()=>Zt(t),[t]),n=useRef(new Animated.Value(0)).current,i=e===null?null:Xt(t,e),s=i!==null&&i.pulse&&!t.motion.reducedMotion;return useEffect(()=>{if(!s)return;let l=Animated.loop(Animated.timing(n,{toValue:1,duration:Kt,easing:Easing.out(Easing.quad),useNativeDriver:true}));return l.start(),()=>l.stop()},[s,n]),i===null?null:jsxs(View,{style:[r.pill,{backgroundColor:i.wash}],accessible:true,accessibilityRole:"text",accessibilityLabel:i.label,children:[jsxs(View,{style:r.dotWrap,children:[s?jsx(Animated.View,{pointerEvents:"none",style:[r.dotRing,{backgroundColor:i.accent,opacity:n.interpolate({inputRange:[0,1],outputRange:[Qt,0]}),transform:[{scale:n.interpolate({inputRange:[0,1],outputRange:[1,$t]})}]}]}):null,jsx(View,{style:[r.dot,{backgroundColor:i.accent}]})]}),jsx(A,{style:[r.label,{color:i.accent}],children:i.label})]})}o(Jt,"SeverityBadge");function Zt(e){let{space:t,radius:r,type:n}=e,i=n.weight.bold,s=t.sm;return StyleSheet.create({pill:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:t.sm,paddingHorizontal:t.md,paddingVertical:t.xs,borderRadius:r.pill},dotWrap:{width:s,height:s,alignItems:"center",justifyContent:"center"},dot:{width:s,height:s,borderRadius:r.pill},dotRing:{position:"absolute",width:s,height:s,borderRadius:r.pill},label:{fontFamily:n.family,fontSize:n.size.caption,lineHeight:n.size.caption*n.lineHeight.snug,fontWeight:i,letterSpacing:n.letterSpacing.eyebrow}})}o(Zt,"makeStyles");function j(e,t){return Object.freeze(t===void 0?{ok:true,value:e}:{ok:true,value:e,warning:t})}o(j,"ok");function u(e){return Object.freeze({ok:false,error:e})}o(u,"err");var z=class z extends Error{constructor(t,r){super(r),this.name="EverfurConfigError",this.kind=t,Object.setPrototypeOf(this,z.prototype);}};o(z,"EverfurConfigError");var w=z;var xe=Symbol.for("@everfur/sdk#EverfurContext@v1"),ke=globalThis,Fe=ke[xe]??(ke[xe]=createContext(null));Fe.displayName??="EverfurContext";function _(){let e=useContext(Fe);if(e===null)throw new w("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}o(_,"useEverfurContext");function nr(){let{runtime:e}=_();return useMemo(()=>({apply:o(t=>e.updateEntitlements(t),"apply")}),[e])}o(nr,"useEverfurTestEntitlements");var J=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(J.map(e=>e.wireCode));var or=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"}),Ae=Object.freeze(J.map(e=>Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:or[e.wireCode]}))),ar=new Map(Ae.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),ir=Object.freeze(["http_envelope",...[...new Set(Ae.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function D(e,t){if(typeof e!="string")return;let r=e.trim().toUpperCase();if(r.length!==0)for(let n of [t??"http_envelope",...ir]){let i=ar.get(n+r);if(i)return i}}o(D,"contractErrorFor");function sr(e){return e.envelope==="sse_frame"?`/errors#sse-${e.wireCode}`:e.envelope==="oauth_error"?`/errors#oauth-${e.wireCode}`:`/errors#${e.wireCode}`}o(sr,"contractDocUrl");function Ie(e){return null}o(Ie,"publishedDocUrl");var lr=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 Pe(e){return lr[e]}o(Pe,"categoryFor");function ze(e){let t=D(e);if(t)return t.normalized;let r=(e??"").trim().toUpperCase(),n=r.replace(/[^A-Z0-9]/g,"");if(n==="AUTHREJECTED")return "authRejected";if(r.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(ze,"fromWire");var ur=new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function Z(e){return ur.has(e)}o(Z,"isAutoRetryable");var dr=new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function je(e){return Z(e)||dr.has(e)}o(je,"isRetryableCode");var cr=500,ee=8e3,De=4;function Me(e,t=Math.random){let r=Math.max(0,e),n=Math.min(cr*2**r,ee);return Math.floor(t()*n)}o(Me,"backoffDelayMs");var pr=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 fr(e){return pr[e]}o(fr,"userFacingError");function Le(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:false,writable:false,configurable:false});}o(Le,"defineHidden");var mr=/^[a-z][a-z0-9_]{0,63}$/;function m(e,t){let r=D(t?.wireCode,t?.wireEnvelope),n={code:e,category:Pe(e),retryable:t?.retryable??je(e),displayMessage:fr(e)};if(t?.httpStatus!==void 0&&(n.httpStatus=t.httpStatus),t?.requestId&&(n.requestId=t.requestId),typeof t?.reasonCode=="string"&&mr.test(t.reasonCode)&&(n.reasonCode=t.reasonCode),r);return t?.wireMessage&&Le(n,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&Le(n,"raw",t.raw),Object.freeze(n)}o(m,"makeEverfurError");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 br(e){let t={};return e.mode==="personalized"?t.authorization=`Bearer ${e.token}`:t["x-everfur-partner-key"]=e.publishableKey,e.userRef&&(t["x-everfur-user-ref"]=e.userRef),e.sessionId&&(t["x-everfur-session-id"]=e.sessionId),t}o(br,"authHeaders");function T(e,t){return {...e,headers:{...vr(e.headers),...br(t)}}}o(T,"withAuthHeaders");function vr(e){if(!e)return {};let t={};for(let[r,n]of Object.entries(e)){let i=r.toLowerCase();i==="authorization"||i==="x-everfur-partner-key"||(t[r]=n);}return t}o(vr,"stripAuthHeaders");async function Ue(e,t){if(t.mode==="anonymous")return t.transport.request(T(e,{mode:"anonymous",publishableKey:t.publishableKey,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));let r;try{r=await t.identity.currentToken();}catch{return u(te())}let n=await t.transport.request(T(e,{mode:"personalized",token:r,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(n.ok||n.error.httpStatus!==401)return n;let i;try{i=await t.identity.currentToken({forceRefresh:!0});}catch{return u(te())}let s=await t.transport.request(T(e,{mode:"personalized",token:i,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return !s.ok&&s.error.httpStatus===401?u(te(s.error.httpStatus)):s}o(Ue,"authedSend");function te(e){return m("authRejected",{retryable:false,...e!==void 0?{httpStatus:e}:{}})}o(te,"authRejectedError");function Ve(e){return m("internalError",{retryable:true,wireMessage:hr(e)})}o(Ve,"networkError");function hr(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}o(hr,"describeCause");var Er=3e4,_r=ee*2,Rr="idempotency-key",Sr=new Set(["POST","PUT","PATCH","DELETE"]),wr=Object.freeze({onEvent(){}}),Tr=Object.freeze({setTimeout:o((e,t)=>setTimeout(e,t),"setTimeout"),clearTimeout:o(e=>clearTimeout(e),"clearTimeout"),now:o(()=>Date.now(),"now")});function Cr(e){let t=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return t.length===0?null:`efs_${t}`.slice(0,128)}o(Cr,"seededIdempotencyKey");function M(e){let t=e.observer??wr,r=e.timers??Tr,n=e.rng??Math.random,i=e.sleep??((y,c)=>Ur(y,r,c)),s=e.maxAttempts??De,l=e.unaryTimeoutMs??Er,d=e.newIdempotencyKey??kr(),p=o(y=>{try{t.onEvent(y);}catch{}},"emit");async function f(y,c,h){let U=h?.maxAttempts,rt=Math.max(1,U??s),nt=h?.idempotent??Sr.has(c.method),ot=h?.idempotencyKey===void 0?null:Cr(h.idempotencyKey),V=nt?ot??d():null,at=xr(c,V),q=0;for(;;){let R=o(H=>Object.freeze({call:y,method:c.method,path:c.path,attempt:q,...V?{idempotencyKey:V}:{},...H}),"stamp");p(R({phase:"attempt"}));let ae=Lr(l,r),ie=Nr(ae.signal,c.signal),S;try{S=await Ue({...at,signal:ie.signal},e.auth);}catch(H){S=u(Ve(H));}finally{ie.dispose(),ae.cancel();}if(S.ok)return p(R({phase:"settled",ok:true,reason:"ok"})),S;let b=S.error,x=Or(b,q,{maxAttempts:rt,rng:n,now:r.now(),aborted:c.signal?.aborted===true,...U!==void 0?{perCallMaxAttempts:U}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),B={ok:false,code:b.code,reason:x.reason,...b.httpStatus!==void 0?{httpStatus:b.httpStatus}:{},...b.requestId!==void 0?{requestId:b.requestId}:{}};if(!x.retry)return p(R({phase:"settled",...B})),u(b);if(p(R({phase:"retry",...B,delayMs:x.delayMs})),await i(x.delayMs,c.signal),c.signal?.aborted===true)return p(R({phase:"settled",...B,reason:"aborted"})),u(b);q+=1;}}o(f,"send");async function C(y){return T(y,await Mr(e.auth))}o(C,"authorize");async function*tt(y,c,h){p(Object.freeze({call:y,phase:"stream.open",method:c.method,path:c.path,attempt:0}));try{yield*e.auth.transport.stream(c,h);}catch{yield Ne({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:null});}}return o(tt,"stream"),Object.freeze({send:f,authorize:C,stream:tt})}o(M,"createRequestFunnel");function xr(e,t){let r={};for(let[n,i]of Object.entries(e.headers??{}))n.toLowerCase()!==Rr&&(r[n]=i);return t!==null&&(r["Idempotency-Key"]=t),{...e,headers:r}}o(xr,"assembleHeaders");function kr(){let e=0;return ()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}o(kr,"defaultIdempotencyKeyFactory");var Fr=10;function Or(e,t,r){if(r.aborted)return {retry:false,reason:"aborted"};let n=Ar(e);if(n==="quota")return {retry:false,reason:"daily-quota-exhausted"};if(n!=="burst"&&!Z(e.code))return {retry:false,reason:"terminal-code"};let i=n==="burst"?"burst-throttle":"retryable-code";if(o(()=>{if(r.policy===void 0)return false;try{return !r.policy.shouldRetry(e.code,t)}catch{return false}},"policyVetoedRetry")())return {retry:false,reason:"terminal-code"};let l=o(()=>{if(r.policy===void 0)return null;let f;try{f=r.policy.maxAttempts(e.code);}catch{return null}return typeof f!="number"||!Number.isFinite(f)?null:Math.max(1,Math.min(Fr,Math.floor(f)))},"policyCeiling"),d=r.perCallMaxAttempts??l()??r.maxAttempts;if(t+1>=d)return {retry:false,reason:"attempts-exhausted"};let p=Ir(e,r.now);return p!==null?p>_r?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:i,delayMs:p}:{retry:true,reason:i,delayMs:Me(t,r.rng)}}o(Or,"decideRetry");function Ar(e){let t=e.code==="unknown"?ze(Dr(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}o(Ar,"throttleKind");function Ir(e,t){let r=zr(e.raw);if(r!==null){let i=r-t;return i>0?i:0}let n=Pr(e.raw);return n===null?null:Math.round(n*1e3)}o(Ir,"retryOverrideMs");function Pr(e){for(let t of re(e)){let r=t.retry_after_seconds;if(typeof r=="number"&&Number.isFinite(r)&&r>=0)return r}return null}o(Pr,"findRetryAfterSeconds");function zr(e){for(let t of re(e)){let r=t.resets_at,n=jr(r);if(n!==null)return n}return null}o(zr,"findResetsAt");function re(e){if(!qe(e))return [];let t=[e];for(let r of ["error","detail"]){let n=e[r];qe(n)&&t.push(n);}return t}o(re,"candidateScopes");function jr(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 t=Date.parse(e);return Number.isFinite(t)?t:null}return null}o(jr,"parseInstantMs");function Dr(e){for(let t of re(e)){let r=t.code;if(typeof r=="string"&&r.length>0)return r}return null}o(Dr,"rawWireCode");function qe(e){return typeof e=="object"&&e!==null}o(qe,"isRecord");async function Mr(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(Mr,"resolveDeviceAuth");function Lr(e,t){let r=new AbortController,n=t.setTimeout(()=>r.abort(),e);return {signal:r.signal,cancel:o(()=>t.clearTimeout(n),"cancel")}}o(Lr,"boundedSignal");function Nr(e,t){let r=o(()=>{},"noop");if(!t)return {signal:e,dispose:r};let n=new AbortController;if(e.aborted||t.aborted)return n.abort(),{signal:n.signal,dispose:r};let i=o(()=>n.abort(),"onAbort");return e.addEventListener("abort",i,{once:true}),t.addEventListener("abort",i,{once:true}),{signal:n.signal,dispose:o(()=>{e.removeEventListener("abort",i),t.removeEventListener("abort",i);},"dispose")}}o(Nr,"mergeSignals");function Ur(e,t,r){return e<=0||r?.aborted===true?Promise.resolve():new Promise(n=>{let i=t.setTimeout(()=>{r?.removeEventListener("abort",s),n();},e),s=o(()=>{t.clearTimeout(i),n();},"onAbort");r?.addEventListener("abort",s,{once:true});})}o(Ur,"delayAbortable");function L(e){for(let t=0;t<e.length;t+=1){let r=e.charCodeAt(t);if(r>=55296&&r<=56319){let n=e.charCodeAt(t+1);if(!(n>=56320&&n<=57343))return true;t+=1;}else if(r>=56320&&r<=57343)return true}return false}o(L,"hasLoneSurrogate");function Be(e){return [...e].length}o(Be,"serverLength");var We=new Set(["requested","awaiting_clinic","awaiting_upload","received","parsing","in_review","published","failed","revoked"]),He=Object.freeze({submitted:"requested",sent:"requested",dispatching:"requested",awaiting_response:"awaiting_clinic",clinic_responded_no_records:"awaiting_clinic",records_received:"received",parsing_failed:"in_review",review_email_failed:"in_review",clinic_declined:"failed"});function Vr(e){let t=Object.prototype.hasOwnProperty.call(He,e)?He[e]:void 0;if(t!==void 0)return t;let r=e;return We.has(r)?r:"parsing"}o(Vr,"normalizeStatus");var qr=z$1.object({request_id:z$1.string().min(1),pet_ref:z$1.string().min(1),status:z$1.string(),simple_status:z$1.string().nullish(),simple_status_detail:z$1.string().nullish(),status_label:z$1.string().optional(),dispatch_status:z$1.string().nullish(),can_retry_send:z$1.boolean().optional(),can_revoke:z$1.boolean().optional(),can_convert_to_upload:z$1.boolean().optional(),can_update_clinic_email:z$1.boolean().optional(),reminder_count:z$1.number().int().nonnegative().optional(),last_reminder_at:z$1.string().nullish(),waiting_expectation:z$1.string().nullish(),document_count:z$1.number().optional(),held_item_count:z$1.number().optional(),received_at:z$1.string().nullish(),parsing_started_at:z$1.string().nullish(),review_started_at:z$1.string().nullish(),created_at:z$1.string().optional(),updated_at:z$1.string().optional(),source:z$1.string().nullish().catch(null),action_needed_label:z$1.string().nullish().catch(null),failure_reason:z$1.string().nullish().catch(null),failure_code:z$1.string().nullish().catch(null),recovery_stage:z$1.string().nullish().catch(null),show_clinic_phone:z$1.boolean().optional().catch(void 0),clinic_name:z$1.string().nullish().catch(null),clinic_email:z$1.string().nullish().catch(null),clinic_phone:z$1.string().nullish().catch(null),converted_to_upload_at:z$1.string().nullish().catch(null),request_group_id:z$1.string().nullish().catch(null)}).passthrough();function Ge(e){let t=qr.safeParse(e);if(!t.success)return null;let r=t.data,n=Br(r.simple_status),i=n==="requested"&&(r.status==="awaiting_upload"||r.simple_status_detail==="awaiting_owner_upload")?"awaiting_upload":n==="parsing"&&(r.simple_status_detail==="in_review"||r.simple_status_detail==="review_email_failed")?"in_review":n??Vr(r.status);return Object.freeze({id:r.request_id,petRef:r.pet_ref,status:i,simpleStatus:n,simpleStatusDetail:r.simple_status_detail??null,statusLabel:r.status_label??"",dispatchStatus:r.dispatch_status??null,canRetrySend:r.can_retry_send===true,canRevoke:r.can_revoke===true,canConvertToUpload:r.can_convert_to_upload===true,canUpdateClinicEmail:r.can_update_clinic_email===true,reminderCount:r.reminder_count??0,lastReminderAt:r.last_reminder_at??null,waitingExpectation:r.waiting_expectation??null,documentCount:Ye(r.document_count,0),heldItemCount:Ye(r.held_item_count,0),receivedAt:r.received_at??null,parsingStartedAt:r.parsing_started_at??null,reviewStartedAt:r.review_started_at??null,createdAt:r.created_at??"",updatedAt:r.updated_at??"",wireStatus:r.status,source:r.source??null,actionNeededLabel:r.action_needed_label??null,failureReason:r.failure_reason??null,failureCode:r.failure_code??null,recoveryStage:r.recovery_stage??null,showClinicPhone:r.show_clinic_phone===true,clinicName:r.clinic_name??null,clinicEmail:r.clinic_email??null,clinicPhone:r.clinic_phone??null,convertedToUploadAt:r.converted_to_upload_at??null,requestGroupId:r.request_group_id??null})}o(Ge,"mapRequestView");z$1.object({request_group_id:z$1.string().min(1),pet_ref:z$1.string().min(1),total:z$1.number().int().nonnegative(),responded:z$1.number().int().nonnegative(),pending:z$1.number().int().nonnegative(),members:z$1.array(z$1.unknown())});function Br(e){return !e||e==="awaiting_upload"||e==="in_review"?null:We.has(e)?e:null}o(Br,"normalizeSimpleStatus");z$1.object({source_doc_id:z$1.string().min(1),request_id:z$1.string().min(1)});var Hr=z$1.object({label:z$1.string(),value:z$1.string()}),Yr=z$1.object({key:z$1.string(),category:z$1.string().optional(),label:z$1.string().optional(),value:z$1.string().nullish(),unit:z$1.string().nullish(),observed_at:z$1.string().nullish(),status:z$1.string().nullish(),origin:z$1.string().nullish(),canonical_key:z$1.string().nullish()}),Wr=z$1.object({at:z$1.string(),value:z$1.number().nullish(),display:z$1.string().nullish(),origin:z$1.string().nullish()}),Gr=z$1.object({key:z$1.string(),label:z$1.string().optional(),points:z$1.array(Wr).optional()}),Kr=z$1.object({title:z$1.string(),detail:z$1.string().nullish(),due_at:z$1.string().nullish()}),$r=z$1.object({doc_id:z$1.string(),title:z$1.string().nullish(),page_count:z$1.number().nullish(),received_at:z$1.string().nullish()});z$1.object({identity:z$1.array(Hr).optional(),entities:z$1.array(Yr).optional(),entity_series:z$1.array(Gr).optional(),forward_looking:z$1.array(Kr).optional(),documents:z$1.array($r).optional()});z$1.object({pet_ref:z$1.string().optional(),granted:z$1.boolean().optional(),version:z$1.string().nullish(),granted_at:z$1.string().nullish()});function Ye(e,t){return typeof e=="number"&&Number.isFinite(e)?e:t}o(Ye,"numberOr");var Qr="/widget/v1/records/sandbox/requests",Ke=64,Xr=new Set(["records","no_records","declined"]),Jr=new Set(["applied","already_applied","not_applicable"]);function N(e){return m("validationFailed",{retryable:false,wireMessage:e})}o(N,"invalid");function Zr(e){return typeof e!="string"||e.length===0?N("request_id is required and must be a non-empty string"):L(e)?N("request_id contains an unpaired surrogate and cannot be encoded"):[...e].length>Ke?N(`request_id is longer than ${Ke} characters`):null}o(Zr,"requestIdError");function en(e){if(typeof e!="object"||e===null)return null;let{result:t,request:r}=e;if(typeof t!="string"||!Jr.has(t))return null;let n=Ge(r);return n===null?null:Object.freeze({result:t,request:n})}o(en,"mapActionResult");function $e(e){let t=e.funnel??M({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),r=o(async(n,i,s,l)=>{let d=Zr(i);if(d!==null)return u(d);let p=`${Qr}/${encodeURIComponent(i)}/${s}`,f=await t.send(n,l===void 0?{method:"POST",path:p}:{method:"POST",path:p,body:l});if(!f.ok)return u(f.error);let C=en(f.value);return C===null?u(m("internalError",{retryable:false})):j(C)},"run");return {simulateClinicReply(n,i){return typeof i!="string"||!Xr.has(i)?Promise.resolve(u(N("outcome must be records, no_records or declined"))):r("records.sandbox.clinicReply",n,"clinic-reply",{outcome:i})},publishSampleRecord(n){return r("records.sandbox.publishSample",n,"publish-sample")}}}o($e,"createRecordsSandboxController");function rn(){let{runtime:e,userRef:t,scopeEpoch:r}=_();return useMemo(()=>{let{services:n}=e.registry;return $e({auth:n.authFor(t),...n.errorPolicy?{errorPolicy:n.errorPolicy}:{}})},[e,t,r])}o(rn,"useEverfurRecordsSandbox");var ne="/widget/v1/televet/sandbox/visits",nn=128,Qe=64,Ze=new Set(["booked","cancelled","completed","no_show"]),on=new Set(["applied","already_applied","not_applicable"]),Xe=new Set(["rescheduled","reminder","followup_sent","message_received","ended"]),Je=new Set(["24h","30m"]);function v(e){return m("validationFailed",{retryable:false,wireMessage:e})}o(v,"invalid");function oe(e,t,r){return typeof t!="string"||t.length===0?v(`${e} is required and must be a non-empty string`):L(t)?v(`${e} contains an unpaired surrogate and cannot be encoded`):Be(t)>r?v(`${e} is longer than ${r} characters`):null}o(oe,"textError");function an(e){if(typeof e!="object"||e===null)return null;let{result:t,visit:r}=e;if(typeof t!="string"||!on.has(t)||typeof r!="object"||r===null)return null;let{visit_ref:n,pet_ref:i,status:s,scheduled_at:l}=r;return typeof n!="string"||n.length===0||typeof i!="string"||i.length===0||typeof s!="string"||!Ze.has(s)||typeof l!="string"||l.length===0?null:Object.freeze({result:t,visit:Object.freeze({visitRef:n,petRef:i,status:s,scheduledAt:l})})}o(an,"mapActionResult");function et(e){let t=e.funnel??M({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),r=o(async(n,i,s)=>{let l=await t.send(n,{method:"POST",path:i,body:s},{idempotent:false,maxAttempts:1});if(!l.ok)return u(l.error);let d=an(l.value);return d===null?u(m("internalError",{retryable:false})):j(d)},"run");return {createVisit(n){let i=oe("pet_ref",n,nn);return i!==null?Promise.resolve(u(i)):r("televet.sandbox.createVisit",ne,{pet_ref:n})},advanceVisit(n,i){let s=oe("visit_ref",n,Qe);if(s!==null)return Promise.resolve(u(s));if(typeof i!="string"||!Ze.has(i))return Promise.resolve(u(v("to must be booked, cancelled, completed or no_show")));let l=`${ne}/${encodeURIComponent(n)}/advance`;return r("televet.sandbox.advanceVisit",l,{to:i})},simulateVisitEvent(n,i,s){let l=oe("visit_ref",n,Qe);if(l!==null)return Promise.resolve(u(l));if(typeof i!="string"||!Xe.has(i))return Promise.resolve(u(v(`event must be one of ${[...Xe].join(", ")}`)));if(i==="reminder"){if(typeof s!="string"||!Je.has(s))return Promise.resolve(u(v(`stage must be one of ${[...Je].join(", ")} for a reminder`)))}else if(s!==void 0)return Promise.resolve(u(v("stage is only for a reminder")));let d=`${ne}/${encodeURIComponent(n)}/simulate`;return r("televet.sandbox.simulateVisitEvent",d,s===void 0?{event:i}:{event:i,stage:s})}}}o(et,"createVetVisitSandboxController");function ln(){let{runtime:e,userRef:t,scopeEpoch:r}=_();return useMemo(()=>{let{services:n}=e.registry;return et({auth:n.authFor(t),...n.errorPolicy?{errorPolicy:n.errorPolicy}:{}})},[e,t,r])}o(ln,"useEverfurVetVisitSandbox");export{Ut as AnalyzingIndicator,Jt as SeverityBadge,Tt as TypingIndicator,rn as useEverfurRecordsSandbox,nr as useEverfurTestEntitlements,ln as useEverfurVetVisitSandbox};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var react=require('react'),zod=require('zod');var Ce=Object.defineProperty;var n=(e,t)=>Ce(e,"name",{value:t,configurable:true});function T(e,t){return Object.freeze(t===void 0?{ok:true,value:e}:{ok:true,value:e,warning:t})}n(T,"ok");function l(e){return Object.freeze({ok:false,error:e})}n(l,"err");var x=class x extends Error{constructor(t,r){super(r),this.name="EverfurConfigError",this.kind=t,Object.setPrototypeOf(this,x.prototype);}};n(x,"EverfurConfigError");var R=x;var H=Symbol.for("@everfur/sdk#EverfurContext@v1"),W=globalThis,K=W[H]??(W[H]=react.createContext(null));K.displayName??="EverfurContext";function h(){let e=react.useContext(K);if(e===null)throw new R("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}n(h,"useEverfurContext");function ke(){let{runtime:e}=h();return react.useMemo(()=>({apply:n(t=>e.updateEntitlements(t),"apply")}),[e])}n(ke,"useEverfurTestEntitlements");var D=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(D.map(e=>e.wireCode));var Fe=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"}),G=Object.freeze(D.map(e=>Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:Fe[e.wireCode]}))),Ie=new Map(G.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),Ae=Object.freeze(["http_envelope",...[...new Set(G.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function O(e,t){if(typeof e!="string")return;let r=e.trim().toUpperCase();if(r.length!==0)for(let o of [t??"http_envelope",...Ae]){let a=Ie.get(o+r);if(a)return a}}n(O,"contractErrorFor");function Pe(e){return e.envelope==="sse_frame"?`/errors#sse-${e.wireCode}`:e.envelope==="oauth_error"?`/errors#oauth-${e.wireCode}`:`/errors#${e.wireCode}`}n(Pe,"contractDocUrl");function Q(e){return null}n(Q,"publishedDocUrl");var je=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 X(e){return je[e]}n(X,"categoryFor");function J(e){let t=O(e);if(t)return t.normalized;let r=(e??"").trim().toUpperCase(),o=r.replace(/[^A-Z0-9]/g,"");if(o==="AUTHREJECTED")return "authRejected";if(r.startsWith("AUTH"))return "authExpired";switch(o){case "DAILYQUOTAEXCEEDED":case "QUOTAEXCEEDED":return "quotaExceeded";case "RATELIMITED":case "TOOMANYREQUESTS":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"}}n(J,"fromWire");var ze=new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function U(e){return ze.has(e)}n(U,"isAutoRetryable");var qe=new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function Z(e){return U(e)||qe.has(e)}n(Z,"isRetryableCode");var De=500,V=8e3,ee=4;function te(e,t=Math.random){let r=Math.max(0,e),o=Math.min(De*2**r,V);return Math.floor(t()*o)}n(te,"backoffDelayMs");var Ue=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 Ve(e){return Ue[e]}n(Ve,"userFacingError");function re(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:false,writable:false,configurable:false});}n(re,"defineHidden");var Me=/^[a-z][a-z0-9_]{0,63}$/;function y(e,t){let r=O(t?.wireCode,t?.wireEnvelope),o={code:e,category:X(e),retryable:t?.retryable??Z(e),displayMessage:Ve(e)};if(t?.httpStatus!==void 0&&(o.httpStatus=t.httpStatus),t?.requestId&&(o.requestId=t.requestId),typeof t?.reasonCode=="string"&&Me.test(t.reasonCode)&&(o.reasonCode=t.reasonCode),r);return t?.wireMessage&&re(o,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&re(o,"raw",t.raw),Object.freeze(o)}n(y,"makeEverfurError");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})}n(ne,"errorFrame");function Be(e){let t={};return e.mode==="personalized"?t.authorization=`Bearer ${e.token}`:t["x-everfur-partner-key"]=e.publishableKey,e.userRef&&(t["x-everfur-user-ref"]=e.userRef),e.sessionId&&(t["x-everfur-session-id"]=e.sessionId),t}n(Be,"authHeaders");function S(e,t){return {...e,headers:{...Ye(e.headers),...Be(t)}}}n(S,"withAuthHeaders");function Ye(e){if(!e)return {};let t={};for(let[r,o]of Object.entries(e)){let a=r.toLowerCase();a==="authorization"||a==="x-everfur-partner-key"||(t[r]=o);}return t}n(Ye,"stripAuthHeaders");async function oe(e,t){if(t.mode==="anonymous")return t.transport.request(S(e,{mode:"anonymous",publishableKey:t.publishableKey,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));let r;try{r=await t.identity.currentToken();}catch{return l(M())}let o=await t.transport.request(S(e,{mode:"personalized",token:r,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(o.ok||o.error.httpStatus!==401)return o;let a;try{a=await t.identity.currentToken({forceRefresh:!0});}catch{return l(M())}let s=await t.transport.request(S(e,{mode:"personalized",token:a,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return !s.ok&&s.error.httpStatus===401?l(M(s.error.httpStatus)):s}n(oe,"authedSend");function M(e){return y("authRejected",{retryable:false,...e!==void 0?{httpStatus:e}:{}})}n(M,"authRejectedError");function ie(e){return y("internalError",{retryable:true,wireMessage:He(e)})}n(ie,"networkError");function He(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}n(He,"describeCause");var We=3e4,Ke=V*2,$e="idempotency-key",Ge=new Set(["POST","PUT","PATCH","DELETE"]),Qe=Object.freeze({onEvent(){}}),Xe=Object.freeze({setTimeout:n((e,t)=>setTimeout(e,t),"setTimeout"),clearTimeout:n(e=>clearTimeout(e),"clearTimeout"),now:n(()=>Date.now(),"now")});function Je(e){let t=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return t.length===0?null:`efs_${t}`.slice(0,128)}n(Je,"seededIdempotencyKey");function k(e){let t=e.observer??Qe,r=e.timers??Xe,o=e.rng??Math.random,a=e.sleep??((m,d)=>ct(m,r,d)),s=e.maxAttempts??ee,u=e.unaryTimeoutMs??We,p=e.newIdempotencyKey??et(),c=n(m=>{try{t.onEvent(m);}catch{}},"emit");async function f(m,d,b){let A=b?.maxAttempts,ge=Math.max(1,A??s),Re=b?.idempotent??Ge.has(d.method),Se=b?.idempotencyKey===void 0?null:Je(b.idempotencyKey),P=Re?Se??p():null,we=Ze(d,P),j=0;for(;;){let E=n(q=>Object.freeze({call:m,method:d.method,path:d.path,attempt:j,...P?{idempotencyKey:P}:{},...q}),"stamp");c(E({phase:"attempt"}));let B=ut(u,r),Y=dt(B.signal,d.signal),g;try{g=await oe({...we,signal:Y.signal},e.auth);}catch(q){g=l(ie(q));}finally{Y.dispose(),B.cancel();}if(g.ok)return c(E({phase:"settled",ok:true,reason:"ok"})),g;let v=g.error,C=rt(v,j,{maxAttempts:ge,rng:o,now:r.now(),aborted:d.signal?.aborted===true,...A!==void 0?{perCallMaxAttempts:A}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),z={ok:false,code:v.code,reason:C.reason,...v.httpStatus!==void 0?{httpStatus:v.httpStatus}:{},...v.requestId!==void 0?{requestId:v.requestId}:{}};if(!C.retry)return c(E({phase:"settled",...z})),l(v);if(c(E({phase:"retry",...z,delayMs:C.delayMs})),await a(C.delayMs,d.signal),d.signal?.aborted===true)return c(E({phase:"settled",...z,reason:"aborted"})),l(v);j+=1;}}n(f,"send");async function w(m){return S(m,await lt(e.auth))}n(w,"authorize");async function*Ee(m,d,b){c(Object.freeze({call:m,phase:"stream.open",method:d.method,path:d.path,attempt:0}));try{yield*e.auth.transport.stream(d,b);}catch{yield ne({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:null});}}return n(Ee,"stream"),Object.freeze({send:f,authorize:w,stream:Ee})}n(k,"createRequestFunnel");function Ze(e,t){let r={};for(let[o,a]of Object.entries(e.headers??{}))o.toLowerCase()!==$e&&(r[o]=a);return t!==null&&(r["Idempotency-Key"]=t),{...e,headers:r}}n(Ze,"assembleHeaders");function et(){let e=0;return ()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}n(et,"defaultIdempotencyKeyFactory");var tt=10;function rt(e,t,r){if(r.aborted)return {retry:false,reason:"aborted"};let o=nt(e);if(o==="quota")return {retry:false,reason:"daily-quota-exhausted"};if(o!=="burst"&&!U(e.code))return {retry:false,reason:"terminal-code"};let a=o==="burst"?"burst-throttle":"retryable-code";if(n(()=>{if(r.policy===void 0)return false;try{return !r.policy.shouldRetry(e.code,t)}catch{return false}},"policyVetoedRetry")())return {retry:false,reason:"terminal-code"};let u=n(()=>{if(r.policy===void 0)return null;let f;try{f=r.policy.maxAttempts(e.code);}catch{return null}return typeof f!="number"||!Number.isFinite(f)?null:Math.max(1,Math.min(tt,Math.floor(f)))},"policyCeiling"),p=r.perCallMaxAttempts??u()??r.maxAttempts;if(t+1>=p)return {retry:false,reason:"attempts-exhausted"};let c=ot(e,r.now);return c!==null?c>Ke?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:a,delayMs:c}:{retry:true,reason:a,delayMs:te(t,r.rng)}}n(rt,"decideRetry");function nt(e){let t=e.code==="unknown"?J(st(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}n(nt,"throttleKind");function ot(e,t){let r=it(e.raw);if(r===null)return null;let o=r-t;return o>0?o:0}n(ot,"retryOverrideMs");function it(e){for(let t of se(e)){let r=t.resets_at,o=at(r);if(o!==null)return o}return null}n(it,"findResetsAt");function se(e){if(!ae(e))return [];let t=[e];for(let r of ["error","detail"]){let o=e[r];ae(o)&&t.push(o);}return t}n(se,"candidateScopes");function at(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 t=Date.parse(e);return Number.isFinite(t)?t:null}return null}n(at,"parseInstantMs");function st(e){for(let t of se(e)){let r=t.code;if(typeof r=="string"&&r.length>0)return r}return null}n(st,"rawWireCode");function ae(e){return typeof e=="object"&&e!==null}n(ae,"isRecord");async function lt(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}:{}}}n(lt,"resolveDeviceAuth");function ut(e,t){let r=new AbortController,o=t.setTimeout(()=>r.abort(),e);return {signal:r.signal,cancel:n(()=>t.clearTimeout(o),"cancel")}}n(ut,"boundedSignal");function dt(e,t){let r=n(()=>{},"noop");if(!t)return {signal:e,dispose:r};let o=new AbortController;if(e.aborted||t.aborted)return o.abort(),{signal:o.signal,dispose:r};let a=n(()=>o.abort(),"onAbort");return e.addEventListener("abort",a,{once:true}),t.addEventListener("abort",a,{once:true}),{signal:o.signal,dispose:n(()=>{e.removeEventListener("abort",a),t.removeEventListener("abort",a);},"dispose")}}n(dt,"mergeSignals");function ct(e,t,r){return e<=0||r?.aborted===true?Promise.resolve():new Promise(o=>{let a=t.setTimeout(()=>{r?.removeEventListener("abort",s),o();},e),s=n(()=>{t.clearTimeout(a),o();},"onAbort");r?.addEventListener("abort",s,{once:true});})}n(ct,"delayAbortable");function F(e){for(let t=0;t<e.length;t+=1){let r=e.charCodeAt(t);if(r>=55296&&r<=56319){let o=e.charCodeAt(t+1);if(!(o>=56320&&o<=57343))return true;t+=1;}else if(r>=56320&&r<=57343)return true}return false}n(F,"hasLoneSurrogate");function le(e){return [...e].length}n(le,"serverLength");var ce=new Set(["requested","awaiting_clinic","awaiting_upload","received","parsing","in_review","published","failed","revoked"]),ue=Object.freeze({submitted:"requested",sent:"requested",dispatching:"requested",awaiting_response:"awaiting_clinic",clinic_responded_no_records:"awaiting_clinic",records_received:"received",parsing_failed:"in_review",review_email_failed:"in_review",clinic_declined:"failed"});function pt(e){let t=Object.prototype.hasOwnProperty.call(ue,e)?ue[e]:void 0;if(t!==void 0)return t;let r=e;return ce.has(r)?r:"parsing"}n(pt,"normalizeStatus");var ft=zod.z.object({request_id:zod.z.string().min(1),pet_ref:zod.z.string().min(1),status:zod.z.string(),simple_status:zod.z.string().nullish(),simple_status_detail:zod.z.string().nullish(),status_label:zod.z.string().optional(),dispatch_status:zod.z.string().nullish(),can_retry_send:zod.z.boolean().optional(),can_revoke:zod.z.boolean().optional(),can_convert_to_upload:zod.z.boolean().optional(),can_update_clinic_email:zod.z.boolean().optional(),reminder_count:zod.z.number().int().nonnegative().optional(),last_reminder_at:zod.z.string().nullish(),waiting_expectation:zod.z.string().nullish(),document_count:zod.z.number().optional(),held_item_count:zod.z.number().optional(),received_at:zod.z.string().nullish(),parsing_started_at:zod.z.string().nullish(),review_started_at:zod.z.string().nullish(),created_at:zod.z.string().optional(),updated_at:zod.z.string().optional(),source:zod.z.string().nullish().catch(null),action_needed_label:zod.z.string().nullish().catch(null),failure_reason:zod.z.string().nullish().catch(null),failure_code:zod.z.string().nullish().catch(null),recovery_stage:zod.z.string().nullish().catch(null),show_clinic_phone:zod.z.boolean().optional().catch(void 0),clinic_name:zod.z.string().nullish().catch(null),clinic_email:zod.z.string().nullish().catch(null),clinic_phone:zod.z.string().nullish().catch(null),converted_to_upload_at:zod.z.string().nullish().catch(null),request_group_id:zod.z.string().nullish().catch(null)}).passthrough();function pe(e){let t=ft.safeParse(e);if(!t.success)return null;let r=t.data,o=yt(r.simple_status),a=o==="requested"&&(r.status==="awaiting_upload"||r.simple_status_detail==="awaiting_owner_upload")?"awaiting_upload":o==="parsing"&&(r.simple_status_detail==="in_review"||r.simple_status_detail==="review_email_failed")?"in_review":o??pt(r.status);return Object.freeze({id:r.request_id,petRef:r.pet_ref,status:a,simpleStatus:o,simpleStatusDetail:r.simple_status_detail??null,statusLabel:r.status_label??"",dispatchStatus:r.dispatch_status??null,canRetrySend:r.can_retry_send===true,canRevoke:r.can_revoke===true,canConvertToUpload:r.can_convert_to_upload===true,canUpdateClinicEmail:r.can_update_clinic_email===true,reminderCount:r.reminder_count??0,lastReminderAt:r.last_reminder_at??null,waitingExpectation:r.waiting_expectation??null,documentCount:de(r.document_count,0),heldItemCount:de(r.held_item_count,0),receivedAt:r.received_at??null,parsingStartedAt:r.parsing_started_at??null,reviewStartedAt:r.review_started_at??null,createdAt:r.created_at??"",updatedAt:r.updated_at??"",wireStatus:r.status,source:r.source??null,actionNeededLabel:r.action_needed_label??null,failureReason:r.failure_reason??null,failureCode:r.failure_code??null,recoveryStage:r.recovery_stage??null,showClinicPhone:r.show_clinic_phone===true,clinicName:r.clinic_name??null,clinicEmail:r.clinic_email??null,clinicPhone:r.clinic_phone??null,convertedToUploadAt:r.converted_to_upload_at??null,requestGroupId:r.request_group_id??null})}n(pe,"mapRequestView");zod.z.object({request_group_id:zod.z.string().min(1),pet_ref:zod.z.string().min(1),total:zod.z.number().int().nonnegative(),responded:zod.z.number().int().nonnegative(),pending:zod.z.number().int().nonnegative(),members:zod.z.array(zod.z.unknown())});function yt(e){return !e||e==="awaiting_upload"||e==="in_review"?null:ce.has(e)?e:null}n(yt,"normalizeSimpleStatus");zod.z.object({source_doc_id:zod.z.string().min(1),request_id:zod.z.string().min(1)});var mt=zod.z.object({label:zod.z.string(),value:zod.z.string()}),vt=zod.z.object({key:zod.z.string(),category:zod.z.string().optional(),label:zod.z.string().optional(),value:zod.z.string().nullish(),unit:zod.z.string().nullish(),observed_at:zod.z.string().nullish(),status:zod.z.string().nullish(),origin:zod.z.string().nullish(),canonical_key:zod.z.string().nullish()}),_t=zod.z.object({at:zod.z.string(),value:zod.z.number().nullish(),display:zod.z.string().nullish(),origin:zod.z.string().nullish()}),bt=zod.z.object({key:zod.z.string(),label:zod.z.string().optional(),points:zod.z.array(_t).optional()}),ht=zod.z.object({title:zod.z.string(),detail:zod.z.string().nullish(),due_at:zod.z.string().nullish()}),Et=zod.z.object({doc_id:zod.z.string(),title:zod.z.string().nullish(),page_count:zod.z.number().nullish(),received_at:zod.z.string().nullish()});zod.z.object({identity:zod.z.array(mt).optional(),entities:zod.z.array(vt).optional(),entity_series:zod.z.array(bt).optional(),forward_looking:zod.z.array(ht).optional(),documents:zod.z.array(Et).optional()});zod.z.object({pet_ref:zod.z.string().optional(),granted:zod.z.boolean().optional(),version:zod.z.string().nullish(),granted_at:zod.z.string().nullish()});function de(e,t){return typeof e=="number"&&Number.isFinite(e)?e:t}n(de,"numberOr");var gt="/widget/v1/records/sandbox/requests",fe=64,Rt=new Set(["records","no_records","declined"]),St=new Set(["applied","already_applied","not_applicable"]);function I(e){return y("validationFailed",{retryable:false,wireMessage:e})}n(I,"invalid");function wt(e){return typeof e!="string"||e.length===0?I("request_id is required and must be a non-empty string"):F(e)?I("request_id contains an unpaired surrogate and cannot be encoded"):[...e].length>fe?I(`request_id is longer than ${fe} characters`):null}n(wt,"requestIdError");function Ct(e){if(typeof e!="object"||e===null)return null;let{result:t,request:r}=e;if(typeof t!="string"||!St.has(t))return null;let o=pe(r);return o===null?null:Object.freeze({result:t,request:o})}n(Ct,"mapActionResult");function ye(e){let t=e.funnel??k({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),r=n(async(o,a,s,u)=>{let p=wt(a);if(p!==null)return l(p);let c=`${gt}/${encodeURIComponent(a)}/${s}`,f=await t.send(o,u===void 0?{method:"POST",path:c}:{method:"POST",path:c,body:u});if(!f.ok)return l(f.error);let w=Ct(f.value);return w===null?l(y("internalError",{retryable:false})):T(w)},"run");return {simulateClinicReply(o,a){return typeof a!="string"||!Rt.has(a)?Promise.resolve(l(I("outcome must be records, no_records or declined"))):r("records.sandbox.clinicReply",o,"clinic-reply",{outcome:a})},publishSampleRecord(o){return r("records.sandbox.publishSample",o,"publish-sample")}}}n(ye,"createRecordsSandboxController");function Tt(){let{runtime:e,userRef:t,scopeEpoch:r}=h();return react.useMemo(()=>{let{services:o}=e.registry;return ye({auth:o.authFor(t),...o.errorPolicy?{errorPolicy:o.errorPolicy}:{}})},[e,t,r])}n(Tt,"useEverfurRecordsSandbox");var L="/widget/v1/televet/sandbox/visits",Ot=128,me=64,be=new Set(["booked","cancelled","completed","no_show"]),kt=new Set(["applied","already_applied","not_applicable"]),ve=new Set(["rescheduled","reminder","followup_sent","message_received","ended"]),_e=new Set(["24h","30m"]);function _(e){return y("validationFailed",{retryable:false,wireMessage:e})}n(_,"invalid");function N(e,t,r){return typeof t!="string"||t.length===0?_(`${e} is required and must be a non-empty string`):F(t)?_(`${e} contains an unpaired surrogate and cannot be encoded`):le(t)>r?_(`${e} is longer than ${r} characters`):null}n(N,"textError");function Ft(e){if(typeof e!="object"||e===null)return null;let{result:t,visit:r}=e;if(typeof t!="string"||!kt.has(t)||typeof r!="object"||r===null)return null;let{visit_ref:o,pet_ref:a,status:s,scheduled_at:u}=r;return typeof o!="string"||o.length===0||typeof a!="string"||a.length===0||typeof s!="string"||!be.has(s)||typeof u!="string"||u.length===0?null:Object.freeze({result:t,visit:Object.freeze({visitRef:o,petRef:a,status:s,scheduledAt:u})})}n(Ft,"mapActionResult");function he(e){let t=e.funnel??k({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),r=n(async(o,a,s)=>{let u=await t.send(o,{method:"POST",path:a,body:s},{idempotent:false,maxAttempts:1});if(!u.ok)return l(u.error);let p=Ft(u.value);return p===null?l(y("internalError",{retryable:false})):T(p)},"run");return {createVisit(o){let a=N("pet_ref",o,Ot);return a!==null?Promise.resolve(l(a)):r("televet.sandbox.createVisit",L,{pet_ref:o})},advanceVisit(o,a){let s=N("visit_ref",o,me);if(s!==null)return Promise.resolve(l(s));if(typeof a!="string"||!be.has(a))return Promise.resolve(l(_("to must be booked, cancelled, completed or no_show")));let u=`${L}/${encodeURIComponent(o)}/advance`;return r("televet.sandbox.advanceVisit",u,{to:a})},simulateVisitEvent(o,a,s){let u=N("visit_ref",o,me);if(u!==null)return Promise.resolve(l(u));if(typeof a!="string"||!ve.has(a))return Promise.resolve(l(_(`event must be one of ${[...ve].join(", ")}`)));if(a==="reminder"){if(typeof s!="string"||!_e.has(s))return Promise.resolve(l(_(`stage must be one of ${[..._e].join(", ")} for a reminder`)))}else if(s!==void 0)return Promise.resolve(l(_("stage is only for a reminder")));let p=`${L}/${encodeURIComponent(o)}/simulate`;return r("televet.sandbox.simulateVisitEvent",p,s===void 0?{event:a}:{event:a,stage:s})}}}n(he,"createVetVisitSandboxController");function At(){let{runtime:e,userRef:t,scopeEpoch:r}=h();return react.useMemo(()=>{let{services:o}=e.registry;return he({auth:o.authFor(t),...o.errorPolicy?{errorPolicy:o.errorPolicy}:{}})},[e,t,r])}n(At,"useEverfurVetVisitSandbox");exports.useEverfurRecordsSandbox=Tt;exports.useEverfurTestEntitlements=ke;exports.useEverfurVetVisitSandbox=At;
|
|
1
|
+
'use strict';var react=require('react'),zod=require('zod');var Ce=Object.defineProperty;var n=(e,t)=>Ce(e,"name",{value:t,configurable:true});function T(e,t){return Object.freeze(t===void 0?{ok:true,value:e}:{ok:true,value:e,warning:t})}n(T,"ok");function l(e){return Object.freeze({ok:false,error:e})}n(l,"err");var x=class x extends Error{constructor(t,r){super(r),this.name="EverfurConfigError",this.kind=t,Object.setPrototypeOf(this,x.prototype);}};n(x,"EverfurConfigError");var R=x;var W=Symbol.for("@everfur/sdk#EverfurContext@v1"),K=globalThis,$=K[W]??(K[W]=react.createContext(null));$.displayName??="EverfurContext";function h(){let e=react.useContext($);if(e===null)throw new R("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}n(h,"useEverfurContext");function ke(){let{runtime:e}=h();return react.useMemo(()=>({apply:n(t=>e.updateEntitlements(t),"apply")}),[e])}n(ke,"useEverfurTestEntitlements");var D=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(D.map(e=>e.wireCode));var Fe=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"}),Q=Object.freeze(D.map(e=>Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:Fe[e.wireCode]}))),Ie=new Map(Q.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),Ae=Object.freeze(["http_envelope",...[...new Set(Q.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function O(e,t){if(typeof e!="string")return;let r=e.trim().toUpperCase();if(r.length!==0)for(let o of [t??"http_envelope",...Ae]){let a=Ie.get(o+r);if(a)return a}}n(O,"contractErrorFor");function Pe(e){return e.envelope==="sse_frame"?`/errors#sse-${e.wireCode}`:e.envelope==="oauth_error"?`/errors#oauth-${e.wireCode}`:`/errors#${e.wireCode}`}n(Pe,"contractDocUrl");function X(e){return null}n(X,"publishedDocUrl");var je=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 J(e){return je[e]}n(J,"categoryFor");function Z(e){let t=O(e);if(t)return t.normalized;let r=(e??"").trim().toUpperCase(),o=r.replace(/[^A-Z0-9]/g,"");if(o==="AUTHREJECTED")return "authRejected";if(r.startsWith("AUTH"))return "authExpired";switch(o){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"}}n(Z,"fromWire");var ze=new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function V(e){return ze.has(e)}n(V,"isAutoRetryable");var qe=new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function ee(e){return V(e)||qe.has(e)}n(ee,"isRetryableCode");var De=500,U=8e3,te=4;function re(e,t=Math.random){let r=Math.max(0,e),o=Math.min(De*2**r,U);return Math.floor(t()*o)}n(re,"backoffDelayMs");var Ve=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 Ue(e){return Ve[e]}n(Ue,"userFacingError");function ne(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:false,writable:false,configurable:false});}n(ne,"defineHidden");var Me=/^[a-z][a-z0-9_]{0,63}$/;function y(e,t){let r=O(t?.wireCode,t?.wireEnvelope),o={code:e,category:J(e),retryable:t?.retryable??ee(e),displayMessage:Ue(e)};if(t?.httpStatus!==void 0&&(o.httpStatus=t.httpStatus),t?.requestId&&(o.requestId=t.requestId),typeof t?.reasonCode=="string"&&Me.test(t.reasonCode)&&(o.reasonCode=t.reasonCode),r);return t?.wireMessage&&ne(o,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&ne(o,"raw",t.raw),Object.freeze(o)}n(y,"makeEverfurError");function oe(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})}n(oe,"errorFrame");function Be(e){let t={};return e.mode==="personalized"?t.authorization=`Bearer ${e.token}`:t["x-everfur-partner-key"]=e.publishableKey,e.userRef&&(t["x-everfur-user-ref"]=e.userRef),e.sessionId&&(t["x-everfur-session-id"]=e.sessionId),t}n(Be,"authHeaders");function S(e,t){return {...e,headers:{...Ye(e.headers),...Be(t)}}}n(S,"withAuthHeaders");function Ye(e){if(!e)return {};let t={};for(let[r,o]of Object.entries(e)){let a=r.toLowerCase();a==="authorization"||a==="x-everfur-partner-key"||(t[r]=o);}return t}n(Ye,"stripAuthHeaders");async function ie(e,t){if(t.mode==="anonymous")return t.transport.request(S(e,{mode:"anonymous",publishableKey:t.publishableKey,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));let r;try{r=await t.identity.currentToken();}catch{return l(M())}let o=await t.transport.request(S(e,{mode:"personalized",token:r,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(o.ok||o.error.httpStatus!==401)return o;let a;try{a=await t.identity.currentToken({forceRefresh:!0});}catch{return l(M())}let s=await t.transport.request(S(e,{mode:"personalized",token:a,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return !s.ok&&s.error.httpStatus===401?l(M(s.error.httpStatus)):s}n(ie,"authedSend");function M(e){return y("authRejected",{retryable:false,...e!==void 0?{httpStatus:e}:{}})}n(M,"authRejectedError");function ae(e){return y("internalError",{retryable:true,wireMessage:He(e)})}n(ae,"networkError");function He(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}n(He,"describeCause");var We=3e4,Ke=U*2,$e="idempotency-key",Ge=new Set(["POST","PUT","PATCH","DELETE"]),Qe=Object.freeze({onEvent(){}}),Xe=Object.freeze({setTimeout:n((e,t)=>setTimeout(e,t),"setTimeout"),clearTimeout:n(e=>clearTimeout(e),"clearTimeout"),now:n(()=>Date.now(),"now")});function Je(e){let t=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return t.length===0?null:`efs_${t}`.slice(0,128)}n(Je,"seededIdempotencyKey");function k(e){let t=e.observer??Qe,r=e.timers??Xe,o=e.rng??Math.random,a=e.sleep??((m,d)=>pt(m,r,d)),s=e.maxAttempts??te,u=e.unaryTimeoutMs??We,p=e.newIdempotencyKey??et(),c=n(m=>{try{t.onEvent(m);}catch{}},"emit");async function f(m,d,b){let A=b?.maxAttempts,ge=Math.max(1,A??s),Re=b?.idempotent??Ge.has(d.method),Se=b?.idempotencyKey===void 0?null:Je(b.idempotencyKey),P=Re?Se??p():null,we=Ze(d,P),j=0;for(;;){let E=n(q=>Object.freeze({call:m,method:d.method,path:d.path,attempt:j,...P?{idempotencyKey:P}:{},...q}),"stamp");c(E({phase:"attempt"}));let Y=dt(u,r),H=ct(Y.signal,d.signal),g;try{g=await ie({...we,signal:H.signal},e.auth);}catch(q){g=l(ae(q));}finally{H.dispose(),Y.cancel();}if(g.ok)return c(E({phase:"settled",ok:true,reason:"ok"})),g;let v=g.error,C=rt(v,j,{maxAttempts:ge,rng:o,now:r.now(),aborted:d.signal?.aborted===true,...A!==void 0?{perCallMaxAttempts:A}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),z={ok:false,code:v.code,reason:C.reason,...v.httpStatus!==void 0?{httpStatus:v.httpStatus}:{},...v.requestId!==void 0?{requestId:v.requestId}:{}};if(!C.retry)return c(E({phase:"settled",...z})),l(v);if(c(E({phase:"retry",...z,delayMs:C.delayMs})),await a(C.delayMs,d.signal),d.signal?.aborted===true)return c(E({phase:"settled",...z,reason:"aborted"})),l(v);j+=1;}}n(f,"send");async function w(m){return S(m,await ut(e.auth))}n(w,"authorize");async function*Ee(m,d,b){c(Object.freeze({call:m,phase:"stream.open",method:d.method,path:d.path,attempt:0}));try{yield*e.auth.transport.stream(d,b);}catch{yield oe({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:null});}}return n(Ee,"stream"),Object.freeze({send:f,authorize:w,stream:Ee})}n(k,"createRequestFunnel");function Ze(e,t){let r={};for(let[o,a]of Object.entries(e.headers??{}))o.toLowerCase()!==$e&&(r[o]=a);return t!==null&&(r["Idempotency-Key"]=t),{...e,headers:r}}n(Ze,"assembleHeaders");function et(){let e=0;return ()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}n(et,"defaultIdempotencyKeyFactory");var tt=10;function rt(e,t,r){if(r.aborted)return {retry:false,reason:"aborted"};let o=nt(e);if(o==="quota")return {retry:false,reason:"daily-quota-exhausted"};if(o!=="burst"&&!V(e.code))return {retry:false,reason:"terminal-code"};let a=o==="burst"?"burst-throttle":"retryable-code";if(n(()=>{if(r.policy===void 0)return false;try{return !r.policy.shouldRetry(e.code,t)}catch{return false}},"policyVetoedRetry")())return {retry:false,reason:"terminal-code"};let u=n(()=>{if(r.policy===void 0)return null;let f;try{f=r.policy.maxAttempts(e.code);}catch{return null}return typeof f!="number"||!Number.isFinite(f)?null:Math.max(1,Math.min(tt,Math.floor(f)))},"policyCeiling"),p=r.perCallMaxAttempts??u()??r.maxAttempts;if(t+1>=p)return {retry:false,reason:"attempts-exhausted"};let c=ot(e,r.now);return c!==null?c>Ke?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:a,delayMs:c}:{retry:true,reason:a,delayMs:re(t,r.rng)}}n(rt,"decideRetry");function nt(e){let t=e.code==="unknown"?Z(lt(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}n(nt,"throttleKind");function ot(e,t){let r=at(e.raw);if(r!==null){let a=r-t;return a>0?a:0}let o=it(e.raw);return o===null?null:Math.round(o*1e3)}n(ot,"retryOverrideMs");function it(e){for(let t of L(e)){let r=t.retry_after_seconds;if(typeof r=="number"&&Number.isFinite(r)&&r>=0)return r}return null}n(it,"findRetryAfterSeconds");function at(e){for(let t of L(e)){let r=t.resets_at,o=st(r);if(o!==null)return o}return null}n(at,"findResetsAt");function L(e){if(!se(e))return [];let t=[e];for(let r of ["error","detail"]){let o=e[r];se(o)&&t.push(o);}return t}n(L,"candidateScopes");function st(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 t=Date.parse(e);return Number.isFinite(t)?t:null}return null}n(st,"parseInstantMs");function lt(e){for(let t of L(e)){let r=t.code;if(typeof r=="string"&&r.length>0)return r}return null}n(lt,"rawWireCode");function se(e){return typeof e=="object"&&e!==null}n(se,"isRecord");async function ut(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}:{}}}n(ut,"resolveDeviceAuth");function dt(e,t){let r=new AbortController,o=t.setTimeout(()=>r.abort(),e);return {signal:r.signal,cancel:n(()=>t.clearTimeout(o),"cancel")}}n(dt,"boundedSignal");function ct(e,t){let r=n(()=>{},"noop");if(!t)return {signal:e,dispose:r};let o=new AbortController;if(e.aborted||t.aborted)return o.abort(),{signal:o.signal,dispose:r};let a=n(()=>o.abort(),"onAbort");return e.addEventListener("abort",a,{once:true}),t.addEventListener("abort",a,{once:true}),{signal:o.signal,dispose:n(()=>{e.removeEventListener("abort",a),t.removeEventListener("abort",a);},"dispose")}}n(ct,"mergeSignals");function pt(e,t,r){return e<=0||r?.aborted===true?Promise.resolve():new Promise(o=>{let a=t.setTimeout(()=>{r?.removeEventListener("abort",s),o();},e),s=n(()=>{t.clearTimeout(a),o();},"onAbort");r?.addEventListener("abort",s,{once:true});})}n(pt,"delayAbortable");function F(e){for(let t=0;t<e.length;t+=1){let r=e.charCodeAt(t);if(r>=55296&&r<=56319){let o=e.charCodeAt(t+1);if(!(o>=56320&&o<=57343))return true;t+=1;}else if(r>=56320&&r<=57343)return true}return false}n(F,"hasLoneSurrogate");function le(e){return [...e].length}n(le,"serverLength");var ce=new Set(["requested","awaiting_clinic","awaiting_upload","received","parsing","in_review","published","failed","revoked"]),ue=Object.freeze({submitted:"requested",sent:"requested",dispatching:"requested",awaiting_response:"awaiting_clinic",clinic_responded_no_records:"awaiting_clinic",records_received:"received",parsing_failed:"in_review",review_email_failed:"in_review",clinic_declined:"failed"});function ft(e){let t=Object.prototype.hasOwnProperty.call(ue,e)?ue[e]:void 0;if(t!==void 0)return t;let r=e;return ce.has(r)?r:"parsing"}n(ft,"normalizeStatus");var yt=zod.z.object({request_id:zod.z.string().min(1),pet_ref:zod.z.string().min(1),status:zod.z.string(),simple_status:zod.z.string().nullish(),simple_status_detail:zod.z.string().nullish(),status_label:zod.z.string().optional(),dispatch_status:zod.z.string().nullish(),can_retry_send:zod.z.boolean().optional(),can_revoke:zod.z.boolean().optional(),can_convert_to_upload:zod.z.boolean().optional(),can_update_clinic_email:zod.z.boolean().optional(),reminder_count:zod.z.number().int().nonnegative().optional(),last_reminder_at:zod.z.string().nullish(),waiting_expectation:zod.z.string().nullish(),document_count:zod.z.number().optional(),held_item_count:zod.z.number().optional(),received_at:zod.z.string().nullish(),parsing_started_at:zod.z.string().nullish(),review_started_at:zod.z.string().nullish(),created_at:zod.z.string().optional(),updated_at:zod.z.string().optional(),source:zod.z.string().nullish().catch(null),action_needed_label:zod.z.string().nullish().catch(null),failure_reason:zod.z.string().nullish().catch(null),failure_code:zod.z.string().nullish().catch(null),recovery_stage:zod.z.string().nullish().catch(null),show_clinic_phone:zod.z.boolean().optional().catch(void 0),clinic_name:zod.z.string().nullish().catch(null),clinic_email:zod.z.string().nullish().catch(null),clinic_phone:zod.z.string().nullish().catch(null),converted_to_upload_at:zod.z.string().nullish().catch(null),request_group_id:zod.z.string().nullish().catch(null)}).passthrough();function pe(e){let t=yt.safeParse(e);if(!t.success)return null;let r=t.data,o=mt(r.simple_status),a=o==="requested"&&(r.status==="awaiting_upload"||r.simple_status_detail==="awaiting_owner_upload")?"awaiting_upload":o==="parsing"&&(r.simple_status_detail==="in_review"||r.simple_status_detail==="review_email_failed")?"in_review":o??ft(r.status);return Object.freeze({id:r.request_id,petRef:r.pet_ref,status:a,simpleStatus:o,simpleStatusDetail:r.simple_status_detail??null,statusLabel:r.status_label??"",dispatchStatus:r.dispatch_status??null,canRetrySend:r.can_retry_send===true,canRevoke:r.can_revoke===true,canConvertToUpload:r.can_convert_to_upload===true,canUpdateClinicEmail:r.can_update_clinic_email===true,reminderCount:r.reminder_count??0,lastReminderAt:r.last_reminder_at??null,waitingExpectation:r.waiting_expectation??null,documentCount:de(r.document_count,0),heldItemCount:de(r.held_item_count,0),receivedAt:r.received_at??null,parsingStartedAt:r.parsing_started_at??null,reviewStartedAt:r.review_started_at??null,createdAt:r.created_at??"",updatedAt:r.updated_at??"",wireStatus:r.status,source:r.source??null,actionNeededLabel:r.action_needed_label??null,failureReason:r.failure_reason??null,failureCode:r.failure_code??null,recoveryStage:r.recovery_stage??null,showClinicPhone:r.show_clinic_phone===true,clinicName:r.clinic_name??null,clinicEmail:r.clinic_email??null,clinicPhone:r.clinic_phone??null,convertedToUploadAt:r.converted_to_upload_at??null,requestGroupId:r.request_group_id??null})}n(pe,"mapRequestView");zod.z.object({request_group_id:zod.z.string().min(1),pet_ref:zod.z.string().min(1),total:zod.z.number().int().nonnegative(),responded:zod.z.number().int().nonnegative(),pending:zod.z.number().int().nonnegative(),members:zod.z.array(zod.z.unknown())});function mt(e){return !e||e==="awaiting_upload"||e==="in_review"?null:ce.has(e)?e:null}n(mt,"normalizeSimpleStatus");zod.z.object({source_doc_id:zod.z.string().min(1),request_id:zod.z.string().min(1)});var vt=zod.z.object({label:zod.z.string(),value:zod.z.string()}),_t=zod.z.object({key:zod.z.string(),category:zod.z.string().optional(),label:zod.z.string().optional(),value:zod.z.string().nullish(),unit:zod.z.string().nullish(),observed_at:zod.z.string().nullish(),status:zod.z.string().nullish(),origin:zod.z.string().nullish(),canonical_key:zod.z.string().nullish()}),bt=zod.z.object({at:zod.z.string(),value:zod.z.number().nullish(),display:zod.z.string().nullish(),origin:zod.z.string().nullish()}),ht=zod.z.object({key:zod.z.string(),label:zod.z.string().optional(),points:zod.z.array(bt).optional()}),Et=zod.z.object({title:zod.z.string(),detail:zod.z.string().nullish(),due_at:zod.z.string().nullish()}),gt=zod.z.object({doc_id:zod.z.string(),title:zod.z.string().nullish(),page_count:zod.z.number().nullish(),received_at:zod.z.string().nullish()});zod.z.object({identity:zod.z.array(vt).optional(),entities:zod.z.array(_t).optional(),entity_series:zod.z.array(ht).optional(),forward_looking:zod.z.array(Et).optional(),documents:zod.z.array(gt).optional()});zod.z.object({pet_ref:zod.z.string().optional(),granted:zod.z.boolean().optional(),version:zod.z.string().nullish(),granted_at:zod.z.string().nullish()});function de(e,t){return typeof e=="number"&&Number.isFinite(e)?e:t}n(de,"numberOr");var Rt="/widget/v1/records/sandbox/requests",fe=64,St=new Set(["records","no_records","declined"]),wt=new Set(["applied","already_applied","not_applicable"]);function I(e){return y("validationFailed",{retryable:false,wireMessage:e})}n(I,"invalid");function Ct(e){return typeof e!="string"||e.length===0?I("request_id is required and must be a non-empty string"):F(e)?I("request_id contains an unpaired surrogate and cannot be encoded"):[...e].length>fe?I(`request_id is longer than ${fe} characters`):null}n(Ct,"requestIdError");function xt(e){if(typeof e!="object"||e===null)return null;let{result:t,request:r}=e;if(typeof t!="string"||!wt.has(t))return null;let o=pe(r);return o===null?null:Object.freeze({result:t,request:o})}n(xt,"mapActionResult");function ye(e){let t=e.funnel??k({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),r=n(async(o,a,s,u)=>{let p=Ct(a);if(p!==null)return l(p);let c=`${Rt}/${encodeURIComponent(a)}/${s}`,f=await t.send(o,u===void 0?{method:"POST",path:c}:{method:"POST",path:c,body:u});if(!f.ok)return l(f.error);let w=xt(f.value);return w===null?l(y("internalError",{retryable:false})):T(w)},"run");return {simulateClinicReply(o,a){return typeof a!="string"||!St.has(a)?Promise.resolve(l(I("outcome must be records, no_records or declined"))):r("records.sandbox.clinicReply",o,"clinic-reply",{outcome:a})},publishSampleRecord(o){return r("records.sandbox.publishSample",o,"publish-sample")}}}n(ye,"createRecordsSandboxController");function Ot(){let{runtime:e,userRef:t,scopeEpoch:r}=h();return react.useMemo(()=>{let{services:o}=e.registry;return ye({auth:o.authFor(t),...o.errorPolicy?{errorPolicy:o.errorPolicy}:{}})},[e,t,r])}n(Ot,"useEverfurRecordsSandbox");var N="/widget/v1/televet/sandbox/visits",kt=128,me=64,be=new Set(["booked","cancelled","completed","no_show"]),Ft=new Set(["applied","already_applied","not_applicable"]),ve=new Set(["rescheduled","reminder","followup_sent","message_received","ended"]),_e=new Set(["24h","30m"]);function _(e){return y("validationFailed",{retryable:false,wireMessage:e})}n(_,"invalid");function B(e,t,r){return typeof t!="string"||t.length===0?_(`${e} is required and must be a non-empty string`):F(t)?_(`${e} contains an unpaired surrogate and cannot be encoded`):le(t)>r?_(`${e} is longer than ${r} characters`):null}n(B,"textError");function It(e){if(typeof e!="object"||e===null)return null;let{result:t,visit:r}=e;if(typeof t!="string"||!Ft.has(t)||typeof r!="object"||r===null)return null;let{visit_ref:o,pet_ref:a,status:s,scheduled_at:u}=r;return typeof o!="string"||o.length===0||typeof a!="string"||a.length===0||typeof s!="string"||!be.has(s)||typeof u!="string"||u.length===0?null:Object.freeze({result:t,visit:Object.freeze({visitRef:o,petRef:a,status:s,scheduledAt:u})})}n(It,"mapActionResult");function he(e){let t=e.funnel??k({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),r=n(async(o,a,s)=>{let u=await t.send(o,{method:"POST",path:a,body:s},{idempotent:false,maxAttempts:1});if(!u.ok)return l(u.error);let p=It(u.value);return p===null?l(y("internalError",{retryable:false})):T(p)},"run");return {createVisit(o){let a=B("pet_ref",o,kt);return a!==null?Promise.resolve(l(a)):r("televet.sandbox.createVisit",N,{pet_ref:o})},advanceVisit(o,a){let s=B("visit_ref",o,me);if(s!==null)return Promise.resolve(l(s));if(typeof a!="string"||!be.has(a))return Promise.resolve(l(_("to must be booked, cancelled, completed or no_show")));let u=`${N}/${encodeURIComponent(o)}/advance`;return r("televet.sandbox.advanceVisit",u,{to:a})},simulateVisitEvent(o,a,s){let u=B("visit_ref",o,me);if(u!==null)return Promise.resolve(l(u));if(typeof a!="string"||!ve.has(a))return Promise.resolve(l(_(`event must be one of ${[...ve].join(", ")}`)));if(a==="reminder"){if(typeof s!="string"||!_e.has(s))return Promise.resolve(l(_(`stage must be one of ${[..._e].join(", ")} for a reminder`)))}else if(s!==void 0)return Promise.resolve(l(_("stage is only for a reminder")));let p=`${N}/${encodeURIComponent(o)}/simulate`;return r("televet.sandbox.simulateVisitEvent",p,s===void 0?{event:a}:{event:a,stage:s})}}}n(he,"createVetVisitSandboxController");function Pt(){let{runtime:e,userRef:t,scopeEpoch:r}=h();return react.useMemo(()=>{let{services:o}=e.registry;return he({auth:o.authFor(t),...o.errorPolicy?{errorPolicy:o.errorPolicy}:{}})},[e,t,r])}n(Pt,"useEverfurVetVisitSandbox");exports.useEverfurRecordsSandbox=Ot;exports.useEverfurTestEntitlements=ke;exports.useEverfurVetVisitSandbox=Pt;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { E as EntitlementSnapshot } from '../../runtimeTypes-
|
|
2
|
-
import {
|
|
3
|
-
export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurResult-DN9pL2Ab.cjs';
|
|
1
|
+
import { E as EntitlementSnapshot } from '../../runtimeTypes-RN-VXTFV.cjs';
|
|
2
|
+
import { E as EverfurResult } from '../../EverfurResult-ZtH-YV1h.cjs';
|
|
4
3
|
import { R as RecordsRequestId, P as PetRef } from '../../ids-B2GAAifq.cjs';
|
|
5
4
|
export { B as Brand, _ as __brand } from '../../ids-B2GAAifq.cjs';
|
|
6
|
-
import { d as RecordsRequestView } from '../../models-
|
|
7
|
-
export { c as RecordsRequestStatus, e as RecordsSimpleStatus } from '../../models-
|
|
8
|
-
export {
|
|
5
|
+
import { d as RecordsRequestView } from '../../models-Bn2z0NNo.cjs';
|
|
6
|
+
export { c as RecordsRequestStatus, e as RecordsSimpleStatus } from '../../models-Bn2z0NNo.cjs';
|
|
7
|
+
export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError-DmELDpXp.cjs';
|
|
8
|
+
export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../branding-Xb_wL8N1.cjs';
|
|
9
9
|
export { b as CapabilityDisabled, D as DisabledLevel, E as EntitlementDecision } from '../../resolve-D4Ywz5OS.cjs';
|
|
10
|
-
import '../../petsRepository-
|
|
11
|
-
import '../../identity-
|
|
12
|
-
import '../../config
|
|
10
|
+
import '../../petsRepository-D1bnxDZg.cjs';
|
|
11
|
+
import '../../identity-DjqhDm5Z.cjs';
|
|
12
|
+
import '../../config-6qS7Sohy.cjs';
|
|
13
13
|
import '../../profile-CSs1wlXT.cjs';
|
|
14
14
|
import '../../cacheEpoch-DknKn3S0.cjs';
|
|
15
|
-
import '../../ErrorPolicyPort-
|
|
16
|
-
import '../../ports-
|
|
17
|
-
import '../../casesRepository-
|
|
18
|
-
import '../../requestFunnel-
|
|
15
|
+
import '../../ErrorPolicyPort-D6CybiqJ.cjs';
|
|
16
|
+
import '../../ports-DNXyyzZF.cjs';
|
|
17
|
+
import '../../casesRepository-aryld7fJ.cjs';
|
|
18
|
+
import '../../requestFunnel-Bqc1inM9.cjs';
|
|
19
19
|
import '../../TelemetryPort-BDNr00hu.cjs';
|
|
20
20
|
import '../../ports-BN6RHF9W.cjs';
|
|
21
21
|
import '../../CameraPort-Cv31Pz7g.cjs';
|
|
22
|
+
import '../../tokens-CIngRkvt.cjs';
|
|
22
23
|
|
|
23
24
|
/** The testing seam handle: apply a resolved verdict to THIS provider's runtime. */
|
|
24
25
|
interface EverfurTestEntitlements {
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { E as EntitlementSnapshot } from '../../runtimeTypes-
|
|
2
|
-
import {
|
|
3
|
-
export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurResult-DN9pL2Ab.js';
|
|
1
|
+
import { E as EntitlementSnapshot } from '../../runtimeTypes-C0yPBz89.js';
|
|
2
|
+
import { E as EverfurResult } from '../../EverfurResult-SGvHKsCB.js';
|
|
4
3
|
import { R as RecordsRequestId, P as PetRef } from '../../ids-B2GAAifq.js';
|
|
5
4
|
export { B as Brand, _ as __brand } from '../../ids-B2GAAifq.js';
|
|
6
|
-
import { d as RecordsRequestView } from '../../models-
|
|
7
|
-
export { c as RecordsRequestStatus, e as RecordsSimpleStatus } from '../../models-
|
|
8
|
-
export {
|
|
5
|
+
import { d as RecordsRequestView } from '../../models-DSqA5Ahs.js';
|
|
6
|
+
export { c as RecordsRequestStatus, e as RecordsSimpleStatus } from '../../models-DSqA5Ahs.js';
|
|
7
|
+
export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError-DmELDpXp.js';
|
|
8
|
+
export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../branding-xpQ056sM.js';
|
|
9
9
|
export { b as CapabilityDisabled, D as DisabledLevel, E as EntitlementDecision } from '../../resolve-D4Ywz5OS.js';
|
|
10
|
-
import '../../petsRepository-
|
|
11
|
-
import '../../identity-
|
|
12
|
-
import '../../config-
|
|
10
|
+
import '../../petsRepository-DhsX3GLw.js';
|
|
11
|
+
import '../../identity-Dy_L7Yq4.js';
|
|
12
|
+
import '../../config-X6BtwDwQ.js';
|
|
13
13
|
import '../../profile-CSs1wlXT.js';
|
|
14
14
|
import '../../cacheEpoch-DknKn3S0.js';
|
|
15
|
-
import '../../ErrorPolicyPort-
|
|
16
|
-
import '../../ports-
|
|
17
|
-
import '../../casesRepository-
|
|
18
|
-
import '../../requestFunnel-
|
|
15
|
+
import '../../ErrorPolicyPort-D22LUVrK.js';
|
|
16
|
+
import '../../ports-C0m1G1fS.js';
|
|
17
|
+
import '../../casesRepository-BTAecTnF.js';
|
|
18
|
+
import '../../requestFunnel-FvE5yLDD.js';
|
|
19
19
|
import '../../TelemetryPort-BDNr00hu.js';
|
|
20
20
|
import '../../ports-BN6RHF9W.js';
|
|
21
21
|
import '../../CameraPort-Cv31Pz7g.js';
|
|
22
|
+
import '../../tokens-CIngRkvt.js';
|
|
22
23
|
|
|
23
24
|
/** The testing seam handle: apply a resolved verdict to THIS provider's runtime. */
|
|
24
25
|
interface EverfurTestEntitlements {
|