{"version":3,"sources":["src/common.speech/ServiceMessages/TranslationHypothesis.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C,MAAM,WAAW,sBAAsB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,aAAa,CAAC;CAC9B;AAED,qBAAa,qBAAsB,YAAW,sBAAsB;IAChE,OAAO,CAAC,yBAAyB,CAAyB;IAE1D,OAAO;WAKO,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB;IAI3D,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,MAAM,IAAI,MAAM,CAE1B;IAED,IAAW,IAAI,IAAI,MAAM,CAExB;IAED,IAAW,WAAW,IAAI,aAAa,CAEtC;CACJ","file":"TranslationHypothesis.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT license.\r\n\r\nimport { ITranslations } from \"../Exports\";\r\nimport { TranslationStatus } from \"../TranslationStatus\";\r\n\r\n// translation.hypothesis\r\nexport interface ITranslationHypothesis {\r\n    Duration: number;\r\n    Offset: number;\r\n    Text: string;\r\n    Translation: ITranslations;\r\n}\r\n\r\nexport class TranslationHypothesis implements ITranslationHypothesis {\r\n    private privTranslationHypothesis: ITranslationHypothesis;\r\n\r\n    private constructor(json: string) {\r\n        this.privTranslationHypothesis = JSON.parse(json);\r\n        this.privTranslationHypothesis.Translation.TranslationStatus = (TranslationStatus as any)[this.privTranslationHypothesis.Translation.TranslationStatus];\r\n    }\r\n\r\n    public static fromJSON(json: string): TranslationHypothesis {\r\n        return new TranslationHypothesis(json);\r\n    }\r\n\r\n    public get Duration(): number {\r\n        return this.privTranslationHypothesis.Duration;\r\n    }\r\n\r\n    public get Offset(): number {\r\n        return this.privTranslationHypothesis.Offset;\r\n    }\r\n\r\n    public get Text(): string {\r\n        return this.privTranslationHypothesis.Text;\r\n    }\r\n\r\n    public get Translation(): ITranslations {\r\n        return this.privTranslationHypothesis.Translation;\r\n    }\r\n}\r\n"]}