diff --git a/.gitattributes b/.gitattributes index a4672446..c68cf245 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ dist/*.js -diff dist/*.css -diff dist/*.map -diff +dist/*.zip -diff diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..0f3f0214 --- /dev/null +++ b/.npmignore @@ -0,0 +1,5 @@ +build +config +img +lex-web-ui +Makefile diff --git a/CHANGELOG.md b/CHANGELOG.md index e9693815..1f141456 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,79 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [0.9.0] - 2017-08-04 +This release adds a couple of simplified deployment options: +1. Simplfied CloudFormation stack without a deployment pipeline. +It uses CodeBuild to create the config files and to deploy directly +to S3. +This mode is the new default of the CloudFormation setup so if +you want to keep using the deployment pipeline setup (CodeCommit, +CodeBuild, CodePipeline), you are going to need to explicitly set the +`CreatePipeline` parameter to true. +2. AWS Mobile Hub project file that deploys the Web UI to S3 fronted +by a CloudFront distribution. The Mobile Hub project also creates the +Cognito Identity Pool, Lex Bot and IAM Roles. This allows to deploy the +application from a single file hosted in github. + +**NOTE**: At this point, there is a Content-Type issue with the files +deployed using the Mobile Hub project file. The Mobile Hub deployed +files seem to have its content-type set to octect-stream which causes the +browser to download the files instead of rendering. To work around this +issue, you can re-upload the files using the S3 console or aws cli. The +Makefile in the root dir can be used to upload the files with the right +content type. Use the command: `make sync-website` (requires setting +the bucket name with the `WEBAPP_BUCKET` environmental variable). This +issue will be further investigated. + +### Added +- Added Mobile Hub deployment +- Added new CloudFormation template `codebuild.yaml` used to deploy the +application without a pipeline +- Added `CreatePipeline` parameter to the master.yaml template to control +whether the stack should create a deployment pipeline +- Added build-time support to set web UI config fields that are commonly +changed using environmental variables. This is in preparation to set +these variables from CloudFormation parameters. The new variables include: + * BOT_INITIAL_TEXT + * BOT_INITIAL_SPEECH + * UI_TOOLBAR_TITLE + * UI_TOOLBAR_LOGO +- Added a new `config` directory in the root of the repo that includes +build configuration +- Added a new `src` directory in the root of the repo to hold the +website files. This includes a modified version of the iframe parent +page and bot-loader that resides in the `lex-web-ui/static/iframe` +directory. Eventualy, this new version should replace, somehow get +merged with the other, or sourced in both places from a single file. +- Added a `server.js` file for quick development and testing. It loads +the sample page from the dist and source directories. It can be used +with the command `npm start` from the root directory. You may need to put +the right values in the config files under `src/config` to make it work. +- Added CloudFormation format statement to all templates files +- Added .npmignore file +- Added sample code on how to use the Vue plugin for including the +component into an existing Vue application + +### Changed +- **[BREAKING]** CloudFormation setup now defaults to not creating a +development pipeline and just copy the prebuilt files to an S3 bucket. +To use the pipeline, you now have to set the `CreatePipeline` parameter +to true +- Refactored the build scripts and Makefiles to have better separation +of config and code. The config config used by the Makefiles now resides +under: `config/env.mk`. Some of the names of the Makefile have changed so +you may need to change your environment if you were using the Makefiles +from other script. +- The `update-lex-web-ui-config.js` build script now takes its config from +a node js module in the `config` directory. The config is driven by the +`BUILD_TYPE` environmental variable which controls whether the deployment +is building the app from full source or using the dist dir. For this, the +value of the `BUILD_TYPE` variable can be set to either `full` or `dist`. +- Updated CodeBuild environment to node js v6.3.1 using ubuntu +- Renamed iframe bot.css to bot-loader.css +- Updated dependency versions +- Clarified READMEs + ## [0.8.3] - 2017-07-29 ### Changed - Moved default icons from config to sample application diff --git a/Makefile b/Makefile index 798972df..7826d4ba 100644 --- a/Makefile +++ b/Makefile @@ -1,47 +1,63 @@ -# this Makefile is mainly meant to be called from CodeBuild -# or to setup/run the local dev environment -BUILD_DIR := build +# This Makefile is used to configure and deploy the sample app. +# It is used in CodeBuild by the CloudFormation stack. +# It can also be run from a local dev environment. +# It can either deploy a full build or use the prebuilt library in +# in the dist directory + +# environment file provides config parameters +CONFIG_ENV := config/env.mk +include $(CONFIG_ENV) all: build .PHONY: all WEBAPP_DIR := ./lex-web-ui -build: config - @echo "[INFO] Building web app in dir [$(WEBAPP_DIR)]" - cd $(WEBAPP_DIR) && npm run build -.PHONY: build - -dev: config - @echo "[INFO] Running web app in dev mode" - cd $(WEBAPP_DIR) && npm run dev -.PHONY: dev +BUILD_DIR := build +DIST_DIR := dist +SRC_DIR := src +CONFIG_DIR := $(SRC_DIR)/config +WEBSITE_DIR := $(SRC_DIR)/website -PACKAGE_JSON := $(WEBAPP_DIR)/package.json -install-deps: $(PACKAGE_JSON) +# this install all the npm dependencies needed to build from scratch +install-deps: @echo "[INFO] Installing npm dependencies" cd $(WEBAPP_DIR) && npm install -.PHONY: install +.PHONY: install-deps +# BUILD_TYPE controls whether the configuration is done for a full build or +# for using the prebuilt/dist libraries +# Expected values: full || dist +# If empty, probably this is being run locally or from an external script +BUILD_TYPE ?= $() + +# updates the config files with values from the environment UPDATE_CONFIG_SCRIPT := $(BUILD_DIR)/update-lex-web-ui-config.js export IFRAME_CONFIG ?= $(realpath $(WEBAPP_DIR)/static/iframe/config.json) export WEBAPP_CONFIG_PROD ?= $(realpath $(WEBAPP_DIR)/src/config/config.prod.json) export WEBAPP_CONFIG_DEV ?= $(realpath $(WEBAPP_DIR)/src/config/config.dev.json) -CONFIG_FILES := $(IFRAME_CONFIG) $(WEBAPP_CONFIG_PROD) $(WEBAPP_CONFIG_DEV) +export WEBAPP_CONFIG_PREBUILT ?= $(realpath $(SRC_DIR)/config/bot-config.json) +export IFRAME_CONFIG_PREBUILT ?= $(realpath $(CONFIG_DIR)/bot-loader-config.json) +CONFIG_FILES := $(IFRAME_CONFIG) $(WEBAPP_CONFIG_PROD) $(WEBAPP_CONFIG_DEV) \ + $(WEBAPP_CONFIG_PREBUILT) $(IFRAME_CONFIG_PREBUILT) config: $(UPDATE_CONFIG_SCRIPT) $(CONFIG_ENV) $(CONFIG_FILES) @echo "[INFO] Running config script: [$(<)]" node $(<) .PHONY: config -DIST_DIR := $(WEBAPP_DIR)/dist -s3sync: - @echo "[INFO] synching to S3 webapp bucket: [$(WEBAPP_BUCKET)]" - aws s3 sync --acl public-read "$(DIST_DIR)" "s3://$(WEBAPP_BUCKET)/" -.PHONY: s3sync +build: config + @echo "[INFO] Building web app in dir [$(WEBAPP_DIR)]" + cd $(WEBAPP_DIR) && npm run build +.PHONY: build -s3deploy: +# used by the Pipeline deployment mode when building from scratch +WEBAPP_DIST_DIR := $(WEBAPP_DIR)/dist +CODEBUILD_BUILD_ID ?= none +deploy-to-s3: + @[ "$(WEBAPP_BUCKET)" ] || \ + (echo "[ERROR] WEBAPP_BUCKET env var not set" ; exit 1) @echo "[INFO] deploying to S3 webapp bucket: [$(WEBAPP_BUCKET)]" @echo "[INFO] copying build: [$(CODEBUILD_BUILD_ID)]" - aws s3 cp --recursive "$(DIST_DIR)" \ + aws s3 cp --recursive "$(WEBAPP_DIST_DIR)" \ "s3://$(WEBAPP_BUCKET)/builds/$(CODEBUILD_BUILD_ID)/" @echo "[INFO] copying new version" aws s3 cp --recursive --acl public-read \ @@ -49,8 +65,37 @@ s3deploy: "s3://$(WEBAPP_BUCKET)/" @[ "$(PARENT_PAGE_BUCKET)" ] && \ ( echo "[INFO] synching parent page to bucket: [$(PARENT_PAGE_BUCKET)]" ; \ - aws s3 sync --acl public-read "$(DIST_DIR)/static/iframe" \ + aws s3 sync --acl public-read "$(WEBAPP_DIST_DIR)/static/iframe" \ "s3://$(PARENT_PAGE_BUCKET)/static/iframe" ) || \ echo "[INFO] no parent bucket to deploy" @echo "[INFO] all done deploying" -.PHONY: s3deploy +.PHONY: deploy-to-s3 + +# Run by CodeBuild deployment mode when which uses the prebuilt libraries +# Can also be used to easily copy local changes to a bucket +# (e.g. mobile hub created bucket) +# It avoids overwriting the aws-config.js file when using outside of a build +sync-website: + @[ "$(WEBAPP_BUCKET)" ] || \ + (echo "[ERROR] WEBAPP_BUCKET variable not set" ; exit 1) + @echo "[INFO] copying libary files" + aws s3 sync --acl public-read \ + --exclude Makefile \ + --exclude lex-web-ui-mobile-hub.zip \ + $(DIST_DIR) s3://$(WEBAPP_BUCKET) + @echo "[INFO] copying website files" + aws s3 sync --acl public-read \ + $(WEBSITE_DIR) s3://$(WEBAPP_BUCKET) + @echo "[INFO] copying config files" + aws s3 sync --acl public-read \ + --exclude '*' \ + --include 'bot-*config.json' \ + $(CONFIG_DIR) s3://$(WEBAPP_BUCKET) + @[ "$(BUILD_TYPE)" = 'dist' ] && \ + echo "[INFO] copying aws-config.js" ;\ + aws s3 sync --acl public-read \ + --exclude '*' \ + --include 'aws-config.js' \ + $(CONFIG_DIR) s3://$(WEBAPP_BUCKET) + @echo "[INFO] all done deploying" +.PHONY: sync-website diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 296bda8d..a2273182 --- a/README.md +++ b/README.md @@ -3,40 +3,108 @@ > Sample Amazon Lex Web Interface ## Overview -This repository provides a sample [Amazon Lex](https://aws.amazon.com/lex/) -web interface that can be integrated in your website. This web interface -allows to interact with a Lex bot directly from a browser using by text -or voice (from a webRTC capable browser). -Here is a screenshot of it: +This is a sample [Amazon Lex](https://aws.amazon.com/lex/) +web interface. It provides a chatbot UI component that can be integrated +in your website. The interface allows to interact with a Lex bot directly +from a browser using text or voice (on webRTC capable browsers). - +## Quick Launch +Click the button below to test drive this project using +[AWS Mobile Hub](https://aws.amazon.com/mobile/). +It will deploy the chatbot UI to +[S3](https://aws.amazon.com/s3/) and +[CloudFront](https://aws.amazon.com/cloudfront/). It also deploys +the sample [Order Flowers Lex bot](http://docs.aws.amazon.com/lex/latest/dg/gs-bp-create-bot.html) +automatically for you. + +

+ + + + + +

+ +**NOTE**: If the Mobile Hub deployed site causes the browser to download +the files instead of rendering it, you can re-upload the files to the +S3 bucket using the S3 console or aws cli. ## Integrating into your Site -You can consume this project as a library that renders the chatbot -UI component in your site. The library can be included in your web -application by importing it as a module in a -[webpack](https://webpack.github.io/) -based project or by directly sourcing it in an HTML ` - - - - - - - - - - diff --git a/dist/lex-web-ui-mobile-hub.zip b/dist/lex-web-ui-mobile-hub.zip new file mode 100644 index 00000000..71b0952a Binary files /dev/null and b/dist/lex-web-ui-mobile-hub.zip differ diff --git a/dist/lex-web-ui.css.map b/dist/lex-web-ui.css.map index 2c36ecea..f0e203f6 100755 --- a/dist/lex-web-ui.css.map +++ b/dist/lex-web-ui.css.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./src/components/LexWeb.vue","webpack:///./src/components/MessageList.vue","webpack:///./src/components/Message.vue","webpack:///./src/components/MessageText.vue","webpack:///./src/components/ResponseCard.vue","webpack:///./src/components/StatusBar.vue","webpack:///./src/components/InputContainer.vue"],"names":[],"mappings":"AACA,SACE,oBACA,oBACA,aACA,4BACA,6BACI,0BACI,sBACR,UAAY,CCRd,+BACE,yBACA,oBACA,oBACA,aACA,mBACI,WACI,OACR,4BACA,6BACI,0BACI,sBACR,eACA,cACA,gBACA,iBACA,oBACA,UAAY,CAEd,8BACE,0BACI,qBAAuB,CAE7B,gCACE,wBACI,mBAAqB,CCzB3B,0BACE,cAAgB,CAElB,8BACE,iBAAoB,CAEtB,oCACE,wBAA0B,CAE5B,sCACE,wBAA0B,CAE5B,uBACE,YACA,WACA,6BAAgC,CAElC,8BACE,aAAe,CAEjB,gCACE,oBACA,oBACA,aACA,wBACI,qBACI,uBACR,YACA,UAAY,CC5Bd,+BACE,mBACA,YAAe,CCFjB,uBACE,WACA,iBACA,mBAAsB,CAExB,8BACE,aACA,iBAAoB,CAEtB,6BACE,aAAgB,CAElB,2CACE,wBACI,qBACI,uBACR,oBAAuB,CChBzB,6BACE,oBACA,oBACA,aACA,4BACA,6BACI,0BACI,qBAAuB,CAEjC,8BACE,2BACI,kBACJ,oBACA,oBACA,aACA,iBAAmB,CAErB,+BACE,oBACA,oBACA,aACA,wBACI,qBACI,sBAAwB,CAElC,qCACE,cACA,UAAY,CC3Bd,kCACE,oBACA,oBACA,aACA,yBACI,sBACI,kBAAoB","file":"bundle/lex-web-ui.css","sourcesContent":["\n#lex-web {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n width: 100%;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/LexWeb.vue","\n.message-list[data-v-20b8f18d] {\n background-color: #FAFAFA; /* gray-50 from material palette */\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n margin-right: 0px;\n margin-left: 0px;\n overflow-y: auto;\n padding-top: 0.3em;\n padding-bottom: 0.5em;\n width: 100%;\n}\n.message-bot[data-v-20b8f18d] {\n -ms-flex-item-align: start;\n align-self: flex-start;\n}\n.message-human[data-v-20b8f18d] {\n -ms-flex-item-align: end;\n align-self: flex-end;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/MessageList.vue","\n.message[data-v-290c8f4f] {\n max-width: 66vw;\n}\n.audio-label[data-v-290c8f4f] {\n padding-left: 0.8em;\n}\n.message-bot .chip[data-v-290c8f4f] {\n background-color: #FFEBEE; /* red-50 from material palette */\n}\n.message-human .chip[data-v-290c8f4f] {\n background-color: #E8EAF6; /* indigo-50 from material palette */\n}\n.chip[data-v-290c8f4f] {\n height: auto;\n margin: 5px;\n font-size: calc(1em + 0.25vmin);\n}\n.play-button[data-v-290c8f4f] {\n font-size: 2em;\n}\n.response-card[data-v-290c8f4f] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin: 0.8em;\n width: 90vw;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/Message.vue","\n.message-text[data-v-d69cb2c8] {\n white-space: normal;\n padding: 0.8em;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/MessageText.vue","\n.card[data-v-799b9a4e] {\n width: 75vw;\n position: inherit; /* workaround to card being displayed on top of toolbar shadow */\n padding-bottom: 0.5em;\n}\n.card__title[data-v-799b9a4e] {\n padding: 0.5em;\n padding-top: 0.75em;\n}\n.card__text[data-v-799b9a4e] {\n padding: 0.33em;\n}\n.card__actions.button-row[data-v-799b9a4e] {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n padding-bottom: 0.15em;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/ResponseCard.vue","\n.status-bar[data-v-2df12d09] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.status-text[data-v-2df12d09] {\n -ms-flex-item-align: center;\n align-self: center;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n text-align: center;\n}\n.volume-meter[data-v-2df12d09] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.volume-meter meter[data-v-2df12d09] {\n height: 0.75rem;\n width: 33vw;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/StatusBar.vue","\n.input-container[data-v-6dd14e82] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/InputContainer.vue"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///./src/components/LexWeb.vue?73a7","webpack:///./src/components/MessageList.vue?89bd","webpack:///./src/components/Message.vue?c89d","webpack:///./src/components/MessageText.vue?22b7","webpack:///./src/components/ResponseCard.vue","webpack:///./src/components/StatusBar.vue?f62e","webpack:///./src/components/InputContainer.vue?84a6"],"names":[],"mappings":"AACA,SACE,oBACA,oBACA,aACA,4BACA,6BACI,0BACI,sBACR,UAAY,CCRd,+BACE,yBACA,oBACA,oBACA,aACA,mBACI,WACI,OACR,4BACA,6BACI,0BACI,sBACR,eACA,cACA,gBACA,iBACA,oBACA,UAAY,CAEd,8BACE,0BACI,qBAAuB,CAE7B,gCACE,wBACI,mBAAqB,CCzB3B,0BACE,cAAgB,CAElB,8BACE,iBAAoB,CAEtB,oCACE,wBAA0B,CAE5B,sCACE,wBAA0B,CAE5B,uBACE,YACA,WACA,6BAAgC,CAElC,8BACE,aAAe,CAEjB,gCACE,oBACA,oBACA,aACA,wBACI,qBACI,uBACR,YACA,UAAY,CC5Bd,+BACE,mBACA,YAAe,CCFjB,uBACE,WACA,iBACA,mBAAsB,CAExB,8BACE,aACA,iBAAoB,CAEtB,6BACE,aAAgB,CAElB,2CACE,wBACI,qBACI,uBACR,oBAAuB,CChBzB,6BACE,oBACA,oBACA,aACA,4BACA,6BACI,0BACI,qBAAuB,CAEjC,8BACE,2BACI,kBACJ,oBACA,oBACA,aACA,iBAAmB,CAErB,+BACE,oBACA,oBACA,aACA,wBACI,qBACI,sBAAwB,CAElC,qCACE,cACA,UAAY,CC3Bd,kCACE,oBACA,oBACA,aACA,yBACI,sBACI,kBAAoB","file":"bundle/lex-web-ui.css","sourcesContent":["\n#lex-web {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n width: 100%;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/LexWeb.vue","\n.message-list[data-v-20b8f18d] {\n background-color: #FAFAFA; /* gray-50 from material palette */\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n margin-right: 0px;\n margin-left: 0px;\n overflow-y: auto;\n padding-top: 0.3em;\n padding-bottom: 0.5em;\n width: 100%;\n}\n.message-bot[data-v-20b8f18d] {\n -ms-flex-item-align: start;\n align-self: flex-start;\n}\n.message-human[data-v-20b8f18d] {\n -ms-flex-item-align: end;\n align-self: flex-end;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/MessageList.vue","\n.message[data-v-290c8f4f] {\n max-width: 66vw;\n}\n.audio-label[data-v-290c8f4f] {\n padding-left: 0.8em;\n}\n.message-bot .chip[data-v-290c8f4f] {\n background-color: #FFEBEE; /* red-50 from material palette */\n}\n.message-human .chip[data-v-290c8f4f] {\n background-color: #E8EAF6; /* indigo-50 from material palette */\n}\n.chip[data-v-290c8f4f] {\n height: auto;\n margin: 5px;\n font-size: calc(1em + 0.25vmin);\n}\n.play-button[data-v-290c8f4f] {\n font-size: 2em;\n}\n.response-card[data-v-290c8f4f] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin: 0.8em;\n width: 90vw;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/Message.vue","\n.message-text[data-v-d69cb2c8] {\n white-space: normal;\n padding: 0.8em;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/MessageText.vue","\n.card[data-v-799b9a4e] {\n width: 75vw;\n position: inherit; /* workaround to card being displayed on top of toolbar shadow */\n padding-bottom: 0.5em;\n}\n.card__title[data-v-799b9a4e] {\n padding: 0.5em;\n padding-top: 0.75em;\n}\n.card__text[data-v-799b9a4e] {\n padding: 0.33em;\n}\n.card__actions.button-row[data-v-799b9a4e] {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n padding-bottom: 0.15em;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/ResponseCard.vue","\n.status-bar[data-v-2df12d09] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.status-text[data-v-2df12d09] {\n -ms-flex-item-align: center;\n align-self: center;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n text-align: center;\n}\n.volume-meter[data-v-2df12d09] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.volume-meter meter[data-v-2df12d09] {\n height: 0.75rem;\n width: 33vw;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/StatusBar.vue","\n.input-container[data-v-6dd14e82] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/InputContainer.vue"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/lex-web-ui.js b/dist/lex-web-ui.js index 98d21d63..682db99e 100755 --- a/dist/lex-web-ui.js +++ b/dist/lex-web-ui.js @@ -4077,7 +4077,7 @@ License for the specific language governing permissions and limitations under th /* harmony default export */ __webpack_exports__["a"] = ({ - version: true ? "0.8.3" : '0.0.0', + version: true ? "0.9.0" : '0.0.0', lex: { acceptFormat: 'audio/ogg', dialogState: '', diff --git a/dist/lex-web-ui.js.map b/dist/lex-web-ui.js.map index da661004..38956050 100755 --- a/dist/lex-web-ui.js.map +++ b/dist/lex-web-ui.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 6c2119f64c4473556aae","webpack:///./node_modules/core-js/library/modules/_core.js","webpack:///./node_modules/core-js/library/modules/_wks.js","webpack:///./node_modules/core-js/library/modules/_global.js","webpack:///./node_modules/core-js/library/modules/_object-dp.js","webpack:///./node_modules/core-js/library/modules/_an-object.js","webpack:///./node_modules/core-js/library/modules/_descriptors.js","webpack:///./node_modules/vue-loader/lib/component-normalizer.js","webpack:///./node_modules/core-js/library/modules/_export.js","webpack:///./node_modules/core-js/library/modules/_hide.js","webpack:///./node_modules/core-js/library/modules/_has.js","webpack:///./node_modules/core-js/library/modules/_to-iobject.js","webpack:///./node_modules/core-js/library/modules/_fails.js","webpack:///./node_modules/core-js/library/modules/_object-keys.js","webpack:///./node_modules/babel-runtime/core-js/promise.js","webpack:///./node_modules/core-js/library/modules/_iterators.js","webpack:///./node_modules/babel-runtime/helpers/extends.js","webpack:///./node_modules/core-js/library/modules/_ctx.js","webpack:///./node_modules/core-js/library/modules/_is-object.js","webpack:///./node_modules/core-js/library/modules/_property-desc.js","webpack:///./node_modules/core-js/library/modules/_cof.js","webpack:///./node_modules/core-js/library/modules/es6.string.iterator.js","webpack:///./node_modules/core-js/library/modules/_uid.js","webpack:///./node_modules/core-js/library/modules/_object-pie.js","webpack:///./node_modules/core-js/library/modules/_to-object.js","webpack:///./node_modules/core-js/library/modules/_library.js","webpack:///./node_modules/core-js/library/modules/_set-to-string-tag.js","webpack:///./node_modules/core-js/library/modules/web.dom.iterable.js","webpack:///./node_modules/core-js/library/modules/_a-function.js","webpack:///./node_modules/core-js/library/modules/_dom-create.js","webpack:///./node_modules/core-js/library/modules/_to-primitive.js","webpack:///./node_modules/core-js/library/modules/_defined.js","webpack:///./node_modules/core-js/library/modules/_to-length.js","webpack:///./node_modules/core-js/library/modules/_to-integer.js","webpack:///./node_modules/core-js/library/modules/_shared-key.js","webpack:///./node_modules/core-js/library/modules/_shared.js","webpack:///./node_modules/core-js/library/modules/_enum-bug-keys.js","webpack:///./node_modules/core-js/library/modules/_object-gops.js","webpack:///./node_modules/babel-runtime/helpers/classCallCheck.js","webpack:///./node_modules/babel-runtime/core-js/object/define-property.js","webpack:///./node_modules/core-js/library/modules/_classof.js","webpack:///./node_modules/core-js/library/modules/core.get-iterator-method.js","webpack:///./node_modules/babel-runtime/helpers/typeof.js","webpack:///./node_modules/core-js/library/modules/_wks-ext.js","webpack:///./node_modules/core-js/library/modules/_wks-define.js","webpack:///./src/config/index.js","webpack:///./node_modules/babel-runtime/core-js/object/assign.js","webpack:///./node_modules/core-js/library/modules/_ie8-dom-define.js","webpack:///./node_modules/core-js/library/modules/_object-keys-internal.js","webpack:///./node_modules/core-js/library/modules/_iobject.js","webpack:///./node_modules/core-js/library/modules/_iter-define.js","webpack:///./node_modules/core-js/library/modules/_redefine.js","webpack:///./node_modules/core-js/library/modules/_object-create.js","webpack:///./node_modules/core-js/library/modules/_html.js","webpack:///./node_modules/core-js/library/modules/_iter-call.js","webpack:///./node_modules/core-js/library/modules/_is-array-iter.js","webpack:///./node_modules/core-js/library/modules/_task.js","webpack:///./node_modules/core-js/library/modules/_iter-detect.js","webpack:///./node_modules/babel-runtime/core-js/object/keys.js","webpack:///./node_modules/core-js/library/modules/_object-gopn.js","webpack:///./node_modules/babel-runtime/helpers/slicedToArray.js","webpack:///./node_modules/babel-runtime/helpers/createClass.js","webpack:///./src/lex-web-ui.js","webpack:///./node_modules/core-js/library/fn/object/assign.js","webpack:///./node_modules/core-js/library/modules/es6.object.assign.js","webpack:///./node_modules/core-js/library/modules/_object-assign.js","webpack:///./node_modules/core-js/library/modules/_array-includes.js","webpack:///./node_modules/core-js/library/modules/_to-index.js","webpack:///./node_modules/core-js/library/fn/object/define-property.js","webpack:///./node_modules/core-js/library/modules/es6.object.define-property.js","webpack:///./node_modules/core-js/library/fn/promise.js","webpack:///./node_modules/core-js/library/modules/_string-at.js","webpack:///./node_modules/core-js/library/modules/_iter-create.js","webpack:///./node_modules/core-js/library/modules/_object-dps.js","webpack:///./node_modules/core-js/library/modules/_object-gpo.js","webpack:///./node_modules/core-js/library/modules/es6.array.iterator.js","webpack:///./node_modules/core-js/library/modules/_add-to-unscopables.js","webpack:///./node_modules/core-js/library/modules/_iter-step.js","webpack:///./node_modules/core-js/library/modules/es6.promise.js","webpack:///./node_modules/core-js/library/modules/_an-instance.js","webpack:///./node_modules/core-js/library/modules/_for-of.js","webpack:///./node_modules/core-js/library/modules/_species-constructor.js","webpack:///./node_modules/core-js/library/modules/_invoke.js","webpack:///./node_modules/core-js/library/modules/_microtask.js","webpack:///./node_modules/core-js/library/modules/_redefine-all.js","webpack:///./node_modules/core-js/library/modules/_set-species.js","webpack:///external \"vue\"","webpack:///external \"vuex\"","webpack:///external \"aws-sdk/global\"","webpack:///external \"aws-sdk/clients/lexruntime\"","webpack:///external \"aws-sdk/clients/polly\"","webpack:///./src/components/LexWeb.vue?b19d","webpack:///./src/components/LexWeb.vue?c6c4","webpack:///LexWeb.vue","webpack:///./node_modules/core-js/library/fn/object/keys.js","webpack:///./node_modules/core-js/library/modules/es6.object.keys.js","webpack:///./node_modules/core-js/library/modules/_object-sap.js","webpack:///./src/components/ToolbarContainer.vue","webpack:///ToolbarContainer.vue","webpack:///./src/components/ToolbarContainer.vue?a416","webpack:///./src/components/MessageList.vue?1c68","webpack:///./src/components/MessageList.vue?a09a","webpack:///MessageList.vue","webpack:///./src/components/Message.vue?3319","webpack:///./src/components/Message.vue?633a","webpack:///Message.vue","webpack:///./src/components/MessageText.vue?588c","webpack:///./src/components/MessageText.vue?a9a5","webpack:///MessageText.vue","webpack:///./src/components/MessageText.vue?0813","webpack:///./src/components/ResponseCard.vue?b224","webpack:///./src/components/ResponseCard.vue?94ef","webpack:///ResponseCard.vue","webpack:///./src/components/ResponseCard.vue?150e","webpack:///./src/components/Message.vue?aae4","webpack:///./src/components/MessageList.vue?5dce","webpack:///./src/components/StatusBar.vue?8ae9","webpack:///./src/components/StatusBar.vue?a8cb","webpack:///StatusBar.vue","webpack:///./src/components/StatusBar.vue?aadb","webpack:///./src/components/InputContainer.vue?8884","webpack:///./src/components/InputContainer.vue?19af","webpack:///InputContainer.vue","webpack:///./src/components/InputContainer.vue?efec","webpack:///./src/components/LexWeb.vue?0575","webpack:///./src/store/index.js","webpack:///./src/store/state.js","webpack:///./node_modules/babel-runtime/core-js/symbol/iterator.js","webpack:///./node_modules/core-js/library/fn/symbol/iterator.js","webpack:///./node_modules/babel-runtime/core-js/symbol.js","webpack:///./node_modules/core-js/library/fn/symbol/index.js","webpack:///./node_modules/core-js/library/modules/es6.symbol.js","webpack:///./node_modules/core-js/library/modules/_meta.js","webpack:///./node_modules/core-js/library/modules/_keyof.js","webpack:///./node_modules/core-js/library/modules/_enum-keys.js","webpack:///./node_modules/core-js/library/modules/_is-array.js","webpack:///./node_modules/core-js/library/modules/_object-gopn-ext.js","webpack:///./node_modules/core-js/library/modules/_object-gopd.js","webpack:///./node_modules/core-js/library/modules/es7.symbol.async-iterator.js","webpack:///./node_modules/core-js/library/modules/es7.symbol.observable.js","webpack:///./node_modules/babel-runtime/helpers/defineProperty.js","webpack:///./node_modules/babel-runtime/core-js/is-iterable.js","webpack:///./node_modules/core-js/library/fn/is-iterable.js","webpack:///./node_modules/core-js/library/modules/core.is-iterable.js","webpack:///./node_modules/babel-runtime/core-js/get-iterator.js","webpack:///./node_modules/core-js/library/fn/get-iterator.js","webpack:///./node_modules/core-js/library/modules/core.get-iterator.js","webpack:///./src/config ^\\.\\/config\\..*\\.json$","webpack:///./src/config/config.dev.json","webpack:///./src/config/config.prod.json","webpack:///./src/config/config.test.json","webpack:///./src/store/getters.js","webpack:///./src/store/mutations.js","webpack:///./src/store/actions.js","webpack:///./src/lib/lex/recorder.js","webpack:///./node_modules/babel-runtime/helpers/toConsumableArray.js","webpack:///./node_modules/babel-runtime/core-js/array/from.js","webpack:///./node_modules/core-js/library/fn/array/from.js","webpack:///./node_modules/core-js/library/modules/es6.array.from.js","webpack:///./node_modules/core-js/library/modules/_create-property.js","webpack:///./src/lib/lex/wav-worker.js","webpack:///./node_modules/worker-loader/createInlineWorker.js","webpack:///./src/store/recorder-handlers.js","webpack:///./src/assets/silent.ogg","webpack:///./src/assets/silent.mp3","webpack:///./src/lib/lex/client.js"],"names":["envShortName","find","startsWith","env","console","error","configEnvFile","require","configDefault","region","cognito","poolId","lex","botName","botAlias","initialText","initialSpeechInstruction","sessionAttributes","reInitSessionAttributesOnRestart","enablePlaybackInterrupt","playbackInterruptVolumeThreshold","playbackInterruptLevelThreshold","playbackInterruptNoiseThreshold","playbackInterruptMinDuration","polly","voiceId","ui","pageTitle","parentOrigin","textInputPlaceholder","toolbarColor","toolbarTitle","toolbarLogo","favIcon","pushInitialTextOnRestart","convertUrlToLinksInBotMessages","stripTagsFromBotMessages","recorder","enable","recordingTimeMax","recordingTimeMin","quietThreshold","quietTimeMin","volumeThreshold","useAutoMuteDetect","converser","silentConsecutiveRecordingMax","urlQueryParams","getUrlQueryParams","url","split","slice","reduce","params","queryString","map","queryObj","param","key","value","paramObj","decodeURIComponent","e","getConfigFromQuery","query","lexWebUiConfig","JSON","parse","mergeConfig","baseConfig","srcConfig","deep","mergeValue","base","src","shouldMergeDeep","merged","configItem","configFromFiles","queryParams","window","location","href","configFromQuery","configFromMerge","config","Component","name","template","components","LexWeb","loadingComponent","errorComponent","AsyncComponent","component","resolve","loading","delay","timeout","Plugin","install","VueConstructor","componentName","awsConfig","lexRuntimeClient","pollyClient","warn","prototype","Store","Loader","mergedConfig","Vue","Error","VuexConstructor","Vuex","AWSConfigConstructor","AWS","Config","CognitoConstructor","CognitoIdentityCredentials","PollyConstructor","Polly","LexRuntimeConstructor","LexRuntime","credentials","IdentityPoolId","store","use","strict","state","getters","mutations","actions","version","acceptFormat","dialogState","isInterrupting","isProcessing","inputTranscript","intentName","message","responseCard","slotToElicit","slots","messages","outputFormat","botAudio","canInterrupt","interruptIntervalId","autoPlay","isSpeaking","recState","isConversationGoing","isMicMuted","isMicQuiet","isRecorderSupported","isRecorderEnabled","isRecording","silentRecordingCount","isRunningEmbedded","isUiMinimized","awsCreds","provider","canInterruptBotPlayback","isBotSpeaking","isLexInterrupting","isLexProcessing","setIsMicMuted","bool","setIsMicQuiet","setIsConversationGoing","startRecording","info","start","stopRecording","stop","increaseSilentRecordingCount","resetSilentRecordingCount","setIsRecorderEnabled","setIsRecorderSupported","setIsBotSpeaking","setAudioAutoPlay","audio","status","autoplay","setCanInterruptBotPlayback","setIsBotPlaybackInterrupting","setBotPlaybackInterruptIntervalId","id","updateLexState","lexState","setLexSessionAttributes","setIsLexProcessing","setIsLexInterrupting","setAudioContentType","type","setPollyVoiceId","origin","configFiltered","setIsRunningEmbedded","toggleIsUiMinimized","pushMessage","push","length","setAwsCredsProvider","awsCredentials","lexClient","initCredentials","context","dispatch","reject","getConfigFromParent","event","then","configResponse","data","initConfig","configObj","commit","initMessageList","text","initLexClient","initPollyClient","client","creds","initRecorder","init","initOptions","initRecorderHandlers","catch","indexOf","initBotAudio","audioElement","silentSound","canPlayType","mimeType","preload","reInitBot","getAudioUrl","blob","URL","createObjectURL","play","onended","onerror","err","playAudio","onloadedmetadata","playAudioHandler","clearPlayback","intervalId","clearInterval","onpause","playAudioInterruptHandler","intervalTimeInMs","duration","setInterval","end","played","volume","max","slow","setTimeout","pause","startConversation","stopConversation","getRecorderVolume","pollyGetBlob","synthReq","synthesizeSpeech","Text","VoiceId","OutputFormat","promise","Blob","AudioStream","ContentType","pollySynthesizeSpeech","audioUrl","interruptSpeechConversation","count","countMax","postTextMessage","response","lexPostText","postText","lexPostContent","audioBlob","offset","size","timeStart","performance","now","postContent","lexResponse","timeEnd","toFixed","processLexContentResponse","lexData","audioStream","contentType","lexStateDefault","appContext","pushErrorMessage","getCredentialsFromParent","credsExpirationDate","Date","expireTime","credsResponse","Credentials","AccessKeyId","SecretKey","SessionToken","IdentityId","accessKeyId","secretAccessKey","sessionToken","identityId","getPromise","getCredentials","sendMessageToParentWindow","messageChannel","MessageChannel","port1","onmessage","evt","close","port2","parent","postMessage","options","_eventTarget","document","createDocumentFragment","_encoderWorker","addEventListener","_exportWav","preset","_getPresetOptions","recordingTimeMinAutoIncrease","autoStopRecording","useBandPass","bandPassFrequency","bandPassQ","bufferLength","numChannels","requestEchoCancellation","muteThreshold","encoderUseTrim","encoderQuietTrimThreshold","encoderQuietTrimSlackBack","_presets","presets","low_latency","speech_recognition","_state","_instant","_slow","_clip","_maxVolume","Infinity","_isMicQuiet","_isMicMuted","_isSilentRecording","_silentRecordingConsecutiveCount","_initAudioContext","_initMicVolumeProcessor","_initStream","_stream","_recordingStartTime","_audioContext","currentTime","dispatchEvent","Event","command","sampleRate","useTrim","quietTrimThreshold","quietTrimSlackBack","_quietStartTime","CustomEvent","detail","inputBuffer","buffer","i","numberOfChannels","getChannelData","_tracks","muted","AudioContext","webkitAudioContext","hidden","suspend","resume","processor","createScriptProcessor","onaudioprocess","_recordBuffers","input","sum","clipCount","Math","abs","sqrt","_setIsMicMuted","_setIsMicQuiet","_analyser","getFloatFrequencyData","_analyserData","_micVolumeProcessor","constraints","optional","echoCancellation","navigator","mediaDevices","getUserMedia","stream","getAudioTracks","label","onmute","onunmute","source","createMediaStreamSource","gainNode","createGain","analyser","createAnalyser","biquadFilter","createBiquadFilter","frequency","gain","Q","connect","smoothingTimeConstant","fftSize","minDecibels","maxDecibels","Float32Array","frequencyBinCount","destination","instant","clip","cb","module","exports","__webpack_public_path__","onstart","time","onstop","onsilentrecording","onunsilentrecording","onstreamready","onquiet","onunquiet","ondataavailable","lexAudioBlob","all","audioUrls","humanAudioUrl","lexAudioUrl","userId","floor","random","toString","substring","inputText","postTextReq","mediaType","postContentReq","accept","inputStream"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;AC7DA,6BAA6B;AAC7B,qCAAqC,gC;;;;;;ACDrC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uB;;;;;;ACVA;AACA;AACA;AACA,uCAAuC,gC;;;;;;ACHvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,UAAU;AACb;AACA;AACA;AACA,E;;;;;;ACfA;AACA;AACA;AACA;AACA,E;;;;;;ACJA;AACA;AACA,iCAAiC,QAAQ,gBAAgB,UAAU,GAAG;AACtE,CAAC,E;;;;;;ACHD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC1FA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA,qFAAqF;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,eAAe;AACf,eAAe;AACf,eAAe;AACf,gBAAgB;AAChB,yB;;;;;;AC5DA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,E;;;;;;ACPA,uBAAuB;AACvB;AACA;AACA,E;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACLA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,E;;;;;;ACNA;AACA;AACA;;AAEA;AACA;AACA,E;;;;;;ACNA,kBAAkB,wD;;;;;;ACAlB,oB;;;;;;;ACAA;;AAEA;;AAEA;;AAEA;;AAEA,sCAAsC,uCAAuC,gBAAgB;;AAE7F;AACA,iBAAiB,sBAAsB;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,E;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACnBA;AACA;AACA,E;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACPA,iBAAiB;;AAEjB;AACA;AACA,E;;;;;;;ACJA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B,cAAc;AACd;AACA,CAAC;AACD;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,UAAU;AACV,CAAC,E;;;;;;AChBD;AACA;AACA;AACA;AACA,E;;;;;;ACJA,cAAc,sB;;;;;;ACAd;AACA;AACA;AACA;AACA,E;;;;;;ACJA,sB;;;;;;ACAA;AACA;AACA;;AAEA;AACA,kEAAkE,+BAA+B;AACjG,E;;;;;;ACNA;AACA;AACA;AACA;AACA;;AAEA,wGAAwG,OAAO;AAC/G;AACA;AACA;AACA;AACA;AACA,C;;;;;;ACZA;AACA;AACA;AACA,E;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACXA;AACA;AACA;AACA;AACA,E;;;;;;ACJA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,E;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACLA;AACA;AACA;AACA;AACA,E;;;;;;ACJA;AACA;AACA,mDAAmD;AACnD;AACA,uCAAuC;AACvC,E;;;;;;ACLA;AACA;AACA;AACA,a;;;;;;ACHA,yC;;;;;;;ACAA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,E;;;;;;ACRA,kBAAkB,wD;;;;;;ACAlB;AACA;AACA;AACA;AACA,yBAAyB,kBAAkB,EAAE;;AAE7C;AACA;AACA;AACA;AACA,GAAG,UAAU;AACb;;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A;AACA;AACA;AACA;AACA;AACA;;AAEA,4BAA4B,aAAa;;AAEzC;AACA;AACA;AACA;AACA;AACA,wCAAwC,oCAAoC;AAC5E,4CAA4C,oCAAoC;AAChF,KAAK,2BAA2B,oCAAoC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA,iCAAiC,2BAA2B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,E;;;;;;ACrEA,wC;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;ACxCA,6E;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,E;;;;;;ACXA;AACA;AACA;AACA;;AAEA;AACA;AACA,E;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;AC1EA;AACA;;AAEA;AACA;AACA,+BAA+B,qBA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E;AACA,E;;;;;;ACZA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACZA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,E;;;;;;;ACZA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,cAAc;AACd,iBAAiB;AACjB;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,4B;;;;;;ACjCA,4BAA4B,e;;;;;;ACA5B;AACA,UAAU;AACV,E;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA,+CAA+C,sDAAiD,oBAAoB;AACpH;AACA;AACA,GAAG,UAAU;AACb,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,mBAAmB,gCAAgC;AACnD,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,qCAAqC;AACpD;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH,kBAAkB,uBAAuB,KAAK;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,iBAAiB;AACjB,wBAAwB;AACxB,gBAAgB;AAChB,oBAAoB;AACpB,wBAAwB;AACxB,gBAAgB;AAChB,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0DAA0D,kBAAkB;AAC5E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,CAAC,E;;;;;;AC1SD;AACA;AACA;AACA,GAAG;AACH,E;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,iBAAiB,EAAE;AACxD;AACA;AACA;AACA;AACA;AACA,gEAAgE,gBAAgB;AAChF;AACA;AACA,GAAG,2CAA2C,gCAAgC;AAC9E;AACA;AACA;AACA;AACA;AACA,wB;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,E;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,uCAAuC,oBAAoB,EAAE;AAC7D;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,E;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,E;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC,GAAG;AACH,E;;;;;;ACbA,gD;;;;;;ACAA,gD;;;;;;ACAA,gD;;;;;;ACAA,gD;;;;;;ACAA,gD;;;;;;;;ACAA;AAAA;AACA,wBAAsT;AACtT;AACA;AACA;AACA;AACA;AACiP;AACjP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA,yC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACiCA;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;;AAEA;QAEA;;AAEA;AACA;AACA;AAEA;AALA;;kEAOA;0CACA;AACA;wCACA;0CACA;AACA;0DACA;yCACA;AACA;0CACA;yCACA;AACA;0CACA;yCACA;AACA;wCACA;yCACA;AACA;4CACA;+BACA;AAEA;AAtBA;sCAuBA;0EACA;mBACA;iDACA;gDACA;WACA;AACA;mBACA,yDAEA;gEACA;mBACA,oDAEA;oBACA,gDACA,eACA;gBACA,KACA,sHAEA;AAEA;;8DACA;iDACA;gDACA;AACA;AACA;;AACA;;sDACA;mCACA;;AACA;AACA;0FACA,6CACA,gFAEA;;;AACA,uFACA,uBACA,6CAEA,oCACA,2DAGA;;AACA,uFACA,uBACA,6EACA,oCACA,iCAIA;;AACA,gCACA,0CACA,sCAEA,mFAEA;;AACA,0BACA,mEAGA;8BACA;oBACA,oDAEA;AACA;AACA;;;kDAEA;kCACA;AACA;;AACA;iDACA;AACA;mEACA;6DACA;AACA;AACA;sBACA;iEACA;AACA;AACA;uBACA;aACA;uBACA;;mBAEA;2BAEA;AAHA;AAIA;AACA;aACA;sEACA;AACA;aACA;+BACA,wCACA;yBACA,+CAEA;AACA;AACA;aACA;iCACA;;qBAEA;6BACA;qBAEA;AAJA;AAKA;AAEA;;+BACA,mDAEA,4BACA;yBACA,+CAEA;AACA;AACA;AACA;4DACA;AAEA;;AAEA;AA3DA;AAxGA,G;;;;;;AC1CA;AACA,oD;;;;;;ACDA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC,E;;;;;;ACRD;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,mDAAmD,OAAO,EAAE;AAC5D,E;;;;;;;;ACTA;AAAA;AACA;AACA;AACA;AACiP;AACjP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACcA;;;;;;;;;;;;AACA;QAEA;yDACA;;gDAEA;;gDAGA;AAFA;AAIA;AANA;;8CAQA;iBACA;AAEA;AAJA;AAVA,G;;;;;;;ACnCA,0BAA0B,aAAa,0BAA0B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,iBAAiB;AACjB,kE;;;;;;;;AClCA;AAAA;AACA,yBAAqT;AACrT;AACA;AACA;AACA;AACA;AACgP;AAChP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA,yC;;;;;;;;;;;;;;;;;;;;ACuBA;;;;;;;;;;;;AACA;;AAEA;QAEA;;AAGA;AAFA;;kCAIA;+BACA;AAEA;AAJA;;AAMA;;AACA;;iCACA;wCACA;AACA;AAEA;AAPA;AAVA,G;;;;;;;;AC3BA;AAAA;AACA,yBAAqT;AACrT;AACA;AACA;AACA;AACA;AACgP;AAChP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA,yC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC8CA;;;;;;;;;;;;AACA;AACA;;AAEA;QAEA;UACA;;AAEA;AAEA;AAHA;;8CAKA;4CACA;eACA;AACA;2BACA;aACA;yCACA;aACA;aACA;wCACA;AACA;iBAEA;;AACA;oEACA;AACA,0BACA,uDACA,6CACA,gDACA,iFACA,wEAEA;AAEA;AAzBA;;oCA2BA;AACA;AAIA;;;;6CACA;qBACA;kBACA;AACA;AAEA;AAZA;AAjCA,G;;;;;;;;ACnDA;AAAA;AACA,yBAAqT;AACrT;AACA;AACA;AACA;AACA;AACgP;AAChP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA,yC;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACgCA;;;;;;;;;;;;AACA;QAEA;UACA;;gEAEA;yCACA;AACA;gDACA;yCACA;AACA;sDACA;iDACA;AACA;kDACA;AACA;AACA;+DACA;sDACA;aACA;AAEA;AAjBA;;+CAmBA;aACA,oBACA,uBACA,wBACA,uBACA,sBACA;AACA;;AACA;;;AAEA;AACA;AACA;AACA;AACA;cACA;mBACA,OACA,qDACA,8CAEA;wCACA;oEACA;iBACA,+EACA;AAGA;OAlBA;AAmBA;qDAEA;;AACA;AACA;AACA;AACA;AACA;iCACA,0DACA;gCACA;iCACA;gDACA,6CACA;8DACA;AACA;kCACA;aACA;;OAhBA,EAiBA;AACA;;AACA;qEACA;+DACA;sBACA;iDACA;AAEA;AAvDA;AArBA,G;;;;;;;AClCA,0BAA0B,aAAa,0BAA0B;AACjE;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,iBAAiB;AACjB,kE;;;;;;;;ACdA;AAAA;AACA,yBAAqT;AACrT;AACA;AACA;AACA;AACA;AACgP;AAChP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA,yC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACuDA;;;;;;;;;;;;AACA;QAEA;UACA;wBACA;;4BAGA;AAFA;AAGA;;YAEA;;iDAEA;kCACA;;cAEA;cAGA;AAJA;;8CAKA;AAEA;AAVA;AAVA,G;;;;;;;ACzDA,0BAA0B,aAAa,0BAA0B;AACjE;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,iBAAiB;AACjB,kE;;;;;;;AC5CA,0BAA0B,aAAa,0BAA0B;AACjE;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,iBAAiB;AACjB,kE;;;;;;;AC3CA,0BAA0B,aAAa,0BAA0B;AACjE;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,iBAAiB;AACjB,kE;;;;;;;;ACfA;AAAA;AACA,yBAAqT;AACrT;AACA;AACA;AACA;AACA;AACgP;AAChP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA,yC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACsCA;;;;;;;;;;;;;AAEA;QAEA;wBACA;;cAEA;wBAEA;AAHA;AAIA;;;oEAEA;kBACA;AACA;0CACA;AACA,kBACA,mCACA,qBAEA;AACA;sCACA;+BACA;eACA;AACA;wCACA;eACA;AACA;2BACA;eACA;AACA;4BACA;eACA;AACA;8BACA;eACA;AACA;0CACA;eACA;AACA;oCACA;eACA;AACA;aACA;AACA;gEACA;wCACA;AACA;4CACA;wCACA;AACA;wDACA;wCACA;AACA;sCACA;wCACA;AACA;wDACA;wCACA;AACA;wCACA;wCACA;AAEA;AArDA;;;AAuDA;;yBACA;gBACA;sDACA;8BACA,4CACA;gDACA;uCACA;AACA;SACA;AACA;sCACA;iCACA;2BACA;AACA;AAEA;AAjBA;AA9DA,G;;;;;;;ACzCA,0BAA0B,aAAa,0BAA0B;AACjE;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,iBAAiB;AACjB,kE;;;;;;;;AC9BA;AAAA;AACA,yBAAqT;AACrT;AACA;AACA;AACA;AACA;AACgP;AAChP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA,yC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACqCA;;;;;;;;;;;;AACA;;AAEA;QAEA;wBACA;;iBAGA;AAFA;AAGA;;;4CAEA;2BACA;eACA;AACA;8BACA;eACA;AACA;aACA;AACA;sCACA;2BACA;eACA;AACA;8BACA;eACA;AACA;aACA;AACA;wDACA;kBACA;AACA;4CACA;wCACA;AACA;wDACA;wCACA;AACA;sCACA;wCACA;AACA;wDACA;wCACA;AAEA;AAlCA;8DAmCA;;;AAEA;;AACA;kCACA;qFACA;AACA;;cAEA;mBAGA;AAJA;;qDAKA,0BACA;0BACA;AACA;AACA;sCACA;qCACA;oBACA;qCACA;oCACA;AAEA;;mFACA;AACA;;AACA;;2BACA;qFACA;AACA;kBACA;sBACA;;sCACA;gCACA;0DACA;+BACA,gFAEA;AACA;AACA;;AACA;;6CACA;AACA,uDAGA;;;aACA,sCACA,8BAEA,kGACA;AACA;;AAQA;;;;;;;;wCACA;+CACA;qFACA;AACA;kCACA;AAEA;AAjEA;AA3CA,G;;;;;;;ACzCA,0BAA0B,aAAa,0BAA0B;AACjE;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,2EAA2E,aAAa;AACxF;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,oBAAoB,iBAAiB;AACrC;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,iBAAiB;AACjB,kE;;;;;;;ACrDA,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AAERC,yBAAqB,IAFb;AAGRC,cAAU,KAHF;AAIRb,oBAAgB,KAJR;AAKRc,gBAAY;AALJ,GA7BG;AAoCbC,YAAU;AACRC,yBAAqB,KADb;AAERhB,oBAAgB,KAFR;AAGRiB,gBAAY,KAHJ;AAIRC,gBAAY,IAJJ;AAKRC,yBAAqB,KALb;AAMRC,uBAAoB,uDAAAvE,CAAOhD,QAAR,GAAoB,CAAC,CAAC,uDAAAgD,CAAOhD,QAAP,CAAgBC,MAAtC,GAA+C,IAN1D;AAORuH,iBAAa,KAPL;AAQRC,0BAAsB;AARd,GApCG;;AA+CbC,qBAAmB,KA/CN,EA+Ca;AAC1BC,iBAAe,KAhDF,EAgDS;AACtB3E,UAAA,uDAjDa;;AAmDb4E,YAAU;AACRC,cAAU,SADF,CACa;AADb;AAnDG,CAAf,E;;;;;;AClBA,kBAAkB,yD;;;;;;ACAlB;AACA;AACA,uD;;;;;;ACFA,kBAAkB,yD;;;;;;ACAlB;AACA;AACA;AACA;AACA,+C;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB;AACtB,oBAAoB,uBAAuB,SAAS,IAAI;AACxD,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA,KAAK;AACL;AACA,sBAAsB,iCAAiC;AACvD,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,8BAA8B;AAC5F;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,0DAA0D,gBAAgB;;AAE1E;AACA;AACA;AACA,oBAAoB,oBAAoB;;AAExC,0CAA0C,oBAAoB;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,wBAAwB,eAAe,EAAE;AACzC,wBAAwB,gBAAgB;AACxC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,KAAK,QAAQ,iCAAiC;AAClG,CAAC;AACD;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0C;;;;;;AC1OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD,CAAC;AACD;AACA,qBAAqB;AACrB;AACA,SAAS;AACT,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACTA;AACA;AACA;AACA;AACA;AAC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C,UAAMic,cAAc,KAAK1W,gBAAL,CAAsBqL,QAAtB,CAA+B;AACjD/Q,kBAAU,KAAKA,QADkC;AAEjDD,iBAAS,KAAKA,OAFmC;AAGjD+b,gBAAQ,KAAKA,MAHoC;AAIjDK,4BAJiD;AAKjDhc;AALiD,OAA/B,CAApB;AAOA,aAAO,KAAK2G,WAAL,CAAiBkM,UAAjB,GACJzG,IADI,CACC;AAAA,eAAM6P,YAAYjM,OAAZ,EAAN;AAAA,OADD,CAAP;AAED;;;gCAGClC,I,EAIA;AAAA,UAHA9N,iBAGA,uEAHoB,EAGpB;AAAA,UAFAqH,YAEA,uEAFe,WAEf;AAAA,UADA0J,MACA,uEADS,CACT;;AACA,UAAMmL,YAAYpO,KAAK5C,IAAvB;AACA,UAAIyG,cAAcuK,SAAlB;;AAEA,UAAIA,UAAUjd,UAAV,CAAqB,WAArB,CAAJ,EAAuC;AACrC0S,sBAAc,iDAAd;AACD,OAFD,MAEO,IAAIuK,UAAUjd,UAAV,CAAqB,WAArB,CAAJ,EAAuC;AAC5C0S,sBACA,qGACgDZ,MADhD,CADA;AAGD,OAJM,MAIA;AACL5R,gBAAQsG,IAAR,CAAa,kCAAb;AACD;;AAED,UAAM0W,iBAAiB,KAAK5W,gBAAL,CAAsB6L,WAAtB,CAAkC;AACvDgL,gBAAQ/U,YAD+C;AAEvDxH,kBAAU,KAAKA,QAFwC;AAGvDD,iBAAS,KAAKA,OAHyC;AAIvD+b,gBAAQ,KAAKA,MAJ0C;AAKvDhK,gCALuD;AAMvD0K,qBAAavO,IAN0C;AAOvD9N;AAPuD,OAAlC,CAAvB;;AAUA,aAAO,KAAK2G,WAAL,CAAiBkM,UAAjB,GACJzG,IADI,CACC;AAAA,eAAM+P,eAAenM,OAAf,EAAN;AAAA,OADD,CAAP;AAED","file":"bundle/lex-web-ui.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"vue\"), require(\"vuex\"), require(\"aws-sdk/global\"), require(\"aws-sdk/clients/lexruntime\"), require(\"aws-sdk/clients/polly\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"vue\", \"vuex\", \"aws-sdk/global\", \"aws-sdk/clients/lexruntime\", \"aws-sdk/clients/polly\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"LexWebUi\"] = factory(require(\"vue\"), require(\"vuex\"), require(\"aws-sdk/global\"), require(\"aws-sdk/clients/lexruntime\"), require(\"aws-sdk/clients/polly\"));\n\telse\n\t\troot[\"LexWebUi\"] = factory(root[\"vue\"], root[\"vuex\"], root[\"aws-sdk/global\"], root[\"aws-sdk/clients/lexruntime\"], root[\"aws-sdk/clients/polly\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_86__, __WEBPACK_EXTERNAL_MODULE_87__, __WEBPACK_EXTERNAL_MODULE_88__, __WEBPACK_EXTERNAL_MODULE_89__, __WEBPACK_EXTERNAL_MODULE_90__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 62);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6c2119f64c4473556aae","var core = module.exports = {version: '2.4.0'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_core.js\n// module id = 0\n// module chunks = 0","var store = require('./_shared')('wks')\n , uid = require('./_uid')\n , Symbol = require('./_global').Symbol\n , USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function(name){\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_wks.js\n// module id = 1\n// module chunks = 0","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_global.js\n// module id = 2\n// module chunks = 0","var anObject = require('./_an-object')\n , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n , toPrimitive = require('./_to-primitive')\n , dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if(IE8_DOM_DEFINE)try {\n return dP(O, P, Attributes);\n } catch(e){ /* empty */ }\n if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');\n if('value' in Attributes)O[P] = Attributes.value;\n return O;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-dp.js\n// module id = 3\n// module chunks = 0","var isObject = require('./_is-object');\nmodule.exports = function(it){\n if(!isObject(it))throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_an-object.js\n// module id = 4\n// module chunks = 0","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function(){\n return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_descriptors.js\n// module id = 5\n// module chunks = 0","/* globals __VUE_SSR_CONTEXT__ */\n\n// this module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle\n\nmodule.exports = function normalizeComponent (\n rawScriptExports,\n compiledTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */\n) {\n var esModule\n var scriptExports = rawScriptExports = rawScriptExports || {}\n\n // ES6 modules interop\n var type = typeof rawScriptExports.default\n if (type === 'object' || type === 'function') {\n esModule = rawScriptExports\n scriptExports = rawScriptExports.default\n }\n\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (compiledTemplate) {\n options.render = compiledTemplate.render\n options.staticRenderFns = compiledTemplate.staticRenderFns\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = injectStyles\n }\n\n if (hook) {\n var functional = options.functional\n var existing = functional\n ? options.render\n : options.beforeCreate\n if (!functional) {\n // inject component registration as beforeCreate hook\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n } else {\n // register for functioal component in vue file\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return existing(h, context)\n }\n }\n }\n\n return {\n esModule: esModule,\n exports: scriptExports,\n options: options\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/component-normalizer.js\n// module id = 6\n// module chunks = 0","var global = require('./_global')\n , core = require('./_core')\n , ctx = require('./_ctx')\n , hide = require('./_hide')\n , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n var IS_FORCED = type & $export.F\n , IS_GLOBAL = type & $export.G\n , IS_STATIC = type & $export.S\n , IS_PROTO = type & $export.P\n , IS_BIND = type & $export.B\n , IS_WRAP = type & $export.W\n , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n , expProto = exports[PROTOTYPE]\n , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n , key, own, out;\n if(IS_GLOBAL)source = name;\n for(key in source){\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if(own && key in exports)continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function(C){\n var F = function(a, b, c){\n if(this instanceof C){\n switch(arguments.length){\n case 0: return new C;\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if(IS_PROTO){\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library` \nmodule.exports = $export;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_export.js\n// module id = 7\n// module chunks = 0","var dP = require('./_object-dp')\n , createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function(object, key, value){\n return dP.f(object, key, createDesc(1, value));\n} : function(object, key, value){\n object[key] = value;\n return object;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_hide.js\n// module id = 8\n// module chunks = 0","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function(it, key){\n return hasOwnProperty.call(it, key);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_has.js\n// module id = 9\n// module chunks = 0","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject')\n , defined = require('./_defined');\nmodule.exports = function(it){\n return IObject(defined(it));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-iobject.js\n// module id = 10\n// module chunks = 0","module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_fails.js\n// module id = 11\n// module chunks = 0","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal')\n , enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O){\n return $keys(O, enumBugKeys);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-keys.js\n// module id = 12\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/promise\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/promise.js\n// module id = 13\n// module chunks = 0","module.exports = {};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iterators.js\n// module id = 14\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nvar _assign = require(\"../core-js/object/assign\");\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _assign2.default || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/extends.js\n// module id = 15\n// module chunks = 0","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_ctx.js\n// module id = 16\n// module chunks = 0","module.exports = function(it){\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_is-object.js\n// module id = 17\n// module chunks = 0","module.exports = function(bitmap, value){\n return {\n enumerable : !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable : !(bitmap & 4),\n value : value\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_property-desc.js\n// module id = 18\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = function(it){\n return toString.call(it).slice(8, -1);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_cof.js\n// module id = 19\n// module chunks = 0","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function(iterated){\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , index = this._i\n , point;\n if(index >= O.length)return {value: undefined, done: true};\n point = $at(O, index);\n this._i += point.length;\n return {value: point, done: false};\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.string.iterator.js\n// module id = 20\n// module chunks = 0","var id = 0\n , px = Math.random();\nmodule.exports = function(key){\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_uid.js\n// module id = 21\n// module chunks = 0","exports.f = {}.propertyIsEnumerable;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-pie.js\n// module id = 22\n// module chunks = 0","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function(it){\n return Object(defined(it));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-object.js\n// module id = 23\n// module chunks = 0","module.exports = true;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_library.js\n// module id = 24\n// module chunks = 0","var def = require('./_object-dp').f\n , has = require('./_has')\n , TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function(it, tag, stat){\n if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_set-to-string-tag.js\n// module id = 25\n// module chunks = 0","require('./es6.array.iterator');\nvar global = require('./_global')\n , hide = require('./_hide')\n , Iterators = require('./_iterators')\n , TO_STRING_TAG = require('./_wks')('toStringTag');\n\nfor(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){\n var NAME = collections[i]\n , Collection = global[NAME]\n , proto = Collection && Collection.prototype;\n if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/web.dom.iterable.js\n// module id = 26\n// module chunks = 0","module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_a-function.js\n// module id = 27\n// module chunks = 0","var isObject = require('./_is-object')\n , document = require('./_global').document\n // in old IE typeof document.createElement is 'object'\n , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n return is ? document.createElement(it) : {};\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_dom-create.js\n// module id = 28\n// module chunks = 0","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function(it, S){\n if(!isObject(it))return it;\n var fn, val;\n if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;\n if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-primitive.js\n// module id = 29\n// module chunks = 0","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function(it){\n if(it == undefined)throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_defined.js\n// module id = 30\n// module chunks = 0","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer')\n , min = Math.min;\nmodule.exports = function(it){\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-length.js\n// module id = 31\n// module chunks = 0","// 7.1.4 ToInteger\nvar ceil = Math.ceil\n , floor = Math.floor;\nmodule.exports = function(it){\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-integer.js\n// module id = 32\n// module chunks = 0","var shared = require('./_shared')('keys')\n , uid = require('./_uid');\nmodule.exports = function(key){\n return shared[key] || (shared[key] = uid(key));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_shared-key.js\n// module id = 33\n// module chunks = 0","var global = require('./_global')\n , SHARED = '__core-js_shared__'\n , store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function(key){\n return store[key] || (store[key] = {});\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_shared.js\n// module id = 34\n// module chunks = 0","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_enum-bug-keys.js\n// module id = 35\n// module chunks = 0","exports.f = Object.getOwnPropertySymbols;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-gops.js\n// module id = 36\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/classCallCheck.js\n// module id = 37\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/object/define-property.js\n// module id = 38\n// module chunks = 0","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof')\n , TAG = require('./_wks')('toStringTag')\n // ES3 wrong here\n , ARG = cof(function(){ return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function(it, key){\n try {\n return it[key];\n } catch(e){ /* empty */ }\n};\n\nmodule.exports = function(it){\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_classof.js\n// module id = 39\n// module chunks = 0","var classof = require('./_classof')\n , ITERATOR = require('./_wks')('iterator')\n , Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function(it){\n if(it != undefined)return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/core.get-iterator-method.js\n// module id = 40\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nvar _iterator = require(\"../core-js/symbol/iterator\");\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = require(\"../core-js/symbol\");\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === \"function\" && typeof _iterator2.default === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/typeof.js\n// module id = 41\n// module chunks = 0","exports.f = require('./_wks');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_wks-ext.js\n// module id = 42\n// module chunks = 0","var global = require('./_global')\n , core = require('./_core')\n , LIBRARY = require('./_library')\n , wksExt = require('./_wks-ext')\n , defineProperty = require('./_object-dp').f;\nmodule.exports = function(name){\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_wks-define.js\n// module id = 43\n// module chunks = 0","/*\n Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Licensed under the Amazon Software License (the \"License\"). You may not use this file\n except in compliance with the License. A copy of the License is located at\n\n http://aws.amazon.com/asl/\n\n or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\n BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\n License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * Application configuration management.\n * This file contains default config values and merges the environment\n * and URL configs.\n *\n * The environment dependent values are loaded from files\n * with the config..json naming syntax (where is a NODE_ENV value\n * such as 'prod' or 'dev') located in the same directory as this file.\n *\n * The URL configuration is parsed from the `config` URL parameter as\n * a JSON object\n *\n * NOTE: To avoid having to manually merge future changes to this file, you\n * probably want to modify default values in the config..js files instead\n * of this one.\n */\n\n/* eslint no-console: [\"error\", { allow: [\"warn\", \"error\"] }] */\n\n// TODO turn this into a class\n\n// get env shortname to require file\nconst envShortName = [\n 'dev',\n 'prod',\n 'test',\n].find(env => process.env.NODE_ENV.startsWith(env));\n\nif (!envShortName) {\n console.error('unknown environment in config: ', process.env.NODE_ENV);\n}\n\n// eslint-disable-next-line import/no-dynamic-require\nconst configEnvFile = require(`./config.${envShortName}.json`);\n\n// default config used to provide a base structure for\n// environment and dynamic configs\nconst configDefault = {\n // AWS region\n region: 'us-east-1',\n\n cognito: {\n // Cognito pool id used to obtain credentials\n // e.g. poolId: 'us-east-1:deadbeef-cac0-babe-abcd-abcdef01234',\n poolId: '',\n },\n\n lex: {\n // Lex bot name\n botName: 'WebUiOrderFlowers',\n\n // Lex bot alias/version\n botAlias: '$LATEST',\n\n // instruction message shown in the UI\n initialText: 'You can ask me for help ordering flowers. ' +\n 'Just type \"order flowers\" or click on the mic and say it.',\n\n // instructions spoken when mic is clicked\n initialSpeechInstruction: 'Say \"Order Flowers\" to get started',\n\n // Lex initial sessionAttributes\n sessionAttributes: {},\n\n // controls if the session attributes are reinitialized a\n // after the bot dialog is done (i.e. fail or fulfilled)\n reInitSessionAttributesOnRestart: true,\n\n // TODO move this config fields to converser\n // allow to interrupt playback of lex responses by talking over playback\n // XXX experimental\n enablePlaybackInterrupt: false,\n\n // microphone volume level (in dB) to cause an interrupt in the bot\n // playback. Lower (negative) values makes interrupt more likely\n // may need to adjusted down if using low_latency preset or band pass filter\n playbackInterruptVolumeThreshold: -60,\n\n // microphone slow sample level to cause an interrupt in the bot\n // playback. Lower values makes interrupt more likely\n // may need to adjusted down if using low_latency preset or band pass filter\n playbackInterruptLevelThreshold: 0.0075,\n\n // microphone volume level (in dB) to cause enable interrupt of bot\n // playback. This is used to prevent interrupts when there's noise\n // For interrupt to be enabled, the volume level should be lower than this\n // value. Lower (negative) values makes interrupt more likely\n // may need to adjusted down if using low_latency preset or band pass filter\n playbackInterruptNoiseThreshold: -75,\n\n // only allow to interrupt playback longer than this value (in seconds)\n playbackInterruptMinDuration: 2,\n },\n\n polly: {\n voiceId: 'Joanna',\n },\n\n ui: {\n // TODO may want to move pageTitle out to LexApp or Page component\n // title of HTML page added dynamically to index.html\n pageTitle: 'Order Flowers Bot',\n\n // when running as an embedded iframe, this will be used as the\n // be the parent origin used to send/receive messages\n // NOTE: this is also a security control\n // this parameter should not be dynamically overriden\n // avoid making it '*'\n // if left as an empty string, it will be set to window.location.window\n // to allow runing embedded in a single origin setup\n parentOrigin: null,\n\n // chat window text placeholder\n textInputPlaceholder: 'Type here',\n\n toolbarColor: 'red',\n\n // chat window title\n toolbarTitle: 'Order Flowers',\n\n // logo used in toolbar - also used as favicon not specificied\n toolbarLogo: '',\n\n // fav icon\n favIcon: '',\n\n // controls if the Lex initialText will be pushed into the message\n // list after the bot dialog is done (i.e. fail or fulfilled)\n pushInitialTextOnRestart: true,\n\n // controls if the Lex sessionAttributes should be re-initialized\n // to the config value (i.e. lex.sessionAttributes)\n // after the bot dialog is done (i.e. fail or fulfilled)\n reInitSessionAttributesOnRestart: false,\n\n // controls whether URLs in bot responses will be converted to links\n convertUrlToLinksInBotMessages: true,\n\n // controls whether tags (e.g. SSML or HTML) should be stripped out\n // of bot messages received from Lex\n stripTagsFromBotMessages: true,\n },\n\n /* Configuration to enable voice and to pass options to the recorder\n * see ../lib/recorder.js for details about all the available options.\n * You can override any of the defaults in recorder.js by adding them\n * to the corresponding JSON config file (config..json)\n * or alternatively here\n */\n recorder: {\n // if set to true, voice interaction would be enabled on supported browsers\n // set to false if you don't want voice enabled\n enable: true,\n\n // maximum recording time in seconds\n recordingTimeMax: 10,\n\n // Minimum recording time in seconds.\n // Used before evaluating if the line is quiet to allow initial pauses\n // before speech\n recordingTimeMin: 2.5,\n\n // Sound sample threshold to determine if there's silence.\n // This is measured against a value of a sample over a period of time\n // If set too high, it may falsely detect quiet recordings\n // If set too low, it could take long pauses before detecting silence or\n // not detect it at all.\n // Reasonable values seem to be between 0.001 and 0.003\n quietThreshold: 0.002,\n\n // time before automatically stopping the recording when\n // there's silence. This is compared to a slow decaying\n // sample level so its's value is relative to sound over\n // a period of time. Reasonable times seem to be between 0.2 and 0.5\n quietTimeMin: 0.3,\n\n // volume threshold in db to determine if there's silence.\n // Volume levels lower than this would trigger a silent event\n // Works in conjuction with `quietThreshold`. Lower (negative) values\n // cause the silence detection to converge faster\n // Reasonable values seem to be between -75 and -55\n volumeThreshold: -65,\n\n // use automatic mute detection\n useAutoMuteDetect: false,\n },\n\n converser: {\n // used to control maximum number of consecutive silent recordings\n // before the conversation is ended\n silentConsecutiveRecordingMax: 3,\n },\n\n // URL query parameters are put in here at run time\n urlQueryParams: {},\n};\n\n/**\n * Obtains the URL query params and returns it as an object\n * This can be used before the router has been setup\n */\nfunction getUrlQueryParams(url) {\n try {\n return url\n .split('?', 2) // split query string up to a max of 2 elems\n .slice(1, 2) // grab what's after the '?' char\n // split params separated by '&'\n .reduce((params, queryString) => queryString.split('&'), [])\n // further split into key value pairs separated by '='\n .map(params => params.split('='))\n // turn into an object representing the URL query key/vals\n .reduce((queryObj, param) => {\n const [key, value = true] = param;\n const paramObj = {\n [key]: decodeURIComponent(value),\n };\n return { ...queryObj, ...paramObj };\n }, {});\n } catch (e) {\n console.error('error obtaining URL query parameters', e);\n return {};\n }\n}\n\n/**\n * Obtains and parses the config URL parameter\n */\nfunction getConfigFromQuery(query) {\n try {\n return (query.lexWebUiConfig) ? JSON.parse(query.lexWebUiConfig) : {};\n } catch (e) {\n console.error('error parsing config from URL query', e);\n return {};\n }\n}\n\n/**\n * Merge two configuration objects\n * The merge process takes the base config as the source for keys to be merged.\n * The values in srcConfig take precedence in the merge.\n *\n * If deep is set to false (default), a shallow merge is done down to the\n * second level of the object. Object values under the second level fully\n * overwrite the base. For example, srcConfig.lex.sessionAttributes overwrite\n * the base as an object.\n *\n * If deep is set to true, the merge is done recursively in both directions.\n */\nexport function mergeConfig(baseConfig, srcConfig, deep = false) {\n function mergeValue(base, src, key, shouldMergeDeep) {\n // nothing to merge as the base key is not found in the src\n if (!(key in src)) {\n return base[key];\n }\n\n // deep merge in both directions using recursion\n if (shouldMergeDeep && typeof base[key] === 'object') {\n return {\n ...mergeConfig(src[key], base[key], shouldMergeDeep),\n ...mergeConfig(base[key], src[key], shouldMergeDeep),\n };\n }\n\n // shallow merge key/values\n // overriding the base values with the ones from the source\n return (typeof base[key] === 'object') ?\n { ...base[key], ...src[key] } :\n src[key];\n }\n\n // use the baseConfig first level keys as the base for merging\n return Object.keys(baseConfig)\n .map((key) => {\n const value = mergeValue(baseConfig, srcConfig, key, deep);\n return { [key]: value };\n })\n // merge key values back into a single object\n .reduce((merged, configItem) => ({ ...merged, ...configItem }), {});\n}\n\n// merge build time parameters\nconst configFromFiles = mergeConfig(configDefault, configEnvFile);\n\n// TODO move query config to a store action\n// run time config from url query parameter\nconst queryParams = getUrlQueryParams(window.location.href);\nconst configFromQuery = getConfigFromQuery(queryParams);\n// security: delete origin from dynamic parameter\nif (configFromQuery.ui && configFromQuery.ui.parentOrigin) {\n delete configFromQuery.ui.parentOrigin;\n}\n\nconst configFromMerge = mergeConfig(configFromFiles, configFromQuery);\n\nexport const config = {\n ...configFromMerge,\n urlQueryParams: queryParams,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/config/index.js","module.exports = { \"default\": require(\"core-js/library/fn/object/assign\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/object/assign.js\n// module id = 45\n// module chunks = 0","module.exports = !require('./_descriptors') && !require('./_fails')(function(){\n return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_ie8-dom-define.js\n// module id = 46\n// module chunks = 0","var has = require('./_has')\n , toIObject = require('./_to-iobject')\n , arrayIndexOf = require('./_array-includes')(false)\n , IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function(object, names){\n var O = toIObject(object)\n , i = 0\n , result = []\n , key;\n for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while(names.length > i)if(has(O, key = names[i++])){\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-keys-internal.js\n// module id = 47\n// module chunks = 0","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iobject.js\n// module id = 48\n// module chunks = 0","'use strict';\nvar LIBRARY = require('./_library')\n , $export = require('./_export')\n , redefine = require('./_redefine')\n , hide = require('./_hide')\n , has = require('./_has')\n , Iterators = require('./_iterators')\n , $iterCreate = require('./_iter-create')\n , setToStringTag = require('./_set-to-string-tag')\n , getPrototypeOf = require('./_object-gpo')\n , ITERATOR = require('./_wks')('iterator')\n , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`\n , FF_ITERATOR = '@@iterator'\n , KEYS = 'keys'\n , VALUES = 'values';\n\nvar returnThis = function(){ return this; };\n\nmodule.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){\n $iterCreate(Constructor, NAME, next);\n var getMethod = function(kind){\n if(!BUGGY && kind in proto)return proto[kind];\n switch(kind){\n case KEYS: return function keys(){ return new Constructor(this, kind); };\n case VALUES: return function values(){ return new Constructor(this, kind); };\n } return function entries(){ return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator'\n , DEF_VALUES = DEFAULT == VALUES\n , VALUES_BUG = false\n , proto = Base.prototype\n , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]\n , $default = $native || getMethod(DEFAULT)\n , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined\n , $anyNative = NAME == 'Array' ? proto.entries || $native : $native\n , methods, key, IteratorPrototype;\n // Fix native\n if($anyNative){\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base));\n if(IteratorPrototype !== Object.prototype){\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if(DEF_VALUES && $native && $native.name !== VALUES){\n VALUES_BUG = true;\n $default = function values(){ return $native.call(this); };\n }\n // Define iterator\n if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if(DEFAULT){\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if(FORCED)for(key in methods){\n if(!(key in proto))redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iter-define.js\n// module id = 50\n// module chunks = 0","module.exports = require('./_hide');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_redefine.js\n// module id = 51\n// module chunks = 0","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object')\n , dPs = require('./_object-dps')\n , enumBugKeys = require('./_enum-bug-keys')\n , IE_PROTO = require('./_shared-key')('IE_PROTO')\n , Empty = function(){ /* empty */ }\n , PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function(){\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe')\n , i = enumBugKeys.length\n , lt = '<'\n , gt = '>'\n , iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties){\n var result;\n if(O !== null){\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty;\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-create.js\n// module id = 52\n// module chunks = 0","module.exports = require('./_global').document && document.documentElement;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_html.js\n// module id = 53\n// module chunks = 0","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function(iterator, fn, value, entries){\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch(e){\n var ret = iterator['return'];\n if(ret !== undefined)anObject(ret.call(iterator));\n throw e;\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iter-call.js\n// module id = 54\n// module chunks = 0","// check on default Array iterator\nvar Iterators = require('./_iterators')\n , ITERATOR = require('./_wks')('iterator')\n , ArrayProto = Array.prototype;\n\nmodule.exports = function(it){\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_is-array-iter.js\n// module id = 55\n// module chunks = 0","var ctx = require('./_ctx')\n , invoke = require('./_invoke')\n , html = require('./_html')\n , cel = require('./_dom-create')\n , global = require('./_global')\n , process = global.process\n , setTask = global.setImmediate\n , clearTask = global.clearImmediate\n , MessageChannel = global.MessageChannel\n , counter = 0\n , queue = {}\n , ONREADYSTATECHANGE = 'onreadystatechange'\n , defer, channel, port;\nvar run = function(){\n var id = +this;\n if(queue.hasOwnProperty(id)){\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function(event){\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif(!setTask || !clearTask){\n setTask = function setImmediate(fn){\n var args = [], i = 1;\n while(arguments.length > i)args.push(arguments[i++]);\n queue[++counter] = function(){\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id){\n delete queue[id];\n };\n // Node.js 0.8-\n if(require('./_cof')(process) == 'process'){\n defer = function(id){\n process.nextTick(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if(MessageChannel){\n channel = new MessageChannel;\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){\n defer = function(id){\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if(ONREADYSTATECHANGE in cel('script')){\n defer = function(id){\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function(id){\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_task.js\n// module id = 56\n// module chunks = 0","var ITERATOR = require('./_wks')('iterator')\n , SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function(){ SAFE_CLOSING = true; };\n Array.from(riter, function(){ throw 2; });\n} catch(e){ /* empty */ }\n\nmodule.exports = function(exec, skipClosing){\n if(!skipClosing && !SAFE_CLOSING)return false;\n var safe = false;\n try {\n var arr = [7]\n , iter = arr[ITERATOR]();\n iter.next = function(){ return {done: safe = true}; };\n arr[ITERATOR] = function(){ return iter; };\n exec(arr);\n } catch(e){ /* empty */ }\n return safe;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iter-detect.js\n// module id = 57\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/object/keys\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/object/keys.js\n// module id = 58\n// module chunks = 0","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal')\n , hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){\n return $keys(O, hiddenKeys);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-gopn.js\n// module id = 59\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nvar _isIterable2 = require(\"../core-js/is-iterable\");\n\nvar _isIterable3 = _interopRequireDefault(_isIterable2);\n\nvar _getIterator2 = require(\"../core-js/get-iterator\");\n\nvar _getIterator3 = _interopRequireDefault(_getIterator2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if ((0, _isIterable3.default)(Object(arr))) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/slicedToArray.js\n// module id = 60\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/createClass.js\n// module id = 61\n// module chunks = 0","/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\n\n/* eslint no-console: [\"error\", { allow: [\"warn\", \"error\"] }] */\n\n/**\n * Entry point to the lex-web-ui Vue plugin\n * Exports Loader as the plugin constructor\n * and Store as store that can be used with Vuex.Store()\n */\nimport Vue from 'vue';\nimport Vuex from 'vuex';\nimport { Config as AWSConfig, CognitoIdentityCredentials }\n from 'aws-sdk/global';\nimport LexRuntime from 'aws-sdk/clients/lexruntime';\nimport Polly from 'aws-sdk/clients/polly';\n\nimport LexWeb from '@/components/LexWeb';\nimport VuexStore from '@/store';\n\nimport { config as defaultConfig, mergeConfig } from '@/config';\n\n/**\n * Vue Component\n */\nconst Component = {\n name: 'lex-web-ui',\n template: '',\n components: { LexWeb },\n};\n\nconst loadingComponent = {\n template: '

Loading. Please wait...

',\n};\nconst errorComponent = {\n template: '

An error ocurred...

',\n};\n\n/**\n * Vue Asynchonous Component\n */\nconst AsyncComponent = ({\n component = Promise.resolve(Component),\n loading = loadingComponent,\n error = errorComponent,\n delay = 200,\n timeout = 10000,\n}) => ({\n // must be a promise\n component,\n // A component to use while the async component is loading\n loading,\n // A component to use if the load fails\n error,\n // Delay before showing the loading component. Default: 200ms.\n delay,\n // The error component will be displayed if a timeout is\n // provided and exceeded. Default: 10000ms.\n timeout,\n});\n\n/**\n * Vue Plugin\n */\nexport const Plugin = {\n install(VueConstructor, {\n name = '$lexWebUi',\n componentName = 'lex-web-ui',\n awsConfig,\n lexRuntimeClient,\n pollyClient,\n component = AsyncComponent,\n config = defaultConfig,\n }) {\n if (name in VueConstructor) {\n console.warn('plugin should only be used once');\n }\n // values to be added to custom vue property\n const value = {\n config,\n awsConfig,\n lexRuntimeClient,\n pollyClient,\n };\n // add custom property to Vue\n // for example, access this in a component via this.$lexWebUi\n Object.defineProperty(VueConstructor.prototype, name, { value });\n // register as a global component\n VueConstructor.component(componentName, component);\n },\n};\n\nexport const Store = VuexStore;\n\n/**\n * Main Class\n */\nexport class Loader {\n constructor(config = {}) {\n const mergedConfig = mergeConfig(defaultConfig, config);\n\n const VueConstructor = (window.Vue) ? window.Vue : Vue;\n if (!VueConstructor) {\n throw new Error('unable to find Vue');\n }\n\n const VuexConstructor = (window.Vuex) ? window.Vuex : Vuex;\n if (!VuexConstructor) {\n throw new Error('unable to find Vuex');\n }\n\n const AWSConfigConstructor = (window.AWS && window.AWS.Config) ?\n window.AWS.Config :\n AWSConfig;\n\n const CognitoConstructor =\n (window.AWS && window.AWS.CognitoIdentityCredentials) ?\n window.AWS.CognitoIdentityCredentials :\n CognitoIdentityCredentials;\n\n const PollyConstructor = (window.AWS && window.AWS.Polly) ?\n window.AWS.Polly :\n Polly;\n\n const LexRuntimeConstructor = (window.AWS && window.AWS.LexRuntime) ?\n window.AWS.LexRuntime :\n LexRuntime;\n\n if (!AWSConfigConstructor || !CognitoConstructor || !PollyConstructor\n || !LexRuntimeConstructor) {\n throw new Error('unable to find AWS SDK');\n }\n\n const credentials = new CognitoConstructor(\n { IdentityPoolId: mergedConfig.cognito.poolId },\n { region: mergedConfig.region || 'us-east-1' },\n );\n\n const awsConfig = new AWSConfigConstructor({\n region: mergedConfig.region || 'us-east-1',\n credentials,\n });\n\n const lexRuntimeClient = new LexRuntimeConstructor(awsConfig);\n const pollyClient = (\n typeof mergedConfig.recorder === 'undefined' ||\n (mergedConfig.recorder && mergedConfig.recorder.enable !== false)\n ) ? new PollyConstructor(awsConfig) : null;\n\n // TODO name space store\n this.store = new VuexConstructor.Store({ ...VuexStore });\n\n VueConstructor.use(Plugin, {\n config: mergedConfig,\n awsConfig,\n lexRuntimeClient,\n pollyClient,\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/lex-web-ui.js","require('../../modules/es6.object.assign');\nmodule.exports = require('../../modules/_core').Object.assign;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/object/assign.js\n// module id = 63\n// module chunks = 0","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', {assign: require('./_object-assign')});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.object.assign.js\n// module id = 64\n// module chunks = 0","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys')\n , gOPS = require('./_object-gops')\n , pIE = require('./_object-pie')\n , toObject = require('./_to-object')\n , IObject = require('./_iobject')\n , $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function(){\n var A = {}\n , B = {}\n , S = Symbol()\n , K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function(k){ B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source){ // eslint-disable-line no-unused-vars\n var T = toObject(target)\n , aLen = arguments.length\n , index = 1\n , getSymbols = gOPS.f\n , isEnum = pIE.f;\n while(aLen > index){\n var S = IObject(arguments[index++])\n , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)\n , length = keys.length\n , j = 0\n , key;\n while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];\n } return T;\n} : $assign;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-assign.js\n// module id = 65\n// module chunks = 0","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject')\n , toLength = require('./_to-length')\n , toIndex = require('./_to-index');\nmodule.exports = function(IS_INCLUDES){\n return function($this, el, fromIndex){\n var O = toIObject($this)\n , length = toLength(O.length)\n , index = toIndex(fromIndex, length)\n , value;\n // Array#includes uses SameValueZero equality algorithm\n if(IS_INCLUDES && el != el)while(length > index){\n value = O[index++];\n if(value != value)return true;\n // Array#toIndex ignores holes, Array#includes - not\n } else for(;length > index; index++)if(IS_INCLUDES || index in O){\n if(O[index] === el)return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_array-includes.js\n// module id = 66\n// module chunks = 0","var toInteger = require('./_to-integer')\n , max = Math.max\n , min = Math.min;\nmodule.exports = function(index, length){\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-index.js\n// module id = 67\n// module chunks = 0","require('../../modules/es6.object.define-property');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function defineProperty(it, key, desc){\n return $Object.defineProperty(it, key, desc);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/object/define-property.js\n// module id = 68\n// module chunks = 0","var $export = require('./_export');\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperty: require('./_object-dp').f});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.object.define-property.js\n// module id = 69\n// module chunks = 0","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.promise');\nmodule.exports = require('../modules/_core').Promise;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/promise.js\n// module id = 70\n// module chunks = 0","var toInteger = require('./_to-integer')\n , defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function(TO_STRING){\n return function(that, pos){\n var s = String(defined(that))\n , i = toInteger(pos)\n , l = s.length\n , a, b;\n if(i < 0 || i >= l)return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_string-at.js\n// module id = 71\n// module chunks = 0","'use strict';\nvar create = require('./_object-create')\n , descriptor = require('./_property-desc')\n , setToStringTag = require('./_set-to-string-tag')\n , IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function(){ return this; });\n\nmodule.exports = function(Constructor, NAME, next){\n Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iter-create.js\n// module id = 72\n// module chunks = 0","var dP = require('./_object-dp')\n , anObject = require('./_an-object')\n , getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties){\n anObject(O);\n var keys = getKeys(Properties)\n , length = keys.length\n , i = 0\n , P;\n while(length > i)dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-dps.js\n// module id = 73\n// module chunks = 0","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has')\n , toObject = require('./_to-object')\n , IE_PROTO = require('./_shared-key')('IE_PROTO')\n , ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function(O){\n O = toObject(O);\n if(has(O, IE_PROTO))return O[IE_PROTO];\n if(typeof O.constructor == 'function' && O instanceof O.constructor){\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-gpo.js\n// module id = 74\n// module chunks = 0","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables')\n , step = require('./_iter-step')\n , Iterators = require('./_iterators')\n , toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function(iterated, kind){\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , kind = this._k\n , index = this._i++;\n if(!O || index >= O.length){\n this._t = undefined;\n return step(1);\n }\n if(kind == 'keys' )return step(0, index);\n if(kind == 'values')return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.array.iterator.js\n// module id = 75\n// module chunks = 0","module.exports = function(){ /* empty */ };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_add-to-unscopables.js\n// module id = 76\n// module chunks = 0","module.exports = function(done, value){\n return {value: value, done: !!done};\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iter-step.js\n// module id = 77\n// module chunks = 0","'use strict';\nvar LIBRARY = require('./_library')\n , global = require('./_global')\n , ctx = require('./_ctx')\n , classof = require('./_classof')\n , $export = require('./_export')\n , isObject = require('./_is-object')\n , aFunction = require('./_a-function')\n , anInstance = require('./_an-instance')\n , forOf = require('./_for-of')\n , speciesConstructor = require('./_species-constructor')\n , task = require('./_task').set\n , microtask = require('./_microtask')()\n , PROMISE = 'Promise'\n , TypeError = global.TypeError\n , process = global.process\n , $Promise = global[PROMISE]\n , process = global.process\n , isNode = classof(process) == 'process'\n , empty = function(){ /* empty */ }\n , Internal, GenericPromiseCapability, Wrapper;\n\nvar USE_NATIVE = !!function(){\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1)\n , FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function(exec){ exec(empty, empty); };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;\n } catch(e){ /* empty */ }\n}();\n\n// helpers\nvar sameConstructor = function(a, b){\n // with library wrapper special case\n return a === b || a === $Promise && b === Wrapper;\n};\nvar isThenable = function(it){\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar newPromiseCapability = function(C){\n return sameConstructor($Promise, C)\n ? new PromiseCapability(C)\n : new GenericPromiseCapability(C);\n};\nvar PromiseCapability = GenericPromiseCapability = function(C){\n var resolve, reject;\n this.promise = new C(function($$resolve, $$reject){\n if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n};\nvar perform = function(exec){\n try {\n exec();\n } catch(e){\n return {error: e};\n }\n};\nvar notify = function(promise, isReject){\n if(promise._n)return;\n promise._n = true;\n var chain = promise._c;\n microtask(function(){\n var value = promise._v\n , ok = promise._s == 1\n , i = 0;\n var run = function(reaction){\n var handler = ok ? reaction.ok : reaction.fail\n , resolve = reaction.resolve\n , reject = reaction.reject\n , domain = reaction.domain\n , result, then;\n try {\n if(handler){\n if(!ok){\n if(promise._h == 2)onHandleUnhandled(promise);\n promise._h = 1;\n }\n if(handler === true)result = value;\n else {\n if(domain)domain.enter();\n result = handler(value);\n if(domain)domain.exit();\n }\n if(result === reaction.promise){\n reject(TypeError('Promise-chain cycle'));\n } else if(then = isThenable(result)){\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch(e){\n reject(e);\n }\n };\n while(chain.length > i)run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if(isReject && !promise._h)onUnhandled(promise);\n });\n};\nvar onUnhandled = function(promise){\n task.call(global, function(){\n var value = promise._v\n , abrupt, handler, console;\n if(isUnhandled(promise)){\n abrupt = perform(function(){\n if(isNode){\n process.emit('unhandledRejection', value, promise);\n } else if(handler = global.onunhandledrejection){\n handler({promise: promise, reason: value});\n } else if((console = global.console) && console.error){\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if(abrupt)throw abrupt.error;\n });\n};\nvar isUnhandled = function(promise){\n if(promise._h == 1)return false;\n var chain = promise._a || promise._c\n , i = 0\n , reaction;\n while(chain.length > i){\n reaction = chain[i++];\n if(reaction.fail || !isUnhandled(reaction.promise))return false;\n } return true;\n};\nvar onHandleUnhandled = function(promise){\n task.call(global, function(){\n var handler;\n if(isNode){\n process.emit('rejectionHandled', promise);\n } else if(handler = global.onrejectionhandled){\n handler({promise: promise, reason: promise._v});\n }\n });\n};\nvar $reject = function(value){\n var promise = this;\n if(promise._d)return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if(!promise._a)promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function(value){\n var promise = this\n , then;\n if(promise._d)return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if(promise === value)throw TypeError(\"Promise can't be resolved itself\");\n if(then = isThenable(value)){\n microtask(function(){\n var wrapper = {_w: promise, _d: false}; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch(e){\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch(e){\n $reject.call({_w: promise, _d: false}, e); // wrap\n }\n};\n\n// constructor polyfill\nif(!USE_NATIVE){\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor){\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch(err){\n $reject.call(this, err);\n }\n };\n Internal = function Promise(executor){\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected){\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if(this._a)this._a.push(reaction);\n if(this._s)notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function(onRejected){\n return this.then(undefined, onRejected);\n }\n });\n PromiseCapability = function(){\n var promise = new Internal;\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise});\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r){\n var capability = newPromiseCapability(this)\n , $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x){\n // instanceof instead of internal slot check because we should fix it without replacement native Promise core\n if(x instanceof $Promise && sameConstructor(x.constructor, this))return x;\n var capability = newPromiseCapability(this)\n , $$resolve = capability.resolve;\n $$resolve(x);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function(iter){\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable){\n var C = this\n , capability = newPromiseCapability(C)\n , resolve = capability.resolve\n , reject = capability.reject;\n var abrupt = perform(function(){\n var values = []\n , index = 0\n , remaining = 1;\n forOf(iterable, false, function(promise){\n var $index = index++\n , alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function(value){\n if(alreadyCalled)return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if(abrupt)reject(abrupt.error);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable){\n var C = this\n , capability = newPromiseCapability(C)\n , reject = capability.reject;\n var abrupt = perform(function(){\n forOf(iterable, false, function(promise){\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if(abrupt)reject(abrupt.error);\n return capability.promise;\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.promise.js\n// module id = 78\n// module chunks = 0","module.exports = function(it, Constructor, name, forbiddenField){\n if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_an-instance.js\n// module id = 79\n// module chunks = 0","var ctx = require('./_ctx')\n , call = require('./_iter-call')\n , isArrayIter = require('./_is-array-iter')\n , anObject = require('./_an-object')\n , toLength = require('./_to-length')\n , getIterFn = require('./core.get-iterator-method')\n , BREAK = {}\n , RETURN = {};\nvar exports = module.exports = function(iterable, entries, fn, that, ITERATOR){\n var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)\n , f = ctx(fn, that, entries ? 2 : 1)\n , index = 0\n , length, step, iterator, result;\n if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if(result === BREAK || result === RETURN)return result;\n } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){\n result = call(iterator, f, step.value, entries);\n if(result === BREAK || result === RETURN)return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_for-of.js\n// module id = 80\n// module chunks = 0","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object')\n , aFunction = require('./_a-function')\n , SPECIES = require('./_wks')('species');\nmodule.exports = function(O, D){\n var C = anObject(O).constructor, S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_species-constructor.js\n// module id = 81\n// module chunks = 0","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function(fn, args, that){\n var un = that === undefined;\n switch(args.length){\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_invoke.js\n// module id = 82\n// module chunks = 0","var global = require('./_global')\n , macrotask = require('./_task').set\n , Observer = global.MutationObserver || global.WebKitMutationObserver\n , process = global.process\n , Promise = global.Promise\n , isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function(){\n var head, last, notify;\n\n var flush = function(){\n var parent, fn;\n if(isNode && (parent = process.domain))parent.exit();\n while(head){\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch(e){\n if(head)notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if(parent)parent.enter();\n };\n\n // Node.js\n if(isNode){\n notify = function(){\n process.nextTick(flush);\n };\n // browsers with MutationObserver\n } else if(Observer){\n var toggle = true\n , node = document.createTextNode('');\n new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new\n notify = function(){\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if(Promise && Promise.resolve){\n var promise = Promise.resolve();\n notify = function(){\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function(){\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function(fn){\n var task = {fn: fn, next: undefined};\n if(last)last.next = task;\n if(!head){\n head = task;\n notify();\n } last = task;\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_microtask.js\n// module id = 83\n// module chunks = 0","var hide = require('./_hide');\nmodule.exports = function(target, src, safe){\n for(var key in src){\n if(safe && target[key])target[key] = src[key];\n else hide(target, key, src[key]);\n } return target;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_redefine-all.js\n// module id = 84\n// module chunks = 0","'use strict';\nvar global = require('./_global')\n , core = require('./_core')\n , dP = require('./_object-dp')\n , DESCRIPTORS = require('./_descriptors')\n , SPECIES = require('./_wks')('species');\n\nmodule.exports = function(KEY){\n var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];\n if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {\n configurable: true,\n get: function(){ return this; }\n });\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_set-species.js\n// module id = 85\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_86__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"vue\"\n// module id = 86\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_87__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"vuex\"\n// module id = 87\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_88__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"aws-sdk/global\"\n// module id = 88\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_89__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"aws-sdk/clients/lexruntime\"\n// module id = 89\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_90__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"aws-sdk/clients/polly\"\n// module id = 90\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"minimize\\\":true,\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-4973da9d\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./LexWeb.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./LexWeb.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-4973da9d\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./LexWeb.vue\"\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/LexWeb.vue\n// module id = 91\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/extract-text-webpack-plugin/dist/loader.js?{\"omit\":1,\"remove\":true}!./node_modules/vue-style-loader!./node_modules/css-loader?{\"minimize\":true,\"sourceMap\":true}!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-4973da9d\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/LexWeb.vue\n// module id = 92\n// module chunks = 0","\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// LexWeb.vue?f6c6f820","require('../../modules/es6.object.keys');\nmodule.exports = require('../../modules/_core').Object.keys;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/object/keys.js\n// module id = 94\n// module chunks = 0","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object')\n , $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function(){\n return function keys(it){\n return $keys(toObject(it));\n };\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.object.keys.js\n// module id = 95\n// module chunks = 0","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export')\n , core = require('./_core')\n , fails = require('./_fails');\nmodule.exports = function(KEY, exec){\n var fn = (core.Object || {})[KEY] || Object[KEY]\n , exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-sap.js\n// module id = 96\n// module chunks = 0","var normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./ToolbarContainer.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-59f58ea4\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./ToolbarContainer.vue\"\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/ToolbarContainer.vue\n// module id = 97\n// module chunks = 0","\n\n\n\n\n\n// WEBPACK FOOTER //\n// ToolbarContainer.vue?afb1d408","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('v-toolbar', {\n class: _vm.toolbarColor,\n attrs: {\n \"dark\": \"\",\n \"dense\": \"\"\n }\n }, [_c('img', {\n attrs: {\n \"src\": _vm.toolbarLogo\n }\n }), _vm._v(\" \"), _c('v-toolbar-title', {\n staticClass: \"hidden-xs-and-down\"\n }, [_vm._v(\"\\n \" + _vm._s(_vm.toolbarTitle) + \"\\n \")]), _vm._v(\" \"), _c('v-spacer'), _vm._v(\" \"), (_vm.$store.state.isRunningEmbedded) ? _c('v-btn', {\n directives: [{\n name: \"tooltip\",\n rawName: \"v-tooltip:left\",\n value: (_vm.toolTipMinimize),\n expression: \"toolTipMinimize\",\n arg: \"left\"\n }],\n attrs: {\n \"icon\": \"\",\n \"light\": \"\"\n },\n nativeOn: {\n \"click\": function($event) {\n _vm.toggleMinimize($event)\n }\n }\n }, [_c('v-icon', [_vm._v(\"\\n \" + _vm._s(_vm.isUiMinimized ? 'arrow_drop_up' : 'arrow_drop_down') + \"\\n \")])], 1) : _vm._e()], 1)\n}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-59f58ea4\",\"hasScoped\":false,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/ToolbarContainer.vue\n// module id = 99\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"minimize\\\":true,\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-20b8f18d\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./MessageList.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./MessageList.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-20b8f18d\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./MessageList.vue\"\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-20b8f18d\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/MessageList.vue\n// module id = 100\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/extract-text-webpack-plugin/dist/loader.js?{\"omit\":1,\"remove\":true}!./node_modules/vue-style-loader!./node_modules/css-loader?{\"minimize\":true,\"sourceMap\":true}!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-20b8f18d\",\"scoped\":true,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/MessageList.vue\n// module id = 101\n// module chunks = 0","\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// MessageList.vue?6d850226","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"minimize\\\":true,\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-290c8f4f\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./Message.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./Message.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-290c8f4f\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./Message.vue\"\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-290c8f4f\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/Message.vue\n// module id = 103\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/extract-text-webpack-plugin/dist/loader.js?{\"omit\":1,\"remove\":true}!./node_modules/vue-style-loader!./node_modules/css-loader?{\"minimize\":true,\"sourceMap\":true}!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-290c8f4f\",\"scoped\":true,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/Message.vue\n// module id = 104\n// module chunks = 0","\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// Message.vue?16a9ad35","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"minimize\\\":true,\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-d69cb2c8\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./MessageText.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./MessageText.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-d69cb2c8\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./MessageText.vue\"\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-d69cb2c8\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/MessageText.vue\n// module id = 106\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/extract-text-webpack-plugin/dist/loader.js?{\"omit\":1,\"remove\":true}!./node_modules/vue-style-loader!./node_modules/css-loader?{\"minimize\":true,\"sourceMap\":true}!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-d69cb2c8\",\"scoped\":true,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/MessageText.vue\n// module id = 107\n// module chunks = 0","\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// MessageText.vue?290ab3c0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return (_vm.message.text && _vm.message.type === 'human') ? _c('div', {\n staticClass: \"message-text\"\n }, [_vm._v(\"\\n \" + _vm._s(_vm.message.text) + \"\\n\")]) : (_vm.message.text && _vm.shouldRenderAsHtml) ? _c('div', {\n staticClass: \"message-text\",\n domProps: {\n \"innerHTML\": _vm._s(_vm.botMessageAsHtml)\n }\n }) : (_vm.message.text && _vm.message.type === 'bot') ? _c('div', {\n staticClass: \"message-text\"\n }, [_vm._v(\"\\n \" + _vm._s((_vm.shouldStripTags) ? _vm.stripTagsFromMessage(_vm.message.text) : _vm.message.text) + \"\\n\")]) : _vm._e()\n}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-d69cb2c8\",\"hasScoped\":true,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/MessageText.vue\n// module id = 109\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"minimize\\\":true,\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-799b9a4e\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./ResponseCard.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./ResponseCard.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-799b9a4e\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./ResponseCard.vue\"\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-799b9a4e\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/ResponseCard.vue\n// module id = 110\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/extract-text-webpack-plugin/dist/loader.js?{\"omit\":1,\"remove\":true}!./node_modules/vue-style-loader!./node_modules/css-loader?{\"minimize\":true,\"sourceMap\":true}!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-799b9a4e\",\"scoped\":true,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/ResponseCard.vue\n// module id = 111\n// module chunks = 0","\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// ResponseCard.vue?84bcfc60","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('v-card', [(_vm.responseCard.title.trim()) ? _c('v-card-title', {\n staticClass: \"red lighten-5\",\n attrs: {\n \"primary-title\": \"\"\n }\n }, [_c('span', {\n staticClass: \"headline\"\n }, [_vm._v(_vm._s(_vm.responseCard.title))])]) : _vm._e(), _vm._v(\" \"), (_vm.responseCard.subTitle) ? _c('v-card-text', [_c('span', [_vm._v(_vm._s(_vm.responseCard.subTitle))])]) : _vm._e(), _vm._v(\" \"), (_vm.responseCard.imageUrl) ? _c('v-card-media', {\n attrs: {\n \"src\": _vm.responseCard.imageUrl,\n \"contain\": \"\",\n \"height\": \"33vh\"\n }\n }) : _vm._e(), _vm._v(\" \"), _vm._l((_vm.responseCard.buttons), function(button, index) {\n return _c('v-card-actions', {\n key: index,\n staticClass: \"button-row\",\n attrs: {\n \"actions\": \"\"\n }\n }, [(button.text && button.value) ? _c('v-btn', {\n attrs: {\n \"disabled\": _vm.hasButtonBeenClicked,\n \"default\": \"\"\n },\n nativeOn: {\n \"~click\": function($event) {\n _vm.onButtonClick(button.value)\n }\n }\n }, [_vm._v(\"\\n \" + _vm._s(button.text) + \"\\n \")]) : _vm._e()], 1)\n }), _vm._v(\" \"), (_vm.responseCard.attachmentLinkUrl) ? _c('v-card-actions', [_c('v-btn', {\n staticClass: \"red lighten-5\",\n attrs: {\n \"flat\": \"\",\n \"tag\": \"a\",\n \"href\": _vm.responseCard.attachmentLinkUrl,\n \"target\": \"_blank\"\n }\n }, [_vm._v(\"\\n Open Link\\n \")])], 1) : _vm._e()], 2)\n}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-799b9a4e\",\"hasScoped\":true,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/ResponseCard.vue\n// module id = 113\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('v-flex', {\n staticClass: \"message\"\n }, [_c('v-chip', [('text' in _vm.message && _vm.message.text !== null && _vm.message.text.length) ? _c('message-text', {\n attrs: {\n \"message\": _vm.message\n }\n }) : _vm._e(), _vm._v(\" \"), (_vm.message.type === 'human' && _vm.message.audio) ? _c('div', [_c('audio', [_c('source', {\n attrs: {\n \"src\": _vm.message.audio,\n \"type\": \"audio/wav\"\n }\n })]), _vm._v(\" \"), _c('v-btn', {\n staticClass: \"black--text\",\n attrs: {\n \"left\": \"\",\n \"icon\": \"\"\n },\n nativeOn: {\n \"click\": function($event) {\n _vm.playAudio($event)\n }\n }\n }, [_c('v-icon', {\n staticClass: \"play-button\"\n }, [_vm._v(\"play_circle_outline\")])], 1)], 1) : _vm._e(), _vm._v(\" \"), (_vm.message.type === 'bot' && _vm.botDialogState) ? _c('v-icon', {\n class: _vm.botDialogState.color + '--text',\n attrs: {\n \"medium\": \"\"\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.botDialogState.icon) + \"\\n \")]) : _vm._e()], 1), _vm._v(\" \"), (_vm.shouldDisplayResponseCard) ? _c('div', {\n staticClass: \"response-card\"\n }, _vm._l((_vm.message.responseCard.genericAttachments), function(card, index) {\n return _c('response-card', {\n key: index,\n attrs: {\n \"response-card\": card\n }\n })\n })) : _vm._e()], 1)\n}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-290c8f4f\",\"hasScoped\":true,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/Message.vue\n// module id = 114\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('v-layout', {\n staticClass: \"message-list\"\n }, _vm._l((_vm.messages), function(message) {\n return _c('message', {\n key: message.id,\n class: (\"message-\" + (message.type)),\n attrs: {\n \"message\": message\n }\n })\n }))\n}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-20b8f18d\",\"hasScoped\":true,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/MessageList.vue\n// module id = 115\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"minimize\\\":true,\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-2df12d09\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./StatusBar.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./StatusBar.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-2df12d09\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./StatusBar.vue\"\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-2df12d09\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/StatusBar.vue\n// module id = 116\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/extract-text-webpack-plugin/dist/loader.js?{\"omit\":1,\"remove\":true}!./node_modules/vue-style-loader!./node_modules/css-loader?{\"minimize\":true,\"sourceMap\":true}!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-2df12d09\",\"scoped\":true,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/StatusBar.vue\n// module id = 117\n// module chunks = 0","\n\n\n\n\n\n// WEBPACK FOOTER //\n// StatusBar.vue?6a736d08","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"status-bar white\"\n }, [_c('v-divider'), _vm._v(\" \"), _c('div', {\n staticClass: \"status-text\"\n }, [_c('span', [_vm._v(_vm._s(_vm.statusText))])]), _vm._v(\" \"), _c('div', {\n staticClass: \"voice-controls\"\n }, [_c('transition', {\n attrs: {\n \"css\": false\n },\n on: {\n \"enter\": _vm.enterMeter,\n \"leave\": _vm.leaveMeter\n }\n }, [(_vm.isRecording) ? _c('div', {\n staticClass: \"ml-2 volume-meter\"\n }, [_c('meter', {\n attrs: {\n \"value\": _vm.volume,\n \"min\": \"0.0001\",\n \"low\": \"0.005\",\n \"optimum\": \"0.04\",\n \"high\": \"0.07\",\n \"max\": \"0.09\"\n }\n })]) : _vm._e()])], 1)], 1)\n}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-2df12d09\",\"hasScoped\":true,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/StatusBar.vue\n// module id = 119\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"minimize\\\":true,\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-6dd14e82\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./InputContainer.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./InputContainer.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-6dd14e82\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./InputContainer.vue\"\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-6dd14e82\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/InputContainer.vue\n// module id = 120\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/extract-text-webpack-plugin/dist/loader.js?{\"omit\":1,\"remove\":true}!./node_modules/vue-style-loader!./node_modules/css-loader?{\"minimize\":true,\"sourceMap\":true}!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-6dd14e82\",\"scoped\":true,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/InputContainer.vue\n// module id = 121\n// module chunks = 0","\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// InputContainer.vue?40186761","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"input-container white\"\n }, [_c('v-text-field', {\n staticClass: \"black--text ml-2 pt-3 pb-0\",\n attrs: {\n \"id\": \"text-input\",\n \"name\": \"text-input\",\n \"label\": _vm.textInputPlaceholder,\n \"single-line\": \"\"\n },\n nativeOn: {\n \"keyup\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13)) { return null; }\n $event.stopPropagation();\n _vm.postTextMessage($event)\n }\n },\n model: {\n value: (_vm.textInput),\n callback: function($$v) {\n _vm.textInput = (typeof $$v === 'string' ? $$v.trim() : $$v)\n },\n expression: \"textInput\"\n }\n }), _vm._v(\" \"), (_vm.isRecorderSupported) ? _c('v-btn', {\n directives: [{\n name: \"tooltip\",\n rawName: \"v-tooltip:left\",\n value: ({\n html: _vm.micTooltip\n }),\n expression: \"{html: micTooltip}\",\n arg: \"left\"\n }],\n staticClass: \"black--text mic-button\",\n attrs: {\n \"icon\": \"\",\n \"disabled\": _vm.isMicButtonDisabled\n },\n nativeOn: {\n \"click\": function($event) {\n _vm.onMicClick($event)\n }\n }\n }, [_c('v-icon', {\n attrs: {\n \"medium\": \"\"\n }\n }, [_vm._v(_vm._s(_vm.micButtonIcon))])], 1) : _vm._e()], 1)\n}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-6dd14e82\",\"hasScoped\":true,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/InputContainer.vue\n// module id = 123\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n attrs: {\n \"id\": \"lex-web\"\n }\n }, [_c('toolbar-container', {\n attrs: {\n \"toolbar-title\": _vm.toolbarTitle,\n \"toolbar-color\": _vm.toolbarColor,\n \"toolbar-logo\": _vm.toolbarLogo,\n \"is-ui-minimized\": _vm.isUiMinimized\n },\n on: {\n \"toggleMinimizeUi\": _vm.toggleMinimizeUi\n }\n }), _vm._v(\" \"), _c('message-list'), _vm._v(\" \"), _c('status-bar'), _vm._v(\" \"), _c('input-container', {\n attrs: {\n \"text-input-placeholder\": _vm.textInputPlaceholder,\n \"initial-text\": _vm.initialText,\n \"initial-speech-instruction\": _vm.initialSpeechInstruction\n }\n })], 1)\n}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-4973da9d\",\"hasScoped\":false,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/LexWeb.vue\n// module id = 124\n// module chunks = 0","/*\n Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Licensed under the Amazon Software License (the \"License\"). You may not use this file\n except in compliance with the License. A copy of the License is located at\n\n http://aws.amazon.com/asl/\n\n or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\n BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\n License for the specific language governing permissions and limitations under the License.\n */\n\n/* global atob Blob URL */\n/* eslint no-console: [\"error\", { allow: [\"info\", \"warn\", \"error\"] }] */\n/* eslint no-param-reassign: off */\n\nimport initialState from '@/store/state';\nimport getters from '@/store/getters';\nimport mutations from '@/store/mutations';\nimport actions from '@/store/actions';\n\nexport default {\n // prevent changes outside of mutation handlers\n strict: (process.env.NODE_ENV === 'development'),\n state: initialState,\n getters,\n mutations,\n actions,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/index.js","/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\n\n/**\n * Sets up the initial state of the store\n */\nimport { config } from '@/config';\n\nexport default {\n version: (process.env.PACKAGE_VERSION) ?\n process.env.PACKAGE_VERSION : '0.0.0',\n lex: {\n acceptFormat: 'audio/ogg',\n dialogState: '',\n isInterrupting: false,\n isProcessing: false,\n inputTranscript: '',\n intentName: '',\n message: '',\n responseCard: null,\n sessionAttributes: (\n config.lex &&\n config.lex.sessionAttributes &&\n typeof config.lex.sessionAttributes === 'object'\n ) ? { ...config.lex.sessionAttributes } : {},\n slotToElicit: '',\n slots: {},\n },\n messages: [],\n polly: {\n outputFormat: 'ogg_vorbis',\n voiceId: (\n config.polly &&\n config.polly.voiceId &&\n typeof config.polly.voiceId === 'string'\n ) ? `${config.polly.voiceId}` : 'Joanna',\n },\n botAudio: {\n canInterrupt: false,\n interruptIntervalId: null,\n autoPlay: false,\n isInterrupting: false,\n isSpeaking: false,\n },\n recState: {\n isConversationGoing: false,\n isInterrupting: false,\n isMicMuted: false,\n isMicQuiet: true,\n isRecorderSupported: false,\n isRecorderEnabled: (config.recorder) ? !!config.recorder.enable : true,\n isRecording: false,\n silentRecordingCount: 0,\n },\n\n isRunningEmbedded: false, // am I running in an iframe?\n isUiMinimized: false, // when running embedded, is the iframe minimized?\n config,\n\n awsCreds: {\n provider: 'cognito', // cognito|parentWindow\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/state.js","module.exports = { \"default\": require(\"core-js/library/fn/symbol/iterator\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/symbol/iterator.js\n// module id = 127\n// module chunks = 0","require('../../modules/es6.string.iterator');\nrequire('../../modules/web.dom.iterable');\nmodule.exports = require('../../modules/_wks-ext').f('iterator');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/symbol/iterator.js\n// module id = 128\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/symbol\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/symbol.js\n// module id = 129\n// module chunks = 0","require('../../modules/es6.symbol');\nrequire('../../modules/es6.object.to-string');\nrequire('../../modules/es7.symbol.async-iterator');\nrequire('../../modules/es7.symbol.observable');\nmodule.exports = require('../../modules/_core').Symbol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/symbol/index.js\n// module id = 130\n// module chunks = 0","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global')\n , has = require('./_has')\n , DESCRIPTORS = require('./_descriptors')\n , $export = require('./_export')\n , redefine = require('./_redefine')\n , META = require('./_meta').KEY\n , $fails = require('./_fails')\n , shared = require('./_shared')\n , setToStringTag = require('./_set-to-string-tag')\n , uid = require('./_uid')\n , wks = require('./_wks')\n , wksExt = require('./_wks-ext')\n , wksDefine = require('./_wks-define')\n , keyOf = require('./_keyof')\n , enumKeys = require('./_enum-keys')\n , isArray = require('./_is-array')\n , anObject = require('./_an-object')\n , toIObject = require('./_to-iobject')\n , toPrimitive = require('./_to-primitive')\n , createDesc = require('./_property-desc')\n , _create = require('./_object-create')\n , gOPNExt = require('./_object-gopn-ext')\n , $GOPD = require('./_object-gopd')\n , $DP = require('./_object-dp')\n , $keys = require('./_object-keys')\n , gOPD = $GOPD.f\n , dP = $DP.f\n , gOPN = gOPNExt.f\n , $Symbol = global.Symbol\n , $JSON = global.JSON\n , _stringify = $JSON && $JSON.stringify\n , PROTOTYPE = 'prototype'\n , HIDDEN = wks('_hidden')\n , TO_PRIMITIVE = wks('toPrimitive')\n , isEnum = {}.propertyIsEnumerable\n , SymbolRegistry = shared('symbol-registry')\n , AllSymbols = shared('symbols')\n , OPSymbols = shared('op-symbols')\n , ObjectProto = Object[PROTOTYPE]\n , USE_NATIVE = typeof $Symbol == 'function'\n , QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function(){\n return _create(dP({}, 'a', {\n get: function(){ return dP(this, 'a', {value: 7}).a; }\n })).a != 7;\n}) ? function(it, key, D){\n var protoDesc = gOPD(ObjectProto, key);\n if(protoDesc)delete ObjectProto[key];\n dP(it, key, D);\n if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function(tag){\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){\n return typeof it == 'symbol';\n} : function(it){\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D){\n if(it === ObjectProto)$defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if(has(AllSymbols, key)){\n if(!D.enumerable){\n if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;\n D = _create(D, {enumerable: createDesc(0, false)});\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P){\n anObject(it);\n var keys = enumKeys(P = toIObject(P))\n , i = 0\n , l = keys.length\n , key;\n while(l > i)$defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P){\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key){\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){\n it = toIObject(it);\n key = toPrimitive(key, true);\n if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;\n var D = gOPD(it, key);\n if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it){\n var names = gOPN(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i){\n if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it){\n var IS_OP = it === ObjectProto\n , names = gOPN(IS_OP ? OPSymbols : toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i){\n if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif(!USE_NATIVE){\n $Symbol = function Symbol(){\n if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function(value){\n if(this === ObjectProto)$set.call(OPSymbols, value);\n if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString(){\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n require('./_object-pie').f = $propertyIsEnumerable;\n require('./_object-gops').f = $getOwnPropertySymbols;\n\n if(DESCRIPTORS && !require('./_library')){\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function(name){\n return wrap(wks(name));\n }\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});\n\nfor(var symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);\n\nfor(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function(key){\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(key){\n if(isSymbol(key))return keyOf(SymbolRegistry, key);\n throw TypeError(key + ' is not a symbol!');\n },\n useSetter: function(){ setter = true; },\n useSimple: function(){ setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it){\n if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined\n var args = [it]\n , i = 1\n , replacer, $replacer;\n while(arguments.length > i)args.push(arguments[i++]);\n replacer = args[1];\n if(typeof replacer == 'function')$replacer = replacer;\n if($replacer || !isArray(replacer))replacer = function(key, value){\n if($replacer)value = $replacer.call(this, key, value);\n if(!isSymbol(value))return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.symbol.js\n// module id = 131\n// module chunks = 0","var META = require('./_uid')('meta')\n , isObject = require('./_is-object')\n , has = require('./_has')\n , setDesc = require('./_object-dp').f\n , id = 0;\nvar isExtensible = Object.isExtensible || function(){\n return true;\n};\nvar FREEZE = !require('./_fails')(function(){\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function(it){\n setDesc(it, META, {value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n }});\n};\nvar fastKey = function(it, create){\n // return primitive with prefix\n if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if(!has(it, META)){\n // can't set metadata to uncaught frozen object\n if(!isExtensible(it))return 'F';\n // not necessary to add metadata\n if(!create)return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function(it, create){\n if(!has(it, META)){\n // can't set metadata to uncaught frozen object\n if(!isExtensible(it))return true;\n // not necessary to add metadata\n if(!create)return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function(it){\n if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_meta.js\n// module id = 132\n// module chunks = 0","var getKeys = require('./_object-keys')\n , toIObject = require('./_to-iobject');\nmodule.exports = function(object, el){\n var O = toIObject(object)\n , keys = getKeys(O)\n , length = keys.length\n , index = 0\n , key;\n while(length > index)if(O[key = keys[index++]] === el)return key;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_keyof.js\n// module id = 133\n// module chunks = 0","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys')\n , gOPS = require('./_object-gops')\n , pIE = require('./_object-pie');\nmodule.exports = function(it){\n var result = getKeys(it)\n , getSymbols = gOPS.f;\n if(getSymbols){\n var symbols = getSymbols(it)\n , isEnum = pIE.f\n , i = 0\n , key;\n while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);\n } return result;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_enum-keys.js\n// module id = 134\n// module chunks = 0","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg){\n return cof(arg) == 'Array';\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_is-array.js\n// module id = 135\n// module chunks = 0","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject')\n , gOPN = require('./_object-gopn').f\n , toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function(it){\n try {\n return gOPN(it);\n } catch(e){\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it){\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-gopn-ext.js\n// module id = 136\n// module chunks = 0","var pIE = require('./_object-pie')\n , createDesc = require('./_property-desc')\n , toIObject = require('./_to-iobject')\n , toPrimitive = require('./_to-primitive')\n , has = require('./_has')\n , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n , gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P){\n O = toIObject(O);\n P = toPrimitive(P, true);\n if(IE8_DOM_DEFINE)try {\n return gOPD(O, P);\n } catch(e){ /* empty */ }\n if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-gopd.js\n// module id = 137\n// module chunks = 0","require('./_wks-define')('asyncIterator');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es7.symbol.async-iterator.js\n// module id = 138\n// module chunks = 0","require('./_wks-define')('observable');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es7.symbol.observable.js\n// module id = 139\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (obj, key, value) {\n if (key in obj) {\n (0, _defineProperty2.default)(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/defineProperty.js\n// module id = 140\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/is-iterable\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/is-iterable.js\n// module id = 141\n// module chunks = 0","require('../modules/web.dom.iterable');\nrequire('../modules/es6.string.iterator');\nmodule.exports = require('../modules/core.is-iterable');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/is-iterable.js\n// module id = 142\n// module chunks = 0","var classof = require('./_classof')\n , ITERATOR = require('./_wks')('iterator')\n , Iterators = require('./_iterators');\nmodule.exports = require('./_core').isIterable = function(it){\n var O = Object(it);\n return O[ITERATOR] !== undefined\n || '@@iterator' in O\n || Iterators.hasOwnProperty(classof(O));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/core.is-iterable.js\n// module id = 143\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/get-iterator\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/get-iterator.js\n// module id = 144\n// module chunks = 0","require('../modules/web.dom.iterable');\nrequire('../modules/es6.string.iterator');\nmodule.exports = require('../modules/core.get-iterator');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/get-iterator.js\n// module id = 145\n// module chunks = 0","var anObject = require('./_an-object')\n , get = require('./core.get-iterator-method');\nmodule.exports = require('./_core').getIterator = function(it){\n var iterFn = get(it);\n if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');\n return anObject(iterFn.call(it));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/core.get-iterator.js\n// module id = 146\n// module chunks = 0","var map = {\n\t\"./config.dev.json\": 148,\n\t\"./config.prod.json\": 149,\n\t\"./config.test.json\": 150\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 147;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/config ^\\.\\/config\\..*\\.json$\n// module id = 147\n// module chunks = 0","module.exports = {\"cognito\":{\"poolId\":\"\"},\"lex\":{\"botName\":\"WebUiOrderFlowers\",\"initialText\":\"You can ask me for help ordering flowers. Just type \\\"order flowers\\\" or click on the mic and say it.\",\"initialSpeechInstruction\":\"Say 'Order Flowers' to get started.\"},\"polly\":{\"voiceId\":\"Salli\"},\"ui\":{\"parentOrigin\":\"http://localhost:8080\",\"pageTitle\":\"Order Flowers Bot\",\"toolbarTitle\":\"Order Flowers\"},\"recorder\":{\"preset\":\"speech_recognition\"}}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/config/config.dev.json\n// module id = 148\n// module chunks = 0","module.exports = {\"cognito\":{\"poolId\":\"\"},\"lex\":{\"botName\":\"WebUiOrderFlowers\",\"initialText\":\"You can ask me for help ordering flowers. Just type \\\"order flowers\\\" or click on the mic and say it.\",\"initialSpeechInstruction\":\"Say 'Order Flowers' to get started.\"},\"polly\":{\"voiceId\":\"Salli\"},\"ui\":{\"parentOrigin\":\"\",\"pageTitle\":\"Order Flowers Bot\",\"toolbarTitle\":\"Order Flowers\"},\"recorder\":{\"preset\":\"speech_recognition\"}}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/config/config.prod.json\n// module id = 149\n// module chunks = 0","module.exports = {\"cognito\":{\"poolId\":\"\"},\"lex\":{\"botName\":\"WebUiOrderFlowers\",\"initialText\":\"You can ask me for help ordering flowers. Just type \\\"order flowers\\\" or click on the mic and say it.\",\"initialSpeechInstruction\":\"Say 'Order Flowers' to get started.\"},\"polly\":{\"voiceId\":\"Salli\"},\"ui\":{\"parentOrigin\":\"http://localhost:8080\",\"pageTitle\":\"Order Flowers Bot\",\"toolbarTitle\":\"Order Flowers\"},\"recorder\":{\"preset\":\"speech_recognition\"}}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/config/config.test.json\n// module id = 150\n// module chunks = 0","/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\n\nexport default {\n canInterruptBotPlayback: state => state.botAudio.canInterrupt,\n isBotSpeaking: state => state.botAudio.isSpeaking,\n isConversationGoing: state => state.recState.isConversationGoing,\n isLexInterrupting: state => state.lex.isInterrupting,\n isLexProcessing: state => state.lex.isProcessing,\n isMicMuted: state => state.recState.isMicMuted,\n isMicQuiet: state => state.recState.isMicQuiet,\n isRecorderSupported: state => state.recState.isRecorderSupported,\n isRecording: state => state.recState.isRecording,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/getters.js","/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\n\n/**\n * Store mutations\n */\n\n/* eslint no-console: [\"error\", { allow: [\"info\", \"warn\", \"error\"] }] */\n/* eslint no-param-reassign: [\"error\", { \"props\": false }] */\n/* eslint spaced-comment: [\"error\", \"always\", { \"exceptions\": [\"*\"] }] */\n\nimport { mergeConfig } from '@/config';\n\nexport default {\n /***********************************************************************\n *\n * Recorder State Mutations\n *\n **********************************************************************/\n\n /**\n * true if recorder seems to be muted\n */\n setIsMicMuted(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsMicMuted status not boolean', bool);\n return;\n }\n if (state.config.recorder.useAutoMuteDetect) {\n state.recState.isMicMuted = bool;\n }\n },\n /**\n * set to true if mic if sound from mic is not loud enough\n */\n setIsMicQuiet(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsMicQuiet status not boolean', bool);\n return;\n }\n state.recState.isMicQuiet = bool;\n },\n /**\n * set to true while speech conversation is going\n */\n setIsConversationGoing(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsConversationGoing status not boolean', bool);\n return;\n }\n state.recState.isConversationGoing = bool;\n },\n /**\n * Signals recorder to start and sets recoding state to true\n */\n startRecording(state, recorder) {\n console.info('start recording');\n if (state.recState.isRecording === false) {\n recorder.start();\n state.recState.isRecording = true;\n }\n },\n /**\n * Set recording state to false\n */\n stopRecording(state, recorder) {\n if (state.recState.isRecording === true) {\n state.recState.isRecording = false;\n if (recorder.isRecording) {\n recorder.stop();\n }\n }\n },\n /**\n * Increase consecutive silent recordings count\n * This is used to bail out from the conversation\n * when too many recordings are silent\n */\n increaseSilentRecordingCount(state) {\n state.recState.silentRecordingCount += 1;\n },\n /**\n * Reset the number of consecutive silent recordings\n */\n resetSilentRecordingCount(state) {\n state.recState.silentRecordingCount = 0;\n },\n /**\n * Set to true if audio recording should be enabled\n */\n setIsRecorderEnabled(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsRecorderEnabled status not boolean', bool);\n return;\n }\n state.recState.isRecorderEnabled = bool;\n },\n /**\n * Set to true if audio recording is supported\n */\n setIsRecorderSupported(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsRecorderSupported status not boolean', bool);\n return;\n }\n state.recState.isRecorderSupported = bool;\n },\n\n /***********************************************************************\n *\n * Bot Audio Mutations\n *\n **********************************************************************/\n\n /**\n * set to true while audio from Lex is playing\n */\n setIsBotSpeaking(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsBotSpeaking status not boolean', bool);\n return;\n }\n state.botAudio.isSpeaking = bool;\n },\n /**\n * Set to true when the Lex audio is ready to autoplay\n * after it has already played audio on user interaction (click)\n */\n setAudioAutoPlay(state, { audio, status }) {\n if (typeof status !== 'boolean') {\n console.error('setAudioAutoPlay status not boolean', status);\n return;\n }\n state.botAudio.autoPlay = status;\n audio.autoplay = status;\n },\n /**\n * set to true if bot playback can be interrupted\n */\n setCanInterruptBotPlayback(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setCanInterruptBotPlayback status not boolean', bool);\n return;\n }\n state.botAudio.canInterrupt = bool;\n },\n /**\n * set to true if bot playback is being interrupted\n */\n setIsBotPlaybackInterrupting(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsBotPlaybackInterrupting status not boolean', bool);\n return;\n }\n state.botAudio.isInterrupting = bool;\n },\n /**\n * used to set the setInterval Id for bot playback interruption\n */\n setBotPlaybackInterruptIntervalId(state, id) {\n if (typeof id !== 'number') {\n console.error('setIsBotPlaybackInterruptIntervalId id is not a number', id);\n return;\n }\n state.botAudio.interruptIntervalId = id;\n },\n\n /***********************************************************************\n *\n * Lex and Polly Mutations\n *\n **********************************************************************/\n\n /**\n * Updates Lex State from Lex responses\n */\n updateLexState(state, lexState) {\n state.lex = { ...state.lex, ...lexState };\n },\n /**\n * Sets the Lex session attributes\n */\n setLexSessionAttributes(state, sessionAttributes) {\n if (typeof sessionAttributes !== 'object') {\n console.error('sessionAttributes is not an object', sessionAttributes);\n return;\n }\n state.lex.sessionAttributes = sessionAttributes;\n },\n /**\n * set to true while calling lexPost{Text,Content}\n * to mark as processing\n */\n setIsLexProcessing(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsLexProcessing status not boolean', bool);\n return;\n }\n state.lex.isProcessing = bool;\n },\n /**\n * set to true if lex is being interrupted while speaking\n */\n setIsLexInterrupting(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsLexInterrupting status not boolean', bool);\n return;\n }\n state.lex.isInterrupting = bool;\n },\n /**\n * Set the supported content types to be used with Lex/Polly\n */\n setAudioContentType(state, type) {\n switch (type) {\n case 'mp3':\n case 'mpg':\n case 'mpeg':\n state.polly.outputFormat = 'mp3';\n state.lex.acceptFormat = 'audio/mpeg';\n break;\n case 'ogg':\n case 'ogg_vorbis':\n case 'x-cbr-opus-with-preamble':\n default:\n state.polly.outputFormat = 'ogg_vorbis';\n state.lex.acceptFormat = 'audio/ogg';\n break;\n }\n },\n /**\n * Set the Polly voice to be used by the client\n */\n setPollyVoiceId(state, voiceId) {\n if (typeof voiceId !== 'string') {\n console.error('polly voiceId is not a string', voiceId);\n return;\n }\n state.polly.voiceId = voiceId;\n },\n\n /***********************************************************************\n *\n * UI and General Mutations\n *\n **********************************************************************/\n\n /**\n * Merges the general config of the web ui\n * with a dynamic config param and merges it with\n * the existing config (e.g. initialized from ../config)\n */\n mergeConfig(state, config) {\n if (typeof config !== 'object') {\n console.error('config is not an object', config);\n return;\n }\n\n // security: do not accept dynamic parentOrigin\n const parentOrigin = (\n state.config && state.config.ui &&\n state.config.ui.parentOrigin\n ) ?\n state.config.ui.parentOrigin :\n config.ui.parentOrigin || window.location.origin;\n const configFiltered = {\n ...config,\n ...{ ui: { ...config.ui, parentOrigin } },\n };\n if (state.config && state.config.ui && state.config.ui.parentOrigin &&\n config.ui && config.ui.parentOrigin &&\n config.ui.parentOrigin !== state.config.ui.parentOrigin\n ) {\n console.warn('ignoring parentOrigin in config: ', config.ui.parentOrigin);\n }\n state.config = mergeConfig(state.config, configFiltered);\n },\n /**\n * Set to true if running embedded in an iframe\n */\n setIsRunningEmbedded(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsRunningEmbedded status not boolean', bool);\n return;\n }\n state.isRunningEmbedded = bool;\n },\n /**\n * used to track the expand/minimize status of the window when\n * running embedded in an iframe\n */\n toggleIsUiMinimized(state) {\n state.isUiMinimized = !state.isUiMinimized;\n },\n /**\n * Push new message into messages array\n */\n pushMessage(state, message) {\n state.messages.push({\n id: state.messages.length,\n ...message,\n });\n },\n /**\n * Set the AWS credentials provider\n */\n setAwsCredsProvider(state, provider) {\n state.awsCreds.provider = provider;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/mutations.js","/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\n\n/**\n * Asynchronous store actions\n */\n\n/* eslint no-console: [\"error\", { allow: [\"info\", \"warn\", \"error\"] }] */\n/* eslint spaced-comment: [\"error\", \"always\", { \"exceptions\": [\"*\"] }] */\n\nimport LexAudioRecorder from '@/lib/lex/recorder';\nimport initRecorderHandlers from '@/store/recorder-handlers';\nimport silentOgg from '@/assets/silent.ogg';\nimport silentMp3 from '@/assets/silent.mp3';\n\nimport LexClient from '@/lib/lex/client';\n\n// non-state variables that may be mutated outside of store\n// set via initializers at run time\nlet awsCredentials;\nlet pollyClient;\nlet lexClient;\nlet audio;\nlet recorder;\n\nexport default {\n\n /***********************************************************************\n *\n * Initialization Actions\n *\n **********************************************************************/\n\n initCredentials(context, credentials) {\n switch (context.state.awsCreds.provider) {\n case 'cognito':\n awsCredentials = credentials;\n return context.dispatch('getCredentials');\n case 'parentWindow':\n return context.dispatch('getCredentials');\n default:\n return Promise.reject('unknown credential provider');\n }\n },\n getConfigFromParent(context) {\n if (!context.state.isRunningEmbedded) {\n return Promise.resolve({});\n }\n\n return context.dispatch('sendMessageToParentWindow',\n { event: 'initIframeConfig' },\n )\n .then((configResponse) => {\n if (configResponse.event === 'resolve' &&\n configResponse.type === 'initIframeConfig') {\n return Promise.resolve(configResponse.data);\n }\n return Promise.reject('invalid config event from parent');\n });\n },\n initConfig(context, configObj) {\n context.commit('mergeConfig', configObj);\n },\n initMessageList(context) {\n context.commit('pushMessage', {\n type: 'bot',\n text: context.state.config.lex.initialText,\n });\n },\n initLexClient(context, lexRuntimeClient) {\n lexClient = new LexClient({\n botName: context.state.config.lex.botName,\n botAlias: context.state.config.lex.botAlias,\n lexRuntimeClient,\n });\n\n context.commit('setLexSessionAttributes',\n context.state.config.lex.sessionAttributes,\n );\n return context.dispatch('getCredentials')\n .then(() => {\n lexClient.initCredentials(\n awsCredentials,\n );\n });\n },\n initPollyClient(context, client) {\n if (!context.state.recState.isRecorderEnabled) {\n return Promise.resolve();\n }\n pollyClient = client;\n context.commit('setPollyVoiceId', context.state.config.polly.voiceId);\n return context.dispatch('getCredentials')\n .then((creds) => {\n pollyClient.config.credentials = creds;\n });\n },\n initRecorder(context) {\n if (!context.state.recState.isRecorderEnabled) {\n return Promise.resolve();\n }\n recorder = new LexAudioRecorder(\n context.state.config.recorder,\n );\n\n return recorder.init()\n .then(() => recorder.initOptions(context.state.config.recorder))\n .then(() => initRecorderHandlers(context, recorder))\n .then(() => context.commit('setIsRecorderSupported', true))\n .then(() => context.commit('setIsMicMuted', recorder.isMicMuted))\n .catch((error) => {\n if (['PermissionDeniedError', 'NotAllowedError'].indexOf(error.name)\n >= 0) {\n console.warn('get user media permission denied');\n context.dispatch('pushErrorMessage',\n 'It seems like the microphone access has been denied. ' +\n 'If you want to use voice, please allow mic usage in your browser.',\n );\n } else {\n console.error('error while initRecorder', error);\n }\n });\n },\n initBotAudio(context, audioElement) {\n if (!context.state.recState.isRecorderEnabled) {\n return;\n }\n audio = audioElement;\n\n let silentSound;\n\n // Ogg is the preferred format as it seems to be generally smaller.\n // Detect if ogg is supported (MS Edge doesn't).\n // Can't default to mp3 as it is not supported by some Android browsers\n if (audio.canPlayType('audio/ogg') !== '') {\n context.commit('setAudioContentType', 'ogg');\n silentSound = silentOgg;\n } else if (audio.canPlayType('audio/mp3') !== '') {\n context.commit('setAudioContentType', 'mp3');\n silentSound = silentMp3;\n } else {\n console.error('init audio could not find supportted audio type');\n console.warn('init audio can play mp3 [%s]',\n audio.canPlayType('audio/mp3'));\n console.warn('init audio can play ogg [%s]',\n audio.canPlayType('audio/ogg'));\n }\n\n console.info('recorder content types: %s',\n recorder.mimeType,\n );\n\n audio.preload = 'auto';\n // Load a silent sound as the initial audio. This is used to workaround\n // the requirement of mobile browsers that would only play a\n // sound in direct response to a user action (e.g. click).\n // This audio should be explicitly played as a response to a click\n // in the UI\n audio.src = silentSound;\n // autoplay will be set as a response to a clik\n audio.autoplay = false;\n },\n reInitBot(context) {\n return Promise.resolve()\n .then(() => (\n (context.state.config.ui.pushInitialTextOnRestart) ?\n context.dispatch('pushMessage', {\n text: context.state.config.lex.initialText,\n type: 'bot',\n }) :\n Promise.resolve()\n ))\n .then(() => (\n (context.state.config.lex.reInitSessionAttributesOnRestart) ?\n context.commit('setLexSessionAttributes',\n context.state.config.lex.sessionAttributes,\n ) :\n Promise.resolve()\n ));\n },\n\n /***********************************************************************\n *\n * Audio Actions\n *\n **********************************************************************/\n\n getAudioUrl(context, blob) {\n let url;\n\n try {\n url = URL.createObjectURL(blob);\n } catch (error) {\n console.error('getAudioUrl createObjectURL error', error);\n return Promise.reject(\n `There was an error processing the audio response (${error})`,\n );\n }\n\n return Promise.resolve(url);\n },\n setAudioAutoPlay(context) {\n if (audio.autoplay) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n audio.play();\n // eslint-disable-next-line no-param-reassign\n audio.onended = () => {\n context.commit('setAudioAutoPlay', { audio, status: true });\n resolve();\n };\n // eslint-disable-next-line no-param-reassign\n audio.onerror = (err) => {\n context.commit('setAudioAutoPlay', { audio, status: false });\n reject(`setting audio autoplay failed: ${err}`);\n };\n });\n },\n playAudio(context, url) {\n return new Promise((resolve) => {\n audio.onloadedmetadata = () => {\n context.commit('setIsBotSpeaking', true);\n context.dispatch('playAudioHandler')\n .then(() => resolve());\n };\n audio.src = url;\n });\n },\n playAudioHandler(context) {\n return new Promise((resolve, reject) => {\n const { enablePlaybackInterrupt } = context.state.config.lex;\n\n const clearPlayback = () => {\n context.commit('setIsBotSpeaking', false);\n const intervalId = context.state.botAudio.interruptIntervalId;\n if (intervalId && enablePlaybackInterrupt) {\n clearInterval(intervalId);\n context.commit('setBotPlaybackInterruptIntervalId', 0);\n context.commit('setIsLexInterrupting', false);\n context.commit('setCanInterruptBotPlayback', false);\n context.commit('setIsBotPlaybackInterrupting', false);\n }\n };\n\n audio.onerror = (error) => {\n clearPlayback();\n reject(`There was an error playing the response (${error})`);\n };\n audio.onended = () => {\n clearPlayback();\n resolve();\n };\n audio.onpause = audio.onended;\n\n if (enablePlaybackInterrupt) {\n context.dispatch('playAudioInterruptHandler');\n }\n });\n },\n playAudioInterruptHandler(context) {\n const { isSpeaking } = context.state.botAudio;\n const {\n enablePlaybackInterrupt,\n playbackInterruptMinDuration,\n playbackInterruptVolumeThreshold,\n playbackInterruptLevelThreshold,\n playbackInterruptNoiseThreshold,\n } = context.state.config.lex;\n const intervalTimeInMs = 200;\n\n if (!enablePlaybackInterrupt &&\n !isSpeaking &&\n context.state.lex.isInterrupting &&\n audio.duration < playbackInterruptMinDuration\n ) {\n return;\n }\n\n const intervalId = setInterval(() => {\n const duration = audio.duration;\n const end = audio.played.end(0);\n const { canInterrupt } = context.state.botAudio;\n\n if (!canInterrupt &&\n // allow to be interrupt free in the beginning\n end > playbackInterruptMinDuration &&\n // don't interrupt towards the end\n (duration - end) > 0.5 &&\n // only interrupt if the volume seems to be low noise\n recorder.volume.max < playbackInterruptNoiseThreshold\n ) {\n context.commit('setCanInterruptBotPlayback', true);\n } else if (canInterrupt && (duration - end) < 0.5) {\n context.commit('setCanInterruptBotPlayback', false);\n }\n\n if (canInterrupt &&\n recorder.volume.max > playbackInterruptVolumeThreshold &&\n recorder.volume.slow > playbackInterruptLevelThreshold\n ) {\n clearInterval(intervalId);\n context.commit('setIsBotPlaybackInterrupting', true);\n setTimeout(() => {\n audio.pause();\n }, 500);\n }\n }, intervalTimeInMs);\n\n context.commit('setBotPlaybackInterruptIntervalId', intervalId);\n },\n\n /***********************************************************************\n *\n * Recorder Actions\n *\n **********************************************************************/\n\n startConversation(context) {\n context.commit('setIsConversationGoing', true);\n return context.dispatch('startRecording');\n },\n stopConversation(context) {\n context.commit('setIsConversationGoing', false);\n },\n startRecording(context) {\n // don't record if muted\n if (context.state.recState.isMicMuted === true) {\n console.warn('recording while muted');\n context.dispatch('stopConversation');\n return Promise.reject('The microphone seems to be muted.');\n }\n\n context.commit('startRecording', recorder);\n return Promise.resolve();\n },\n stopRecording(context) {\n context.commit('stopRecording', recorder);\n },\n getRecorderVolume(context) {\n if (!context.state.recState.isRecorderEnabled) {\n return Promise.resolve();\n }\n return recorder.volume;\n },\n\n /***********************************************************************\n *\n * Lex and Polly Actions\n *\n **********************************************************************/\n\n pollyGetBlob(context, text) {\n const synthReq = pollyClient.synthesizeSpeech({\n Text: text,\n VoiceId: context.state.polly.voiceId,\n OutputFormat: context.state.polly.outputFormat,\n });\n return context.dispatch('getCredentials')\n .then(() => synthReq.promise())\n .then(data =>\n Promise.resolve(\n new Blob(\n [data.AudioStream], { type: data.ContentType },\n ),\n ),\n );\n },\n pollySynthesizeSpeech(context, text) {\n return context.dispatch('pollyGetBlob', text)\n .then(blob => context.dispatch('getAudioUrl', blob))\n .then(audioUrl => context.dispatch('playAudio', audioUrl));\n },\n interruptSpeechConversation(context) {\n if (!context.state.recState.isConversationGoing) {\n return Promise.resolve();\n }\n\n return new Promise((resolve, reject) => {\n context.dispatch('stopConversation')\n .then(() => context.dispatch('stopRecording'))\n .then(() => {\n if (context.state.botAudio.isSpeaking) {\n audio.pause();\n }\n })\n .then(() => {\n let count = 0;\n const countMax = 20;\n const intervalTimeInMs = 250;\n context.commit('setIsLexInterrupting', true);\n const intervalId = setInterval(() => {\n if (!context.state.lex.isProcessing) {\n clearInterval(intervalId);\n context.commit('setIsLexInterrupting', false);\n resolve();\n }\n if (count > countMax) {\n clearInterval(intervalId);\n context.commit('setIsLexInterrupting', false);\n reject('interrupt interval exceeded');\n }\n count += 1;\n }, intervalTimeInMs);\n });\n });\n },\n postTextMessage(context, message) {\n context.dispatch('interruptSpeechConversation')\n .then(() => context.dispatch('pushMessage', message))\n .then(() => context.dispatch('lexPostText', message.text))\n .then(response => context.dispatch('pushMessage',\n {\n text: response.message,\n type: 'bot',\n dialogState: context.state.lex.dialogState,\n responseCard: context.state.lex.responseCard,\n },\n ))\n .then(() => {\n if (context.state.lex.dialogState === 'Fulfilled') {\n context.dispatch('reInitBot');\n }\n })\n .catch((error) => {\n console.error('error in postTextMessage', error);\n context.dispatch('pushErrorMessage',\n `I was unable to process your message. ${error}`,\n );\n });\n },\n lexPostText(context, text) {\n context.commit('setIsLexProcessing', true);\n return context.dispatch('getCredentials')\n .then(() =>\n lexClient.postText(text, context.state.lex.sessionAttributes),\n )\n .then((data) => {\n context.commit('setIsLexProcessing', false);\n return context.dispatch('updateLexState', data)\n .then(() => Promise.resolve(data));\n });\n },\n lexPostContent(context, audioBlob, offset = 0) {\n context.commit('setIsLexProcessing', true);\n console.info('audio blob size:', audioBlob.size);\n let timeStart;\n\n return context.dispatch('getCredentials')\n .then(() => {\n timeStart = performance.now();\n return lexClient.postContent(\n audioBlob,\n context.state.lex.sessionAttributes,\n context.state.lex.acceptFormat,\n offset,\n );\n })\n .then((lexResponse) => {\n const timeEnd = performance.now();\n console.info('lex postContent processing time:',\n ((timeEnd - timeStart) / 1000).toFixed(2),\n );\n context.commit('setIsLexProcessing', false);\n return context.dispatch('updateLexState', lexResponse)\n .then(() =>\n context.dispatch('processLexContentResponse', lexResponse),\n )\n .then(blob => Promise.resolve(blob));\n });\n },\n processLexContentResponse(context, lexData) {\n const { audioStream, contentType, dialogState } = lexData;\n\n return Promise.resolve()\n .then(() => {\n if (!audioStream || !audioStream.length) {\n const text = (dialogState === 'ReadyForFulfillment') ?\n 'All done' :\n 'There was an error';\n return context.dispatch('pollyGetBlob', text);\n }\n\n return Promise.resolve(\n new Blob([audioStream], { type: contentType }),\n );\n });\n },\n updateLexState(context, lexState) {\n const lexStateDefault = {\n dialogState: '',\n inputTranscript: '',\n intentName: '',\n message: '',\n responseCard: null,\n sessionAttributes: {},\n slotToElicit: '',\n slots: {},\n };\n // simulate response card in sessionAttributes\n // used mainly for postContent which doesn't support response cards\n if ('sessionAttributes' in lexState &&\n 'appContext' in lexState.sessionAttributes\n ) {\n try {\n const appContext = JSON.parse(lexState.sessionAttributes.appContext);\n if ('responseCard' in appContext) {\n lexStateDefault.responseCard =\n appContext.responseCard;\n }\n } catch (e) {\n return Promise.reject('error parsing appContext in sessionAttributes');\n }\n }\n context.commit('updateLexState', { ...lexStateDefault, ...lexState });\n if (context.state.isRunningEmbedded) {\n context.dispatch('sendMessageToParentWindow',\n { event: 'updateLexState', state: context.state.lex },\n );\n }\n return Promise.resolve();\n },\n\n /***********************************************************************\n *\n * Message List Actions\n *\n **********************************************************************/\n\n pushMessage(context, message) {\n context.commit('pushMessage', message);\n },\n pushErrorMessage(context, text, dialogState = 'Failed') {\n context.commit('pushMessage', {\n type: 'bot',\n text,\n dialogState,\n });\n },\n\n /***********************************************************************\n *\n * Credentials Actions\n *\n **********************************************************************/\n\n getCredentialsFromParent(context) {\n const credsExpirationDate = new Date(\n (awsCredentials && awsCredentials.expireTime) ?\n awsCredentials.expireTime :\n 0,\n );\n const now = Date.now();\n if (credsExpirationDate > now) {\n return Promise.resolve(awsCredentials);\n }\n return context.dispatch('sendMessageToParentWindow', { event: 'getCredentials' })\n .then((credsResponse) => {\n if (credsResponse.event === 'resolve' &&\n credsResponse.type === 'getCredentials') {\n return Promise.resolve(credsResponse.data);\n }\n return Promise.reject('invalid credential event from parent');\n })\n .then((creds) => {\n const { AccessKeyId, SecretKey, SessionToken } = creds.data.Credentials;\n const IdentityId = creds.data.IdentityId;\n // recreate as a static credential\n awsCredentials = {\n accessKeyId: AccessKeyId,\n secretAccessKey: SecretKey,\n sessionToken: SessionToken,\n identityId: IdentityId,\n getPromise() { return Promise.resolve(); },\n };\n\n return awsCredentials;\n });\n },\n getCredentials(context) {\n if (context.state.awsCreds.provider === 'parentWindow') {\n return context.dispatch('getCredentialsFromParent');\n }\n return awsCredentials.getPromise()\n .then(() => awsCredentials);\n },\n\n /***********************************************************************\n *\n * UI and Parent Communication Actions\n *\n **********************************************************************/\n\n toggleIsUiMinimized(context) {\n context.commit('toggleIsUiMinimized');\n return context.dispatch(\n 'sendMessageToParentWindow',\n { event: 'toggleMinimizeUi' },\n );\n },\n sendMessageToParentWindow(context, message) {\n if (!context.state.isRunningEmbedded) {\n const error = 'sendMessage called when not running embedded';\n console.warn(error);\n return Promise.reject(error);\n }\n\n return new Promise((resolve, reject) => {\n const messageChannel = new MessageChannel();\n messageChannel.port1.onmessage = (evt) => {\n messageChannel.port1.close();\n messageChannel.port2.close();\n if (evt.data.event === 'resolve') {\n resolve(evt.data);\n } else {\n reject(`error in sendMessageToParentWindow ${evt.data.error}`);\n }\n };\n parent.postMessage(message,\n context.state.config.ui.parentOrigin, [messageChannel.port2]);\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/actions.js","/*\n Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Licensed under the Amazon Software License (the \"License\"). You may not use this file\n except in compliance with the License. A copy of the License is located at\n\n http://aws.amazon.com/asl/\n\n or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\n BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\n License for the specific language governing permissions and limitations under the License.\n */\n\n/* eslint no-console: [\"error\", { allow: [\"info\", \"warn\", \"error\"] }] */\n/* global AudioContext CustomEvent document Event navigator window */\n\n// XXX do we need webrtc-adapter?\n// XXX npm uninstall it after testing\n// XXX import 'webrtc-adapter';\n\n// wav encoder worker - uses webpack worker loader\nimport WavWorker from './wav-worker';\n\n/**\n * Lex Recorder Module\n * Based on Recorderjs. It sort of mimics the MediaRecorder API.\n * @see {@link https://github.com/mattdiamond/Recorderjs}\n * @see {@https://github.com/chris-rudmin/Recorderjs}\n * @see {@https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder}\n */\n\n/**\n * Class for Lex audio recording management.\n *\n * This class is used for microphone initialization and recording\n * management. It encodes the mic input into wav format.\n * It also monitors the audio input stream (e.g keeping track of volume)\n * filtered around human voice speech frequencies to look for silence\n */\nexport default class {\n /* eslint no-underscore-dangle: [\"error\", { \"allowAfterThis\": true }] */\n\n /**\n * Constructs the recorder object\n *\n * @param {object} - options object\n *\n * @param {string} options.mimeType - Mime type to use on recording.\n * Only 'audio/wav' is supported for now. Default: 'aduio/wav'.\n *\n * @param {boolean} options.autoStopRecording - Controls if the recording\n * should automatically stop on silence detection. Default: true.\n *\n * @param {number} options.recordingTimeMax - Maximum recording time in\n * seconds. Recording will stop after going for this long. Default: 8.\n *\n * @param {number} options.recordingTimeMin - Minimum recording time in\n * seconds. Used before evaluating if the line is quiet to allow initial\n * pauses before speech. Default: 2.\n *\n * @param {boolean} options.recordingTimeMinAutoIncrease - Controls if the\n * recordingTimeMin should be automatically increased (exponentially)\n * based on the number of consecutive silent recordings.\n * Default: true.\n *\n * @param {number} options.quietThreshold - Threshold of mic input level\n * to consider quiet. Used to determine pauses in input this is measured\n * using the \"slow\" mic volume. Default: 0.001.\n *\n * @param {number} options.quietTimeMin - Minimum mic quiet time (normally in\n * fractions of a second) before automatically stopping the recording when\n * autoStopRecording is true. In reality it takes a bit more time than this\n * value given that the slow volume value is a decay. Reasonable times seem\n * to be between 0.2 and 0.5. Default: 0.4.\n *\n * @param {number} options.volumeThreshold - Threshold of mic db level\n * to consider quiet. Used to determine pauses in input this is measured\n * using the \"max\" mic volume. Smaller values make the recorder auto stop\n * faster. Default: -75\n *\n * @param {bool} options.useBandPass - Controls if a band pass filter is used\n * for the microphone input. If true, the input is passed through a second\n * order bandpass filter using AudioContext.createBiquadFilter:\n * https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createBiquadFilter\n * The bandpass filter helps to reduce noise, improve silence detection and\n * produce smaller audio blobs. However, it may produce audio with lower\n * fidelity. Default: true\n *\n * @param {number} options.bandPassFrequency - Frequency of bandpass filter in\n * Hz. Mic input is passed through a second order bandpass filter to remove\n * noise and improve quality/speech silence detection. Reasonable values\n * should be around 3000 - 5000. Default: 4000.\n *\n * @param {number} options.bandPassQ - Q factor of bandpass filter.\n * The higher the vaue, the narrower the pass band and steeper roll off.\n * Reasonable values should be between 0.5 and 1.5. Default: 0.707\n *\n * @param {number} options.bufferLength - Length of buffer used in audio\n * processor. Should be in powers of two between 512 to 8196. Passed to\n * script processor and audio encoder. Lower values have lower latency.\n * Default: 2048.\n *\n * @param {number} options.numChannels- Number of channels to record.\n * Default: 1 (mono).\n *\n * @param {number} options.requestEchoCancellation - Request to use echo\n * cancellation in the getUserMedia call:\n * https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/echoCancellation\n * Default: true.\n *\n * @param {bool} options.useAutoMuteDetect - Controls if the recorder utilizes\n * automatic mute detection.\n * Default: true.\n *\n * @param {number} options.muteThreshold - Threshold level when mute values\n * are detected when useAutoMuteDetect is enabled. The higher the faster\n * it reports the mic to be in a muted state but may cause it to flap\n * between mute/unmute. The lower the values the slower it is to report\n * the mic as mute. Too low of a value may cause it to never report the\n * line as muted. Works in conjuction with options.quietTreshold.\n * Reasonable values seem to be between: 1e-5 and 1e-8. Default: 1e-7.\n *\n * @param {bool} options.encoderUseTrim - Controls if the encoder should\n * attempt to trim quiet samples from the beginning and end of the buffer\n * Default: true.\n *\n * @param {number} options.encoderQuietTrimThreshold - Threshold when quiet\n * levels are detected. Only applicable when encoderUseTrim is enabled. The\n * encoder will trim samples below this value at the beginnig and end of the\n * buffer. Lower value trim less silence resulting in larger WAV files.\n * Reasonable values seem to be between 0.005 and 0.0005. Default: 0.0008.\n *\n * @param {number} options.encoderQuietTrimSlackBack - How many samples to\n * add back to the encoded buffer before/after the\n * encoderQuietTrimThreshold. Higher values trim less silence resulting in\n * larger WAV files.\n * Reasonable values seem to be between 3500 and 5000. Default: 4000.\n */\n constructor(options = {}) {\n this.initOptions(options);\n\n // event handler used for events similar to MediaRecorder API (e.g. onmute)\n this._eventTarget = document.createDocumentFragment();\n\n // encoder worker\n this._encoderWorker = new WavWorker();\n\n // worker uses this event listener to signal back\n // when wav has finished encoding\n this._encoderWorker.addEventListener('message',\n evt => this._exportWav(evt.data),\n );\n }\n\n /**\n * Initialize general recorder options\n *\n * @param {object} options - object with various options controlling the\n * recorder behavior. See the constructor for details.\n */\n initOptions(options = {}) {\n // TODO break this into functions, avoid side-effects, break into this.options.*\n if (options.preset) {\n Object.assign(options, this._getPresetOptions(options.preset));\n }\n\n this.mimeType = options.mimeType || 'audio/wav';\n\n this.recordingTimeMax = options.recordingTimeMax || 8;\n this.recordingTimeMin = options.recordingTimeMin || 2;\n this.recordingTimeMinAutoIncrease =\n (typeof options.recordingTimeMinAutoIncrease !== 'undefined') ?\n !!options.recordingTimeMinAutoIncrease :\n true;\n\n // speech detection configuration\n this.autoStopRecording =\n (typeof options.autoStopRecording !== 'undefined') ?\n !!options.autoStopRecording :\n true;\n this.quietThreshold = options.quietThreshold || 0.001;\n this.quietTimeMin = options.quietTimeMin || 0.4;\n this.volumeThreshold = options.volumeThreshold || -75;\n\n // band pass configuration\n this.useBandPass =\n (typeof options.useBandPass !== 'undefined') ?\n !!options.useBandPass :\n true;\n // https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode\n this.bandPassFrequency = options.bandPassFrequency || 4000;\n // Butterworth 0.707 [sqrt(1/2)] | Chebyshev < 1.414\n this.bandPassQ = options.bandPassQ || 0.707;\n\n // parameters passed to script processor and also used in encoder\n // https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createScriptProcessor\n this.bufferLength = options.bufferLength || 2048;\n this.numChannels = options.numChannels || 1;\n\n this.requestEchoCancellation =\n (typeof options.requestEchoCancellation !== 'undefined') ?\n !!options.requestEchoCancellation :\n true;\n\n // automatic mute detection options\n this.useAutoMuteDetect =\n (typeof options.useAutoMuteDetect !== 'undefined') ?\n !!options.useAutoMuteDetect :\n true;\n this.muteThreshold = options.muteThreshold || 1e-7;\n\n // encoder options\n this.encoderUseTrim =\n (typeof options.encoderUseTrim !== 'undefined') ?\n !!options.encoderUseTrim :\n true;\n this.encoderQuietTrimThreshold =\n options.encoderQuietTrimThreshold || 0.0008;\n this.encoderQuietTrimSlackBack = options.encoderQuietTrimSlackBack || 4000;\n }\n\n _getPresetOptions(preset = 'low_latency') {\n this._presets = ['low_latency', 'speech_recognition'];\n\n if (this._presets.indexOf(preset) === -1) {\n console.error('invalid preset');\n return {};\n }\n\n const presets = {\n low_latency: {\n encoderUseTrim: true,\n useBandPass: true,\n },\n speech_recognition: {\n encoderUseTrim: false,\n useBandPass: false,\n useAutoMuteDetect: false,\n },\n };\n\n return presets[preset];\n }\n\n /**\n * General init. This function should be called to initialize the recorder.\n *\n * @param {object} options - Optional parameter to reinitialize the\n * recorder behavior. See the constructor for details.\n *\n * @return {Promise} - Returns a promise that resolves when the recorder is\n * ready.\n */\n init() {\n this._state = 'inactive';\n\n this._instant = 0.0;\n this._slow = 0.0;\n this._clip = 0.0;\n this._maxVolume = -Infinity;\n\n this._isMicQuiet = true;\n this._isMicMuted = false;\n\n this._isSilentRecording = true;\n this._silentRecordingConsecutiveCount = 0;\n\n // sets this._audioContext AudioContext object\n return this._initAudioContext()\n .then(() =>\n // inits AudioContext.createScriptProcessor object\n // used to process mic audio input volume\n // sets this._micVolumeProcessor\n this._initMicVolumeProcessor(),\n )\n .then(() =>\n this._initStream(),\n );\n }\n\n /**\n * Start recording\n */\n start() {\n if (this._state !== 'inactive' ||\n typeof this._stream === 'undefined') {\n console.warn('recorder start called out of state');\n return;\n }\n\n this._state = 'recording';\n\n this._recordingStartTime = this._audioContext.currentTime;\n this._eventTarget.dispatchEvent(new Event('start'));\n\n this._encoderWorker.postMessage({\n command: 'init',\n config: {\n sampleRate: this._audioContext.sampleRate,\n numChannels: this.numChannels,\n useTrim: this.encoderUseTrim,\n quietTrimThreshold: this.encoderQuietTrimThreshold,\n quietTrimSlackBack: this.encoderQuietTrimSlackBack,\n },\n });\n }\n\n /**\n * Stop recording\n */\n stop() {\n if (this._state !== 'recording') {\n console.warn('recorder stop called out of state');\n return;\n }\n\n if (this._recordingStartTime > this._quietStartTime) {\n this._isSilentRecording = true;\n this._silentRecordingConsecutiveCount += 1;\n this._eventTarget.dispatchEvent(new Event('silentrecording'));\n } else {\n this._isSilentRecording = false;\n this._silentRecordingConsecutiveCount = 0;\n this._eventTarget.dispatchEvent(new Event('unsilentrecording'));\n }\n\n this._state = 'inactive';\n this._recordingStartTime = 0;\n\n this._encoderWorker.postMessage({\n command: 'exportWav',\n type: 'audio/wav',\n });\n\n this._eventTarget.dispatchEvent(new Event('stop'));\n }\n\n _exportWav(evt) {\n this._eventTarget.dispatchEvent(\n new CustomEvent('dataavailable', { detail: evt.data }),\n );\n this._encoderWorker.postMessage({ command: 'clear' });\n }\n\n _recordBuffers(inputBuffer) {\n if (this._state !== 'recording') {\n console.warn('recorder _recordBuffers called out of state');\n return;\n }\n const buffer = [];\n for (let i = 0; i < inputBuffer.numberOfChannels; i++) {\n buffer[i] = inputBuffer.getChannelData(i);\n }\n\n this._encoderWorker.postMessage({\n command: 'record',\n buffer,\n });\n }\n\n _setIsMicMuted() {\n if (!this.useAutoMuteDetect) {\n return;\n }\n // TODO incorporate _maxVolume\n if (this._instant >= this.muteThreshold) {\n if (this._isMicMuted) {\n this._isMicMuted = false;\n this._eventTarget.dispatchEvent(new Event('unmute'));\n }\n return;\n }\n\n if (!this._isMicMuted && (this._slow < this.muteThreshold)) {\n this._isMicMuted = true;\n this._eventTarget.dispatchEvent(new Event('mute'));\n console.info('mute - instant: %s - slow: %s - track muted: %s',\n this._instant, this._slow, this._tracks[0].muted,\n );\n\n if (this._state === 'recording') {\n this.stop();\n console.info('stopped recording on _setIsMicMuted');\n }\n }\n }\n\n _setIsMicQuiet() {\n const now = this._audioContext.currentTime;\n\n const isMicQuiet = (this._maxVolume < this.volumeThreshold ||\n this._slow < this.quietThreshold);\n\n // start record the time when the line goes quiet\n // fire event\n if (!this._isMicQuiet && isMicQuiet) {\n this._quietStartTime = this._audioContext.currentTime;\n this._eventTarget.dispatchEvent(new Event('quiet'));\n }\n // reset quiet timer when there's enough sound\n if (this._isMicQuiet && !isMicQuiet) {\n this._quietStartTime = 0;\n this._eventTarget.dispatchEvent(new Event('unquiet'));\n }\n this._isMicQuiet = isMicQuiet;\n\n // if autoincrease is enabled, exponentially increase the mimimun recording\n // time based on consecutive silent recordings\n const recordingTimeMin =\n (this.recordingTimeMinAutoIncrease) ?\n (this.recordingTimeMin - 1) +\n (this.recordingTimeMax **\n (1 - (1 / (this._silentRecordingConsecutiveCount + 1)))) :\n this.recordingTimeMin;\n\n // detect voice pause and stop recording\n if (this.autoStopRecording &&\n this._isMicQuiet && this._state === 'recording' &&\n // have I been recording longer than the minimum recording time?\n now - this._recordingStartTime > recordingTimeMin &&\n // has the slow sample value been below the quiet threshold longer than\n // the minimum allowed quiet time?\n now - this._quietStartTime > this.quietTimeMin\n ) {\n this.stop();\n }\n }\n\n /**\n * Initializes the AudioContext\n * Aassigs it to this._audioContext. Adds visibitily change event listener\n * to suspend the audio context when the browser tab is hidden.\n * @return {Promise} resolution of AudioContext\n */\n _initAudioContext() {\n window.AudioContext = window.AudioContext || window.webkitAudioContext;\n if (!window.AudioContext) {\n return Promise.reject('Web Audio API not supported.');\n }\n this._audioContext = new AudioContext();\n document.addEventListener('visibilitychange', () => {\n console.info('visibility change triggered in recorder. hidden:', document.hidden);\n if (document.hidden) {\n this._audioContext.suspend();\n } else {\n this._audioContext.resume();\n }\n });\n return Promise.resolve();\n }\n\n /**\n * Private initializer of the audio buffer processor\n * It manages the volume variables and sends the buffers to the worker\n * when recording.\n * Some of this came from:\n * https://webrtc.github.io/samples/src/content/getusermedia/volume/js/soundmeter.js\n */\n _initMicVolumeProcessor() {\n /* eslint no-plusplus: [\"error\", { \"allowForLoopAfterthoughts\": true }] */\n // assumes a single channel - XXX does it need to handle 2 channels?\n const processor = this._audioContext.createScriptProcessor(\n this.bufferLength,\n this.numChannels,\n this.numChannels,\n );\n processor.onaudioprocess = (evt) => {\n if (this._state === 'recording') {\n // send buffers to worker\n this._recordBuffers(evt.inputBuffer);\n\n // stop recording if over the maximum time\n if ((this._audioContext.currentTime - this._recordingStartTime)\n > this.recordingTimeMax\n ) {\n console.warn('stopped recording due to maximum time');\n this.stop();\n }\n }\n\n // XXX assumes mono channel\n const input = evt.inputBuffer.getChannelData(0);\n let sum = 0.0;\n let clipCount = 0;\n for (let i = 0; i < input.length; ++i) {\n // square to calculate signal power\n sum += input[i] * input[i];\n if (Math.abs(input[i]) > 0.99) {\n clipCount += 1;\n }\n }\n this._instant = Math.sqrt(sum / input.length);\n this._slow = (0.95 * this._slow) + (0.05 * this._instant);\n this._clip = (input.length) ? clipCount / input.length : 0;\n\n this._setIsMicMuted();\n this._setIsMicQuiet();\n\n this._analyser.getFloatFrequencyData(this._analyserData);\n this._maxVolume = Math.max(...this._analyserData);\n };\n\n this._micVolumeProcessor = processor;\n return Promise.resolve();\n }\n\n /*\n * Private initializers\n */\n\n /**\n * Sets microphone using getUserMedia\n * @return {Promise} returns a promise that resolves when the audio input\n * has been connected\n */\n _initStream() {\n // TODO obtain with navigator.mediaDevices.getSupportedConstraints()\n const constraints = {\n audio: {\n optional: [{\n echoCancellation: this.requestEchoCancellation,\n }],\n },\n };\n\n return navigator.mediaDevices.getUserMedia(constraints)\n .then((stream) => {\n this._stream = stream;\n\n this._tracks = stream.getAudioTracks();\n console.info('using media stream track labeled: ', this._tracks[0].label);\n // assumes single channel\n this._tracks[0].onmute = this._setIsMicMuted;\n this._tracks[0].onunmute = this._setIsMicMuted;\n\n const source = this._audioContext.createMediaStreamSource(stream);\n const gainNode = this._audioContext.createGain();\n const analyser = this._audioContext.createAnalyser();\n\n if (this.useBandPass) {\n // bandpass filter around human voice\n // https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode\n const biquadFilter = this._audioContext.createBiquadFilter();\n biquadFilter.type = 'bandpass';\n\n biquadFilter.frequency.value = this.bandPassFrequency;\n biquadFilter.gain.Q = this.bandPassQ;\n\n source.connect(biquadFilter);\n biquadFilter.connect(gainNode);\n analyser.smoothingTimeConstant = 0.5;\n } else {\n source.connect(gainNode);\n analyser.smoothingTimeConstant = 0.9;\n }\n analyser.fftSize = this.bufferLength;\n analyser.minDecibels = -90;\n analyser.maxDecibels = -30;\n\n gainNode.connect(analyser);\n analyser.connect(this._micVolumeProcessor);\n this._analyserData = new Float32Array(analyser.frequencyBinCount);\n this._analyser = analyser;\n\n this._micVolumeProcessor.connect(\n this._audioContext.destination,\n );\n\n this._eventTarget.dispatchEvent(new Event('streamReady'));\n });\n }\n\n /*\n * getters used to expose internal vars while avoiding issues when using with\n * a reactive store (e.g. vuex).\n */\n\n /**\n * Getter of recorder state. Based on MediaRecorder API.\n * @return {string} state of recorder (inactive | recording | paused)\n */\n get state() {\n return this._state;\n }\n\n /**\n * Getter of stream object. Based on MediaRecorder API.\n * @return {MediaStream} media stream object obtain from getUserMedia\n */\n get stream() {\n return this._stream;\n }\n\n get isMicQuiet() {\n return this._isMicQuiet;\n }\n\n get isMicMuted() {\n return this._isMicMuted;\n }\n\n get isSilentRecording() {\n return this._isSilentRecording;\n }\n\n get isRecording() {\n return (this._state === 'recording');\n }\n\n /**\n * Getter of mic volume levels.\n * instant: root mean square of levels in buffer\n * slow: time decaying level\n * clip: count of samples at the top of signals (high noise)\n */\n get volume() {\n return ({\n instant: this._instant,\n slow: this._slow,\n clip: this._clip,\n max: this._maxVolume,\n });\n }\n\n /*\n * Private initializer of event target\n * Set event handlers that mimic MediaRecorder events plus others\n */\n\n // TODO make setters replace the listener insted of adding\n set onstart(cb) {\n this._eventTarget.addEventListener('start', cb);\n }\n set onstop(cb) {\n this._eventTarget.addEventListener('stop', cb);\n }\n set ondataavailable(cb) {\n this._eventTarget.addEventListener('dataavailable', cb);\n }\n set onerror(cb) {\n this._eventTarget.addEventListener('error', cb);\n }\n set onstreamready(cb) {\n this._eventTarget.addEventListener('streamready', cb);\n }\n set onmute(cb) {\n this._eventTarget.addEventListener('mute', cb);\n }\n set onunmute(cb) {\n this._eventTarget.addEventListener('unmute', cb);\n }\n set onsilentrecording(cb) {\n this._eventTarget.addEventListener('silentrecording', cb);\n }\n set onunsilentrecording(cb) {\n this._eventTarget.addEventListener('unsilentrecording', cb);\n }\n set onquiet(cb) {\n this._eventTarget.addEventListener('quiet', cb);\n }\n set onunquiet(cb) {\n this._eventTarget.addEventListener('unquiet', cb);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib/lex/recorder.js","\"use strict\";\n\nexports.__esModule = true;\n\nvar _from = require(\"../core-js/array/from\");\n\nvar _from2 = _interopRequireDefault(_from);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return (0, _from2.default)(arr);\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/toConsumableArray.js\n// module id = 155\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/array/from\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/array/from.js\n// module id = 156\n// module chunks = 0","require('../../modules/es6.string.iterator');\nrequire('../../modules/es6.array.from');\nmodule.exports = require('../../modules/_core').Array.from;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/array/from.js\n// module id = 157\n// module chunks = 0","'use strict';\nvar ctx = require('./_ctx')\n , $export = require('./_export')\n , toObject = require('./_to-object')\n , call = require('./_iter-call')\n , isArrayIter = require('./_is-array-iter')\n , toLength = require('./_to-length')\n , createProperty = require('./_create-property')\n , getIterFn = require('./core.get-iterator-method');\n\n$export($export.S + $export.F * !require('./_iter-detect')(function(iter){ Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){\n var O = toObject(arrayLike)\n , C = typeof this == 'function' ? this : Array\n , aLen = arguments.length\n , mapfn = aLen > 1 ? arguments[1] : undefined\n , mapping = mapfn !== undefined\n , index = 0\n , iterFn = getIterFn(O)\n , length, result, step, iterator;\n if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){\n for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for(result = new C(length); length > index; index++){\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.array.from.js\n// module id = 158\n// module chunks = 0","'use strict';\nvar $defineProperty = require('./_object-dp')\n , createDesc = require('./_property-desc');\n\nmodule.exports = function(object, index, value){\n if(index in object)$defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_create-property.js\n// module id = 159\n// module chunks = 0","module.exports = function() {\n\treturn require(\"!!C:\\\\Users\\\\oatoa\\\\Desktop\\\\ProServ\\\\Projects\\\\AHA\\\\aws-lex-web-ui\\\\lex-web-ui\\\\node_modules\\\\worker-loader\\\\createInlineWorker.js\")(\"/******/ (function(modules) { // webpackBootstrap\\n/******/ \\t// The module cache\\n/******/ \\tvar installedModules = {};\\n/******/\\n/******/ \\t// The require function\\n/******/ \\tfunction __webpack_require__(moduleId) {\\n/******/\\n/******/ \\t\\t// Check if module is in cache\\n/******/ \\t\\tif(installedModules[moduleId]) {\\n/******/ \\t\\t\\treturn installedModules[moduleId].exports;\\n/******/ \\t\\t}\\n/******/ \\t\\t// Create a new module (and put it into the cache)\\n/******/ \\t\\tvar module = installedModules[moduleId] = {\\n/******/ \\t\\t\\ti: moduleId,\\n/******/ \\t\\t\\tl: false,\\n/******/ \\t\\t\\texports: {}\\n/******/ \\t\\t};\\n/******/\\n/******/ \\t\\t// Execute the module function\\n/******/ \\t\\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\\n/******/\\n/******/ \\t\\t// Flag the module as loaded\\n/******/ \\t\\tmodule.l = true;\\n/******/\\n/******/ \\t\\t// Return the exports of the module\\n/******/ \\t\\treturn module.exports;\\n/******/ \\t}\\n/******/\\n/******/\\n/******/ \\t// expose the modules object (__webpack_modules__)\\n/******/ \\t__webpack_require__.m = modules;\\n/******/\\n/******/ \\t// expose the module cache\\n/******/ \\t__webpack_require__.c = installedModules;\\n/******/\\n/******/ \\t// define getter function for harmony exports\\n/******/ \\t__webpack_require__.d = function(exports, name, getter) {\\n/******/ \\t\\tif(!__webpack_require__.o(exports, name)) {\\n/******/ \\t\\t\\tObject.defineProperty(exports, name, {\\n/******/ \\t\\t\\t\\tconfigurable: false,\\n/******/ \\t\\t\\t\\tenumerable: true,\\n/******/ \\t\\t\\t\\tget: getter\\n/******/ \\t\\t\\t});\\n/******/ \\t\\t}\\n/******/ \\t};\\n/******/\\n/******/ \\t// getDefaultExport function for compatibility with non-harmony modules\\n/******/ \\t__webpack_require__.n = function(module) {\\n/******/ \\t\\tvar getter = module && module.__esModule ?\\n/******/ \\t\\t\\tfunction getDefault() { return module['default']; } :\\n/******/ \\t\\t\\tfunction getModuleExports() { return module; };\\n/******/ \\t\\t__webpack_require__.d(getter, 'a', getter);\\n/******/ \\t\\treturn getter;\\n/******/ \\t};\\n/******/\\n/******/ \\t// Object.prototype.hasOwnProperty.call\\n/******/ \\t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\\n/******/\\n/******/ \\t// __webpack_public_path__\\n/******/ \\t__webpack_require__.p = \\\"/\\\";\\n/******/\\n/******/ \\t// Load entry module and return exports\\n/******/ \\treturn __webpack_require__(__webpack_require__.s = 0);\\n/******/ })\\n/************************************************************************/\\n/******/ ([\\n/* 0 */\\n/***/ (function(module, exports) {\\n\\n// based on https://github.com/mattdiamond/Recorderjs/blob/master/src/recorder.js\\n// with a few optimizations including downsampling and trimming quiet samples\\n\\n/* global Blob self */\\n/* eslint prefer-arrow-callback: [\\\"error\\\", { \\\"allowNamedFunctions\\\": true }] */\\n/* eslint no-param-reassign: [\\\"error\\\", { \\\"props\\\": false }] */\\n/* eslint no-use-before-define: [\\\"error\\\", { \\\"functions\\\": false }] */\\n/* eslint no-plusplus: off */\\n/* eslint comma-dangle: [\\\"error\\\", {\\\"functions\\\": \\\"never\\\", \\\"objects\\\": \\\"always-multiline\\\"}] */\\nconst bitDepth = 16;\\nconst bytesPerSample = bitDepth / 8;\\nconst outSampleRate = 16000;\\nconst outNumChannels = 1;\\n\\nlet recLength = 0;\\nlet recBuffers = [];\\n\\nconst options = {\\n sampleRate: 44000,\\n numChannels: 1,\\n useDownsample: true,\\n // controls if the encoder will trim silent samples at begining and end of buffer\\n useTrim: true,\\n // trim samples below this value at the beginnig and end of the buffer\\n // lower the value trim less silence (larger file size)\\n // reasonable values seem to be between 0.005 and 0.0005\\n quietTrimThreshold: 0.0008,\\n // how many samples to add back to the buffer before/after the quiet threshold\\n // higher values result in less silence trimming (larger file size)\\n // reasonable values seem to be between 3500 and 5000\\n quietTrimSlackBack: 4000,\\n};\\n\\nself.onmessage = (evt) => {\\n switch (evt.data.command) {\\n case 'init':\\n init(evt.data.config);\\n break;\\n case 'record':\\n record(evt.data.buffer);\\n break;\\n case 'exportWav':\\n exportWAV(evt.data.type);\\n break;\\n case 'getBuffer':\\n getBuffer();\\n break;\\n case 'clear':\\n clear();\\n break;\\n case 'close':\\n self.close();\\n break;\\n default:\\n break;\\n }\\n};\\n\\nfunction init(config) {\\n Object.assign(options, config);\\n initBuffers();\\n}\\n\\nfunction record(inputBuffer) {\\n for (let channel = 0; channel < options.numChannels; channel++) {\\n recBuffers[channel].push(inputBuffer[channel]);\\n }\\n recLength += inputBuffer[0].length;\\n}\\n\\nfunction exportWAV(type) {\\n const buffers = [];\\n for (let channel = 0; channel < options.numChannels; channel++) {\\n buffers.push(mergeBuffers(recBuffers[channel], recLength));\\n }\\n let interleaved;\\n if (options.numChannels === 2 && outNumChannels === 2) {\\n interleaved = interleave(buffers[0], buffers[1]);\\n } else {\\n interleaved = buffers[0];\\n }\\n const downsampledBuffer = downsampleTrimBuffer(interleaved, outSampleRate);\\n const dataview = encodeWAV(downsampledBuffer);\\n const audioBlob = new Blob([dataview], { type });\\n\\n self.postMessage({\\n command: 'exportWAV',\\n data: audioBlob,\\n });\\n}\\n\\nfunction getBuffer() {\\n const buffers = [];\\n for (let channel = 0; channel < options.numChannels; channel++) {\\n buffers.push(mergeBuffers(recBuffers[channel], recLength));\\n }\\n self.postMessage({ command: 'getBuffer', data: buffers });\\n}\\n\\nfunction clear() {\\n recLength = 0;\\n recBuffers = [];\\n initBuffers();\\n}\\n\\nfunction initBuffers() {\\n for (let channel = 0; channel < options.numChannels; channel++) {\\n recBuffers[channel] = [];\\n }\\n}\\n\\nfunction mergeBuffers(recBuffer, length) {\\n const result = new Float32Array(length);\\n let offset = 0;\\n for (let i = 0; i < recBuffer.length; i++) {\\n result.set(recBuffer[i], offset);\\n offset += recBuffer[i].length;\\n }\\n return result;\\n}\\n\\nfunction interleave(inputL, inputR) {\\n const length = inputL.length + inputR.length;\\n const result = new Float32Array(length);\\n\\n let index = 0;\\n let inputIndex = 0;\\n\\n while (index < length) {\\n result[index++] = inputL[inputIndex];\\n result[index++] = inputR[inputIndex];\\n inputIndex++;\\n }\\n return result;\\n}\\n\\nfunction floatTo16BitPCM(output, offset, input) {\\n for (let i = 0, o = offset; i < input.length; i++, o += 2) {\\n const s = Math.max(-1, Math.min(1, input[i]));\\n output.setInt16(o, s < 0 ? s * 0x8000 : s * 0x7FFF, true);\\n }\\n}\\n\\n// Lex doesn't require proper wav header\\n// still inserting wav header for playing on client side\\nfunction addHeader(view, length) {\\n // RIFF identifier 'RIFF'\\n view.setUint32(0, 1380533830, false);\\n // file length minus RIFF identifier length and file description length\\n view.setUint32(4, 36 + length, true);\\n // RIFF type 'WAVE'\\n view.setUint32(8, 1463899717, false);\\n // format chunk identifier 'fmt '\\n view.setUint32(12, 1718449184, false);\\n // format chunk length\\n view.setUint32(16, 16, true);\\n // sample format (raw)\\n view.setUint16(20, 1, true);\\n // channel count\\n view.setUint16(22, outNumChannels, true);\\n // sample rate\\n view.setUint32(24, outSampleRate, true);\\n // byte rate (sample rate * block align)\\n view.setUint32(28, outSampleRate * bytesPerSample * outNumChannels, true);\\n // block align (channel count * bytes per sample)\\n view.setUint16(32, bytesPerSample * outNumChannels, true);\\n // bits per sample\\n view.setUint16(34, bitDepth, true);\\n // data chunk identifier 'data'\\n view.setUint32(36, 1684108385, false);\\n}\\n\\nfunction encodeWAV(samples) {\\n const buffer = new ArrayBuffer(44 + (samples.length * 2));\\n const view = new DataView(buffer);\\n\\n addHeader(view, samples.length);\\n floatTo16BitPCM(view, 44, samples);\\n\\n return view;\\n}\\n\\nfunction downsampleTrimBuffer(buffer, rate) {\\n if (rate === options.sampleRate) {\\n return buffer;\\n }\\n\\n const length = buffer.length;\\n const sampleRateRatio = options.sampleRate / rate;\\n const newLength = Math.round(length / sampleRateRatio);\\n\\n const result = new Float32Array(newLength);\\n let offsetResult = 0;\\n let offsetBuffer = 0;\\n let firstNonQuiet = 0;\\n let lastNonQuiet = length;\\n while (offsetResult < result.length) {\\n const nextOffsetBuffer = Math.round((offsetResult + 1) * sampleRateRatio);\\n let accum = 0;\\n let count = 0;\\n for (let i = offsetBuffer; (i < nextOffsetBuffer) && (i < length); i++) {\\n accum += buffer[i];\\n count++;\\n }\\n // mark first and last sample over the quiet threshold\\n if (accum > options.quietTrimThreshold) {\\n if (firstNonQuiet === 0) {\\n firstNonQuiet = offsetResult;\\n }\\n lastNonQuiet = offsetResult;\\n }\\n result[offsetResult] = accum / count;\\n offsetResult++;\\n offsetBuffer = nextOffsetBuffer;\\n }\\n\\n /*\\n console.info('encoder trim size reduction',\\n (Math.min(newLength, lastNonQuiet + options.quietTrimSlackBack) -\\n Math.max(0, firstNonQuiet - options.quietTrimSlackBack)) / result.length\\n );\\n */\\n return (options.useTrim) ?\\n // slice based on quiet threshold and put slack back into the buffer\\n result.slice(\\n Math.max(0, firstNonQuiet - options.quietTrimSlackBack),\\n Math.min(newLength, lastNonQuiet + options.quietTrimSlackBack)\\n ) :\\n result;\\n}\\n\\n\\n/***/ })\\n/******/ ]);\\n//# sourceMappingURL=wav-worker.js.map\", __webpack_public_path__ + \"bundle/wav-worker.js\");\n};\n\n\n// WEBPACK FOOTER //\n// ./src/lib/lex/wav-worker.js","// http://stackoverflow.com/questions/10343913/how-to-create-a-web-worker-from-a-string\r\n\r\nvar URL = window.URL || window.webkitURL;\r\nmodule.exports = function(content, url) {\r\n try {\r\n try {\r\n var blob;\r\n try { // BlobBuilder = Deprecated, but widely implemented\r\n var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;\r\n blob = new BlobBuilder();\r\n blob.append(content);\r\n blob = blob.getBlob();\r\n } catch(e) { // The proposed API\r\n blob = new Blob([content]);\r\n }\r\n return new Worker(URL.createObjectURL(blob));\r\n } catch(e) {\r\n return new Worker('data:application/javascript,' + encodeURIComponent(content));\r\n }\r\n } catch(e) {\r\n if (!url) {\r\n throw Error('Inline worker is not supported');\r\n }\r\n return new Worker(url);\r\n }\r\n}\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/worker-loader/createInlineWorker.js\n// module id = 161\n// module chunks = 0","/*\n Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Licensed under the Amazon Software License (the \"License\"). You may not use this file\n except in compliance with the License. A copy of the License is located at\n\n http://aws.amazon.com/asl/\n\n or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\n BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\n License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * Vuex store recorder handlers\n */\n\n/* eslint no-console: [\"error\", { allow: [\"info\", \"warn\", \"error\", \"time\", \"timeEnd\"] }] */\n/* eslint no-param-reassign: [\"error\", { \"props\": false }] */\n\nconst initRecorderHandlers = (context, recorder) => {\n /* global Blob */\n\n recorder.onstart = () => {\n console.info('recorder start event triggered');\n console.time('recording time');\n };\n recorder.onstop = () => {\n context.dispatch('stopRecording');\n console.timeEnd('recording time');\n console.time('recording processing time');\n console.info('recorder stop event triggered');\n };\n recorder.onsilentrecording = () => {\n console.info('recorder silent recording triggered');\n context.commit('increaseSilentRecordingCount');\n };\n recorder.onunsilentrecording = () => {\n if (context.state.recState.silentRecordingCount > 0) {\n context.commit('resetSilentRecordingCount');\n }\n };\n recorder.onerror = (e) => {\n console.error('recorder onerror event triggered', e);\n };\n recorder.onstreamready = () => {\n console.info('recorder stream ready event triggered');\n };\n recorder.onmute = () => {\n console.info('recorder mute event triggered');\n context.commit('setIsMicMuted', true);\n };\n recorder.onunmute = () => {\n console.info('recorder unmute event triggered');\n context.commit('setIsMicMuted', false);\n };\n recorder.onquiet = () => {\n console.info('recorder quiet event triggered');\n context.commit('setIsMicQuiet', true);\n };\n recorder.onunquiet = () => {\n console.info('recorder unquiet event triggered');\n context.commit('setIsMicQuiet', false);\n };\n\n // TODO need to change recorder event setter to support\n // replacing handlers instead of adding\n recorder.ondataavailable = (e) => {\n const mimeType = recorder.mimeType;\n console.info('recorder data available event triggered');\n const audioBlob = new Blob(\n [e.detail], { type: mimeType },\n );\n // XXX not used for now since only encoding WAV format\n let offset = 0;\n // offset is only needed for opus encoded ogg files\n // extract the offset where the opus frames are found\n // leaving for future reference\n // https://tools.ietf.org/html/rfc7845\n // https://tools.ietf.org/html/rfc6716\n // https://www.xiph.org/ogg/doc/framing.html\n if (mimeType.startsWith('audio/ogg')) {\n offset = 125 + e.detail[125] + 1;\n }\n console.timeEnd('recording processing time');\n\n context.dispatch('lexPostContent', audioBlob, offset)\n .then((lexAudioBlob) => {\n if (context.state.recState.silentRecordingCount >=\n context.state.config.converser.silentConsecutiveRecordingMax\n ) {\n return Promise.reject(\n 'Too many consecutive silent recordings: ' +\n `${context.state.recState.silentRecordingCount}.`,\n );\n }\n return Promise.all([\n context.dispatch('getAudioUrl', audioBlob),\n context.dispatch('getAudioUrl', lexAudioBlob),\n ]);\n })\n .then((audioUrls) => {\n // handle being interrupted by text\n if (context.state.lex.dialogState !== 'Fulfilled' &&\n !context.state.recState.isConversationGoing\n ) {\n return Promise.resolve();\n }\n const [humanAudioUrl, lexAudioUrl] = audioUrls;\n context.dispatch('pushMessage', {\n type: 'human',\n audio: humanAudioUrl,\n text: context.state.lex.inputTranscript,\n });\n context.dispatch('pushMessage', {\n type: 'bot',\n audio: lexAudioUrl,\n text: context.state.lex.message,\n dialogState: context.state.lex.dialogState,\n responseCard: context.state.lex.responseCard,\n });\n return context.dispatch('playAudio', lexAudioUrl, {}, offset);\n })\n .then(() => {\n if (\n ['Fulfilled', 'ReadyForFulfillment', 'Failed'].indexOf(\n context.state.lex.dialogState,\n ) >= 0\n ) {\n return context.dispatch('stopConversation')\n .then(() => context.dispatch('reInitBot'));\n }\n\n if (context.state.recState.isConversationGoing) {\n return context.dispatch('startRecording');\n }\n return Promise.resolve();\n })\n .catch((error) => {\n console.error('converser error:', error);\n context.dispatch('stopConversation');\n context.dispatch('pushErrorMessage',\n `I had an error. ${error}`,\n );\n context.commit('resetSilentRecordingCount');\n });\n };\n};\nexport default initRecorderHandlers;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/recorder-handlers.js","module.exports = \"data:audio/ogg;base64,T2dnUwACAAAAAAAAAAAyzN3NAAAAAGFf2X8BM39GTEFDAQAAAWZMYUMAAAAiEgASAAAAAAAkFQrEQPAAAAAAAAAAAAAAAAAAAAAAAAAAAE9nZ1MAAAAAAAAAAAAAMszdzQEAAAD5LKCSATeEAAAzDQAAAExhdmY1NS40OC4xMDABAAAAGgAAAGVuY29kZXI9TGF2YzU1LjY5LjEwMCBmbGFjT2dnUwAEARIAAAAAAAAyzN3NAgAAAKWVljkCDAD/+GkIAAAdAAABICI=\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/silent.ogg\n// module id = 163\n// module chunks = 0","module.exports = \"data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU2LjM2LjEwMAAAAAAAAAAAAAAA//OEAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAEAAABIADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV6urq6urq6urq6urq6urq6urq6urq6urq6v////////////////////////////////8AAAAATGF2YzU2LjQxAAAAAAAAAAAAAAAAJAAAAAAAAAAAASDs90hvAAAAAAAAAAAAAAAAAAAA//MUZAAAAAGkAAAAAAAAA0gAAAAATEFN//MUZAMAAAGkAAAAAAAAA0gAAAAARTMu//MUZAYAAAGkAAAAAAAAA0gAAAAAOTku//MUZAkAAAGkAAAAAAAAA0gAAAAANVVV\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/silent.mp3\n// module id = 164\n// module chunks = 0","/*\n Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Licensed under the Amazon Software License (the \"License\"). You may not use this file\n except in compliance with the License. A copy of the License is located at\n\n http://aws.amazon.com/asl/\n\n or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\n BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\n License for the specific language governing permissions and limitations under the License.\n */\n\n/* eslint no-console: [\"error\", { allow: [\"warn\", \"error\"] }] */\n\nexport default class {\n constructor({\n botName,\n botAlias = '$LATEST',\n userId,\n lexRuntimeClient,\n }) {\n if (!botName || !lexRuntimeClient) {\n throw new Error('invalid lex client constructor arguments');\n }\n\n this.botName = botName;\n this.botAlias = botAlias;\n this.userId = userId ||\n 'lex-web-ui-' +\n `${Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1)}`;\n\n this.lexRuntimeClient = lexRuntimeClient;\n this.credentials = this.lexRuntimeClient.config.credentials;\n }\n\n initCredentials(credentials) {\n this.credentials = credentials;\n this.lexRuntimeClient.config.credentials = this.credentials;\n this.userId = (credentials.identityId) ?\n credentials.identityId :\n this.userId;\n }\n\n postText(inputText, sessionAttributes = {}) {\n const postTextReq = this.lexRuntimeClient.postText({\n botAlias: this.botAlias,\n botName: this.botName,\n userId: this.userId,\n inputText,\n sessionAttributes,\n });\n return this.credentials.getPromise()\n .then(() => postTextReq.promise());\n }\n\n postContent(\n blob,\n sessionAttributes = {},\n acceptFormat = 'audio/ogg',\n offset = 0,\n ) {\n const mediaType = blob.type;\n let contentType = mediaType;\n\n if (mediaType.startsWith('audio/wav')) {\n contentType = 'audio/x-l16; sample-rate=16000; channel-count=1';\n } else if (mediaType.startsWith('audio/ogg')) {\n contentType =\n 'audio/x-cbr-opus-with-preamble; bit-rate=32000;' +\n ` frame-size-milliseconds=20; preamble-size=${offset}`;\n } else {\n console.warn('unknown media type in lex client');\n }\n\n const postContentReq = this.lexRuntimeClient.postContent({\n accept: acceptFormat,\n botAlias: this.botAlias,\n botName: this.botName,\n userId: this.userId,\n contentType,\n inputStream: blob,\n sessionAttributes,\n });\n\n return this.credentials.getPromise()\n .then(() => postContentReq.promise());\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib/lex/client.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 187b01132484a6ce5a8b","webpack:///./node_modules/core-js/library/modules/_core.js","webpack:///./node_modules/core-js/library/modules/_wks.js","webpack:///./node_modules/core-js/library/modules/_global.js","webpack:///./node_modules/core-js/library/modules/_object-dp.js","webpack:///./node_modules/core-js/library/modules/_an-object.js","webpack:///./node_modules/core-js/library/modules/_descriptors.js","webpack:///./node_modules/vue-loader/lib/component-normalizer.js","webpack:///./node_modules/core-js/library/modules/_export.js","webpack:///./node_modules/core-js/library/modules/_hide.js","webpack:///./node_modules/core-js/library/modules/_has.js","webpack:///./node_modules/core-js/library/modules/_to-iobject.js","webpack:///./node_modules/core-js/library/modules/_fails.js","webpack:///./node_modules/core-js/library/modules/_object-keys.js","webpack:///./node_modules/babel-runtime/core-js/promise.js","webpack:///./node_modules/core-js/library/modules/_iterators.js","webpack:///./node_modules/babel-runtime/helpers/extends.js","webpack:///./node_modules/core-js/library/modules/_ctx.js","webpack:///./node_modules/core-js/library/modules/_is-object.js","webpack:///./node_modules/core-js/library/modules/_property-desc.js","webpack:///./node_modules/core-js/library/modules/_cof.js","webpack:///./node_modules/core-js/library/modules/es6.string.iterator.js","webpack:///./node_modules/core-js/library/modules/_uid.js","webpack:///./node_modules/core-js/library/modules/_object-pie.js","webpack:///./node_modules/core-js/library/modules/_to-object.js","webpack:///./node_modules/core-js/library/modules/_library.js","webpack:///./node_modules/core-js/library/modules/_set-to-string-tag.js","webpack:///./node_modules/core-js/library/modules/web.dom.iterable.js","webpack:///./node_modules/core-js/library/modules/_a-function.js","webpack:///./node_modules/core-js/library/modules/_dom-create.js","webpack:///./node_modules/core-js/library/modules/_to-primitive.js","webpack:///./node_modules/core-js/library/modules/_defined.js","webpack:///./node_modules/core-js/library/modules/_to-length.js","webpack:///./node_modules/core-js/library/modules/_to-integer.js","webpack:///./node_modules/core-js/library/modules/_shared-key.js","webpack:///./node_modules/core-js/library/modules/_shared.js","webpack:///./node_modules/core-js/library/modules/_enum-bug-keys.js","webpack:///./node_modules/core-js/library/modules/_object-gops.js","webpack:///./node_modules/babel-runtime/helpers/classCallCheck.js","webpack:///./node_modules/babel-runtime/core-js/object/define-property.js","webpack:///./node_modules/core-js/library/modules/_classof.js","webpack:///./node_modules/core-js/library/modules/core.get-iterator-method.js","webpack:///./node_modules/babel-runtime/helpers/typeof.js","webpack:///./node_modules/core-js/library/modules/_wks-ext.js","webpack:///./node_modules/core-js/library/modules/_wks-define.js","webpack:///./src/config/index.js","webpack:///./node_modules/babel-runtime/core-js/object/assign.js","webpack:///./node_modules/core-js/library/modules/_ie8-dom-define.js","webpack:///./node_modules/core-js/library/modules/_object-keys-internal.js","webpack:///./node_modules/core-js/library/modules/_iobject.js","webpack:///./node_modules/core-js/library/modules/_iter-define.js","webpack:///./node_modules/core-js/library/modules/_redefine.js","webpack:///./node_modules/core-js/library/modules/_object-create.js","webpack:///./node_modules/core-js/library/modules/_html.js","webpack:///./node_modules/core-js/library/modules/_iter-call.js","webpack:///./node_modules/core-js/library/modules/_is-array-iter.js","webpack:///./node_modules/core-js/library/modules/_task.js","webpack:///./node_modules/core-js/library/modules/_iter-detect.js","webpack:///./node_modules/babel-runtime/core-js/object/keys.js","webpack:///./node_modules/core-js/library/modules/_object-gopn.js","webpack:///./node_modules/babel-runtime/helpers/slicedToArray.js","webpack:///./node_modules/babel-runtime/helpers/createClass.js","webpack:///./src/lex-web-ui.js","webpack:///./node_modules/core-js/library/fn/object/assign.js","webpack:///./node_modules/core-js/library/modules/es6.object.assign.js","webpack:///./node_modules/core-js/library/modules/_object-assign.js","webpack:///./node_modules/core-js/library/modules/_array-includes.js","webpack:///./node_modules/core-js/library/modules/_to-index.js","webpack:///./node_modules/core-js/library/fn/object/define-property.js","webpack:///./node_modules/core-js/library/modules/es6.object.define-property.js","webpack:///./node_modules/core-js/library/fn/promise.js","webpack:///./node_modules/core-js/library/modules/_string-at.js","webpack:///./node_modules/core-js/library/modules/_iter-create.js","webpack:///./node_modules/core-js/library/modules/_object-dps.js","webpack:///./node_modules/core-js/library/modules/_object-gpo.js","webpack:///./node_modules/core-js/library/modules/es6.array.iterator.js","webpack:///./node_modules/core-js/library/modules/_add-to-unscopables.js","webpack:///./node_modules/core-js/library/modules/_iter-step.js","webpack:///./node_modules/core-js/library/modules/es6.promise.js","webpack:///./node_modules/core-js/library/modules/_an-instance.js","webpack:///./node_modules/core-js/library/modules/_for-of.js","webpack:///./node_modules/core-js/library/modules/_species-constructor.js","webpack:///./node_modules/core-js/library/modules/_invoke.js","webpack:///./node_modules/core-js/library/modules/_microtask.js","webpack:///./node_modules/core-js/library/modules/_redefine-all.js","webpack:///./node_modules/core-js/library/modules/_set-species.js","webpack:///external \"vue\"","webpack:///external \"vuex\"","webpack:///external \"aws-sdk/global\"","webpack:///external \"aws-sdk/clients/lexruntime\"","webpack:///external \"aws-sdk/clients/polly\"","webpack:///./src/components/LexWeb.vue?b19d","webpack:///./src/components/LexWeb.vue?c6c4","webpack:///./src/components/LexWeb.vue","webpack:///./node_modules/core-js/library/fn/object/keys.js","webpack:///./node_modules/core-js/library/modules/es6.object.keys.js","webpack:///./node_modules/core-js/library/modules/_object-sap.js","webpack:///./src/components/ToolbarContainer.vue?f257","webpack:///./src/components/ToolbarContainer.vue","webpack:///./src/components/ToolbarContainer.vue?a416","webpack:///./src/components/MessageList.vue?1c68","webpack:///./src/components/MessageList.vue?a09a","webpack:///./src/components/MessageList.vue","webpack:///./src/components/Message.vue?3319","webpack:///./src/components/Message.vue?633a","webpack:///./src/components/Message.vue","webpack:///./src/components/MessageText.vue?588c","webpack:///./src/components/MessageText.vue?a9a5","webpack:///./src/components/MessageText.vue","webpack:///./src/components/MessageText.vue?0813","webpack:///./src/components/ResponseCard.vue?b224","webpack:///./src/components/ResponseCard.vue?94ef","webpack:///./src/components/ResponseCard.vue?b775","webpack:///./src/components/ResponseCard.vue?150e","webpack:///./src/components/Message.vue?aae4","webpack:///./src/components/MessageList.vue?5dce","webpack:///./src/components/StatusBar.vue?8ae9","webpack:///./src/components/StatusBar.vue?a8cb","webpack:///./src/components/StatusBar.vue","webpack:///./src/components/StatusBar.vue?aadb","webpack:///./src/components/InputContainer.vue?8884","webpack:///./src/components/InputContainer.vue?19af","webpack:///./src/components/InputContainer.vue","webpack:///./src/components/InputContainer.vue?efec","webpack:///./src/components/LexWeb.vue?0575","webpack:///./src/store/index.js","webpack:///./src/store/state.js","webpack:///./node_modules/babel-runtime/core-js/symbol/iterator.js","webpack:///./node_modules/core-js/library/fn/symbol/iterator.js","webpack:///./node_modules/babel-runtime/core-js/symbol.js","webpack:///./node_modules/core-js/library/fn/symbol/index.js","webpack:///./node_modules/core-js/library/modules/es6.symbol.js","webpack:///./node_modules/core-js/library/modules/_meta.js","webpack:///./node_modules/core-js/library/modules/_keyof.js","webpack:///./node_modules/core-js/library/modules/_enum-keys.js","webpack:///./node_modules/core-js/library/modules/_is-array.js","webpack:///./node_modules/core-js/library/modules/_object-gopn-ext.js","webpack:///./node_modules/core-js/library/modules/_object-gopd.js","webpack:///./node_modules/core-js/library/modules/es7.symbol.async-iterator.js","webpack:///./node_modules/core-js/library/modules/es7.symbol.observable.js","webpack:///./node_modules/babel-runtime/helpers/defineProperty.js","webpack:///./node_modules/babel-runtime/core-js/is-iterable.js","webpack:///./node_modules/core-js/library/fn/is-iterable.js","webpack:///./node_modules/core-js/library/modules/core.is-iterable.js","webpack:///./node_modules/babel-runtime/core-js/get-iterator.js","webpack:///./node_modules/core-js/library/fn/get-iterator.js","webpack:///./node_modules/core-js/library/modules/core.get-iterator.js","webpack:///./src/config ^\\.\\/config\\..*\\.json$","webpack:///./src/config/config.dev.json","webpack:///./src/config/config.prod.json","webpack:///./src/config/config.test.json","webpack:///./src/store/getters.js","webpack:///./src/store/mutations.js","webpack:///./src/store/actions.js","webpack:///./src/lib/lex/recorder.js","webpack:///./node_modules/babel-runtime/helpers/toConsumableArray.js","webpack:///./node_modules/babel-runtime/core-js/array/from.js","webpack:///./node_modules/core-js/library/fn/array/from.js","webpack:///./node_modules/core-js/library/modules/es6.array.from.js","webpack:///./node_modules/core-js/library/modules/_create-property.js","webpack:///./src/lib/lex/wav-worker.js","webpack:///./node_modules/worker-loader/createInlineWorker.js","webpack:///./src/store/recorder-handlers.js","webpack:///./src/assets/silent.ogg","webpack:///./src/assets/silent.mp3","webpack:///./src/lib/lex/client.js"],"names":["envShortName","find","startsWith","env","console","error","configEnvFile","require","configDefault","region","cognito","poolId","lex","botName","botAlias","initialText","initialSpeechInstruction","sessionAttributes","reInitSessionAttributesOnRestart","enablePlaybackInterrupt","playbackInterruptVolumeThreshold","playbackInterruptLevelThreshold","playbackInterruptNoiseThreshold","playbackInterruptMinDuration","polly","voiceId","ui","pageTitle","parentOrigin","textInputPlaceholder","toolbarColor","toolbarTitle","toolbarLogo","favIcon","pushInitialTextOnRestart","convertUrlToLinksInBotMessages","stripTagsFromBotMessages","recorder","enable","recordingTimeMax","recordingTimeMin","quietThreshold","quietTimeMin","volumeThreshold","useAutoMuteDetect","converser","silentConsecutiveRecordingMax","urlQueryParams","getUrlQueryParams","url","split","slice","reduce","params","queryString","map","queryObj","param","key","value","paramObj","decodeURIComponent","e","getConfigFromQuery","query","lexWebUiConfig","JSON","parse","mergeConfig","baseConfig","srcConfig","deep","mergeValue","base","src","shouldMergeDeep","merged","configItem","configFromFiles","queryParams","window","location","href","configFromQuery","configFromMerge","config","Component","name","template","components","LexWeb","loadingComponent","errorComponent","AsyncComponent","component","resolve","loading","delay","timeout","Plugin","install","VueConstructor","componentName","awsConfig","lexRuntimeClient","pollyClient","warn","prototype","Store","Loader","mergedConfig","Vue","Error","VuexConstructor","Vuex","AWSConfigConstructor","AWS","Config","CognitoConstructor","CognitoIdentityCredentials","PollyConstructor","Polly","LexRuntimeConstructor","LexRuntime","credentials","IdentityPoolId","store","use","ToolbarContainer","MessageList","StatusBar","InputContainer","computed","$store","state","isUiMinimized","beforeMount","lexWebUiEmbed","info","commit","document","referrer","addEventListener","messageHandler","mounted","dispatch","$lexWebUi","then","length","all","Audio","isRunningEmbedded","event","version","catch","methods","toggleMinimizeUi","evt","origin","ports","data","postMessage","type","message","text","props","toolTipMinimize","html","toggleMinimize","$emit","Message","messages","watch","$nextTick","$el","scrollTop","scrollHeight","MessageText","ResponseCard","botDialogState","dialogState","icon","color","shouldDisplayResponseCard","responseCard","contentType","genericAttachments","Array","playAudio","audioElem","querySelector","play","shouldConvertUrlToLinks","shouldStripTags","shouldRenderAsHtml","botMessageAsHtml","messageText","stripTagsFromMessage","messageWithLinks","botMessageWithLinks","encodeAsHtml","replace","linkReplacers","regex","RegExp","item","test","encodeURI","replacer","messageAccum","index","array","messageResult","urlItem","doc","implementation","createHTMLDocument","body","innerHTML","textContent","innerText","hasButtonBeenClicked","onButtonClick","volume","volumeIntervalId","isSpeechConversationGoing","isConversationGoing","isProcessing","isRecording","isBotSpeaking","statusText","isInterrupting","canInterruptBotPlayback","isMicMuted","isRecorderSupported","botAudio","canInterrupt","isSpeaking","recState","enterMeter","intervalTime","max","setInterval","instant","toFixed","Math","leaveMeter","clearInterval","textInput","micButtonIcon","micTooltip","isMicButtonDisabled","postTextMessage","onMicClick","startSpeechConversation","setAutoPlay","playInitialInstruction","isInitialState","some","initialState","autoPlay","strict","getters","mutations","actions","acceptFormat","inputTranscript","intentName","slotToElicit","slots","outputFormat","interruptIntervalId","isMicQuiet","isRecorderEnabled","silentRecordingCount","awsCreds","provider","isLexInterrupting","isLexProcessing","setIsMicMuted","bool","setIsMicQuiet","setIsConversationGoing","startRecording","start","stopRecording","stop","increaseSilentRecordingCount","resetSilentRecordingCount","setIsRecorderEnabled","setIsRecorderSupported","setIsBotSpeaking","setAudioAutoPlay","audio","status","autoplay","setCanInterruptBotPlayback","setIsBotPlaybackInterrupting","setBotPlaybackInterruptIntervalId","id","updateLexState","lexState","setLexSessionAttributes","setIsLexProcessing","setIsLexInterrupting","setAudioContentType","setPollyVoiceId","configFiltered","setIsRunningEmbedded","toggleIsUiMinimized","pushMessage","push","setAwsCredsProvider","awsCredentials","lexClient","initCredentials","context","reject","getConfigFromParent","configResponse","initConfig","configObj","initMessageList","initLexClient","initPollyClient","client","creds","initRecorder","init","initOptions","initRecorderHandlers","indexOf","initBotAudio","audioElement","silentSound","canPlayType","mimeType","preload","reInitBot","getAudioUrl","blob","URL","createObjectURL","onended","onerror","err","onloadedmetadata","playAudioHandler","clearPlayback","intervalId","onpause","playAudioInterruptHandler","intervalTimeInMs","duration","end","played","slow","setTimeout","pause","startConversation","stopConversation","getRecorderVolume","pollyGetBlob","synthReq","synthesizeSpeech","Text","VoiceId","OutputFormat","promise","Blob","AudioStream","ContentType","pollySynthesizeSpeech","audioUrl","interruptSpeechConversation","count","countMax","response","lexPostText","postText","lexPostContent","audioBlob","offset","size","timeStart","performance","now","postContent","lexResponse","timeEnd","processLexContentResponse","lexData","audioStream","lexStateDefault","appContext","pushErrorMessage","getCredentialsFromParent","credsExpirationDate","Date","expireTime","credsResponse","Credentials","AccessKeyId","SecretKey","SessionToken","IdentityId","accessKeyId","secretAccessKey","sessionToken","identityId","getPromise","getCredentials","sendMessageToParentWindow","messageChannel","MessageChannel","port1","onmessage","close","port2","parent","options","_eventTarget","createDocumentFragment","_encoderWorker","_exportWav","preset","_getPresetOptions","recordingTimeMinAutoIncrease","autoStopRecording","useBandPass","bandPassFrequency","bandPassQ","bufferLength","numChannels","requestEchoCancellation","muteThreshold","encoderUseTrim","encoderQuietTrimThreshold","encoderQuietTrimSlackBack","_presets","presets","low_latency","speech_recognition","_state","_instant","_slow","_clip","_maxVolume","Infinity","_isMicQuiet","_isMicMuted","_isSilentRecording","_silentRecordingConsecutiveCount","_initAudioContext","_initMicVolumeProcessor","_initStream","_stream","_recordingStartTime","_audioContext","currentTime","dispatchEvent","Event","command","sampleRate","useTrim","quietTrimThreshold","quietTrimSlackBack","_quietStartTime","CustomEvent","detail","inputBuffer","buffer","i","numberOfChannels","getChannelData","_tracks","muted","AudioContext","webkitAudioContext","hidden","suspend","resume","processor","createScriptProcessor","onaudioprocess","_recordBuffers","input","sum","clipCount","abs","sqrt","_setIsMicMuted","_setIsMicQuiet","_analyser","getFloatFrequencyData","_analyserData","_micVolumeProcessor","constraints","optional","echoCancellation","navigator","mediaDevices","getUserMedia","stream","getAudioTracks","label","onmute","onunmute","source","createMediaStreamSource","gainNode","createGain","analyser","createAnalyser","biquadFilter","createBiquadFilter","frequency","gain","Q","connect","smoothingTimeConstant","fftSize","minDecibels","maxDecibels","Float32Array","frequencyBinCount","destination","clip","cb","module","exports","__webpack_public_path__","onstart","time","onstop","onsilentrecording","onunsilentrecording","onstreamready","onquiet","onunquiet","ondataavailable","lexAudioBlob","audioUrls","humanAudioUrl","lexAudioUrl","userId","floor","random","toString","substring","inputText","postTextReq","mediaType","postContentReq","accept","inputStream"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;AC7DA,6BAA6B;AAC7B,qCAAqC,gC;;;;;;ACDrC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uB;;;;;;ACVA;AACA;AACA;AACA,uCAAuC,gC;;;;;;ACHvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,UAAU;AACb;AACA;AACA;AACA,E;;;;;;ACfA;AACA;AACA;AACA;AACA,E;;;;;;ACJA;AACA;AACA,iCAAiC,QAAQ,gBAAgB,UAAU,GAAG;AACtE,CAAC,E;;;;;;ACHD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC1FA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA,qFAAqF;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,eAAe;AACf,eAAe;AACf,eAAe;AACf,gBAAgB;AAChB,yB;;;;;;AC5DA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,E;;;;;;ACPA,uBAAuB;AACvB;AACA;AACA,E;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACLA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,E;;;;;;ACNA;AACA;AACA;;AAEA;AACA;AACA,E;;;;;;ACNA,kBAAkB,wD;;;;;;ACAlB,oB;;;;;;;ACAA;;AAEA;;AAEA;;AAEA;;AAEA,sCAAsC,uCAAuC,gBAAgB;;AAE7F;AACA,iBAAiB,sBAAsB;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,E;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACnBA;AACA;AACA,E;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACPA,iBAAiB;;AAEjB;AACA;AACA,E;;;;;;;ACJA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B,cAAc;AACd;AACA,CAAC;AACD;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,UAAU;AACV,CAAC,E;;;;;;AChBD;AACA;AACA;AACA;AACA,E;;;;;;ACJA,cAAc,sB;;;;;;ACAd;AACA;AACA;AACA;AACA,E;;;;;;ACJA,sB;;;;;;ACAA;AACA;AACA;;AAEA;AACA,kEAAkE,+BAA+B;AACjG,E;;;;;;ACNA;AACA;AACA;AACA;AACA;;AAEA,wGAAwG,OAAO;AAC/G;AACA;AACA;AACA;AACA;AACA,C;;;;;;ACZA;AACA;AACA;AACA,E;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACXA;AACA;AACA;AACA;AACA,E;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AMwD,kBAAkBhB,YAAYU,eAAZ,EAA6BK,eAA7B,CAAxB;;AAEO,IAAME,SAAA,qEAAAA,KACRD,eADQ;AAEXrC,kBAAgBgC;AAFL,EAAN,C;;;;;;ACnTP,kBAAkB,wD;;;;;;ACAlB;AACA,qEAAsE,gBAAgB,UAAU,GAAG;AACnG,CAAC,E;;;;;;ACFD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;AChBA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,4BAA4B,aAAa;;AAEzC;AACA;AACA;AACA;AACA;AACA,wCAAwC,oCAAoC;AAC5E,4CAA4C,oCAAoC;AAChF,KAAK,2BAA2B,oCAAoC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA,iCAAiC,2BAA2B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,E;;;;;;ACrEA,wC;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;ACxCA,6E;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,E;;;;;;ACXA;AACA;AACA;AACA;;AAEA;AACA;AACA,E;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;AC1EA;AACA;;AAEA;AACA;AACA,+BAA+B,qBAAqB;AACpD,+BAA+B,SAAS,EAAE;AAC1C,CAAC,UAAU;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS,mBAAmB;AACvD,+BAA+B,aAAa;AAC5C;AACA,GAAG,UAAU;AACb;AACA,E;;;;;;ACpBA,kBAAkB,wD;;;;;;ACAlB;AACA;AACA;;AAEA;AACA;AACA,E;;;;;;;ACNA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,sCAAsC,uCAAuC,gBAAgB;;AAE7F;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wDAAwD,+BAA+B;AACvF;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC,G;;;;;;;AClDD;;AAEA;;AAEA;;AAEA;;AAEA,sCAAsC,uCAAuC,gBAAgB;;AAE7F;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC,G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1BD;;;;;;;;;;;;;AAaA;;AAEA;;;;;AAKA;AACA;AACA;AAEA;AACA;;AAE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ACA,KAAK,WAAW,eAAe;AAC/B;AACA,KAAK;AACL;AACA,E;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACNA;AACA;AACA;AACA;AACA,E;;;;;;ACJA;AACA;AACA,oEAAuE,yCAA0C,E;;;;;;ACFjH;AACA;AACA;AACA;AACA,gD;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;AChBA;AACA;AACA;AACA;AACA;;AAEA;AACA,yFAAgF,aAAa,EAAE;;AAE/F;AACA,qDAAqD,0BAA0B;AAC/E;AACA,E;;;;;;ACZA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACZA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,E;;;;;;;ACZA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,cAAc;AACd,iBAAiB;AACjB;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,4B;;;;;;ACjCA,4BAA4B,e;;;;;;ACA5B;AACA,UAAU;AACV,E;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA,+CAA+C,sDAAiD,oBAAoB;AACpH;AACA;AACA,GAAG,UAAU;AACb,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,mBAAmB,gCAAgC;AACnD,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,qCAAqC;AACpD;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH,kBAAkB,uBAAuB,KAAK;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,iBAAiB;AACjB,wBAAwB;AACxB,gBAAgB;AAChB,oBAAoB;AACpB,wBAAwB;AACxB,gBAAgB;AAChB,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0DAA0D,kBAAkB;AAC5E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,CAAC,E;;;;;;AC1SD;AACA;AACA;AACA,GAAG;AACH,E;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,iBAAiB,EAAE;AACxD;AACA;AACA;AACA;AACA;AACA,gEAAgE,gBAAgB;AAChF;AACA;AACA,GAAG,2CAA2C,gCAAgC;AAC9E;AACA;AACA;AACA;AACA;AACA,wB;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,E;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,uCAAuC,oBAAoB,EAAE;AAC7D;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,E;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,E;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC,GAAG;AACH,E;;;;;;ACbA,gD;;;;;;ACAA,gD;;;;;;ACAA,gD;;;;;;ACAA,gD;;;;;;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O,4BACU;AACf,WAAKC,KAAL,CAAW,kBAAX;AACD;AAHM;AAVI,CAAf,E;;;;;;;AClCA,0BAA0B,aAAa,0BAA0B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,iBAAiB;AACjB,kE;;;;;;;;AClCA;AAAA;AACA,yBAAqT;AACrT;AACA;AACA;AACA;AACA;AACgP;AAChP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA,yC;;;;;;;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AAYA;;AAEA,yDAAe;AACblF,QAAM,cADO;AAEbE,cAAY;AACViF,aAAA,yDAAAA;AADU,GAFC;AAKbtC,YAAU;AACRuC,YADQ,sBACG;AACT,aAAO,KAAKtC,MAAL,CAAYC,KAAZ,CAAkBqC,QAAzB;AACD;AAHO,GALG;AAUbC,SAAO;AACL;AACAD,YAFK,sBAEM;AAAA;;AACT,WAAKE,SAAL,CAAe,YAAM;AACnB,cAAKC,GAAL,CAASC,SAAT,GAAqB,MAAKD,GAAL,CAASE,YAA9B;AACD,OAFD;AAGD;AANI;AAVM,CAAf,E;;;;;;;;AC1BA;AAAA;AACA,yBAAqT;AACrT;AACA;AACA;AACA;AACA;AACgP;AAChP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA,yC;;;;;;;;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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;AACA;AACA,iBAAiB;AACjB,kE;;;;;;;;ACdA;AAAA;AACA,yBAAqT;AACrT;AACA;AACA;AACA;AACA;AACgP;AAChP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA,yC;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AAYA,yDAAe;AACbrI,QAAM,eADO;AAEb8E,SAAO,CAAC,eAAD,CAFM;AAGbL,MAHa,kBAGN;AACL,WAAO;AACL6D,4BAAsB;AADjB,KAAP;AAGD,GAPY;;AAQbzF,YAAU,EARG;AAUbuB,WAAS;AACPmE,iBADO,yBACOnK,KADP,EACc;AACnB,WAAKkK,oBAAL,GAA4B,IAA5B;AACA,UAAM1D,UAAU;AACdD,cAAM,OADQ;AAEdE,cAAMzG;AAFQ,OAAhB;;AAKA,WAAK0E,MAAL,CAAYY,QAAZ,CAAqB,iBAArB,EAAwCkB,OAAxC;AACD;AATM;AAVI,CAAf,E;;;;;;;ACxDA,0BAA0B,aAAa,0BAA0B;AACjE;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,iBAAiB;AACjB,kE;;;;;;;AC5CA,0BAA0B,aAAa,0BAA0B;AACjE;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,iBAAiB;AACjB,kE;;;;;;;AC3CA,0BAA0B,aAAa,0BAA0B;AACjE;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,iBAAiB;AACjB,kE;;;;;;;;ACfA;AAAA;AACA,yBAAqT;AACrT;AACA;AACA;AACA;AACA;AACgP;AAChP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA,yC;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;AAaA,yDAAe;AACb5E,QAAM,YADO;AAEbyE,MAFa,kBAEN;AACL,WAAQ;AACN+D,cAAQ,CADF;AAENC,wBAAkB;AAFZ,KAAR;AAID,GAPY;;AAQb5F,YAAU;AACR6F,6BADQ,uCACoB;AAC1B,aAAO,KAAKC,mBAAZ;AACD,KAHO;AAIRC,gBAJQ,0BAIO;AACb,aACE,KAAKF,yBAAL,IACA,CAAC,KAAKG,WADN,IAEA,CAAC,KAAKC,aAHR;AAKD,KAVO;AAWRC,cAXQ,wBAWK;AACX,UAAI,KAAKC,cAAT,EAAyB;AACvB,eAAO,iBAAP;AACD;AACD,UAAI,KAAKC,uBAAT,EAAkC;AAChC,eAAO,gDAAP;AACD;AACD,UAAI,KAAKC,UAAT,EAAqB;AACnB,eAAO,iCAAP;AACD;AACD,UAAI,KAAKL,WAAT,EAAsB;AACpB,eAAO,cAAP;AACD;AACD,UAAI,KAAKC,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H;AAKD,OANuB,EAMrBD,YANqB,CAAxB;AAOD,KAXM;AAYPM,cAZO,wBAYM;AACX,UAAI,KAAKtB,gBAAT,EAA2B;AACzBuB,sBAAc,KAAKvB,gBAAnB;AACD;AACF;AAhBM;AA9DI,CAAf,E;;;;;;;ACxCA,0BAA0B,aAAa,0BAA0B;AACjE;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,iBAAiB;AACjB,kE;;;;;;;;AC9BA;AAAA;AACA,yBAAqT;AACrT;AACA;AACA;AACA;AACA;AACgP;AAChP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA,yC;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AAYA;;AAEA,yDAAe;AACbzI,QAAM,iBADO;AAEbyE,MAFa,kBAEN;AACL,WAAO;AACLwF,iBAAW;AADN,KAAP;AAGD,GANY;;AAObpH,YAAU;AACRqH,iBADQ,2BACQ;AACd,UAAI,KAAKhB,UAAT,EAAqB;AACnB,eAAO,SAAP;AACD;AACD,UAAI,KAAKJ,aAAT,EAAwB;AACtB,eAAO,MAAP;AACD;AACD,aAAO,KAAP;AACD,KATO;AAURqB,cAVQ,wBAUK;AACX,UAAI,KAAKjB,UAAT,EAAqB;AACnB,eAAO,uBAAP;AACD;AACD,UAAI,KAAKJ,aAAT,EAAwB;AACtB,eAAO,WAAP;AACD;AACD,aAAO,oBAAP;AACD,KAlBO;AAmBRsB,uBAnBQ,iCAmBc;AACpB,aAAO,KAAKlB,UAAZ;AACD,KArBO;AAsBRJ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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA,KAAK;AACL;AACA,sBAAsB,iCAAiC;AACvD,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,8BAA8B;AAC5F;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,0DAA0D,gBAAgB;;AAE1E;AACA;AACA;AACA,oBAAoB,oBAAoB;;AAExC,0CAA0C,oBAAoB;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,wBAAwB,eAAe,EAAE;AACzC,wBAAwB,gBAAgB;AACxC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,KAAK,QAAQ,iCAAiC;AAClG,CAAC;AACD;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0C;;;;;;AC1OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD,CAAC;AACD;AACA,qBAAqB;AACrB;AACA,SAAS;AACT,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,E;;;;;;ACdA;AACA;AACA;AACA;AACA,E;;;;;;ACJA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG,UAAU;AACb;AACA,E;;;;;;ACfA,yC;;;;;;ACAA,sC;;;;;;;ACAA;;AAEA;;AAEA;;AAEA;;AAEA,sCAAsC,uCAAuC,gBAAgB;;AAE7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA,E;;;;;;ACvBA,kBAAkB,yD;;;;;;ACAlB;AACA;AACA,0C;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACRA,kBAAkB,yD;;;;;;ACAlB;AACA;AACA,0C;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wB;;;;;;ACnBA,kBAAkB,WAAW,YAAY,QAAQ,qNAAqN,UAAU,kBAAkB,OAAO,sGAAsG,aAAa,+B;;;;;;ACA5Z,kBAAkB,WAAW,YAAY,QAAQ,qNAAqN,UAAU,kBAAkB,OAAO,iFAAiF,aAAa,+B;;;;;;ACAvY,kBAAkB,WAAW,YAAY,QAAQ,qNAAqN,UAAU,kBAAkB,OAAO,sGAAsG,aAA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ACA,qGACgDqM,MADhD,CADA;AAGD,OAJM,MAIA;AACL1X,gBAAQsG,IAAR,CAAa,kCAAb;AACD;;AAED,UAAM+b,iBAAiB,KAAKjc,gBAAL,CAAsB2R,WAAtB,CAAkC;AACvDuK,gBAAQjS,YAD+C;AAEvD3P,kBAAU,KAAKA,QAFwC;AAGvDD,iBAAS,KAAKA,OAHyC;AAIvDohB,gBAAQ,KAAKA,MAJ0C;AAKvDxW,gCALuD;AAMvDkX,qBAAavN,IAN0C;AAOvDnU;AAPuD,OAAlC,CAAvB;;AAUA,aAAO,KAAK2G,WAAL,CAAiB8R,UAAjB,GACJvQ,IADI,CACC;AAAA,eAAMsZ,eAAezL,OAAf,EAAN;AAAA,OADD,CAAP;AAED","file":"bundle/lex-web-ui.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"vue\"), require(\"vuex\"), require(\"aws-sdk/global\"), require(\"aws-sdk/clients/lexruntime\"), require(\"aws-sdk/clients/polly\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"vue\", \"vuex\", \"aws-sdk/global\", \"aws-sdk/clients/lexruntime\", \"aws-sdk/clients/polly\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"LexWebUi\"] = factory(require(\"vue\"), require(\"vuex\"), require(\"aws-sdk/global\"), require(\"aws-sdk/clients/lexruntime\"), require(\"aws-sdk/clients/polly\"));\n\telse\n\t\troot[\"LexWebUi\"] = factory(root[\"vue\"], root[\"vuex\"], root[\"aws-sdk/global\"], root[\"aws-sdk/clients/lexruntime\"], root[\"aws-sdk/clients/polly\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_86__, __WEBPACK_EXTERNAL_MODULE_87__, __WEBPACK_EXTERNAL_MODULE_88__, __WEBPACK_EXTERNAL_MODULE_89__, __WEBPACK_EXTERNAL_MODULE_90__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 62);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 187b01132484a6ce5a8b","var core = module.exports = {version: '2.4.0'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_core.js\n// module id = 0\n// module chunks = 0","var store = require('./_shared')('wks')\n , uid = require('./_uid')\n , Symbol = require('./_global').Symbol\n , USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function(name){\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_wks.js\n// module id = 1\n// module chunks = 0","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_global.js\n// module id = 2\n// module chunks = 0","var anObject = require('./_an-object')\n , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n , toPrimitive = require('./_to-primitive')\n , dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if(IE8_DOM_DEFINE)try {\n return dP(O, P, Attributes);\n } catch(e){ /* empty */ }\n if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');\n if('value' in Attributes)O[P] = Attributes.value;\n return O;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-dp.js\n// module id = 3\n// module chunks = 0","var isObject = require('./_is-object');\nmodule.exports = function(it){\n if(!isObject(it))throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_an-object.js\n// module id = 4\n// module chunks = 0","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function(){\n return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_descriptors.js\n// module id = 5\n// module chunks = 0","/* globals __VUE_SSR_CONTEXT__ */\n\n// this module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle\n\nmodule.exports = function normalizeComponent (\n rawScriptExports,\n compiledTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */\n) {\n var esModule\n var scriptExports = rawScriptExports = rawScriptExports || {}\n\n // ES6 modules interop\n var type = typeof rawScriptExports.default\n if (type === 'object' || type === 'function') {\n esModule = rawScriptExports\n scriptExports = rawScriptExports.default\n }\n\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (compiledTemplate) {\n options.render = compiledTemplate.render\n options.staticRenderFns = compiledTemplate.staticRenderFns\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = injectStyles\n }\n\n if (hook) {\n var functional = options.functional\n var existing = functional\n ? options.render\n : options.beforeCreate\n if (!functional) {\n // inject component registration as beforeCreate hook\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n } else {\n // register for functioal component in vue file\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return existing(h, context)\n }\n }\n }\n\n return {\n esModule: esModule,\n exports: scriptExports,\n options: options\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/component-normalizer.js\n// module id = 6\n// module chunks = 0","var global = require('./_global')\n , core = require('./_core')\n , ctx = require('./_ctx')\n , hide = require('./_hide')\n , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n var IS_FORCED = type & $export.F\n , IS_GLOBAL = type & $export.G\n , IS_STATIC = type & $export.S\n , IS_PROTO = type & $export.P\n , IS_BIND = type & $export.B\n , IS_WRAP = type & $export.W\n , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n , expProto = exports[PROTOTYPE]\n , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n , key, own, out;\n if(IS_GLOBAL)source = name;\n for(key in source){\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if(own && key in exports)continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function(C){\n var F = function(a, b, c){\n if(this instanceof C){\n switch(arguments.length){\n case 0: return new C;\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if(IS_PROTO){\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library` \nmodule.exports = $export;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_export.js\n// module id = 7\n// module chunks = 0","var dP = require('./_object-dp')\n , createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function(object, key, value){\n return dP.f(object, key, createDesc(1, value));\n} : function(object, key, value){\n object[key] = value;\n return object;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_hide.js\n// module id = 8\n// module chunks = 0","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function(it, key){\n return hasOwnProperty.call(it, key);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_has.js\n// module id = 9\n// module chunks = 0","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject')\n , defined = require('./_defined');\nmodule.exports = function(it){\n return IObject(defined(it));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-iobject.js\n// module id = 10\n// module chunks = 0","module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_fails.js\n// module id = 11\n// module chunks = 0","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal')\n , enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O){\n return $keys(O, enumBugKeys);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-keys.js\n// module id = 12\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/promise\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/promise.js\n// module id = 13\n// module chunks = 0","module.exports = {};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iterators.js\n// module id = 14\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nvar _assign = require(\"../core-js/object/assign\");\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _assign2.default || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/extends.js\n// module id = 15\n// module chunks = 0","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_ctx.js\n// module id = 16\n// module chunks = 0","module.exports = function(it){\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_is-object.js\n// module id = 17\n// module chunks = 0","module.exports = function(bitmap, value){\n return {\n enumerable : !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable : !(bitmap & 4),\n value : value\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_property-desc.js\n// module id = 18\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = function(it){\n return toString.call(it).slice(8, -1);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_cof.js\n// module id = 19\n// module chunks = 0","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function(iterated){\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , index = this._i\n , point;\n if(index >= O.length)return {value: undefined, done: true};\n point = $at(O, index);\n this._i += point.length;\n return {value: point, done: false};\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.string.iterator.js\n// module id = 20\n// module chunks = 0","var id = 0\n , px = Math.random();\nmodule.exports = function(key){\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_uid.js\n// module id = 21\n// module chunks = 0","exports.f = {}.propertyIsEnumerable;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-pie.js\n// module id = 22\n// module chunks = 0","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function(it){\n return Object(defined(it));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-object.js\n// module id = 23\n// module chunks = 0","module.exports = true;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_library.js\n// module id = 24\n// module chunks = 0","var def = require('./_object-dp').f\n , has = require('./_has')\n , TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function(it, tag, stat){\n if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_set-to-string-tag.js\n// module id = 25\n// module chunks = 0","require('./es6.array.iterator');\nvar global = require('./_global')\n , hide = require('./_hide')\n , Iterators = require('./_iterators')\n , TO_STRING_TAG = require('./_wks')('toStringTag');\n\nfor(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){\n var NAME = collections[i]\n , Collection = global[NAME]\n , proto = Collection && Collection.prototype;\n if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/web.dom.iterable.js\n// module id = 26\n// module chunks = 0","module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_a-function.js\n// module id = 27\n// module chunks = 0","var isObject = require('./_is-object')\n , document = require('./_global').document\n // in old IE typeof document.createElement is 'object'\n , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n return is ? document.createElement(it) : {};\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_dom-create.js\n// module id = 28\n// module chunks = 0","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function(it, S){\n if(!isObject(it))return it;\n var fn, val;\n if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;\n if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-primitive.js\n// module id = 29\n// module chunks = 0","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function(it){\n if(it == undefined)throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_defined.js\n// module id = 30\n// module chunks = 0","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer')\n , min = Math.min;\nmodule.exports = function(it){\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-length.js\n// module id = 31\n// module chunks = 0","// 7.1.4 ToInteger\nvar ceil = Math.ceil\n , floor = Math.floor;\nmodule.exports = function(it){\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-integer.js\n// module id = 32\n// module chunks = 0","var shared = require('./_shared')('keys')\n , uid = require('./_uid');\nmodule.exports = function(key){\n return shared[key] || (shared[key] = uid(key));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_shared-key.js\n// module id = 33\n// module chunks = 0","var global = require('./_global')\n , SHARED = '__core-js_shared__'\n , store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function(key){\n return store[key] || (store[key] = {});\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_shared.js\n// module id = 34\n// module chunks = 0","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_enum-bug-keys.js\n// module id = 35\n// module chunks = 0","exports.f = Object.getOwnPropertySymbols;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-gops.js\n// module id = 36\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/classCallCheck.js\n// module id = 37\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/object/define-property.js\n// module id = 38\n// module chunks = 0","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof')\n , TAG = require('./_wks')('toStringTag')\n // ES3 wrong here\n , ARG = cof(function(){ return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function(it, key){\n try {\n return it[key];\n } catch(e){ /* empty */ }\n};\n\nmodule.exports = function(it){\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_classof.js\n// module id = 39\n// module chunks = 0","var classof = require('./_classof')\n , ITERATOR = require('./_wks')('iterator')\n , Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function(it){\n if(it != undefined)return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/core.get-iterator-method.js\n// module id = 40\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nvar _iterator = require(\"../core-js/symbol/iterator\");\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = require(\"../core-js/symbol\");\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === \"function\" && typeof _iterator2.default === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/typeof.js\n// module id = 41\n// module chunks = 0","exports.f = require('./_wks');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_wks-ext.js\n// module id = 42\n// module chunks = 0","var global = require('./_global')\n , core = require('./_core')\n , LIBRARY = require('./_library')\n , wksExt = require('./_wks-ext')\n , defineProperty = require('./_object-dp').f;\nmodule.exports = function(name){\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_wks-define.js\n// module id = 43\n// module chunks = 0","/*\n Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Licensed under the Amazon Software License (the \"License\"). You may not use this file\n except in compliance with the License. A copy of the License is located at\n\n http://aws.amazon.com/asl/\n\n or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\n BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\n License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * Application configuration management.\n * This file contains default config values and merges the environment\n * and URL configs.\n *\n * The environment dependent values are loaded from files\n * with the config..json naming syntax (where is a NODE_ENV value\n * such as 'prod' or 'dev') located in the same directory as this file.\n *\n * The URL configuration is parsed from the `config` URL parameter as\n * a JSON object\n *\n * NOTE: To avoid having to manually merge future changes to this file, you\n * probably want to modify default values in the config..js files instead\n * of this one.\n */\n\n/* eslint no-console: [\"error\", { allow: [\"warn\", \"error\"] }] */\n\n// TODO turn this into a class\n\n// get env shortname to require file\nconst envShortName = [\n 'dev',\n 'prod',\n 'test',\n].find(env => process.env.NODE_ENV.startsWith(env));\n\nif (!envShortName) {\n console.error('unknown environment in config: ', process.env.NODE_ENV);\n}\n\n// eslint-disable-next-line import/no-dynamic-require\nconst configEnvFile = require(`./config.${envShortName}.json`);\n\n// default config used to provide a base structure for\n// environment and dynamic configs\nconst configDefault = {\n // AWS region\n region: 'us-east-1',\n\n cognito: {\n // Cognito pool id used to obtain credentials\n // e.g. poolId: 'us-east-1:deadbeef-cac0-babe-abcd-abcdef01234',\n poolId: '',\n },\n\n lex: {\n // Lex bot name\n botName: 'WebUiOrderFlowers',\n\n // Lex bot alias/version\n botAlias: '$LATEST',\n\n // instruction message shown in the UI\n initialText: 'You can ask me for help ordering flowers. ' +\n 'Just type \"order flowers\" or click on the mic and say it.',\n\n // instructions spoken when mic is clicked\n initialSpeechInstruction: 'Say \"Order Flowers\" to get started',\n\n // Lex initial sessionAttributes\n sessionAttributes: {},\n\n // controls if the session attributes are reinitialized a\n // after the bot dialog is done (i.e. fail or fulfilled)\n reInitSessionAttributesOnRestart: true,\n\n // TODO move this config fields to converser\n // allow to interrupt playback of lex responses by talking over playback\n // XXX experimental\n enablePlaybackInterrupt: false,\n\n // microphone volume level (in dB) to cause an interrupt in the bot\n // playback. Lower (negative) values makes interrupt more likely\n // may need to adjusted down if using low_latency preset or band pass filter\n playbackInterruptVolumeThreshold: -60,\n\n // microphone slow sample level to cause an interrupt in the bot\n // playback. Lower values makes interrupt more likely\n // may need to adjusted down if using low_latency preset or band pass filter\n playbackInterruptLevelThreshold: 0.0075,\n\n // microphone volume level (in dB) to cause enable interrupt of bot\n // playback. This is used to prevent interrupts when there's noise\n // For interrupt to be enabled, the volume level should be lower than this\n // value. Lower (negative) values makes interrupt more likely\n // may need to adjusted down if using low_latency preset or band pass filter\n playbackInterruptNoiseThreshold: -75,\n\n // only allow to interrupt playback longer than this value (in seconds)\n playbackInterruptMinDuration: 2,\n },\n\n polly: {\n voiceId: 'Joanna',\n },\n\n ui: {\n // TODO may want to move pageTitle out to LexApp or Page component\n // title of HTML page added dynamically to index.html\n pageTitle: 'Order Flowers Bot',\n\n // when running as an embedded iframe, this will be used as the\n // be the parent origin used to send/receive messages\n // NOTE: this is also a security control\n // this parameter should not be dynamically overriden\n // avoid making it '*'\n // if left as an empty string, it will be set to window.location.window\n // to allow runing embedded in a single origin setup\n parentOrigin: null,\n\n // chat window text placeholder\n textInputPlaceholder: 'Type here',\n\n toolbarColor: 'red',\n\n // chat window title\n toolbarTitle: 'Order Flowers',\n\n // logo used in toolbar - also used as favicon not specificied\n toolbarLogo: '',\n\n // fav icon\n favIcon: '',\n\n // controls if the Lex initialText will be pushed into the message\n // list after the bot dialog is done (i.e. fail or fulfilled)\n pushInitialTextOnRestart: true,\n\n // controls if the Lex sessionAttributes should be re-initialized\n // to the config value (i.e. lex.sessionAttributes)\n // after the bot dialog is done (i.e. fail or fulfilled)\n reInitSessionAttributesOnRestart: false,\n\n // controls whether URLs in bot responses will be converted to links\n convertUrlToLinksInBotMessages: true,\n\n // controls whether tags (e.g. SSML or HTML) should be stripped out\n // of bot messages received from Lex\n stripTagsFromBotMessages: true,\n },\n\n /* Configuration to enable voice and to pass options to the recorder\n * see ../lib/recorder.js for details about all the available options.\n * You can override any of the defaults in recorder.js by adding them\n * to the corresponding JSON config file (config..json)\n * or alternatively here\n */\n recorder: {\n // if set to true, voice interaction would be enabled on supported browsers\n // set to false if you don't want voice enabled\n enable: true,\n\n // maximum recording time in seconds\n recordingTimeMax: 10,\n\n // Minimum recording time in seconds.\n // Used before evaluating if the line is quiet to allow initial pauses\n // before speech\n recordingTimeMin: 2.5,\n\n // Sound sample threshold to determine if there's silence.\n // This is measured against a value of a sample over a period of time\n // If set too high, it may falsely detect quiet recordings\n // If set too low, it could take long pauses before detecting silence or\n // not detect it at all.\n // Reasonable values seem to be between 0.001 and 0.003\n quietThreshold: 0.002,\n\n // time before automatically stopping the recording when\n // there's silence. This is compared to a slow decaying\n // sample level so its's value is relative to sound over\n // a period of time. Reasonable times seem to be between 0.2 and 0.5\n quietTimeMin: 0.3,\n\n // volume threshold in db to determine if there's silence.\n // Volume levels lower than this would trigger a silent event\n // Works in conjuction with `quietThreshold`. Lower (negative) values\n // cause the silence detection to converge faster\n // Reasonable values seem to be between -75 and -55\n volumeThreshold: -65,\n\n // use automatic mute detection\n useAutoMuteDetect: false,\n },\n\n converser: {\n // used to control maximum number of consecutive silent recordings\n // before the conversation is ended\n silentConsecutiveRecordingMax: 3,\n },\n\n // URL query parameters are put in here at run time\n urlQueryParams: {},\n};\n\n/**\n * Obtains the URL query params and returns it as an object\n * This can be used before the router has been setup\n */\nfunction getUrlQueryParams(url) {\n try {\n return url\n .split('?', 2) // split query string up to a max of 2 elems\n .slice(1, 2) // grab what's after the '?' char\n // split params separated by '&'\n .reduce((params, queryString) => queryString.split('&'), [])\n // further split into key value pairs separated by '='\n .map(params => params.split('='))\n // turn into an object representing the URL query key/vals\n .reduce((queryObj, param) => {\n const [key, value = true] = param;\n const paramObj = {\n [key]: decodeURIComponent(value),\n };\n return { ...queryObj, ...paramObj };\n }, {});\n } catch (e) {\n console.error('error obtaining URL query parameters', e);\n return {};\n }\n}\n\n/**\n * Obtains and parses the config URL parameter\n */\nfunction getConfigFromQuery(query) {\n try {\n return (query.lexWebUiConfig) ? JSON.parse(query.lexWebUiConfig) : {};\n } catch (e) {\n console.error('error parsing config from URL query', e);\n return {};\n }\n}\n\n/**\n * Merge two configuration objects\n * The merge process takes the base config as the source for keys to be merged.\n * The values in srcConfig take precedence in the merge.\n *\n * If deep is set to false (default), a shallow merge is done down to the\n * second level of the object. Object values under the second level fully\n * overwrite the base. For example, srcConfig.lex.sessionAttributes overwrite\n * the base as an object.\n *\n * If deep is set to true, the merge is done recursively in both directions.\n */\nexport function mergeConfig(baseConfig, srcConfig, deep = false) {\n function mergeValue(base, src, key, shouldMergeDeep) {\n // nothing to merge as the base key is not found in the src\n if (!(key in src)) {\n return base[key];\n }\n\n // deep merge in both directions using recursion\n if (shouldMergeDeep && typeof base[key] === 'object') {\n return {\n ...mergeConfig(src[key], base[key], shouldMergeDeep),\n ...mergeConfig(base[key], src[key], shouldMergeDeep),\n };\n }\n\n // shallow merge key/values\n // overriding the base values with the ones from the source\n return (typeof base[key] === 'object') ?\n { ...base[key], ...src[key] } :\n src[key];\n }\n\n // use the baseConfig first level keys as the base for merging\n return Object.keys(baseConfig)\n .map((key) => {\n const value = mergeValue(baseConfig, srcConfig, key, deep);\n return { [key]: value };\n })\n // merge key values back into a single object\n .reduce((merged, configItem) => ({ ...merged, ...configItem }), {});\n}\n\n// merge build time parameters\nconst configFromFiles = mergeConfig(configDefault, configEnvFile);\n\n// TODO move query config to a store action\n// run time config from url query parameter\nconst queryParams = getUrlQueryParams(window.location.href);\nconst configFromQuery = getConfigFromQuery(queryParams);\n// security: delete origin from dynamic parameter\nif (configFromQuery.ui && configFromQuery.ui.parentOrigin) {\n delete configFromQuery.ui.parentOrigin;\n}\n\nconst configFromMerge = mergeConfig(configFromFiles, configFromQuery);\n\nexport const config = {\n ...configFromMerge,\n urlQueryParams: queryParams,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/config/index.js","module.exports = { \"default\": require(\"core-js/library/fn/object/assign\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/object/assign.js\n// module id = 45\n// module chunks = 0","module.exports = !require('./_descriptors') && !require('./_fails')(function(){\n return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_ie8-dom-define.js\n// module id = 46\n// module chunks = 0","var has = require('./_has')\n , toIObject = require('./_to-iobject')\n , arrayIndexOf = require('./_array-includes')(false)\n , IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function(object, names){\n var O = toIObject(object)\n , i = 0\n , result = []\n , key;\n for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while(names.length > i)if(has(O, key = names[i++])){\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-keys-internal.js\n// module id = 47\n// module chunks = 0","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iobject.js\n// module id = 48\n// module chunks = 0","'use strict';\nvar LIBRARY = require('./_library')\n , $export = require('./_export')\n , redefine = require('./_redefine')\n , hide = require('./_hide')\n , has = require('./_has')\n , Iterators = require('./_iterators')\n , $iterCreate = require('./_iter-create')\n , setToStringTag = require('./_set-to-string-tag')\n , getPrototypeOf = require('./_object-gpo')\n , ITERATOR = require('./_wks')('iterator')\n , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`\n , FF_ITERATOR = '@@iterator'\n , KEYS = 'keys'\n , VALUES = 'values';\n\nvar returnThis = function(){ return this; };\n\nmodule.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){\n $iterCreate(Constructor, NAME, next);\n var getMethod = function(kind){\n if(!BUGGY && kind in proto)return proto[kind];\n switch(kind){\n case KEYS: return function keys(){ return new Constructor(this, kind); };\n case VALUES: return function values(){ return new Constructor(this, kind); };\n } return function entries(){ return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator'\n , DEF_VALUES = DEFAULT == VALUES\n , VALUES_BUG = false\n , proto = Base.prototype\n , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]\n , $default = $native || getMethod(DEFAULT)\n , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined\n , $anyNative = NAME == 'Array' ? proto.entries || $native : $native\n , methods, key, IteratorPrototype;\n // Fix native\n if($anyNative){\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base));\n if(IteratorPrototype !== Object.prototype){\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if(DEF_VALUES && $native && $native.name !== VALUES){\n VALUES_BUG = true;\n $default = function values(){ return $native.call(this); };\n }\n // Define iterator\n if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if(DEFAULT){\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if(FORCED)for(key in methods){\n if(!(key in proto))redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iter-define.js\n// module id = 50\n// module chunks = 0","module.exports = require('./_hide');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_redefine.js\n// module id = 51\n// module chunks = 0","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object')\n , dPs = require('./_object-dps')\n , enumBugKeys = require('./_enum-bug-keys')\n , IE_PROTO = require('./_shared-key')('IE_PROTO')\n , Empty = function(){ /* empty */ }\n , PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function(){\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe')\n , i = enumBugKeys.length\n , lt = '<'\n , gt = '>'\n , iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties){\n var result;\n if(O !== null){\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty;\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-create.js\n// module id = 52\n// module chunks = 0","module.exports = require('./_global').document && document.documentElement;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_html.js\n// module id = 53\n// module chunks = 0","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function(iterator, fn, value, entries){\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch(e){\n var ret = iterator['return'];\n if(ret !== undefined)anObject(ret.call(iterator));\n throw e;\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iter-call.js\n// module id = 54\n// module chunks = 0","// check on default Array iterator\nvar Iterators = require('./_iterators')\n , ITERATOR = require('./_wks')('iterator')\n , ArrayProto = Array.prototype;\n\nmodule.exports = function(it){\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_is-array-iter.js\n// module id = 55\n// module chunks = 0","var ctx = require('./_ctx')\n , invoke = require('./_invoke')\n , html = require('./_html')\n , cel = require('./_dom-create')\n , global = require('./_global')\n , process = global.process\n , setTask = global.setImmediate\n , clearTask = global.clearImmediate\n , MessageChannel = global.MessageChannel\n , counter = 0\n , queue = {}\n , ONREADYSTATECHANGE = 'onreadystatechange'\n , defer, channel, port;\nvar run = function(){\n var id = +this;\n if(queue.hasOwnProperty(id)){\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function(event){\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif(!setTask || !clearTask){\n setTask = function setImmediate(fn){\n var args = [], i = 1;\n while(arguments.length > i)args.push(arguments[i++]);\n queue[++counter] = function(){\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id){\n delete queue[id];\n };\n // Node.js 0.8-\n if(require('./_cof')(process) == 'process'){\n defer = function(id){\n process.nextTick(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if(MessageChannel){\n channel = new MessageChannel;\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){\n defer = function(id){\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if(ONREADYSTATECHANGE in cel('script')){\n defer = function(id){\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function(id){\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_task.js\n// module id = 56\n// module chunks = 0","var ITERATOR = require('./_wks')('iterator')\n , SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function(){ SAFE_CLOSING = true; };\n Array.from(riter, function(){ throw 2; });\n} catch(e){ /* empty */ }\n\nmodule.exports = function(exec, skipClosing){\n if(!skipClosing && !SAFE_CLOSING)return false;\n var safe = false;\n try {\n var arr = [7]\n , iter = arr[ITERATOR]();\n iter.next = function(){ return {done: safe = true}; };\n arr[ITERATOR] = function(){ return iter; };\n exec(arr);\n } catch(e){ /* empty */ }\n return safe;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iter-detect.js\n// module id = 57\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/object/keys\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/object/keys.js\n// module id = 58\n// module chunks = 0","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal')\n , hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){\n return $keys(O, hiddenKeys);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-gopn.js\n// module id = 59\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nvar _isIterable2 = require(\"../core-js/is-iterable\");\n\nvar _isIterable3 = _interopRequireDefault(_isIterable2);\n\nvar _getIterator2 = require(\"../core-js/get-iterator\");\n\nvar _getIterator3 = _interopRequireDefault(_getIterator2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if ((0, _isIterable3.default)(Object(arr))) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/slicedToArray.js\n// module id = 60\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/createClass.js\n// module id = 61\n// module chunks = 0","/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\n\n/* eslint no-console: [\"error\", { allow: [\"warn\", \"error\"] }] */\n\n/**\n * Entry point to the lex-web-ui Vue plugin\n * Exports Loader as the plugin constructor\n * and Store as store that can be used with Vuex.Store()\n */\nimport Vue from 'vue';\nimport Vuex from 'vuex';\nimport { Config as AWSConfig, CognitoIdentityCredentials }\n from 'aws-sdk/global';\nimport LexRuntime from 'aws-sdk/clients/lexruntime';\nimport Polly from 'aws-sdk/clients/polly';\n\nimport LexWeb from '@/components/LexWeb';\nimport VuexStore from '@/store';\n\nimport { config as defaultConfig, mergeConfig } from '@/config';\n\n/**\n * Vue Component\n */\nconst Component = {\n name: 'lex-web-ui',\n template: '',\n components: { LexWeb },\n};\n\nconst loadingComponent = {\n template: '

Loading. Please wait...

',\n};\nconst errorComponent = {\n template: '

An error ocurred...

',\n};\n\n/**\n * Vue Asynchonous Component\n */\nconst AsyncComponent = ({\n component = Promise.resolve(Component),\n loading = loadingComponent,\n error = errorComponent,\n delay = 200,\n timeout = 10000,\n}) => ({\n // must be a promise\n component,\n // A component to use while the async component is loading\n loading,\n // A component to use if the load fails\n error,\n // Delay before showing the loading component. Default: 200ms.\n delay,\n // The error component will be displayed if a timeout is\n // provided and exceeded. Default: 10000ms.\n timeout,\n});\n\n/**\n * Vue Plugin\n */\nexport const Plugin = {\n install(VueConstructor, {\n name = '$lexWebUi',\n componentName = 'lex-web-ui',\n awsConfig,\n lexRuntimeClient,\n pollyClient,\n component = AsyncComponent,\n config = defaultConfig,\n }) {\n if (name in VueConstructor) {\n console.warn('plugin should only be used once');\n }\n // values to be added to custom vue property\n const value = {\n config,\n awsConfig,\n lexRuntimeClient,\n pollyClient,\n };\n // add custom property to Vue\n // for example, access this in a component via this.$lexWebUi\n Object.defineProperty(VueConstructor.prototype, name, { value });\n // register as a global component\n VueConstructor.component(componentName, component);\n },\n};\n\nexport const Store = VuexStore;\n\n/**\n * Main Class\n */\nexport class Loader {\n constructor(config = {}) {\n const mergedConfig = mergeConfig(defaultConfig, config);\n\n const VueConstructor = (window.Vue) ? window.Vue : Vue;\n if (!VueConstructor) {\n throw new Error('unable to find Vue');\n }\n\n const VuexConstructor = (window.Vuex) ? window.Vuex : Vuex;\n if (!VuexConstructor) {\n throw new Error('unable to find Vuex');\n }\n\n const AWSConfigConstructor = (window.AWS && window.AWS.Config) ?\n window.AWS.Config :\n AWSConfig;\n\n const CognitoConstructor =\n (window.AWS && window.AWS.CognitoIdentityCredentials) ?\n window.AWS.CognitoIdentityCredentials :\n CognitoIdentityCredentials;\n\n const PollyConstructor = (window.AWS && window.AWS.Polly) ?\n window.AWS.Polly :\n Polly;\n\n const LexRuntimeConstructor = (window.AWS && window.AWS.LexRuntime) ?\n window.AWS.LexRuntime :\n LexRuntime;\n\n if (!AWSConfigConstructor || !CognitoConstructor || !PollyConstructor\n || !LexRuntimeConstructor) {\n throw new Error('unable to find AWS SDK');\n }\n\n const credentials = new CognitoConstructor(\n { IdentityPoolId: mergedConfig.cognito.poolId },\n { region: mergedConfig.region || 'us-east-1' },\n );\n\n const awsConfig = new AWSConfigConstructor({\n region: mergedConfig.region || 'us-east-1',\n credentials,\n });\n\n const lexRuntimeClient = new LexRuntimeConstructor(awsConfig);\n const pollyClient = (\n typeof mergedConfig.recorder === 'undefined' ||\n (mergedConfig.recorder && mergedConfig.recorder.enable !== false)\n ) ? new PollyConstructor(awsConfig) : null;\n\n // TODO name space store\n this.store = new VuexConstructor.Store({ ...VuexStore });\n\n VueConstructor.use(Plugin, {\n config: mergedConfig,\n awsConfig,\n lexRuntimeClient,\n pollyClient,\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/lex-web-ui.js","require('../../modules/es6.object.assign');\nmodule.exports = require('../../modules/_core').Object.assign;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/object/assign.js\n// module id = 63\n// module chunks = 0","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', {assign: require('./_object-assign')});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.object.assign.js\n// module id = 64\n// module chunks = 0","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys')\n , gOPS = require('./_object-gops')\n , pIE = require('./_object-pie')\n , toObject = require('./_to-object')\n , IObject = require('./_iobject')\n , $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function(){\n var A = {}\n , B = {}\n , S = Symbol()\n , K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function(k){ B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source){ // eslint-disable-line no-unused-vars\n var T = toObject(target)\n , aLen = arguments.length\n , index = 1\n , getSymbols = gOPS.f\n , isEnum = pIE.f;\n while(aLen > index){\n var S = IObject(arguments[index++])\n , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)\n , length = keys.length\n , j = 0\n , key;\n while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];\n } return T;\n} : $assign;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-assign.js\n// module id = 65\n// module chunks = 0","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject')\n , toLength = require('./_to-length')\n , toIndex = require('./_to-index');\nmodule.exports = function(IS_INCLUDES){\n return function($this, el, fromIndex){\n var O = toIObject($this)\n , length = toLength(O.length)\n , index = toIndex(fromIndex, length)\n , value;\n // Array#includes uses SameValueZero equality algorithm\n if(IS_INCLUDES && el != el)while(length > index){\n value = O[index++];\n if(value != value)return true;\n // Array#toIndex ignores holes, Array#includes - not\n } else for(;length > index; index++)if(IS_INCLUDES || index in O){\n if(O[index] === el)return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_array-includes.js\n// module id = 66\n// module chunks = 0","var toInteger = require('./_to-integer')\n , max = Math.max\n , min = Math.min;\nmodule.exports = function(index, length){\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-index.js\n// module id = 67\n// module chunks = 0","require('../../modules/es6.object.define-property');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function defineProperty(it, key, desc){\n return $Object.defineProperty(it, key, desc);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/object/define-property.js\n// module id = 68\n// module chunks = 0","var $export = require('./_export');\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperty: require('./_object-dp').f});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.object.define-property.js\n// module id = 69\n// module chunks = 0","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.promise');\nmodule.exports = require('../modules/_core').Promise;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/promise.js\n// module id = 70\n// module chunks = 0","var toInteger = require('./_to-integer')\n , defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function(TO_STRING){\n return function(that, pos){\n var s = String(defined(that))\n , i = toInteger(pos)\n , l = s.length\n , a, b;\n if(i < 0 || i >= l)return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_string-at.js\n// module id = 71\n// module chunks = 0","'use strict';\nvar create = require('./_object-create')\n , descriptor = require('./_property-desc')\n , setToStringTag = require('./_set-to-string-tag')\n , IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function(){ return this; });\n\nmodule.exports = function(Constructor, NAME, next){\n Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iter-create.js\n// module id = 72\n// module chunks = 0","var dP = require('./_object-dp')\n , anObject = require('./_an-object')\n , getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties){\n anObject(O);\n var keys = getKeys(Properties)\n , length = keys.length\n , i = 0\n , P;\n while(length > i)dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-dps.js\n// module id = 73\n// module chunks = 0","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has')\n , toObject = require('./_to-object')\n , IE_PROTO = require('./_shared-key')('IE_PROTO')\n , ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function(O){\n O = toObject(O);\n if(has(O, IE_PROTO))return O[IE_PROTO];\n if(typeof O.constructor == 'function' && O instanceof O.constructor){\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-gpo.js\n// module id = 74\n// module chunks = 0","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables')\n , step = require('./_iter-step')\n , Iterators = require('./_iterators')\n , toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function(iterated, kind){\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , kind = this._k\n , index = this._i++;\n if(!O || index >= O.length){\n this._t = undefined;\n return step(1);\n }\n if(kind == 'keys' )return step(0, index);\n if(kind == 'values')return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.array.iterator.js\n// module id = 75\n// module chunks = 0","module.exports = function(){ /* empty */ };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_add-to-unscopables.js\n// module id = 76\n// module chunks = 0","module.exports = function(done, value){\n return {value: value, done: !!done};\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_iter-step.js\n// module id = 77\n// module chunks = 0","'use strict';\nvar LIBRARY = require('./_library')\n , global = require('./_global')\n , ctx = require('./_ctx')\n , classof = require('./_classof')\n , $export = require('./_export')\n , isObject = require('./_is-object')\n , aFunction = require('./_a-function')\n , anInstance = require('./_an-instance')\n , forOf = require('./_for-of')\n , speciesConstructor = require('./_species-constructor')\n , task = require('./_task').set\n , microtask = require('./_microtask')()\n , PROMISE = 'Promise'\n , TypeError = global.TypeError\n , process = global.process\n , $Promise = global[PROMISE]\n , process = global.process\n , isNode = classof(process) == 'process'\n , empty = function(){ /* empty */ }\n , Internal, GenericPromiseCapability, Wrapper;\n\nvar USE_NATIVE = !!function(){\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1)\n , FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function(exec){ exec(empty, empty); };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;\n } catch(e){ /* empty */ }\n}();\n\n// helpers\nvar sameConstructor = function(a, b){\n // with library wrapper special case\n return a === b || a === $Promise && b === Wrapper;\n};\nvar isThenable = function(it){\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar newPromiseCapability = function(C){\n return sameConstructor($Promise, C)\n ? new PromiseCapability(C)\n : new GenericPromiseCapability(C);\n};\nvar PromiseCapability = GenericPromiseCapability = function(C){\n var resolve, reject;\n this.promise = new C(function($$resolve, $$reject){\n if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n};\nvar perform = function(exec){\n try {\n exec();\n } catch(e){\n return {error: e};\n }\n};\nvar notify = function(promise, isReject){\n if(promise._n)return;\n promise._n = true;\n var chain = promise._c;\n microtask(function(){\n var value = promise._v\n , ok = promise._s == 1\n , i = 0;\n var run = function(reaction){\n var handler = ok ? reaction.ok : reaction.fail\n , resolve = reaction.resolve\n , reject = reaction.reject\n , domain = reaction.domain\n , result, then;\n try {\n if(handler){\n if(!ok){\n if(promise._h == 2)onHandleUnhandled(promise);\n promise._h = 1;\n }\n if(handler === true)result = value;\n else {\n if(domain)domain.enter();\n result = handler(value);\n if(domain)domain.exit();\n }\n if(result === reaction.promise){\n reject(TypeError('Promise-chain cycle'));\n } else if(then = isThenable(result)){\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch(e){\n reject(e);\n }\n };\n while(chain.length > i)run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if(isReject && !promise._h)onUnhandled(promise);\n });\n};\nvar onUnhandled = function(promise){\n task.call(global, function(){\n var value = promise._v\n , abrupt, handler, console;\n if(isUnhandled(promise)){\n abrupt = perform(function(){\n if(isNode){\n process.emit('unhandledRejection', value, promise);\n } else if(handler = global.onunhandledrejection){\n handler({promise: promise, reason: value});\n } else if((console = global.console) && console.error){\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if(abrupt)throw abrupt.error;\n });\n};\nvar isUnhandled = function(promise){\n if(promise._h == 1)return false;\n var chain = promise._a || promise._c\n , i = 0\n , reaction;\n while(chain.length > i){\n reaction = chain[i++];\n if(reaction.fail || !isUnhandled(reaction.promise))return false;\n } return true;\n};\nvar onHandleUnhandled = function(promise){\n task.call(global, function(){\n var handler;\n if(isNode){\n process.emit('rejectionHandled', promise);\n } else if(handler = global.onrejectionhandled){\n handler({promise: promise, reason: promise._v});\n }\n });\n};\nvar $reject = function(value){\n var promise = this;\n if(promise._d)return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if(!promise._a)promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function(value){\n var promise = this\n , then;\n if(promise._d)return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if(promise === value)throw TypeError(\"Promise can't be resolved itself\");\n if(then = isThenable(value)){\n microtask(function(){\n var wrapper = {_w: promise, _d: false}; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch(e){\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch(e){\n $reject.call({_w: promise, _d: false}, e); // wrap\n }\n};\n\n// constructor polyfill\nif(!USE_NATIVE){\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor){\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch(err){\n $reject.call(this, err);\n }\n };\n Internal = function Promise(executor){\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected){\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if(this._a)this._a.push(reaction);\n if(this._s)notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function(onRejected){\n return this.then(undefined, onRejected);\n }\n });\n PromiseCapability = function(){\n var promise = new Internal;\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise});\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r){\n var capability = newPromiseCapability(this)\n , $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x){\n // instanceof instead of internal slot check because we should fix it without replacement native Promise core\n if(x instanceof $Promise && sameConstructor(x.constructor, this))return x;\n var capability = newPromiseCapability(this)\n , $$resolve = capability.resolve;\n $$resolve(x);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function(iter){\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable){\n var C = this\n , capability = newPromiseCapability(C)\n , resolve = capability.resolve\n , reject = capability.reject;\n var abrupt = perform(function(){\n var values = []\n , index = 0\n , remaining = 1;\n forOf(iterable, false, function(promise){\n var $index = index++\n , alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function(value){\n if(alreadyCalled)return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if(abrupt)reject(abrupt.error);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable){\n var C = this\n , capability = newPromiseCapability(C)\n , reject = capability.reject;\n var abrupt = perform(function(){\n forOf(iterable, false, function(promise){\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if(abrupt)reject(abrupt.error);\n return capability.promise;\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.promise.js\n// module id = 78\n// module chunks = 0","module.exports = function(it, Constructor, name, forbiddenField){\n if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_an-instance.js\n// module id = 79\n// module chunks = 0","var ctx = require('./_ctx')\n , call = require('./_iter-call')\n , isArrayIter = require('./_is-array-iter')\n , anObject = require('./_an-object')\n , toLength = require('./_to-length')\n , getIterFn = require('./core.get-iterator-method')\n , BREAK = {}\n , RETURN = {};\nvar exports = module.exports = function(iterable, entries, fn, that, ITERATOR){\n var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)\n , f = ctx(fn, that, entries ? 2 : 1)\n , index = 0\n , length, step, iterator, result;\n if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if(result === BREAK || result === RETURN)return result;\n } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){\n result = call(iterator, f, step.value, entries);\n if(result === BREAK || result === RETURN)return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_for-of.js\n// module id = 80\n// module chunks = 0","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object')\n , aFunction = require('./_a-function')\n , SPECIES = require('./_wks')('species');\nmodule.exports = function(O, D){\n var C = anObject(O).constructor, S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_species-constructor.js\n// module id = 81\n// module chunks = 0","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function(fn, args, that){\n var un = that === undefined;\n switch(args.length){\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_invoke.js\n// module id = 82\n// module chunks = 0","var global = require('./_global')\n , macrotask = require('./_task').set\n , Observer = global.MutationObserver || global.WebKitMutationObserver\n , process = global.process\n , Promise = global.Promise\n , isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function(){\n var head, last, notify;\n\n var flush = function(){\n var parent, fn;\n if(isNode && (parent = process.domain))parent.exit();\n while(head){\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch(e){\n if(head)notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if(parent)parent.enter();\n };\n\n // Node.js\n if(isNode){\n notify = function(){\n process.nextTick(flush);\n };\n // browsers with MutationObserver\n } else if(Observer){\n var toggle = true\n , node = document.createTextNode('');\n new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new\n notify = function(){\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if(Promise && Promise.resolve){\n var promise = Promise.resolve();\n notify = function(){\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function(){\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function(fn){\n var task = {fn: fn, next: undefined};\n if(last)last.next = task;\n if(!head){\n head = task;\n notify();\n } last = task;\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_microtask.js\n// module id = 83\n// module chunks = 0","var hide = require('./_hide');\nmodule.exports = function(target, src, safe){\n for(var key in src){\n if(safe && target[key])target[key] = src[key];\n else hide(target, key, src[key]);\n } return target;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_redefine-all.js\n// module id = 84\n// module chunks = 0","'use strict';\nvar global = require('./_global')\n , core = require('./_core')\n , dP = require('./_object-dp')\n , DESCRIPTORS = require('./_descriptors')\n , SPECIES = require('./_wks')('species');\n\nmodule.exports = function(KEY){\n var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];\n if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {\n configurable: true,\n get: function(){ return this; }\n });\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_set-species.js\n// module id = 85\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_86__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"vue\"\n// module id = 86\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_87__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"vuex\"\n// module id = 87\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_88__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"aws-sdk/global\"\n// module id = 88\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_89__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"aws-sdk/clients/lexruntime\"\n// module id = 89\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_90__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"aws-sdk/clients/polly\"\n// module id = 90\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"minimize\\\":true,\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-4973da9d\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./LexWeb.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./LexWeb.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-4973da9d\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./LexWeb.vue\"\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/LexWeb.vue\n// module id = 91\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/extract-text-webpack-plugin/dist/loader.js?{\"omit\":1,\"remove\":true}!./node_modules/vue-style-loader!./node_modules/css-loader?{\"minimize\":true,\"sourceMap\":true}!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-4973da9d\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/LexWeb.vue\n// module id = 92\n// module chunks = 0","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\n\n/* eslint no-console: [\"error\", { allow: [\"warn\", \"error\", \"info\"] }] */\nimport ToolbarContainer from '@/components/ToolbarContainer';\nimport MessageList from '@/components/MessageList';\nimport StatusBar from '@/components/StatusBar';\nimport InputContainer from '@/components/InputContainer';\n\nexport default {\n name: 'lex-web',\n components: {\n ToolbarContainer,\n MessageList,\n StatusBar,\n InputContainer,\n },\n computed: {\n initialSpeechInstruction() {\n return this.$store.state.config.lex.initialSpeechInstruction;\n },\n initialText() {\n return this.$store.state.config.lex.initialText;\n },\n textInputPlaceholder() {\n return this.$store.state.config.ui.textInputPlaceholder;\n },\n toolbarColor() {\n return this.$store.state.config.ui.toolbarColor;\n },\n toolbarTitle() {\n return this.$store.state.config.ui.toolbarTitle;\n },\n toolbarLogo() {\n return this.$store.state.config.ui.toolbarLogo;\n },\n isUiMinimized() {\n return this.$store.state.isUiMinimized;\n },\n },\n beforeMount() {\n if (this.$store.state.config.urlQueryParams.lexWebUiEmbed !== 'true') {\n console.info('running in standalone mode');\n this.$store.commit('setIsRunningEmbedded', false);\n this.$store.commit('setAwsCredsProvider', 'cognito');\n } else {\n // running embedded\n console.info('running in embedded mode from URL: ',\n document.location.href,\n );\n console.info('referrer (possible parent) URL: ', document.referrer);\n console.info('config parentOrigin:',\n this.$store.state.config.ui.parentOrigin,\n );\n if (!document.referrer\n .startsWith(this.$store.state.config.ui.parentOrigin)\n ) {\n console.warn(\n 'referrer origin: [%s] does not match configured parent origin: [%s]',\n document.referrer, this.$store.state.config.ui.parentOrigin,\n );\n }\n\n window.addEventListener('message', this.messageHandler, false);\n this.$store.commit('setIsRunningEmbedded', true);\n this.$store.commit('setAwsCredsProvider', 'parentWindow');\n }\n },\n mounted() {\n this.$store.dispatch('initConfig', this.$lexWebUi.config)\n .then(() => this.$store.dispatch('getConfigFromParent'))\n .then(config => (\n // avoid merging an empty config\n (Object.keys(config).length) ?\n this.$store.dispatch('initConfig', config) :\n Promise.resolve()\n ))\n .then(() =>\n Promise.all([\n this.$store.dispatch('initCredentials',\n this.$lexWebUi.awsConfig.credentials,\n ),\n this.$store.dispatch('initRecorder'),\n this.$store.dispatch('initBotAudio', new Audio()),\n ]),\n )\n .then(() =>\n Promise.all([\n this.$store.dispatch('initMessageList'),\n this.$store.dispatch('initPollyClient', this.$lexWebUi.pollyClient),\n this.$store.dispatch('initLexClient',\n this.$lexWebUi.lexRuntimeClient,\n ),\n ]),\n )\n .then(() => (\n (this.$store.state.isRunningEmbedded) ?\n this.$store.dispatch('sendMessageToParentWindow',\n { event: 'ready' },\n ) :\n Promise.resolve()\n ))\n .then(() =>\n console.info('sucessfully initialized lex web ui version: ',\n this.$store.state.version,\n ),\n )\n .catch((error) => {\n console.error('could not initialize application while mounting:',\n error,\n );\n });\n },\n methods: {\n toggleMinimizeUi() {\n return this.$store.dispatch('toggleIsUiMinimized');\n },\n // messages from parent\n messageHandler(evt) {\n // security check\n if (evt.origin !== this.$store.state.config.ui.parentOrigin) {\n console.warn('ignoring event - invalid origin:', evt.origin);\n return;\n }\n if (!evt.ports) {\n console.warn('postMessage not sent over MessageChannel', evt);\n return;\n }\n switch (evt.data.event) {\n case 'ping':\n console.info('pong - ping received from parent');\n evt.ports[0].postMessage({\n event: 'resolve',\n type: evt.data.event,\n });\n break;\n // received when the parent page has loaded the iframe\n case 'parentReady':\n evt.ports[0].postMessage({ event: 'resolve', type: evt.data.event });\n break;\n case 'toggleMinimizeUi':\n this.$store.dispatch('toggleIsUiMinimized')\n .then(() => {\n evt.ports[0].postMessage(\n { event: 'resolve', type: evt.data.event },\n );\n });\n break;\n case 'postText':\n if (!evt.data.message) {\n evt.ports[0].postMessage({\n event: 'reject',\n type: evt.data.event,\n error: 'missing message field',\n });\n return;\n }\n\n this.$store.dispatch('postTextMessage',\n { type: 'human', text: evt.data.message },\n )\n .then(() => {\n evt.ports[0].postMessage(\n { event: 'resolve', type: evt.data.event },\n );\n });\n break;\n default:\n console.warn('unknown message in messageHanlder', evt);\n break;\n }\n },\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/LexWeb.vue","require('../../modules/es6.object.keys');\nmodule.exports = require('../../modules/_core').Object.keys;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/object/keys.js\n// module id = 94\n// module chunks = 0","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object')\n , $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function(){\n return function keys(it){\n return $keys(toObject(it));\n };\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.object.keys.js\n// module id = 95\n// module chunks = 0","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export')\n , core = require('./_core')\n , fails = require('./_fails');\nmodule.exports = function(KEY, exec){\n var fn = (core.Object || {})[KEY] || Object[KEY]\n , exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-sap.js\n// module id = 96\n// module chunks = 0","var normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./ToolbarContainer.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-59f58ea4\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./ToolbarContainer.vue\"\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/ToolbarContainer.vue\n// module id = 97\n// module chunks = 0","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\nexport default {\n name: 'toolbar-container',\n props: ['toolbarTitle', 'toolbarColor', 'toolbarLogo', 'isUiMinimized'],\n computed: {\n toolTipMinimize() {\n return {\n html: (this.isUiMinimized) ? 'maximize' : 'minimize',\n };\n },\n },\n methods: {\n toggleMinimize() {\n this.$emit('toggleMinimizeUi');\n },\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/ToolbarContainer.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('v-toolbar', {\n class: _vm.toolbarColor,\n attrs: {\n \"dark\": \"\",\n \"dense\": \"\"\n }\n }, [_c('img', {\n attrs: {\n \"src\": _vm.toolbarLogo\n }\n }), _vm._v(\" \"), _c('v-toolbar-title', {\n staticClass: \"hidden-xs-and-down\"\n }, [_vm._v(\"\\n \" + _vm._s(_vm.toolbarTitle) + \"\\n \")]), _vm._v(\" \"), _c('v-spacer'), _vm._v(\" \"), (_vm.$store.state.isRunningEmbedded) ? _c('v-btn', {\n directives: [{\n name: \"tooltip\",\n rawName: \"v-tooltip:left\",\n value: (_vm.toolTipMinimize),\n expression: \"toolTipMinimize\",\n arg: \"left\"\n }],\n attrs: {\n \"icon\": \"\",\n \"light\": \"\"\n },\n nativeOn: {\n \"click\": function($event) {\n _vm.toggleMinimize($event)\n }\n }\n }, [_c('v-icon', [_vm._v(\"\\n \" + _vm._s(_vm.isUiMinimized ? 'arrow_drop_up' : 'arrow_drop_down') + \"\\n \")])], 1) : _vm._e()], 1)\n}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-59f58ea4\",\"hasScoped\":false,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/ToolbarContainer.vue\n// module id = 99\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"minimize\\\":true,\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-20b8f18d\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./MessageList.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./MessageList.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-20b8f18d\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./MessageList.vue\"\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-20b8f18d\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/MessageList.vue\n// module id = 100\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/extract-text-webpack-plugin/dist/loader.js?{\"omit\":1,\"remove\":true}!./node_modules/vue-style-loader!./node_modules/css-loader?{\"minimize\":true,\"sourceMap\":true}!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-20b8f18d\",\"scoped\":true,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/MessageList.vue\n// module id = 101\n// module chunks = 0","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\nimport Message from './Message';\n\nexport default {\n name: 'message-list',\n components: {\n Message,\n },\n computed: {\n messages() {\n return this.$store.state.messages;\n },\n },\n watch: {\n // autoscroll message list to the bottom when messages change\n messages() {\n this.$nextTick(() => {\n this.$el.scrollTop = this.$el.scrollHeight;\n });\n },\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/MessageList.vue","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"minimize\\\":true,\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-290c8f4f\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./Message.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./Message.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-290c8f4f\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./Message.vue\"\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-290c8f4f\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/Message.vue\n// module id = 103\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/extract-text-webpack-plugin/dist/loader.js?{\"omit\":1,\"remove\":true}!./node_modules/vue-style-loader!./node_modules/css-loader?{\"minimize\":true,\"sourceMap\":true}!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-290c8f4f\",\"scoped\":true,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/Message.vue\n// module id = 104\n// module chunks = 0","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\nimport MessageText from './MessageText';\nimport ResponseCard from './ResponseCard';\n\nexport default {\n name: 'message',\n props: ['message'],\n components: {\n MessageText,\n ResponseCard,\n },\n computed: {\n botDialogState() {\n if (!('dialogState' in this.message)) {\n return null;\n }\n switch (this.message.dialogState) {\n case 'Failed':\n return { icon: 'error', color: 'red' };\n case 'Fulfilled':\n case 'ReadyForFulfillment':\n return { icon: 'done', color: 'green' };\n default :\n return null;\n }\n },\n shouldDisplayResponseCard() {\n return (\n this.message.responseCard &&\n (this.message.responseCard.version === '1' ||\n this.message.responseCard.version === 1) &&\n this.message.responseCard.contentType === 'application/vnd.amazonaws.card.generic' &&\n 'genericAttachments' in this.message.responseCard &&\n this.message.responseCard.genericAttachments instanceof Array\n );\n },\n },\n methods: {\n playAudio() {\n // XXX doesn't play in Firefox or Edge\n /* XXX also tried:\n const audio = new Audio(this.message.audio);\n audio.play();\n */\n const audioElem = this.$el.querySelector('audio');\n if (audioElem) {\n audioElem.play();\n }\n },\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/Message.vue","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"minimize\\\":true,\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-d69cb2c8\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./MessageText.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./MessageText.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-d69cb2c8\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./MessageText.vue\"\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-d69cb2c8\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/MessageText.vue\n// module id = 106\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/extract-text-webpack-plugin/dist/loader.js?{\"omit\":1,\"remove\":true}!./node_modules/vue-style-loader!./node_modules/css-loader?{\"minimize\":true,\"sourceMap\":true}!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-d69cb2c8\",\"scoped\":true,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/MessageText.vue\n// module id = 107\n// module chunks = 0","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\nexport default {\n name: 'message-text',\n props: ['message'],\n computed: {\n shouldConvertUrlToLinks() {\n return this.$store.state.config.ui.convertUrlToLinksInBotMessages;\n },\n shouldStripTags() {\n return this.$store.state.config.ui.stripTagsFromBotMessages;\n },\n shouldRenderAsHtml() {\n return (this.message.type === 'bot' && this.shouldConvertUrlToLinks);\n },\n botMessageAsHtml() {\n // Security Note: Make sure that the content is escaped according\n // to context (e.g. URL, HTML). This is rendered as HTML\n const messageText = this.stripTagsFromMessage(this.message.text);\n const messageWithLinks = this.botMessageWithLinks(messageText);\n return messageWithLinks;\n },\n },\n methods: {\n encodeAsHtml(value) {\n return value\n .replace(/&/g, '&')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n .replace(//g, '>');\n },\n botMessageWithLinks(messageText) {\n const linkReplacers = [\n // The regex in the objects of linkReplacers should return a single\n // reference (from parenthesis) with the whole address\n // The replace function takes a matched url and returns the\n // hyperlink that will be replaced in the message\n {\n type: 'web',\n regex: new RegExp(\n '\\\\b((?:https?://\\\\w{1}|www\\\\.)(?:[\\\\w-.]){2,256}' +\n '(?:[\\\\w._~:/?#@!$&()*+,;=[\\'\\\\]-]){0,256})',\n 'im',\n ),\n replace: (item) => {\n const url = (!/^https?:\\/\\//.test(item)) ? `http://${item}` : item;\n return '${this.encodeAsHtml(item)}`;\n },\n },\n ];\n // TODO avoid double HTML encoding when there's more than 1 linkReplacer\n return linkReplacers\n .reduce((message, replacer) =>\n // splits the message into an array containing content chunks and links.\n // Content chunks will be the even indexed items in the array\n // (or empty string when applicable).\n // Links (if any) will be the odd members of the array since the\n // regex keeps references.\n message.split(replacer.regex)\n .reduce((messageAccum, item, index, array) => {\n let messageResult = '';\n if ((index % 2) === 0) {\n const urlItem = ((index + 1) === array.length) ?\n '' : replacer.replace(array[index + 1]);\n messageResult = `${this.encodeAsHtml(item)}${urlItem}`;\n }\n return messageAccum + messageResult;\n }, '')\n , messageText);\n },\n // used for stripping SSML (and other) tags from bot responses\n stripTagsFromMessage(messageText) {\n const doc = document.implementation.createHTMLDocument('').body;\n doc.innerHTML = messageText;\n return doc.textContent || doc.innerText || '';\n },\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/MessageText.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return (_vm.message.text && _vm.message.type === 'human') ? _c('div', {\n staticClass: \"message-text\"\n }, [_vm._v(\"\\n \" + _vm._s(_vm.message.text) + \"\\n\")]) : (_vm.message.text && _vm.shouldRenderAsHtml) ? _c('div', {\n staticClass: \"message-text\",\n domProps: {\n \"innerHTML\": _vm._s(_vm.botMessageAsHtml)\n }\n }) : (_vm.message.text && _vm.message.type === 'bot') ? _c('div', {\n staticClass: \"message-text\"\n }, [_vm._v(\"\\n \" + _vm._s((_vm.shouldStripTags) ? _vm.stripTagsFromMessage(_vm.message.text) : _vm.message.text) + \"\\n\")]) : _vm._e()\n}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-d69cb2c8\",\"hasScoped\":true,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/MessageText.vue\n// module id = 109\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"minimize\\\":true,\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-799b9a4e\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./ResponseCard.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./ResponseCard.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-799b9a4e\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./ResponseCard.vue\"\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-799b9a4e\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/ResponseCard.vue\n// module id = 110\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/extract-text-webpack-plugin/dist/loader.js?{\"omit\":1,\"remove\":true}!./node_modules/vue-style-loader!./node_modules/css-loader?{\"minimize\":true,\"sourceMap\":true}!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-799b9a4e\",\"scoped\":true,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/ResponseCard.vue\n// module id = 111\n// module chunks = 0","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\nexport default {\n name: 'response-card',\n props: ['response-card'],\n data() {\n return {\n hasButtonBeenClicked: false,\n };\n },\n computed: {\n },\n methods: {\n onButtonClick(value) {\n this.hasButtonBeenClicked = true;\n const message = {\n type: 'human',\n text: value,\n };\n\n this.$store.dispatch('postTextMessage', message);\n },\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/ResponseCard.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('v-card', [(_vm.responseCard.title.trim()) ? _c('v-card-title', {\n staticClass: \"red lighten-5\",\n attrs: {\n \"primary-title\": \"\"\n }\n }, [_c('span', {\n staticClass: \"headline\"\n }, [_vm._v(_vm._s(_vm.responseCard.title))])]) : _vm._e(), _vm._v(\" \"), (_vm.responseCard.subTitle) ? _c('v-card-text', [_c('span', [_vm._v(_vm._s(_vm.responseCard.subTitle))])]) : _vm._e(), _vm._v(\" \"), (_vm.responseCard.imageUrl) ? _c('v-card-media', {\n attrs: {\n \"src\": _vm.responseCard.imageUrl,\n \"contain\": \"\",\n \"height\": \"33vh\"\n }\n }) : _vm._e(), _vm._v(\" \"), _vm._l((_vm.responseCard.buttons), function(button, index) {\n return _c('v-card-actions', {\n key: index,\n staticClass: \"button-row\",\n attrs: {\n \"actions\": \"\"\n }\n }, [(button.text && button.value) ? _c('v-btn', {\n attrs: {\n \"disabled\": _vm.hasButtonBeenClicked,\n \"default\": \"\"\n },\n nativeOn: {\n \"~click\": function($event) {\n _vm.onButtonClick(button.value)\n }\n }\n }, [_vm._v(\"\\n \" + _vm._s(button.text) + \"\\n \")]) : _vm._e()], 1)\n }), _vm._v(\" \"), (_vm.responseCard.attachmentLinkUrl) ? _c('v-card-actions', [_c('v-btn', {\n staticClass: \"red lighten-5\",\n attrs: {\n \"flat\": \"\",\n \"tag\": \"a\",\n \"href\": _vm.responseCard.attachmentLinkUrl,\n \"target\": \"_blank\"\n }\n }, [_vm._v(\"\\n Open Link\\n \")])], 1) : _vm._e()], 2)\n}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-799b9a4e\",\"hasScoped\":true,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/ResponseCard.vue\n// module id = 113\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('v-flex', {\n staticClass: \"message\"\n }, [_c('v-chip', [('text' in _vm.message && _vm.message.text !== null && _vm.message.text.length) ? _c('message-text', {\n attrs: {\n \"message\": _vm.message\n }\n }) : _vm._e(), _vm._v(\" \"), (_vm.message.type === 'human' && _vm.message.audio) ? _c('div', [_c('audio', [_c('source', {\n attrs: {\n \"src\": _vm.message.audio,\n \"type\": \"audio/wav\"\n }\n })]), _vm._v(\" \"), _c('v-btn', {\n staticClass: \"black--text\",\n attrs: {\n \"left\": \"\",\n \"icon\": \"\"\n },\n nativeOn: {\n \"click\": function($event) {\n _vm.playAudio($event)\n }\n }\n }, [_c('v-icon', {\n staticClass: \"play-button\"\n }, [_vm._v(\"play_circle_outline\")])], 1)], 1) : _vm._e(), _vm._v(\" \"), (_vm.message.type === 'bot' && _vm.botDialogState) ? _c('v-icon', {\n class: _vm.botDialogState.color + '--text',\n attrs: {\n \"medium\": \"\"\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.botDialogState.icon) + \"\\n \")]) : _vm._e()], 1), _vm._v(\" \"), (_vm.shouldDisplayResponseCard) ? _c('div', {\n staticClass: \"response-card\"\n }, _vm._l((_vm.message.responseCard.genericAttachments), function(card, index) {\n return _c('response-card', {\n key: index,\n attrs: {\n \"response-card\": card\n }\n })\n })) : _vm._e()], 1)\n}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-290c8f4f\",\"hasScoped\":true,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/Message.vue\n// module id = 114\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('v-layout', {\n staticClass: \"message-list\"\n }, _vm._l((_vm.messages), function(message) {\n return _c('message', {\n key: message.id,\n class: (\"message-\" + (message.type)),\n attrs: {\n \"message\": message\n }\n })\n }))\n}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-20b8f18d\",\"hasScoped\":true,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/MessageList.vue\n// module id = 115\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"minimize\\\":true,\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-2df12d09\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./StatusBar.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./StatusBar.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-2df12d09\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./StatusBar.vue\"\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-2df12d09\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/StatusBar.vue\n// module id = 116\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/extract-text-webpack-plugin/dist/loader.js?{\"omit\":1,\"remove\":true}!./node_modules/vue-style-loader!./node_modules/css-loader?{\"minimize\":true,\"sourceMap\":true}!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-2df12d09\",\"scoped\":true,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/StatusBar.vue\n// module id = 117\n// module chunks = 0","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\n\nexport default {\n name: 'status-bar',\n data() {\n return ({\n volume: 0,\n volumeIntervalId: null,\n });\n },\n computed: {\n isSpeechConversationGoing() {\n return this.isConversationGoing;\n },\n isProcessing() {\n return (\n this.isSpeechConversationGoing &&\n !this.isRecording &&\n !this.isBotSpeaking\n );\n },\n statusText() {\n if (this.isInterrupting) {\n return 'Interrupting...';\n }\n if (this.canInterruptBotPlayback) {\n return 'Say \"skip\" and I\\'ll listen for your answer...';\n }\n if (this.isMicMuted) {\n return 'Microphone seems to be muted...';\n }\n if (this.isRecording) {\n return 'Listening...';\n }\n if (this.isBotSpeaking) {\n return 'Playing audio...';\n }\n if (this.isSpeechConversationGoing) {\n return 'Processing...';\n }\n if (this.isRecorderSupported) {\n return 'Type or click on the mic';\n }\n return '';\n },\n canInterruptBotPlayback() {\n return this.$store.state.botAudio.canInterrupt;\n },\n isBotSpeaking() {\n return this.$store.state.botAudio.isSpeaking;\n },\n isConversationGoing() {\n return this.$store.state.recState.isConversationGoing;\n },\n isMicMuted() {\n return this.$store.state.recState.isMicMuted;\n },\n isRecorderSupported() {\n return this.$store.state.recState.isRecorderSupported;\n },\n isRecording() {\n return this.$store.state.recState.isRecording;\n },\n },\n methods: {\n enterMeter() {\n const intervalTime = 50;\n let max = 0;\n this.volumeIntervalId = setInterval(() => {\n this.$store.dispatch('getRecorderVolume')\n .then((volume) => {\n this.volume = volume.instant.toFixed(4);\n max = Math.max(this.volume, max);\n });\n }, intervalTime);\n },\n leaveMeter() {\n if (this.volumeIntervalId) {\n clearInterval(this.volumeIntervalId);\n }\n },\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/StatusBar.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"status-bar white\"\n }, [_c('v-divider'), _vm._v(\" \"), _c('div', {\n staticClass: \"status-text\"\n }, [_c('span', [_vm._v(_vm._s(_vm.statusText))])]), _vm._v(\" \"), _c('div', {\n staticClass: \"voice-controls\"\n }, [_c('transition', {\n attrs: {\n \"css\": false\n },\n on: {\n \"enter\": _vm.enterMeter,\n \"leave\": _vm.leaveMeter\n }\n }, [(_vm.isRecording) ? _c('div', {\n staticClass: \"ml-2 volume-meter\"\n }, [_c('meter', {\n attrs: {\n \"value\": _vm.volume,\n \"min\": \"0.0001\",\n \"low\": \"0.005\",\n \"optimum\": \"0.04\",\n \"high\": \"0.07\",\n \"max\": \"0.09\"\n }\n })]) : _vm._e()])], 1)], 1)\n}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-2df12d09\",\"hasScoped\":true,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/StatusBar.vue\n// module id = 119\n// module chunks = 0","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"minimize\\\":true,\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-6dd14e82\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./InputContainer.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./InputContainer.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-6dd14e82\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./InputContainer.vue\"\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-6dd14e82\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/InputContainer.vue\n// module id = 120\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/extract-text-webpack-plugin/dist/loader.js?{\"omit\":1,\"remove\":true}!./node_modules/vue-style-loader!./node_modules/css-loader?{\"minimize\":true,\"sourceMap\":true}!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-6dd14e82\",\"scoped\":true,\"hasInlineConfig\":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/InputContainer.vue\n// module id = 121\n// module chunks = 0","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\n/* eslint no-console: [\"error\", { allow: [\"warn\", \"error\"] }] */\n\nexport default {\n name: 'input-container',\n data() {\n return {\n textInput: '',\n };\n },\n computed: {\n micButtonIcon() {\n if (this.isMicMuted) {\n return 'mic_off';\n }\n if (this.isBotSpeaking) {\n return 'stop';\n }\n return 'mic';\n },\n micTooltip() {\n if (this.isMicMuted) {\n return 'mic seems to be muted';\n }\n if (this.isBotSpeaking) {\n return 'interrupt';\n }\n return 'click to use voice';\n },\n isMicButtonDisabled() {\n return this.isMicMuted;\n },\n isBotSpeaking() {\n return this.$store.state.botAudio.isSpeaking;\n },\n isConversationGoing() {\n return this.$store.state.recState.isConversationGoing;\n },\n isMicMuted() {\n return this.$store.state.recState.isMicMuted;\n },\n isRecorderSupported() {\n return this.$store.state.recState.isRecorderSupported;\n },\n },\n props: ['textInputPlaceholder', 'initialSpeechInstruction', 'initialText'],\n methods: {\n postTextMessage() {\n // empty string\n if (!this.textInput.length) {\n return Promise.resolve();\n }\n const message = {\n type: 'human',\n text: this.textInput,\n };\n\n return this.$store.dispatch('postTextMessage', message)\n .then(() => {\n this.textInput = '';\n });\n },\n onMicClick() {\n if (!this.isConversationGoing) {\n return this.startSpeechConversation();\n } else if (this.isBotSpeaking) {\n return this.$store.dispatch('interruptSpeechConversation');\n }\n\n return Promise.resolve();\n },\n startSpeechConversation() {\n if (this.isMicMuted) {\n return Promise.resolve();\n }\n return this.setAutoPlay()\n .then(() => this.playInitialInstruction())\n .then(() => this.$store.dispatch('startConversation'))\n .catch((error) => {\n console.error('error in startSpeechConversation', error);\n this.$store.dispatch('pushErrorMessage',\n `I couldn't start the conversation. Please try again. (${error})`,\n );\n });\n },\n playInitialInstruction() {\n const isInitialState = ['', 'Fulfilled', 'Failed']\n .some(initialState =>\n this.$store.state.lex.dialogState === initialState,\n );\n\n return (isInitialState) ?\n this.$store.dispatch('pollySynthesizeSpeech',\n this.initialSpeechInstruction,\n ) :\n Promise.resolve();\n },\n /**\n * Set auto-play attribute on audio element\n * On mobile, Audio nodes do not autoplay without user interaction.\n * To workaround that requirement, this plays a short silent audio mp3/ogg\n * as a reponse to a click. This silent audio is initialized as the src\n * of the audio node. Subsequent play on the same audio now\n * don't require interaction so this is only done once.\n */\n setAutoPlay() {\n if (this.$store.state.botAudio.autoPlay) {\n return Promise.resolve();\n }\n return this.$store.dispatch('setAudioAutoPlay');\n },\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/InputContainer.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"input-container white\"\n }, [_c('v-text-field', {\n staticClass: \"black--text ml-2 pt-3 pb-0\",\n attrs: {\n \"id\": \"text-input\",\n \"name\": \"text-input\",\n \"label\": _vm.textInputPlaceholder,\n \"single-line\": \"\"\n },\n nativeOn: {\n \"keyup\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13)) { return null; }\n $event.stopPropagation();\n _vm.postTextMessage($event)\n }\n },\n model: {\n value: (_vm.textInput),\n callback: function($$v) {\n _vm.textInput = (typeof $$v === 'string' ? $$v.trim() : $$v)\n },\n expression: \"textInput\"\n }\n }), _vm._v(\" \"), (_vm.isRecorderSupported) ? _c('v-btn', {\n directives: [{\n name: \"tooltip\",\n rawName: \"v-tooltip:left\",\n value: ({\n html: _vm.micTooltip\n }),\n expression: \"{html: micTooltip}\",\n arg: \"left\"\n }],\n staticClass: \"black--text mic-button\",\n attrs: {\n \"icon\": \"\",\n \"disabled\": _vm.isMicButtonDisabled\n },\n nativeOn: {\n \"click\": function($event) {\n _vm.onMicClick($event)\n }\n }\n }, [_c('v-icon', {\n attrs: {\n \"medium\": \"\"\n }\n }, [_vm._v(_vm._s(_vm.micButtonIcon))])], 1) : _vm._e()], 1)\n}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-6dd14e82\",\"hasScoped\":true,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/InputContainer.vue\n// module id = 123\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n attrs: {\n \"id\": \"lex-web\"\n }\n }, [_c('toolbar-container', {\n attrs: {\n \"toolbar-title\": _vm.toolbarTitle,\n \"toolbar-color\": _vm.toolbarColor,\n \"toolbar-logo\": _vm.toolbarLogo,\n \"is-ui-minimized\": _vm.isUiMinimized\n },\n on: {\n \"toggleMinimizeUi\": _vm.toggleMinimizeUi\n }\n }), _vm._v(\" \"), _c('message-list'), _vm._v(\" \"), _c('status-bar'), _vm._v(\" \"), _c('input-container', {\n attrs: {\n \"text-input-placeholder\": _vm.textInputPlaceholder,\n \"initial-text\": _vm.initialText,\n \"initial-speech-instruction\": _vm.initialSpeechInstruction\n }\n })], 1)\n}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-4973da9d\",\"hasScoped\":false,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/LexWeb.vue\n// module id = 124\n// module chunks = 0","/*\n Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Licensed under the Amazon Software License (the \"License\"). You may not use this file\n except in compliance with the License. A copy of the License is located at\n\n http://aws.amazon.com/asl/\n\n or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\n BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\n License for the specific language governing permissions and limitations under the License.\n */\n\n/* global atob Blob URL */\n/* eslint no-console: [\"error\", { allow: [\"info\", \"warn\", \"error\"] }] */\n/* eslint no-param-reassign: off */\n\nimport initialState from '@/store/state';\nimport getters from '@/store/getters';\nimport mutations from '@/store/mutations';\nimport actions from '@/store/actions';\n\nexport default {\n // prevent changes outside of mutation handlers\n strict: (process.env.NODE_ENV === 'development'),\n state: initialState,\n getters,\n mutations,\n actions,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/index.js","/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\n\n/**\n * Sets up the initial state of the store\n */\nimport { config } from '@/config';\n\nexport default {\n version: (process.env.PACKAGE_VERSION) ?\n process.env.PACKAGE_VERSION : '0.0.0',\n lex: {\n acceptFormat: 'audio/ogg',\n dialogState: '',\n isInterrupting: false,\n isProcessing: false,\n inputTranscript: '',\n intentName: '',\n message: '',\n responseCard: null,\n sessionAttributes: (\n config.lex &&\n config.lex.sessionAttributes &&\n typeof config.lex.sessionAttributes === 'object'\n ) ? { ...config.lex.sessionAttributes } : {},\n slotToElicit: '',\n slots: {},\n },\n messages: [],\n polly: {\n outputFormat: 'ogg_vorbis',\n voiceId: (\n config.polly &&\n config.polly.voiceId &&\n typeof config.polly.voiceId === 'string'\n ) ? `${config.polly.voiceId}` : 'Joanna',\n },\n botAudio: {\n canInterrupt: false,\n interruptIntervalId: null,\n autoPlay: false,\n isInterrupting: false,\n isSpeaking: false,\n },\n recState: {\n isConversationGoing: false,\n isInterrupting: false,\n isMicMuted: false,\n isMicQuiet: true,\n isRecorderSupported: false,\n isRecorderEnabled: (config.recorder) ? !!config.recorder.enable : true,\n isRecording: false,\n silentRecordingCount: 0,\n },\n\n isRunningEmbedded: false, // am I running in an iframe?\n isUiMinimized: false, // when running embedded, is the iframe minimized?\n config,\n\n awsCreds: {\n provider: 'cognito', // cognito|parentWindow\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/state.js","module.exports = { \"default\": require(\"core-js/library/fn/symbol/iterator\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/symbol/iterator.js\n// module id = 127\n// module chunks = 0","require('../../modules/es6.string.iterator');\nrequire('../../modules/web.dom.iterable');\nmodule.exports = require('../../modules/_wks-ext').f('iterator');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/symbol/iterator.js\n// module id = 128\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/symbol\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/symbol.js\n// module id = 129\n// module chunks = 0","require('../../modules/es6.symbol');\nrequire('../../modules/es6.object.to-string');\nrequire('../../modules/es7.symbol.async-iterator');\nrequire('../../modules/es7.symbol.observable');\nmodule.exports = require('../../modules/_core').Symbol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/symbol/index.js\n// module id = 130\n// module chunks = 0","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global')\n , has = require('./_has')\n , DESCRIPTORS = require('./_descriptors')\n , $export = require('./_export')\n , redefine = require('./_redefine')\n , META = require('./_meta').KEY\n , $fails = require('./_fails')\n , shared = require('./_shared')\n , setToStringTag = require('./_set-to-string-tag')\n , uid = require('./_uid')\n , wks = require('./_wks')\n , wksExt = require('./_wks-ext')\n , wksDefine = require('./_wks-define')\n , keyOf = require('./_keyof')\n , enumKeys = require('./_enum-keys')\n , isArray = require('./_is-array')\n , anObject = require('./_an-object')\n , toIObject = require('./_to-iobject')\n , toPrimitive = require('./_to-primitive')\n , createDesc = require('./_property-desc')\n , _create = require('./_object-create')\n , gOPNExt = require('./_object-gopn-ext')\n , $GOPD = require('./_object-gopd')\n , $DP = require('./_object-dp')\n , $keys = require('./_object-keys')\n , gOPD = $GOPD.f\n , dP = $DP.f\n , gOPN = gOPNExt.f\n , $Symbol = global.Symbol\n , $JSON = global.JSON\n , _stringify = $JSON && $JSON.stringify\n , PROTOTYPE = 'prototype'\n , HIDDEN = wks('_hidden')\n , TO_PRIMITIVE = wks('toPrimitive')\n , isEnum = {}.propertyIsEnumerable\n , SymbolRegistry = shared('symbol-registry')\n , AllSymbols = shared('symbols')\n , OPSymbols = shared('op-symbols')\n , ObjectProto = Object[PROTOTYPE]\n , USE_NATIVE = typeof $Symbol == 'function'\n , QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function(){\n return _create(dP({}, 'a', {\n get: function(){ return dP(this, 'a', {value: 7}).a; }\n })).a != 7;\n}) ? function(it, key, D){\n var protoDesc = gOPD(ObjectProto, key);\n if(protoDesc)delete ObjectProto[key];\n dP(it, key, D);\n if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function(tag){\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){\n return typeof it == 'symbol';\n} : function(it){\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D){\n if(it === ObjectProto)$defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if(has(AllSymbols, key)){\n if(!D.enumerable){\n if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;\n D = _create(D, {enumerable: createDesc(0, false)});\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P){\n anObject(it);\n var keys = enumKeys(P = toIObject(P))\n , i = 0\n , l = keys.length\n , key;\n while(l > i)$defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P){\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key){\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){\n it = toIObject(it);\n key = toPrimitive(key, true);\n if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;\n var D = gOPD(it, key);\n if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it){\n var names = gOPN(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i){\n if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it){\n var IS_OP = it === ObjectProto\n , names = gOPN(IS_OP ? OPSymbols : toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i){\n if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif(!USE_NATIVE){\n $Symbol = function Symbol(){\n if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function(value){\n if(this === ObjectProto)$set.call(OPSymbols, value);\n if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString(){\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n require('./_object-pie').f = $propertyIsEnumerable;\n require('./_object-gops').f = $getOwnPropertySymbols;\n\n if(DESCRIPTORS && !require('./_library')){\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function(name){\n return wrap(wks(name));\n }\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});\n\nfor(var symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);\n\nfor(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function(key){\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(key){\n if(isSymbol(key))return keyOf(SymbolRegistry, key);\n throw TypeError(key + ' is not a symbol!');\n },\n useSetter: function(){ setter = true; },\n useSimple: function(){ setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it){\n if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined\n var args = [it]\n , i = 1\n , replacer, $replacer;\n while(arguments.length > i)args.push(arguments[i++]);\n replacer = args[1];\n if(typeof replacer == 'function')$replacer = replacer;\n if($replacer || !isArray(replacer))replacer = function(key, value){\n if($replacer)value = $replacer.call(this, key, value);\n if(!isSymbol(value))return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.symbol.js\n// module id = 131\n// module chunks = 0","var META = require('./_uid')('meta')\n , isObject = require('./_is-object')\n , has = require('./_has')\n , setDesc = require('./_object-dp').f\n , id = 0;\nvar isExtensible = Object.isExtensible || function(){\n return true;\n};\nvar FREEZE = !require('./_fails')(function(){\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function(it){\n setDesc(it, META, {value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n }});\n};\nvar fastKey = function(it, create){\n // return primitive with prefix\n if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if(!has(it, META)){\n // can't set metadata to uncaught frozen object\n if(!isExtensible(it))return 'F';\n // not necessary to add metadata\n if(!create)return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function(it, create){\n if(!has(it, META)){\n // can't set metadata to uncaught frozen object\n if(!isExtensible(it))return true;\n // not necessary to add metadata\n if(!create)return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function(it){\n if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_meta.js\n// module id = 132\n// module chunks = 0","var getKeys = require('./_object-keys')\n , toIObject = require('./_to-iobject');\nmodule.exports = function(object, el){\n var O = toIObject(object)\n , keys = getKeys(O)\n , length = keys.length\n , index = 0\n , key;\n while(length > index)if(O[key = keys[index++]] === el)return key;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_keyof.js\n// module id = 133\n// module chunks = 0","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys')\n , gOPS = require('./_object-gops')\n , pIE = require('./_object-pie');\nmodule.exports = function(it){\n var result = getKeys(it)\n , getSymbols = gOPS.f;\n if(getSymbols){\n var symbols = getSymbols(it)\n , isEnum = pIE.f\n , i = 0\n , key;\n while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);\n } return result;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_enum-keys.js\n// module id = 134\n// module chunks = 0","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg){\n return cof(arg) == 'Array';\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_is-array.js\n// module id = 135\n// module chunks = 0","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject')\n , gOPN = require('./_object-gopn').f\n , toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function(it){\n try {\n return gOPN(it);\n } catch(e){\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it){\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-gopn-ext.js\n// module id = 136\n// module chunks = 0","var pIE = require('./_object-pie')\n , createDesc = require('./_property-desc')\n , toIObject = require('./_to-iobject')\n , toPrimitive = require('./_to-primitive')\n , has = require('./_has')\n , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n , gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P){\n O = toIObject(O);\n P = toPrimitive(P, true);\n if(IE8_DOM_DEFINE)try {\n return gOPD(O, P);\n } catch(e){ /* empty */ }\n if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-gopd.js\n// module id = 137\n// module chunks = 0","require('./_wks-define')('asyncIterator');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es7.symbol.async-iterator.js\n// module id = 138\n// module chunks = 0","require('./_wks-define')('observable');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es7.symbol.observable.js\n// module id = 139\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (obj, key, value) {\n if (key in obj) {\n (0, _defineProperty2.default)(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/defineProperty.js\n// module id = 140\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/is-iterable\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/is-iterable.js\n// module id = 141\n// module chunks = 0","require('../modules/web.dom.iterable');\nrequire('../modules/es6.string.iterator');\nmodule.exports = require('../modules/core.is-iterable');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/is-iterable.js\n// module id = 142\n// module chunks = 0","var classof = require('./_classof')\n , ITERATOR = require('./_wks')('iterator')\n , Iterators = require('./_iterators');\nmodule.exports = require('./_core').isIterable = function(it){\n var O = Object(it);\n return O[ITERATOR] !== undefined\n || '@@iterator' in O\n || Iterators.hasOwnProperty(classof(O));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/core.is-iterable.js\n// module id = 143\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/get-iterator\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/get-iterator.js\n// module id = 144\n// module chunks = 0","require('../modules/web.dom.iterable');\nrequire('../modules/es6.string.iterator');\nmodule.exports = require('../modules/core.get-iterator');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/get-iterator.js\n// module id = 145\n// module chunks = 0","var anObject = require('./_an-object')\n , get = require('./core.get-iterator-method');\nmodule.exports = require('./_core').getIterator = function(it){\n var iterFn = get(it);\n if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');\n return anObject(iterFn.call(it));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/core.get-iterator.js\n// module id = 146\n// module chunks = 0","var map = {\n\t\"./config.dev.json\": 148,\n\t\"./config.prod.json\": 149,\n\t\"./config.test.json\": 150\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 147;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/config ^\\.\\/config\\..*\\.json$\n// module id = 147\n// module chunks = 0","module.exports = {\"cognito\":{\"poolId\":\"\"},\"lex\":{\"botName\":\"WebUiOrderFlowers\",\"initialText\":\"You can ask me for help ordering flowers. Just type \\\"order flowers\\\" or click on the mic and say it.\",\"initialSpeechInstruction\":\"Say 'Order Flowers' to get started.\"},\"polly\":{\"voiceId\":\"Salli\"},\"ui\":{\"parentOrigin\":\"http://localhost:8080\",\"pageTitle\":\"Order Flowers Bot\",\"toolbarTitle\":\"Order Flowers\"},\"recorder\":{\"preset\":\"speech_recognition\"}}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/config/config.dev.json\n// module id = 148\n// module chunks = 0","module.exports = {\"cognito\":{\"poolId\":\"\"},\"lex\":{\"botName\":\"WebUiOrderFlowers\",\"initialText\":\"You can ask me for help ordering flowers. Just type \\\"order flowers\\\" or click on the mic and say it.\",\"initialSpeechInstruction\":\"Say 'Order Flowers' to get started.\"},\"polly\":{\"voiceId\":\"Salli\"},\"ui\":{\"parentOrigin\":\"\",\"pageTitle\":\"Order Flowers Bot\",\"toolbarTitle\":\"Order Flowers\"},\"recorder\":{\"preset\":\"speech_recognition\"}}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/config/config.prod.json\n// module id = 149\n// module chunks = 0","module.exports = {\"cognito\":{\"poolId\":\"\"},\"lex\":{\"botName\":\"WebUiOrderFlowers\",\"initialText\":\"You can ask me for help ordering flowers. Just type \\\"order flowers\\\" or click on the mic and say it.\",\"initialSpeechInstruction\":\"Say 'Order Flowers' to get started.\"},\"polly\":{\"voiceId\":\"Salli\"},\"ui\":{\"parentOrigin\":\"http://localhost:8080\",\"pageTitle\":\"Order Flowers Bot\",\"toolbarTitle\":\"Order Flowers\"},\"recorder\":{\"preset\":\"speech_recognition\"}}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/config/config.test.json\n// module id = 150\n// module chunks = 0","/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\n\nexport default {\n canInterruptBotPlayback: state => state.botAudio.canInterrupt,\n isBotSpeaking: state => state.botAudio.isSpeaking,\n isConversationGoing: state => state.recState.isConversationGoing,\n isLexInterrupting: state => state.lex.isInterrupting,\n isLexProcessing: state => state.lex.isProcessing,\n isMicMuted: state => state.recState.isMicMuted,\n isMicQuiet: state => state.recState.isMicQuiet,\n isRecorderSupported: state => state.recState.isRecorderSupported,\n isRecording: state => state.recState.isRecording,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/getters.js","/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\n\n/**\n * Store mutations\n */\n\n/* eslint no-console: [\"error\", { allow: [\"info\", \"warn\", \"error\"] }] */\n/* eslint no-param-reassign: [\"error\", { \"props\": false }] */\n/* eslint spaced-comment: [\"error\", \"always\", { \"exceptions\": [\"*\"] }] */\n\nimport { mergeConfig } from '@/config';\n\nexport default {\n /***********************************************************************\n *\n * Recorder State Mutations\n *\n **********************************************************************/\n\n /**\n * true if recorder seems to be muted\n */\n setIsMicMuted(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsMicMuted status not boolean', bool);\n return;\n }\n if (state.config.recorder.useAutoMuteDetect) {\n state.recState.isMicMuted = bool;\n }\n },\n /**\n * set to true if mic if sound from mic is not loud enough\n */\n setIsMicQuiet(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsMicQuiet status not boolean', bool);\n return;\n }\n state.recState.isMicQuiet = bool;\n },\n /**\n * set to true while speech conversation is going\n */\n setIsConversationGoing(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsConversationGoing status not boolean', bool);\n return;\n }\n state.recState.isConversationGoing = bool;\n },\n /**\n * Signals recorder to start and sets recoding state to true\n */\n startRecording(state, recorder) {\n console.info('start recording');\n if (state.recState.isRecording === false) {\n recorder.start();\n state.recState.isRecording = true;\n }\n },\n /**\n * Set recording state to false\n */\n stopRecording(state, recorder) {\n if (state.recState.isRecording === true) {\n state.recState.isRecording = false;\n if (recorder.isRecording) {\n recorder.stop();\n }\n }\n },\n /**\n * Increase consecutive silent recordings count\n * This is used to bail out from the conversation\n * when too many recordings are silent\n */\n increaseSilentRecordingCount(state) {\n state.recState.silentRecordingCount += 1;\n },\n /**\n * Reset the number of consecutive silent recordings\n */\n resetSilentRecordingCount(state) {\n state.recState.silentRecordingCount = 0;\n },\n /**\n * Set to true if audio recording should be enabled\n */\n setIsRecorderEnabled(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsRecorderEnabled status not boolean', bool);\n return;\n }\n state.recState.isRecorderEnabled = bool;\n },\n /**\n * Set to true if audio recording is supported\n */\n setIsRecorderSupported(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsRecorderSupported status not boolean', bool);\n return;\n }\n state.recState.isRecorderSupported = bool;\n },\n\n /***********************************************************************\n *\n * Bot Audio Mutations\n *\n **********************************************************************/\n\n /**\n * set to true while audio from Lex is playing\n */\n setIsBotSpeaking(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsBotSpeaking status not boolean', bool);\n return;\n }\n state.botAudio.isSpeaking = bool;\n },\n /**\n * Set to true when the Lex audio is ready to autoplay\n * after it has already played audio on user interaction (click)\n */\n setAudioAutoPlay(state, { audio, status }) {\n if (typeof status !== 'boolean') {\n console.error('setAudioAutoPlay status not boolean', status);\n return;\n }\n state.botAudio.autoPlay = status;\n audio.autoplay = status;\n },\n /**\n * set to true if bot playback can be interrupted\n */\n setCanInterruptBotPlayback(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setCanInterruptBotPlayback status not boolean', bool);\n return;\n }\n state.botAudio.canInterrupt = bool;\n },\n /**\n * set to true if bot playback is being interrupted\n */\n setIsBotPlaybackInterrupting(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsBotPlaybackInterrupting status not boolean', bool);\n return;\n }\n state.botAudio.isInterrupting = bool;\n },\n /**\n * used to set the setInterval Id for bot playback interruption\n */\n setBotPlaybackInterruptIntervalId(state, id) {\n if (typeof id !== 'number') {\n console.error('setIsBotPlaybackInterruptIntervalId id is not a number', id);\n return;\n }\n state.botAudio.interruptIntervalId = id;\n },\n\n /***********************************************************************\n *\n * Lex and Polly Mutations\n *\n **********************************************************************/\n\n /**\n * Updates Lex State from Lex responses\n */\n updateLexState(state, lexState) {\n state.lex = { ...state.lex, ...lexState };\n },\n /**\n * Sets the Lex session attributes\n */\n setLexSessionAttributes(state, sessionAttributes) {\n if (typeof sessionAttributes !== 'object') {\n console.error('sessionAttributes is not an object', sessionAttributes);\n return;\n }\n state.lex.sessionAttributes = sessionAttributes;\n },\n /**\n * set to true while calling lexPost{Text,Content}\n * to mark as processing\n */\n setIsLexProcessing(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsLexProcessing status not boolean', bool);\n return;\n }\n state.lex.isProcessing = bool;\n },\n /**\n * set to true if lex is being interrupted while speaking\n */\n setIsLexInterrupting(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsLexInterrupting status not boolean', bool);\n return;\n }\n state.lex.isInterrupting = bool;\n },\n /**\n * Set the supported content types to be used with Lex/Polly\n */\n setAudioContentType(state, type) {\n switch (type) {\n case 'mp3':\n case 'mpg':\n case 'mpeg':\n state.polly.outputFormat = 'mp3';\n state.lex.acceptFormat = 'audio/mpeg';\n break;\n case 'ogg':\n case 'ogg_vorbis':\n case 'x-cbr-opus-with-preamble':\n default:\n state.polly.outputFormat = 'ogg_vorbis';\n state.lex.acceptFormat = 'audio/ogg';\n break;\n }\n },\n /**\n * Set the Polly voice to be used by the client\n */\n setPollyVoiceId(state, voiceId) {\n if (typeof voiceId !== 'string') {\n console.error('polly voiceId is not a string', voiceId);\n return;\n }\n state.polly.voiceId = voiceId;\n },\n\n /***********************************************************************\n *\n * UI and General Mutations\n *\n **********************************************************************/\n\n /**\n * Merges the general config of the web ui\n * with a dynamic config param and merges it with\n * the existing config (e.g. initialized from ../config)\n */\n mergeConfig(state, config) {\n if (typeof config !== 'object') {\n console.error('config is not an object', config);\n return;\n }\n\n // security: do not accept dynamic parentOrigin\n const parentOrigin = (\n state.config && state.config.ui &&\n state.config.ui.parentOrigin\n ) ?\n state.config.ui.parentOrigin :\n config.ui.parentOrigin || window.location.origin;\n const configFiltered = {\n ...config,\n ...{ ui: { ...config.ui, parentOrigin } },\n };\n if (state.config && state.config.ui && state.config.ui.parentOrigin &&\n config.ui && config.ui.parentOrigin &&\n config.ui.parentOrigin !== state.config.ui.parentOrigin\n ) {\n console.warn('ignoring parentOrigin in config: ', config.ui.parentOrigin);\n }\n state.config = mergeConfig(state.config, configFiltered);\n },\n /**\n * Set to true if running embedded in an iframe\n */\n setIsRunningEmbedded(state, bool) {\n if (typeof bool !== 'boolean') {\n console.error('setIsRunningEmbedded status not boolean', bool);\n return;\n }\n state.isRunningEmbedded = bool;\n },\n /**\n * used to track the expand/minimize status of the window when\n * running embedded in an iframe\n */\n toggleIsUiMinimized(state) {\n state.isUiMinimized = !state.isUiMinimized;\n },\n /**\n * Push new message into messages array\n */\n pushMessage(state, message) {\n state.messages.push({\n id: state.messages.length,\n ...message,\n });\n },\n /**\n * Set the AWS credentials provider\n */\n setAwsCredsProvider(state, provider) {\n state.awsCreds.provider = provider;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/mutations.js","/*\nCopyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Amazon Software License (the \"License\"). You may not use this file\nexcept in compliance with the License. A copy of the License is located at\n\nhttp://aws.amazon.com/asl/\n\nor in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\nBASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\nLicense for the specific language governing permissions and limitations under the License.\n*/\n\n/**\n * Asynchronous store actions\n */\n\n/* eslint no-console: [\"error\", { allow: [\"info\", \"warn\", \"error\"] }] */\n/* eslint spaced-comment: [\"error\", \"always\", { \"exceptions\": [\"*\"] }] */\n\nimport LexAudioRecorder from '@/lib/lex/recorder';\nimport initRecorderHandlers from '@/store/recorder-handlers';\nimport silentOgg from '@/assets/silent.ogg';\nimport silentMp3 from '@/assets/silent.mp3';\n\nimport LexClient from '@/lib/lex/client';\n\n// non-state variables that may be mutated outside of store\n// set via initializers at run time\nlet awsCredentials;\nlet pollyClient;\nlet lexClient;\nlet audio;\nlet recorder;\n\nexport default {\n\n /***********************************************************************\n *\n * Initialization Actions\n *\n **********************************************************************/\n\n initCredentials(context, credentials) {\n switch (context.state.awsCreds.provider) {\n case 'cognito':\n awsCredentials = credentials;\n return context.dispatch('getCredentials');\n case 'parentWindow':\n return context.dispatch('getCredentials');\n default:\n return Promise.reject('unknown credential provider');\n }\n },\n getConfigFromParent(context) {\n if (!context.state.isRunningEmbedded) {\n return Promise.resolve({});\n }\n\n return context.dispatch('sendMessageToParentWindow',\n { event: 'initIframeConfig' },\n )\n .then((configResponse) => {\n if (configResponse.event === 'resolve' &&\n configResponse.type === 'initIframeConfig') {\n return Promise.resolve(configResponse.data);\n }\n return Promise.reject('invalid config event from parent');\n });\n },\n initConfig(context, configObj) {\n context.commit('mergeConfig', configObj);\n },\n initMessageList(context) {\n context.commit('pushMessage', {\n type: 'bot',\n text: context.state.config.lex.initialText,\n });\n },\n initLexClient(context, lexRuntimeClient) {\n lexClient = new LexClient({\n botName: context.state.config.lex.botName,\n botAlias: context.state.config.lex.botAlias,\n lexRuntimeClient,\n });\n\n context.commit('setLexSessionAttributes',\n context.state.config.lex.sessionAttributes,\n );\n return context.dispatch('getCredentials')\n .then(() => {\n lexClient.initCredentials(\n awsCredentials,\n );\n });\n },\n initPollyClient(context, client) {\n if (!context.state.recState.isRecorderEnabled) {\n return Promise.resolve();\n }\n pollyClient = client;\n context.commit('setPollyVoiceId', context.state.config.polly.voiceId);\n return context.dispatch('getCredentials')\n .then((creds) => {\n pollyClient.config.credentials = creds;\n });\n },\n initRecorder(context) {\n if (!context.state.recState.isRecorderEnabled) {\n return Promise.resolve();\n }\n recorder = new LexAudioRecorder(\n context.state.config.recorder,\n );\n\n return recorder.init()\n .then(() => recorder.initOptions(context.state.config.recorder))\n .then(() => initRecorderHandlers(context, recorder))\n .then(() => context.commit('setIsRecorderSupported', true))\n .then(() => context.commit('setIsMicMuted', recorder.isMicMuted))\n .catch((error) => {\n if (['PermissionDeniedError', 'NotAllowedError'].indexOf(error.name)\n >= 0) {\n console.warn('get user media permission denied');\n context.dispatch('pushErrorMessage',\n 'It seems like the microphone access has been denied. ' +\n 'If you want to use voice, please allow mic usage in your browser.',\n );\n } else {\n console.error('error while initRecorder', error);\n }\n });\n },\n initBotAudio(context, audioElement) {\n if (!context.state.recState.isRecorderEnabled) {\n return;\n }\n audio = audioElement;\n\n let silentSound;\n\n // Ogg is the preferred format as it seems to be generally smaller.\n // Detect if ogg is supported (MS Edge doesn't).\n // Can't default to mp3 as it is not supported by some Android browsers\n if (audio.canPlayType('audio/ogg') !== '') {\n context.commit('setAudioContentType', 'ogg');\n silentSound = silentOgg;\n } else if (audio.canPlayType('audio/mp3') !== '') {\n context.commit('setAudioContentType', 'mp3');\n silentSound = silentMp3;\n } else {\n console.error('init audio could not find supportted audio type');\n console.warn('init audio can play mp3 [%s]',\n audio.canPlayType('audio/mp3'));\n console.warn('init audio can play ogg [%s]',\n audio.canPlayType('audio/ogg'));\n }\n\n console.info('recorder content types: %s',\n recorder.mimeType,\n );\n\n audio.preload = 'auto';\n // Load a silent sound as the initial audio. This is used to workaround\n // the requirement of mobile browsers that would only play a\n // sound in direct response to a user action (e.g. click).\n // This audio should be explicitly played as a response to a click\n // in the UI\n audio.src = silentSound;\n // autoplay will be set as a response to a clik\n audio.autoplay = false;\n },\n reInitBot(context) {\n return Promise.resolve()\n .then(() => (\n (context.state.config.ui.pushInitialTextOnRestart) ?\n context.dispatch('pushMessage', {\n text: context.state.config.lex.initialText,\n type: 'bot',\n }) :\n Promise.resolve()\n ))\n .then(() => (\n (context.state.config.lex.reInitSessionAttributesOnRestart) ?\n context.commit('setLexSessionAttributes',\n context.state.config.lex.sessionAttributes,\n ) :\n Promise.resolve()\n ));\n },\n\n /***********************************************************************\n *\n * Audio Actions\n *\n **********************************************************************/\n\n getAudioUrl(context, blob) {\n let url;\n\n try {\n url = URL.createObjectURL(blob);\n } catch (error) {\n console.error('getAudioUrl createObjectURL error', error);\n return Promise.reject(\n `There was an error processing the audio response (${error})`,\n );\n }\n\n return Promise.resolve(url);\n },\n setAudioAutoPlay(context) {\n if (audio.autoplay) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n audio.play();\n // eslint-disable-next-line no-param-reassign\n audio.onended = () => {\n context.commit('setAudioAutoPlay', { audio, status: true });\n resolve();\n };\n // eslint-disable-next-line no-param-reassign\n audio.onerror = (err) => {\n context.commit('setAudioAutoPlay', { audio, status: false });\n reject(`setting audio autoplay failed: ${err}`);\n };\n });\n },\n playAudio(context, url) {\n return new Promise((resolve) => {\n audio.onloadedmetadata = () => {\n context.commit('setIsBotSpeaking', true);\n context.dispatch('playAudioHandler')\n .then(() => resolve());\n };\n audio.src = url;\n });\n },\n playAudioHandler(context) {\n return new Promise((resolve, reject) => {\n const { enablePlaybackInterrupt } = context.state.config.lex;\n\n const clearPlayback = () => {\n context.commit('setIsBotSpeaking', false);\n const intervalId = context.state.botAudio.interruptIntervalId;\n if (intervalId && enablePlaybackInterrupt) {\n clearInterval(intervalId);\n context.commit('setBotPlaybackInterruptIntervalId', 0);\n context.commit('setIsLexInterrupting', false);\n context.commit('setCanInterruptBotPlayback', false);\n context.commit('setIsBotPlaybackInterrupting', false);\n }\n };\n\n audio.onerror = (error) => {\n clearPlayback();\n reject(`There was an error playing the response (${error})`);\n };\n audio.onended = () => {\n clearPlayback();\n resolve();\n };\n audio.onpause = audio.onended;\n\n if (enablePlaybackInterrupt) {\n context.dispatch('playAudioInterruptHandler');\n }\n });\n },\n playAudioInterruptHandler(context) {\n const { isSpeaking } = context.state.botAudio;\n const {\n enablePlaybackInterrupt,\n playbackInterruptMinDuration,\n playbackInterruptVolumeThreshold,\n playbackInterruptLevelThreshold,\n playbackInterruptNoiseThreshold,\n } = context.state.config.lex;\n const intervalTimeInMs = 200;\n\n if (!enablePlaybackInterrupt &&\n !isSpeaking &&\n context.state.lex.isInterrupting &&\n audio.duration < playbackInterruptMinDuration\n ) {\n return;\n }\n\n const intervalId = setInterval(() => {\n const duration = audio.duration;\n const end = audio.played.end(0);\n const { canInterrupt } = context.state.botAudio;\n\n if (!canInterrupt &&\n // allow to be interrupt free in the beginning\n end > playbackInterruptMinDuration &&\n // don't interrupt towards the end\n (duration - end) > 0.5 &&\n // only interrupt if the volume seems to be low noise\n recorder.volume.max < playbackInterruptNoiseThreshold\n ) {\n context.commit('setCanInterruptBotPlayback', true);\n } else if (canInterrupt && (duration - end) < 0.5) {\n context.commit('setCanInterruptBotPlayback', false);\n }\n\n if (canInterrupt &&\n recorder.volume.max > playbackInterruptVolumeThreshold &&\n recorder.volume.slow > playbackInterruptLevelThreshold\n ) {\n clearInterval(intervalId);\n context.commit('setIsBotPlaybackInterrupting', true);\n setTimeout(() => {\n audio.pause();\n }, 500);\n }\n }, intervalTimeInMs);\n\n context.commit('setBotPlaybackInterruptIntervalId', intervalId);\n },\n\n /***********************************************************************\n *\n * Recorder Actions\n *\n **********************************************************************/\n\n startConversation(context) {\n context.commit('setIsConversationGoing', true);\n return context.dispatch('startRecording');\n },\n stopConversation(context) {\n context.commit('setIsConversationGoing', false);\n },\n startRecording(context) {\n // don't record if muted\n if (context.state.recState.isMicMuted === true) {\n console.warn('recording while muted');\n context.dispatch('stopConversation');\n return Promise.reject('The microphone seems to be muted.');\n }\n\n context.commit('startRecording', recorder);\n return Promise.resolve();\n },\n stopRecording(context) {\n context.commit('stopRecording', recorder);\n },\n getRecorderVolume(context) {\n if (!context.state.recState.isRecorderEnabled) {\n return Promise.resolve();\n }\n return recorder.volume;\n },\n\n /***********************************************************************\n *\n * Lex and Polly Actions\n *\n **********************************************************************/\n\n pollyGetBlob(context, text) {\n const synthReq = pollyClient.synthesizeSpeech({\n Text: text,\n VoiceId: context.state.polly.voiceId,\n OutputFormat: context.state.polly.outputFormat,\n });\n return context.dispatch('getCredentials')\n .then(() => synthReq.promise())\n .then(data =>\n Promise.resolve(\n new Blob(\n [data.AudioStream], { type: data.ContentType },\n ),\n ),\n );\n },\n pollySynthesizeSpeech(context, text) {\n return context.dispatch('pollyGetBlob', text)\n .then(blob => context.dispatch('getAudioUrl', blob))\n .then(audioUrl => context.dispatch('playAudio', audioUrl));\n },\n interruptSpeechConversation(context) {\n if (!context.state.recState.isConversationGoing) {\n return Promise.resolve();\n }\n\n return new Promise((resolve, reject) => {\n context.dispatch('stopConversation')\n .then(() => context.dispatch('stopRecording'))\n .then(() => {\n if (context.state.botAudio.isSpeaking) {\n audio.pause();\n }\n })\n .then(() => {\n let count = 0;\n const countMax = 20;\n const intervalTimeInMs = 250;\n context.commit('setIsLexInterrupting', true);\n const intervalId = setInterval(() => {\n if (!context.state.lex.isProcessing) {\n clearInterval(intervalId);\n context.commit('setIsLexInterrupting', false);\n resolve();\n }\n if (count > countMax) {\n clearInterval(intervalId);\n context.commit('setIsLexInterrupting', false);\n reject('interrupt interval exceeded');\n }\n count += 1;\n }, intervalTimeInMs);\n });\n });\n },\n postTextMessage(context, message) {\n context.dispatch('interruptSpeechConversation')\n .then(() => context.dispatch('pushMessage', message))\n .then(() => context.dispatch('lexPostText', message.text))\n .then(response => context.dispatch('pushMessage',\n {\n text: response.message,\n type: 'bot',\n dialogState: context.state.lex.dialogState,\n responseCard: context.state.lex.responseCard,\n },\n ))\n .then(() => {\n if (context.state.lex.dialogState === 'Fulfilled') {\n context.dispatch('reInitBot');\n }\n })\n .catch((error) => {\n console.error('error in postTextMessage', error);\n context.dispatch('pushErrorMessage',\n `I was unable to process your message. ${error}`,\n );\n });\n },\n lexPostText(context, text) {\n context.commit('setIsLexProcessing', true);\n return context.dispatch('getCredentials')\n .then(() =>\n lexClient.postText(text, context.state.lex.sessionAttributes),\n )\n .then((data) => {\n context.commit('setIsLexProcessing', false);\n return context.dispatch('updateLexState', data)\n .then(() => Promise.resolve(data));\n });\n },\n lexPostContent(context, audioBlob, offset = 0) {\n context.commit('setIsLexProcessing', true);\n console.info('audio blob size:', audioBlob.size);\n let timeStart;\n\n return context.dispatch('getCredentials')\n .then(() => {\n timeStart = performance.now();\n return lexClient.postContent(\n audioBlob,\n context.state.lex.sessionAttributes,\n context.state.lex.acceptFormat,\n offset,\n );\n })\n .then((lexResponse) => {\n const timeEnd = performance.now();\n console.info('lex postContent processing time:',\n ((timeEnd - timeStart) / 1000).toFixed(2),\n );\n context.commit('setIsLexProcessing', false);\n return context.dispatch('updateLexState', lexResponse)\n .then(() =>\n context.dispatch('processLexContentResponse', lexResponse),\n )\n .then(blob => Promise.resolve(blob));\n });\n },\n processLexContentResponse(context, lexData) {\n const { audioStream, contentType, dialogState } = lexData;\n\n return Promise.resolve()\n .then(() => {\n if (!audioStream || !audioStream.length) {\n const text = (dialogState === 'ReadyForFulfillment') ?\n 'All done' :\n 'There was an error';\n return context.dispatch('pollyGetBlob', text);\n }\n\n return Promise.resolve(\n new Blob([audioStream], { type: contentType }),\n );\n });\n },\n updateLexState(context, lexState) {\n const lexStateDefault = {\n dialogState: '',\n inputTranscript: '',\n intentName: '',\n message: '',\n responseCard: null,\n sessionAttributes: {},\n slotToElicit: '',\n slots: {},\n };\n // simulate response card in sessionAttributes\n // used mainly for postContent which doesn't support response cards\n if ('sessionAttributes' in lexState &&\n 'appContext' in lexState.sessionAttributes\n ) {\n try {\n const appContext = JSON.parse(lexState.sessionAttributes.appContext);\n if ('responseCard' in appContext) {\n lexStateDefault.responseCard =\n appContext.responseCard;\n }\n } catch (e) {\n return Promise.reject('error parsing appContext in sessionAttributes');\n }\n }\n context.commit('updateLexState', { ...lexStateDefault, ...lexState });\n if (context.state.isRunningEmbedded) {\n context.dispatch('sendMessageToParentWindow',\n { event: 'updateLexState', state: context.state.lex },\n );\n }\n return Promise.resolve();\n },\n\n /***********************************************************************\n *\n * Message List Actions\n *\n **********************************************************************/\n\n pushMessage(context, message) {\n context.commit('pushMessage', message);\n },\n pushErrorMessage(context, text, dialogState = 'Failed') {\n context.commit('pushMessage', {\n type: 'bot',\n text,\n dialogState,\n });\n },\n\n /***********************************************************************\n *\n * Credentials Actions\n *\n **********************************************************************/\n\n getCredentialsFromParent(context) {\n const credsExpirationDate = new Date(\n (awsCredentials && awsCredentials.expireTime) ?\n awsCredentials.expireTime :\n 0,\n );\n const now = Date.now();\n if (credsExpirationDate > now) {\n return Promise.resolve(awsCredentials);\n }\n return context.dispatch('sendMessageToParentWindow', { event: 'getCredentials' })\n .then((credsResponse) => {\n if (credsResponse.event === 'resolve' &&\n credsResponse.type === 'getCredentials') {\n return Promise.resolve(credsResponse.data);\n }\n return Promise.reject('invalid credential event from parent');\n })\n .then((creds) => {\n const { AccessKeyId, SecretKey, SessionToken } = creds.data.Credentials;\n const IdentityId = creds.data.IdentityId;\n // recreate as a static credential\n awsCredentials = {\n accessKeyId: AccessKeyId,\n secretAccessKey: SecretKey,\n sessionToken: SessionToken,\n identityId: IdentityId,\n getPromise() { return Promise.resolve(); },\n };\n\n return awsCredentials;\n });\n },\n getCredentials(context) {\n if (context.state.awsCreds.provider === 'parentWindow') {\n return context.dispatch('getCredentialsFromParent');\n }\n return awsCredentials.getPromise()\n .then(() => awsCredentials);\n },\n\n /***********************************************************************\n *\n * UI and Parent Communication Actions\n *\n **********************************************************************/\n\n toggleIsUiMinimized(context) {\n context.commit('toggleIsUiMinimized');\n return context.dispatch(\n 'sendMessageToParentWindow',\n { event: 'toggleMinimizeUi' },\n );\n },\n sendMessageToParentWindow(context, message) {\n if (!context.state.isRunningEmbedded) {\n const error = 'sendMessage called when not running embedded';\n console.warn(error);\n return Promise.reject(error);\n }\n\n return new Promise((resolve, reject) => {\n const messageChannel = new MessageChannel();\n messageChannel.port1.onmessage = (evt) => {\n messageChannel.port1.close();\n messageChannel.port2.close();\n if (evt.data.event === 'resolve') {\n resolve(evt.data);\n } else {\n reject(`error in sendMessageToParentWindow ${evt.data.error}`);\n }\n };\n parent.postMessage(message,\n context.state.config.ui.parentOrigin, [messageChannel.port2]);\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/actions.js","/*\n Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Licensed under the Amazon Software License (the \"License\"). You may not use this file\n except in compliance with the License. A copy of the License is located at\n\n http://aws.amazon.com/asl/\n\n or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\n BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\n License for the specific language governing permissions and limitations under the License.\n */\n\n/* eslint no-console: [\"error\", { allow: [\"info\", \"warn\", \"error\"] }] */\n/* global AudioContext CustomEvent document Event navigator window */\n\n// XXX do we need webrtc-adapter?\n// XXX npm uninstall it after testing\n// XXX import 'webrtc-adapter';\n\n// wav encoder worker - uses webpack worker loader\nimport WavWorker from './wav-worker';\n\n/**\n * Lex Recorder Module\n * Based on Recorderjs. It sort of mimics the MediaRecorder API.\n * @see {@link https://github.com/mattdiamond/Recorderjs}\n * @see {@https://github.com/chris-rudmin/Recorderjs}\n * @see {@https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder}\n */\n\n/**\n * Class for Lex audio recording management.\n *\n * This class is used for microphone initialization and recording\n * management. It encodes the mic input into wav format.\n * It also monitors the audio input stream (e.g keeping track of volume)\n * filtered around human voice speech frequencies to look for silence\n */\nexport default class {\n /* eslint no-underscore-dangle: [\"error\", { \"allowAfterThis\": true }] */\n\n /**\n * Constructs the recorder object\n *\n * @param {object} - options object\n *\n * @param {string} options.mimeType - Mime type to use on recording.\n * Only 'audio/wav' is supported for now. Default: 'aduio/wav'.\n *\n * @param {boolean} options.autoStopRecording - Controls if the recording\n * should automatically stop on silence detection. Default: true.\n *\n * @param {number} options.recordingTimeMax - Maximum recording time in\n * seconds. Recording will stop after going for this long. Default: 8.\n *\n * @param {number} options.recordingTimeMin - Minimum recording time in\n * seconds. Used before evaluating if the line is quiet to allow initial\n * pauses before speech. Default: 2.\n *\n * @param {boolean} options.recordingTimeMinAutoIncrease - Controls if the\n * recordingTimeMin should be automatically increased (exponentially)\n * based on the number of consecutive silent recordings.\n * Default: true.\n *\n * @param {number} options.quietThreshold - Threshold of mic input level\n * to consider quiet. Used to determine pauses in input this is measured\n * using the \"slow\" mic volume. Default: 0.001.\n *\n * @param {number} options.quietTimeMin - Minimum mic quiet time (normally in\n * fractions of a second) before automatically stopping the recording when\n * autoStopRecording is true. In reality it takes a bit more time than this\n * value given that the slow volume value is a decay. Reasonable times seem\n * to be between 0.2 and 0.5. Default: 0.4.\n *\n * @param {number} options.volumeThreshold - Threshold of mic db level\n * to consider quiet. Used to determine pauses in input this is measured\n * using the \"max\" mic volume. Smaller values make the recorder auto stop\n * faster. Default: -75\n *\n * @param {bool} options.useBandPass - Controls if a band pass filter is used\n * for the microphone input. If true, the input is passed through a second\n * order bandpass filter using AudioContext.createBiquadFilter:\n * https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createBiquadFilter\n * The bandpass filter helps to reduce noise, improve silence detection and\n * produce smaller audio blobs. However, it may produce audio with lower\n * fidelity. Default: true\n *\n * @param {number} options.bandPassFrequency - Frequency of bandpass filter in\n * Hz. Mic input is passed through a second order bandpass filter to remove\n * noise and improve quality/speech silence detection. Reasonable values\n * should be around 3000 - 5000. Default: 4000.\n *\n * @param {number} options.bandPassQ - Q factor of bandpass filter.\n * The higher the vaue, the narrower the pass band and steeper roll off.\n * Reasonable values should be between 0.5 and 1.5. Default: 0.707\n *\n * @param {number} options.bufferLength - Length of buffer used in audio\n * processor. Should be in powers of two between 512 to 8196. Passed to\n * script processor and audio encoder. Lower values have lower latency.\n * Default: 2048.\n *\n * @param {number} options.numChannels- Number of channels to record.\n * Default: 1 (mono).\n *\n * @param {number} options.requestEchoCancellation - Request to use echo\n * cancellation in the getUserMedia call:\n * https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/echoCancellation\n * Default: true.\n *\n * @param {bool} options.useAutoMuteDetect - Controls if the recorder utilizes\n * automatic mute detection.\n * Default: true.\n *\n * @param {number} options.muteThreshold - Threshold level when mute values\n * are detected when useAutoMuteDetect is enabled. The higher the faster\n * it reports the mic to be in a muted state but may cause it to flap\n * between mute/unmute. The lower the values the slower it is to report\n * the mic as mute. Too low of a value may cause it to never report the\n * line as muted. Works in conjuction with options.quietTreshold.\n * Reasonable values seem to be between: 1e-5 and 1e-8. Default: 1e-7.\n *\n * @param {bool} options.encoderUseTrim - Controls if the encoder should\n * attempt to trim quiet samples from the beginning and end of the buffer\n * Default: true.\n *\n * @param {number} options.encoderQuietTrimThreshold - Threshold when quiet\n * levels are detected. Only applicable when encoderUseTrim is enabled. The\n * encoder will trim samples below this value at the beginnig and end of the\n * buffer. Lower value trim less silence resulting in larger WAV files.\n * Reasonable values seem to be between 0.005 and 0.0005. Default: 0.0008.\n *\n * @param {number} options.encoderQuietTrimSlackBack - How many samples to\n * add back to the encoded buffer before/after the\n * encoderQuietTrimThreshold. Higher values trim less silence resulting in\n * larger WAV files.\n * Reasonable values seem to be between 3500 and 5000. Default: 4000.\n */\n constructor(options = {}) {\n this.initOptions(options);\n\n // event handler used for events similar to MediaRecorder API (e.g. onmute)\n this._eventTarget = document.createDocumentFragment();\n\n // encoder worker\n this._encoderWorker = new WavWorker();\n\n // worker uses this event listener to signal back\n // when wav has finished encoding\n this._encoderWorker.addEventListener('message',\n evt => this._exportWav(evt.data),\n );\n }\n\n /**\n * Initialize general recorder options\n *\n * @param {object} options - object with various options controlling the\n * recorder behavior. See the constructor for details.\n */\n initOptions(options = {}) {\n // TODO break this into functions, avoid side-effects, break into this.options.*\n if (options.preset) {\n Object.assign(options, this._getPresetOptions(options.preset));\n }\n\n this.mimeType = options.mimeType || 'audio/wav';\n\n this.recordingTimeMax = options.recordingTimeMax || 8;\n this.recordingTimeMin = options.recordingTimeMin || 2;\n this.recordingTimeMinAutoIncrease =\n (typeof options.recordingTimeMinAutoIncrease !== 'undefined') ?\n !!options.recordingTimeMinAutoIncrease :\n true;\n\n // speech detection configuration\n this.autoStopRecording =\n (typeof options.autoStopRecording !== 'undefined') ?\n !!options.autoStopRecording :\n true;\n this.quietThreshold = options.quietThreshold || 0.001;\n this.quietTimeMin = options.quietTimeMin || 0.4;\n this.volumeThreshold = options.volumeThreshold || -75;\n\n // band pass configuration\n this.useBandPass =\n (typeof options.useBandPass !== 'undefined') ?\n !!options.useBandPass :\n true;\n // https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode\n this.bandPassFrequency = options.bandPassFrequency || 4000;\n // Butterworth 0.707 [sqrt(1/2)] | Chebyshev < 1.414\n this.bandPassQ = options.bandPassQ || 0.707;\n\n // parameters passed to script processor and also used in encoder\n // https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createScriptProcessor\n this.bufferLength = options.bufferLength || 2048;\n this.numChannels = options.numChannels || 1;\n\n this.requestEchoCancellation =\n (typeof options.requestEchoCancellation !== 'undefined') ?\n !!options.requestEchoCancellation :\n true;\n\n // automatic mute detection options\n this.useAutoMuteDetect =\n (typeof options.useAutoMuteDetect !== 'undefined') ?\n !!options.useAutoMuteDetect :\n true;\n this.muteThreshold = options.muteThreshold || 1e-7;\n\n // encoder options\n this.encoderUseTrim =\n (typeof options.encoderUseTrim !== 'undefined') ?\n !!options.encoderUseTrim :\n true;\n this.encoderQuietTrimThreshold =\n options.encoderQuietTrimThreshold || 0.0008;\n this.encoderQuietTrimSlackBack = options.encoderQuietTrimSlackBack || 4000;\n }\n\n _getPresetOptions(preset = 'low_latency') {\n this._presets = ['low_latency', 'speech_recognition'];\n\n if (this._presets.indexOf(preset) === -1) {\n console.error('invalid preset');\n return {};\n }\n\n const presets = {\n low_latency: {\n encoderUseTrim: true,\n useBandPass: true,\n },\n speech_recognition: {\n encoderUseTrim: false,\n useBandPass: false,\n useAutoMuteDetect: false,\n },\n };\n\n return presets[preset];\n }\n\n /**\n * General init. This function should be called to initialize the recorder.\n *\n * @param {object} options - Optional parameter to reinitialize the\n * recorder behavior. See the constructor for details.\n *\n * @return {Promise} - Returns a promise that resolves when the recorder is\n * ready.\n */\n init() {\n this._state = 'inactive';\n\n this._instant = 0.0;\n this._slow = 0.0;\n this._clip = 0.0;\n this._maxVolume = -Infinity;\n\n this._isMicQuiet = true;\n this._isMicMuted = false;\n\n this._isSilentRecording = true;\n this._silentRecordingConsecutiveCount = 0;\n\n // sets this._audioContext AudioContext object\n return this._initAudioContext()\n .then(() =>\n // inits AudioContext.createScriptProcessor object\n // used to process mic audio input volume\n // sets this._micVolumeProcessor\n this._initMicVolumeProcessor(),\n )\n .then(() =>\n this._initStream(),\n );\n }\n\n /**\n * Start recording\n */\n start() {\n if (this._state !== 'inactive' ||\n typeof this._stream === 'undefined') {\n console.warn('recorder start called out of state');\n return;\n }\n\n this._state = 'recording';\n\n this._recordingStartTime = this._audioContext.currentTime;\n this._eventTarget.dispatchEvent(new Event('start'));\n\n this._encoderWorker.postMessage({\n command: 'init',\n config: {\n sampleRate: this._audioContext.sampleRate,\n numChannels: this.numChannels,\n useTrim: this.encoderUseTrim,\n quietTrimThreshold: this.encoderQuietTrimThreshold,\n quietTrimSlackBack: this.encoderQuietTrimSlackBack,\n },\n });\n }\n\n /**\n * Stop recording\n */\n stop() {\n if (this._state !== 'recording') {\n console.warn('recorder stop called out of state');\n return;\n }\n\n if (this._recordingStartTime > this._quietStartTime) {\n this._isSilentRecording = true;\n this._silentRecordingConsecutiveCount += 1;\n this._eventTarget.dispatchEvent(new Event('silentrecording'));\n } else {\n this._isSilentRecording = false;\n this._silentRecordingConsecutiveCount = 0;\n this._eventTarget.dispatchEvent(new Event('unsilentrecording'));\n }\n\n this._state = 'inactive';\n this._recordingStartTime = 0;\n\n this._encoderWorker.postMessage({\n command: 'exportWav',\n type: 'audio/wav',\n });\n\n this._eventTarget.dispatchEvent(new Event('stop'));\n }\n\n _exportWav(evt) {\n this._eventTarget.dispatchEvent(\n new CustomEvent('dataavailable', { detail: evt.data }),\n );\n this._encoderWorker.postMessage({ command: 'clear' });\n }\n\n _recordBuffers(inputBuffer) {\n if (this._state !== 'recording') {\n console.warn('recorder _recordBuffers called out of state');\n return;\n }\n const buffer = [];\n for (let i = 0; i < inputBuffer.numberOfChannels; i++) {\n buffer[i] = inputBuffer.getChannelData(i);\n }\n\n this._encoderWorker.postMessage({\n command: 'record',\n buffer,\n });\n }\n\n _setIsMicMuted() {\n if (!this.useAutoMuteDetect) {\n return;\n }\n // TODO incorporate _maxVolume\n if (this._instant >= this.muteThreshold) {\n if (this._isMicMuted) {\n this._isMicMuted = false;\n this._eventTarget.dispatchEvent(new Event('unmute'));\n }\n return;\n }\n\n if (!this._isMicMuted && (this._slow < this.muteThreshold)) {\n this._isMicMuted = true;\n this._eventTarget.dispatchEvent(new Event('mute'));\n console.info('mute - instant: %s - slow: %s - track muted: %s',\n this._instant, this._slow, this._tracks[0].muted,\n );\n\n if (this._state === 'recording') {\n this.stop();\n console.info('stopped recording on _setIsMicMuted');\n }\n }\n }\n\n _setIsMicQuiet() {\n const now = this._audioContext.currentTime;\n\n const isMicQuiet = (this._maxVolume < this.volumeThreshold ||\n this._slow < this.quietThreshold);\n\n // start record the time when the line goes quiet\n // fire event\n if (!this._isMicQuiet && isMicQuiet) {\n this._quietStartTime = this._audioContext.currentTime;\n this._eventTarget.dispatchEvent(new Event('quiet'));\n }\n // reset quiet timer when there's enough sound\n if (this._isMicQuiet && !isMicQuiet) {\n this._quietStartTime = 0;\n this._eventTarget.dispatchEvent(new Event('unquiet'));\n }\n this._isMicQuiet = isMicQuiet;\n\n // if autoincrease is enabled, exponentially increase the mimimun recording\n // time based on consecutive silent recordings\n const recordingTimeMin =\n (this.recordingTimeMinAutoIncrease) ?\n (this.recordingTimeMin - 1) +\n (this.recordingTimeMax **\n (1 - (1 / (this._silentRecordingConsecutiveCount + 1)))) :\n this.recordingTimeMin;\n\n // detect voice pause and stop recording\n if (this.autoStopRecording &&\n this._isMicQuiet && this._state === 'recording' &&\n // have I been recording longer than the minimum recording time?\n now - this._recordingStartTime > recordingTimeMin &&\n // has the slow sample value been below the quiet threshold longer than\n // the minimum allowed quiet time?\n now - this._quietStartTime > this.quietTimeMin\n ) {\n this.stop();\n }\n }\n\n /**\n * Initializes the AudioContext\n * Aassigs it to this._audioContext. Adds visibitily change event listener\n * to suspend the audio context when the browser tab is hidden.\n * @return {Promise} resolution of AudioContext\n */\n _initAudioContext() {\n window.AudioContext = window.AudioContext || window.webkitAudioContext;\n if (!window.AudioContext) {\n return Promise.reject('Web Audio API not supported.');\n }\n this._audioContext = new AudioContext();\n document.addEventListener('visibilitychange', () => {\n console.info('visibility change triggered in recorder. hidden:', document.hidden);\n if (document.hidden) {\n this._audioContext.suspend();\n } else {\n this._audioContext.resume();\n }\n });\n return Promise.resolve();\n }\n\n /**\n * Private initializer of the audio buffer processor\n * It manages the volume variables and sends the buffers to the worker\n * when recording.\n * Some of this came from:\n * https://webrtc.github.io/samples/src/content/getusermedia/volume/js/soundmeter.js\n */\n _initMicVolumeProcessor() {\n /* eslint no-plusplus: [\"error\", { \"allowForLoopAfterthoughts\": true }] */\n // assumes a single channel - XXX does it need to handle 2 channels?\n const processor = this._audioContext.createScriptProcessor(\n this.bufferLength,\n this.numChannels,\n this.numChannels,\n );\n processor.onaudioprocess = (evt) => {\n if (this._state === 'recording') {\n // send buffers to worker\n this._recordBuffers(evt.inputBuffer);\n\n // stop recording if over the maximum time\n if ((this._audioContext.currentTime - this._recordingStartTime)\n > this.recordingTimeMax\n ) {\n console.warn('stopped recording due to maximum time');\n this.stop();\n }\n }\n\n // XXX assumes mono channel\n const input = evt.inputBuffer.getChannelData(0);\n let sum = 0.0;\n let clipCount = 0;\n for (let i = 0; i < input.length; ++i) {\n // square to calculate signal power\n sum += input[i] * input[i];\n if (Math.abs(input[i]) > 0.99) {\n clipCount += 1;\n }\n }\n this._instant = Math.sqrt(sum / input.length);\n this._slow = (0.95 * this._slow) + (0.05 * this._instant);\n this._clip = (input.length) ? clipCount / input.length : 0;\n\n this._setIsMicMuted();\n this._setIsMicQuiet();\n\n this._analyser.getFloatFrequencyData(this._analyserData);\n this._maxVolume = Math.max(...this._analyserData);\n };\n\n this._micVolumeProcessor = processor;\n return Promise.resolve();\n }\n\n /*\n * Private initializers\n */\n\n /**\n * Sets microphone using getUserMedia\n * @return {Promise} returns a promise that resolves when the audio input\n * has been connected\n */\n _initStream() {\n // TODO obtain with navigator.mediaDevices.getSupportedConstraints()\n const constraints = {\n audio: {\n optional: [{\n echoCancellation: this.requestEchoCancellation,\n }],\n },\n };\n\n return navigator.mediaDevices.getUserMedia(constraints)\n .then((stream) => {\n this._stream = stream;\n\n this._tracks = stream.getAudioTracks();\n console.info('using media stream track labeled: ', this._tracks[0].label);\n // assumes single channel\n this._tracks[0].onmute = this._setIsMicMuted;\n this._tracks[0].onunmute = this._setIsMicMuted;\n\n const source = this._audioContext.createMediaStreamSource(stream);\n const gainNode = this._audioContext.createGain();\n const analyser = this._audioContext.createAnalyser();\n\n if (this.useBandPass) {\n // bandpass filter around human voice\n // https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode\n const biquadFilter = this._audioContext.createBiquadFilter();\n biquadFilter.type = 'bandpass';\n\n biquadFilter.frequency.value = this.bandPassFrequency;\n biquadFilter.gain.Q = this.bandPassQ;\n\n source.connect(biquadFilter);\n biquadFilter.connect(gainNode);\n analyser.smoothingTimeConstant = 0.5;\n } else {\n source.connect(gainNode);\n analyser.smoothingTimeConstant = 0.9;\n }\n analyser.fftSize = this.bufferLength;\n analyser.minDecibels = -90;\n analyser.maxDecibels = -30;\n\n gainNode.connect(analyser);\n analyser.connect(this._micVolumeProcessor);\n this._analyserData = new Float32Array(analyser.frequencyBinCount);\n this._analyser = analyser;\n\n this._micVolumeProcessor.connect(\n this._audioContext.destination,\n );\n\n this._eventTarget.dispatchEvent(new Event('streamReady'));\n });\n }\n\n /*\n * getters used to expose internal vars while avoiding issues when using with\n * a reactive store (e.g. vuex).\n */\n\n /**\n * Getter of recorder state. Based on MediaRecorder API.\n * @return {string} state of recorder (inactive | recording | paused)\n */\n get state() {\n return this._state;\n }\n\n /**\n * Getter of stream object. Based on MediaRecorder API.\n * @return {MediaStream} media stream object obtain from getUserMedia\n */\n get stream() {\n return this._stream;\n }\n\n get isMicQuiet() {\n return this._isMicQuiet;\n }\n\n get isMicMuted() {\n return this._isMicMuted;\n }\n\n get isSilentRecording() {\n return this._isSilentRecording;\n }\n\n get isRecording() {\n return (this._state === 'recording');\n }\n\n /**\n * Getter of mic volume levels.\n * instant: root mean square of levels in buffer\n * slow: time decaying level\n * clip: count of samples at the top of signals (high noise)\n */\n get volume() {\n return ({\n instant: this._instant,\n slow: this._slow,\n clip: this._clip,\n max: this._maxVolume,\n });\n }\n\n /*\n * Private initializer of event target\n * Set event handlers that mimic MediaRecorder events plus others\n */\n\n // TODO make setters replace the listener insted of adding\n set onstart(cb) {\n this._eventTarget.addEventListener('start', cb);\n }\n set onstop(cb) {\n this._eventTarget.addEventListener('stop', cb);\n }\n set ondataavailable(cb) {\n this._eventTarget.addEventListener('dataavailable', cb);\n }\n set onerror(cb) {\n this._eventTarget.addEventListener('error', cb);\n }\n set onstreamready(cb) {\n this._eventTarget.addEventListener('streamready', cb);\n }\n set onmute(cb) {\n this._eventTarget.addEventListener('mute', cb);\n }\n set onunmute(cb) {\n this._eventTarget.addEventListener('unmute', cb);\n }\n set onsilentrecording(cb) {\n this._eventTarget.addEventListener('silentrecording', cb);\n }\n set onunsilentrecording(cb) {\n this._eventTarget.addEventListener('unsilentrecording', cb);\n }\n set onquiet(cb) {\n this._eventTarget.addEventListener('quiet', cb);\n }\n set onunquiet(cb) {\n this._eventTarget.addEventListener('unquiet', cb);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib/lex/recorder.js","\"use strict\";\n\nexports.__esModule = true;\n\nvar _from = require(\"../core-js/array/from\");\n\nvar _from2 = _interopRequireDefault(_from);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return (0, _from2.default)(arr);\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/toConsumableArray.js\n// module id = 155\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/array/from\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/array/from.js\n// module id = 156\n// module chunks = 0","require('../../modules/es6.string.iterator');\nrequire('../../modules/es6.array.from');\nmodule.exports = require('../../modules/_core').Array.from;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/array/from.js\n// module id = 157\n// module chunks = 0","'use strict';\nvar ctx = require('./_ctx')\n , $export = require('./_export')\n , toObject = require('./_to-object')\n , call = require('./_iter-call')\n , isArrayIter = require('./_is-array-iter')\n , toLength = require('./_to-length')\n , createProperty = require('./_create-property')\n , getIterFn = require('./core.get-iterator-method');\n\n$export($export.S + $export.F * !require('./_iter-detect')(function(iter){ Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){\n var O = toObject(arrayLike)\n , C = typeof this == 'function' ? this : Array\n , aLen = arguments.length\n , mapfn = aLen > 1 ? arguments[1] : undefined\n , mapping = mapfn !== undefined\n , index = 0\n , iterFn = getIterFn(O)\n , length, result, step, iterator;\n if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){\n for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for(result = new C(length); length > index; index++){\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.array.from.js\n// module id = 158\n// module chunks = 0","'use strict';\nvar $defineProperty = require('./_object-dp')\n , createDesc = require('./_property-desc');\n\nmodule.exports = function(object, index, value){\n if(index in object)$defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_create-property.js\n// module id = 159\n// module chunks = 0","module.exports = function() {\n\treturn require(\"!!C:\\\\Users\\\\oatoa\\\\Desktop\\\\ProServ\\\\Projects\\\\AHA\\\\aws-lex-web-ui\\\\lex-web-ui\\\\node_modules\\\\worker-loader\\\\createInlineWorker.js\")(\"/******/ (function(modules) { // webpackBootstrap\\n/******/ \\t// The module cache\\n/******/ \\tvar installedModules = {};\\n/******/\\n/******/ \\t// The require function\\n/******/ \\tfunction __webpack_require__(moduleId) {\\n/******/\\n/******/ \\t\\t// Check if module is in cache\\n/******/ \\t\\tif(installedModules[moduleId]) {\\n/******/ \\t\\t\\treturn installedModules[moduleId].exports;\\n/******/ \\t\\t}\\n/******/ \\t\\t// Create a new module (and put it into the cache)\\n/******/ \\t\\tvar module = installedModules[moduleId] = {\\n/******/ \\t\\t\\ti: moduleId,\\n/******/ \\t\\t\\tl: false,\\n/******/ \\t\\t\\texports: {}\\n/******/ \\t\\t};\\n/******/\\n/******/ \\t\\t// Execute the module function\\n/******/ \\t\\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\\n/******/\\n/******/ \\t\\t// Flag the module as loaded\\n/******/ \\t\\tmodule.l = true;\\n/******/\\n/******/ \\t\\t// Return the exports of the module\\n/******/ \\t\\treturn module.exports;\\n/******/ \\t}\\n/******/\\n/******/\\n/******/ \\t// expose the modules object (__webpack_modules__)\\n/******/ \\t__webpack_require__.m = modules;\\n/******/\\n/******/ \\t// expose the module cache\\n/******/ \\t__webpack_require__.c = installedModules;\\n/******/\\n/******/ \\t// define getter function for harmony exports\\n/******/ \\t__webpack_require__.d = function(exports, name, getter) {\\n/******/ \\t\\tif(!__webpack_require__.o(exports, name)) {\\n/******/ \\t\\t\\tObject.defineProperty(exports, name, {\\n/******/ \\t\\t\\t\\tconfigurable: false,\\n/******/ \\t\\t\\t\\tenumerable: true,\\n/******/ \\t\\t\\t\\tget: getter\\n/******/ \\t\\t\\t});\\n/******/ \\t\\t}\\n/******/ \\t};\\n/******/\\n/******/ \\t// getDefaultExport function for compatibility with non-harmony modules\\n/******/ \\t__webpack_require__.n = function(module) {\\n/******/ \\t\\tvar getter = module && module.__esModule ?\\n/******/ \\t\\t\\tfunction getDefault() { return module['default']; } :\\n/******/ \\t\\t\\tfunction getModuleExports() { return module; };\\n/******/ \\t\\t__webpack_require__.d(getter, 'a', getter);\\n/******/ \\t\\treturn getter;\\n/******/ \\t};\\n/******/\\n/******/ \\t// Object.prototype.hasOwnProperty.call\\n/******/ \\t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\\n/******/\\n/******/ \\t// __webpack_public_path__\\n/******/ \\t__webpack_require__.p = \\\"/\\\";\\n/******/\\n/******/ \\t// Load entry module and return exports\\n/******/ \\treturn __webpack_require__(__webpack_require__.s = 0);\\n/******/ })\\n/************************************************************************/\\n/******/ ([\\n/* 0 */\\n/***/ (function(module, exports) {\\n\\n// based on https://github.com/mattdiamond/Recorderjs/blob/master/src/recorder.js\\n// with a few optimizations including downsampling and trimming quiet samples\\n\\n/* global Blob self */\\n/* eslint prefer-arrow-callback: [\\\"error\\\", { \\\"allowNamedFunctions\\\": true }] */\\n/* eslint no-param-reassign: [\\\"error\\\", { \\\"props\\\": false }] */\\n/* eslint no-use-before-define: [\\\"error\\\", { \\\"functions\\\": false }] */\\n/* eslint no-plusplus: off */\\n/* eslint comma-dangle: [\\\"error\\\", {\\\"functions\\\": \\\"never\\\", \\\"objects\\\": \\\"always-multiline\\\"}] */\\nconst bitDepth = 16;\\nconst bytesPerSample = bitDepth / 8;\\nconst outSampleRate = 16000;\\nconst outNumChannels = 1;\\n\\nlet recLength = 0;\\nlet recBuffers = [];\\n\\nconst options = {\\n sampleRate: 44000,\\n numChannels: 1,\\n useDownsample: true,\\n // controls if the encoder will trim silent samples at begining and end of buffer\\n useTrim: true,\\n // trim samples below this value at the beginnig and end of the buffer\\n // lower the value trim less silence (larger file size)\\n // reasonable values seem to be between 0.005 and 0.0005\\n quietTrimThreshold: 0.0008,\\n // how many samples to add back to the buffer before/after the quiet threshold\\n // higher values result in less silence trimming (larger file size)\\n // reasonable values seem to be between 3500 and 5000\\n quietTrimSlackBack: 4000,\\n};\\n\\nself.onmessage = (evt) => {\\n switch (evt.data.command) {\\n case 'init':\\n init(evt.data.config);\\n break;\\n case 'record':\\n record(evt.data.buffer);\\n break;\\n case 'exportWav':\\n exportWAV(evt.data.type);\\n break;\\n case 'getBuffer':\\n getBuffer();\\n break;\\n case 'clear':\\n clear();\\n break;\\n case 'close':\\n self.close();\\n break;\\n default:\\n break;\\n }\\n};\\n\\nfunction init(config) {\\n Object.assign(options, config);\\n initBuffers();\\n}\\n\\nfunction record(inputBuffer) {\\n for (let channel = 0; channel < options.numChannels; channel++) {\\n recBuffers[channel].push(inputBuffer[channel]);\\n }\\n recLength += inputBuffer[0].length;\\n}\\n\\nfunction exportWAV(type) {\\n const buffers = [];\\n for (let channel = 0; channel < options.numChannels; channel++) {\\n buffers.push(mergeBuffers(recBuffers[channel], recLength));\\n }\\n let interleaved;\\n if (options.numChannels === 2 && outNumChannels === 2) {\\n interleaved = interleave(buffers[0], buffers[1]);\\n } else {\\n interleaved = buffers[0];\\n }\\n const downsampledBuffer = downsampleTrimBuffer(interleaved, outSampleRate);\\n const dataview = encodeWAV(downsampledBuffer);\\n const audioBlob = new Blob([dataview], { type });\\n\\n self.postMessage({\\n command: 'exportWAV',\\n data: audioBlob,\\n });\\n}\\n\\nfunction getBuffer() {\\n const buffers = [];\\n for (let channel = 0; channel < options.numChannels; channel++) {\\n buffers.push(mergeBuffers(recBuffers[channel], recLength));\\n }\\n self.postMessage({ command: 'getBuffer', data: buffers });\\n}\\n\\nfunction clear() {\\n recLength = 0;\\n recBuffers = [];\\n initBuffers();\\n}\\n\\nfunction initBuffers() {\\n for (let channel = 0; channel < options.numChannels; channel++) {\\n recBuffers[channel] = [];\\n }\\n}\\n\\nfunction mergeBuffers(recBuffer, length) {\\n const result = new Float32Array(length);\\n let offset = 0;\\n for (let i = 0; i < recBuffer.length; i++) {\\n result.set(recBuffer[i], offset);\\n offset += recBuffer[i].length;\\n }\\n return result;\\n}\\n\\nfunction interleave(inputL, inputR) {\\n const length = inputL.length + inputR.length;\\n const result = new Float32Array(length);\\n\\n let index = 0;\\n let inputIndex = 0;\\n\\n while (index < length) {\\n result[index++] = inputL[inputIndex];\\n result[index++] = inputR[inputIndex];\\n inputIndex++;\\n }\\n return result;\\n}\\n\\nfunction floatTo16BitPCM(output, offset, input) {\\n for (let i = 0, o = offset; i < input.length; i++, o += 2) {\\n const s = Math.max(-1, Math.min(1, input[i]));\\n output.setInt16(o, s < 0 ? s * 0x8000 : s * 0x7FFF, true);\\n }\\n}\\n\\n// Lex doesn't require proper wav header\\n// still inserting wav header for playing on client side\\nfunction addHeader(view, length) {\\n // RIFF identifier 'RIFF'\\n view.setUint32(0, 1380533830, false);\\n // file length minus RIFF identifier length and file description length\\n view.setUint32(4, 36 + length, true);\\n // RIFF type 'WAVE'\\n view.setUint32(8, 1463899717, false);\\n // format chunk identifier 'fmt '\\n view.setUint32(12, 1718449184, false);\\n // format chunk length\\n view.setUint32(16, 16, true);\\n // sample format (raw)\\n view.setUint16(20, 1, true);\\n // channel count\\n view.setUint16(22, outNumChannels, true);\\n // sample rate\\n view.setUint32(24, outSampleRate, true);\\n // byte rate (sample rate * block align)\\n view.setUint32(28, outSampleRate * bytesPerSample * outNumChannels, true);\\n // block align (channel count * bytes per sample)\\n view.setUint16(32, bytesPerSample * outNumChannels, true);\\n // bits per sample\\n view.setUint16(34, bitDepth, true);\\n // data chunk identifier 'data'\\n view.setUint32(36, 1684108385, false);\\n}\\n\\nfunction encodeWAV(samples) {\\n const buffer = new ArrayBuffer(44 + (samples.length * 2));\\n const view = new DataView(buffer);\\n\\n addHeader(view, samples.length);\\n floatTo16BitPCM(view, 44, samples);\\n\\n return view;\\n}\\n\\nfunction downsampleTrimBuffer(buffer, rate) {\\n if (rate === options.sampleRate) {\\n return buffer;\\n }\\n\\n const length = buffer.length;\\n const sampleRateRatio = options.sampleRate / rate;\\n const newLength = Math.round(length / sampleRateRatio);\\n\\n const result = new Float32Array(newLength);\\n let offsetResult = 0;\\n let offsetBuffer = 0;\\n let firstNonQuiet = 0;\\n let lastNonQuiet = length;\\n while (offsetResult < result.length) {\\n const nextOffsetBuffer = Math.round((offsetResult + 1) * sampleRateRatio);\\n let accum = 0;\\n let count = 0;\\n for (let i = offsetBuffer; (i < nextOffsetBuffer) && (i < length); i++) {\\n accum += buffer[i];\\n count++;\\n }\\n // mark first and last sample over the quiet threshold\\n if (accum > options.quietTrimThreshold) {\\n if (firstNonQuiet === 0) {\\n firstNonQuiet = offsetResult;\\n }\\n lastNonQuiet = offsetResult;\\n }\\n result[offsetResult] = accum / count;\\n offsetResult++;\\n offsetBuffer = nextOffsetBuffer;\\n }\\n\\n /*\\n console.info('encoder trim size reduction',\\n (Math.min(newLength, lastNonQuiet + options.quietTrimSlackBack) -\\n Math.max(0, firstNonQuiet - options.quietTrimSlackBack)) / result.length\\n );\\n */\\n return (options.useTrim) ?\\n // slice based on quiet threshold and put slack back into the buffer\\n result.slice(\\n Math.max(0, firstNonQuiet - options.quietTrimSlackBack),\\n Math.min(newLength, lastNonQuiet + options.quietTrimSlackBack)\\n ) :\\n result;\\n}\\n\\n\\n/***/ })\\n/******/ ]);\\n//# sourceMappingURL=wav-worker.js.map\", __webpack_public_path__ + \"bundle/wav-worker.js\");\n};\n\n\n// WEBPACK FOOTER //\n// ./src/lib/lex/wav-worker.js","// http://stackoverflow.com/questions/10343913/how-to-create-a-web-worker-from-a-string\r\n\r\nvar URL = window.URL || window.webkitURL;\r\nmodule.exports = function(content, url) {\r\n try {\r\n try {\r\n var blob;\r\n try { // BlobBuilder = Deprecated, but widely implemented\r\n var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;\r\n blob = new BlobBuilder();\r\n blob.append(content);\r\n blob = blob.getBlob();\r\n } catch(e) { // The proposed API\r\n blob = new Blob([content]);\r\n }\r\n return new Worker(URL.createObjectURL(blob));\r\n } catch(e) {\r\n return new Worker('data:application/javascript,' + encodeURIComponent(content));\r\n }\r\n } catch(e) {\r\n if (!url) {\r\n throw Error('Inline worker is not supported');\r\n }\r\n return new Worker(url);\r\n }\r\n}\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/worker-loader/createInlineWorker.js\n// module id = 161\n// module chunks = 0","/*\n Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Licensed under the Amazon Software License (the \"License\"). You may not use this file\n except in compliance with the License. A copy of the License is located at\n\n http://aws.amazon.com/asl/\n\n or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\n BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\n License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * Vuex store recorder handlers\n */\n\n/* eslint no-console: [\"error\", { allow: [\"info\", \"warn\", \"error\", \"time\", \"timeEnd\"] }] */\n/* eslint no-param-reassign: [\"error\", { \"props\": false }] */\n\nconst initRecorderHandlers = (context, recorder) => {\n /* global Blob */\n\n recorder.onstart = () => {\n console.info('recorder start event triggered');\n console.time('recording time');\n };\n recorder.onstop = () => {\n context.dispatch('stopRecording');\n console.timeEnd('recording time');\n console.time('recording processing time');\n console.info('recorder stop event triggered');\n };\n recorder.onsilentrecording = () => {\n console.info('recorder silent recording triggered');\n context.commit('increaseSilentRecordingCount');\n };\n recorder.onunsilentrecording = () => {\n if (context.state.recState.silentRecordingCount > 0) {\n context.commit('resetSilentRecordingCount');\n }\n };\n recorder.onerror = (e) => {\n console.error('recorder onerror event triggered', e);\n };\n recorder.onstreamready = () => {\n console.info('recorder stream ready event triggered');\n };\n recorder.onmute = () => {\n console.info('recorder mute event triggered');\n context.commit('setIsMicMuted', true);\n };\n recorder.onunmute = () => {\n console.info('recorder unmute event triggered');\n context.commit('setIsMicMuted', false);\n };\n recorder.onquiet = () => {\n console.info('recorder quiet event triggered');\n context.commit('setIsMicQuiet', true);\n };\n recorder.onunquiet = () => {\n console.info('recorder unquiet event triggered');\n context.commit('setIsMicQuiet', false);\n };\n\n // TODO need to change recorder event setter to support\n // replacing handlers instead of adding\n recorder.ondataavailable = (e) => {\n const mimeType = recorder.mimeType;\n console.info('recorder data available event triggered');\n const audioBlob = new Blob(\n [e.detail], { type: mimeType },\n );\n // XXX not used for now since only encoding WAV format\n let offset = 0;\n // offset is only needed for opus encoded ogg files\n // extract the offset where the opus frames are found\n // leaving for future reference\n // https://tools.ietf.org/html/rfc7845\n // https://tools.ietf.org/html/rfc6716\n // https://www.xiph.org/ogg/doc/framing.html\n if (mimeType.startsWith('audio/ogg')) {\n offset = 125 + e.detail[125] + 1;\n }\n console.timeEnd('recording processing time');\n\n context.dispatch('lexPostContent', audioBlob, offset)\n .then((lexAudioBlob) => {\n if (context.state.recState.silentRecordingCount >=\n context.state.config.converser.silentConsecutiveRecordingMax\n ) {\n return Promise.reject(\n 'Too many consecutive silent recordings: ' +\n `${context.state.recState.silentRecordingCount}.`,\n );\n }\n return Promise.all([\n context.dispatch('getAudioUrl', audioBlob),\n context.dispatch('getAudioUrl', lexAudioBlob),\n ]);\n })\n .then((audioUrls) => {\n // handle being interrupted by text\n if (context.state.lex.dialogState !== 'Fulfilled' &&\n !context.state.recState.isConversationGoing\n ) {\n return Promise.resolve();\n }\n const [humanAudioUrl, lexAudioUrl] = audioUrls;\n context.dispatch('pushMessage', {\n type: 'human',\n audio: humanAudioUrl,\n text: context.state.lex.inputTranscript,\n });\n context.dispatch('pushMessage', {\n type: 'bot',\n audio: lexAudioUrl,\n text: context.state.lex.message,\n dialogState: context.state.lex.dialogState,\n responseCard: context.state.lex.responseCard,\n });\n return context.dispatch('playAudio', lexAudioUrl, {}, offset);\n })\n .then(() => {\n if (\n ['Fulfilled', 'ReadyForFulfillment', 'Failed'].indexOf(\n context.state.lex.dialogState,\n ) >= 0\n ) {\n return context.dispatch('stopConversation')\n .then(() => context.dispatch('reInitBot'));\n }\n\n if (context.state.recState.isConversationGoing) {\n return context.dispatch('startRecording');\n }\n return Promise.resolve();\n })\n .catch((error) => {\n console.error('converser error:', error);\n context.dispatch('stopConversation');\n context.dispatch('pushErrorMessage',\n `I had an error. ${error}`,\n );\n context.commit('resetSilentRecordingCount');\n });\n };\n};\nexport default initRecorderHandlers;\n\n\n\n// WEBPACK FOOTER //\n// ./src/store/recorder-handlers.js","module.exports = \"data:audio/ogg;base64,T2dnUwACAAAAAAAAAAAyzN3NAAAAAGFf2X8BM39GTEFDAQAAAWZMYUMAAAAiEgASAAAAAAAkFQrEQPAAAAAAAAAAAAAAAAAAAAAAAAAAAE9nZ1MAAAAAAAAAAAAAMszdzQEAAAD5LKCSATeEAAAzDQAAAExhdmY1NS40OC4xMDABAAAAGgAAAGVuY29kZXI9TGF2YzU1LjY5LjEwMCBmbGFjT2dnUwAEARIAAAAAAAAyzN3NAgAAAKWVljkCDAD/+GkIAAAdAAABICI=\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/silent.ogg\n// module id = 163\n// module chunks = 0","module.exports = \"data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU2LjM2LjEwMAAAAAAAAAAAAAAA//OEAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAEAAABIADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV6urq6urq6urq6urq6urq6urq6urq6urq6v////////////////////////////////8AAAAATGF2YzU2LjQxAAAAAAAAAAAAAAAAJAAAAAAAAAAAASDs90hvAAAAAAAAAAAAAAAAAAAA//MUZAAAAAGkAAAAAAAAA0gAAAAATEFN//MUZAMAAAGkAAAAAAAAA0gAAAAARTMu//MUZAYAAAGkAAAAAAAAA0gAAAAAOTku//MUZAkAAAGkAAAAAAAAA0gAAAAANVVV\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/silent.mp3\n// module id = 164\n// module chunks = 0","/*\n Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Licensed under the Amazon Software License (the \"License\"). You may not use this file\n except in compliance with the License. A copy of the License is located at\n\n http://aws.amazon.com/asl/\n\n or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\"\n BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the\n License for the specific language governing permissions and limitations under the License.\n */\n\n/* eslint no-console: [\"error\", { allow: [\"warn\", \"error\"] }] */\n\nexport default class {\n constructor({\n botName,\n botAlias = '$LATEST',\n userId,\n lexRuntimeClient,\n }) {\n if (!botName || !lexRuntimeClient) {\n throw new Error('invalid lex client constructor arguments');\n }\n\n this.botName = botName;\n this.botAlias = botAlias;\n this.userId = userId ||\n 'lex-web-ui-' +\n `${Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1)}`;\n\n this.lexRuntimeClient = lexRuntimeClient;\n this.credentials = this.lexRuntimeClient.config.credentials;\n }\n\n initCredentials(credentials) {\n this.credentials = credentials;\n this.lexRuntimeClient.config.credentials = this.credentials;\n this.userId = (credentials.identityId) ?\n credentials.identityId :\n this.userId;\n }\n\n postText(inputText, sessionAttributes = {}) {\n const postTextReq = this.lexRuntimeClient.postText({\n botAlias: this.botAlias,\n botName: this.botName,\n userId: this.userId,\n inputText,\n sessionAttributes,\n });\n return this.credentials.getPromise()\n .then(() => postTextReq.promise());\n }\n\n postContent(\n blob,\n sessionAttributes = {},\n acceptFormat = 'audio/ogg',\n offset = 0,\n ) {\n const mediaType = blob.type;\n let contentType = mediaType;\n\n if (mediaType.startsWith('audio/wav')) {\n contentType = 'audio/x-l16; sample-rate=16000; channel-count=1';\n } else if (mediaType.startsWith('audio/ogg')) {\n contentType =\n 'audio/x-cbr-opus-with-preamble; bit-rate=32000;' +\n ` frame-size-milliseconds=20; preamble-size=${offset}`;\n } else {\n console.warn('unknown media type in lex client');\n }\n\n const postContentReq = this.lexRuntimeClient.postContent({\n accept: acceptFormat,\n botAlias: this.botAlias,\n botName: this.botName,\n userId: this.userId,\n contentType,\n inputStream: blob,\n sessionAttributes,\n });\n\n return this.credentials.getPromise()\n .then(() => postContentReq.promise());\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib/lex/client.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/lex-web-ui.min.css b/dist/lex-web-ui.min.css index 387a8228..92a073dd 100755 --- a/dist/lex-web-ui.min.css +++ b/dist/lex-web-ui.min.css @@ -1,5 +1,5 @@ /*! -* lex-web-ui v"0.8.3" +* lex-web-ui v"0.9.0" * (c) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Released under the Amazon Software License. */#lex-web{-ms-flex-direction:column;flex-direction:column}#lex-web,.message-list[data-v-20b8f18d]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;width:100%}.message-list[data-v-20b8f18d]{background-color:#fafafa;-webkit-box-flex:1;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;margin-right:0;margin-left:0;overflow-y:auto;padding-top:.3em;padding-bottom:.5em}.message-bot[data-v-20b8f18d]{-ms-flex-item-align:start;align-self:flex-start}.message-human[data-v-20b8f18d]{-ms-flex-item-align:end;align-self:flex-end}.message[data-v-290c8f4f]{max-width:66vw}.audio-label[data-v-290c8f4f]{padding-left:.8em}.message-bot .chip[data-v-290c8f4f]{background-color:#ffebee}.message-human .chip[data-v-290c8f4f]{background-color:#e8eaf6}.chip[data-v-290c8f4f]{height:auto;margin:5px;font-size:calc(1em + .25vmin)}.play-button[data-v-290c8f4f]{font-size:2em}.response-card[data-v-290c8f4f]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:.8em;width:90vw}.message-text[data-v-d69cb2c8]{white-space:normal;padding:.8em}.card[data-v-799b9a4e]{width:75vw;position:inherit;padding-bottom:.5em}.card__title[data-v-799b9a4e]{padding:.5em;padding-top:.75em}.card__text[data-v-799b9a4e]{padding:.33em}.card__actions.button-row[data-v-799b9a4e]{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding-bottom:.15em}.status-bar[data-v-2df12d09]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.status-text[data-v-2df12d09]{-ms-flex-item-align:center;align-self:center;display:-webkit-box;display:-ms-flexbox;display:flex;text-align:center}.volume-meter[data-v-2df12d09]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.volume-meter meter[data-v-2df12d09]{height:.75rem;width:33vw}.input-container[data-v-6dd14e82]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center} \ No newline at end of file diff --git a/dist/lex-web-ui.min.js b/dist/lex-web-ui.min.js index d2b0ca65..7587752f 100755 --- a/dist/lex-web-ui.min.js +++ b/dist/lex-web-ui.min.js @@ -1,6 +1,6 @@ /*! -* lex-web-ui v"0.8.3" +* lex-web-ui v"0.9.0" * (c) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Released under the Amazon Software License. */ -!(function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue"),require("vuex"),require("aws-sdk/global"),require("aws-sdk/clients/lexruntime"),require("aws-sdk/clients/polly")):"function"==typeof define&&define.amd?define(["vue","vuex","aws-sdk/global","aws-sdk/clients/lexruntime","aws-sdk/clients/polly"],t):"object"==typeof exports?exports.LexWebUi=t(require("vue"),require("vuex"),require("aws-sdk/global"),require("aws-sdk/clients/lexruntime"),require("aws-sdk/clients/polly")):e.LexWebUi=t(e.vue,e.vuex,e["aws-sdk/global"],e["aws-sdk/clients/lexruntime"],e["aws-sdk/clients/polly"])})(this,(function(e,t,n,i,r){return (function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=61)})([(function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)}),(function(e,t,n){var i=n(34)("wks"),r=n(21),o=n(2).Symbol,s="function"==typeof o;(e.exports=function(e){return i[e]||(i[e]=s&&o[e]||(s?o:r)("Symbol."+e))}).store=i}),(function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)}),(function(e,t,n){var i=n(4),r=n(45),o=n(29),s=Object.defineProperty;t.f=n(5)?Object.defineProperty:function(e,t,n){if(i(e),t=o(t,!0),i(n),r)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}}),(function(e,t,n){var i=n(17);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}}),(function(e,t,n){e.exports=!n(11)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))}),(function(e,t){e.exports=function(e,t,n,i,r){var o,s=e=e||{},a=typeof e.default;"object"!==a&&"function"!==a||(o=e,s=e.default);var u="function"==typeof s?s.options:s;t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns),i&&(u._scopeId=i);var c;if(r?(c=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},u._ssrRegister=c):n&&(c=n),c){var l=u.functional,d=l?u.render:u.beforeCreate;l?u.render=function(e,t){return c.call(t),d(e,t)}:u.beforeCreate=d?[].concat(d,c):[c]}return{esModule:o,exports:s,options:u}}}),(function(e,t,n){var i=n(2),r=n(0),o=n(16),s=n(8),a=function(e,t,n){var u,c,l,d=e&a.F,f=e&a.G,p=e&a.S,h=e&a.P,m=e&a.B,g=e&a.W,v=f?r:r[t]||(r[t]={}),y=v.prototype,b=f?i:p?i[t]:(i[t]||{}).prototype;f&&(n=t);for(u in n)(c=!d&&b&&void 0!==b[u])&&u in v||(l=c?b[u]:n[u],v[u]=f&&"function"!=typeof b[u]?n[u]:m&&c?o(l,i):g&&b[u]==l?(function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t.prototype=e.prototype,t})(l):h&&"function"==typeof l?o(Function.call,l):l,h&&((v.virtual||(v.virtual={}))[u]=l,e&a.R&&y&&!y[u]&&s(y,u,l)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,e.exports=a}),(function(e,t,n){var i=n(3),r=n(18);e.exports=n(5)?function(e,t,n){return i.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}}),(function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}}),(function(e,t,n){var i=n(47),r=n(30);e.exports=function(e){return i(r(e))}}),(function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}}),(function(e,t,n){var i=n(46),r=n(35);e.exports=Object.keys||function(e){return i(e,r)}}),(function(e,t,n){e.exports={default:n(69),__esModule:!0}}),(function(e,t){e.exports={}}),(function(e,t,n){"use strict";t.__esModule=!0;var i=n(44),r=(function(e){return e&&e.__esModule?e:{default:e}})(i);t.default=r.default||function(e){for(var t=1;t=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})}))}),(function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}}),(function(e,t){t.f={}.propertyIsEnumerable}),(function(e,t,n){var i=n(30);e.exports=function(e){return Object(i(e))}}),(function(e,t){e.exports=!0}),(function(e,t,n){var i=n(3).f,r=n(9),o=n(1)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,o)&&i(e,o,{configurable:!0,value:t})}}),(function(e,t,n){n(74);for(var i=n(2),r=n(8),o=n(14),s=n(1)("toStringTag"),a=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=a[u],l=i[c],d=l&&l.prototype;d&&!d[s]&&r(d,s,c),o[c]=o.Array}}),(function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}}),(function(e,t,n){var i=n(17),r=n(2).document,o=i(r)&&i(r.createElement);e.exports=function(e){return o?r.createElement(e):{}}}),(function(e,t,n){var i=n(17);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}}),(function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}}),(function(e,t,n){var i=n(32),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}}),(function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}}),(function(e,t,n){var i=n(34)("keys"),r=n(21);e.exports=function(e){return i[e]||(i[e]=r(e))}}),(function(e,t,n){var i=n(2),r=i["__core-js_shared__"]||(i["__core-js_shared__"]={});e.exports=function(e){return r[e]||(r[e]={})}}),(function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")}),(function(e,t){t.f=Object.getOwnPropertySymbols}),(function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}}),(function(e,t,n){e.exports={default:n(67),__esModule:!0}}),(function(e,t,n){var i=n(19),r=n(1)("toStringTag"),o="Arguments"==i(function(){return arguments}()),s=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=s(t=Object(e),r))?n:o?i(t):"Object"==(a=i(t))&&"function"==typeof t.callee?"Arguments":a}}),(function(e,t,n){var i=n(39),r=n(1)("iterator"),o=n(14);e.exports=n(0).getIteratorMethod=function(e){if(void 0!=e)return e[r]||e["@@iterator"]||o[i(e)]}}),(function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(100),o=i(r),s=n(102),a=i(s),u="function"==typeof a.default&&"symbol"==typeof o.default?function(e){return typeof e}:function(e){return e&&"function"==typeof a.default&&e.constructor===a.default&&e!==a.default.prototype?"symbol":typeof e};t.default="function"==typeof a.default&&"symbol"===u(o.default)?function(e){return void 0===e?"undefined":u(e)}:function(e){return e&&"function"==typeof a.default&&e.constructor===a.default&&e!==a.default.prototype?"symbol":void 0===e?"undefined":u(e)}}),(function(e,t,n){t.f=n(1)}),(function(e,t,n){var i=n(2),r=n(0),o=n(24),s=n(42),a=n(3).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:s.f(e)})}}),(function(e,t,n){e.exports={default:n(62),__esModule:!0}}),(function(e,t,n){e.exports=!n(5)&&!n(11)((function(){return 7!=Object.defineProperty(n(28)("div"),"a",{get:function(){return 7}}).a}))}),(function(e,t,n){var i=n(9),r=n(10),o=n(65)(!1),s=n(33)("IE_PROTO");e.exports=function(e,t){var n,a=r(e),u=0,c=[];for(n in a)n!=s&&i(a,n)&&c.push(n);for(;t.length>u;)i(a,n=t[u++])&&(~o(c,n)||c.push(n));return c}}),(function(e,t,n){var i=n(19);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}}),(function(e,t){}),(function(e,t,n){"use strict";var i=n(24),r=n(7),o=n(50),s=n(8),a=n(9),u=n(14),c=n(71),l=n(25),d=n(73),f=n(1)("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,m,g,v,y){c(n,t,m);var b,A,_,x=function(e){if(!p&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",M="values"==g,C=!1,S=e.prototype,T=S[f]||S["@@iterator"]||g&&S[g],I=T||x(g),k=g?M?x("entries"):I:void 0,R="Array"==t?S.entries||T:T;if(R&&(_=d(R.call(new e)))!==Object.prototype&&(l(_,w,!0),i||a(_,f)||s(_,f,h)),M&&T&&"values"!==T.name&&(C=!0,I=function(){return T.call(this)}),i&&!y||!p&&!C&&S[f]||s(S,f,I),u[t]=I,u[w]=h,g)if(b={values:M?I:x("values"),keys:v?I:x("keys"),entries:k},y)for(A in b)A in S||o(S,A,b[A]);else r(r.P+r.F*(p||C),t,b);return b}}),(function(e,t,n){e.exports=n(8)}),(function(e,t,n){var i=n(4),r=n(72),o=n(35),s=n(33)("IE_PROTO"),a=function(){},u=function(){var e,t=n(28)("iframe"),i=o.length;for(t.style.display="none",n(52).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(" diff --git a/lex-web-ui/static/iframe/bot-loader.css b/lex-web-ui/static/iframe/bot-loader.css new file mode 100644 index 00000000..be503b3b --- /dev/null +++ b/lex-web-ui/static/iframe/bot-loader.css @@ -0,0 +1,66 @@ +.lex-web-ui { + bottom: 0; + box-shadow: 0px 0px 2px 2px rgba(0,0,0,0.25); + display: none; /* hidden by default changed once iframe is loaded */ + margin-bottom: 0px; + margin-left: 2px; + margin-right: 5vw; + margin-top: 2px; + max-width: 66vw; + min-height:66vh; /* dynamically changed on iframe maximize/minimize */ + min-width: 33vw; + position: fixed; + right: 0; + z-index: 2147483637; /* max z-index (2147483647) - 10 */ +} + +.lex-web-ui--show { + display: flex; +} + +.lex-web-ui--minimize { + height: 48px; + min-height: 48px; + max-height: 48px; + max-width: 30vw; + min-width: 20vw; +} + +/* hide on very small resolutions */ +@media only screen +and (max-width: 240px) { + .lex-web-ui { + display: none!important; + } +} +/* take most space on small resolutions (smart phones) */ +@media only screen +and (min-width: 241px) +and (max-width: 480px) { + .lex-web-ui { + min-width: 90vw; + min-height: 90vh; + margin-right: 2vw; + align-self: center; + } + .lex-web-ui--minimize { + min-width: 60vw; + min-height: 48px; + } +} +/* adjust down on medium resolutions */ +@media only screen +and (min-width: 481px) +and (max-width: 960px) { + .lex-web-ui { + min-width: 40vw; + } + .lex-web-ui--minimize { + min-width: 20vw; + } +} + +.lex-web-ui iframe { + overflow: hidden; + width: 100%; +} diff --git a/lex-web-ui/static/iframe/bot-loader.js b/lex-web-ui/static/iframe/bot-loader.js index 9024617e..06046782 100644 --- a/lex-web-ui/static/iframe/bot-loader.js +++ b/lex-web-ui/static/iframe/bot-loader.js @@ -35,7 +35,7 @@ var LexWebUiIframe = (function (document, window, defaultOptions) { // AWS SDK script dynamically added to the DOM // https://github.com/aws/aws-sdk-js - sdkUrl: 'https://sdk.amazonaws.com/js/aws-sdk-2.92.0.min.js', + sdkUrl: 'https://sdk.amazonaws.com/js/aws-sdk-2.94.0.min.js', // URL to download build time config JSON file configUrl: '/static/iframe/config.json', diff --git a/lex-web-ui/static/iframe/index.html b/lex-web-ui/static/iframe/index.html index 7c308a0d..5a873068 100644 --- a/lex-web-ui/static/iframe/index.html +++ b/lex-web-ui/static/iframe/index.html @@ -5,7 +5,7 @@ Chatbot UI iFrame Example - + diff --git a/package-lock.json b/package-lock.json index 15cb5d6e..475be196 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,366 @@ { "name": "aws-lex-web-ui", - "version": "0.8.3", - "lockfileVersion": 1 + "version": "0.9.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "accepts": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", + "integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=", + "dev": true, + "requires": { + "mime-types": "2.1.16", + "negotiator": "0.6.1" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", + "dev": true + }, + "content-type": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz", + "integrity": "sha1-t9ETrueo3Se9IRM8TcJSnfFyHu0=", + "dev": true + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "debug": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", + "integrity": "sha1-krrR9tBbu2u6Isyoi80OyJTChh4=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", + "dev": true + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "encodeurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", + "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA=", + "dev": true + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "etag": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz", + "integrity": "sha1-b2Ma7zNtbEY2K1F2QETOIWvjwFE=", + "dev": true + }, + "express": { + "version": "4.15.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz", + "integrity": "sha1-urZdDwOqgMNYQIly/HAPkWlEtmI=", + "dev": true, + "requires": { + "accepts": "1.3.3", + "array-flatten": "1.1.1", + "content-disposition": "0.5.2", + "content-type": "1.0.2", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.7", + "depd": "1.1.1", + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "etag": "1.8.0", + "finalhandler": "1.0.4", + "fresh": "0.5.0", + "merge-descriptors": "1.0.1", + "methods": "1.1.2", + "on-finished": "2.3.0", + "parseurl": "1.3.1", + "path-to-regexp": "0.1.7", + "proxy-addr": "1.1.5", + "qs": "6.4.0", + "range-parser": "1.2.0", + "send": "0.15.3", + "serve-static": "1.12.3", + "setprototypeof": "1.0.3", + "statuses": "1.3.1", + "type-is": "1.6.15", + "utils-merge": "1.0.0", + "vary": "1.1.1" + } + }, + "finalhandler": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.4.tgz", + "integrity": "sha512-16l/r8RgzlXKmFOhZpHBztvye+lAhC5SU7hXavnerC9UfZqZxxXl3BzL8MhffPT3kF61lj9Oav2LKEzh0ei7tg==", + "dev": true, + "requires": { + "debug": "2.6.8", + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.1", + "statuses": "1.3.1", + "unpipe": "1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "forwarded": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz", + "integrity": "sha1-Ge+YdMSuHCl7zweP3mOgm2aoQ2M=", + "dev": true + }, + "fresh": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz", + "integrity": "sha1-9HTKXmqSRtb9jglTz6m5yAWvp44=", + "dev": true + }, + "http-errors": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz", + "integrity": "sha1-X4uO2YrKVFZWv1cplzh/kEpyIlc=", + "dev": true, + "requires": { + "depd": "1.1.0", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": "1.3.1" + }, + "dependencies": { + "depd": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", + "integrity": "sha1-4b2Cxqq2ztlluXuIsX7T5SjKGMM=", + "dev": true + } + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ipaddr.js": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz", + "integrity": "sha1-KWrKh4qCGBbluF0KKFqZvP9FgvA=", + "dev": true + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "mime": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", + "integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM=", + "dev": true + }, + "mime-db": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz", + "integrity": "sha1-SNJtI1WJZRcErFkWygYAGRQmaHg=", + "dev": true + }, + "mime-types": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz", + "integrity": "sha1-K4WKUuXs1RbbiXrCvodIeDBpjiM=", + "dev": true, + "requires": { + "mime-db": "1.29.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", + "dev": true + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "parseurl": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", + "integrity": "sha1-yKuMkiO6NIiKpkopeyiFO+wY2lY=", + "dev": true + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, + "proxy-addr": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.5.tgz", + "integrity": "sha1-ccDuOxAt4/IC87ZPYI0XP8uhqRg=", + "dev": true, + "requires": { + "forwarded": "0.1.0", + "ipaddr.js": "1.4.0" + } + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "dev": true + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "dev": true + }, + "send": { + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz", + "integrity": "sha1-UBP5+ZAj31DRvZiSwZ4979HVMwk=", + "dev": true, + "requires": { + "debug": "2.6.7", + "depd": "1.1.1", + "destroy": "1.0.4", + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "etag": "1.8.0", + "fresh": "0.5.0", + "http-errors": "1.6.1", + "mime": "1.3.4", + "ms": "2.0.0", + "on-finished": "2.3.0", + "range-parser": "1.2.0", + "statuses": "1.3.1" + } + }, + "serve-static": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz", + "integrity": "sha1-n0uhni8wMMVH+K+ZEHg47DjVseI=", + "dev": true, + "requires": { + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "parseurl": "1.3.1", + "send": "0.15.3" + } + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", + "dev": true + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", + "dev": true + }, + "type-is": { + "version": "1.6.15", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", + "integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "2.1.16" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "utils-merge": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", + "integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg=", + "dev": true + }, + "vary": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz", + "integrity": "sha1-Z1Neu2lMHVIldFeYRmUyP1h+jTc=", + "dev": true + } + } } diff --git a/package.json b/package.json index 1f5bbcb8..48d4cd77 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aws-lex-web-ui", - "version": "0.8.3", + "version": "0.9.0", "description": "Sample Amazon Lex Web Interface", "main": "dist/lex-web-ui.min.js", "repository": { @@ -21,5 +21,8 @@ "bugs": { "url": "https://github.com/awslabs/aws-lex-web-ui/issues" }, - "homepage": "https://github.com/awslabs/aws-lex-web-ui#readme" + "homepage": "https://github.com/awslabs/aws-lex-web-ui#readme", + "devDependencies": { + "express": "^4.15.3" + } } diff --git a/server.js b/server.js new file mode 100644 index 00000000..a151ac09 --- /dev/null +++ b/server.js @@ -0,0 +1,22 @@ +// Usage: npm start +// Used for local serving and quick dev/testing of the prebuilt files. +// For heavy development, you should instead use the `npm run dev` command +// under the lex-web-ui dir +const express = require('express'); +const path = require('path'); + +const port = process.env.PORT || 8000; +const publicPath = '/'; + +const distDir = path.join(__dirname, 'dist'); +const configDir = path.join(__dirname, 'src/config'); +const websiteDir = path.join(__dirname, 'src/website'); +const app = express(); + +app.use(publicPath, express.static(configDir)); +app.use(publicPath, express.static(websiteDir)); +app.use(publicPath, express.static(distDir)); + +app.listen(port, function () { + console.log(`App listening on: http://localhost:${port}`); +}); diff --git a/src/config/.gitattributes b/src/config/.gitattributes new file mode 100644 index 00000000..d95fb090 --- /dev/null +++ b/src/config/.gitattributes @@ -0,0 +1 @@ +*.js* merge=ours diff --git a/src/config/aws-config.js b/src/config/aws-config.js new file mode 100644 index 00000000..409575dc --- /dev/null +++ b/src/config/aws-config.js @@ -0,0 +1,9 @@ +// Example of various AWS Mobile Hub constants used by this project + +// NOTE: AWS Mobile Hub will generate an aws-config file including these +// constants configured with the values of your project. You should use that +// file instead of this one. This is meant to show a sample of that file. + +const aws_bots_config = '[{"name":"","alias":"$LATEST","description":"Bot to order flowers.","bot-template":"bot-flowers","commands-help":["I would like to pick up flowers","I would like to order some flowers","Buy flowers"],"region":"us-east-1"}]'; +const aws_cognito_identity_pool_id = ''; +const aws_cognito_region = 'us-east-1'; diff --git a/src/config/bot-config.json b/src/config/bot-config.json new file mode 100644 index 00000000..1baa4796 --- /dev/null +++ b/src/config/bot-config.json @@ -0,0 +1,20 @@ +{ + "cognito": { + "poolId": "" + }, + "lex": { + "botName": "", + "initialText": "You can ask me for help ordering flowers. Just type \"Buy flowers\" or click on the mic and say it.", + "initialSpeechInstruction": "Say 'Buy Flowers' to get started." + }, + "polly": { + "voiceId": "Salli" + }, + "ui": { + "parentOrigin": "", + "toolbarTitle": "Order Flowers" + }, + "recorder": { + "preset": "speech_recognition" + } +} diff --git a/src/config/bot-loader-config.json b/src/config/bot-loader-config.json new file mode 100644 index 00000000..4d41a808 --- /dev/null +++ b/src/config/bot-loader-config.json @@ -0,0 +1,25 @@ +{ + "iframeOrigin": "", + "loadIframeMinimized": false, + "aws": { + "cognitoPoolId": "", + "region": "us-east-1" + }, + "iframeConfig": { + "lex": { + "botName": "", + "initialText": "You can ask me for help ordering flowers. Just type \"Buy flowers\" or click on the mic and say it.", + "initialSpeechInstruction": "Say 'Buy Flowers' to get started." + }, + "ui": { + "toolbarTitle": "Order Flowers", + "pushInitialTextOnRestart": false + }, + "polly": { + "voiceId": "Salli" + }, + "recorder": { + "preset": "speech_recognition" + } + } +} diff --git a/src/config/mobile-hub-project.yml b/src/config/mobile-hub-project.yml new file mode 100755 index 00000000..d48b52fe --- /dev/null +++ b/src/config/mobile-hub-project.yml @@ -0,0 +1,44 @@ +--- !com.amazonaws.mobilehub.v0.Project +features: + bots: !com.amazonaws.mobilehub.v0.Bots + components: + OrderFlowers: !com.amazonaws.mobilehub.v0.Bot + attributes: + childDirected: false + description: Bot to order flowers. + existing: false + template: bot-flowers + content-delivery: !com.amazonaws.mobilehub.v0.ContentDelivery + attributes: + enabled: true + visibility: public-global + components: + release: !com.amazonaws.mobilehub.v0.Bucket {} + sign-in: !com.amazonaws.mobilehub.v0.SignIn {} +name: lex-web-ui +region: us-east-1 +uploads: + - !com.amazonaws.mobilehub.v0.Upload + fileName: index.html + targetS3Bucket: hosting + - !com.amazonaws.mobilehub.v0.Upload + fileName: parent.html + targetS3Bucket: hosting + - !com.amazonaws.mobilehub.v0.Upload + fileName: lex-web-ui.min.js + targetS3Bucket: hosting + - !com.amazonaws.mobilehub.v0.Upload + fileName: bot-loader.js + targetS3Bucket: hosting + - !com.amazonaws.mobilehub.v0.Upload + fileName: bot-loader.css + targetS3Bucket: hosting + - !com.amazonaws.mobilehub.v0.Upload + fileName: lex-web-ui.min.css + targetS3Bucket: hosting + - !com.amazonaws.mobilehub.v0.Upload + fileName: bot-config.json + targetS3Bucket: hosting + - !com.amazonaws.mobilehub.v0.Upload + fileName: bot-loader-config.json + targetS3Bucket: hosting diff --git a/src/website/bot-loader.css b/src/website/bot-loader.css new file mode 100644 index 00000000..be503b3b --- /dev/null +++ b/src/website/bot-loader.css @@ -0,0 +1,66 @@ +.lex-web-ui { + bottom: 0; + box-shadow: 0px 0px 2px 2px rgba(0,0,0,0.25); + display: none; /* hidden by default changed once iframe is loaded */ + margin-bottom: 0px; + margin-left: 2px; + margin-right: 5vw; + margin-top: 2px; + max-width: 66vw; + min-height:66vh; /* dynamically changed on iframe maximize/minimize */ + min-width: 33vw; + position: fixed; + right: 0; + z-index: 2147483637; /* max z-index (2147483647) - 10 */ +} + +.lex-web-ui--show { + display: flex; +} + +.lex-web-ui--minimize { + height: 48px; + min-height: 48px; + max-height: 48px; + max-width: 30vw; + min-width: 20vw; +} + +/* hide on very small resolutions */ +@media only screen +and (max-width: 240px) { + .lex-web-ui { + display: none!important; + } +} +/* take most space on small resolutions (smart phones) */ +@media only screen +and (min-width: 241px) +and (max-width: 480px) { + .lex-web-ui { + min-width: 90vw; + min-height: 90vh; + margin-right: 2vw; + align-self: center; + } + .lex-web-ui--minimize { + min-width: 60vw; + min-height: 48px; + } +} +/* adjust down on medium resolutions */ +@media only screen +and (min-width: 481px) +and (max-width: 960px) { + .lex-web-ui { + min-width: 40vw; + } + .lex-web-ui--minimize { + min-width: 20vw; + } +} + +.lex-web-ui iframe { + overflow: hidden; + width: 100%; +} diff --git a/src/website/bot-loader.js b/src/website/bot-loader.js new file mode 100644 index 00000000..e3ed2f3b --- /dev/null +++ b/src/website/bot-loader.js @@ -0,0 +1,698 @@ +/* + Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Amazon Software License (the "License"). You may not use this file + except in compliance with the License. A copy of the License is located at + + http://aws.amazon.com/asl/ + + or in the "license" file accompanying this file. This file is distributed on an "AS IS" + BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the + License for the specific language governing permissions and limitations under the License. + */ +'use strict'; + +/* + * Sample JavaScript code to dynamically add bot iframe, AWS SDK, + * load credentials and add related event handlers + * + * It uses a Cognito identity pool to illustrate passing credentials to the + * chat bot + */ + + +/** + * Class used to load the bot as an iframe + */ +var LexWebUiIframe = (function (document, window, defaultOptions) { + // default options - merged with options passed in the constructor + var OPTIONS = { + // div container class to insert iframe + containerClass: 'lex-web-ui', + + // iframe source uri. use embed=true query string when loading as iframe + iframeSrcPath: '/index.html#/?lexWebUiEmbed=true', + + // AWS SDK script dynamically added to the DOM + // https://github.com/aws/aws-sdk-js + sdkUrl: 'https://sdk.amazonaws.com/js/aws-sdk-2.94.0.min.js', + + // URL to download build time config JSON file + configUrl: '/bot-loader-config.json', + + // controls whether the bot loader script should + // automatically initialize and load the iframe. + // If set to false, you should manually initialize + // using the init() method + shouldAutoLoad: true, + }; + + /* + The config field is initialized from the contents of OPTIONS.configUrl. + At minimum, it should contain the following keys (see the README for details): + # origin contains proto://host:port + # port needed if not default 80 for htt or 443 for https + iframeOrigin + + # AWS config + aws: + # AWS Region + region: + + # Cognito Pool Id + cognitoPoolId: + */ + + // class used by this script + function BotLoader(options) { + this.options = Object.assign({}, OPTIONS, defaultOptions, options); + this.config = {}; + this.iframeElement = null; + this.containerElement = null; + this.credentials = null; + this.isChatBotReady = false; + }; + + /** + * Class attribute that controls whether the bot loader script should + * automatically load the iframe + */ + BotLoader.shouldAutoLoad = true; + + /** + * Initializes the chatbot ui. This should be called when the DOM has + * finished loading + */ + BotLoader.prototype.init = function () { + var self = this; + + Promise.resolve() + .then(function initConfig() { + return loadConfigFromJsonFile(self.options.configUrl) + .then(function initConfigFromEvent(config) { + return loadConfigFromEvent(config); + }) + .then(function assignConfig(config) { + if (!validateConfig(config)) { + return Promise.reject('config object is missing required fields'); + } + self.config = config; + return config; + }); + }) + .then(function initContainer() { + return addContainer(self.options.containerClass) + .then(function assignContainer(containerElement) { + self.containerElement = containerElement; + return containerElement; + }); + }) + .then(function initSdk() { + return addAwsSdk( + self.containerElement, + self.options.containerClass, + self.options.sdkUrl + ); + }) + .then(function initCredentials() { + return createCredentials( + self.config.aws.region || 'us-east-1', + self.config.aws.cognitoPoolId + ) + .then(function assignCredentials(credentials) { + self.credentials = credentials; + }); + }) + .then(function addMessageFromIframeListener() { + window.addEventListener( + 'message', + self.onMessageFromIframe.bind(self), + false + ); + }) + .then(function initIframe() { + if (!self.config.iframeOrigin || !self.containerElement) { + return Promise.reject('missing fields when initializing iframe'); + } + return addIframe( + self.config.iframeOrigin, + self.containerElement, + self.options.containerClass, + self.options.iframeSrcPath + ) + .then(function assignIframe(iframeElement) { + self.iframeElement = iframeElement; + }) + .then(function waitForChatBot() { + return self.waitForChatBotReady(); + }); + }) + .then(function displayIframe() { + return Promise.resolve() + .then(function minimizeUi() { + return (self.config.loadIframeMinimized) ? + self.sendMessageToIframe({ event: 'toggleMinimizeUi' }) : + Promise.resolve(); + }) + .then(function showUi() { + toggleShowUi(self.containerElement, self.options.containerClass); + }); + }) + .then(function setupEvents() { + return Promise.resolve() + .then(function addParentToIframeListener() { + document.addEventListener( + 'lexWebUiMessage', + self.onMessageToIframe.bind(self), + false + ); + }) + .then(function sendReadyMessageToIframe() { + return self.sendMessageToIframe({ event: 'parentReady' }); + }) + .then(function sendReadyMessageToParent() { + var event = new Event('lexWebUiReady'); + document.dispatchEvent(event); + }); + + }) + .catch(function initError(error) { + console.error('could not initialize chat bot -', error); + }); + }; + + /************************************************************************** + * Init functions - the functions in this section are helpers used by the + * BotLoader init() method. + **************************************************************************/ + + /** + * Loads the bot config from a JSON file URL + */ + function loadConfigFromJsonFile(url) { + return new Promise(function loadConfigFromJsonFilePromise(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url); + xhr.responseType = 'json'; + xhr.onerror = function configOnError() { + reject('error getting chat bot config from url: ' + url); + }; + xhr.onload = function configOnLoad() { + if (xhr.status == 200) { + if (xhr.response) { + resolve(xhr.response); + } else { + reject('invalid chat bot config object'); + } + } else { + reject('failed to get chat bot config with status: ' + xhr.status); + } + }; + xhr.send(); + }); + }; + + /** + * Loads dynamic bot config from an event + * Merges it with the config passed as parameter + */ + function loadConfigFromEvent(conf) { + return new Promise(function waitForConfigEvent(resolve, reject) { + var timeoutInMs = conf.configEventTimeOutInMs || 10000; + + var timeoutId = setTimeout(onConfigEventTimeout, timeoutInMs); + document.addEventListener('loadlexconfig', onConfigEventLoaded, false); + + var intervalId = setInterval(emitReceiveEvent, 500); + // signal that we are ready to receive the dynamic config + function emitReceiveEvent() { + var event = new Event('receivelexconfig'); + document.dispatchEvent(event); + }; + + function onConfigEventLoaded(evt) { + clearTimeout(timeoutId); + clearInterval(intervalId); + document.removeEventListener('loadlexconfig', onConfigEventLoaded, false); + + if (evt && ('detail' in evt) && evt.detail && ('config' in evt.detail)) { + var evtConfig = evt.detail.config; + var mergedConfig = mergeConfig(conf, evtConfig); + return resolve(mergedConfig); + } else { + return reject('malformed config event: ' + JSON.stringify(evt)); + } + }; + + function onConfigEventTimeout() { + clearInterval(intervalId); + document.removeEventListener('loadlexconfig', onConfigEventLoaded, false); + return reject('config event timed out'); + }; + }); + } + + /** + * Merges config objects. The initial set of keys to merge are driven by + * the baseConfig. The srcConfig values override the baseConfig ones + * unless the srcConfig value is empty + */ + function mergeConfig(baseConfig, srcConfig) { + function isEmpty(data) { + if(typeof(data) === 'number' || typeof(data) === 'boolean') { + return false; + } + if(typeof(data) === 'undefined' || data === null) { + return true; + } + if(typeof(data.length) !== 'undefined') { + return data.length === 0; + } + return Object.keys(data).length === 0; + } + + // use the baseConfig first level keys as the base for merging + return Object.keys(baseConfig) + .map(function (key) { + let mergedConfig = {}; + let value = baseConfig[key]; + // merge from source if its value is not empty + if (key in srcConfig && !isEmpty(srcConfig[key])) { + value = (typeof(baseConfig[key]) === 'object') ? + // recursively merge sub-objects in both directions + Object.assign( + mergeConfig(srcConfig[key], baseConfig[key]), + mergeConfig(baseConfig[key], srcConfig[key]), + ) : + srcConfig[key]; + } + mergedConfig[key] = value; + return mergedConfig; + }) + .reduce(function (merged, configItem) { + return Object.assign({}, merged, configItem); + }, + {} + ); + }; + + /** + * Validate that the config has the expected structure + */ + function validateConfig(config) { + return ( + ('iframeOrigin' in config && config.iframeOrigin) && + ('aws' in config && config.aws) && + ('cognitoPoolId' in config.aws && config.aws.cognitoPoolId) + ); + } + + /** + * Adds a div container to document body which will hold the chat bot iframe + * and AWS SDK script + */ + function addContainer(containerClass) { + if (!containerClass) { + return Promise.reject('invalid chat bot container class: ' + containerClass); + } + var divElement = document.querySelector('.' + containerClass); + if (divElement) { + return Promise.resolve(divElement); + } + divElement = document.createElement('div'); + divElement.classList.add(containerClass); + document.body.appendChild(divElement); + + return Promise.resolve(divElement); + } + + /** + * Adds a script tag to dynamically load the AWS SDK under the application + * div container. Avoids loading the SDK if the AWS SDK seems to be loaded + * or the tag exists + */ + function addAwsSdk(divElement, containerClass, sdkUrl) { + return new Promise(function addAwsSdkPromise(resolve, reject) { + if (!divElement || !divElement.appendChild) { + reject('invalid node element in add sdk'); + } + var sdkScriptElement = + document.querySelector('.' + containerClass + ' script'); + if (sdkScriptElement || 'AWS' in window) { + resolve(sdkScriptElement); + } + + sdkScriptElement = document.createElement('script'); + sdkScriptElement.setAttribute('type', 'text/javascript'); + + sdkScriptElement.onerror = function sdkOnError() { + reject('failed to load AWS SDK link:' + sdkUrl); + }; + sdkScriptElement.onload = function sdkOnLoad() { + resolve(sdkScriptElement); + }; + + sdkScriptElement.setAttribute('src', sdkUrl); + + divElement.appendChild(sdkScriptElement); + }); + } + + /** + * Initializes credentials + */ + function createCredentials(region, cognitoPoolId) { + if (!('AWS' in window) || + !('CognitoIdentityCredentials' in window.AWS) + ) { + return Promise.reject('unable to find AWS SDK object'); + } + + var credentials = new AWS.CognitoIdentityCredentials( + { IdentityPoolId: cognitoPoolId }, + { region: region }, + ); + + return credentials.getPromise() + .then(function () { + return credentials; + }); + } + + /** + * Adds chat bot iframe under the application div container + */ + function addIframe(origin, divElement, containerClass, iframeSrcPath) { + var iframeElement = + document.querySelector('.' + containerClass + ' iframe'); + if (iframeElement) { + return Promise.resolve(iframeElement); + } + if (!('appendChild' in divElement)) { + reject('invalid node element to append iframe'); + } + + iframeElement = document.createElement('iframe'); + iframeElement.setAttribute('src', origin + iframeSrcPath); + iframeElement.setAttribute('frameBorder', '0'); + iframeElement.setAttribute('scrolling', 'no'); + + divElement.appendChild(iframeElement); + + return new Promise(function loadIframePromise(resolve, reject) { + var timeoutInMs = 20000; // bail out on loading after this timeout + var timeoutId = setTimeout(onIframeTimeout, timeoutInMs); + iframeElement.addEventListener('load', onIframeLoaded, false); + + function onIframeLoaded(evt) { + clearTimeout(timeoutId); + iframeElement.removeEventListener('load', onIframeLoaded, false); + + return resolve(iframeElement); + }; + + function onIframeTimeout() { + iframeElement.removeEventListener('load', onIframeLoaded, false); + return reject('iframe load timeout'); + }; + }); + } + + /************************************************************************** + * iframe UI helpers + **************************************************************************/ + + /** + * Toggle between showing/hiding chatbot ui + */ + function toggleShowUi(containerElement, containerClass) { + containerElement.classList.toggle( + containerClass + '--show' + ); + } + + /** + * Toggle between miminizing and expanding the chatbot ui + */ + function toggleMinimizeUi(containerElement, containerClass) { + containerElement.classList.toggle( + containerClass + '--minimize' + ); + } + + /************************************************************************** + * BotLoader Methods + **************************************************************************/ + + /** + * Wait for the chatbot UI to send the 'ready' message indicating + * that it has successfully initialized + */ + BotLoader.prototype.waitForChatBotReady = function () { + var self = this; + return new Promise(function waitForReady(resolve, reject) { + var timeoutInMs = 15000; + var timeoutId = setTimeout(onConfigEventTimeout, timeoutInMs); + var intervalId = setInterval(checkIsChatBotReady, 500); + + function checkIsChatBotReady() { + if (self.isChatBotReady) { + clearTimeout(timeoutId); + clearInterval(intervalId); + return resolve(); + } + }; + + function onConfigEventTimeout() { + clearInterval(intervalId); + return reject('chatbot loading time out'); + }; + }); + } + + /** + * Get AWS credentials to pass to the chatbot UI + */ + BotLoader.prototype.getCredentials = function () { + var self = this; + var identityId = localStorage.getItem('cognitoid'); + + if (!self.credentials || !('getPromise' in self.credentials)) { + console.error('getPromise not found in credentials'); + return Promise.reject('getPromise not found in credentials'); + } + + return self.credentials.getPromise() + .then(function storeIdentityId() { + localStorage.setItem('cognitoid', self.credentials.identityId); + identityId = localStorage.getItem('cognitoid'); + }) + .then(function getCredentialsPromise() { + return self.credentials; + }); + } + + /** + * Send a message to the iframe using postMessage + */ + BotLoader.prototype.sendMessageToIframe = function(message) { + var self = this; + if (!self.iframeElement || + !('contentWindow' in self.iframeElement) || + !('postMessage' in self.iframeElement.contentWindow) + ) { + return Promise.reject('invalid iframe element'); + } + + return new Promise(function sendMessageToIframePromise(resolve, reject) { + var messageChannel = new MessageChannel(); + messageChannel.port1.onmessage = + function sendMessageToIframeResolver(evt) { + messageChannel.port1.close(); + messageChannel.port2.close(); + if (evt.data.event === 'resolve') { + resolve(evt.data); + } else { + reject('iframe failed to handle message - ' + evt.data.error); + } + }; + self.iframeElement.contentWindow.postMessage(message, + self.config.iframeOrigin, [messageChannel.port2]); + }); + }; + + BotLoader.prototype.onMessageToIframe = function (evt) { + var self = this; + + if (!evt || !('detail' in evt) || !evt.detail || + !('message' in evt.detail) + ) { + console.error( + 'malformed message to iframe event: ' + JSON.stringify(evt) + ); + return; + } + return self.sendMessageToIframe(evt.detail.message); + }; + + /** + * Message handler - receives postMessage events from iframe + */ + BotLoader.prototype.onMessageFromIframe = function (evt) { + var self = this; + var messageHandler = self.createIframeMessageHandlers(); + // security check + if (evt.origin !== self.config.iframeOrigin) { + console.warn('postMessage from invalid origin', evt.origin); + return; + } + if (!evt.ports) { + console.error('postMessage not sent over MessageChannel', evt); + return; + } + + // TODO convert events and handlers to a reducer + switch (evt.data.event) { + case 'ready': + messageHandler.onReady(evt); + break; + case 'getCredentials': + messageHandler.onGetCredentials(evt); + break; + case 'initIframeConfig': + messageHandler.onInitIframeConfig(evt); + break; + case 'toggleMinimizeUi': + messageHandler.onToggleMinimizeUi(evt); + break; + case 'updateLexState': + messageHandler.onUpdateLexState(evt); + break; + default: + console.error('unknown message in event', evt); + break; + } + }; + + /** + * Creates an object containing the message handler functions + * used by onMessageFromIframe + */ + BotLoader.prototype.createIframeMessageHandlers = function () { + var self = this; + + return { + onReady: function onReady(evt) { + self.isChatBotReady = true; + evt.ports[0].postMessage({ event: 'resolve', type: evt.data.event }); + }, + onGetCredentials: function onGetCredentials(evt) { + return self.getCredentials() + .then(function resolveGetCredentials(creds) { + evt.ports[0].postMessage({ + event: 'resolve', + type: evt.data.event, + data: creds, + }); + }) + .catch(function onGetCredentialsError(error) { + console.error('failed to get credentials', error); + evt.ports[0].postMessage({ + event: 'reject', + type: evt.data.event, + error: 'failed to get credentials', + }); + }); + }, + onInitIframeConfig: function onInitIframeConfig(evt) { + var iframeConfig = self.config.iframeConfig; + try { + iframeConfig.cognito = { + poolId: self.config.aws.cognitoPoolId, + }; + iframeConfig.region = self.config.aws.region; + // place dynamic initialization logic in here + } catch (e) { + evt.ports[0].postMessage({ + event: 'reject', + type: evt.data.event, + error: 'failed to obtain a valid iframe config', + }); + console.error('failed to assign iframe config', e); + return; + } + evt.ports[0].postMessage({ + event: 'resolve', + type: evt.data.event, + data: iframeConfig, + }); + }, + onToggleMinimizeUi: function onToggleMinimizeUi(evt) { + toggleMinimizeUi(self.containerElement, self.options.containerClass); + evt.ports[0].postMessage({ event: 'resolve', type: evt.data.event }); + }, + onUpdateLexState: function onUpdateLexState(evt) { + // evt.data will contain the Lex state + // send resolve ressponse to the chatbot ui + evt.ports[0].postMessage({ event: 'resolve', type: evt.data.event }); + + // relay event to parent + var event = new CustomEvent('updatelexstate', { 'detail': evt.data }); + document.dispatchEvent(event); + }, + }; + }; + + return BotLoader; +})( + document, + window, + // options to override defaults passed in an existing LexWebUi.options var + (LexWebUiIframe && LexWebUiIframe.options) ? LexWebUiIframe.options : null +); + +/** + * Instantiates the bot loader +*/ +var lexWebUi = (function (document, window, BotLoader) { + /** + * Check if modern browser features used by chat bot are supported + */ + function isSupported() { + var features = [ + 'Audio', + 'Blob', + 'MessageChannel', + 'Promise', + 'URL', + 'localStorage', + 'postMessage', + ]; + return features.every(function(feature) { + return feature in window; + }); + } + + var botLoader = new BotLoader(); + + if (!botLoader.options.shouldAutoLoad) { + return botLoader; + } + + if (isSupported()) { + // initialize iframe once the DOM is loaded + document.addEventListener( + 'DOMContentLoaded', + function initBoloader() { + botLoader.init(); + }.bind(this), + false + ); + return botLoader; + } else { + console.warn( + 'chatbot UI could not be be loaded - ' + + 'could not find require browser functions' + ); + } +})(document, window, LexWebUiIframe); diff --git a/src/website/index.html b/src/website/index.html new file mode 100644 index 00000000..fda1e648 --- /dev/null +++ b/src/website/index.html @@ -0,0 +1,122 @@ + + + + + + + LexWebUi Demo + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + diff --git a/src/website/parent.html b/src/website/parent.html new file mode 100644 index 00000000..d9dbb1df --- /dev/null +++ b/src/website/parent.html @@ -0,0 +1,287 @@ + + + + + + Chatbot UI iFrame Example + + + + + + +
+

Lex Chatbot UI Sample Parent Page

+

+ Use the chatbot UI to drive your bot. This page will dynamically + update using the associated Lex variables as the bot dialog progresses. +

+ +
+
+
+
Send Intent to iFrame
+
+
+ +
+
+
+
+
+ +
+
+
+
Lex Dialog State
+
+
+ dialogState: + +
+
+
+
+
+ +
+
+
+
Lex Slots
+
+
+
+
+
+
+ +
+
+
+
Lex Intent Name
+
+
+ Intent Name: + +
+
+
+
+
+ +
+
+
+
Lex Session Attributes
+
+
+

+              
+
+
+
+
+ +
+
+
+
Lex Response Card
+
+
+

+              
+
+
+
+
+ +
+
+
+
NOTE
+
+

+ This application was created using the + aws-lex-web-ui + project. +

+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/README.md b/templates/README.md index c4cd0693..c3cac430 100644 --- a/templates/README.md +++ b/templates/README.md @@ -3,51 +3,31 @@ > Sample CloudFormation Stack ## Overview -This repository provides a set of +This directory provides a set of [AWS CloudFormation](https://aws.amazon.com/cloudformation/) templates to automatically build and deploy a sample [Amazon Lex](https://aws.amazon.com/lex/) -web interface. The stack creates a deployment pipeline using -[CodeCommit](https://aws.amazon.com/codecommit/) -[CodePipeline](https://aws.amazon.com/codepipeline/) -and [CodeBuild](https://aws.amazon.com/codebuild/). -which automatically builds and deploys changes to the app committed -to the CodeCommit repo. The stack can also deploy related resources such -as the -[Cognito Identity Pool](http://docs.aws.amazon.com/cognito/latest/developerguide/identity-pools.html) and Lex bot. +web interface. The templates are used to create and manage associated +resources such as the Lex Bot and Cognito Identity Pool. The web +applicaton is bootstrapped from source hosted in an AWS owned S3 bucket +(see below for instructions on hosting your own). -## Launching -To deploy a CloudFormation stack with a working demo of the application, -follow the steps below: +The CloudFormation templates supports two deployment modes which are +controlled by `CreatePipeline` parameter: +1. **CodeBuild Mode** configures and deploys directly to S3 from a +CodeBuild project. This is the default mode. It is used when the +`CreatePipeline` parameter is set to false. This mode uses the pre-built +library. +2. **Pipeline Mode** configures, builds and deploys using CodeCommit, +CodeBuild and CodePipeline. This mode creates an automated deployment +pipeine that performs a full build of the application from source. -1. Click the following CloudFormation button to launch your own copy of -the sample application stack in the us-east-1 (N. Virginia) AWS region: +## Launch [![cloudformation-launch-stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=lex-web-ui&templateURL=https://s3.amazonaws.com/aws-bigdata-blog/artifacts/aws-lex-web-ui/artifacts/templates/master.yaml). -You can accept the defaults in the CloudFormation Create Stack Wizard up -until the last step. At the last step, when prompted to create the stack, -select the checkmark that says: "I acknowledge that AWS CloudFormation -might create IAM resources with custom names". It takes about 10 minutes -for the CloudFormation stacks to got to `CREATE_COMPLETE` status. -2. Once the status of all the CloudFormation stacks -is `CREATE_COMPLETE`, click on the `PipelineUrl` link in the output -section of the master stack. This will take you to the CodePipeline -console. You can monitor the progress of the deployment pipeline from -there. It takes about 10 minutes to build and deploy the application. -3. Once the pipeline has deployed successfully, go back to the -output section of the master CloudFormation stack and click on the -`ParentPageUrl` link. You can also browse to the `WebAppUrl` link. Those -links will take you to the sample application running as an embedded -iframe or as a stand-alone web application respectively. - -## CloudFormation Stack -### Diagram -Here is a diagram of the CloudFormation stack created by this project: - - ### CloudFormation Resources -The CloudFormation stack creates the following resources in your AWS account: - +Depenpending on the deployment mode, the CloudFormation stack can create +resources in your AWS account including: - A [Amazon Lex](http://docs.aws.amazon.com/lex/latest/dg/what-is.html) bot. You can optionally pass the bot name of an existing one to avoid creating a new one. @@ -55,33 +35,38 @@ creating a new one. used to pass temporary AWS credentials to the web app. You can optionally pass the ID of an existing Cognito Identity Pool to avoid creating a new one. -- A [CodeCommit](https://aws.amazon.com/codecommit/) -repository loaded with the source code in this project -- A continuous delivery pipeline using [CodePipeline](https://aws.amazon.com/codepipeline/) -and [CodeBuild](https://aws.amazon.com/codebuild/). -The pipeline automatically builds and deploys changes to the app committed - to the CodeCommit repo. -- An [S3](https://aws.amazon.com/s3/) bucket to store build artifacts -- Two S3 buckets to host the web application (parent and iframe). The - pipeline deploys to this bucket. +- A [CodeBuild](https://aws.amazon.com/codebuild/) project to configure +and deploy to S3 when using the CodeBuild Deployment Mode. If using the +Pipeline Deployment Mode, a CodeBuild project is created to bootstrap +a CodeCommit repository whit the application source. +- [S3](https://aws.amazon.com/s3/) buckets to host the web application +and to store build artifacts. - [Lambda](https://aws.amazon.com/lambda/) functions used as CloudFormation [Custom Resources](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html) to facilitate custom provisioning logic - [CloudWatch Logs](http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html) groups automatically created to log the output of Lambda the functions - Associated [IAM roles](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -for all of the above +for the stack resources + +If using the Pipeline Deployment Mode, the stack creates the following resources: +- A [CodeCommit](https://aws.amazon.com/codecommit/) +repository loaded with the source code in this project. This is only +created when using the pipeline deployment mode +- A continuous delivery pipeline using [CodePipeline](https://aws.amazon.com/codepipeline/) +and [CodeBuild](https://aws.amazon.com/codebuild/). +The pipeline automatically builds and deploys changes to the app committed + to the CodeCommit repo ### CloudFormation Templates -The CloudFormation launch button above launches a master stack that in -turn creates various nested stacks. The following table lists the -CloudFormation templates used to create these stacks: +The following table lists the CloudFormation templates used to create the stacks: | Template | Description | | --- | --- | | [master.yaml](./master.yaml) | This is the master template used to deploy all the stacks. It uses nested sub-templates to include the ones listed below. | | [lexbot.yaml](./lexbot.yaml) | Lex bot and associated resources (i.e. intents and slot types). | | [cognito.yaml](./cognito.yaml) | Cognito Identity Pool and IAM role for unauthenticated identity access. | +| [codebuild-deploy.yaml](./codebuild-deploy.yaml) | Uses CodeBuild to configure and deploy to S3 | | [coderepo.yaml](./coderepo.yaml) | CodeCommit repo dynamically initialized with the files in this repo using CodeBuild and a custom resource. | | [pipeline.yaml](./pipeline.yaml) | Continuous deployment pipeline of the Lex Web UI Application using CodePipeline and CodeBuild. The pipeline takes the source from CodeCommit, builds the Lex web UI application using CodeBuild and deploys the app to an S3 bucket. | @@ -105,6 +90,7 @@ to modify are: of the parent window. Only needed if you wish to embed the web app into an existing site using an iframe. The origin is used to control which sites can communicate with the iframe +- `CreatePipeline`: Controls the deployment mode as explained above ### Output Once the CloudFormation stack is successfully launched, the status of @@ -115,9 +101,9 @@ section. Here is a list of the output variables: - `PipelineUrl`: Link to CodePipeline in the AWS console. After the stack is successfully launched, the pipeline automatically starts the build and deployment process. You can click on this link to monitor the pipeline. -- `CodeCommitRepoUrl`: CodeCommit repository clone URL. You can clone -the repo using this link and push changes to it to have the pipeline -build and deploy the web app +- `CodeCommitRepoUrl`: When using the Pipeline Deployment Mode, this +CodeCommit repository clone URL. You can clone the repo using this link +and push changes to it to have the pipeline build and deploy the web app. - `WebAppUrl`: URL of the web app running on a full page. The web app will be available once the pipeline has completed deploying - `ParentPageUrl`: URL of the web app running in an iframe. This is an @@ -129,16 +115,73 @@ by the stack. This is an optional output that is returned only when the stack creates a Cognito Identity Pool. It is not returned if an existing pool ID was passed as a parameter to the stack during creation. -## Deployment Pipeline -When the stacks have completed launching, you can see the status of -the pipeline as it builds and deploys the application. The link to the -pipeline in the AWS console can be found in the `PipelineUrl` output -variable of the master stack. +## Build and Deployment Overview +The CloudFormation stack builds and deploys the application using +CodeBuild. Various CloudFormation parameters and resource names +are passed as environmental variables to CodeBuild. This includes +references to the S3 Buckets, Cognito Identity Pool and Lex Bot created +by CloudFormation. CodeBuild uses the [Makefile](../Makefile) in the root +directory of this repository control the build and deployment process. + +## CodeBuild Deployment Mode +This is the default deployment mode which is use when the `CreatePipeline` +parameter is set to false. In this mode, the stack creates a CodeBuild +project that performs the appliction configuration and deploys the +files to S3. Once the CloudFormation stack is successfully launched and +the status of all nested stacks is `CREATE_COMPLETE`, browse to the +`CodeBuildUrl` link in the output section of the stack. Monitor the +the build run to make sure it is successful. After the CodeBuild run +completes, you can browse to the `ParentPageUrl` or `WebAppUrl` links +in the CloudFormation output to see the deployed chatbot UI. + +Once deployed, you can go back to the CodeBuild project to change the +applicaton configuration by modifying the environmental variables passed +by CodeBuild. You can start a new build in CodeBuild to reconfigure and +redeploy the application. By default, the CodeBuild project uses a zip +file in an AWS owned S3 bucket as its source. That zip file contains +the source in this project and it is regularly updated. If you want to +use your own source, see the *Deploy Using My Own Bootstrap S3 Bucket* +section below. + +## Pipeline Deployment Mode +When the `CreatePipeline` parameter is set to true, the stack creates +a deployment pipeline using +[CodeCommit](https://aws.amazon.com/codecommit/) +[CodePipeline](https://aws.amazon.com/codepipeline/) +and [CodeBuild](https://aws.amazon.com/codebuild/). +which automatically builds and deploys changes to the app committed +to the CodeCommit repo. + +### Diagram +Here is a diagram of the CloudFormation stack created by the pipeline deployment mode: + + + +### Launching Using the Pipeline +To deploy a CloudFormation stack with a working demo of the application, +follow the steps below: -Once the pipeline successfully finishes deploying, you should be able to -browse to the web app. The web app URL can be found in the `WebAppUrl` -output variable. +1. Click the following CloudFormation button to launch your own copy of +the sample application stack in the us-east-1 (N. Virginia) AWS region: +[![cloudformation-launch-stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=lex-web-ui&templateURL=https://s3.amazonaws.com/aws-bigdata-blog/artifacts/aws-lex-web-ui/artifacts/templates/master.yaml). +2. Change the `CreatePipeline` parameter to `true`. After that, +you can accept the defaults in the CloudFormation Create Stack Wizard up +until the last step. At the last step, when prompted to create the stack, +select the checkmark that says: "I acknowledge that AWS CloudFormation +might create IAM resources with custom names". It takes about 10 minutes +for the CloudFormation stacks to got to `CREATE_COMPLETE` status. +3. Once the status of all the CloudFormation stacks +is `CREATE_COMPLETE`, click on the `PipelineUrl` link in the output +section of the master stack. This will take you to the CodePipeline +console. You can monitor the progress of the deployment pipeline from +there. It takes about 10 minutes to build and deploy the application. +4. Once the pipeline has deployed successfully, go back to the +output section of the master CloudFormation stack and click on the +`ParentPageUrl` link. You can also browse to the `WebAppUrl` link. Those +links will take you to the sample application running as an embedded +iframe or as a stand-alone web application respectively. +### Deployment Pipeline The source of this project is automatically forked into a CodeCommit repository created by the CloudFormation stack. Any changes pushed to the master branch of this forked repo will automatically kick off the @@ -154,7 +197,7 @@ Here is a diagram of the deployment pipeline: ## Directory Structure -This project contains the following main directories: +The following directories are relevant to the CloudFormation setup: ``` . @@ -238,7 +281,7 @@ your bucket. The bucket and path are configured by the `BootstrapBucket` and `BootstrapPrefix` variables under the `Mappings` section of the template. 3. Modify the variables in the local build environment file: -[build/config.env](../build/config.env). These variables control the build +[config/env.mk](../config/env.mk). These variables control the build environment and web application deployment. In specific, you should modify the following variables: - `BOOTSTRAP_BUCKET_PATH`: point it to your own bucket and prefix diff --git a/templates/codebuild-deploy.yaml b/templates/codebuild-deploy.yaml new file mode 100644 index 00000000..65b79099 --- /dev/null +++ b/templates/codebuild-deploy.yaml @@ -0,0 +1,301 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: > + This template creates a CodeBuild project used to configure and deploy + the chatbot UI + +Parameters: + CodeBuildName: + Type: String + Description: CodeBuild project used to configure and deploy the Lex Web UI + Default: lex-web-ui-conf-deploy + MinLength: 2 + MaxLength: 255 + AllowedPattern: '^[A-Za-z0-9][A-Za-z0-9\-_]{1,254}$' + ConstraintDescription: > + Should start with Alphanumeric. May contain alphanumeric, undescore + and dash. + + SourceBucket: + Description: S3 bucket where the source is located + Type: String + Default: aws-bigdata-blog + + SourceObject: + Description: S3 object zip file containing the project source + Type: String + Default: artifacts/aws-lex-web-ui/artifacts/src.zip + + CustomResourceCodeObject: + Type: String + Description: > + S3 object zip file containing Lambda custom resource functions + Default: artifacts/aws-lex-web-ui/artifacts/custom-resources.zip + + CleanupBuckets: + Type: String + Default: true + AllowedValues: + - true + - false + Description: > + If set to True, buckets and their associated data will be deleted on + CloudFormation stack delete. If set to False, S3 buckets will be retained. + + CognitoIdentityPoolId: + Type: String + Description: > + Cognito Identity Pool Id to used in the web app configuration. + MinLength: 1 + MaxLength: 55 + AllowedPattern: '^[\w-]+:[0-9a-f-]+$' + ConstraintDescription: > + Alphanumeric followed by a colum and ending with a hex uuid type. + + BotName: + Description: > + Name of Lex bot to be used in the web app configuration. + Type: String + MinLength: 2 + MaxLength: 50 + AllowedPattern: '^[a-zA-Z]+((_[a-zA-Z]+)*|([a-zA-Z]+_)*|_)' + ConstraintDescription: > + Must conform with the permitted Lex Bot name pattern. + +Conditions: + ShouldCleanupBuckets: !Equals [!Ref CleanupBuckets, true] + +Resources: + # Bucket where the web app is deployed + WebAppBucket: + Type: AWS::S3::Bucket + DeletionPolicy: Retain + Properties: + WebsiteConfiguration: + IndexDocument: index.html + VersioningConfiguration: + Status: Enabled + + CodeBuild: + Type: AWS::CodeBuild::Project + Properties: + Name: !Ref CodeBuildName + Description: Used to configure and deploy the Lex Web UI + Artifacts: + Type: NO_ARTIFACTS + Environment: + Type: LINUX_CONTAINER + Image: aws/codebuild/nodejs:6.3.1 + ComputeType: BUILD_GENERAL1_SMALL + EnvironmentVariables: + - Name: BUILD_TYPE + Value: dist + - Name: POOL_ID + Value: !Ref CognitoIdentityPoolId + - Name: WEBAPP_BUCKET + Value: !Ref WebAppBucket + - Name: AWS_DEFAULT_REGION + Value: !Sub "${AWS::Region}" + - Name: BOT_NAME + Value: !Ref BotName + ServiceRole: !GetAtt CodeBuildRole.Arn + TimeoutInMinutes: 10 + Source: + Type: S3 + Location: !Sub "${SourceBucket}/${SourceObject}" + BuildSpec: !Sub | + version: 0.1 + phases: + install: + commands: + - npm install -g n + - n stable + - npm update -g npm + pre_build: + commands: + - aws configure set region "$AWS_DEFAULT_REGION" + - make config + post_build: + commands: + - make sync-website + + # custom resource to start code build project + CodeBuildStarter: + Type: Custom::CodeBuildStarter + Properties: + ServiceToken: !GetAtt CodeBuildStarterLambda.Arn + ProjectName: !Ref CodeBuild + + # Lambda function for custom resource + CodeBuildStarterLambda: + Type: AWS::Lambda::Function + Properties: + Code: + S3Bucket: !Ref SourceBucket + S3Key: !Ref CustomResourceCodeObject + Handler: codebuild-start.handler + Role: !GetAtt CodeBuildStarterLambdaRole.Arn + Runtime: python2.7 + Timeout: 120 + + CodeBuildRole: + Type: AWS::IAM::Role + Properties: + Path: / + AssumeRolePolicyDocument: + Version: 2012-10-17 + Statement: + - Principal: + Service: + - codebuild.amazonaws.com + Effect: Allow + Action: + - sts:AssumeRole + Policies: + - PolicyName: S3GetObject + PolicyDocument: + Version: 2012-10-17 + Statement: + - Effect: Allow + Action: + - s3:GetObject* + Resource: + - !Sub "arn:aws:s3:::${SourceBucket}/${SourceObject}" + - PolicyName: S3ReadWrite + PolicyDocument: + Version: 2012-10-17 + Statement: + - Effect: Allow + Action: + - s3:Get* + - s3:Head* + - s3:List* + - s3:CreateMultipartUpload + - s3:CompleteMultipartUpload + - s3:AbortMultipartUpload + - s3:CopyObject + - s3:PutObject* + - s3:DeleteObject* + - s3:Upload* + Resource: + - !Sub "arn:aws:s3:::${WebAppBucket}" + - !Sub "arn:aws:s3:::${WebAppBucket}/*" + - PolicyName: CloudWatchLogsCodeBuild + PolicyDocument: + Version: 2012-10-17 + Statement: + - Effect: Allow + Action: + - logs:CreateLogGroup + - logs:CreateLogStream + - logs:PutLogEvents + Resource: + - !Sub "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/${CodeBuildName}" + - !Sub "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/${CodeBuildName}:*" + + CodeBuildStarterLambdaRole: + Type: AWS::IAM::Role + Properties: + Path: / + AssumeRolePolicyDocument: + Version: 2012-10-17 + Statement: + - Principal: + Service: + - lambda.amazonaws.com + Effect: Allow + Action: + - sts:AssumeRole + Policies: + - PolicyName: LogsForLambda + PolicyDocument: + Version: 2012-10-17 + Statement: + - Effect: Allow + Action: + - logs:CreateLogGroup + - logs:CreateLogStream + - logs:PutLogEvents + Resource: + - !Sub "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/*" + - !Sub "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/*:*" + - PolicyName: CodeBuildStart + PolicyDocument: + Version: 2012-10-17 + Statement: + - Effect: Allow + Action: + - codebuild:StartBuild + Resource: !GetAtt CodeBuild.Arn + + # custom resource to cleanup S3 buckets + S3Cleanup: + Type: Custom::S3Cleanup + Condition: ShouldCleanupBuckets + Properties: + ServiceToken: !GetAtt S3CleanupLambda.Arn + Buckets: + - !Ref WebAppBucket + + # Lambda function for custom resource + S3CleanupLambda: + Type: AWS::Lambda::Function + Condition: ShouldCleanupBuckets + Properties: + Code: + S3Bucket: !Ref SourceBucket + S3Key: !Ref CustomResourceCodeObject + Handler: s3-cleanup.handler + Role: !GetAtt S3CleanupLambdaRole.Arn + Runtime: python2.7 + Timeout: 120 + + S3CleanupLambdaRole: + Type: AWS::IAM::Role + Condition: ShouldCleanupBuckets + Properties: + Path: / + AssumeRolePolicyDocument: + Version: 2012-10-17 + Statement: + - Principal: + Service: + - lambda.amazonaws.com + Effect: Allow + Action: + - sts:AssumeRole + Policies: + - PolicyName: LogsForLambda + PolicyDocument: + Version: 2012-10-17 + Statement: + - Effect: Allow + Action: + - logs:CreateLogGroup + - logs:CreateLogStream + - logs:PutLogEvents + Resource: + - !Sub "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/*" + - !Sub "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/*:*" + - PolicyName: S3All + PolicyDocument: + Version: 2012-10-17 + Statement: + - Effect: Allow + Action: + - s3:* + Resource: + - !Sub "arn:aws:s3:::${WebAppBucket}" + - !Sub "arn:aws:s3:::${WebAppBucket}/*" + +Outputs: + CodeBuildProject: + Description: CodeBuild project name + Value: !Ref CodeBuild + + WebAppUrl: + Value: !Sub "https://${WebAppBucket.DomainName}/index.html" + Description: URL of the web application + + ParentPageUrl: + Value: !Sub "https://${WebAppBucket.DomainName}/parent.html" + Description: URL of the sample parent page diff --git a/templates/coderepo.yaml b/templates/coderepo.yaml index f2420f19..e72aabd5 100644 --- a/templates/coderepo.yaml +++ b/templates/coderepo.yaml @@ -1,3 +1,4 @@ +AWSTemplateFormatVersion: 2010-09-09 Description: > This template creates a CodeCommit repo and initializes it with this project sources. It uses CodeBuild and a custom resource to git push @@ -76,7 +77,7 @@ Resources: Type: NO_ARTIFACTS Environment: Type: LINUX_CONTAINER - Image: aws/codebuild/eb-nodejs-4.4.6-amazonlinux-64:2.1.3 + Image: aws/codebuild/nodejs:6.3.1 ComputeType: BUILD_GENERAL1_SMALL EnvironmentVariables: - Name: REPO_URL @@ -93,6 +94,11 @@ Resources: BuildSpec: !Sub | version: 0.1 phases: + install: + commands: + - npm install -g n + - n stable + - npm update -g npm pre_build: commands: - make config diff --git a/templates/cognito.yaml b/templates/cognito.yaml index ee1b1fff..e1678520 100644 --- a/templates/cognito.yaml +++ b/templates/cognito.yaml @@ -1,3 +1,4 @@ +AWSTemplateFormatVersion: 2010-09-09 Description: > This template deploys a Cognito identity pool. It also deploys an IAM role which is attached to the identity pool for unauthenticated diff --git a/templates/custom-resources/bot-definition.json b/templates/custom-resources/bot-definition.json index cd6bb626..3abf57bc 100644 --- a/templates/custom-resources/bot-definition.json +++ b/templates/custom-resources/bot-definition.json @@ -60,26 +60,34 @@ }, "sampleUtterances": [ "I would like to order some flowers", + "I would like to buy some flowers", "I would like to pick up flowers", "I would like to order flowers", + "I would like to buy flowers", "Can I please get flowers", "May I please get flowers", "I want to place an order", "I want to order flowers", + "I want to buy flowers", "May I order flowers", "Can I order flowers", + "Can I buy flowers", "Can I get flowers", "May I get flowers", + "May I buy flowers", "I want to order", "I want flowers", "place an order", + "I want to buy", "make an order", "order flowers", + "buy flowers", "put an order", "can I order", "place order", "make order", - "order" + "order", + "buy" ], "slots": [ { diff --git a/templates/lexbot.yaml b/templates/lexbot.yaml index b1039311..eb9f6203 100644 --- a/templates/lexbot.yaml +++ b/templates/lexbot.yaml @@ -1,3 +1,4 @@ +AWSTemplateFormatVersion: 2010-09-09 Description: > This template creates a Lex bot and associated resources. It uses a custom resource to read the bot definition from a file. diff --git a/templates/master.yaml b/templates/master.yaml index ba84cdbd..6ab4fdb6 100644 --- a/templates/master.yaml +++ b/templates/master.yaml @@ -1,13 +1,16 @@ +AWSTemplateFormatVersion: 2010-09-09 Description: | Master Lex Web UI CloudFormation template. It deploys: - - A CodeCommit Repository containg the source code in this project - and a CodeBuild project, Lambda functions to initialize the repo - - A deployment pipeline using CodePipeline and CodeBuild - - An S3 buckets to hold build artifacts and the web application + - S3 buckets to host the web application + - CodeBuild project to build the configuration and deploy to S3 - Optional Lex Bot (based on OrderFlowers example) - Optional Cognito Identity Pool for unauthenticated identities - Optional Lambda function to delete S3 buckets + - Optional CodeCommit Repository containg the source code in + this project and a CodeBuild project, Lambda functions to initialize + the repo + - Optional deployment pipeline using CodePipeline and CodeBuild - CloudWatch Logs groups related to Lambda functions - Associated IAM roles @@ -49,13 +52,25 @@ Parameters: will be preserved. Only applies if the bot is created by this stack. + CreatePipeline: + Type: String + Default: false + AllowedValues: + - true + - false + Description: > + If set to True, the stack will include a deployment pipeline + using CodeCommit, CodeBuild and CodePipeline. If set to False + the stack will deploy the web app directly to S3. + CodeCommitRepoName: Type: String Description: > Name of CodeCommit repository to be created. Used as the source for the pipeline and to automate deployments of the web app. It is initialized with source artifacts from the - bootstrap S3 bucket. Must be unique per region. + bootstrap S3 bucket. Must be unique per region. Only used + when CreatePipeline is set to true. Default: lex-web-ui MinLength: 1 MaxLength: 100 @@ -67,7 +82,8 @@ Parameters: Description: > Name of CodePipeline pipeline to be created. Used to manage the build and deployment of the web application. Must be - unique per region. + unique per region. Only used when CreatePipeline is set + to true. Default: lex-web-ui MinLength: 1 MaxLength: 100 @@ -77,8 +93,11 @@ Parameters: CodeBuildName: Type: String Description: > - Name of the CodeBuild project to be created. Used for building - the web app with the pipeline. Must be unique per region. + Name of the CodeBuild project to be created. When + CreatePipeline is set to false, it is used to configure + and directly deploy the web app to S3. Otherwise, used + for building the web app with the pipeline. Must be unique + per region. Default: lex-web-ui MinLength: 2 MaxLength: 255 @@ -137,11 +156,12 @@ Metadata: AWS::CloudFormation::Interface: ParameterGroups: - Label: - default: Deployment Pipeline Parameters + default: Deployment Parameters Parameters: + - CreatePipeline + - CodeBuildName - CodePipelineName - CodeCommitRepoName - - CodeBuildName - CleanupBuckets - Label: default: Lex Bot Configuration Parameters @@ -177,6 +197,11 @@ Conditions: NeedsCognito: !Equals [!Ref CognitoIdentityPoolId, ''] NeedsParentOrigin: !Equals [!Ref WebAppParentOrigin, ''] + # deploy using a pipeline + ShouldDeployUsingPipeline: !Equals [!Ref CreatePipeline, true] + # otherwise deploy using a codebuild project + ShouldDeployUsingCodeBuild: !Equals [!Ref CreatePipeline, false] + Resources: Bot: Type: AWS::CloudFormation::Stack @@ -215,8 +240,49 @@ Resources: - !GetAtt Bot.Outputs.BotName - !Ref BotName + ########################################################################## + # Simplified deployment using CodeBuild to build config and push to S3 + ########################################################################## + CodeBuildDeploy: + Type: AWS::CloudFormation::Stack + Condition: ShouldDeployUsingCodeBuild + Properties: + TemplateURL: !Sub + - "https://s3.amazonaws.com/${Bucket}/${Path}/templates/codebuild-deploy.yaml" + - Bucket: !FindInMap [CustomVariables, BootstrapBucket, Value] + Path: !FindInMap [CustomVariables, BootstrapPrefix, Value] + Parameters: + CodeBuildName: !Ref CodeBuildName + SourceBucket: !Sub + - "${Bucket}" + - Bucket: + !FindInMap [CustomVariables, BootstrapBucket, Value] + SourceObject: !Sub + - "${Prefix}/src.zip" + - Prefix: + !FindInMap [CustomVariables, BootstrapPrefix, Value] + CustomResourceCodeObject: !Sub + - "${Prefix}/custom-resources.zip" + - Prefix: + !FindInMap [CustomVariables, BootstrapPrefix, Value] + CleanupBuckets: !Ref CleanupBuckets + BotName: + !If + - NeedsBot + - !GetAtt Bot.Outputs.BotName + - !Ref BotName + CognitoIdentityPoolId: + !If + - NeedsCognito + - !GetAtt CognitoIdentityPool.Outputs.CognitoIdentityPoolId + - !Ref CognitoIdentityPoolId + + ########################################################################## + # deployment using a pipeline + ########################################################################## CodeCommitRepo: Type: AWS::CloudFormation::Stack + Condition: ShouldDeployUsingPipeline Properties: TimeoutInMinutes: 15 TemplateURL: !Sub @@ -251,6 +317,7 @@ Resources: Pipeline: Type: AWS::CloudFormation::Stack + Condition: ShouldDeployUsingPipeline Properties: TemplateURL: !Sub - "https://s3.amazonaws.com/${Bucket}/${Path}/templates/pipeline.yaml" @@ -289,29 +356,46 @@ Outputs: Value: !GetAtt Bot.Outputs.BotName CodeCommitRepoUrl: + Condition: ShouldDeployUsingPipeline Description: CodeCommit repository clone URL Value: !GetAtt CodeCommitRepo.Outputs.CodeCommitRepoUrl PipelineUrl: + Condition: ShouldDeployUsingPipeline Description: > Monitor the pipeline URL to see when the application has been fully built and deployed. Value: !Sub "https://console.aws.amazon.com/codepipeline/home?region=${AWS::Region}#/view/${Pipeline.Outputs.PipelineName}" + CodeBuildUrl: + Condition: ShouldDeployUsingCodeBuild + Description: > + Monitor the pipeline URL to see when the application has been fully + built and deployed. + Value: !Sub "https://console.aws.amazon.com/codebuild/home?region=${AWS::Region}#/projects/${CodeBuildDeploy.Outputs.CodeBuildProject}/view" + WebAppUrl: Description: > URL of the stand-alone sample web application. This page will be available after the pipeline completes. - Value: !GetAtt Pipeline.Outputs.WebAppUrl + Value: + !If + - ShouldDeployUsingPipeline + - !GetAtt Pipeline.Outputs.WebAppUrl + - !GetAtt CodeBuildDeploy.Outputs.WebAppUrl ParentPageUrl: + Condition: NeedsParentOrigin Description: > URL of the iframe based sample web application This page will be available after the pipeline completes. - Value: !GetAtt Pipeline.Outputs.ParentPageUrl - Condition: NeedsParentOrigin + Value: + !If + - ShouldDeployUsingPipeline + - !GetAtt Pipeline.Outputs.ParentPageUrl + - !GetAtt CodeBuildDeploy.Outputs.ParentPageUrl CognitoIdentityPoolId: + Condition: NeedsCognito Description: Cognito Identity Pool Id Value: !GetAtt CognitoIdentityPool.Outputs.CognitoIdentityPoolId - Condition: NeedsCognito diff --git a/templates/pipeline.yaml b/templates/pipeline.yaml index 5db87463..56aefc58 100644 --- a/templates/pipeline.yaml +++ b/templates/pipeline.yaml @@ -1,3 +1,4 @@ +AWSTemplateFormatVersion: 2010-09-09 Description: > This template deploys a CI/CD pipeline used to build the Lex Web UI. It deploys a CodePipeline pipeline, a CodeBuild project and and S3 buckets @@ -147,9 +148,11 @@ Resources: Type: CODEPIPELINE Environment: Type: LINUX_CONTAINER - Image: aws/codebuild/eb-nodejs-4.4.6-amazonlinux-64:2.1.3 + Image: aws/codebuild/nodejs:6.3.1 ComputeType: BUILD_GENERAL1_LARGE EnvironmentVariables: + - Name: BUILD_TYPE + Value: full - Name: POOL_ID Value: !Ref CognitoIdentityPoolId - Name: WEBAPP_BUCKET @@ -190,7 +193,7 @@ Resources: - make build post_build: commands: - - make s3deploy + - make deploy-to-s3 CodeBuildRole: Type: AWS::IAM::Role