diff --git a/.npmignore b/.npmignore index 8c5dcfcac..a5c3b0971 100644 --- a/.npmignore +++ b/.npmignore @@ -13,13 +13,12 @@ .env.development.local .env.test.local .env.production.local -/.github -/demo -.esdoc.json npm-debug.log* yarn-debug.log* yarn-error.log* +/.github +/demo # Development folders and files public diff --git a/.travis.yml b/.travis.yml index 0ca762c9f..bb3e29d8d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,13 @@ language: node_js node_js: - - "11.2" + - '11.2' install: - npm install -g codecov - npm install script: - npm run start -- --testMode - npm run demo -- npm run test -- --coverage +- npm run coverage - codecov after_success: - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh diff --git a/build/css/index.css b/build/css/index.css index ec9748246..047ade3c4 100644 --- a/build/css/index.css +++ b/build/css/index.css @@ -1,6 +1,6 @@ /*! * - * react-simple-keyboard v1.21.9 + * react-simple-keyboard v1.22.0 * https://github.com/hodgef/react-simple-keyboard * * Copyright (c) Francisco Hodge (https://github.com/hodgef) @@ -11,7 +11,7 @@ */ /*! * - * simple-keyboard v2.20.9 + * simple-keyboard v2.21.0 * https://github.com/hodgef/simple-keyboard * * Copyright (c) Francisco Hodge (https://github.com/hodgef) diff --git a/build/css/index.css.map b/build/css/index.css.map index 6848e371d..ce7177e38 100644 --- a/build/css/index.css.map +++ b/build/css/index.css.map @@ -1 +1 @@ -{"version":3,"sources":["index.css","X:/Dev/react-simple-keyboard/node_modules/simple-keyboard/build/css/index.css","X:/Dev/react-simple-keyboard/node_modules/simple-keyboard/build/css/X:/Dev/simple-keyboard/src/lib/components/Keyboard.css"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;ACVH;;;;;;;;;;GAUG,UCRD,SAAA,SACA,CAGF,iBACE,6GAEA,WAAA,yBACA,sBAAA,qBAAA,iBAAA,sBACA,gBACA,yBACA,CAGF,yBACE,qBAAA,YAAA,CAGF,0CACE,iBAAA,CAOF,mGACE,gBAAA,CAGF,wCACE,cAAA,CAGF,8CACE,qBAAA,YAAA,CAGF,4BACE,qBAAA,oBACA,YAAA,cACA,CAGF,iCACE,mBAAA,CAMF,kCACE,gCAAA,YACA,iBACA,CAGF,6CACE,uCAAA,YACA,kBACA,sBACA,YACA,gBACA,gCACA,eACA,qBACA,aAAA,2BACA,mBAAA,+BACA,sBAAA,CAIF,kCACE,eAAA,UACA,iBACA,CAGF,0EACE,kBAAA,CAGF,+DACE,YAAA,YACA,2BACA,mBAAA,qBACA,aAAA,+BACA,sBAAA,CAOF,oIACE,WAAA,CAGF,+DACE,WAAA,CAGF,2DACE,cAAA,CAGF,yEACE,cAAA,CAGF,+DACE,6BAAA,UACA,CAGF,+EACE,cAAA,CAGF,4EACE,cAAA,CAAA","file":"index.css","sourcesContent":["/*!\n * \n * simple-keyboard v2.20.9\n * https://github.com/hodgef/simple-keyboard\n * \n * Copyright (c) Francisco Hodge (https://github.com/hodgef)\n * \n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n * \n */body,html{margin:0;padding:0}.simple-keyboard{font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden;touch-action:manipulation}.simple-keyboard .hg-row{display:-webkit-flex;display:flex}.simple-keyboard .hg-row:not(:last-child){margin-bottom:5px}.simple-keyboard .hg-row .hg-button-container,.simple-keyboard .hg-row .hg-button:not(:last-child){margin-right:5px}.simple-keyboard .hg-row>div:last-child{margin-right:0}.simple-keyboard .hg-row .hg-button-container{display:-webkit-flex;display:flex}.simple-keyboard .hg-button{display:inline-block;-webkit-flex-grow:1;flex-grow:1;cursor:pointer}.simple-keyboard .hg-button span{pointer-events:none}.simple-keyboard.hg-theme-default{background-color:rgba(0,0,0,.1);padding:5px;border-radius:5px}.simple-keyboard.hg-theme-default .hg-button{box-shadow:0 0 3px -1px rgba(0,0,0,.3);height:40px;border-radius:5px;box-sizing:border-box;padding:5px;background:#fff;border-bottom:1px solid #b5b5b5;cursor:pointer;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.simple-keyboard button.hg-button{border-width:0;outline:0;font-size:inherit}.simple-keyboard.hg-theme-default:not(.hg-touch-events) .hg-button:active{background:#e4e4e4}.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button{width:33.3%;height:60px;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center}.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadadd,.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.simple-keyboard.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.simple-keyboard.hg-theme-default .hg-button.hg-button-com{max-width:85px}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton{background:rgba(5,25,70,.53);color:#fff}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\".com\"]{max-width:82px}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\"@\"]{max-width:60px}\n/*# sourceMappingURL=index.css.map */","/*!\n * \n * simple-keyboard v2.20.9\n * https://github.com/hodgef/simple-keyboard\n * \n * Copyright (c) Francisco Hodge (https://github.com/hodgef)\n * \n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n * \n */\nbody,\r\nhtml {\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n.simple-keyboard {\r\n font-family: \"HelveticaNeue-Light\", \"Helvetica Neue Light\", \"Helvetica Neue\",\r\n Helvetica, Arial, \"Lucida Grande\", sans-serif;\r\n width: 100%;\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n box-sizing: border-box;\r\n overflow: hidden;\r\n touch-action: manipulation;\r\n}\r\n\r\n.simple-keyboard .hg-row {\r\n display: -webkit-flex;\r\n display: flex;\r\n}\r\n\r\n.simple-keyboard .hg-row:not(:last-child) {\r\n margin-bottom: 5px;\r\n}\r\n\r\n.simple-keyboard .hg-row .hg-button:not(:last-child) {\r\n margin-right: 5px;\r\n}\r\n\r\n.simple-keyboard .hg-row .hg-button-container {\r\n margin-right: 5px;\r\n}\r\n\r\n.simple-keyboard .hg-row > div:last-child {\r\n margin-right: 0;\r\n}\r\n\r\n.simple-keyboard .hg-row .hg-button-container {\r\n display: -webkit-flex;\r\n display: flex;\r\n}\r\n\r\n.simple-keyboard .hg-button {\r\n display: inline-block;\r\n -webkit-flex-grow: 1;\r\n flex-grow: 1;\r\n cursor: pointer;\r\n}\r\n\r\n.simple-keyboard .hg-button span {\r\n pointer-events: none;\r\n}\r\n\r\n/**\r\n * hg-theme-default theme\r\n */\r\n.simple-keyboard.hg-theme-default {\r\n background-color: rgba(0, 0, 0, 0.1);\r\n padding: 5px;\r\n border-radius: 5px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button {\r\n box-shadow: 0px 0px 3px -1px rgba(0, 0, 0, 0.3);\r\n height: 40px;\r\n border-radius: 5px;\r\n box-sizing: border-box;\r\n padding: 5px;\r\n background: white;\r\n border-bottom: 1px solid #b5b5b5;\r\n cursor: pointer;\r\n display: -webkit-flex;\r\n display: flex;\r\n -webkit-align-items: center;\r\n align-items: center;\r\n -webkit-justify-content: center;\r\n justify-content: center;\r\n}\r\n\r\n/* When using option \"useButtonTag\" */\r\n.simple-keyboard button.hg-button {\r\n border-width: 0;\r\n outline: 0;\r\n font-size: inherit;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default:not(.hg-touch-events) .hg-button:active {\r\n background: #e4e4e4;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button {\r\n width: 33.3%;\r\n height: 60px;\r\n -webkit-align-items: center;\r\n align-items: center;\r\n display: -webkit-flex;\r\n display: flex;\r\n -webkit-justify-content: center;\r\n justify-content: center;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadadd {\r\n height: 85px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadenter {\r\n height: 85px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpad0 {\r\n width: 105px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-button-com {\r\n max-width: 85px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn.hg-button-at {\r\n max-width: 45px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton {\r\n background: rgba(5, 25, 70, 0.53);\r\n color: white;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\".com\"] {\r\n max-width: 82px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\"@\"] {\r\n max-width: 60px;\r\n}\r\n\n","body,\r\nhtml {\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n.simple-keyboard {\r\n font-family: \"HelveticaNeue-Light\", \"Helvetica Neue Light\", \"Helvetica Neue\",\r\n Helvetica, Arial, \"Lucida Grande\", sans-serif;\r\n width: 100%;\r\n user-select: none;\r\n box-sizing: border-box;\r\n overflow: hidden;\r\n touch-action: manipulation;\r\n}\r\n\r\n.simple-keyboard .hg-row {\r\n display: flex;\r\n}\r\n\r\n.simple-keyboard .hg-row:not(:last-child) {\r\n margin-bottom: 5px;\r\n}\r\n\r\n.simple-keyboard .hg-row .hg-button:not(:last-child) {\r\n margin-right: 5px;\r\n}\r\n\r\n.simple-keyboard .hg-row .hg-button-container {\r\n margin-right: 5px;\r\n}\r\n\r\n.simple-keyboard .hg-row > div:last-child {\r\n margin-right: 0;\r\n}\r\n\r\n.simple-keyboard .hg-row .hg-button-container {\r\n display: flex;\r\n}\r\n\r\n.simple-keyboard .hg-button {\r\n display: inline-block;\r\n flex-grow: 1;\r\n cursor: pointer;\r\n}\r\n\r\n.simple-keyboard .hg-button span {\r\n pointer-events: none;\r\n}\r\n\r\n/**\r\n * hg-theme-default theme\r\n */\r\n.simple-keyboard.hg-theme-default {\r\n background-color: rgba(0, 0, 0, 0.1);\r\n padding: 5px;\r\n border-radius: 5px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button {\r\n box-shadow: 0px 0px 3px -1px rgba(0, 0, 0, 0.3);\r\n height: 40px;\r\n border-radius: 5px;\r\n box-sizing: border-box;\r\n padding: 5px;\r\n background: white;\r\n border-bottom: 1px solid #b5b5b5;\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n/* When using option \"useButtonTag\" */\r\n.simple-keyboard button.hg-button {\r\n border-width: 0;\r\n outline: 0;\r\n font-size: inherit;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default:not(.hg-touch-events) .hg-button:active {\r\n background: #e4e4e4;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button {\r\n width: 33.3%;\r\n height: 60px;\r\n align-items: center;\r\n display: flex;\r\n justify-content: center;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadadd {\r\n height: 85px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadenter {\r\n height: 85px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpad0 {\r\n width: 105px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-button-com {\r\n max-width: 85px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn.hg-button-at {\r\n max-width: 45px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton {\r\n background: rgba(5, 25, 70, 0.53);\r\n color: white;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\".com\"] {\r\n max-width: 82px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\"@\"] {\r\n max-width: 60px;\r\n}\r\n"]} \ No newline at end of file +{"version":3,"sources":["index.css","X:/Dev/react-simple-keyboard/node_modules/simple-keyboard/build/css/index.css","X:/Dev/react-simple-keyboard/node_modules/simple-keyboard/build/css/X:/Dev/simple-keyboard/src/lib/components/Keyboard.css"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;ACVH;;;;;;;;;;GAUG,UCRD,SAAA,SACA,CAGF,iBACE,6GAEA,WAAA,yBACA,sBAAA,qBAAA,iBAAA,sBACA,gBACA,yBACA,CAGF,yBACE,qBAAA,YAAA,CAGF,0CACE,iBAAA,CAOF,mGACE,gBAAA,CAGF,wCACE,cAAA,CAGF,8CACE,qBAAA,YAAA,CAGF,4BACE,qBAAA,oBACA,YAAA,cACA,CAGF,iCACE,mBAAA,CAMF,kCACE,gCAAA,YACA,iBACA,CAGF,6CACE,uCAAA,YACA,kBACA,sBACA,YACA,gBACA,gCACA,eACA,qBACA,aAAA,2BACA,mBAAA,+BACA,sBAAA,CAIF,kCACE,eAAA,UACA,iBACA,CAGF,0EACE,kBAAA,CAGF,+DACE,YAAA,YACA,2BACA,mBAAA,qBACA,aAAA,+BACA,sBAAA,CAOF,oIACE,WAAA,CAGF,+DACE,WAAA,CAGF,2DACE,cAAA,CAGF,yEACE,cAAA,CAGF,+DACE,6BAAA,UACA,CAGF,+EACE,cAAA,CAGF,4EACE,cAAA,CAAA","file":"index.css","sourcesContent":["/*!\n * \n * simple-keyboard v2.21.0\n * https://github.com/hodgef/simple-keyboard\n * \n * Copyright (c) Francisco Hodge (https://github.com/hodgef)\n * \n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n * \n */body,html{margin:0;padding:0}.simple-keyboard{font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden;touch-action:manipulation}.simple-keyboard .hg-row{display:-webkit-flex;display:flex}.simple-keyboard .hg-row:not(:last-child){margin-bottom:5px}.simple-keyboard .hg-row .hg-button-container,.simple-keyboard .hg-row .hg-button:not(:last-child){margin-right:5px}.simple-keyboard .hg-row>div:last-child{margin-right:0}.simple-keyboard .hg-row .hg-button-container{display:-webkit-flex;display:flex}.simple-keyboard .hg-button{display:inline-block;-webkit-flex-grow:1;flex-grow:1;cursor:pointer}.simple-keyboard .hg-button span{pointer-events:none}.simple-keyboard.hg-theme-default{background-color:rgba(0,0,0,.1);padding:5px;border-radius:5px}.simple-keyboard.hg-theme-default .hg-button{box-shadow:0 0 3px -1px rgba(0,0,0,.3);height:40px;border-radius:5px;box-sizing:border-box;padding:5px;background:#fff;border-bottom:1px solid #b5b5b5;cursor:pointer;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.simple-keyboard button.hg-button{border-width:0;outline:0;font-size:inherit}.simple-keyboard.hg-theme-default:not(.hg-touch-events) .hg-button:active{background:#e4e4e4}.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button{width:33.3%;height:60px;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center}.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadadd,.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.simple-keyboard.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.simple-keyboard.hg-theme-default .hg-button.hg-button-com{max-width:85px}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton{background:rgba(5,25,70,.53);color:#fff}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\".com\"]{max-width:82px}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\"@\"]{max-width:60px}\n/*# sourceMappingURL=index.css.map */","/*!\n * \n * simple-keyboard v2.21.0\n * https://github.com/hodgef/simple-keyboard\n * \n * Copyright (c) Francisco Hodge (https://github.com/hodgef)\n * \n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n * \n */\nbody,\r\nhtml {\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n.simple-keyboard {\r\n font-family: \"HelveticaNeue-Light\", \"Helvetica Neue Light\", \"Helvetica Neue\",\r\n Helvetica, Arial, \"Lucida Grande\", sans-serif;\r\n width: 100%;\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n box-sizing: border-box;\r\n overflow: hidden;\r\n touch-action: manipulation;\r\n}\r\n\r\n.simple-keyboard .hg-row {\r\n display: -webkit-flex;\r\n display: flex;\r\n}\r\n\r\n.simple-keyboard .hg-row:not(:last-child) {\r\n margin-bottom: 5px;\r\n}\r\n\r\n.simple-keyboard .hg-row .hg-button:not(:last-child) {\r\n margin-right: 5px;\r\n}\r\n\r\n.simple-keyboard .hg-row .hg-button-container {\r\n margin-right: 5px;\r\n}\r\n\r\n.simple-keyboard .hg-row > div:last-child {\r\n margin-right: 0;\r\n}\r\n\r\n.simple-keyboard .hg-row .hg-button-container {\r\n display: -webkit-flex;\r\n display: flex;\r\n}\r\n\r\n.simple-keyboard .hg-button {\r\n display: inline-block;\r\n -webkit-flex-grow: 1;\r\n flex-grow: 1;\r\n cursor: pointer;\r\n}\r\n\r\n.simple-keyboard .hg-button span {\r\n pointer-events: none;\r\n}\r\n\r\n/**\r\n * hg-theme-default theme\r\n */\r\n.simple-keyboard.hg-theme-default {\r\n background-color: rgba(0, 0, 0, 0.1);\r\n padding: 5px;\r\n border-radius: 5px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button {\r\n box-shadow: 0px 0px 3px -1px rgba(0, 0, 0, 0.3);\r\n height: 40px;\r\n border-radius: 5px;\r\n box-sizing: border-box;\r\n padding: 5px;\r\n background: white;\r\n border-bottom: 1px solid #b5b5b5;\r\n cursor: pointer;\r\n display: -webkit-flex;\r\n display: flex;\r\n -webkit-align-items: center;\r\n align-items: center;\r\n -webkit-justify-content: center;\r\n justify-content: center;\r\n}\r\n\r\n/* When using option \"useButtonTag\" */\r\n.simple-keyboard button.hg-button {\r\n border-width: 0;\r\n outline: 0;\r\n font-size: inherit;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default:not(.hg-touch-events) .hg-button:active {\r\n background: #e4e4e4;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button {\r\n width: 33.3%;\r\n height: 60px;\r\n -webkit-align-items: center;\r\n align-items: center;\r\n display: -webkit-flex;\r\n display: flex;\r\n -webkit-justify-content: center;\r\n justify-content: center;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadadd {\r\n height: 85px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadenter {\r\n height: 85px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpad0 {\r\n width: 105px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-button-com {\r\n max-width: 85px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn.hg-button-at {\r\n max-width: 45px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton {\r\n background: rgba(5, 25, 70, 0.53);\r\n color: white;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\".com\"] {\r\n max-width: 82px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\"@\"] {\r\n max-width: 60px;\r\n}\r\n\n","body,\r\nhtml {\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n.simple-keyboard {\r\n font-family: \"HelveticaNeue-Light\", \"Helvetica Neue Light\", \"Helvetica Neue\",\r\n Helvetica, Arial, \"Lucida Grande\", sans-serif;\r\n width: 100%;\r\n user-select: none;\r\n box-sizing: border-box;\r\n overflow: hidden;\r\n touch-action: manipulation;\r\n}\r\n\r\n.simple-keyboard .hg-row {\r\n display: flex;\r\n}\r\n\r\n.simple-keyboard .hg-row:not(:last-child) {\r\n margin-bottom: 5px;\r\n}\r\n\r\n.simple-keyboard .hg-row .hg-button:not(:last-child) {\r\n margin-right: 5px;\r\n}\r\n\r\n.simple-keyboard .hg-row .hg-button-container {\r\n margin-right: 5px;\r\n}\r\n\r\n.simple-keyboard .hg-row > div:last-child {\r\n margin-right: 0;\r\n}\r\n\r\n.simple-keyboard .hg-row .hg-button-container {\r\n display: flex;\r\n}\r\n\r\n.simple-keyboard .hg-button {\r\n display: inline-block;\r\n flex-grow: 1;\r\n cursor: pointer;\r\n}\r\n\r\n.simple-keyboard .hg-button span {\r\n pointer-events: none;\r\n}\r\n\r\n/**\r\n * hg-theme-default theme\r\n */\r\n.simple-keyboard.hg-theme-default {\r\n background-color: rgba(0, 0, 0, 0.1);\r\n padding: 5px;\r\n border-radius: 5px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button {\r\n box-shadow: 0px 0px 3px -1px rgba(0, 0, 0, 0.3);\r\n height: 40px;\r\n border-radius: 5px;\r\n box-sizing: border-box;\r\n padding: 5px;\r\n background: white;\r\n border-bottom: 1px solid #b5b5b5;\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n/* When using option \"useButtonTag\" */\r\n.simple-keyboard button.hg-button {\r\n border-width: 0;\r\n outline: 0;\r\n font-size: inherit;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default:not(.hg-touch-events) .hg-button:active {\r\n background: #e4e4e4;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button {\r\n width: 33.3%;\r\n height: 60px;\r\n align-items: center;\r\n display: flex;\r\n justify-content: center;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadadd {\r\n height: 85px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadenter {\r\n height: 85px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-button-numpad0 {\r\n width: 105px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-button-com {\r\n max-width: 85px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn.hg-button-at {\r\n max-width: 45px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton {\r\n background: rgba(5, 25, 70, 0.53);\r\n color: white;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\".com\"] {\r\n max-width: 82px;\r\n}\r\n\r\n.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\"@\"] {\r\n max-width: 60px;\r\n}\r\n"]} \ No newline at end of file diff --git a/build/index.js b/build/index.js index f18ed678c..602e2038d 100644 --- a/build/index.js +++ b/build/index.js @@ -1,6 +1,6 @@ /*! * - * react-simple-keyboard v1.21.9 + * react-simple-keyboard v1.22.0 * https://github.com/hodgef/react-simple-keyboard * * Copyright (c) Francisco Hodge (https://github.com/hodgef) @@ -9,5 +9,5 @@ * LICENSE file in the root directory of this source tree. * */ -!function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define("ReactSimpleKeyboard",[],e):"object"===typeof exports?exports.ReactSimpleKeyboard=e():t.ReactSimpleKeyboard=e()}(window,function(){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},__webpack_require__.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(t,e){if(1&e&&(t=__webpack_require__(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)__webpack_require__.d(n,o,function(e){return t[e]}.bind(null,o));return n},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=3)}([function(t,e,n){"use strict";t.exports=n(4)},function(t,e,n){t.exports=n(6)()},function(t,e,n){window,t.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){t.exports=n(2)},function(t,e,n){},function(e,n,i){"use strict";function o(t,e){for(var n=0;n ? {shift}",".com @ {space}"]}}}])&&s(e,n),t}();function u(t){return(u="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var n=0;n0?r=this.removeAt(r,o,i):"{space}"===t?r=this.addStringAt(r," ",o,i):"{tab}"!==t||"boolean"===typeof n.tabCharOnTab&&!1===n.tabCharOnTab?"{enter}"!==t&&"{numpadenter}"!==t||!n.newLineOnEnter?t.includes("numpad")&&Number.isInteger(Number(t[t.length-2]))?r=this.addStringAt(r,t[t.length-2],o,i):"{numpaddivide}"===t?r=this.addStringAt(r,"/",o,i):"{numpadmultiply}"===t?r=this.addStringAt(r,"*",o,i):"{numpadsubtract}"===t?r=this.addStringAt(r,"-",o,i):"{numpadadd}"===t?r=this.addStringAt(r,"+",o,i):"{numpaddecimal}"===t?r=this.addStringAt(r,".",o,i):"{"===t||"}"===t?r=this.addStringAt(r,t,o,i):t.includes("{")||t.includes("}")||(r=this.addStringAt(r,t,o,i)):r=this.addStringAt(r,"\n",o,i):r=this.addStringAt(r,"\t",o,i),r}},{key:"updateCaretPos",value:function(t,e){var n=this.updateCaretPosAction(this.simpleKeyboardInstance,t,e);this.simpleKeyboardInstance.options.syncInstanceInputs&&this.simpleKeyboardInstance.dispatch(function(t){t.caretPosition=n})}},{key:"updateCaretPosAction",value:function(t,e,n){return n?t.caretPosition>0&&(t.caretPosition=t.caretPosition-e):t.caretPosition=t.caretPosition+e,this.simpleKeyboardInstance.options.debug&&console.log("Caret at:",t.caretPosition,"(".concat(t.keyboardDOMClass,")")),t.caretPosition}},{key:"addStringAt",value:function(t,e,n,o){var i;return n||0===n?(i=[t.slice(0,n),e,t.slice(n)].join(""),this.isMaxLengthReached()||o&&this.updateCaretPos(e.length)):i=t+e,i}},{key:"removeAt",value:function(t,e,n){if(0===this.simpleKeyboardInstance.caretPosition)return t;var o,i=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;return e&&e>=0?t.substring(e-2,e).match(i)?(o=t.substr(0,e-2)+t.substr(e),n&&this.updateCaretPos(2,!0)):(o=t.substr(0,e-1)+t.substr(e),n&&this.updateCaretPos(1,!0)):t.slice(-2).match(i)?(o=t.slice(0,-2),n&&this.updateCaretPos(2,!0)):(o=t.slice(0,-1),n&&this.updateCaretPos(1,!0)),o}},{key:"handleMaxLength",value:function(t,e,n){var o=e.maxLength,i=t[e.inputName],r=i.length===o;if(n.length<=i.length)return!1;if(Number.isInteger(o))return e.debug&&console.log("maxLength (num) reached:",r),r?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1);if("object"===u(o)){var s=i.length===o[e.inputName];return e.debug&&console.log("maxLength (obj) reached:",s),s?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1)}}},{key:"isMaxLengthReached",value:function(){return Boolean(this.maxLengthReached)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints}},{key:"pointerEventsSupported",value:function(){return window.PointerEvent}},{key:"camelCase",value:function(t){return t.toLowerCase().trim().split(/[.\-_\s]/g).reduce(function(t,e){return e.length?t+e[0].toUpperCase()+e.slice(1):t})}},{key:"countInArray",value:function(t,e){return t.reduce(function(t,n){return t+(n===e)},0)}}])&&r(e.prototype,n),o&&r(e,o),t}();function l(t){return(l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(t,e){for(var n=0;n1?n:n[0]),e}},{key:"inputPatternIsValid",value:function(t){var e,n=this.options.inputPattern;if((e=n instanceof RegExp?n:n[this.options.inputName])&&t){var o=e.test(t);return this.options.debug&&console.log('inputPattern ("'.concat(e,'"): ').concat(o?"passed":"did not pass!")),o}return!0}},{key:"handleCaret",value:function(){this.caretPosition=null;var t=window.SimpleKeyboardInstances;(t&&Object.keys(t)[0]===this.utilities.camelCase(this.keyboardDOMClass)||!t)&&(this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")")),document.addEventListener("keyup",this.caretEventHandler),document.addEventListener("mouseup",this.caretEventHandler),document.addEventListener("touchend",this.caretEventHandler))}},{key:"caretEventHandler",value:function(t){var e;t.target.tagName&&(e=t.target.tagName.toLowerCase()),this.dispatch(function(n){n.isMouseHold&&(n.isMouseHold=!1),"textarea"!==e&&"input"!==e||n.options.disableCaretPositioning?n.options.disableCaretPositioning&&(n.caretPosition=null):(n.caretPosition=t.target.selectionStart,n.options.debug&&console.log("Caret at: ",t.target.selectionStart,t.target.tagName.toLowerCase(),"(".concat(n.keyboardDOMClass,")")))})}},{key:"getButtonTheme",value:function(){var t=this,e={};return this.options.buttonTheme.forEach(function(n){var o;n.buttons&&n.class?("string"===typeof n.buttons&&(o=n.buttons.split(" ")),o&&o.forEach(function(o){var i=e[o];i?t.utilities.countInArray(i.split(" "),n.class)||(e[o]="".concat(i," ").concat(n.class)):e[o]=n.class})):console.warn('buttonTheme row is missing the "buttons" or the "class". Please check the documentation.')}),e}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(t){if(t.target.classList.contains("hg-button"))return t.preventDefault(),t.stopPropagation(),!1}}},{key:"processAutoTouchEvents",value:function(){this.options.autoUseTouchEvents&&(this.options.useTouchEvents=!0,this.options.debug&&console.log("autoUseTouchEvents: Touch device detected, useTouchEvents enabled."))}},{key:"onInit",value:function(){this.options.debug&&console.log("".concat(this.keyboardDOMClass," Initialized")),this.handleCaret(),"function"===typeof this.options.onInit&&this.options.onInit()}},{key:"beforeFirstRender",value:function(){this.utilities.isTouchDevice()&&this.onTouchDeviceDetected(),"function"===typeof this.options.beforeFirstRender&&this.options.beforeFirstRender(),!this.utilities.pointerEventsSupported()||this.options.useTouchEvents||this.options.useMouseEvents||this.options.debug&&console.log("Using PointerEvents as it is supported by this browser"),this.options.useTouchEvents&&this.options.debug&&console.log("useTouchEvents has been enabled. Only touch events will be used.")}},{key:"beforeRender",value:function(){"function"===typeof this.options.beforeRender&&this.options.beforeRender()}},{key:"onRender",value:function(){"function"===typeof this.options.onRender&&this.options.onRender()}},{key:"onModulesLoaded",value:function(){"function"===typeof this.options.onModulesLoaded&&this.options.onModulesLoaded()}},{key:"loadModules",value:function(){var t=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach(function(e){var n=new e;if(n.constructor.name&&"Function"!==n.constructor.name){var o="module-".concat(t.utilities.camelCase(n.constructor.name));t.keyboardPluginClasses=t.keyboardPluginClasses+" ".concat(o)}n.init(t)}),this.keyboardPluginClasses=this.keyboardPluginClasses+" modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(t,e){return!!this.modules[t]&&this.modules[t][e]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(t,e,n,o){var i=this,r=Array.from(t.children),s=0;return r.length&&n.forEach(function(n,a){var u=o[a];if(!u||!(u>n))return!1;var c=n-s,l=u-s,p=document.createElement("div");p.className+="hg-button-container";var f="".concat(i.options.layoutName,"-r").concat(e,"c").concat(a);p.setAttribute("data-skUID",f);var d=r.splice(c,l-c+1);s=l-c,d.forEach(function(t){return p.appendChild(t)}),r.splice(c,0,p),t.innerHTML="",r.forEach(function(e){return t.appendChild(e)}),i.options.debug&&console.log("rowDOMContainer",d,c,l,s+1)}),t}},{key:"render",value:function(){var t=this;this.clear(),this.initialized||this.beforeFirstRender(),this.beforeRender();var e="hg-layout-".concat(this.options.layoutName),n=this.options.layout||c.getDefaultLayout(),o=this.options.useTouchEvents||!1,i=o?"hg-touch-events":"",r=this.options.useMouseEvents||!1,s=this.options.disableRowButtonContainers,a=Array.isArray(this.options.buttonTheme)?this.getButtonTheme():{};this.keyboardDOM.className+=" ".concat(this.options.theme," ").concat(e," ").concat(this.keyboardPluginClasses," ").concat(i),n[this.options.layoutName].forEach(function(e,n){var i=e.split(" "),u=document.createElement("div");u.className+="hg-row";var c=[],l=[];i.forEach(function(e,i){var p=!s&&e.includes("[")&&e.length>1,f=!s&&e.includes("]")&&e.length>1;p&&(c.push(i),e=e.replace(/\[/g,"")),f&&(l.push(i),e=e.replace(/\]/g,""));var d=t.utilities.getButtonClass(e),h=a[e],y=t.utilities.getButtonDisplayName(e,t.options.display,t.options.mergeDisplay),b=t.options.useButtonTag?"button":"div",m=document.createElement(b);m.className+="hg-button ".concat(d).concat(h?" "+h:""),!t.utilities.pointerEventsSupported()||o||r?o?(m.ontouchstart=function(n){t.handleButtonClicked(e),t.handleButtonMouseDown(e,n)},m.ontouchend=function(e){return t.handleButtonMouseUp()},m.ontouchcancel=function(e){return t.handleButtonMouseUp()}):(m.onclick=function(){t.isMouseHold=!1,t.handleButtonClicked(e)},m.onmousedown=function(n){t.handleButtonMouseDown(e,n)}):(m.onpointerdown=function(n){t.handleButtonClicked(e),t.handleButtonMouseDown(e,n)},m.onpointerup=function(e){t.handleButtonMouseUp()},m.onpointercancel=function(e){return t.handleButtonMouseUp()}),m.setAttribute("data-skBtn",e);var v="".concat(t.options.layoutName,"-r").concat(n,"b").concat(i);m.setAttribute("data-skBtnUID",v),m.setAttribute("data-displayLabel",y);var g=document.createElement("span");g.innerHTML=y,m.appendChild(g),t.buttonElements[e]||(t.buttonElements[e]=[]),t.buttonElements[e].push(m),u.appendChild(m)}),u=t.parseRowDOMContainers(u,n,c,l),t.keyboardDOM.appendChild(u)}),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||o||r?o?(document.ontouchend=function(e){return t.handleButtonMouseUp()},document.ontouchcancel=function(e){return t.handleButtonMouseUp()}):o||(document.onmouseup=function(){return t.handleButtonMouseUp()}):document.onpointerup=function(){return t.handleButtonMouseUp()},this.onInit())}}])&&h(e.prototype,n),t}();n.default=f}])},function(t,e,n){t.exports=n(9)},function(t,e,n){"use strict";var o=n(5),i="function"===typeof Symbol&&Symbol.for,r=i?Symbol.for("react.element"):60103,s=i?Symbol.for("react.portal"):60106,a=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,l=i?Symbol.for("react.provider"):60109,p=i?Symbol.for("react.context"):60110,f=i?Symbol.for("react.concurrent_mode"):60111,d=i?Symbol.for("react.forward_ref"):60112,h=i?Symbol.for("react.suspense"):60113,y=i?Symbol.for("react.memo"):60115,b=i?Symbol.for("react.lazy"):60116,m="function"===typeof Symbol&&Symbol.iterator;function B(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,o=0;oI.length&&I.push(t)}function U(t,e,n){return null==t?0:function S(t,e,n,o){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var a=!1;if(null===t)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case r:case s:a=!0}}if(a)return n(o,t,""===e?"."+T(t,0):e),1;if(a=0,e=""===e?".":e+":",Array.isArray(t))for(var u=0;u ? {shift}",".com @ {space}"]}}}],null&&r(e.prototype,null),n&&r(e,n),t}();function a(t){return(a="function"===typeof Symbol&&"symbol"===u(Symbol.iterator)?function(t){return u(t)}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":u(t)})(t)}function c(t,e){for(var n=0;n0?r=this.removeAt(r,o,i):"{space}"===t?r=this.addStringAt(r," ",o,i):"{tab}"!==t||"boolean"===typeof n.tabCharOnTab&&!1===n.tabCharOnTab?"{enter}"!==t&&"{numpadenter}"!==t||!n.newLineOnEnter?t.includes("numpad")&&Number.isInteger(Number(t[t.length-2]))?r=this.addStringAt(r,t[t.length-2],o,i):"{numpaddivide}"===t?r=this.addStringAt(r,"/",o,i):"{numpadmultiply}"===t?r=this.addStringAt(r,"*",o,i):"{numpadsubtract}"===t?r=this.addStringAt(r,"-",o,i):"{numpadadd}"===t?r=this.addStringAt(r,"+",o,i):"{numpaddecimal}"===t?r=this.addStringAt(r,".",o,i):"{"===t||"}"===t?r=this.addStringAt(r,t,o,i):t.includes("{")||t.includes("}")||(r=this.addStringAt(r,t,o,i)):r=this.addStringAt(r,"\n",o,i):r=this.addStringAt(r,"\t",o,i),r}},{key:"updateCaretPos",value:function(t,e){var n=this.updateCaretPosAction(this.simpleKeyboardInstance,t,e);this.simpleKeyboardInstance.options.syncInstanceInputs&&this.simpleKeyboardInstance.dispatch(function(t){t.caretPosition=n})}},{key:"updateCaretPosAction",value:function(t,e,n){return n?t.caretPosition>0&&(t.caretPosition=t.caretPosition-e):t.caretPosition=t.caretPosition+e,this.simpleKeyboardInstance.options.debug&&console.log("Caret at:",t.caretPosition,"(".concat(t.keyboardDOMClass,")")),t.caretPosition}},{key:"addStringAt",value:function(t,e,n,o){var i;return n||0===n?(i=[t.slice(0,n),e,t.slice(n)].join(""),this.isMaxLengthReached()||o&&this.updateCaretPos(e.length)):i=t+e,i}},{key:"removeAt",value:function(t,e,n){if(0===this.simpleKeyboardInstance.caretPosition)return t;var o,i=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;return e&&e>=0?t.substring(e-2,e).match(i)?(o=t.substr(0,e-2)+t.substr(e),n&&this.updateCaretPos(2,!0)):(o=t.substr(0,e-1)+t.substr(e),n&&this.updateCaretPos(1,!0)):t.slice(-2).match(i)?(o=t.slice(0,-2),n&&this.updateCaretPos(2,!0)):(o=t.slice(0,-1),n&&this.updateCaretPos(1,!0)),o}},{key:"handleMaxLength",value:function(t,e,n){var o=e.maxLength,i=t[e.inputName],r=i.length===o;if(n.length<=i.length)return!1;if(Number.isInteger(o))return e.debug&&console.log("maxLength (num) reached:",r),r?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1);if("object"===a(o)){var s=i.length===o[e.inputName];return e.debug&&console.log("maxLength (obj) reached:",s),s?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1)}}},{key:"isMaxLengthReached",value:function(){return Boolean(this.maxLengthReached)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints}},{key:"pointerEventsSupported",value:function(){return window.PointerEvent}},{key:"camelCase",value:function(t){return t.toLowerCase().trim().split(/[.\-_\s]/g).reduce(function(t,e){return e.length?t+e[0].toUpperCase()+e.slice(1):t})}},{key:"countInArray",value:function(t,e){return t.reduce(function(t,n){return t+(n===e)},0)}}])&&c(e.prototype,n),o&&c(e,o),t}();function p(t){return(p="function"===typeof Symbol&&"symbol"===u(Symbol.iterator)?function(t){return u(t)}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":u(t)})(t)}function f(t,e){for(var n=0;n1?n:n[0]),e}},{key:"inputPatternIsValid",value:function(t){var e,n=this.options.inputPattern;if((e=n instanceof RegExp?n:n[this.options.inputName])&&t){var o=e.test(t);return this.options.debug&&console.log('inputPattern ("'.concat(e,'"): ').concat(o?"passed":"did not pass!")),o}return!0}},{key:"handleCaret",value:function(){this.caretPosition=null;var t=window.SimpleKeyboardInstances;(t&&Object.keys(t)[0]===this.utilities.camelCase(this.keyboardDOMClass)||!t)&&(this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")")),document.addEventListener("keyup",this.caretEventHandler),document.addEventListener("mouseup",this.caretEventHandler),document.addEventListener("touchend",this.caretEventHandler))}},{key:"caretEventHandler",value:function(t){var e;t.target.tagName&&(e=t.target.tagName.toLowerCase()),this.dispatch(function(n){n.isMouseHold&&(n.isMouseHold=!1),"textarea"!==e&&"input"!==e||n.options.disableCaretPositioning?n.options.disableCaretPositioning&&(n.caretPosition=null):(n.caretPosition=t.target.selectionStart,n.options.debug&&console.log("Caret at: ",t.target.selectionStart,t.target.tagName.toLowerCase(),"(".concat(n.keyboardDOMClass,")")))})}},{key:"getButtonTheme",value:function(){var t=this,e={};return this.options.buttonTheme.forEach(function(n){var o;n.buttons&&n.class?("string"===typeof n.buttons&&(o=n.buttons.split(" ")),o&&o.forEach(function(o){var i=e[o];i?t.utilities.countInArray(i.split(" "),n.class)||(e[o]="".concat(i," ").concat(n.class)):e[o]=n.class})):console.warn('buttonTheme row is missing the "buttons" or the "class". Please check the documentation.')}),e}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(t){if(t.target.classList.contains("hg-button"))return t.preventDefault(),t.stopPropagation(),!1}}},{key:"processAutoTouchEvents",value:function(){this.options.autoUseTouchEvents&&(this.options.useTouchEvents=!0,this.options.debug&&console.log("autoUseTouchEvents: Touch device detected, useTouchEvents enabled."))}},{key:"onInit",value:function(){this.options.debug&&console.log("".concat(this.keyboardDOMClass," Initialized")),this.handleCaret(),"function"===typeof this.options.onInit&&this.options.onInit()}},{key:"beforeFirstRender",value:function(){this.utilities.isTouchDevice()&&this.onTouchDeviceDetected(),"function"===typeof this.options.beforeFirstRender&&this.options.beforeFirstRender(),!this.utilities.pointerEventsSupported()||this.options.useTouchEvents||this.options.useMouseEvents||this.options.debug&&console.log("Using PointerEvents as it is supported by this browser"),this.options.useTouchEvents&&this.options.debug&&console.log("useTouchEvents has been enabled. Only touch events will be used.")}},{key:"beforeRender",value:function(){"function"===typeof this.options.beforeRender&&this.options.beforeRender()}},{key:"onRender",value:function(){"function"===typeof this.options.onRender&&this.options.onRender()}},{key:"onModulesLoaded",value:function(){"function"===typeof this.options.onModulesLoaded&&this.options.onModulesLoaded()}},{key:"loadModules",value:function(){var t=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach(function(e){var n=new e;if(n.constructor.name&&"Function"!==n.constructor.name){var o="module-".concat(t.utilities.camelCase(n.constructor.name));t.keyboardPluginClasses=t.keyboardPluginClasses+" ".concat(o)}n.init(t)}),this.keyboardPluginClasses=this.keyboardPluginClasses+" modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(t,e){return!!this.modules[t]&&this.modules[t][e]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(t,e,n,o){var i=this,r=Array.from(t.children),s=0;return r.length&&n.forEach(function(n,u){var a=o[u];if(!a||!(a>n))return!1;var c=n-s,l=a-s,p=document.createElement("div");p.className+="hg-button-container";var f="".concat(i.options.layoutName,"-r").concat(e,"c").concat(u);p.setAttribute("data-skUID",f);var d=r.splice(c,l-c+1);s=l-c,d.forEach(function(t){return p.appendChild(t)}),r.splice(c,0,p),t.innerHTML="",r.forEach(function(e){return t.appendChild(e)}),i.options.debug&&console.log("rowDOMContainer",d,c,l,s+1)}),t}},{key:"render",value:function(){var t=this;this.clear(),this.initialized||this.beforeFirstRender(),this.beforeRender();var e="hg-layout-".concat(this.options.layoutName),n=this.options.layout||s.getDefaultLayout(),o=this.options.useTouchEvents||!1,i=o?"hg-touch-events":"",r=this.options.useMouseEvents||!1,u=this.options.disableRowButtonContainers,a=Array.isArray(this.options.buttonTheme)?this.getButtonTheme():{};this.keyboardDOM.className+=" ".concat(this.options.theme," ").concat(e," ").concat(this.keyboardPluginClasses," ").concat(i),n[this.options.layoutName].forEach(function(e,n){var i=e.split(" "),s=document.createElement("div");s.className+="hg-row";var c=[],l=[];i.forEach(function(e,i){var p=!u&&e.includes("[")&&e.length>1,f=!u&&e.includes("]")&&e.length>1;p&&(c.push(i),e=e.replace(/\[/g,"")),f&&(l.push(i),e=e.replace(/\]/g,""));var d=t.utilities.getButtonClass(e),h=a[e],y=t.utilities.getButtonDisplayName(e,t.options.display,t.options.mergeDisplay),b=t.options.useButtonTag?"button":"div",m=document.createElement(b);m.className+="hg-button ".concat(d).concat(h?" "+h:""),!t.utilities.pointerEventsSupported()||o||r?o?(m.ontouchstart=function(n){t.handleButtonClicked(e),t.handleButtonMouseDown(e,n)},m.ontouchend=function(e){return t.handleButtonMouseUp()},m.ontouchcancel=function(e){return t.handleButtonMouseUp()}):(m.onclick=function(){t.isMouseHold=!1,t.handleButtonClicked(e)},m.onmousedown=function(n){t.handleButtonMouseDown(e,n)}):(m.onpointerdown=function(n){t.handleButtonClicked(e),t.handleButtonMouseDown(e,n)},m.onpointerup=function(e){t.handleButtonMouseUp()},m.onpointercancel=function(e){return t.handleButtonMouseUp()}),m.setAttribute("data-skBtn",e);var v="".concat(t.options.layoutName,"-r").concat(n,"b").concat(i);m.setAttribute("data-skBtnUID",v),m.setAttribute("data-displayLabel",y);var g=document.createElement("span");g.innerHTML=y,m.appendChild(g),t.buttonElements[e]||(t.buttonElements[e]=[]),t.buttonElements[e].push(m),s.appendChild(m)}),s=t.parseRowDOMContainers(s,n,c,l),t.keyboardDOM.appendChild(s)}),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||o||r?o?(document.ontouchend=function(e){return t.handleButtonMouseUp()},document.ontouchcancel=function(e){return t.handleButtonMouseUp()}):o||(document.onmouseup=function(){return t.handleButtonMouseUp()}):document.onpointerup=function(){return t.handleButtonMouseUp()},this.onInit())}}])&&f(e.prototype,n),t}();e.default=d}])},"object"===u(e)&&"object"===u(t)?t.exports=s():(i=[],void 0===(r="function"===typeof(o=s)?o.apply(e,i):o)||(t.exports=r))}).call(this,n(9)(t))},function(t,e,n){t.exports=n(11)},function(t,e,n){"use strict";var o=n(0),i=n(6),r="function"===typeof Symbol&&Symbol.for,s=r?Symbol.for("react.element"):60103,u=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,c=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,p=r?Symbol.for("react.provider"):60109,f=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.concurrent_mode"):60111,h=r?Symbol.for("react.forward_ref"):60112,y=r?Symbol.for("react.suspense"):60113,b=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,v="function"===typeof Symbol&&Symbol.iterator;function g(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,o=0;o_.length&&_.push(t)}function L(t,e,n){return null==t?0:function t(e,n,i,r){var a=o(e);"undefined"!==a&&"boolean"!==a||(e=null);var c=!1;if(null===e)c=!0;else switch(a){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case s:case u:c=!0}}if(c)return i(r,e,""===n?"."+N(e,0):n),1;if(c=0,n=""===n?".":n+":",Array.isArray(e))for(var l=0;l ? {shift}\", \".com @ {space}\"]\n };\n }\n }], (n = null) && s(e.prototype, n), o && s(e, o), t;\n }();\n\n function u(t) {\n return (u = \"function\" === typeof Symbol && \"symbol\" === typeof Symbol.iterator ? function (t) {\n return typeof t;\n } : function (t) {\n return t && \"function\" === typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? \"symbol\" : typeof t;\n })(t);\n }\n\n function r(t, e) {\n for (var n = 0; n < e.length; n++) {\n var o = e[n];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);\n }\n }\n\n var c = function () {\n function t(e) {\n !function (t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, t), this.simpleKeyboardInstance = e, t.bindMethods(t, this);\n }\n\n var e, n, o;\n return e = t, o = [{\n key: \"bindMethods\",\n value: function value(t, e) {\n var n = !0,\n o = !1,\n i = void 0;\n\n try {\n for (var s, a = Object.getOwnPropertyNames(t.prototype)[Symbol.iterator](); !(n = (s = a.next()).done); n = !0) {\n var u = s.value;\n \"constructor\" === u || \"bindMethods\" === u || (e[u] = e[u].bind(e));\n }\n } catch (r) {\n o = !0, i = r;\n } finally {\n try {\n n || null == a.return || a.return();\n } finally {\n if (o) throw i;\n }\n }\n }\n }], (n = [{\n key: \"getButtonClass\",\n value: function value(t) {\n var e = t.includes(\"{\") && t.includes(\"}\") && \"{//}\" !== t ? \"functionBtn\" : \"standardBtn\",\n n = t.replace(\"{\", \"\").replace(\"}\", \"\"),\n o = \"\";\n return \"standardBtn\" !== e && (o = \" hg-button-\".concat(n)), \"hg-\".concat(e).concat(o);\n }\n }, {\n key: \"getDefaultDiplay\",\n value: function value() {\n return {\n \"{bksp}\": \"backspace\",\n \"{backspace}\": \"backspace\",\n \"{enter}\": \"< enter\",\n \"{shift}\": \"shift\",\n \"{shiftleft}\": \"shift\",\n \"{shiftright}\": \"shift\",\n \"{alt}\": \"alt\",\n \"{s}\": \"shift\",\n \"{tab}\": \"tab\",\n \"{lock}\": \"caps\",\n \"{capslock}\": \"caps\",\n \"{accept}\": \"Submit\",\n \"{space}\": \" \",\n \"{//}\": \" \",\n \"{esc}\": \"esc\",\n \"{escape}\": \"esc\",\n \"{f1}\": \"f1\",\n \"{f2}\": \"f2\",\n \"{f3}\": \"f3\",\n \"{f4}\": \"f4\",\n \"{f5}\": \"f5\",\n \"{f6}\": \"f6\",\n \"{f7}\": \"f7\",\n \"{f8}\": \"f8\",\n \"{f9}\": \"f9\",\n \"{f10}\": \"f10\",\n \"{f11}\": \"f11\",\n \"{f12}\": \"f12\",\n \"{numpaddivide}\": \"/\",\n \"{numlock}\": \"lock\",\n \"{arrowup}\": \"\\u2191\",\n \"{arrowleft}\": \"\\u2190\",\n \"{arrowdown}\": \"\\u2193\",\n \"{arrowright}\": \"\\u2192\",\n \"{prtscr}\": \"print\",\n \"{scrolllock}\": \"scroll\",\n \"{pause}\": \"pause\",\n \"{insert}\": \"ins\",\n \"{home}\": \"home\",\n \"{pageup}\": \"up\",\n \"{delete}\": \"del\",\n \"{end}\": \"end\",\n \"{pagedown}\": \"down\",\n \"{numpadmultiply}\": \"*\",\n \"{numpadsubtract}\": \"-\",\n \"{numpadadd}\": \"+\",\n \"{numpadenter}\": \"enter\",\n \"{period}\": \".\",\n \"{numpaddecimal}\": \".\",\n \"{numpad0}\": \"0\",\n \"{numpad1}\": \"1\",\n \"{numpad2}\": \"2\",\n \"{numpad3}\": \"3\",\n \"{numpad4}\": \"4\",\n \"{numpad5}\": \"5\",\n \"{numpad6}\": \"6\",\n \"{numpad7}\": \"7\",\n \"{numpad8}\": \"8\",\n \"{numpad9}\": \"9\"\n };\n }\n }, {\n key: \"getButtonDisplayName\",\n value: function value(t, e, n) {\n return (e = n ? Object.assign({}, this.getDefaultDiplay(), e) : e || this.getDefaultDiplay())[t] || t;\n }\n }, {\n key: \"getUpdatedInput\",\n value: function value(t, e, n, o, i) {\n var s = e;\n return (\"{bksp}\" === t || \"{backspace}\" === t) && s.length > 0 ? s = this.removeAt(s, o, i) : \"{space}\" === t ? s = this.addStringAt(s, \" \", o, i) : \"{tab}\" !== t || \"boolean\" === typeof n.tabCharOnTab && !1 === n.tabCharOnTab ? \"{enter}\" !== t && \"{numpadenter}\" !== t || !n.newLineOnEnter ? t.includes(\"numpad\") && Number.isInteger(Number(t[t.length - 2])) ? s = this.addStringAt(s, t[t.length - 2], o, i) : \"{numpaddivide}\" === t ? s = this.addStringAt(s, \"/\", o, i) : \"{numpadmultiply}\" === t ? s = this.addStringAt(s, \"*\", o, i) : \"{numpadsubtract}\" === t ? s = this.addStringAt(s, \"-\", o, i) : \"{numpadadd}\" === t ? s = this.addStringAt(s, \"+\", o, i) : \"{numpaddecimal}\" === t ? s = this.addStringAt(s, \".\", o, i) : \"{\" === t || \"}\" === t ? s = this.addStringAt(s, t, o, i) : t.includes(\"{\") || t.includes(\"}\") || (s = this.addStringAt(s, t, o, i)) : s = this.addStringAt(s, \"\\n\", o, i) : s = this.addStringAt(s, \"\\t\", o, i), s;\n }\n }, {\n key: \"updateCaretPos\",\n value: function value(t, e) {\n var n = this.updateCaretPosAction(this.simpleKeyboardInstance, t, e);\n this.simpleKeyboardInstance.options.syncInstanceInputs && this.simpleKeyboardInstance.dispatch(function (t) {\n t.caretPosition = n;\n });\n }\n }, {\n key: \"updateCaretPosAction\",\n value: function value(t, e, n) {\n return n ? t.caretPosition > 0 && (t.caretPosition = t.caretPosition - e) : t.caretPosition = t.caretPosition + e, this.simpleKeyboardInstance.options.debug && console.log(\"Caret at:\", t.caretPosition, \"(\".concat(t.keyboardDOMClass, \")\")), t.caretPosition;\n }\n }, {\n key: \"addStringAt\",\n value: function value(t, e, n, o) {\n var i;\n return n || 0 === n ? (i = [t.slice(0, n), e, t.slice(n)].join(\"\"), this.isMaxLengthReached() || o && this.updateCaretPos(e.length)) : i = t + e, i;\n }\n }, {\n key: \"removeAt\",\n value: function value(t, e, n) {\n if (0 === this.simpleKeyboardInstance.caretPosition) return t;\n var o,\n i = /([\\uD800-\\uDBFF][\\uDC00-\\uDFFF])/g;\n return e && e >= 0 ? t.substring(e - 2, e).match(i) ? (o = t.substr(0, e - 2) + t.substr(e), n && this.updateCaretPos(2, !0)) : (o = t.substr(0, e - 1) + t.substr(e), n && this.updateCaretPos(1, !0)) : t.slice(-2).match(i) ? (o = t.slice(0, -2), n && this.updateCaretPos(2, !0)) : (o = t.slice(0, -1), n && this.updateCaretPos(1, !0)), o;\n }\n }, {\n key: \"handleMaxLength\",\n value: function value(t, e, n) {\n var o = e.maxLength,\n i = t[e.inputName],\n s = i.length === o;\n if (n.length <= i.length) return !1;\n if (Number.isInteger(o)) return e.debug && console.log(\"maxLength (num) reached:\", s), s ? (this.maxLengthReached = !0, !0) : (this.maxLengthReached = !1, !1);\n\n if (\"object\" === u(o)) {\n var a = i.length === o[e.inputName];\n return e.debug && console.log(\"maxLength (obj) reached:\", a), a ? (this.maxLengthReached = !0, !0) : (this.maxLengthReached = !1, !1);\n }\n }\n }, {\n key: \"isMaxLengthReached\",\n value: function value() {\n return Boolean(this.maxLengthReached);\n }\n }, {\n key: \"isTouchDevice\",\n value: function value() {\n return \"ontouchstart\" in window || navigator.maxTouchPoints;\n }\n }, {\n key: \"pointerEventsSupported\",\n value: function value() {\n return window.PointerEvent;\n }\n }, {\n key: \"camelCase\",\n value: function value(t) {\n return t.toLowerCase().trim().split(/[.\\-_\\s]/g).reduce(function (t, e) {\n return e.length ? t + e[0].toUpperCase() + e.slice(1) : t;\n });\n }\n }, {\n key: \"countInArray\",\n value: function value(t, e) {\n return t.reduce(function (t, n) {\n return t + (n === e);\n }, 0);\n }\n }]) && r(e.prototype, n), o && r(e, o), t;\n }();\n\n function l(t) {\n return (l = \"function\" === typeof Symbol && \"symbol\" === typeof Symbol.iterator ? function (t) {\n return typeof t;\n } : function (t) {\n return t && \"function\" === typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? \"symbol\" : typeof t;\n })(t);\n }\n\n function h(t, e) {\n for (var n = 0; n < e.length; n++) {\n var o = e[n];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);\n }\n }\n\n var d = function () {\n function t() {\n var e,\n n,\n o,\n s = this;\n !function (t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, t), o = function o(t, e) {\n s.modules[t] || (s.modules[t] = {}), e(s.modules[t]);\n }, (n = \"registerModule\") in (e = this) ? Object.defineProperty(e, n, {\n value: o,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[n] = o;\n var a = \"string\" === typeof (arguments.length <= 0 ? void 0 : arguments[0]) ? arguments.length <= 0 ? void 0 : arguments[0] : \".simple-keyboard\",\n u = \"object\" === l(arguments.length <= 0 ? void 0 : arguments[0]) ? arguments.length <= 0 ? void 0 : arguments[0] : arguments.length <= 1 ? void 0 : arguments[1];\n if (u || (u = {}), this.utilities = new c(this), this.keyboardDOM = document.querySelector(a), this.options = u, this.options.layoutName = this.options.layoutName || \"default\", this.options.theme = this.options.theme || \"hg-theme-default\", this.options.inputName = this.options.inputName || \"default\", this.options.preventMouseDownDefault = this.options.preventMouseDownDefault || !1, this.keyboardPluginClasses = \"\", c.bindMethods(t, this), this.input = {}, this.input[this.options.inputName] = \"\", this.keyboardDOMClass = a.split(\".\").join(\"\"), this.buttonElements = {}, !this.keyboardDOM) throw console.warn('\"'.concat(a, '\" was not found in the DOM.')), new Error(\"KEYBOARD_DOM_ERROR\");\n this.render(), window.SimpleKeyboardInstances || (window.SimpleKeyboardInstances = {}), window.SimpleKeyboardInstances[this.utilities.camelCase(this.keyboardDOMClass)] = this, this.physicalKeyboardInterface = new i(this), this.modules = {}, this.loadModules();\n }\n\n var e, n, o;\n return e = t, (n = [{\n key: \"handleButtonClicked\",\n value: function value(t) {\n var e = this.options.debug;\n if (\"{//}\" === t) return !1;\n \"function\" === typeof this.options.onKeyPress && this.options.onKeyPress(t), this.input[this.options.inputName] || (this.input[this.options.inputName] = \"\");\n var n = this.utilities.getUpdatedInput(t, this.input[this.options.inputName], this.options, this.caretPosition);\n\n if (this.input[this.options.inputName] !== n && (!this.options.inputPattern || this.options.inputPattern && this.inputPatternIsValid(n))) {\n if (this.options.maxLength && this.utilities.handleMaxLength(this.input, this.options, n)) return !1;\n this.input[this.options.inputName] = this.utilities.getUpdatedInput(t, this.input[this.options.inputName], this.options, this.caretPosition, !0), e && console.log(\"Input changed:\", this.input), this.options.syncInstanceInputs && this.syncInstanceInputs(this.input), \"function\" === typeof this.options.onChange && this.options.onChange(this.input[this.options.inputName]), \"function\" === typeof this.options.onChangeAll && this.options.onChangeAll(this.input);\n }\n\n e && console.log(\"Key pressed:\", t);\n }\n }, {\n key: \"handleButtonMouseDown\",\n value: function value(t, e) {\n var n = this;\n this.options.preventMouseDownDefault && e.preventDefault(), this.options.stopMouseDownPropagation && e.stopPropagation(), this.isMouseHold = !0, this.holdInteractionTimeout && clearTimeout(this.holdInteractionTimeout), this.holdTimeout && clearTimeout(this.holdTimeout), this.holdTimeout = setTimeout(function () {\n !n.isMouseHold || (t.includes(\"{\") || t.includes(\"}\")) && \"{delete}\" !== t && \"{backspace}\" !== t && \"{bksp}\" !== t && \"{space}\" !== t && \"{tab}\" !== t || (n.options.debug && console.log(\"Button held:\", t), n.handleButtonHold(t, e)), clearTimeout(n.holdTimeout);\n }, 500);\n }\n }, {\n key: \"handleButtonMouseUp\",\n value: function value() {\n this.isMouseHold = !1, this.holdInteractionTimeout && clearTimeout(this.holdInteractionTimeout);\n }\n }, {\n key: \"handleButtonHold\",\n value: function value(t) {\n var e = this;\n this.holdInteractionTimeout && clearTimeout(this.holdInteractionTimeout), this.holdInteractionTimeout = setTimeout(function () {\n e.isMouseHold ? (e.handleButtonClicked(t), e.handleButtonHold(t)) : clearTimeout(e.holdInteractionTimeout);\n }, 100);\n }\n }, {\n key: \"syncInstanceInputs\",\n value: function value() {\n var t = this;\n this.dispatch(function (e) {\n e.replaceInput(t.input), e.caretPosition = t.caretPosition;\n });\n }\n }, {\n key: \"clearInput\",\n value: function value(t) {\n t = t || this.options.inputName, this.input[t] = \"\", this.caretPosition = 0, this.options.syncInstanceInputs && this.syncInstanceInputs(this.input);\n }\n }, {\n key: \"getInput\",\n value: function value(t) {\n return t = t || this.options.inputName, this.options.syncInstanceInputs && this.syncInstanceInputs(this.input), this.input[t];\n }\n }, {\n key: \"setInput\",\n value: function value(t, e) {\n e = e || this.options.inputName, this.input[e] = t, this.options.syncInstanceInputs && this.syncInstanceInputs(this.input);\n }\n }, {\n key: \"replaceInput\",\n value: function value(t) {\n this.input = t;\n }\n }, {\n key: \"setOptions\",\n value: function value(t) {\n t = t || {}, this.options = Object.assign(this.options, t), this.onSetOptions(t), this.render();\n }\n }, {\n key: \"onSetOptions\",\n value: function value(t) {\n t.inputName && (this.options.debug && console.log(\"inputName changed. caretPosition reset.\"), this.caretPosition = null);\n }\n }, {\n key: \"clear\",\n value: function value() {\n this.keyboardDOM.innerHTML = \"\", this.keyboardDOM.className = this.keyboardDOMClass, this.buttonElements = {};\n }\n }, {\n key: \"dispatch\",\n value: function value(t) {\n if (!window.SimpleKeyboardInstances) throw console.warn(\"SimpleKeyboardInstances is not defined. Dispatch cannot be called.\"), new Error(\"INSTANCES_VAR_ERROR\");\n return Object.keys(window.SimpleKeyboardInstances).forEach(function (e) {\n t(window.SimpleKeyboardInstances[e], e);\n });\n }\n }, {\n key: \"addButtonTheme\",\n value: function value(t, e) {\n var n = this;\n if (!e || !t) return !1;\n t.split(\" \").forEach(function (o) {\n e.split(\" \").forEach(function (e) {\n n.options.buttonTheme || (n.options.buttonTheme = []);\n var i = !1;\n n.options.buttonTheme.map(function (t) {\n if (t.class.split(\" \").includes(e)) {\n i = !0;\n var n = t.buttons.split(\" \");\n n.includes(o) || (i = !0, n.push(o), t.buttons = n.join(\" \"));\n }\n\n return t;\n }), i || n.options.buttonTheme.push({\n class: e,\n buttons: t\n });\n });\n }), this.render();\n }\n }, {\n key: \"removeButtonTheme\",\n value: function value(t, e) {\n var n = this;\n if (!t && !e) return this.options.buttonTheme = [], this.render(), !1;\n t && Array.isArray(this.options.buttonTheme) && this.options.buttonTheme.length && (t.split(\" \").forEach(function (t, o) {\n n.options.buttonTheme.map(function (o, i) {\n if (e && e.includes(o.class) || !e) {\n var s = o.buttons.split(\" \").filter(function (e) {\n return e !== t;\n });\n s.length ? o.buttons = s.join(\" \") : (n.options.buttonTheme.splice(i, 1), o = null);\n }\n\n return o;\n });\n }), this.render());\n }\n }, {\n key: \"getButtonElement\",\n value: function value(t) {\n var e,\n n = this.buttonElements[t];\n return n && (e = n.length > 1 ? n : n[0]), e;\n }\n }, {\n key: \"inputPatternIsValid\",\n value: function value(t) {\n var e,\n n = this.options.inputPattern;\n\n if ((e = n instanceof RegExp ? n : n[this.options.inputName]) && t) {\n var o = e.test(t);\n return this.options.debug && console.log('inputPattern (\"'.concat(e, '\"): ').concat(o ? \"passed\" : \"did not pass!\")), o;\n }\n\n return !0;\n }\n }, {\n key: \"handleCaret\",\n value: function value() {\n this.caretPosition = null;\n var t = window.SimpleKeyboardInstances;\n (t && Object.keys(t)[0] === this.utilities.camelCase(this.keyboardDOMClass) || !t) && (this.options.debug && console.log(\"Caret handling started (\".concat(this.keyboardDOMClass, \")\")), document.addEventListener(\"keyup\", this.caretEventHandler), document.addEventListener(\"mouseup\", this.caretEventHandler), document.addEventListener(\"touchend\", this.caretEventHandler));\n }\n }, {\n key: \"caretEventHandler\",\n value: function value(t) {\n var e;\n t.target.tagName && (e = t.target.tagName.toLowerCase()), this.dispatch(function (n) {\n n.isMouseHold && (n.isMouseHold = !1), \"textarea\" !== e && \"input\" !== e || n.options.disableCaretPositioning ? n.options.disableCaretPositioning && (n.caretPosition = null) : (n.caretPosition = t.target.selectionStart, n.options.debug && console.log(\"Caret at: \", t.target.selectionStart, t.target.tagName.toLowerCase(), \"(\".concat(n.keyboardDOMClass, \")\")));\n });\n }\n }, {\n key: \"getButtonTheme\",\n value: function value() {\n var t = this,\n e = {};\n return this.options.buttonTheme.forEach(function (n) {\n var o;\n n.buttons && n.class ? (\"string\" === typeof n.buttons && (o = n.buttons.split(\" \")), o && o.forEach(function (o) {\n var i = e[o];\n i ? t.utilities.countInArray(i.split(\" \"), n.class) || (e[o] = \"\".concat(i, \" \").concat(n.class)) : e[o] = n.class;\n })) : console.warn('buttonTheme row is missing the \"buttons\" or the \"class\". Please check the documentation.');\n }), e;\n }\n }, {\n key: \"onTouchDeviceDetected\",\n value: function value() {\n this.processAutoTouchEvents(), this.disableContextualWindow();\n }\n }, {\n key: \"disableContextualWindow\",\n value: function value() {\n window.oncontextmenu = function (t) {\n if (t.target.classList.contains(\"hg-button\")) return t.preventDefault(), t.stopPropagation(), !1;\n };\n }\n }, {\n key: \"processAutoTouchEvents\",\n value: function value() {\n this.options.autoUseTouchEvents && (this.options.useTouchEvents = !0, this.options.debug && console.log(\"autoUseTouchEvents: Touch device detected, useTouchEvents enabled.\"));\n }\n }, {\n key: \"onInit\",\n value: function value() {\n this.options.debug && console.log(\"\".concat(this.keyboardDOMClass, \" Initialized\")), this.handleCaret(), \"function\" === typeof this.options.onInit && this.options.onInit();\n }\n }, {\n key: \"beforeFirstRender\",\n value: function value() {\n this.utilities.isTouchDevice() && this.onTouchDeviceDetected(), \"function\" === typeof this.options.beforeFirstRender && this.options.beforeFirstRender(), !this.utilities.pointerEventsSupported() || this.options.useTouchEvents || this.options.useMouseEvents || this.options.debug && console.log(\"Using PointerEvents as it is supported by this browser\"), this.options.useTouchEvents && this.options.debug && console.log(\"useTouchEvents has been enabled. Only touch events will be used.\");\n }\n }, {\n key: \"beforeRender\",\n value: function value() {\n \"function\" === typeof this.options.beforeRender && this.options.beforeRender();\n }\n }, {\n key: \"onRender\",\n value: function value() {\n \"function\" === typeof this.options.onRender && this.options.onRender();\n }\n }, {\n key: \"onModulesLoaded\",\n value: function value() {\n \"function\" === typeof this.options.onModulesLoaded && this.options.onModulesLoaded();\n }\n }, {\n key: \"loadModules\",\n value: function value() {\n var t = this;\n Array.isArray(this.options.modules) && (this.options.modules.forEach(function (e) {\n var n = new e();\n\n if (n.constructor.name && \"Function\" !== n.constructor.name) {\n var o = \"module-\".concat(t.utilities.camelCase(n.constructor.name));\n t.keyboardPluginClasses = t.keyboardPluginClasses + \" \".concat(o);\n }\n\n n.init(t);\n }), this.keyboardPluginClasses = this.keyboardPluginClasses + \" modules-loaded\", this.render(), this.onModulesLoaded());\n }\n }, {\n key: \"getModuleProp\",\n value: function value(t, e) {\n return !!this.modules[t] && this.modules[t][e];\n }\n }, {\n key: \"getModulesList\",\n value: function value() {\n return Object.keys(this.modules);\n }\n }, {\n key: \"parseRowDOMContainers\",\n value: function value(t, e, n, o) {\n var i = this,\n s = Array.from(t.children),\n a = 0;\n return s.length && n.forEach(function (n, u) {\n var r = o[u];\n if (!r || !(r > n)) return !1;\n var c = n - a,\n l = r - a,\n h = document.createElement(\"div\");\n h.className += \"hg-button-container\";\n var d = \"\".concat(i.options.layoutName, \"-r\").concat(e, \"c\").concat(u);\n h.setAttribute(\"data-skUID\", d);\n var p = s.splice(c, l - c + 1);\n a = l - c, p.forEach(function (t) {\n return h.appendChild(t);\n }), s.splice(c, 0, h), t.innerHTML = \"\", s.forEach(function (e) {\n return t.appendChild(e);\n }), i.options.debug && console.log(\"rowDOMContainer\", p, c, l, a + 1);\n }), t;\n }\n }, {\n key: \"render\",\n value: function value() {\n var t = this;\n this.clear(), this.initialized || this.beforeFirstRender(), this.beforeRender();\n var e = \"hg-layout-\".concat(this.options.layoutName),\n n = this.options.layout || a.getDefaultLayout(),\n o = this.options.useTouchEvents || !1,\n i = o ? \"hg-touch-events\" : \"\",\n s = this.options.useMouseEvents || !1,\n u = this.options.disableRowButtonContainers,\n r = Array.isArray(this.options.buttonTheme) ? this.getButtonTheme() : {};\n this.keyboardDOM.className += \" \".concat(this.options.theme, \" \").concat(e, \" \").concat(this.keyboardPluginClasses, \" \").concat(i), n[this.options.layoutName].forEach(function (e, n) {\n var i = e.split(\" \"),\n a = document.createElement(\"div\");\n a.className += \"hg-row\";\n var c = [],\n l = [];\n i.forEach(function (e, i) {\n var h = !u && e.includes(\"[\") && e.length > 1,\n d = !u && e.includes(\"]\") && e.length > 1;\n h && (c.push(i), e = e.replace(/\\[/g, \"\")), d && (l.push(i), e = e.replace(/\\]/g, \"\"));\n var p = t.utilities.getButtonClass(e),\n f = r[e],\n y = t.utilities.getButtonDisplayName(e, t.options.display, t.options.mergeDisplay),\n m = t.options.useButtonTag ? \"button\" : \"div\",\n b = document.createElement(m);\n b.className += \"hg-button \".concat(p).concat(f ? \" \" + f : \"\"), !t.utilities.pointerEventsSupported() || o || s ? o ? (b.ontouchstart = function (n) {\n t.handleButtonClicked(e), t.handleButtonMouseDown(e, n);\n }, b.ontouchend = function (e) {\n return t.handleButtonMouseUp();\n }, b.ontouchcancel = function (e) {\n return t.handleButtonMouseUp();\n }) : (b.onclick = function () {\n t.isMouseHold = !1, t.handleButtonClicked(e);\n }, b.onmousedown = function (n) {\n t.handleButtonMouseDown(e, n);\n }) : (b.onpointerdown = function (n) {\n t.handleButtonClicked(e), t.handleButtonMouseDown(e, n);\n }, b.onpointerup = function (e) {\n t.handleButtonMouseUp();\n }, b.onpointercancel = function (e) {\n return t.handleButtonMouseUp();\n }), b.setAttribute(\"data-skBtn\", e);\n var v = \"\".concat(t.options.layoutName, \"-r\").concat(n, \"b\").concat(i);\n b.setAttribute(\"data-skBtnUID\", v), b.setAttribute(\"data-displayLabel\", y);\n var g = document.createElement(\"span\");\n g.innerHTML = y, b.appendChild(g), t.buttonElements[e] || (t.buttonElements[e] = []), t.buttonElements[e].push(b), a.appendChild(b);\n }), a = t.parseRowDOMContainers(a, n, c, l), t.keyboardDOM.appendChild(a);\n }), this.onRender(), this.initialized || (this.initialized = !0, !this.utilities.pointerEventsSupported() || o || s ? o ? (document.ontouchend = function (e) {\n return t.handleButtonMouseUp();\n }, document.ontouchcancel = function (e) {\n return t.handleButtonMouseUp();\n }) : o || (document.onmouseup = function () {\n return t.handleButtonMouseUp();\n }) : document.onpointerup = function () {\n return t.handleButtonMouseUp();\n }, this.onInit());\n }\n }]) && h(e.prototype, n), o && h(e, o), t;\n }();\n\n e.default = d;\n }]);\n});","/** @license React v16.8.6\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar k = require(\"object-assign\"),\n n = \"function\" === typeof Symbol && Symbol.for,\n p = n ? Symbol.for(\"react.element\") : 60103,\n q = n ? Symbol.for(\"react.portal\") : 60106,\n r = n ? Symbol.for(\"react.fragment\") : 60107,\n t = n ? Symbol.for(\"react.strict_mode\") : 60108,\n u = n ? Symbol.for(\"react.profiler\") : 60114,\n v = n ? Symbol.for(\"react.provider\") : 60109,\n w = n ? Symbol.for(\"react.context\") : 60110,\n x = n ? Symbol.for(\"react.concurrent_mode\") : 60111,\n y = n ? Symbol.for(\"react.forward_ref\") : 60112,\n z = n ? Symbol.for(\"react.suspense\") : 60113,\n aa = n ? Symbol.for(\"react.memo\") : 60115,\n ba = n ? Symbol.for(\"react.lazy\") : 60116,\n A = \"function\" === typeof Symbol && Symbol.iterator;\n\nfunction ca(a, b, d, c, e, g, h, f) {\n if (!a) {\n a = void 0;\n if (void 0 === b) a = Error(\"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.\");else {\n var l = [d, c, e, g, h, f],\n m = 0;\n a = Error(b.replace(/%s/g, function () {\n return l[m++];\n }));\n a.name = \"Invariant Violation\";\n }\n a.framesToPop = 1;\n throw a;\n }\n}\n\nfunction B(a) {\n for (var b = arguments.length - 1, d = \"https://reactjs.org/docs/error-decoder.html?invariant=\" + a, c = 0; c < b; c++) {\n d += \"&args[]=\" + encodeURIComponent(arguments[c + 1]);\n }\n\n ca(!1, \"Minified React error #\" + a + \"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. \", d);\n}\n\nvar C = {\n isMounted: function isMounted() {\n return !1;\n },\n enqueueForceUpdate: function enqueueForceUpdate() {},\n enqueueReplaceState: function enqueueReplaceState() {},\n enqueueSetState: function enqueueSetState() {}\n},\n D = {};\n\nfunction E(a, b, d) {\n this.props = a;\n this.context = b;\n this.refs = D;\n this.updater = d || C;\n}\n\nE.prototype.isReactComponent = {};\n\nE.prototype.setState = function (a, b) {\n \"object\" !== typeof a && \"function\" !== typeof a && null != a ? B(\"85\") : void 0;\n this.updater.enqueueSetState(this, a, b, \"setState\");\n};\n\nE.prototype.forceUpdate = function (a) {\n this.updater.enqueueForceUpdate(this, a, \"forceUpdate\");\n};\n\nfunction F() {}\n\nF.prototype = E.prototype;\n\nfunction G(a, b, d) {\n this.props = a;\n this.context = b;\n this.refs = D;\n this.updater = d || C;\n}\n\nvar H = G.prototype = new F();\nH.constructor = G;\nk(H, E.prototype);\nH.isPureReactComponent = !0;\nvar I = {\n current: null\n},\n J = {\n current: null\n},\n K = Object.prototype.hasOwnProperty,\n L = {\n key: !0,\n ref: !0,\n __self: !0,\n __source: !0\n};\n\nfunction M(a, b, d) {\n var c = void 0,\n e = {},\n g = null,\n h = null;\n if (null != b) for (c in void 0 !== b.ref && (h = b.ref), void 0 !== b.key && (g = \"\" + b.key), b) {\n K.call(b, c) && !L.hasOwnProperty(c) && (e[c] = b[c]);\n }\n var f = arguments.length - 2;\n if (1 === f) e.children = d;else if (1 < f) {\n for (var l = Array(f), m = 0; m < f; m++) {\n l[m] = arguments[m + 2];\n }\n\n e.children = l;\n }\n if (a && a.defaultProps) for (c in f = a.defaultProps, f) {\n void 0 === e[c] && (e[c] = f[c]);\n }\n return {\n $$typeof: p,\n type: a,\n key: g,\n ref: h,\n props: e,\n _owner: J.current\n };\n}\n\nfunction da(a, b) {\n return {\n $$typeof: p,\n type: a.type,\n key: b,\n ref: a.ref,\n props: a.props,\n _owner: a._owner\n };\n}\n\nfunction N(a) {\n return \"object\" === typeof a && null !== a && a.$$typeof === p;\n}\n\nfunction escape(a) {\n var b = {\n \"=\": \"=0\",\n \":\": \"=2\"\n };\n return \"$\" + (\"\" + a).replace(/[=:]/g, function (a) {\n return b[a];\n });\n}\n\nvar O = /\\/+/g,\n P = [];\n\nfunction Q(a, b, d, c) {\n if (P.length) {\n var e = P.pop();\n e.result = a;\n e.keyPrefix = b;\n e.func = d;\n e.context = c;\n e.count = 0;\n return e;\n }\n\n return {\n result: a,\n keyPrefix: b,\n func: d,\n context: c,\n count: 0\n };\n}\n\nfunction R(a) {\n a.result = null;\n a.keyPrefix = null;\n a.func = null;\n a.context = null;\n a.count = 0;\n 10 > P.length && P.push(a);\n}\n\nfunction S(a, b, d, c) {\n var e = typeof a;\n if (\"undefined\" === e || \"boolean\" === e) a = null;\n var g = !1;\n if (null === a) g = !0;else switch (e) {\n case \"string\":\n case \"number\":\n g = !0;\n break;\n\n case \"object\":\n switch (a.$$typeof) {\n case p:\n case q:\n g = !0;\n }\n\n }\n if (g) return d(c, a, \"\" === b ? \".\" + T(a, 0) : b), 1;\n g = 0;\n b = \"\" === b ? \".\" : b + \":\";\n if (Array.isArray(a)) for (var h = 0; h < a.length; h++) {\n e = a[h];\n var f = b + T(e, h);\n g += S(e, f, d, c);\n } else if (null === a || \"object\" !== typeof a ? f = null : (f = A && a[A] || a[\"@@iterator\"], f = \"function\" === typeof f ? f : null), \"function\" === typeof f) for (a = f.call(a), h = 0; !(e = a.next()).done;) {\n e = e.value, f = b + T(e, h++), g += S(e, f, d, c);\n } else \"object\" === e && (d = \"\" + a, B(\"31\", \"[object Object]\" === d ? \"object with keys {\" + Object.keys(a).join(\", \") + \"}\" : d, \"\"));\n return g;\n}\n\nfunction U(a, b, d) {\n return null == a ? 0 : S(a, \"\", b, d);\n}\n\nfunction T(a, b) {\n return \"object\" === typeof a && null !== a && null != a.key ? escape(a.key) : b.toString(36);\n}\n\nfunction ea(a, b) {\n a.func.call(a.context, b, a.count++);\n}\n\nfunction fa(a, b, d) {\n var c = a.result,\n e = a.keyPrefix;\n a = a.func.call(a.context, b, a.count++);\n Array.isArray(a) ? V(a, c, d, function (a) {\n return a;\n }) : null != a && (N(a) && (a = da(a, e + (!a.key || b && b.key === a.key ? \"\" : (\"\" + a.key).replace(O, \"$&/\") + \"/\") + d)), c.push(a));\n}\n\nfunction V(a, b, d, c, e) {\n var g = \"\";\n null != d && (g = (\"\" + d).replace(O, \"$&/\") + \"/\");\n b = Q(b, g, c, e);\n U(a, fa, b);\n R(b);\n}\n\nfunction W() {\n var a = I.current;\n null === a ? B(\"321\") : void 0;\n return a;\n}\n\nvar X = {\n Children: {\n map: function map(a, b, d) {\n if (null == a) return a;\n var c = [];\n V(a, c, null, b, d);\n return c;\n },\n forEach: function forEach(a, b, d) {\n if (null == a) return a;\n b = Q(null, null, b, d);\n U(a, ea, b);\n R(b);\n },\n count: function count(a) {\n return U(a, function () {\n return null;\n }, null);\n },\n toArray: function toArray(a) {\n var b = [];\n V(a, b, null, function (a) {\n return a;\n });\n return b;\n },\n only: function only(a) {\n N(a) ? void 0 : B(\"143\");\n return a;\n }\n },\n createRef: function createRef() {\n return {\n current: null\n };\n },\n Component: E,\n PureComponent: G,\n createContext: function createContext(a, b) {\n void 0 === b && (b = null);\n a = {\n $$typeof: w,\n _calculateChangedBits: b,\n _currentValue: a,\n _currentValue2: a,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n a.Provider = {\n $$typeof: v,\n _context: a\n };\n return a.Consumer = a;\n },\n forwardRef: function forwardRef(a) {\n return {\n $$typeof: y,\n render: a\n };\n },\n lazy: function lazy(a) {\n return {\n $$typeof: ba,\n _ctor: a,\n _status: -1,\n _result: null\n };\n },\n memo: function memo(a, b) {\n return {\n $$typeof: aa,\n type: a,\n compare: void 0 === b ? null : b\n };\n },\n useCallback: function useCallback(a, b) {\n return W().useCallback(a, b);\n },\n useContext: function useContext(a, b) {\n return W().useContext(a, b);\n },\n useEffect: function useEffect(a, b) {\n return W().useEffect(a, b);\n },\n useImperativeHandle: function useImperativeHandle(a, b, d) {\n return W().useImperativeHandle(a, b, d);\n },\n useDebugValue: function useDebugValue() {},\n useLayoutEffect: function useLayoutEffect(a, b) {\n return W().useLayoutEffect(a, b);\n },\n useMemo: function useMemo(a, b) {\n return W().useMemo(a, b);\n },\n useReducer: function useReducer(a, b, d) {\n return W().useReducer(a, b, d);\n },\n useRef: function useRef(a) {\n return W().useRef(a);\n },\n useState: function useState(a) {\n return W().useState(a);\n },\n Fragment: r,\n StrictMode: t,\n Suspense: z,\n createElement: M,\n cloneElement: function cloneElement(a, b, d) {\n null === a || void 0 === a ? B(\"267\", a) : void 0;\n var c = void 0,\n e = k({}, a.props),\n g = a.key,\n h = a.ref,\n f = a._owner;\n\n if (null != b) {\n void 0 !== b.ref && (h = b.ref, f = J.current);\n void 0 !== b.key && (g = \"\" + b.key);\n var l = void 0;\n a.type && a.type.defaultProps && (l = a.type.defaultProps);\n\n for (c in b) {\n K.call(b, c) && !L.hasOwnProperty(c) && (e[c] = void 0 === b[c] && void 0 !== l ? l[c] : b[c]);\n }\n }\n\n c = arguments.length - 2;\n if (1 === c) e.children = d;else if (1 < c) {\n l = Array(c);\n\n for (var m = 0; m < c; m++) {\n l[m] = arguments[m + 2];\n }\n\n e.children = l;\n }\n return {\n $$typeof: p,\n type: a.type,\n key: g,\n ref: h,\n props: e,\n _owner: f\n };\n },\n createFactory: function createFactory(a) {\n var b = M.bind(null, a);\n b.type = a;\n return b;\n },\n isValidElement: N,\n version: \"16.8.6\",\n unstable_ConcurrentMode: x,\n unstable_Profiler: u,\n __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {\n ReactCurrentDispatcher: I,\n ReactCurrentOwner: J,\n assign: k\n }\n},\n Y = {\n default: X\n},\n Z = Y && X || Y;\nmodule.exports = Z.default || Z;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n'use strict';\n/* eslint-disable no-unused-vars */\n\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n if (val === null || val === undefined) {\n throw new TypeError('Object.assign cannot be called with null or undefined');\n }\n\n return Object(val);\n}\n\nfunction shouldUseNative() {\n try {\n if (!Object.assign) {\n return false;\n } // Detect buggy property enumeration order in older V8 versions.\n // https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\n\n var test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\n test1[5] = 'de';\n\n if (Object.getOwnPropertyNames(test1)[0] === '5') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test2 = {};\n\n for (var i = 0; i < 10; i++) {\n test2['_' + String.fromCharCode(i)] = i;\n }\n\n var order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n return test2[n];\n });\n\n if (order2.join('') !== '0123456789') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test3 = {};\n 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n test3[letter] = letter;\n });\n\n if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {\n return false;\n }\n\n return true;\n } catch (err) {\n // We don't expect any of the above to throw, but better to be safe.\n return false;\n }\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n var from;\n var to = toObject(target);\n var symbols;\n\n for (var s = 1; s < arguments.length; s++) {\n from = Object(arguments[s]);\n\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n\n if (getOwnPropertySymbols) {\n symbols = getOwnPropertySymbols(from);\n\n for (var i = 0; i < symbols.length; i++) {\n if (propIsEnumerable.call(from, symbols[i])) {\n to[symbols[i]] = from[symbols[i]];\n }\n }\n }\n }\n\n return to;\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\n\nmodule.exports = function () {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n\n var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n ;\n shim.isRequired = shim;\n\n function getShim() {\n return shim;\n }\n\n ; // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n return ReactPropTypes;\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\nmodule.exports = ReactPropTypesSecret;","export const parseProps = props => ({\r\n ...props,\r\n theme: `simple-keyboard ${props.theme || \"hg-theme-default\"}`\r\n});\r\n","import React, { Component } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport Keyboard from \"simple-keyboard\";\r\nimport { parseProps } from \"../services/Utilities\";\r\nimport \"simple-keyboard/build/css/index.css\";\r\n\r\nclass KeyboardReact extends Component {\r\n baseClassDefault = \"react-simple-keyboard\";\r\n\r\n componentDidMount = () => {\r\n const { props, getCssBaseClass } = this;\r\n const cssClass = getCssBaseClass();\r\n\r\n this.keyboard = new Keyboard(`.${cssClass}`, {\r\n ...parseProps(props)\r\n });\r\n };\r\n\r\n shouldComponentUpdate(nextProps, nextState) {\r\n if (this.props.stateToIgnore !== nextProps.stateToIgnore) return false;\r\n else return true;\r\n }\r\n\r\n componentWillReceiveProps = nextProps =>\r\n this.keyboard.setOptions(parseProps(nextProps));\r\n\r\n getCssBaseClass = () => this.props.baseClass || this.baseClassDefault;\r\n\r\n render() {\r\n const { getCssBaseClass } = this;\r\n return
;\r\n }\r\n}\r\n\r\nKeyboardReact.propTypes = {\r\n stateToIgnore: PropTypes.any\r\n};\r\n\r\nexport default KeyboardReact;\r\n","import Keyboard from \"./components/Keyboard\";\r\n\r\nexport default Keyboard;\r\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["../../webpack/universalModuleDefinition","../../webpack/bootstrap","../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/typeof.js","../../node_modules/react/index.js","../../node_modules/prop-types/index.js","../../node_modules/simple-keyboard/build/index.js","../../node_modules/react/cjs/react.production.min.js","../../node_modules/object-assign/index.js","../../node_modules/prop-types/factoryWithThrowingShims.js","../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../node_modules/webpack/buildin/module.js","services/Utilities.js","components/Keyboard.js","index.js"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","_typeof2","obj","iterator","constructor","_typeof","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","e","default","length","configurable","writable","TypeError","this","simpleKeyboardInstance","initKeyboardListener","getSimpleKeyboardLayoutKey","document","addEventListener","options","physicalKeyboardHighlight","dispatch","getButtonElement","concat","style","backgroundColor","physicalKeyboardHighlightBgColor","color","physicalKeyboardHighlightTextColor","removeAttribute","code","includes","toUpperCase","Number","isInteger","toLowerCase","a","shift","u","bindMethods","getOwnPropertyNames","next","done","return","replace","{bksp}","{backspace}","{enter}","{shift}","{shiftleft}","{shiftright}","{alt}","{s}","{tab}","{lock}","{capslock}","{accept}","{space}","{//}","{esc}","{escape}","{f1}","{f2}","{f3}","{f4}","{f5}","{f6}","{f7}","{f8}","{f9}","{f10}","{f11}","{f12}","{numpaddivide}","{numlock}","{arrowup}","{arrowleft}","{arrowdown}","{arrowright}","{prtscr}","{scrolllock}","{pause}","{insert}","{home}","{pageup}","{delete}","{end}","{pagedown}","{numpadmultiply}","{numpadsubtract}","{numpadadd}","{numpadenter}","{period}","{numpaddecimal}","{numpad0}","{numpad1}","{numpad2}","{numpad3}","{numpad4}","{numpad5}","{numpad6}","{numpad7}","{numpad8}","{numpad9}","assign","getDefaultDiplay","removeAt","addStringAt","tabCharOnTab","newLineOnEnter","updateCaretPosAction","syncInstanceInputs","caretPosition","debug","console","log","keyboardDOMClass","slice","join","isMaxLengthReached","updateCaretPos","substring","match","substr","maxLength","inputName","maxLengthReached","Boolean","navigator","maxTouchPoints","PointerEvent","trim","split","reduce","h","registerModule","arguments","utilities","keyboardDOM","querySelector","layoutName","theme","preventMouseDownDefault","keyboardPluginClasses","input","buttonElements","warn","Error","render","SimpleKeyboardInstances","camelCase","physicalKeyboardInterface","loadModules","onKeyPress","getUpdatedInput","inputPattern","inputPatternIsValid","handleMaxLength","onChange","onChangeAll","preventDefault","stopMouseDownPropagation","stopPropagation","isMouseHold","holdInteractionTimeout","clearTimeout","holdTimeout","setTimeout","handleButtonHold","handleButtonClicked","replaceInput","onSetOptions","innerHTML","className","keys","forEach","buttonTheme","map","class","buttons","push","Array","isArray","filter","splice","RegExp","test","caretEventHandler","target","tagName","disableCaretPositioning","selectionStart","countInArray","processAutoTouchEvents","disableContextualWindow","oncontextmenu","classList","contains","autoUseTouchEvents","useTouchEvents","handleCaret","onInit","isTouchDevice","onTouchDeviceDetected","beforeFirstRender","pointerEventsSupported","useMouseEvents","beforeRender","onRender","onModulesLoaded","init","from","children","createElement","setAttribute","appendChild","clear","initialized","layout","getDefaultLayout","disableRowButtonContainers","getButtonTheme","getButtonClass","f","y","getButtonDisplayName","display","mergeDisplay","useButtonTag","b","ontouchstart","handleButtonMouseDown","ontouchend","handleButtonMouseUp","ontouchcancel","onclick","onmousedown","onpointerdown","onpointerup","onpointercancel","v","g","parseRowDOMContainers","onmouseup","undefined","apply","k","for","q","w","x","z","aa","ba","A","B","encodeURIComponent","framesToPop","ca","C","isMounted","enqueueForceUpdate","enqueueReplaceState","enqueueSetState","D","E","props","context","refs","updater","F","G","isReactComponent","setState","forceUpdate","H","isPureReactComponent","I","current","J","K","L","ref","__self","__source","M","defaultProps","$$typeof","type","_owner","N","O","P","Q","pop","result","keyPrefix","func","count","R","U","S","T","=",":","escape","toString","ea","fa","V","da","W","X","Children","toArray","only","createRef","Component","PureComponent","createContext","_calculateChangedBits","_currentValue","_currentValue2","_threadCount","Provider","Consumer","_context","forwardRef","lazy","_ctor","_status","_result","memo","compare","useCallback","useContext","useEffect","useImperativeHandle","useDebugValue","useLayoutEffect","useMemo","useReducer","useRef","useState","Fragment","StrictMode","Suspense","cloneElement","createFactory","isValidElement","version","unstable_ConcurrentMode","unstable_Profiler","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentDispatcher","ReactCurrentOwner","Y","Z","getOwnPropertySymbols","propIsEnumerable","propertyIsEnumerable","test1","String","test2","fromCharCode","test3","letter","err","shouldUseNative","source","symbols","to","val","toObject","ReactPropTypesSecret","emptyFunction","shim","propName","componentName","location","propFullName","secret","getShim","isRequired","ReactPropTypes","array","bool","number","string","symbol","any","arrayOf","element","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","webpackPolyfill","deprecate","paths","parseProps","_objectSpread","KeyboardReact","_assertThisInitialize","_assertThisInitialized","_this","cssClass","getCssBaseClass","keyboard","Keyboard","Keyboard_objectSpread","nextProps","setOptions","baseClass","baseClassDefault","nextState","stateToIgnore","react_default","propTypes"],"mappings":";;;;;;;;;;;CAAA,SAAAA,EAAAC,GACA,kBAAAC,SAAA,kBAAAC,OACAA,OAAAD,QAAAD,IACA,oBAAAG,eAAAC,IACAD,OAAA,yBAAAH,GACA,kBAAAC,QACAA,QAAA,oBAAAD,IAEAD,EAAA,oBAAAC,IARA,CASCK,OAAA,WACD,mBCTA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAP,QAGA,IAAAC,EAAAI,EAAAE,GAAA,CACAC,EAAAD,EACAE,GAAA,EACAT,QAAA,IAUA,OANAU,EAAAH,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAQ,GAAA,EAGAR,EAAAD,QA0DA,OArDAM,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAd,EAAAe,EAAAC,GACAV,EAAAW,EAAAjB,EAAAe,IACAG,OAAAC,eAAAnB,EAAAe,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CV,EAAAgB,EAAA,SAAAtB,GACA,qBAAAuB,eAAAC,aACAN,OAAAC,eAAAnB,EAAAuB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAnB,EAAA,cAAiDyB,OAAA,KAQjDnB,EAAAoB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAAnB,EAAAmB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,kBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFAxB,EAAAgB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,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,WAAA5P,EAAA4P,SAAA,IACA3O,OAAAC,eAAAlB,EAAA,UACAmB,YAAA,EACAC,IAAA,WACA,OAAApB,EAAAQ,KAGAS,OAAAC,eAAAlB,EAAA,MACAmB,YAAA,EACAC,IAAA,WACA,OAAApB,EAAAO,KAGAP,EAAA0b,gBAAA,GAGA1b,sOCtBO,IAAM6b,EAAa,SAAA3I,GAAK,0UAAA4I,CAAA,GAC1B5I,EAD0B,CAE7B7H,MAAK,mBAAAtH,OAAqBmP,EAAM7H,OAAS,+3BCIrC0Q,2VACe,oDAEC,WAAM,IAAAC,EAAAC,EAAAC,GAChBhJ,EADgB8I,EAChB9I,MACFiJ,GAAWC,EAFOJ,EACTI,mBAGfF,EAAKG,SAAW,IAAIC,IAAJ,IAAAvY,OAAiBoY,sUAAjBI,CAAA,GACXV,EAAW3I,0CASU,SAAAsJ,GAAS,OACnCN,EAAKG,SAASI,WAAWZ,EAAWW,+BAEpB,kBAAMN,EAAKhJ,MAAMwJ,WAAaR,EAAKS,4QApB3BtG,oEAYJmG,EAAWI,GAC/B,OAAIvZ,KAAK6P,MAAM2J,gBAAkBL,EAAUK,+CASpC,IACCT,EAAoB/Y,KAApB+Y,gBACR,OAAOU,EAAAlY,EAAAiL,cAAA,OAAKxC,UAAS,GAAAtJ,OAAKqY,4CAI9BL,EAAcgB,UAAY,CACxBF,cAAepB,IAAUX,KAGZiB,QCpCAO","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"ReactSimpleKeyboard\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactSimpleKeyboard\"] = factory();\n\telse\n\t\troot[\"ReactSimpleKeyboard\"] = factory();\n})(window, function() {\nreturn "," \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, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\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\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}","var _typeof = require(\"X:\\\\Dev\\\\react-simple-keyboard\\\\node_modules\\\\babel-preset-react-app\\\\node_modules\\\\@babel\\\\runtime/helpers/typeof\");\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element') || 0xeac7;\n\n var isValidElement = function isValidElement(object) {\n return _typeof(object) === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }; // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n\n\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}","var _typeof = require(\"X:\\\\Dev\\\\react-simple-keyboard\\\\node_modules\\\\babel-preset-react-app\\\\node_modules\\\\@babel\\\\runtime/helpers/typeof\");\n\n/*!\n * \n * simple-keyboard v2.21.0\n * https://github.com/hodgef/simple-keyboard\n * \n * Copyright (c) Francisco Hodge (https://github.com/hodgef)\n * \n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n * \n */\n!function (t, e) {\n \"object\" === (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) && \"object\" === (typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) ? module.exports = e() : \"function\" === typeof define && define.amd ? define(\"SimpleKeyboard\", [], e) : \"object\" === (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) ? exports.SimpleKeyboard = e() : t.SimpleKeyboard = e();\n}(window, function () {\n return function (t) {\n var e = {};\n\n function n(o) {\n if (e[o]) return e[o].exports;\n var i = e[o] = {\n i: o,\n l: !1,\n exports: {}\n };\n return t[o].call(i.exports, i, i.exports, n), i.l = !0, i.exports;\n }\n\n return n.m = t, n.c = e, n.d = function (t, e, o) {\n n.o(t, e) || Object.defineProperty(t, e, {\n enumerable: !0,\n get: o\n });\n }, n.r = function (t) {\n \"undefined\" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(t, \"__esModule\", {\n value: !0\n });\n }, n.t = function (t, e) {\n if (1 & e && (t = n(t)), 8 & e) return t;\n if (4 & e && \"object\" === _typeof(t) && t && t.__esModule) return t;\n var o = Object.create(null);\n if (n.r(o), Object.defineProperty(o, \"default\", {\n enumerable: !0,\n value: t\n }), 2 & e && \"string\" != typeof t) for (var i in t) {\n n.d(o, i, function (e) {\n return t[e];\n }.bind(null, i));\n }\n return o;\n }, n.n = function (t) {\n var e = t && t.__esModule ? function () {\n return t.default;\n } : function () {\n return t;\n };\n return n.d(e, \"a\", e), e;\n }, n.o = function (t, e) {\n return Object.prototype.hasOwnProperty.call(t, e);\n }, n.p = \"\", n(n.s = 0);\n }([function (t, e, n) {\n t.exports = n(2);\n }, function (t, e, n) {}, function (t, e, n) {\n \"use strict\";\n\n n.r(e);\n n(1);\n\n function o(t, e) {\n for (var n = 0; n < e.length; n++) {\n var o = e[n];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);\n }\n }\n\n var i = function () {\n function t(e) {\n !function (t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, t), this.simpleKeyboardInstance = e, this.initKeyboardListener = this.initKeyboardListener.bind(this), this.getSimpleKeyboardLayoutKey = this.getSimpleKeyboardLayoutKey.bind(this), this.initKeyboardListener();\n }\n\n var e, n, i;\n return e = t, (n = [{\n key: \"initKeyboardListener\",\n value: function value() {\n var t = this;\n document.addEventListener(\"keydown\", function (e) {\n if (t.simpleKeyboardInstance.options.physicalKeyboardHighlight) {\n var n = t.getSimpleKeyboardLayoutKey(e);\n t.simpleKeyboardInstance.dispatch(function (e) {\n var o = e.getButtonElement(n) || e.getButtonElement(\"{\".concat(n, \"}\"));\n o && (o.style.backgroundColor = t.simpleKeyboardInstance.options.physicalKeyboardHighlightBgColor || \"#9ab4d0\", o.style.color = t.simpleKeyboardInstance.options.physicalKeyboardHighlightTextColor || \"white\");\n });\n }\n }), document.addEventListener(\"keyup\", function (e) {\n if (t.simpleKeyboardInstance.options.physicalKeyboardHighlight) {\n var n = t.getSimpleKeyboardLayoutKey(e);\n t.simpleKeyboardInstance.dispatch(function (t) {\n var e = t.getButtonElement(n) || t.getButtonElement(\"{\".concat(n, \"}\"));\n e && e.removeAttribute && e.removeAttribute(\"style\");\n });\n }\n });\n }\n }, {\n key: \"getSimpleKeyboardLayoutKey\",\n value: function value(t) {\n var e;\n return ((e = t.code.includes(\"Numpad\") || t.code.includes(\"Shift\") || t.code.includes(\"Space\") || t.code.includes(\"Backspace\") || t.code.includes(\"Control\") || t.code.includes(\"Alt\") || t.code.includes(\"Meta\") ? t.code : t.key) !== e.toUpperCase() || \"F\" === t.code[0] && Number.isInteger(Number(t.code[1])) && t.code.length <= 3) && (e = e.toLowerCase()), e;\n }\n }]) && o(e.prototype, n), i && o(e, i), t;\n }();\n\n function s(t, e) {\n for (var n = 0; n < e.length; n++) {\n var o = e[n];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);\n }\n }\n\n var a = function () {\n function t() {\n !function (t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, t);\n }\n\n var e, n, o;\n return e = t, o = [{\n key: \"getDefaultLayout\",\n value: function value() {\n return {\n default: [\"` 1 2 3 4 5 6 7 8 9 0 - = {bksp}\", \"{tab} q w e r t y u i o p [ ] \\\\\", \"{lock} a s d f g h j k l ; ' {enter}\", \"{shift} z x c v b n m , . / {shift}\", \".com @ {space}\"],\n shift: [\"~ ! @ # $ % ^ & * ( ) _ + {bksp}\", \"{tab} Q W E R T Y U I O P { } |\", '{lock} A S D F G H J K L : \" {enter}', \"{shift} Z X C V B N M < > ? {shift}\", \".com @ {space}\"]\n };\n }\n }], (n = null) && s(e.prototype, n), o && s(e, o), t;\n }();\n\n function u(t) {\n return (u = \"function\" === typeof Symbol && \"symbol\" === _typeof(Symbol.iterator) ? function (t) {\n return _typeof(t);\n } : function (t) {\n return t && \"function\" === typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? \"symbol\" : _typeof(t);\n })(t);\n }\n\n function r(t, e) {\n for (var n = 0; n < e.length; n++) {\n var o = e[n];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);\n }\n }\n\n var c = function () {\n function t(e) {\n !function (t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, t), this.simpleKeyboardInstance = e, t.bindMethods(t, this);\n }\n\n var e, n, o;\n return e = t, o = [{\n key: \"bindMethods\",\n value: function value(t, e) {\n var n = !0,\n o = !1,\n i = void 0;\n\n try {\n for (var s, a = Object.getOwnPropertyNames(t.prototype)[Symbol.iterator](); !(n = (s = a.next()).done); n = !0) {\n var u = s.value;\n \"constructor\" === u || \"bindMethods\" === u || (e[u] = e[u].bind(e));\n }\n } catch (r) {\n o = !0, i = r;\n } finally {\n try {\n n || null == a.return || a.return();\n } finally {\n if (o) throw i;\n }\n }\n }\n }], (n = [{\n key: \"getButtonClass\",\n value: function value(t) {\n var e = t.includes(\"{\") && t.includes(\"}\") && \"{//}\" !== t ? \"functionBtn\" : \"standardBtn\",\n n = t.replace(\"{\", \"\").replace(\"}\", \"\"),\n o = \"\";\n return \"standardBtn\" !== e && (o = \" hg-button-\".concat(n)), \"hg-\".concat(e).concat(o);\n }\n }, {\n key: \"getDefaultDiplay\",\n value: function value() {\n return {\n \"{bksp}\": \"backspace\",\n \"{backspace}\": \"backspace\",\n \"{enter}\": \"< enter\",\n \"{shift}\": \"shift\",\n \"{shiftleft}\": \"shift\",\n \"{shiftright}\": \"shift\",\n \"{alt}\": \"alt\",\n \"{s}\": \"shift\",\n \"{tab}\": \"tab\",\n \"{lock}\": \"caps\",\n \"{capslock}\": \"caps\",\n \"{accept}\": \"Submit\",\n \"{space}\": \" \",\n \"{//}\": \" \",\n \"{esc}\": \"esc\",\n \"{escape}\": \"esc\",\n \"{f1}\": \"f1\",\n \"{f2}\": \"f2\",\n \"{f3}\": \"f3\",\n \"{f4}\": \"f4\",\n \"{f5}\": \"f5\",\n \"{f6}\": \"f6\",\n \"{f7}\": \"f7\",\n \"{f8}\": \"f8\",\n \"{f9}\": \"f9\",\n \"{f10}\": \"f10\",\n \"{f11}\": \"f11\",\n \"{f12}\": \"f12\",\n \"{numpaddivide}\": \"/\",\n \"{numlock}\": \"lock\",\n \"{arrowup}\": \"\\u2191\",\n \"{arrowleft}\": \"\\u2190\",\n \"{arrowdown}\": \"\\u2193\",\n \"{arrowright}\": \"\\u2192\",\n \"{prtscr}\": \"print\",\n \"{scrolllock}\": \"scroll\",\n \"{pause}\": \"pause\",\n \"{insert}\": \"ins\",\n \"{home}\": \"home\",\n \"{pageup}\": \"up\",\n \"{delete}\": \"del\",\n \"{end}\": \"end\",\n \"{pagedown}\": \"down\",\n \"{numpadmultiply}\": \"*\",\n \"{numpadsubtract}\": \"-\",\n \"{numpadadd}\": \"+\",\n \"{numpadenter}\": \"enter\",\n \"{period}\": \".\",\n \"{numpaddecimal}\": \".\",\n \"{numpad0}\": \"0\",\n \"{numpad1}\": \"1\",\n \"{numpad2}\": \"2\",\n \"{numpad3}\": \"3\",\n \"{numpad4}\": \"4\",\n \"{numpad5}\": \"5\",\n \"{numpad6}\": \"6\",\n \"{numpad7}\": \"7\",\n \"{numpad8}\": \"8\",\n \"{numpad9}\": \"9\"\n };\n }\n }, {\n key: \"getButtonDisplayName\",\n value: function value(t, e, n) {\n return (e = n ? Object.assign({}, this.getDefaultDiplay(), e) : e || this.getDefaultDiplay())[t] || t;\n }\n }, {\n key: \"getUpdatedInput\",\n value: function value(t, e, n, o, i) {\n var s = e;\n return (\"{bksp}\" === t || \"{backspace}\" === t) && s.length > 0 ? s = this.removeAt(s, o, i) : \"{space}\" === t ? s = this.addStringAt(s, \" \", o, i) : \"{tab}\" !== t || \"boolean\" === typeof n.tabCharOnTab && !1 === n.tabCharOnTab ? \"{enter}\" !== t && \"{numpadenter}\" !== t || !n.newLineOnEnter ? t.includes(\"numpad\") && Number.isInteger(Number(t[t.length - 2])) ? s = this.addStringAt(s, t[t.length - 2], o, i) : \"{numpaddivide}\" === t ? s = this.addStringAt(s, \"/\", o, i) : \"{numpadmultiply}\" === t ? s = this.addStringAt(s, \"*\", o, i) : \"{numpadsubtract}\" === t ? s = this.addStringAt(s, \"-\", o, i) : \"{numpadadd}\" === t ? s = this.addStringAt(s, \"+\", o, i) : \"{numpaddecimal}\" === t ? s = this.addStringAt(s, \".\", o, i) : \"{\" === t || \"}\" === t ? s = this.addStringAt(s, t, o, i) : t.includes(\"{\") || t.includes(\"}\") || (s = this.addStringAt(s, t, o, i)) : s = this.addStringAt(s, \"\\n\", o, i) : s = this.addStringAt(s, \"\\t\", o, i), s;\n }\n }, {\n key: \"updateCaretPos\",\n value: function value(t, e) {\n var n = this.updateCaretPosAction(this.simpleKeyboardInstance, t, e);\n this.simpleKeyboardInstance.options.syncInstanceInputs && this.simpleKeyboardInstance.dispatch(function (t) {\n t.caretPosition = n;\n });\n }\n }, {\n key: \"updateCaretPosAction\",\n value: function value(t, e, n) {\n return n ? t.caretPosition > 0 && (t.caretPosition = t.caretPosition - e) : t.caretPosition = t.caretPosition + e, this.simpleKeyboardInstance.options.debug && console.log(\"Caret at:\", t.caretPosition, \"(\".concat(t.keyboardDOMClass, \")\")), t.caretPosition;\n }\n }, {\n key: \"addStringAt\",\n value: function value(t, e, n, o) {\n var i;\n return n || 0 === n ? (i = [t.slice(0, n), e, t.slice(n)].join(\"\"), this.isMaxLengthReached() || o && this.updateCaretPos(e.length)) : i = t + e, i;\n }\n }, {\n key: \"removeAt\",\n value: function value(t, e, n) {\n if (0 === this.simpleKeyboardInstance.caretPosition) return t;\n var o,\n i = /([\\uD800-\\uDBFF][\\uDC00-\\uDFFF])/g;\n return e && e >= 0 ? t.substring(e - 2, e).match(i) ? (o = t.substr(0, e - 2) + t.substr(e), n && this.updateCaretPos(2, !0)) : (o = t.substr(0, e - 1) + t.substr(e), n && this.updateCaretPos(1, !0)) : t.slice(-2).match(i) ? (o = t.slice(0, -2), n && this.updateCaretPos(2, !0)) : (o = t.slice(0, -1), n && this.updateCaretPos(1, !0)), o;\n }\n }, {\n key: \"handleMaxLength\",\n value: function value(t, e, n) {\n var o = e.maxLength,\n i = t[e.inputName],\n s = i.length === o;\n if (n.length <= i.length) return !1;\n if (Number.isInteger(o)) return e.debug && console.log(\"maxLength (num) reached:\", s), s ? (this.maxLengthReached = !0, !0) : (this.maxLengthReached = !1, !1);\n\n if (\"object\" === u(o)) {\n var a = i.length === o[e.inputName];\n return e.debug && console.log(\"maxLength (obj) reached:\", a), a ? (this.maxLengthReached = !0, !0) : (this.maxLengthReached = !1, !1);\n }\n }\n }, {\n key: \"isMaxLengthReached\",\n value: function value() {\n return Boolean(this.maxLengthReached);\n }\n }, {\n key: \"isTouchDevice\",\n value: function value() {\n return \"ontouchstart\" in window || navigator.maxTouchPoints;\n }\n }, {\n key: \"pointerEventsSupported\",\n value: function value() {\n return window.PointerEvent;\n }\n }, {\n key: \"camelCase\",\n value: function value(t) {\n return t.toLowerCase().trim().split(/[.\\-_\\s]/g).reduce(function (t, e) {\n return e.length ? t + e[0].toUpperCase() + e.slice(1) : t;\n });\n }\n }, {\n key: \"countInArray\",\n value: function value(t, e) {\n return t.reduce(function (t, n) {\n return t + (n === e);\n }, 0);\n }\n }]) && r(e.prototype, n), o && r(e, o), t;\n }();\n\n function l(t) {\n return (l = \"function\" === typeof Symbol && \"symbol\" === _typeof(Symbol.iterator) ? function (t) {\n return _typeof(t);\n } : function (t) {\n return t && \"function\" === typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? \"symbol\" : _typeof(t);\n })(t);\n }\n\n function h(t, e) {\n for (var n = 0; n < e.length; n++) {\n var o = e[n];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);\n }\n }\n\n var d = function () {\n function t() {\n var e = this;\n !function (t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, t), this.registerModule = function (t, n) {\n e.modules[t] || (e.modules[t] = {}), n(e.modules[t]);\n };\n var n = \"string\" === typeof (arguments.length <= 0 ? void 0 : arguments[0]) ? arguments.length <= 0 ? void 0 : arguments[0] : \".simple-keyboard\",\n o = \"object\" === l(arguments.length <= 0 ? void 0 : arguments[0]) ? arguments.length <= 0 ? void 0 : arguments[0] : arguments.length <= 1 ? void 0 : arguments[1];\n if (o || (o = {}), this.utilities = new c(this), this.keyboardDOM = document.querySelector(n), this.options = o, this.options.layoutName = this.options.layoutName || \"default\", this.options.theme = this.options.theme || \"hg-theme-default\", this.options.inputName = this.options.inputName || \"default\", this.options.preventMouseDownDefault = this.options.preventMouseDownDefault || !1, this.keyboardPluginClasses = \"\", c.bindMethods(t, this), this.input = {}, this.input[this.options.inputName] = \"\", this.keyboardDOMClass = n.split(\".\").join(\"\"), this.buttonElements = {}, !this.keyboardDOM) throw console.warn('\"'.concat(n, '\" was not found in the DOM.')), new Error(\"KEYBOARD_DOM_ERROR\");\n this.render(), window.SimpleKeyboardInstances || (window.SimpleKeyboardInstances = {}), window.SimpleKeyboardInstances[this.utilities.camelCase(this.keyboardDOMClass)] = this, this.physicalKeyboardInterface = new i(this), this.modules = {}, this.loadModules();\n }\n\n var e, n, o;\n return e = t, (n = [{\n key: \"handleButtonClicked\",\n value: function value(t) {\n var e = this.options.debug;\n if (\"{//}\" === t) return !1;\n \"function\" === typeof this.options.onKeyPress && this.options.onKeyPress(t), this.input[this.options.inputName] || (this.input[this.options.inputName] = \"\");\n var n = this.utilities.getUpdatedInput(t, this.input[this.options.inputName], this.options, this.caretPosition);\n\n if (this.input[this.options.inputName] !== n && (!this.options.inputPattern || this.options.inputPattern && this.inputPatternIsValid(n))) {\n if (this.options.maxLength && this.utilities.handleMaxLength(this.input, this.options, n)) return !1;\n this.input[this.options.inputName] = this.utilities.getUpdatedInput(t, this.input[this.options.inputName], this.options, this.caretPosition, !0), e && console.log(\"Input changed:\", this.input), this.options.syncInstanceInputs && this.syncInstanceInputs(this.input), \"function\" === typeof this.options.onChange && this.options.onChange(this.input[this.options.inputName]), \"function\" === typeof this.options.onChangeAll && this.options.onChangeAll(this.input);\n }\n\n e && console.log(\"Key pressed:\", t);\n }\n }, {\n key: \"handleButtonMouseDown\",\n value: function value(t, e) {\n var n = this;\n this.options.preventMouseDownDefault && e.preventDefault(), this.options.stopMouseDownPropagation && e.stopPropagation(), this.isMouseHold = !0, this.holdInteractionTimeout && clearTimeout(this.holdInteractionTimeout), this.holdTimeout && clearTimeout(this.holdTimeout), this.holdTimeout = setTimeout(function () {\n !n.isMouseHold || (t.includes(\"{\") || t.includes(\"}\")) && \"{delete}\" !== t && \"{backspace}\" !== t && \"{bksp}\" !== t && \"{space}\" !== t && \"{tab}\" !== t || (n.options.debug && console.log(\"Button held:\", t), n.handleButtonHold(t, e)), clearTimeout(n.holdTimeout);\n }, 500);\n }\n }, {\n key: \"handleButtonMouseUp\",\n value: function value() {\n this.isMouseHold = !1, this.holdInteractionTimeout && clearTimeout(this.holdInteractionTimeout);\n }\n }, {\n key: \"handleButtonHold\",\n value: function value(t) {\n var e = this;\n this.holdInteractionTimeout && clearTimeout(this.holdInteractionTimeout), this.holdInteractionTimeout = setTimeout(function () {\n e.isMouseHold ? (e.handleButtonClicked(t), e.handleButtonHold(t)) : clearTimeout(e.holdInteractionTimeout);\n }, 100);\n }\n }, {\n key: \"syncInstanceInputs\",\n value: function value() {\n var t = this;\n this.dispatch(function (e) {\n e.replaceInput(t.input), e.caretPosition = t.caretPosition;\n });\n }\n }, {\n key: \"clearInput\",\n value: function value(t) {\n t = t || this.options.inputName, this.input[t] = \"\", this.caretPosition = 0, this.options.syncInstanceInputs && this.syncInstanceInputs(this.input);\n }\n }, {\n key: \"getInput\",\n value: function value(t) {\n return t = t || this.options.inputName, this.options.syncInstanceInputs && this.syncInstanceInputs(this.input), this.input[t];\n }\n }, {\n key: \"setInput\",\n value: function value(t, e) {\n e = e || this.options.inputName, this.input[e] = t, this.options.syncInstanceInputs && this.syncInstanceInputs(this.input);\n }\n }, {\n key: \"replaceInput\",\n value: function value(t) {\n this.input = t;\n }\n }, {\n key: \"setOptions\",\n value: function value(t) {\n t = t || {}, this.options = Object.assign(this.options, t), this.onSetOptions(t), this.render();\n }\n }, {\n key: \"onSetOptions\",\n value: function value(t) {\n t.inputName && (this.options.debug && console.log(\"inputName changed. caretPosition reset.\"), this.caretPosition = null);\n }\n }, {\n key: \"clear\",\n value: function value() {\n this.keyboardDOM.innerHTML = \"\", this.keyboardDOM.className = this.keyboardDOMClass, this.buttonElements = {};\n }\n }, {\n key: \"dispatch\",\n value: function value(t) {\n if (!window.SimpleKeyboardInstances) throw console.warn(\"SimpleKeyboardInstances is not defined. Dispatch cannot be called.\"), new Error(\"INSTANCES_VAR_ERROR\");\n return Object.keys(window.SimpleKeyboardInstances).forEach(function (e) {\n t(window.SimpleKeyboardInstances[e], e);\n });\n }\n }, {\n key: \"addButtonTheme\",\n value: function value(t, e) {\n var n = this;\n if (!e || !t) return !1;\n t.split(\" \").forEach(function (o) {\n e.split(\" \").forEach(function (e) {\n n.options.buttonTheme || (n.options.buttonTheme = []);\n var i = !1;\n n.options.buttonTheme.map(function (t) {\n if (t.class.split(\" \").includes(e)) {\n i = !0;\n var n = t.buttons.split(\" \");\n n.includes(o) || (i = !0, n.push(o), t.buttons = n.join(\" \"));\n }\n\n return t;\n }), i || n.options.buttonTheme.push({\n class: e,\n buttons: t\n });\n });\n }), this.render();\n }\n }, {\n key: \"removeButtonTheme\",\n value: function value(t, e) {\n var n = this;\n if (!t && !e) return this.options.buttonTheme = [], this.render(), !1;\n t && Array.isArray(this.options.buttonTheme) && this.options.buttonTheme.length && (t.split(\" \").forEach(function (t, o) {\n n.options.buttonTheme.map(function (o, i) {\n if (e && e.includes(o.class) || !e) {\n var s = o.buttons.split(\" \").filter(function (e) {\n return e !== t;\n });\n s.length ? o.buttons = s.join(\" \") : (n.options.buttonTheme.splice(i, 1), o = null);\n }\n\n return o;\n });\n }), this.render());\n }\n }, {\n key: \"getButtonElement\",\n value: function value(t) {\n var e,\n n = this.buttonElements[t];\n return n && (e = n.length > 1 ? n : n[0]), e;\n }\n }, {\n key: \"inputPatternIsValid\",\n value: function value(t) {\n var e,\n n = this.options.inputPattern;\n\n if ((e = n instanceof RegExp ? n : n[this.options.inputName]) && t) {\n var o = e.test(t);\n return this.options.debug && console.log('inputPattern (\"'.concat(e, '\"): ').concat(o ? \"passed\" : \"did not pass!\")), o;\n }\n\n return !0;\n }\n }, {\n key: \"handleCaret\",\n value: function value() {\n this.caretPosition = null;\n var t = window.SimpleKeyboardInstances;\n (t && Object.keys(t)[0] === this.utilities.camelCase(this.keyboardDOMClass) || !t) && (this.options.debug && console.log(\"Caret handling started (\".concat(this.keyboardDOMClass, \")\")), document.addEventListener(\"keyup\", this.caretEventHandler), document.addEventListener(\"mouseup\", this.caretEventHandler), document.addEventListener(\"touchend\", this.caretEventHandler));\n }\n }, {\n key: \"caretEventHandler\",\n value: function value(t) {\n var e;\n t.target.tagName && (e = t.target.tagName.toLowerCase()), this.dispatch(function (n) {\n n.isMouseHold && (n.isMouseHold = !1), \"textarea\" !== e && \"input\" !== e || n.options.disableCaretPositioning ? n.options.disableCaretPositioning && (n.caretPosition = null) : (n.caretPosition = t.target.selectionStart, n.options.debug && console.log(\"Caret at: \", t.target.selectionStart, t.target.tagName.toLowerCase(), \"(\".concat(n.keyboardDOMClass, \")\")));\n });\n }\n }, {\n key: \"getButtonTheme\",\n value: function value() {\n var t = this,\n e = {};\n return this.options.buttonTheme.forEach(function (n) {\n var o;\n n.buttons && n.class ? (\"string\" === typeof n.buttons && (o = n.buttons.split(\" \")), o && o.forEach(function (o) {\n var i = e[o];\n i ? t.utilities.countInArray(i.split(\" \"), n.class) || (e[o] = \"\".concat(i, \" \").concat(n.class)) : e[o] = n.class;\n })) : console.warn('buttonTheme row is missing the \"buttons\" or the \"class\". Please check the documentation.');\n }), e;\n }\n }, {\n key: \"onTouchDeviceDetected\",\n value: function value() {\n this.processAutoTouchEvents(), this.disableContextualWindow();\n }\n }, {\n key: \"disableContextualWindow\",\n value: function value() {\n window.oncontextmenu = function (t) {\n if (t.target.classList.contains(\"hg-button\")) return t.preventDefault(), t.stopPropagation(), !1;\n };\n }\n }, {\n key: \"processAutoTouchEvents\",\n value: function value() {\n this.options.autoUseTouchEvents && (this.options.useTouchEvents = !0, this.options.debug && console.log(\"autoUseTouchEvents: Touch device detected, useTouchEvents enabled.\"));\n }\n }, {\n key: \"onInit\",\n value: function value() {\n this.options.debug && console.log(\"\".concat(this.keyboardDOMClass, \" Initialized\")), this.handleCaret(), \"function\" === typeof this.options.onInit && this.options.onInit();\n }\n }, {\n key: \"beforeFirstRender\",\n value: function value() {\n this.utilities.isTouchDevice() && this.onTouchDeviceDetected(), \"function\" === typeof this.options.beforeFirstRender && this.options.beforeFirstRender(), !this.utilities.pointerEventsSupported() || this.options.useTouchEvents || this.options.useMouseEvents || this.options.debug && console.log(\"Using PointerEvents as it is supported by this browser\"), this.options.useTouchEvents && this.options.debug && console.log(\"useTouchEvents has been enabled. Only touch events will be used.\");\n }\n }, {\n key: \"beforeRender\",\n value: function value() {\n \"function\" === typeof this.options.beforeRender && this.options.beforeRender();\n }\n }, {\n key: \"onRender\",\n value: function value() {\n \"function\" === typeof this.options.onRender && this.options.onRender();\n }\n }, {\n key: \"onModulesLoaded\",\n value: function value() {\n \"function\" === typeof this.options.onModulesLoaded && this.options.onModulesLoaded();\n }\n }, {\n key: \"loadModules\",\n value: function value() {\n var t = this;\n Array.isArray(this.options.modules) && (this.options.modules.forEach(function (e) {\n var n = new e();\n\n if (n.constructor.name && \"Function\" !== n.constructor.name) {\n var o = \"module-\".concat(t.utilities.camelCase(n.constructor.name));\n t.keyboardPluginClasses = t.keyboardPluginClasses + \" \".concat(o);\n }\n\n n.init(t);\n }), this.keyboardPluginClasses = this.keyboardPluginClasses + \" modules-loaded\", this.render(), this.onModulesLoaded());\n }\n }, {\n key: \"getModuleProp\",\n value: function value(t, e) {\n return !!this.modules[t] && this.modules[t][e];\n }\n }, {\n key: \"getModulesList\",\n value: function value() {\n return Object.keys(this.modules);\n }\n }, {\n key: \"parseRowDOMContainers\",\n value: function value(t, e, n, o) {\n var i = this,\n s = Array.from(t.children),\n a = 0;\n return s.length && n.forEach(function (n, u) {\n var r = o[u];\n if (!r || !(r > n)) return !1;\n var c = n - a,\n l = r - a,\n h = document.createElement(\"div\");\n h.className += \"hg-button-container\";\n var d = \"\".concat(i.options.layoutName, \"-r\").concat(e, \"c\").concat(u);\n h.setAttribute(\"data-skUID\", d);\n var p = s.splice(c, l - c + 1);\n a = l - c, p.forEach(function (t) {\n return h.appendChild(t);\n }), s.splice(c, 0, h), t.innerHTML = \"\", s.forEach(function (e) {\n return t.appendChild(e);\n }), i.options.debug && console.log(\"rowDOMContainer\", p, c, l, a + 1);\n }), t;\n }\n }, {\n key: \"render\",\n value: function value() {\n var t = this;\n this.clear(), this.initialized || this.beforeFirstRender(), this.beforeRender();\n var e = \"hg-layout-\".concat(this.options.layoutName),\n n = this.options.layout || a.getDefaultLayout(),\n o = this.options.useTouchEvents || !1,\n i = o ? \"hg-touch-events\" : \"\",\n s = this.options.useMouseEvents || !1,\n u = this.options.disableRowButtonContainers,\n r = Array.isArray(this.options.buttonTheme) ? this.getButtonTheme() : {};\n this.keyboardDOM.className += \" \".concat(this.options.theme, \" \").concat(e, \" \").concat(this.keyboardPluginClasses, \" \").concat(i), n[this.options.layoutName].forEach(function (e, n) {\n var i = e.split(\" \"),\n a = document.createElement(\"div\");\n a.className += \"hg-row\";\n var c = [],\n l = [];\n i.forEach(function (e, i) {\n var h = !u && e.includes(\"[\") && e.length > 1,\n d = !u && e.includes(\"]\") && e.length > 1;\n h && (c.push(i), e = e.replace(/\\[/g, \"\")), d && (l.push(i), e = e.replace(/\\]/g, \"\"));\n var p = t.utilities.getButtonClass(e),\n f = r[e],\n y = t.utilities.getButtonDisplayName(e, t.options.display, t.options.mergeDisplay),\n m = t.options.useButtonTag ? \"button\" : \"div\",\n b = document.createElement(m);\n b.className += \"hg-button \".concat(p).concat(f ? \" \" + f : \"\"), !t.utilities.pointerEventsSupported() || o || s ? o ? (b.ontouchstart = function (n) {\n t.handleButtonClicked(e), t.handleButtonMouseDown(e, n);\n }, b.ontouchend = function (e) {\n return t.handleButtonMouseUp();\n }, b.ontouchcancel = function (e) {\n return t.handleButtonMouseUp();\n }) : (b.onclick = function () {\n t.isMouseHold = !1, t.handleButtonClicked(e);\n }, b.onmousedown = function (n) {\n t.handleButtonMouseDown(e, n);\n }) : (b.onpointerdown = function (n) {\n t.handleButtonClicked(e), t.handleButtonMouseDown(e, n);\n }, b.onpointerup = function (e) {\n t.handleButtonMouseUp();\n }, b.onpointercancel = function (e) {\n return t.handleButtonMouseUp();\n }), b.setAttribute(\"data-skBtn\", e);\n var v = \"\".concat(t.options.layoutName, \"-r\").concat(n, \"b\").concat(i);\n b.setAttribute(\"data-skBtnUID\", v), b.setAttribute(\"data-displayLabel\", y);\n var g = document.createElement(\"span\");\n g.innerHTML = y, b.appendChild(g), t.buttonElements[e] || (t.buttonElements[e] = []), t.buttonElements[e].push(b), a.appendChild(b);\n }), a = t.parseRowDOMContainers(a, n, c, l), t.keyboardDOM.appendChild(a);\n }), this.onRender(), this.initialized || (this.initialized = !0, !this.utilities.pointerEventsSupported() || o || s ? o ? (document.ontouchend = function (e) {\n return t.handleButtonMouseUp();\n }, document.ontouchcancel = function (e) {\n return t.handleButtonMouseUp();\n }) : o || (document.onmouseup = function () {\n return t.handleButtonMouseUp();\n }) : document.onpointerup = function () {\n return t.handleButtonMouseUp();\n }, this.onInit());\n }\n }]) && h(e.prototype, n), o && h(e, o), t;\n }();\n\n e.default = d;\n }]);\n});","/** @license React v16.8.6\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar _typeof = require(\"X:\\\\Dev\\\\react-simple-keyboard\\\\node_modules\\\\babel-preset-react-app\\\\node_modules\\\\@babel\\\\runtime/helpers/typeof\");\n\nvar k = require(\"object-assign\"),\n n = \"function\" === typeof Symbol && Symbol.for,\n p = n ? Symbol.for(\"react.element\") : 60103,\n q = n ? Symbol.for(\"react.portal\") : 60106,\n r = n ? Symbol.for(\"react.fragment\") : 60107,\n t = n ? Symbol.for(\"react.strict_mode\") : 60108,\n u = n ? Symbol.for(\"react.profiler\") : 60114,\n v = n ? Symbol.for(\"react.provider\") : 60109,\n w = n ? Symbol.for(\"react.context\") : 60110,\n x = n ? Symbol.for(\"react.concurrent_mode\") : 60111,\n y = n ? Symbol.for(\"react.forward_ref\") : 60112,\n z = n ? Symbol.for(\"react.suspense\") : 60113,\n aa = n ? Symbol.for(\"react.memo\") : 60115,\n ba = n ? Symbol.for(\"react.lazy\") : 60116,\n A = \"function\" === typeof Symbol && Symbol.iterator;\n\nfunction ca(a, b, d, c, e, g, h, f) {\n if (!a) {\n a = void 0;\n if (void 0 === b) a = Error(\"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.\");else {\n var l = [d, c, e, g, h, f],\n m = 0;\n a = Error(b.replace(/%s/g, function () {\n return l[m++];\n }));\n a.name = \"Invariant Violation\";\n }\n a.framesToPop = 1;\n throw a;\n }\n}\n\nfunction B(a) {\n for (var b = arguments.length - 1, d = \"https://reactjs.org/docs/error-decoder.html?invariant=\" + a, c = 0; c < b; c++) {\n d += \"&args[]=\" + encodeURIComponent(arguments[c + 1]);\n }\n\n ca(!1, \"Minified React error #\" + a + \"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. \", d);\n}\n\nvar C = {\n isMounted: function isMounted() {\n return !1;\n },\n enqueueForceUpdate: function enqueueForceUpdate() {},\n enqueueReplaceState: function enqueueReplaceState() {},\n enqueueSetState: function enqueueSetState() {}\n},\n D = {};\n\nfunction E(a, b, d) {\n this.props = a;\n this.context = b;\n this.refs = D;\n this.updater = d || C;\n}\n\nE.prototype.isReactComponent = {};\n\nE.prototype.setState = function (a, b) {\n \"object\" !== _typeof(a) && \"function\" !== typeof a && null != a ? B(\"85\") : void 0;\n this.updater.enqueueSetState(this, a, b, \"setState\");\n};\n\nE.prototype.forceUpdate = function (a) {\n this.updater.enqueueForceUpdate(this, a, \"forceUpdate\");\n};\n\nfunction F() {}\n\nF.prototype = E.prototype;\n\nfunction G(a, b, d) {\n this.props = a;\n this.context = b;\n this.refs = D;\n this.updater = d || C;\n}\n\nvar H = G.prototype = new F();\nH.constructor = G;\nk(H, E.prototype);\nH.isPureReactComponent = !0;\nvar I = {\n current: null\n},\n J = {\n current: null\n},\n K = Object.prototype.hasOwnProperty,\n L = {\n key: !0,\n ref: !0,\n __self: !0,\n __source: !0\n};\n\nfunction M(a, b, d) {\n var c = void 0,\n e = {},\n g = null,\n h = null;\n if (null != b) for (c in void 0 !== b.ref && (h = b.ref), void 0 !== b.key && (g = \"\" + b.key), b) {\n K.call(b, c) && !L.hasOwnProperty(c) && (e[c] = b[c]);\n }\n var f = arguments.length - 2;\n if (1 === f) e.children = d;else if (1 < f) {\n for (var l = Array(f), m = 0; m < f; m++) {\n l[m] = arguments[m + 2];\n }\n\n e.children = l;\n }\n if (a && a.defaultProps) for (c in f = a.defaultProps, f) {\n void 0 === e[c] && (e[c] = f[c]);\n }\n return {\n $$typeof: p,\n type: a,\n key: g,\n ref: h,\n props: e,\n _owner: J.current\n };\n}\n\nfunction da(a, b) {\n return {\n $$typeof: p,\n type: a.type,\n key: b,\n ref: a.ref,\n props: a.props,\n _owner: a._owner\n };\n}\n\nfunction N(a) {\n return \"object\" === _typeof(a) && null !== a && a.$$typeof === p;\n}\n\nfunction escape(a) {\n var b = {\n \"=\": \"=0\",\n \":\": \"=2\"\n };\n return \"$\" + (\"\" + a).replace(/[=:]/g, function (a) {\n return b[a];\n });\n}\n\nvar O = /\\/+/g,\n P = [];\n\nfunction Q(a, b, d, c) {\n if (P.length) {\n var e = P.pop();\n e.result = a;\n e.keyPrefix = b;\n e.func = d;\n e.context = c;\n e.count = 0;\n return e;\n }\n\n return {\n result: a,\n keyPrefix: b,\n func: d,\n context: c,\n count: 0\n };\n}\n\nfunction R(a) {\n a.result = null;\n a.keyPrefix = null;\n a.func = null;\n a.context = null;\n a.count = 0;\n 10 > P.length && P.push(a);\n}\n\nfunction S(a, b, d, c) {\n var e = _typeof(a);\n\n if (\"undefined\" === e || \"boolean\" === e) a = null;\n var g = !1;\n if (null === a) g = !0;else switch (e) {\n case \"string\":\n case \"number\":\n g = !0;\n break;\n\n case \"object\":\n switch (a.$$typeof) {\n case p:\n case q:\n g = !0;\n }\n\n }\n if (g) return d(c, a, \"\" === b ? \".\" + T(a, 0) : b), 1;\n g = 0;\n b = \"\" === b ? \".\" : b + \":\";\n if (Array.isArray(a)) for (var h = 0; h < a.length; h++) {\n e = a[h];\n var f = b + T(e, h);\n g += S(e, f, d, c);\n } else if (null === a || \"object\" !== _typeof(a) ? f = null : (f = A && a[A] || a[\"@@iterator\"], f = \"function\" === typeof f ? f : null), \"function\" === typeof f) for (a = f.call(a), h = 0; !(e = a.next()).done;) {\n e = e.value, f = b + T(e, h++), g += S(e, f, d, c);\n } else \"object\" === e && (d = \"\" + a, B(\"31\", \"[object Object]\" === d ? \"object with keys {\" + Object.keys(a).join(\", \") + \"}\" : d, \"\"));\n return g;\n}\n\nfunction U(a, b, d) {\n return null == a ? 0 : S(a, \"\", b, d);\n}\n\nfunction T(a, b) {\n return \"object\" === _typeof(a) && null !== a && null != a.key ? escape(a.key) : b.toString(36);\n}\n\nfunction ea(a, b) {\n a.func.call(a.context, b, a.count++);\n}\n\nfunction fa(a, b, d) {\n var c = a.result,\n e = a.keyPrefix;\n a = a.func.call(a.context, b, a.count++);\n Array.isArray(a) ? V(a, c, d, function (a) {\n return a;\n }) : null != a && (N(a) && (a = da(a, e + (!a.key || b && b.key === a.key ? \"\" : (\"\" + a.key).replace(O, \"$&/\") + \"/\") + d)), c.push(a));\n}\n\nfunction V(a, b, d, c, e) {\n var g = \"\";\n null != d && (g = (\"\" + d).replace(O, \"$&/\") + \"/\");\n b = Q(b, g, c, e);\n U(a, fa, b);\n R(b);\n}\n\nfunction W() {\n var a = I.current;\n null === a ? B(\"321\") : void 0;\n return a;\n}\n\nvar X = {\n Children: {\n map: function map(a, b, d) {\n if (null == a) return a;\n var c = [];\n V(a, c, null, b, d);\n return c;\n },\n forEach: function forEach(a, b, d) {\n if (null == a) return a;\n b = Q(null, null, b, d);\n U(a, ea, b);\n R(b);\n },\n count: function count(a) {\n return U(a, function () {\n return null;\n }, null);\n },\n toArray: function toArray(a) {\n var b = [];\n V(a, b, null, function (a) {\n return a;\n });\n return b;\n },\n only: function only(a) {\n N(a) ? void 0 : B(\"143\");\n return a;\n }\n },\n createRef: function createRef() {\n return {\n current: null\n };\n },\n Component: E,\n PureComponent: G,\n createContext: function createContext(a, b) {\n void 0 === b && (b = null);\n a = {\n $$typeof: w,\n _calculateChangedBits: b,\n _currentValue: a,\n _currentValue2: a,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n a.Provider = {\n $$typeof: v,\n _context: a\n };\n return a.Consumer = a;\n },\n forwardRef: function forwardRef(a) {\n return {\n $$typeof: y,\n render: a\n };\n },\n lazy: function lazy(a) {\n return {\n $$typeof: ba,\n _ctor: a,\n _status: -1,\n _result: null\n };\n },\n memo: function memo(a, b) {\n return {\n $$typeof: aa,\n type: a,\n compare: void 0 === b ? null : b\n };\n },\n useCallback: function useCallback(a, b) {\n return W().useCallback(a, b);\n },\n useContext: function useContext(a, b) {\n return W().useContext(a, b);\n },\n useEffect: function useEffect(a, b) {\n return W().useEffect(a, b);\n },\n useImperativeHandle: function useImperativeHandle(a, b, d) {\n return W().useImperativeHandle(a, b, d);\n },\n useDebugValue: function useDebugValue() {},\n useLayoutEffect: function useLayoutEffect(a, b) {\n return W().useLayoutEffect(a, b);\n },\n useMemo: function useMemo(a, b) {\n return W().useMemo(a, b);\n },\n useReducer: function useReducer(a, b, d) {\n return W().useReducer(a, b, d);\n },\n useRef: function useRef(a) {\n return W().useRef(a);\n },\n useState: function useState(a) {\n return W().useState(a);\n },\n Fragment: r,\n StrictMode: t,\n Suspense: z,\n createElement: M,\n cloneElement: function cloneElement(a, b, d) {\n null === a || void 0 === a ? B(\"267\", a) : void 0;\n var c = void 0,\n e = k({}, a.props),\n g = a.key,\n h = a.ref,\n f = a._owner;\n\n if (null != b) {\n void 0 !== b.ref && (h = b.ref, f = J.current);\n void 0 !== b.key && (g = \"\" + b.key);\n var l = void 0;\n a.type && a.type.defaultProps && (l = a.type.defaultProps);\n\n for (c in b) {\n K.call(b, c) && !L.hasOwnProperty(c) && (e[c] = void 0 === b[c] && void 0 !== l ? l[c] : b[c]);\n }\n }\n\n c = arguments.length - 2;\n if (1 === c) e.children = d;else if (1 < c) {\n l = Array(c);\n\n for (var m = 0; m < c; m++) {\n l[m] = arguments[m + 2];\n }\n\n e.children = l;\n }\n return {\n $$typeof: p,\n type: a.type,\n key: g,\n ref: h,\n props: e,\n _owner: f\n };\n },\n createFactory: function createFactory(a) {\n var b = M.bind(null, a);\n b.type = a;\n return b;\n },\n isValidElement: N,\n version: \"16.8.6\",\n unstable_ConcurrentMode: x,\n unstable_Profiler: u,\n __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {\n ReactCurrentDispatcher: I,\n ReactCurrentOwner: J,\n assign: k\n }\n},\n Y = {\n default: X\n},\n Z = Y && X || Y;\nmodule.exports = Z.default || Z;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n'use strict';\n/* eslint-disable no-unused-vars */\n\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n if (val === null || val === undefined) {\n throw new TypeError('Object.assign cannot be called with null or undefined');\n }\n\n return Object(val);\n}\n\nfunction shouldUseNative() {\n try {\n if (!Object.assign) {\n return false;\n } // Detect buggy property enumeration order in older V8 versions.\n // https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\n\n var test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\n test1[5] = 'de';\n\n if (Object.getOwnPropertyNames(test1)[0] === '5') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test2 = {};\n\n for (var i = 0; i < 10; i++) {\n test2['_' + String.fromCharCode(i)] = i;\n }\n\n var order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n return test2[n];\n });\n\n if (order2.join('') !== '0123456789') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test3 = {};\n 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n test3[letter] = letter;\n });\n\n if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {\n return false;\n }\n\n return true;\n } catch (err) {\n // We don't expect any of the above to throw, but better to be safe.\n return false;\n }\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n var from;\n var to = toObject(target);\n var symbols;\n\n for (var s = 1; s < arguments.length; s++) {\n from = Object(arguments[s]);\n\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n\n if (getOwnPropertySymbols) {\n symbols = getOwnPropertySymbols(from);\n\n for (var i = 0; i < symbols.length; i++) {\n if (propIsEnumerable.call(from, symbols[i])) {\n to[symbols[i]] = from[symbols[i]];\n }\n }\n }\n }\n\n return to;\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\n\nmodule.exports = function () {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n\n var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n ;\n shim.isRequired = shim;\n\n function getShim() {\n return shim;\n }\n\n ; // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n return ReactPropTypes;\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\nmodule.exports = ReactPropTypesSecret;","module.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n\n module.paths = []; // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n};","export const parseProps = props => ({\r\n ...props,\r\n theme: `simple-keyboard ${props.theme || \"hg-theme-default\"}`\r\n});\r\n","import React, { Component } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport Keyboard from \"simple-keyboard\";\r\nimport { parseProps } from \"../services/Utilities\";\r\nimport \"simple-keyboard/build/css/index.css\";\r\n\r\nclass KeyboardReact extends Component {\r\n baseClassDefault = \"react-simple-keyboard\";\r\n\r\n componentDidMount = () => {\r\n const { props, getCssBaseClass } = this;\r\n const cssClass = getCssBaseClass();\r\n\r\n this.keyboard = new Keyboard(`.${cssClass}`, {\r\n ...parseProps(props)\r\n });\r\n };\r\n\r\n shouldComponentUpdate(nextProps, nextState) {\r\n if (this.props.stateToIgnore !== nextProps.stateToIgnore) return false;\r\n else return true;\r\n }\r\n\r\n componentWillReceiveProps = nextProps =>\r\n this.keyboard.setOptions(parseProps(nextProps));\r\n\r\n getCssBaseClass = () => this.props.baseClass || this.baseClassDefault;\r\n\r\n render() {\r\n const { getCssBaseClass } = this;\r\n return
;\r\n }\r\n}\r\n\r\nKeyboardReact.propTypes = {\r\n stateToIgnore: PropTypes.any\r\n};\r\n\r\nexport default KeyboardReact;\r\n","import Keyboard from \"./components/Keyboard\";\r\n\r\nexport default Keyboard;\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/config/jest/fileTransform.js b/config/jest/fileTransform.js index 07010e33a..4ed6bdb00 100644 --- a/config/jest/fileTransform.js +++ b/config/jest/fileTransform.js @@ -10,18 +10,19 @@ module.exports = { const assetFilename = JSON.stringify(path.basename(filename)); if (filename.match(/\.svg$/)) { - return `module.exports = { + return `const React = require('react'); + module.exports = { __esModule: true, default: ${assetFilename}, - ReactComponent: (props) => ({ + ReactComponent: React.forwardRef((props, ref) => ({ $$typeof: Symbol.for('react.element'), type: 'svg', - ref: null, + ref: ref, key: null, props: Object.assign({}, props, { children: ${assetFilename} }) - }), + })), };`; } diff --git a/config/modules.js b/config/modules.js new file mode 100644 index 000000000..4646eb05e --- /dev/null +++ b/config/modules.js @@ -0,0 +1,84 @@ +'use strict'; + +const fs = require('fs'); +const path = require('path'); +const paths = require('./paths'); +const chalk = require('react-dev-utils/chalk'); + +/** + * Get the baseUrl of a compilerOptions object. + * + * @param {Object} options + */ +function getAdditionalModulePaths(options = {}) { + const baseUrl = options.baseUrl; + + // We need to explicitly check for null and undefined (and not a falsy value) because + // TypeScript treats an empty string as `.`. + if (baseUrl == null) { + // If there's no baseUrl set we respect NODE_PATH + // Note that NODE_PATH is deprecated and will be removed + // in the next major release of create-react-app. + + const nodePath = process.env.NODE_PATH || ''; + return nodePath.split(path.delimiter).filter(Boolean); + } + + const baseUrlResolved = path.resolve(paths.appPath, baseUrl); + + // We don't need to do anything if `baseUrl` is set to `node_modules`. This is + // the default behavior. + if (path.relative(paths.appNodeModules, baseUrlResolved) === '') { + return null; + } + + // Allow the user set the `baseUrl` to `appSrc`. + if (path.relative(paths.appSrc, baseUrlResolved) === '') { + return [paths.appSrc]; + } + + // Otherwise, throw an error. + throw new Error( + chalk.red.bold( + "Your project's `baseUrl` can only be set to `src` or `node_modules`." + + ' Create React App does not support other values at this time.' + ) + ); +} + +function getModules() { + // Check if TypeScript is setup + const hasTsConfig = fs.existsSync(paths.appTsConfig); + const hasJsConfig = fs.existsSync(paths.appJsConfig); + + if (hasTsConfig && hasJsConfig) { + throw new Error( + 'You have both a tsconfig.json and a jsconfig.json. If you are using TypeScript please remove your jsconfig.json file.' + ); + } + + let config; + + // If there's a tsconfig.json we assume it's a + // TypeScript project and set up the config + // based on tsconfig.json + if (hasTsConfig) { + config = require(paths.appTsConfig); + // Otherwise we'll check if there is jsconfig.json + // for non TS projects. + } else if (hasJsConfig) { + config = require(paths.appJsConfig); + } + + config = config || {}; + const options = config.compilerOptions || {}; + + const additionalModulePaths = getAdditionalModulePaths(options); + + return { + additionalModulePaths: additionalModulePaths, + hasTsConfig, + }; +} + +module.exports = getModules(); diff --git a/config/paths.js b/config/paths.js index 7b5f7cc01..78509b4a2 100644 --- a/config/paths.js +++ b/config/paths.js @@ -82,6 +82,7 @@ module.exports = { appSrcLibTypes: resolveApp('src/lib/@types'), appSrcDemo: resolveApp('src/demo'), appTsConfig: resolveApp('tsconfig.json'), + appJsConfig: resolveApp('jsconfig.json'), yarnLockFile: resolveApp('yarn.lock'), testsSetup: resolveModule(resolveApp, 'src/setupTests'), proxySetup: resolveApp('src/setupProxy.js'), diff --git a/config/webpack.config.demo.js b/config/webpack.config.demo.js index 9f08eb584..0a0ef2c31 100644 --- a/config/webpack.config.demo.js +++ b/config/webpack.config.demo.js @@ -1,11 +1,13 @@ 'use strict'; const fs = require('fs'); +const isWsl = require('is-wsl'); const path = require('path'); const webpack = require('webpack'); const resolve = require('resolve'); const PnpWebpackPlugin = require('pnp-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); +const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin'); const TerserPlugin = require('terser-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); @@ -14,38 +16,23 @@ const safePostCssParser = require('postcss-safe-parser'); const ManifestPlugin = require('webpack-manifest-plugin'); const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); const WorkboxWebpackPlugin = require('workbox-webpack-plugin'); +const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent'); const paths = require('./paths'); +const modules = require('./modules'); const getClientEnvironment = require('./env'); const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin'); -const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin-alt'); +const ForkTsCheckerWebpackPlugin = require('react-dev-utils/ForkTsCheckerWebpackPlugin'); const typescriptFormatter = require('react-dev-utils/typescriptFormatter'); +const postcssNormalize = require('postcss-normalize'); -// Webpack uses `publicPath` to determine where the app is being served from. -// It requires a trailing slash, or the file assets will get an incorrect path. -const publicPath = paths.servedPath; -// Some apps do not use client-side routing with pushState. -// For these, "homepage" can be set to "." to enable relative asset paths. -const shouldUseRelativeAssetPaths = publicPath === './'; // Source maps are resource heavy and can cause out of memory issue for large source files. const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false'; // Some apps do not need the benefits of saving a web request, so not inlining the chunk // makes for a smoother build process. const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== 'false'; -// `publicUrl` is just like `publicPath`, but we will provide it to our app -// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript. -// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz. -const publicUrl = publicPath.slice(0, -1); -// Get environment variables to inject into our app. -const env = getClientEnvironment(publicUrl); - -// Assert this just to be safe. -// Development builds of React are slow and not intended for production. -if (env.stringified['process.env'].NODE_ENV !== '"production"') { - throw new Error('Production builds must have NODE_ENV=production.'); -} // Check if TypeScript is setup const useTypeScript = fs.existsSync(paths.appTsConfig); @@ -56,490 +43,542 @@ const cssModuleRegex = /\.module\.css$/; const sassRegex = /\.(scss|sass)$/; const sassModuleRegex = /\.module\.(scss|sass)$/; -// common function to get style loaders -const getStyleLoaders = (cssOptions, preProcessor) => { - const loaders = [ - { - loader: MiniCssExtractPlugin.loader, - options: Object.assign( - {}, - shouldUseRelativeAssetPaths ? { publicPath: '../../' } : undefined - ), - }, - { - loader: require.resolve('css-loader'), - options: cssOptions, - }, - { - // Options for PostCSS as we reference these options twice - // Adds vendor prefixing based on your specified browser support in - // package.json - loader: require.resolve('postcss-loader'), - options: { - // Necessary for external CSS imports to work - // https://github.com/facebook/create-react-app/issues/2677 - ident: 'postcss', - plugins: () => [ - require('postcss-flexbugs-fixes'), - require('postcss-preset-env')({ - autoprefixer: { - flexbox: 'no-2009', - }, - stage: 3, - }), - ], - sourceMap: shouldUseSourceMap, +// This is the production and development configuration. +// It is focused on developer experience, fast rebuilds, and a minimal bundle. +module.exports = function(webpackEnv) { + const isEnvProduction = webpackEnv === 'production'; + + // Webpack uses `publicPath` to determine where the app is being served from. + // It requires a trailing slash, or the file assets will get an incorrect path. + // In development, we always serve from the root. This makes config easier. + const publicPath = paths.servedPath + // Some apps do not use client-side routing with pushState. + // For these, "homepage" can be set to "." to enable relative asset paths. + const shouldUseRelativeAssetPaths = publicPath === './'; + + // `publicUrl` is just like `publicPath`, but we will provide it to our app + // as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript. + // Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz. + const publicUrl = publicPath.slice(0, -1); + // Get environment variables to inject into our app. + const env = getClientEnvironment(publicUrl); + + // common function to get style loaders + const getStyleLoaders = (cssOptions, preProcessor) => { + const loaders = [ + isEnvProduction && { + loader: MiniCssExtractPlugin.loader, + options: Object.assign( + {}, + shouldUseRelativeAssetPaths ? { publicPath: '../../' } : undefined + ), }, - }, - ]; - if (preProcessor) { - loaders.push({ - loader: require.resolve(preProcessor), - options: { - sourceMap: shouldUseSourceMap, + { + loader: require.resolve('css-loader'), + options: cssOptions, }, - }); - } - return loaders; -}; + { + // Options for PostCSS as we reference these options twice + // Adds vendor prefixing based on your specified browser support in + // package.json + loader: require.resolve('postcss-loader'), + options: { + // Necessary for external CSS imports to work + // https://github.com/facebook/create-react-app/issues/2677 + ident: 'postcss', + plugins: () => [ + require('postcss-flexbugs-fixes'), + require('postcss-preset-env')({ + autoprefixer: { + flexbox: 'no-2009', + }, + stage: 3, + }), + // Adds PostCSS Normalize as the reset css with default options, + // so that it honors browserslist config in package.json + // which in turn let's users customize the target behavior as per their needs. + postcssNormalize(), + ], + sourceMap: isEnvProduction && shouldUseSourceMap, + }, + }, + ].filter(Boolean); + if (preProcessor) { + loaders.push({ + loader: require.resolve(preProcessor), + options: { + sourceMap: isEnvProduction && shouldUseSourceMap, + }, + }); + } + return loaders; + }; -// This is the production configuration. -// It compiles slowly and is focused on producing a fast and minimal bundle. -// The development configuration is different and lives in a separate file. -module.exports = { - mode: 'production', - // Don't attempt to continue if there are any errors. - bail: true, - // We generate sourcemaps in production. This is slow but gives good results. - // You can exclude the *.map files from the build during deployment. - devtool: shouldUseSourceMap ? 'source-map' : false, - // In production, we only want to load the app code. - entry: [paths.appDemoIndexJs], - output: { - // The build folder. - path: paths.appDemo, - // Generated JS file names (with nested folders). - // There will be one main bundle, and one file per asynchronous chunk. - // We don't currently advertise code splitting but Webpack supports it. - filename: 'index.js', - chunkFilename: 'index.[chunkhash:8].chunk.js', - // We inferred the "public path" (such as / or /my-project) from homepage. - publicPath: publicPath, - // Point sourcemap entries to original disk location (format as URL on Windows) - devtoolModuleFilenameTemplate: info => - path - .relative(paths.appSrcDemo, info.absoluteResourcePath) - .replace(/\\/g, '/'), - }, - optimization: { - minimizer: [ - new TerserPlugin({ - terserOptions: { - parse: { - // we want terser to parse ecma 8 code. However, we don't want it - // to apply any minfication steps that turns valid ecma 5 code - // into invalid ecma 5 code. This is why the 'compress' and 'output' - // sections only apply transformations that are ecma 5 safe - // https://github.com/facebook/create-react-app/pull/4234 - ecma: 8, - }, - compress: { - ecma: 5, - warnings: false, - // Disabled because of an issue with Uglify breaking seemingly valid code: - // https://github.com/facebook/create-react-app/issues/2376 - // Pending further investigation: - // https://github.com/mishoo/UglifyJS2/issues/2011 - comparisons: false, - // Disabled because of an issue with Terser breaking valid code: - // https://github.com/facebook/create-react-app/issues/5250 - // Pending futher investigation: - // https://github.com/terser-js/terser/issues/120 - inline: 2, - }, - mangle: { - safari10: true, + return { + mode: 'production', + // Stop compilation early in production + bail: isEnvProduction, + devtool: shouldUseSourceMap ? 'source-map' : false, + // These are the "entry points" to our application. + // This means they will be the "root" imports that are included in JS bundle. + entry: isEnvProduction ? [paths.appDemoIndexJs] : [ + // Finally, this is your app's code: + paths.appDemoIndexJs, + // We include the app code last so that if there is a runtime error during + // initialization, it doesn't blow up the WebpackDevServer client, and + // changing JS code would still trigger a refresh. + ].filter(Boolean), + output: { + // The build folder. + path: isEnvProduction ? paths.appDemo : undefined, + // Add /* filename */ comments to generated require()s in the output. + // There will be one main bundle, and one file per asynchronous chunk. + // In development, it does not produce real files. + filename: 'index.js', + // TODO: remove this when upgrading to webpack 5 + futureEmitAssets: true, + // There are also additional JS chunk files if you use code splitting. + chunkFilename: 'static/js/[name].[contenthash:8].chunk.js', + // We inferred the "public path" (such as / or /my-project) from homepage. + // We use "/" in development. + publicPath: publicPath, + // Point sourcemap entries to original disk location (format as URL on Windows) + devtoolModuleFilenameTemplate: isEnvProduction + ? info => + path + .relative(paths.appSrcDemo, info.absoluteResourcePath) + .replace(/\\/g, '/') + : null, + }, + optimization: { + minimize: isEnvProduction, + minimizer: [ + // This is only used in production mode + new TerserPlugin({ + terserOptions: { + parse: { + // we want terser to parse ecma 8 code. However, we don't want it + // to apply any minfication steps that turns valid ecma 5 code + // into invalid ecma 5 code. This is why the 'compress' and 'output' + // sections only apply transformations that are ecma 5 safe + // https://github.com/facebook/create-react-app/pull/4234 + ecma: 8, + }, + compress: { + ecma: 5, + warnings: false, + // Disabled because of an issue with Uglify breaking seemingly valid code: + // https://github.com/facebook/create-react-app/issues/2376 + // Pending further investigation: + // https://github.com/mishoo/UglifyJS2/issues/2011 + comparisons: false, + // Disabled because of an issue with Terser breaking valid code: + // https://github.com/facebook/create-react-app/issues/5250 + // Pending futher investigation: + // https://github.com/terser-js/terser/issues/120 + inline: 2, + }, + mangle: { + safari10: true, + keep_classnames: true, + keep_fnames: true, + module: true + }, + output: { + ecma: 5, + comments: false, + // Turned on because emoji and regex is not minified properly using default + // https://github.com/facebook/create-react-app/issues/2488 + ascii_only: true, + }, }, - output: { - ecma: 5, - comments: false, - // Turned on because emoji and regex is not minified properly using default - // https://github.com/facebook/create-react-app/issues/2488 - ascii_only: true, + // Use multi-process parallel running to improve the build speed + // Default number of concurrent runs: os.cpus().length - 1 + // Disabled on WSL (Windows Subsystem for Linux) due to an issue with Terser + // https://github.com/webpack-contrib/terser-webpack-plugin/issues/21 + parallel: !isWsl, + // Enable file caching + cache: true, + sourceMap: shouldUseSourceMap, + }), + new OptimizeCSSAssetsPlugin({ + cssProcessorOptions: { + parser: safePostCssParser, + map: shouldUseSourceMap + ? { + // `inline: false` forces the sourcemap to be output into a + // separate file + inline: false, + // `annotation: true` appends the sourceMappingURL to the end of + // the css file, helping the browser find the sourcemap + annotation: true, + } + : false, }, - }, - // Use multi-process parallel running to improve the build speed - // Default number of concurrent runs: os.cpus().length - 1 - parallel: true, - // Enable file caching - cache: true, - sourceMap: shouldUseSourceMap, - }), - new OptimizeCSSAssetsPlugin({ - cssProcessorOptions: { - parser: safePostCssParser, - map: shouldUseSourceMap - ? { - // `inline: false` forces the sourcemap to be output into a - // separate file - inline: false, - // `annotation: true` appends the sourceMappingURL to the end of - // the css file, helping the browser find the sourcemap - annotation: true, - } - : false, - }, - }), - ], - // Automatically split vendor and commons - // https://twitter.com/wSokra/status/969633336732905474 - // https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366 - splitChunks: { + }), + ], + // Automatically split vendor and commons + // https://twitter.com/wSokra/status/969633336732905474 + // https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366 + splitChunks: { /*chunks: 'all', name: false,*/ cacheGroups: { default: false, } - }, - // Keep the runtime chunk seperated to enable long term caching - // https://twitter.com/wSokra/status/969679223278505985 + }, + // Keep the runtime chunk separated to enable long term caching + // https://twitter.com/wSokra/status/969679223278505985 runtimeChunk: false, - }, - resolve: { - // This allows you to set a fallback for where Webpack should look for modules. - // We placed these paths second because we want `node_modules` to "win" - // if there are any conflicts. This matches Node resolution mechanism. - // https://github.com/facebook/create-react-app/issues/253 - modules: ['node_modules'].concat( - // It is guaranteed to exist because we tweak it in `env.js` - process.env.NODE_PATH.split(path.delimiter).filter(Boolean) - ), - // These are the reasonable defaults supported by the Node ecosystem. - // We also include JSX as a common component filename extension to support - // some tools, although we do not recommend using it, see: - // https://github.com/facebook/create-react-app/issues/290 - // `web` extension prefixes have been added for better support - // for React Native Web. - extensions: paths.moduleFileExtensions - .map(ext => `.${ext}`) - .filter(ext => useTypeScript || !ext.includes('ts')), - alias: { - // Support React Native Web - // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/ - 'react-native': 'react-native-web', }, - plugins: [ - // Adds support for installing with Plug'n'Play, leading to faster installs and adding - // guards against forgotten dependencies and such. - PnpWebpackPlugin, - // Prevents users from importing files from outside of src/ (or node_modules/). - // This often causes confusion because we only process files within src/ with babel. - // To fix this, we prevent you from importing files out of src/ -- if you'd like to, - // please link the files into your node_modules/ and let module-resolution kick in. - // Make sure your source files are compiled, as they will not be processed in any way. - new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]), - ], - }, - resolveLoader: { - plugins: [ - // Also related to Plug'n'Play, but this time it tells Webpack to load its loaders - // from the current package. - PnpWebpackPlugin.moduleLoader(module), - ], - }, - module: { - strictExportPresence: true, - rules: [ - // Disable require.ensure as it's not a standard language feature. - { parser: { requireEnsure: false } }, + resolve: { + // This allows you to set a fallback for where Webpack should look for modules. + // We placed these paths second because we want `node_modules` to "win" + // if there are any conflicts. This matches Node resolution mechanism. + // https://github.com/facebook/create-react-app/issues/253 + modules: ['node_modules', paths.appNodeModules].concat(modules.additionalModulePaths || []), + // These are the reasonable defaults supported by the Node ecosystem. + // We also include JSX as a common component filename extension to support + // some tools, although we do not recommend using it, see: + // https://github.com/facebook/create-react-app/issues/290 + // `web` extension prefixes have been added for better support + // for React Native Web. + extensions: paths.moduleFileExtensions + .map(ext => `.${ext}`) + .filter(ext => useTypeScript || !ext.includes('ts')), + alias: { + // Support React Native Web + // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/ + 'react-native': 'react-native-web', + }, + plugins: [ + // Adds support for installing with Plug'n'Play, leading to faster installs and adding + // guards against forgotten dependencies and such. + PnpWebpackPlugin, + // Prevents users from importing files from outside of src/ (or node_modules/). + // This often causes confusion because we only process files within src/ with babel. + // To fix this, we prevent you from importing files out of src/ -- if you'd like to, + // please link the files into your node_modules/ and let module-resolution kick in. + // Make sure your source files are compiled, as they will not be processed in any way. + new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]), + ], + }, + resolveLoader: { + plugins: [ + // Also related to Plug'n'Play, but this time it tells Webpack to load its loaders + // from the current package. + PnpWebpackPlugin.moduleLoader(module), + ], + }, + module: { + strictExportPresence: true, + rules: [ + // Disable require.ensure as it's not a standard language feature. + { parser: { requireEnsure: false } }, - // First, run the linter. - // It's important to do this before Babel processes the JS. - { - test: /\.(js|mjs|jsx)$/, - enforce: 'pre', - use: [ - { - options: { - formatter: require.resolve('react-dev-utils/eslintFormatter'), - eslintPath: require.resolve('eslint'), - + // First, run the linter. + // It's important to do this before Babel processes the JS. + { + test: /\.(js|mjs|jsx|ts|tsx)$/, + enforce: 'pre', + use: [ + { + options: { + formatter: require.resolve('react-dev-utils/eslintFormatter'), + eslintPath: require.resolve('eslint'), + + }, + loader: require.resolve('eslint-loader'), }, - loader: require.resolve('eslint-loader'), - }, - ], + ], include: paths.appSrcDemo, - }, - { - // "oneOf" will traverse all following loaders until one will - // match the requirements. When no loader matches it will fall - // back to the "file" loader at the end of the loader list. - oneOf: [ - // "url" loader works just like "file" loader but it also embeds - // assets smaller than specified size as data URLs to avoid requests. - { - test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/], - loader: require.resolve('url-loader'), - options: { - limit: 10000, - name: 'static/media/[name].[hash:8].[ext]', + }, + { + // "oneOf" will traverse all following loaders until one will + // match the requirements. When no loader matches it will fall + // back to the "file" loader at the end of the loader list. + oneOf: [ + // "url" loader works like "file" loader except that it embeds assets + // smaller than specified limit in bytes as data URLs to avoid requests. + // A missing `test` is equivalent to a match. + { + test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/], + loader: require.resolve('url-loader'), + options: { + limit: 10000, + name: 'static/media/[name].[hash:8].[ext]', + }, }, - }, - // Process application JS with Babel. - // The preset includes JSX, Flow, TypeScript and some ESnext features. - { - test: /\.(js|mjs|jsx|ts|tsx)$/, + // Process application JS with Babel. + // The preset includes JSX, Flow, TypeScript, and some ESnext features. + { + test: /\.(js|mjs|jsx|ts|tsx)$/, include: paths.appSrcDemo, - - loader: require.resolve('babel-loader'), - options: { - customize: require.resolve( - 'babel-preset-react-app/webpack-overrides' - ), - - plugins: [ - [ - require.resolve('babel-plugin-named-asset-import'), - { - loaderMap: { - svg: { - ReactComponent: '@svgr/webpack?-prettier,-svgo![path]', + loader: require.resolve('babel-loader'), + options: { + customize: require.resolve( + 'babel-preset-react-app/webpack-overrides' + ), + + plugins: [ + [ + require.resolve('babel-plugin-named-asset-import'), + { + loaderMap: { + svg: { + ReactComponent: '@svgr/webpack?-prettier,-svgo,+ref![path]', + }, }, }, - }, + ], ], - ], - cacheDirectory: true, - // Save disk space when time isn't as important - cacheCompression: true, - compact: true, + // This is a feature of `babel-loader` for webpack (not Babel itself). + // It enables caching results in ./node_modules/.cache/babel-loader/ + // directory for faster rebuilds. + cacheDirectory: true, + cacheCompression: isEnvProduction, + compact: isEnvProduction, + }, }, - }, - // Process any JS outside of the app with Babel. - // Unlike the application JS, we only compile the standard ES features. - { - test: /\.(js|mjs)$/, - exclude: /@babel(?:\/|\\{1,2})runtime/, - loader: require.resolve('babel-loader'), - options: { - babelrc: false, - configFile: false, - compact: false, - presets: [ - "@babel/preset-env", - "@babel/preset-react" - ], - plugins: [ + // Process any JS outside of the app with Babel. + // Unlike the application JS, we only compile the standard ES features. + { + test: /\.(js|mjs)$/, + exclude: /@babel(?:\/|\\{1,2})runtime/, + loader: require.resolve('babel-loader'), + options: { + babelrc: false, + configFile: false, + compact: false, + presets: [ + [ + require.resolve('babel-preset-react-app/dependencies'), + { helpers: true }, + ], + "@babel/preset-env", + "@babel/preset-react" + ], + plugins: [ [ "@babel/plugin-proposal-class-properties" ] - ], - cacheDirectory: true, - // Save disk space when time isn't as important - cacheCompression: true, - - // If an error happens in a package, it's possible to be - // because it was compiled. Thus, we don't want the browser - // debugger to show the original code. Instead, the code - // being evaluated would be much more helpful. - sourceMaps: false, - }, - }, - // "postcss" loader applies autoprefixer to our CSS. - // "css" loader resolves paths in CSS and adds assets as dependencies. - // `MiniCSSExtractPlugin` extracts styles into CSS - // files. If you use code splitting, async bundles will have their own separate CSS chunk file. - // By default we support CSS Modules with the extension .module.css - { - test: cssRegex, - exclude: cssModuleRegex, - loader: getStyleLoaders({ - importLoaders: 1, - sourceMap: shouldUseSourceMap, - }), - // Don't consider CSS imports dead code even if the - // containing package claims to have no side effects. - // Remove this when webpack adds a warning or an error for this. - // See https://github.com/webpack/webpack/issues/6571 - sideEffects: true, - }, - // Adds support for CSS Modules (https://github.com/css-modules/css-modules) - // using the extension .module.css - { - test: cssModuleRegex, - loader: getStyleLoaders({ - importLoaders: 1, - sourceMap: shouldUseSourceMap, - modules: true, - getLocalIdent: getCSSModuleLocalIdent, - }), - }, - // Opt-in support for SASS. The logic here is somewhat similar - // as in the CSS routine, except that "sass-loader" runs first - // to compile SASS files into CSS. - // By default we support SASS Modules with the - // extensions .module.scss or .module.sass - { - test: sassRegex, - exclude: sassModuleRegex, - loader: getStyleLoaders( - { - importLoaders: 2, - sourceMap: shouldUseSourceMap, + ], + cacheDirectory: true, + cacheCompression: isEnvProduction, + + // If an error happens in a package, it's possible to be + // because it was compiled. Thus, we don't want the browser + // debugger to show the original code. Instead, the code + // being evaluated would be much more helpful. + sourceMaps: false, }, - 'sass-loader' - ), - // Don't consider CSS imports dead code even if the - // containing package claims to have no side effects. - // Remove this when webpack adds a warning or an error for this. - // See https://github.com/webpack/webpack/issues/6571 - sideEffects: true, - }, - // Adds support for CSS Modules, but using SASS - // using the extension .module.scss or .module.sass - { - test: sassModuleRegex, - loader: getStyleLoaders( - { - importLoaders: 2, - sourceMap: shouldUseSourceMap, + }, + // "postcss" loader applies autoprefixer to our CSS. + // "css" loader resolves paths in CSS and adds assets as dependencies. + // "style" loader turns CSS into JS modules that inject
- diff --git a/public/manifest.json b/public/manifest.json deleted file mode 100644 index ef19ec243..000000000 --- a/public/manifest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - } - ], - "start_url": "./index.html", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/scripts/build.js b/scripts/build.js index 059c23d3a..d5bb2d524 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -16,11 +16,10 @@ require('../config/env'); const path = require('path'); -const chalk = require('chalk'); +const chalk = require('react-dev-utils/chalk'); const fs = require('fs-extra'); const webpack = require('webpack'); -const bfj = require('bfj'); -const config = require('../config/webpack.config.prod'); +const configFactory = require('../config/webpack.config'); const paths = require('../config/paths'); const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles'); const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages'); @@ -44,9 +43,8 @@ if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) { process.exit(1); } -// Process CLI arguments -const argv = process.argv.slice(2); -const writeStatsJson = argv.indexOf('--stats') !== -1; +// Generate configuration +const config = configFactory('production'); // We require that you explicitly set browsers and do not fall back to // browserslist defaults. @@ -122,9 +120,21 @@ checkBrowsers(paths.appPath, isInteractive) // Create the production build and print the deployment instructions. function build(previousFileSizes) { + // We used to support resolving modules according to `NODE_PATH`. + // This now has been deprecated in favor of jsconfig/tsconfig.json + // This lets you use absolute paths in imports inside large monorepos: + if (process.env.NODE_PATH) { + console.log( + chalk.yellow( + 'Setting NODE_PATH to resolve modules absolutely has been deprecated in favor of setting baseUrl in jsconfig.json (or tsconfig.json if you are using TypeScript) and will be removed in a future major release of create-react-app.' + ) + ); + console.log(); + } + console.log('Creating an optimized production build...'); - let compiler = webpack(config); + const compiler = webpack(config); return new Promise((resolve, reject) => { compiler.run((err, stats) => { let messages; @@ -164,19 +174,11 @@ function build(previousFileSizes) { return reject(new Error(messages.warnings.join('\n\n'))); } - const resolveArgs = { + return resolve({ stats, previousFileSizes, warnings: messages.warnings, - }; - if (writeStatsJson) { - return bfj - .write(paths.appBuild + '/bundle-stats.json', stats.toJson()) - .then(() => resolve(resolveArgs)) - .catch(error => reject(new Error(error))); - } - - return resolve(resolveArgs); + }); }); }); } diff --git a/scripts/demo.js b/scripts/demo.js index f7a13dc36..ee6b12d43 100644 --- a/scripts/demo.js +++ b/scripts/demo.js @@ -16,11 +16,10 @@ require('../config/env'); const path = require('path'); -const chalk = require('chalk'); +const chalk = require('react-dev-utils/chalk'); const fs = require('fs-extra'); const webpack = require('webpack'); -const bfj = require('bfj'); -const config = require('../config/webpack.config.demo'); +const configFactory = require('../config/webpack.config.demo'); const paths = require('../config/paths'); const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles'); const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages'); @@ -44,9 +43,8 @@ if (!checkRequiredFiles([paths.appHtml, paths.appDemoIndexJs])) { process.exit(1); } -// Process CLI arguments -const argv = process.argv.slice(2); -const writeStatsJson = argv.indexOf('--stats') !== -1; +// Generate configuration +const config = configFactory('production'); // We require that you explicitly set browsers and do not fall back to // browserslist defaults. @@ -122,9 +120,21 @@ checkBrowsers(paths.appPath, isInteractive) // Create the production build and print the deployment instructions. function build(previousFileSizes) { + // We used to support resolving modules according to `NODE_PATH`. + // This now has been deprecated in favor of jsconfig/tsconfig.json + // This lets you use absolute paths in imports inside large monorepos: + if (process.env.NODE_PATH) { + console.log( + chalk.yellow( + 'Setting NODE_PATH to resolve modules absolutely has been deprecated in favor of setting baseUrl in jsconfig.json (or tsconfig.json if you are using TypeScript) and will be removed in a future major release of create-react-app.' + ) + ); + console.log(); + } + console.log('Creating an optimized production build...'); - let compiler = webpack(config); + const compiler = webpack(config); return new Promise((resolve, reject) => { compiler.run((err, stats) => { let messages; @@ -164,19 +174,11 @@ function build(previousFileSizes) { return reject(new Error(messages.warnings.join('\n\n'))); } - const resolveArgs = { + return resolve({ stats, previousFileSizes, warnings: messages.warnings, - }; - if (writeStatsJson) { - return bfj - .write(paths.appDemo + '/bundle-stats.json', stats.toJson()) - .then(() => resolve(resolveArgs)) - .catch(error => reject(new Error(error))); - } - - return resolve(resolveArgs); + }); }); }); } diff --git a/scripts/start.js b/scripts/start.js index 73b0fd428..7c68b6de5 100644 --- a/scripts/start.js +++ b/scripts/start.js @@ -16,7 +16,7 @@ require('../config/env'); const fs = require('fs'); -const chalk = require('chalk'); +const chalk = require('react-dev-utils/chalk'); const webpack = require('webpack'); const WebpackDevServer = require('webpack-dev-server'); const clearConsole = require('react-dev-utils/clearConsole'); @@ -29,7 +29,7 @@ const { } = require('react-dev-utils/WebpackDevServerUtils'); const openBrowser = require('react-dev-utils/openBrowser'); const paths = require('../config/paths'); -const config = require('../config/webpack.config.dev'); +const configFactory = require('../config/webpack.config'); const createDevServerConfig = require('../config/webpackDevServer.config'); const useYarn = fs.existsSync(paths.yarnLockFile); @@ -56,12 +56,12 @@ if (process.env.HOST) { `If this was unintentional, check that you haven't mistakenly set it in your shell.` ); console.log( - `Learn more here: ${chalk.yellow('http://bit.ly/CRA-advanced-config')}` + `Learn more here: ${chalk.yellow('https://bit.ly/CRA-advanced-config')}` ); console.log(); } -// We require that you explictly set browsers and do not fall back to +// We require that you explicitly set browsers and do not fall back to // browserslist defaults. const { checkBrowsers } = require('react-dev-utils/browsersHelper'); checkBrowsers(paths.appPath, isInteractive) @@ -77,11 +77,27 @@ checkBrowsers(paths.appPath, isInteractive) } const args = process.argv; const testMode = args[2] === "--testMode"; + const config = configFactory('development'); const protocol = process.env.HTTPS === 'true' ? 'https' : 'http'; const appName = require(paths.appPackageJson).name; + const useTypeScript = fs.existsSync(paths.appTsConfig); const urls = prepareUrls(protocol, HOST, port); + const devSocket = { + warnings: warnings => + devServer.sockWrite(devServer.sockets, 'warnings', warnings), + errors: errors => + devServer.sockWrite(devServer.sockets, 'errors', errors), + }; // Create a webpack compiler that is configured with custom messages. - const compiler = createCompiler({ webpack, config, appName, urls, useYarn }); + const compiler = createCompiler({ + appName, + config, + devSocket, + urls, + useYarn, + useTypeScript, + webpack, + }); // Load proxy config const proxySetting = require(paths.appPackageJson).proxy; const proxyConfig = prepareProxy(proxySetting, paths.appPublic); @@ -99,6 +115,19 @@ checkBrowsers(paths.appPath, isInteractive) if (isInteractive) { clearConsole(); } + + // We used to support resolving modules according to `NODE_PATH`. + // This now has been deprecated in favor of jsconfig/tsconfig.json + // This lets you use absolute paths in imports inside large monorepos: + if (process.env.NODE_PATH) { + console.log( + chalk.yellow( + 'Setting NODE_PATH to resolve modules absolutely has been deprecated in favor of setting baseUrl in jsconfig.json (or tsconfig.json if you are using TypeScript) and will be removed in a future major release of create-react-app.' + ) + ); + console.log(); + } + console.log(chalk.cyan('Starting the development server...\n')); openBrowser(urls.localUrlForBrowser); @@ -135,4 +164,4 @@ checkBrowsers(paths.appPath, isInteractive) console.log(err.message); } process.exit(1); - }); \ No newline at end of file + }); diff --git a/scripts/test.js b/scripts/test.js index 0b6e8cb0f..5a95a4bc7 100644 --- a/scripts/test.js +++ b/scripts/test.js @@ -38,10 +38,9 @@ function isInMercurialRepository() { } } -// Watch unless on CI, in coverage mode, or explicitly running all tests +// Watch unless on CI or explicitly running all tests if ( !process.env.CI && - argv.indexOf('--coverage') === -1 && argv.indexOf('--watchAll') === -1 ) { // https://github.com/facebook/create-react-app/issues/5210 diff --git a/src/demo/App.js b/src/demo/App.js index 649be605d..88f57dc73 100644 --- a/src/demo/App.js +++ b/src/demo/App.js @@ -1,53 +1,67 @@ -import React, { Component } from 'react'; +import React, { Component } from "react"; -import Keyboard from '../lib'; +import Keyboard from "../lib"; -import './css/App.css'; +import "./css/App.css"; class App extends Component { state = { - input: '', - layoutName: 'default', + input: "", + layoutName: "default", buttonTheme: [] - } - - keyboard = React.createRef() - - onChange = input => this.setState({ input }, () => console.log('Input changed', input)); + }; + + keyboard = React.createRef(); + + onChange = input => + this.setState({ input }, () => console.log("Input changed", input)); onKeyPress = button => { - console.log('Button pressed', button); + console.log("Button pressed", button); /** * Shift functionality */ - if(['{capslock}', '{shiftleft}', '{shiftright}'].includes(button)) + if (["{capslock}", "{shiftleft}", "{shiftright}"].includes(button)) this.handleShiftButton(); - } + }; handleShiftButton = () => { - const { state: { layoutName } } = this; - const shiftToggle = layoutName === 'default' ? 'shift' : 'default'; + const { + state: { layoutName } + } = this; + const shiftToggle = layoutName === "default" ? "shift" : "default"; this.setState({ layoutName: shiftToggle }); - } + }; onChangeInput = event => { const input = event.target.value; - this.setState({ input: event.target.value }, () => this.keyboardRef.keyboard.setInput(input)); + this.setState({ input: event.target.value }, () => + this.keyboardRef.keyboard.setInput(input) + ); }; - + render() { - const { state: { input, layoutName, buttonTheme }, onChangeInput, onChange, onKeyPress } = this + const { + state: { input, layoutName, buttonTheme }, + onChangeInput, + onChange, + onKeyPress + } = this; return ( -
-
-