import { HINClient } from './integration/hin';
import { PrescriptionSignContext, PrescriptionSignContextInputs, PrescriptionSignEvents } from './types';
/**
 * XState Machine
 * This machine manages the ePrescription signature process
 */
export declare const prescriptionSigningMachine: import('xstate').StateMachine<PrescriptionSignContext, {
    type: "OPEN_POPUP";
    popupRef: Window | null;
} | {
    type: "CLOSE_POPUP";
} | {
    type: "START";
    encodedCHMED: string;
    shouldGeneratePdf: boolean;
} | {
    type: "TERMINATE";
} | {
    type: "VERIFY_SESSION";
} | {
    type: "REFRESH_TOKEN";
} | {
    type: "GET_TOKEN";
} | {
    type: "GET_SAML_AUTH_CODE";
    recoverable?: boolean;
    sessionToken: string;
} | {
    type: "GET_SAML_AUTH_HANDLE";
    authCode: string;
} | {
    type: "VALIDATE_CHMED";
    sessionToken: string;
} | {
    type: "xstate.done.actor.getSAMLAuthHandle";
    sessionToken: string;
    recoverable?: boolean;
} | {
    type: "SIGN_PRESCRIPTION";
    sessionToken: string;
    recoverable?: boolean;
} | {
    type: "AUTHENTICATION_SUCCESS";
} | {
    type: "ERROR";
    error: import('../../../../core/src/errors/index.ts').DomainError;
} | {
    type: "UNAUTHORIZED_TOKEN";
} | {
    type: "UNAUTHORIZED_HANDLE";
}, {
    [x: string]: import('xstate').ActorRefFromLogic<import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
        sessionToken?: string;
        hinClient: HINClient;
    }, import('xstate').EventObject>> | import('xstate').ActorRefFromLogic<import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
        popupRef: Window | null;
    }, import('xstate').EventObject>> | import('xstate').ActorRefFromLogic<import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
        hinClient: HINClient;
        accessToken: string;
    }, import('xstate').EventObject>> | import('xstate').ActorRefFromLogic<import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
        hinClient: HINClient;
    }, import('xstate').EventObject>> | import('xstate').ActorRefFromLogic<import('xstate').PromiseActorLogic<void, {
        encodedCHMED?: string;
        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
        hinClient: HINClient;
        sessionToken?: string;
    }, import('xstate').EventObject>> | import('xstate').ActorRefFromLogic<import('xstate').PromiseActorLogic<void, {
        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
        hinClient: HINClient;
        sessionToken?: string;
    }, import('xstate').EventObject>> | import('xstate').ActorRefFromLogic<import('xstate').PromiseActorLogic<void, {
        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
        popupRef: Window | null;
        hinClient: HINClient;
    }, import('xstate').EventObject>> | import('xstate').ActorRefFromLogic<import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
        hinClient: HINClient;
        sessionToken?: string;
    }, import('xstate').EventObject>> | import('xstate').ActorRefFromLogic<import('xstate').PromiseActorLogic<{
        sessionToken: string;
    }, {
        hinClient: HINClient;
        sessionToken?: string;
    }, import('xstate').EventObject>> | import('xstate').ActorRefFromLogic<import('xstate').PromiseActorLogic<void, {
        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
        popupRef: Window | null;
        hinClient: HINClient;
        recover: boolean;
        sessionToken?: string;
    }, import('xstate').EventObject>> | import('xstate').ActorRefFromLogic<import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
        hinClient: HINClient;
    }, import('xstate').EventObject>> | import('xstate').ActorRefFromLogic<import('xstate').PromiseActorLogic<{
        sessionToken: string;
    }, {
        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
        authCode: string;
        hinClient: HINClient;
        sessionToken?: string;
    }, import('xstate').EventObject>> | import('xstate').ActorRefFromLogic<import('xstate').PromiseActorLogic<{
        signedPrescription: string;
        generatedPdf?: string;
    }, {
        encodedCHMED?: string;
        shouldGeneratePdf: boolean;
        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
        hinClient: HINClient;
        sessionToken?: string;
        recover: boolean;
    }, import('xstate').EventObject>> | import('xstate').ActorRefFromLogic<import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
        error: import('../../../../core/src/errors/index.ts').DomainError;
    }, import('xstate').EventObject>> | import('xstate').ActorRefFromLogic<import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
        signedCHMED?: string;
        generatedPdf?: string;
    }, import('xstate').EventObject>> | undefined;
}, import('xstate').Values<{
    openPopup: {
        src: "openPopup";
        logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
            sessionToken?: string;
            hinClient: HINClient;
        }, import('xstate').EventObject>;
        id: string | undefined;
    };
    trackPopup: {
        src: "trackPopup";
        logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
            popupRef: Window | null;
        }, import('xstate').EventObject>;
        id: string | undefined;
    };
    listenAuthenticationMessage: {
        src: "listenAuthenticationMessage";
        logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
            hinClient: HINClient;
            accessToken: string;
        }, import('xstate').EventObject>;
        id: string | undefined;
    };
    listenSamlAuthMessage: {
        src: "listenSamlAuthMessage";
        logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
            hinClient: HINClient;
        }, import('xstate').EventObject>;
        id: string | undefined;
    };
    validateCHMED: {
        src: "validateCHMED";
        logic: import('xstate').PromiseActorLogic<void, {
            encodedCHMED?: string;
            parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
            hinClient: HINClient;
            sessionToken?: string;
        }, import('xstate').EventObject>;
        id: string | undefined;
    };
    verifySession: {
        src: "verifySession";
        logic: import('xstate').PromiseActorLogic<void, {
            parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
            hinClient: HINClient;
            sessionToken?: string;
        }, import('xstate').EventObject>;
        id: string | undefined;
    };
    initOAuth: {
        src: "initOAuth";
        logic: import('xstate').PromiseActorLogic<void, {
            parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
            popupRef: Window | null;
            hinClient: HINClient;
        }, import('xstate').EventObject>;
        id: string | undefined;
    };
    listenOAuthMessage: {
        src: "listenOAuthMessage";
        logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
            hinClient: HINClient;
            sessionToken?: string;
        }, import('xstate').EventObject>;
        id: string | undefined;
    };
    refreshToken: {
        src: "refreshToken";
        logic: import('xstate').PromiseActorLogic<{
            sessionToken: string;
        }, {
            hinClient: HINClient;
            sessionToken?: string;
        }, import('xstate').EventObject>;
        id: string | undefined;
    };
    initSAMLAuthCode: {
        src: "initSAMLAuthCode";
        logic: import('xstate').PromiseActorLogic<void, {
            parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
            popupRef: Window | null;
            hinClient: HINClient;
            recover: boolean;
            sessionToken?: string;
        }, import('xstate').EventObject>;
        id: string | undefined;
    };
    listenSAMLAuthCodeMessage: {
        src: "listenSAMLAuthCodeMessage";
        logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
            hinClient: HINClient;
        }, import('xstate').EventObject>;
        id: string | undefined;
    };
    getSAMLAuthHandle: {
        src: "getSAMLAuthHandle";
        logic: import('xstate').PromiseActorLogic<{
            sessionToken: string;
        }, {
            parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
            authCode: string;
            hinClient: HINClient;
            sessionToken?: string;
        }, import('xstate').EventObject>;
        id: string | undefined;
    };
    signCHMEDRx: {
        src: "signCHMEDRx";
        logic: import('xstate').PromiseActorLogic<{
            signedPrescription: string;
            generatedPdf?: string;
        }, {
            encodedCHMED?: string;
            shouldGeneratePdf: boolean;
            parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
            hinClient: HINClient;
            sessionToken?: string;
            recover: boolean;
        }, import('xstate').EventObject>;
        id: string | undefined;
    };
    errorHandler: {
        src: "errorHandler";
        logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
            error: import('../../../../core/src/errors/index.ts').DomainError;
        }, import('xstate').EventObject>;
        id: string | undefined;
    };
    successHandler: {
        src: "successHandler";
        logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
            signedCHMED?: string;
            generatedPdf?: string;
        }, import('xstate').EventObject>;
        id: string | undefined;
    };
}>, import('xstate').Values<{
    closePopup: {
        type: "closePopup";
        params: import('xstate').NonReducibleUnknown;
    };
    setAccessToken: {
        type: "setAccessToken";
        params: import('xstate').NonReducibleUnknown;
    };
    setError: {
        type: "setError";
        params: import('xstate').NonReducibleUnknown;
    };
}>, never, never, "Idle" | {
    Started: {
        Popup: "Opening" | "Open" | "Closed";
        Signing: "Authentication" | "SAMLAuth" | "Error" | "End" | "ValidatingCHMED" | "VerifySessionGuard" | "SigningCHMED" | "SAMLAuthCode" | "TokenRefreshing" | "OAuth" | "SAMLAuthHandle" | "Success";
    };
}, string, PrescriptionSignContextInputs, import('xstate').NonReducibleUnknown, import('xstate').EventObject, import('xstate').MetaObject, {
    readonly context: ({ input }: {
        spawn: {
            <TSrc extends "openPopup" | "trackPopup" | "listenAuthenticationMessage" | "listenSamlAuthMessage" | "validateCHMED" | "verifySession" | "initOAuth" | "listenOAuthMessage" | "refreshToken" | "initSAMLAuthCode" | "listenSAMLAuthCodeMessage" | "getSAMLAuthHandle" | "signCHMEDRx" | "errorHandler" | "successHandler">(logic: TSrc, ...[options]: ({
                src: "openPopup";
                logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                    sessionToken?: string;
                    hinClient: HINClient;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } extends infer T ? T extends {
                src: "openPopup";
                logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                    sessionToken?: string;
                    hinClient: HINClient;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } ? T extends {
                src: TSrc;
            } ? import('xstate').ConditionalRequired<[options?: ({
                id?: T["id"] | undefined;
                systemId?: string;
                input?: import('xstate').InputFrom<T["logic"]> | undefined;
                syncSnapshot?: boolean;
            } & { [K in import('xstate').RequiredActorOptions<T>]: unknown; }) | undefined], import('xstate').IsNotNever<import('xstate').RequiredActorOptions<T>>> : never : never : never) | ({
                src: "trackPopup";
                logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                    popupRef: Window | null;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } extends infer T_1 ? T_1 extends {
                src: "trackPopup";
                logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                    popupRef: Window | null;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } ? T_1 extends {
                src: TSrc;
            } ? import('xstate').ConditionalRequired<[options?: ({
                id?: T_1["id"] | undefined;
                systemId?: string;
                input?: import('xstate').InputFrom<T_1["logic"]> | undefined;
                syncSnapshot?: boolean;
            } & { [K_1 in import('xstate').RequiredActorOptions<T_1>]: unknown; }) | undefined], import('xstate').IsNotNever<import('xstate').RequiredActorOptions<T_1>>> : never : never : never) | ({
                src: "listenAuthenticationMessage";
                logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                    hinClient: HINClient;
                    accessToken: string;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } extends infer T_2 ? T_2 extends {
                src: "listenAuthenticationMessage";
                logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                    hinClient: HINClient;
                    accessToken: string;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } ? T_2 extends {
                src: TSrc;
            } ? import('xstate').ConditionalRequired<[options?: ({
                id?: T_2["id"] | undefined;
                systemId?: string;
                input?: import('xstate').InputFrom<T_2["logic"]> | undefined;
                syncSnapshot?: boolean;
            } & { [K_2 in import('xstate').RequiredActorOptions<T_2>]: unknown; }) | undefined], import('xstate').IsNotNever<import('xstate').RequiredActorOptions<T_2>>> : never : never : never) | ({
                src: "listenSamlAuthMessage";
                logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                    hinClient: HINClient;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } extends infer T_3 ? T_3 extends {
                src: "listenSamlAuthMessage";
                logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                    hinClient: HINClient;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } ? T_3 extends {
                src: TSrc;
            } ? import('xstate').ConditionalRequired<[options?: ({
                id?: T_3["id"] | undefined;
                systemId?: string;
                input?: import('xstate').InputFrom<T_3["logic"]> | undefined;
                syncSnapshot?: boolean;
            } & { [K_3 in import('xstate').RequiredActorOptions<T_3>]: unknown; }) | undefined], import('xstate').IsNotNever<import('xstate').RequiredActorOptions<T_3>>> : never : never : never) | ({
                src: "validateCHMED";
                logic: import('xstate').PromiseActorLogic<void, {
                    encodedCHMED?: string;
                    parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                    hinClient: HINClient;
                    sessionToken?: string;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } extends infer T_4 ? T_4 extends {
                src: "validateCHMED";
                logic: import('xstate').PromiseActorLogic<void, {
                    encodedCHMED?: string;
                    parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                    hinClient: HINClient;
                    sessionToken?: string;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } ? T_4 extends {
                src: TSrc;
            } ? import('xstate').ConditionalRequired<[options?: ({
                id?: T_4["id"] | undefined;
                systemId?: string;
                input?: import('xstate').InputFrom<T_4["logic"]> | undefined;
                syncSnapshot?: boolean;
            } & { [K_4 in import('xstate').RequiredActorOptions<T_4>]: unknown; }) | undefined], import('xstate').IsNotNever<import('xstate').RequiredActorOptions<T_4>>> : never : never : never) | ({
                src: "verifySession";
                logic: import('xstate').PromiseActorLogic<void, {
                    parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                    hinClient: HINClient;
                    sessionToken?: string;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } extends infer T_5 ? T_5 extends {
                src: "verifySession";
                logic: import('xstate').PromiseActorLogic<void, {
                    parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                    hinClient: HINClient;
                    sessionToken?: string;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } ? T_5 extends {
                src: TSrc;
            } ? import('xstate').ConditionalRequired<[options?: ({
                id?: T_5["id"] | undefined;
                systemId?: string;
                input?: import('xstate').InputFrom<T_5["logic"]> | undefined;
                syncSnapshot?: boolean;
            } & { [K_5 in import('xstate').RequiredActorOptions<T_5>]: unknown; }) | undefined], import('xstate').IsNotNever<import('xstate').RequiredActorOptions<T_5>>> : never : never : never) | ({
                src: "initOAuth";
                logic: import('xstate').PromiseActorLogic<void, {
                    parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                    popupRef: Window | null;
                    hinClient: HINClient;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } extends infer T_6 ? T_6 extends {
                src: "initOAuth";
                logic: import('xstate').PromiseActorLogic<void, {
                    parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                    popupRef: Window | null;
                    hinClient: HINClient;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } ? T_6 extends {
                src: TSrc;
            } ? import('xstate').ConditionalRequired<[options?: ({
                id?: T_6["id"] | undefined;
                systemId?: string;
                input?: import('xstate').InputFrom<T_6["logic"]> | undefined;
                syncSnapshot?: boolean;
            } & { [K_6 in import('xstate').RequiredActorOptions<T_6>]: unknown; }) | undefined], import('xstate').IsNotNever<import('xstate').RequiredActorOptions<T_6>>> : never : never : never) | ({
                src: "listenOAuthMessage";
                logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                    hinClient: HINClient;
                    sessionToken?: string;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } extends infer T_7 ? T_7 extends {
                src: "listenOAuthMessage";
                logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                    hinClient: HINClient;
                    sessionToken?: string;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } ? T_7 extends {
                src: TSrc;
            } ? import('xstate').ConditionalRequired<[options?: ({
                id?: T_7["id"] | undefined;
                systemId?: string;
                input?: import('xstate').InputFrom<T_7["logic"]> | undefined;
                syncSnapshot?: boolean;
            } & { [K_7 in import('xstate').RequiredActorOptions<T_7>]: unknown; }) | undefined], import('xstate').IsNotNever<import('xstate').RequiredActorOptions<T_7>>> : never : never : never) | ({
                src: "refreshToken";
                logic: import('xstate').PromiseActorLogic<{
                    sessionToken: string;
                }, {
                    hinClient: HINClient;
                    sessionToken?: string;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } extends infer T_8 ? T_8 extends {
                src: "refreshToken";
                logic: import('xstate').PromiseActorLogic<{
                    sessionToken: string;
                }, {
                    hinClient: HINClient;
                    sessionToken?: string;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } ? T_8 extends {
                src: TSrc;
            } ? import('xstate').ConditionalRequired<[options?: ({
                id?: T_8["id"] | undefined;
                systemId?: string;
                input?: import('xstate').InputFrom<T_8["logic"]> | undefined;
                syncSnapshot?: boolean;
            } & { [K_8 in import('xstate').RequiredActorOptions<T_8>]: unknown; }) | undefined], import('xstate').IsNotNever<import('xstate').RequiredActorOptions<T_8>>> : never : never : never) | ({
                src: "initSAMLAuthCode";
                logic: import('xstate').PromiseActorLogic<void, {
                    parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                    popupRef: Window | null;
                    hinClient: HINClient;
                    recover: boolean;
                    sessionToken?: string;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } extends infer T_9 ? T_9 extends {
                src: "initSAMLAuthCode";
                logic: import('xstate').PromiseActorLogic<void, {
                    parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                    popupRef: Window | null;
                    hinClient: HINClient;
                    recover: boolean;
                    sessionToken?: string;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } ? T_9 extends {
                src: TSrc;
            } ? import('xstate').ConditionalRequired<[options?: ({
                id?: T_9["id"] | undefined;
                systemId?: string;
                input?: import('xstate').InputFrom<T_9["logic"]> | undefined;
                syncSnapshot?: boolean;
            } & { [K_9 in import('xstate').RequiredActorOptions<T_9>]: unknown; }) | undefined], import('xstate').IsNotNever<import('xstate').RequiredActorOptions<T_9>>> : never : never : never) | ({
                src: "listenSAMLAuthCodeMessage";
                logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                    hinClient: HINClient;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } extends infer T_10 ? T_10 extends {
                src: "listenSAMLAuthCodeMessage";
                logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                    hinClient: HINClient;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } ? T_10 extends {
                src: TSrc;
            } ? import('xstate').ConditionalRequired<[options?: ({
                id?: T_10["id"] | undefined;
                systemId?: string;
                input?: import('xstate').InputFrom<T_10["logic"]> | undefined;
                syncSnapshot?: boolean;
            } & { [K_10 in import('xstate').RequiredActorOptions<T_10>]: unknown; }) | undefined], import('xstate').IsNotNever<import('xstate').RequiredActorOptions<T_10>>> : never : never : never) | ({
                src: "getSAMLAuthHandle";
                logic: import('xstate').PromiseActorLogic<{
                    sessionToken: string;
                }, {
                    parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                    authCode: string;
                    hinClient: HINClient;
                    sessionToken?: string;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } extends infer T_11 ? T_11 extends {
                src: "getSAMLAuthHandle";
                logic: import('xstate').PromiseActorLogic<{
                    sessionToken: string;
                }, {
                    parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                    authCode: string;
                    hinClient: HINClient;
                    sessionToken?: string;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } ? T_11 extends {
                src: TSrc;
            } ? import('xstate').ConditionalRequired<[options?: ({
                id?: T_11["id"] | undefined;
                systemId?: string;
                input?: import('xstate').InputFrom<T_11["logic"]> | undefined;
                syncSnapshot?: boolean;
            } & { [K_11 in import('xstate').RequiredActorOptions<T_11>]: unknown; }) | undefined], import('xstate').IsNotNever<import('xstate').RequiredActorOptions<T_11>>> : never : never : never) | ({
                src: "signCHMEDRx";
                logic: import('xstate').PromiseActorLogic<{
                    signedPrescription: string;
                    generatedPdf?: string;
                }, {
                    encodedCHMED?: string;
                    shouldGeneratePdf: boolean;
                    parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                    hinClient: HINClient;
                    sessionToken?: string;
                    recover: boolean;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } extends infer T_12 ? T_12 extends {
                src: "signCHMEDRx";
                logic: import('xstate').PromiseActorLogic<{
                    signedPrescription: string;
                    generatedPdf?: string;
                }, {
                    encodedCHMED?: string;
                    shouldGeneratePdf: boolean;
                    parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                    hinClient: HINClient;
                    sessionToken?: string;
                    recover: boolean;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } ? T_12 extends {
                src: TSrc;
            } ? import('xstate').ConditionalRequired<[options?: ({
                id?: T_12["id"] | undefined;
                systemId?: string;
                input?: import('xstate').InputFrom<T_12["logic"]> | undefined;
                syncSnapshot?: boolean;
            } & { [K_12 in import('xstate').RequiredActorOptions<T_12>]: unknown; }) | undefined], import('xstate').IsNotNever<import('xstate').RequiredActorOptions<T_12>>> : never : never : never) | ({
                src: "errorHandler";
                logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                    error: import('../../../../core/src/errors/index.ts').DomainError;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } extends infer T_13 ? T_13 extends {
                src: "errorHandler";
                logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                    error: import('../../../../core/src/errors/index.ts').DomainError;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } ? T_13 extends {
                src: TSrc;
            } ? import('xstate').ConditionalRequired<[options?: ({
                id?: T_13["id"] | undefined;
                systemId?: string;
                input?: import('xstate').InputFrom<T_13["logic"]> | undefined;
                syncSnapshot?: boolean;
            } & { [K_13 in import('xstate').RequiredActorOptions<T_13>]: unknown; }) | undefined], import('xstate').IsNotNever<import('xstate').RequiredActorOptions<T_13>>> : never : never : never) | ({
                src: "successHandler";
                logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                    signedCHMED?: string;
                    generatedPdf?: string;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } extends infer T_14 ? T_14 extends {
                src: "successHandler";
                logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                    signedCHMED?: string;
                    generatedPdf?: string;
                }, import('xstate').EventObject>;
                id: string | undefined;
            } ? T_14 extends {
                src: TSrc;
            } ? import('xstate').ConditionalRequired<[options?: ({
                id?: T_14["id"] | undefined;
                systemId?: string;
                input?: import('xstate').InputFrom<T_14["logic"]> | undefined;
                syncSnapshot?: boolean;
            } & { [K_14 in import('xstate').RequiredActorOptions<T_14>]: unknown; }) | undefined], import('xstate').IsNotNever<import('xstate').RequiredActorOptions<T_14>>> : never : never : never)): import('xstate').ActorRefFromLogic<import('xstate').GetConcreteByKey<import('xstate').Values<{
                openPopup: {
                    src: "openPopup";
                    logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                        sessionToken?: string;
                        hinClient: HINClient;
                    }, import('xstate').EventObject>;
                    id: string | undefined;
                };
                trackPopup: {
                    src: "trackPopup";
                    logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                        popupRef: Window | null;
                    }, import('xstate').EventObject>;
                    id: string | undefined;
                };
                listenAuthenticationMessage: {
                    src: "listenAuthenticationMessage";
                    logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                        hinClient: HINClient;
                        accessToken: string;
                    }, import('xstate').EventObject>;
                    id: string | undefined;
                };
                listenSamlAuthMessage: {
                    src: "listenSamlAuthMessage";
                    logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                        hinClient: HINClient;
                    }, import('xstate').EventObject>;
                    id: string | undefined;
                };
                validateCHMED: {
                    src: "validateCHMED";
                    logic: import('xstate').PromiseActorLogic<void, {
                        encodedCHMED?: string;
                        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                        hinClient: HINClient;
                        sessionToken?: string;
                    }, import('xstate').EventObject>;
                    id: string | undefined;
                };
                verifySession: {
                    src: "verifySession";
                    logic: import('xstate').PromiseActorLogic<void, {
                        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                        hinClient: HINClient;
                        sessionToken?: string;
                    }, import('xstate').EventObject>;
                    id: string | undefined;
                };
                initOAuth: {
                    src: "initOAuth";
                    logic: import('xstate').PromiseActorLogic<void, {
                        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                        popupRef: Window | null;
                        hinClient: HINClient;
                    }, import('xstate').EventObject>;
                    id: string | undefined;
                };
                listenOAuthMessage: {
                    src: "listenOAuthMessage";
                    logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                        hinClient: HINClient;
                        sessionToken?: string;
                    }, import('xstate').EventObject>;
                    id: string | undefined;
                };
                refreshToken: {
                    src: "refreshToken";
                    logic: import('xstate').PromiseActorLogic<{
                        sessionToken: string;
                    }, {
                        hinClient: HINClient;
                        sessionToken?: string;
                    }, import('xstate').EventObject>;
                    id: string | undefined;
                };
                initSAMLAuthCode: {
                    src: "initSAMLAuthCode";
                    logic: import('xstate').PromiseActorLogic<void, {
                        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                        popupRef: Window | null;
                        hinClient: HINClient;
                        recover: boolean;
                        sessionToken?: string;
                    }, import('xstate').EventObject>;
                    id: string | undefined;
                };
                listenSAMLAuthCodeMessage: {
                    src: "listenSAMLAuthCodeMessage";
                    logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                        hinClient: HINClient;
                    }, import('xstate').EventObject>;
                    id: string | undefined;
                };
                getSAMLAuthHandle: {
                    src: "getSAMLAuthHandle";
                    logic: import('xstate').PromiseActorLogic<{
                        sessionToken: string;
                    }, {
                        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                        authCode: string;
                        hinClient: HINClient;
                        sessionToken?: string;
                    }, import('xstate').EventObject>;
                    id: string | undefined;
                };
                signCHMEDRx: {
                    src: "signCHMEDRx";
                    logic: import('xstate').PromiseActorLogic<{
                        signedPrescription: string;
                        generatedPdf?: string;
                    }, {
                        encodedCHMED?: string;
                        shouldGeneratePdf: boolean;
                        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                        hinClient: HINClient;
                        sessionToken?: string;
                        recover: boolean;
                    }, import('xstate').EventObject>;
                    id: string | undefined;
                };
                errorHandler: {
                    src: "errorHandler";
                    logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                        error: import('../../../../core/src/errors/index.ts').DomainError;
                    }, import('xstate').EventObject>;
                    id: string | undefined;
                };
                successHandler: {
                    src: "successHandler";
                    logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                        signedCHMED?: string;
                        generatedPdf?: string;
                    }, import('xstate').EventObject>;
                    id: string | undefined;
                };
            }>, "src", TSrc>["logic"]>;
            <TLogic extends import('xstate').AnyActorLogic>(src: TLogic, ...[options]: import('xstate').ConditionalRequired<[options?: ({
                id?: never;
                systemId?: string;
                input?: import('xstate').InputFrom<TLogic> | undefined;
                syncSnapshot?: boolean;
            } & { [K in import('xstate').RequiredLogicInput<TLogic>]: unknown; }) | undefined], import('xstate').IsNotNever<import('xstate').RequiredLogicInput<TLogic>>>): import('xstate').ActorRefFromLogic<TLogic>;
        };
        input: PrescriptionSignContextInputs;
        self: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
            type: "OPEN_POPUP";
            popupRef: Window | null;
        } | {
            type: "CLOSE_POPUP";
        } | {
            type: "START";
            encodedCHMED: string;
            shouldGeneratePdf: boolean;
        } | {
            type: "TERMINATE";
        } | {
            type: "VERIFY_SESSION";
        } | {
            type: "REFRESH_TOKEN";
        } | {
            type: "GET_TOKEN";
        } | {
            type: "GET_SAML_AUTH_CODE";
            recoverable?: boolean;
            sessionToken: string;
        } | {
            type: "GET_SAML_AUTH_HANDLE";
            authCode: string;
        } | {
            type: "VALIDATE_CHMED";
            sessionToken: string;
        } | {
            type: "xstate.done.actor.getSAMLAuthHandle";
            sessionToken: string;
            recoverable?: boolean;
        } | {
            type: "SIGN_PRESCRIPTION";
            sessionToken: string;
            recoverable?: boolean;
        } | {
            type: "AUTHENTICATION_SUCCESS";
        } | {
            type: "ERROR";
            error: import('../../../../core/src/errors/index.ts').DomainError;
        } | {
            type: "UNAUTHORIZED_TOKEN";
        } | {
            type: "UNAUTHORIZED_HANDLE";
        }, Record<string, import('xstate').AnyActorRef | undefined>, import('xstate').StateValue, string, unknown, any, any>, {
            type: "OPEN_POPUP";
            popupRef: Window | null;
        } | {
            type: "CLOSE_POPUP";
        } | {
            type: "START";
            encodedCHMED: string;
            shouldGeneratePdf: boolean;
        } | {
            type: "TERMINATE";
        } | {
            type: "VERIFY_SESSION";
        } | {
            type: "REFRESH_TOKEN";
        } | {
            type: "GET_TOKEN";
        } | {
            type: "GET_SAML_AUTH_CODE";
            recoverable?: boolean;
            sessionToken: string;
        } | {
            type: "GET_SAML_AUTH_HANDLE";
            authCode: string;
        } | {
            type: "VALIDATE_CHMED";
            sessionToken: string;
        } | {
            type: "xstate.done.actor.getSAMLAuthHandle";
            sessionToken: string;
            recoverable?: boolean;
        } | {
            type: "SIGN_PRESCRIPTION";
            sessionToken: string;
            recoverable?: boolean;
        } | {
            type: "AUTHENTICATION_SUCCESS";
        } | {
            type: "ERROR";
            error: import('../../../../core/src/errors/index.ts').DomainError;
        } | {
            type: "UNAUTHORIZED_TOKEN";
        } | {
            type: "UNAUTHORIZED_HANDLE";
        }, import('xstate').AnyEventObject>;
    }) => {
        popupRef: null;
        encodedCHMED: undefined;
        signedCHMED: undefined;
        generatedPdf: undefined;
        shouldGeneratePdf: false;
        sessionToken: string | undefined;
        accessToken: string;
        hinClient: HINClient;
    };
    readonly id: "HINPrescriptionSigning";
    readonly initial: "Idle";
    readonly states: {
        readonly Idle: {
            readonly on: {
                readonly START: {
                    readonly target: "Started";
                    readonly actions: import('xstate').ActionFunction<PrescriptionSignContext, {
                        type: "START";
                        encodedCHMED: string;
                        shouldGeneratePdf: boolean;
                    }, {
                        type: "OPEN_POPUP";
                        popupRef: Window | null;
                    } | {
                        type: "CLOSE_POPUP";
                    } | {
                        type: "START";
                        encodedCHMED: string;
                        shouldGeneratePdf: boolean;
                    } | {
                        type: "TERMINATE";
                    } | {
                        type: "VERIFY_SESSION";
                    } | {
                        type: "REFRESH_TOKEN";
                    } | {
                        type: "GET_TOKEN";
                    } | {
                        type: "GET_SAML_AUTH_CODE";
                        recoverable?: boolean;
                        sessionToken: string;
                    } | {
                        type: "GET_SAML_AUTH_HANDLE";
                        authCode: string;
                    } | {
                        type: "VALIDATE_CHMED";
                        sessionToken: string;
                    } | {
                        type: "xstate.done.actor.getSAMLAuthHandle";
                        sessionToken: string;
                        recoverable?: boolean;
                    } | {
                        type: "SIGN_PRESCRIPTION";
                        sessionToken: string;
                        recoverable?: boolean;
                    } | {
                        type: "AUTHENTICATION_SUCCESS";
                    } | {
                        type: "ERROR";
                        error: import('../../../../core/src/errors/index.ts').DomainError;
                    } | {
                        type: "UNAUTHORIZED_TOKEN";
                    } | {
                        type: "UNAUTHORIZED_HANDLE";
                    }, undefined, import('xstate').Values<{
                        openPopup: {
                            src: "openPopup";
                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                sessionToken?: string;
                                hinClient: HINClient;
                            }, import('xstate').EventObject>;
                            id: string | undefined;
                        };
                        trackPopup: {
                            src: "trackPopup";
                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                popupRef: Window | null;
                            }, import('xstate').EventObject>;
                            id: string | undefined;
                        };
                        listenAuthenticationMessage: {
                            src: "listenAuthenticationMessage";
                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                hinClient: HINClient;
                                accessToken: string;
                            }, import('xstate').EventObject>;
                            id: string | undefined;
                        };
                        listenSamlAuthMessage: {
                            src: "listenSamlAuthMessage";
                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                hinClient: HINClient;
                            }, import('xstate').EventObject>;
                            id: string | undefined;
                        };
                        validateCHMED: {
                            src: "validateCHMED";
                            logic: import('xstate').PromiseActorLogic<void, {
                                encodedCHMED?: string;
                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                hinClient: HINClient;
                                sessionToken?: string;
                            }, import('xstate').EventObject>;
                            id: string | undefined;
                        };
                        verifySession: {
                            src: "verifySession";
                            logic: import('xstate').PromiseActorLogic<void, {
                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                hinClient: HINClient;
                                sessionToken?: string;
                            }, import('xstate').EventObject>;
                            id: string | undefined;
                        };
                        initOAuth: {
                            src: "initOAuth";
                            logic: import('xstate').PromiseActorLogic<void, {
                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                popupRef: Window | null;
                                hinClient: HINClient;
                            }, import('xstate').EventObject>;
                            id: string | undefined;
                        };
                        listenOAuthMessage: {
                            src: "listenOAuthMessage";
                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                hinClient: HINClient;
                                sessionToken?: string;
                            }, import('xstate').EventObject>;
                            id: string | undefined;
                        };
                        refreshToken: {
                            src: "refreshToken";
                            logic: import('xstate').PromiseActorLogic<{
                                sessionToken: string;
                            }, {
                                hinClient: HINClient;
                                sessionToken?: string;
                            }, import('xstate').EventObject>;
                            id: string | undefined;
                        };
                        initSAMLAuthCode: {
                            src: "initSAMLAuthCode";
                            logic: import('xstate').PromiseActorLogic<void, {
                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                popupRef: Window | null;
                                hinClient: HINClient;
                                recover: boolean;
                                sessionToken?: string;
                            }, import('xstate').EventObject>;
                            id: string | undefined;
                        };
                        listenSAMLAuthCodeMessage: {
                            src: "listenSAMLAuthCodeMessage";
                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                hinClient: HINClient;
                            }, import('xstate').EventObject>;
                            id: string | undefined;
                        };
                        getSAMLAuthHandle: {
                            src: "getSAMLAuthHandle";
                            logic: import('xstate').PromiseActorLogic<{
                                sessionToken: string;
                            }, {
                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                authCode: string;
                                hinClient: HINClient;
                                sessionToken?: string;
                            }, import('xstate').EventObject>;
                            id: string | undefined;
                        };
                        signCHMEDRx: {
                            src: "signCHMEDRx";
                            logic: import('xstate').PromiseActorLogic<{
                                signedPrescription: string;
                                generatedPdf?: string;
                            }, {
                                encodedCHMED?: string;
                                shouldGeneratePdf: boolean;
                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                hinClient: HINClient;
                                sessionToken?: string;
                                recover: boolean;
                            }, import('xstate').EventObject>;
                            id: string | undefined;
                        };
                        errorHandler: {
                            src: "errorHandler";
                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                error: import('../../../../core/src/errors/index.ts').DomainError;
                            }, import('xstate').EventObject>;
                            id: string | undefined;
                        };
                        successHandler: {
                            src: "successHandler";
                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                signedCHMED?: string;
                                generatedPdf?: string;
                            }, import('xstate').EventObject>;
                            id: string | undefined;
                        };
                    }>, never, never, never, never>;
                };
            };
        };
        readonly Started: {
            readonly type: "parallel";
            readonly onDone: {
                readonly target: "Idle";
                readonly actions: import('xstate').ActionFunction<PrescriptionSignContext, import('xstate').DoneStateEvent<unknown>, {
                    type: "OPEN_POPUP";
                    popupRef: Window | null;
                } | {
                    type: "CLOSE_POPUP";
                } | {
                    type: "START";
                    encodedCHMED: string;
                    shouldGeneratePdf: boolean;
                } | {
                    type: "TERMINATE";
                } | {
                    type: "VERIFY_SESSION";
                } | {
                    type: "REFRESH_TOKEN";
                } | {
                    type: "GET_TOKEN";
                } | {
                    type: "GET_SAML_AUTH_CODE";
                    recoverable?: boolean;
                    sessionToken: string;
                } | {
                    type: "GET_SAML_AUTH_HANDLE";
                    authCode: string;
                } | {
                    type: "VALIDATE_CHMED";
                    sessionToken: string;
                } | {
                    type: "xstate.done.actor.getSAMLAuthHandle";
                    sessionToken: string;
                    recoverable?: boolean;
                } | {
                    type: "SIGN_PRESCRIPTION";
                    sessionToken: string;
                    recoverable?: boolean;
                } | {
                    type: "AUTHENTICATION_SUCCESS";
                } | {
                    type: "ERROR";
                    error: import('../../../../core/src/errors/index.ts').DomainError;
                } | {
                    type: "UNAUTHORIZED_TOKEN";
                } | {
                    type: "UNAUTHORIZED_HANDLE";
                }, undefined, import('xstate').Values<{
                    openPopup: {
                        src: "openPopup";
                        logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                            sessionToken?: string;
                            hinClient: HINClient;
                        }, import('xstate').EventObject>;
                        id: string | undefined;
                    };
                    trackPopup: {
                        src: "trackPopup";
                        logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                            popupRef: Window | null;
                        }, import('xstate').EventObject>;
                        id: string | undefined;
                    };
                    listenAuthenticationMessage: {
                        src: "listenAuthenticationMessage";
                        logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                            hinClient: HINClient;
                            accessToken: string;
                        }, import('xstate').EventObject>;
                        id: string | undefined;
                    };
                    listenSamlAuthMessage: {
                        src: "listenSamlAuthMessage";
                        logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                            hinClient: HINClient;
                        }, import('xstate').EventObject>;
                        id: string | undefined;
                    };
                    validateCHMED: {
                        src: "validateCHMED";
                        logic: import('xstate').PromiseActorLogic<void, {
                            encodedCHMED?: string;
                            parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                            hinClient: HINClient;
                            sessionToken?: string;
                        }, import('xstate').EventObject>;
                        id: string | undefined;
                    };
                    verifySession: {
                        src: "verifySession";
                        logic: import('xstate').PromiseActorLogic<void, {
                            parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                            hinClient: HINClient;
                            sessionToken?: string;
                        }, import('xstate').EventObject>;
                        id: string | undefined;
                    };
                    initOAuth: {
                        src: "initOAuth";
                        logic: import('xstate').PromiseActorLogic<void, {
                            parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                            popupRef: Window | null;
                            hinClient: HINClient;
                        }, import('xstate').EventObject>;
                        id: string | undefined;
                    };
                    listenOAuthMessage: {
                        src: "listenOAuthMessage";
                        logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                            hinClient: HINClient;
                            sessionToken?: string;
                        }, import('xstate').EventObject>;
                        id: string | undefined;
                    };
                    refreshToken: {
                        src: "refreshToken";
                        logic: import('xstate').PromiseActorLogic<{
                            sessionToken: string;
                        }, {
                            hinClient: HINClient;
                            sessionToken?: string;
                        }, import('xstate').EventObject>;
                        id: string | undefined;
                    };
                    initSAMLAuthCode: {
                        src: "initSAMLAuthCode";
                        logic: import('xstate').PromiseActorLogic<void, {
                            parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                            popupRef: Window | null;
                            hinClient: HINClient;
                            recover: boolean;
                            sessionToken?: string;
                        }, import('xstate').EventObject>;
                        id: string | undefined;
                    };
                    listenSAMLAuthCodeMessage: {
                        src: "listenSAMLAuthCodeMessage";
                        logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                            hinClient: HINClient;
                        }, import('xstate').EventObject>;
                        id: string | undefined;
                    };
                    getSAMLAuthHandle: {
                        src: "getSAMLAuthHandle";
                        logic: import('xstate').PromiseActorLogic<{
                            sessionToken: string;
                        }, {
                            parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                            authCode: string;
                            hinClient: HINClient;
                            sessionToken?: string;
                        }, import('xstate').EventObject>;
                        id: string | undefined;
                    };
                    signCHMEDRx: {
                        src: "signCHMEDRx";
                        logic: import('xstate').PromiseActorLogic<{
                            signedPrescription: string;
                            generatedPdf?: string;
                        }, {
                            encodedCHMED?: string;
                            shouldGeneratePdf: boolean;
                            parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                            hinClient: HINClient;
                            sessionToken?: string;
                            recover: boolean;
                        }, import('xstate').EventObject>;
                        id: string | undefined;
                    };
                    errorHandler: {
                        src: "errorHandler";
                        logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                            error: import('../../../../core/src/errors/index.ts').DomainError;
                        }, import('xstate').EventObject>;
                        id: string | undefined;
                    };
                    successHandler: {
                        src: "successHandler";
                        logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                            signedCHMED?: string;
                            generatedPdf?: string;
                        }, import('xstate').EventObject>;
                        id: string | undefined;
                    };
                }>, never, never, never, never>;
            };
            readonly states: {
                readonly Popup: {
                    readonly initial: "Opening";
                    readonly states: {
                        readonly Opening: {
                            readonly on: {
                                readonly OPEN_POPUP: {
                                    readonly target: "Open";
                                    readonly actions: import('xstate').ActionFunction<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    }, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, undefined, import('xstate').Values<{
                                        openPopup: {
                                            src: "openPopup";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                sessionToken?: string;
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        trackPopup: {
                                            src: "trackPopup";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                popupRef: Window | null;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenAuthenticationMessage: {
                                            src: "listenAuthenticationMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                                accessToken: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenSamlAuthMessage: {
                                            src: "listenSamlAuthMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        validateCHMED: {
                                            src: "validateCHMED";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                encodedCHMED?: string;
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        verifySession: {
                                            src: "verifySession";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        initOAuth: {
                                            src: "initOAuth";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                popupRef: Window | null;
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenOAuthMessage: {
                                            src: "listenOAuthMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        refreshToken: {
                                            src: "refreshToken";
                                            logic: import('xstate').PromiseActorLogic<{
                                                sessionToken: string;
                                            }, {
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        initSAMLAuthCode: {
                                            src: "initSAMLAuthCode";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                popupRef: Window | null;
                                                hinClient: HINClient;
                                                recover: boolean;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenSAMLAuthCodeMessage: {
                                            src: "listenSAMLAuthCodeMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        getSAMLAuthHandle: {
                                            src: "getSAMLAuthHandle";
                                            logic: import('xstate').PromiseActorLogic<{
                                                sessionToken: string;
                                            }, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                authCode: string;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        signCHMEDRx: {
                                            src: "signCHMEDRx";
                                            logic: import('xstate').PromiseActorLogic<{
                                                signedPrescription: string;
                                                generatedPdf?: string;
                                            }, {
                                                encodedCHMED?: string;
                                                shouldGeneratePdf: boolean;
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                                recover: boolean;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        errorHandler: {
                                            src: "errorHandler";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                error: import('../../../../core/src/errors/index.ts').DomainError;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        successHandler: {
                                            src: "successHandler";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                signedCHMED?: string;
                                                generatedPdf?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                    }>, never, never, never, never>;
                                };
                            };
                            readonly invoke: {
                                readonly id: "openPopup";
                                readonly input: ({ context }: {
                                    context: PrescriptionSignContext;
                                    event: {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    };
                                    self: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                }) => {
                                    sessionToken: string | undefined;
                                    hinClient: HINClient;
                                };
                                readonly src: "openPopup";
                            };
                        };
                        readonly Open: {
                            readonly on: {
                                readonly CLOSE_POPUP: {
                                    readonly target: "Closed";
                                };
                                readonly ERROR: {
                                    readonly target: "Closed";
                                };
                            };
                            readonly invoke: {
                                readonly id: "trackPopup";
                                readonly input: ({ context }: {
                                    context: PrescriptionSignContext;
                                    event: {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    };
                                    self: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                }) => {
                                    popupRef: Window | null;
                                };
                                readonly src: "trackPopup";
                            };
                        };
                        readonly Closed: {
                            readonly type: "final";
                            readonly entry: import('xstate').ActionFunction<PrescriptionSignContext, {
                                type: "OPEN_POPUP";
                                popupRef: Window | null;
                            } | {
                                type: "CLOSE_POPUP";
                            } | {
                                type: "START";
                                encodedCHMED: string;
                                shouldGeneratePdf: boolean;
                            } | {
                                type: "TERMINATE";
                            } | {
                                type: "VERIFY_SESSION";
                            } | {
                                type: "REFRESH_TOKEN";
                            } | {
                                type: "GET_TOKEN";
                            } | {
                                type: "GET_SAML_AUTH_CODE";
                                recoverable?: boolean;
                                sessionToken: string;
                            } | {
                                type: "GET_SAML_AUTH_HANDLE";
                                authCode: string;
                            } | {
                                type: "VALIDATE_CHMED";
                                sessionToken: string;
                            } | {
                                type: "xstate.done.actor.getSAMLAuthHandle";
                                sessionToken: string;
                                recoverable?: boolean;
                            } | {
                                type: "SIGN_PRESCRIPTION";
                                sessionToken: string;
                                recoverable?: boolean;
                            } | {
                                type: "AUTHENTICATION_SUCCESS";
                            } | {
                                type: "ERROR";
                                error: import('../../../../core/src/errors/index.ts').DomainError;
                            } | {
                                type: "UNAUTHORIZED_TOKEN";
                            } | {
                                type: "UNAUTHORIZED_HANDLE";
                            }, {
                                type: "OPEN_POPUP";
                                popupRef: Window | null;
                            } | {
                                type: "CLOSE_POPUP";
                            } | {
                                type: "START";
                                encodedCHMED: string;
                                shouldGeneratePdf: boolean;
                            } | {
                                type: "TERMINATE";
                            } | {
                                type: "VERIFY_SESSION";
                            } | {
                                type: "REFRESH_TOKEN";
                            } | {
                                type: "GET_TOKEN";
                            } | {
                                type: "GET_SAML_AUTH_CODE";
                                recoverable?: boolean;
                                sessionToken: string;
                            } | {
                                type: "GET_SAML_AUTH_HANDLE";
                                authCode: string;
                            } | {
                                type: "VALIDATE_CHMED";
                                sessionToken: string;
                            } | {
                                type: "xstate.done.actor.getSAMLAuthHandle";
                                sessionToken: string;
                                recoverable?: boolean;
                            } | {
                                type: "SIGN_PRESCRIPTION";
                                sessionToken: string;
                                recoverable?: boolean;
                            } | {
                                type: "AUTHENTICATION_SUCCESS";
                            } | {
                                type: "ERROR";
                                error: import('../../../../core/src/errors/index.ts').DomainError;
                            } | {
                                type: "UNAUTHORIZED_TOKEN";
                            } | {
                                type: "UNAUTHORIZED_HANDLE";
                            }, undefined, import('xstate').Values<{
                                openPopup: {
                                    src: "openPopup";
                                    logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                        sessionToken?: string;
                                        hinClient: HINClient;
                                    }, import('xstate').EventObject>;
                                    id: string | undefined;
                                };
                                trackPopup: {
                                    src: "trackPopup";
                                    logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                        popupRef: Window | null;
                                    }, import('xstate').EventObject>;
                                    id: string | undefined;
                                };
                                listenAuthenticationMessage: {
                                    src: "listenAuthenticationMessage";
                                    logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                        hinClient: HINClient;
                                        accessToken: string;
                                    }, import('xstate').EventObject>;
                                    id: string | undefined;
                                };
                                listenSamlAuthMessage: {
                                    src: "listenSamlAuthMessage";
                                    logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                        hinClient: HINClient;
                                    }, import('xstate').EventObject>;
                                    id: string | undefined;
                                };
                                validateCHMED: {
                                    src: "validateCHMED";
                                    logic: import('xstate').PromiseActorLogic<void, {
                                        encodedCHMED?: string;
                                        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                        hinClient: HINClient;
                                        sessionToken?: string;
                                    }, import('xstate').EventObject>;
                                    id: string | undefined;
                                };
                                verifySession: {
                                    src: "verifySession";
                                    logic: import('xstate').PromiseActorLogic<void, {
                                        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                        hinClient: HINClient;
                                        sessionToken?: string;
                                    }, import('xstate').EventObject>;
                                    id: string | undefined;
                                };
                                initOAuth: {
                                    src: "initOAuth";
                                    logic: import('xstate').PromiseActorLogic<void, {
                                        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                        popupRef: Window | null;
                                        hinClient: HINClient;
                                    }, import('xstate').EventObject>;
                                    id: string | undefined;
                                };
                                listenOAuthMessage: {
                                    src: "listenOAuthMessage";
                                    logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                        hinClient: HINClient;
                                        sessionToken?: string;
                                    }, import('xstate').EventObject>;
                                    id: string | undefined;
                                };
                                refreshToken: {
                                    src: "refreshToken";
                                    logic: import('xstate').PromiseActorLogic<{
                                        sessionToken: string;
                                    }, {
                                        hinClient: HINClient;
                                        sessionToken?: string;
                                    }, import('xstate').EventObject>;
                                    id: string | undefined;
                                };
                                initSAMLAuthCode: {
                                    src: "initSAMLAuthCode";
                                    logic: import('xstate').PromiseActorLogic<void, {
                                        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                        popupRef: Window | null;
                                        hinClient: HINClient;
                                        recover: boolean;
                                        sessionToken?: string;
                                    }, import('xstate').EventObject>;
                                    id: string | undefined;
                                };
                                listenSAMLAuthCodeMessage: {
                                    src: "listenSAMLAuthCodeMessage";
                                    logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                        hinClient: HINClient;
                                    }, import('xstate').EventObject>;
                                    id: string | undefined;
                                };
                                getSAMLAuthHandle: {
                                    src: "getSAMLAuthHandle";
                                    logic: import('xstate').PromiseActorLogic<{
                                        sessionToken: string;
                                    }, {
                                        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                        authCode: string;
                                        hinClient: HINClient;
                                        sessionToken?: string;
                                    }, import('xstate').EventObject>;
                                    id: string | undefined;
                                };
                                signCHMEDRx: {
                                    src: "signCHMEDRx";
                                    logic: import('xstate').PromiseActorLogic<{
                                        signedPrescription: string;
                                        generatedPdf?: string;
                                    }, {
                                        encodedCHMED?: string;
                                        shouldGeneratePdf: boolean;
                                        parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                        hinClient: HINClient;
                                        sessionToken?: string;
                                        recover: boolean;
                                    }, import('xstate').EventObject>;
                                    id: string | undefined;
                                };
                                errorHandler: {
                                    src: "errorHandler";
                                    logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    }, import('xstate').EventObject>;
                                    id: string | undefined;
                                };
                                successHandler: {
                                    src: "successHandler";
                                    logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                        signedCHMED?: string;
                                        generatedPdf?: string;
                                    }, import('xstate').EventObject>;
                                    id: string | undefined;
                                };
                            }>, never, never, never, never>;
                        };
                    };
                };
                readonly Signing: {
                    readonly initial: "Authentication";
                    readonly states: {
                        readonly Authentication: {
                            readonly on: {
                                readonly AUTHENTICATION_SUCCESS: {
                                    readonly target: "SAMLAuth";
                                };
                                readonly ERROR: {
                                    readonly target: "Error";
                                    readonly actions: readonly [{
                                        readonly type: "closePopup";
                                    }];
                                };
                                readonly TERMINATE: {
                                    readonly target: "End";
                                    readonly actions: readonly [{
                                        readonly type: "closePopup";
                                    }];
                                };
                            };
                            readonly invoke: {
                                readonly id: "listenAuthenticationMessage";
                                readonly input: ({ context }: {
                                    context: PrescriptionSignContext;
                                    event: {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    };
                                    self: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                }) => {
                                    accessToken: string;
                                    hinClient: HINClient;
                                };
                                readonly src: "listenAuthenticationMessage";
                                readonly onError: {
                                    readonly target: "Error";
                                    readonly actions: readonly [{
                                        readonly type: "closePopup";
                                    }];
                                };
                            };
                        };
                        readonly SAMLAuth: {
                            readonly on: {
                                readonly VALIDATE_CHMED: {
                                    readonly target: "ValidatingCHMED";
                                    readonly actions: readonly [{
                                        readonly type: "setAccessToken";
                                    }];
                                };
                                readonly ERROR: {
                                    readonly target: "Error";
                                };
                                readonly TERMINATE: {
                                    readonly target: "End";
                                    readonly actions: readonly [{
                                        readonly type: "closePopup";
                                    }];
                                };
                            };
                            readonly invoke: {
                                readonly id: "listenSamlAuthMessage";
                                readonly input: ({ context }: {
                                    context: PrescriptionSignContext;
                                    event: {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    };
                                    self: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                }) => {
                                    hinClient: HINClient;
                                };
                                readonly src: "listenSamlAuthMessage";
                            };
                        };
                        readonly ValidatingCHMED: {
                            readonly on: {
                                readonly VERIFY_SESSION: {
                                    readonly target: "VerifySessionGuard";
                                };
                                readonly ERROR: {
                                    readonly target: "Error";
                                };
                                readonly TERMINATE: {
                                    readonly target: "End";
                                    readonly actions: readonly [{
                                        readonly type: "closePopup";
                                    }];
                                };
                            };
                            readonly invoke: {
                                readonly id: "validateCHMED";
                                readonly src: "validateCHMED";
                                readonly input: ({ context, self }: {
                                    context: PrescriptionSignContext;
                                    event: {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    };
                                    self: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                }) => {
                                    encodedCHMED: string | undefined;
                                    parent: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                    hinClient: HINClient;
                                    sessionToken: string | undefined;
                                };
                            };
                        };
                        readonly VerifySessionGuard: {
                            readonly on: {
                                readonly SIGN_PRESCRIPTION: {
                                    readonly target: "SigningCHMED";
                                };
                                readonly GET_SAML_AUTH_CODE: {
                                    readonly target: "SAMLAuthCode";
                                    readonly actions: readonly [{
                                        readonly type: "setAccessToken";
                                    }];
                                };
                                readonly REFRESH_TOKEN: {
                                    readonly target: "TokenRefreshing";
                                };
                                readonly GET_TOKEN: {
                                    readonly target: "OAuth";
                                };
                                readonly TERMINATE: {
                                    readonly target: "End";
                                    readonly actions: readonly [{
                                        readonly type: "closePopup";
                                    }];
                                };
                            };
                            readonly invoke: {
                                readonly id: "verifySession";
                                readonly input: ({ self, context }: {
                                    context: PrescriptionSignContext;
                                    event: {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    };
                                    self: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                }) => {
                                    parent: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                    hinClient: HINClient;
                                    sessionToken: string | undefined;
                                };
                                readonly src: "verifySession";
                            };
                        };
                        readonly OAuth: {
                            readonly on: {
                                readonly GET_SAML_AUTH_CODE: {
                                    readonly target: "SAMLAuthCode";
                                    readonly actions: readonly [{
                                        readonly type: "setAccessToken";
                                    }];
                                };
                                readonly ERROR: {
                                    readonly target: "Error";
                                };
                                readonly TERMINATE: {
                                    readonly target: "End";
                                    readonly actions: readonly [{
                                        readonly type: "closePopup";
                                    }];
                                };
                            };
                            readonly invoke: readonly [{
                                readonly id: "initOAuth";
                                readonly input: ({ self, context }: {
                                    context: PrescriptionSignContext;
                                    event: {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    };
                                    self: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                }) => {
                                    parent: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                    popupRef: Window | null;
                                    hinClient: HINClient;
                                };
                                readonly src: "initOAuth";
                            }, {
                                readonly id: "listenOAuthMessage";
                                readonly input: ({ context }: {
                                    context: PrescriptionSignContext;
                                    event: {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    };
                                    self: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                }) => {
                                    hinClient: HINClient;
                                    sessionToken: string | undefined;
                                };
                                readonly src: "listenOAuthMessage";
                            }];
                        };
                        readonly TokenRefreshing: {
                            readonly on: {
                                readonly TERMINATE: {
                                    readonly target: "End";
                                    readonly actions: readonly [{
                                        readonly type: "closePopup";
                                    }];
                                };
                            };
                            readonly invoke: {
                                readonly id: "refreshToken";
                                readonly input: ({ context }: {
                                    context: PrescriptionSignContext;
                                    event: {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    };
                                    self: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                }) => {
                                    sessionToken: string | undefined;
                                    hinClient: HINClient;
                                };
                                readonly onDone: {
                                    readonly target: "SAMLAuthCode";
                                    readonly actions: readonly [import('xstate').ActionFunction<PrescriptionSignContext, import('xstate').DoneActorEvent<{
                                        sessionToken: string;
                                    }, string>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, undefined, import('xstate').Values<{
                                        openPopup: {
                                            src: "openPopup";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                sessionToken?: string;
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        trackPopup: {
                                            src: "trackPopup";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                popupRef: Window | null;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenAuthenticationMessage: {
                                            src: "listenAuthenticationMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                                accessToken: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenSamlAuthMessage: {
                                            src: "listenSamlAuthMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        validateCHMED: {
                                            src: "validateCHMED";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                encodedCHMED?: string;
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        verifySession: {
                                            src: "verifySession";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        initOAuth: {
                                            src: "initOAuth";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                popupRef: Window | null;
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenOAuthMessage: {
                                            src: "listenOAuthMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        refreshToken: {
                                            src: "refreshToken";
                                            logic: import('xstate').PromiseActorLogic<{
                                                sessionToken: string;
                                            }, {
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        initSAMLAuthCode: {
                                            src: "initSAMLAuthCode";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                popupRef: Window | null;
                                                hinClient: HINClient;
                                                recover: boolean;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenSAMLAuthCodeMessage: {
                                            src: "listenSAMLAuthCodeMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        getSAMLAuthHandle: {
                                            src: "getSAMLAuthHandle";
                                            logic: import('xstate').PromiseActorLogic<{
                                                sessionToken: string;
                                            }, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                authCode: string;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        signCHMEDRx: {
                                            src: "signCHMEDRx";
                                            logic: import('xstate').PromiseActorLogic<{
                                                signedPrescription: string;
                                                generatedPdf?: string;
                                            }, {
                                                encodedCHMED?: string;
                                                shouldGeneratePdf: boolean;
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                                recover: boolean;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        errorHandler: {
                                            src: "errorHandler";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                error: import('../../../../core/src/errors/index.ts').DomainError;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        successHandler: {
                                            src: "successHandler";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                signedCHMED?: string;
                                                generatedPdf?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                    }>, never, never, never, never>];
                                };
                                readonly onError: {
                                    readonly target: "OAuth";
                                };
                                readonly src: "refreshToken";
                            };
                        };
                        readonly SAMLAuthCode: {
                            readonly on: {
                                readonly GET_SAML_AUTH_HANDLE: {
                                    readonly target: "SAMLAuthHandle";
                                };
                                readonly UNAUTHORIZED_TOKEN: {
                                    readonly target: "TokenRefreshing";
                                };
                                readonly ERROR: {
                                    readonly target: "Error";
                                };
                                readonly TERMINATE: {
                                    readonly target: "End";
                                    readonly actions: readonly [{
                                        readonly type: "closePopup";
                                    }];
                                };
                            };
                            readonly invoke: readonly [{
                                readonly id: "initSAMLAuthCode";
                                readonly input: ({ self, context, event }: {
                                    context: PrescriptionSignContext;
                                    event: {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    };
                                    self: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                }) => {
                                    parent: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                    popupRef: Window | null;
                                    hinClient: HINClient;
                                    recover: boolean;
                                    sessionToken: string | undefined;
                                };
                                readonly src: "initSAMLAuthCode";
                            }, {
                                readonly id: "listenSAMLAuthCodeMessage";
                                readonly input: ({ context }: {
                                    context: PrescriptionSignContext;
                                    event: {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    };
                                    self: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                }) => {
                                    hinClient: HINClient;
                                };
                                readonly src: "listenSAMLAuthCodeMessage";
                            }];
                        };
                        readonly SAMLAuthHandle: {
                            readonly on: {
                                readonly ERROR: {
                                    readonly target: "Error";
                                };
                                readonly TERMINATE: {
                                    readonly target: "End";
                                    readonly actions: readonly [{
                                        readonly type: "closePopup";
                                    }];
                                };
                            };
                            readonly invoke: {
                                readonly id: "getSAMLAuthHandle";
                                readonly src: "getSAMLAuthHandle";
                                readonly input: ({ context, event, self }: {
                                    context: PrescriptionSignContext;
                                    event: {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    };
                                    self: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                }) => {
                                    authCode: string;
                                    parent: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                    hinClient: HINClient;
                                    sessionToken: string | undefined;
                                };
                                readonly onDone: {
                                    readonly target: "SigningCHMED";
                                    readonly actions: readonly [import('xstate').ActionFunction<PrescriptionSignContext, import('xstate').DoneActorEvent<{
                                        sessionToken: string;
                                    }, string>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, undefined, import('xstate').Values<{
                                        openPopup: {
                                            src: "openPopup";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                sessionToken?: string;
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        trackPopup: {
                                            src: "trackPopup";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                popupRef: Window | null;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenAuthenticationMessage: {
                                            src: "listenAuthenticationMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                                accessToken: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenSamlAuthMessage: {
                                            src: "listenSamlAuthMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        validateCHMED: {
                                            src: "validateCHMED";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                encodedCHMED?: string;
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        verifySession: {
                                            src: "verifySession";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        initOAuth: {
                                            src: "initOAuth";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                popupRef: Window | null;
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenOAuthMessage: {
                                            src: "listenOAuthMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        refreshToken: {
                                            src: "refreshToken";
                                            logic: import('xstate').PromiseActorLogic<{
                                                sessionToken: string;
                                            }, {
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        initSAMLAuthCode: {
                                            src: "initSAMLAuthCode";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                popupRef: Window | null;
                                                hinClient: HINClient;
                                                recover: boolean;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenSAMLAuthCodeMessage: {
                                            src: "listenSAMLAuthCodeMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        getSAMLAuthHandle: {
                                            src: "getSAMLAuthHandle";
                                            logic: import('xstate').PromiseActorLogic<{
                                                sessionToken: string;
                                            }, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                authCode: string;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        signCHMEDRx: {
                                            src: "signCHMEDRx";
                                            logic: import('xstate').PromiseActorLogic<{
                                                signedPrescription: string;
                                                generatedPdf?: string;
                                            }, {
                                                encodedCHMED?: string;
                                                shouldGeneratePdf: boolean;
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                                recover: boolean;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        errorHandler: {
                                            src: "errorHandler";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                error: import('../../../../core/src/errors/index.ts').DomainError;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        successHandler: {
                                            src: "successHandler";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                signedCHMED?: string;
                                                generatedPdf?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                    }>, never, never, never, never>];
                                };
                            };
                        };
                        readonly SigningCHMED: {
                            readonly on: {
                                readonly UNAUTHORIZED_HANDLE: {
                                    readonly target: "SAMLAuthCode";
                                };
                                readonly ERROR: {
                                    readonly target: "Error";
                                };
                                readonly TERMINATE: {
                                    readonly target: "End";
                                    readonly actions: readonly [{
                                        readonly type: "closePopup";
                                    }];
                                };
                            };
                            readonly invoke: {
                                readonly id: "signCHMEDRx";
                                readonly input: ({ context, event, self }: {
                                    context: PrescriptionSignContext;
                                    event: {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    };
                                    self: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                }) => {
                                    encodedCHMED: string | undefined;
                                    parent: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                    hinClient: HINClient;
                                    sessionToken: string | undefined;
                                    recover: boolean;
                                    shouldGeneratePdf: boolean;
                                };
                                readonly onDone: {
                                    readonly target: "Success";
                                    readonly actions: readonly [import('xstate').ActionFunction<PrescriptionSignContext, import('xstate').DoneActorEvent<{
                                        signedPrescription: string;
                                        generatedPdf?: string;
                                    }, string>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, undefined, import('xstate').Values<{
                                        openPopup: {
                                            src: "openPopup";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                sessionToken?: string;
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        trackPopup: {
                                            src: "trackPopup";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                popupRef: Window | null;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenAuthenticationMessage: {
                                            src: "listenAuthenticationMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                                accessToken: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenSamlAuthMessage: {
                                            src: "listenSamlAuthMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        validateCHMED: {
                                            src: "validateCHMED";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                encodedCHMED?: string;
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        verifySession: {
                                            src: "verifySession";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        initOAuth: {
                                            src: "initOAuth";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                popupRef: Window | null;
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenOAuthMessage: {
                                            src: "listenOAuthMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        refreshToken: {
                                            src: "refreshToken";
                                            logic: import('xstate').PromiseActorLogic<{
                                                sessionToken: string;
                                            }, {
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        initSAMLAuthCode: {
                                            src: "initSAMLAuthCode";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                popupRef: Window | null;
                                                hinClient: HINClient;
                                                recover: boolean;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenSAMLAuthCodeMessage: {
                                            src: "listenSAMLAuthCodeMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        getSAMLAuthHandle: {
                                            src: "getSAMLAuthHandle";
                                            logic: import('xstate').PromiseActorLogic<{
                                                sessionToken: string;
                                            }, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                authCode: string;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        signCHMEDRx: {
                                            src: "signCHMEDRx";
                                            logic: import('xstate').PromiseActorLogic<{
                                                signedPrescription: string;
                                                generatedPdf?: string;
                                            }, {
                                                encodedCHMED?: string;
                                                shouldGeneratePdf: boolean;
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                                recover: boolean;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        errorHandler: {
                                            src: "errorHandler";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                error: import('../../../../core/src/errors/index.ts').DomainError;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        successHandler: {
                                            src: "successHandler";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                signedCHMED?: string;
                                                generatedPdf?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                    }>, never, never, never, never>, {
                                        readonly type: "closePopup";
                                    }];
                                };
                                readonly src: "signCHMEDRx";
                            };
                        };
                        readonly Error: {
                            readonly entry: readonly [{
                                readonly type: "closePopup";
                            }, {
                                readonly type: "setError";
                            }];
                            readonly invoke: {
                                readonly id: "errorHandler";
                                readonly input: ({ context, event }: {
                                    context: PrescriptionSignContext;
                                    event: {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    };
                                    self: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                }) => {
                                    error: import('../../../../core/src/errors/index.ts').DomainError;
                                };
                                readonly src: "errorHandler";
                            };
                            readonly on: {
                                readonly START: {
                                    readonly target: "#HINPrescriptionSigning.Started";
                                    readonly actions: import('xstate').ActionFunction<PrescriptionSignContext, {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    }, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, undefined, import('xstate').Values<{
                                        openPopup: {
                                            src: "openPopup";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                sessionToken?: string;
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        trackPopup: {
                                            src: "trackPopup";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                popupRef: Window | null;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenAuthenticationMessage: {
                                            src: "listenAuthenticationMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                                accessToken: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenSamlAuthMessage: {
                                            src: "listenSamlAuthMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        validateCHMED: {
                                            src: "validateCHMED";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                encodedCHMED?: string;
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        verifySession: {
                                            src: "verifySession";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        initOAuth: {
                                            src: "initOAuth";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                popupRef: Window | null;
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenOAuthMessage: {
                                            src: "listenOAuthMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        refreshToken: {
                                            src: "refreshToken";
                                            logic: import('xstate').PromiseActorLogic<{
                                                sessionToken: string;
                                            }, {
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        initSAMLAuthCode: {
                                            src: "initSAMLAuthCode";
                                            logic: import('xstate').PromiseActorLogic<void, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                popupRef: Window | null;
                                                hinClient: HINClient;
                                                recover: boolean;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        listenSAMLAuthCodeMessage: {
                                            src: "listenSAMLAuthCodeMessage";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                hinClient: HINClient;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        getSAMLAuthHandle: {
                                            src: "getSAMLAuthHandle";
                                            logic: import('xstate').PromiseActorLogic<{
                                                sessionToken: string;
                                            }, {
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                authCode: string;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        signCHMEDRx: {
                                            src: "signCHMEDRx";
                                            logic: import('xstate').PromiseActorLogic<{
                                                signedPrescription: string;
                                                generatedPdf?: string;
                                            }, {
                                                encodedCHMED?: string;
                                                shouldGeneratePdf: boolean;
                                                parent: import('xstate').ActorRef<import('xstate').AnyMachineSnapshot, PrescriptionSignEvents>;
                                                hinClient: HINClient;
                                                sessionToken?: string;
                                                recover: boolean;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        errorHandler: {
                                            src: "errorHandler";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                error: import('../../../../core/src/errors/index.ts').DomainError;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                        successHandler: {
                                            src: "successHandler";
                                            logic: import('xstate').CallbackActorLogic<import('xstate').AnyEventObject, {
                                                signedCHMED?: string;
                                                generatedPdf?: string;
                                            }, import('xstate').EventObject>;
                                            id: string | undefined;
                                        };
                                    }>, never, never, never, never>;
                                };
                                readonly TERMINATE: {
                                    readonly target: "End";
                                };
                            };
                        };
                        readonly Success: {
                            readonly on: {
                                readonly TERMINATE: {
                                    readonly target: "End";
                                    readonly actions: readonly [{
                                        readonly type: "closePopup";
                                    }];
                                };
                            };
                            readonly invoke: {
                                readonly id: "successHandler";
                                readonly input: ({ context }: {
                                    context: PrescriptionSignContext;
                                    event: {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    };
                                    self: import('xstate').ActorRef<import('xstate').MachineSnapshot<PrescriptionSignContext, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, Record<string, import('xstate').AnyActorRef>, import('xstate').StateValue, string, unknown, any, any>, {
                                        type: "OPEN_POPUP";
                                        popupRef: Window | null;
                                    } | {
                                        type: "CLOSE_POPUP";
                                    } | {
                                        type: "START";
                                        encodedCHMED: string;
                                        shouldGeneratePdf: boolean;
                                    } | {
                                        type: "TERMINATE";
                                    } | {
                                        type: "VERIFY_SESSION";
                                    } | {
                                        type: "REFRESH_TOKEN";
                                    } | {
                                        type: "GET_TOKEN";
                                    } | {
                                        type: "GET_SAML_AUTH_CODE";
                                        recoverable?: boolean;
                                        sessionToken: string;
                                    } | {
                                        type: "GET_SAML_AUTH_HANDLE";
                                        authCode: string;
                                    } | {
                                        type: "VALIDATE_CHMED";
                                        sessionToken: string;
                                    } | {
                                        type: "xstate.done.actor.getSAMLAuthHandle";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "SIGN_PRESCRIPTION";
                                        sessionToken: string;
                                        recoverable?: boolean;
                                    } | {
                                        type: "AUTHENTICATION_SUCCESS";
                                    } | {
                                        type: "ERROR";
                                        error: import('../../../../core/src/errors/index.ts').DomainError;
                                    } | {
                                        type: "UNAUTHORIZED_TOKEN";
                                    } | {
                                        type: "UNAUTHORIZED_HANDLE";
                                    }, import('xstate').AnyEventObject>;
                                }) => {
                                    signedCHMED: string | undefined;
                                    generatedPdf: string | undefined;
                                };
                                readonly src: "successHandler";
                            };
                        };
                        readonly End: {
                            readonly type: "final";
                        };
                    };
                };
            };
        };
    };
}>;
