1 |
- {"ast":null,"code":"\"use strict\";\n\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.DialogServiceTurnStateManager = void 0;\nconst Error_js_1 = require(\"../common/Error.js\");\nconst DialogServiceTurnState_js_1 = require(\"./DialogServiceTurnState.js\");\nclass DialogServiceTurnStateManager {\n constructor() {\n this.privTurnMap = new Map();\n return;\n }\n StartTurn(id) {\n if (this.privTurnMap.has(id)) {\n throw new Error_js_1.InvalidOperationError(\"Service error: There is already a turn with id:\" + id);\n }\n const turnState = new DialogServiceTurnState_js_1.DialogServiceTurnState(this, id);\n this.privTurnMap.set(id, turnState);\n return this.privTurnMap.get(id);\n }\n GetTurn(id) {\n return this.privTurnMap.get(id);\n }\n CompleteTurn(id) {\n if (!this.privTurnMap.has(id)) {\n throw new Error_js_1.InvalidOperationError(\"Service error: Received turn end for an unknown turn id:\" + id);\n }\n const turnState = this.privTurnMap.get(id);\n turnState.complete();\n this.privTurnMap.delete(id);\n return turnState;\n }\n}\nexports.DialogServiceTurnStateManager = DialogServiceTurnStateManager;","map":{"version":3,"names":["Object","defineProperty","exports","value","DialogServiceTurnStateManager","Error_js_1","require","DialogServiceTurnState_js_1","constructor","privTurnMap","Map","StartTurn","id","has","InvalidOperationError","turnState","DialogServiceTurnState","set","get","GetTurn","CompleteTurn","complete","delete"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/microsoft-cognitiveservices-speech-sdk/distrib/lib/src/common.speech/DialogServiceTurnStateManager.js"],"sourcesContent":["\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DialogServiceTurnStateManager = void 0;\nconst Error_js_1 = require(\"../common/Error.js\");\nconst DialogServiceTurnState_js_1 = require(\"./DialogServiceTurnState.js\");\nclass DialogServiceTurnStateManager {\n constructor() {\n this.privTurnMap = new Map();\n return;\n }\n StartTurn(id) {\n if (this.privTurnMap.has(id)) {\n throw new Error_js_1.InvalidOperationError(\"Service error: There is already a turn with id:\" + id);\n }\n const turnState = new DialogServiceTurnState_js_1.DialogServiceTurnState(this, id);\n this.privTurnMap.set(id, turnState);\n return this.privTurnMap.get(id);\n }\n GetTurn(id) {\n return this.privTurnMap.get(id);\n }\n CompleteTurn(id) {\n if (!this.privTurnMap.has(id)) {\n throw new Error_js_1.InvalidOperationError(\"Service error: Received turn end for an unknown turn id:\" + id);\n }\n const turnState = this.privTurnMap.get(id);\n turnState.complete();\n this.privTurnMap.delete(id);\n return turnState;\n }\n}\nexports.DialogServiceTurnStateManager = DialogServiceTurnStateManager;\n\n"],"mappings":"AAAA,YAAY;;AACZ;AACA;AACAA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAAEC,KAAK,EAAE;AAAK,CAAC,CAAC;AAC7DD,OAAO,CAACE,6BAA6B,GAAG,KAAK,CAAC;AAC9C,MAAMC,UAAU,GAAGC,OAAO,CAAC,oBAAoB,CAAC;AAChD,MAAMC,2BAA2B,GAAGD,OAAO,CAAC,6BAA6B,CAAC;AAC1E,MAAMF,6BAA6B,CAAC;EAChCI,WAAWA,CAAA,EAAG;IACV,IAAI,CAACC,WAAW,GAAG,IAAIC,GAAG,CAAC,CAAC;IAC5B;EACJ;EACAC,SAASA,CAACC,EAAE,EAAE;IACV,IAAI,IAAI,CAACH,WAAW,CAACI,GAAG,CAACD,EAAE,CAAC,EAAE;MAC1B,MAAM,IAAIP,UAAU,CAACS,qBAAqB,CAAC,iDAAiD,GAAGF,EAAE,CAAC;IACtG;IACA,MAAMG,SAAS,GAAG,IAAIR,2BAA2B,CAACS,sBAAsB,CAAC,IAAI,EAAEJ,EAAE,CAAC;IAClF,IAAI,CAACH,WAAW,CAACQ,GAAG,CAACL,EAAE,EAAEG,SAAS,CAAC;IACnC,OAAO,IAAI,CAACN,WAAW,CAACS,GAAG,CAACN,EAAE,CAAC;EACnC;EACAO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