From 5a5ffbc5a337a761562e3d09ff473f54f8c45cf2 Mon Sep 17 00:00:00 2001 From: chetan-b-bigstep Date: Mon, 23 Mar 2020 18:42:39 +0530 Subject: [PATCH 1/7] Update-v2-changes --- README.md | 2 - web-widget/README.md | 84 +- web-widget/dist/channelize-websdk.js | 2932 +++++++++++++++++ web-widget/dist/widget.Channelize.js | 1 + web-widget/index.html | 6 +- web-widget/package.json | 0 web-widget/server.js | 2 +- web-widget/src/js/adapter.js | 170 +- .../src/js/components/conversation-window.js | 572 ++-- web-widget/src/js/components/login.js | 42 +- .../src/js/components/recent-conversations.js | 349 +- web-widget/src/js/components/search.js | 163 +- web-widget/src/js/constants.js | 16 +- web-widget/src/js/utility.js | 94 +- web-widget/src/js/widget.js | 184 +- web-widget/src/scss/main.scss | 974 +++--- web-widget/src/scss/variables.scss | 0 web-widget/webpack.config.js | 0 18 files changed, 4446 insertions(+), 1145 deletions(-) delete mode 100644 README.md mode change 100755 => 100644 web-widget/README.md create mode 100644 web-widget/dist/channelize-websdk.js create mode 100644 web-widget/dist/widget.Channelize.js mode change 100755 => 100644 web-widget/index.html mode change 100755 => 100644 web-widget/package.json mode change 100755 => 100644 web-widget/server.js mode change 100755 => 100644 web-widget/src/js/adapter.js mode change 100755 => 100644 web-widget/src/js/components/conversation-window.js mode change 100755 => 100644 web-widget/src/js/components/login.js mode change 100755 => 100644 web-widget/src/js/components/recent-conversations.js mode change 100755 => 100644 web-widget/src/js/components/search.js mode change 100755 => 100644 web-widget/src/js/constants.js mode change 100755 => 100644 web-widget/src/js/utility.js mode change 100755 => 100644 web-widget/src/js/widget.js mode change 100755 => 100644 web-widget/src/scss/main.scss mode change 100755 => 100644 web-widget/src/scss/variables.scss mode change 100755 => 100644 web-widget/webpack.config.js diff --git a/README.md b/README.md deleted file mode 100644 index d735ca0..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Channelize-Web-Javascript -Channelize.io web javascript sample apps diff --git a/web-widget/README.md b/web-widget/README.md old mode 100755 new mode 100644 index 31e01eb..25aca82 --- a/web-widget/README.md +++ b/web-widget/README.md @@ -1,18 +1,13 @@ # Channelize JavaScript Widget UI kit -This contains the customization capabilities you can achieve by using our JavaScript Sample App created using our [JavaScript SDK](https://docs.channelize.io/javascript-sdk-introduction-overview). This Sample App allows you to add a customized chat widget / docked layout on your website. +This JavaScript Sample app is built using our [JavaScript SDK](https://docs.channelize.io/javascript-sdk-introduction-overview), this will help you add a chat widget / docked layout to your website which can be customized to build chat exactly how you want, and unbelievably quickly. It enables achieving a beautiful chat app interface for all use-cases like live chat, online consultation & tutoring, team collaboration, messaging, customer support and gaming chat. -### Features : ### -- Highly customization -- Easy to implement -- Ready to use -- Multiple use cases -#### You can also check out our demo [here](https://demo.channelize.io). +#### See in Action [here](https://demo.channelize.io). ## Getting Started -Follow the below steps to add Channelize widget / docked layout on your website. +Follow the below steps to add the Channelize chat widget / docked layout to your website. ##### Step 1: Add widget ##### @@ -20,7 +15,7 @@ Add the Channelize widget div in the body tag of your website. ```html -
+
``` @@ -29,7 +24,7 @@ Add the Channelize widget div in the body tag of your website. Import the `widget.Channelize.js` file after body tag in your website. ```javascript - + ``` ##### Step 3: Import Channelize JS-SDK ##### @@ -37,17 +32,17 @@ Import the `widget.Channelize.js` file after body tag in your website. Import the [`Channelize JS-SDK`](https://docs.channelize.io/javascript-sdk-introduction-overview) after body tag in your website. ```javascript - + ``` ##### Step 4: Create widget object ##### -Create widget object and call the load function which will require your public key as an argument. +Create Channelize.io object and call the load function which will require your public key as an argument. ```javascript ``` @@ -62,12 +57,12 @@ Create widget object and call the load function which will require your public k 2. Install required npm packages. ```bash -npm install +sudo npm install ``` 3. Build your changes. ```bash -npm run build +sudo npm run build ``` 4. Start sample app. @@ -77,69 +72,56 @@ npm start ###### For UI Customizations : ###### -- Customize the UI of widget / docked layout as per your choice by changing the values of predefined variables in `./web-widget/src/scss/variables.scss file` or by making changes in the code of the elements/content. +- Customize the UI of chat widget / docked layout as per your choice by changing the values of predefined variables in `./web-widget/src/scss/variables.scss file` or by making changes in the code of the elements/content. ###### For Function Customizations : ###### -- Add your functions or make code-level changes. +- Add your own functions or make code-level changes. ## Advanced -### Change the application : -If you want to change your current application, you just need to change the `PUBLIC_KEY` in `index.html` file. +### Load for logged-in user +Load the Channelize for an already logged-in user, you can use `loadWithUserId()` method instead of load() method. loadWithUserId() method takes two arguments user-id and access token. you can get access token in the response of login api call. ```html ... - + ``` -### Load with already connected user : -If you want to load the Channelize for already connected user, you can use loadWithConnect() method instead of load() method. loadWithConnect() method takes two arguments user-id and access token. you can get access token in the response of login api call. +### Load Recent Conversations Screen +Load the recent conversations screen using `loadRecentConversation()` method. It takes two arguments user-id and access token. ```html ... - + ``` -### Load Recent Conversation Screen : -If you want to open only recent conversation, you can use `loadRecentConversation()` method. It takes two arguments user-id and access token. +### Load Conversation Window +Load conversation window using `loadConversationWindow()` method. It requires two arguments otherMemberId and conversationId. ```html ... - + ``` -### Load Conversation Window : -If you want to load conversation window, then you can use `loadConversationWindow()` method. It takes two arguments otherMemberId and conversationId. - -```html -... - - - -``` - -## File Structure of Channelize Sample App : +## File Structure of Channelize Sample App ``` |-- dist |-- widget.Channelize.js - Channelize Widget Bundle file @@ -164,4 +146,4 @@ If you want to load conversation window, then you can use `loadConversationWindo |-- README.md - description file |-- server.js - server file |-- webpack.config.js - webpack setting -``` +``` \ No newline at end of file diff --git a/web-widget/dist/channelize-websdk.js b/web-widget/dist/channelize-websdk.js new file mode 100644 index 0000000..e77e402 --- /dev/null +++ b/web-widget/dist/channelize-websdk.js @@ -0,0 +1,2932 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./src/index.js"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./node_modules/aws-iot-device-sdk/common/lib/exceptions.js": +/*!******************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/common/lib/exceptions.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\n\n//npm deps\n\n//app deps\n\n//begin module\nmodule.exports = {\n NO_KEY_OPTION: 'No \"keyPath\" or \"privateKey\" option supplied.',\n NO_CERT_OPTION: 'No \"certPath\" or \"clientCert\" option supplied.',\n NO_CA_OPTION: 'No \"caPath\" or \"caCert\" option supplied.',\n INVALID_KEY_PATH_OPTION: 'Invalid \"keyPath\" option supplied.',\n INVALID_CERT_PATH_OPTION: 'Invalid \"certPath\" option supplied.',\n INVALID_CA_PATH_OPTION: 'Invalid \"caPath\" option supplied.',\n INVALID_CLIENT_CERT_OPTION: 'Invalid \"clientCert\" option supplied.',\n INVALID_PRIVATE_KEY_OPTION: 'Invalid \"privateKey\" option supplied.',\n INVALID_CA_CERT_OPTION: 'Invalid \"caCert\" option supplied.'\n};\n\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/common/lib/exceptions.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/common/lib/is-undefined.js": +/*!********************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/common/lib/is-undefined.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\n\n//npm deps\n\n//app deps\n\n//begin module\n/**\n * This is the exposed module.\n * This method determines if an object is undefined.\n *\n * @param {Object} value\n * @access public\n */\nmodule.exports = function(value) {\n return typeof value === 'undefined' || value === null;\n};\n\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/common/lib/is-undefined.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/common/lib/tls-reader.js": +/*!******************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/common/lib/tls-reader.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(Buffer) {/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\nvar filesys = __webpack_require__(/*! fs */ \"./node_modules/node-libs-browser/mock/empty.js\");\n\n//npm deps\n\n//app deps\nvar isUndefined = __webpack_require__(/*! ./is-undefined */ \"./node_modules/aws-iot-device-sdk/common/lib/is-undefined.js\");\nvar exceptions = __webpack_require__(/*! ./exceptions */ \"./node_modules/aws-iot-device-sdk/common/lib/exceptions.js\");\n\n//begin module\n/**\n * This method is the exposed module; it validates and prepares the tls\n * options as required for connection to the AWS IoT service.\n *\n * @param {Object} options\n * @access public\n */\nmodule.exports = function(options) {\n\n // verify certificate paths\n if (isUndefined(options.keyPath) && isUndefined(options.privateKey)) {\n throw new Error(exceptions.NO_KEY_OPTION);\n }\n if (isUndefined(options.certPath) && isUndefined(options.clientCert)) {\n throw new Error(exceptions.NO_CERT_OPTION);\n }\n if (isUndefined(options.caPath) && isUndefined(options.caCert)) {\n throw new Error(exceptions.NO_CA_OPTION);\n }\n //\n // Certificates and private keys may be passed in files using options\n // ending in 'Path', e.g. 'keyPath', 'certPath', and 'caPath'. In addition,\n // they can also be passed in as buffers or files using the options\n // 'privateKey', 'clientCert', and 'caCert'. This second set is the one\n // that the AWS Console generates a JSON configuration document for.\n //\n if (!isUndefined(options.caCert)) {\n if (Buffer.isBuffer(options.caCert)) {\n options.ca = options.caCert;\n } else {\n if (filesys.existsSync(options.caCert)) {\n options.ca = filesys.readFileSync(options.caCert);\n } else {\n throw new Error(exceptions.INVALID_CA_CERT_OPTION);\n }\n }\n }\n if (!isUndefined(options.privateKey)) {\n if (Buffer.isBuffer(options.privateKey)) {\n options.key = options.privateKey;\n } else {\n if (filesys.existsSync(options.privateKey)) {\n options.key = filesys.readFileSync(options.privateKey);\n } else {\n throw new Error(exceptions.INVALID_PRIVATE_KEY_OPTION);\n }\n }\n }\n if (!isUndefined(options.clientCert)) {\n if (Buffer.isBuffer(options.clientCert)) {\n options.cert = options.clientCert;\n } else {\n if (filesys.existsSync(options.clientCert)) {\n options.cert = filesys.readFileSync(options.clientCert);\n } else {\n throw new Error(exceptions.INVALID_CLIENT_CERT_OPTION);\n }\n }\n }\n\n // Parse PEM files. Options ending in 'Path' must be files\n // and will override options which do not end in 'Path'.\n\n if (filesys.existsSync(options.keyPath)) {\n options.key = filesys.readFileSync(options.keyPath);\n } else if (!isUndefined(options.keyPath)) {\n throw new Error(exceptions.INVALID_KEY_PATH_OPTION);\n }\n if (filesys.existsSync(options.certPath)) {\n options.cert = filesys.readFileSync(options.certPath);\n } else if (!isUndefined(options.certPath)) {\n throw new Error(exceptions.INVALID_CERT_PATH_OPTION);\n }\n if (filesys.existsSync(options.caPath)) {\n options.ca = filesys.readFileSync(options.caPath);\n } else if (!isUndefined(options.caPath)) {\n throw new Error(exceptions.INVALID_CA_PATH_OPTION);\n }\n\n // request certificate from partner\n options.requestCert = true;\n\n // require certificate authentication\n options.rejectUnauthorized = true;\n\n};\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/common/lib/tls-reader.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/device/index.js": +/*!*********************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/device/index.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(process) {/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\nvar events = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\");\nvar inherits = __webpack_require__(/*! util */ \"./node_modules/util/util.js\").inherits;\n\n//npm deps\nvar mqtt = __webpack_require__(/*! mqtt */ \"./node_modules/mqtt/lib/connect/index.js\");\nvar crypto = __webpack_require__(/*! crypto-js */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/index.js\");\n\n//app deps\nvar exceptions = __webpack_require__(/*! ./lib/exceptions */ \"./node_modules/aws-iot-device-sdk/device/lib/exceptions.js\");\nvar isUndefined = __webpack_require__(/*! ../common/lib/is-undefined */ \"./node_modules/aws-iot-device-sdk/common/lib/is-undefined.js\");\nvar tlsReader = __webpack_require__(/*! ../common/lib/tls-reader */ \"./node_modules/aws-iot-device-sdk/common/lib/tls-reader.js\");\nvar path = __webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\");\nvar fs = __webpack_require__(/*! fs */ \"./node_modules/node-libs-browser/mock/empty.js\");\n\n//begin module\nfunction makeTwoDigits(n) {\n if (n > 9) {\n return n;\n } else {\n return '0' + n;\n }\n}\n\nfunction getDateTimeString() {\n var d = new Date();\n\n //\n // The additional ''s are used to force JavaScript to interpret the\n // '+' operator as string concatenation rather than arithmetic.\n //\n return d.getUTCFullYear() + '' +\n makeTwoDigits(d.getUTCMonth() + 1) + '' +\n makeTwoDigits(d.getUTCDate()) + 'T' + '' +\n makeTwoDigits(d.getUTCHours()) + '' +\n makeTwoDigits(d.getUTCMinutes()) + '' +\n makeTwoDigits(d.getUTCSeconds()) + 'Z';\n}\n\nfunction getDateString(dateTimeString) {\n return dateTimeString.substring(0, dateTimeString.indexOf('T'));\n}\n\nfunction getSignatureKey(key, dateStamp, regionName, serviceName) {\n var kDate = crypto.HmacSHA256(dateStamp, 'AWS4' + key, {\n asBytes: true\n });\n var kRegion = crypto.HmacSHA256(regionName, kDate, {\n asBytes: true\n });\n var kService = crypto.HmacSHA256(serviceName, kRegion, {\n asBytes: true\n });\n var kSigning = crypto.HmacSHA256('aws4_request', kService, {\n asBytes: true\n });\n return kSigning;\n}\n\nfunction signUrl(method, scheme, hostname, path, queryParams, accessId, secretKey,\n region, serviceName, payload, today, now, debug, awsSTSToken) {\n\n var signedHeaders = 'host';\n\n var canonicalHeaders = 'host:' + hostname.toLowerCase() + '\\n';\n\n var canonicalRequest = method + '\\n' + // method\n path + '\\n' + // path\n queryParams + '\\n' + // query params\n canonicalHeaders + // headers\n '\\n' + // required\n signedHeaders + '\\n' + // signed header list\n crypto.SHA256(payload, {\n asBytes: true\n }); // hash of payload (empty string)\n\n if (debug === true) {\n console.log('canonical request: ' + canonicalRequest + '\\n');\n }\n\n var hashedCanonicalRequest = crypto.SHA256(canonicalRequest, {\n asBytes: true\n });\n\n if (debug === true) {\n console.log('hashed canonical request: ' + hashedCanonicalRequest + '\\n');\n }\n\n var stringToSign = 'AWS4-HMAC-SHA256\\n' +\n now + '\\n' +\n today + '/' + region + '/' + serviceName + '/aws4_request\\n' +\n hashedCanonicalRequest;\n\n if (debug === true) {\n console.log('string to sign: ' + stringToSign + '\\n');\n }\n\n var signingKey = getSignatureKey(secretKey, today, region, serviceName);\n\n if (debug === true) {\n console.log('signing key: ' + signingKey + '\\n');\n }\n\n var signature = crypto.HmacSHA256(stringToSign, signingKey, {\n asBytes: true\n });\n\n if (debug === true) {\n console.log('signature: ' + signature + '\\n');\n }\n\n var finalParams = queryParams + '&X-Amz-Signature=' + signature;\n\n if (!isUndefined(awsSTSToken)) {\n finalParams += '&X-Amz-Security-Token=' + encodeURIComponent(awsSTSToken);\n }\n\n var url = scheme + hostname + path + '?' + finalParams;\n\n if (debug === true) {\n console.log('url: ' + url + '\\n');\n }\n\n return url;\n}\n\nfunction prepareWebSocketUrl(options, awsAccessId, awsSecretKey, awsSTSToken) {\n var now = getDateTimeString();\n var today = getDateString(now);\n var path = '/mqtt';\n var awsServiceName = 'iotdevicegateway';\n var queryParams = 'X-Amz-Algorithm=AWS4-HMAC-SHA256' +\n '&X-Amz-Credential=' + awsAccessId + '%2F' + today + '%2F' + options.region + '%2F' + awsServiceName + '%2Faws4_request' +\n '&X-Amz-Date=' + now +\n '&X-Amz-SignedHeaders=host';\n var hostName = options.host;\n\n // Include the port number in the hostname if it's not \n // the standard wss port (443).\n //\n if (!isUndefined(options.port) && options.port !== 443) {\n hostName = options.host + ':' + options.port;\n }\n return signUrl('GET', 'wss://', hostName, path, queryParams,\n awsAccessId, awsSecretKey, options.region, awsServiceName, '', today, now, options.debug, awsSTSToken);\n}\n\nfunction prepareWebSocketCustomAuthUrl(options) {\n var path = '/mqtt';\n var hostName = options.host;\n\n // Include the port number in the hostname if it's not \n // the standard wss port (443).\n //\n if (!isUndefined(options.port) && options.port !== 443) {\n hostName = options.host + ':' + options.port;\n }\n\n return 'wss://' + hostName + path;\n}\n\nfunction arrayEach(array, iterFunction) {\n for (var idx in array) {\n if (Object.prototype.hasOwnProperty.call(array, idx)) {\n iterFunction.call(this, array[idx], parseInt(idx, 10));\n }\n }\n}\n\nfunction getCredentials(ini) {\n //Get shared credential function from AWS SDK.\n var map = {};\n var currentSection ={};\n arrayEach(ini.split(/\\r?\\n/), function(line) {\n line = line.split(/(^|\\s)[;#]/)[0]; // remove comments\n var section = line.match(/^\\s*\\[([^\\[\\]]+)\\]\\s*$/);\n if (section) {\n currentSection = section[1];\n } else if (currentSection) {\n var item = line.match(/^\\s*(.+?)\\s*=\\s*(.+?)\\s*$/);\n if (item) {\n map[currentSection] = map[currentSection] || {};\n map[currentSection][item[1]] = item[2];\n }\n }\n });\n return map;\n}\n\n//\n// This method is the exposed module; it validates the mqtt options,\n// creates a secure mqtt connection via TLS, and returns the mqtt\n// connection instance.\n//\nfunction DeviceClient(options) {\n //\n // Force instantiation using the 'new' operator; this will cause inherited\n // constructors (e.g. the 'events' class) to be called.\n //\n if (!(this instanceof DeviceClient)) {\n return new DeviceClient(options);\n }\n //\n // A copy of 'this' for use inside of closures\n //\n var that = this;\n\n //\n // Offline Operation\n //\n // The connection to AWS IoT can be in one of three states:\n //\n // 1) Inactive\n // 2) Established\n // 3) Stable\n //\n // During state 1), publish operations are placed in a queue\n // (\"filling\")\n //\n // During states 2) and 3), any operations present in the queue\n // are sent to the mqtt client for completion (\"draining\").\n //\n // In all states, subscriptions are tracked in a cache\n //\n // A \"draining interval\" is used to specify the rate at which\n // which operations are drained from the queue.\n //\n // +- - - - - - - - - - - - - - - - - - - - - - - - +\n // | |\n // \n // | FILLING | \n // \n // | |\n // +-----------------------------+ \n // | | | |\n // | | \n // | v | |\n // +- - Established Inactive - -+\n // | | ^ |\n // | | \n // | | | |\n // +----------> Stable ----------+ \n // | |\n // \n // | DRAINING | \n // \n // | |\n // +- - - - - - - - - - - - - - - - - - - - - - - - +\n //\n //\n // Draining Operation\n //\n // During draining, existing subscriptions are re-sent,\n // followed by any publishes which occurred while offline.\n // \n\n //\n // Publish cache used during filling\n //\n var offlinePublishQueue = [];\n var offlineQueueing = true;\n var offlineQueueMaxSize = 0;\n var offlineQueueDropBehavior = 'oldest'; // oldest or newest\n offlinePublishQueue.length = 0;\n\n //\n // Subscription queue for subscribe/unsubscribe requests received when offline\n // We do not want an unbounded queue so for now limit to current max subs in AWS IoT\n //\n var offlineSubscriptionQueue = [];\n var offlineSubscriptionQueueMaxSize = 50;\n offlineSubscriptionQueue.length = 0;\n\n //\n // Subscription cache; active if autoResubscribe === true\n //\n var activeSubscriptions = [];\n var autoResubscribe = true;\n activeSubscriptions.length = 0;\n\n //\n // Cloned subscription cache; active during initial draining.\n //\n var clonedSubscriptions = [];\n clonedSubscriptions.length = 0;\n\n //\n // Contains the operational state of the connection\n //\n var connectionState = 'inactive';\n\n //\n // Used to time draining operations; active during draining.\n //\n var drainingTimer = null;\n var drainTimeMs = 250;\n\n //Default keep alive time interval in seconds.\n var defaultKeepalive = 300;\n //\n // These properties control the reconnect behavior of the MQTT Client. If \n // the MQTT client becomes disconnected, it will attempt to reconnect after \n // a quiet period; this quiet period doubles with each reconnection attempt,\n // e.g. 1 seconds, 2 seconds, 2, 8, 16, 32, etc... up until a maximum \n // reconnection time is reached.\n //\n // If a connection is active for the minimum connection time, the quiet \n // period is reset to the initial value.\n //\n // baseReconnectTime: the time in seconds to wait before the first \n // reconnect attempt\n //\n // minimumConnectionTime: the time in seconds that a connection must be \n // active before resetting the current reconnection time to the base \n // reconnection time\n //\n // maximumReconnectTime: the maximum time in seconds to wait between \n // reconnect attempts\n //\n // The defaults for these values are:\n //\n // baseReconnectTime: 1 seconds\n // minimumConnectionTime: 20 seconds\n // maximumReconnectTime: 128 seconds\n //\n var baseReconnectTimeMs = 1000;\n var minimumConnectionTimeMs = 20000;\n var maximumReconnectTimeMs = 128000;\n var currentReconnectTimeMs;\n\n //\n // Used to measure the length of time the connection has been active to\n // know if it's stable or not. Active beginning from receipt of a 'connect'\n // event (e.g. received CONNACK) until 'minimumConnectionTimeMs' has elapsed.\n //\n var connectionTimer = null;\n\n //\n // Credentials when authenticating via WebSocket/SigV4\n //\n var awsAccessId;\n var awsSecretKey;\n var awsSTSToken;\n //\n // Validate options, set default reconnect period if not specified.\n //\n var metricPrefix = \"?SDK=JavaScript&Version=\";\n var pjson = __webpack_require__(/*! ../package.json */ \"./node_modules/aws-iot-device-sdk/package.json\");\n var sdkVersion = pjson.version;\n var defaultUsername = metricPrefix + sdkVersion;\n\n if (isUndefined(options) ||\n Object.keys(options).length === 0) {\n throw new Error(exceptions.INVALID_CONNECT_OPTIONS);\n }\n if (isUndefined(options.keepalive)) {\n options.keepalive = defaultKeepalive;\n }\n //\n // Metrics will be enabled by default unless the user explicitly disables it\n //\n if (isUndefined(options.enableMetrics) || options.enableMetrics === true){\n if (isUndefined(options.username)) {\n options.username = defaultUsername;\n } else {\n options.username += defaultUsername;\n }\n }\n if (!isUndefined(options.baseReconnectTimeMs)) {\n baseReconnectTimeMs = options.baseReconnectTimeMs;\n }\n if (!isUndefined(options.minimumConnectionTimeMs)) {\n minimumConnectionTimeMs = options.minimumConnectionTimeMs;\n }\n if (!isUndefined(options.maximumReconnectTimeMs)) {\n maximumReconnectTimeMs = options.maximumReconnectTimeMs;\n }\n if (!isUndefined(options.drainTimeMs)) {\n drainTimeMs = options.drainTimeMs;\n }\n if (!isUndefined(options.autoResubscribe)) {\n autoResubscribe = options.autoResubscribe;\n }\n if (!isUndefined(options.offlineQueueing)) {\n offlineQueueing = options.offlineQueueing;\n }\n if (!isUndefined(options.offlineQueueMaxSize)) {\n offlineQueueMaxSize = options.offlineQueueMaxSize;\n }\n if (!isUndefined(options.offlineQueueDropBehavior)) {\n offlineQueueDropBehavior = options.offlineQueueDropBehavior;\n }\n currentReconnectTimeMs = baseReconnectTimeMs;\n options.reconnectPeriod = currentReconnectTimeMs;\n options.fastDisconnectDetection = true;\n //\n //SDK has its own logic to deal with auto resubscribe\n //\n options.resubscribe = false;\n\n //\n // Verify that the reconnection timing parameters make sense.\n //\n if (options.baseReconnectTimeMs <= 0) {\n throw new Error(exceptions.INVALID_RECONNECT_TIMING);\n }\n if (maximumReconnectTimeMs < baseReconnectTimeMs) {\n throw new Error(exceptions.INVALID_RECONNECT_TIMING);\n }\n if (minimumConnectionTimeMs < baseReconnectTimeMs) {\n throw new Error(exceptions.INVALID_RECONNECT_TIMING);\n }\n //\n // Verify that the other optional parameters make sense.\n //\n if (offlineQueueDropBehavior !== 'newest' &&\n offlineQueueDropBehavior !== 'oldest') {\n throw new Error(exceptions.INVALID_OFFLINE_QUEUEING_PARAMETERS);\n }\n if (offlineQueueMaxSize < 0) {\n throw new Error(exceptions.INVALID_OFFLINE_QUEUEING_PARAMETERS);\n }\n\n // set protocol, do not override existing definitions if available\n if (isUndefined(options.protocol)) {\n options.protocol = 'mqtts';\n }\n\n if (isUndefined(options.host)) {\n throw new Error(exceptions.INVALID_CONNECT_OPTIONS);\n }\n\n if (options.protocol === 'mqtts') {\n // set port, do not override existing definitions if available\n if (isUndefined(options.port)) {\n options.port = 8883;\n }\n\n //read and map certificates\n tlsReader(options);\n } else if (options.protocol === 'wss' || options.protocol === 'wss-custom-auth') {\n if (options.protocol === 'wss') {\n //\n // AWS access id and secret key \n // It first check Input options and Environment variables \n // If that not available, it will try to load credentials from default credential file\n if (!isUndefined(options.accessKeyId)) {\n awsAccessId = options.accessKeyId;\n } else {\n awsAccessId = process.env.AWS_ACCESS_KEY_ID;\n }\n if (!isUndefined(options.secretKey)) {\n awsSecretKey = options.secretKey;\n } else {\n awsSecretKey = process.env.AWS_SECRET_ACCESS_KEY;\n }\n if (!isUndefined(options.sessionToken)) {\n awsSTSToken = options.sessionToken;\n } else {\n awsSTSToken = process.env.AWS_SESSION_TOKEN;\n }\n if (isUndefined(awsAccessId) || isUndefined(awsSecretKey)) {\n var filename;\n try {\n if (!isUndefined(options.filename)) {\n filename = options.filename;\n } else {\n filename = _loadDefaultFilename();\n }\n var user_profile = options.profile || process.env.AWS_PROFILE || 'default';\n var creds = getCredentials(fs.readFileSync(filename, 'utf-8'));\n var profile = creds[user_profile];\n awsAccessId = profile.aws_access_key_id;\n awsSecretKey = profile.aws_secret_access_key;\n awsSTSToken = profile.aws_session_token;\n } catch (e) {\n console.log(e);\n console.log('Failed to read credentials from ' + filename);\n }\n }\n // AWS Access Key ID and AWS Secret Key must be defined\n if (isUndefined(awsAccessId) || (isUndefined(awsSecretKey))) {\n console.log('To connect via WebSocket/SigV4, AWS Access Key ID and AWS Secret Key must be passed either in options or as environment variables; see README.md');\n throw new Error(exceptions.INVALID_CONNECT_OPTIONS);\n }\n } else {\n if (isUndefined(options.customAuthHeaders)) {\n console.log('To authenticate with a custom authorizer, you must provide the required HTTP headers; see README.md');\n throw new Error(exceptions.INVALID_CONNECT_OPTIONS);\n }\n }\n\n if (!isUndefined(options.host) && isUndefined(options.region)) {\n var pattern = /[a-zA-Z0-9]+\\.iot\\.([a-z]+-[a-z]+-[0-9]+)\\.amazonaws\\..+/;\n var region = pattern.exec(options.host);\n if (region === null) {\n console.log('Host endpoint is not valid');\n throw new Error(exceptions.INVALID_CONNECT_OPTIONS);\n } else {\n options.region = region[1];\n }\n }\n // set port, do not override existing definitions if available\n if (isUndefined(options.port)) {\n options.port = 443;\n }\n // check websocketOptions and ensure that the protocol is defined\n if (isUndefined(options.websocketOptions)) {\n options.websocketOptions = {\n protocol: 'mqttv3.1'\n };\n } else {\n options.websocketOptions.protocol = 'mqttv3.1';\n }\n\n if (options.protocol === 'wss-custom-auth') {\n options.websocketOptions.headers = options.customAuthHeaders;\n }\n } \n\n if ((!isUndefined(options)) && (options.debug === true)) {\n console.log(options);\n console.log('attempting new mqtt connection...');\n }\n //connect and return the client instance to map all mqttjs apis\n\n var protocols = {};\n protocols.mqtts = __webpack_require__(/*! ./lib/tls */ \"./node_modules/aws-iot-device-sdk/device/lib/tls.js\");\n protocols.wss = __webpack_require__(/*! ./lib/ws */ \"./node_modules/aws-iot-device-sdk/device/lib/ws.js\");\n\n function _loadDefaultFilename() {\n var home = process.env.HOME ||\n process.env.USERPROFILE || \n (process.env.HOMEPATH ? ((process.env.HOMEDRIVE || 'C:/') + process.env.HOMEPATH) : null);\n return path.join(home, '.aws', 'credentials');\n\n }\n function _addToSubscriptionCache(topic, options) {\n var matches = activeSubscriptions.filter(function(element) {\n return element.topic === topic;\n });\n //\n // Add the element only if it doesn't already exist.\n //\n if (matches.length === 0) {\n activeSubscriptions.push({\n topic: topic,\n options: options\n });\n }\n }\n\n function _deleteFromSubscriptionCache(topic, options) {\n var remaining = activeSubscriptions.filter(function(element) {\n return element.topic !== topic;\n });\n activeSubscriptions = remaining;\n }\n\n function _updateSubscriptionCache(operation, topics, options) {\n var opFunc = null;\n\n //\n // Don't cache subscriptions if auto-resubscribe is disabled\n // \n if (autoResubscribe === false) {\n return;\n }\n if (operation === 'subscribe') {\n opFunc = _addToSubscriptionCache;\n } else if (operation === 'unsubscribe') {\n opFunc = _deleteFromSubscriptionCache;\n }\n //\n // Test to see if 'topics' is an array and if so, iterate.\n //\n if (Object.prototype.toString.call(topics) === '[object Array]') {\n topics.forEach(function(item, index, array) {\n opFunc(item, options);\n });\n } else {\n opFunc(topics, options);\n }\n }\n\n //\n // Return true if the connection is currently in a 'filling' \n // state\n //\n function _filling() {\n return connectionState === 'inactive';\n }\n\n function _wrapper(client) {\n var protocol = options.protocol;\n if (protocol === 'wss') {\n var url;\n //\n // If the access id and secret key are available, prepare the URL. \n // Otherwise, set the url to an invalid value.\n //\n if (awsAccessId === '' || awsSecretKey === '') {\n url = 'wss://no-credentials-available';\n } else {\n url = prepareWebSocketUrl(options, awsAccessId, awsSecretKey, awsSTSToken);\n }\n\n if (options.debug === true) {\n console.log('using websockets, will connect to \\'' + url + '\\'...');\n }\n\n options.url = url;\n } else if (protocol === 'wss-custom-auth') {\n options.url = prepareWebSocketCustomAuthUrl(options);\n if (options.debug === true) {\n console.log('using websockets custom auth, will connect to \\'' + options.url + '\\'...');\n }\n // Treat the request as a standard websocket request from here onwards\n protocol = 'wss';\n }\n return protocols[protocol](client, options);\n }\n\n var device = new mqtt.MqttClient(_wrapper, options);\n\n //handle events from the mqtt client\n\n //\n // Timeout expiry function for the connection timer; once a connection\n // is stable, reset the current reconnection time to the base value. \n //\n function _markConnectionStable() {\n currentReconnectTimeMs = baseReconnectTimeMs;\n device.options.reconnectPeriod = currentReconnectTimeMs;\n //\n // Mark this timeout as expired\n //\n connectionTimer = null;\n connectionState = 'stable';\n }\n //\n // Trim the offline queue if required; returns true if another\n // element can be placed in the queue\n //\n function _trimOfflinePublishQueueIfNecessary() {\n var rc = true;\n\n if ((offlineQueueMaxSize > 0) &&\n (offlinePublishQueue.length >= offlineQueueMaxSize)) {\n //\n // The queue has reached its maximum size, trim it\n // according to the defined drop behavior.\n //\n if (offlineQueueDropBehavior === 'oldest') {\n offlinePublishQueue.shift();\n } else {\n rc = false;\n }\n }\n return rc;\n }\n\n //\n // Timeout expiry function for the drain timer; once a connection\n // has been established, begin draining cached transactions.\n //\n function _drainOperationQueue() {\n\n //\n // Handle our active subscriptions first, using a cloned\n // copy of the array. We shift them out one-by-one until\n // all have been processed, leaving the official record\n // of active subscriptions untouched.\n // \n var subscription = clonedSubscriptions.shift();\n\n if (!isUndefined(subscription)) {\n //\n // If the 3rd argument (namely callback) is not present, we will\n // use two-argument form to call mqtt.Client#subscribe(), which\n // supports both subscribe(topics, options) and subscribe(topics, callback).\n //\n if (!isUndefined(subscription.callback)) {\n device.subscribe(subscription.topic, subscription.options, subscription.callback);\n } else {\n device.subscribe(subscription.topic, subscription.options);\n }\n } else {\n //\n // If no remaining active subscriptions to process,\n // then handle subscription requests queued while offline.\n //\n var req = offlineSubscriptionQueue.shift();\n\n if (!isUndefined(req)) {\n _updateSubscriptionCache(req.type, req.topics, req.options);\n if (req.type === 'subscribe') {\n if (!isUndefined(req.callback)) {\n device.subscribe(req.topics, req.options, req.callback);\n } else {\n device.subscribe(req.topics, req.options);\n }\n } else if (req.type === 'unsubscribe') {\n device.unsubscribe(req.topics, req.callback);\n }\n } else {\n //\n // If no active or queued subscriptions remaining to process,\n // then handle queued publish operations.\n //\n var offlinePublishMessage = offlinePublishQueue.shift();\n\n if (!isUndefined(offlinePublishMessage)) {\n device.publish(offlinePublishMessage.topic,\n offlinePublishMessage.message,\n offlinePublishMessage.options,\n offlinePublishMessage.callback);\n }\n if (offlinePublishQueue.length === 0) {\n //\n // The subscription and offlinePublishQueue queues are fully drained,\n // cancel the draining timer.\n //\n clearInterval(drainingTimer);\n drainingTimer = null;\n }\n }\n }\n }\n //\n // Event handling - *all* events generated by the mqtt.js client must be\n // handled here, *and* propagated upwards.\n //\n\n device.on('connect', function(connack) {\n //\n // If not already running, start the connection timer.\n //\n if (connectionTimer === null) {\n connectionTimer = setTimeout(_markConnectionStable,\n minimumConnectionTimeMs);\n }\n connectionState = 'established';\n //\n // If not already running, start the draining timer and \n // clone the active subscriptions.\n //\n if (drainingTimer === null) {\n clonedSubscriptions = activeSubscriptions.slice(0);\n drainingTimer = setInterval(_drainOperationQueue,\n drainTimeMs);\n }\n that.emit('connect', connack);\n });\n device.on('close', function(err) {\n if (!isUndefined(err)) {\n that.emit('error', err);\n }\n if ((!isUndefined(options)) && (options.debug === true)) {\n console.log('connection lost - will attempt reconnection in ' +\n device.options.reconnectPeriod / 1000 + ' seconds...');\n }\n //\n // Clear the connection and drain timers\n //\n clearTimeout(connectionTimer);\n connectionTimer = null;\n clearInterval(drainingTimer);\n drainingTimer = null;\n\n //\n // Mark the connection state as inactive\n //\n connectionState = 'inactive';\n\n that.emit('close');\n });\n device.on('reconnect', function() {\n //\n // Update the current reconnect timeout; this will be the\n // next timeout value used if this connect attempt fails.\n // \n currentReconnectTimeMs = currentReconnectTimeMs * 2;\n currentReconnectTimeMs = Math.min(maximumReconnectTimeMs, currentReconnectTimeMs);\n device.options.reconnectPeriod = currentReconnectTimeMs;\n\n that.emit('reconnect');\n });\n device.on('offline', function() {\n that.emit('offline');\n });\n device.on('error', function(error) {\n that.emit('error', error);\n });\n device.on('packetsend', function(packet) {\n that.emit('packetsend', packet);\n });\n device.on('packetreceive', function(packet) {\n that.emit('packetreceive', packet);\n });\n device.on('message', function(topic, message, packet) {\n that.emit('message', topic, message, packet);\n });\n //\n // The signatures of these methods *must* match those of the mqtt.js\n // client.\n //\n this.publish = function(topic, message, options, callback) {\n //\n // If filling or still draining, push this publish operation \n // into the offline operations queue; otherwise, perform it\n // immediately.\n //\n if (offlineQueueing === true && (_filling() || drainingTimer !== null)) {\n if (_trimOfflinePublishQueueIfNecessary()) {\n offlinePublishQueue.push({\n topic: topic,\n message: message,\n options: options,\n callback: callback\n });\n }\n } else {\n if (offlineQueueing === true || !_filling()) {\n device.publish(topic, message, options, callback);\n }\n }\n };\n this.subscribe = function(topics, options, callback) {\n if (!_filling() || autoResubscribe === false) {\n _updateSubscriptionCache('subscribe', topics, options); // we do not store callback in active cache\n //\n // If the 3rd argument (namely callback) is not present, we will\n // use two-argument form to call mqtt.Client#subscribe(), which\n // supports both subscribe(topics, options) and subscribe(topics, callback).\n //\n if (!isUndefined(callback)) {\n device.subscribe(topics, options, callback);\n } else {\n device.subscribe(topics, options);\n } \n } else {\n // we're offline - queue this subscription request\n if (offlineSubscriptionQueue.length < offlineSubscriptionQueueMaxSize) {\n offlineSubscriptionQueue.push({\n type: 'subscribe',\n topics: topics,\n options: options,\n callback: callback\n });\n } else {\n that.emit('error', new Error('Maximum queued offline subscription reached'));\n }\n }\n };\n this.unsubscribe = function(topics, callback) {\n if (!_filling() || autoResubscribe === false) {\n _updateSubscriptionCache('unsubscribe', topics);\n device.unsubscribe(topics, callback);\n } else {\n // we're offline - queue this unsubscribe request\n if (offlineSubscriptionQueue.length < offlineSubscriptionQueueMaxSize) {\n offlineSubscriptionQueue.push({\n type: 'unsubscribe',\n topics: topics,\n options: options,\n callback: callback\n });\n }\n }\n };\n this.end = function(force, callback) {\n device.end(force, callback);\n };\n\n this.handleMessage = device.handleMessage.bind(device);\n\n device.handleMessage = function(packet, callback) {\n that.handleMessage(packet, callback);\n };\n\n this.updateWebSocketCredentials = function(accessKeyId, secretKey, sessionToken, expiration) {\n awsAccessId = accessKeyId;\n awsSecretKey = secretKey;\n awsSTSToken = sessionToken;\n };\n this.getWebsocketHeaders = function() {\n return options.websocketOptions.headers;\n };\n //\n // Call this function to update the custom auth headers\n //\n this.updateCustomAuthHeaders = function(newHeaders) {\n options.websocketOptions.headers = newHeaders;\n };\n //\n // Used for integration testing only\n //\n this.simulateNetworkFailure = function() {\n device.stream.emit('error', new Error('simulated connection error'));\n device.stream.end();\n };\n}\n\n//\n// Allow instances to listen in on events that we produce for them\n//\ninherits(DeviceClient, events.EventEmitter);\n\nmodule.exports = DeviceClient;\nmodule.exports.DeviceClient = DeviceClient;\n\n//\n// Exported for unit testing only\n//\nmodule.exports.prepareWebSocketUrl = prepareWebSocketUrl;\nmodule.exports.prepareWebSocketCustomAuthUrl = prepareWebSocketCustomAuthUrl;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/device/index.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/device/lib/exceptions.js": +/*!******************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/device/lib/exceptions.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\n\n//npm deps\n\n//app deps\n\n//begin module\nmodule.exports = {\n INVALID_CONNECT_OPTIONS: 'Invalid connect options supplied.',\n INVALID_CLIENT_ID_OPTION: 'Invalid \"clientId\" (mqtt client id) option supplied.',\n INVALID_RECONNECT_TIMING: 'Invalid reconnect timing options supplied.',\n INVALID_OFFLINE_QUEUEING_PARAMETERS: 'Invalid offline queueing options supplied.'\n};\n\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/device/lib/exceptions.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/device/lib/tls.js": +/*!***********************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/device/lib/tls.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\nvar tls = __webpack_require__(/*! tls */ \"./node_modules/node-libs-browser/mock/empty.js\");\n\n//npm deps\n\n//app deps\n\nfunction buildBuilder(mqttClient, opts) {\n var connection;\n\n connection = tls.connect(opts);\n\n function handleTLSerrors(err) {\n mqttClient.emit('error', err);\n connection.end();\n }\n\n connection.on('secureConnect', function() {\n if (!connection.authorized) {\n connection.emit('error', new Error('TLS not authorized'));\n } else {\n connection.removeListener('error', handleTLSerrors);\n }\n });\n\n connection.on('error', handleTLSerrors);\n return connection;\n}\n\nmodule.exports = buildBuilder;\n\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/device/lib/tls.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/device/lib/ws.js": +/*!**********************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/device/lib/ws.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\n\n//npm deps\nconst websocket = __webpack_require__(/*! websocket-stream */ \"./node_modules/websocket-stream/stream.js\");\n\n//app deps\n\nfunction buildBuilder(client, opts) {\n return websocket(opts.url, ['mqttv3.1'], opts.websocketOptions);\n}\n\nmodule.exports = buildBuilder;\n\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/device/lib/ws.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/index.js": +/*!**************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/index.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n/*\n * Expose AWS IoT Embedded Javascript SDK modules\n */\nmodule.exports.device = __webpack_require__(/*! ./device */ \"./node_modules/aws-iot-device-sdk/device/index.js\");\nmodule.exports.thingShadow = __webpack_require__(/*! ./thing */ \"./node_modules/aws-iot-device-sdk/thing/index.js\");\nmodule.exports.jobs = __webpack_require__(/*! ./jobs */ \"./node_modules/aws-iot-device-sdk/jobs/index.js\");\n\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/index.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/jobs/index.js": +/*!*******************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/jobs/index.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/*\n * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\nvar events = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\");\nvar inherits = __webpack_require__(/*! util */ \"./node_modules/util/util.js\").inherits;\n\n//npm deps\n\n//app deps\nvar deviceModule = __webpack_require__(/*! ../device */ \"./node_modules/aws-iot-device-sdk/device/index.js\");\nvar isUndefined = __webpack_require__(/*! ../common/lib/is-undefined */ \"./node_modules/aws-iot-device-sdk/common/lib/is-undefined.js\");\n\n//\n// private functions\n//\n\nfunction isJobTopic(topicTokens) {\n //\n // Job topics have the forms:\n //\n // $aws/things/{thingName}/jobs/#\n //\n return (topicTokens[0] === '$aws' && topicTokens[1] === 'things' && topicTokens[3] === 'jobs');\n}\n\nfunction buildJobTopic(thingName, jobId, operation) {\n var result = '$aws/things/' + thingName + '/jobs/';\n\n // check for omitted jobId and fixup parameters\n if (isUndefined(operation)) {\n operation = jobId;\n } else {\n result += jobId.toString() + '/';\n }\n\n result += operation;\n\n return result;\n}\n\n\n//begin module\n\nfunction jobsClient(options) {\n //\n // Force instantiation using the 'new' operator; this will cause inherited\n // constructors (e.g. the 'events' class) to be called.\n //\n if (!(this instanceof jobsClient)) {\n return new jobsClient(options);\n }\n\n //\n // A copy of 'this' for use inside of closures\n //\n var that = this;\n\n //\n // Track job subscriptions\n //\n // [\n // { \n // \"thingName\": \"string\",\n // \"operations\": [\n // { \n // \"operationName\": \"string\", // if null then treat as default\n // \"currentJob\": job,\n // \"callback\": callback\n // }\n // ]\n // }\n // ]\n //\n var jobSubscriptions = [];\n\n //\n // Instantiate the device\n //\n var device = deviceModule.DeviceClient(options);\n\n //\n // Private function to update job execution status for given thing\n //\n this._updateJobStatus = function(thingName, job, status, statusDetails, callback) {\n // Check for omitted statusDetails and update parameters\n if (typeof statusDetails === \"function\") {\n callback = statusDetails;\n statusDetails = undefined;\n }\n\n if ((!isUndefined(options)) && (options.debug === true)) {\n console.log('updateJobStatus:', { thingName: thingName, jobId: job.id, status: status, statusDetails: statusDetails });\n }\n\n device.publish(buildJobTopic(thingName, job.id, 'update'), JSON.stringify({ status: status, statusDetails: statusDetails}), null, function(err){\n if (isUndefined(err)) {\n job.status = { status: status, statusDetails: statusDetails };\n }\n\n if (!isUndefined(callback)) {\n callback(err);\n }\n });\n }\n\n //\n // Private function to build job object for passing to callback supplied in subscribeToJobs\n //\n this._buildJobObject = function(thingName, jobExecution) {\n if (isUndefined(jobExecution) || isUndefined(jobExecution.jobId)) {\n return null;\n }\n\n var job = {};\n\n job.id = jobExecution.jobId;\n job.document = jobExecution.jobDocument;\n job.operation = job.document.operation;\n job.status = { status: jobExecution.status, statusDetails: jobExecution.statusDetails };\n\n job.inProgress = function(statusDetails, callback) {\n that._updateJobStatus(thingName, job, 'IN_PROGRESS', statusDetails, callback);\n }\n\n job.failed = function(statusDetails, callback) {\n that._updateJobStatus(thingName, job, 'FAILED', statusDetails, callback);\n }\n\n job.succeeded = function(statusDetails, callback) {\n that._updateJobStatus(thingName, job, 'SUCCEEDED', statusDetails, callback);\n }\n\n return job;\n }\n\n //\n // Private function to handle job messages and process them accordingly\n //\n this._handleMessages = function(topic, payload) {\n var topicTokens = topic.split('/');\n\n // If not a job topic emit to application and return\n if (!isJobTopic(topicTokens)) {\n that.emit('message', topic, payload);\n return;\n }\n\n var thingName = topicTokens[2];\n\n var thing = jobSubscriptions.find(function(elem) { \n return elem.thingName === thingName; \n });\n\n // Do nothing if thing not found in job subscriptions \n if (isUndefined(thing)) {\n return;\n }\n\n var jobExecutionData = {};\n\n try {\n jobExecutionData = JSON.parse(payload.toString());\n } catch (err) {\n if (options.debug === true) {\n console.error('failed parsing JSON \\'' + payload.toString() + '\\', ' + err);\n }\n return;\n }\n\n if (isUndefined(jobExecutionData.execution) || \n isUndefined(jobExecutionData.execution.jobId) || \n isUndefined(jobExecutionData.execution.jobDocument)) {\n return;\n }\n\n var operationName = jobExecutionData.execution.jobDocument.operation;\n var operation = thing.operations.find(function(elem) { \n return (isUndefined(operationName) ? isUndefined(elem.operationName) : operationName === elem.operationName); \n });\n\n // If operation subscription not found by operation name then look for default operation subscription\n if (isUndefined(operation)) {\n operation = thing.operations.find(function(elem) { return (isUndefined(elem.operationName)); });\n\n if (isUndefined(operation)) {\n return;\n }\n }\n\n operation.callback(null, that._buildJobObject(thingName, jobExecutionData.execution));\n }\n\n this.subscribeToJobs = function(thingName, operationName, callback) {\n // Check for omitted optional operationName and fixup parameters\n if (isUndefined(callback)) {\n callback = operationName;\n operationName = null;\n }\n\n if ((!isUndefined(options)) && (options.debug === true)) {\n console.log('subscribeToJobs:', { thingName: thingName, operationName: operationName });\n }\n\n var thing = jobSubscriptions.find(function(elem) { \n return elem.thingName === thingName; \n });\n\n // Check for previously unseen thing and add to job subscriptions\n if (isUndefined(thing)) {\n thing = { thingName: thingName, operations: [] };\n jobSubscriptions.push(thing);\n\n device.subscribe([ buildJobTopic(thingName, '$next/get/accepted'), buildJobTopic(thingName, 'notify-next') ], function(err, granted) {\n if (!isUndefined(err)) {\n callback(err);\n }\n });\n }\n\n // Find existing subscription for the given operationName\n var operation = thing.operations.find(function(elem) { \n return (isUndefined(operationName) ? isUndefined(elem.operationName) : operationName === elem.operationName); \n });\n\n // If existing subscription found then update callback, otherwise create new entry in the thing's operations array\n if (!isUndefined(operation)) {\n operation.callback = callback;\n } else {\n operation = { operationName: operationName, callback: callback };\n thing.operations.push(operation);\n }\n }\n\n this.unsubscribeFromJobs = function(thingName, operationName, callback) {\n // Check for omitted optional operationName and fixup parameters\n if (isUndefined(callback)) {\n callback = operationName;\n operationName = null;\n }\n\n if ((!isUndefined(options)) && (options.debug === true)) {\n console.log('unsubscribeFromJobs:', { thingName: thingName, operationName: operationName });\n }\n\n var iThing = jobSubscriptions.findIndex(function(elem) { \n return elem.thingName === thingName;\n });\n\n var notFoundError = new Error('subscription not found for given thing');\n\n // Check for previously unseen thing and add to job subscriptions and publish to get to retrieve first job to be executed\n if (iThing < 0) {\n callback(notFoundError);\n return;\n }\n\n var iOperation = jobSubscriptions[iThing].operations.findIndex(function (elem) {\n return (isUndefined(operationName) ? isUndefined(elem.operationName) : operationName === elem.operationName);\n });\n\n if (iOperation < 0) {\n callback(notFoundError);\n return;\n }\n\n jobSubscriptions[iThing].operations.splice(iOperation, 1);\n\n if (jobSubscriptions[iThing].operations.length === 0) {\n jobSubscriptions.splice(iThing, 1);\n device.unsubscribe([ buildJobTopic(thingName, '$next/get/accepted'), buildJobTopic(thingName, 'notify-next') ], callback);\n return;\n }\n\n callback();\n }\n\n this.startJobNotifications = function(thingName, callback) {\n if ((!isUndefined(options)) && (options.debug === true)) {\n console.log('startJobNotifications:', { thingName: thingName });\n }\n\n device.publish(buildJobTopic(thingName, '$next', 'get'), '{}', callback);\n }\n\n device.on('connect', function() {\n that.emit('connect');\n });\n device.on('close', function() {\n that.emit('close');\n });\n device.on('reconnect', function() {\n that.emit('reconnect');\n });\n device.on('offline', function() {\n that.emit('offline');\n });\n device.on('error', function(error) {\n that.emit('error', error);\n });\n\n device.on('message', that._handleMessages);\n\n this.publish = device.publish;\n this.subscribe = device.subscribe;\n this.unsubscribe = device.unsubscribe;\n this.end = device.end;\n this.handleMessage = device.handleMessage;\n this.updateWebSocketCredentials = device.updateWebSocketCredentials;\n\n //\n // Used for integration testing only\n //\n this.simulateNetworkFailure = device.simulateNetworkFailure;\n}\n\n//\n// Allow instances to listen in on events that we produce for them\n//\ninherits(jobsClient, events.EventEmitter);\n\nmodule.exports = jobsClient;\n\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/jobs/index.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/aes.js": +/*!***********************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/aes.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./enc-base64 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js\"), __webpack_require__(/*! ./md5 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js\"), __webpack_require__(/*! ./evpkdf */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Lookup tables\n\t var SBOX = [];\n\t var INV_SBOX = [];\n\t var SUB_MIX_0 = [];\n\t var SUB_MIX_1 = [];\n\t var SUB_MIX_2 = [];\n\t var SUB_MIX_3 = [];\n\t var INV_SUB_MIX_0 = [];\n\t var INV_SUB_MIX_1 = [];\n\t var INV_SUB_MIX_2 = [];\n\t var INV_SUB_MIX_3 = [];\n\n\t // Compute lookup tables\n\t (function () {\n\t // Compute double table\n\t var d = [];\n\t for (var i = 0; i < 256; i++) {\n\t if (i < 128) {\n\t d[i] = i << 1;\n\t } else {\n\t d[i] = (i << 1) ^ 0x11b;\n\t }\n\t }\n\n\t // Walk GF(2^8)\n\t var x = 0;\n\t var xi = 0;\n\t for (var i = 0; i < 256; i++) {\n\t // Compute sbox\n\t var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);\n\t sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;\n\t SBOX[x] = sx;\n\t INV_SBOX[sx] = x;\n\n\t // Compute multiplication\n\t var x2 = d[x];\n\t var x4 = d[x2];\n\t var x8 = d[x4];\n\n\t // Compute sub bytes, mix columns tables\n\t var t = (d[sx] * 0x101) ^ (sx * 0x1010100);\n\t SUB_MIX_0[x] = (t << 24) | (t >>> 8);\n\t SUB_MIX_1[x] = (t << 16) | (t >>> 16);\n\t SUB_MIX_2[x] = (t << 8) | (t >>> 24);\n\t SUB_MIX_3[x] = t;\n\n\t // Compute inv sub bytes, inv mix columns tables\n\t var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);\n\t INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);\n\t INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);\n\t INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);\n\t INV_SUB_MIX_3[sx] = t;\n\n\t // Compute next counter\n\t if (!x) {\n\t x = xi = 1;\n\t } else {\n\t x = x2 ^ d[d[d[x8 ^ x2]]];\n\t xi ^= d[d[xi]];\n\t }\n\t }\n\t }());\n\n\t // Precomputed Rcon lookup\n\t var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\n\n\t /**\n\t * AES block cipher algorithm.\n\t */\n\t var AES = C_algo.AES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\t var keySize = key.sigBytes / 4;\n\n\t // Compute number of rounds\n\t var nRounds = this._nRounds = keySize + 6\n\n\t // Compute number of key schedule rows\n\t var ksRows = (nRounds + 1) * 4;\n\n\t // Compute key schedule\n\t var keySchedule = this._keySchedule = [];\n\t for (var ksRow = 0; ksRow < ksRows; ksRow++) {\n\t if (ksRow < keySize) {\n\t keySchedule[ksRow] = keyWords[ksRow];\n\t } else {\n\t var t = keySchedule[ksRow - 1];\n\n\t if (!(ksRow % keySize)) {\n\t // Rot word\n\t t = (t << 8) | (t >>> 24);\n\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\n\t // Mix Rcon\n\t t ^= RCON[(ksRow / keySize) | 0] << 24;\n\t } else if (keySize > 6 && ksRow % keySize == 4) {\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\t }\n\n\t keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;\n\t }\n\t }\n\n\t // Compute inv key schedule\n\t var invKeySchedule = this._invKeySchedule = [];\n\t for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {\n\t var ksRow = ksRows - invKsRow;\n\n\t if (invKsRow % 4) {\n\t var t = keySchedule[ksRow];\n\t } else {\n\t var t = keySchedule[ksRow - 4];\n\t }\n\n\t if (invKsRow < 4 || ksRow <= 4) {\n\t invKeySchedule[invKsRow] = t;\n\t } else {\n\t invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^\n\t INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];\n\t }\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t // Swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\n\t this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);\n\n\t // Inv swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\t },\n\n\t _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {\n\t // Shortcut\n\t var nRounds = this._nRounds;\n\n\t // Get input, add round key\n\t var s0 = M[offset] ^ keySchedule[0];\n\t var s1 = M[offset + 1] ^ keySchedule[1];\n\t var s2 = M[offset + 2] ^ keySchedule[2];\n\t var s3 = M[offset + 3] ^ keySchedule[3];\n\n\t // Key schedule row counter\n\t var ksRow = 4;\n\n\t // Rounds\n\t for (var round = 1; round < nRounds; round++) {\n\t // Shift rows, sub bytes, mix columns, add round key\n\t var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];\n\t var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];\n\t var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];\n\t var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];\n\n\t // Update state\n\t s0 = t0;\n\t s1 = t1;\n\t s2 = t2;\n\t s3 = t3;\n\t }\n\n\t // Shift rows, sub bytes, add round key\n\t var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];\n\t var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];\n\t var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];\n\t var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];\n\n\t // Set output\n\t M[offset] = t0;\n\t M[offset + 1] = t1;\n\t M[offset + 2] = t2;\n\t M[offset + 3] = t3;\n\t },\n\n\t keySize: 256/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.AES = BlockCipher._createHelper(AES);\n\t}());\n\n\n\treturn CryptoJS.AES;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/aes.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js": +/*!*******************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher core components.\n\t */\n\tCryptoJS.lib.Cipher || (function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var Base64 = C_enc.Base64;\n\t var C_algo = C.algo;\n\t var EvpKDF = C_algo.EvpKDF;\n\n\t /**\n\t * Abstract base cipher template.\n\t *\n\t * @property {number} keySize This cipher's key size. Default: 4 (128 bits)\n\t * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)\n\t * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.\n\t * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.\n\t */\n\t var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {WordArray} iv The IV to use for this operation.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Creates this cipher in encryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createEncryptor: function (key, cfg) {\n\t return this.create(this._ENC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Creates this cipher in decryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createDecryptor: function (key, cfg) {\n\t return this.create(this._DEC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Initializes a newly created cipher.\n\t *\n\t * @param {number} xformMode Either the encryption or decryption transormation mode constant.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });\n\t */\n\t init: function (xformMode, key, cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Store transform mode and key\n\t this._xformMode = xformMode;\n\t this._key = key;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this cipher to its initial state.\n\t *\n\t * @example\n\t *\n\t * cipher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-cipher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Adds data to be encrypted or decrypted.\n\t *\n\t * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.process('data');\n\t * var encrypted = cipher.process(wordArray);\n\t */\n\t process: function (dataUpdate) {\n\t // Append\n\t this._append(dataUpdate);\n\n\t // Process available blocks\n\t return this._process();\n\t },\n\n\t /**\n\t * Finalizes the encryption or decryption process.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after final processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.finalize();\n\t * var encrypted = cipher.finalize('data');\n\t * var encrypted = cipher.finalize(wordArray);\n\t */\n\t finalize: function (dataUpdate) {\n\t // Final data update\n\t if (dataUpdate) {\n\t this._append(dataUpdate);\n\t }\n\n\t // Perform concrete-cipher logic\n\t var finalProcessedData = this._doFinalize();\n\n\t return finalProcessedData;\n\t },\n\n\t keySize: 128/32,\n\n\t ivSize: 128/32,\n\n\t _ENC_XFORM_MODE: 1,\n\n\t _DEC_XFORM_MODE: 2,\n\n\t /**\n\t * Creates shortcut functions to a cipher's object interface.\n\t *\n\t * @param {Cipher} cipher The cipher to create a helper for.\n\t *\n\t * @return {Object} An object with encrypt and decrypt shortcut functions.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);\n\t */\n\t _createHelper: (function () {\n\t function selectCipherStrategy(key) {\n\t if (typeof key == 'string') {\n\t return PasswordBasedCipher;\n\t } else {\n\t return SerializableCipher;\n\t }\n\t }\n\n\t return function (cipher) {\n\t return {\n\t encrypt: function (message, key, cfg) {\n\t return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);\n\t },\n\n\t decrypt: function (ciphertext, key, cfg) {\n\t return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);\n\t }\n\t };\n\t };\n\t }())\n\t });\n\n\t /**\n\t * Abstract base stream cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)\n\t */\n\t var StreamCipher = C_lib.StreamCipher = Cipher.extend({\n\t _doFinalize: function () {\n\t // Process partial blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 1\n\t });\n\n\t /**\n\t * Mode namespace.\n\t */\n\t var C_mode = C.mode = {};\n\n\t /**\n\t * Abstract base block cipher mode template.\n\t */\n\t var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({\n\t /**\n\t * Creates this mode for encryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);\n\t */\n\t createEncryptor: function (cipher, iv) {\n\t return this.Encryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Creates this mode for decryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);\n\t */\n\t createDecryptor: function (cipher, iv) {\n\t return this.Decryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Initializes a newly created mode.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);\n\t */\n\t init: function (cipher, iv) {\n\t this._cipher = cipher;\n\t this._iv = iv;\n\t }\n\t });\n\n\t /**\n\t * Cipher Block Chaining mode.\n\t */\n\t var CBC = C_mode.CBC = (function () {\n\t /**\n\t * Abstract base CBC mode.\n\t */\n\t var CBC = BlockCipherMode.extend();\n\n\t /**\n\t * CBC encryptor.\n\t */\n\t CBC.Encryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // XOR and encrypt\n\t xorBlock.call(this, words, offset, blockSize);\n\t cipher.encryptBlock(words, offset);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t /**\n\t * CBC decryptor.\n\t */\n\t CBC.Decryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t // Decrypt and XOR\n\t cipher.decryptBlock(words, offset);\n\t xorBlock.call(this, words, offset, blockSize);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function xorBlock(words, offset, blockSize) {\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Choose mixing block\n\t if (iv) {\n\t var block = iv;\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t var block = this._prevBlock;\n\t }\n\n\t // XOR blocks\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= block[i];\n\t }\n\t }\n\n\t return CBC;\n\t }());\n\n\t /**\n\t * Padding namespace.\n\t */\n\t var C_pad = C.pad = {};\n\n\t /**\n\t * PKCS #5/7 padding strategy.\n\t */\n\t var Pkcs7 = C_pad.Pkcs7 = {\n\t /**\n\t * Pads data using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to pad.\n\t * @param {number} blockSize The multiple that the data should be padded to.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.pad(wordArray, 4);\n\t */\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Create padding word\n\t var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;\n\n\t // Create padding\n\t var paddingWords = [];\n\t for (var i = 0; i < nPaddingBytes; i += 4) {\n\t paddingWords.push(paddingWord);\n\t }\n\t var padding = WordArray.create(paddingWords, nPaddingBytes);\n\n\t // Add padding\n\t data.concat(padding);\n\t },\n\n\t /**\n\t * Unpads data that had been padded using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to unpad.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.unpad(wordArray);\n\t */\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t };\n\n\t /**\n\t * Abstract base block cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)\n\t */\n\t var BlockCipher = C_lib.BlockCipher = Cipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Mode} mode The block mode to use. Default: CBC\n\t * @property {Padding} padding The padding strategy to use. Default: Pkcs7\n\t */\n\t cfg: Cipher.cfg.extend({\n\t mode: CBC,\n\t padding: Pkcs7\n\t }),\n\n\t reset: function () {\n\t // Reset cipher\n\t Cipher.reset.call(this);\n\n\t // Shortcuts\n\t var cfg = this.cfg;\n\t var iv = cfg.iv;\n\t var mode = cfg.mode;\n\n\t // Reset block mode\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t var modeCreator = mode.createEncryptor;\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t var modeCreator = mode.createDecryptor;\n\n\t // Keep at least one block in the buffer for unpadding\n\t this._minBufferSize = 1;\n\t }\n\t this._mode = modeCreator.call(mode, this, iv && iv.words);\n\t },\n\n\t _doProcessBlock: function (words, offset) {\n\t this._mode.processBlock(words, offset);\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcut\n\t var padding = this.cfg.padding;\n\n\t // Finalize\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t // Pad data\n\t padding.pad(this._data, this.blockSize);\n\n\t // Process final blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t // Process final blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\n\t // Unpad data\n\t padding.unpad(finalProcessedBlocks);\n\t }\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 128/32\n\t });\n\n\t /**\n\t * A collection of cipher parameters.\n\t *\n\t * @property {WordArray} ciphertext The raw ciphertext.\n\t * @property {WordArray} key The key to this ciphertext.\n\t * @property {WordArray} iv The IV used in the ciphering operation.\n\t * @property {WordArray} salt The salt used with a key derivation function.\n\t * @property {Cipher} algorithm The cipher algorithm.\n\t * @property {Mode} mode The block mode used in the ciphering operation.\n\t * @property {Padding} padding The padding scheme used in the ciphering operation.\n\t * @property {number} blockSize The block size of the cipher.\n\t * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.\n\t */\n\t var CipherParams = C_lib.CipherParams = Base.extend({\n\t /**\n\t * Initializes a newly created cipher params object.\n\t *\n\t * @param {Object} cipherParams An object with any of the possible cipher parameters.\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.lib.CipherParams.create({\n\t * ciphertext: ciphertextWordArray,\n\t * key: keyWordArray,\n\t * iv: ivWordArray,\n\t * salt: saltWordArray,\n\t * algorithm: CryptoJS.algo.AES,\n\t * mode: CryptoJS.mode.CBC,\n\t * padding: CryptoJS.pad.PKCS7,\n\t * blockSize: 4,\n\t * formatter: CryptoJS.format.OpenSSL\n\t * });\n\t */\n\t init: function (cipherParams) {\n\t this.mixIn(cipherParams);\n\t },\n\n\t /**\n\t * Converts this cipher params object to a string.\n\t *\n\t * @param {Format} formatter (Optional) The formatting strategy to use.\n\t *\n\t * @return {string} The stringified cipher params.\n\t *\n\t * @throws Error If neither the formatter nor the default formatter is set.\n\t *\n\t * @example\n\t *\n\t * var string = cipherParams + '';\n\t * var string = cipherParams.toString();\n\t * var string = cipherParams.toString(CryptoJS.format.OpenSSL);\n\t */\n\t toString: function (formatter) {\n\t return (formatter || this.formatter).stringify(this);\n\t }\n\t });\n\n\t /**\n\t * Format namespace.\n\t */\n\t var C_format = C.format = {};\n\n\t /**\n\t * OpenSSL formatting strategy.\n\t */\n\t var OpenSSLFormatter = C_format.OpenSSL = {\n\t /**\n\t * Converts a cipher params object to an OpenSSL-compatible string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The OpenSSL-compatible string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t // Shortcuts\n\t var ciphertext = cipherParams.ciphertext;\n\t var salt = cipherParams.salt;\n\n\t // Format\n\t if (salt) {\n\t var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);\n\t } else {\n\t var wordArray = ciphertext;\n\t }\n\n\t return wordArray.toString(Base64);\n\t },\n\n\t /**\n\t * Converts an OpenSSL-compatible string to a cipher params object.\n\t *\n\t * @param {string} openSSLStr The OpenSSL-compatible string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);\n\t */\n\t parse: function (openSSLStr) {\n\t // Parse base64\n\t var ciphertext = Base64.parse(openSSLStr);\n\n\t // Shortcut\n\t var ciphertextWords = ciphertext.words;\n\n\t // Test for salt\n\t if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {\n\t // Extract salt\n\t var salt = WordArray.create(ciphertextWords.slice(2, 4));\n\n\t // Remove salt from ciphertext\n\t ciphertextWords.splice(0, 4);\n\t ciphertext.sigBytes -= 16;\n\t }\n\n\t return CipherParams.create({ ciphertext: ciphertext, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A cipher wrapper that returns ciphertext as a serializable cipher params object.\n\t */\n\t var SerializableCipher = C_lib.SerializableCipher = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL\n\t */\n\t cfg: Base.extend({\n\t format: OpenSSLFormatter\n\t }),\n\n\t /**\n\t * Encrypts a message.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Encrypt\n\t var encryptor = cipher.createEncryptor(key, cfg);\n\t var ciphertext = encryptor.finalize(message);\n\n\t // Shortcut\n\t var cipherCfg = encryptor.cfg;\n\n\t // Create and return serializable cipher params\n\t return CipherParams.create({\n\t ciphertext: ciphertext,\n\t key: key,\n\t iv: cipherCfg.iv,\n\t algorithm: cipher,\n\t mode: cipherCfg.mode,\n\t padding: cipherCfg.padding,\n\t blockSize: cipher.blockSize,\n\t formatter: cfg.format\n\t });\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Decrypt\n\t var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);\n\n\t return plaintext;\n\t },\n\n\t /**\n\t * Converts serialized ciphertext to CipherParams,\n\t * else assumed CipherParams already and returns ciphertext unchanged.\n\t *\n\t * @param {CipherParams|string} ciphertext The ciphertext.\n\t * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.\n\t *\n\t * @return {CipherParams} The unserialized ciphertext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);\n\t */\n\t _parse: function (ciphertext, format) {\n\t if (typeof ciphertext == 'string') {\n\t return format.parse(ciphertext, this);\n\t } else {\n\t return ciphertext;\n\t }\n\t }\n\t });\n\n\t /**\n\t * Key derivation function namespace.\n\t */\n\t var C_kdf = C.kdf = {};\n\n\t /**\n\t * OpenSSL key derivation function.\n\t */\n\t var OpenSSLKdf = C_kdf.OpenSSL = {\n\t /**\n\t * Derives a key and IV from a password.\n\t *\n\t * @param {string} password The password to derive from.\n\t * @param {number} keySize The size in words of the key to generate.\n\t * @param {number} ivSize The size in words of the IV to generate.\n\t * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.\n\t *\n\t * @return {CipherParams} A cipher params object with the key, IV, and salt.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');\n\t */\n\t execute: function (password, keySize, ivSize, salt) {\n\t // Generate random salt\n\t if (!salt) {\n\t salt = WordArray.random(64/8);\n\t }\n\n\t // Derive key and IV\n\t var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);\n\n\t // Separate key and IV\n\t var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);\n\t key.sigBytes = keySize * 4;\n\n\t // Return params\n\t return CipherParams.create({ key: key, iv: iv, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A serializable cipher wrapper that derives the key from a password,\n\t * and returns ciphertext as a serializable cipher params object.\n\t */\n\t var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL\n\t */\n\t cfg: SerializableCipher.cfg.extend({\n\t kdf: OpenSSLKdf\n\t }),\n\n\t /**\n\t * Encrypts a message using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Encrypt\n\t var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);\n\n\t // Mix in derived params\n\t ciphertext.mixIn(derivedParams);\n\n\t return ciphertext;\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Decrypt\n\t var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);\n\n\t return plaintext;\n\t }\n\t });\n\t}());\n\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js": +/*!************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js ***! + \************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory();\n\t}\n\telse {}\n}(this, function () {\n\n\t/**\n\t * CryptoJS core components.\n\t */\n\tvar CryptoJS = CryptoJS || (function (Math, undefined) {\n\t /**\n\t * CryptoJS namespace.\n\t */\n\t var C = {};\n\n\t /**\n\t * Library namespace.\n\t */\n\t var C_lib = C.lib = {};\n\n\t /**\n\t * Base object for prototypal inheritance.\n\t */\n\t var Base = C_lib.Base = (function () {\n\t function F() {}\n\n\t return {\n\t /**\n\t * Creates a new object that inherits from this object.\n\t *\n\t * @param {Object} overrides Properties to copy into the new object.\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * field: 'value',\n\t *\n\t * method: function () {\n\t * }\n\t * });\n\t */\n\t extend: function (overrides) {\n\t // Spawn\n\t F.prototype = this;\n\t var subtype = new F();\n\n\t // Augment\n\t if (overrides) {\n\t subtype.mixIn(overrides);\n\t }\n\n\t // Create default initializer\n\t if (!subtype.hasOwnProperty('init')) {\n\t subtype.init = function () {\n\t subtype.$super.init.apply(this, arguments);\n\t };\n\t }\n\n\t // Initializer's prototype is the subtype object\n\t subtype.init.prototype = subtype;\n\n\t // Reference supertype\n\t subtype.$super = this;\n\n\t return subtype;\n\t },\n\n\t /**\n\t * Extends this object and runs the init method.\n\t * Arguments to create() will be passed to init().\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var instance = MyType.create();\n\t */\n\t create: function () {\n\t var instance = this.extend();\n\t instance.init.apply(instance, arguments);\n\n\t return instance;\n\t },\n\n\t /**\n\t * Initializes a newly created object.\n\t * Override this method to add some logic when your objects are created.\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * init: function () {\n\t * // ...\n\t * }\n\t * });\n\t */\n\t init: function () {\n\t },\n\n\t /**\n\t * Copies properties into this object.\n\t *\n\t * @param {Object} properties The properties to mix in.\n\t *\n\t * @example\n\t *\n\t * MyType.mixIn({\n\t * field: 'value'\n\t * });\n\t */\n\t mixIn: function (properties) {\n\t for (var propertyName in properties) {\n\t if (properties.hasOwnProperty(propertyName)) {\n\t this[propertyName] = properties[propertyName];\n\t }\n\t }\n\n\t // IE won't copy toString using the loop above\n\t if (properties.hasOwnProperty('toString')) {\n\t this.toString = properties.toString;\n\t }\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = instance.clone();\n\t */\n\t clone: function () {\n\t return this.init.prototype.extend(this);\n\t }\n\t };\n\t }());\n\n\t /**\n\t * An array of 32-bit words.\n\t *\n\t * @property {Array} words The array of 32-bit words.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var WordArray = C_lib.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of 32-bit words.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.create();\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 4;\n\t }\n\t },\n\n\t /**\n\t * Converts this word array to a string.\n\t *\n\t * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\n\t *\n\t * @return {string} The stringified word array.\n\t *\n\t * @example\n\t *\n\t * var string = wordArray + '';\n\t * var string = wordArray.toString();\n\t * var string = wordArray.toString(CryptoJS.enc.Utf8);\n\t */\n\t toString: function (encoder) {\n\t return (encoder || Hex).stringify(this);\n\t },\n\n\t /**\n\t * Concatenates a word array to this word array.\n\t *\n\t * @param {WordArray} wordArray The word array to append.\n\t *\n\t * @return {WordArray} This word array.\n\t *\n\t * @example\n\t *\n\t * wordArray1.concat(wordArray2);\n\t */\n\t concat: function (wordArray) {\n\t // Shortcuts\n\t var thisWords = this.words;\n\t var thatWords = wordArray.words;\n\t var thisSigBytes = this.sigBytes;\n\t var thatSigBytes = wordArray.sigBytes;\n\n\t // Clamp excess bits\n\t this.clamp();\n\n\t // Concat\n\t if (thisSigBytes % 4) {\n\t // Copy one byte at a time\n\t for (var i = 0; i < thatSigBytes; i++) {\n\t var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\n\t }\n\t } else {\n\t // Copy one word at a time\n\t for (var i = 0; i < thatSigBytes; i += 4) {\n\t thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2];\n\t }\n\t }\n\t this.sigBytes += thatSigBytes;\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Removes insignificant bits.\n\t *\n\t * @example\n\t *\n\t * wordArray.clamp();\n\t */\n\t clamp: function () {\n\t // Shortcuts\n\t var words = this.words;\n\t var sigBytes = this.sigBytes;\n\n\t // Clamp\n\t words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\n\t words.length = Math.ceil(sigBytes / 4);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = wordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone.words = this.words.slice(0);\n\n\t return clone;\n\t },\n\n\t /**\n\t * Creates a word array filled with random bytes.\n\t *\n\t * @param {number} nBytes The number of random bytes to generate.\n\t *\n\t * @return {WordArray} The random word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.random(16);\n\t */\n\t random: function (nBytes) {\n\t var words = [];\n\n\t var r = (function (m_w) {\n\t var m_w = m_w;\n\t var m_z = 0x3ade68b1;\n\t var mask = 0xffffffff;\n\n\t return function () {\n\t m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t var result = ((m_z << 0x10) + m_w) & mask;\n\t result /= 0x100000000;\n\t result += 0.5;\n\t return result * (Math.random() > .5 ? 1 : -1);\n\t }\n\t });\n\n\t for (var i = 0, rcache; i < nBytes; i += 4) {\n\t var _r = r((rcache || Math.random()) * 0x100000000);\n\n\t rcache = _r() * 0x3ade67b7;\n\t words.push((_r() * 0x100000000) | 0);\n\t }\n\n\t return new WordArray.init(words, nBytes);\n\t }\n\t });\n\n\t /**\n\t * Encoder namespace.\n\t */\n\t var C_enc = C.enc = {};\n\n\t /**\n\t * Hex encoding strategy.\n\t */\n\t var Hex = C_enc.Hex = {\n\t /**\n\t * Converts a word array to a hex string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The hex string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var hexChars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t hexChars.push((bite >>> 4).toString(16));\n\t hexChars.push((bite & 0x0f).toString(16));\n\t }\n\n\t return hexChars.join('');\n\t },\n\n\t /**\n\t * Converts a hex string to a word array.\n\t *\n\t * @param {string} hexStr The hex string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Hex.parse(hexString);\n\t */\n\t parse: function (hexStr) {\n\t // Shortcut\n\t var hexStrLength = hexStr.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < hexStrLength; i += 2) {\n\t words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\n\t }\n\n\t return new WordArray.init(words, hexStrLength / 2);\n\t }\n\t };\n\n\t /**\n\t * Latin1 encoding strategy.\n\t */\n\t var Latin1 = C_enc.Latin1 = {\n\t /**\n\t * Converts a word array to a Latin1 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Latin1 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var latin1Chars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t latin1Chars.push(String.fromCharCode(bite));\n\t }\n\n\t return latin1Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Latin1 string to a word array.\n\t *\n\t * @param {string} latin1Str The Latin1 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\n\t */\n\t parse: function (latin1Str) {\n\t // Shortcut\n\t var latin1StrLength = latin1Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < latin1StrLength; i++) {\n\t words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\n\t }\n\n\t return new WordArray.init(words, latin1StrLength);\n\t }\n\t };\n\n\t /**\n\t * UTF-8 encoding strategy.\n\t */\n\t var Utf8 = C_enc.Utf8 = {\n\t /**\n\t * Converts a word array to a UTF-8 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-8 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t try {\n\t return decodeURIComponent(escape(Latin1.stringify(wordArray)));\n\t } catch (e) {\n\t throw new Error('Malformed UTF-8 data');\n\t }\n\t },\n\n\t /**\n\t * Converts a UTF-8 string to a word array.\n\t *\n\t * @param {string} utf8Str The UTF-8 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\n\t */\n\t parse: function (utf8Str) {\n\t return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\n\t }\n\t };\n\n\t /**\n\t * Abstract buffered block algorithm template.\n\t *\n\t * The property blockSize must be implemented in a concrete subtype.\n\t *\n\t * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\n\t */\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\n\t /**\n\t * Resets this block algorithm's data buffer to its initial state.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm.reset();\n\t */\n\t reset: function () {\n\t // Initial values\n\t this._data = new WordArray.init();\n\t this._nDataBytes = 0;\n\t },\n\n\t /**\n\t * Adds new data to this block algorithm's buffer.\n\t *\n\t * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm._append('data');\n\t * bufferedBlockAlgorithm._append(wordArray);\n\t */\n\t _append: function (data) {\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof data == 'string') {\n\t data = Utf8.parse(data);\n\t }\n\n\t // Append\n\t this._data.concat(data);\n\t this._nDataBytes += data.sigBytes;\n\t },\n\n\t /**\n\t * Processes available data blocks.\n\t *\n\t * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\n\t *\n\t * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\n\t *\n\t * @return {WordArray} The processed data.\n\t *\n\t * @example\n\t *\n\t * var processedData = bufferedBlockAlgorithm._process();\n\t * var processedData = bufferedBlockAlgorithm._process(!!'flush');\n\t */\n\t _process: function (doFlush) {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var dataSigBytes = data.sigBytes;\n\t var blockSize = this.blockSize;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count blocks ready\n\t var nBlocksReady = dataSigBytes / blockSizeBytes;\n\t if (doFlush) {\n\t // Round up to include partial blocks\n\t nBlocksReady = Math.ceil(nBlocksReady);\n\t } else {\n\t // Round down to include only full blocks,\n\t // less the number of blocks that must remain in the buffer\n\t nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\n\t }\n\n\t // Count words ready\n\t var nWordsReady = nBlocksReady * blockSize;\n\n\t // Count bytes ready\n\t var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\n\n\t // Process blocks\n\t if (nWordsReady) {\n\t for (var offset = 0; offset < nWordsReady; offset += blockSize) {\n\t // Perform concrete-algorithm logic\n\t this._doProcessBlock(dataWords, offset);\n\t }\n\n\t // Remove processed words\n\t var processedWords = dataWords.splice(0, nWordsReady);\n\t data.sigBytes -= nBytesReady;\n\t }\n\n\t // Return processed words\n\t return new WordArray.init(processedWords, nBytesReady);\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = bufferedBlockAlgorithm.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone._data = this._data.clone();\n\n\t return clone;\n\t },\n\n\t _minBufferSize: 0\n\t });\n\n\t /**\n\t * Abstract hasher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\n\t */\n\t var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Initializes a newly created hasher.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\n\t *\n\t * @example\n\t *\n\t * var hasher = CryptoJS.algo.SHA256.create();\n\t */\n\t init: function (cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this hasher to its initial state.\n\t *\n\t * @example\n\t *\n\t * hasher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-hasher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Updates this hasher with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {Hasher} This hasher.\n\t *\n\t * @example\n\t *\n\t * hasher.update('message');\n\t * hasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t // Append\n\t this._append(messageUpdate);\n\n\t // Update the hash\n\t this._process();\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the hash computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @example\n\t *\n\t * var hash = hasher.finalize();\n\t * var hash = hasher.finalize('message');\n\t * var hash = hasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Final message update\n\t if (messageUpdate) {\n\t this._append(messageUpdate);\n\t }\n\n\t // Perform concrete-hasher logic\n\t var hash = this._doFinalize();\n\n\t return hash;\n\t },\n\n\t blockSize: 512/32,\n\n\t /**\n\t * Creates a shortcut function to a hasher's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to create a helper for.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHelper: function (hasher) {\n\t return function (message, cfg) {\n\t return new hasher.init(cfg).finalize(message);\n\t };\n\t },\n\n\t /**\n\t * Creates a shortcut function to the HMAC's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to use in this HMAC helper.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHmacHelper: function (hasher) {\n\t return function (message, key) {\n\t return new C_algo.HMAC.init(hasher, key).finalize(message);\n\t };\n\t }\n\t });\n\n\t /**\n\t * Algorithm namespace.\n\t */\n\t var C_algo = C.algo = {};\n\n\t return C;\n\t}(Math));\n\n\n\treturn CryptoJS;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js": +/*!******************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * Base64 encoding strategy.\n\t */\n\t var Base64 = C_enc.Base64 = {\n\t /**\n\t * Converts a word array to a Base64 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Base64 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var base64String = CryptoJS.enc.Base64.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\t var map = this._map;\n\n\t // Clamp excess bits\n\t wordArray.clamp();\n\n\t // Convert\n\t var base64Chars = [];\n\t for (var i = 0; i < sigBytes; i += 3) {\n\t var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\n\t var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\n\n\t var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\n\n\t for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\n\t base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\n\t }\n\t }\n\n\t // Add padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t while (base64Chars.length % 4) {\n\t base64Chars.push(paddingChar);\n\t }\n\t }\n\n\t return base64Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Base64 string to a word array.\n\t *\n\t * @param {string} base64Str The Base64 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Base64.parse(base64String);\n\t */\n\t parse: function (base64Str) {\n\t // Shortcuts\n\t var base64StrLength = base64Str.length;\n\t var map = this._map;\n\n\t // Ignore padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t var paddingIndex = base64Str.indexOf(paddingChar);\n\t if (paddingIndex != -1) {\n\t base64StrLength = paddingIndex;\n\t }\n\t }\n\n\t // Convert\n\t var words = [];\n\t var nBytes = 0;\n\t for (var i = 0; i < base64StrLength; i++) {\n\t if (i % 4) {\n\t var bits1 = map.indexOf(base64Str.charAt(i - 1)) << ((i % 4) * 2);\n\t var bits2 = map.indexOf(base64Str.charAt(i)) >>> (6 - (i % 4) * 2);\n\t var bitsCombined = bits1 | bits2;\n\t words[nBytes >>> 2] |= (bitsCombined) << (24 - (nBytes % 4) * 8);\n\t nBytes++;\n\t }\n\t }\n\n\t return WordArray.create(words, nBytes);\n\t },\n\n\t _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n\t };\n\t}());\n\n\n\treturn CryptoJS.enc.Base64;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-utf16.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-utf16.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * UTF-16 BE encoding strategy.\n\t */\n\t var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = {\n\t /**\n\t * Converts a word array to a UTF-16 BE string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-16 BE string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var utf16Chars = [];\n\t for (var i = 0; i < sigBytes; i += 2) {\n\t var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff;\n\t utf16Chars.push(String.fromCharCode(codePoint));\n\t }\n\n\t return utf16Chars.join('');\n\t },\n\n\t /**\n\t * Converts a UTF-16 BE string to a word array.\n\t *\n\t * @param {string} utf16Str The UTF-16 BE string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf16.parse(utf16String);\n\t */\n\t parse: function (utf16Str) {\n\t // Shortcut\n\t var utf16StrLength = utf16Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < utf16StrLength; i++) {\n\t words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16);\n\t }\n\n\t return WordArray.create(words, utf16StrLength * 2);\n\t }\n\t };\n\n\t /**\n\t * UTF-16 LE encoding strategy.\n\t */\n\t C_enc.Utf16LE = {\n\t /**\n\t * Converts a word array to a UTF-16 LE string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-16 LE string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var utf16Chars = [];\n\t for (var i = 0; i < sigBytes; i += 2) {\n\t var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff);\n\t utf16Chars.push(String.fromCharCode(codePoint));\n\t }\n\n\t return utf16Chars.join('');\n\t },\n\n\t /**\n\t * Converts a UTF-16 LE string to a word array.\n\t *\n\t * @param {string} utf16Str The UTF-16 LE string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);\n\t */\n\t parse: function (utf16Str) {\n\t // Shortcut\n\t var utf16StrLength = utf16Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < utf16StrLength; i++) {\n\t words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16));\n\t }\n\n\t return WordArray.create(words, utf16StrLength * 2);\n\t }\n\t };\n\n\t function swapEndian(word) {\n\t return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Utf16;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-utf16.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js": +/*!**************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./sha1 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha1.js\"), __webpack_require__(/*! ./hmac */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var MD5 = C_algo.MD5;\n\n\t /**\n\t * This key derivation function is meant to conform with EVP_BytesToKey.\n\t * www.openssl.org/docs/crypto/EVP_BytesToKey.html\n\t */\n\t var EvpKDF = C_algo.EvpKDF = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hash algorithm to use. Default: MD5\n\t * @property {number} iterations The number of iterations to perform. Default: 1\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: MD5,\n\t iterations: 1\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.EvpKDF.create();\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init hasher\n\t var hasher = cfg.hasher.create();\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t if (block) {\n\t hasher.update(block);\n\t }\n\t var block = hasher.update(password).finalize(salt);\n\t hasher.reset();\n\n\t // Iterations\n\t for (var i = 1; i < iterations; i++) {\n\t block = hasher.finalize(block);\n\t hasher.reset();\n\t }\n\n\t derivedKey.concat(block);\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.EvpKDF(password, salt);\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.EvpKDF = function (password, salt, cfg) {\n\t return EvpKDF.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.EvpKDF;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/format-hex.js": +/*!******************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/format-hex.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var CipherParams = C_lib.CipherParams;\n\t var C_enc = C.enc;\n\t var Hex = C_enc.Hex;\n\t var C_format = C.format;\n\n\t var HexFormatter = C_format.Hex = {\n\t /**\n\t * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The hexadecimally encoded string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.format.Hex.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t return cipherParams.ciphertext.toString(Hex);\n\t },\n\n\t /**\n\t * Converts a hexadecimally encoded ciphertext string to a cipher params object.\n\t *\n\t * @param {string} input The hexadecimally encoded string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.Hex.parse(hexString);\n\t */\n\t parse: function (input) {\n\t var ciphertext = Hex.parse(input);\n\t return CipherParams.create({ ciphertext: ciphertext });\n\t }\n\t };\n\t}());\n\n\n\treturn CryptoJS.format.Hex;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/format-hex.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac.js": +/*!************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac.js ***! + \************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var C_algo = C.algo;\n\n\t /**\n\t * HMAC algorithm.\n\t */\n\t var HMAC = C_algo.HMAC = Base.extend({\n\t /**\n\t * Initializes a newly created HMAC.\n\t *\n\t * @param {Hasher} hasher The hash algorithm to use.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @example\n\t *\n\t * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);\n\t */\n\t init: function (hasher, key) {\n\t // Init hasher\n\t hasher = this._hasher = new hasher.init();\n\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof key == 'string') {\n\t key = Utf8.parse(key);\n\t }\n\n\t // Shortcuts\n\t var hasherBlockSize = hasher.blockSize;\n\t var hasherBlockSizeBytes = hasherBlockSize * 4;\n\n\t // Allow arbitrary length keys\n\t if (key.sigBytes > hasherBlockSizeBytes) {\n\t key = hasher.finalize(key);\n\t }\n\n\t // Clamp excess bits\n\t key.clamp();\n\n\t // Clone key for inner and outer pads\n\t var oKey = this._oKey = key.clone();\n\t var iKey = this._iKey = key.clone();\n\n\t // Shortcuts\n\t var oKeyWords = oKey.words;\n\t var iKeyWords = iKey.words;\n\n\t // XOR keys with pad constants\n\t for (var i = 0; i < hasherBlockSize; i++) {\n\t oKeyWords[i] ^= 0x5c5c5c5c;\n\t iKeyWords[i] ^= 0x36363636;\n\t }\n\t oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this HMAC to its initial state.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.reset();\n\t */\n\t reset: function () {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Reset\n\t hasher.reset();\n\t hasher.update(this._iKey);\n\t },\n\n\t /**\n\t * Updates this HMAC with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {HMAC} This HMAC instance.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.update('message');\n\t * hmacHasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t this._hasher.update(messageUpdate);\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the HMAC computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @example\n\t *\n\t * var hmac = hmacHasher.finalize();\n\t * var hmac = hmacHasher.finalize('message');\n\t * var hmac = hmacHasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Compute HMAC\n\t var innerHash = hasher.finalize(messageUpdate);\n\t hasher.reset();\n\t var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));\n\n\t return hmac;\n\t }\n\t });\n\t}());\n\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/index.js": +/*!*************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/index.js ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./x64-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/x64-core.js\"), __webpack_require__(/*! ./lib-typedarrays */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/lib-typedarrays.js\"), __webpack_require__(/*! ./enc-utf16 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-utf16.js\"), __webpack_require__(/*! ./enc-base64 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js\"), __webpack_require__(/*! ./md5 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js\"), __webpack_require__(/*! ./sha1 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha1.js\"), __webpack_require__(/*! ./sha256 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha256.js\"), __webpack_require__(/*! ./sha224 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha224.js\"), __webpack_require__(/*! ./sha512 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha512.js\"), __webpack_require__(/*! ./sha384 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha384.js\"), __webpack_require__(/*! ./sha3 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha3.js\"), __webpack_require__(/*! ./ripemd160 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/ripemd160.js\"), __webpack_require__(/*! ./hmac */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac.js\"), __webpack_require__(/*! ./pbkdf2 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pbkdf2.js\"), __webpack_require__(/*! ./evpkdf */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"), __webpack_require__(/*! ./mode-cfb */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-cfb.js\"), __webpack_require__(/*! ./mode-ctr */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr.js\"), __webpack_require__(/*! ./mode-ctr-gladman */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr-gladman.js\"), __webpack_require__(/*! ./mode-ofb */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ofb.js\"), __webpack_require__(/*! ./mode-ecb */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ecb.js\"), __webpack_require__(/*! ./pad-ansix923 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-ansix923.js\"), __webpack_require__(/*! ./pad-iso10126 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso10126.js\"), __webpack_require__(/*! ./pad-iso97971 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso97971.js\"), __webpack_require__(/*! ./pad-zeropadding */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-zeropadding.js\"), __webpack_require__(/*! ./pad-nopadding */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-nopadding.js\"), __webpack_require__(/*! ./format-hex */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/format-hex.js\"), __webpack_require__(/*! ./aes */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/aes.js\"), __webpack_require__(/*! ./tripledes */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/tripledes.js\"), __webpack_require__(/*! ./rc4 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rc4.js\"), __webpack_require__(/*! ./rabbit */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit.js\"), __webpack_require__(/*! ./rabbit-legacy */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit-legacy.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\treturn CryptoJS;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/index.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/lib-typedarrays.js": +/*!***********************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/lib-typedarrays.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Check if typed arrays are supported\n\t if (typeof ArrayBuffer != 'function') {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\n\t // Reference original init\n\t var superInit = WordArray.init;\n\n\t // Augment WordArray.init to handle typed arrays\n\t var subInit = WordArray.init = function (typedArray) {\n\t // Convert buffers to uint8\n\t if (typedArray instanceof ArrayBuffer) {\n\t typedArray = new Uint8Array(typedArray);\n\t }\n\n\t // Convert other array views to uint8\n\t if (\n\t typedArray instanceof Int8Array ||\n\t (typeof Uint8ClampedArray !== \"undefined\" && typedArray instanceof Uint8ClampedArray) ||\n\t typedArray instanceof Int16Array ||\n\t typedArray instanceof Uint16Array ||\n\t typedArray instanceof Int32Array ||\n\t typedArray instanceof Uint32Array ||\n\t typedArray instanceof Float32Array ||\n\t typedArray instanceof Float64Array\n\t ) {\n\t typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);\n\t }\n\n\t // Handle Uint8Array\n\t if (typedArray instanceof Uint8Array) {\n\t // Shortcut\n\t var typedArrayByteLength = typedArray.byteLength;\n\n\t // Extract bytes\n\t var words = [];\n\t for (var i = 0; i < typedArrayByteLength; i++) {\n\t words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8);\n\t }\n\n\t // Initialize this word array\n\t superInit.call(this, words, typedArrayByteLength);\n\t } else {\n\t // Else call normal init\n\t superInit.apply(this, arguments);\n\t }\n\t };\n\n\t subInit.prototype = WordArray;\n\t}());\n\n\n\treturn CryptoJS.lib.WordArray;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/lib-typedarrays.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js": +/*!***********************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var T = [];\n\n\t // Compute constants\n\t (function () {\n\t for (var i = 0; i < 64; i++) {\n\t T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;\n\t }\n\t }());\n\n\t /**\n\t * MD5 hash algorithm.\n\t */\n\t var MD5 = C_algo.MD5 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\n\t // Shortcuts\n\t var H = this._hash.words;\n\n\t var M_offset_0 = M[offset + 0];\n\t var M_offset_1 = M[offset + 1];\n\t var M_offset_2 = M[offset + 2];\n\t var M_offset_3 = M[offset + 3];\n\t var M_offset_4 = M[offset + 4];\n\t var M_offset_5 = M[offset + 5];\n\t var M_offset_6 = M[offset + 6];\n\t var M_offset_7 = M[offset + 7];\n\t var M_offset_8 = M[offset + 8];\n\t var M_offset_9 = M[offset + 9];\n\t var M_offset_10 = M[offset + 10];\n\t var M_offset_11 = M[offset + 11];\n\t var M_offset_12 = M[offset + 12];\n\t var M_offset_13 = M[offset + 13];\n\t var M_offset_14 = M[offset + 14];\n\t var M_offset_15 = M[offset + 15];\n\n\t // Working varialbes\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\n\t // Computation\n\t a = FF(a, b, c, d, M_offset_0, 7, T[0]);\n\t d = FF(d, a, b, c, M_offset_1, 12, T[1]);\n\t c = FF(c, d, a, b, M_offset_2, 17, T[2]);\n\t b = FF(b, c, d, a, M_offset_3, 22, T[3]);\n\t a = FF(a, b, c, d, M_offset_4, 7, T[4]);\n\t d = FF(d, a, b, c, M_offset_5, 12, T[5]);\n\t c = FF(c, d, a, b, M_offset_6, 17, T[6]);\n\t b = FF(b, c, d, a, M_offset_7, 22, T[7]);\n\t a = FF(a, b, c, d, M_offset_8, 7, T[8]);\n\t d = FF(d, a, b, c, M_offset_9, 12, T[9]);\n\t c = FF(c, d, a, b, M_offset_10, 17, T[10]);\n\t b = FF(b, c, d, a, M_offset_11, 22, T[11]);\n\t a = FF(a, b, c, d, M_offset_12, 7, T[12]);\n\t d = FF(d, a, b, c, M_offset_13, 12, T[13]);\n\t c = FF(c, d, a, b, M_offset_14, 17, T[14]);\n\t b = FF(b, c, d, a, M_offset_15, 22, T[15]);\n\n\t a = GG(a, b, c, d, M_offset_1, 5, T[16]);\n\t d = GG(d, a, b, c, M_offset_6, 9, T[17]);\n\t c = GG(c, d, a, b, M_offset_11, 14, T[18]);\n\t b = GG(b, c, d, a, M_offset_0, 20, T[19]);\n\t a = GG(a, b, c, d, M_offset_5, 5, T[20]);\n\t d = GG(d, a, b, c, M_offset_10, 9, T[21]);\n\t c = GG(c, d, a, b, M_offset_15, 14, T[22]);\n\t b = GG(b, c, d, a, M_offset_4, 20, T[23]);\n\t a = GG(a, b, c, d, M_offset_9, 5, T[24]);\n\t d = GG(d, a, b, c, M_offset_14, 9, T[25]);\n\t c = GG(c, d, a, b, M_offset_3, 14, T[26]);\n\t b = GG(b, c, d, a, M_offset_8, 20, T[27]);\n\t a = GG(a, b, c, d, M_offset_13, 5, T[28]);\n\t d = GG(d, a, b, c, M_offset_2, 9, T[29]);\n\t c = GG(c, d, a, b, M_offset_7, 14, T[30]);\n\t b = GG(b, c, d, a, M_offset_12, 20, T[31]);\n\n\t a = HH(a, b, c, d, M_offset_5, 4, T[32]);\n\t d = HH(d, a, b, c, M_offset_8, 11, T[33]);\n\t c = HH(c, d, a, b, M_offset_11, 16, T[34]);\n\t b = HH(b, c, d, a, M_offset_14, 23, T[35]);\n\t a = HH(a, b, c, d, M_offset_1, 4, T[36]);\n\t d = HH(d, a, b, c, M_offset_4, 11, T[37]);\n\t c = HH(c, d, a, b, M_offset_7, 16, T[38]);\n\t b = HH(b, c, d, a, M_offset_10, 23, T[39]);\n\t a = HH(a, b, c, d, M_offset_13, 4, T[40]);\n\t d = HH(d, a, b, c, M_offset_0, 11, T[41]);\n\t c = HH(c, d, a, b, M_offset_3, 16, T[42]);\n\t b = HH(b, c, d, a, M_offset_6, 23, T[43]);\n\t a = HH(a, b, c, d, M_offset_9, 4, T[44]);\n\t d = HH(d, a, b, c, M_offset_12, 11, T[45]);\n\t c = HH(c, d, a, b, M_offset_15, 16, T[46]);\n\t b = HH(b, c, d, a, M_offset_2, 23, T[47]);\n\n\t a = II(a, b, c, d, M_offset_0, 6, T[48]);\n\t d = II(d, a, b, c, M_offset_7, 10, T[49]);\n\t c = II(c, d, a, b, M_offset_14, 15, T[50]);\n\t b = II(b, c, d, a, M_offset_5, 21, T[51]);\n\t a = II(a, b, c, d, M_offset_12, 6, T[52]);\n\t d = II(d, a, b, c, M_offset_3, 10, T[53]);\n\t c = II(c, d, a, b, M_offset_10, 15, T[54]);\n\t b = II(b, c, d, a, M_offset_1, 21, T[55]);\n\t a = II(a, b, c, d, M_offset_8, 6, T[56]);\n\t d = II(d, a, b, c, M_offset_15, 10, T[57]);\n\t c = II(c, d, a, b, M_offset_6, 15, T[58]);\n\t b = II(b, c, d, a, M_offset_13, 21, T[59]);\n\t a = II(a, b, c, d, M_offset_4, 6, T[60]);\n\t d = II(d, a, b, c, M_offset_11, 10, T[61]);\n\t c = II(c, d, a, b, M_offset_2, 15, T[62]);\n\t b = II(b, c, d, a, M_offset_9, 21, T[63]);\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\n\t var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);\n\t var nBitsTotalL = nBitsTotal;\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (\n\t (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)\n\t );\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)\n\t );\n\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t function FF(a, b, c, d, x, s, t) {\n\t var n = a + ((b & c) | (~b & d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function GG(a, b, c, d, x, s, t) {\n\t var n = a + ((b & d) | (c & ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function HH(a, b, c, d, x, s, t) {\n\t var n = a + (b ^ c ^ d) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function II(a, b, c, d, x, s, t) {\n\t var n = a + (c ^ (b | ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.MD5('message');\n\t * var hash = CryptoJS.MD5(wordArray);\n\t */\n\t C.MD5 = Hasher._createHelper(MD5);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacMD5(message, key);\n\t */\n\t C.HmacMD5 = Hasher._createHmacHelper(MD5);\n\t}(Math));\n\n\n\treturn CryptoJS.MD5;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-cfb.js": +/*!****************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-cfb.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher Feedback block mode.\n\t */\n\tCryptoJS.mode.CFB = (function () {\n\t var CFB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t CFB.Encryptor = CFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t CFB.Decryptor = CFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Generate keystream\n\t if (iv) {\n\t var keystream = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t var keystream = this._prevBlock;\n\t }\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\n\t return CFB;\n\t}());\n\n\n\treturn CryptoJS.mode.CFB;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-cfb.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr-gladman.js": +/*!************************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr-gladman.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/** @preserve\n\t * Counter block mode compatible with Dr Brian Gladman fileenc.c\n\t * derived from CryptoJS.mode.CTR\n\t * Jan Hruby jhruby.web@gmail.com\n\t */\n\tCryptoJS.mode.CTRGladman = (function () {\n\t var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();\n\n\t\tfunction incWord(word)\n\t\t{\n\t\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tvar b1 = (word >> 16)&0xff;\n\t\t\tvar b2 = (word >> 8)&0xff;\n\t\t\tvar b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) // overflow b1\n\t\t\t{\n\t\t\tb1 = 0;\n\t\t\tif (b2 === 0xff)\n\t\t\t{\n\t\t\t\tb2 = 0;\n\t\t\t\tif (b3 === 0xff)\n\t\t\t\t{\n\t\t\t\t\tb3 = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t++b3;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t++b2;\n\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\tword += (0x01 << 24);\n\t\t\t}\n\t\t\treturn word;\n\t\t}\n\n\t\tfunction incCounter(counter)\n\t\t{\n\t\t\tif ((counter[0] = incWord(counter[0])) === 0)\n\t\t\t{\n\t\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\t\tcounter[1] = incWord(counter[1]);\n\t\t\t}\n\t\t\treturn counter;\n\t\t}\n\n\t var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var counter = this._counter;\n\n\t // Generate keystream\n\t if (iv) {\n\t counter = this._counter = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\n\t\t\t\tincCounter(counter);\n\n\t\t\t\tvar keystream = counter.slice(0);\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t CTRGladman.Decryptor = Encryptor;\n\n\t return CTRGladman;\n\t}());\n\n\n\n\n\treturn CryptoJS.mode.CTRGladman;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr-gladman.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr.js": +/*!****************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Counter block mode.\n\t */\n\tCryptoJS.mode.CTR = (function () {\n\t var CTR = CryptoJS.lib.BlockCipherMode.extend();\n\n\t var Encryptor = CTR.Encryptor = CTR.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var counter = this._counter;\n\n\t // Generate keystream\n\t if (iv) {\n\t counter = this._counter = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\t var keystream = counter.slice(0);\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Increment counter\n\t counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t CTR.Decryptor = Encryptor;\n\n\t return CTR;\n\t}());\n\n\n\treturn CryptoJS.mode.CTR;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ecb.js": +/*!****************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ecb.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Electronic Codebook block mode.\n\t */\n\tCryptoJS.mode.ECB = (function () {\n\t var ECB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t ECB.Encryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.encryptBlock(words, offset);\n\t }\n\t });\n\n\t ECB.Decryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.decryptBlock(words, offset);\n\t }\n\t });\n\n\t return ECB;\n\t}());\n\n\n\treturn CryptoJS.mode.ECB;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ecb.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ofb.js": +/*!****************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ofb.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Output Feedback block mode.\n\t */\n\tCryptoJS.mode.OFB = (function () {\n\t var OFB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t var Encryptor = OFB.Encryptor = OFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var keystream = this._keystream;\n\n\t // Generate keystream\n\t if (iv) {\n\t keystream = this._keystream = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t OFB.Decryptor = Encryptor;\n\n\t return OFB;\n\t}());\n\n\n\treturn CryptoJS.mode.OFB;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ofb.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-ansix923.js": +/*!********************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-ansix923.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ANSI X.923 padding strategy.\n\t */\n\tCryptoJS.pad.AnsiX923 = {\n\t pad: function (data, blockSize) {\n\t // Shortcuts\n\t var dataSigBytes = data.sigBytes;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;\n\n\t // Compute last byte position\n\t var lastBytePos = dataSigBytes + nPaddingBytes - 1;\n\n\t // Pad\n\t data.clamp();\n\t data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8);\n\t data.sigBytes += nPaddingBytes;\n\t },\n\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Ansix923;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-ansix923.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso10126.js": +/*!********************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso10126.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ISO 10126 padding strategy.\n\t */\n\tCryptoJS.pad.Iso10126 = {\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Pad\n\t data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).\n\t concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));\n\t },\n\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Iso10126;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso10126.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso97971.js": +/*!********************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso97971.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ISO/IEC 9797-1 Padding Method 2.\n\t */\n\tCryptoJS.pad.Iso97971 = {\n\t pad: function (data, blockSize) {\n\t // Add 0x80 byte\n\t data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1));\n\n\t // Zero pad the rest\n\t CryptoJS.pad.ZeroPadding.pad(data, blockSize);\n\t },\n\n\t unpad: function (data) {\n\t // Remove zero padding\n\t CryptoJS.pad.ZeroPadding.unpad(data);\n\n\t // Remove one more byte -- the 0x80 byte\n\t data.sigBytes--;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Iso97971;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso97971.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-nopadding.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-nopadding.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * A noop padding strategy.\n\t */\n\tCryptoJS.pad.NoPadding = {\n\t pad: function () {\n\t },\n\n\t unpad: function () {\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.NoPadding;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-nopadding.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-zeropadding.js": +/*!***********************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-zeropadding.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Zero padding strategy.\n\t */\n\tCryptoJS.pad.ZeroPadding = {\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Pad\n\t data.clamp();\n\t data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes);\n\t },\n\n\t unpad: function (data) {\n\t // Shortcut\n\t var dataWords = data.words;\n\n\t // Unpad\n\t var i = data.sigBytes - 1;\n\t while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) {\n\t i--;\n\t }\n\t data.sigBytes = i + 1;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.ZeroPadding;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-zeropadding.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pbkdf2.js": +/*!**************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pbkdf2.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./sha1 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha1.js\"), __webpack_require__(/*! ./hmac */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var SHA1 = C_algo.SHA1;\n\t var HMAC = C_algo.HMAC;\n\n\t /**\n\t * Password-Based Key Derivation Function 2 algorithm.\n\t */\n\t var PBKDF2 = C_algo.PBKDF2 = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hasher to use. Default: SHA1\n\t * @property {number} iterations The number of iterations to perform. Default: 1\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: SHA1,\n\t iterations: 1\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.PBKDF2.create();\n\t * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Computes the Password-Based Key Derivation Function 2.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init HMAC\n\t var hmac = HMAC.create(cfg.hasher, password);\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\t var blockIndex = WordArray.create([0x00000001]);\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var blockIndexWords = blockIndex.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t var block = hmac.update(salt).finalize(blockIndex);\n\t hmac.reset();\n\n\t // Shortcuts\n\t var blockWords = block.words;\n\t var blockWordsLength = blockWords.length;\n\n\t // Iterations\n\t var intermediate = block;\n\t for (var i = 1; i < iterations; i++) {\n\t intermediate = hmac.finalize(intermediate);\n\t hmac.reset();\n\n\t // Shortcut\n\t var intermediateWords = intermediate.words;\n\n\t // XOR intermediate with block\n\t for (var j = 0; j < blockWordsLength; j++) {\n\t blockWords[j] ^= intermediateWords[j];\n\t }\n\t }\n\n\t derivedKey.concat(block);\n\t blockIndexWords[0]++;\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Computes the Password-Based Key Derivation Function 2.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.PBKDF2(password, salt);\n\t * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.PBKDF2 = function (password, salt, cfg) {\n\t return PBKDF2.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.PBKDF2;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pbkdf2.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit-legacy.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit-legacy.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./enc-base64 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js\"), __webpack_require__(/*! ./md5 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js\"), __webpack_require__(/*! ./evpkdf */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t // Reusable objects\n\t var S = [];\n\t var C_ = [];\n\t var G = [];\n\n\t /**\n\t * Rabbit stream cipher algorithm.\n\t *\n\t * This is a legacy version that neglected to convert the key to little-endian.\n\t * This error doesn't affect the cipher's security,\n\t * but it does affect its compatibility with other implementations.\n\t */\n\t var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var K = this._key.words;\n\t var iv = this.cfg.iv;\n\n\t // Generate initial state values\n\t var X = this._X = [\n\t K[0], (K[3] << 16) | (K[2] >>> 16),\n\t K[1], (K[0] << 16) | (K[3] >>> 16),\n\t K[2], (K[1] << 16) | (K[0] >>> 16),\n\t K[3], (K[2] << 16) | (K[1] >>> 16)\n\t ];\n\n\t // Generate initial counter values\n\t var C = this._C = [\n\t (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n\t (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n\t (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n\t (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n\t ];\n\n\t // Carry bit\n\t this._b = 0;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\n\t // Modify the counters\n\t for (var i = 0; i < 8; i++) {\n\t C[i] ^= X[(i + 4) & 7];\n\t }\n\n\t // IV setup\n\t if (iv) {\n\t // Shortcuts\n\t var IV = iv.words;\n\t var IV_0 = IV[0];\n\t var IV_1 = IV[1];\n\n\t // Generate four subvectors\n\t var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n\t var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n\t var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n\t var i3 = (i2 << 16) | (i0 & 0x0000ffff);\n\n\t // Modify counter values\n\t C[0] ^= i0;\n\t C[1] ^= i1;\n\t C[2] ^= i2;\n\t C[3] ^= i3;\n\t C[4] ^= i0;\n\t C[5] ^= i1;\n\t C[6] ^= i2;\n\t C[7] ^= i3;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\t }\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var X = this._X;\n\n\t // Iterate the system\n\t nextState.call(this);\n\n\t // Generate four keystream words\n\t S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n\t S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n\t S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n\t S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n\n\t for (var i = 0; i < 4; i++) {\n\t // Swap endian\n\t S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |\n\t (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);\n\n\t // Encrypt\n\t M[offset + i] ^= S[i];\n\t }\n\t },\n\n\t blockSize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t function nextState() {\n\t // Shortcuts\n\t var X = this._X;\n\t var C = this._C;\n\n\t // Save old counter values\n\t for (var i = 0; i < 8; i++) {\n\t C_[i] = C[i];\n\t }\n\n\t // Calculate new counter values\n\t C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n\t C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n\t C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n\t C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n\t C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n\t C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n\t C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n\t C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n\t this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n\n\t // Calculate the g-values\n\t for (var i = 0; i < 8; i++) {\n\t var gx = X[i] + C[i];\n\n\t // Construct high and low argument for squaring\n\t var ga = gx & 0xffff;\n\t var gb = gx >>> 16;\n\n\t // Calculate high and low result of squaring\n\t var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n\t var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n\n\t // High XOR low\n\t G[i] = gh ^ gl;\n\t }\n\n\t // Calculate new state values\n\t X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n\t X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;\n\t X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n\t X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;\n\t X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n\t X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;\n\t X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n\t X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);\n\t}());\n\n\n\treturn CryptoJS.RabbitLegacy;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit-legacy.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit.js": +/*!**************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./enc-base64 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js\"), __webpack_require__(/*! ./md5 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js\"), __webpack_require__(/*! ./evpkdf */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t // Reusable objects\n\t var S = [];\n\t var C_ = [];\n\t var G = [];\n\n\t /**\n\t * Rabbit stream cipher algorithm\n\t */\n\t var Rabbit = C_algo.Rabbit = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var K = this._key.words;\n\t var iv = this.cfg.iv;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) |\n\t (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Generate initial state values\n\t var X = this._X = [\n\t K[0], (K[3] << 16) | (K[2] >>> 16),\n\t K[1], (K[0] << 16) | (K[3] >>> 16),\n\t K[2], (K[1] << 16) | (K[0] >>> 16),\n\t K[3], (K[2] << 16) | (K[1] >>> 16)\n\t ];\n\n\t // Generate initial counter values\n\t var C = this._C = [\n\t (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n\t (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n\t (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n\t (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n\t ];\n\n\t // Carry bit\n\t this._b = 0;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\n\t // Modify the counters\n\t for (var i = 0; i < 8; i++) {\n\t C[i] ^= X[(i + 4) & 7];\n\t }\n\n\t // IV setup\n\t if (iv) {\n\t // Shortcuts\n\t var IV = iv.words;\n\t var IV_0 = IV[0];\n\t var IV_1 = IV[1];\n\n\t // Generate four subvectors\n\t var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n\t var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n\t var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n\t var i3 = (i2 << 16) | (i0 & 0x0000ffff);\n\n\t // Modify counter values\n\t C[0] ^= i0;\n\t C[1] ^= i1;\n\t C[2] ^= i2;\n\t C[3] ^= i3;\n\t C[4] ^= i0;\n\t C[5] ^= i1;\n\t C[6] ^= i2;\n\t C[7] ^= i3;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\t }\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var X = this._X;\n\n\t // Iterate the system\n\t nextState.call(this);\n\n\t // Generate four keystream words\n\t S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n\t S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n\t S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n\t S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n\n\t for (var i = 0; i < 4; i++) {\n\t // Swap endian\n\t S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |\n\t (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);\n\n\t // Encrypt\n\t M[offset + i] ^= S[i];\n\t }\n\t },\n\n\t blockSize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t function nextState() {\n\t // Shortcuts\n\t var X = this._X;\n\t var C = this._C;\n\n\t // Save old counter values\n\t for (var i = 0; i < 8; i++) {\n\t C_[i] = C[i];\n\t }\n\n\t // Calculate new counter values\n\t C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n\t C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n\t C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n\t C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n\t C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n\t C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n\t C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n\t C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n\t this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n\n\t // Calculate the g-values\n\t for (var i = 0; i < 8; i++) {\n\t var gx = X[i] + C[i];\n\n\t // Construct high and low argument for squaring\n\t var ga = gx & 0xffff;\n\t var gb = gx >>> 16;\n\n\t // Calculate high and low result of squaring\n\t var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n\t var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n\n\t // High XOR low\n\t G[i] = gh ^ gl;\n\t }\n\n\t // Calculate new state values\n\t X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n\t X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;\n\t X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n\t X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;\n\t X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n\t X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;\n\t X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n\t X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);\n\t */\n\t C.Rabbit = StreamCipher._createHelper(Rabbit);\n\t}());\n\n\n\treturn CryptoJS.Rabbit;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rc4.js": +/*!***********************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rc4.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./enc-base64 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js\"), __webpack_require__(/*! ./md5 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js\"), __webpack_require__(/*! ./evpkdf */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t /**\n\t * RC4 stream cipher algorithm.\n\t */\n\t var RC4 = C_algo.RC4 = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\t var keySigBytes = key.sigBytes;\n\n\t // Init sbox\n\t var S = this._S = [];\n\t for (var i = 0; i < 256; i++) {\n\t S[i] = i;\n\t }\n\n\t // Key setup\n\t for (var i = 0, j = 0; i < 256; i++) {\n\t var keyByteIndex = i % keySigBytes;\n\t var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff;\n\n\t j = (j + S[i] + keyByte) % 256;\n\n\t // Swap\n\t var t = S[i];\n\t S[i] = S[j];\n\t S[j] = t;\n\t }\n\n\t // Counters\n\t this._i = this._j = 0;\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t M[offset] ^= generateKeystreamWord.call(this);\n\t },\n\n\t keySize: 256/32,\n\n\t ivSize: 0\n\t });\n\n\t function generateKeystreamWord() {\n\t // Shortcuts\n\t var S = this._S;\n\t var i = this._i;\n\t var j = this._j;\n\n\t // Generate keystream word\n\t var keystreamWord = 0;\n\t for (var n = 0; n < 4; n++) {\n\t i = (i + 1) % 256;\n\t j = (j + S[i]) % 256;\n\n\t // Swap\n\t var t = S[i];\n\t S[i] = S[j];\n\t S[j] = t;\n\n\t keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8);\n\t }\n\n\t // Update counters\n\t this._i = i;\n\t this._j = j;\n\n\t return keystreamWord;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RC4 = StreamCipher._createHelper(RC4);\n\n\t /**\n\t * Modified RC4 stream cipher algorithm.\n\t */\n\t var RC4Drop = C_algo.RC4Drop = RC4.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} drop The number of keystream words to drop. Default 192\n\t */\n\t cfg: RC4.cfg.extend({\n\t drop: 192\n\t }),\n\n\t _doReset: function () {\n\t RC4._doReset.call(this);\n\n\t // Drop\n\t for (var i = this.cfg.drop; i > 0; i--) {\n\t generateKeystreamWord.call(this);\n\t }\n\t }\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RC4Drop = StreamCipher._createHelper(RC4Drop);\n\t}());\n\n\n\treturn CryptoJS.RC4;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rc4.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/ripemd160.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/ripemd160.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/** @preserve\n\t(c) 2012 by Cédric Mesnil. All rights reserved.\n\n\tRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n\t - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\t - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t*/\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var _zl = WordArray.create([\n\t 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n\t 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n\t 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n\t 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n\t 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]);\n\t var _zr = WordArray.create([\n\t 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n\t 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n\t 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n\t 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n\t 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]);\n\t var _sl = WordArray.create([\n\t 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n\t 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n\t 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n\t 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n\t 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]);\n\t var _sr = WordArray.create([\n\t 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n\t 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n\t 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n\t 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n\t 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]);\n\n\t var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);\n\t var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);\n\n\t /**\n\t * RIPEMD160 hash algorithm.\n\t */\n\t var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t // Swap\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\t // Shortcut\n\t var H = this._hash.words;\n\t var hl = _hl.words;\n\t var hr = _hr.words;\n\t var zl = _zl.words;\n\t var zr = _zr.words;\n\t var sl = _sl.words;\n\t var sr = _sr.words;\n\n\t // Working variables\n\t var al, bl, cl, dl, el;\n\t var ar, br, cr, dr, er;\n\n\t ar = al = H[0];\n\t br = bl = H[1];\n\t cr = cl = H[2];\n\t dr = dl = H[3];\n\t er = el = H[4];\n\t // Computation\n\t var t;\n\t for (var i = 0; i < 80; i += 1) {\n\t t = (al + M[offset+zl[i]])|0;\n\t if (i<16){\n\t\t t += f1(bl,cl,dl) + hl[0];\n\t } else if (i<32) {\n\t\t t += f2(bl,cl,dl) + hl[1];\n\t } else if (i<48) {\n\t\t t += f3(bl,cl,dl) + hl[2];\n\t } else if (i<64) {\n\t\t t += f4(bl,cl,dl) + hl[3];\n\t } else {// if (i<80) {\n\t\t t += f5(bl,cl,dl) + hl[4];\n\t }\n\t t = t|0;\n\t t = rotl(t,sl[i]);\n\t t = (t+el)|0;\n\t al = el;\n\t el = dl;\n\t dl = rotl(cl, 10);\n\t cl = bl;\n\t bl = t;\n\n\t t = (ar + M[offset+zr[i]])|0;\n\t if (i<16){\n\t\t t += f5(br,cr,dr) + hr[0];\n\t } else if (i<32) {\n\t\t t += f4(br,cr,dr) + hr[1];\n\t } else if (i<48) {\n\t\t t += f3(br,cr,dr) + hr[2];\n\t } else if (i<64) {\n\t\t t += f2(br,cr,dr) + hr[3];\n\t } else {// if (i<80) {\n\t\t t += f1(br,cr,dr) + hr[4];\n\t }\n\t t = t|0;\n\t t = rotl(t,sr[i]) ;\n\t t = (t+er)|0;\n\t ar = er;\n\t er = dr;\n\t dr = rotl(cr, 10);\n\t cr = br;\n\t br = t;\n\t }\n\t // Intermediate hash value\n\t t = (H[1] + cl + dr)|0;\n\t H[1] = (H[2] + dl + er)|0;\n\t H[2] = (H[3] + el + ar)|0;\n\t H[3] = (H[4] + al + br)|0;\n\t H[4] = (H[0] + bl + cr)|0;\n\t H[0] = t;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)\n\t );\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 5; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t // Swap\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\n\t function f1(x, y, z) {\n\t return ((x) ^ (y) ^ (z));\n\n\t }\n\n\t function f2(x, y, z) {\n\t return (((x)&(y)) | ((~x)&(z)));\n\t }\n\n\t function f3(x, y, z) {\n\t return (((x) | (~(y))) ^ (z));\n\t }\n\n\t function f4(x, y, z) {\n\t return (((x) & (z)) | ((y)&(~(z))));\n\t }\n\n\t function f5(x, y, z) {\n\t return ((x) ^ ((y) |(~(z))));\n\n\t }\n\n\t function rotl(x,n) {\n\t return (x<>>(32-n));\n\t }\n\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.RIPEMD160('message');\n\t * var hash = CryptoJS.RIPEMD160(wordArray);\n\t */\n\t C.RIPEMD160 = Hasher._createHelper(RIPEMD160);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacRIPEMD160(message, key);\n\t */\n\t C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);\n\t}(Math));\n\n\n\treturn CryptoJS.RIPEMD160;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/ripemd160.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha1.js": +/*!************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha1.js ***! + \************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-1 hash algorithm.\n\t */\n\t var SHA1 = C_algo.SHA1 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476,\n\t 0xc3d2e1f0\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\n\t // Computation\n\t for (var i = 0; i < 80; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\n\t W[i] = (n << 1) | (n >>> 31);\n\t }\n\n\t var t = ((a << 5) | (a >>> 27)) + e + W[i];\n\t if (i < 20) {\n\t t += ((b & c) | (~b & d)) + 0x5a827999;\n\t } else if (i < 40) {\n\t t += (b ^ c ^ d) + 0x6ed9eba1;\n\t } else if (i < 60) {\n\t t += ((b & c) | (b & d) | (c & d)) - 0x70e44324;\n\t } else /* if (i < 80) */ {\n\t t += (b ^ c ^ d) - 0x359d3e2a;\n\t }\n\n\t e = d;\n\t d = c;\n\t c = (b << 30) | (b >>> 2);\n\t b = a;\n\t a = t;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA1('message');\n\t * var hash = CryptoJS.SHA1(wordArray);\n\t */\n\t C.SHA1 = Hasher._createHelper(SHA1);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA1(message, key);\n\t */\n\t C.HmacSHA1 = Hasher._createHmacHelper(SHA1);\n\t}());\n\n\n\treturn CryptoJS.SHA1;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha1.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha224.js": +/*!**************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha224.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./sha256 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha256.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var SHA256 = C_algo.SHA256;\n\n\t /**\n\t * SHA-224 hash algorithm.\n\t */\n\t var SHA224 = C_algo.SHA224 = SHA256.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n\t 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4\n\t ]);\n\t },\n\n\t _doFinalize: function () {\n\t var hash = SHA256._doFinalize.call(this);\n\n\t hash.sigBytes -= 4;\n\n\t return hash;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA224('message');\n\t * var hash = CryptoJS.SHA224(wordArray);\n\t */\n\t C.SHA224 = SHA256._createHelper(SHA224);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA224(message, key);\n\t */\n\t C.HmacSHA224 = SHA256._createHmacHelper(SHA224);\n\t}());\n\n\n\treturn CryptoJS.SHA224;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha224.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha256.js": +/*!**************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha256.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Initialization and round constants tables\n\t var H = [];\n\t var K = [];\n\n\t // Compute constants\n\t (function () {\n\t function isPrime(n) {\n\t var sqrtN = Math.sqrt(n);\n\t for (var factor = 2; factor <= sqrtN; factor++) {\n\t if (!(n % factor)) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t }\n\n\t function getFractionalBits(n) {\n\t return ((n - (n | 0)) * 0x100000000) | 0;\n\t }\n\n\t var n = 2;\n\t var nPrime = 0;\n\t while (nPrime < 64) {\n\t if (isPrime(n)) {\n\t if (nPrime < 8) {\n\t H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));\n\t }\n\t K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));\n\n\t nPrime++;\n\t }\n\n\t n++;\n\t }\n\t }());\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-256 hash algorithm.\n\t */\n\t var SHA256 = C_algo.SHA256 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init(H.slice(0));\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\t var f = H[5];\n\t var g = H[6];\n\t var h = H[7];\n\n\t // Computation\n\t for (var i = 0; i < 64; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var gamma0x = W[i - 15];\n\t var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^\n\t ((gamma0x << 14) | (gamma0x >>> 18)) ^\n\t (gamma0x >>> 3);\n\n\t var gamma1x = W[i - 2];\n\t var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^\n\t ((gamma1x << 13) | (gamma1x >>> 19)) ^\n\t (gamma1x >>> 10);\n\n\t W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];\n\t }\n\n\t var ch = (e & f) ^ (~e & g);\n\t var maj = (a & b) ^ (a & c) ^ (b & c);\n\n\t var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));\n\t var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25));\n\n\t var t1 = h + sigma1 + ch + K[i] + W[i];\n\t var t2 = sigma0 + maj;\n\n\t h = g;\n\t g = f;\n\t f = e;\n\t e = (d + t1) | 0;\n\t d = c;\n\t c = b;\n\t b = a;\n\t a = (t1 + t2) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t H[5] = (H[5] + f) | 0;\n\t H[6] = (H[6] + g) | 0;\n\t H[7] = (H[7] + h) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA256('message');\n\t * var hash = CryptoJS.SHA256(wordArray);\n\t */\n\t C.SHA256 = Hasher._createHelper(SHA256);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA256(message, key);\n\t */\n\t C.HmacSHA256 = Hasher._createHmacHelper(SHA256);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA256;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha256.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha3.js": +/*!************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha3.js ***! + \************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./x64-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/x64-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var C_algo = C.algo;\n\n\t // Constants tables\n\t var RHO_OFFSETS = [];\n\t var PI_INDEXES = [];\n\t var ROUND_CONSTANTS = [];\n\n\t // Compute Constants\n\t (function () {\n\t // Compute rho offset constants\n\t var x = 1, y = 0;\n\t for (var t = 0; t < 24; t++) {\n\t RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64;\n\n\t var newX = y % 5;\n\t var newY = (2 * x + 3 * y) % 5;\n\t x = newX;\n\t y = newY;\n\t }\n\n\t // Compute pi index constants\n\t for (var x = 0; x < 5; x++) {\n\t for (var y = 0; y < 5; y++) {\n\t PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5;\n\t }\n\t }\n\n\t // Compute round constants\n\t var LFSR = 0x01;\n\t for (var i = 0; i < 24; i++) {\n\t var roundConstantMsw = 0;\n\t var roundConstantLsw = 0;\n\n\t for (var j = 0; j < 7; j++) {\n\t if (LFSR & 0x01) {\n\t var bitPosition = (1 << j) - 1;\n\t if (bitPosition < 32) {\n\t roundConstantLsw ^= 1 << bitPosition;\n\t } else /* if (bitPosition >= 32) */ {\n\t roundConstantMsw ^= 1 << (bitPosition - 32);\n\t }\n\t }\n\n\t // Compute next LFSR\n\t if (LFSR & 0x80) {\n\t // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1\n\t LFSR = (LFSR << 1) ^ 0x71;\n\t } else {\n\t LFSR <<= 1;\n\t }\n\t }\n\n\t ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);\n\t }\n\t }());\n\n\t // Reusable objects for temporary values\n\t var T = [];\n\t (function () {\n\t for (var i = 0; i < 25; i++) {\n\t T[i] = X64Word.create();\n\t }\n\t }());\n\n\t /**\n\t * SHA-3 hash algorithm.\n\t */\n\t var SHA3 = C_algo.SHA3 = Hasher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} outputLength\n\t * The desired number of bits in the output hash.\n\t * Only values permitted are: 224, 256, 384, 512.\n\t * Default: 512\n\t */\n\t cfg: Hasher.cfg.extend({\n\t outputLength: 512\n\t }),\n\n\t _doReset: function () {\n\t var state = this._state = []\n\t for (var i = 0; i < 25; i++) {\n\t state[i] = new X64Word.init();\n\t }\n\n\t this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcuts\n\t var state = this._state;\n\t var nBlockSizeLanes = this.blockSize / 2;\n\n\t // Absorb\n\t for (var i = 0; i < nBlockSizeLanes; i++) {\n\t // Shortcuts\n\t var M2i = M[offset + 2 * i];\n\t var M2i1 = M[offset + 2 * i + 1];\n\n\t // Swap endian\n\t M2i = (\n\t (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) |\n\t (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00)\n\t );\n\t M2i1 = (\n\t (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) |\n\t (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00)\n\t );\n\n\t // Absorb message into state\n\t var lane = state[i];\n\t lane.high ^= M2i1;\n\t lane.low ^= M2i;\n\t }\n\n\t // Rounds\n\t for (var round = 0; round < 24; round++) {\n\t // Theta\n\t for (var x = 0; x < 5; x++) {\n\t // Mix column lanes\n\t var tMsw = 0, tLsw = 0;\n\t for (var y = 0; y < 5; y++) {\n\t var lane = state[x + 5 * y];\n\t tMsw ^= lane.high;\n\t tLsw ^= lane.low;\n\t }\n\n\t // Temporary values\n\t var Tx = T[x];\n\t Tx.high = tMsw;\n\t Tx.low = tLsw;\n\t }\n\t for (var x = 0; x < 5; x++) {\n\t // Shortcuts\n\t var Tx4 = T[(x + 4) % 5];\n\t var Tx1 = T[(x + 1) % 5];\n\t var Tx1Msw = Tx1.high;\n\t var Tx1Lsw = Tx1.low;\n\n\t // Mix surrounding columns\n\t var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31));\n\t var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31));\n\t for (var y = 0; y < 5; y++) {\n\t var lane = state[x + 5 * y];\n\t lane.high ^= tMsw;\n\t lane.low ^= tLsw;\n\t }\n\t }\n\n\t // Rho Pi\n\t for (var laneIndex = 1; laneIndex < 25; laneIndex++) {\n\t // Shortcuts\n\t var lane = state[laneIndex];\n\t var laneMsw = lane.high;\n\t var laneLsw = lane.low;\n\t var rhoOffset = RHO_OFFSETS[laneIndex];\n\n\t // Rotate lanes\n\t if (rhoOffset < 32) {\n\t var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset));\n\t var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset));\n\t } else /* if (rhoOffset >= 32) */ {\n\t var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset));\n\t var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset));\n\t }\n\n\t // Transpose lanes\n\t var TPiLane = T[PI_INDEXES[laneIndex]];\n\t TPiLane.high = tMsw;\n\t TPiLane.low = tLsw;\n\t }\n\n\t // Rho pi at x = y = 0\n\t var T0 = T[0];\n\t var state0 = state[0];\n\t T0.high = state0.high;\n\t T0.low = state0.low;\n\n\t // Chi\n\t for (var x = 0; x < 5; x++) {\n\t for (var y = 0; y < 5; y++) {\n\t // Shortcuts\n\t var laneIndex = x + 5 * y;\n\t var lane = state[laneIndex];\n\t var TLane = T[laneIndex];\n\t var Tx1Lane = T[((x + 1) % 5) + 5 * y];\n\t var Tx2Lane = T[((x + 2) % 5) + 5 * y];\n\n\t // Mix rows\n\t lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high);\n\t lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low);\n\t }\n\t }\n\n\t // Iota\n\t var lane = state[0];\n\t var roundConstant = ROUND_CONSTANTS[round];\n\t lane.high ^= roundConstant.high;\n\t lane.low ^= roundConstant.low;;\n\t }\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\t var blockSizeBits = this.blockSize * 32;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32);\n\t dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var state = this._state;\n\t var outputLengthBytes = this.cfg.outputLength / 8;\n\t var outputLengthLanes = outputLengthBytes / 8;\n\n\t // Squeeze\n\t var hashWords = [];\n\t for (var i = 0; i < outputLengthLanes; i++) {\n\t // Shortcuts\n\t var lane = state[i];\n\t var laneMsw = lane.high;\n\t var laneLsw = lane.low;\n\n\t // Swap endian\n\t laneMsw = (\n\t (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) |\n\t (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00)\n\t );\n\t laneLsw = (\n\t (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) |\n\t (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00)\n\t );\n\n\t // Squeeze state to retrieve hash\n\t hashWords.push(laneLsw);\n\t hashWords.push(laneMsw);\n\t }\n\n\t // Return final computed hash\n\t return new WordArray.init(hashWords, outputLengthBytes);\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\n\t var state = clone._state = this._state.slice(0);\n\t for (var i = 0; i < 25; i++) {\n\t state[i] = state[i].clone();\n\t }\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA3('message');\n\t * var hash = CryptoJS.SHA3(wordArray);\n\t */\n\t C.SHA3 = Hasher._createHelper(SHA3);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA3(message, key);\n\t */\n\t C.HmacSHA3 = Hasher._createHmacHelper(SHA3);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA3;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha3.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha384.js": +/*!**************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha384.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./x64-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/x64-core.js\"), __webpack_require__(/*! ./sha512 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha512.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var X64WordArray = C_x64.WordArray;\n\t var C_algo = C.algo;\n\t var SHA512 = C_algo.SHA512;\n\n\t /**\n\t * SHA-384 hash algorithm.\n\t */\n\t var SHA384 = C_algo.SHA384 = SHA512.extend({\n\t _doReset: function () {\n\t this._hash = new X64WordArray.init([\n\t new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),\n\t new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),\n\t new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),\n\t new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)\n\t ]);\n\t },\n\n\t _doFinalize: function () {\n\t var hash = SHA512._doFinalize.call(this);\n\n\t hash.sigBytes -= 16;\n\n\t return hash;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA384('message');\n\t * var hash = CryptoJS.SHA384(wordArray);\n\t */\n\t C.SHA384 = SHA512._createHelper(SHA384);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA384(message, key);\n\t */\n\t C.HmacSHA384 = SHA512._createHmacHelper(SHA384);\n\t}());\n\n\n\treturn CryptoJS.SHA384;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha384.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha512.js": +/*!**************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha512.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./x64-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/x64-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Hasher = C_lib.Hasher;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var X64WordArray = C_x64.WordArray;\n\t var C_algo = C.algo;\n\n\t function X64Word_create() {\n\t return X64Word.create.apply(X64Word, arguments);\n\t }\n\n\t // Constants\n\t var K = [\n\t X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd),\n\t X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc),\n\t X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019),\n\t X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118),\n\t X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe),\n\t X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2),\n\t X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1),\n\t X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694),\n\t X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3),\n\t X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65),\n\t X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483),\n\t X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5),\n\t X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210),\n\t X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4),\n\t X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725),\n\t X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70),\n\t X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926),\n\t X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df),\n\t X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8),\n\t X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b),\n\t X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001),\n\t X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30),\n\t X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910),\n\t X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8),\n\t X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53),\n\t X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8),\n\t X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb),\n\t X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3),\n\t X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60),\n\t X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec),\n\t X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9),\n\t X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b),\n\t X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207),\n\t X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178),\n\t X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6),\n\t X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b),\n\t X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493),\n\t X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c),\n\t X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a),\n\t X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)\n\t ];\n\n\t // Reusable objects\n\t var W = [];\n\t (function () {\n\t for (var i = 0; i < 80; i++) {\n\t W[i] = X64Word_create();\n\t }\n\t }());\n\n\t /**\n\t * SHA-512 hash algorithm.\n\t */\n\t var SHA512 = C_algo.SHA512 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new X64WordArray.init([\n\t new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b),\n\t new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1),\n\t new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f),\n\t new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcuts\n\t var H = this._hash.words;\n\n\t var H0 = H[0];\n\t var H1 = H[1];\n\t var H2 = H[2];\n\t var H3 = H[3];\n\t var H4 = H[4];\n\t var H5 = H[5];\n\t var H6 = H[6];\n\t var H7 = H[7];\n\n\t var H0h = H0.high;\n\t var H0l = H0.low;\n\t var H1h = H1.high;\n\t var H1l = H1.low;\n\t var H2h = H2.high;\n\t var H2l = H2.low;\n\t var H3h = H3.high;\n\t var H3l = H3.low;\n\t var H4h = H4.high;\n\t var H4l = H4.low;\n\t var H5h = H5.high;\n\t var H5l = H5.low;\n\t var H6h = H6.high;\n\t var H6l = H6.low;\n\t var H7h = H7.high;\n\t var H7l = H7.low;\n\n\t // Working variables\n\t var ah = H0h;\n\t var al = H0l;\n\t var bh = H1h;\n\t var bl = H1l;\n\t var ch = H2h;\n\t var cl = H2l;\n\t var dh = H3h;\n\t var dl = H3l;\n\t var eh = H4h;\n\t var el = H4l;\n\t var fh = H5h;\n\t var fl = H5l;\n\t var gh = H6h;\n\t var gl = H6l;\n\t var hh = H7h;\n\t var hl = H7l;\n\n\t // Rounds\n\t for (var i = 0; i < 80; i++) {\n\t // Shortcut\n\t var Wi = W[i];\n\n\t // Extend message\n\t if (i < 16) {\n\t var Wih = Wi.high = M[offset + i * 2] | 0;\n\t var Wil = Wi.low = M[offset + i * 2 + 1] | 0;\n\t } else {\n\t // Gamma0\n\t var gamma0x = W[i - 15];\n\t var gamma0xh = gamma0x.high;\n\t var gamma0xl = gamma0x.low;\n\t var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7);\n\t var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25));\n\n\t // Gamma1\n\t var gamma1x = W[i - 2];\n\t var gamma1xh = gamma1x.high;\n\t var gamma1xl = gamma1x.low;\n\t var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6);\n\t var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26));\n\n\t // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]\n\t var Wi7 = W[i - 7];\n\t var Wi7h = Wi7.high;\n\t var Wi7l = Wi7.low;\n\n\t var Wi16 = W[i - 16];\n\t var Wi16h = Wi16.high;\n\t var Wi16l = Wi16.low;\n\n\t var Wil = gamma0l + Wi7l;\n\t var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0);\n\t var Wil = Wil + gamma1l;\n\t var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0);\n\t var Wil = Wil + Wi16l;\n\t var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0);\n\n\t Wi.high = Wih;\n\t Wi.low = Wil;\n\t }\n\n\t var chh = (eh & fh) ^ (~eh & gh);\n\t var chl = (el & fl) ^ (~el & gl);\n\t var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch);\n\t var majl = (al & bl) ^ (al & cl) ^ (bl & cl);\n\n\t var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7));\n\t var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7));\n\t var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9));\n\t var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9));\n\n\t // t1 = h + sigma1 + ch + K[i] + W[i]\n\t var Ki = K[i];\n\t var Kih = Ki.high;\n\t var Kil = Ki.low;\n\n\t var t1l = hl + sigma1l;\n\t var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0);\n\t var t1l = t1l + chl;\n\t var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0);\n\t var t1l = t1l + Kil;\n\t var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0);\n\t var t1l = t1l + Wil;\n\t var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0);\n\n\t // t2 = sigma0 + maj\n\t var t2l = sigma0l + majl;\n\t var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0);\n\n\t // Update working variables\n\t hh = gh;\n\t hl = gl;\n\t gh = fh;\n\t gl = fl;\n\t fh = eh;\n\t fl = el;\n\t el = (dl + t1l) | 0;\n\t eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0;\n\t dh = ch;\n\t dl = cl;\n\t ch = bh;\n\t cl = bl;\n\t bh = ah;\n\t bl = al;\n\t al = (t1l + t2l) | 0;\n\t ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H0l = H0.low = (H0l + al);\n\t H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0));\n\t H1l = H1.low = (H1l + bl);\n\t H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0));\n\t H2l = H2.low = (H2l + cl);\n\t H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0));\n\t H3l = H3.low = (H3l + dl);\n\t H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0));\n\t H4l = H4.low = (H4l + el);\n\t H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0));\n\t H5l = H5.low = (H5l + fl);\n\t H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0));\n\t H6l = H6.low = (H6l + gl);\n\t H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0));\n\t H7l = H7.low = (H7l + hl);\n\t H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0));\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Convert hash to 32-bit word array before returning\n\t var hash = this._hash.toX32();\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t },\n\n\t blockSize: 1024/32\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA512('message');\n\t * var hash = CryptoJS.SHA512(wordArray);\n\t */\n\t C.SHA512 = Hasher._createHelper(SHA512);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA512(message, key);\n\t */\n\t C.HmacSHA512 = Hasher._createHmacHelper(SHA512);\n\t}());\n\n\n\treturn CryptoJS.SHA512;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha512.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/tripledes.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/tripledes.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./enc-base64 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js\"), __webpack_require__(/*! ./md5 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js\"), __webpack_require__(/*! ./evpkdf */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Permuted Choice 1 constants\n\t var PC1 = [\n\t 57, 49, 41, 33, 25, 17, 9, 1,\n\t 58, 50, 42, 34, 26, 18, 10, 2,\n\t 59, 51, 43, 35, 27, 19, 11, 3,\n\t 60, 52, 44, 36, 63, 55, 47, 39,\n\t 31, 23, 15, 7, 62, 54, 46, 38,\n\t 30, 22, 14, 6, 61, 53, 45, 37,\n\t 29, 21, 13, 5, 28, 20, 12, 4\n\t ];\n\n\t // Permuted Choice 2 constants\n\t var PC2 = [\n\t 14, 17, 11, 24, 1, 5,\n\t 3, 28, 15, 6, 21, 10,\n\t 23, 19, 12, 4, 26, 8,\n\t 16, 7, 27, 20, 13, 2,\n\t 41, 52, 31, 37, 47, 55,\n\t 30, 40, 51, 45, 33, 48,\n\t 44, 49, 39, 56, 34, 53,\n\t 46, 42, 50, 36, 29, 32\n\t ];\n\n\t // Cumulative bit shift constants\n\t var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];\n\n\t // SBOXes and round permutation constants\n\t var SBOX_P = [\n\t {\n\t 0x0: 0x808200,\n\t 0x10000000: 0x8000,\n\t 0x20000000: 0x808002,\n\t 0x30000000: 0x2,\n\t 0x40000000: 0x200,\n\t 0x50000000: 0x808202,\n\t 0x60000000: 0x800202,\n\t 0x70000000: 0x800000,\n\t 0x80000000: 0x202,\n\t 0x90000000: 0x800200,\n\t 0xa0000000: 0x8200,\n\t 0xb0000000: 0x808000,\n\t 0xc0000000: 0x8002,\n\t 0xd0000000: 0x800002,\n\t 0xe0000000: 0x0,\n\t 0xf0000000: 0x8202,\n\t 0x8000000: 0x0,\n\t 0x18000000: 0x808202,\n\t 0x28000000: 0x8202,\n\t 0x38000000: 0x8000,\n\t 0x48000000: 0x808200,\n\t 0x58000000: 0x200,\n\t 0x68000000: 0x808002,\n\t 0x78000000: 0x2,\n\t 0x88000000: 0x800200,\n\t 0x98000000: 0x8200,\n\t 0xa8000000: 0x808000,\n\t 0xb8000000: 0x800202,\n\t 0xc8000000: 0x800002,\n\t 0xd8000000: 0x8002,\n\t 0xe8000000: 0x202,\n\t 0xf8000000: 0x800000,\n\t 0x1: 0x8000,\n\t 0x10000001: 0x2,\n\t 0x20000001: 0x808200,\n\t 0x30000001: 0x800000,\n\t 0x40000001: 0x808002,\n\t 0x50000001: 0x8200,\n\t 0x60000001: 0x200,\n\t 0x70000001: 0x800202,\n\t 0x80000001: 0x808202,\n\t 0x90000001: 0x808000,\n\t 0xa0000001: 0x800002,\n\t 0xb0000001: 0x8202,\n\t 0xc0000001: 0x202,\n\t 0xd0000001: 0x800200,\n\t 0xe0000001: 0x8002,\n\t 0xf0000001: 0x0,\n\t 0x8000001: 0x808202,\n\t 0x18000001: 0x808000,\n\t 0x28000001: 0x800000,\n\t 0x38000001: 0x200,\n\t 0x48000001: 0x8000,\n\t 0x58000001: 0x800002,\n\t 0x68000001: 0x2,\n\t 0x78000001: 0x8202,\n\t 0x88000001: 0x8002,\n\t 0x98000001: 0x800202,\n\t 0xa8000001: 0x202,\n\t 0xb8000001: 0x808200,\n\t 0xc8000001: 0x800200,\n\t 0xd8000001: 0x0,\n\t 0xe8000001: 0x8200,\n\t 0xf8000001: 0x808002\n\t },\n\t {\n\t 0x0: 0x40084010,\n\t 0x1000000: 0x4000,\n\t 0x2000000: 0x80000,\n\t 0x3000000: 0x40080010,\n\t 0x4000000: 0x40000010,\n\t 0x5000000: 0x40084000,\n\t 0x6000000: 0x40004000,\n\t 0x7000000: 0x10,\n\t 0x8000000: 0x84000,\n\t 0x9000000: 0x40004010,\n\t 0xa000000: 0x40000000,\n\t 0xb000000: 0x84010,\n\t 0xc000000: 0x80010,\n\t 0xd000000: 0x0,\n\t 0xe000000: 0x4010,\n\t 0xf000000: 0x40080000,\n\t 0x800000: 0x40004000,\n\t 0x1800000: 0x84010,\n\t 0x2800000: 0x10,\n\t 0x3800000: 0x40004010,\n\t 0x4800000: 0x40084010,\n\t 0x5800000: 0x40000000,\n\t 0x6800000: 0x80000,\n\t 0x7800000: 0x40080010,\n\t 0x8800000: 0x80010,\n\t 0x9800000: 0x0,\n\t 0xa800000: 0x4000,\n\t 0xb800000: 0x40080000,\n\t 0xc800000: 0x40000010,\n\t 0xd800000: 0x84000,\n\t 0xe800000: 0x40084000,\n\t 0xf800000: 0x4010,\n\t 0x10000000: 0x0,\n\t 0x11000000: 0x40080010,\n\t 0x12000000: 0x40004010,\n\t 0x13000000: 0x40084000,\n\t 0x14000000: 0x40080000,\n\t 0x15000000: 0x10,\n\t 0x16000000: 0x84010,\n\t 0x17000000: 0x4000,\n\t 0x18000000: 0x4010,\n\t 0x19000000: 0x80000,\n\t 0x1a000000: 0x80010,\n\t 0x1b000000: 0x40000010,\n\t 0x1c000000: 0x84000,\n\t 0x1d000000: 0x40004000,\n\t 0x1e000000: 0x40000000,\n\t 0x1f000000: 0x40084010,\n\t 0x10800000: 0x84010,\n\t 0x11800000: 0x80000,\n\t 0x12800000: 0x40080000,\n\t 0x13800000: 0x4000,\n\t 0x14800000: 0x40004000,\n\t 0x15800000: 0x40084010,\n\t 0x16800000: 0x10,\n\t 0x17800000: 0x40000000,\n\t 0x18800000: 0x40084000,\n\t 0x19800000: 0x40000010,\n\t 0x1a800000: 0x40004010,\n\t 0x1b800000: 0x80010,\n\t 0x1c800000: 0x0,\n\t 0x1d800000: 0x4010,\n\t 0x1e800000: 0x40080010,\n\t 0x1f800000: 0x84000\n\t },\n\t {\n\t 0x0: 0x104,\n\t 0x100000: 0x0,\n\t 0x200000: 0x4000100,\n\t 0x300000: 0x10104,\n\t 0x400000: 0x10004,\n\t 0x500000: 0x4000004,\n\t 0x600000: 0x4010104,\n\t 0x700000: 0x4010000,\n\t 0x800000: 0x4000000,\n\t 0x900000: 0x4010100,\n\t 0xa00000: 0x10100,\n\t 0xb00000: 0x4010004,\n\t 0xc00000: 0x4000104,\n\t 0xd00000: 0x10000,\n\t 0xe00000: 0x4,\n\t 0xf00000: 0x100,\n\t 0x80000: 0x4010100,\n\t 0x180000: 0x4010004,\n\t 0x280000: 0x0,\n\t 0x380000: 0x4000100,\n\t 0x480000: 0x4000004,\n\t 0x580000: 0x10000,\n\t 0x680000: 0x10004,\n\t 0x780000: 0x104,\n\t 0x880000: 0x4,\n\t 0x980000: 0x100,\n\t 0xa80000: 0x4010000,\n\t 0xb80000: 0x10104,\n\t 0xc80000: 0x10100,\n\t 0xd80000: 0x4000104,\n\t 0xe80000: 0x4010104,\n\t 0xf80000: 0x4000000,\n\t 0x1000000: 0x4010100,\n\t 0x1100000: 0x10004,\n\t 0x1200000: 0x10000,\n\t 0x1300000: 0x4000100,\n\t 0x1400000: 0x100,\n\t 0x1500000: 0x4010104,\n\t 0x1600000: 0x4000004,\n\t 0x1700000: 0x0,\n\t 0x1800000: 0x4000104,\n\t 0x1900000: 0x4000000,\n\t 0x1a00000: 0x4,\n\t 0x1b00000: 0x10100,\n\t 0x1c00000: 0x4010000,\n\t 0x1d00000: 0x104,\n\t 0x1e00000: 0x10104,\n\t 0x1f00000: 0x4010004,\n\t 0x1080000: 0x4000000,\n\t 0x1180000: 0x104,\n\t 0x1280000: 0x4010100,\n\t 0x1380000: 0x0,\n\t 0x1480000: 0x10004,\n\t 0x1580000: 0x4000100,\n\t 0x1680000: 0x100,\n\t 0x1780000: 0x4010004,\n\t 0x1880000: 0x10000,\n\t 0x1980000: 0x4010104,\n\t 0x1a80000: 0x10104,\n\t 0x1b80000: 0x4000004,\n\t 0x1c80000: 0x4000104,\n\t 0x1d80000: 0x4010000,\n\t 0x1e80000: 0x4,\n\t 0x1f80000: 0x10100\n\t },\n\t {\n\t 0x0: 0x80401000,\n\t 0x10000: 0x80001040,\n\t 0x20000: 0x401040,\n\t 0x30000: 0x80400000,\n\t 0x40000: 0x0,\n\t 0x50000: 0x401000,\n\t 0x60000: 0x80000040,\n\t 0x70000: 0x400040,\n\t 0x80000: 0x80000000,\n\t 0x90000: 0x400000,\n\t 0xa0000: 0x40,\n\t 0xb0000: 0x80001000,\n\t 0xc0000: 0x80400040,\n\t 0xd0000: 0x1040,\n\t 0xe0000: 0x1000,\n\t 0xf0000: 0x80401040,\n\t 0x8000: 0x80001040,\n\t 0x18000: 0x40,\n\t 0x28000: 0x80400040,\n\t 0x38000: 0x80001000,\n\t 0x48000: 0x401000,\n\t 0x58000: 0x80401040,\n\t 0x68000: 0x0,\n\t 0x78000: 0x80400000,\n\t 0x88000: 0x1000,\n\t 0x98000: 0x80401000,\n\t 0xa8000: 0x400000,\n\t 0xb8000: 0x1040,\n\t 0xc8000: 0x80000000,\n\t 0xd8000: 0x400040,\n\t 0xe8000: 0x401040,\n\t 0xf8000: 0x80000040,\n\t 0x100000: 0x400040,\n\t 0x110000: 0x401000,\n\t 0x120000: 0x80000040,\n\t 0x130000: 0x0,\n\t 0x140000: 0x1040,\n\t 0x150000: 0x80400040,\n\t 0x160000: 0x80401000,\n\t 0x170000: 0x80001040,\n\t 0x180000: 0x80401040,\n\t 0x190000: 0x80000000,\n\t 0x1a0000: 0x80400000,\n\t 0x1b0000: 0x401040,\n\t 0x1c0000: 0x80001000,\n\t 0x1d0000: 0x400000,\n\t 0x1e0000: 0x40,\n\t 0x1f0000: 0x1000,\n\t 0x108000: 0x80400000,\n\t 0x118000: 0x80401040,\n\t 0x128000: 0x0,\n\t 0x138000: 0x401000,\n\t 0x148000: 0x400040,\n\t 0x158000: 0x80000000,\n\t 0x168000: 0x80001040,\n\t 0x178000: 0x40,\n\t 0x188000: 0x80000040,\n\t 0x198000: 0x1000,\n\t 0x1a8000: 0x80001000,\n\t 0x1b8000: 0x80400040,\n\t 0x1c8000: 0x1040,\n\t 0x1d8000: 0x80401000,\n\t 0x1e8000: 0x400000,\n\t 0x1f8000: 0x401040\n\t },\n\t {\n\t 0x0: 0x80,\n\t 0x1000: 0x1040000,\n\t 0x2000: 0x40000,\n\t 0x3000: 0x20000000,\n\t 0x4000: 0x20040080,\n\t 0x5000: 0x1000080,\n\t 0x6000: 0x21000080,\n\t 0x7000: 0x40080,\n\t 0x8000: 0x1000000,\n\t 0x9000: 0x20040000,\n\t 0xa000: 0x20000080,\n\t 0xb000: 0x21040080,\n\t 0xc000: 0x21040000,\n\t 0xd000: 0x0,\n\t 0xe000: 0x1040080,\n\t 0xf000: 0x21000000,\n\t 0x800: 0x1040080,\n\t 0x1800: 0x21000080,\n\t 0x2800: 0x80,\n\t 0x3800: 0x1040000,\n\t 0x4800: 0x40000,\n\t 0x5800: 0x20040080,\n\t 0x6800: 0x21040000,\n\t 0x7800: 0x20000000,\n\t 0x8800: 0x20040000,\n\t 0x9800: 0x0,\n\t 0xa800: 0x21040080,\n\t 0xb800: 0x1000080,\n\t 0xc800: 0x20000080,\n\t 0xd800: 0x21000000,\n\t 0xe800: 0x1000000,\n\t 0xf800: 0x40080,\n\t 0x10000: 0x40000,\n\t 0x11000: 0x80,\n\t 0x12000: 0x20000000,\n\t 0x13000: 0x21000080,\n\t 0x14000: 0x1000080,\n\t 0x15000: 0x21040000,\n\t 0x16000: 0x20040080,\n\t 0x17000: 0x1000000,\n\t 0x18000: 0x21040080,\n\t 0x19000: 0x21000000,\n\t 0x1a000: 0x1040000,\n\t 0x1b000: 0x20040000,\n\t 0x1c000: 0x40080,\n\t 0x1d000: 0x20000080,\n\t 0x1e000: 0x0,\n\t 0x1f000: 0x1040080,\n\t 0x10800: 0x21000080,\n\t 0x11800: 0x1000000,\n\t 0x12800: 0x1040000,\n\t 0x13800: 0x20040080,\n\t 0x14800: 0x20000000,\n\t 0x15800: 0x1040080,\n\t 0x16800: 0x80,\n\t 0x17800: 0x21040000,\n\t 0x18800: 0x40080,\n\t 0x19800: 0x21040080,\n\t 0x1a800: 0x0,\n\t 0x1b800: 0x21000000,\n\t 0x1c800: 0x1000080,\n\t 0x1d800: 0x40000,\n\t 0x1e800: 0x20040000,\n\t 0x1f800: 0x20000080\n\t },\n\t {\n\t 0x0: 0x10000008,\n\t 0x100: 0x2000,\n\t 0x200: 0x10200000,\n\t 0x300: 0x10202008,\n\t 0x400: 0x10002000,\n\t 0x500: 0x200000,\n\t 0x600: 0x200008,\n\t 0x700: 0x10000000,\n\t 0x800: 0x0,\n\t 0x900: 0x10002008,\n\t 0xa00: 0x202000,\n\t 0xb00: 0x8,\n\t 0xc00: 0x10200008,\n\t 0xd00: 0x202008,\n\t 0xe00: 0x2008,\n\t 0xf00: 0x10202000,\n\t 0x80: 0x10200000,\n\t 0x180: 0x10202008,\n\t 0x280: 0x8,\n\t 0x380: 0x200000,\n\t 0x480: 0x202008,\n\t 0x580: 0x10000008,\n\t 0x680: 0x10002000,\n\t 0x780: 0x2008,\n\t 0x880: 0x200008,\n\t 0x980: 0x2000,\n\t 0xa80: 0x10002008,\n\t 0xb80: 0x10200008,\n\t 0xc80: 0x0,\n\t 0xd80: 0x10202000,\n\t 0xe80: 0x202000,\n\t 0xf80: 0x10000000,\n\t 0x1000: 0x10002000,\n\t 0x1100: 0x10200008,\n\t 0x1200: 0x10202008,\n\t 0x1300: 0x2008,\n\t 0x1400: 0x200000,\n\t 0x1500: 0x10000000,\n\t 0x1600: 0x10000008,\n\t 0x1700: 0x202000,\n\t 0x1800: 0x202008,\n\t 0x1900: 0x0,\n\t 0x1a00: 0x8,\n\t 0x1b00: 0x10200000,\n\t 0x1c00: 0x2000,\n\t 0x1d00: 0x10002008,\n\t 0x1e00: 0x10202000,\n\t 0x1f00: 0x200008,\n\t 0x1080: 0x8,\n\t 0x1180: 0x202000,\n\t 0x1280: 0x200000,\n\t 0x1380: 0x10000008,\n\t 0x1480: 0x10002000,\n\t 0x1580: 0x2008,\n\t 0x1680: 0x10202008,\n\t 0x1780: 0x10200000,\n\t 0x1880: 0x10202000,\n\t 0x1980: 0x10200008,\n\t 0x1a80: 0x2000,\n\t 0x1b80: 0x202008,\n\t 0x1c80: 0x200008,\n\t 0x1d80: 0x0,\n\t 0x1e80: 0x10000000,\n\t 0x1f80: 0x10002008\n\t },\n\t {\n\t 0x0: 0x100000,\n\t 0x10: 0x2000401,\n\t 0x20: 0x400,\n\t 0x30: 0x100401,\n\t 0x40: 0x2100401,\n\t 0x50: 0x0,\n\t 0x60: 0x1,\n\t 0x70: 0x2100001,\n\t 0x80: 0x2000400,\n\t 0x90: 0x100001,\n\t 0xa0: 0x2000001,\n\t 0xb0: 0x2100400,\n\t 0xc0: 0x2100000,\n\t 0xd0: 0x401,\n\t 0xe0: 0x100400,\n\t 0xf0: 0x2000000,\n\t 0x8: 0x2100001,\n\t 0x18: 0x0,\n\t 0x28: 0x2000401,\n\t 0x38: 0x2100400,\n\t 0x48: 0x100000,\n\t 0x58: 0x2000001,\n\t 0x68: 0x2000000,\n\t 0x78: 0x401,\n\t 0x88: 0x100401,\n\t 0x98: 0x2000400,\n\t 0xa8: 0x2100000,\n\t 0xb8: 0x100001,\n\t 0xc8: 0x400,\n\t 0xd8: 0x2100401,\n\t 0xe8: 0x1,\n\t 0xf8: 0x100400,\n\t 0x100: 0x2000000,\n\t 0x110: 0x100000,\n\t 0x120: 0x2000401,\n\t 0x130: 0x2100001,\n\t 0x140: 0x100001,\n\t 0x150: 0x2000400,\n\t 0x160: 0x2100400,\n\t 0x170: 0x100401,\n\t 0x180: 0x401,\n\t 0x190: 0x2100401,\n\t 0x1a0: 0x100400,\n\t 0x1b0: 0x1,\n\t 0x1c0: 0x0,\n\t 0x1d0: 0x2100000,\n\t 0x1e0: 0x2000001,\n\t 0x1f0: 0x400,\n\t 0x108: 0x100400,\n\t 0x118: 0x2000401,\n\t 0x128: 0x2100001,\n\t 0x138: 0x1,\n\t 0x148: 0x2000000,\n\t 0x158: 0x100000,\n\t 0x168: 0x401,\n\t 0x178: 0x2100400,\n\t 0x188: 0x2000001,\n\t 0x198: 0x2100000,\n\t 0x1a8: 0x0,\n\t 0x1b8: 0x2100401,\n\t 0x1c8: 0x100401,\n\t 0x1d8: 0x400,\n\t 0x1e8: 0x2000400,\n\t 0x1f8: 0x100001\n\t },\n\t {\n\t 0x0: 0x8000820,\n\t 0x1: 0x20000,\n\t 0x2: 0x8000000,\n\t 0x3: 0x20,\n\t 0x4: 0x20020,\n\t 0x5: 0x8020820,\n\t 0x6: 0x8020800,\n\t 0x7: 0x800,\n\t 0x8: 0x8020000,\n\t 0x9: 0x8000800,\n\t 0xa: 0x20800,\n\t 0xb: 0x8020020,\n\t 0xc: 0x820,\n\t 0xd: 0x0,\n\t 0xe: 0x8000020,\n\t 0xf: 0x20820,\n\t 0x80000000: 0x800,\n\t 0x80000001: 0x8020820,\n\t 0x80000002: 0x8000820,\n\t 0x80000003: 0x8000000,\n\t 0x80000004: 0x8020000,\n\t 0x80000005: 0x20800,\n\t 0x80000006: 0x20820,\n\t 0x80000007: 0x20,\n\t 0x80000008: 0x8000020,\n\t 0x80000009: 0x820,\n\t 0x8000000a: 0x20020,\n\t 0x8000000b: 0x8020800,\n\t 0x8000000c: 0x0,\n\t 0x8000000d: 0x8020020,\n\t 0x8000000e: 0x8000800,\n\t 0x8000000f: 0x20000,\n\t 0x10: 0x20820,\n\t 0x11: 0x8020800,\n\t 0x12: 0x20,\n\t 0x13: 0x800,\n\t 0x14: 0x8000800,\n\t 0x15: 0x8000020,\n\t 0x16: 0x8020020,\n\t 0x17: 0x20000,\n\t 0x18: 0x0,\n\t 0x19: 0x20020,\n\t 0x1a: 0x8020000,\n\t 0x1b: 0x8000820,\n\t 0x1c: 0x8020820,\n\t 0x1d: 0x20800,\n\t 0x1e: 0x820,\n\t 0x1f: 0x8000000,\n\t 0x80000010: 0x20000,\n\t 0x80000011: 0x800,\n\t 0x80000012: 0x8020020,\n\t 0x80000013: 0x20820,\n\t 0x80000014: 0x20,\n\t 0x80000015: 0x8020000,\n\t 0x80000016: 0x8000000,\n\t 0x80000017: 0x8000820,\n\t 0x80000018: 0x8020820,\n\t 0x80000019: 0x8000020,\n\t 0x8000001a: 0x8000800,\n\t 0x8000001b: 0x0,\n\t 0x8000001c: 0x20800,\n\t 0x8000001d: 0x820,\n\t 0x8000001e: 0x20020,\n\t 0x8000001f: 0x8020800\n\t }\n\t ];\n\n\t // Masks that select the SBOX input\n\t var SBOX_MASK = [\n\t 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000,\n\t 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f\n\t ];\n\n\t /**\n\t * DES block cipher algorithm.\n\t */\n\t var DES = C_algo.DES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\n\t // Select 56 bits according to PC1\n\t var keyBits = [];\n\t for (var i = 0; i < 56; i++) {\n\t var keyBitPos = PC1[i] - 1;\n\t keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1;\n\t }\n\n\t // Assemble 16 subkeys\n\t var subKeys = this._subKeys = [];\n\t for (var nSubKey = 0; nSubKey < 16; nSubKey++) {\n\t // Create subkey\n\t var subKey = subKeys[nSubKey] = [];\n\n\t // Shortcut\n\t var bitShift = BIT_SHIFTS[nSubKey];\n\n\t // Select 48 bits according to PC2\n\t for (var i = 0; i < 24; i++) {\n\t // Select from the left 28 key bits\n\t subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6);\n\n\t // Select from the right 28 key bits\n\t subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6);\n\t }\n\n\t // Since each subkey is applied to an expanded 32-bit input,\n\t // the subkey can be broken into 8 values scaled to 32-bits,\n\t // which allows the key to be used without expansion\n\t subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31);\n\t for (var i = 1; i < 7; i++) {\n\t subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3);\n\t }\n\t subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27);\n\t }\n\n\t // Compute inverse subkeys\n\t var invSubKeys = this._invSubKeys = [];\n\t for (var i = 0; i < 16; i++) {\n\t invSubKeys[i] = subKeys[15 - i];\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._subKeys);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._invSubKeys);\n\t },\n\n\t _doCryptBlock: function (M, offset, subKeys) {\n\t // Get input\n\t this._lBlock = M[offset];\n\t this._rBlock = M[offset + 1];\n\n\t // Initial permutation\n\t exchangeLR.call(this, 4, 0x0f0f0f0f);\n\t exchangeLR.call(this, 16, 0x0000ffff);\n\t exchangeRL.call(this, 2, 0x33333333);\n\t exchangeRL.call(this, 8, 0x00ff00ff);\n\t exchangeLR.call(this, 1, 0x55555555);\n\n\t // Rounds\n\t for (var round = 0; round < 16; round++) {\n\t // Shortcuts\n\t var subKey = subKeys[round];\n\t var lBlock = this._lBlock;\n\t var rBlock = this._rBlock;\n\n\t // Feistel function\n\t var f = 0;\n\t for (var i = 0; i < 8; i++) {\n\t f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];\n\t }\n\t this._lBlock = rBlock;\n\t this._rBlock = lBlock ^ f;\n\t }\n\n\t // Undo swap from last round\n\t var t = this._lBlock;\n\t this._lBlock = this._rBlock;\n\t this._rBlock = t;\n\n\t // Final permutation\n\t exchangeLR.call(this, 1, 0x55555555);\n\t exchangeRL.call(this, 8, 0x00ff00ff);\n\t exchangeRL.call(this, 2, 0x33333333);\n\t exchangeLR.call(this, 16, 0x0000ffff);\n\t exchangeLR.call(this, 4, 0x0f0f0f0f);\n\n\t // Set output\n\t M[offset] = this._lBlock;\n\t M[offset + 1] = this._rBlock;\n\t },\n\n\t keySize: 64/32,\n\n\t ivSize: 64/32,\n\n\t blockSize: 64/32\n\t });\n\n\t // Swap bits across the left and right words\n\t function exchangeLR(offset, mask) {\n\t var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask;\n\t this._rBlock ^= t;\n\t this._lBlock ^= t << offset;\n\t }\n\n\t function exchangeRL(offset, mask) {\n\t var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask;\n\t this._lBlock ^= t;\n\t this._rBlock ^= t << offset;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.DES = BlockCipher._createHelper(DES);\n\n\t /**\n\t * Triple-DES block cipher algorithm.\n\t */\n\t var TripleDES = C_algo.TripleDES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\n\t // Create DES instances\n\t this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2)));\n\t this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4)));\n\t this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6)));\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._des1.encryptBlock(M, offset);\n\t this._des2.decryptBlock(M, offset);\n\t this._des3.encryptBlock(M, offset);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t this._des3.decryptBlock(M, offset);\n\t this._des2.encryptBlock(M, offset);\n\t this._des1.decryptBlock(M, offset);\n\t },\n\n\t keySize: 192/32,\n\n\t ivSize: 64/32,\n\n\t blockSize: 64/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.TripleDES = BlockCipher._createHelper(TripleDES);\n\t}());\n\n\n\treturn CryptoJS.TripleDES;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/tripledes.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/x64-core.js": +/*!****************************************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/x64-core.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var X32WordArray = C_lib.WordArray;\n\n\t /**\n\t * x64 namespace.\n\t */\n\t var C_x64 = C.x64 = {};\n\n\t /**\n\t * A 64-bit word.\n\t */\n\t var X64Word = C_x64.Word = Base.extend({\n\t /**\n\t * Initializes a newly created 64-bit word.\n\t *\n\t * @param {number} high The high 32 bits.\n\t * @param {number} low The low 32 bits.\n\t *\n\t * @example\n\t *\n\t * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);\n\t */\n\t init: function (high, low) {\n\t this.high = high;\n\t this.low = low;\n\t }\n\n\t /**\n\t * Bitwise NOTs this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after negating.\n\t *\n\t * @example\n\t *\n\t * var negated = x64Word.not();\n\t */\n\t // not: function () {\n\t // var high = ~this.high;\n\t // var low = ~this.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise ANDs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to AND with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after ANDing.\n\t *\n\t * @example\n\t *\n\t * var anded = x64Word.and(anotherX64Word);\n\t */\n\t // and: function (word) {\n\t // var high = this.high & word.high;\n\t // var low = this.low & word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise ORs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to OR with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after ORing.\n\t *\n\t * @example\n\t *\n\t * var ored = x64Word.or(anotherX64Word);\n\t */\n\t // or: function (word) {\n\t // var high = this.high | word.high;\n\t // var low = this.low | word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise XORs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to XOR with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after XORing.\n\t *\n\t * @example\n\t *\n\t * var xored = x64Word.xor(anotherX64Word);\n\t */\n\t // xor: function (word) {\n\t // var high = this.high ^ word.high;\n\t // var low = this.low ^ word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Shifts this word n bits to the left.\n\t *\n\t * @param {number} n The number of bits to shift.\n\t *\n\t * @return {X64Word} A new x64-Word object after shifting.\n\t *\n\t * @example\n\t *\n\t * var shifted = x64Word.shiftL(25);\n\t */\n\t // shiftL: function (n) {\n\t // if (n < 32) {\n\t // var high = (this.high << n) | (this.low >>> (32 - n));\n\t // var low = this.low << n;\n\t // } else {\n\t // var high = this.low << (n - 32);\n\t // var low = 0;\n\t // }\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Shifts this word n bits to the right.\n\t *\n\t * @param {number} n The number of bits to shift.\n\t *\n\t * @return {X64Word} A new x64-Word object after shifting.\n\t *\n\t * @example\n\t *\n\t * var shifted = x64Word.shiftR(7);\n\t */\n\t // shiftR: function (n) {\n\t // if (n < 32) {\n\t // var low = (this.low >>> n) | (this.high << (32 - n));\n\t // var high = this.high >>> n;\n\t // } else {\n\t // var low = this.high >>> (n - 32);\n\t // var high = 0;\n\t // }\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Rotates this word n bits to the left.\n\t *\n\t * @param {number} n The number of bits to rotate.\n\t *\n\t * @return {X64Word} A new x64-Word object after rotating.\n\t *\n\t * @example\n\t *\n\t * var rotated = x64Word.rotL(25);\n\t */\n\t // rotL: function (n) {\n\t // return this.shiftL(n).or(this.shiftR(64 - n));\n\t // },\n\n\t /**\n\t * Rotates this word n bits to the right.\n\t *\n\t * @param {number} n The number of bits to rotate.\n\t *\n\t * @return {X64Word} A new x64-Word object after rotating.\n\t *\n\t * @example\n\t *\n\t * var rotated = x64Word.rotR(7);\n\t */\n\t // rotR: function (n) {\n\t // return this.shiftR(n).or(this.shiftL(64 - n));\n\t // },\n\n\t /**\n\t * Adds this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to add with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after adding.\n\t *\n\t * @example\n\t *\n\t * var added = x64Word.add(anotherX64Word);\n\t */\n\t // add: function (word) {\n\t // var low = (this.low + word.low) | 0;\n\t // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;\n\t // var high = (this.high + word.high + carry) | 0;\n\n\t // return X64Word.create(high, low);\n\t // }\n\t });\n\n\t /**\n\t * An array of 64-bit words.\n\t *\n\t * @property {Array} words The array of CryptoJS.x64.Word objects.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var X64WordArray = C_x64.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create();\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create([\n\t * CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n\t * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n\t * ]);\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create([\n\t * CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n\t * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n\t * ], 10);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 8;\n\t }\n\t },\n\n\t /**\n\t * Converts this 64-bit word array to a 32-bit word array.\n\t *\n\t * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.\n\t *\n\t * @example\n\t *\n\t * var x32WordArray = x64WordArray.toX32();\n\t */\n\t toX32: function () {\n\t // Shortcuts\n\t var x64Words = this.words;\n\t var x64WordsLength = x64Words.length;\n\n\t // Convert\n\t var x32Words = [];\n\t for (var i = 0; i < x64WordsLength; i++) {\n\t var x64Word = x64Words[i];\n\t x32Words.push(x64Word.high);\n\t x32Words.push(x64Word.low);\n\t }\n\n\t return X32WordArray.create(x32Words, this.sigBytes);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {X64WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = x64WordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\n\t // Clone \"words\" array\n\t var words = clone.words = this.words.slice(0);\n\n\t // Clone each X64Word object\n\t var wordsLength = words.length;\n\t for (var i = 0; i < wordsLength; i++) {\n\t words[i] = words[i].clone();\n\t }\n\n\t return clone;\n\t }\n\t });\n\t}());\n\n\n\treturn CryptoJS;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/x64-core.js?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/package.json": +/*!******************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/package.json ***! + \******************************************************/ +/*! exports provided: _from, _id, _inBundle, _integrity, _location, _phantomChildren, _requested, _requiredBy, _resolved, _shasum, _spec, _where, author, bugs, bundleDependencies, dependencies, deprecated, description, devDependencies, engines, homepage, keywords, license, main, name, repository, scripts, version, default */ +/***/ (function(module) { + +eval("module.exports = {\"_from\":\"aws-iot-device-sdk@^2.2.1\",\"_id\":\"aws-iot-device-sdk@2.2.3\",\"_inBundle\":false,\"_integrity\":\"sha512-XhKPEZjwtSNJ0oV9l1gJ0YBlcg/M7QzeiUSbW2lLBa3Nuh84OOkQzcUFzNrSWro6sOdrLmLPqWKi7SsERUAbQg==\",\"_location\":\"/aws-iot-device-sdk\",\"_phantomChildren\":{},\"_requested\":{\"type\":\"range\",\"registry\":true,\"raw\":\"aws-iot-device-sdk@^2.2.1\",\"name\":\"aws-iot-device-sdk\",\"escapedName\":\"aws-iot-device-sdk\",\"rawSpec\":\"^2.2.1\",\"saveSpec\":null,\"fetchSpec\":\"^2.2.1\"},\"_requiredBy\":[\"/\"],\"_resolved\":\"https://registry.npmjs.org/aws-iot-device-sdk/-/aws-iot-device-sdk-2.2.3.tgz\",\"_shasum\":\"8041b7acdcbfa1b4e425cb66ac1228aac4277926\",\"_spec\":\"aws-iot-device-sdk@^2.2.1\",\"_where\":\"/opt/lampp/htdocs/Channelize/channelize-websdk\",\"author\":{\"name\":\"Amazon Web Services\",\"url\":\"http://aws.amazon.com\"},\"bugs\":{\"url\":\"http://github.com/aws/aws-iot-device-sdk-js/issues\"},\"bundleDependencies\":false,\"dependencies\":{\"crypto-js\":\"3.1.6\",\"minimist\":\"1.2.0\",\"mqtt\":\"2.18.8\",\"websocket-stream\":\"^5.0.1\"},\"deprecated\":false,\"description\":\"AWS IoT Node.js SDK for Embedded Devices\",\"devDependencies\":{\"gulp\":\"^3.9.0\",\"gulp-beautify\":\"^2.0.0\",\"gulp-concat\":\"^2.6.0\",\"gulp-coverage\":\"^0.3.38\",\"gulp-jscs\":\"^4.0.0\",\"gulp-jshint\":\"^2.0.0\",\"gulp-mocha\":\"^3.0.1\",\"jshint\":\"^2.9.1\",\"jshint-stylish\":\"^2.2.1\",\"rewire\":\"^2.5.1\",\"sinon\":\"^1.17.3\"},\"engines\":{\"node\":\">=4.0.0\"},\"homepage\":\"https://github.com/aws/aws-iot-device-sdk-js\",\"keywords\":[\"api\",\"amazon\",\"aws\",\"iot\",\"mqtt\"],\"license\":\"Apache-2.0\",\"main\":\"index.js\",\"name\":\"aws-iot-device-sdk\",\"repository\":{\"type\":\"git\",\"url\":\"git://github.com/aws/aws-iot-device-sdk-js.git\"},\"scripts\":{\"beautify\":\"node ./node_modules/gulp/bin/gulp.js beautify\",\"browserize\":\"./scripts/browserize.sh\",\"test\":\"node ./node_modules/gulp/bin/gulp.js test --verbose\"},\"version\":\"2.2.3\"};\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/package.json?"); + +/***/ }), + +/***/ "./node_modules/aws-iot-device-sdk/thing/index.js": +/*!********************************************************!*\ + !*** ./node_modules/aws-iot-device-sdk/thing/index.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\nvar events = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\");\nvar inherits = __webpack_require__(/*! util */ \"./node_modules/util/util.js\").inherits;\n\n//npm deps\n\n//app deps\nvar deviceModule = __webpack_require__(/*! ../device */ \"./node_modules/aws-iot-device-sdk/device/index.js\");\nvar isUndefined = __webpack_require__(/*! ../common/lib/is-undefined */ \"./node_modules/aws-iot-device-sdk/common/lib/is-undefined.js\");\n\n//\n// private functions\n//\nfunction buildThingShadowTopic(thingName, operation, type) {\n if (!isUndefined(type)) {\n return '$aws/things/' + thingName + '/shadow/' + operation + '/' + type;\n }\n return '$aws/things/' + thingName + '/shadow/' + operation;\n}\n\nfunction isReservedTopic(topic) {\n if (topic.substring(0, 12) === '$aws/things/') {\n return true;\n }\n return false;\n}\n\nfunction isThingShadowTopic(topicTokens, direction) {\n var rc = false;\n if (topicTokens[0] === '$aws') {\n //\n // Thing shadow topics have the form:\n //\n // $aws/things/{thingName}/shadow/{Operation}/{Status}\n //\n // Where {Operation} === update|get|delete\n // And {Status} === accepted|rejected|delta\n //\n if ((topicTokens[1] === 'things') &&\n (topicTokens[3] === 'shadow') &&\n ((topicTokens[4] === 'update') ||\n (topicTokens[4] === 'get') ||\n (topicTokens[4] === 'delete'))) {\n //\n // Looks good so far; now check the direction and see if\n // still makes sense.\n //\n if (direction === 'subscribe') {\n if (((topicTokens[5] === 'accepted') ||\n (topicTokens[5] === 'rejected') ||\n (topicTokens[5] === 'delta')) &&\n (topicTokens.length === 6)) {\n rc = true;\n }\n } else // direction === 'publish'\n {\n if (topicTokens.length === 5) {\n rc = true;\n }\n }\n }\n }\n return rc;\n}\n\n//begin module\n\nfunction ThingShadowsClient(deviceOptions, thingShadowOptions) {\n //\n // Force instantiation using the 'new' operator; this will cause inherited\n // constructors (e.g. the 'events' class) to be called.\n //\n if (!(this instanceof ThingShadowsClient)) {\n return new ThingShadowsClient(deviceOptions, thingShadowOptions);\n }\n\n //\n // A copy of 'this' for use inside of closures\n //\n var that = this;\n\n //\n // Track Thing Shadow registrations in here.\n //\n var thingShadows = [{}];\n\n //\n // Implements for every operation, used to construct clientToken.\n //\n var operationCount = 0;\n\n //\n // Operation timeout (milliseconds). If no accepted or rejected response\n // to a thing operation is received within this time, subscriptions\n // to the accepted and rejected sub-topics for a thing are cancelled.\n //\n var operationTimeout = 10000; /* milliseconds */\n\n //\n // Variable used by the testing API setConnectionStatus() to simulate\n // network connectivity failures.\n //\n var connected = true;\n\n //\n // Instantiate the device.\n //\n var device = deviceModule.DeviceClient(deviceOptions);\n\n if (!isUndefined(thingShadowOptions)) {\n if (!isUndefined(thingShadowOptions.operationTimeout)) {\n operationTimeout = thingShadowOptions.operationTimeout;\n }\n }\n\n //\n // Private function to subscribe and unsubscribe from topics.\n //\n this._handleSubscriptions = function(thingName, topicSpecs, devFunction, callback) {\n var topics = [];\n\n //\n // Build an array of topic names.\n //\n for (var i = 0, topicsLen = topicSpecs.length; i < topicsLen; i++) {\n for (var j = 0, opsLen = topicSpecs[i].operations.length; j < opsLen; j++) {\n for (var k = 0, statLen = topicSpecs[i].statii.length; k < statLen; k++) {\n topics.push(buildThingShadowTopic(thingName,\n topicSpecs[i].operations[j],\n topicSpecs[i].statii[k]));\n }\n }\n }\n\n if (thingShadows[thingName].debug === true) {\n console.log(devFunction + ' on ' + topics);\n }\n //\n // Subscribe/unsubscribe from the topics and perform callback when complete.\n //\n var args = [];\n args.push(topics);\n if (devFunction === 'subscribe') {\n // QoS only applicable for subscribe\n args.push({\n qos: thingShadows[thingName].qos\n });\n // add our callback to check the SUBACK response for granted subscriptions\n args.push(function(err, granted) {\n if (!isUndefined(callback)) {\n if (err) {\n callback(err);\n return;\n }\n //\n // Check to see if we got all topic subscriptions granted.\n //\n var failedTopics = [];\n for (var k = 0, grantedLen = granted.length; k < grantedLen; k++) {\n //\n // 128 is 0x80 - Failure from the MQTT lib.\n //\n if (granted[k].qos === 128) {\n failedTopics.push(granted[k]);\n }\n }\n\n if (failedTopics.length > 0) {\n callback('Not all subscriptions were granted', failedTopics);\n return;\n }\n\n // all subscriptions were granted\n callback();\n }\n });\n } else {\n if (!isUndefined(callback)) {\n args.push(callback);\n }\n }\n\n device[devFunction].apply(device, args);\n };\n\n //\n // Private function to handle messages and dispatch them accordingly.\n //\n this._handleMessages = function(thingName, operation, operationStatus, payload) {\n var stateObject = {};\n try {\n stateObject = JSON.parse(payload.toString());\n } catch (err) {\n if (deviceOptions.debug === true) {\n console.error('failed parsing JSON \\'' + payload.toString() + '\\', ' + err);\n }\n return;\n }\n var clientToken = stateObject.clientToken;\n var version = stateObject.version;\n //\n // Remove the properties 'clientToken' and 'version' from the stateObject;\n // these properties are internal to this class.\n //\n delete stateObject.clientToken;\n //Expose shadow version from raw object\n //delete stateObject.version;\n //\n // Update the thing version on every accepted or delta message which \n // contains it.\n //\n if ((!isUndefined(version)) && (operationStatus !== 'rejected')) {\n //\n // The thing shadow version is incremented by AWS IoT and should always\n // increase. Do not update our local version if the received version is\n // less than our version. \n //\n if ((isUndefined(thingShadows[thingName].version)) ||\n (version >= thingShadows[thingName].version)) {\n thingShadows[thingName].version = version;\n } else {\n //\n // We've received a message from AWS IoT with a version number lower than\n // we would expect. There are two things that can cause this:\n //\n // 1) The shadow has been deleted (version # reverts to 1 in this case.)\n // 2) The message has arrived out-of-order.\n //\n // For case 1) we can look at the operation to determine that this\n // is the case and notify the client if appropriate. For case 2, \n // we will not process it unless the client has specifically expressed\n // an interested in these messages by setting 'discardStale' to false.\n //\n if (operation !== 'delete' && thingShadows[thingName].discardStale === true) {\n if (deviceOptions.debug === true) {\n console.warn('out-of-date version \\'' + version + '\\' on \\'' +\n thingName + '\\' (local version \\'' +\n thingShadows[thingName].version + '\\')');\n }\n return;\n }\n }\n }\n //\n // If this is a 'delta' message, emit an event for it and return.\n //\n if (operationStatus === 'delta') {\n this.emit('delta', thingName, stateObject);\n return;\n }\n //\n // only accepted/rejected messages past this point\n // ===============================================\n // If this is an unkown clientToken (e.g., it doesn't have a corresponding\n // client token property, the shadow has been modified by another client.\n // If it's an update/accepted or delete/accepted, update the shadow and\n // notify the client.\n //\n if (isUndefined(thingShadows[thingName].clientToken) ||\n thingShadows[thingName].clientToken !== clientToken) {\n if ((operationStatus === 'accepted') && (operation !== 'get')) {\n //\n // This is a foreign update or delete accepted, update our\n // shadow with the latest state and send a notification.\n //\n this.emit('foreignStateChange', thingName, operation, stateObject);\n }\n return;\n }\n //\n // A response has been received, so cancel any outstanding timeout on this\n // thingName/clientToken, delete the timeout handle, and unsubscribe from\n // all sub-topics.\n //\n clearTimeout(\n thingShadows[thingName].timeout);\n\n delete thingShadows[thingName].timeout;\n //\n // Delete the operation's client token.\n //\n delete thingShadows[thingName].clientToken;\n //\n // Mark this operation as complete.\n //\n thingShadows[thingName].pending = false;\n\n //\n // Unsubscribe from the 'accepted' and 'rejected' sub-topics unless we are\n // persistently subscribed to this thing shadow.\n //\n if (thingShadows[thingName].persistentSubscribe === false) {\n this._handleSubscriptions(thingName, [{\n operations: [operation],\n statii: ['accepted', 'rejected']\n }], 'unsubscribe');\n }\n\n //\n // Emit an event detailing the operation status; the clientToken is included\n // as an argument so that the application can correlate status events to\n // the operations they are associated with.\n //\n this.emit('status', thingName, operationStatus, clientToken, stateObject);\n };\n\n device.on('connect', function() {\n that.emit('connect');\n });\n device.on('close', function() {\n that.emit('close');\n });\n device.on('reconnect', function() {\n that.emit('reconnect');\n });\n device.on('offline', function() {\n that.emit('offline');\n });\n device.on('error', function(error) {\n that.emit('error', error);\n });\n device.on('packetsend', function(packet) {\n that.emit('packetsend', packet);\n });\n device.on('packetreceive', function(packet) {\n that.emit('packetreceive', packet);\n });\n device.on('message', function(topic, payload) {\n\n if (connected === true) {\n //\n // Parse the topic to determine what to do with it.\n //\n var topicTokens = topic.split('/');\n //\n // First, do a rough check to see if we should continue or not.\n //\n if (isThingShadowTopic(topicTokens, 'subscribe')) {\n //\n // This looks like a valid Thing topic, so see if the Thing is in the\n // registered Thing table.\n //\n if (thingShadows.hasOwnProperty(topicTokens[2])) {\n //\n // This is a registered Thing, so perform message handling on it.\n //\n that._handleMessages(topicTokens[2], // thingName\n topicTokens[4], // operation\n topicTokens[5], // status\n payload);\n }\n //\n // Any messages received for unregistered Things fall here and are ignored.\n //\n } else {\n //\n // This isn't a Thing topic, so pass it along to the instance if they have\n // indicated they want to handle it.\n //\n that.emit('message', topic, payload);\n }\n }\n });\n\n this._thingOperation = function(thingName, operation, stateObject) {\n var rc = null;\n\n if (thingShadows.hasOwnProperty(thingName)) {\n //\n // Don't allow a new operation if an existing one is still in process.\n //\n if (thingShadows[thingName].pending === false) {\n //\n // Starting a new operation\n //\n thingShadows[thingName].pending = true;\n //\n // If not provided, construct a clientToken from the clientId and a rolling \n // operation count. The clientToken is transmitted in any published stateObject \n // and is returned to the caller for each operation. Applications can use\n // clientToken values to correlate received responses or timeouts with\n // the original operations.\n //\n var clientToken;\n\n if (isUndefined(stateObject.clientToken)) {\n //\n // AWS IoT restricts client tokens to 64 bytes, so use only the last 48\n // characters of the client ID when constructing a client token.\n //\n var clientIdLength = deviceOptions.clientId.length;\n\n if (clientIdLength > 48) {\n clientToken = deviceOptions.clientId.substr(clientIdLength - 48) + '-' + operationCount++;\n } else {\n clientToken = deviceOptions.clientId + '-' + operationCount++;\n }\n } else {\n clientToken = stateObject.clientToken;\n }\n //\n // Remember the client token for this operation; it will be\n // deleted when the operation completes or times out.\n //\n thingShadows[thingName].clientToken = clientToken;\n\n var publishTopic = buildThingShadowTopic(thingName,\n operation);\n //\n // Subscribe to the 'accepted' and 'rejected' sub-topics for this get\n // operation and set a timeout beyond which they will be unsubscribed if \n // no messages have been received for either of them.\n //\n thingShadows[thingName].timeout = setTimeout(\n function(thingName, clientToken) {\n //\n // Timed-out. Unsubscribe from the 'accepted' and 'rejected' sub-topics unless\n // we are persistently subscribing to this thing shadow.\n //\n if (thingShadows[thingName].persistentSubscribe === false) {\n that._handleSubscriptions(thingName, [{\n operations: [operation],\n statii: ['accepted', 'rejected']\n }], 'unsubscribe');\n }\n //\n // Mark this operation as complete.\n //\n thingShadows[thingName].pending = false;\n\n //\n // Delete the timeout handle and client token for this thingName.\n //\n delete thingShadows[thingName].timeout;\n delete thingShadows[thingName].clientToken;\n\n //\n // Emit an event for the timeout; the clientToken is included as an argument\n // so that the application can correlate timeout events to the operations\n // they are associated with.\n //\n that.emit('timeout', thingName, clientToken);\n }, operationTimeout,\n thingName, clientToken);\n //\n // Subscribe to the 'accepted' and 'rejected' sub-topics unless we are\n // persistently subscribing, in which case we can publish to the topic immediately\n // since we are already subscribed to all applicable sub-topics.\n //\n if (thingShadows[thingName].persistentSubscribe === false) {\n this._handleSubscriptions(thingName, [{\n operations: [operation],\n statii: ['accepted', 'rejected'],\n }], 'subscribe',\n function(err, failedTopics) {\n if (!isUndefined(err) || !isUndefined(failedTopics)) {\n console.warn('failed subscription to accepted/rejected topics');\n return;\n }\n\n //\n // If 'stateObject' is defined, publish it to the publish topic for this\n // thingName+operation.\n //\n if (!isUndefined(stateObject)) {\n //\n // Add the version # (if known and versioning is enabled) and \n // 'clientToken' properties to the stateObject.\n //\n if (!isUndefined(thingShadows[thingName].version) &&\n thingShadows[thingName].enableVersioning) {\n stateObject.version = thingShadows[thingName].version;\n }\n stateObject.clientToken = clientToken;\n\n device.publish(publishTopic,\n JSON.stringify(stateObject), {\n qos: thingShadows[thingName].qos\n });\n if (!(isUndefined(thingShadows[thingName])) &&\n thingShadows[thingName].debug === true) {\n console.log('publishing \\'' + JSON.stringify(stateObject) +\n ' on \\'' + publishTopic + '\\'');\n }\n }\n });\n } else {\n //\n // Add the version # (if known and versioning is enabled) and \n // 'clientToken' properties to the stateObject.\n //\n if (!isUndefined(thingShadows[thingName].version) &&\n thingShadows[thingName].enableVersioning) {\n stateObject.version = thingShadows[thingName].version;\n }\n stateObject.clientToken = clientToken;\n\n device.publish(publishTopic,\n JSON.stringify(stateObject), {\n qos: thingShadows[thingName].qos\n });\n if (thingShadows[thingName].debug === true) {\n console.log('publishing \\'' + JSON.stringify(stateObject) +\n ' on \\'' + publishTopic + '\\'');\n }\n }\n rc = clientToken; // return the clientToken to the caller\n } else {\n if (deviceOptions.debug === true) {\n console.error(operation + ' still in progress on thing: ', thingName);\n }\n }\n } else {\n if (deviceOptions.debug === true) {\n console.error('attempting to ' + operation + ' unknown thing: ', thingName);\n }\n }\n return rc;\n };\n\n this.register = function(thingName, options, callback) {\n\n if (!thingShadows.hasOwnProperty(thingName)) {\n //\n // Initialize the registration entry for this thing; because the version # is \n // not yet known, do not add the property for it yet. The version number \n // property will be added after the first accepted update from AWS IoT.\n //\n var ignoreDeltas = false;\n var topicSpecs = [];\n thingShadows[thingName] = {\n persistentSubscribe: true,\n debug: false,\n discardStale: true,\n enableVersioning: true,\n qos: 0,\n pending: true\n };\n if (typeof options === 'function') {\n callback = options;\n options = null;\n }\n if (!isUndefined(options)) {\n if (!isUndefined(options.ignoreDeltas)) {\n ignoreDeltas = options.ignoreDeltas;\n }\n if (!isUndefined(options.persistentSubscribe)) {\n thingShadows[thingName].persistentSubscribe = options.persistentSubscribe;\n }\n if (!isUndefined(options.debug)) {\n thingShadows[thingName].debug = options.debug;\n }\n if (!isUndefined(options.discardStale)) {\n thingShadows[thingName].discardStale = options.discardStale;\n }\n if (!isUndefined(options.enableVersioning)) {\n thingShadows[thingName].enableVersioning = options.enableVersioning;\n }\n if (!isUndefined(options.qos)) {\n thingShadows[thingName].qos = options.qos;\n }\n }\n //\n // Always listen for deltas unless requested otherwise.\n //\n if (ignoreDeltas === false) {\n topicSpecs.push({\n operations: ['update'],\n statii: ['delta']\n });\n }\n //\n // If we are persistently subscribing, we subscribe to everything we could ever\n // possibly be interested in. This will provide us the ability to publish\n // without waiting at the cost of potentially increased irrelevant traffic\n // which the application will need to filter out.\n //\n if (thingShadows[thingName].persistentSubscribe === true) {\n topicSpecs.push({\n operations: ['update', 'get', 'delete'],\n statii: ['accepted', 'rejected']\n });\n }\n\n if (topicSpecs.length > 0) {\n this._handleSubscriptions(thingName, topicSpecs, 'subscribe', function(err, failedTopics) {\n if (isUndefined(err) && isUndefined(failedTopics)) {\n thingShadows[thingName].pending = false;\n }\n if (!isUndefined(callback)) {\n callback(err, failedTopics);\n }\n });\n } else {\n thingShadows[thingName].pending = false;\n if (!isUndefined(callback)) {\n callback();\n }\n }\n\n } else {\n if (deviceOptions.debug === true) {\n console.error('thing already registered: ', thingName);\n }\n }\n };\n\n this.unregister = function(thingName) {\n if (thingShadows.hasOwnProperty(thingName)) {\n var topicSpecs = [];\n\n //\n // If an operation is outstanding, it will have a timeout set; when it\n // expires any accept/reject sub-topic subscriptions for the thing will be \n // deleted. If any messages arrive after the thing has been deleted, they\n // will simply be ignored as it no longer exists in the thing registrations.\n // The only sub-topic we need to unsubscribe from is the delta sub-topic,\n // which is always active.\n //\n topicSpecs.push({\n operations: ['update'],\n statii: ['delta']\n });\n //\n // If we are persistently subscribing, we subscribe to everything we could ever\n // possibly be interested in; this means that when it's time to unregister\n // interest in a thing, we need to unsubscribe from all of these topics.\n //\n if (thingShadows[thingName].persistentSubscribe === true) {\n topicSpecs.push({\n operations: ['update', 'get', 'delete'],\n statii: ['accepted', 'rejected']\n });\n }\n\n this._handleSubscriptions(thingName, topicSpecs, 'unsubscribe');\n\n //\n // Delete any pending timeout\n //\n if (!isUndefined(thingShadows[thingName].timeout)) {\n clearTimeout(thingShadows[thingName].timeout);\n }\n //\n // Delete the thing from the Thing registrations.\n //\n delete thingShadows[thingName];\n } else {\n if (deviceOptions.debug === true) {\n console.error('attempting to unregister unknown thing: ', thingName);\n }\n }\n };\n\n //\n // Perform an update operation on the given thing shadow.\n //\n this.update = function(thingName, stateObject) {\n var rc = null;\n //\n // Verify that the message does not contain a property named 'version',\n // as these property is reserved for use within this class.\n //\n if (isUndefined(stateObject.version)) {\n rc = that._thingOperation(thingName, 'update', stateObject);\n } else {\n console.error('message can\\'t contain \\'version\\' property');\n }\n return rc;\n };\n\n //\n // Perform a get operation on the given thing shadow; allow the user\n // to specify their own client token if they don't want to use the\n // default.\n //\n this.get = function(thingName, clientToken) {\n var stateObject = {};\n if (!isUndefined(clientToken)) {\n stateObject.clientToken = clientToken;\n }\n return that._thingOperation(thingName, 'get', stateObject);\n };\n\n //\n // Perform a delete operation on the given thing shadow.\n //\n this.delete = function(thingName, clientToken) {\n var stateObject = {};\n if (!isUndefined(clientToken)) {\n stateObject.clientToken = clientToken;\n }\n return that._thingOperation(thingName, 'delete', stateObject);\n };\n //\n // Publish on non-thing topics.\n //\n this.publish = function(topic, message, options, callback) {\n if (!isReservedTopic(topic)) {\n device.publish(topic, message, options, callback);\n } else {\n throw ('cannot publish to reserved topic \\'' + topic + '\\'');\n }\n };\n\n //\n // Subscribe to non-thing topics.\n //\n this.subscribe = function(topics, options, callback) {\n var topicsArray = [];\n if (typeof topics === 'string') {\n topicsArray.push(topics);\n } else if (typeof topics === 'object' && topics.length) {\n topicsArray = topics;\n }\n for (var i = 0; i < topicsArray.length; i++) {\n if (isReservedTopic(topicsArray[i])) {\n throw ('cannot subscribe to topic array since one of them is a reserved topic \\'' + topicsArray[i] + '\\'');\n }\n }\n device.subscribe(topicsArray, options, callback);\n };\n //\n // Unsubscribe from non-thing topics.\n //\n this.unsubscribe = function(topics, callback) {\n var topicsArray = [];\n if (typeof topics === 'string') {\n topicsArray.push(topics);\n } else if (typeof topics === 'object' && topics.length) {\n topicsArray = topics;\n }\n for (var i = 0; i < topicsArray.length; i++) {\n if (isReservedTopic(topicsArray[i])) {\n throw ('cannot unsubscribe from topic array since one of them is a reserved topic \\'' + topicsArray[i] + '\\'');\n }\n }\n device.unsubscribe(topicsArray, callback);\n };\n //\n // Close the device connection; this will be passed through to\n // the device class.\n //\n this.end = function(force, callback) {\n device.end(force, callback);\n };\n //\n // Call this function to update the credentials used when\n // connecting via WebSocket/SigV4; this will be passed through\n // to the device class.\n //\n this.updateWebSocketCredentials = function(accessKeyId, secretKey, sessionToken, expiration) {\n device.updateWebSocketCredentials(accessKeyId, secretKey, sessionToken, expiration);\n };\n //\n // Call this function to update the custom auth headers\n // This will be passed through to the device class\n //\n this.updateCustomAuthHeaders = function(newHeaders) {\n device.updateCustomAuthHeaders(newHeaders);\n };\n\n //\n // This is an unpublished API used for testing.\n //\n this.setConnectionStatus = function(connectionStatus) {\n connected = connectionStatus;\n };\n events.EventEmitter.call(this);\n}\n\n//\n// Allow instances to listen in on events that we produce for them\n//\ninherits(ThingShadowsClient, events.EventEmitter);\n\nmodule.exports = ThingShadowsClient;\n\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/thing/index.js?"); + +/***/ }), + +/***/ "./node_modules/axios/index.js": +/*!*************************************!*\ + !*** ./node_modules/axios/index.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("module.exports = __webpack_require__(/*! ./lib/axios */ \"./node_modules/axios/lib/axios.js\");\n\n//# sourceURL=webpack:///./node_modules/axios/index.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/adapters/xhr.js": +/*!************************************************!*\ + !*** ./node_modules/axios/lib/adapters/xhr.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar settle = __webpack_require__(/*! ./../core/settle */ \"./node_modules/axios/lib/core/settle.js\");\nvar buildURL = __webpack_require__(/*! ./../helpers/buildURL */ \"./node_modules/axios/lib/helpers/buildURL.js\");\nvar parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ \"./node_modules/axios/lib/helpers/parseHeaders.js\");\nvar isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ \"./node_modules/axios/lib/helpers/isURLSameOrigin.js\");\nvar createError = __webpack_require__(/*! ../core/createError */ \"./node_modules/axios/lib/core/createError.js\");\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = __webpack_require__(/*! ./../helpers/cookies */ \"./node_modules/axios/lib/helpers/cookies.js\");\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/adapters/xhr.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/axios.js": +/*!*****************************************!*\ + !*** ./node_modules/axios/lib/axios.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/axios/lib/utils.js\");\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/axios/lib/helpers/bind.js\");\nvar Axios = __webpack_require__(/*! ./core/Axios */ \"./node_modules/axios/lib/core/Axios.js\");\nvar defaults = __webpack_require__(/*! ./defaults */ \"./node_modules/axios/lib/defaults.js\");\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ \"./node_modules/axios/lib/cancel/Cancel.js\");\naxios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ \"./node_modules/axios/lib/cancel/CancelToken.js\");\naxios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ \"./node_modules/axios/lib/cancel/isCancel.js\");\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = __webpack_require__(/*! ./helpers/spread */ \"./node_modules/axios/lib/helpers/spread.js\");\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/axios.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/cancel/Cancel.js": +/*!*************************************************!*\ + !*** ./node_modules/axios/lib/cancel/Cancel.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/cancel/Cancel.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/cancel/CancelToken.js": +/*!******************************************************!*\ + !*** ./node_modules/axios/lib/cancel/CancelToken.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar Cancel = __webpack_require__(/*! ./Cancel */ \"./node_modules/axios/lib/cancel/Cancel.js\");\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/cancel/CancelToken.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/cancel/isCancel.js": +/*!***************************************************!*\ + !*** ./node_modules/axios/lib/cancel/isCancel.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/cancel/isCancel.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/core/Axios.js": +/*!**********************************************!*\ + !*** ./node_modules/axios/lib/core/Axios.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar defaults = __webpack_require__(/*! ./../defaults */ \"./node_modules/axios/lib/defaults.js\");\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ \"./node_modules/axios/lib/core/InterceptorManager.js\");\nvar dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ \"./node_modules/axios/lib/core/dispatchRequest.js\");\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, {method: 'get'}, this.defaults, config);\n config.method = config.method.toLowerCase();\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/Axios.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/core/InterceptorManager.js": +/*!***********************************************************!*\ + !*** ./node_modules/axios/lib/core/InterceptorManager.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/InterceptorManager.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/core/createError.js": +/*!****************************************************!*\ + !*** ./node_modules/axios/lib/core/createError.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar enhanceError = __webpack_require__(/*! ./enhanceError */ \"./node_modules/axios/lib/core/enhanceError.js\");\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/createError.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/core/dispatchRequest.js": +/*!********************************************************!*\ + !*** ./node_modules/axios/lib/core/dispatchRequest.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar transformData = __webpack_require__(/*! ./transformData */ \"./node_modules/axios/lib/core/transformData.js\");\nvar isCancel = __webpack_require__(/*! ../cancel/isCancel */ \"./node_modules/axios/lib/cancel/isCancel.js\");\nvar defaults = __webpack_require__(/*! ../defaults */ \"./node_modules/axios/lib/defaults.js\");\nvar isAbsoluteURL = __webpack_require__(/*! ./../helpers/isAbsoluteURL */ \"./node_modules/axios/lib/helpers/isAbsoluteURL.js\");\nvar combineURLs = __webpack_require__(/*! ./../helpers/combineURLs */ \"./node_modules/axios/lib/helpers/combineURLs.js\");\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/dispatchRequest.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/core/enhanceError.js": +/*!*****************************************************!*\ + !*** ./node_modules/axios/lib/core/enhanceError.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/enhanceError.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/core/settle.js": +/*!***********************************************!*\ + !*** ./node_modules/axios/lib/core/settle.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar createError = __webpack_require__(/*! ./createError */ \"./node_modules/axios/lib/core/createError.js\");\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/settle.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/core/transformData.js": +/*!******************************************************!*\ + !*** ./node_modules/axios/lib/core/transformData.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/transformData.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/defaults.js": +/*!********************************************!*\ + !*** ./node_modules/axios/lib/defaults.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/axios/lib/utils.js\");\nvar normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ \"./node_modules/axios/lib/helpers/normalizeHeaderName.js\");\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = __webpack_require__(/*! ./adapters/xhr */ \"./node_modules/axios/lib/adapters/xhr.js\");\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = __webpack_require__(/*! ./adapters/http */ \"./node_modules/axios/lib/adapters/xhr.js\");\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/axios/lib/defaults.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/bind.js": +/*!************************************************!*\ + !*** ./node_modules/axios/lib/helpers/bind.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/bind.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/buildURL.js": +/*!****************************************************!*\ + !*** ./node_modules/axios/lib/helpers/buildURL.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/buildURL.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/combineURLs.js": +/*!*******************************************************!*\ + !*** ./node_modules/axios/lib/helpers/combineURLs.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/combineURLs.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/cookies.js": +/*!***************************************************!*\ + !*** ./node_modules/axios/lib/helpers/cookies.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/cookies.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js": +/*!*********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/isAbsoluteURL.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js": +/*!***********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/isURLSameOrigin.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/normalizeHeaderName.js": +/*!***************************************************************!*\ + !*** ./node_modules/axios/lib/helpers/normalizeHeaderName.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ../utils */ \"./node_modules/axios/lib/utils.js\");\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/normalizeHeaderName.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/parseHeaders.js": +/*!********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/parseHeaders.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/spread.js": +/*!**************************************************!*\ + !*** ./node_modules/axios/lib/helpers/spread.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/spread.js?"); + +/***/ }), + +/***/ "./node_modules/axios/lib/utils.js": +/*!*****************************************!*\ + !*** ./node_modules/axios/lib/utils.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/axios/lib/helpers/bind.js\");\nvar isBuffer = __webpack_require__(/*! is-buffer */ \"./node_modules/is-buffer/index.js\");\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/utils.js?"); + +/***/ }), + +/***/ "./node_modules/base64-js/index.js": +/*!*****************************************!*\ + !*** ./node_modules/base64-js/index.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n//# sourceURL=webpack:///./node_modules/base64-js/index.js?"); + +/***/ }), + +/***/ "./node_modules/bl/bl.js": +/*!*******************************!*\ + !*** ./node_modules/bl/bl.js ***! + \*******************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var DuplexStream = __webpack_require__(/*! readable-stream/duplex */ \"./node_modules/readable-stream/duplex-browser.js\")\n , util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\")\n , Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer\n\n\nfunction BufferList (callback) {\n if (!(this instanceof BufferList))\n return new BufferList(callback)\n\n this._bufs = []\n this.length = 0\n\n if (typeof callback == 'function') {\n this._callback = callback\n\n var piper = function piper (err) {\n if (this._callback) {\n this._callback(err)\n this._callback = null\n }\n }.bind(this)\n\n this.on('pipe', function onPipe (src) {\n src.on('error', piper)\n })\n this.on('unpipe', function onUnpipe (src) {\n src.removeListener('error', piper)\n })\n } else {\n this.append(callback)\n }\n\n DuplexStream.call(this)\n}\n\n\nutil.inherits(BufferList, DuplexStream)\n\n\nBufferList.prototype._offset = function _offset (offset) {\n var tot = 0, i = 0, _t\n if (offset === 0) return [ 0, 0 ]\n for (; i < this._bufs.length; i++) {\n _t = tot + this._bufs[i].length\n if (offset < _t || i == this._bufs.length - 1)\n return [ i, offset - tot ]\n tot = _t\n }\n}\n\n\nBufferList.prototype.append = function append (buf) {\n var i = 0\n\n if (Buffer.isBuffer(buf)) {\n this._appendBuffer(buf);\n } else if (Array.isArray(buf)) {\n for (; i < buf.length; i++)\n this.append(buf[i])\n } else if (buf instanceof BufferList) {\n // unwrap argument into individual BufferLists\n for (; i < buf._bufs.length; i++)\n this.append(buf._bufs[i])\n } else if (buf != null) {\n // coerce number arguments to strings, since Buffer(number) does\n // uninitialized memory allocation\n if (typeof buf == 'number')\n buf = buf.toString()\n\n this._appendBuffer(Buffer.from(buf));\n }\n\n return this\n}\n\n\nBufferList.prototype._appendBuffer = function appendBuffer (buf) {\n this._bufs.push(buf)\n this.length += buf.length\n}\n\n\nBufferList.prototype._write = function _write (buf, encoding, callback) {\n this._appendBuffer(buf)\n\n if (typeof callback == 'function')\n callback()\n}\n\n\nBufferList.prototype._read = function _read (size) {\n if (!this.length)\n return this.push(null)\n\n size = Math.min(size, this.length)\n this.push(this.slice(0, size))\n this.consume(size)\n}\n\n\nBufferList.prototype.end = function end (chunk) {\n DuplexStream.prototype.end.call(this, chunk)\n\n if (this._callback) {\n this._callback(null, this.slice())\n this._callback = null\n }\n}\n\n\nBufferList.prototype.get = function get (index) {\n return this.slice(index, index + 1)[0]\n}\n\n\nBufferList.prototype.slice = function slice (start, end) {\n if (typeof start == 'number' && start < 0)\n start += this.length\n if (typeof end == 'number' && end < 0)\n end += this.length\n return this.copy(null, 0, start, end)\n}\n\n\nBufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) {\n if (typeof srcStart != 'number' || srcStart < 0)\n srcStart = 0\n if (typeof srcEnd != 'number' || srcEnd > this.length)\n srcEnd = this.length\n if (srcStart >= this.length)\n return dst || Buffer.alloc(0)\n if (srcEnd <= 0)\n return dst || Buffer.alloc(0)\n\n var copy = !!dst\n , off = this._offset(srcStart)\n , len = srcEnd - srcStart\n , bytes = len\n , bufoff = (copy && dstStart) || 0\n , start = off[1]\n , l\n , i\n\n // copy/slice everything\n if (srcStart === 0 && srcEnd == this.length) {\n if (!copy) { // slice, but full concat if multiple buffers\n return this._bufs.length === 1\n ? this._bufs[0]\n : Buffer.concat(this._bufs, this.length)\n }\n\n // copy, need to copy individual buffers\n for (i = 0; i < this._bufs.length; i++) {\n this._bufs[i].copy(dst, bufoff)\n bufoff += this._bufs[i].length\n }\n\n return dst\n }\n\n // easy, cheap case where it's a subset of one of the buffers\n if (bytes <= this._bufs[off[0]].length - start) {\n return copy\n ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes)\n : this._bufs[off[0]].slice(start, start + bytes)\n }\n\n if (!copy) // a slice, we need something to copy in to\n dst = Buffer.allocUnsafe(len)\n\n for (i = off[0]; i < this._bufs.length; i++) {\n l = this._bufs[i].length - start\n\n if (bytes > l) {\n this._bufs[i].copy(dst, bufoff, start)\n } else {\n this._bufs[i].copy(dst, bufoff, start, start + bytes)\n break\n }\n\n bufoff += l\n bytes -= l\n\n if (start)\n start = 0\n }\n\n return dst\n}\n\nBufferList.prototype.shallowSlice = function shallowSlice (start, end) {\n start = start || 0\n end = end || this.length\n\n if (start < 0)\n start += this.length\n if (end < 0)\n end += this.length\n\n var startOffset = this._offset(start)\n , endOffset = this._offset(end)\n , buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1)\n\n if (endOffset[1] == 0)\n buffers.pop()\n else\n buffers[buffers.length-1] = buffers[buffers.length-1].slice(0, endOffset[1])\n\n if (startOffset[1] != 0)\n buffers[0] = buffers[0].slice(startOffset[1])\n\n return new BufferList(buffers)\n}\n\nBufferList.prototype.toString = function toString (encoding, start, end) {\n return this.slice(start, end).toString(encoding)\n}\n\nBufferList.prototype.consume = function consume (bytes) {\n while (this._bufs.length) {\n if (bytes >= this._bufs[0].length) {\n bytes -= this._bufs[0].length\n this.length -= this._bufs[0].length\n this._bufs.shift()\n } else {\n this._bufs[0] = this._bufs[0].slice(bytes)\n this.length -= bytes\n break\n }\n }\n return this\n}\n\n\nBufferList.prototype.duplicate = function duplicate () {\n var i = 0\n , copy = new BufferList()\n\n for (; i < this._bufs.length; i++)\n copy.append(this._bufs[i])\n\n return copy\n}\n\n\nBufferList.prototype.destroy = function destroy () {\n this._bufs.length = 0\n this.length = 0\n this.push(null)\n}\n\n\n;(function () {\n var methods = {\n 'readDoubleBE' : 8\n , 'readDoubleLE' : 8\n , 'readFloatBE' : 4\n , 'readFloatLE' : 4\n , 'readInt32BE' : 4\n , 'readInt32LE' : 4\n , 'readUInt32BE' : 4\n , 'readUInt32LE' : 4\n , 'readInt16BE' : 2\n , 'readInt16LE' : 2\n , 'readUInt16BE' : 2\n , 'readUInt16LE' : 2\n , 'readInt8' : 1\n , 'readUInt8' : 1\n }\n\n for (var m in methods) {\n (function (m) {\n BufferList.prototype[m] = function (offset) {\n return this.slice(offset, offset + methods[m])[m](0)\n }\n }(m))\n }\n}())\n\n\nmodule.exports = BufferList\n\n\n//# sourceURL=webpack:///./node_modules/bl/bl.js?"); + +/***/ }), + +/***/ "./node_modules/buffer/index.js": +/*!**************************************!*\ + !*** ./node_modules/buffer/index.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* WEBPACK VAR INJECTION */(function(global) {/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\n\nvar base64 = __webpack_require__(/*! base64-js */ \"./node_modules/base64-js/index.js\")\nvar ieee754 = __webpack_require__(/*! ieee754 */ \"./node_modules/ieee754/index.js\")\nvar isArray = __webpack_require__(/*! isarray */ \"./node_modules/isarray/index.js\")\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/buffer/index.js?"); + +/***/ }), + +/***/ "./node_modules/core-util-is/lib/util.js": +/*!***********************************************!*\ + !*** ./node_modules/core-util-is/lib/util.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n if (Array.isArray) {\n return Array.isArray(arg);\n }\n return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack:///./node_modules/core-util-is/lib/util.js?"); + +/***/ }), + +/***/ "./node_modules/d/auto-bind.js": +/*!*************************************!*\ + !*** ./node_modules/d/auto-bind.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar isValue = __webpack_require__(/*! type/value/is */ \"./node_modules/type/value/is.js\")\n , ensureValue = __webpack_require__(/*! type/value/ensure */ \"./node_modules/type/value/ensure.js\")\n , ensurePlainFunction = __webpack_require__(/*! type/plain-function/ensure */ \"./node_modules/type/plain-function/ensure.js\")\n , copy = __webpack_require__(/*! es5-ext/object/copy */ \"./node_modules/es5-ext/object/copy.js\")\n , normalizeOptions = __webpack_require__(/*! es5-ext/object/normalize-options */ \"./node_modules/es5-ext/object/normalize-options.js\")\n , map = __webpack_require__(/*! es5-ext/object/map */ \"./node_modules/es5-ext/object/map.js\");\n\nvar bind = Function.prototype.bind\n , defineProperty = Object.defineProperty\n , hasOwnProperty = Object.prototype.hasOwnProperty\n , define;\n\ndefine = function (name, desc, options) {\n\tvar value = ensureValue(desc) && ensurePlainFunction(desc.value), dgs;\n\tdgs = copy(desc);\n\tdelete dgs.writable;\n\tdelete dgs.value;\n\tdgs.get = function () {\n\t\tif (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value;\n\t\tdesc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this);\n\t\tdefineProperty(this, name, desc);\n\t\treturn this[name];\n\t};\n\treturn dgs;\n};\n\nmodule.exports = function (props/*, options*/) {\n\tvar options = normalizeOptions(arguments[1]);\n\tif (isValue(options.resolveContext)) ensurePlainFunction(options.resolveContext);\n\treturn map(props, function (desc, name) { return define(name, desc, options); });\n};\n\n\n//# sourceURL=webpack:///./node_modules/d/auto-bind.js?"); + +/***/ }), + +/***/ "./node_modules/d/index.js": +/*!*********************************!*\ + !*** ./node_modules/d/index.js ***! + \*********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar isValue = __webpack_require__(/*! type/value/is */ \"./node_modules/type/value/is.js\")\n , isPlainFunction = __webpack_require__(/*! type/plain-function/is */ \"./node_modules/type/plain-function/is.js\")\n , assign = __webpack_require__(/*! es5-ext/object/assign */ \"./node_modules/es5-ext/object/assign/index.js\")\n , normalizeOpts = __webpack_require__(/*! es5-ext/object/normalize-options */ \"./node_modules/es5-ext/object/normalize-options.js\")\n , contains = __webpack_require__(/*! es5-ext/string/#/contains */ \"./node_modules/es5-ext/string/#/contains/index.js\");\n\nvar d = (module.exports = function (dscr, value/*, options*/) {\n\tvar c, e, w, options, desc;\n\tif (arguments.length < 2 || typeof dscr !== \"string\") {\n\t\toptions = value;\n\t\tvalue = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[2];\n\t}\n\tif (isValue(dscr)) {\n\t\tc = contains.call(dscr, \"c\");\n\t\te = contains.call(dscr, \"e\");\n\t\tw = contains.call(dscr, \"w\");\n\t} else {\n\t\tc = w = true;\n\t\te = false;\n\t}\n\n\tdesc = { value: value, configurable: c, enumerable: e, writable: w };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n});\n\nd.gs = function (dscr, get, set/*, options*/) {\n\tvar c, e, options, desc;\n\tif (typeof dscr !== \"string\") {\n\t\toptions = set;\n\t\tset = get;\n\t\tget = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[3];\n\t}\n\tif (!isValue(get)) {\n\t\tget = undefined;\n\t} else if (!isPlainFunction(get)) {\n\t\toptions = get;\n\t\tget = set = undefined;\n\t} else if (!isValue(set)) {\n\t\tset = undefined;\n\t} else if (!isPlainFunction(set)) {\n\t\toptions = set;\n\t\tset = undefined;\n\t}\n\tif (isValue(dscr)) {\n\t\tc = contains.call(dscr, \"c\");\n\t\te = contains.call(dscr, \"e\");\n\t} else {\n\t\tc = true;\n\t\te = false;\n\t}\n\n\tdesc = { get: get, set: set, configurable: c, enumerable: e };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n};\n\n\n//# sourceURL=webpack:///./node_modules/d/index.js?"); + +/***/ }), + +/***/ "./node_modules/duplexify/index.js": +/*!*****************************************!*\ + !*** ./node_modules/duplexify/index.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(Buffer, process) {var stream = __webpack_require__(/*! readable-stream */ \"./node_modules/readable-stream/readable-browser.js\")\nvar eos = __webpack_require__(/*! end-of-stream */ \"./node_modules/end-of-stream/index.js\")\nvar inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\")\nvar shift = __webpack_require__(/*! stream-shift */ \"./node_modules/stream-shift/index.js\")\n\nvar SIGNAL_FLUSH = (Buffer.from && Buffer.from !== Uint8Array.from)\n ? Buffer.from([0])\n : new Buffer([0])\n\nvar onuncork = function(self, fn) {\n if (self._corked) self.once('uncork', fn)\n else fn()\n}\n\nvar autoDestroy = function (self, err) {\n if (self._autoDestroy) self.destroy(err)\n}\n\nvar destroyer = function(self, end) {\n return function(err) {\n if (err) autoDestroy(self, err.message === 'premature close' ? null : err)\n else if (end && !self._ended) self.end()\n }\n}\n\nvar end = function(ws, fn) {\n if (!ws) return fn()\n if (ws._writableState && ws._writableState.finished) return fn()\n if (ws._writableState) return ws.end(fn)\n ws.end()\n fn()\n}\n\nvar toStreams2 = function(rs) {\n return new (stream.Readable)({objectMode:true, highWaterMark:16}).wrap(rs)\n}\n\nvar Duplexify = function(writable, readable, opts) {\n if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts)\n stream.Duplex.call(this, opts)\n\n this._writable = null\n this._readable = null\n this._readable2 = null\n\n this._autoDestroy = !opts || opts.autoDestroy !== false\n this._forwardDestroy = !opts || opts.destroy !== false\n this._forwardEnd = !opts || opts.end !== false\n this._corked = 1 // start corked\n this._ondrain = null\n this._drained = false\n this._forwarding = false\n this._unwrite = null\n this._unread = null\n this._ended = false\n\n this.destroyed = false\n\n if (writable) this.setWritable(writable)\n if (readable) this.setReadable(readable)\n}\n\ninherits(Duplexify, stream.Duplex)\n\nDuplexify.obj = function(writable, readable, opts) {\n if (!opts) opts = {}\n opts.objectMode = true\n opts.highWaterMark = 16\n return new Duplexify(writable, readable, opts)\n}\n\nDuplexify.prototype.cork = function() {\n if (++this._corked === 1) this.emit('cork')\n}\n\nDuplexify.prototype.uncork = function() {\n if (this._corked && --this._corked === 0) this.emit('uncork')\n}\n\nDuplexify.prototype.setWritable = function(writable) {\n if (this._unwrite) this._unwrite()\n\n if (this.destroyed) {\n if (writable && writable.destroy) writable.destroy()\n return\n }\n\n if (writable === null || writable === false) {\n this.end()\n return\n }\n\n var self = this\n var unend = eos(writable, {writable:true, readable:false}, destroyer(this, this._forwardEnd))\n\n var ondrain = function() {\n var ondrain = self._ondrain\n self._ondrain = null\n if (ondrain) ondrain()\n }\n\n var clear = function() {\n self._writable.removeListener('drain', ondrain)\n unend()\n }\n\n if (this._unwrite) process.nextTick(ondrain) // force a drain on stream reset to avoid livelocks\n\n this._writable = writable\n this._writable.on('drain', ondrain)\n this._unwrite = clear\n\n this.uncork() // always uncork setWritable\n}\n\nDuplexify.prototype.setReadable = function(readable) {\n if (this._unread) this._unread()\n\n if (this.destroyed) {\n if (readable && readable.destroy) readable.destroy()\n return\n }\n\n if (readable === null || readable === false) {\n this.push(null)\n this.resume()\n return\n }\n\n var self = this\n var unend = eos(readable, {writable:false, readable:true}, destroyer(this))\n\n var onreadable = function() {\n self._forward()\n }\n\n var onend = function() {\n self.push(null)\n }\n\n var clear = function() {\n self._readable2.removeListener('readable', onreadable)\n self._readable2.removeListener('end', onend)\n unend()\n }\n\n this._drained = true\n this._readable = readable\n this._readable2 = readable._readableState ? readable : toStreams2(readable)\n this._readable2.on('readable', onreadable)\n this._readable2.on('end', onend)\n this._unread = clear\n\n this._forward()\n}\n\nDuplexify.prototype._read = function() {\n this._drained = true\n this._forward()\n}\n\nDuplexify.prototype._forward = function() {\n if (this._forwarding || !this._readable2 || !this._drained) return\n this._forwarding = true\n\n var data\n\n while (this._drained && (data = shift(this._readable2)) !== null) {\n if (this.destroyed) continue\n this._drained = this.push(data)\n }\n\n this._forwarding = false\n}\n\nDuplexify.prototype.destroy = function(err) {\n if (this.destroyed) return\n this.destroyed = true\n\n var self = this\n process.nextTick(function() {\n self._destroy(err)\n })\n}\n\nDuplexify.prototype._destroy = function(err) {\n if (err) {\n var ondrain = this._ondrain\n this._ondrain = null\n if (ondrain) ondrain(err)\n else this.emit('error', err)\n }\n\n if (this._forwardDestroy) {\n if (this._readable && this._readable.destroy) this._readable.destroy()\n if (this._writable && this._writable.destroy) this._writable.destroy()\n }\n\n this.emit('close')\n}\n\nDuplexify.prototype._write = function(data, enc, cb) {\n if (this.destroyed) return cb()\n if (this._corked) return onuncork(this, this._write.bind(this, data, enc, cb))\n if (data === SIGNAL_FLUSH) return this._finish(cb)\n if (!this._writable) return cb()\n\n if (this._writable.write(data) === false) this._ondrain = cb\n else cb()\n}\n\nDuplexify.prototype._finish = function(cb) {\n var self = this\n this.emit('preend')\n onuncork(this, function() {\n end(self._forwardEnd && self._writable, function() {\n // haxx to not emit prefinish twice\n if (self._writableState.prefinished === false) self._writableState.prefinished = true\n self.emit('prefinish')\n onuncork(self, cb)\n })\n })\n}\n\nDuplexify.prototype.end = function(data, enc, cb) {\n if (typeof data === 'function') return this.end(null, null, data)\n if (typeof enc === 'function') return this.end(data, null, enc)\n this._ended = true\n if (data) this.write(data)\n if (!this._writableState.ending) this.write(SIGNAL_FLUSH)\n return stream.Writable.prototype.end.call(this, cb)\n}\n\nmodule.exports = Duplexify\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer, __webpack_require__(/*! ./../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/duplexify/index.js?"); + +/***/ }), + +/***/ "./node_modules/end-of-stream/index.js": +/*!*********************************************!*\ + !*** ./node_modules/end-of-stream/index.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var once = __webpack_require__(/*! once */ \"./node_modules/once/once.js\");\n\nvar noop = function() {};\n\nvar isRequest = function(stream) {\n\treturn stream.setHeader && typeof stream.abort === 'function';\n};\n\nvar isChildProcess = function(stream) {\n\treturn stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3\n};\n\nvar eos = function(stream, opts, callback) {\n\tif (typeof opts === 'function') return eos(stream, null, opts);\n\tif (!opts) opts = {};\n\n\tcallback = once(callback || noop);\n\n\tvar ws = stream._writableState;\n\tvar rs = stream._readableState;\n\tvar readable = opts.readable || (opts.readable !== false && stream.readable);\n\tvar writable = opts.writable || (opts.writable !== false && stream.writable);\n\n\tvar onlegacyfinish = function() {\n\t\tif (!stream.writable) onfinish();\n\t};\n\n\tvar onfinish = function() {\n\t\twritable = false;\n\t\tif (!readable) callback.call(stream);\n\t};\n\n\tvar onend = function() {\n\t\treadable = false;\n\t\tif (!writable) callback.call(stream);\n\t};\n\n\tvar onexit = function(exitCode) {\n\t\tcallback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);\n\t};\n\n\tvar onerror = function(err) {\n\t\tcallback.call(stream, err);\n\t};\n\n\tvar onclose = function() {\n\t\tif (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close'));\n\t\tif (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close'));\n\t};\n\n\tvar onrequest = function() {\n\t\tstream.req.on('finish', onfinish);\n\t};\n\n\tif (isRequest(stream)) {\n\t\tstream.on('complete', onfinish);\n\t\tstream.on('abort', onclose);\n\t\tif (stream.req) onrequest();\n\t\telse stream.on('request', onrequest);\n\t} else if (writable && !ws) { // legacy streams\n\t\tstream.on('end', onlegacyfinish);\n\t\tstream.on('close', onlegacyfinish);\n\t}\n\n\tif (isChildProcess(stream)) stream.on('exit', onexit);\n\n\tstream.on('end', onend);\n\tstream.on('finish', onfinish);\n\tif (opts.error !== false) stream.on('error', onerror);\n\tstream.on('close', onclose);\n\n\treturn function() {\n\t\tstream.removeListener('complete', onfinish);\n\t\tstream.removeListener('abort', onclose);\n\t\tstream.removeListener('request', onrequest);\n\t\tif (stream.req) stream.req.removeListener('finish', onfinish);\n\t\tstream.removeListener('end', onlegacyfinish);\n\t\tstream.removeListener('close', onlegacyfinish);\n\t\tstream.removeListener('finish', onfinish);\n\t\tstream.removeListener('exit', onexit);\n\t\tstream.removeListener('end', onend);\n\t\tstream.removeListener('error', onerror);\n\t\tstream.removeListener('close', onclose);\n\t};\n};\n\nmodule.exports = eos;\n\n\n//# sourceURL=webpack:///./node_modules/end-of-stream/index.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/array/#/clear.js": +/*!***********************************************!*\ + !*** ./node_modules/es5-ext/array/#/clear.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("// Inspired by Google Closure:\n// http://closure-library.googlecode.com/svn/docs/\n// closure_goog_array_array.js.html#goog.array.clear\n\n\n\nvar value = __webpack_require__(/*! ../../object/valid-value */ \"./node_modules/es5-ext/object/valid-value.js\");\n\nmodule.exports = function () {\n\tvalue(this).length = 0;\n\treturn this;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/array/#/clear.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/array/#/e-index-of.js": +/*!****************************************************!*\ + !*** ./node_modules/es5-ext/array/#/e-index-of.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar numberIsNaN = __webpack_require__(/*! ../../number/is-nan */ \"./node_modules/es5-ext/number/is-nan/index.js\")\n , toPosInt = __webpack_require__(/*! ../../number/to-pos-integer */ \"./node_modules/es5-ext/number/to-pos-integer.js\")\n , value = __webpack_require__(/*! ../../object/valid-value */ \"./node_modules/es5-ext/object/valid-value.js\")\n , indexOf = Array.prototype.indexOf\n , objHasOwnProperty = Object.prototype.hasOwnProperty\n , abs = Math.abs\n , floor = Math.floor;\n\nmodule.exports = function (searchElement/*, fromIndex*/) {\n\tvar i, length, fromIndex, val;\n\tif (!numberIsNaN(searchElement)) return indexOf.apply(this, arguments);\n\n\tlength = toPosInt(value(this).length);\n\tfromIndex = arguments[1];\n\tif (isNaN(fromIndex)) fromIndex = 0;\n\telse if (fromIndex >= 0) fromIndex = floor(fromIndex);\n\telse fromIndex = toPosInt(this.length) - floor(abs(fromIndex));\n\n\tfor (i = fromIndex; i < length; ++i) {\n\t\tif (objHasOwnProperty.call(this, i)) {\n\t\t\tval = this[i];\n\t\t\tif (numberIsNaN(val)) return i; // Jslint: ignore\n\t\t}\n\t}\n\treturn -1;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/array/#/e-index-of.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/array/from/index.js": +/*!**************************************************!*\ + !*** ./node_modules/es5-ext/array/from/index.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es5-ext/array/from/is-implemented.js\")() ? Array.from : __webpack_require__(/*! ./shim */ \"./node_modules/es5-ext/array/from/shim.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/array/from/index.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/array/from/is-implemented.js": +/*!***********************************************************!*\ + !*** ./node_modules/es5-ext/array/from/is-implemented.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = function () {\n\tvar from = Array.from, arr, result;\n\tif (typeof from !== \"function\") return false;\n\tarr = [\"raz\", \"dwa\"];\n\tresult = from(arr);\n\treturn Boolean(result && result !== arr && result[1] === \"dwa\");\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/array/from/is-implemented.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/array/from/shim.js": +/*!*************************************************!*\ + !*** ./node_modules/es5-ext/array/from/shim.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar iteratorSymbol = __webpack_require__(/*! es6-symbol */ \"./node_modules/es6-symbol/index.js\").iterator\n , isArguments = __webpack_require__(/*! ../../function/is-arguments */ \"./node_modules/es5-ext/function/is-arguments.js\")\n , isFunction = __webpack_require__(/*! ../../function/is-function */ \"./node_modules/es5-ext/function/is-function.js\")\n , toPosInt = __webpack_require__(/*! ../../number/to-pos-integer */ \"./node_modules/es5-ext/number/to-pos-integer.js\")\n , callable = __webpack_require__(/*! ../../object/valid-callable */ \"./node_modules/es5-ext/object/valid-callable.js\")\n , validValue = __webpack_require__(/*! ../../object/valid-value */ \"./node_modules/es5-ext/object/valid-value.js\")\n , isValue = __webpack_require__(/*! ../../object/is-value */ \"./node_modules/es5-ext/object/is-value.js\")\n , isString = __webpack_require__(/*! ../../string/is-string */ \"./node_modules/es5-ext/string/is-string.js\")\n , isArray = Array.isArray\n , call = Function.prototype.call\n , desc = { configurable: true, enumerable: true, writable: true, value: null }\n , defineProperty = Object.defineProperty;\n\n// eslint-disable-next-line complexity, max-lines-per-function\nmodule.exports = function (arrayLike/*, mapFn, thisArg*/) {\n\tvar mapFn = arguments[1]\n\t , thisArg = arguments[2]\n\t , Context\n\t , i\n\t , j\n\t , arr\n\t , length\n\t , code\n\t , iterator\n\t , result\n\t , getIterator\n\t , value;\n\n\tarrayLike = Object(validValue(arrayLike));\n\n\tif (isValue(mapFn)) callable(mapFn);\n\tif (!this || this === Array || !isFunction(this)) {\n\t\t// Result: Plain array\n\t\tif (!mapFn) {\n\t\t\tif (isArguments(arrayLike)) {\n\t\t\t\t// Source: Arguments\n\t\t\t\tlength = arrayLike.length;\n\t\t\t\tif (length !== 1) return Array.apply(null, arrayLike);\n\t\t\t\tarr = new Array(1);\n\t\t\t\tarr[0] = arrayLike[0];\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t\tif (isArray(arrayLike)) {\n\t\t\t\t// Source: Array\n\t\t\t\tarr = new Array((length = arrayLike.length));\n\t\t\t\tfor (i = 0; i < length; ++i) arr[i] = arrayLike[i];\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t}\n\t\tarr = [];\n\t} else {\n\t\t// Result: Non plain array\n\t\tContext = this;\n\t}\n\n\tif (!isArray(arrayLike)) {\n\t\tif ((getIterator = arrayLike[iteratorSymbol]) !== undefined) {\n\t\t\t// Source: Iterator\n\t\t\titerator = callable(getIterator).call(arrayLike);\n\t\t\tif (Context) arr = new Context();\n\t\t\tresult = iterator.next();\n\t\t\ti = 0;\n\t\t\twhile (!result.done) {\n\t\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;\n\t\t\t\tif (Context) {\n\t\t\t\t\tdesc.value = value;\n\t\t\t\t\tdefineProperty(arr, i, desc);\n\t\t\t\t} else {\n\t\t\t\t\tarr[i] = value;\n\t\t\t\t}\n\t\t\t\tresult = iterator.next();\n\t\t\t\t++i;\n\t\t\t}\n\t\t\tlength = i;\n\t\t} else if (isString(arrayLike)) {\n\t\t\t// Source: String\n\t\t\tlength = arrayLike.length;\n\t\t\tif (Context) arr = new Context();\n\t\t\tfor (i = 0, j = 0; i < length; ++i) {\n\t\t\t\tvalue = arrayLike[i];\n\t\t\t\tif (i + 1 < length) {\n\t\t\t\t\tcode = value.charCodeAt(0);\n\t\t\t\t\t// eslint-disable-next-line max-depth\n\t\t\t\t\tif (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i];\n\t\t\t\t}\n\t\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, value, j) : value;\n\t\t\t\tif (Context) {\n\t\t\t\t\tdesc.value = value;\n\t\t\t\t\tdefineProperty(arr, j, desc);\n\t\t\t\t} else {\n\t\t\t\t\tarr[j] = value;\n\t\t\t\t}\n\t\t\t\t++j;\n\t\t\t}\n\t\t\tlength = j;\n\t\t}\n\t}\n\tif (length === undefined) {\n\t\t// Source: array or array-like\n\t\tlength = toPosInt(arrayLike.length);\n\t\tif (Context) arr = new Context(length);\n\t\tfor (i = 0; i < length; ++i) {\n\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];\n\t\t\tif (Context) {\n\t\t\t\tdesc.value = value;\n\t\t\t\tdefineProperty(arr, i, desc);\n\t\t\t} else {\n\t\t\t\tarr[i] = value;\n\t\t\t}\n\t\t}\n\t}\n\tif (Context) {\n\t\tdesc.value = null;\n\t\tarr.length = length;\n\t}\n\treturn arr;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/array/from/shim.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/function/is-arguments.js": +/*!*******************************************************!*\ + !*** ./node_modules/es5-ext/function/is-arguments.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar objToString = Object.prototype.toString\n , id = objToString.call((function () { return arguments; })());\n\nmodule.exports = function (value) { return objToString.call(value) === id; };\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/function/is-arguments.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/function/is-function.js": +/*!******************************************************!*\ + !*** ./node_modules/es5-ext/function/is-function.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar objToString = Object.prototype.toString\n , isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);\n\nmodule.exports = function (value) {\n\treturn typeof value === \"function\" && isFunctionStringTag(objToString.call(value));\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/function/is-function.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/function/noop.js": +/*!***********************************************!*\ + !*** ./node_modules/es5-ext/function/noop.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n// eslint-disable-next-line no-empty-function\nmodule.exports = function () {};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/function/noop.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/math/sign/index.js": +/*!*************************************************!*\ + !*** ./node_modules/es5-ext/math/sign/index.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es5-ext/math/sign/is-implemented.js\")() ? Math.sign : __webpack_require__(/*! ./shim */ \"./node_modules/es5-ext/math/sign/shim.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/math/sign/index.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/math/sign/is-implemented.js": +/*!**********************************************************!*\ + !*** ./node_modules/es5-ext/math/sign/is-implemented.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = function () {\n\tvar sign = Math.sign;\n\tif (typeof sign !== \"function\") return false;\n\treturn sign(10) === 1 && sign(-20) === -1;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/math/sign/is-implemented.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/math/sign/shim.js": +/*!************************************************!*\ + !*** ./node_modules/es5-ext/math/sign/shim.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = function (value) {\n\tvalue = Number(value);\n\tif (isNaN(value) || value === 0) return value;\n\treturn value > 0 ? 1 : -1;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/math/sign/shim.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/number/is-nan/index.js": +/*!*****************************************************!*\ + !*** ./node_modules/es5-ext/number/is-nan/index.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es5-ext/number/is-nan/is-implemented.js\")() ? Number.isNaN : __webpack_require__(/*! ./shim */ \"./node_modules/es5-ext/number/is-nan/shim.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/number/is-nan/index.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/number/is-nan/is-implemented.js": +/*!**************************************************************!*\ + !*** ./node_modules/es5-ext/number/is-nan/is-implemented.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = function () {\n\tvar numberIsNaN = Number.isNaN;\n\tif (typeof numberIsNaN !== \"function\") return false;\n\treturn !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/number/is-nan/is-implemented.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/number/is-nan/shim.js": +/*!****************************************************!*\ + !*** ./node_modules/es5-ext/number/is-nan/shim.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = function (value) {\n\t// eslint-disable-next-line no-self-compare\n\treturn value !== value;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/number/is-nan/shim.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/number/to-integer.js": +/*!***************************************************!*\ + !*** ./node_modules/es5-ext/number/to-integer.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar sign = __webpack_require__(/*! ../math/sign */ \"./node_modules/es5-ext/math/sign/index.js\")\n , abs = Math.abs\n , floor = Math.floor;\n\nmodule.exports = function (value) {\n\tif (isNaN(value)) return 0;\n\tvalue = Number(value);\n\tif (value === 0 || !isFinite(value)) return value;\n\treturn sign(value) * floor(abs(value));\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/number/to-integer.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/number/to-pos-integer.js": +/*!*******************************************************!*\ + !*** ./node_modules/es5-ext/number/to-pos-integer.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar toInteger = __webpack_require__(/*! ./to-integer */ \"./node_modules/es5-ext/number/to-integer.js\")\n , max = Math.max;\n\nmodule.exports = function (value) { return max(0, toInteger(value)); };\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/number/to-pos-integer.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/_iterate.js": +/*!*************************************************!*\ + !*** ./node_modules/es5-ext/object/_iterate.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("// Internal method, used by iteration functions.\n// Calls a function for each key-value pair found in object\n// Optionally takes compareFn to iterate object in specific order\n\n\n\nvar callable = __webpack_require__(/*! ./valid-callable */ \"./node_modules/es5-ext/object/valid-callable.js\")\n , value = __webpack_require__(/*! ./valid-value */ \"./node_modules/es5-ext/object/valid-value.js\")\n , bind = Function.prototype.bind\n , call = Function.prototype.call\n , keys = Object.keys\n , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nmodule.exports = function (method, defVal) {\n\treturn function (obj, cb/*, thisArg, compareFn*/) {\n\t\tvar list, thisArg = arguments[2], compareFn = arguments[3];\n\t\tobj = Object(value(obj));\n\t\tcallable(cb);\n\n\t\tlist = keys(obj);\n\t\tif (compareFn) {\n\t\t\tlist.sort(typeof compareFn === \"function\" ? bind.call(compareFn, obj) : undefined);\n\t\t}\n\t\tif (typeof method !== \"function\") method = list[method];\n\t\treturn call.call(method, list, function (key, index) {\n\t\t\tif (!objPropertyIsEnumerable.call(obj, key)) return defVal;\n\t\t\treturn call.call(cb, thisArg, obj[key], key, obj, index);\n\t\t});\n\t};\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/_iterate.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/assign/index.js": +/*!*****************************************************!*\ + !*** ./node_modules/es5-ext/object/assign/index.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es5-ext/object/assign/is-implemented.js\")() ? Object.assign : __webpack_require__(/*! ./shim */ \"./node_modules/es5-ext/object/assign/shim.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/assign/index.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/assign/is-implemented.js": +/*!**************************************************************!*\ + !*** ./node_modules/es5-ext/object/assign/is-implemented.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = function () {\n\tvar assign = Object.assign, obj;\n\tif (typeof assign !== \"function\") return false;\n\tobj = { foo: \"raz\" };\n\tassign(obj, { bar: \"dwa\" }, { trzy: \"trzy\" });\n\treturn obj.foo + obj.bar + obj.trzy === \"razdwatrzy\";\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/assign/is-implemented.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/assign/shim.js": +/*!****************************************************!*\ + !*** ./node_modules/es5-ext/object/assign/shim.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar keys = __webpack_require__(/*! ../keys */ \"./node_modules/es5-ext/object/keys/index.js\")\n , value = __webpack_require__(/*! ../valid-value */ \"./node_modules/es5-ext/object/valid-value.js\")\n , max = Math.max;\n\nmodule.exports = function (dest, src/*, …srcn*/) {\n\tvar error, i, length = max(arguments.length, 2), assign;\n\tdest = Object(value(dest));\n\tassign = function (key) {\n\t\ttry {\n\t\t\tdest[key] = src[key];\n\t\t} catch (e) {\n\t\t\tif (!error) error = e;\n\t\t}\n\t};\n\tfor (i = 1; i < length; ++i) {\n\t\tsrc = arguments[i];\n\t\tkeys(src).forEach(assign);\n\t}\n\tif (error !== undefined) throw error;\n\treturn dest;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/assign/shim.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/copy.js": +/*!*********************************************!*\ + !*** ./node_modules/es5-ext/object/copy.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar aFrom = __webpack_require__(/*! ../array/from */ \"./node_modules/es5-ext/array/from/index.js\")\n , assign = __webpack_require__(/*! ./assign */ \"./node_modules/es5-ext/object/assign/index.js\")\n , value = __webpack_require__(/*! ./valid-value */ \"./node_modules/es5-ext/object/valid-value.js\");\n\nmodule.exports = function (obj/*, propertyNames, options*/) {\n\tvar copy = Object(value(obj)), propertyNames = arguments[1], options = Object(arguments[2]);\n\tif (copy !== obj && !propertyNames) return copy;\n\tvar result = {};\n\tif (propertyNames) {\n\t\taFrom(propertyNames, function (propertyName) {\n\t\t\tif (options.ensure || propertyName in obj) result[propertyName] = obj[propertyName];\n\t\t});\n\t} else {\n\t\tassign(result, obj);\n\t}\n\treturn result;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/copy.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/create.js": +/*!***********************************************!*\ + !*** ./node_modules/es5-ext/object/create.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("// Workaround for http://code.google.com/p/v8/issues/detail?id=2804\n\n\n\nvar create = Object.create, shim;\n\nif (!__webpack_require__(/*! ./set-prototype-of/is-implemented */ \"./node_modules/es5-ext/object/set-prototype-of/is-implemented.js\")()) {\n\tshim = __webpack_require__(/*! ./set-prototype-of/shim */ \"./node_modules/es5-ext/object/set-prototype-of/shim.js\");\n}\n\nmodule.exports = (function () {\n\tvar nullObject, polyProps, desc;\n\tif (!shim) return create;\n\tif (shim.level !== 1) return create;\n\n\tnullObject = {};\n\tpolyProps = {};\n\tdesc = { configurable: false, enumerable: false, writable: true, value: undefined };\n\tObject.getOwnPropertyNames(Object.prototype).forEach(function (name) {\n\t\tif (name === \"__proto__\") {\n\t\t\tpolyProps[name] = {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: undefined\n\t\t\t};\n\t\t\treturn;\n\t\t}\n\t\tpolyProps[name] = desc;\n\t});\n\tObject.defineProperties(nullObject, polyProps);\n\n\tObject.defineProperty(shim, \"nullPolyfill\", {\n\t\tconfigurable: false,\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tvalue: nullObject\n\t});\n\n\treturn function (prototype, props) {\n\t\treturn create(prototype === null ? nullObject : prototype, props);\n\t};\n})();\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/create.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/for-each.js": +/*!*************************************************!*\ + !*** ./node_modules/es5-ext/object/for-each.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = __webpack_require__(/*! ./_iterate */ \"./node_modules/es5-ext/object/_iterate.js\")(\"forEach\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/for-each.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/is-object.js": +/*!**************************************************!*\ + !*** ./node_modules/es5-ext/object/is-object.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar isValue = __webpack_require__(/*! ./is-value */ \"./node_modules/es5-ext/object/is-value.js\");\n\nvar map = { function: true, object: true };\n\nmodule.exports = function (value) { return (isValue(value) && map[typeof value]) || false; };\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/is-object.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/is-value.js": +/*!*************************************************!*\ + !*** ./node_modules/es5-ext/object/is-value.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar _undefined = __webpack_require__(/*! ../function/noop */ \"./node_modules/es5-ext/function/noop.js\")(); // Support ES3 engines\n\nmodule.exports = function (val) { return val !== _undefined && val !== null; };\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/is-value.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/keys/index.js": +/*!***************************************************!*\ + !*** ./node_modules/es5-ext/object/keys/index.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es5-ext/object/keys/is-implemented.js\")() ? Object.keys : __webpack_require__(/*! ./shim */ \"./node_modules/es5-ext/object/keys/shim.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/keys/index.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/keys/is-implemented.js": +/*!************************************************************!*\ + !*** ./node_modules/es5-ext/object/keys/is-implemented.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = function () {\n\ttry {\n\t\tObject.keys(\"primitive\");\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/keys/is-implemented.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/keys/shim.js": +/*!**************************************************!*\ + !*** ./node_modules/es5-ext/object/keys/shim.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar isValue = __webpack_require__(/*! ../is-value */ \"./node_modules/es5-ext/object/is-value.js\");\n\nvar keys = Object.keys;\n\nmodule.exports = function (object) { return keys(isValue(object) ? Object(object) : object); };\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/keys/shim.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/map.js": +/*!********************************************!*\ + !*** ./node_modules/es5-ext/object/map.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar callable = __webpack_require__(/*! ./valid-callable */ \"./node_modules/es5-ext/object/valid-callable.js\")\n , forEach = __webpack_require__(/*! ./for-each */ \"./node_modules/es5-ext/object/for-each.js\")\n , call = Function.prototype.call;\n\nmodule.exports = function (obj, cb/*, thisArg*/) {\n\tvar result = {}, thisArg = arguments[2];\n\tcallable(cb);\n\tforEach(obj, function (value, key, targetObj, index) {\n\t\tresult[key] = call.call(cb, thisArg, value, key, targetObj, index);\n\t});\n\treturn result;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/map.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/normalize-options.js": +/*!**********************************************************!*\ + !*** ./node_modules/es5-ext/object/normalize-options.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar isValue = __webpack_require__(/*! ./is-value */ \"./node_modules/es5-ext/object/is-value.js\");\n\nvar forEach = Array.prototype.forEach, create = Object.create;\n\nvar process = function (src, obj) {\n\tvar key;\n\tfor (key in src) obj[key] = src[key];\n};\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function (opts1/*, …options*/) {\n\tvar result = create(null);\n\tforEach.call(arguments, function (options) {\n\t\tif (!isValue(options)) return;\n\t\tprocess(Object(options), result);\n\t});\n\treturn result;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/normalize-options.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/primitive-set.js": +/*!******************************************************!*\ + !*** ./node_modules/es5-ext/object/primitive-set.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar forEach = Array.prototype.forEach, create = Object.create;\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function (arg/*, …args*/) {\n\tvar set = create(null);\n\tforEach.call(arguments, function (name) { set[name] = true; });\n\treturn set;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/primitive-set.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/set-prototype-of/index.js": +/*!***************************************************************!*\ + !*** ./node_modules/es5-ext/object/set-prototype-of/index.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es5-ext/object/set-prototype-of/is-implemented.js\")() ? Object.setPrototypeOf : __webpack_require__(/*! ./shim */ \"./node_modules/es5-ext/object/set-prototype-of/shim.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/set-prototype-of/index.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/set-prototype-of/is-implemented.js": +/*!************************************************************************!*\ + !*** ./node_modules/es5-ext/object/set-prototype-of/is-implemented.js ***! + \************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar create = Object.create, getPrototypeOf = Object.getPrototypeOf, plainObject = {};\n\nmodule.exports = function (/* CustomCreate*/) {\n\tvar setPrototypeOf = Object.setPrototypeOf, customCreate = arguments[0] || create;\n\tif (typeof setPrototypeOf !== \"function\") return false;\n\treturn getPrototypeOf(setPrototypeOf(customCreate(null), plainObject)) === plainObject;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/set-prototype-of/is-implemented.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/set-prototype-of/shim.js": +/*!**************************************************************!*\ + !*** ./node_modules/es5-ext/object/set-prototype-of/shim.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* eslint no-proto: \"off\" */\n\n// Big thanks to @WebReflection for sorting this out\n// https://gist.github.com/WebReflection/5593554\n\n\n\nvar isObject = __webpack_require__(/*! ../is-object */ \"./node_modules/es5-ext/object/is-object.js\")\n , value = __webpack_require__(/*! ../valid-value */ \"./node_modules/es5-ext/object/valid-value.js\")\n , objIsPrototypeOf = Object.prototype.isPrototypeOf\n , defineProperty = Object.defineProperty\n , nullDesc = { configurable: true, enumerable: false, writable: true, value: undefined }\n , validate;\n\nvalidate = function (obj, prototype) {\n\tvalue(obj);\n\tif (prototype === null || isObject(prototype)) return obj;\n\tthrow new TypeError(\"Prototype must be null or an object\");\n};\n\nmodule.exports = (function (status) {\n\tvar fn, set;\n\tif (!status) return null;\n\tif (status.level === 2) {\n\t\tif (status.set) {\n\t\t\tset = status.set;\n\t\t\tfn = function (obj, prototype) {\n\t\t\t\tset.call(validate(obj, prototype), prototype);\n\t\t\t\treturn obj;\n\t\t\t};\n\t\t} else {\n\t\t\tfn = function (obj, prototype) {\n\t\t\t\tvalidate(obj, prototype).__proto__ = prototype;\n\t\t\t\treturn obj;\n\t\t\t};\n\t\t}\n\t} else {\n\t\tfn = function self(obj, prototype) {\n\t\t\tvar isNullBase;\n\t\t\tvalidate(obj, prototype);\n\t\t\tisNullBase = objIsPrototypeOf.call(self.nullPolyfill, obj);\n\t\t\tif (isNullBase) delete self.nullPolyfill.__proto__;\n\t\t\tif (prototype === null) prototype = self.nullPolyfill;\n\t\t\tobj.__proto__ = prototype;\n\t\t\tif (isNullBase) defineProperty(self.nullPolyfill, \"__proto__\", nullDesc);\n\t\t\treturn obj;\n\t\t};\n\t}\n\treturn Object.defineProperty(fn, \"level\", {\n\t\tconfigurable: false,\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tvalue: status.level\n\t});\n})(\n\t(function () {\n\t\tvar tmpObj1 = Object.create(null)\n\t\t , tmpObj2 = {}\n\t\t , set\n\t\t , desc = Object.getOwnPropertyDescriptor(Object.prototype, \"__proto__\");\n\n\t\tif (desc) {\n\t\t\ttry {\n\t\t\t\tset = desc.set; // Opera crashes at this point\n\t\t\t\tset.call(tmpObj1, tmpObj2);\n\t\t\t} catch (ignore) {}\n\t\t\tif (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { set: set, level: 2 };\n\t\t}\n\n\t\ttmpObj1.__proto__ = tmpObj2;\n\t\tif (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 2 };\n\n\t\ttmpObj1 = {};\n\t\ttmpObj1.__proto__ = tmpObj2;\n\t\tif (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 1 };\n\n\t\treturn false;\n\t})()\n);\n\n__webpack_require__(/*! ../create */ \"./node_modules/es5-ext/object/create.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/set-prototype-of/shim.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/valid-callable.js": +/*!*******************************************************!*\ + !*** ./node_modules/es5-ext/object/valid-callable.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = function (fn) {\n\tif (typeof fn !== \"function\") throw new TypeError(fn + \" is not a function\");\n\treturn fn;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/valid-callable.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/object/valid-value.js": +/*!****************************************************!*\ + !*** ./node_modules/es5-ext/object/valid-value.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar isValue = __webpack_require__(/*! ./is-value */ \"./node_modules/es5-ext/object/is-value.js\");\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) throw new TypeError(\"Cannot use null or undefined\");\n\treturn value;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/valid-value.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/string/#/contains/index.js": +/*!*********************************************************!*\ + !*** ./node_modules/es5-ext/string/#/contains/index.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es5-ext/string/#/contains/is-implemented.js\")() ? String.prototype.contains : __webpack_require__(/*! ./shim */ \"./node_modules/es5-ext/string/#/contains/shim.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/string/#/contains/index.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/string/#/contains/is-implemented.js": +/*!******************************************************************!*\ + !*** ./node_modules/es5-ext/string/#/contains/is-implemented.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar str = \"razdwatrzy\";\n\nmodule.exports = function () {\n\tif (typeof str.contains !== \"function\") return false;\n\treturn str.contains(\"dwa\") === true && str.contains(\"foo\") === false;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/string/#/contains/is-implemented.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/string/#/contains/shim.js": +/*!********************************************************!*\ + !*** ./node_modules/es5-ext/string/#/contains/shim.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar indexOf = String.prototype.indexOf;\n\nmodule.exports = function (searchString/*, position*/) {\n\treturn indexOf.call(this, searchString, arguments[1]) > -1;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/string/#/contains/shim.js?"); + +/***/ }), + +/***/ "./node_modules/es5-ext/string/is-string.js": +/*!**************************************************!*\ + !*** ./node_modules/es5-ext/string/is-string.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar objToString = Object.prototype.toString, id = objToString.call(\"\");\n\nmodule.exports = function (value) {\n\treturn (\n\t\ttypeof value === \"string\" ||\n\t\t(value &&\n\t\t\ttypeof value === \"object\" &&\n\t\t\t(value instanceof String || objToString.call(value) === id)) ||\n\t\tfalse\n\t);\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/string/is-string.js?"); + +/***/ }), + +/***/ "./node_modules/es6-iterator/array.js": +/*!********************************************!*\ + !*** ./node_modules/es6-iterator/array.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar setPrototypeOf = __webpack_require__(/*! es5-ext/object/set-prototype-of */ \"./node_modules/es5-ext/object/set-prototype-of/index.js\")\n , contains = __webpack_require__(/*! es5-ext/string/#/contains */ \"./node_modules/es5-ext/string/#/contains/index.js\")\n , d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , Symbol = __webpack_require__(/*! es6-symbol */ \"./node_modules/es6-symbol/index.js\")\n , Iterator = __webpack_require__(/*! ./ */ \"./node_modules/es6-iterator/index.js\");\n\nvar defineProperty = Object.defineProperty, ArrayIterator;\n\nArrayIterator = module.exports = function (arr, kind) {\n\tif (!(this instanceof ArrayIterator)) throw new TypeError(\"Constructor requires 'new'\");\n\tIterator.call(this, arr);\n\tif (!kind) kind = \"value\";\n\telse if (contains.call(kind, \"key+value\")) kind = \"key+value\";\n\telse if (contains.call(kind, \"key\")) kind = \"key\";\n\telse kind = \"value\";\n\tdefineProperty(this, \"__kind__\", d(\"\", kind));\n};\nif (setPrototypeOf) setPrototypeOf(ArrayIterator, Iterator);\n\n// Internal %ArrayIteratorPrototype% doesn't expose its constructor\ndelete ArrayIterator.prototype.constructor;\n\nArrayIterator.prototype = Object.create(Iterator.prototype, {\n\t_resolve: d(function (i) {\n\t\tif (this.__kind__ === \"value\") return this.__list__[i];\n\t\tif (this.__kind__ === \"key+value\") return [i, this.__list__[i]];\n\t\treturn i;\n\t})\n});\ndefineProperty(ArrayIterator.prototype, Symbol.toStringTag, d(\"c\", \"Array Iterator\"));\n\n\n//# sourceURL=webpack:///./node_modules/es6-iterator/array.js?"); + +/***/ }), + +/***/ "./node_modules/es6-iterator/for-of.js": +/*!*********************************************!*\ + !*** ./node_modules/es6-iterator/for-of.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar isArguments = __webpack_require__(/*! es5-ext/function/is-arguments */ \"./node_modules/es5-ext/function/is-arguments.js\")\n , callable = __webpack_require__(/*! es5-ext/object/valid-callable */ \"./node_modules/es5-ext/object/valid-callable.js\")\n , isString = __webpack_require__(/*! es5-ext/string/is-string */ \"./node_modules/es5-ext/string/is-string.js\")\n , get = __webpack_require__(/*! ./get */ \"./node_modules/es6-iterator/get.js\");\n\nvar isArray = Array.isArray, call = Function.prototype.call, some = Array.prototype.some;\n\nmodule.exports = function (iterable, cb /*, thisArg*/) {\n\tvar mode, thisArg = arguments[2], result, doBreak, broken, i, length, char, code;\n\tif (isArray(iterable) || isArguments(iterable)) mode = \"array\";\n\telse if (isString(iterable)) mode = \"string\";\n\telse iterable = get(iterable);\n\n\tcallable(cb);\n\tdoBreak = function () {\n\t\tbroken = true;\n\t};\n\tif (mode === \"array\") {\n\t\tsome.call(iterable, function (value) {\n\t\t\tcall.call(cb, thisArg, value, doBreak);\n\t\t\treturn broken;\n\t\t});\n\t\treturn;\n\t}\n\tif (mode === \"string\") {\n\t\tlength = iterable.length;\n\t\tfor (i = 0; i < length; ++i) {\n\t\t\tchar = iterable[i];\n\t\t\tif (i + 1 < length) {\n\t\t\t\tcode = char.charCodeAt(0);\n\t\t\t\tif (code >= 0xd800 && code <= 0xdbff) char += iterable[++i];\n\t\t\t}\n\t\t\tcall.call(cb, thisArg, char, doBreak);\n\t\t\tif (broken) break;\n\t\t}\n\t\treturn;\n\t}\n\tresult = iterable.next();\n\n\twhile (!result.done) {\n\t\tcall.call(cb, thisArg, result.value, doBreak);\n\t\tif (broken) return;\n\t\tresult = iterable.next();\n\t}\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-iterator/for-of.js?"); + +/***/ }), + +/***/ "./node_modules/es6-iterator/get.js": +/*!******************************************!*\ + !*** ./node_modules/es6-iterator/get.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar isArguments = __webpack_require__(/*! es5-ext/function/is-arguments */ \"./node_modules/es5-ext/function/is-arguments.js\")\n , isString = __webpack_require__(/*! es5-ext/string/is-string */ \"./node_modules/es5-ext/string/is-string.js\")\n , ArrayIterator = __webpack_require__(/*! ./array */ \"./node_modules/es6-iterator/array.js\")\n , StringIterator = __webpack_require__(/*! ./string */ \"./node_modules/es6-iterator/string.js\")\n , iterable = __webpack_require__(/*! ./valid-iterable */ \"./node_modules/es6-iterator/valid-iterable.js\")\n , iteratorSymbol = __webpack_require__(/*! es6-symbol */ \"./node_modules/es6-symbol/index.js\").iterator;\n\nmodule.exports = function (obj) {\n\tif (typeof iterable(obj)[iteratorSymbol] === \"function\") return obj[iteratorSymbol]();\n\tif (isArguments(obj)) return new ArrayIterator(obj);\n\tif (isString(obj)) return new StringIterator(obj);\n\treturn new ArrayIterator(obj);\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-iterator/get.js?"); + +/***/ }), + +/***/ "./node_modules/es6-iterator/index.js": +/*!********************************************!*\ + !*** ./node_modules/es6-iterator/index.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar clear = __webpack_require__(/*! es5-ext/array/#/clear */ \"./node_modules/es5-ext/array/#/clear.js\")\n , assign = __webpack_require__(/*! es5-ext/object/assign */ \"./node_modules/es5-ext/object/assign/index.js\")\n , callable = __webpack_require__(/*! es5-ext/object/valid-callable */ \"./node_modules/es5-ext/object/valid-callable.js\")\n , value = __webpack_require__(/*! es5-ext/object/valid-value */ \"./node_modules/es5-ext/object/valid-value.js\")\n , d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , autoBind = __webpack_require__(/*! d/auto-bind */ \"./node_modules/d/auto-bind.js\")\n , Symbol = __webpack_require__(/*! es6-symbol */ \"./node_modules/es6-symbol/index.js\");\n\nvar defineProperty = Object.defineProperty, defineProperties = Object.defineProperties, Iterator;\n\nmodule.exports = Iterator = function (list, context) {\n\tif (!(this instanceof Iterator)) throw new TypeError(\"Constructor requires 'new'\");\n\tdefineProperties(this, {\n\t\t__list__: d(\"w\", value(list)),\n\t\t__context__: d(\"w\", context),\n\t\t__nextIndex__: d(\"w\", 0)\n\t});\n\tif (!context) return;\n\tcallable(context.on);\n\tcontext.on(\"_add\", this._onAdd);\n\tcontext.on(\"_delete\", this._onDelete);\n\tcontext.on(\"_clear\", this._onClear);\n};\n\n// Internal %IteratorPrototype% doesn't expose its constructor\ndelete Iterator.prototype.constructor;\n\ndefineProperties(\n\tIterator.prototype,\n\tassign(\n\t\t{\n\t\t\t_next: d(function () {\n\t\t\t\tvar i;\n\t\t\t\tif (!this.__list__) return undefined;\n\t\t\t\tif (this.__redo__) {\n\t\t\t\t\ti = this.__redo__.shift();\n\t\t\t\t\tif (i !== undefined) return i;\n\t\t\t\t}\n\t\t\t\tif (this.__nextIndex__ < this.__list__.length) return this.__nextIndex__++;\n\t\t\t\tthis._unBind();\n\t\t\t\treturn undefined;\n\t\t\t}),\n\t\t\tnext: d(function () {\n\t\t\t\treturn this._createResult(this._next());\n\t\t\t}),\n\t\t\t_createResult: d(function (i) {\n\t\t\t\tif (i === undefined) return { done: true, value: undefined };\n\t\t\t\treturn { done: false, value: this._resolve(i) };\n\t\t\t}),\n\t\t\t_resolve: d(function (i) {\n\t\t\t\treturn this.__list__[i];\n\t\t\t}),\n\t\t\t_unBind: d(function () {\n\t\t\t\tthis.__list__ = null;\n\t\t\t\tdelete this.__redo__;\n\t\t\t\tif (!this.__context__) return;\n\t\t\t\tthis.__context__.off(\"_add\", this._onAdd);\n\t\t\t\tthis.__context__.off(\"_delete\", this._onDelete);\n\t\t\t\tthis.__context__.off(\"_clear\", this._onClear);\n\t\t\t\tthis.__context__ = null;\n\t\t\t}),\n\t\t\ttoString: d(function () {\n\t\t\t\treturn \"[object \" + (this[Symbol.toStringTag] || \"Object\") + \"]\";\n\t\t\t})\n\t\t},\n\t\tautoBind({\n\t\t\t_onAdd: d(function (index) {\n\t\t\t\tif (index >= this.__nextIndex__) return;\n\t\t\t\t++this.__nextIndex__;\n\t\t\t\tif (!this.__redo__) {\n\t\t\t\t\tdefineProperty(this, \"__redo__\", d(\"c\", [index]));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.__redo__.forEach(function (redo, i) {\n\t\t\t\t\tif (redo >= index) this.__redo__[i] = ++redo;\n\t\t\t\t}, this);\n\t\t\t\tthis.__redo__.push(index);\n\t\t\t}),\n\t\t\t_onDelete: d(function (index) {\n\t\t\t\tvar i;\n\t\t\t\tif (index >= this.__nextIndex__) return;\n\t\t\t\t--this.__nextIndex__;\n\t\t\t\tif (!this.__redo__) return;\n\t\t\t\ti = this.__redo__.indexOf(index);\n\t\t\t\tif (i !== -1) this.__redo__.splice(i, 1);\n\t\t\t\tthis.__redo__.forEach(function (redo, j) {\n\t\t\t\t\tif (redo > index) this.__redo__[j] = --redo;\n\t\t\t\t}, this);\n\t\t\t}),\n\t\t\t_onClear: d(function () {\n\t\t\t\tif (this.__redo__) clear.call(this.__redo__);\n\t\t\t\tthis.__nextIndex__ = 0;\n\t\t\t})\n\t\t})\n\t)\n);\n\ndefineProperty(\n\tIterator.prototype,\n\tSymbol.iterator,\n\td(function () {\n\t\treturn this;\n\t})\n);\n\n\n//# sourceURL=webpack:///./node_modules/es6-iterator/index.js?"); + +/***/ }), + +/***/ "./node_modules/es6-iterator/is-iterable.js": +/*!**************************************************!*\ + !*** ./node_modules/es6-iterator/is-iterable.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar isArguments = __webpack_require__(/*! es5-ext/function/is-arguments */ \"./node_modules/es5-ext/function/is-arguments.js\")\n , isValue = __webpack_require__(/*! es5-ext/object/is-value */ \"./node_modules/es5-ext/object/is-value.js\")\n , isString = __webpack_require__(/*! es5-ext/string/is-string */ \"./node_modules/es5-ext/string/is-string.js\");\n\nvar iteratorSymbol = __webpack_require__(/*! es6-symbol */ \"./node_modules/es6-symbol/index.js\").iterator\n , isArray = Array.isArray;\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) return false;\n\tif (isArray(value)) return true;\n\tif (isString(value)) return true;\n\tif (isArguments(value)) return true;\n\treturn typeof value[iteratorSymbol] === \"function\";\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-iterator/is-iterable.js?"); + +/***/ }), + +/***/ "./node_modules/es6-iterator/string.js": +/*!*********************************************!*\ + !*** ./node_modules/es6-iterator/string.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("// Thanks @mathiasbynens\n// http://mathiasbynens.be/notes/javascript-unicode#iterating-over-symbols\n\n\n\nvar setPrototypeOf = __webpack_require__(/*! es5-ext/object/set-prototype-of */ \"./node_modules/es5-ext/object/set-prototype-of/index.js\")\n , d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , Symbol = __webpack_require__(/*! es6-symbol */ \"./node_modules/es6-symbol/index.js\")\n , Iterator = __webpack_require__(/*! ./ */ \"./node_modules/es6-iterator/index.js\");\n\nvar defineProperty = Object.defineProperty, StringIterator;\n\nStringIterator = module.exports = function (str) {\n\tif (!(this instanceof StringIterator)) throw new TypeError(\"Constructor requires 'new'\");\n\tstr = String(str);\n\tIterator.call(this, str);\n\tdefineProperty(this, \"__length__\", d(\"\", str.length));\n};\nif (setPrototypeOf) setPrototypeOf(StringIterator, Iterator);\n\n// Internal %ArrayIteratorPrototype% doesn't expose its constructor\ndelete StringIterator.prototype.constructor;\n\nStringIterator.prototype = Object.create(Iterator.prototype, {\n\t_next: d(function () {\n\t\tif (!this.__list__) return undefined;\n\t\tif (this.__nextIndex__ < this.__length__) return this.__nextIndex__++;\n\t\tthis._unBind();\n\t\treturn undefined;\n\t}),\n\t_resolve: d(function (i) {\n\t\tvar char = this.__list__[i], code;\n\t\tif (this.__nextIndex__ === this.__length__) return char;\n\t\tcode = char.charCodeAt(0);\n\t\tif (code >= 0xd800 && code <= 0xdbff) return char + this.__list__[this.__nextIndex__++];\n\t\treturn char;\n\t})\n});\ndefineProperty(StringIterator.prototype, Symbol.toStringTag, d(\"c\", \"String Iterator\"));\n\n\n//# sourceURL=webpack:///./node_modules/es6-iterator/string.js?"); + +/***/ }), + +/***/ "./node_modules/es6-iterator/valid-iterable.js": +/*!*****************************************************!*\ + !*** ./node_modules/es6-iterator/valid-iterable.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar isIterable = __webpack_require__(/*! ./is-iterable */ \"./node_modules/es6-iterator/is-iterable.js\");\n\nmodule.exports = function (value) {\n\tif (!isIterable(value)) throw new TypeError(value + \" is not iterable\");\n\treturn value;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-iterator/valid-iterable.js?"); + +/***/ }), + +/***/ "./node_modules/es6-map/index.js": +/*!***************************************!*\ + !*** ./node_modules/es6-map/index.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es6-map/is-implemented.js\")() ? Map : __webpack_require__(/*! ./polyfill */ \"./node_modules/es6-map/polyfill.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es6-map/index.js?"); + +/***/ }), + +/***/ "./node_modules/es6-map/is-implemented.js": +/*!************************************************!*\ + !*** ./node_modules/es6-map/is-implemented.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = function () {\n\tvar map, iterator, result;\n\tif (typeof Map !== 'function') return false;\n\ttry {\n\t\t// WebKit doesn't support arguments and crashes\n\t\tmap = new Map([['raz', 'one'], ['dwa', 'two'], ['trzy', 'three']]);\n\t} catch (e) {\n\t\treturn false;\n\t}\n\tif (String(map) !== '[object Map]') return false;\n\tif (map.size !== 3) return false;\n\tif (typeof map.clear !== 'function') return false;\n\tif (typeof map.delete !== 'function') return false;\n\tif (typeof map.entries !== 'function') return false;\n\tif (typeof map.forEach !== 'function') return false;\n\tif (typeof map.get !== 'function') return false;\n\tif (typeof map.has !== 'function') return false;\n\tif (typeof map.keys !== 'function') return false;\n\tif (typeof map.set !== 'function') return false;\n\tif (typeof map.values !== 'function') return false;\n\n\titerator = map.entries();\n\tresult = iterator.next();\n\tif (result.done !== false) return false;\n\tif (!result.value) return false;\n\tif (result.value[0] !== 'raz') return false;\n\tif (result.value[1] !== 'one') return false;\n\n\treturn true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-map/is-implemented.js?"); + +/***/ }), + +/***/ "./node_modules/es6-map/is-native-implemented.js": +/*!*******************************************************!*\ + !*** ./node_modules/es6-map/is-native-implemented.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("// Exports true if environment provides native `Map` implementation,\n// whatever that is.\n\n\n\nmodule.exports = (function () {\n\tif (typeof Map === 'undefined') return false;\n\treturn (Object.prototype.toString.call(new Map()) === '[object Map]');\n}());\n\n\n//# sourceURL=webpack:///./node_modules/es6-map/is-native-implemented.js?"); + +/***/ }), + +/***/ "./node_modules/es6-map/lib/iterator-kinds.js": +/*!****************************************************!*\ + !*** ./node_modules/es6-map/lib/iterator-kinds.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = __webpack_require__(/*! es5-ext/object/primitive-set */ \"./node_modules/es5-ext/object/primitive-set.js\")('key',\n\t'value', 'key+value');\n\n\n//# sourceURL=webpack:///./node_modules/es6-map/lib/iterator-kinds.js?"); + +/***/ }), + +/***/ "./node_modules/es6-map/lib/iterator.js": +/*!**********************************************!*\ + !*** ./node_modules/es6-map/lib/iterator.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar setPrototypeOf = __webpack_require__(/*! es5-ext/object/set-prototype-of */ \"./node_modules/es5-ext/object/set-prototype-of/index.js\")\n , d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , Iterator = __webpack_require__(/*! es6-iterator */ \"./node_modules/es6-iterator/index.js\")\n , toStringTagSymbol = __webpack_require__(/*! es6-symbol */ \"./node_modules/es6-symbol/index.js\").toStringTag\n , kinds = __webpack_require__(/*! ./iterator-kinds */ \"./node_modules/es6-map/lib/iterator-kinds.js\")\n\n , defineProperties = Object.defineProperties\n , unBind = Iterator.prototype._unBind\n , MapIterator;\n\nMapIterator = module.exports = function (map, kind) {\n\tif (!(this instanceof MapIterator)) return new MapIterator(map, kind);\n\tIterator.call(this, map.__mapKeysData__, map);\n\tif (!kind || !kinds[kind]) kind = 'key+value';\n\tdefineProperties(this, {\n\t\t__kind__: d('', kind),\n\t\t__values__: d('w', map.__mapValuesData__)\n\t});\n};\nif (setPrototypeOf) setPrototypeOf(MapIterator, Iterator);\n\nMapIterator.prototype = Object.create(Iterator.prototype, {\n\tconstructor: d(MapIterator),\n\t_resolve: d(function (i) {\n\t\tif (this.__kind__ === 'value') return this.__values__[i];\n\t\tif (this.__kind__ === 'key') return this.__list__[i];\n\t\treturn [this.__list__[i], this.__values__[i]];\n\t}),\n\t_unBind: d(function () {\n\t\tthis.__values__ = null;\n\t\tunBind.call(this);\n\t}),\n\ttoString: d(function () { return '[object Map Iterator]'; })\n});\nObject.defineProperty(MapIterator.prototype, toStringTagSymbol,\n\td('c', 'Map Iterator'));\n\n\n//# sourceURL=webpack:///./node_modules/es6-map/lib/iterator.js?"); + +/***/ }), + +/***/ "./node_modules/es6-map/polyfill.js": +/*!******************************************!*\ + !*** ./node_modules/es6-map/polyfill.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar clear = __webpack_require__(/*! es5-ext/array/#/clear */ \"./node_modules/es5-ext/array/#/clear.js\")\n , eIndexOf = __webpack_require__(/*! es5-ext/array/#/e-index-of */ \"./node_modules/es5-ext/array/#/e-index-of.js\")\n , setPrototypeOf = __webpack_require__(/*! es5-ext/object/set-prototype-of */ \"./node_modules/es5-ext/object/set-prototype-of/index.js\")\n , callable = __webpack_require__(/*! es5-ext/object/valid-callable */ \"./node_modules/es5-ext/object/valid-callable.js\")\n , validValue = __webpack_require__(/*! es5-ext/object/valid-value */ \"./node_modules/es5-ext/object/valid-value.js\")\n , d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , ee = __webpack_require__(/*! event-emitter */ \"./node_modules/event-emitter/index.js\")\n , Symbol = __webpack_require__(/*! es6-symbol */ \"./node_modules/es6-symbol/index.js\")\n , iterator = __webpack_require__(/*! es6-iterator/valid-iterable */ \"./node_modules/es6-iterator/valid-iterable.js\")\n , forOf = __webpack_require__(/*! es6-iterator/for-of */ \"./node_modules/es6-iterator/for-of.js\")\n , Iterator = __webpack_require__(/*! ./lib/iterator */ \"./node_modules/es6-map/lib/iterator.js\")\n , isNative = __webpack_require__(/*! ./is-native-implemented */ \"./node_modules/es6-map/is-native-implemented.js\")\n\n , call = Function.prototype.call\n , defineProperties = Object.defineProperties, getPrototypeOf = Object.getPrototypeOf\n , MapPoly;\n\nmodule.exports = MapPoly = function (/*iterable*/) {\n\tvar iterable = arguments[0], keys, values, self;\n\tif (!(this instanceof MapPoly)) throw new TypeError('Constructor requires \\'new\\'');\n\tif (isNative && setPrototypeOf && (Map !== MapPoly)) {\n\t\tself = setPrototypeOf(new Map(), getPrototypeOf(this));\n\t} else {\n\t\tself = this;\n\t}\n\tif (iterable != null) iterator(iterable);\n\tdefineProperties(self, {\n\t\t__mapKeysData__: d('c', keys = []),\n\t\t__mapValuesData__: d('c', values = [])\n\t});\n\tif (!iterable) return self;\n\tforOf(iterable, function (value) {\n\t\tvar key = validValue(value)[0];\n\t\tvalue = value[1];\n\t\tif (eIndexOf.call(keys, key) !== -1) return;\n\t\tkeys.push(key);\n\t\tvalues.push(value);\n\t}, self);\n\treturn self;\n};\n\nif (isNative) {\n\tif (setPrototypeOf) setPrototypeOf(MapPoly, Map);\n\tMapPoly.prototype = Object.create(Map.prototype, {\n\t\tconstructor: d(MapPoly)\n\t});\n}\n\nee(defineProperties(MapPoly.prototype, {\n\tclear: d(function () {\n\t\tif (!this.__mapKeysData__.length) return;\n\t\tclear.call(this.__mapKeysData__);\n\t\tclear.call(this.__mapValuesData__);\n\t\tthis.emit('_clear');\n\t}),\n\tdelete: d(function (key) {\n\t\tvar index = eIndexOf.call(this.__mapKeysData__, key);\n\t\tif (index === -1) return false;\n\t\tthis.__mapKeysData__.splice(index, 1);\n\t\tthis.__mapValuesData__.splice(index, 1);\n\t\tthis.emit('_delete', index, key);\n\t\treturn true;\n\t}),\n\tentries: d(function () { return new Iterator(this, 'key+value'); }),\n\tforEach: d(function (cb/*, thisArg*/) {\n\t\tvar thisArg = arguments[1], iterator, result;\n\t\tcallable(cb);\n\t\titerator = this.entries();\n\t\tresult = iterator._next();\n\t\twhile (result !== undefined) {\n\t\t\tcall.call(cb, thisArg, this.__mapValuesData__[result],\n\t\t\t\tthis.__mapKeysData__[result], this);\n\t\t\tresult = iterator._next();\n\t\t}\n\t}),\n\tget: d(function (key) {\n\t\tvar index = eIndexOf.call(this.__mapKeysData__, key);\n\t\tif (index === -1) return;\n\t\treturn this.__mapValuesData__[index];\n\t}),\n\thas: d(function (key) {\n\t\treturn (eIndexOf.call(this.__mapKeysData__, key) !== -1);\n\t}),\n\tkeys: d(function () { return new Iterator(this, 'key'); }),\n\tset: d(function (key, value) {\n\t\tvar index = eIndexOf.call(this.__mapKeysData__, key), emit;\n\t\tif (index === -1) {\n\t\t\tindex = this.__mapKeysData__.push(key) - 1;\n\t\t\temit = true;\n\t\t}\n\t\tthis.__mapValuesData__[index] = value;\n\t\tif (emit) this.emit('_add', index, key);\n\t\treturn this;\n\t}),\n\tsize: d.gs(function () { return this.__mapKeysData__.length; }),\n\tvalues: d(function () { return new Iterator(this, 'value'); }),\n\ttoString: d(function () { return '[object Map]'; })\n}));\nObject.defineProperty(MapPoly.prototype, Symbol.iterator, d(function () {\n\treturn this.entries();\n}));\nObject.defineProperty(MapPoly.prototype, Symbol.toStringTag, d('c', 'Map'));\n\n\n//# sourceURL=webpack:///./node_modules/es6-map/polyfill.js?"); + +/***/ }), + +/***/ "./node_modules/es6-symbol/index.js": +/*!******************************************!*\ + !*** ./node_modules/es6-symbol/index.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es6-symbol/is-implemented.js\")()\n\t? __webpack_require__(/*! ext/global-this */ \"./node_modules/ext/global-this/index.js\").Symbol\n\t: __webpack_require__(/*! ./polyfill */ \"./node_modules/es6-symbol/polyfill.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es6-symbol/index.js?"); + +/***/ }), + +/***/ "./node_modules/es6-symbol/is-implemented.js": +/*!***************************************************!*\ + !*** ./node_modules/es6-symbol/is-implemented.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar global = __webpack_require__(/*! ext/global-this */ \"./node_modules/ext/global-this/index.js\")\n , validTypes = { object: true, symbol: true };\n\nmodule.exports = function () {\n\tvar Symbol = global.Symbol;\n\tvar symbol;\n\tif (typeof Symbol !== \"function\") return false;\n\tsymbol = Symbol(\"test symbol\");\n\ttry { String(symbol); }\n\tcatch (e) { return false; }\n\n\t// Return 'true' also for polyfills\n\tif (!validTypes[typeof Symbol.iterator]) return false;\n\tif (!validTypes[typeof Symbol.toPrimitive]) return false;\n\tif (!validTypes[typeof Symbol.toStringTag]) return false;\n\n\treturn true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-symbol/is-implemented.js?"); + +/***/ }), + +/***/ "./node_modules/es6-symbol/is-symbol.js": +/*!**********************************************!*\ + !*** ./node_modules/es6-symbol/is-symbol.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = function (value) {\n\tif (!value) return false;\n\tif (typeof value === \"symbol\") return true;\n\tif (!value.constructor) return false;\n\tif (value.constructor.name !== \"Symbol\") return false;\n\treturn value[value.constructor.toStringTag] === \"Symbol\";\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-symbol/is-symbol.js?"); + +/***/ }), + +/***/ "./node_modules/es6-symbol/lib/private/generate-name.js": +/*!**************************************************************!*\ + !*** ./node_modules/es6-symbol/lib/private/generate-name.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\");\n\nvar create = Object.create, defineProperty = Object.defineProperty, objPrototype = Object.prototype;\n\nvar created = create(null);\nmodule.exports = function (desc) {\n\tvar postfix = 0, name, ie11BugWorkaround;\n\twhile (created[desc + (postfix || \"\")]) ++postfix;\n\tdesc += postfix || \"\";\n\tcreated[desc] = true;\n\tname = \"@@\" + desc;\n\tdefineProperty(\n\t\tobjPrototype,\n\t\tname,\n\t\td.gs(null, function (value) {\n\t\t\t// For IE11 issue see:\n\t\t\t// https://connect.microsoft.com/IE/feedbackdetail/view/1928508/\n\t\t\t// ie11-broken-getters-on-dom-objects\n\t\t\t// https://github.com/medikoo/es6-symbol/issues/12\n\t\t\tif (ie11BugWorkaround) return;\n\t\t\tie11BugWorkaround = true;\n\t\t\tdefineProperty(this, name, d(value));\n\t\t\tie11BugWorkaround = false;\n\t\t})\n\t);\n\treturn name;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-symbol/lib/private/generate-name.js?"); + +/***/ }), + +/***/ "./node_modules/es6-symbol/lib/private/setup/standard-symbols.js": +/*!***********************************************************************!*\ + !*** ./node_modules/es6-symbol/lib/private/setup/standard-symbols.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , NativeSymbol = __webpack_require__(/*! ext/global-this */ \"./node_modules/ext/global-this/index.js\").Symbol;\n\nmodule.exports = function (SymbolPolyfill) {\n\treturn Object.defineProperties(SymbolPolyfill, {\n\t\t// To ensure proper interoperability with other native functions (e.g. Array.from)\n\t\t// fallback to eventual native implementation of given symbol\n\t\thasInstance: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill(\"hasInstance\")\n\t\t),\n\t\tisConcatSpreadable: d(\n\t\t\t\"\",\n\t\t\t(NativeSymbol && NativeSymbol.isConcatSpreadable) ||\n\t\t\t\tSymbolPolyfill(\"isConcatSpreadable\")\n\t\t),\n\t\titerator: d(\"\", (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill(\"iterator\")),\n\t\tmatch: d(\"\", (NativeSymbol && NativeSymbol.match) || SymbolPolyfill(\"match\")),\n\t\treplace: d(\"\", (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill(\"replace\")),\n\t\tsearch: d(\"\", (NativeSymbol && NativeSymbol.search) || SymbolPolyfill(\"search\")),\n\t\tspecies: d(\"\", (NativeSymbol && NativeSymbol.species) || SymbolPolyfill(\"species\")),\n\t\tsplit: d(\"\", (NativeSymbol && NativeSymbol.split) || SymbolPolyfill(\"split\")),\n\t\ttoPrimitive: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill(\"toPrimitive\")\n\t\t),\n\t\ttoStringTag: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill(\"toStringTag\")\n\t\t),\n\t\tunscopables: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill(\"unscopables\")\n\t\t)\n\t});\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-symbol/lib/private/setup/standard-symbols.js?"); + +/***/ }), + +/***/ "./node_modules/es6-symbol/lib/private/setup/symbol-registry.js": +/*!**********************************************************************!*\ + !*** ./node_modules/es6-symbol/lib/private/setup/symbol-registry.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , validateSymbol = __webpack_require__(/*! ../../../validate-symbol */ \"./node_modules/es6-symbol/validate-symbol.js\");\n\nvar registry = Object.create(null);\n\nmodule.exports = function (SymbolPolyfill) {\n\treturn Object.defineProperties(SymbolPolyfill, {\n\t\tfor: d(function (key) {\n\t\t\tif (registry[key]) return registry[key];\n\t\t\treturn (registry[key] = SymbolPolyfill(String(key)));\n\t\t}),\n\t\tkeyFor: d(function (symbol) {\n\t\t\tvar key;\n\t\t\tvalidateSymbol(symbol);\n\t\t\tfor (key in registry) {\n\t\t\t\tif (registry[key] === symbol) return key;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t})\n\t});\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-symbol/lib/private/setup/symbol-registry.js?"); + +/***/ }), + +/***/ "./node_modules/es6-symbol/polyfill.js": +/*!*********************************************!*\ + !*** ./node_modules/es6-symbol/polyfill.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("// ES2015 Symbol polyfill for environments that do not (or partially) support it\n\n\n\nvar d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , validateSymbol = __webpack_require__(/*! ./validate-symbol */ \"./node_modules/es6-symbol/validate-symbol.js\")\n , NativeSymbol = __webpack_require__(/*! ext/global-this */ \"./node_modules/ext/global-this/index.js\").Symbol\n , generateName = __webpack_require__(/*! ./lib/private/generate-name */ \"./node_modules/es6-symbol/lib/private/generate-name.js\")\n , setupStandardSymbols = __webpack_require__(/*! ./lib/private/setup/standard-symbols */ \"./node_modules/es6-symbol/lib/private/setup/standard-symbols.js\")\n , setupSymbolRegistry = __webpack_require__(/*! ./lib/private/setup/symbol-registry */ \"./node_modules/es6-symbol/lib/private/setup/symbol-registry.js\");\n\nvar create = Object.create\n , defineProperties = Object.defineProperties\n , defineProperty = Object.defineProperty;\n\nvar SymbolPolyfill, HiddenSymbol, isNativeSafe;\n\nif (typeof NativeSymbol === \"function\") {\n\ttry {\n\t\tString(NativeSymbol());\n\t\tisNativeSafe = true;\n\t} catch (ignore) {}\n} else {\n\tNativeSymbol = null;\n}\n\n// Internal constructor (not one exposed) for creating Symbol instances.\n// This one is used to ensure that `someSymbol instanceof Symbol` always return false\nHiddenSymbol = function Symbol(description) {\n\tif (this instanceof HiddenSymbol) throw new TypeError(\"Symbol is not a constructor\");\n\treturn SymbolPolyfill(description);\n};\n\n// Exposed `Symbol` constructor\n// (returns instances of HiddenSymbol)\nmodule.exports = SymbolPolyfill = function Symbol(description) {\n\tvar symbol;\n\tif (this instanceof Symbol) throw new TypeError(\"Symbol is not a constructor\");\n\tif (isNativeSafe) return NativeSymbol(description);\n\tsymbol = create(HiddenSymbol.prototype);\n\tdescription = description === undefined ? \"\" : String(description);\n\treturn defineProperties(symbol, {\n\t\t__description__: d(\"\", description),\n\t\t__name__: d(\"\", generateName(description))\n\t});\n};\n\nsetupStandardSymbols(SymbolPolyfill);\nsetupSymbolRegistry(SymbolPolyfill);\n\n// Internal tweaks for real symbol producer\ndefineProperties(HiddenSymbol.prototype, {\n\tconstructor: d(SymbolPolyfill),\n\ttoString: d(\"\", function () { return this.__name__; })\n});\n\n// Proper implementation of methods exposed on Symbol.prototype\n// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype\ndefineProperties(SymbolPolyfill.prototype, {\n\ttoString: d(function () { return \"Symbol (\" + validateSymbol(this).__description__ + \")\"; }),\n\tvalueOf: d(function () { return validateSymbol(this); })\n});\ndefineProperty(\n\tSymbolPolyfill.prototype,\n\tSymbolPolyfill.toPrimitive,\n\td(\"\", function () {\n\t\tvar symbol = validateSymbol(this);\n\t\tif (typeof symbol === \"symbol\") return symbol;\n\t\treturn symbol.toString();\n\t})\n);\ndefineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d(\"c\", \"Symbol\"));\n\n// Proper implementaton of toPrimitive and toStringTag for returned symbol instances\ndefineProperty(\n\tHiddenSymbol.prototype, SymbolPolyfill.toStringTag,\n\td(\"c\", SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])\n);\n\n// Note: It's important to define `toPrimitive` as last one, as some implementations\n// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols)\n// And that may invoke error in definition flow:\n// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149\ndefineProperty(\n\tHiddenSymbol.prototype, SymbolPolyfill.toPrimitive,\n\td(\"c\", SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])\n);\n\n\n//# sourceURL=webpack:///./node_modules/es6-symbol/polyfill.js?"); + +/***/ }), + +/***/ "./node_modules/es6-symbol/validate-symbol.js": +/*!****************************************************!*\ + !*** ./node_modules/es6-symbol/validate-symbol.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar isSymbol = __webpack_require__(/*! ./is-symbol */ \"./node_modules/es6-symbol/is-symbol.js\");\n\nmodule.exports = function (value) {\n\tif (!isSymbol(value)) throw new TypeError(value + \" is not a symbol\");\n\treturn value;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-symbol/validate-symbol.js?"); + +/***/ }), + +/***/ "./node_modules/event-emitter/index.js": +/*!*********************************************!*\ + !*** ./node_modules/event-emitter/index.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , callable = __webpack_require__(/*! es5-ext/object/valid-callable */ \"./node_modules/es5-ext/object/valid-callable.js\")\n\n , apply = Function.prototype.apply, call = Function.prototype.call\n , create = Object.create, defineProperty = Object.defineProperty\n , defineProperties = Object.defineProperties\n , hasOwnProperty = Object.prototype.hasOwnProperty\n , descriptor = { configurable: true, enumerable: false, writable: true }\n\n , on, once, off, emit, methods, descriptors, base;\n\non = function (type, listener) {\n\tvar data;\n\n\tcallable(listener);\n\n\tif (!hasOwnProperty.call(this, '__ee__')) {\n\t\tdata = descriptor.value = create(null);\n\t\tdefineProperty(this, '__ee__', descriptor);\n\t\tdescriptor.value = null;\n\t} else {\n\t\tdata = this.__ee__;\n\t}\n\tif (!data[type]) data[type] = listener;\n\telse if (typeof data[type] === 'object') data[type].push(listener);\n\telse data[type] = [data[type], listener];\n\n\treturn this;\n};\n\nonce = function (type, listener) {\n\tvar once, self;\n\n\tcallable(listener);\n\tself = this;\n\ton.call(this, type, once = function () {\n\t\toff.call(self, type, once);\n\t\tapply.call(listener, this, arguments);\n\t});\n\n\tonce.__eeOnceListener__ = listener;\n\treturn this;\n};\n\noff = function (type, listener) {\n\tvar data, listeners, candidate, i;\n\n\tcallable(listener);\n\n\tif (!hasOwnProperty.call(this, '__ee__')) return this;\n\tdata = this.__ee__;\n\tif (!data[type]) return this;\n\tlisteners = data[type];\n\n\tif (typeof listeners === 'object') {\n\t\tfor (i = 0; (candidate = listeners[i]); ++i) {\n\t\t\tif ((candidate === listener) ||\n\t\t\t\t\t(candidate.__eeOnceListener__ === listener)) {\n\t\t\t\tif (listeners.length === 2) data[type] = listeners[i ? 0 : 1];\n\t\t\t\telse listeners.splice(i, 1);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif ((listeners === listener) ||\n\t\t\t\t(listeners.__eeOnceListener__ === listener)) {\n\t\t\tdelete data[type];\n\t\t}\n\t}\n\n\treturn this;\n};\n\nemit = function (type) {\n\tvar i, l, listener, listeners, args;\n\n\tif (!hasOwnProperty.call(this, '__ee__')) return;\n\tlisteners = this.__ee__[type];\n\tif (!listeners) return;\n\n\tif (typeof listeners === 'object') {\n\t\tl = arguments.length;\n\t\targs = new Array(l - 1);\n\t\tfor (i = 1; i < l; ++i) args[i - 1] = arguments[i];\n\n\t\tlisteners = listeners.slice();\n\t\tfor (i = 0; (listener = listeners[i]); ++i) {\n\t\t\tapply.call(listener, this, args);\n\t\t}\n\t} else {\n\t\tswitch (arguments.length) {\n\t\tcase 1:\n\t\t\tcall.call(listeners, this);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcall.call(listeners, this, arguments[1]);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tcall.call(listeners, this, arguments[1], arguments[2]);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tl = arguments.length;\n\t\t\targs = new Array(l - 1);\n\t\t\tfor (i = 1; i < l; ++i) {\n\t\t\t\targs[i - 1] = arguments[i];\n\t\t\t}\n\t\t\tapply.call(listeners, this, args);\n\t\t}\n\t}\n};\n\nmethods = {\n\ton: on,\n\tonce: once,\n\toff: off,\n\temit: emit\n};\n\ndescriptors = {\n\ton: d(on),\n\tonce: d(once),\n\toff: d(off),\n\temit: d(emit)\n};\n\nbase = defineProperties({}, descriptors);\n\nmodule.exports = exports = function (o) {\n\treturn (o == null) ? create(base) : defineProperties(Object(o), descriptors);\n};\nexports.methods = methods;\n\n\n//# sourceURL=webpack:///./node_modules/event-emitter/index.js?"); + +/***/ }), + +/***/ "./node_modules/ext/global-this/implementation.js": +/*!********************************************************!*\ + !*** ./node_modules/ext/global-this/implementation.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("var naiveFallback = function () {\n\tif (typeof self === \"object\" && self) return self;\n\tif (typeof window === \"object\" && window) return window;\n\tthrow new Error(\"Unable to resolve global `this`\");\n};\n\nmodule.exports = (function () {\n\tif (this) return this;\n\n\t// Unexpected strict mode (may happen if e.g. bundled into ESM module)\n\n\t// Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis\n\t// In all ES5+ engines global object inherits from Object.prototype\n\t// (if you approached one that doesn't please report)\n\ttry {\n\t\tObject.defineProperty(Object.prototype, \"__global__\", {\n\t\t\tget: function () { return this; },\n\t\t\tconfigurable: true\n\t\t});\n\t} catch (error) {\n\t\t// Unfortunate case of Object.prototype being sealed (via preventExtensions, seal or freeze)\n\t\treturn naiveFallback();\n\t}\n\ttry {\n\t\t// Safari case (window.__global__ is resolved with global context, but __global__ does not)\n\t\tif (!__global__) return naiveFallback();\n\t\treturn __global__;\n\t} finally {\n\t\tdelete Object.prototype.__global__;\n\t}\n})();\n\n\n//# sourceURL=webpack:///./node_modules/ext/global-this/implementation.js?"); + +/***/ }), + +/***/ "./node_modules/ext/global-this/index.js": +/*!***********************************************!*\ + !*** ./node_modules/ext/global-this/index.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/ext/global-this/is-implemented.js\")() ? globalThis : __webpack_require__(/*! ./implementation */ \"./node_modules/ext/global-this/implementation.js\");\n\n\n//# sourceURL=webpack:///./node_modules/ext/global-this/index.js?"); + +/***/ }), + +/***/ "./node_modules/ext/global-this/is-implemented.js": +/*!********************************************************!*\ + !*** ./node_modules/ext/global-this/is-implemented.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = function () {\n\tif (typeof globalThis !== \"object\") return false;\n\tif (!globalThis) return false;\n\treturn globalThis.Array === Array;\n};\n\n\n//# sourceURL=webpack:///./node_modules/ext/global-this/is-implemented.js?"); + +/***/ }), + +/***/ "./node_modules/ieee754/index.js": +/*!***************************************!*\ + !*** ./node_modules/ieee754/index.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n//# sourceURL=webpack:///./node_modules/ieee754/index.js?"); + +/***/ }), + +/***/ "./node_modules/inherits/inherits_browser.js": +/*!***************************************************!*\ + !*** ./node_modules/inherits/inherits_browser.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n\n\n//# sourceURL=webpack:///./node_modules/inherits/inherits_browser.js?"); + +/***/ }), + +/***/ "./node_modules/is-buffer/index.js": +/*!*****************************************!*\ + !*** ./node_modules/is-buffer/index.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\nmodule.exports = function isBuffer (obj) {\n return obj != null && obj.constructor != null &&\n typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n\n//# sourceURL=webpack:///./node_modules/is-buffer/index.js?"); + +/***/ }), + +/***/ "./node_modules/isarray/index.js": +/*!***************************************!*\ + !*** ./node_modules/isarray/index.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n//# sourceURL=webpack:///./node_modules/isarray/index.js?"); + +/***/ }), + +/***/ "./node_modules/mqtt-packet/constants.js": +/*!***********************************************!*\ + !*** ./node_modules/mqtt-packet/constants.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer\n\n/* Protocol - protocol constants */\nvar protocol = module.exports\n\n/* Command code => mnemonic */\nprotocol.types = {\n 0: 'reserved',\n 1: 'connect',\n 2: 'connack',\n 3: 'publish',\n 4: 'puback',\n 5: 'pubrec',\n 6: 'pubrel',\n 7: 'pubcomp',\n 8: 'subscribe',\n 9: 'suback',\n 10: 'unsubscribe',\n 11: 'unsuback',\n 12: 'pingreq',\n 13: 'pingresp',\n 14: 'disconnect',\n 15: 'reserved'\n}\n\n/* Mnemonic => Command code */\nprotocol.codes = {}\nfor (var k in protocol.types) {\n var v = protocol.types[k]\n protocol.codes[v] = k\n}\n\n/* Header */\nprotocol.CMD_SHIFT = 4\nprotocol.CMD_MASK = 0xF0\nprotocol.DUP_MASK = 0x08\nprotocol.QOS_MASK = 0x03\nprotocol.QOS_SHIFT = 1\nprotocol.RETAIN_MASK = 0x01\n\n/* Length */\nprotocol.LENGTH_MASK = 0x7F\nprotocol.LENGTH_FIN_MASK = 0x80\n\n/* Connack */\nprotocol.SESSIONPRESENT_MASK = 0x01\nprotocol.SESSIONPRESENT_HEADER = Buffer.from([protocol.SESSIONPRESENT_MASK])\nprotocol.CONNACK_HEADER = Buffer.from([protocol.codes['connack'] << protocol.CMD_SHIFT])\n\n/* Connect */\nprotocol.USERNAME_MASK = 0x80\nprotocol.PASSWORD_MASK = 0x40\nprotocol.WILL_RETAIN_MASK = 0x20\nprotocol.WILL_QOS_MASK = 0x18\nprotocol.WILL_QOS_SHIFT = 3\nprotocol.WILL_FLAG_MASK = 0x04\nprotocol.CLEAN_SESSION_MASK = 0x02\nprotocol.CONNECT_HEADER = Buffer.from([protocol.codes['connect'] << protocol.CMD_SHIFT])\n\nfunction genHeader (type) {\n return [0, 1, 2].map(function (qos) {\n return [0, 1].map(function (dup) {\n return [0, 1].map(function (retain) {\n var buf = new Buffer(1)\n buf.writeUInt8(\n protocol.codes[type] << protocol.CMD_SHIFT |\n (dup ? protocol.DUP_MASK : 0) |\n qos << protocol.QOS_SHIFT | retain, 0, true)\n return buf\n })\n })\n })\n}\n\n/* Publish */\nprotocol.PUBLISH_HEADER = genHeader('publish')\n\n/* Subscribe */\nprotocol.SUBSCRIBE_HEADER = genHeader('subscribe')\n\n/* Unsubscribe */\nprotocol.UNSUBSCRIBE_HEADER = genHeader('unsubscribe')\n\n/* Confirmations */\nprotocol.ACKS = {\n unsuback: genHeader('unsuback'),\n puback: genHeader('puback'),\n pubcomp: genHeader('pubcomp'),\n pubrel: genHeader('pubrel'),\n pubrec: genHeader('pubrec')\n}\n\nprotocol.SUBACK_HEADER = Buffer.from([protocol.codes['suback'] << protocol.CMD_SHIFT])\n\n/* Protocol versions */\nprotocol.VERSION3 = Buffer.from([3])\nprotocol.VERSION4 = Buffer.from([4])\n\n/* QoS */\nprotocol.QOS = [0, 1, 2].map(function (qos) {\n return Buffer.from([qos])\n})\n\n/* Empty packets */\nprotocol.EMPTY = {\n pingreq: Buffer.from([protocol.codes['pingreq'] << 4, 0]),\n pingresp: Buffer.from([protocol.codes['pingresp'] << 4, 0]),\n disconnect: Buffer.from([protocol.codes['disconnect'] << 4, 0])\n}\n\n\n//# sourceURL=webpack:///./node_modules/mqtt-packet/constants.js?"); + +/***/ }), + +/***/ "./node_modules/mqtt-packet/generate.js": +/*!**********************************************!*\ + !*** ./node_modules/mqtt-packet/generate.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer\nvar writeToStream = __webpack_require__(/*! ./writeToStream */ \"./node_modules/mqtt-packet/writeToStream.js\")\nvar EE = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\").EventEmitter\nvar inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\")\n\nfunction generate (packet) {\n var stream = new Accumulator()\n writeToStream(packet, stream)\n return stream.concat()\n}\n\nfunction Accumulator () {\n this._array = new Array(20)\n this._i = 0\n}\n\ninherits(Accumulator, EE)\n\nAccumulator.prototype.write = function (chunk) {\n this._array[this._i++] = chunk\n return true\n}\n\nAccumulator.prototype.concat = function () {\n var length = 0\n var lengths = new Array(this._array.length)\n var list = this._array\n var pos = 0\n var i\n var result\n\n for (i = 0; i < list.length && list[i] !== undefined; i++) {\n if (typeof list[i] !== 'string') lengths[i] = list[i].length\n else lengths[i] = Buffer.byteLength(list[i])\n\n length += lengths[i]\n }\n\n result = Buffer.allocUnsafe(length)\n\n for (i = 0; i < list.length && list[i] !== undefined; i++) {\n if (typeof list[i] !== 'string') {\n list[i].copy(result, pos)\n pos += lengths[i]\n } else {\n result.write(list[i], pos)\n pos += lengths[i]\n }\n }\n\n return result\n}\n\nmodule.exports = generate\n\n\n//# sourceURL=webpack:///./node_modules/mqtt-packet/generate.js?"); + +/***/ }), + +/***/ "./node_modules/mqtt-packet/mqtt.js": +/*!******************************************!*\ + !*** ./node_modules/mqtt-packet/mqtt.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nexports.parser = __webpack_require__(/*! ./parser */ \"./node_modules/mqtt-packet/parser.js\")\nexports.generate = __webpack_require__(/*! ./generate */ \"./node_modules/mqtt-packet/generate.js\")\nexports.writeToStream = __webpack_require__(/*! ./writeToStream */ \"./node_modules/mqtt-packet/writeToStream.js\")\n\n\n//# sourceURL=webpack:///./node_modules/mqtt-packet/mqtt.js?"); + +/***/ }), + +/***/ "./node_modules/mqtt-packet/numbers.js": +/*!*********************************************!*\ + !*** ./node_modules/mqtt-packet/numbers.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer\nvar max = 65536\nvar cache = {}\n\nfunction generateBuffer (i) {\n var buffer = Buffer.allocUnsafe(2)\n buffer.writeUInt8(i >> 8, 0)\n buffer.writeUInt8(i & 0x00FF, 0 + 1)\n\n return buffer\n}\n\nfunction generateCache () {\n for (var i = 0; i < max; i++) {\n cache[i] = generateBuffer(i)\n }\n}\n\nmodule.exports = {\n cache: cache,\n generateCache: generateCache,\n generateNumber: generateBuffer\n}\n\n\n//# sourceURL=webpack:///./node_modules/mqtt-packet/numbers.js?"); + +/***/ }), + +/***/ "./node_modules/mqtt-packet/packet.js": +/*!********************************************!*\ + !*** ./node_modules/mqtt-packet/packet.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("\nfunction Packet () {\n this.cmd = null\n this.retain = false\n this.qos = 0\n this.dup = false\n this.length = -1\n this.topic = null\n this.payload = null\n}\n\nmodule.exports = Packet\n\n\n//# sourceURL=webpack:///./node_modules/mqtt-packet/packet.js?"); + +/***/ }), + +/***/ "./node_modules/mqtt-packet/parser.js": +/*!********************************************!*\ + !*** ./node_modules/mqtt-packet/parser.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar bl = __webpack_require__(/*! bl */ \"./node_modules/bl/bl.js\")\nvar inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\")\nvar EE = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\").EventEmitter\nvar Packet = __webpack_require__(/*! ./packet */ \"./node_modules/mqtt-packet/packet.js\")\nvar constants = __webpack_require__(/*! ./constants */ \"./node_modules/mqtt-packet/constants.js\")\n\nfunction Parser () {\n if (!(this instanceof Parser)) return new Parser()\n\n this._states = [\n '_parseHeader',\n '_parseLength',\n '_parsePayload',\n '_newPacket'\n ]\n\n this._resetState()\n}\n\ninherits(Parser, EE)\n\nParser.prototype._resetState = function () {\n this.packet = new Packet()\n this.error = null\n this._list = bl()\n this._stateCounter = 0\n}\n\nParser.prototype.parse = function (buf) {\n if (this.error) this._resetState()\n\n this._list.append(buf)\n\n while ((this.packet.length !== -1 || this._list.length > 0) &&\n this[this._states[this._stateCounter]]() &&\n !this.error) {\n this._stateCounter++\n\n if (this._stateCounter >= this._states.length) this._stateCounter = 0\n }\n\n return this._list.length\n}\n\nParser.prototype._parseHeader = function () {\n // There is at least one byte in the buffer\n var zero = this._list.readUInt8(0)\n this.packet.cmd = constants.types[zero >> constants.CMD_SHIFT]\n this.packet.retain = (zero & constants.RETAIN_MASK) !== 0\n this.packet.qos = (zero >> constants.QOS_SHIFT) & constants.QOS_MASK\n this.packet.dup = (zero & constants.DUP_MASK) !== 0\n\n this._list.consume(1)\n\n return true\n}\n\nParser.prototype._parseLength = function () {\n // There is at least one byte in the list\n var bytes = 0\n var mul = 1\n var length = 0\n var result = true\n var current\n\n while (bytes < 5) {\n current = this._list.readUInt8(bytes++)\n length += mul * (current & constants.LENGTH_MASK)\n mul *= 0x80\n\n if ((current & constants.LENGTH_FIN_MASK) === 0) break\n if (this._list.length <= bytes) {\n result = false\n break\n }\n }\n\n if (result) {\n this.packet.length = length\n this._list.consume(bytes)\n }\n\n return result\n}\n\nParser.prototype._parsePayload = function () {\n var result = false\n\n // Do we have a payload? Do we have enough data to complete the payload?\n // PINGs have no payload\n if (this.packet.length === 0 || this._list.length >= this.packet.length) {\n this._pos = 0\n\n switch (this.packet.cmd) {\n case 'connect':\n this._parseConnect()\n break\n case 'connack':\n this._parseConnack()\n break\n case 'publish':\n this._parsePublish()\n break\n case 'puback':\n case 'pubrec':\n case 'pubrel':\n case 'pubcomp':\n this._parseMessageId()\n break\n case 'subscribe':\n this._parseSubscribe()\n break\n case 'suback':\n this._parseSuback()\n break\n case 'unsubscribe':\n this._parseUnsubscribe()\n break\n case 'unsuback':\n this._parseUnsuback()\n break\n case 'pingreq':\n case 'pingresp':\n case 'disconnect':\n // These are empty, nothing to do\n break\n default:\n this._emitError(new Error('Not supported'))\n }\n\n result = true\n }\n\n return result\n}\n\nParser.prototype._parseConnect = function () {\n var protocolId // Protocol ID\n var clientId // Client ID\n var topic // Will topic\n var payload // Will payload\n var password // Password\n var username // Username\n var flags = {}\n var packet = this.packet\n\n // Parse protocolId\n protocolId = this._parseString()\n\n if (protocolId === null) return this._emitError(new Error('Cannot parse protocolId'))\n if (protocolId !== 'MQTT' && protocolId !== 'MQIsdp') {\n return this._emitError(new Error('Invalid protocolId'))\n }\n\n packet.protocolId = protocolId\n\n // Parse constants version number\n if (this._pos >= this._list.length) return this._emitError(new Error('Packet too short'))\n\n packet.protocolVersion = this._list.readUInt8(this._pos)\n\n if (packet.protocolVersion !== 3 && packet.protocolVersion !== 4) {\n return this._emitError(new Error('Invalid protocol version'))\n }\n\n this._pos++\n\n if (this._pos >= this._list.length) {\n return this._emitError(new Error('Packet too short'))\n }\n\n // Parse connect flags\n flags.username = (this._list.readUInt8(this._pos) & constants.USERNAME_MASK)\n flags.password = (this._list.readUInt8(this._pos) & constants.PASSWORD_MASK)\n flags.will = (this._list.readUInt8(this._pos) & constants.WILL_FLAG_MASK)\n\n if (flags.will) {\n packet.will = {}\n packet.will.retain = (this._list.readUInt8(this._pos) & constants.WILL_RETAIN_MASK) !== 0\n packet.will.qos = (this._list.readUInt8(this._pos) &\n constants.WILL_QOS_MASK) >> constants.WILL_QOS_SHIFT\n }\n\n packet.clean = (this._list.readUInt8(this._pos) & constants.CLEAN_SESSION_MASK) !== 0\n this._pos++\n\n // Parse keepalive\n packet.keepalive = this._parseNum()\n if (packet.keepalive === -1) return this._emitError(new Error('Packet too short'))\n\n // Parse clientId\n clientId = this._parseString()\n if (clientId === null) return this._emitError(new Error('Packet too short'))\n packet.clientId = clientId\n\n if (flags.will) {\n // Parse will topic\n topic = this._parseString()\n if (topic === null) return this._emitError(new Error('Cannot parse will topic'))\n packet.will.topic = topic\n\n // Parse will payload\n payload = this._parseBuffer()\n if (payload === null) return this._emitError(new Error('Cannot parse will payload'))\n packet.will.payload = payload\n }\n\n // Parse username\n if (flags.username) {\n username = this._parseString()\n if (username === null) return this._emitError(new Error('Cannot parse username'))\n packet.username = username\n }\n\n // Parse password\n if (flags.password) {\n password = this._parseBuffer()\n if (password === null) return this._emitError(new Error('Cannot parse password'))\n packet.password = password\n }\n\n return packet\n}\n\nParser.prototype._parseConnack = function () {\n var packet = this.packet\n\n if (this._list.length < 2) return null\n\n packet.sessionPresent = !!(this._list.readUInt8(this._pos++) & constants.SESSIONPRESENT_MASK)\n packet.returnCode = this._list.readUInt8(this._pos)\n\n if (packet.returnCode === -1) return this._emitError(new Error('Cannot parse return code'))\n}\n\nParser.prototype._parsePublish = function () {\n var packet = this.packet\n packet.topic = this._parseString()\n\n if (packet.topic === null) return this._emitError(new Error('Cannot parse topic'))\n\n // Parse messageId\n if (packet.qos > 0) if (!this._parseMessageId()) { return }\n\n packet.payload = this._list.slice(this._pos, packet.length)\n}\n\nParser.prototype._parseSubscribe = function () {\n var packet = this.packet\n var topic\n var qos\n\n if (packet.qos !== 1) {\n return this._emitError(new Error('Wrong subscribe header'))\n }\n\n packet.subscriptions = []\n\n if (!this._parseMessageId()) { return }\n\n while (this._pos < packet.length) {\n // Parse topic\n topic = this._parseString()\n if (topic === null) return this._emitError(new Error('Cannot parse topic'))\n\n if (this._pos >= packet.length) return this._emitError(new Error('Malformed Subscribe Payload'))\n qos = this._list.readUInt8(this._pos++)\n\n // Push pair to subscriptions\n packet.subscriptions.push({ topic: topic, qos: qos })\n }\n}\n\nParser.prototype._parseSuback = function () {\n this.packet.granted = []\n\n if (!this._parseMessageId()) { return }\n\n // Parse granted QoSes\n while (this._pos < this.packet.length) {\n this.packet.granted.push(this._list.readUInt8(this._pos++))\n }\n}\n\nParser.prototype._parseUnsubscribe = function () {\n var packet = this.packet\n\n packet.unsubscriptions = []\n\n // Parse messageId\n if (!this._parseMessageId()) { return }\n\n while (this._pos < packet.length) {\n var topic\n\n // Parse topic\n topic = this._parseString()\n if (topic === null) return this._emitError(new Error('Cannot parse topic'))\n\n // Push topic to unsubscriptions\n packet.unsubscriptions.push(topic)\n }\n}\n\nParser.prototype._parseUnsuback = function () {\n if (!this._parseMessageId()) return this._emitError(new Error('Cannot parse messageId'))\n}\n\nParser.prototype._parseMessageId = function () {\n var packet = this.packet\n\n packet.messageId = this._parseNum()\n\n if (packet.messageId === null) {\n this._emitError(new Error('Cannot parse messageId'))\n return false\n }\n\n return true\n}\n\nParser.prototype._parseString = function (maybeBuffer) {\n var length = this._parseNum()\n var result\n var end = length + this._pos\n\n if (length === -1 || end > this._list.length || end > this.packet.length) return null\n\n result = this._list.toString('utf8', this._pos, end)\n this._pos += length\n\n return result\n}\n\nParser.prototype._parseBuffer = function () {\n var length = this._parseNum()\n var result\n var end = length + this._pos\n\n if (length === -1 || end > this._list.length || end > this.packet.length) return null\n\n result = this._list.slice(this._pos, end)\n\n this._pos += length\n\n return result\n}\n\nParser.prototype._parseNum = function () {\n if (this._list.length - this._pos < 2) return -1\n\n var result = this._list.readUInt16BE(this._pos)\n this._pos += 2\n\n return result\n}\n\nParser.prototype._newPacket = function () {\n if (this.packet) {\n this._list.consume(this.packet.length)\n this.emit('packet', this.packet)\n }\n\n this.packet = new Packet()\n\n return true\n}\n\nParser.prototype._emitError = function (err) {\n this.error = err\n this.emit('error', err)\n}\n\nmodule.exports = Parser\n\n\n//# sourceURL=webpack:///./node_modules/mqtt-packet/parser.js?"); + +/***/ }), + +/***/ "./node_modules/mqtt-packet/writeToStream.js": +/*!***************************************************!*\ + !*** ./node_modules/mqtt-packet/writeToStream.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar protocol = __webpack_require__(/*! ./constants */ \"./node_modules/mqtt-packet/constants.js\")\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer\nvar empty = Buffer.allocUnsafe(0)\nvar zeroBuf = Buffer.from([0])\nvar numbers = __webpack_require__(/*! ./numbers */ \"./node_modules/mqtt-packet/numbers.js\")\nvar nextTick = __webpack_require__(/*! process-nextick-args */ \"./node_modules/process-nextick-args/index.js\").nextTick\n\nvar numCache = numbers.cache\nvar generateNumber = numbers.generateNumber\nvar generateCache = numbers.generateCache\nvar writeNumber = writeNumberCached\nvar toGenerate = true\n\nfunction generate (packet, stream) {\n if (stream.cork) {\n stream.cork()\n nextTick(uncork, stream)\n }\n\n if (toGenerate) {\n toGenerate = false\n generateCache()\n }\n\n switch (packet.cmd) {\n case 'connect':\n return connect(packet, stream)\n case 'connack':\n return connack(packet, stream)\n case 'publish':\n return publish(packet, stream)\n case 'puback':\n case 'pubrec':\n case 'pubrel':\n case 'pubcomp':\n case 'unsuback':\n return confirmation(packet, stream)\n case 'subscribe':\n return subscribe(packet, stream)\n case 'suback':\n return suback(packet, stream)\n case 'unsubscribe':\n return unsubscribe(packet, stream)\n case 'pingreq':\n case 'pingresp':\n case 'disconnect':\n return emptyPacket(packet, stream)\n default:\n stream.emit('error', new Error('Unknown command'))\n return false\n }\n}\n/**\n * Controls numbers cache.\n * Set to \"false\" to allocate buffers on-the-flight instead of pre-generated cache\n */\nObject.defineProperty(generate, 'cacheNumbers', {\n get: function () {\n return writeNumber === writeNumberCached\n },\n set: function (value) {\n if (value) {\n if (!numCache || Object.keys(numCache).length === 0) toGenerate = true\n writeNumber = writeNumberCached\n } else {\n toGenerate = false\n writeNumber = writeNumberGenerated\n }\n }\n})\n\nfunction uncork (stream) {\n stream.uncork()\n}\n\nfunction connect (opts, stream) {\n var settings = opts || {}\n var protocolId = settings.protocolId || 'MQTT'\n var protocolVersion = settings.protocolVersion || 4\n var will = settings.will\n var clean = settings.clean\n var keepalive = settings.keepalive || 0\n var clientId = settings.clientId || ''\n var username = settings.username\n var password = settings.password\n\n if (clean === undefined) clean = true\n\n var length = 0\n\n // Must be a string and non-falsy\n if (!protocolId ||\n (typeof protocolId !== 'string' && !Buffer.isBuffer(protocolId))) {\n stream.emit('error', new Error('Invalid protocolId'))\n return false\n } else length += protocolId.length + 2\n\n // Must be 3 or 4\n if (protocolVersion !== 3 && protocolVersion !== 4) {\n stream.emit('error', new Error('Invalid protocol version'))\n return false\n } else length += 1\n\n // ClientId might be omitted in 3.1.1, but only if cleanSession is set to 1\n if ((typeof clientId === 'string' || Buffer.isBuffer(clientId)) &&\n (clientId || protocolVersion === 4) && (clientId || clean)) {\n length += clientId.length + 2\n } else {\n if (protocolVersion < 4) {\n stream.emit('error', new Error('clientId must be supplied before 3.1.1'))\n return false\n }\n if ((clean * 1) === 0) {\n stream.emit('error', new Error('clientId must be given if cleanSession set to 0'))\n return false\n }\n }\n\n // Must be a two byte number\n if (typeof keepalive !== 'number' ||\n keepalive < 0 ||\n keepalive > 65535 ||\n keepalive % 1 !== 0) {\n stream.emit('error', new Error('Invalid keepalive'))\n return false\n } else length += 2\n\n // Connect flags\n length += 1\n\n // If will exists...\n if (will) {\n // It must be an object\n if (typeof will !== 'object') {\n stream.emit('error', new Error('Invalid will'))\n return false\n }\n // It must have topic typeof string\n if (!will.topic || typeof will.topic !== 'string') {\n stream.emit('error', new Error('Invalid will topic'))\n return false\n } else {\n length += Buffer.byteLength(will.topic) + 2\n }\n\n // Payload\n if (will.payload && will.payload) {\n if (will.payload.length >= 0) {\n if (typeof will.payload === 'string') {\n length += Buffer.byteLength(will.payload) + 2\n } else {\n length += will.payload.length + 2\n }\n } else {\n stream.emit('error', new Error('Invalid will payload'))\n return false\n }\n } else {\n length += 2\n }\n }\n\n // Username\n var providedUsername = false\n if (username != null) {\n if (isStringOrBuffer(username)) {\n providedUsername = true\n length += Buffer.byteLength(username) + 2\n } else {\n stream.emit('error', new Error('Invalid username'))\n return false\n }\n }\n\n // Password\n if (password != null) {\n if (!providedUsername) {\n stream.emit('error', new Error('Username is required to use password'))\n return false\n }\n\n if (isStringOrBuffer(password)) {\n length += byteLength(password) + 2\n } else {\n stream.emit('error', new Error('Invalid password'))\n return false\n }\n }\n\n // Generate header\n stream.write(protocol.CONNECT_HEADER)\n\n // Generate length\n writeLength(stream, length)\n\n // Generate protocol ID\n writeStringOrBuffer(stream, protocolId)\n stream.write(\n protocolVersion === 4 ? protocol.VERSION4 : protocol.VERSION3\n )\n\n // Connect flags\n var flags = 0\n flags |= (username != null) ? protocol.USERNAME_MASK : 0\n flags |= (password != null) ? protocol.PASSWORD_MASK : 0\n flags |= (will && will.retain) ? protocol.WILL_RETAIN_MASK : 0\n flags |= (will && will.qos) ? will.qos << protocol.WILL_QOS_SHIFT : 0\n flags |= will ? protocol.WILL_FLAG_MASK : 0\n flags |= clean ? protocol.CLEAN_SESSION_MASK : 0\n\n stream.write(Buffer.from([flags]))\n\n // Keepalive\n writeNumber(stream, keepalive)\n\n // Client ID\n writeStringOrBuffer(stream, clientId)\n\n // Will\n if (will) {\n writeString(stream, will.topic)\n writeStringOrBuffer(stream, will.payload)\n }\n\n // Username and password\n if (username != null) {\n writeStringOrBuffer(stream, username)\n }\n if (password != null) {\n writeStringOrBuffer(stream, password)\n }\n // This is a small packet that happens only once on a stream\n // We assume the stream is always free to receive more data after this\n return true\n}\n\nfunction connack (opts, stream) {\n var settings = opts || {}\n var rc = settings.returnCode\n\n // Check return code\n if (typeof rc !== 'number') {\n stream.emit('error', new Error('Invalid return code'))\n return false\n }\n\n stream.write(protocol.CONNACK_HEADER)\n writeLength(stream, 2)\n stream.write(opts.sessionPresent ? protocol.SESSIONPRESENT_HEADER : zeroBuf)\n\n return stream.write(Buffer.from([rc]))\n}\n\nfunction publish (opts, stream) {\n var settings = opts || {}\n var qos = settings.qos || 0\n var retain = settings.retain ? protocol.RETAIN_MASK : 0\n var topic = settings.topic\n var payload = settings.payload || empty\n var id = settings.messageId\n\n var length = 0\n\n // Topic must be a non-empty string or Buffer\n if (typeof topic === 'string') length += Buffer.byteLength(topic) + 2\n else if (Buffer.isBuffer(topic)) length += topic.length + 2\n else {\n stream.emit('error', new Error('Invalid topic'))\n return false\n }\n\n // Get the payload length\n if (!Buffer.isBuffer(payload)) length += Buffer.byteLength(payload)\n else length += payload.length\n\n // Message ID must a number if qos > 0\n if (qos && typeof id !== 'number') {\n stream.emit('error', new Error('Invalid messageId'))\n return false\n } else if (qos) length += 2\n\n // Header\n stream.write(protocol.PUBLISH_HEADER[qos][opts.dup ? 1 : 0][retain ? 1 : 0])\n\n // Remaining length\n writeLength(stream, length)\n\n // Topic\n writeNumber(stream, byteLength(topic))\n stream.write(topic)\n\n // Message ID\n if (qos > 0) writeNumber(stream, id)\n\n // Payload\n return stream.write(payload)\n}\n\n/* Puback, pubrec, pubrel and pubcomp */\nfunction confirmation (opts, stream) {\n var settings = opts || {}\n var type = settings.cmd || 'puback'\n var id = settings.messageId\n var dup = (settings.dup && type === 'pubrel') ? protocol.DUP_MASK : 0\n var qos = 0\n\n if (type === 'pubrel') qos = 1\n\n // Check message ID\n if (typeof id !== 'number') {\n stream.emit('error', new Error('Invalid messageId'))\n return false\n }\n\n // Header\n stream.write(protocol.ACKS[type][qos][dup][0])\n\n // Length\n writeLength(stream, 2)\n\n // Message ID\n return writeNumber(stream, id)\n}\n\nfunction subscribe (opts, stream) {\n var settings = opts || {}\n var dup = settings.dup ? protocol.DUP_MASK : 0\n var id = settings.messageId\n var subs = settings.subscriptions\n\n var length = 0\n\n // Check message ID\n if (typeof id !== 'number') {\n stream.emit('error', new Error('Invalid messageId'))\n return false\n } else length += 2\n\n // Check subscriptions\n if (typeof subs === 'object' && subs.length) {\n for (var i = 0; i < subs.length; i += 1) {\n var itopic = subs[i].topic\n var iqos = subs[i].qos\n\n if (typeof itopic !== 'string') {\n stream.emit('error', new Error('Invalid subscriptions - invalid topic'))\n return false\n }\n if (typeof iqos !== 'number') {\n stream.emit('error', new Error('Invalid subscriptions - invalid qos'))\n return false\n }\n\n length += Buffer.byteLength(itopic) + 2 + 1\n }\n } else {\n stream.emit('error', new Error('Invalid subscriptions'))\n return false\n }\n\n // Generate header\n stream.write(protocol.SUBSCRIBE_HEADER[1][dup ? 1 : 0][0])\n\n // Generate length\n writeLength(stream, length)\n\n // Generate message ID\n writeNumber(stream, id)\n\n var result = true\n\n // Generate subs\n for (var j = 0; j < subs.length; j++) {\n var sub = subs[j]\n var jtopic = sub.topic\n var jqos = sub.qos\n\n // Write topic string\n writeString(stream, jtopic)\n\n // Write qos\n result = stream.write(protocol.QOS[jqos])\n }\n\n return result\n}\n\nfunction suback (opts, stream) {\n var settings = opts || {}\n var id = settings.messageId\n var granted = settings.granted\n\n var length = 0\n\n // Check message ID\n if (typeof id !== 'number') {\n stream.emit('error', new Error('Invalid messageId'))\n return false\n } else length += 2\n\n // Check granted qos vector\n if (typeof granted === 'object' && granted.length) {\n for (var i = 0; i < granted.length; i += 1) {\n if (typeof granted[i] !== 'number') {\n stream.emit('error', new Error('Invalid qos vector'))\n return false\n }\n length += 1\n }\n } else {\n stream.emit('error', new Error('Invalid qos vector'))\n return false\n }\n\n // header\n stream.write(protocol.SUBACK_HEADER)\n\n // Length\n writeLength(stream, length)\n\n // Message ID\n writeNumber(stream, id)\n\n return stream.write(Buffer.from(granted))\n}\n\nfunction unsubscribe (opts, stream) {\n var settings = opts || {}\n var id = settings.messageId\n var dup = settings.dup ? protocol.DUP_MASK : 0\n var unsubs = settings.unsubscriptions\n\n var length = 0\n\n // Check message ID\n if (typeof id !== 'number') {\n stream.emit('error', new Error('Invalid messageId'))\n return false\n } else {\n length += 2\n }\n // Check unsubs\n if (typeof unsubs === 'object' && unsubs.length) {\n for (var i = 0; i < unsubs.length; i += 1) {\n if (typeof unsubs[i] !== 'string') {\n stream.emit('error', new Error('Invalid unsubscriptions'))\n return false\n }\n length += Buffer.byteLength(unsubs[i]) + 2\n }\n } else {\n stream.emit('error', new Error('Invalid unsubscriptions'))\n return false\n }\n\n // Header\n stream.write(protocol.UNSUBSCRIBE_HEADER[1][dup ? 1 : 0][0])\n\n // Length\n writeLength(stream, length)\n\n // Message ID\n writeNumber(stream, id)\n\n // Unsubs\n var result = true\n for (var j = 0; j < unsubs.length; j++) {\n result = writeString(stream, unsubs[j])\n }\n\n return result\n}\n\nfunction emptyPacket (opts, stream) {\n return stream.write(protocol.EMPTY[opts.cmd])\n}\n\n/**\n * calcLengthLength - calculate the length of the remaining\n * length field\n *\n * @api private\n */\nfunction calcLengthLength (length) {\n if (length >= 0 && length < 128) return 1\n else if (length >= 128 && length < 16384) return 2\n else if (length >= 16384 && length < 2097152) return 3\n else if (length >= 2097152 && length < 268435456) return 4\n else return 0\n}\n\nfunction genBufLength (length) {\n var digit = 0\n var pos = 0\n var buffer = Buffer.allocUnsafe(calcLengthLength(length))\n\n do {\n digit = length % 128 | 0\n length = length / 128 | 0\n if (length > 0) digit = digit | 0x80\n\n buffer.writeUInt8(digit, pos++)\n } while (length > 0)\n\n return buffer\n}\n\n/**\n * writeLength - write an MQTT style length field to the buffer\n *\n * @param buffer - destination\n * @param pos - offset\n * @param length - length (>0)\n * @returns number of bytes written\n *\n * @api private\n */\n\nvar lengthCache = {}\nfunction writeLength (stream, length) {\n var buffer = lengthCache[length]\n\n if (!buffer) {\n buffer = genBufLength(length)\n if (length < 16384) lengthCache[length] = buffer\n }\n\n stream.write(buffer)\n}\n\n/**\n * writeString - write a utf8 string to the buffer\n *\n * @param buffer - destination\n * @param pos - offset\n * @param string - string to write\n * @return number of bytes written\n *\n * @api private\n */\n\nfunction writeString (stream, string) {\n var strlen = Buffer.byteLength(string)\n writeNumber(stream, strlen)\n\n stream.write(string, 'utf8')\n}\n\n/**\n * writeNumber - write a two byte number to the buffer\n *\n * @param buffer - destination\n * @param pos - offset\n * @param number - number to write\n * @return number of bytes written\n *\n * @api private\n */\nfunction writeNumberCached (stream, number) {\n return stream.write(numCache[number])\n}\nfunction writeNumberGenerated (stream, number) {\n return stream.write(generateNumber(number))\n}\n\n/**\n * writeStringOrBuffer - write a String or Buffer with the its length prefix\n *\n * @param buffer - destination\n * @param pos - offset\n * @param toWrite - String or Buffer\n * @return number of bytes written\n */\nfunction writeStringOrBuffer (stream, toWrite) {\n if (typeof toWrite === 'string') {\n writeString(stream, toWrite)\n } else if (toWrite) {\n writeNumber(stream, toWrite.length)\n stream.write(toWrite)\n } else writeNumber(stream, 0)\n}\n\nfunction byteLength (bufOrString) {\n if (!bufOrString) return 0\n else if (bufOrString instanceof Buffer) return bufOrString.length\n else return Buffer.byteLength(bufOrString)\n}\n\nfunction isStringOrBuffer (field) {\n return typeof field === 'string' || field instanceof Buffer\n}\n\nmodule.exports = generate\n\n\n//# sourceURL=webpack:///./node_modules/mqtt-packet/writeToStream.js?"); + +/***/ }), + +/***/ "./node_modules/mqtt/lib/client.js": +/*!*****************************************!*\ + !*** ./node_modules/mqtt/lib/client.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* WEBPACK VAR INJECTION */(function(global, process) {\n\n/**\n * Module dependencies\n */\nvar events = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\")\nvar Store = __webpack_require__(/*! ./store */ \"./node_modules/mqtt/lib/store.js\")\nvar eos = __webpack_require__(/*! end-of-stream */ \"./node_modules/end-of-stream/index.js\")\nvar mqttPacket = __webpack_require__(/*! mqtt-packet */ \"./node_modules/mqtt-packet/mqtt.js\")\nvar Writable = __webpack_require__(/*! readable-stream */ \"./node_modules/readable-stream/readable-browser.js\").Writable\nvar inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\")\nvar reInterval = __webpack_require__(/*! reinterval */ \"./node_modules/reinterval/index.js\")\nvar validations = __webpack_require__(/*! ./validations */ \"./node_modules/mqtt/lib/validations.js\")\nvar xtend = __webpack_require__(/*! xtend */ \"./node_modules/xtend/immutable.js\")\nvar setImmediate = global.setImmediate || function (callback) {\n // works in node v0.8\n process.nextTick(callback)\n}\nvar defaultConnectOptions = {\n keepalive: 60,\n reschedulePings: true,\n protocolId: 'MQTT',\n protocolVersion: 4,\n reconnectPeriod: 1000,\n connectTimeout: 30 * 1000,\n clean: true,\n resubscribe: true\n}\n\nfunction defaultId () {\n return 'mqttjs_' + Math.random().toString(16).substr(2, 8)\n}\n\nfunction sendPacket (client, packet, cb) {\n client.emit('packetsend', packet)\n\n var result = mqttPacket.writeToStream(packet, client.stream)\n\n if (!result && cb) {\n client.stream.once('drain', cb)\n } else if (cb) {\n cb()\n }\n}\n\nfunction flush (queue) {\n if (queue) {\n Object.keys(queue).forEach(function (messageId) {\n if (typeof queue[messageId] === 'function') {\n queue[messageId](new Error('Connection closed'))\n delete queue[messageId]\n }\n })\n }\n}\n\nfunction storeAndSend (client, packet, cb) {\n client.outgoingStore.put(packet, function storedPacket (err) {\n if (err) {\n return cb && cb(err)\n }\n sendPacket(client, packet, cb)\n })\n}\n\nfunction nop () {}\n\n/**\n * MqttClient constructor\n *\n * @param {Stream} stream - stream\n * @param {Object} [options] - connection options\n * (see Connection#connect)\n */\nfunction MqttClient (streamBuilder, options) {\n var k\n var that = this\n\n if (!(this instanceof MqttClient)) {\n return new MqttClient(streamBuilder, options)\n }\n\n this.options = options || {}\n\n // Defaults\n for (k in defaultConnectOptions) {\n if (typeof this.options[k] === 'undefined') {\n this.options[k] = defaultConnectOptions[k]\n } else {\n this.options[k] = options[k]\n }\n }\n\n this.options.clientId = (typeof this.options.clientId === 'string') ? this.options.clientId : defaultId()\n\n this.streamBuilder = streamBuilder\n\n // Inflight message storages\n this.outgoingStore = this.options.outgoingStore || new Store()\n this.incomingStore = this.options.incomingStore || new Store()\n\n // Should QoS zero messages be queued when the connection is broken?\n this.queueQoSZero = this.options.queueQoSZero === undefined ? true : this.options.queueQoSZero\n\n // map of subscribed topics to support reconnection\n this._resubscribeTopics = {}\n\n // map of a subscribe messageId and a topic\n this.messageIdToTopic = {}\n\n // Ping timer, setup in _setupPingTimer\n this.pingTimer = null\n // Is the client connected?\n this.connected = false\n // Are we disconnecting?\n this.disconnecting = false\n // Packet queue\n this.queue = []\n // connack timer\n this.connackTimer = null\n // Reconnect timer\n this.reconnectTimer = null\n /**\n * MessageIDs starting with 1\n * ensure that nextId is min. 1, see https://github.com/mqttjs/MQTT.js/issues/810\n */\n this.nextId = Math.max(1, Math.floor(Math.random() * 65535))\n\n // Inflight callbacks\n this.outgoing = {}\n\n // Mark connected on connect\n this.on('connect', function () {\n if (this.disconnected) {\n return\n }\n\n this.connected = true\n var outStore = this.outgoingStore.createStream()\n\n this.once('close', remove)\n outStore.on('end', function () {\n that.removeListener('close', remove)\n })\n outStore.on('error', function (err) {\n that.removeListener('close', remove)\n that.emit('error', err)\n })\n\n function remove () {\n outStore.destroy()\n outStore = null\n }\n\n function storeDeliver () {\n // edge case, we wrapped this twice\n if (!outStore) {\n return\n }\n\n var packet = outStore.read(1)\n var cb\n\n if (!packet) {\n // read when data is available in the future\n outStore.once('readable', storeDeliver)\n return\n }\n\n // Avoid unnecessary stream read operations when disconnected\n if (!that.disconnecting && !that.reconnectTimer) {\n cb = that.outgoing[packet.messageId]\n that.outgoing[packet.messageId] = function (err, status) {\n // Ensure that the original callback passed in to publish gets invoked\n if (cb) {\n cb(err, status)\n }\n\n storeDeliver()\n }\n that._sendPacket(packet)\n } else if (outStore.destroy) {\n outStore.destroy()\n }\n }\n\n // start flowing\n storeDeliver()\n })\n\n // Mark disconnected on stream close\n this.on('close', function () {\n this.connected = false\n clearTimeout(this.connackTimer)\n })\n\n // Setup ping timer\n this.on('connect', this._setupPingTimer)\n\n // Send queued packets\n this.on('connect', function () {\n var queue = this.queue\n\n function deliver () {\n var entry = queue.shift()\n var packet = null\n\n if (!entry) {\n return\n }\n\n packet = entry.packet\n\n that._sendPacket(\n packet,\n function (err) {\n if (entry.cb) {\n entry.cb(err)\n }\n deliver()\n }\n )\n }\n\n deliver()\n })\n\n var firstConnection = true\n // resubscribe\n this.on('connect', function () {\n if (!firstConnection &&\n this.options.clean &&\n Object.keys(this._resubscribeTopics).length > 0) {\n if (this.options.resubscribe) {\n this._resubscribeTopics.resubscribe = true\n this.subscribe(this._resubscribeTopics)\n } else {\n this._resubscribeTopics = {}\n }\n }\n\n firstConnection = false\n })\n\n // Clear ping timer\n this.on('close', function () {\n if (that.pingTimer !== null) {\n that.pingTimer.clear()\n that.pingTimer = null\n }\n })\n\n // Setup reconnect timer on disconnect\n this.on('close', this._setupReconnect)\n\n events.EventEmitter.call(this)\n\n this._setupStream()\n}\ninherits(MqttClient, events.EventEmitter)\n\n/**\n * setup the event handlers in the inner stream.\n *\n * @api private\n */\nMqttClient.prototype._setupStream = function () {\n var connectPacket\n var that = this\n var writable = new Writable()\n var parser = mqttPacket.parser(this.options)\n var completeParse = null\n var packets = []\n\n this._clearReconnect()\n\n this.stream = this.streamBuilder(this)\n\n parser.on('packet', function (packet) {\n packets.push(packet)\n })\n\n function nextTickWork () {\n process.nextTick(work)\n }\n\n function work () {\n var packet = packets.shift()\n var done = completeParse\n\n if (packet) {\n that._handlePacket(packet, nextTickWork)\n } else {\n completeParse = null\n done()\n }\n }\n\n writable._write = function (buf, enc, done) {\n completeParse = done\n parser.parse(buf)\n work()\n }\n\n this.stream.pipe(writable)\n\n // Suppress connection errors\n this.stream.on('error', nop)\n\n // Echo stream close\n eos(this.stream, this.emit.bind(this, 'close'))\n\n // Send a connect packet\n connectPacket = Object.create(this.options)\n connectPacket.cmd = 'connect'\n // avoid message queue\n sendPacket(this, connectPacket)\n\n // Echo connection errors\n parser.on('error', this.emit.bind(this, 'error'))\n\n // many drain listeners are needed for qos 1 callbacks if the connection is intermittent\n this.stream.setMaxListeners(1000)\n\n clearTimeout(this.connackTimer)\n this.connackTimer = setTimeout(function () {\n that._cleanUp(true)\n }, this.options.connectTimeout)\n}\n\nMqttClient.prototype._handlePacket = function (packet, done) {\n this.emit('packetreceive', packet)\n\n switch (packet.cmd) {\n case 'publish':\n this._handlePublish(packet, done)\n break\n case 'puback':\n case 'pubrec':\n case 'pubcomp':\n case 'suback':\n case 'unsuback':\n this._handleAck(packet)\n done()\n break\n case 'pubrel':\n this._handlePubrel(packet, done)\n break\n case 'connack':\n this._handleConnack(packet)\n done()\n break\n case 'pingresp':\n this._handlePingresp(packet)\n done()\n break\n default:\n // do nothing\n // maybe we should do an error handling\n // or just log it\n break\n }\n}\n\nMqttClient.prototype._checkDisconnecting = function (callback) {\n if (this.disconnecting) {\n if (callback) {\n callback(new Error('client disconnecting'))\n } else {\n this.emit('error', new Error('client disconnecting'))\n }\n }\n return this.disconnecting\n}\n\n/**\n * publish - publish to \n *\n * @param {String} topic - topic to publish to\n * @param {String, Buffer} message - message to publish\n * @param {Object} [opts] - publish options, includes:\n * {Number} qos - qos level to publish on\n * {Boolean} retain - whether or not to retain the message\n * {Boolean} dup - whether or not mark a message as duplicate\n * @param {Function} [callback] - function(err){}\n * called when publish succeeds or fails\n * @returns {MqttClient} this - for chaining\n * @api public\n *\n * @example client.publish('topic', 'message');\n * @example\n * client.publish('topic', 'message', {qos: 1, retain: true, dup: true});\n * @example client.publish('topic', 'message', console.log);\n */\nMqttClient.prototype.publish = function (topic, message, opts, callback) {\n var packet\n\n // .publish(topic, payload, cb);\n if (typeof opts === 'function') {\n callback = opts\n opts = null\n }\n\n // default opts\n var defaultOpts = {qos: 0, retain: false, dup: false}\n opts = xtend(defaultOpts, opts)\n\n if (this._checkDisconnecting(callback)) {\n return this\n }\n\n packet = {\n cmd: 'publish',\n topic: topic,\n payload: message,\n qos: opts.qos,\n retain: opts.retain,\n messageId: this._nextId(),\n dup: opts.dup\n }\n\n switch (opts.qos) {\n case 1:\n case 2:\n\n // Add to callbacks\n this.outgoing[packet.messageId] = callback || nop\n this._sendPacket(packet)\n break\n default:\n this._sendPacket(packet, callback)\n break\n }\n\n return this\n}\n\n/**\n * subscribe - subscribe to \n *\n * @param {String, Array, Object} topic - topic(s) to subscribe to, supports objects in the form {'topic': qos}\n * @param {Object} [opts] - optional subscription options, includes:\n * {Number} qos - subscribe qos level\n * @param {Function} [callback] - function(err, granted){} where:\n * {Error} err - subscription error (none at the moment!)\n * {Array} granted - array of {topic: 't', qos: 0}\n * @returns {MqttClient} this - for chaining\n * @api public\n * @example client.subscribe('topic');\n * @example client.subscribe('topic', {qos: 1});\n * @example client.subscribe({'topic': 0, 'topic2': 1}, console.log);\n * @example client.subscribe('topic', console.log);\n */\nMqttClient.prototype.subscribe = function () {\n var packet\n var args = Array.prototype.slice.call(arguments)\n var subs = []\n var obj = args.shift()\n var resubscribe = obj.resubscribe\n var callback = args.pop() || nop\n var opts = args.pop()\n var invalidTopic\n var that = this\n\n delete obj.resubscribe\n\n if (typeof obj === 'string') {\n obj = [obj]\n }\n\n if (typeof callback !== 'function') {\n opts = callback\n callback = nop\n }\n\n invalidTopic = validations.validateTopics(obj)\n if (invalidTopic !== null) {\n setImmediate(callback, new Error('Invalid topic ' + invalidTopic))\n return this\n }\n\n if (this._checkDisconnecting(callback)) {\n return this\n }\n\n var defaultOpts = { qos: 0 }\n opts = xtend(defaultOpts, opts)\n\n if (Array.isArray(obj)) {\n obj.forEach(function (topic) {\n if (that._resubscribeTopics[topic] < opts.qos ||\n !that._resubscribeTopics.hasOwnProperty(topic) ||\n resubscribe) {\n subs.push({\n topic: topic,\n qos: opts.qos\n })\n }\n })\n } else {\n Object\n .keys(obj)\n .forEach(function (k) {\n if (that._resubscribeTopics[k] < obj[k] ||\n !that._resubscribeTopics.hasOwnProperty(k) ||\n resubscribe) {\n subs.push({\n topic: k,\n qos: obj[k]\n })\n }\n })\n }\n\n packet = {\n cmd: 'subscribe',\n subscriptions: subs,\n qos: 1,\n retain: false,\n dup: false,\n messageId: this._nextId()\n }\n\n if (!subs.length) {\n callback(null, [])\n return\n }\n\n // subscriptions to resubscribe to in case of disconnect\n if (this.options.resubscribe) {\n var topics = []\n subs.forEach(function (sub) {\n if (that.options.reconnectPeriod > 0) {\n that._resubscribeTopics[sub.topic] = sub.qos\n topics.push(sub.topic)\n }\n })\n that.messageIdToTopic[packet.messageId] = topics\n }\n\n this.outgoing[packet.messageId] = function (err, packet) {\n if (!err) {\n var granted = packet.granted\n for (var i = 0; i < granted.length; i += 1) {\n subs[i].qos = granted[i]\n }\n }\n\n callback(err, subs)\n }\n\n this._sendPacket(packet)\n\n return this\n}\n\n/**\n * unsubscribe - unsubscribe from topic(s)\n *\n * @param {String, Array} topic - topics to unsubscribe from\n * @param {Function} [callback] - callback fired on unsuback\n * @returns {MqttClient} this - for chaining\n * @api public\n * @example client.unsubscribe('topic');\n * @example client.unsubscribe('topic', console.log);\n */\nMqttClient.prototype.unsubscribe = function (topic, callback) {\n var packet = {\n cmd: 'unsubscribe',\n qos: 1,\n messageId: this._nextId()\n }\n var that = this\n\n callback = callback || nop\n\n if (this._checkDisconnecting(callback)) {\n return this\n }\n\n if (typeof topic === 'string') {\n packet.unsubscriptions = [topic]\n } else if (typeof topic === 'object' && topic.length) {\n packet.unsubscriptions = topic\n }\n\n if (this.options.resubscribe) {\n packet.unsubscriptions.forEach(function (topic) {\n delete that._resubscribeTopics[topic]\n })\n }\n\n this.outgoing[packet.messageId] = callback\n\n this._sendPacket(packet)\n\n return this\n}\n\n/**\n * end - close connection\n *\n * @returns {MqttClient} this - for chaining\n * @param {Boolean} force - do not wait for all in-flight messages to be acked\n * @param {Function} cb - called when the client has been closed\n *\n * @api public\n */\nMqttClient.prototype.end = function (force, cb) {\n var that = this\n\n if (typeof force === 'function') {\n cb = force\n force = false\n }\n\n function closeStores () {\n that.disconnected = true\n that.incomingStore.close(function () {\n that.outgoingStore.close(function () {\n if (cb) {\n cb.apply(null, arguments)\n }\n that.emit('end')\n })\n })\n if (that._deferredReconnect) {\n that._deferredReconnect()\n }\n }\n\n function finish () {\n // defer closesStores of an I/O cycle,\n // just to make sure things are\n // ok for websockets\n that._cleanUp(force, setImmediate.bind(null, closeStores))\n }\n\n if (this.disconnecting) {\n return this\n }\n\n this._clearReconnect()\n\n this.disconnecting = true\n\n if (!force && Object.keys(this.outgoing).length > 0) {\n // wait 10ms, just to be sure we received all of it\n this.once('outgoingEmpty', setTimeout.bind(null, finish, 10))\n } else {\n finish()\n }\n\n return this\n}\n\n/**\n * removeOutgoingMessage - remove a message in outgoing store\n * the outgoing callback will be called withe Error('Message removed') if the message is removed\n *\n * @param {Number} mid - messageId to remove message\n * @returns {MqttClient} this - for chaining\n * @api public\n *\n * @example client.removeOutgoingMessage(client.getLastMessageId());\n */\nMqttClient.prototype.removeOutgoingMessage = function (mid) {\n var cb = this.outgoing[mid]\n delete this.outgoing[mid]\n this.outgoingStore.del({messageId: mid}, function () {\n cb(new Error('Message removed'))\n })\n return this\n}\n\n/**\n * reconnect - connect again using the same options as connect()\n *\n * @param {Object} [opts] - optional reconnect options, includes:\n * {Store} incomingStore - a store for the incoming packets\n * {Store} outgoingStore - a store for the outgoing packets\n * if opts is not given, current stores are used\n * @returns {MqttClient} this - for chaining\n *\n * @api public\n */\nMqttClient.prototype.reconnect = function (opts) {\n var that = this\n var f = function () {\n if (opts) {\n that.options.incomingStore = opts.incomingStore\n that.options.outgoingStore = opts.outgoingStore\n } else {\n that.options.incomingStore = null\n that.options.outgoingStore = null\n }\n that.incomingStore = that.options.incomingStore || new Store()\n that.outgoingStore = that.options.outgoingStore || new Store()\n that.disconnecting = false\n that.disconnected = false\n that._deferredReconnect = null\n that._reconnect()\n }\n\n if (this.disconnecting && !this.disconnected) {\n this._deferredReconnect = f\n } else {\n f()\n }\n return this\n}\n\n/**\n * _reconnect - implement reconnection\n * @api privateish\n */\nMqttClient.prototype._reconnect = function () {\n this.emit('reconnect')\n this._setupStream()\n}\n\n/**\n * _setupReconnect - setup reconnect timer\n */\nMqttClient.prototype._setupReconnect = function () {\n var that = this\n\n if (!that.disconnecting && !that.reconnectTimer && (that.options.reconnectPeriod > 0)) {\n if (!this.reconnecting) {\n this.emit('offline')\n this.reconnecting = true\n }\n that.reconnectTimer = setInterval(function () {\n that._reconnect()\n }, that.options.reconnectPeriod)\n }\n}\n\n/**\n * _clearReconnect - clear the reconnect timer\n */\nMqttClient.prototype._clearReconnect = function () {\n if (this.reconnectTimer) {\n clearInterval(this.reconnectTimer)\n this.reconnectTimer = null\n }\n}\n\n/**\n * _cleanUp - clean up on connection end\n * @api private\n */\nMqttClient.prototype._cleanUp = function (forced, done) {\n if (done) {\n this.stream.on('close', done)\n }\n\n if (forced) {\n if ((this.options.reconnectPeriod === 0) && this.options.clean) {\n flush(this.outgoing)\n }\n this.stream.destroy()\n } else {\n this._sendPacket(\n { cmd: 'disconnect' },\n setImmediate.bind(\n null,\n this.stream.end.bind(this.stream)\n )\n )\n }\n\n if (!this.disconnecting) {\n this._clearReconnect()\n this._setupReconnect()\n }\n\n if (this.pingTimer !== null) {\n this.pingTimer.clear()\n this.pingTimer = null\n }\n\n if (done && !this.connected) {\n this.stream.removeListener('close', done)\n done()\n }\n}\n\n/**\n * _sendPacket - send or queue a packet\n * @param {String} type - packet type (see `protocol`)\n * @param {Object} packet - packet options\n * @param {Function} cb - callback when the packet is sent\n * @api private\n */\nMqttClient.prototype._sendPacket = function (packet, cb) {\n if (!this.connected) {\n if (((packet.qos || 0) === 0 && this.queueQoSZero) || packet.cmd !== 'publish') {\n this.queue.push({ packet: packet, cb: cb })\n } else if (packet.qos > 0) {\n cb = this.outgoing[packet.messageId]\n this.outgoingStore.put(packet, function (err) {\n if (err) {\n return cb && cb(err)\n }\n })\n } else if (cb) {\n cb(new Error('No connection to broker'))\n }\n\n return\n }\n\n // When sending a packet, reschedule the ping timer\n this._shiftPingInterval()\n\n switch (packet.cmd) {\n case 'publish':\n break\n case 'pubrel':\n storeAndSend(this, packet, cb)\n return\n default:\n sendPacket(this, packet, cb)\n return\n }\n\n switch (packet.qos) {\n case 2:\n case 1:\n storeAndSend(this, packet, cb)\n break\n /**\n * no need of case here since it will be caught by default\n * and jshint comply that before default it must be a break\n * anyway it will result in -1 evaluation\n */\n case 0:\n /* falls through */\n default:\n sendPacket(this, packet, cb)\n break\n }\n}\n\n/**\n * _setupPingTimer - setup the ping timer\n *\n * @api private\n */\nMqttClient.prototype._setupPingTimer = function () {\n var that = this\n\n if (!this.pingTimer && this.options.keepalive) {\n this.pingResp = true\n this.pingTimer = reInterval(function () {\n that._checkPing()\n }, this.options.keepalive * 1000)\n }\n}\n\n/**\n * _shiftPingInterval - reschedule the ping interval\n *\n * @api private\n */\nMqttClient.prototype._shiftPingInterval = function () {\n if (this.pingTimer && this.options.keepalive && this.options.reschedulePings) {\n this.pingTimer.reschedule(this.options.keepalive * 1000)\n }\n}\n/**\n * _checkPing - check if a pingresp has come back, and ping the server again\n *\n * @api private\n */\nMqttClient.prototype._checkPing = function () {\n if (this.pingResp) {\n this.pingResp = false\n this._sendPacket({ cmd: 'pingreq' })\n } else {\n // do a forced cleanup since socket will be in bad shape\n this._cleanUp(true)\n }\n}\n\n/**\n * _handlePingresp - handle a pingresp\n *\n * @api private\n */\nMqttClient.prototype._handlePingresp = function () {\n this.pingResp = true\n}\n\n/**\n * _handleConnack\n *\n * @param {Object} packet\n * @api private\n */\n\nMqttClient.prototype._handleConnack = function (packet) {\n var rc = packet.returnCode\n var errors = [\n '',\n 'Unacceptable protocol version',\n 'Identifier rejected',\n 'Server unavailable',\n 'Bad username or password',\n 'Not authorized'\n ]\n\n clearTimeout(this.connackTimer)\n\n if (rc === 0) {\n this.reconnecting = false\n this.emit('connect', packet)\n } else if (rc > 0) {\n var err = new Error('Connection refused: ' + errors[rc])\n err.code = rc\n this.emit('error', err)\n }\n}\n\n/**\n * _handlePublish\n *\n * @param {Object} packet\n * @api private\n */\n/*\nthose late 2 case should be rewrite to comply with coding style:\n\ncase 1:\ncase 0:\n // do not wait sending a puback\n // no callback passed\n if (1 === qos) {\n this._sendPacket({\n cmd: 'puback',\n messageId: mid\n });\n }\n // emit the message event for both qos 1 and 0\n this.emit('message', topic, message, packet);\n this.handleMessage(packet, done);\n break;\ndefault:\n // do nothing but every switch mus have a default\n // log or throw an error about unknown qos\n break;\n\nfor now i just suppressed the warnings\n*/\nMqttClient.prototype._handlePublish = function (packet, done) {\n done = typeof done !== 'undefined' ? done : nop\n var topic = packet.topic.toString()\n var message = packet.payload\n var qos = packet.qos\n var mid = packet.messageId\n var that = this\n\n switch (qos) {\n case 2:\n this.incomingStore.put(packet, function (err) {\n if (err) {\n return done(err)\n }\n that._sendPacket({cmd: 'pubrec', messageId: mid}, done)\n })\n break\n case 1:\n // emit the message event\n this.emit('message', topic, message, packet)\n this.handleMessage(packet, function (err) {\n if (err) {\n return done(err)\n }\n // send 'puback' if the above 'handleMessage' method executed\n // successfully.\n that._sendPacket({cmd: 'puback', messageId: mid}, done)\n })\n break\n case 0:\n // emit the message event\n this.emit('message', topic, message, packet)\n this.handleMessage(packet, done)\n break\n default:\n // do nothing\n // log or throw an error about unknown qos\n break\n }\n}\n\n/**\n * Handle messages with backpressure support, one at a time.\n * Override at will.\n *\n * @param Packet packet the packet\n * @param Function callback call when finished\n * @api public\n */\nMqttClient.prototype.handleMessage = function (packet, callback) {\n callback()\n}\n\n/**\n * _handleAck\n *\n * @param {Object} packet\n * @api private\n */\n\nMqttClient.prototype._handleAck = function (packet) {\n /* eslint no-fallthrough: \"off\" */\n var mid = packet.messageId\n var type = packet.cmd\n var response = null\n var cb = this.outgoing[mid]\n var that = this\n\n if (!cb) {\n // Server sent an ack in error, ignore it.\n return\n }\n\n // Process\n switch (type) {\n case 'pubcomp':\n // same thing as puback for QoS 2\n case 'puback':\n // Callback - we're done\n delete this.outgoing[mid]\n this.outgoingStore.del(packet, cb)\n break\n case 'pubrec':\n response = {\n cmd: 'pubrel',\n qos: 2,\n messageId: mid\n }\n\n this._sendPacket(response)\n break\n case 'suback':\n delete this.outgoing[mid]\n if (packet.granted.length === 1 && (packet.granted[0] & 0x80) !== 0) {\n // suback with Failure status\n var topics = this.messageIdToTopic[mid]\n if (topics) {\n topics.forEach(function (topic) {\n delete that._resubscribeTopics[topic]\n })\n }\n }\n cb(null, packet)\n break\n case 'unsuback':\n delete this.outgoing[mid]\n cb(null)\n break\n default:\n that.emit('error', new Error('unrecognized packet type'))\n }\n\n if (this.disconnecting &&\n Object.keys(this.outgoing).length === 0) {\n this.emit('outgoingEmpty')\n }\n}\n\n/**\n * _handlePubrel\n *\n * @param {Object} packet\n * @api private\n */\nMqttClient.prototype._handlePubrel = function (packet, callback) {\n callback = typeof callback !== 'undefined' ? callback : nop\n var mid = packet.messageId\n var that = this\n\n var comp = {cmd: 'pubcomp', messageId: mid}\n\n that.incomingStore.get(packet, function (err, pub) {\n if (!err && pub.cmd !== 'pubrel') {\n that.emit('message', pub.topic, pub.payload, pub)\n that.incomingStore.put(packet, function (err) {\n if (err) {\n return callback(err)\n }\n that.handleMessage(pub, function (err) {\n if (err) {\n return callback(err)\n }\n that._sendPacket(comp, callback)\n })\n })\n } else {\n that._sendPacket(comp, callback)\n }\n })\n}\n\n/**\n * _nextId\n * @return unsigned int\n */\nMqttClient.prototype._nextId = function () {\n // id becomes current state of this.nextId and increments afterwards\n var id = this.nextId++\n // Ensure 16 bit unsigned int (max 65535, nextId got one higher)\n if (this.nextId === 65536) {\n this.nextId = 1\n }\n return id\n}\n\n/**\n * getLastMessageId\n * @return unsigned int\n */\nMqttClient.prototype.getLastMessageId = function () {\n return (this.nextId === 1) ? 65535 : (this.nextId - 1)\n}\n\nmodule.exports = MqttClient\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/mqtt/lib/client.js?"); + +/***/ }), + +/***/ "./node_modules/mqtt/lib/connect/index.js": +/*!************************************************!*\ + !*** ./node_modules/mqtt/lib/connect/index.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nvar MqttClient = __webpack_require__(/*! ../client */ \"./node_modules/mqtt/lib/client.js\")\nvar Store = __webpack_require__(/*! ../store */ \"./node_modules/mqtt/lib/store.js\")\nvar url = __webpack_require__(/*! url */ \"./node_modules/node-libs-browser/node_modules/url/url.js\")\nvar xtend = __webpack_require__(/*! xtend */ \"./node_modules/xtend/immutable.js\")\nvar protocols = {}\n\nif (process.title !== 'browser') {\n protocols.mqtt = __webpack_require__(/*! ./tcp */ \"./node_modules/mqtt/lib/connect/tcp.js\")\n protocols.tcp = __webpack_require__(/*! ./tcp */ \"./node_modules/mqtt/lib/connect/tcp.js\")\n protocols.ssl = __webpack_require__(/*! ./tls */ \"./node_modules/mqtt/lib/connect/tls.js\")\n protocols.tls = __webpack_require__(/*! ./tls */ \"./node_modules/mqtt/lib/connect/tls.js\")\n protocols.mqtts = __webpack_require__(/*! ./tls */ \"./node_modules/mqtt/lib/connect/tls.js\")\n} else {\n protocols.wx = __webpack_require__(/*! ./wx */ \"./node_modules/mqtt/lib/connect/wx.js\")\n protocols.wxs = __webpack_require__(/*! ./wx */ \"./node_modules/mqtt/lib/connect/wx.js\")\n}\n\nprotocols.ws = __webpack_require__(/*! ./ws */ \"./node_modules/mqtt/lib/connect/ws.js\")\nprotocols.wss = __webpack_require__(/*! ./ws */ \"./node_modules/mqtt/lib/connect/ws.js\")\n\n/**\n * Parse the auth attribute and merge username and password in the options object.\n *\n * @param {Object} [opts] option object\n */\nfunction parseAuthOptions (opts) {\n var matches\n if (opts.auth) {\n matches = opts.auth.match(/^(.+):(.+)$/)\n if (matches) {\n opts.username = matches[1]\n opts.password = matches[2]\n } else {\n opts.username = opts.auth\n }\n }\n}\n\n/**\n * connect - connect to an MQTT broker.\n *\n * @param {String} [brokerUrl] - url of the broker, optional\n * @param {Object} opts - see MqttClient#constructor\n */\nfunction connect (brokerUrl, opts) {\n if ((typeof brokerUrl === 'object') && !opts) {\n opts = brokerUrl\n brokerUrl = null\n }\n\n opts = opts || {}\n\n if (brokerUrl) {\n var parsed = url.parse(brokerUrl, true)\n if (parsed.port != null) {\n parsed.port = Number(parsed.port)\n }\n\n opts = xtend(parsed, opts)\n\n if (opts.protocol === null) {\n throw new Error('Missing protocol')\n }\n opts.protocol = opts.protocol.replace(/:$/, '')\n }\n\n // merge in the auth options if supplied\n parseAuthOptions(opts)\n\n // support clientId passed in the query string of the url\n if (opts.query && typeof opts.query.clientId === 'string') {\n opts.clientId = opts.query.clientId\n }\n\n if (opts.cert && opts.key) {\n if (opts.protocol) {\n if (['mqtts', 'wss', 'wxs'].indexOf(opts.protocol) === -1) {\n switch (opts.protocol) {\n case 'mqtt':\n opts.protocol = 'mqtts'\n break\n case 'ws':\n opts.protocol = 'wss'\n break\n case 'wx':\n opts.protocol = 'wxs'\n break\n default:\n throw new Error('Unknown protocol for secure connection: \"' + opts.protocol + '\"!')\n }\n }\n } else {\n // don't know what protocol he want to use, mqtts or wss\n throw new Error('Missing secure protocol key')\n }\n }\n\n if (!protocols[opts.protocol]) {\n var isSecure = ['mqtts', 'wss'].indexOf(opts.protocol) !== -1\n opts.protocol = [\n 'mqtt',\n 'mqtts',\n 'ws',\n 'wss',\n 'wx',\n 'wxs'\n ].filter(function (key, index) {\n if (isSecure && index % 2 === 0) {\n // Skip insecure protocols when requesting a secure one.\n return false\n }\n return (typeof protocols[key] === 'function')\n })[0]\n }\n\n if (opts.clean === false && !opts.clientId) {\n throw new Error('Missing clientId for unclean clients')\n }\n\n if (opts.protocol) {\n opts.defaultProtocol = opts.protocol\n }\n\n function wrapper (client) {\n if (opts.servers) {\n if (!client._reconnectCount || client._reconnectCount === opts.servers.length) {\n client._reconnectCount = 0\n }\n\n opts.host = opts.servers[client._reconnectCount].host\n opts.port = opts.servers[client._reconnectCount].port\n opts.protocol = (!opts.servers[client._reconnectCount].protocol ? opts.defaultProtocol : opts.servers[client._reconnectCount].protocol)\n opts.hostname = opts.host\n\n client._reconnectCount++\n }\n\n return protocols[opts.protocol](client, opts)\n }\n\n return new MqttClient(wrapper, opts)\n}\n\nmodule.exports = connect\nmodule.exports.connect = connect\nmodule.exports.MqttClient = MqttClient\nmodule.exports.Store = Store\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/mqtt/lib/connect/index.js?"); + +/***/ }), + +/***/ "./node_modules/mqtt/lib/connect/tcp.js": +/*!**********************************************!*\ + !*** ./node_modules/mqtt/lib/connect/tcp.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar net = __webpack_require__(/*! net */ 2)\n\n/*\n variables port and host can be removed since\n you have all required information in opts object\n*/\nfunction buildBuilder (client, opts) {\n var port, host\n opts.port = opts.port || 1883\n opts.hostname = opts.hostname || opts.host || 'localhost'\n\n port = opts.port\n host = opts.hostname\n\n return net.createConnection(port, host)\n}\n\nmodule.exports = buildBuilder\n\n\n//# sourceURL=webpack:///./node_modules/mqtt/lib/connect/tcp.js?"); + +/***/ }), + +/***/ "./node_modules/mqtt/lib/connect/tls.js": +/*!**********************************************!*\ + !*** ./node_modules/mqtt/lib/connect/tls.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\nvar tls = __webpack_require__(/*! tls */ 3)\n\nfunction buildBuilder (mqttClient, opts) {\n var connection\n opts.port = opts.port || 8883\n opts.host = opts.hostname || opts.host || 'localhost'\n\n opts.rejectUnauthorized = opts.rejectUnauthorized !== false\n\n delete opts.path\n\n connection = tls.connect(opts)\n /* eslint no-use-before-define: [2, \"nofunc\"] */\n connection.on('secureConnect', function () {\n if (opts.rejectUnauthorized && !connection.authorized) {\n connection.emit('error', new Error('TLS not authorized'))\n } else {\n connection.removeListener('error', handleTLSerrors)\n }\n })\n\n function handleTLSerrors (err) {\n // How can I get verify this error is a tls error?\n if (opts.rejectUnauthorized) {\n mqttClient.emit('error', err)\n }\n\n // close this connection to match the behaviour of net\n // otherwise all we get is an error from the connection\n // and close event doesn't fire. This is a work around\n // to enable the reconnect code to work the same as with\n // net.createConnection\n connection.end()\n }\n\n connection.on('error', handleTLSerrors)\n return connection\n}\n\nmodule.exports = buildBuilder\n\n\n//# sourceURL=webpack:///./node_modules/mqtt/lib/connect/tls.js?"); + +/***/ }), + +/***/ "./node_modules/mqtt/lib/connect/ws.js": +/*!*********************************************!*\ + !*** ./node_modules/mqtt/lib/connect/ws.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nvar websocket = __webpack_require__(/*! websocket-stream */ \"./node_modules/websocket-stream/stream.js\")\nvar urlModule = __webpack_require__(/*! url */ \"./node_modules/node-libs-browser/node_modules/url/url.js\")\nvar WSS_OPTIONS = [\n 'rejectUnauthorized',\n 'ca',\n 'cert',\n 'key',\n 'pfx',\n 'passphrase'\n]\nvar IS_BROWSER = process.title === 'browser'\n\nfunction buildUrl (opts, client) {\n var url = opts.protocol + '://' + opts.hostname + ':' + opts.port + opts.path\n if (typeof (opts.transformWsUrl) === 'function') {\n url = opts.transformWsUrl(url, opts, client)\n }\n return url\n}\n\nfunction setDefaultOpts (opts) {\n if (!opts.hostname) {\n opts.hostname = 'localhost'\n }\n if (!opts.port) {\n if (opts.protocol === 'wss') {\n opts.port = 443\n } else {\n opts.port = 80\n }\n }\n if (!opts.path) {\n opts.path = '/'\n }\n\n if (!opts.wsOptions) {\n opts.wsOptions = {}\n }\n if (!IS_BROWSER && opts.protocol === 'wss') {\n // Add cert/key/ca etc options\n WSS_OPTIONS.forEach(function (prop) {\n if (opts.hasOwnProperty(prop) && !opts.wsOptions.hasOwnProperty(prop)) {\n opts.wsOptions[prop] = opts[prop]\n }\n })\n }\n}\n\nfunction createWebSocket (client, opts) {\n var websocketSubProtocol =\n (opts.protocolId === 'MQIsdp') && (opts.protocolVersion === 3)\n ? 'mqttv3.1'\n : 'mqtt'\n\n setDefaultOpts(opts)\n var url = buildUrl(opts, client)\n return websocket(url, [websocketSubProtocol], opts.wsOptions)\n}\n\nfunction buildBuilder (client, opts) {\n return createWebSocket(client, opts)\n}\n\nfunction buildBuilderBrowser (client, opts) {\n if (!opts.hostname) {\n opts.hostname = opts.host\n }\n\n if (!opts.hostname) {\n // Throwing an error in a Web Worker if no `hostname` is given, because we\n // can not determine the `hostname` automatically. If connecting to\n // localhost, please supply the `hostname` as an argument.\n if (typeof (document) === 'undefined') {\n throw new Error('Could not determine host. Specify host manually.')\n }\n var parsed = urlModule.parse(document.URL)\n opts.hostname = parsed.hostname\n\n if (!opts.port) {\n opts.port = parsed.port\n }\n }\n return createWebSocket(client, opts)\n}\n\nif (IS_BROWSER) {\n module.exports = buildBuilderBrowser\n} else {\n module.exports = buildBuilder\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/mqtt/lib/connect/ws.js?"); + +/***/ }), + +/***/ "./node_modules/mqtt/lib/connect/wx.js": +/*!*********************************************!*\ + !*** ./node_modules/mqtt/lib/connect/wx.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/* global wx */\nvar socketOpen = false\nvar socketMsgQueue = []\n\nfunction sendSocketMessage (msg) {\n if (socketOpen) {\n wx.sendSocketMessage({\n data: msg.buffer || msg\n })\n } else {\n socketMsgQueue.push(msg)\n }\n}\n\nfunction WebSocket (url, protocols) {\n var ws = {\n OPEN: 1,\n CLOSING: 2,\n CLOSED: 3,\n readyState: socketOpen ? 1 : 0,\n send: sendSocketMessage,\n close: wx.closeSocket,\n onopen: null,\n onmessage: null,\n onclose: null,\n onerror: null\n }\n\n wx.connectSocket({\n url: url,\n protocols: protocols\n })\n wx.onSocketOpen(function (res) {\n ws.readyState = ws.OPEN\n socketOpen = true\n for (var i = 0; i < socketMsgQueue.length; i++) {\n sendSocketMessage(socketMsgQueue[i])\n }\n socketMsgQueue = []\n\n ws.onopen && ws.onopen.apply(ws, arguments)\n })\n wx.onSocketMessage(function (res) {\n ws.onmessage && ws.onmessage.apply(ws, arguments)\n })\n wx.onSocketClose(function () {\n ws.onclose && ws.onclose.apply(ws, arguments)\n ws.readyState = ws.CLOSED\n socketOpen = false\n })\n wx.onSocketError(function () {\n ws.onerror && ws.onerror.apply(ws, arguments)\n ws.readyState = ws.CLOSED\n socketOpen = false\n })\n\n return ws\n}\n\nvar websocket = __webpack_require__(/*! websocket-stream */ \"./node_modules/websocket-stream/stream.js\")\n\nfunction buildUrl (opts, client) {\n var protocol = opts.protocol === 'wxs' ? 'wss' : 'ws'\n var url = protocol + '://' + opts.hostname + opts.path\n if (opts.port && opts.port !== 80 && opts.port !== 443) {\n url = protocol + '://' + opts.hostname + ':' + opts.port + opts.path\n }\n if (typeof (opts.transformWsUrl) === 'function') {\n url = opts.transformWsUrl(url, opts, client)\n }\n return url\n}\n\nfunction setDefaultOpts (opts) {\n if (!opts.hostname) {\n opts.hostname = 'localhost'\n }\n if (!opts.path) {\n opts.path = '/'\n }\n\n if (!opts.wsOptions) {\n opts.wsOptions = {}\n }\n}\n\nfunction createWebSocket (client, opts) {\n var websocketSubProtocol =\n (opts.protocolId === 'MQIsdp') && (opts.protocolVersion === 3)\n ? 'mqttv3.1'\n : 'mqtt'\n\n setDefaultOpts(opts)\n var url = buildUrl(opts, client)\n return websocket(WebSocket(url, [websocketSubProtocol]))\n}\n\nfunction buildBuilder (client, opts) {\n opts.hostname = opts.hostname || opts.host\n\n if (!opts.hostname) {\n throw new Error('Could not determine host. Specify host manually.')\n }\n\n return createWebSocket(client, opts)\n}\n\nmodule.exports = buildBuilder\n\n\n//# sourceURL=webpack:///./node_modules/mqtt/lib/connect/wx.js?"); + +/***/ }), + +/***/ "./node_modules/mqtt/lib/store.js": +/*!****************************************!*\ + !*** ./node_modules/mqtt/lib/store.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* WEBPACK VAR INJECTION */(function(process) {\n\n/**\n * Module dependencies\n */\nvar xtend = __webpack_require__(/*! xtend */ \"./node_modules/xtend/immutable.js\")\n\nvar Readable = __webpack_require__(/*! readable-stream */ \"./node_modules/readable-stream/readable-browser.js\").Readable\nvar streamsOpts = { objectMode: true }\nvar defaultStoreOptions = {\n clean: true\n}\n\n/**\n * es6-map can preserve insertion order even if ES version is older.\n *\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Description\n * It should be noted that a Map which is a map of an object, especially\n * a dictionary of dictionaries, will only map to the object's insertion\n * order. In ES2015 this is ordered for objects but for older versions of\n * ES, this may be random and not ordered.\n *\n */\nvar Map = __webpack_require__(/*! es6-map */ \"./node_modules/es6-map/index.js\")\n\n/**\n * In-memory implementation of the message store\n * This can actually be saved into files.\n *\n * @param {Object} [options] - store options\n */\nfunction Store (options) {\n if (!(this instanceof Store)) {\n return new Store(options)\n }\n\n this.options = options || {}\n\n // Defaults\n this.options = xtend(defaultStoreOptions, options)\n\n this._inflights = new Map()\n}\n\n/**\n * Adds a packet to the store, a packet is\n * anything that has a messageId property.\n *\n */\nStore.prototype.put = function (packet, cb) {\n this._inflights.set(packet.messageId, packet)\n\n if (cb) {\n cb()\n }\n\n return this\n}\n\n/**\n * Creates a stream with all the packets in the store\n *\n */\nStore.prototype.createStream = function () {\n var stream = new Readable(streamsOpts)\n var destroyed = false\n var values = []\n var i = 0\n\n this._inflights.forEach(function (value, key) {\n values.push(value)\n })\n\n stream._read = function () {\n if (!destroyed && i < values.length) {\n this.push(values[i++])\n } else {\n this.push(null)\n }\n }\n\n stream.destroy = function () {\n if (destroyed) {\n return\n }\n\n var self = this\n\n destroyed = true\n\n process.nextTick(function () {\n self.emit('close')\n })\n }\n\n return stream\n}\n\n/**\n * deletes a packet from the store.\n */\nStore.prototype.del = function (packet, cb) {\n packet = this._inflights.get(packet.messageId)\n if (packet) {\n this._inflights.delete(packet.messageId)\n cb(null, packet)\n } else if (cb) {\n cb(new Error('missing packet'))\n }\n\n return this\n}\n\n/**\n * get a packet from the store.\n */\nStore.prototype.get = function (packet, cb) {\n packet = this._inflights.get(packet.messageId)\n if (packet) {\n cb(null, packet)\n } else if (cb) {\n cb(new Error('missing packet'))\n }\n\n return this\n}\n\n/**\n * Close the store\n */\nStore.prototype.close = function (cb) {\n if (this.options.clean) {\n this._inflights = null\n }\n if (cb) {\n cb()\n }\n}\n\nmodule.exports = Store\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/mqtt/lib/store.js?"); + +/***/ }), + +/***/ "./node_modules/mqtt/lib/validations.js": +/*!**********************************************!*\ + !*** ./node_modules/mqtt/lib/validations.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Validate a topic to see if it's valid or not.\n * A topic is valid if it follow below rules:\n * - Rule #1: If any part of the topic is not `+` or `#`, then it must not contain `+` and '#'\n * - Rule #2: Part `#` must be located at the end of the mailbox\n *\n * @param {String} topic - A topic\n * @returns {Boolean} If the topic is valid, returns true. Otherwise, returns false.\n */\nfunction validateTopic (topic) {\n var parts = topic.split('/')\n\n for (var i = 0; i < parts.length; i++) {\n if (parts[i] === '+') {\n continue\n }\n\n if (parts[i] === '#') {\n // for Rule #2\n return i === parts.length - 1\n }\n\n if (parts[i].indexOf('+') !== -1 || parts[i].indexOf('#') !== -1) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * Validate an array of topics to see if any of them is valid or not\n * @param {Array} topics - Array of topics\n * @returns {String} If the topics is valid, returns null. Otherwise, returns the invalid one\n */\nfunction validateTopics (topics) {\n if (topics.length === 0) {\n return 'empty_topic_list'\n }\n for (var i = 0; i < topics.length; i++) {\n if (!validateTopic(topics[i])) {\n return topics[i]\n }\n }\n return null\n}\n\nmodule.exports = {\n validateTopics: validateTopics\n}\n\n\n//# sourceURL=webpack:///./node_modules/mqtt/lib/validations.js?"); + +/***/ }), + +/***/ "./node_modules/node-libs-browser/mock/empty.js": +/*!******************************************************!*\ + !*** ./node_modules/node-libs-browser/mock/empty.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("\n\n//# sourceURL=webpack:///./node_modules/node-libs-browser/mock/empty.js?"); + +/***/ }), + +/***/ "./node_modules/node-libs-browser/node_modules/events/events.js": +/*!**********************************************************************!*\ + !*** ./node_modules/node-libs-browser/node_modules/events/events.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction $getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return $getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = $getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) args.push(arguments[i]);\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n ReflectApply(this.listener, this.target, args);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\n\n//# sourceURL=webpack:///./node_modules/node-libs-browser/node_modules/events/events.js?"); + +/***/ }), + +/***/ "./node_modules/node-libs-browser/node_modules/url/url.js": +/*!****************************************************************!*\ + !*** ./node_modules/node-libs-browser/node_modules/url/url.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nvar punycode = __webpack_require__(/*! punycode */ \"./node_modules/punycode/punycode.js\");\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/node-libs-browser/node_modules/url/util.js\");\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = __webpack_require__(/*! querystring */ \"./node_modules/querystring-es3/index.js\");\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter =\n (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1)\n continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n util.isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol')\n result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host || srcPath.length > 1) &&\n (last === '.' || last === '..') || last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n\n\n//# sourceURL=webpack:///./node_modules/node-libs-browser/node_modules/url/url.js?"); + +/***/ }), + +/***/ "./node_modules/node-libs-browser/node_modules/url/util.js": +/*!*****************************************************************!*\ + !*** ./node_modules/node-libs-browser/node_modules/url/util.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = {\n isString: function(arg) {\n return typeof(arg) === 'string';\n },\n isObject: function(arg) {\n return typeof(arg) === 'object' && arg !== null;\n },\n isNull: function(arg) {\n return arg === null;\n },\n isNullOrUndefined: function(arg) {\n return arg == null;\n }\n};\n\n\n//# sourceURL=webpack:///./node_modules/node-libs-browser/node_modules/url/util.js?"); + +/***/ }), + +/***/ "./node_modules/once/once.js": +/*!***********************************!*\ + !*** ./node_modules/once/once.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var wrappy = __webpack_require__(/*! wrappy */ \"./node_modules/wrappy/wrappy.js\")\nmodule.exports = wrappy(once)\nmodule.exports.strict = wrappy(onceStrict)\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n\n Object.defineProperty(Function.prototype, 'onceStrict', {\n value: function () {\n return onceStrict(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var f = function () {\n if (f.called) return f.value\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n f.called = false\n return f\n}\n\nfunction onceStrict (fn) {\n var f = function () {\n if (f.called)\n throw new Error(f.onceError)\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n var name = fn.name || 'Function wrapped with `once`'\n f.onceError = name + \" shouldn't be called more than once\"\n f.called = false\n return f\n}\n\n\n//# sourceURL=webpack:///./node_modules/once/once.js?"); + +/***/ }), + +/***/ "./node_modules/path-browserify/index.js": +/*!***********************************************!*\ + !*** ./node_modules/path-browserify/index.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\nvar splitPath = function(filename) {\n return splitPathRe.exec(filename).slice(1);\n};\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function(path) {\n var result = splitPath(path),\n root = result[0],\n dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n};\n\n\nexports.basename = function(path, ext) {\n var f = splitPath(path)[2];\n // TODO: make this comparison case-insensitive on windows?\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\n\nexports.extname = function(path) {\n return splitPath(path)[3];\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/path-browserify/index.js?"); + +/***/ }), + +/***/ "./node_modules/process-nextick-args/index.js": +/*!****************************************************!*\ + !*** ./node_modules/process-nextick-args/index.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nif (!process.version ||\n process.version.indexOf('v0.') === 0 ||\n process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\n module.exports = { nextTick: nextTick };\n} else {\n module.exports = process\n}\n\nfunction nextTick(fn, arg1, arg2, arg3) {\n if (typeof fn !== 'function') {\n throw new TypeError('\"callback\" argument must be a function');\n }\n var len = arguments.length;\n var args, i;\n switch (len) {\n case 0:\n case 1:\n return process.nextTick(fn);\n case 2:\n return process.nextTick(function afterTickOne() {\n fn.call(null, arg1);\n });\n case 3:\n return process.nextTick(function afterTickTwo() {\n fn.call(null, arg1, arg2);\n });\n case 4:\n return process.nextTick(function afterTickThree() {\n fn.call(null, arg1, arg2, arg3);\n });\n default:\n args = new Array(len - 1);\n i = 0;\n while (i < args.length) {\n args[i++] = arguments[i];\n }\n return process.nextTick(function afterTick() {\n fn.apply(null, args);\n });\n }\n}\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/process-nextick-args/index.js?"); + +/***/ }), + +/***/ "./node_modules/process/browser.js": +/*!*****************************************!*\ + !*** ./node_modules/process/browser.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack:///./node_modules/process/browser.js?"); + +/***/ }), + +/***/ "./node_modules/punycode/punycode.js": +/*!*******************************************!*\ + !*** ./node_modules/punycode/punycode.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.3.2 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = true && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = true && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * http://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttrue\n\t) {\n\t\t!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {\n\t\t\treturn punycode;\n\t\t}).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n\n}(this));\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module), __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/punycode/punycode.js?"); + +/***/ }), + +/***/ "./node_modules/querystring-es3/decode.js": +/*!************************************************!*\ + !*** ./node_modules/querystring-es3/decode.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\n\n//# sourceURL=webpack:///./node_modules/querystring-es3/decode.js?"); + +/***/ }), + +/***/ "./node_modules/querystring-es3/encode.js": +/*!************************************************!*\ + !*** ./node_modules/querystring-es3/encode.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n\n\n//# sourceURL=webpack:///./node_modules/querystring-es3/encode.js?"); + +/***/ }), + +/***/ "./node_modules/querystring-es3/index.js": +/*!***********************************************!*\ + !*** ./node_modules/querystring-es3/index.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nexports.decode = exports.parse = __webpack_require__(/*! ./decode */ \"./node_modules/querystring-es3/decode.js\");\nexports.encode = exports.stringify = __webpack_require__(/*! ./encode */ \"./node_modules/querystring-es3/encode.js\");\n\n\n//# sourceURL=webpack:///./node_modules/querystring-es3/index.js?"); + +/***/ }), + +/***/ "./node_modules/readable-stream/duplex-browser.js": +/*!********************************************************!*\ + !*** ./node_modules/readable-stream/duplex-browser.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("module.exports = __webpack_require__(/*! ./lib/_stream_duplex.js */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\n\n\n//# sourceURL=webpack:///./node_modules/readable-stream/duplex-browser.js?"); + +/***/ }), + +/***/ "./node_modules/readable-stream/lib/_stream_duplex.js": +/*!************************************************************!*\ + !*** ./node_modules/readable-stream/lib/_stream_duplex.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n\n\n/**/\n\nvar pna = __webpack_require__(/*! process-nextick-args */ \"./node_modules/process-nextick-args/index.js\");\n/**/\n\n/**/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n keys.push(key);\n }return keys;\n};\n/**/\n\nmodule.exports = Duplex;\n\n/**/\nvar util = __webpack_require__(/*! core-util-is */ \"./node_modules/core-util-is/lib/util.js\");\nutil.inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n/**/\n\nvar Readable = __webpack_require__(/*! ./_stream_readable */ \"./node_modules/readable-stream/lib/_stream_readable.js\");\nvar Writable = __webpack_require__(/*! ./_stream_writable */ \"./node_modules/readable-stream/lib/_stream_writable.js\");\n\nutil.inherits(Duplex, Readable);\n\n{\n // avoid scope creep, the keys array can then be collected\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n\n Readable.call(this, options);\n Writable.call(this, options);\n\n if (options && options.readable === false) this.readable = false;\n\n if (options && options.writable === false) this.writable = false;\n\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n this.once('end', onend);\n}\n\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._writableState.highWaterMark;\n }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n pna.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});\n\nDuplex.prototype._destroy = function (err, cb) {\n this.push(null);\n this.end();\n\n pna.nextTick(cb, err);\n};\n\n//# sourceURL=webpack:///./node_modules/readable-stream/lib/_stream_duplex.js?"); + +/***/ }), + +/***/ "./node_modules/readable-stream/lib/_stream_passthrough.js": +/*!*****************************************************************!*\ + !*** ./node_modules/readable-stream/lib/_stream_passthrough.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n\n\nmodule.exports = PassThrough;\n\nvar Transform = __webpack_require__(/*! ./_stream_transform */ \"./node_modules/readable-stream/lib/_stream_transform.js\");\n\n/**/\nvar util = __webpack_require__(/*! core-util-is */ \"./node_modules/core-util-is/lib/util.js\");\nutil.inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n/**/\n\nutil.inherits(PassThrough, Transform);\n\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};\n\n//# sourceURL=webpack:///./node_modules/readable-stream/lib/_stream_passthrough.js?"); + +/***/ }), + +/***/ "./node_modules/readable-stream/lib/_stream_readable.js": +/*!**************************************************************!*\ + !*** ./node_modules/readable-stream/lib/_stream_readable.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n/**/\n\nvar pna = __webpack_require__(/*! process-nextick-args */ \"./node_modules/process-nextick-args/index.js\");\n/**/\n\nmodule.exports = Readable;\n\n/**/\nvar isArray = __webpack_require__(/*! isarray */ \"./node_modules/isarray/index.js\");\n/**/\n\n/**/\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n\n/**/\nvar EE = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\").EventEmitter;\n\nvar EElistenerCount = function (emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\nvar Stream = __webpack_require__(/*! ./internal/streams/stream */ \"./node_modules/readable-stream/lib/internal/streams/stream-browser.js\");\n/**/\n\n/**/\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/**/\n\n/**/\nvar util = __webpack_require__(/*! core-util-is */ \"./node_modules/core-util-is/lib/util.js\");\nutil.inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n/**/\n\n/**/\nvar debugUtil = __webpack_require__(/*! util */ 0);\nvar debug = void 0;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function () {};\n}\n/**/\n\nvar BufferList = __webpack_require__(/*! ./internal/streams/BufferList */ \"./node_modules/readable-stream/lib/internal/streams/BufferList.js\");\nvar destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ \"./node_modules/readable-stream/lib/internal/streams/destroy.js\");\nvar StringDecoder;\n\nutil.inherits(Readable, Stream);\n\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n var hwm = options.highWaterMark;\n var readableHwm = options.readableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ \"./node_modules/string_decoder/lib/string_decoder.js\").StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nfunction Readable(options) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\n\n if (!(this instanceof Readable)) return new Readable(options);\n\n this._readableState = new ReadableState(options, this);\n\n // legacy\n this.readable = true;\n\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n\n Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\n\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n this.push(null);\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n stream.emit('error', er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (addToFront) {\n if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n stream.emit('error', new Error('stream.push() after EOF'));\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n }\n\n return needMoreData(state);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n return er;\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ \"./node_modules/string_decoder/lib/string_decoder.js\").StringDecoder;\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n\n return ret;\n};\n\nfunction onEofChunk(stream, state) {\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n\n // emit 'readable' now to make sure it gets picked up.\n emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n pna.nextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n this.emit('error', new Error('_read() is not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);\n\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n increasedAwaitDrain = true;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = { hasUnpiped: false };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var i = 0; i < len; i++) {\n dests[i].emit('unpipe', this, unpipeInfo);\n }return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n dest.emit('unpipe', this, unpipeInfo);\n\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n if (!state.reading) {\n pna.nextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this);\n }\n }\n }\n\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n pna.nextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n\n var state = this._readableState;\n var paused = false;\n\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n\n _this.push(null);\n });\n\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return this;\n};\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._readableState.highWaterMark;\n }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n\n return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n var ret;\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n\n // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n pna.nextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/readable-stream/lib/_stream_readable.js?"); + +/***/ }), + +/***/ "./node_modules/readable-stream/lib/_stream_transform.js": +/*!***************************************************************!*\ + !*** ./node_modules/readable-stream/lib/_stream_transform.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n\n\nmodule.exports = Transform;\n\nvar Duplex = __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\n\n/**/\nvar util = __webpack_require__(/*! core-util-is */ \"./node_modules/core-util-is/lib/util.js\");\nutil.inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n/**/\n\nutil.inherits(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n\n var cb = ts.writecb;\n\n if (!cb) {\n return this.emit('error', new Error('write callback called multiple times'));\n }\n\n ts.writechunk = null;\n ts.writecb = null;\n\n if (data != null) // single equals check for both `null` and `undefined`\n this.push(data);\n\n cb(er);\n\n var rs = this._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\n\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n\n Duplex.call(this, options);\n\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n };\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n // When the writable side finishes, then flush out anything remaining.\n this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n var _this = this;\n\n if (typeof this._flush === 'function') {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n throw new Error('_transform() is not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\nTransform.prototype._destroy = function (err, cb) {\n var _this2 = this;\n\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n _this2.emit('close');\n });\n};\n\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n\n if (data != null) // single equals check for both `null` and `undefined`\n stream.push(data);\n\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');\n\n if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');\n\n return stream.push(null);\n}\n\n//# sourceURL=webpack:///./node_modules/readable-stream/lib/_stream_transform.js?"); + +/***/ }), + +/***/ "./node_modules/readable-stream/lib/_stream_writable.js": +/*!**************************************************************!*\ + !*** ./node_modules/readable-stream/lib/_stream_writable.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n\n\n/**/\n\nvar pna = __webpack_require__(/*! process-nextick-args */ \"./node_modules/process-nextick-args/index.js\");\n/**/\n\nmodule.exports = Writable;\n\n/* */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* */\n\n/**/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;\n/**/\n\n/**/\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n\n/**/\nvar util = __webpack_require__(/*! core-util-is */ \"./node_modules/core-util-is/lib/util.js\");\nutil.inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n/**/\n\n/**/\nvar internalUtil = {\n deprecate: __webpack_require__(/*! util-deprecate */ \"./node_modules/util-deprecate/browser.js\")\n};\n/**/\n\n/**/\nvar Stream = __webpack_require__(/*! ./internal/streams/stream */ \"./node_modules/readable-stream/lib/internal/streams/stream-browser.js\");\n/**/\n\n/**/\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/**/\n\nvar destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ \"./node_modules/readable-stream/lib/internal/streams/destroy.js\");\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var writableHwm = options.writableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function (object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function (object) {\n return object instanceof this;\n };\n}\n\nfunction Writable(options) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\n return new Writable(options);\n }\n\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n\n if (typeof options.writev === 'function') this._writev = options.writev;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n\n if (typeof options.final === 'function') this._final = options.final;\n }\n\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n pna.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n pna.nextTick(cb, er);\n valid = false;\n }\n return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n if (typeof cb !== 'function') cb = nop;\n\n if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n\n return ret;\n};\n\nWritable.prototype.cork = function () {\n var state = this._writableState;\n\n state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n\n if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._writableState.highWaterMark;\n }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n\n state.length += len;\n\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n pna.nextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n pna.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n\n onwriteStateUpdate(state);\n\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n /**/\n asyncWrite(afterWrite, stream, state, finished, cb);\n /**/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('_write() is not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n stream.emit('error', err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function') {\n state.pendingcb++;\n state.finalCalled = true;\n pna.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n }\n }\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n if (state.corkedRequestsFree) {\n state.corkedRequestsFree.next = corkReq;\n } else {\n state.corkedRequestsFree = corkReq;\n }\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n get: function () {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\n\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n this.end();\n cb(err);\n};\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\"), __webpack_require__(/*! ./../../timers-browserify/main.js */ \"./node_modules/timers-browserify/main.js\").setImmediate, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/readable-stream/lib/_stream_writable.js?"); + +/***/ }), + +/***/ "./node_modules/readable-stream/lib/internal/streams/BufferList.js": +/*!*************************************************************************!*\ + !*** ./node_modules/readable-stream/lib/internal/streams/BufferList.js ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer;\nvar util = __webpack_require__(/*! util */ 1);\n\nfunction copyBuffer(src, target, offset) {\n src.copy(target, offset);\n}\n\nmodule.exports = function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n\n BufferList.prototype.push = function push(v) {\n var entry = { data: v, next: null };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n };\n\n BufferList.prototype.unshift = function unshift(v) {\n var entry = { data: v, next: this.head };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n };\n\n BufferList.prototype.shift = function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n };\n\n BufferList.prototype.clear = function clear() {\n this.head = this.tail = null;\n this.length = 0;\n };\n\n BufferList.prototype.join = function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) {\n ret += s + p.data;\n }return ret;\n };\n\n BufferList.prototype.concat = function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n if (this.length === 1) return this.head.data;\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n };\n\n return BufferList;\n}();\n\nif (util && util.inspect && util.inspect.custom) {\n module.exports.prototype[util.inspect.custom] = function () {\n var obj = util.inspect({ length: this.length });\n return this.constructor.name + ' ' + obj;\n };\n}\n\n//# sourceURL=webpack:///./node_modules/readable-stream/lib/internal/streams/BufferList.js?"); + +/***/ }), + +/***/ "./node_modules/readable-stream/lib/internal/streams/destroy.js": +/*!**********************************************************************!*\ + !*** ./node_modules/readable-stream/lib/internal/streams/destroy.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**/\n\nvar pna = __webpack_require__(/*! process-nextick-args */ \"./node_modules/process-nextick-args/index.js\");\n/**/\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n var _this = this;\n\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {\n pna.nextTick(emitErrorNT, this, err);\n }\n return this;\n }\n\n // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n\n // if this is a duplex stream mark the writable part as destroyed as well\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n pna.nextTick(emitErrorNT, _this, err);\n if (_this._writableState) {\n _this._writableState.errorEmitted = true;\n }\n } else if (cb) {\n cb(err);\n }\n });\n\n return this;\n}\n\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\n\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\n\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy\n};\n\n//# sourceURL=webpack:///./node_modules/readable-stream/lib/internal/streams/destroy.js?"); + +/***/ }), + +/***/ "./node_modules/readable-stream/lib/internal/streams/stream-browser.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/readable-stream/lib/internal/streams/stream-browser.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("module.exports = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\").EventEmitter;\n\n\n//# sourceURL=webpack:///./node_modules/readable-stream/lib/internal/streams/stream-browser.js?"); + +/***/ }), + +/***/ "./node_modules/readable-stream/readable-browser.js": +/*!**********************************************************!*\ + !*** ./node_modules/readable-stream/readable-browser.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("exports = module.exports = __webpack_require__(/*! ./lib/_stream_readable.js */ \"./node_modules/readable-stream/lib/_stream_readable.js\");\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = __webpack_require__(/*! ./lib/_stream_writable.js */ \"./node_modules/readable-stream/lib/_stream_writable.js\");\nexports.Duplex = __webpack_require__(/*! ./lib/_stream_duplex.js */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\nexports.Transform = __webpack_require__(/*! ./lib/_stream_transform.js */ \"./node_modules/readable-stream/lib/_stream_transform.js\");\nexports.PassThrough = __webpack_require__(/*! ./lib/_stream_passthrough.js */ \"./node_modules/readable-stream/lib/_stream_passthrough.js\");\n\n\n//# sourceURL=webpack:///./node_modules/readable-stream/readable-browser.js?"); + +/***/ }), + +/***/ "./node_modules/reinterval/index.js": +/*!******************************************!*\ + !*** ./node_modules/reinterval/index.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction ReInterval (callback, interval, args) {\n var self = this;\n\n this._callback = callback;\n this._args = args;\n\n this._interval = setInterval(callback, interval, this._args);\n\n this.reschedule = function (interval) {\n // if no interval entered, use the interval passed in on creation\n if (!interval)\n interval = self._interval;\n\n if (self._interval)\n clearInterval(self._interval);\n self._interval = setInterval(self._callback, interval, self._args);\n };\n\n this.clear = function () {\n if (self._interval) {\n clearInterval(self._interval);\n self._interval = undefined;\n }\n };\n \n this.destroy = function () {\n if (self._interval) {\n clearInterval(self._interval);\n }\n self._callback = undefined;\n self._interval = undefined;\n self._args = undefined;\n };\n}\n\nfunction reInterval () {\n if (typeof arguments[0] !== 'function')\n throw new Error('callback needed');\n if (typeof arguments[1] !== 'number')\n throw new Error('interval needed');\n\n var args;\n\n if (arguments.length > 0) {\n args = new Array(arguments.length - 2);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 2];\n }\n }\n\n return new ReInterval(arguments[0], arguments[1], args);\n}\n\nmodule.exports = reInterval;\n\n\n//# sourceURL=webpack:///./node_modules/reinterval/index.js?"); + +/***/ }), + +/***/ "./node_modules/safe-buffer/index.js": +/*!*******************************************!*\ + !*** ./node_modules/safe-buffer/index.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* eslint-disable node/no-deprecated-api */\nvar buffer = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\")\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n\n\n//# sourceURL=webpack:///./node_modules/safe-buffer/index.js?"); + +/***/ }), + +/***/ "./node_modules/setimmediate/setImmediate.js": +/*!***************************************************!*\ + !*** ./node_modules/setimmediate/setImmediate.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a - + + diff --git a/web-widget/package.json b/web-widget/package.json old mode 100755 new mode 100644 diff --git a/web-widget/server.js b/web-widget/server.js old mode 100755 new mode 100644 index 7c05a87..dfc77a8 --- a/web-widget/server.js +++ b/web-widget/server.js @@ -7,7 +7,7 @@ app.use(express.static('dist')); app.use(express.static('./')); app.get('/', function(req, res) { - res.sendfile('index.html'); + res.sendfile('index.html'); }); app.listen(PORT); diff --git a/web-widget/src/js/adapter.js b/web-widget/src/js/adapter.js old mode 100755 new mode 100644 index 4cd02a8..7280b15 --- a/web-widget/src/js/adapter.js +++ b/web-widget/src/js/adapter.js @@ -20,8 +20,8 @@ class ChannelizeAdapter { }); } - getCurrentUser(cb) { - return cb(null, this.channelize.getCurrentUser()); + getLoginUser() { + return this.channelize.getLoginUser(); } connect(userId, accessToken, cb) { @@ -40,8 +40,13 @@ class ChannelizeAdapter { }); } - createUser(displayName, email, password, cb) { - this.channelize.User.createUser(displayName, email, password, function (err, user) { + createUser(name, email, password, cb) { + let data = { + displayName : name, + email : email, + password : password + } + this.channelize.User.createUser(data, function (err, user) { if(err) return cb(err); return cb(null, user); @@ -56,12 +61,19 @@ class ChannelizeAdapter { }); } - getConversationsList(limit, skip, memberId = null, cb) { + getConversationsList(limit, skip, memberIds, include, convIds, convType, search, isGroup, customTypes, cb) { let conversationListQuery = this.channelize.Conversation.createConversationListQuery(); conversationListQuery.limit = limit; conversationListQuery.skip = skip; - if(memberId) - conversationListQuery.memberId = memberId; + conversationListQuery.include = include; + conversationListQuery.ids = convIds; + conversationListQuery.type = convType; + conversationListQuery.search = search; + conversationListQuery.isGroup = isGroup; + conversationListQuery.customTypes = customTypes; + + if(memberIds) + conversationListQuery.membersExactly = memberIds; conversationListQuery.list(function (err, conversations) { if(err) return cb(err); @@ -71,7 +83,7 @@ class ChannelizeAdapter { } getConversation(conversationId, cb) { - this.channelize.Conversation.getConversation(conversationId, "messages", function (err, conversation) { + this.channelize.Conversation.getConversation(conversationId, "members", function (err, conversation) { if(err) return cb(err); return cb(null, conversation); @@ -87,106 +99,134 @@ class ChannelizeAdapter { } addMember(conversation, memberIds, cb) { - conversation.addMembers(memberIds, function (err, res) { - if (err) return cb(err); + conversation.addMembers(memberIds, function (err, res) { + if (err) return cb(err); - return cb(null, res); - }); + return cb(null, res); + }); } removeMember(conversation, memberIds, cb) { - conversation.removeMembers(memberIds, function (err, res) { - if (err) return cb(err); + conversation.removeMembers(memberIds, function (err, res) { + if (err) return cb(err); - return cb(null, res); - }); + return cb(null, res); + }); } blockMember(userId, cb) { this.channelize.User.block(userId, function (err, res) { - if (err) return cb(err); + if (err) return cb(err); - return cb(null, res); - }); + return cb(null, res); + }); } unblockMember(userId, cb) { this.channelize.User.unblock(userId, function (err, res) { - if (err) return cb(err); + if (err) return cb(err); - return cb(null, res); - }); + return cb(null, res); + }); } clearConversation(conversation, cb) { - conversation.clear(function (err, res) { - if (err) return cb(err); + conversation.clear(function (err, res) { + if (err) return cb(err); - return cb(null, res); - }); + return cb(null, res); + }); } leaveConversation(conversation, cb) { - conversation.leave(function (err, res) { - if (err) return cb(err); + conversation.leave(function (err, res) { + if (err) return cb(err); - return cb(null, res); - }); + return cb(null, res); + }); } muteConversation(conversation, cb) { - conversation.mute(function (err, res) { + conversation.muteConversation(function (err, res) { if (err) return cb(err); return cb(null, res); }); } - deleteConversation(conversation, cb) { - conversation.delete(function (err, res) { - if (err) return cb(err); + unmuteConversation(conversation, cb) { + conversation.unmuteConversation(function (err, res) { + if (err) return cb(err); return cb(null, res); - }); + }); } - markAsReadConversation(conversation, cb) { - conversation.markAllMessageRead(function (err, res) { - if (err) return cb(err); + deleteConversation(conversation, cb) { + conversation.delete(function (err, res) { + if (err) return cb(err); - return cb(null, res); - }); + return cb(null, res); + }); } - async sendTextMessage(conversation, body, tags = [], cb) { - conversation.sendTextMessage(body, tags, function (err, res) { - if (err) return cb(err); + markAsReadConversation(conversation, timestamp, cb) { + conversation.markAsRead(timestamp, function (err, res) { + if (err) return cb(err); - return cb(null, res); - }); + return cb(null, res); + }); } - async sendTextMessageToUser(userId, body, cb) { - this.channelize.Message.sendTextMessage(userId, body, function (err, message) { - if (err) return cb(err); + async sendMessage(conversation, data, cb) { + conversation.sendMessage(data, function (err, res) { + if (err) return cb(err); - return cb(null, message); - }); + return cb(null, res); + }); } - async sendFileMessage(conversation, file, createThumbnail, cb) { - conversation.sendFileMessage(file, createThumbnail, function(err, message) { - if (err) return cb(err); + async sendMessageToUser(data, cb) { + this.channelize.Message.sendMessage(data, function (err, message) { + if (err) return cb(err); - return cb(null, message); - }); + return cb(null, message); + }); } - getMessages(conversation, limit = 50, skip = 0, cb) { + async uploadFile(file, createThumbnail, cb) { + this.channelize.Message.uploadFile(file, createThumbnail, function(err, message) { + if (err) return cb(err); + + return cb(null, message); + }); + } + + getConversationMembers(conversation, cb) { + conversation.getMembers(function(err, members) { + if (err) return cb(err); + + return cb(null, message); + }); + } + + getMessageReadMembers(conversation, message) { + return conversation.getReadMembers(message); + } + + readByAllMembers(conversation, message) { + return conversation.readByAllMembers(message); + } + + getMessages(conversation, limit, skip, ids, types, attachmentTypes, ownerIds, cb) { let messageListQuery = conversation.createMessageListQuery(); messageListQuery.sort = 'createdAt DESC'; - messageListQuery.limit = limit; + messageListQuery.limit = limit ? limit : 50; messageListQuery.skip = skip; + messageListQuery.ids = ids; + messageListQuery.types = types; + messageListQuery.attachmentTypes = attachmentTypes; + messageListQuery.ownerIds = ownerIds; messageListQuery.list(function (err, messages) { if (err) return cb(err); @@ -195,10 +235,6 @@ class ChannelizeAdapter { }); } - getLastMessage(conversation, cb) { - return cb(null, conversation.getLastMessage()); - } - deleteMessagesForMe(messageIds, cb) { this.channelize.Message.deleteMessagesForMe(messageIds, function (err, res) { if(err) return cb(err); @@ -223,8 +259,15 @@ class ChannelizeAdapter { }); } - getFriends(cb) { + getFriends(searchTerm, limit, skip, isOnline, includeBlocked, cb) { let userListQuery = this.channelize.User.createUserListQuery(); + userListQuery.search = searchTerm; + userListQuery.limit = limit; + userListQuery.skip = skip; + userListQuery.sort = "displayName ASC"; + userListQuery.isOnline = isOnline; + userListQuery.includeBlocked = includeBlocked; + userListQuery.friendsList(function (err, users) { if(err) return cb(err); @@ -240,13 +283,12 @@ class ChannelizeAdapter { userListQuery.role = role; userListQuery.includeDeleted = includeDeleted; - userListQuery.allUsersList(function (err, users) { + userListQuery.usersList(function (err, users) { if(err) return cb(err); return cb(null, users); }); } - } export { ChannelizeAdapter as default }; \ No newline at end of file diff --git a/web-widget/src/js/components/conversation-window.js b/web-widget/src/js/components/conversation-window.js old mode 100755 new mode 100644 index 3a3a905..91f539d --- a/web-widget/src/js/components/conversation-window.js +++ b/web-widget/src/js/components/conversation-window.js @@ -1,5 +1,4 @@ import Utility from "../utility.js"; -import RecentConversations from "./recent-conversations.js"; import { LANGUAGE_PHRASES, IMAGES, SETTINGS } from "../constants.js"; class ConversationWindow { @@ -13,6 +12,7 @@ class ConversationWindow { this.loadCount = 0; this.limit = 25; this.skip = 0; + this.messages = []; } init(conversation = null, data = null) { @@ -22,7 +22,6 @@ class ConversationWindow { } this.conversation = this.modifyConversation(conversation); - this._openConversationWindow(this.conversation, true); this._registerClickEventHandlers(); this._markAsRead(this.conversation); @@ -83,10 +82,6 @@ class ConversationWindow { let dropDownAttributes = [{"id":"ch_conv_drop_down"},{"class":"ch-conv-drop-down"}]; let dropDown = this.utility.createElement("div", dropDownAttributes, null, header); - // Create mute option - let muteOptionAttributes = [{"id":"ch_conv_mute"},{"class":"ch-conv-mute"}]; - this.utility.createElement("div", muteOptionAttributes, LANGUAGE_PHRASES.MUTE_CONV, dropDown); - // Create clear option let clearOptionAttributes = [{"id":"ch_conv_clear"},{"class":"ch-conv-clear"}]; this.utility.createElement("div", clearOptionAttributes, LANGUAGE_PHRASES.CLEAR_CONV, dropDown); @@ -96,12 +91,14 @@ class ConversationWindow { this.utility.createElement("div", deleteOptionAttributes, LANGUAGE_PHRASES.DELETE_CONV, dropDown); // Create block user option - let blockOptionAttributes = [{"id":"ch_conv_block"},{"class":"ch-conv-block"}]; + let blockOptionAttributes = [{"id":"ch_conv_block"}]; let blockOption = this.utility.createElement("div", blockOptionAttributes, LANGUAGE_PHRASES.BLOCK_USER, dropDown); + blockOption.style.display = "none"; // Create unblock user option - let unblockOptionAttributes = [{"id":"ch_conv_unblock"},{"class":"ch-conv-unblock"}]; + let unblockOptionAttributes = [{"id":"ch_conv_unblock"}]; let unblockOption = this.utility.createElement("div", unblockOptionAttributes, LANGUAGE_PHRASES.UNBLOCK_USER, dropDown); + unblockOption.style.display = "none"; if(!conversation.isGroup) { if(conversation.blockedByUser) @@ -119,10 +116,6 @@ class ConversationWindow { let msgsBoxAttributes = [{"id":"ch_messages_box"},{"class":"ch-messages-box"}]; let messagesBox = this.utility.createElement("div", msgsBoxAttributes, null, windowDiv); - // Create snackbar for warnings - let snackbarAttributes = [{"id":"ch_snackbar"}]; - this.utility.createElement("div", snackbarAttributes, null, windowDiv); - if(loadMessages) { // Create loader container let loaderContainerAttributes = [{"id":"ch_conv_loader_container"},{"class":"ch-loader-bg"}]; @@ -237,7 +230,7 @@ class ConversationWindow { _createMessagesListing(conversation) { // Get conversation messages - this._getMessages(conversation, this.limit, this.skip, (err, messages) => { + this._getMessages(conversation, this.limit, this.skip, null, null, null, null, (err, messages) => { if(err) return console.error(err); this.messages = messages; @@ -256,12 +249,10 @@ class ConversationWindow { this.messages.forEach(message => { // Update message object message = this._modifyMessage(message); - this.previousUserId = message.ownerId; - // Handle meta message - if(message.contentType == 1) { - // let metaMessageAttributes = [{"class":"ch-meta-msg"}]; - // this.utility.createElement("div", metaMessageAttributes, "Meta Message", messagesBox); + if(message.type == "admin") { + let metaMessageAttributes = [{"class":"ch-admin-msg"}]; + this.utility.createElement("div", metaMessageAttributes, message.body, messagesBox); return; } @@ -270,7 +261,7 @@ class ConversationWindow { let msgList = this.utility.createElement("div", msgListAttributes, null, messagesBox); // Create sender name div - if(conversation.isGroup && message.ownerId != window.userId) { + if(conversation.isGroup && message.ownerId != this.widget.userId) { let senderAttributes = [{"class":"ch-sender-name"}]; this.utility.createElement("div", senderAttributes, message.owner.displayName, msgList); } @@ -290,18 +281,18 @@ class ConversationWindow { let msgDiv = this.utility.createElement("div", msgDivAttributes, message.body, msgContainer); // Create media message frame - this._createMediaMessageFrame(message); + this._createMediaMessageFrame(message, msgDiv); // Create message time span let msgTimeAttributes = [{"id":"ch_msg_time"},{"class":"ch-msg-time"}]; let msgTime = this.utility.createElement("span", msgTimeAttributes, message.createdAt, msgContainer); - if(message.ownerId == window.userId) { + if(message.ownerId == this.widget.userId) { msgContainer.classList.add("right"); moreOption.classList.add("left"); // Create message read status let statusAttributes = [{"id":"ch_msg_status"}]; - let readIcon = message.readStatus == 3 ? "done_all" : "check"; + let readIcon = message.readByAll ? "done_all" : "check"; let msgStatus = this.utility.createElement("i", statusAttributes, readIcon, msgContainer); msgStatus.classList.add("material-icons", "ch-msg-status"); } @@ -315,20 +306,39 @@ class ConversationWindow { } modifyConversation(conversation) { - if(!conversation.isGroup) { - // Set conversation title and image - let member = conversation.membersList.find(member => member.userId != window.userId); - conversation.title = member.user.displayName; - conversation.profileImageUrl = member.user.profileImageUrl ? member.user.profileImageUrl : IMAGES.AVTAR; - if(member.user.isOnline) - conversation.status = LANGUAGE_PHRASES.ONLINE; - else if(!member.user.isOnline && member.user.lastSeen) - conversation.status = LANGUAGE_PHRASES.LAST_SEEN + this.utility.updateTimeFormat(member.user.lastSeen); + if(!conversation || conversation.isModified) + return conversation; + + if (!conversation.isGroup && conversation.user && Object.entries(conversation.user).length === 0) { + conversation.title = LANGUAGE_PHRASES.DELETED_MEMBER; + conversation.profileImageUrl = IMAGES.AVTAR; + return conversation; + } + + // Set profile Image, title and status of conversation + if(conversation.isGroup) { + conversation.profileImageUrl = conversation.profileImageUrl ? conversation.profileImageUrl : IMAGES.GROUP; + conversation.status = conversation.memberCount + " " + LANGUAGE_PHRASES.MEMBERS; } else { - conversation.status = conversation.memberCount + " " + LANGUAGE_PHRASES.MEMBERS; + conversation.profileImageUrl = conversation.user.profileImageUrl ? conversation.user.profileImageUrl : IMAGES.AVTAR; + conversation.title = conversation.user.displayName; + // Set block user status + let member = conversation.members.find(member => member.userId == conversation.user.id); + conversation.blockedByMember = member ? false : true; + + if(!conversation.isActive) { + conversation.blockedByUser = true; + } + + if(conversation.user.isOnline) { + conversation.status = LANGUAGE_PHRASES.ONLINE; + } + else { + conversation.status = LANGUAGE_PHRASES.LAST_SEEN + this.utility.updateTimeFormat(member.user.lastSeen); + } } return conversation; } @@ -336,13 +346,12 @@ class ConversationWindow { _loadMoreMessages() { ++this.loadCount; this.skip = this.loadCount * this.limit; - this._getMessages(this.conversation, this.limit, this.skip, (err, messages) => { + this._getMessages(this.conversation, this.limit, this.skip, null, null, null, null, (err, messages) => { if(err) return console.error(err); - if(!messages && messages[0].chatId != this.conversation.id) + if(!messages && messages[0].conversationId != this.conversation.id) return; - messages.reverse(); this.messages = this.messages.concat(messages); // Save first message to scroll @@ -351,13 +360,15 @@ class ConversationWindow { messages.forEach(message => { - // Remove meta message - if(message.contentType == 1) - return; - // Update message object message = this._modifyMessage(message); + if(message.type == "admin") { + let metaMessageAttributes = [{"class":"ch-admin-msg"}]; + this.utility.createElement("div", metaMessageAttributes, message.body, messagesBox); + return; + } + // Create message list let msgListAttributes = [{"id":message.id},{"class":"ch-msg-list"}]; let msgList = this.utility.createElement("div", msgListAttributes, null, null); @@ -377,18 +388,18 @@ class ConversationWindow { let msgDiv = this.utility.createElement("div", msgDivAttributes, message.body, msgContainer); // Create media message frame - this._createMediaMessageFrame(message); + this._createMediaMessageFrame(message, msgDiv); // Create message time span let msgTimeAttributes = [{"id":"ch_msg_time"},{"class":"ch-msg-time"}]; let msgTime = this.utility.createElement("span", msgTimeAttributes, message.createdAt, msgContainer); - if(message.ownerId == window.userId) { + if(message.ownerId == this.widget.userId) { msgContainer.classList.add("right"); moreOption.classList.add("left"); // Create message read status let statusAttributes = [{"id":"ch_msg_status"}]; - let readIcon = message.readStatus == 3 ? "done_all" : "check"; + let readIcon = message.readByAll ? "done_all" : "check"; let msgStatus = this.utility.createElement("i", statusAttributes, readIcon, msgContainer); msgStatus.classList.add("material-icons", "ch-msg-status"); } @@ -403,7 +414,6 @@ class ConversationWindow { firstMessage.scrollIntoView(); } }); - } _registerClickEventHandlers() { @@ -414,50 +424,43 @@ class ConversationWindow { this.widget.convWindows.pop(); }); - // Conversation option listener + // Conversation option button listener let optionBtn = document.getElementById("ch_conv_options"); optionBtn.addEventListener("click", (data) => { document.getElementById("ch_conv_drop_down").classList.toggle("ch-show-element"); }); - // Conversation mute listener - let muteBtn = document.getElementById("ch_conv_mute"); - muteBtn.addEventListener("click", (data) => { - document.getElementById("ch_conv_drop_down").classList.toggle("ch-show-element"); - this.muteConversation(); - }); - - // Conversation clear listener + // Conversation clear button listener let clearBtn = document.getElementById("ch_conv_clear"); clearBtn.addEventListener("click", (data) => { document.getElementById("ch_conv_drop_down").classList.toggle("ch-show-element"); this.clearConversation(); }); - // Conversation delete listener + // Conversation delete button listener let deleteBtn = document.getElementById("ch_conv_delete"); deleteBtn.addEventListener("click", (data) => { document.getElementById("ch_conv_drop_down").classList.toggle("ch-show-element"); this.deleteConversation(); }); - // Member block listener + // Member block button listener let blockBtn = document.getElementById("ch_conv_block"); if(blockBtn) { blockBtn.addEventListener("click", (data) => { document.getElementById("ch_conv_drop_down").classList.toggle("ch-show-element"); - this.chAdapter.blockMember(this.conversation.member.userId, (err, res) => { + this.chAdapter.blockMember(this.conversation.user.id, (err, res) => { if(err) return console.error(err); }); }); } - // Member unblock listener + // Member unblock button listener let unblockBtn = document.getElementById("ch_conv_unblock"); if(unblockBtn) { unblockBtn.addEventListener("click", (data) => { document.getElementById("ch_conv_drop_down").classList.toggle("ch-show-element"); - this.chAdapter.unblockMember(this.conversation.member.userId, (err, res) => { + this.chAdapter.unblockMember(this.conversation.user.id, (err, res) => { if(err) return console.error(err); }); }); @@ -494,8 +497,10 @@ class ConversationWindow { // Send message on image choose let imageInput = document.getElementById("ch_image_input"); imageInput.addEventListener("change", (data) => { - if(data.target.files[0].size > 25000000) - this._showSnackbar(LANGUAGE_PHRASES.FILE_SIZE_WARNING); + if(data.target.files[0].size > 25000000) { + this.utility.showWarningMsg(LANGUAGE_PHRASES.FILE_SIZE_WARNING); + document.getElementById("ch_media_docker").classList.remove("ch-show-docker"); + } else this.sendMessage("image"); }); @@ -503,8 +508,10 @@ class ConversationWindow { // Send message on audio choose let audioInput = document.getElementById("ch_audio_input"); audioInput.addEventListener("change", (data) => { - if(data.target.files[0].size > 25000000) - this._showSnackbar(LANGUAGE_PHRASES.FILE_SIZE_WARNING); + if(data.target.files[0].size > 25000000) { + this.utility.showWarningMsg(LANGUAGE_PHRASES.FILE_SIZE_WARNING); + document.getElementById("ch_media_docker").classList.remove("ch-show-docker"); + } else this.sendMessage("audio"); }); @@ -512,27 +519,31 @@ class ConversationWindow { // Send message on video choose let videoInput = document.getElementById("ch_video_input"); videoInput.addEventListener("change", (data) => { - if(data.target.files[0].size > 25000000) - this._showSnackbar(LANGUAGE_PHRASES.FILE_SIZE_WARNING); + if(data.target.files[0].size > 25000000) { + this.utility.showWarningMsg(LANGUAGE_PHRASES.FILE_SIZE_WARNING); + document.getElementById("ch_media_docker").classList.remove("ch-show-docker"); + } else this.sendMessage("video"); }); } - _showSnackbar(text) { - // Show size limit exceed message - let snackbar = document.getElementById("ch_snackbar"); - snackbar.innerText = text; - snackbar.className = "show"; - setTimeout(function() { - snackbar.className = snackbar.className.replace("show", ""); - }, 3000); - } - sendMessage(msgType) { // Hide file picker document.getElementById("ch_media_docker").classList.remove("ch-show-docker"); + // Show loader image if media message + if(msgType != "text") { + if(document.getElementById("ch_no_msg")) + document.getElementById("ch_no_msg").remove(); + + let messagesBox = document.getElementById("ch_messages_box"); + let msgLoaderAttributes = [{"id":"ch_msg_loader"},{"class":"ch-msg-loader"}]; + let imageMsg = this.utility.createElement("div", msgLoaderAttributes, null, messagesBox); + imageMsg.style.backgroundImage = "url(" + IMAGES.MESSAGE_LOADER + ")"; + imageMsg.scrollIntoView(); + } + if(msgType == "text") { let inputValue = document.getElementById("ch_input_box").value; document.getElementById("ch_input_box").value = ""; @@ -541,12 +552,23 @@ class ConversationWindow { return; if(this.conversation.isDummyObject) { - this.chAdapter.sendTextMessageToUser(this.conversation.userId, inputValue, (err, res) => { + let data = { + type : "normal", + userId : this.conversation.userId, + body : inputValue + } + + this.chAdapter.sendMessageToUser(data, (err, res) => { if(err) return console.error(err); }); } else { - this.chAdapter.sendTextMessage(this.conversation, inputValue, [], (err, res) => { + let data = { + type : "normal", + body : inputValue + } + + this.chAdapter.sendMessage(this.conversation, data, (err, res) => { if(err) return console.error(err); }); } @@ -554,30 +576,54 @@ class ConversationWindow { else if(msgType == "image") { let file = document.getElementById("ch_image_input").files[0]; - this.chAdapter.sendFileMessage(this.conversation, file, true, (err, message) => { + // Upload file on channelize server + this.chAdapter.uploadFile(file, true, (err, fileData) => { if(err) return console.error(err); + + this._sendFileMessage(fileData); }); } else if(msgType == "audio") { let file = document.getElementById("ch_audio_input").files[0]; - this.chAdapter.sendFileMessage(this.conversation, file, true, (err, message) => { + // Upload file on channelize server + this.chAdapter.uploadFile(file, true, (err, fileData) => { if(err) return console.error(err); + + this._sendFileMessage(fileData); }); } else if(msgType == "video") { let file = document.getElementById("ch_video_input").files[0]; - - this.chAdapter.sendFileMessage(this.conversation, file, true, (err, message) => { + // Upload file on channelize server + this.chAdapter.uploadFile(file, true, (err, fileData) => { if(err) return console.error(err); + + this._sendFileMessage(fileData); }); } } - muteConversation() { - this.chAdapter.muteConversation(this.conversation, (err, res) => { - if(err) return console.error(err); - }); + _sendFileMessage(fileData) { + fileData.type = fileData.attachmentType; + + let data = { + type : "normal", + attachments : [fileData] + } + + // Send file message as attachment + if(this.conversation.isDummyObject) { + data['userId'] = this.conversation.userId; + this.chAdapter.sendMessageToUser(data, (err, message) => { + if(err) return console.error(err); + }); + } + else { + this.chAdapter.sendMessage(this.conversation, data, (err, message) => { + if(err) return console.error(err); + }); + } } clearConversation() { @@ -592,8 +638,8 @@ class ConversationWindow { }); } - _getMessages(conversation, limit, skip, cb) { - this.chAdapter.getMessages(conversation, limit, skip, (err, messages) => { + _getMessages(conversation, limit, skip, ids, types, attachmentTypes, ownerIds, cb) { + this.chAdapter.getMessages(conversation, limit, skip, ids, types, attachmentTypes, ownerIds, (err, messages) => { if(err) return cb(err); messages.reverse(); @@ -603,27 +649,79 @@ class ConversationWindow { _modifyMessage(message) { if(!message) - return; + return message; + + // Handle meta message + if(message.type == "admin") { + + // adminMessageType + switch(message.body) { + case "admin_group_create" : + message.body = LANGUAGE_PHRASES.GROUP_CREATED; + break; - let member = message.recipients.find(member => member.recipientId == window.userId); - message.createdAt = this.utility.updateTimeFormat(member.createdAt); - message.readStatus = member.status; + case "admin_group_change_photo" : + message.body = LANGUAGE_PHRASES.GROUP_PHOTO_CHANGED; + break; - if(message.isDeleted) - message.body = "" + LANGUAGE_PHRASES.MESSAGE_DELETED; + case "admin_group_change_title" : + message.body = LANGUAGE_PHRASES.GROUP_TITLE_CHANGED; + break; - return message; - } + case "admin_group_add_members" : + message.body = LANGUAGE_PHRASES.GROUP_MEMBER_ADDED; + break; - _markAsRead(conversation) { - this.chAdapter.markAsReadConversation(conversation, (err, res) => { - if(err) return console.error(err); - }); - } + case "admin_group_remove_members" : + message.body = LANGUAGE_PHRASES.GROUP_MEMBER_REMOVED; + break; - addNewMessage(message) { - let messagesBox = document.getElementById("ch_messages_box"); - if(message.chatId != this.conversation.id || !messagesBox) + case "admin_group_make_admin" : + message.body = LANGUAGE_PHRASES.GROUP_ADMIN_UPDATED; + break; + } + return message; + } + + // Set read status of message + if(!this.conversation.isDummyObject) { + message.readByAll = this.chAdapter.readByAllMembers(this.conversation, message); + } + + message.createdAt = this.utility.updateTimeFormat(message.createdAt); + + if(message.isDeleted) { + message.body = "" + LANGUAGE_PHRASES.MESSAGE_DELETED; + } + + return message; + } + + _markAsRead(conversation) { + let currentDate = new Date(); + let timestamp = currentDate.toISOString(); + this.chAdapter.markAsReadConversation(conversation, timestamp, (err, res) => { + if(err) return console.error(err); + }); + } + + addNewMessage(message) { + message = this._modifyMessage(message); + this.messages.push(message); + + let messagesBox = document.getElementById("ch_messages_box"); + if(message.type == "admin") { + let metaMessageAttributes = [{"class":"ch-admin-msg"}]; + this.utility.createElement("div", metaMessageAttributes, message.body, messagesBox); + return; + } + + // Hide message loader + if(document.getElementById("ch_msg_loader") && message.ownerId == this.widget.userId) { + document.getElementById("ch_msg_loader").remove(); + } + + if(message.conversationId != this.conversation.id || !messagesBox) return; message.createdAt = this.utility.updateTimeFormat(Date()); @@ -651,19 +749,19 @@ class ConversationWindow { let msgDiv = this.utility.createElement("div", msgDivAttributes, message.body, msgContainer); // Create media message frame - this._createMediaMessageFrame(message); + this._createMediaMessageFrame(message, msgDiv); // Create message time span let msgTimeAttributes = [{"id":"ch_msg_time"},{"class":"ch-msg-time"}]; let msgTime = this.utility.createElement("span", msgTimeAttributes, message.createdAt, msgContainer); - if(message.ownerId == window.userId) { + if(message.ownerId == this.widget.userId) { msgContainer.classList.add("right"); moreOption.classList.add("left"); // Create message read status let statusAttributes = [{"id":"ch_msg_status"}]; - let readIcon = message.readStatus == 3 ? "done_all" : "check"; + let readIcon = message.readByAll ? "done_all" : "check"; let msgStatus = this.utility.createElement("i", statusAttributes, readIcon, msgContainer); msgStatus.classList.add("material-icons", "ch-msg-status"); } @@ -678,84 +776,124 @@ class ConversationWindow { // Scroll to new message if(messagesBox) messagesBox.scrollTop = messagesBox.scrollHeight; - } + } + + updateMsgStatus(data) { + if(data.conversation.id != this.conversation.id) + return; - updateStatus(user) { - if(this.conversation.isGroup || (this.conversation.member && this.conversation.member.userId != user.id)) - return; + if(!this.conversation.isGroup) { + if(this.messages[this.messages.length-2].readByAll) { + let lastMessage = this.messages[this.messages.length-1]; + lastMessage.readByAll = true; - if(user.isOnline) { - this.conversation.status = LANGUAGE_PHRASES.ONLINE; - } - else if(!user.isOnline && user.lastSeen) { - this.conversation.status = LANGUAGE_PHRASES.LAST_SEEN + this.utility.updateTimeFormat(user.lastSeen); - } - document.getElementById("ch_conv_status").innerText = this.conversation.status; - } - - _createMediaMessageFrame(message) { - let messageBox = document.getElementById("ch_message_"+message.id); - - // Create message div - if(!message.contentType && message.attachmentType != "text") { - let attachmentData = Object.keys(message.attachment).length != 0 ? message.attachment : message.fileData; - - if(message.attachmentType == "audio") { - let audioMsgAttributes = [{"id":"ch_audio_message"},{"class":"ch-audio-message"},{"src":attachmentData.fileUrl}]; - let audioTag = this.utility.createElement("audio", audioMsgAttributes, null, messageBox); - audioTag.setAttribute("controls",true); - } - else if(message.attachmentType == "video") { - let videoMsgAttributes = [{"id":"ch_video_message"},{"class":"ch-video-message"}]; - let videoMessage = this.utility.createElement("div", videoMsgAttributes, null, messageBox); - videoMessage.style.backgroundImage = "url(" + attachmentData.thumbnailUrl + ")"; - - // Create play icon - let playIconAttributes = [{"id":"ch_play_icon"}]; - let playIcon = this.utility.createElement("i", playIconAttributes, "play_circle_outline", videoMessage); - playIcon.classList.add("material-icons", "ch-play-icon"); - - // Set video message listener - videoMessage.addEventListener("click", data => { - window.open(attachmentData.fileUrl, "_blank"); - }); - } - else { - let imageMsgAttributes = [{"id":"ch_image_message"},{"class":"ch-image-message"}]; - let imageMsg = this.utility.createElement("div", imageMsgAttributes, null, messageBox); - imageMsg.style.backgroundImage = "url(" + attachmentData.thumbnailUrl + ")"; - - // Set image message listener - imageMsg.addEventListener("click", data => { - window.open(attachmentData.fileUrl, "_blank"); + // Update read tag icon + let msgDiv = document.getElementById(lastMessage.id); + if(msgDiv) { + let statusDiv = msgDiv.querySelector("#ch_msg_status"); + + if(statusDiv) { + statusDiv.innerHTML = "done_all"; + } + } + } + else { + this.messages.forEach(msg => { + msg.readByAll = true; + + // Update read tag icon + let msgDiv = document.getElementById(msg.id); + if(msgDiv) { + let statusDiv = msgDiv.querySelector("#ch_msg_status"); + + if(statusDiv) { + statusDiv.innerHTML = "done_all"; + } + } }); - } - } - else if(message.contentType == 2) { - let stickerMsgAttributes = [{"id":"ch_sticker_message"},{"class":"ch-sticker-message"}]; - let stickerMsg = this.utility.createElement("div", stickerMsgAttributes, null, messageBox); - stickerMsg.style.backgroundImage = "url(" + message.originalUrl + ")"; + } + } + } - } - else if(message.contentType == 3) { - let locationSrc = SETTINGS.LOCATION_IMG_URL + "?center=" + - message.data.latitude + "," + message.data.longitude + "&zoom=15&size=208x100&maptype=roadmap&markers=color:red%7C" + - message.data.latitude + "," + message.data.longitude + "&key=" + SETTINGS.LOCATION_API_KEY; - - let locationMsgAttributes = [{"id":"ch_location_message"},{"class":"ch-location-message"}]; - let locationMsg = this.utility.createElement("div", locationMsgAttributes, null, messageBox); - locationMsg.style.backgroundImage = "url(" + locationSrc + ")"; - - // Set location message listener - locationMsg.addEventListener("click", data => { - let mapUrl = "https://www.google.com/maps?z=15&t=m&q=loc:"+message.data.latitude+","+message.data.longitude; - window.open(mapUrl, "_blank"); - }); - } - } + updateUserStatus(user) { + if(this.conversation.isGroup || !this.conversation.user || (this.conversation.user.id != user.id)) + return; - _addListenerOnMoreOption(message, moreOption, msgList) { + if(user.isOnline) { + this.conversation.status = LANGUAGE_PHRASES.ONLINE; + } + else if(!user.isOnline && user.lastSeen) { + this.conversation.status = LANGUAGE_PHRASES.LAST_SEEN + this.utility.updateTimeFormat(user.lastSeen); + } + document.getElementById("ch_conv_status").innerText = this.conversation.status; + } + _createMediaMessageFrame(message, parentDiv) { + + // Create message div + if(!message.body && Object.keys(message.attachments).length != 0) { + message.attachments.forEach(attachment => { + + if(attachment.type == "audio") { + let audioMsgAttributes = [{"id":"ch_audio_message"},{"class":"ch-audio-message"},{"src":attachment.fileUrl}]; + let audioTag = this.utility.createElement("audio", audioMsgAttributes, null, parentDiv); + audioTag.setAttribute("controls",true); + } + else if(attachment.type == "video") { + let videoMsgAttributes = [{"id":"ch_video_message"},{"class":"ch-video-message"}]; + let videoMessage = this.utility.createElement("div", videoMsgAttributes, null, parentDiv); + videoMessage.style.backgroundImage = "url(" + attachment.thumbnailUrl + ")"; + + // Create play icon + let playIconAttributes = [{"id":"ch_play_icon"}]; + let playIcon = this.utility.createElement("i", playIconAttributes, "play_circle_outline", videoMessage); + playIcon.classList.add("material-icons", "ch-play-icon"); + + // Set video message listener + videoMessage.addEventListener("click", data => { + window.open(attachment.fileUrl, "_blank"); + }); + } + else if(attachment.type == "sticker") { + let stickerMsgAttributes = [{"id":"ch_sticker_message"},{"class":"ch-sticker-message"}]; + let stickerMsg = this.utility.createElement("div", stickerMsgAttributes, null, parentDiv); + stickerMsg.style.backgroundImage = "url(" + attachment.originalUrl + ")"; + } + else if(attachment.type == "gif") { + let stickerMsgAttributes = [{"id":"ch_gif_message"},{"class":"ch-sticker-message"}]; + let stickerMsg = this.utility.createElement("div", stickerMsgAttributes, null, parentDiv); + stickerMsg.style.backgroundImage = "url(" + attachment.originalUrl + ")"; + } + else if(attachment.type == "location") { + let locationSrc = SETTINGS.LOCATION_IMG_URL + "?center=" + + attachment.latitude + "," + attachment.longitude + "&zoom=15&size=208x100&maptype=roadmap&markers=color:red%7C" + + attachment.latitude + "," + attachment.longitude + "&key=" + SETTINGS.LOCATION_API_KEY; + + let locationMsgAttributes = [{"id":"ch_location_message"},{"class":"ch-location-message"}]; + let locationMsg = this.utility.createElement("div", locationMsgAttributes, null, parentDiv); + locationMsg.style.backgroundImage = "url(" + locationSrc + ")"; + + // Set location message listener + locationMsg.addEventListener("click", data => { + let mapUrl = "https://www.google.com/maps?z=15&t=m&q=loc:"+attachment.latitude+","+attachment.longitude; + window.open(mapUrl, "_blank"); + }); + } + else { + let imageMsgAttributes = [{"id":"ch_image_message"},{"class":"ch-image-message"}]; + let imageMsg = this.utility.createElement("div", imageMsgAttributes, null, parentDiv); + imageMsg.style.backgroundImage = "url(" + attachment.thumbnailUrl + ")"; + + // Set image message listener + imageMsg.addEventListener("click", data => { + window.open(attachment.fileUrl, "_blank"); + }); + } + }); + } + } + + _addListenerOnMoreOption(message, moreOption, msgList) { moreOption.addEventListener("click", (data) => { if(document.getElementById("ch_msg_option_container")) { document.getElementById("ch_msg_option_container").remove(); @@ -766,7 +904,7 @@ class ConversationWindow { let msgOptionsContainerAttributes = [{"id":"ch_msg_option_container"},{"class":"ch-msg-option-container"}]; let msgOptionsContainer = this.utility.createElement("div", msgOptionsContainerAttributes, null, msgList); - if(message.ownerId == window.userId) + if(message.ownerId == this.widget.userId) msgOptionsContainer.style.left = "15px"; else msgOptionsContainer.style.right = "15px"; @@ -785,7 +923,7 @@ class ConversationWindow { }) }); - if(!message.isDeleted && message.ownerId == window.userId) { + if(!message.isDeleted && message.ownerId == this.widget.userId) { // Create delete message for everyone option let deleteMsgEveryoneAttributes = [{"id":"ch_msg_delete_for_everyone"},{"class":"ch-msg-delete-for-everyone"}]; let deleteMsgEveryoneOption = this.utility.createElement("div", deleteMsgEveryoneAttributes, LANGUAGE_PHRASES.DELETE_FOR_EVERYONE, msgOptionsContainer); @@ -801,39 +939,63 @@ class ConversationWindow { }); } }); - } + } - updateDeleteForEveryoneMsg(msgData) { - // Update text of deleted message - let convTargetMsg = document.getElementById("ch_message_" + msgData.deletedIds[0]); - if(convTargetMsg) { - convTargetMsg.innerHTML = "" + LANGUAGE_PHRASES.MESSAGE_DELETED; - } + updateDeleteForEveryoneMsg(data) { + if(this.conversation.id != data.conversation.id) + return; + + // Update text of deleted message + let convTargetMsg = document.getElementById("ch_message_" + data.messages[0].id); + if(convTargetMsg) { + convTargetMsg.innerHTML = "" + LANGUAGE_PHRASES.MESSAGE_DELETED; + } // Update listener of deleted message - let deletedMsgOptionBtn = document.getElementById(msgData.deletedIds[0]).lastChild; - deletedMsgOptionBtn.addEventListener("click", data => { - // Remove delete for everyone option - let deleteForEveryoneBtn = document.getElementById("ch_msg_delete_for_everyone"); - if(deleteForEveryoneBtn) { - deleteForEveryoneBtn.remove(); - } - }); - } - - handleBlock(self, userId) { - document.getElementById("ch_conv_block").style.display = "none";; - document.getElementById("ch_conv_unblock").style.display = "block"; - document.getElementById("ch_conv_status").style.visibility = "hidden"; + let deletedMsgOptionBtn = document.getElementById(data.messages[0].id).lastChild; + deletedMsgOptionBtn.addEventListener("click", data => { + // Remove delete for everyone option + let deleteForEveryoneBtn = document.getElementById("ch_msg_delete_for_everyone"); + if(deleteForEveryoneBtn) { + deleteForEveryoneBtn.remove(); + } + }); + } + + handleBlock(data) { + if(this.conversation.isGroup) + return; + + if(this.conversation.user.id == data.blockee.id) { + document.getElementById("ch_conv_block").style.display = "none";; + document.getElementById("ch_conv_unblock").style.display = "block"; + } + + // Hide status and input field + document.getElementById("ch_conv_status").style.visibility = "hidden"; document.getElementById("ch_send_box").style.visibility = "hidden"; - } + } - handleUnblock(self, userId) { - document.getElementById("ch_conv_unblock").style.display = "none"; - document.getElementById("ch_conv_block").style.display = "block"; - document.getElementById("ch_conv_status").style.visibility = "visible"; + handleUnblock(data) { + if(this.conversation.isGroup) + return; + + if(this.conversation.user.id == data.unblockee.id) { + document.getElementById("ch_conv_unblock").style.display = "none"; + document.getElementById("ch_conv_block").style.display = "block"; + } + + // Show status and input field + document.getElementById("ch_conv_status").style.visibility = "visible"; document.getElementById("ch_send_box").style.visibility = "visible"; - } + } + + handleClearConversation(conv) { + if(conv.id != this.conversation.id) + return; + + document.getElementById("ch_messages_box").innerHTML = ""; + } } export { ConversationWindow as default }; \ No newline at end of file diff --git a/web-widget/src/js/components/login.js b/web-widget/src/js/components/login.js old mode 100755 new mode 100644 index 4a2c0bc..0b79a05 --- a/web-widget/src/js/components/login.js +++ b/web-widget/src/js/components/login.js @@ -45,7 +45,7 @@ class Login { this.utility.createElement("div", loginNameAttributes, LANGUAGE_PHRASES.NAME, loginNameContainer); // Create input div - let loginNameInputAttributes = [{"id":"ch_login_name_input"},{"class":"ch-login-name-input"},{"type":"text"}]; + let loginNameInputAttributes = [{"id":"ch_login_name_input"},{"class":"ch-login-name-input"},{"type":"text"},{"placeholder":"Enter a name"}]; this.utility.createElement("input", loginNameInputAttributes, null, loginNameContainer); // Create error div @@ -58,7 +58,6 @@ class Login { // Create Login button let loginBtnAttributes = [{"id":"ch_login_btn"},{"class":"ch-login-btn"}]; this.utility.createElement("button", loginBtnAttributes, LANGUAGE_PHRASES.START, loginWindow); - } _createDummyUsersContainer(parent) { @@ -75,7 +74,7 @@ class Login { let user1 = this.utility.createElement("img", dummyUser1Attributes, null, dummyContainer); user1.addEventListener("click", (data) => { - const email = "test1@channelize.io"; + const email = "test1@seaddons.com"; const password = "123456"; this._loginUser(email, password, true); }); @@ -85,7 +84,7 @@ class Login { let user2 = this.utility.createElement("img", dummyUser2Attributes, null, dummyContainer); user2.addEventListener("click", (data) => { - const email = "test2@channelize.io"; + const email = "test2@seaddons.com"; const password = "123456"; this._loginUser(email, password, true); }); @@ -95,8 +94,8 @@ class Login { let user3 = this.utility.createElement("img", dummyUser3Attributes, null, dummyContainer); user3.addEventListener("click", (data) => { - const email = "test3@channelize.io"; - const password = "123456"; + const email = "test@channelize.io"; + const password = "Test@123456"; this._loginUser(email, password, true); }); @@ -105,8 +104,8 @@ class Login { let user4 = this.utility.createElement("img", dummyUser4Attributes, null, dummyContainer); user4.addEventListener("click", (data) => { - const email = "test4@channelize.io"; - const password = "123456"; + const email = "heyley@channelize.io"; + const password = "Test@123456"; this._loginUser(email, password, true); }); } @@ -124,8 +123,8 @@ class Login { document.getElementById("ch_login_loader_container").style.display = "block"; - var email = name.replace(/\s/g, '').toLowerCase() + '@gmail.com'; - const password = "12345"; + var email = name.replace(/\s/g, '').toLowerCase() + "@channelize.io"; + const password = "123456"; // Create a new user this.chAdapter.createUser(name, email, password, (err, user) => { @@ -147,14 +146,14 @@ class Login { this.chAdapter.loginWithEmail(email, password, (err, res) => { if(err) console.error(err); - const userId = window.userId = res.user.id; + const userId = this.widget.userId = res.user.id; const accessToken = res.id; // Connect to Channelize Server this.widget.connect(userId, accessToken, (err,res) => { if(err) console.error(err); // Set cookies - this.widget.setCookie(userId, accessToken, 1); + this.widget.setCookie(userId, accessToken, 30); if(isDummyUser) { // Open recent conversation window @@ -164,17 +163,19 @@ class Login { document.getElementById("ch_login_window").remove(); } else { + new RecentConversations(this.widget); // Add channelize.io team as a friend - const channelizeTeamId = "16d31770-8843-11e9-88fd-33cb21cf39cd"; // Channelize.io account ID + // const channelizeTeamId = "16d31770-8843-11e9-88fd-33cb21cf39cd"; // Channelize.io account ID - this.chAdapter.addFriend(channelizeTeamId, 2, (err, res) => { - if(err) return console.error(err); + // this.chAdapter.addFriend(channelizeTeamId, 2, (err, res) => { + // if(err) return console.error(err); - // Open recent conversation window - new RecentConversations(this.widget); - // Close login window - document.getElementById("ch_login_window").remove(); - }); + // // Open recent conversation window + // new RecentConversations(this.widget); + // }); + + // Close login window + document.getElementById("ch_login_window").remove(); } }); }); @@ -184,7 +185,6 @@ class Login { // Login button listener let loginBtn = document.getElementById("ch_login_btn"); loginBtn.addEventListener("click", data => { - this._createUser(); }); diff --git a/web-widget/src/js/components/recent-conversations.js b/web-widget/src/js/components/recent-conversations.js old mode 100755 new mode 100644 index 13396c5..248f0ca --- a/web-widget/src/js/components/recent-conversations.js +++ b/web-widget/src/js/components/recent-conversations.js @@ -75,7 +75,7 @@ class RecentConversations { this._registerClickEventHandlers(); // Set user image in header - this.getUser(window.userId, (err, user) => { + this.getUser(this.widget.userId, (err, user) => { if(err) return console.error(err); let imgAttributes = [{"class":"ch-conversation-image"}]; @@ -91,7 +91,7 @@ class RecentConversations { _loadConversations() { // Load conversations - this.chAdapter.getConversationsList(this.limit, this.skip, null, (err, conversations) => { + this.chAdapter.getConversationsList(this.limit, this.skip, null, "members", null, null, null, null, null, (err, conversations) => { if(err) return console.error(err); this.conversations = conversations; @@ -115,9 +115,8 @@ class RecentConversations { let ul = document.getElementById("ch_recent_ul"); conversations.forEach(conversation => { + // modify conversation object conversation = this.modifyConversation(conversation); - if(!conversation.member) - return; // Create list of conversations let listAttributes = [{"id":conversation.id}]; @@ -140,18 +139,21 @@ class RecentConversations { let imgDiv = this.utility.createElement("div", imgAttributes, null, list); imgDiv.style.backgroundImage = "url(" + conversation.profileImageUrl + ")"; - // Create online icon - let iconAttributes = [{"id":conversation.member.userId+"_online_icon"},{"class":"ch-online-icon"}]; - let icon = this.utility.createElement("span", iconAttributes, null, imgDiv); + if(!conversation.isGroup && conversation.user) { + // Create online icon + let iconAttributes = [{"id":conversation.user.id+"_online_icon"},{"class":"ch-online-icon"}]; + let icon = this.utility.createElement("span", iconAttributes, null, imgDiv); - // Show block icon - if(conversation.blockedByUser || conversation.blockedByMember) { - icon.classList.add("ch-user-blocked"); - icon.classList.add("ch-show-element"); - } + // Show block icon + if(conversation.blockedByUser || conversation.blockedByMember) { + icon.classList.add("ch-user-blocked"); + } - if(!conversation.isGroup && conversation.member.user && conversation.member.user.isOnline) - icon.classList.add("ch-show-element"); + // Show online icon + if(conversation.user && conversation.user.isOnline) { + icon.classList.add("ch-show-element"); + } + } // Create title div let titleDivAttributes = [{"id":"ch_title"}]; @@ -165,7 +167,7 @@ class RecentConversations { let lastMsgBoxAttributes = [{"id":"ch_last_msg_box"},{"class":"ch-last-msg-box"}]; let lastMsgBox = this.utility.createElement("div", lastMsgBoxAttributes, null, list); - if(conversation.lastMessageType != "text") { + if(conversation.lastMessageIcon) { // Create last message icon let msgIconAttributes = [{"id":"ch_msg_type_icon"},{"class":"ch-msg-type-icon"},{"src":conversation.lastMessageIcon}]; this.utility.createElement("img", msgIconAttributes, null, lastMsgBox); @@ -186,106 +188,116 @@ class RecentConversations { } modifyConversation(conversation) { - let member = conversation.membersList.find(member => member.userId != window.userId); - if (!member || !member.user) { - conversation.title = LANGUAGE_PHRASES.DELETED_MEMBER; - conversation.profileImageUrl = null; - conversation.isOnline = false; - return conversation; - } - - //Set profile Image of conversation - let imgUrl; - if(!conversation.isGroup) - imgUrl = IMAGES.AVTAR; - else - imgUrl = IMAGES.GROUP; - - if(conversation.isGroup) - conversation.profileImageUrl = conversation.profileImageUrl ? conversation.profileImageUrl : imgUrl; - else - conversation.profileImageUrl = member.user.profileImageUrl ? member.user.profileImageUrl : imgUrl; - - // Set conversation title and member status - conversation.title = conversation.isGroup ? conversation.title : member.user.displayName; - conversation.isOnline = member.user ? member.user.isOnline : false; - conversation.member = member; - - let loginUser = conversation.membersList.find(member => member.userId == window.userId); - conversation = this._setLastMessage(conversation, loginUser.lastMessage); - - // Set block user status - if(!member.isActive) - conversation.blockedByMember = true; - - if(!loginUser.isActive) - conversation.blockedByUser = true; - - conversation.modified = true; + if (!conversation.isGroup && Object.entries(conversation.user).length === 0) { + conversation.title = LANGUAGE_PHRASES.DELETED_MEMBER; + conversation.profileImageUrl = IMAGES.AVTAR; + return conversation; + } + + // Set last message of conversation + conversation = this._setLastMessage(conversation, conversation.lastMessage); + + // Set profile Image, title and status of conversation + if(conversation.isGroup) { + conversation.profileImageUrl = conversation.profileImageUrl ? conversation.profileImageUrl : IMAGES.GROUP; + conversation.status = conversation.memberCount + " " + LANGUAGE_PHRASES.MEMBERS; + } + else { + conversation.profileImageUrl = conversation.user.profileImageUrl ? conversation.user.profileImageUrl : IMAGES.AVTAR; + conversation.title = conversation.user.displayName; + + // Set block user status + let member = conversation.members.find(member => member.userId == conversation.user.id); + if(!member) { + conversation.blockedByMember = true; + conversation.status = ""; + } + else { + conversation.blockedByMember = member ? false : true; + if(!conversation.isActive) { + conversation.blockedByUser = true; + } + + if(conversation.user.isOnline) { + conversation.status = LANGUAGE_PHRASES.ONLINE; + } + else { + conversation.status = LANGUAGE_PHRASES.LAST_SEEN + this.utility.updateTimeFormat(member.user.lastSeen); + } + } + } + conversation.isModified = true; return conversation; } _setLastMessage(conversation, message) { if(!message) return conversation; + // Set lastMessage of conersation - if(!message.contentType || message.contentType == 0) { - if(message.isDeleted) { - conversation.lastMessageType = "text"; - conversation.lastMessageBody = "" + LANGUAGE_PHRASES.MESSAGE_DELETED; - } - else if(message.attachmentType && message.attachmentType != "text") { - let icon; - - switch(message.attachmentType) { - case "image": - icon = IMAGES.GALLERY_ICON; - conversation.lastMessageBody = LANGUAGE_PHRASES.IMAGE; - break; - - case "audio": - icon = IMAGES.AUDIO_ICON; - conversation.lastMessageBody = LANGUAGE_PHRASES.AUDIO; - break; - - case "video": - icon = IMAGES.GALLERY_ICON; - conversation.lastMessageBody = LANGUAGE_PHRASES.VIDEO; - break; - } - conversation.lastMessageType = message.attachmentType; - conversation.lastMessageIcon = icon; - } - else { - conversation.lastMessageType = "text"; - conversation.lastMessageBody = message.body; - } + conversation.lastMessage = message; + if(message.isDeleted) { + conversation.lastMessageIcon = null; + conversation.lastMessageBody = "" + LANGUAGE_PHRASES.MESSAGE_DELETED; } - else if(message.contentType == 2) { - if(message.attachmentType == "sticker") { - conversation.lastMessageBody = LANGUAGE_PHRASES.STICKER; - conversation.lastMessageType = "sticker"; - conversation.lastMessageIcon = IMAGES.STICKER_ICON; - } - else { - conversation.lastMessageBody = LANGUAGE_PHRASES.GIF; - conversation.lastMessageType = "gif"; - conversation.lastMessageIcon = IMAGES.GIF_ICON; + else if(message.type != "normal") { + conversation.lastMessageIcon = null; + conversation.lastMessageBody = this._modifyMessageBody(message); + } + else if(message.attachments && message.attachments.length) { + + switch(message.attachments[0].type) { + case "image": + conversation.lastMessageIcon = IMAGES.GALLERY_ICON; + conversation.lastMessageBody = LANGUAGE_PHRASES.IMAGE; + break; + + case "audio": + conversation.lastMessageIcon = IMAGES.AUDIO_ICON; + conversation.lastMessageBody = LANGUAGE_PHRASES.AUDIO; + break; + + case "video": + conversation.lastMessageIcon = IMAGES.GALLERY_ICON; + conversation.lastMessageBody = LANGUAGE_PHRASES.VIDEO; + break; + + case "location": + conversation.lastMessageIcon = IMAGES.LOCATION_ICON; + conversation.lastMessageBody = LANGUAGE_PHRASES.LOCATION; + break; + + case "sticker": + conversation.lastMessageIcon = IMAGES.STICKER_ICON; + conversation.lastMessageBody = LANGUAGE_PHRASES.STICKER; + break; + + case "gif": + conversation.lastMessageIcon = IMAGES.GIF_ICON; + conversation.lastMessageBody = LANGUAGE_PHRASES.GIF; + break; + + case "text": + conversation.lastMessageIcon = IMAGES.GALLERY_ICON; + conversation.lastMessageBody = message.body; + break; + + default: + conversation.lastMessageIcon = IMAGES.GALLERY_ICON; + conversation.lastMessageBody = LANGUAGE_PHRASES.ATTACHMENT; } } - else if(message.contentType == 3) { - conversation.lastMessageBody = LANGUAGE_PHRASES.LOCATION; - conversation.lastMessageType = "location"; - conversation.lastMessageIcon = IMAGES.LOCATION_ICON; + else { + conversation.lastMessageIcon = null; + conversation.lastMessageBody = message.body; } // Set Last Message time - if(!message.recipients.length) { + if(!message.updatedAt) { conversation.lastMessageTime = this.utility.updateTimeFormat(Date()); } else { - let loginUser = conversation.membersList.find(member => member.userId == window.userId); - conversation.lastMessageTime = this.utility.updateTimeFormat(loginUser.updatedAt); + conversation.lastMessageTime = this.utility.updateTimeFormat(message.updatedAt); } // Set last message Id @@ -294,7 +306,7 @@ class RecentConversations { } deleteLastMessage(data, updatedLastMsg) { - let targetLastMsg = document.getElementById("ch_msg_" + data.messageIds[0]); + let targetLastMsg = document.getElementById("ch_msg_" + data.messages[0].id); if(!updatedLastMsg) { targetLastMsg.innerHTML = ""; return; @@ -367,7 +379,7 @@ class RecentConversations { return; } - let convToUpdate = this.conversations.find(conv => conv.id == message.chatId); + let convToUpdate = this.conversations.find(conv => conv.id == message.conversationId); // Update recent conversation list if exist if(convToUpdate && document.getElementById(convToUpdate.id)) { @@ -377,7 +389,7 @@ class RecentConversations { } else { // Get new conversation object - this.chAdapter.getConversation(message.chatId, (err, conversation) => { + this.chAdapter.getConversation(message.conversationId, (err, conversation) => { if(err) return console.error(err); // Remove no message tag if exist @@ -405,36 +417,79 @@ class RecentConversations { } } - updateUserOnline(user) { - if(!this.conversations) + _modifyMessageBody(message) { + if(!message) return; - this.conversations.forEach(conversation => { - if(conversation.member.userId == user.id) { - conversation.status = "Online"; - return; - } - }); + // Handle meta message + if(message.type == "admin") { + let body; - let onlineIcon = document.getElementById(user.id+"_online_icon"); - if(onlineIcon) { - onlineIcon.classList.remove("ch-user-blocked"); - onlineIcon.classList.add("ch-show-element"); + // adminMessageType + switch(message.body) { + case "admin_group_create" : + body = "" + LANGUAGE_PHRASES.GROUP_CREATED; + break; + + case "admin_group_change_photo" : + body = "" + LANGUAGE_PHRASES.GROUP_PHOTO_CHANGED; + break; + + case "admin_group_change_title" : + body = "" + LANGUAGE_PHRASES.GROUP_TITLE_CHANGED; + break; + + case "admin_group_add_members" : + body = "" + LANGUAGE_PHRASES.GROUP_MEMBER_ADDED; + break; + + case "admin_group_remove_members" : + body = "" + LANGUAGE_PHRASES.GROUP_MEMBER_REMOVED; + break; + + case "admin_group_make_admin" : + body = "" + LANGUAGE_PHRASES.GROUP_ADMIN_UPDATED; + break; + + default: + body = "" + message.type + " message"; + } + return body; } } - updateUserOffline(user) { + updateUserStatus(user) { if(!this.conversations) return; - let conv = this.conversations.find(conversation => { - conversation.member.userId == user.id; - conversation.status = this.utility.updateTimeFormat(user.lastSeen); - }); + const index = this.conversations.findIndex(conversation => conversation.user.id == user.id); + if(index != -1) { + this.conversations[index].user = user; + if(user.isOnline) { + this.conversations[index].status = LANGUAGE_PHRASES.ONLINE; + } + else { + this.conversations[index].status = LANGUAGE_PHRASES.LAST_SEEN + this.utility.updateTimeFormat(user.lastSeen); + } + } - let onlineIcon = document.getElementById(user.id+"_online_icon"); - if(onlineIcon) { - onlineIcon.classList.remove("ch-show-element"); + // Update block/unblock icon + let userStatusIcon = document.getElementById(user.id+"_online_icon"); + if(!userStatusIcon) + return; + + if(user.isOnline) { + userStatusIcon.classList.add("ch-show-element"); + } + else { + userStatusIcon.classList.remove("ch-show-element"); + } + } + + updateReadAt(data) { + let index = this.conversations.findIndex(conv => conv.id == data.conversation.id); + if(index != -1) { + this.conversations[index].lastReadAt[data.userId] = data.timestamp; } } @@ -445,7 +500,7 @@ class RecentConversations { let newConvlist = this.utility.createElement("li", listAttributes, null, null); ul.insertBefore(newConvlist, ul.childNodes[0]); - // Add event listener on new conversation + // Add event listener on new conversation list newConvlist.addEventListener("click", (data) => { if(document.getElementById("ch_conv_window")) { document.getElementById("ch_conv_window").remove(); @@ -462,6 +517,22 @@ class RecentConversations { let imgDiv = this.utility.createElement("div", imgAttributes, null, newConvlist); imgDiv.style.backgroundImage = "url(" + conversation.profileImageUrl + ")"; + if(!conversation.isGroup && conversation.user) { + // Create online icon + let iconAttributes = [{"id":conversation.user.id+"_online_icon"},{"class":"ch-online-icon"}]; + let icon = this.utility.createElement("span", iconAttributes, null, imgDiv); + + // Show block icon + if(conversation.blockedByUser || conversation.blockedByMember) { + icon.classList.add("ch-user-blocked"); + } + + // Show online icon + if(conversation.user && conversation.user.isOnline) { + icon.classList.add("ch-show-element"); + } + } + // Create title div let titleAttributes = [{"id":"ch_title"}]; this.utility.createElement("div", titleAttributes, conversation.title, newConvlist); @@ -474,7 +545,7 @@ class RecentConversations { let lastMsgBoxAttributes = [{"id":"ch_last_msg_box"},{"class":"ch-last-msg-box"}]; let lastMsgBox = this.utility.createElement("div", lastMsgBoxAttributes, null, newConvlist); - if(conversation.lastMessageType != "text") { + if(conversation.lastMessageIcon) { // Create last message icon let msgIconAttributes = [{"id":"ch_msg_type_icon"},{"class":"ch-msg-type-icon"},{"src":conversation.lastMessageIcon}]; this.utility.createElement("img", msgIconAttributes, null, lastMsgBox); @@ -492,7 +563,7 @@ class RecentConversations { _loadMoreConversations() { ++this.loadCount; this.skip = this.loadCount * this.limit; - this.chAdapter.getConversationsList(this.limit, this.skip, null, (err, conversations) => { + this.chAdapter.getConversationsList(this.limit, this.skip, null, "members", null, null, null, null, null, (err, conversations) => { if(err) return console.error(err); this._createConversationListing(conversations); @@ -554,34 +625,42 @@ class RecentConversations { }); } - handleBlock(self, userId) { + handleBlock(data) { this.conversations.forEach(conversation => { - if(conversation.member.userId == userId && self) { + if(conversation.isGroup) + return; + + if(conversation.user.id == data.blocker.id) { conversation.blockedByMember = true; } - else if(conversation.member.userId == userId && !self) { + else if(conversation.user.id == data.blockee.id) { conversation.blockedByUser = true; } }); - let onlineIcon = document.getElementById(userId+"_online_icon"); - if(onlineIcon) + let onlineIcon = document.getElementById(data.blockee.id+"_online_icon"); + if(onlineIcon) { onlineIcon.classList.add("ch-user-blocked"); + } } - handleUnblock(self, userId) { + handleUnblock(data) { this.conversations.forEach(conversation => { - if(conversation.member.userId == userId && self) { + if(conversation.isGroup) + return; + + if(conversation.user.id == data.unblocker.id) { conversation.blockedByMember = false; } - else if(conversation.member.userId == userId && !self) { + else if(conversation.user.id == data.unblockee.id) { conversation.blockedByUser = false; } }); - let onlineIcon = document.getElementById(userId+"_online_icon"); - if(onlineIcon) + let onlineIcon = document.getElementById(data.unblockee.id+"_online_icon"); + if(onlineIcon) { onlineIcon.classList.remove("ch-user-blocked"); + } } } diff --git a/web-widget/src/js/components/search.js b/web-widget/src/js/components/search.js old mode 100755 new mode 100644 index cfd1397..a522a4a --- a/web-widget/src/js/components/search.js +++ b/web-widget/src/js/components/search.js @@ -8,6 +8,10 @@ class Search { this.chAdapter = widget.chAdapter; this.widget = widget; this.utility = new Utility(); + this.searchLimit = 10; + this.friendsLimit = 20; + this.friends = []; + this.users = []; this.createSearchComponents(); this._registerClickEventHandlers(); @@ -21,7 +25,7 @@ class Search { // Create search header let searchHeaderAttributes = [{"id":"ch_search_header"},{"class":"ch-header"}]; - let searchHeader = this.utility.createElement("div", searchHeaderAttributes, LANGUAGE_PHRASES.SEARCH, searchWindow); + let searchHeader = this.utility.createElement("div", searchHeaderAttributes, LANGUAGE_PHRASES.SEARCH_MEMBERS, searchWindow); // Create search Close button let closeBtnAttributes = [{"id":"ch_search_close_btn"}]; @@ -33,7 +37,7 @@ class Search { let searchBox = this.utility.createElement("div", searchBoxAttributes, null, searchWindow); // Create search input box - let inputBoxAttributes = [{"id":"ch_search_input_box"},{"class":"ch-search-input-box"}]; + let inputBoxAttributes = [{"id":"ch_search_input_box"},{"class":"ch-search-input-box"},{"placeholder":LANGUAGE_PHRASES.SEARCH}]; this.utility.createElement("input", inputBoxAttributes, null, searchBox); // Create clear search icon @@ -45,24 +49,45 @@ class Search { let friendsBoxAttributes = [{"id":"ch_friends_box"},{"class":"ch-friends-box"}]; let friendsBox = this.utility.createElement("div", friendsBoxAttributes, null, searchWindow); + // Create loader container + let loaderContainerAttributes = [{"id":"ch_search_loader_container"},{"class":"ch-loader-bg"}]; + let loaderContainer = this.utility.createElement("div", loaderContainerAttributes, null, friendsBox); + loaderContainer.style.display = "block"; + + // Create loader + let loaderAttributes = [{"id":"ch_search_loader"},{"class":"ch-loader"}]; + let loader = this.utility.createElement("div", loaderAttributes, null, loaderContainer); + + // Create suggested friends listing box + let suggestedBoxAttributes = [{"id":"ch_suggested_box"}]; + let suggestedBox = this.utility.createElement("div", suggestedBoxAttributes, null, friendsBox); + + // Create other users listing box + let usersBoxAttributes = [{"id":"ch_users_box"}]; + let usersBox = this.utility.createElement("div", usersBoxAttributes, null, friendsBox); + // Get user friends - this.chAdapter.getFriends((err, friends) => { + this.chAdapter.getFriends(null, this.friendsLimit, null, null, null, (err, friends) => { if(err) return console.error(err); + // Hide loader + if(document.getElementById("ch_search_loader_container")) + document.getElementById("ch_search_loader_container").style.display = "none"; + if(friends.length) { // Create suggested element let suggestedAttributes = [{"id":"ch_suggested"},{"class":"ch-suggested"}]; - this.utility.createElement("div", suggestedAttributes, LANGUAGE_PHRASES.SUGGESTED, friendsBox); + this.utility.createElement("div", suggestedAttributes, LANGUAGE_PHRASES.SUGGESTED, suggestedBox); this.friends = friends; friends.forEach(friend => { - this._createFriendList(friend); + this._createFriendList(friend, "suggested"); }); } }); // Get more users - this.chAdapter.getAllUsers(null, 10, 0, null, null, (err, users) => { + this.chAdapter.getAllUsers(null, this.searchLimit, 0, null, null, (err, users) => { if(err) return console.error(err); if(!users.length) @@ -70,12 +95,12 @@ class Search { // Create more users element let moreUsersAttributes = [{"id":"ch_more_users"},{"class":"ch-more-users"}]; - let moreUsers = this.utility.createElement("div", moreUsersAttributes, LANGUAGE_PHRASES.MORE_USERS, friendsBox); + let moreUsers = this.utility.createElement("div", moreUsersAttributes, LANGUAGE_PHRASES.MORE_USERS, usersBox); let moreUsersCount = 0; users.forEach(user => { - if(!document.getElementById(user.id) && user.id != window.userId) { - this._createFriendList(user); + if(!document.getElementById(user.id) && user.id != this.widget.userId) { + this._createFriendList(user, "users"); ++moreUsersCount; } }); @@ -89,11 +114,14 @@ class Search { }); } - _createFriendList(friend) { + _createFriendList(friend, type) { // Create friends listing + let parentId = (type == "suggested") ? "ch_suggested_box" : "ch_users_box"; + let parentBox = document.getElementById(parentId); + let friendListAttributes = [{"id":friend.id},{"class":"ch-friends-list"}]; let friendsBox = document.getElementById("ch_friends_box"); - let friendsList = this.utility.createElement("li", friendListAttributes, null, friendsBox); + let friendsList = this.utility.createElement("li", friendListAttributes, null, parentBox); // Add click listener on friend list friendsList.addEventListener("click", (data) => { @@ -103,10 +131,12 @@ class Search { } // Check for exist conversation - this.chAdapter.getConversationsList(1, 0 , friend.id, (err, conversation) => { + this.chAdapter.getConversationsList(1, 0 , friend.id, "members", null, null, null, null, null, (err, conversation) => { if(err) return console.error(err); - if(conversation.id) { + conversation = conversation[0]; + + if(conversation) { const conversationWindow = new ConversationWindow(this.widget); conversationWindow.init(conversation); this.widget.convWindows.push(conversationWindow); @@ -131,73 +161,96 @@ class Search { } searchMember(searchTerm) { - let friendsBox = document.getElementById("ch_friends_box"); - friendsBox.innerHTML = ""; + // Remove old friends from list + let suggestedbox = document.getElementById("ch_suggested_box"); + suggestedbox.innerHTML = ""; + + let usersBox = document.getElementById("ch_users_box"); + usersBox.innerHTML = ""; + let localFriendsCount = 0; let localUersCount = 0; - // Search in local friend - this.friends.forEach(friend => { - var pattern = new RegExp(searchTerm, "ig"); - let searchResults = friend.displayName.match(pattern); - if(searchResults) { - this._createFriendList(friend); - ++localFriendsCount; - } - }); + if(searchTerm == null) { + // Show local friend + this.friends.forEach(friend => { + this._createFriendList(friend, "suggested"); + }); - // Search in already loaded users - this.users.forEach(user => { - var pattern = new RegExp(searchTerm, "ig"); - let searchResults = user.displayName.match(pattern); - if(searchResults) { - this._createFriendList(user); - ++localUersCount; + // Show already loaded users + this.users.forEach(user => { + this._createFriendList(user, "users"); + }); + + if(this.friends.length) { + // Create suggested tag + let suggestedAttributes = [{"id":"ch_suggested"},{"class":"ch-suggested"}]; + let suggested = this.utility.createElement("div", suggestedAttributes, LANGUAGE_PHRASES.SUGGESTED, suggestedbox); + suggestedbox.insertBefore(suggested, suggestedbox.childNodes[0]); } - }); - if(localFriendsCount) { - // Create suggested tag - let suggestedAttributes = [{"id":"ch_suggested"},{"class":"ch-suggested"}]; - let suggested = this.utility.createElement("div", suggestedAttributes, LANGUAGE_PHRASES.SUGGESTED, friendsBox); - friendsBox.insertBefore(suggested, friendsBox.childNodes[0]); + if(this.users.length) { + // Create more users element + let moreUsersAttributes = [{"id":"ch_more_users"},{"class":"ch-more-users"}]; + let moreUsers = this.utility.createElement("div", moreUsersAttributes, LANGUAGE_PHRASES.MORE_USERS, usersBox); + moreUsers.style.display = "block"; + usersBox.insertBefore(moreUsers, usersBox.childNodes[0]); + } + return; } - if(localUersCount) { - // Create more users element - let moreUsersAttributes = [{"id":"ch_more_users"},{"class":"ch-more-users"}]; - let moreUsers = this.utility.createElement("div", moreUsersAttributes, LANGUAGE_PHRASES.MORE_USERS, friendsBox); - moreUsers.style.display = "block"; - friendsBox.insertBefore(moreUsers, document.getElementById(this.users[0].id)); - } + // Show loader + if(document.getElementById("ch_search_loader_container")) + document.getElementById("ch_search_loader_container").style.display = "block"; - if(!searchTerm) - return; + // Search in all friends by API call + this.chAdapter.getFriends(searchTerm, this.friendsLimit, null, null, null, (err, friends) => { + if(err) return console.error(err); + + // Hide loader + if(document.getElementById("ch_search_loader_container")) + document.getElementById("ch_search_loader_container").style.display = "none"; - // Search in all users - this.chAdapter.getAllUsers(searchTerm, 10, 0, null, null, (err, users) => { + if(!friends.length) + return; + + // Create friends element + let suggested = document.getElementById("ch_suggested"); + if(!suggested) { + let suggestedAttributes = [{"id":"ch_suggested"},{"class":"ch-suggested"}]; + suggested = this.utility.createElement("div", suggestedAttributes, LANGUAGE_PHRASES.SUGGESTED, usersBox); + } + + // let suggestedCount = 0; + friends.forEach(friend => { + this._createFriendList(friend, "users"); + }); + }); + + // Search in all users by API call + this.chAdapter.getAllUsers(searchTerm, this.searchLimit, 0, null, null, (err, users) => { if(err) return console.error(err); if(!users.length) return; // Create more users element - let moreUsers; - if(!document.getElementById("ch_more_users")) { + let moreUsers = document.getElementById("ch_more_users"); + if(!moreUsers) { let moreUsersAttributes = [{"id":"ch_more_users"},{"class":"ch-more-users"}]; - moreUsers = this.utility.createElement("div", moreUsersAttributes, LANGUAGE_PHRASES.MORE_USERS, friendsBox); + moreUsers = this.utility.createElement("div", moreUsersAttributes, LANGUAGE_PHRASES.MORE_USERS, usersBox); } let moreUsersCount = 0; users.forEach(user => { - if(!document.getElementById(user.id) && user.id != window.userId) { - this._createFriendList(user); + if(!document.getElementById(user.id) && user.id != this.widget.userId) { + this._createFriendList(user, "users"); ++moreUsersCount; } }); if(moreUsersCount) { - // Show more user header in other users found + // Show more user header if other users found moreUsers.style.display = "block"; } }); @@ -228,7 +281,7 @@ class Search { let clear = document.getElementById("ch_clear_search_icon"); clear.addEventListener("click", (data) => { document.getElementById("ch_search_input_box").value = ""; - this.searchMember(); + this.searchMember(null); }); } } diff --git a/web-widget/src/js/constants.js b/web-widget/src/js/constants.js old mode 100755 new mode 100644 index 59b65b7..d883e8c --- a/web-widget/src/js/constants.js +++ b/web-widget/src/js/constants.js @@ -20,10 +20,12 @@ export const LANGUAGE_PHRASES = { LOCATION : "Location", STICKER : "Sticker", GIF : "GIF", + ATTACHMENT : "Attachment", SEND_ATTACHMENTS : "Send Attachments", MEMBERS : "Members", FILE_SIZE_WARNING : "File size should be less then 25mb", SEARCH : "Search", + SEARCH_MEMBERS : "Search Members", SUGGESTED : "Suggested", MORE_USERS : "More Users", LOGIN : "Login", @@ -34,7 +36,14 @@ export const LANGUAGE_PHRASES = { ENTER_NAME : "Please enter a name", USER_EXIST : "User already exist with this username", DELETE_FOR_ME : "Delete for me", - DELETE_FOR_EVERYONE : "Delete for everyone" + DELETE_FOR_EVERYONE : "Delete for everyone", + GROUP_CREATED : "Group created", + GROUP_PHOTO_CHANGED : "Group photo updated", + GROUP_TITLE_CHANGED : "Group title updated", + GROUP_MEMBER_ADDED : "New member added in group", + GROUP_MEMBER_REMOVED : "One member removed from group", + GROUP_ADMIN_UPDATED : "Group admin updated", + CONVERSATION_NOT_FOUND : "Conversation not fond" } export const IMAGES = { @@ -51,11 +60,10 @@ export const IMAGES = { GIF_ICON : "https://cdn.channelize.io/apps/web-widget/1.0.0/images/gif.png", AVTAR : "https://cdn.channelize.io/apps/web-widget/1.0.0/images/avtar.png", GROUP : "https://cdn.channelize.io/apps/web-widget/1.0.0/images/group.png", + MESSAGE_LOADER : "https://cdn.channelize.io/apps/web-widget/1.0.0/images/image-loader.gif" } export const SETTINGS = { LOCATION_API_KEY : "AIzaSyBzrL8FaUvmYPIxEUd_VTPpqcACtPdniik", LOCATION_IMG_URL : "https://maps.googleapis.com/maps/api/staticmap" -} - - +} \ No newline at end of file diff --git a/web-widget/src/js/utility.js b/web-widget/src/js/utility.js old mode 100755 new mode 100644 index 485b4d5..06a1347 --- a/web-widget/src/js/utility.js +++ b/web-widget/src/js/utility.js @@ -3,11 +3,11 @@ class Utility { createElement(tagName, attributes = null, data = null, parentTag = null) { let element = document.createElement(tagName); - if(data) - element.innerHTML = data; - - if(parentTag) - parentTag.appendChild(element); + if(data) + element.innerHTML = data; + + if(parentTag) + parentTag.appendChild(element); if(attributes && Array.isArray(attributes)) { attributes.forEach(attribute => { @@ -20,45 +20,59 @@ class Utility { } updateTimeFormat(time) { - const months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]; + const months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]; - var _getDay = val => { - let day = parseInt(val); - if (day == 1) { - return day + "st"; - } else if (day == 2) { - return day + "nd"; - } else if (day == 3) { - return day + "rd"; - } else { - return day + "th"; - } - }; + var _getDay = val => { + let day = parseInt(val); + if (day == 1) { + return day + "st"; + } else if (day == 2) { + return day + "nd"; + } else if (day == 3) { + return day + "rd"; + } else { + return day + "th"; + } + }; - var _checkTime = val => { - return +val < 10 ? "0" + val : val; - }; + var _checkTime = val => { + return +val < 10 ? "0" + val : val; + }; - if (time) { - const LAST_MESSAGE_YESTERDAY = "Yesterday"; - var _nowDate = new Date(); - var _date = new Date(time); - if (_nowDate.getDate() - _date.getDate() == 1) { - return LAST_MESSAGE_YESTERDAY; - } else if ( - _nowDate.getFullYear() == _date.getFullYear() && - _nowDate.getMonth() == _date.getMonth() && - _nowDate.getDate() == _date.getDate() - ) { - return ( - _checkTime(_date.getHours()) + ":" + _checkTime(_date.getMinutes()) - ); - } else { - return months[_date.getMonth()] + " " + _getDay(_date.getDate()); - } + if (time) { + const LAST_MESSAGE_YESTERDAY = "Yesterday"; + var _nowDate = new Date(); + var _date = new Date(time); + if (_nowDate.getDate() - _date.getDate() == 1) { + return LAST_MESSAGE_YESTERDAY; + } else if ( + _nowDate.getFullYear() == _date.getFullYear() && + _nowDate.getMonth() == _date.getMonth() && + _nowDate.getDate() == _date.getDate() + ) { + return ( + _checkTime(_date.getHours()) + ":" + _checkTime(_date.getMinutes()) + ); + } else { + return months[_date.getMonth()] + " " + _getDay(_date.getDate()); + } + } + return ""; + } + + showWarningMsg(text) { + // Create snackbar for warnings + let windowDiv = document.getElementById("ch_frame"); + let snackbarAttributes = [{"id":"ch_snackbar"}]; + this.createElement("div", snackbarAttributes, null, windowDiv); + + // Show size limit exceed message + let snackbar = document.getElementById("ch_snackbar"); + snackbar.innerText = text; + setTimeout(function() { + snackbar.remove(); + }, 3000); } - return ""; - } } export { Utility as default }; \ No newline at end of file diff --git a/web-widget/src/js/widget.js b/web-widget/src/js/widget.js old mode 100755 new mode 100644 index ff177d3..3e6767b --- a/web-widget/src/js/widget.js +++ b/web-widget/src/js/widget.js @@ -9,18 +9,17 @@ import { LANGUAGE_PHRASES, IMAGES } from "./constants.js"; class ChannelizeWidget { constructor(publicKey) { this.utility = new Utility(); - this.publicKey = publicKey; - this._init(); + this._init(publicKey); } // Initialize the main contents - _init() { + _init(publicKey) { // Create script tag for material icons let materialScriptAttributes = [{"href":"https://fonts.googleapis.com/icon?family=Material+Icons"},{"rel":"stylesheet"}]; this.utility.createElement("link", materialScriptAttributes, null, document.head); // Initialize Channelize Adapter - this.chAdapter = new ChannelizeAdapter(this.publicKey); + this.chAdapter = new ChannelizeAdapter(publicKey); this.convWindows = []; } @@ -34,7 +33,7 @@ class ChannelizeWidget { this.connect(userId, accessToken, (err, res) => { if(err) return console.error(err); - window.userId = userId; + this.userId = userId; this._createLauncher(); }); } @@ -43,22 +42,22 @@ class ChannelizeWidget { } } - connect(userId, accessToken, cb) { - this.chAdapter.connect(userId, accessToken, (err, res) => { - if(err) return cb(err); + connect(userId, accessToken, cb) { + this.chAdapter.connect(userId, accessToken, (err, res) => { + if(err) return cb(err); - this._registerChEventHandlers(); - return cb(null, res); - }); - } + this._registerChEventHandlers(); + return cb(null, res); + }); + } // Connect and load channelize - loadWithConnect(userId, accessToken) { + loadWithUserId(userId, accessToken) { this.connect(userId, accessToken, (err, res) => { if(err) return console.error(err); - window.userId = userId; - this.setCookie(userId, accessToken, 1); + this.userId = userId; + this.setCookie(userId, accessToken, 30); this._createLauncher(); }); } @@ -94,39 +93,37 @@ class ChannelizeWidget { return; } - this.chAdapter.getCurrentUser((err, user) => { - if(user) { - // Invoke recent conversation window - this.recentConversations = new RecentConversations(this); - } - else { - // Invoke login screen - new Login(this); - } - }); + let user = this.chAdapter.getLoginUser(); + if(user) { + // Invoke recent conversation window + this.recentConversations = new RecentConversations(this); + } + else { + // Invoke login screen + new Login(this); + } }); } // Handle all real time events of JS-SDK _registerChEventHandlers() { // Handle new message - window.channelize.chsocket.on('messageReceived', (message) => { + window.channelize.chsocket.on('user.message_created', (data) => { if(this.recentConversations) { - this.recentConversations.updateNewMessage(message); + this.recentConversations.updateNewMessage(data.message); } this.convWindows.forEach(conversationWindow => { - conversationWindow.addNewMessage(message); + conversationWindow.addNewMessage(data.message); }); }); // Handle delete message for me - window.channelize.chsocket.on('messagesDeletedForMe', (data) => { + window.channelize.chsocket.on('user.message_deleted', (data) => { let updatedLastMsg; - // Remove message from conversation screen - if(document.getElementById(data.messageIds[0])) { - document.getElementById(data.messageIds[0]).remove(); + if(document.getElementById(data.messages[0].id)) { + document.getElementById(data.messages[0].id).remove(); if(document.getElementById("ch_messages_box").lastChild) { let lastMsgAfterDelete = document.getElementById("ch_messages_box").lastChild.id; @@ -140,76 +137,71 @@ class ChannelizeWidget { }); // Handle delete message for everyone - channelize.chsocket.on('messagesDeletedForEveryone', (data) => { + window.channelize.chsocket.on('message.deleted_for_everyone', (data) => { // Update message text in conversation screen this.convWindows.forEach(conversationWindow => { conversationWindow.updateDeleteForEveryoneMsg(data); }); // Update message text in recent screen - let recentTargetMsg = document.getElementById("ch_msg_" + data.deletedIds[0]); - if(recentTargetMsg) + let recentTargetMsg = document.getElementById("ch_msg_" + data.messages[0].id); + if(recentTargetMsg) { + // Remove if media/location/sticker/gif icon present + if(recentTargetMsg.parentNode.firstChild.nodeName != "DIV") + recentTargetMsg.parentNode.firstChild.remove(); + recentTargetMsg.innerHTML = "" + LANGUAGE_PHRASES.MESSAGE_DELETED; + } }); // Handle mark as read - window.channelize.chsocket.on('readMessageToOwner', (message) => { - if(!message.messageId || !document.getElementById(message.messageId)) + window.channelize.chsocket.on('conversation.mark_as_read', (data) => { + if(this.userId == data.user.id) return; - let msgBox = document.getElementById(message.messageId).firstChild; - msgBox.lastChild.innerHTML = "done_all"; - }); - - // Handle user online - window.channelize.chsocket.on('online', (user) => { + // Update lastReadAt of conversation if(this.recentConversations) { - this.recentConversations.updateUserOnline(user); + this.recentConversations.updateReadAt(data); } + // Update message read status in conversation screen this.convWindows.forEach(conversationWindow => { - conversationWindow.updateStatus(user); + conversationWindow.updateMsgStatus(data); }); }); - // Handle user offline - window.channelize.chsocket.on('offline', (user) => { + // Handle user online/ofline status + window.channelize.chsocket.on('user.status_updated', (data) => { if(this.recentConversations) { - this.recentConversations.updateUserOffline(user); + this.recentConversations.updateUserStatus(data.user); } - + this.convWindows.forEach(conversationWindow => { - conversationWindow.updateStatus(user); + conversationWindow.updateUserStatus(data.user); }); }); // Handle clear conversation - window.channelize.chsocket.on('conversationCleared', (conversation) => { + window.channelize.chsocket.on('user.conversation_cleared', (data) => { // Delete last message from particular recent conversation - if(document.getElementById(conversation.id) && document.getElementById(conversation.id).lastChild) - document.getElementById(conversation.id).lastChild.remove(); + if(document.getElementById(data.conversation.id) && document.getElementById(data.conversation.id).lastChild) + document.getElementById(data.conversation.id).lastChild.remove(); - // Open new updated conversation screen + // Remove all messages of the conversation this.convWindows.forEach(conversationWindow => { - if(conversationWindow.conversation.id == conversation.id) { - if(document.getElementById("ch_conv_window")) { - document.getElementById("ch_conv_window").remove(); - } - conversationWindow = new ConversationWindow(this); - conversationWindow.init(conversation); - } + conversationWindow.handleClearConversation(data.conversation); }); }); // Handle delete conversation - window.channelize.chsocket.on('conversationDeleted', (conversation) => { + window.channelize.chsocket.on('user.conversation_deleted', (data) => { // Delete last message from particular recent conversation - if(document.getElementById(conversation.id) && document.getElementById(conversation.id).lastChild) - document.getElementById(conversation.id).remove(); + if(document.getElementById(data.conversation.id) && document.getElementById(data.conversation.id).lastChild) + document.getElementById(data.conversation.id).remove(); // Remove conversation screen this.convWindows.forEach(conversationWindow => { - if(conversationWindow.conversation.id == conversation.id) { + if(conversationWindow.conversation.id == data.conversation.id) { if(document.getElementById("ch_conv_window")) { document.getElementById("ch_conv_window").remove(); } @@ -218,24 +210,28 @@ class ChannelizeWidget { }); // Handle user block - window.channelize.chsocket.on('userBlocked', (self, userId) => { + window.channelize.chsocket.on('user.blocked', (data) => { // Update block icon in recent conversation - this.recentConversations.handleBlock(self, userId); + if(this.recentConversations) { + this.recentConversations.handleBlock(data); + } // Update conversation screen of block user this.convWindows.forEach(conversationWindow => { - conversationWindow.handleBlock(self, userId); + conversationWindow.handleBlock(data); }); }); // Handle user unblock - window.channelize.chsocket.on('userUnblocked', (self, userId) => { + window.channelize.chsocket.on('user.unblocked', (data) => { // Update unblock icon in recent conversation - this.recentConversations.handleUnblock(self, userId); + if(this.recentConversations) { + this.recentConversations.handleUnblock(data); + } // Update conversation screen of unblock user this.convWindows.forEach(conversationWindow => { - conversationWindow.handleUnblock(self, userId); + conversationWindow.handleUnblock(data); }); }); } @@ -249,27 +245,32 @@ class ChannelizeWidget { } getCookie(cname) { - var name = cname + "="; - var cookieArray = document.cookie.split(';'); - for(var i = 0; i < cookieArray.length; i++) { - var singleCookie = cookieArray[i]; - while (singleCookie.charAt(0) == ' ') { - singleCookie = singleCookie.substring(1); - } - if (singleCookie.indexOf(name) == 0) { - return singleCookie.substring(name.length, singleCookie.length); - } - } - return ""; + var name = cname + "="; + var cookieArray = document.cookie.split(';'); + for(var i = 0; i < cookieArray.length; i++) { + var singleCookie = cookieArray[i]; + while (singleCookie.charAt(0) == ' ') { + singleCookie = singleCookie.substring(1); + } + if (singleCookie.indexOf(name) == 0) { + return singleCookie.substring(name.length, singleCookie.length); + } + } + return ""; } // To skip out login process and direct open recent conversation window loadRecentConversation(userId, accessToken) { // Connect to Channelize server - window.userId = userId; - this.chAdapter.connect(userId, accessToken, (err, res) => { + this.userId = userId; + this.connect(userId, accessToken, (err, res) => { if(err) return console.error(err); + // Create channelize frame + let widget = document.getElementById("ch_widget"); + let frameAttributes = [{"id":"ch_frame"},{"class":"ch-frame"}]; + let frame = this.utility.createElement("div", frameAttributes, null, widget); + // Invoke recent conversation window this.recentConversations = new RecentConversations(this); }); @@ -278,11 +279,16 @@ class ChannelizeWidget { // To open a conversation screen of any user via member-id or conversation-id loadConversationWindow(otherMemberId, conversationId = null) { if(otherMemberId) { - this.chAdapter.getConversationsList(1, 0, otherMemberId, (err, conversation) => { + this.chAdapter.getConversationsList(1, 0, otherMemberId, "members", null, null, null, null, null, (err, conversations) => { if(err) return console.error(err); - let conversationWindow = new conversationWindow(this); - conversationWindow.init(conversation); // Pass conversation object in params + if(!conversations.length) { + console.error(LANGUAGE_PHRASES.CONVERSATION_NOT_FOUND); + return; + } + + let conversationWindow = new ConversationWindow(this); + conversationWindow.init(conversations[0]); // Pass conversation object in params this.convWindows.push(conversationWindow); }); } @@ -290,7 +296,7 @@ class ChannelizeWidget { let conversation = this.chAdapter.getConversation(conversationId, (err, conversation) => { if(err) return console.error(err); - let conversationWindow = new conversationWindow(this); + let conversationWindow = new ConversationWindow(this); conversationWindow.init(conversation); // Pass conversation object in params this.convWindows.push(conversationWindow); }); diff --git a/web-widget/src/scss/main.scss b/web-widget/src/scss/main.scss old mode 100755 new mode 100644 index 590b768..29d4b1d --- a/web-widget/src/scss/main.scss +++ b/web-widget/src/scss/main.scss @@ -9,6 +9,12 @@ ul { padding-left: 0; margin: 0; } +.left { + float: left; +} +.right { + float: right; +} .ch-loader-bg { position: absolute; height: inherit; @@ -42,78 +48,14 @@ ul { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } - -.ch-login-error { - display: none; -} .ch-no-msg { + position: relative; + top: 50%; text-align: center; color: $ch-title-color; - margin-top: 50%; -} -.ch-dummy-img { - height: 40px; - width: 40px; - margin-right: 10px; - border-radius: 50%; -} -.ch-online-icon { - background: #64ba00; - border-radius: 50%; - border: 2px solid #fff; - bottom: 0; - position: absolute; - right: 1px; - width: 6px; - height: 6px; - display: none; -} -.ch-conv-drop-down { - position: absolute; - display: none; - box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12); - z-index: 8; - background: #fff; - min-width: 100px; - max-width: 250px; - border-radius: 5px; - div { - color: #4a505a; - padding: 4px 12px; - height: auto; - margin: 0; - line-height: 20px; - font-size: 12px; - &:hover { - background: #0000000a; - cursor: pointer; - } - } - .ch-conv-block { - display: none; - } - .ch-conv-unblock { - display: none; - } -} -.ch-created-at { - float: right; - font-size: 10px; -} -.ch-message { - padding: 10px; - word-break: break-word; } - -audio#ch_audio_message { - margin-top: -10px; - width: 295px; - height: 38px; - margin-left: -33px; - margin-right: -33px; - margin-bottom: -14px; - background-color: #f1f3f4; - transform: scaleX(0.9); +.ch-show-element { + display: block !important; } .ch-launcher { position: fixed; @@ -153,44 +95,31 @@ audio#ch_audio_message { vertical-align: middle; display: inline-block; float: left; - } - .ch-conv-details-wrapper { - display: inline-block; + position: relative; + height: 32px; + width: 32px; + border-radius: 50%; + background-size: cover; + margin-right: 10px; } } -span.ch-msg-time { - font-size: 10px; - display: inline-block; - vertical-align: middle; - color: #969391; -} -i.ch-msg-status { - font-size: 10px; - display: inline-block; - vertical-align: middle; - color: #969391; - margin-right: 5px; -} + #ch_snackbar { - visibility: hidden; - min-width: 250px; - margin-left: -125px; - background-color: #333; - color: #fff; - text-align: center; - border-radius: 4px; - padding: 13px; - position: fixed; - z-index: 1; - left: 50%; - bottom: 30px; - font-size: 14px; -} -#ch_snackbar.show { - visibility: visible; - -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s; - animation: fadein 0.5s, fadeout 0.5s 2.5s; -} + min-width: 250px; + margin-left: -125px; + background-color: #333; + color: #fff; + text-align: center; + border-radius: 4px; + padding: 13px; + position: fixed; + z-index: 1; + left: 50%; + bottom: 30px; + font-size: 14px; + -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s; + animation: fadein 0.5s, fadeout 0.5s 2.5s; +} @-webkit-keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 30px; opacity: 1;} @@ -229,9 +158,6 @@ i.ch-msg-status { /*Common style end here*/ /*Login style start here*/ -.ch-show-element { - display: block; -} .ch-login-window { box-shadow: rgba(0,0,0,0.3) 0 0 1.2em; right: 1%; @@ -240,11 +166,16 @@ i.ch-msg-status { width: $ch-recent-width; background-color: #fff; .ch-header { + color : $gray-shade; line-height: 34px; padding-left: 20px; .ch-login-close-btn { + color : $space-gray; float: right; margin-top: 5px; + &:hover { + color: $black; + } } } .ch-loader-bg { @@ -258,7 +189,11 @@ i.ch-msg-status { margin-bottom: 20px; } .ch-dummy-img { + border-radius: 50%; cursor: pointer; + height: 40px; + margin-right: 10px; + width: 40px; &:last-child { margin: 0; } @@ -291,6 +226,7 @@ i.ch-msg-status { margin-top: 15px; border-bottom: 1px solid #ccc; .ch-login-error { + display: none; font-size: 85%; color: red; margin-top: 2px; @@ -353,91 +289,108 @@ i.ch-msg-status { } } } -} -.ch-recent-ul { - margin: 0; - padding: 3px 0 0 0; - li { - min-height: 40px; - cursor: pointer; - list-style: none; - position: relative; - padding: 10px; - border-bottom: 1px solid rgba(90,122,190,.08); - background-color: $ch-recent-conversation-list-color; - &:hover { - background-color: $ch-recent-conversation-list-hover-color; - } - &:last-child { - margin-bottom: 0; - } - #ch_title { - width: 55%; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - padding-right: 5px; - font-size: 13px; - display: block; - float: left; - color: $ch-recent-conversation-list-title-color; - font-weight: 400; - margin-top: 4px; - text-transform: capitalize; - } - .ch-created-at { - font-size: $ch-status-fontsize; - float: right; - color: $ch-status-color; - margin-top: 2px; - position: absolute; - right: 5px; - top: 14px; - } - .ch-last-msg-box { - width: 55%; - float: left; - margin-top: 4px; - img { - height: 10px; - width: 12px; - margin: 2px 5px 0 1px; + .ch-recent-listing { + height: calc(100% - 50px); + overflow: auto; + .ch-recent-ul { + margin: 0; + padding: 3px 0 0 0; + li { + min-height: 40px; + cursor: pointer; + list-style: none; + position: relative; + padding: 10px; + border-bottom: 1px solid rgba(90,122,190,.08); + background-color: $ch-recent-conversation-list-color; + .ch-conversation-image { + position: relative; + float: left; + height: 32px; + width: 32px; + border-radius: 50%; + background-size: cover; + margin-right: 10px; + margin-top: 3px; + .ch-online-icon { + background: #64ba00; + border-radius: 50%; + border: 2px solid #fff; + bottom: 0; + position: absolute; + right: 1px; + width: 6px; + height: 6px; + display: none; + } + .ch-user-blocked { + background: red !important; + display: block !important; + } + } + &:hover { + background-color: $ch-recent-conversation-list-hover-color; + } + &:last-child { + margin-bottom: 0; + } + #ch_title { + width: 55%; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + padding-right: 5px; + font-size: 13px; + display: block; + float: left; + color: $ch-recent-conversation-list-title-color; + font-weight: 400; + margin-top: 4px; + text-transform: capitalize; + } + .ch-created-at { + font-size: $ch-status-fontsize; + float: right; + color: $ch-status-color; + margin-top: 2px; + position: absolute; + right: 5px; + top: 14px; + } + .ch-last-msg-box { + width: 55%; float: left; - vertical-align: middle; + margin-top: 4px; + img { + height: 10px; + width: 12px; + margin: 2px 5px 0 1px; + float: left; + vertical-align: middle; + } + .ch-last-message { + font-size: $ch-subtitle-fontsize; + color: $ch-recent-conversation-list-content-color; + padding-left: 0; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + height: auto; + } + } } - .ch-last-message { - font-size: $ch-subtitle-fontsize; - color: $ch-recent-conversation-list-content-color; - padding-left: 0; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - height: auto; - width: 80%; - } - } - .ch-user-blocked { - background: red !important; } } } -.ch-recent-listing { - height: calc(100% - 50px); - overflow: auto; -} -.ch-conversation-image { - position: relative; - float: left; - height: 32px; - width: 32px; - border-radius: 50%; - background-size: cover; - margin-right: 10px; - margin-top: 3px; -} /*recent style end here*/ + /*Search style start here*/ .ch-search-window { + right: $ch-recent-right-position; + top: $ch-recent-top-position; + bottom: $ch-recent-bottom-position; + width: $ch-recent-width; + background-color: #fff; .ch-header { line-height: 35px; text-align: center; @@ -464,6 +417,16 @@ i.ch-msg-status { padding: 15px 25px 15px 15px; box-sizing: border-box; } + ::placeholder { + color: white; + opacity: 1; + } + :-ms-input-placeholder { + color: white; + } + ::-ms-input-placeholder { + color: white; + } .ch-clear-search-icon { color: #ffffff; cursor: pointer; @@ -473,57 +436,53 @@ i.ch-msg-status { right: 8px; } } - right: $ch-recent-right-position; - top: $ch-recent-top-position; - bottom: $ch-recent-bottom-position; - width: $ch-recent-width; - background-color: #fff; -} -.ch-friends-box { - height: calc(100% - 92px); - overflow: auto; - li { - cursor: pointer; - list-style: none; - position: relative; - padding: 10px; - border-bottom: 1px solid rgba(90,122,190,.08); - .ch-friend-name { - width: 180px; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - padding-right: 5px; + .ch-friends-box { + height: calc(100% - 92px); + overflow: auto; + li { + cursor: pointer; + list-style: none; + position: relative; + padding: 10px; + border-bottom: 1px solid rgba(90,122,190,.08); + .ch-contact-img { + height: 32px; + width: 32px; + border-radius: 50%; + margin-right: 10px; + vertical-align: middle; + } + .ch-friend-name { + width: 180px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + padding-right: 5px; + font-size: 13px; + display: inline-block; + vertical-align: middle; + color: #4a505a; + font-weight: 400; + text-transform: capitalize; + } + } + .ch-more-users { + display: none; + color: #4a505a; + margin-left: 10px; + margin-top: 10px; font-size: 13px; - display: inline-block; - vertical-align: middle; + } + .ch-suggested { color: #4a505a; - font-weight: 400; - text-transform: capitalize; + margin-left: 10px; + margin-top: 10px; + font-size: 13px; } } - .ch-more-users { - display: none; - color: #4a505a; - margin-left: 10px; - margin-top: 10px; - font-size: 13px; - } - .ch-suggested { - color: #4a505a; - margin-left: 10px; - margin-top: 10px; - font-size: 13px; - } -} -.ch-contact-img { - height: 32px; - width: 32px; - border-radius: 50%; - margin-right: 10px; - vertical-align: middle; } /*search style end here*/ + /*conversation style start here*/ .ch-conv-window { bottom: $ch-conv-bottom-position; @@ -533,6 +492,50 @@ i.ch-msg-status { box-shadow: rgba(0,0,0,.3) 0 0 1.2em; .ch-header { background-color: $ch-conversation-window-header-bg-color; + .ch-conv-details-wrapper { + display: inline-block; + .ch-conv-title { + display: inline-block; + vertical-align: middle; + max-width: 120px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + color: $ch-title-color; + text-transform: capitalize; + font-size: $ch-title-fontsize; + } + .ch-conv-options { + vertical-align: middle; + color: $ch-title-color; + } + .ch-conv-status { + font-size: $ch-status-fontsize; + color: $ch-recent-conversation-header-font-icon-color; + } + } + .ch-conv-drop-down { + position: absolute; + display: none; + box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12); + z-index: 8; + background: #fff; + min-width: 100px; + max-width: 250px; + border-radius: 5px; + div { + color: #4a505a; + padding: 4px 12px; + height: auto; + margin: 0; + line-height: 20px; + font-size: 12px; + &:hover { + background: #0000000a; + cursor: pointer; + } + } + } i#ch_conv_close_btn { color: $ch-recent-conversation-header-font-icon-color; position: absolute; @@ -543,272 +546,293 @@ i.ch-msg-status { } } } -} -.ch-conv-title { - display: inline-block; - vertical-align: middle; - max-width: 120px; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - color: $ch-title-color; - text-transform: capitalize; - font-size: $ch-title-fontsize; - + { - i#ch_conv_options { - vertical-align: middle; - color: $ch-title-color; - margin-left: 3px; + .ch-messages-box { + height: calc(100% - 115px); + overflow: auto; + background-color: $ch-conversation-window-bg-color; + padding-top: 5px; + .ch-loader-bg { + background: #fff; } - } -} -.ch-conv-status { - font-size: $ch-status-fontsize; - color: $ch-recent-conversation-header-font-icon-color; -} -.ch-conv-options { - vertical-align: middle; -} -.ch-messages-box { - height: calc(90% - 70px); - overflow: auto; - background-color: $ch-conversation-window-bg-color; - padding-top: 5px; - .ch-loader-bg { - background: #fff; - } - -} -.ch-msg-container { - clear: both; - margin-bottom: 0; - position: relative; - overflow: hidden; -} -i.ch-msg-more-option { - color: #6e7174; - font-size: 15px; - margin-top: 2px; - cursor: pointer; -} -.left { - float: left; -} -.right { - float: right; -} -.ch-msg-container.right { - float: right; - max-width: 220px; - color: #969391; - margin-right: 8px; - text-align: right; - .ch-msg-time { - margin-right: 5px; - } - .ch-message { - background-color: $ch-conversation-window-user-msg-bg-color; - border-radius: 6px 6px 0; - overflow: hidden; - display: block; - color: $ch-conversation-window-user-msg-color; - margin-bottom: 1px; - text-align: left; - } - .ch-video-message, .ch-image-message, .ch-location-message, .ch-sticker-message { - background-size: cover; - position: relative; - cursor: pointer; - background-position: center; - background-repeat: no-repeat; - height: 140px; - min-width: 180px; - margin: -10px; - border: 1px solid #eee; - border-radius: 6px 6px 0; - .ch-play-icon { - position: absolute; - left: 0; - right: 0; - top: 28%; - text-align: center; - color: #fff; - font-size: 55px; - } -} -} -.ch-msg-container.left { - float: left; - max-width: 220px; - margin-left: 8px; - .ch-message { - overflow: hidden; - background: $ch-conversation-window-msg-bg-color; - border-radius: 6px 6px 6px 0; - position: relative; - color: $ch-conversation-window-msg-color; - .ch-video-message, .ch-image-message, .ch-location-message, .ch-sticker-message { - background-size: cover; + .ch-msg-loader { + float: right; + padding: 5px 0; + background-size: 70px; position: relative; - cursor: pointer; background-position: center; background-repeat: no-repeat; height: 140px; min-width: 180px; - margin: -10px; border: 1px solid #eee; - border-radius: 6px 6px 6px 0; - .ch-play-icon { + border-radius: 6px 6px 0; + } + .ch-admin-msg { + text-align: center; + color: #969391; + margin-bottom: 4px; + padding: 0 10px; + font-size: 11px; + } + .ch-msg-list { + position: relative; + float: left; + width: 100%; + padding: 5px 0; + .ch-msg-container { + clear: both; + margin-bottom: 0; + position: relative; + overflow: hidden; + audio#ch_audio_message { + margin-top: -10px; + width: 295px; + height: 38px; + margin-left: -33px; + margin-right: -33px; + margin-bottom: -14px; + background-color: #f1f3f4; + transform: scaleX(0.9); + } + } + i.ch-msg-more-option { + color: #6e7174; + font-size: 15px; + margin-top: 2px; + cursor: pointer; + } + .ch-msg-option-container { position: absolute; - left: 0; - right: 0; - top: 28%; - text-align: center; - color: #fff; - font-size: 55px; + box-shadow: rgba(0,0,0,0.3) 0 0 1.2em; + z-index: 8; + background: #fff; + min-width: 100px; + max-width: 250px; + border-radius: 4px; + div { + color: #4a505a; + padding: 4px 12px; + height: auto; + margin: 0; + line-height: 20px; + font-size: 12px; + &:hover { + background: #0000000a; + cursor: pointer; + } + } + } + .ch-sender-name { + font-size: 13px; + margin-left: 7px; + margin-bottom: 5px; + text-transform: capitalize; + color: $ch-conversation-window-msg-owner-color; + } + .ch-msg-container.left { + float: left; + max-width: 220px; + margin-left: 8px; + span.ch-msg-time { + font-size: 10px; + display: inline-block; + vertical-align: middle; + color: #969391; + } + .ch-message { + overflow: hidden; + background: $ch-conversation-window-msg-bg-color; + border-radius: 6px 6px 6px 0; + position: relative; + color: $ch-conversation-window-msg-color; + padding: 10px; + word-break: break-word; + .ch-video-message, .ch-image-message, .ch-location-message, .ch-sticker-message { + background-size: cover; + position: relative; + cursor: pointer; + background-position: center; + background-repeat: no-repeat; + height: 140px; + min-width: 180px; + margin: -10px; + border: 1px solid #eee; + border-radius: 6px 6px 6px 0; + .ch-play-icon { + position: absolute; + left: 0; + right: 0; + top: 28%; + text-align: center; + color: #fff; + font-size: 55px; + } + } + .ch-audio-message { + width: 220px; + margin: -10px; + } + } + } + .ch-msg-container.right { + float: right; + max-width: 220px; + color: #969391; + margin-right: 8px; + text-align: right; + .ch-msg-time { + margin-right: 5px; + font-size: 10px; + display: inline-block; + vertical-align: middle; + color: #969391; + } + i.ch-msg-status { + font-size: 10px; + display: inline-block; + vertical-align: middle; + color: #969391; + margin-right: 5px; + } + .ch-message { + background-color: $ch-conversation-window-user-msg-bg-color; + border-radius: 6px 6px 0; + overflow: hidden; + display: block; + color: $ch-conversation-window-user-msg-color; + margin-bottom: 1px; + text-align: left; + padding: 10px; + word-break: break-word; + } + .ch-video-message, .ch-image-message, .ch-location-message, .ch-sticker-message { + background-size: cover; + position: relative; + cursor: pointer; + background-position: center; + background-repeat: no-repeat; + height: 140px; + min-width: 180px; + margin: -10px; + border: 1px solid #eee; + border-radius: 6px 6px 0; + .ch-play-icon { + position: absolute; + left: 0; + right: 0; + top: 28%; + text-align: center; + color: #fff; + font-size: 55px; + } + } + } } + } - .ch-audio-message { - width: 220px; - margin: -10px; - } -} -} -.ch-sender-name { - font-size: 13px; - margin-left: 7px; - margin-bottom: 5px; - text-transform: capitalize; - color: $ch-conversation-window-msg-owner-color; -} -.ch-msg-list { - position: relative; - float: left; - width: 100%; - padding: 5px 0; -} -.ch-msg-option-container { - position: absolute; - box-shadow: rgba(0,0,0,0.3) 0 0 1.2em; - z-index: 8; - background: #fff; - min-width: 100px; - max-width: 250px; - border-radius: 4px; - div { - color: #4a505a; - padding: 4px 12px; - height: auto; - margin: 0; - line-height: 20px; - font-size: 12px; - &:hover { - background: #0000000a; + .ch-send-box { + padding: 8px 10px 0; + border-top: 1px solid rgba(90,122,190,.08); + min-height: 50px; + background: $ch-conversation-window-composer-bg-color; + font-size: 13px; + position: relative; + textarea { + outline: none; + border: none; + width: calc(100% - 54px); + color: $ch-conversation-window-composer-text-color; + padding: 0px 5px 0 0; + resize: none; + font-size: 13px; + vertical-align: bottom; + font-family: $ch-body-font-family; + background: transparent; + } + button { + padding: 11px 0 0 0; + margin: 0; + background: transparent; + border: none; + outline: none; + vertical-align: super; cursor: pointer; + i.ch-send-icon { + font-size: $ch-app-icon-fontsize; + color: $ch-conversation-window-composer-font-icon-color; + } } - } -} - -.ch-send-box { - padding: 8px 10px 0; - border-top: 1px solid rgba(90,122,190,.08); - min-height: 50px; - background: $ch-conversation-window-composer-bg-color; - font-size: 13px; - position: relative; - textarea { - outline: none; - border: none; - width: calc(100% - 54px); - color: $ch-conversation-window-composer-text-color; - padding: 0px 5px 0 0; - resize: none; - font-size: 13px; - vertical-align: bottom; - font-family: $ch-body-font-family; - background: transparent; - } - button { - padding: 11px 0 0 0; - margin: 0; - background: transparent; - border: none; - outline: none; - vertical-align: super; - cursor: pointer; - i.ch-send-icon { - font-size: $ch-app-icon-fontsize; + .ch-attachment-btn { + margin-right: 5px; + display: inline-block; + vertical-align: super; + font-size: 22px; + cursor: pointer; color: $ch-conversation-window-composer-font-icon-color; } - } - .ch-attachment-btn { - margin-right: 5px; - display: inline-block; - vertical-align: super; - font-size: 22px; - cursor: pointer; - color: $ch-conversation-window-composer-font-icon-color; - } - .ch-media-docker { - position: absolute; - opacity: 0; - visibility: hidden; - bottom: -100px; - left: 0; - right: 0; - color: $ch-title-color; - background: #fff; - padding: 10px; - transition: .5s; - -webkit-box-shadow: 0 -4px 8px 0 rgba(0,0,0,0.2); - -webkit-transition: .5s; - box-shadow: 0 -4px 8px 0 rgba(0,0,0,0.2); - border-radius: 10px 10px 0 0; - overflow: hidden; - text-align: center; - - .ch-image-option, .ch-audio-option, .ch-video-option { - display: inline-block; - position: relative; + .ch-media-docker { + position: absolute; + opacity: 0; + visibility: hidden; + bottom: -100px; + left: 0; + right: 0; + background: #fff; + padding: 10px; + z-index: 99; + transition: .5s; + -webkit-box-shadow: 0 -4px 8px 0 rgba(0,0,0,0.2); + -webkit-transition: .5s; + box-shadow: 0 -4px 8px 0 rgba(0,0,0,0.2); + border-radius: 10px 10px 0 0; + overflow: hidden; text-align: center; - margin: 0 6%; - .ch-image-icon-span{ - background-color: #64b5f6; - } - .ch-audio-icon-span{ - background-color: #ff8a65; + .ch-video-option{ + margin-right: 0 !important; } - .ch-video-icon-span{ - background-color: #f7dc6f; - } - .ch-image-icon-span, .ch-audio-icon-span, .ch-video-icon-span { - height: 45px; - width: 45px; - display: block; + .ch-image-option, .ch-audio-option, .ch-video-option { + display: inline-block; + position: relative; text-align: center; - line-height: 53px; - border-radius: 50%; - margin-bottom: 2px; - cursor: pointer; - img { - width: 16px; + margin-right: 35px; + color: $dark-gray; + .ch-image-icon-span{ + background-color: #64b5f6; + } + .ch-audio-icon-span{ + background-color: #ff8a65; } + .ch-video-icon-span{ + background-color: #f7dc6f; + } + .ch-image-icon-span, .ch-audio-icon-span, .ch-video-icon-span { + height: 45px; + width: 45px; + display: block; + text-align: center; + line-height: 53px; + border-radius: 50%; + margin-bottom: 2px; + cursor: pointer; + img { + width: 16px; + } + } + input { + opacity: 0; + width: 50px; + height: 50px; + position: absolute; + top: 0; + cursor: pointer; + left: 0; + } } - input { - opacity: 0; - width: 50px; - height: 50px; - position: absolute; - top: 0; - cursor: pointer; - left: 0; - } } - } - .ch-show-docker.ch-media-docker { - opacity: 1; - bottom: 100%; - visibility: visible; + .ch-show-docker.ch-media-docker { + opacity: 1; + bottom: 100%; + visibility: visible; + } } } -/*conversation style end here*/ \ No newline at end of file +/*conversation style end here*/ diff --git a/web-widget/src/scss/variables.scss b/web-widget/src/scss/variables.scss old mode 100755 new mode 100644 diff --git a/web-widget/webpack.config.js b/web-widget/webpack.config.js old mode 100755 new mode 100644 From 657d76593ec8f0d5f0c15ba8b3c25773d91789d0 Mon Sep 17 00:00:00 2001 From: chetan-b-bigstep Date: Wed, 25 Mar 2020 14:57:10 +0530 Subject: [PATCH 2/7] Added group members window --- web-widget/README.md | 2 +- web-widget/dist/channelize-websdk.js | 2932 ----------------- web-widget/dist/widget.Channelize.js | 1 - web-widget/index.html | 6 +- .../src/js/components/conversation-window.js | 8 +- web-widget/src/js/components/members.js | 126 + web-widget/src/js/widget.js | 20 +- web-widget/src/scss/main.scss | 79 +- 8 files changed, 233 insertions(+), 2941 deletions(-) delete mode 100644 web-widget/dist/channelize-websdk.js delete mode 100644 web-widget/dist/widget.Channelize.js create mode 100644 web-widget/src/js/components/members.js diff --git a/web-widget/README.md b/web-widget/README.md index 25aca82..8b25b2b 100644 --- a/web-widget/README.md +++ b/web-widget/README.md @@ -24,7 +24,7 @@ Add the Channelize widget div in the body tag of your website. Import the `widget.Channelize.js` file after body tag in your website. ```javascript - + ``` ##### Step 3: Import Channelize JS-SDK ##### diff --git a/web-widget/dist/channelize-websdk.js b/web-widget/dist/channelize-websdk.js deleted file mode 100644 index e77e402..0000000 --- a/web-widget/dist/channelize-websdk.js +++ /dev/null @@ -1,2932 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = "./src/index.js"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "./node_modules/aws-iot-device-sdk/common/lib/exceptions.js": -/*!******************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/common/lib/exceptions.js ***! - \******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\n\n//npm deps\n\n//app deps\n\n//begin module\nmodule.exports = {\n NO_KEY_OPTION: 'No \"keyPath\" or \"privateKey\" option supplied.',\n NO_CERT_OPTION: 'No \"certPath\" or \"clientCert\" option supplied.',\n NO_CA_OPTION: 'No \"caPath\" or \"caCert\" option supplied.',\n INVALID_KEY_PATH_OPTION: 'Invalid \"keyPath\" option supplied.',\n INVALID_CERT_PATH_OPTION: 'Invalid \"certPath\" option supplied.',\n INVALID_CA_PATH_OPTION: 'Invalid \"caPath\" option supplied.',\n INVALID_CLIENT_CERT_OPTION: 'Invalid \"clientCert\" option supplied.',\n INVALID_PRIVATE_KEY_OPTION: 'Invalid \"privateKey\" option supplied.',\n INVALID_CA_CERT_OPTION: 'Invalid \"caCert\" option supplied.'\n};\n\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/common/lib/exceptions.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/common/lib/is-undefined.js": -/*!********************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/common/lib/is-undefined.js ***! - \********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\n\n//npm deps\n\n//app deps\n\n//begin module\n/**\n * This is the exposed module.\n * This method determines if an object is undefined.\n *\n * @param {Object} value\n * @access public\n */\nmodule.exports = function(value) {\n return typeof value === 'undefined' || value === null;\n};\n\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/common/lib/is-undefined.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/common/lib/tls-reader.js": -/*!******************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/common/lib/tls-reader.js ***! - \******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("/* WEBPACK VAR INJECTION */(function(Buffer) {/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\nvar filesys = __webpack_require__(/*! fs */ \"./node_modules/node-libs-browser/mock/empty.js\");\n\n//npm deps\n\n//app deps\nvar isUndefined = __webpack_require__(/*! ./is-undefined */ \"./node_modules/aws-iot-device-sdk/common/lib/is-undefined.js\");\nvar exceptions = __webpack_require__(/*! ./exceptions */ \"./node_modules/aws-iot-device-sdk/common/lib/exceptions.js\");\n\n//begin module\n/**\n * This method is the exposed module; it validates and prepares the tls\n * options as required for connection to the AWS IoT service.\n *\n * @param {Object} options\n * @access public\n */\nmodule.exports = function(options) {\n\n // verify certificate paths\n if (isUndefined(options.keyPath) && isUndefined(options.privateKey)) {\n throw new Error(exceptions.NO_KEY_OPTION);\n }\n if (isUndefined(options.certPath) && isUndefined(options.clientCert)) {\n throw new Error(exceptions.NO_CERT_OPTION);\n }\n if (isUndefined(options.caPath) && isUndefined(options.caCert)) {\n throw new Error(exceptions.NO_CA_OPTION);\n }\n //\n // Certificates and private keys may be passed in files using options\n // ending in 'Path', e.g. 'keyPath', 'certPath', and 'caPath'. In addition,\n // they can also be passed in as buffers or files using the options\n // 'privateKey', 'clientCert', and 'caCert'. This second set is the one\n // that the AWS Console generates a JSON configuration document for.\n //\n if (!isUndefined(options.caCert)) {\n if (Buffer.isBuffer(options.caCert)) {\n options.ca = options.caCert;\n } else {\n if (filesys.existsSync(options.caCert)) {\n options.ca = filesys.readFileSync(options.caCert);\n } else {\n throw new Error(exceptions.INVALID_CA_CERT_OPTION);\n }\n }\n }\n if (!isUndefined(options.privateKey)) {\n if (Buffer.isBuffer(options.privateKey)) {\n options.key = options.privateKey;\n } else {\n if (filesys.existsSync(options.privateKey)) {\n options.key = filesys.readFileSync(options.privateKey);\n } else {\n throw new Error(exceptions.INVALID_PRIVATE_KEY_OPTION);\n }\n }\n }\n if (!isUndefined(options.clientCert)) {\n if (Buffer.isBuffer(options.clientCert)) {\n options.cert = options.clientCert;\n } else {\n if (filesys.existsSync(options.clientCert)) {\n options.cert = filesys.readFileSync(options.clientCert);\n } else {\n throw new Error(exceptions.INVALID_CLIENT_CERT_OPTION);\n }\n }\n }\n\n // Parse PEM files. Options ending in 'Path' must be files\n // and will override options which do not end in 'Path'.\n\n if (filesys.existsSync(options.keyPath)) {\n options.key = filesys.readFileSync(options.keyPath);\n } else if (!isUndefined(options.keyPath)) {\n throw new Error(exceptions.INVALID_KEY_PATH_OPTION);\n }\n if (filesys.existsSync(options.certPath)) {\n options.cert = filesys.readFileSync(options.certPath);\n } else if (!isUndefined(options.certPath)) {\n throw new Error(exceptions.INVALID_CERT_PATH_OPTION);\n }\n if (filesys.existsSync(options.caPath)) {\n options.ca = filesys.readFileSync(options.caPath);\n } else if (!isUndefined(options.caPath)) {\n throw new Error(exceptions.INVALID_CA_PATH_OPTION);\n }\n\n // request certificate from partner\n options.requestCert = true;\n\n // require certificate authentication\n options.rejectUnauthorized = true;\n\n};\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/common/lib/tls-reader.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/device/index.js": -/*!*********************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/device/index.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("/* WEBPACK VAR INJECTION */(function(process) {/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\nvar events = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\");\nvar inherits = __webpack_require__(/*! util */ \"./node_modules/util/util.js\").inherits;\n\n//npm deps\nvar mqtt = __webpack_require__(/*! mqtt */ \"./node_modules/mqtt/lib/connect/index.js\");\nvar crypto = __webpack_require__(/*! crypto-js */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/index.js\");\n\n//app deps\nvar exceptions = __webpack_require__(/*! ./lib/exceptions */ \"./node_modules/aws-iot-device-sdk/device/lib/exceptions.js\");\nvar isUndefined = __webpack_require__(/*! ../common/lib/is-undefined */ \"./node_modules/aws-iot-device-sdk/common/lib/is-undefined.js\");\nvar tlsReader = __webpack_require__(/*! ../common/lib/tls-reader */ \"./node_modules/aws-iot-device-sdk/common/lib/tls-reader.js\");\nvar path = __webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\");\nvar fs = __webpack_require__(/*! fs */ \"./node_modules/node-libs-browser/mock/empty.js\");\n\n//begin module\nfunction makeTwoDigits(n) {\n if (n > 9) {\n return n;\n } else {\n return '0' + n;\n }\n}\n\nfunction getDateTimeString() {\n var d = new Date();\n\n //\n // The additional ''s are used to force JavaScript to interpret the\n // '+' operator as string concatenation rather than arithmetic.\n //\n return d.getUTCFullYear() + '' +\n makeTwoDigits(d.getUTCMonth() + 1) + '' +\n makeTwoDigits(d.getUTCDate()) + 'T' + '' +\n makeTwoDigits(d.getUTCHours()) + '' +\n makeTwoDigits(d.getUTCMinutes()) + '' +\n makeTwoDigits(d.getUTCSeconds()) + 'Z';\n}\n\nfunction getDateString(dateTimeString) {\n return dateTimeString.substring(0, dateTimeString.indexOf('T'));\n}\n\nfunction getSignatureKey(key, dateStamp, regionName, serviceName) {\n var kDate = crypto.HmacSHA256(dateStamp, 'AWS4' + key, {\n asBytes: true\n });\n var kRegion = crypto.HmacSHA256(regionName, kDate, {\n asBytes: true\n });\n var kService = crypto.HmacSHA256(serviceName, kRegion, {\n asBytes: true\n });\n var kSigning = crypto.HmacSHA256('aws4_request', kService, {\n asBytes: true\n });\n return kSigning;\n}\n\nfunction signUrl(method, scheme, hostname, path, queryParams, accessId, secretKey,\n region, serviceName, payload, today, now, debug, awsSTSToken) {\n\n var signedHeaders = 'host';\n\n var canonicalHeaders = 'host:' + hostname.toLowerCase() + '\\n';\n\n var canonicalRequest = method + '\\n' + // method\n path + '\\n' + // path\n queryParams + '\\n' + // query params\n canonicalHeaders + // headers\n '\\n' + // required\n signedHeaders + '\\n' + // signed header list\n crypto.SHA256(payload, {\n asBytes: true\n }); // hash of payload (empty string)\n\n if (debug === true) {\n console.log('canonical request: ' + canonicalRequest + '\\n');\n }\n\n var hashedCanonicalRequest = crypto.SHA256(canonicalRequest, {\n asBytes: true\n });\n\n if (debug === true) {\n console.log('hashed canonical request: ' + hashedCanonicalRequest + '\\n');\n }\n\n var stringToSign = 'AWS4-HMAC-SHA256\\n' +\n now + '\\n' +\n today + '/' + region + '/' + serviceName + '/aws4_request\\n' +\n hashedCanonicalRequest;\n\n if (debug === true) {\n console.log('string to sign: ' + stringToSign + '\\n');\n }\n\n var signingKey = getSignatureKey(secretKey, today, region, serviceName);\n\n if (debug === true) {\n console.log('signing key: ' + signingKey + '\\n');\n }\n\n var signature = crypto.HmacSHA256(stringToSign, signingKey, {\n asBytes: true\n });\n\n if (debug === true) {\n console.log('signature: ' + signature + '\\n');\n }\n\n var finalParams = queryParams + '&X-Amz-Signature=' + signature;\n\n if (!isUndefined(awsSTSToken)) {\n finalParams += '&X-Amz-Security-Token=' + encodeURIComponent(awsSTSToken);\n }\n\n var url = scheme + hostname + path + '?' + finalParams;\n\n if (debug === true) {\n console.log('url: ' + url + '\\n');\n }\n\n return url;\n}\n\nfunction prepareWebSocketUrl(options, awsAccessId, awsSecretKey, awsSTSToken) {\n var now = getDateTimeString();\n var today = getDateString(now);\n var path = '/mqtt';\n var awsServiceName = 'iotdevicegateway';\n var queryParams = 'X-Amz-Algorithm=AWS4-HMAC-SHA256' +\n '&X-Amz-Credential=' + awsAccessId + '%2F' + today + '%2F' + options.region + '%2F' + awsServiceName + '%2Faws4_request' +\n '&X-Amz-Date=' + now +\n '&X-Amz-SignedHeaders=host';\n var hostName = options.host;\n\n // Include the port number in the hostname if it's not \n // the standard wss port (443).\n //\n if (!isUndefined(options.port) && options.port !== 443) {\n hostName = options.host + ':' + options.port;\n }\n return signUrl('GET', 'wss://', hostName, path, queryParams,\n awsAccessId, awsSecretKey, options.region, awsServiceName, '', today, now, options.debug, awsSTSToken);\n}\n\nfunction prepareWebSocketCustomAuthUrl(options) {\n var path = '/mqtt';\n var hostName = options.host;\n\n // Include the port number in the hostname if it's not \n // the standard wss port (443).\n //\n if (!isUndefined(options.port) && options.port !== 443) {\n hostName = options.host + ':' + options.port;\n }\n\n return 'wss://' + hostName + path;\n}\n\nfunction arrayEach(array, iterFunction) {\n for (var idx in array) {\n if (Object.prototype.hasOwnProperty.call(array, idx)) {\n iterFunction.call(this, array[idx], parseInt(idx, 10));\n }\n }\n}\n\nfunction getCredentials(ini) {\n //Get shared credential function from AWS SDK.\n var map = {};\n var currentSection ={};\n arrayEach(ini.split(/\\r?\\n/), function(line) {\n line = line.split(/(^|\\s)[;#]/)[0]; // remove comments\n var section = line.match(/^\\s*\\[([^\\[\\]]+)\\]\\s*$/);\n if (section) {\n currentSection = section[1];\n } else if (currentSection) {\n var item = line.match(/^\\s*(.+?)\\s*=\\s*(.+?)\\s*$/);\n if (item) {\n map[currentSection] = map[currentSection] || {};\n map[currentSection][item[1]] = item[2];\n }\n }\n });\n return map;\n}\n\n//\n// This method is the exposed module; it validates the mqtt options,\n// creates a secure mqtt connection via TLS, and returns the mqtt\n// connection instance.\n//\nfunction DeviceClient(options) {\n //\n // Force instantiation using the 'new' operator; this will cause inherited\n // constructors (e.g. the 'events' class) to be called.\n //\n if (!(this instanceof DeviceClient)) {\n return new DeviceClient(options);\n }\n //\n // A copy of 'this' for use inside of closures\n //\n var that = this;\n\n //\n // Offline Operation\n //\n // The connection to AWS IoT can be in one of three states:\n //\n // 1) Inactive\n // 2) Established\n // 3) Stable\n //\n // During state 1), publish operations are placed in a queue\n // (\"filling\")\n //\n // During states 2) and 3), any operations present in the queue\n // are sent to the mqtt client for completion (\"draining\").\n //\n // In all states, subscriptions are tracked in a cache\n //\n // A \"draining interval\" is used to specify the rate at which\n // which operations are drained from the queue.\n //\n // +- - - - - - - - - - - - - - - - - - - - - - - - +\n // | |\n // \n // | FILLING | \n // \n // | |\n // +-----------------------------+ \n // | | | |\n // | | \n // | v | |\n // +- - Established Inactive - -+\n // | | ^ |\n // | | \n // | | | |\n // +----------> Stable ----------+ \n // | |\n // \n // | DRAINING | \n // \n // | |\n // +- - - - - - - - - - - - - - - - - - - - - - - - +\n //\n //\n // Draining Operation\n //\n // During draining, existing subscriptions are re-sent,\n // followed by any publishes which occurred while offline.\n // \n\n //\n // Publish cache used during filling\n //\n var offlinePublishQueue = [];\n var offlineQueueing = true;\n var offlineQueueMaxSize = 0;\n var offlineQueueDropBehavior = 'oldest'; // oldest or newest\n offlinePublishQueue.length = 0;\n\n //\n // Subscription queue for subscribe/unsubscribe requests received when offline\n // We do not want an unbounded queue so for now limit to current max subs in AWS IoT\n //\n var offlineSubscriptionQueue = [];\n var offlineSubscriptionQueueMaxSize = 50;\n offlineSubscriptionQueue.length = 0;\n\n //\n // Subscription cache; active if autoResubscribe === true\n //\n var activeSubscriptions = [];\n var autoResubscribe = true;\n activeSubscriptions.length = 0;\n\n //\n // Cloned subscription cache; active during initial draining.\n //\n var clonedSubscriptions = [];\n clonedSubscriptions.length = 0;\n\n //\n // Contains the operational state of the connection\n //\n var connectionState = 'inactive';\n\n //\n // Used to time draining operations; active during draining.\n //\n var drainingTimer = null;\n var drainTimeMs = 250;\n\n //Default keep alive time interval in seconds.\n var defaultKeepalive = 300;\n //\n // These properties control the reconnect behavior of the MQTT Client. If \n // the MQTT client becomes disconnected, it will attempt to reconnect after \n // a quiet period; this quiet period doubles with each reconnection attempt,\n // e.g. 1 seconds, 2 seconds, 2, 8, 16, 32, etc... up until a maximum \n // reconnection time is reached.\n //\n // If a connection is active for the minimum connection time, the quiet \n // period is reset to the initial value.\n //\n // baseReconnectTime: the time in seconds to wait before the first \n // reconnect attempt\n //\n // minimumConnectionTime: the time in seconds that a connection must be \n // active before resetting the current reconnection time to the base \n // reconnection time\n //\n // maximumReconnectTime: the maximum time in seconds to wait between \n // reconnect attempts\n //\n // The defaults for these values are:\n //\n // baseReconnectTime: 1 seconds\n // minimumConnectionTime: 20 seconds\n // maximumReconnectTime: 128 seconds\n //\n var baseReconnectTimeMs = 1000;\n var minimumConnectionTimeMs = 20000;\n var maximumReconnectTimeMs = 128000;\n var currentReconnectTimeMs;\n\n //\n // Used to measure the length of time the connection has been active to\n // know if it's stable or not. Active beginning from receipt of a 'connect'\n // event (e.g. received CONNACK) until 'minimumConnectionTimeMs' has elapsed.\n //\n var connectionTimer = null;\n\n //\n // Credentials when authenticating via WebSocket/SigV4\n //\n var awsAccessId;\n var awsSecretKey;\n var awsSTSToken;\n //\n // Validate options, set default reconnect period if not specified.\n //\n var metricPrefix = \"?SDK=JavaScript&Version=\";\n var pjson = __webpack_require__(/*! ../package.json */ \"./node_modules/aws-iot-device-sdk/package.json\");\n var sdkVersion = pjson.version;\n var defaultUsername = metricPrefix + sdkVersion;\n\n if (isUndefined(options) ||\n Object.keys(options).length === 0) {\n throw new Error(exceptions.INVALID_CONNECT_OPTIONS);\n }\n if (isUndefined(options.keepalive)) {\n options.keepalive = defaultKeepalive;\n }\n //\n // Metrics will be enabled by default unless the user explicitly disables it\n //\n if (isUndefined(options.enableMetrics) || options.enableMetrics === true){\n if (isUndefined(options.username)) {\n options.username = defaultUsername;\n } else {\n options.username += defaultUsername;\n }\n }\n if (!isUndefined(options.baseReconnectTimeMs)) {\n baseReconnectTimeMs = options.baseReconnectTimeMs;\n }\n if (!isUndefined(options.minimumConnectionTimeMs)) {\n minimumConnectionTimeMs = options.minimumConnectionTimeMs;\n }\n if (!isUndefined(options.maximumReconnectTimeMs)) {\n maximumReconnectTimeMs = options.maximumReconnectTimeMs;\n }\n if (!isUndefined(options.drainTimeMs)) {\n drainTimeMs = options.drainTimeMs;\n }\n if (!isUndefined(options.autoResubscribe)) {\n autoResubscribe = options.autoResubscribe;\n }\n if (!isUndefined(options.offlineQueueing)) {\n offlineQueueing = options.offlineQueueing;\n }\n if (!isUndefined(options.offlineQueueMaxSize)) {\n offlineQueueMaxSize = options.offlineQueueMaxSize;\n }\n if (!isUndefined(options.offlineQueueDropBehavior)) {\n offlineQueueDropBehavior = options.offlineQueueDropBehavior;\n }\n currentReconnectTimeMs = baseReconnectTimeMs;\n options.reconnectPeriod = currentReconnectTimeMs;\n options.fastDisconnectDetection = true;\n //\n //SDK has its own logic to deal with auto resubscribe\n //\n options.resubscribe = false;\n\n //\n // Verify that the reconnection timing parameters make sense.\n //\n if (options.baseReconnectTimeMs <= 0) {\n throw new Error(exceptions.INVALID_RECONNECT_TIMING);\n }\n if (maximumReconnectTimeMs < baseReconnectTimeMs) {\n throw new Error(exceptions.INVALID_RECONNECT_TIMING);\n }\n if (minimumConnectionTimeMs < baseReconnectTimeMs) {\n throw new Error(exceptions.INVALID_RECONNECT_TIMING);\n }\n //\n // Verify that the other optional parameters make sense.\n //\n if (offlineQueueDropBehavior !== 'newest' &&\n offlineQueueDropBehavior !== 'oldest') {\n throw new Error(exceptions.INVALID_OFFLINE_QUEUEING_PARAMETERS);\n }\n if (offlineQueueMaxSize < 0) {\n throw new Error(exceptions.INVALID_OFFLINE_QUEUEING_PARAMETERS);\n }\n\n // set protocol, do not override existing definitions if available\n if (isUndefined(options.protocol)) {\n options.protocol = 'mqtts';\n }\n\n if (isUndefined(options.host)) {\n throw new Error(exceptions.INVALID_CONNECT_OPTIONS);\n }\n\n if (options.protocol === 'mqtts') {\n // set port, do not override existing definitions if available\n if (isUndefined(options.port)) {\n options.port = 8883;\n }\n\n //read and map certificates\n tlsReader(options);\n } else if (options.protocol === 'wss' || options.protocol === 'wss-custom-auth') {\n if (options.protocol === 'wss') {\n //\n // AWS access id and secret key \n // It first check Input options and Environment variables \n // If that not available, it will try to load credentials from default credential file\n if (!isUndefined(options.accessKeyId)) {\n awsAccessId = options.accessKeyId;\n } else {\n awsAccessId = process.env.AWS_ACCESS_KEY_ID;\n }\n if (!isUndefined(options.secretKey)) {\n awsSecretKey = options.secretKey;\n } else {\n awsSecretKey = process.env.AWS_SECRET_ACCESS_KEY;\n }\n if (!isUndefined(options.sessionToken)) {\n awsSTSToken = options.sessionToken;\n } else {\n awsSTSToken = process.env.AWS_SESSION_TOKEN;\n }\n if (isUndefined(awsAccessId) || isUndefined(awsSecretKey)) {\n var filename;\n try {\n if (!isUndefined(options.filename)) {\n filename = options.filename;\n } else {\n filename = _loadDefaultFilename();\n }\n var user_profile = options.profile || process.env.AWS_PROFILE || 'default';\n var creds = getCredentials(fs.readFileSync(filename, 'utf-8'));\n var profile = creds[user_profile];\n awsAccessId = profile.aws_access_key_id;\n awsSecretKey = profile.aws_secret_access_key;\n awsSTSToken = profile.aws_session_token;\n } catch (e) {\n console.log(e);\n console.log('Failed to read credentials from ' + filename);\n }\n }\n // AWS Access Key ID and AWS Secret Key must be defined\n if (isUndefined(awsAccessId) || (isUndefined(awsSecretKey))) {\n console.log('To connect via WebSocket/SigV4, AWS Access Key ID and AWS Secret Key must be passed either in options or as environment variables; see README.md');\n throw new Error(exceptions.INVALID_CONNECT_OPTIONS);\n }\n } else {\n if (isUndefined(options.customAuthHeaders)) {\n console.log('To authenticate with a custom authorizer, you must provide the required HTTP headers; see README.md');\n throw new Error(exceptions.INVALID_CONNECT_OPTIONS);\n }\n }\n\n if (!isUndefined(options.host) && isUndefined(options.region)) {\n var pattern = /[a-zA-Z0-9]+\\.iot\\.([a-z]+-[a-z]+-[0-9]+)\\.amazonaws\\..+/;\n var region = pattern.exec(options.host);\n if (region === null) {\n console.log('Host endpoint is not valid');\n throw new Error(exceptions.INVALID_CONNECT_OPTIONS);\n } else {\n options.region = region[1];\n }\n }\n // set port, do not override existing definitions if available\n if (isUndefined(options.port)) {\n options.port = 443;\n }\n // check websocketOptions and ensure that the protocol is defined\n if (isUndefined(options.websocketOptions)) {\n options.websocketOptions = {\n protocol: 'mqttv3.1'\n };\n } else {\n options.websocketOptions.protocol = 'mqttv3.1';\n }\n\n if (options.protocol === 'wss-custom-auth') {\n options.websocketOptions.headers = options.customAuthHeaders;\n }\n } \n\n if ((!isUndefined(options)) && (options.debug === true)) {\n console.log(options);\n console.log('attempting new mqtt connection...');\n }\n //connect and return the client instance to map all mqttjs apis\n\n var protocols = {};\n protocols.mqtts = __webpack_require__(/*! ./lib/tls */ \"./node_modules/aws-iot-device-sdk/device/lib/tls.js\");\n protocols.wss = __webpack_require__(/*! ./lib/ws */ \"./node_modules/aws-iot-device-sdk/device/lib/ws.js\");\n\n function _loadDefaultFilename() {\n var home = process.env.HOME ||\n process.env.USERPROFILE || \n (process.env.HOMEPATH ? ((process.env.HOMEDRIVE || 'C:/') + process.env.HOMEPATH) : null);\n return path.join(home, '.aws', 'credentials');\n\n }\n function _addToSubscriptionCache(topic, options) {\n var matches = activeSubscriptions.filter(function(element) {\n return element.topic === topic;\n });\n //\n // Add the element only if it doesn't already exist.\n //\n if (matches.length === 0) {\n activeSubscriptions.push({\n topic: topic,\n options: options\n });\n }\n }\n\n function _deleteFromSubscriptionCache(topic, options) {\n var remaining = activeSubscriptions.filter(function(element) {\n return element.topic !== topic;\n });\n activeSubscriptions = remaining;\n }\n\n function _updateSubscriptionCache(operation, topics, options) {\n var opFunc = null;\n\n //\n // Don't cache subscriptions if auto-resubscribe is disabled\n // \n if (autoResubscribe === false) {\n return;\n }\n if (operation === 'subscribe') {\n opFunc = _addToSubscriptionCache;\n } else if (operation === 'unsubscribe') {\n opFunc = _deleteFromSubscriptionCache;\n }\n //\n // Test to see if 'topics' is an array and if so, iterate.\n //\n if (Object.prototype.toString.call(topics) === '[object Array]') {\n topics.forEach(function(item, index, array) {\n opFunc(item, options);\n });\n } else {\n opFunc(topics, options);\n }\n }\n\n //\n // Return true if the connection is currently in a 'filling' \n // state\n //\n function _filling() {\n return connectionState === 'inactive';\n }\n\n function _wrapper(client) {\n var protocol = options.protocol;\n if (protocol === 'wss') {\n var url;\n //\n // If the access id and secret key are available, prepare the URL. \n // Otherwise, set the url to an invalid value.\n //\n if (awsAccessId === '' || awsSecretKey === '') {\n url = 'wss://no-credentials-available';\n } else {\n url = prepareWebSocketUrl(options, awsAccessId, awsSecretKey, awsSTSToken);\n }\n\n if (options.debug === true) {\n console.log('using websockets, will connect to \\'' + url + '\\'...');\n }\n\n options.url = url;\n } else if (protocol === 'wss-custom-auth') {\n options.url = prepareWebSocketCustomAuthUrl(options);\n if (options.debug === true) {\n console.log('using websockets custom auth, will connect to \\'' + options.url + '\\'...');\n }\n // Treat the request as a standard websocket request from here onwards\n protocol = 'wss';\n }\n return protocols[protocol](client, options);\n }\n\n var device = new mqtt.MqttClient(_wrapper, options);\n\n //handle events from the mqtt client\n\n //\n // Timeout expiry function for the connection timer; once a connection\n // is stable, reset the current reconnection time to the base value. \n //\n function _markConnectionStable() {\n currentReconnectTimeMs = baseReconnectTimeMs;\n device.options.reconnectPeriod = currentReconnectTimeMs;\n //\n // Mark this timeout as expired\n //\n connectionTimer = null;\n connectionState = 'stable';\n }\n //\n // Trim the offline queue if required; returns true if another\n // element can be placed in the queue\n //\n function _trimOfflinePublishQueueIfNecessary() {\n var rc = true;\n\n if ((offlineQueueMaxSize > 0) &&\n (offlinePublishQueue.length >= offlineQueueMaxSize)) {\n //\n // The queue has reached its maximum size, trim it\n // according to the defined drop behavior.\n //\n if (offlineQueueDropBehavior === 'oldest') {\n offlinePublishQueue.shift();\n } else {\n rc = false;\n }\n }\n return rc;\n }\n\n //\n // Timeout expiry function for the drain timer; once a connection\n // has been established, begin draining cached transactions.\n //\n function _drainOperationQueue() {\n\n //\n // Handle our active subscriptions first, using a cloned\n // copy of the array. We shift them out one-by-one until\n // all have been processed, leaving the official record\n // of active subscriptions untouched.\n // \n var subscription = clonedSubscriptions.shift();\n\n if (!isUndefined(subscription)) {\n //\n // If the 3rd argument (namely callback) is not present, we will\n // use two-argument form to call mqtt.Client#subscribe(), which\n // supports both subscribe(topics, options) and subscribe(topics, callback).\n //\n if (!isUndefined(subscription.callback)) {\n device.subscribe(subscription.topic, subscription.options, subscription.callback);\n } else {\n device.subscribe(subscription.topic, subscription.options);\n }\n } else {\n //\n // If no remaining active subscriptions to process,\n // then handle subscription requests queued while offline.\n //\n var req = offlineSubscriptionQueue.shift();\n\n if (!isUndefined(req)) {\n _updateSubscriptionCache(req.type, req.topics, req.options);\n if (req.type === 'subscribe') {\n if (!isUndefined(req.callback)) {\n device.subscribe(req.topics, req.options, req.callback);\n } else {\n device.subscribe(req.topics, req.options);\n }\n } else if (req.type === 'unsubscribe') {\n device.unsubscribe(req.topics, req.callback);\n }\n } else {\n //\n // If no active or queued subscriptions remaining to process,\n // then handle queued publish operations.\n //\n var offlinePublishMessage = offlinePublishQueue.shift();\n\n if (!isUndefined(offlinePublishMessage)) {\n device.publish(offlinePublishMessage.topic,\n offlinePublishMessage.message,\n offlinePublishMessage.options,\n offlinePublishMessage.callback);\n }\n if (offlinePublishQueue.length === 0) {\n //\n // The subscription and offlinePublishQueue queues are fully drained,\n // cancel the draining timer.\n //\n clearInterval(drainingTimer);\n drainingTimer = null;\n }\n }\n }\n }\n //\n // Event handling - *all* events generated by the mqtt.js client must be\n // handled here, *and* propagated upwards.\n //\n\n device.on('connect', function(connack) {\n //\n // If not already running, start the connection timer.\n //\n if (connectionTimer === null) {\n connectionTimer = setTimeout(_markConnectionStable,\n minimumConnectionTimeMs);\n }\n connectionState = 'established';\n //\n // If not already running, start the draining timer and \n // clone the active subscriptions.\n //\n if (drainingTimer === null) {\n clonedSubscriptions = activeSubscriptions.slice(0);\n drainingTimer = setInterval(_drainOperationQueue,\n drainTimeMs);\n }\n that.emit('connect', connack);\n });\n device.on('close', function(err) {\n if (!isUndefined(err)) {\n that.emit('error', err);\n }\n if ((!isUndefined(options)) && (options.debug === true)) {\n console.log('connection lost - will attempt reconnection in ' +\n device.options.reconnectPeriod / 1000 + ' seconds...');\n }\n //\n // Clear the connection and drain timers\n //\n clearTimeout(connectionTimer);\n connectionTimer = null;\n clearInterval(drainingTimer);\n drainingTimer = null;\n\n //\n // Mark the connection state as inactive\n //\n connectionState = 'inactive';\n\n that.emit('close');\n });\n device.on('reconnect', function() {\n //\n // Update the current reconnect timeout; this will be the\n // next timeout value used if this connect attempt fails.\n // \n currentReconnectTimeMs = currentReconnectTimeMs * 2;\n currentReconnectTimeMs = Math.min(maximumReconnectTimeMs, currentReconnectTimeMs);\n device.options.reconnectPeriod = currentReconnectTimeMs;\n\n that.emit('reconnect');\n });\n device.on('offline', function() {\n that.emit('offline');\n });\n device.on('error', function(error) {\n that.emit('error', error);\n });\n device.on('packetsend', function(packet) {\n that.emit('packetsend', packet);\n });\n device.on('packetreceive', function(packet) {\n that.emit('packetreceive', packet);\n });\n device.on('message', function(topic, message, packet) {\n that.emit('message', topic, message, packet);\n });\n //\n // The signatures of these methods *must* match those of the mqtt.js\n // client.\n //\n this.publish = function(topic, message, options, callback) {\n //\n // If filling or still draining, push this publish operation \n // into the offline operations queue; otherwise, perform it\n // immediately.\n //\n if (offlineQueueing === true && (_filling() || drainingTimer !== null)) {\n if (_trimOfflinePublishQueueIfNecessary()) {\n offlinePublishQueue.push({\n topic: topic,\n message: message,\n options: options,\n callback: callback\n });\n }\n } else {\n if (offlineQueueing === true || !_filling()) {\n device.publish(topic, message, options, callback);\n }\n }\n };\n this.subscribe = function(topics, options, callback) {\n if (!_filling() || autoResubscribe === false) {\n _updateSubscriptionCache('subscribe', topics, options); // we do not store callback in active cache\n //\n // If the 3rd argument (namely callback) is not present, we will\n // use two-argument form to call mqtt.Client#subscribe(), which\n // supports both subscribe(topics, options) and subscribe(topics, callback).\n //\n if (!isUndefined(callback)) {\n device.subscribe(topics, options, callback);\n } else {\n device.subscribe(topics, options);\n } \n } else {\n // we're offline - queue this subscription request\n if (offlineSubscriptionQueue.length < offlineSubscriptionQueueMaxSize) {\n offlineSubscriptionQueue.push({\n type: 'subscribe',\n topics: topics,\n options: options,\n callback: callback\n });\n } else {\n that.emit('error', new Error('Maximum queued offline subscription reached'));\n }\n }\n };\n this.unsubscribe = function(topics, callback) {\n if (!_filling() || autoResubscribe === false) {\n _updateSubscriptionCache('unsubscribe', topics);\n device.unsubscribe(topics, callback);\n } else {\n // we're offline - queue this unsubscribe request\n if (offlineSubscriptionQueue.length < offlineSubscriptionQueueMaxSize) {\n offlineSubscriptionQueue.push({\n type: 'unsubscribe',\n topics: topics,\n options: options,\n callback: callback\n });\n }\n }\n };\n this.end = function(force, callback) {\n device.end(force, callback);\n };\n\n this.handleMessage = device.handleMessage.bind(device);\n\n device.handleMessage = function(packet, callback) {\n that.handleMessage(packet, callback);\n };\n\n this.updateWebSocketCredentials = function(accessKeyId, secretKey, sessionToken, expiration) {\n awsAccessId = accessKeyId;\n awsSecretKey = secretKey;\n awsSTSToken = sessionToken;\n };\n this.getWebsocketHeaders = function() {\n return options.websocketOptions.headers;\n };\n //\n // Call this function to update the custom auth headers\n //\n this.updateCustomAuthHeaders = function(newHeaders) {\n options.websocketOptions.headers = newHeaders;\n };\n //\n // Used for integration testing only\n //\n this.simulateNetworkFailure = function() {\n device.stream.emit('error', new Error('simulated connection error'));\n device.stream.end();\n };\n}\n\n//\n// Allow instances to listen in on events that we produce for them\n//\ninherits(DeviceClient, events.EventEmitter);\n\nmodule.exports = DeviceClient;\nmodule.exports.DeviceClient = DeviceClient;\n\n//\n// Exported for unit testing only\n//\nmodule.exports.prepareWebSocketUrl = prepareWebSocketUrl;\nmodule.exports.prepareWebSocketCustomAuthUrl = prepareWebSocketCustomAuthUrl;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/device/index.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/device/lib/exceptions.js": -/*!******************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/device/lib/exceptions.js ***! - \******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\n\n//npm deps\n\n//app deps\n\n//begin module\nmodule.exports = {\n INVALID_CONNECT_OPTIONS: 'Invalid connect options supplied.',\n INVALID_CLIENT_ID_OPTION: 'Invalid \"clientId\" (mqtt client id) option supplied.',\n INVALID_RECONNECT_TIMING: 'Invalid reconnect timing options supplied.',\n INVALID_OFFLINE_QUEUEING_PARAMETERS: 'Invalid offline queueing options supplied.'\n};\n\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/device/lib/exceptions.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/device/lib/tls.js": -/*!***********************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/device/lib/tls.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\nvar tls = __webpack_require__(/*! tls */ \"./node_modules/node-libs-browser/mock/empty.js\");\n\n//npm deps\n\n//app deps\n\nfunction buildBuilder(mqttClient, opts) {\n var connection;\n\n connection = tls.connect(opts);\n\n function handleTLSerrors(err) {\n mqttClient.emit('error', err);\n connection.end();\n }\n\n connection.on('secureConnect', function() {\n if (!connection.authorized) {\n connection.emit('error', new Error('TLS not authorized'));\n } else {\n connection.removeListener('error', handleTLSerrors);\n }\n });\n\n connection.on('error', handleTLSerrors);\n return connection;\n}\n\nmodule.exports = buildBuilder;\n\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/device/lib/tls.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/device/lib/ws.js": -/*!**********************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/device/lib/ws.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\n\n//npm deps\nconst websocket = __webpack_require__(/*! websocket-stream */ \"./node_modules/websocket-stream/stream.js\");\n\n//app deps\n\nfunction buildBuilder(client, opts) {\n return websocket(opts.url, ['mqttv3.1'], opts.websocketOptions);\n}\n\nmodule.exports = buildBuilder;\n\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/device/lib/ws.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/index.js": -/*!**************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/index.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n/*\n * Expose AWS IoT Embedded Javascript SDK modules\n */\nmodule.exports.device = __webpack_require__(/*! ./device */ \"./node_modules/aws-iot-device-sdk/device/index.js\");\nmodule.exports.thingShadow = __webpack_require__(/*! ./thing */ \"./node_modules/aws-iot-device-sdk/thing/index.js\");\nmodule.exports.jobs = __webpack_require__(/*! ./jobs */ \"./node_modules/aws-iot-device-sdk/jobs/index.js\");\n\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/index.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/jobs/index.js": -/*!*******************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/jobs/index.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("/*\n * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\nvar events = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\");\nvar inherits = __webpack_require__(/*! util */ \"./node_modules/util/util.js\").inherits;\n\n//npm deps\n\n//app deps\nvar deviceModule = __webpack_require__(/*! ../device */ \"./node_modules/aws-iot-device-sdk/device/index.js\");\nvar isUndefined = __webpack_require__(/*! ../common/lib/is-undefined */ \"./node_modules/aws-iot-device-sdk/common/lib/is-undefined.js\");\n\n//\n// private functions\n//\n\nfunction isJobTopic(topicTokens) {\n //\n // Job topics have the forms:\n //\n // $aws/things/{thingName}/jobs/#\n //\n return (topicTokens[0] === '$aws' && topicTokens[1] === 'things' && topicTokens[3] === 'jobs');\n}\n\nfunction buildJobTopic(thingName, jobId, operation) {\n var result = '$aws/things/' + thingName + '/jobs/';\n\n // check for omitted jobId and fixup parameters\n if (isUndefined(operation)) {\n operation = jobId;\n } else {\n result += jobId.toString() + '/';\n }\n\n result += operation;\n\n return result;\n}\n\n\n//begin module\n\nfunction jobsClient(options) {\n //\n // Force instantiation using the 'new' operator; this will cause inherited\n // constructors (e.g. the 'events' class) to be called.\n //\n if (!(this instanceof jobsClient)) {\n return new jobsClient(options);\n }\n\n //\n // A copy of 'this' for use inside of closures\n //\n var that = this;\n\n //\n // Track job subscriptions\n //\n // [\n // { \n // \"thingName\": \"string\",\n // \"operations\": [\n // { \n // \"operationName\": \"string\", // if null then treat as default\n // \"currentJob\": job,\n // \"callback\": callback\n // }\n // ]\n // }\n // ]\n //\n var jobSubscriptions = [];\n\n //\n // Instantiate the device\n //\n var device = deviceModule.DeviceClient(options);\n\n //\n // Private function to update job execution status for given thing\n //\n this._updateJobStatus = function(thingName, job, status, statusDetails, callback) {\n // Check for omitted statusDetails and update parameters\n if (typeof statusDetails === \"function\") {\n callback = statusDetails;\n statusDetails = undefined;\n }\n\n if ((!isUndefined(options)) && (options.debug === true)) {\n console.log('updateJobStatus:', { thingName: thingName, jobId: job.id, status: status, statusDetails: statusDetails });\n }\n\n device.publish(buildJobTopic(thingName, job.id, 'update'), JSON.stringify({ status: status, statusDetails: statusDetails}), null, function(err){\n if (isUndefined(err)) {\n job.status = { status: status, statusDetails: statusDetails };\n }\n\n if (!isUndefined(callback)) {\n callback(err);\n }\n });\n }\n\n //\n // Private function to build job object for passing to callback supplied in subscribeToJobs\n //\n this._buildJobObject = function(thingName, jobExecution) {\n if (isUndefined(jobExecution) || isUndefined(jobExecution.jobId)) {\n return null;\n }\n\n var job = {};\n\n job.id = jobExecution.jobId;\n job.document = jobExecution.jobDocument;\n job.operation = job.document.operation;\n job.status = { status: jobExecution.status, statusDetails: jobExecution.statusDetails };\n\n job.inProgress = function(statusDetails, callback) {\n that._updateJobStatus(thingName, job, 'IN_PROGRESS', statusDetails, callback);\n }\n\n job.failed = function(statusDetails, callback) {\n that._updateJobStatus(thingName, job, 'FAILED', statusDetails, callback);\n }\n\n job.succeeded = function(statusDetails, callback) {\n that._updateJobStatus(thingName, job, 'SUCCEEDED', statusDetails, callback);\n }\n\n return job;\n }\n\n //\n // Private function to handle job messages and process them accordingly\n //\n this._handleMessages = function(topic, payload) {\n var topicTokens = topic.split('/');\n\n // If not a job topic emit to application and return\n if (!isJobTopic(topicTokens)) {\n that.emit('message', topic, payload);\n return;\n }\n\n var thingName = topicTokens[2];\n\n var thing = jobSubscriptions.find(function(elem) { \n return elem.thingName === thingName; \n });\n\n // Do nothing if thing not found in job subscriptions \n if (isUndefined(thing)) {\n return;\n }\n\n var jobExecutionData = {};\n\n try {\n jobExecutionData = JSON.parse(payload.toString());\n } catch (err) {\n if (options.debug === true) {\n console.error('failed parsing JSON \\'' + payload.toString() + '\\', ' + err);\n }\n return;\n }\n\n if (isUndefined(jobExecutionData.execution) || \n isUndefined(jobExecutionData.execution.jobId) || \n isUndefined(jobExecutionData.execution.jobDocument)) {\n return;\n }\n\n var operationName = jobExecutionData.execution.jobDocument.operation;\n var operation = thing.operations.find(function(elem) { \n return (isUndefined(operationName) ? isUndefined(elem.operationName) : operationName === elem.operationName); \n });\n\n // If operation subscription not found by operation name then look for default operation subscription\n if (isUndefined(operation)) {\n operation = thing.operations.find(function(elem) { return (isUndefined(elem.operationName)); });\n\n if (isUndefined(operation)) {\n return;\n }\n }\n\n operation.callback(null, that._buildJobObject(thingName, jobExecutionData.execution));\n }\n\n this.subscribeToJobs = function(thingName, operationName, callback) {\n // Check for omitted optional operationName and fixup parameters\n if (isUndefined(callback)) {\n callback = operationName;\n operationName = null;\n }\n\n if ((!isUndefined(options)) && (options.debug === true)) {\n console.log('subscribeToJobs:', { thingName: thingName, operationName: operationName });\n }\n\n var thing = jobSubscriptions.find(function(elem) { \n return elem.thingName === thingName; \n });\n\n // Check for previously unseen thing and add to job subscriptions\n if (isUndefined(thing)) {\n thing = { thingName: thingName, operations: [] };\n jobSubscriptions.push(thing);\n\n device.subscribe([ buildJobTopic(thingName, '$next/get/accepted'), buildJobTopic(thingName, 'notify-next') ], function(err, granted) {\n if (!isUndefined(err)) {\n callback(err);\n }\n });\n }\n\n // Find existing subscription for the given operationName\n var operation = thing.operations.find(function(elem) { \n return (isUndefined(operationName) ? isUndefined(elem.operationName) : operationName === elem.operationName); \n });\n\n // If existing subscription found then update callback, otherwise create new entry in the thing's operations array\n if (!isUndefined(operation)) {\n operation.callback = callback;\n } else {\n operation = { operationName: operationName, callback: callback };\n thing.operations.push(operation);\n }\n }\n\n this.unsubscribeFromJobs = function(thingName, operationName, callback) {\n // Check for omitted optional operationName and fixup parameters\n if (isUndefined(callback)) {\n callback = operationName;\n operationName = null;\n }\n\n if ((!isUndefined(options)) && (options.debug === true)) {\n console.log('unsubscribeFromJobs:', { thingName: thingName, operationName: operationName });\n }\n\n var iThing = jobSubscriptions.findIndex(function(elem) { \n return elem.thingName === thingName;\n });\n\n var notFoundError = new Error('subscription not found for given thing');\n\n // Check for previously unseen thing and add to job subscriptions and publish to get to retrieve first job to be executed\n if (iThing < 0) {\n callback(notFoundError);\n return;\n }\n\n var iOperation = jobSubscriptions[iThing].operations.findIndex(function (elem) {\n return (isUndefined(operationName) ? isUndefined(elem.operationName) : operationName === elem.operationName);\n });\n\n if (iOperation < 0) {\n callback(notFoundError);\n return;\n }\n\n jobSubscriptions[iThing].operations.splice(iOperation, 1);\n\n if (jobSubscriptions[iThing].operations.length === 0) {\n jobSubscriptions.splice(iThing, 1);\n device.unsubscribe([ buildJobTopic(thingName, '$next/get/accepted'), buildJobTopic(thingName, 'notify-next') ], callback);\n return;\n }\n\n callback();\n }\n\n this.startJobNotifications = function(thingName, callback) {\n if ((!isUndefined(options)) && (options.debug === true)) {\n console.log('startJobNotifications:', { thingName: thingName });\n }\n\n device.publish(buildJobTopic(thingName, '$next', 'get'), '{}', callback);\n }\n\n device.on('connect', function() {\n that.emit('connect');\n });\n device.on('close', function() {\n that.emit('close');\n });\n device.on('reconnect', function() {\n that.emit('reconnect');\n });\n device.on('offline', function() {\n that.emit('offline');\n });\n device.on('error', function(error) {\n that.emit('error', error);\n });\n\n device.on('message', that._handleMessages);\n\n this.publish = device.publish;\n this.subscribe = device.subscribe;\n this.unsubscribe = device.unsubscribe;\n this.end = device.end;\n this.handleMessage = device.handleMessage;\n this.updateWebSocketCredentials = device.updateWebSocketCredentials;\n\n //\n // Used for integration testing only\n //\n this.simulateNetworkFailure = device.simulateNetworkFailure;\n}\n\n//\n// Allow instances to listen in on events that we produce for them\n//\ninherits(jobsClient, events.EventEmitter);\n\nmodule.exports = jobsClient;\n\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/jobs/index.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/aes.js": -/*!***********************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/aes.js ***! - \***********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./enc-base64 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js\"), __webpack_require__(/*! ./md5 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js\"), __webpack_require__(/*! ./evpkdf */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Lookup tables\n\t var SBOX = [];\n\t var INV_SBOX = [];\n\t var SUB_MIX_0 = [];\n\t var SUB_MIX_1 = [];\n\t var SUB_MIX_2 = [];\n\t var SUB_MIX_3 = [];\n\t var INV_SUB_MIX_0 = [];\n\t var INV_SUB_MIX_1 = [];\n\t var INV_SUB_MIX_2 = [];\n\t var INV_SUB_MIX_3 = [];\n\n\t // Compute lookup tables\n\t (function () {\n\t // Compute double table\n\t var d = [];\n\t for (var i = 0; i < 256; i++) {\n\t if (i < 128) {\n\t d[i] = i << 1;\n\t } else {\n\t d[i] = (i << 1) ^ 0x11b;\n\t }\n\t }\n\n\t // Walk GF(2^8)\n\t var x = 0;\n\t var xi = 0;\n\t for (var i = 0; i < 256; i++) {\n\t // Compute sbox\n\t var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);\n\t sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;\n\t SBOX[x] = sx;\n\t INV_SBOX[sx] = x;\n\n\t // Compute multiplication\n\t var x2 = d[x];\n\t var x4 = d[x2];\n\t var x8 = d[x4];\n\n\t // Compute sub bytes, mix columns tables\n\t var t = (d[sx] * 0x101) ^ (sx * 0x1010100);\n\t SUB_MIX_0[x] = (t << 24) | (t >>> 8);\n\t SUB_MIX_1[x] = (t << 16) | (t >>> 16);\n\t SUB_MIX_2[x] = (t << 8) | (t >>> 24);\n\t SUB_MIX_3[x] = t;\n\n\t // Compute inv sub bytes, inv mix columns tables\n\t var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);\n\t INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);\n\t INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);\n\t INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);\n\t INV_SUB_MIX_3[sx] = t;\n\n\t // Compute next counter\n\t if (!x) {\n\t x = xi = 1;\n\t } else {\n\t x = x2 ^ d[d[d[x8 ^ x2]]];\n\t xi ^= d[d[xi]];\n\t }\n\t }\n\t }());\n\n\t // Precomputed Rcon lookup\n\t var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\n\n\t /**\n\t * AES block cipher algorithm.\n\t */\n\t var AES = C_algo.AES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\t var keySize = key.sigBytes / 4;\n\n\t // Compute number of rounds\n\t var nRounds = this._nRounds = keySize + 6\n\n\t // Compute number of key schedule rows\n\t var ksRows = (nRounds + 1) * 4;\n\n\t // Compute key schedule\n\t var keySchedule = this._keySchedule = [];\n\t for (var ksRow = 0; ksRow < ksRows; ksRow++) {\n\t if (ksRow < keySize) {\n\t keySchedule[ksRow] = keyWords[ksRow];\n\t } else {\n\t var t = keySchedule[ksRow - 1];\n\n\t if (!(ksRow % keySize)) {\n\t // Rot word\n\t t = (t << 8) | (t >>> 24);\n\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\n\t // Mix Rcon\n\t t ^= RCON[(ksRow / keySize) | 0] << 24;\n\t } else if (keySize > 6 && ksRow % keySize == 4) {\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\t }\n\n\t keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;\n\t }\n\t }\n\n\t // Compute inv key schedule\n\t var invKeySchedule = this._invKeySchedule = [];\n\t for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {\n\t var ksRow = ksRows - invKsRow;\n\n\t if (invKsRow % 4) {\n\t var t = keySchedule[ksRow];\n\t } else {\n\t var t = keySchedule[ksRow - 4];\n\t }\n\n\t if (invKsRow < 4 || ksRow <= 4) {\n\t invKeySchedule[invKsRow] = t;\n\t } else {\n\t invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^\n\t INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];\n\t }\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t // Swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\n\t this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);\n\n\t // Inv swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\t },\n\n\t _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {\n\t // Shortcut\n\t var nRounds = this._nRounds;\n\n\t // Get input, add round key\n\t var s0 = M[offset] ^ keySchedule[0];\n\t var s1 = M[offset + 1] ^ keySchedule[1];\n\t var s2 = M[offset + 2] ^ keySchedule[2];\n\t var s3 = M[offset + 3] ^ keySchedule[3];\n\n\t // Key schedule row counter\n\t var ksRow = 4;\n\n\t // Rounds\n\t for (var round = 1; round < nRounds; round++) {\n\t // Shift rows, sub bytes, mix columns, add round key\n\t var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];\n\t var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];\n\t var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];\n\t var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];\n\n\t // Update state\n\t s0 = t0;\n\t s1 = t1;\n\t s2 = t2;\n\t s3 = t3;\n\t }\n\n\t // Shift rows, sub bytes, add round key\n\t var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];\n\t var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];\n\t var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];\n\t var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];\n\n\t // Set output\n\t M[offset] = t0;\n\t M[offset + 1] = t1;\n\t M[offset + 2] = t2;\n\t M[offset + 3] = t3;\n\t },\n\n\t keySize: 256/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.AES = BlockCipher._createHelper(AES);\n\t}());\n\n\n\treturn CryptoJS.AES;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/aes.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js ***! - \*******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher core components.\n\t */\n\tCryptoJS.lib.Cipher || (function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var Base64 = C_enc.Base64;\n\t var C_algo = C.algo;\n\t var EvpKDF = C_algo.EvpKDF;\n\n\t /**\n\t * Abstract base cipher template.\n\t *\n\t * @property {number} keySize This cipher's key size. Default: 4 (128 bits)\n\t * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)\n\t * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.\n\t * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.\n\t */\n\t var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {WordArray} iv The IV to use for this operation.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Creates this cipher in encryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createEncryptor: function (key, cfg) {\n\t return this.create(this._ENC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Creates this cipher in decryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createDecryptor: function (key, cfg) {\n\t return this.create(this._DEC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Initializes a newly created cipher.\n\t *\n\t * @param {number} xformMode Either the encryption or decryption transormation mode constant.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });\n\t */\n\t init: function (xformMode, key, cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Store transform mode and key\n\t this._xformMode = xformMode;\n\t this._key = key;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this cipher to its initial state.\n\t *\n\t * @example\n\t *\n\t * cipher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-cipher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Adds data to be encrypted or decrypted.\n\t *\n\t * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.process('data');\n\t * var encrypted = cipher.process(wordArray);\n\t */\n\t process: function (dataUpdate) {\n\t // Append\n\t this._append(dataUpdate);\n\n\t // Process available blocks\n\t return this._process();\n\t },\n\n\t /**\n\t * Finalizes the encryption or decryption process.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after final processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.finalize();\n\t * var encrypted = cipher.finalize('data');\n\t * var encrypted = cipher.finalize(wordArray);\n\t */\n\t finalize: function (dataUpdate) {\n\t // Final data update\n\t if (dataUpdate) {\n\t this._append(dataUpdate);\n\t }\n\n\t // Perform concrete-cipher logic\n\t var finalProcessedData = this._doFinalize();\n\n\t return finalProcessedData;\n\t },\n\n\t keySize: 128/32,\n\n\t ivSize: 128/32,\n\n\t _ENC_XFORM_MODE: 1,\n\n\t _DEC_XFORM_MODE: 2,\n\n\t /**\n\t * Creates shortcut functions to a cipher's object interface.\n\t *\n\t * @param {Cipher} cipher The cipher to create a helper for.\n\t *\n\t * @return {Object} An object with encrypt and decrypt shortcut functions.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);\n\t */\n\t _createHelper: (function () {\n\t function selectCipherStrategy(key) {\n\t if (typeof key == 'string') {\n\t return PasswordBasedCipher;\n\t } else {\n\t return SerializableCipher;\n\t }\n\t }\n\n\t return function (cipher) {\n\t return {\n\t encrypt: function (message, key, cfg) {\n\t return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);\n\t },\n\n\t decrypt: function (ciphertext, key, cfg) {\n\t return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);\n\t }\n\t };\n\t };\n\t }())\n\t });\n\n\t /**\n\t * Abstract base stream cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)\n\t */\n\t var StreamCipher = C_lib.StreamCipher = Cipher.extend({\n\t _doFinalize: function () {\n\t // Process partial blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 1\n\t });\n\n\t /**\n\t * Mode namespace.\n\t */\n\t var C_mode = C.mode = {};\n\n\t /**\n\t * Abstract base block cipher mode template.\n\t */\n\t var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({\n\t /**\n\t * Creates this mode for encryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);\n\t */\n\t createEncryptor: function (cipher, iv) {\n\t return this.Encryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Creates this mode for decryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);\n\t */\n\t createDecryptor: function (cipher, iv) {\n\t return this.Decryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Initializes a newly created mode.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);\n\t */\n\t init: function (cipher, iv) {\n\t this._cipher = cipher;\n\t this._iv = iv;\n\t }\n\t });\n\n\t /**\n\t * Cipher Block Chaining mode.\n\t */\n\t var CBC = C_mode.CBC = (function () {\n\t /**\n\t * Abstract base CBC mode.\n\t */\n\t var CBC = BlockCipherMode.extend();\n\n\t /**\n\t * CBC encryptor.\n\t */\n\t CBC.Encryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // XOR and encrypt\n\t xorBlock.call(this, words, offset, blockSize);\n\t cipher.encryptBlock(words, offset);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t /**\n\t * CBC decryptor.\n\t */\n\t CBC.Decryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t // Decrypt and XOR\n\t cipher.decryptBlock(words, offset);\n\t xorBlock.call(this, words, offset, blockSize);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function xorBlock(words, offset, blockSize) {\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Choose mixing block\n\t if (iv) {\n\t var block = iv;\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t var block = this._prevBlock;\n\t }\n\n\t // XOR blocks\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= block[i];\n\t }\n\t }\n\n\t return CBC;\n\t }());\n\n\t /**\n\t * Padding namespace.\n\t */\n\t var C_pad = C.pad = {};\n\n\t /**\n\t * PKCS #5/7 padding strategy.\n\t */\n\t var Pkcs7 = C_pad.Pkcs7 = {\n\t /**\n\t * Pads data using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to pad.\n\t * @param {number} blockSize The multiple that the data should be padded to.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.pad(wordArray, 4);\n\t */\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Create padding word\n\t var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;\n\n\t // Create padding\n\t var paddingWords = [];\n\t for (var i = 0; i < nPaddingBytes; i += 4) {\n\t paddingWords.push(paddingWord);\n\t }\n\t var padding = WordArray.create(paddingWords, nPaddingBytes);\n\n\t // Add padding\n\t data.concat(padding);\n\t },\n\n\t /**\n\t * Unpads data that had been padded using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to unpad.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.unpad(wordArray);\n\t */\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t };\n\n\t /**\n\t * Abstract base block cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)\n\t */\n\t var BlockCipher = C_lib.BlockCipher = Cipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Mode} mode The block mode to use. Default: CBC\n\t * @property {Padding} padding The padding strategy to use. Default: Pkcs7\n\t */\n\t cfg: Cipher.cfg.extend({\n\t mode: CBC,\n\t padding: Pkcs7\n\t }),\n\n\t reset: function () {\n\t // Reset cipher\n\t Cipher.reset.call(this);\n\n\t // Shortcuts\n\t var cfg = this.cfg;\n\t var iv = cfg.iv;\n\t var mode = cfg.mode;\n\n\t // Reset block mode\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t var modeCreator = mode.createEncryptor;\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t var modeCreator = mode.createDecryptor;\n\n\t // Keep at least one block in the buffer for unpadding\n\t this._minBufferSize = 1;\n\t }\n\t this._mode = modeCreator.call(mode, this, iv && iv.words);\n\t },\n\n\t _doProcessBlock: function (words, offset) {\n\t this._mode.processBlock(words, offset);\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcut\n\t var padding = this.cfg.padding;\n\n\t // Finalize\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t // Pad data\n\t padding.pad(this._data, this.blockSize);\n\n\t // Process final blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t // Process final blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\n\t // Unpad data\n\t padding.unpad(finalProcessedBlocks);\n\t }\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 128/32\n\t });\n\n\t /**\n\t * A collection of cipher parameters.\n\t *\n\t * @property {WordArray} ciphertext The raw ciphertext.\n\t * @property {WordArray} key The key to this ciphertext.\n\t * @property {WordArray} iv The IV used in the ciphering operation.\n\t * @property {WordArray} salt The salt used with a key derivation function.\n\t * @property {Cipher} algorithm The cipher algorithm.\n\t * @property {Mode} mode The block mode used in the ciphering operation.\n\t * @property {Padding} padding The padding scheme used in the ciphering operation.\n\t * @property {number} blockSize The block size of the cipher.\n\t * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.\n\t */\n\t var CipherParams = C_lib.CipherParams = Base.extend({\n\t /**\n\t * Initializes a newly created cipher params object.\n\t *\n\t * @param {Object} cipherParams An object with any of the possible cipher parameters.\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.lib.CipherParams.create({\n\t * ciphertext: ciphertextWordArray,\n\t * key: keyWordArray,\n\t * iv: ivWordArray,\n\t * salt: saltWordArray,\n\t * algorithm: CryptoJS.algo.AES,\n\t * mode: CryptoJS.mode.CBC,\n\t * padding: CryptoJS.pad.PKCS7,\n\t * blockSize: 4,\n\t * formatter: CryptoJS.format.OpenSSL\n\t * });\n\t */\n\t init: function (cipherParams) {\n\t this.mixIn(cipherParams);\n\t },\n\n\t /**\n\t * Converts this cipher params object to a string.\n\t *\n\t * @param {Format} formatter (Optional) The formatting strategy to use.\n\t *\n\t * @return {string} The stringified cipher params.\n\t *\n\t * @throws Error If neither the formatter nor the default formatter is set.\n\t *\n\t * @example\n\t *\n\t * var string = cipherParams + '';\n\t * var string = cipherParams.toString();\n\t * var string = cipherParams.toString(CryptoJS.format.OpenSSL);\n\t */\n\t toString: function (formatter) {\n\t return (formatter || this.formatter).stringify(this);\n\t }\n\t });\n\n\t /**\n\t * Format namespace.\n\t */\n\t var C_format = C.format = {};\n\n\t /**\n\t * OpenSSL formatting strategy.\n\t */\n\t var OpenSSLFormatter = C_format.OpenSSL = {\n\t /**\n\t * Converts a cipher params object to an OpenSSL-compatible string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The OpenSSL-compatible string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t // Shortcuts\n\t var ciphertext = cipherParams.ciphertext;\n\t var salt = cipherParams.salt;\n\n\t // Format\n\t if (salt) {\n\t var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);\n\t } else {\n\t var wordArray = ciphertext;\n\t }\n\n\t return wordArray.toString(Base64);\n\t },\n\n\t /**\n\t * Converts an OpenSSL-compatible string to a cipher params object.\n\t *\n\t * @param {string} openSSLStr The OpenSSL-compatible string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);\n\t */\n\t parse: function (openSSLStr) {\n\t // Parse base64\n\t var ciphertext = Base64.parse(openSSLStr);\n\n\t // Shortcut\n\t var ciphertextWords = ciphertext.words;\n\n\t // Test for salt\n\t if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {\n\t // Extract salt\n\t var salt = WordArray.create(ciphertextWords.slice(2, 4));\n\n\t // Remove salt from ciphertext\n\t ciphertextWords.splice(0, 4);\n\t ciphertext.sigBytes -= 16;\n\t }\n\n\t return CipherParams.create({ ciphertext: ciphertext, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A cipher wrapper that returns ciphertext as a serializable cipher params object.\n\t */\n\t var SerializableCipher = C_lib.SerializableCipher = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL\n\t */\n\t cfg: Base.extend({\n\t format: OpenSSLFormatter\n\t }),\n\n\t /**\n\t * Encrypts a message.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Encrypt\n\t var encryptor = cipher.createEncryptor(key, cfg);\n\t var ciphertext = encryptor.finalize(message);\n\n\t // Shortcut\n\t var cipherCfg = encryptor.cfg;\n\n\t // Create and return serializable cipher params\n\t return CipherParams.create({\n\t ciphertext: ciphertext,\n\t key: key,\n\t iv: cipherCfg.iv,\n\t algorithm: cipher,\n\t mode: cipherCfg.mode,\n\t padding: cipherCfg.padding,\n\t blockSize: cipher.blockSize,\n\t formatter: cfg.format\n\t });\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Decrypt\n\t var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);\n\n\t return plaintext;\n\t },\n\n\t /**\n\t * Converts serialized ciphertext to CipherParams,\n\t * else assumed CipherParams already and returns ciphertext unchanged.\n\t *\n\t * @param {CipherParams|string} ciphertext The ciphertext.\n\t * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.\n\t *\n\t * @return {CipherParams} The unserialized ciphertext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);\n\t */\n\t _parse: function (ciphertext, format) {\n\t if (typeof ciphertext == 'string') {\n\t return format.parse(ciphertext, this);\n\t } else {\n\t return ciphertext;\n\t }\n\t }\n\t });\n\n\t /**\n\t * Key derivation function namespace.\n\t */\n\t var C_kdf = C.kdf = {};\n\n\t /**\n\t * OpenSSL key derivation function.\n\t */\n\t var OpenSSLKdf = C_kdf.OpenSSL = {\n\t /**\n\t * Derives a key and IV from a password.\n\t *\n\t * @param {string} password The password to derive from.\n\t * @param {number} keySize The size in words of the key to generate.\n\t * @param {number} ivSize The size in words of the IV to generate.\n\t * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.\n\t *\n\t * @return {CipherParams} A cipher params object with the key, IV, and salt.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');\n\t */\n\t execute: function (password, keySize, ivSize, salt) {\n\t // Generate random salt\n\t if (!salt) {\n\t salt = WordArray.random(64/8);\n\t }\n\n\t // Derive key and IV\n\t var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);\n\n\t // Separate key and IV\n\t var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);\n\t key.sigBytes = keySize * 4;\n\n\t // Return params\n\t return CipherParams.create({ key: key, iv: iv, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A serializable cipher wrapper that derives the key from a password,\n\t * and returns ciphertext as a serializable cipher params object.\n\t */\n\t var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL\n\t */\n\t cfg: SerializableCipher.cfg.extend({\n\t kdf: OpenSSLKdf\n\t }),\n\n\t /**\n\t * Encrypts a message using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Encrypt\n\t var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);\n\n\t // Mix in derived params\n\t ciphertext.mixIn(derivedParams);\n\n\t return ciphertext;\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Decrypt\n\t var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);\n\n\t return plaintext;\n\t }\n\t });\n\t}());\n\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js": -/*!************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js ***! - \************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory();\n\t}\n\telse {}\n}(this, function () {\n\n\t/**\n\t * CryptoJS core components.\n\t */\n\tvar CryptoJS = CryptoJS || (function (Math, undefined) {\n\t /**\n\t * CryptoJS namespace.\n\t */\n\t var C = {};\n\n\t /**\n\t * Library namespace.\n\t */\n\t var C_lib = C.lib = {};\n\n\t /**\n\t * Base object for prototypal inheritance.\n\t */\n\t var Base = C_lib.Base = (function () {\n\t function F() {}\n\n\t return {\n\t /**\n\t * Creates a new object that inherits from this object.\n\t *\n\t * @param {Object} overrides Properties to copy into the new object.\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * field: 'value',\n\t *\n\t * method: function () {\n\t * }\n\t * });\n\t */\n\t extend: function (overrides) {\n\t // Spawn\n\t F.prototype = this;\n\t var subtype = new F();\n\n\t // Augment\n\t if (overrides) {\n\t subtype.mixIn(overrides);\n\t }\n\n\t // Create default initializer\n\t if (!subtype.hasOwnProperty('init')) {\n\t subtype.init = function () {\n\t subtype.$super.init.apply(this, arguments);\n\t };\n\t }\n\n\t // Initializer's prototype is the subtype object\n\t subtype.init.prototype = subtype;\n\n\t // Reference supertype\n\t subtype.$super = this;\n\n\t return subtype;\n\t },\n\n\t /**\n\t * Extends this object and runs the init method.\n\t * Arguments to create() will be passed to init().\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var instance = MyType.create();\n\t */\n\t create: function () {\n\t var instance = this.extend();\n\t instance.init.apply(instance, arguments);\n\n\t return instance;\n\t },\n\n\t /**\n\t * Initializes a newly created object.\n\t * Override this method to add some logic when your objects are created.\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * init: function () {\n\t * // ...\n\t * }\n\t * });\n\t */\n\t init: function () {\n\t },\n\n\t /**\n\t * Copies properties into this object.\n\t *\n\t * @param {Object} properties The properties to mix in.\n\t *\n\t * @example\n\t *\n\t * MyType.mixIn({\n\t * field: 'value'\n\t * });\n\t */\n\t mixIn: function (properties) {\n\t for (var propertyName in properties) {\n\t if (properties.hasOwnProperty(propertyName)) {\n\t this[propertyName] = properties[propertyName];\n\t }\n\t }\n\n\t // IE won't copy toString using the loop above\n\t if (properties.hasOwnProperty('toString')) {\n\t this.toString = properties.toString;\n\t }\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = instance.clone();\n\t */\n\t clone: function () {\n\t return this.init.prototype.extend(this);\n\t }\n\t };\n\t }());\n\n\t /**\n\t * An array of 32-bit words.\n\t *\n\t * @property {Array} words The array of 32-bit words.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var WordArray = C_lib.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of 32-bit words.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.create();\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 4;\n\t }\n\t },\n\n\t /**\n\t * Converts this word array to a string.\n\t *\n\t * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\n\t *\n\t * @return {string} The stringified word array.\n\t *\n\t * @example\n\t *\n\t * var string = wordArray + '';\n\t * var string = wordArray.toString();\n\t * var string = wordArray.toString(CryptoJS.enc.Utf8);\n\t */\n\t toString: function (encoder) {\n\t return (encoder || Hex).stringify(this);\n\t },\n\n\t /**\n\t * Concatenates a word array to this word array.\n\t *\n\t * @param {WordArray} wordArray The word array to append.\n\t *\n\t * @return {WordArray} This word array.\n\t *\n\t * @example\n\t *\n\t * wordArray1.concat(wordArray2);\n\t */\n\t concat: function (wordArray) {\n\t // Shortcuts\n\t var thisWords = this.words;\n\t var thatWords = wordArray.words;\n\t var thisSigBytes = this.sigBytes;\n\t var thatSigBytes = wordArray.sigBytes;\n\n\t // Clamp excess bits\n\t this.clamp();\n\n\t // Concat\n\t if (thisSigBytes % 4) {\n\t // Copy one byte at a time\n\t for (var i = 0; i < thatSigBytes; i++) {\n\t var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\n\t }\n\t } else {\n\t // Copy one word at a time\n\t for (var i = 0; i < thatSigBytes; i += 4) {\n\t thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2];\n\t }\n\t }\n\t this.sigBytes += thatSigBytes;\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Removes insignificant bits.\n\t *\n\t * @example\n\t *\n\t * wordArray.clamp();\n\t */\n\t clamp: function () {\n\t // Shortcuts\n\t var words = this.words;\n\t var sigBytes = this.sigBytes;\n\n\t // Clamp\n\t words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\n\t words.length = Math.ceil(sigBytes / 4);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = wordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone.words = this.words.slice(0);\n\n\t return clone;\n\t },\n\n\t /**\n\t * Creates a word array filled with random bytes.\n\t *\n\t * @param {number} nBytes The number of random bytes to generate.\n\t *\n\t * @return {WordArray} The random word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.random(16);\n\t */\n\t random: function (nBytes) {\n\t var words = [];\n\n\t var r = (function (m_w) {\n\t var m_w = m_w;\n\t var m_z = 0x3ade68b1;\n\t var mask = 0xffffffff;\n\n\t return function () {\n\t m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t var result = ((m_z << 0x10) + m_w) & mask;\n\t result /= 0x100000000;\n\t result += 0.5;\n\t return result * (Math.random() > .5 ? 1 : -1);\n\t }\n\t });\n\n\t for (var i = 0, rcache; i < nBytes; i += 4) {\n\t var _r = r((rcache || Math.random()) * 0x100000000);\n\n\t rcache = _r() * 0x3ade67b7;\n\t words.push((_r() * 0x100000000) | 0);\n\t }\n\n\t return new WordArray.init(words, nBytes);\n\t }\n\t });\n\n\t /**\n\t * Encoder namespace.\n\t */\n\t var C_enc = C.enc = {};\n\n\t /**\n\t * Hex encoding strategy.\n\t */\n\t var Hex = C_enc.Hex = {\n\t /**\n\t * Converts a word array to a hex string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The hex string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var hexChars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t hexChars.push((bite >>> 4).toString(16));\n\t hexChars.push((bite & 0x0f).toString(16));\n\t }\n\n\t return hexChars.join('');\n\t },\n\n\t /**\n\t * Converts a hex string to a word array.\n\t *\n\t * @param {string} hexStr The hex string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Hex.parse(hexString);\n\t */\n\t parse: function (hexStr) {\n\t // Shortcut\n\t var hexStrLength = hexStr.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < hexStrLength; i += 2) {\n\t words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\n\t }\n\n\t return new WordArray.init(words, hexStrLength / 2);\n\t }\n\t };\n\n\t /**\n\t * Latin1 encoding strategy.\n\t */\n\t var Latin1 = C_enc.Latin1 = {\n\t /**\n\t * Converts a word array to a Latin1 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Latin1 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var latin1Chars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t latin1Chars.push(String.fromCharCode(bite));\n\t }\n\n\t return latin1Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Latin1 string to a word array.\n\t *\n\t * @param {string} latin1Str The Latin1 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\n\t */\n\t parse: function (latin1Str) {\n\t // Shortcut\n\t var latin1StrLength = latin1Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < latin1StrLength; i++) {\n\t words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\n\t }\n\n\t return new WordArray.init(words, latin1StrLength);\n\t }\n\t };\n\n\t /**\n\t * UTF-8 encoding strategy.\n\t */\n\t var Utf8 = C_enc.Utf8 = {\n\t /**\n\t * Converts a word array to a UTF-8 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-8 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t try {\n\t return decodeURIComponent(escape(Latin1.stringify(wordArray)));\n\t } catch (e) {\n\t throw new Error('Malformed UTF-8 data');\n\t }\n\t },\n\n\t /**\n\t * Converts a UTF-8 string to a word array.\n\t *\n\t * @param {string} utf8Str The UTF-8 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\n\t */\n\t parse: function (utf8Str) {\n\t return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\n\t }\n\t };\n\n\t /**\n\t * Abstract buffered block algorithm template.\n\t *\n\t * The property blockSize must be implemented in a concrete subtype.\n\t *\n\t * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\n\t */\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\n\t /**\n\t * Resets this block algorithm's data buffer to its initial state.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm.reset();\n\t */\n\t reset: function () {\n\t // Initial values\n\t this._data = new WordArray.init();\n\t this._nDataBytes = 0;\n\t },\n\n\t /**\n\t * Adds new data to this block algorithm's buffer.\n\t *\n\t * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm._append('data');\n\t * bufferedBlockAlgorithm._append(wordArray);\n\t */\n\t _append: function (data) {\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof data == 'string') {\n\t data = Utf8.parse(data);\n\t }\n\n\t // Append\n\t this._data.concat(data);\n\t this._nDataBytes += data.sigBytes;\n\t },\n\n\t /**\n\t * Processes available data blocks.\n\t *\n\t * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\n\t *\n\t * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\n\t *\n\t * @return {WordArray} The processed data.\n\t *\n\t * @example\n\t *\n\t * var processedData = bufferedBlockAlgorithm._process();\n\t * var processedData = bufferedBlockAlgorithm._process(!!'flush');\n\t */\n\t _process: function (doFlush) {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var dataSigBytes = data.sigBytes;\n\t var blockSize = this.blockSize;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count blocks ready\n\t var nBlocksReady = dataSigBytes / blockSizeBytes;\n\t if (doFlush) {\n\t // Round up to include partial blocks\n\t nBlocksReady = Math.ceil(nBlocksReady);\n\t } else {\n\t // Round down to include only full blocks,\n\t // less the number of blocks that must remain in the buffer\n\t nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\n\t }\n\n\t // Count words ready\n\t var nWordsReady = nBlocksReady * blockSize;\n\n\t // Count bytes ready\n\t var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\n\n\t // Process blocks\n\t if (nWordsReady) {\n\t for (var offset = 0; offset < nWordsReady; offset += blockSize) {\n\t // Perform concrete-algorithm logic\n\t this._doProcessBlock(dataWords, offset);\n\t }\n\n\t // Remove processed words\n\t var processedWords = dataWords.splice(0, nWordsReady);\n\t data.sigBytes -= nBytesReady;\n\t }\n\n\t // Return processed words\n\t return new WordArray.init(processedWords, nBytesReady);\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = bufferedBlockAlgorithm.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone._data = this._data.clone();\n\n\t return clone;\n\t },\n\n\t _minBufferSize: 0\n\t });\n\n\t /**\n\t * Abstract hasher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\n\t */\n\t var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Initializes a newly created hasher.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\n\t *\n\t * @example\n\t *\n\t * var hasher = CryptoJS.algo.SHA256.create();\n\t */\n\t init: function (cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this hasher to its initial state.\n\t *\n\t * @example\n\t *\n\t * hasher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-hasher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Updates this hasher with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {Hasher} This hasher.\n\t *\n\t * @example\n\t *\n\t * hasher.update('message');\n\t * hasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t // Append\n\t this._append(messageUpdate);\n\n\t // Update the hash\n\t this._process();\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the hash computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @example\n\t *\n\t * var hash = hasher.finalize();\n\t * var hash = hasher.finalize('message');\n\t * var hash = hasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Final message update\n\t if (messageUpdate) {\n\t this._append(messageUpdate);\n\t }\n\n\t // Perform concrete-hasher logic\n\t var hash = this._doFinalize();\n\n\t return hash;\n\t },\n\n\t blockSize: 512/32,\n\n\t /**\n\t * Creates a shortcut function to a hasher's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to create a helper for.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHelper: function (hasher) {\n\t return function (message, cfg) {\n\t return new hasher.init(cfg).finalize(message);\n\t };\n\t },\n\n\t /**\n\t * Creates a shortcut function to the HMAC's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to use in this HMAC helper.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHmacHelper: function (hasher) {\n\t return function (message, key) {\n\t return new C_algo.HMAC.init(hasher, key).finalize(message);\n\t };\n\t }\n\t });\n\n\t /**\n\t * Algorithm namespace.\n\t */\n\t var C_algo = C.algo = {};\n\n\t return C;\n\t}(Math));\n\n\n\treturn CryptoJS;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js": -/*!******************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js ***! - \******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * Base64 encoding strategy.\n\t */\n\t var Base64 = C_enc.Base64 = {\n\t /**\n\t * Converts a word array to a Base64 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Base64 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var base64String = CryptoJS.enc.Base64.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\t var map = this._map;\n\n\t // Clamp excess bits\n\t wordArray.clamp();\n\n\t // Convert\n\t var base64Chars = [];\n\t for (var i = 0; i < sigBytes; i += 3) {\n\t var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\n\t var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\n\n\t var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\n\n\t for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\n\t base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\n\t }\n\t }\n\n\t // Add padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t while (base64Chars.length % 4) {\n\t base64Chars.push(paddingChar);\n\t }\n\t }\n\n\t return base64Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Base64 string to a word array.\n\t *\n\t * @param {string} base64Str The Base64 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Base64.parse(base64String);\n\t */\n\t parse: function (base64Str) {\n\t // Shortcuts\n\t var base64StrLength = base64Str.length;\n\t var map = this._map;\n\n\t // Ignore padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t var paddingIndex = base64Str.indexOf(paddingChar);\n\t if (paddingIndex != -1) {\n\t base64StrLength = paddingIndex;\n\t }\n\t }\n\n\t // Convert\n\t var words = [];\n\t var nBytes = 0;\n\t for (var i = 0; i < base64StrLength; i++) {\n\t if (i % 4) {\n\t var bits1 = map.indexOf(base64Str.charAt(i - 1)) << ((i % 4) * 2);\n\t var bits2 = map.indexOf(base64Str.charAt(i)) >>> (6 - (i % 4) * 2);\n\t var bitsCombined = bits1 | bits2;\n\t words[nBytes >>> 2] |= (bitsCombined) << (24 - (nBytes % 4) * 8);\n\t nBytes++;\n\t }\n\t }\n\n\t return WordArray.create(words, nBytes);\n\t },\n\n\t _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n\t };\n\t}());\n\n\n\treturn CryptoJS.enc.Base64;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-utf16.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-utf16.js ***! - \*****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * UTF-16 BE encoding strategy.\n\t */\n\t var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = {\n\t /**\n\t * Converts a word array to a UTF-16 BE string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-16 BE string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var utf16Chars = [];\n\t for (var i = 0; i < sigBytes; i += 2) {\n\t var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff;\n\t utf16Chars.push(String.fromCharCode(codePoint));\n\t }\n\n\t return utf16Chars.join('');\n\t },\n\n\t /**\n\t * Converts a UTF-16 BE string to a word array.\n\t *\n\t * @param {string} utf16Str The UTF-16 BE string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf16.parse(utf16String);\n\t */\n\t parse: function (utf16Str) {\n\t // Shortcut\n\t var utf16StrLength = utf16Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < utf16StrLength; i++) {\n\t words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16);\n\t }\n\n\t return WordArray.create(words, utf16StrLength * 2);\n\t }\n\t };\n\n\t /**\n\t * UTF-16 LE encoding strategy.\n\t */\n\t C_enc.Utf16LE = {\n\t /**\n\t * Converts a word array to a UTF-16 LE string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-16 LE string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var utf16Chars = [];\n\t for (var i = 0; i < sigBytes; i += 2) {\n\t var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff);\n\t utf16Chars.push(String.fromCharCode(codePoint));\n\t }\n\n\t return utf16Chars.join('');\n\t },\n\n\t /**\n\t * Converts a UTF-16 LE string to a word array.\n\t *\n\t * @param {string} utf16Str The UTF-16 LE string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);\n\t */\n\t parse: function (utf16Str) {\n\t // Shortcut\n\t var utf16StrLength = utf16Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < utf16StrLength; i++) {\n\t words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16));\n\t }\n\n\t return WordArray.create(words, utf16StrLength * 2);\n\t }\n\t };\n\n\t function swapEndian(word) {\n\t return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Utf16;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-utf16.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js": -/*!**************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js ***! - \**************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./sha1 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha1.js\"), __webpack_require__(/*! ./hmac */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var MD5 = C_algo.MD5;\n\n\t /**\n\t * This key derivation function is meant to conform with EVP_BytesToKey.\n\t * www.openssl.org/docs/crypto/EVP_BytesToKey.html\n\t */\n\t var EvpKDF = C_algo.EvpKDF = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hash algorithm to use. Default: MD5\n\t * @property {number} iterations The number of iterations to perform. Default: 1\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: MD5,\n\t iterations: 1\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.EvpKDF.create();\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init hasher\n\t var hasher = cfg.hasher.create();\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t if (block) {\n\t hasher.update(block);\n\t }\n\t var block = hasher.update(password).finalize(salt);\n\t hasher.reset();\n\n\t // Iterations\n\t for (var i = 1; i < iterations; i++) {\n\t block = hasher.finalize(block);\n\t hasher.reset();\n\t }\n\n\t derivedKey.concat(block);\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.EvpKDF(password, salt);\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.EvpKDF = function (password, salt, cfg) {\n\t return EvpKDF.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.EvpKDF;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/format-hex.js": -/*!******************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/format-hex.js ***! - \******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var CipherParams = C_lib.CipherParams;\n\t var C_enc = C.enc;\n\t var Hex = C_enc.Hex;\n\t var C_format = C.format;\n\n\t var HexFormatter = C_format.Hex = {\n\t /**\n\t * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The hexadecimally encoded string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.format.Hex.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t return cipherParams.ciphertext.toString(Hex);\n\t },\n\n\t /**\n\t * Converts a hexadecimally encoded ciphertext string to a cipher params object.\n\t *\n\t * @param {string} input The hexadecimally encoded string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.Hex.parse(hexString);\n\t */\n\t parse: function (input) {\n\t var ciphertext = Hex.parse(input);\n\t return CipherParams.create({ ciphertext: ciphertext });\n\t }\n\t };\n\t}());\n\n\n\treturn CryptoJS.format.Hex;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/format-hex.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac.js": -/*!************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac.js ***! - \************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var C_algo = C.algo;\n\n\t /**\n\t * HMAC algorithm.\n\t */\n\t var HMAC = C_algo.HMAC = Base.extend({\n\t /**\n\t * Initializes a newly created HMAC.\n\t *\n\t * @param {Hasher} hasher The hash algorithm to use.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @example\n\t *\n\t * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);\n\t */\n\t init: function (hasher, key) {\n\t // Init hasher\n\t hasher = this._hasher = new hasher.init();\n\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof key == 'string') {\n\t key = Utf8.parse(key);\n\t }\n\n\t // Shortcuts\n\t var hasherBlockSize = hasher.blockSize;\n\t var hasherBlockSizeBytes = hasherBlockSize * 4;\n\n\t // Allow arbitrary length keys\n\t if (key.sigBytes > hasherBlockSizeBytes) {\n\t key = hasher.finalize(key);\n\t }\n\n\t // Clamp excess bits\n\t key.clamp();\n\n\t // Clone key for inner and outer pads\n\t var oKey = this._oKey = key.clone();\n\t var iKey = this._iKey = key.clone();\n\n\t // Shortcuts\n\t var oKeyWords = oKey.words;\n\t var iKeyWords = iKey.words;\n\n\t // XOR keys with pad constants\n\t for (var i = 0; i < hasherBlockSize; i++) {\n\t oKeyWords[i] ^= 0x5c5c5c5c;\n\t iKeyWords[i] ^= 0x36363636;\n\t }\n\t oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this HMAC to its initial state.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.reset();\n\t */\n\t reset: function () {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Reset\n\t hasher.reset();\n\t hasher.update(this._iKey);\n\t },\n\n\t /**\n\t * Updates this HMAC with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {HMAC} This HMAC instance.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.update('message');\n\t * hmacHasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t this._hasher.update(messageUpdate);\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the HMAC computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @example\n\t *\n\t * var hmac = hmacHasher.finalize();\n\t * var hmac = hmacHasher.finalize('message');\n\t * var hmac = hmacHasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Compute HMAC\n\t var innerHash = hasher.finalize(messageUpdate);\n\t hasher.reset();\n\t var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));\n\n\t return hmac;\n\t }\n\t });\n\t}());\n\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/index.js": -/*!*************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/index.js ***! - \*************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./x64-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/x64-core.js\"), __webpack_require__(/*! ./lib-typedarrays */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/lib-typedarrays.js\"), __webpack_require__(/*! ./enc-utf16 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-utf16.js\"), __webpack_require__(/*! ./enc-base64 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js\"), __webpack_require__(/*! ./md5 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js\"), __webpack_require__(/*! ./sha1 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha1.js\"), __webpack_require__(/*! ./sha256 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha256.js\"), __webpack_require__(/*! ./sha224 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha224.js\"), __webpack_require__(/*! ./sha512 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha512.js\"), __webpack_require__(/*! ./sha384 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha384.js\"), __webpack_require__(/*! ./sha3 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha3.js\"), __webpack_require__(/*! ./ripemd160 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/ripemd160.js\"), __webpack_require__(/*! ./hmac */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac.js\"), __webpack_require__(/*! ./pbkdf2 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pbkdf2.js\"), __webpack_require__(/*! ./evpkdf */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"), __webpack_require__(/*! ./mode-cfb */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-cfb.js\"), __webpack_require__(/*! ./mode-ctr */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr.js\"), __webpack_require__(/*! ./mode-ctr-gladman */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr-gladman.js\"), __webpack_require__(/*! ./mode-ofb */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ofb.js\"), __webpack_require__(/*! ./mode-ecb */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ecb.js\"), __webpack_require__(/*! ./pad-ansix923 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-ansix923.js\"), __webpack_require__(/*! ./pad-iso10126 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso10126.js\"), __webpack_require__(/*! ./pad-iso97971 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso97971.js\"), __webpack_require__(/*! ./pad-zeropadding */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-zeropadding.js\"), __webpack_require__(/*! ./pad-nopadding */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-nopadding.js\"), __webpack_require__(/*! ./format-hex */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/format-hex.js\"), __webpack_require__(/*! ./aes */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/aes.js\"), __webpack_require__(/*! ./tripledes */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/tripledes.js\"), __webpack_require__(/*! ./rc4 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rc4.js\"), __webpack_require__(/*! ./rabbit */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit.js\"), __webpack_require__(/*! ./rabbit-legacy */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit-legacy.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\treturn CryptoJS;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/index.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/lib-typedarrays.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/lib-typedarrays.js ***! - \***********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Check if typed arrays are supported\n\t if (typeof ArrayBuffer != 'function') {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\n\t // Reference original init\n\t var superInit = WordArray.init;\n\n\t // Augment WordArray.init to handle typed arrays\n\t var subInit = WordArray.init = function (typedArray) {\n\t // Convert buffers to uint8\n\t if (typedArray instanceof ArrayBuffer) {\n\t typedArray = new Uint8Array(typedArray);\n\t }\n\n\t // Convert other array views to uint8\n\t if (\n\t typedArray instanceof Int8Array ||\n\t (typeof Uint8ClampedArray !== \"undefined\" && typedArray instanceof Uint8ClampedArray) ||\n\t typedArray instanceof Int16Array ||\n\t typedArray instanceof Uint16Array ||\n\t typedArray instanceof Int32Array ||\n\t typedArray instanceof Uint32Array ||\n\t typedArray instanceof Float32Array ||\n\t typedArray instanceof Float64Array\n\t ) {\n\t typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);\n\t }\n\n\t // Handle Uint8Array\n\t if (typedArray instanceof Uint8Array) {\n\t // Shortcut\n\t var typedArrayByteLength = typedArray.byteLength;\n\n\t // Extract bytes\n\t var words = [];\n\t for (var i = 0; i < typedArrayByteLength; i++) {\n\t words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8);\n\t }\n\n\t // Initialize this word array\n\t superInit.call(this, words, typedArrayByteLength);\n\t } else {\n\t // Else call normal init\n\t superInit.apply(this, arguments);\n\t }\n\t };\n\n\t subInit.prototype = WordArray;\n\t}());\n\n\n\treturn CryptoJS.lib.WordArray;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/lib-typedarrays.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js": -/*!***********************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js ***! - \***********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var T = [];\n\n\t // Compute constants\n\t (function () {\n\t for (var i = 0; i < 64; i++) {\n\t T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;\n\t }\n\t }());\n\n\t /**\n\t * MD5 hash algorithm.\n\t */\n\t var MD5 = C_algo.MD5 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\n\t // Shortcuts\n\t var H = this._hash.words;\n\n\t var M_offset_0 = M[offset + 0];\n\t var M_offset_1 = M[offset + 1];\n\t var M_offset_2 = M[offset + 2];\n\t var M_offset_3 = M[offset + 3];\n\t var M_offset_4 = M[offset + 4];\n\t var M_offset_5 = M[offset + 5];\n\t var M_offset_6 = M[offset + 6];\n\t var M_offset_7 = M[offset + 7];\n\t var M_offset_8 = M[offset + 8];\n\t var M_offset_9 = M[offset + 9];\n\t var M_offset_10 = M[offset + 10];\n\t var M_offset_11 = M[offset + 11];\n\t var M_offset_12 = M[offset + 12];\n\t var M_offset_13 = M[offset + 13];\n\t var M_offset_14 = M[offset + 14];\n\t var M_offset_15 = M[offset + 15];\n\n\t // Working varialbes\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\n\t // Computation\n\t a = FF(a, b, c, d, M_offset_0, 7, T[0]);\n\t d = FF(d, a, b, c, M_offset_1, 12, T[1]);\n\t c = FF(c, d, a, b, M_offset_2, 17, T[2]);\n\t b = FF(b, c, d, a, M_offset_3, 22, T[3]);\n\t a = FF(a, b, c, d, M_offset_4, 7, T[4]);\n\t d = FF(d, a, b, c, M_offset_5, 12, T[5]);\n\t c = FF(c, d, a, b, M_offset_6, 17, T[6]);\n\t b = FF(b, c, d, a, M_offset_7, 22, T[7]);\n\t a = FF(a, b, c, d, M_offset_8, 7, T[8]);\n\t d = FF(d, a, b, c, M_offset_9, 12, T[9]);\n\t c = FF(c, d, a, b, M_offset_10, 17, T[10]);\n\t b = FF(b, c, d, a, M_offset_11, 22, T[11]);\n\t a = FF(a, b, c, d, M_offset_12, 7, T[12]);\n\t d = FF(d, a, b, c, M_offset_13, 12, T[13]);\n\t c = FF(c, d, a, b, M_offset_14, 17, T[14]);\n\t b = FF(b, c, d, a, M_offset_15, 22, T[15]);\n\n\t a = GG(a, b, c, d, M_offset_1, 5, T[16]);\n\t d = GG(d, a, b, c, M_offset_6, 9, T[17]);\n\t c = GG(c, d, a, b, M_offset_11, 14, T[18]);\n\t b = GG(b, c, d, a, M_offset_0, 20, T[19]);\n\t a = GG(a, b, c, d, M_offset_5, 5, T[20]);\n\t d = GG(d, a, b, c, M_offset_10, 9, T[21]);\n\t c = GG(c, d, a, b, M_offset_15, 14, T[22]);\n\t b = GG(b, c, d, a, M_offset_4, 20, T[23]);\n\t a = GG(a, b, c, d, M_offset_9, 5, T[24]);\n\t d = GG(d, a, b, c, M_offset_14, 9, T[25]);\n\t c = GG(c, d, a, b, M_offset_3, 14, T[26]);\n\t b = GG(b, c, d, a, M_offset_8, 20, T[27]);\n\t a = GG(a, b, c, d, M_offset_13, 5, T[28]);\n\t d = GG(d, a, b, c, M_offset_2, 9, T[29]);\n\t c = GG(c, d, a, b, M_offset_7, 14, T[30]);\n\t b = GG(b, c, d, a, M_offset_12, 20, T[31]);\n\n\t a = HH(a, b, c, d, M_offset_5, 4, T[32]);\n\t d = HH(d, a, b, c, M_offset_8, 11, T[33]);\n\t c = HH(c, d, a, b, M_offset_11, 16, T[34]);\n\t b = HH(b, c, d, a, M_offset_14, 23, T[35]);\n\t a = HH(a, b, c, d, M_offset_1, 4, T[36]);\n\t d = HH(d, a, b, c, M_offset_4, 11, T[37]);\n\t c = HH(c, d, a, b, M_offset_7, 16, T[38]);\n\t b = HH(b, c, d, a, M_offset_10, 23, T[39]);\n\t a = HH(a, b, c, d, M_offset_13, 4, T[40]);\n\t d = HH(d, a, b, c, M_offset_0, 11, T[41]);\n\t c = HH(c, d, a, b, M_offset_3, 16, T[42]);\n\t b = HH(b, c, d, a, M_offset_6, 23, T[43]);\n\t a = HH(a, b, c, d, M_offset_9, 4, T[44]);\n\t d = HH(d, a, b, c, M_offset_12, 11, T[45]);\n\t c = HH(c, d, a, b, M_offset_15, 16, T[46]);\n\t b = HH(b, c, d, a, M_offset_2, 23, T[47]);\n\n\t a = II(a, b, c, d, M_offset_0, 6, T[48]);\n\t d = II(d, a, b, c, M_offset_7, 10, T[49]);\n\t c = II(c, d, a, b, M_offset_14, 15, T[50]);\n\t b = II(b, c, d, a, M_offset_5, 21, T[51]);\n\t a = II(a, b, c, d, M_offset_12, 6, T[52]);\n\t d = II(d, a, b, c, M_offset_3, 10, T[53]);\n\t c = II(c, d, a, b, M_offset_10, 15, T[54]);\n\t b = II(b, c, d, a, M_offset_1, 21, T[55]);\n\t a = II(a, b, c, d, M_offset_8, 6, T[56]);\n\t d = II(d, a, b, c, M_offset_15, 10, T[57]);\n\t c = II(c, d, a, b, M_offset_6, 15, T[58]);\n\t b = II(b, c, d, a, M_offset_13, 21, T[59]);\n\t a = II(a, b, c, d, M_offset_4, 6, T[60]);\n\t d = II(d, a, b, c, M_offset_11, 10, T[61]);\n\t c = II(c, d, a, b, M_offset_2, 15, T[62]);\n\t b = II(b, c, d, a, M_offset_9, 21, T[63]);\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\n\t var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);\n\t var nBitsTotalL = nBitsTotal;\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (\n\t (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)\n\t );\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)\n\t );\n\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t function FF(a, b, c, d, x, s, t) {\n\t var n = a + ((b & c) | (~b & d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function GG(a, b, c, d, x, s, t) {\n\t var n = a + ((b & d) | (c & ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function HH(a, b, c, d, x, s, t) {\n\t var n = a + (b ^ c ^ d) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function II(a, b, c, d, x, s, t) {\n\t var n = a + (c ^ (b | ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.MD5('message');\n\t * var hash = CryptoJS.MD5(wordArray);\n\t */\n\t C.MD5 = Hasher._createHelper(MD5);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacMD5(message, key);\n\t */\n\t C.HmacMD5 = Hasher._createHmacHelper(MD5);\n\t}(Math));\n\n\n\treturn CryptoJS.MD5;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-cfb.js": -/*!****************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-cfb.js ***! - \****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher Feedback block mode.\n\t */\n\tCryptoJS.mode.CFB = (function () {\n\t var CFB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t CFB.Encryptor = CFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t CFB.Decryptor = CFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Generate keystream\n\t if (iv) {\n\t var keystream = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t var keystream = this._prevBlock;\n\t }\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\n\t return CFB;\n\t}());\n\n\n\treturn CryptoJS.mode.CFB;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-cfb.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr-gladman.js": -/*!************************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr-gladman.js ***! - \************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/** @preserve\n\t * Counter block mode compatible with Dr Brian Gladman fileenc.c\n\t * derived from CryptoJS.mode.CTR\n\t * Jan Hruby jhruby.web@gmail.com\n\t */\n\tCryptoJS.mode.CTRGladman = (function () {\n\t var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();\n\n\t\tfunction incWord(word)\n\t\t{\n\t\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tvar b1 = (word >> 16)&0xff;\n\t\t\tvar b2 = (word >> 8)&0xff;\n\t\t\tvar b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) // overflow b1\n\t\t\t{\n\t\t\tb1 = 0;\n\t\t\tif (b2 === 0xff)\n\t\t\t{\n\t\t\t\tb2 = 0;\n\t\t\t\tif (b3 === 0xff)\n\t\t\t\t{\n\t\t\t\t\tb3 = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t++b3;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t++b2;\n\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\tword += (0x01 << 24);\n\t\t\t}\n\t\t\treturn word;\n\t\t}\n\n\t\tfunction incCounter(counter)\n\t\t{\n\t\t\tif ((counter[0] = incWord(counter[0])) === 0)\n\t\t\t{\n\t\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\t\tcounter[1] = incWord(counter[1]);\n\t\t\t}\n\t\t\treturn counter;\n\t\t}\n\n\t var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var counter = this._counter;\n\n\t // Generate keystream\n\t if (iv) {\n\t counter = this._counter = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\n\t\t\t\tincCounter(counter);\n\n\t\t\t\tvar keystream = counter.slice(0);\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t CTRGladman.Decryptor = Encryptor;\n\n\t return CTRGladman;\n\t}());\n\n\n\n\n\treturn CryptoJS.mode.CTRGladman;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr-gladman.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr.js": -/*!****************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr.js ***! - \****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Counter block mode.\n\t */\n\tCryptoJS.mode.CTR = (function () {\n\t var CTR = CryptoJS.lib.BlockCipherMode.extend();\n\n\t var Encryptor = CTR.Encryptor = CTR.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var counter = this._counter;\n\n\t // Generate keystream\n\t if (iv) {\n\t counter = this._counter = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\t var keystream = counter.slice(0);\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Increment counter\n\t counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t CTR.Decryptor = Encryptor;\n\n\t return CTR;\n\t}());\n\n\n\treturn CryptoJS.mode.CTR;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ecb.js": -/*!****************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ecb.js ***! - \****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Electronic Codebook block mode.\n\t */\n\tCryptoJS.mode.ECB = (function () {\n\t var ECB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t ECB.Encryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.encryptBlock(words, offset);\n\t }\n\t });\n\n\t ECB.Decryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.decryptBlock(words, offset);\n\t }\n\t });\n\n\t return ECB;\n\t}());\n\n\n\treturn CryptoJS.mode.ECB;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ecb.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ofb.js": -/*!****************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ofb.js ***! - \****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Output Feedback block mode.\n\t */\n\tCryptoJS.mode.OFB = (function () {\n\t var OFB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t var Encryptor = OFB.Encryptor = OFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var keystream = this._keystream;\n\n\t // Generate keystream\n\t if (iv) {\n\t keystream = this._keystream = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t OFB.Decryptor = Encryptor;\n\n\t return OFB;\n\t}());\n\n\n\treturn CryptoJS.mode.OFB;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ofb.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-ansix923.js": -/*!********************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-ansix923.js ***! - \********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ANSI X.923 padding strategy.\n\t */\n\tCryptoJS.pad.AnsiX923 = {\n\t pad: function (data, blockSize) {\n\t // Shortcuts\n\t var dataSigBytes = data.sigBytes;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;\n\n\t // Compute last byte position\n\t var lastBytePos = dataSigBytes + nPaddingBytes - 1;\n\n\t // Pad\n\t data.clamp();\n\t data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8);\n\t data.sigBytes += nPaddingBytes;\n\t },\n\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Ansix923;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-ansix923.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso10126.js": -/*!********************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso10126.js ***! - \********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ISO 10126 padding strategy.\n\t */\n\tCryptoJS.pad.Iso10126 = {\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Pad\n\t data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).\n\t concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));\n\t },\n\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Iso10126;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso10126.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso97971.js": -/*!********************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso97971.js ***! - \********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ISO/IEC 9797-1 Padding Method 2.\n\t */\n\tCryptoJS.pad.Iso97971 = {\n\t pad: function (data, blockSize) {\n\t // Add 0x80 byte\n\t data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1));\n\n\t // Zero pad the rest\n\t CryptoJS.pad.ZeroPadding.pad(data, blockSize);\n\t },\n\n\t unpad: function (data) {\n\t // Remove zero padding\n\t CryptoJS.pad.ZeroPadding.unpad(data);\n\n\t // Remove one more byte -- the 0x80 byte\n\t data.sigBytes--;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Iso97971;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso97971.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-nopadding.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-nopadding.js ***! - \*********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * A noop padding strategy.\n\t */\n\tCryptoJS.pad.NoPadding = {\n\t pad: function () {\n\t },\n\n\t unpad: function () {\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.NoPadding;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-nopadding.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-zeropadding.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-zeropadding.js ***! - \***********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Zero padding strategy.\n\t */\n\tCryptoJS.pad.ZeroPadding = {\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Pad\n\t data.clamp();\n\t data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes);\n\t },\n\n\t unpad: function (data) {\n\t // Shortcut\n\t var dataWords = data.words;\n\n\t // Unpad\n\t var i = data.sigBytes - 1;\n\t while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) {\n\t i--;\n\t }\n\t data.sigBytes = i + 1;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.ZeroPadding;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-zeropadding.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pbkdf2.js": -/*!**************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pbkdf2.js ***! - \**************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./sha1 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha1.js\"), __webpack_require__(/*! ./hmac */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var SHA1 = C_algo.SHA1;\n\t var HMAC = C_algo.HMAC;\n\n\t /**\n\t * Password-Based Key Derivation Function 2 algorithm.\n\t */\n\t var PBKDF2 = C_algo.PBKDF2 = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hasher to use. Default: SHA1\n\t * @property {number} iterations The number of iterations to perform. Default: 1\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: SHA1,\n\t iterations: 1\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.PBKDF2.create();\n\t * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Computes the Password-Based Key Derivation Function 2.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init HMAC\n\t var hmac = HMAC.create(cfg.hasher, password);\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\t var blockIndex = WordArray.create([0x00000001]);\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var blockIndexWords = blockIndex.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t var block = hmac.update(salt).finalize(blockIndex);\n\t hmac.reset();\n\n\t // Shortcuts\n\t var blockWords = block.words;\n\t var blockWordsLength = blockWords.length;\n\n\t // Iterations\n\t var intermediate = block;\n\t for (var i = 1; i < iterations; i++) {\n\t intermediate = hmac.finalize(intermediate);\n\t hmac.reset();\n\n\t // Shortcut\n\t var intermediateWords = intermediate.words;\n\n\t // XOR intermediate with block\n\t for (var j = 0; j < blockWordsLength; j++) {\n\t blockWords[j] ^= intermediateWords[j];\n\t }\n\t }\n\n\t derivedKey.concat(block);\n\t blockIndexWords[0]++;\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Computes the Password-Based Key Derivation Function 2.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.PBKDF2(password, salt);\n\t * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.PBKDF2 = function (password, salt, cfg) {\n\t return PBKDF2.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.PBKDF2;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/pbkdf2.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit-legacy.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit-legacy.js ***! - \*********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./enc-base64 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js\"), __webpack_require__(/*! ./md5 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js\"), __webpack_require__(/*! ./evpkdf */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t // Reusable objects\n\t var S = [];\n\t var C_ = [];\n\t var G = [];\n\n\t /**\n\t * Rabbit stream cipher algorithm.\n\t *\n\t * This is a legacy version that neglected to convert the key to little-endian.\n\t * This error doesn't affect the cipher's security,\n\t * but it does affect its compatibility with other implementations.\n\t */\n\t var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var K = this._key.words;\n\t var iv = this.cfg.iv;\n\n\t // Generate initial state values\n\t var X = this._X = [\n\t K[0], (K[3] << 16) | (K[2] >>> 16),\n\t K[1], (K[0] << 16) | (K[3] >>> 16),\n\t K[2], (K[1] << 16) | (K[0] >>> 16),\n\t K[3], (K[2] << 16) | (K[1] >>> 16)\n\t ];\n\n\t // Generate initial counter values\n\t var C = this._C = [\n\t (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n\t (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n\t (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n\t (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n\t ];\n\n\t // Carry bit\n\t this._b = 0;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\n\t // Modify the counters\n\t for (var i = 0; i < 8; i++) {\n\t C[i] ^= X[(i + 4) & 7];\n\t }\n\n\t // IV setup\n\t if (iv) {\n\t // Shortcuts\n\t var IV = iv.words;\n\t var IV_0 = IV[0];\n\t var IV_1 = IV[1];\n\n\t // Generate four subvectors\n\t var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n\t var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n\t var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n\t var i3 = (i2 << 16) | (i0 & 0x0000ffff);\n\n\t // Modify counter values\n\t C[0] ^= i0;\n\t C[1] ^= i1;\n\t C[2] ^= i2;\n\t C[3] ^= i3;\n\t C[4] ^= i0;\n\t C[5] ^= i1;\n\t C[6] ^= i2;\n\t C[7] ^= i3;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\t }\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var X = this._X;\n\n\t // Iterate the system\n\t nextState.call(this);\n\n\t // Generate four keystream words\n\t S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n\t S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n\t S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n\t S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n\n\t for (var i = 0; i < 4; i++) {\n\t // Swap endian\n\t S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |\n\t (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);\n\n\t // Encrypt\n\t M[offset + i] ^= S[i];\n\t }\n\t },\n\n\t blockSize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t function nextState() {\n\t // Shortcuts\n\t var X = this._X;\n\t var C = this._C;\n\n\t // Save old counter values\n\t for (var i = 0; i < 8; i++) {\n\t C_[i] = C[i];\n\t }\n\n\t // Calculate new counter values\n\t C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n\t C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n\t C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n\t C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n\t C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n\t C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n\t C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n\t C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n\t this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n\n\t // Calculate the g-values\n\t for (var i = 0; i < 8; i++) {\n\t var gx = X[i] + C[i];\n\n\t // Construct high and low argument for squaring\n\t var ga = gx & 0xffff;\n\t var gb = gx >>> 16;\n\n\t // Calculate high and low result of squaring\n\t var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n\t var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n\n\t // High XOR low\n\t G[i] = gh ^ gl;\n\t }\n\n\t // Calculate new state values\n\t X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n\t X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;\n\t X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n\t X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;\n\t X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n\t X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;\n\t X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n\t X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);\n\t}());\n\n\n\treturn CryptoJS.RabbitLegacy;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit-legacy.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit.js": -/*!**************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit.js ***! - \**************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./enc-base64 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js\"), __webpack_require__(/*! ./md5 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js\"), __webpack_require__(/*! ./evpkdf */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t // Reusable objects\n\t var S = [];\n\t var C_ = [];\n\t var G = [];\n\n\t /**\n\t * Rabbit stream cipher algorithm\n\t */\n\t var Rabbit = C_algo.Rabbit = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var K = this._key.words;\n\t var iv = this.cfg.iv;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) |\n\t (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Generate initial state values\n\t var X = this._X = [\n\t K[0], (K[3] << 16) | (K[2] >>> 16),\n\t K[1], (K[0] << 16) | (K[3] >>> 16),\n\t K[2], (K[1] << 16) | (K[0] >>> 16),\n\t K[3], (K[2] << 16) | (K[1] >>> 16)\n\t ];\n\n\t // Generate initial counter values\n\t var C = this._C = [\n\t (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n\t (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n\t (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n\t (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n\t ];\n\n\t // Carry bit\n\t this._b = 0;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\n\t // Modify the counters\n\t for (var i = 0; i < 8; i++) {\n\t C[i] ^= X[(i + 4) & 7];\n\t }\n\n\t // IV setup\n\t if (iv) {\n\t // Shortcuts\n\t var IV = iv.words;\n\t var IV_0 = IV[0];\n\t var IV_1 = IV[1];\n\n\t // Generate four subvectors\n\t var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n\t var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n\t var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n\t var i3 = (i2 << 16) | (i0 & 0x0000ffff);\n\n\t // Modify counter values\n\t C[0] ^= i0;\n\t C[1] ^= i1;\n\t C[2] ^= i2;\n\t C[3] ^= i3;\n\t C[4] ^= i0;\n\t C[5] ^= i1;\n\t C[6] ^= i2;\n\t C[7] ^= i3;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\t }\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var X = this._X;\n\n\t // Iterate the system\n\t nextState.call(this);\n\n\t // Generate four keystream words\n\t S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n\t S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n\t S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n\t S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n\n\t for (var i = 0; i < 4; i++) {\n\t // Swap endian\n\t S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |\n\t (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);\n\n\t // Encrypt\n\t M[offset + i] ^= S[i];\n\t }\n\t },\n\n\t blockSize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t function nextState() {\n\t // Shortcuts\n\t var X = this._X;\n\t var C = this._C;\n\n\t // Save old counter values\n\t for (var i = 0; i < 8; i++) {\n\t C_[i] = C[i];\n\t }\n\n\t // Calculate new counter values\n\t C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n\t C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n\t C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n\t C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n\t C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n\t C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n\t C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n\t C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n\t this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n\n\t // Calculate the g-values\n\t for (var i = 0; i < 8; i++) {\n\t var gx = X[i] + C[i];\n\n\t // Construct high and low argument for squaring\n\t var ga = gx & 0xffff;\n\t var gb = gx >>> 16;\n\n\t // Calculate high and low result of squaring\n\t var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n\t var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n\n\t // High XOR low\n\t G[i] = gh ^ gl;\n\t }\n\n\t // Calculate new state values\n\t X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n\t X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;\n\t X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n\t X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;\n\t X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n\t X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;\n\t X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n\t X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);\n\t */\n\t C.Rabbit = StreamCipher._createHelper(Rabbit);\n\t}());\n\n\n\treturn CryptoJS.Rabbit;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rc4.js": -/*!***********************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rc4.js ***! - \***********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./enc-base64 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js\"), __webpack_require__(/*! ./md5 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js\"), __webpack_require__(/*! ./evpkdf */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t /**\n\t * RC4 stream cipher algorithm.\n\t */\n\t var RC4 = C_algo.RC4 = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\t var keySigBytes = key.sigBytes;\n\n\t // Init sbox\n\t var S = this._S = [];\n\t for (var i = 0; i < 256; i++) {\n\t S[i] = i;\n\t }\n\n\t // Key setup\n\t for (var i = 0, j = 0; i < 256; i++) {\n\t var keyByteIndex = i % keySigBytes;\n\t var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff;\n\n\t j = (j + S[i] + keyByte) % 256;\n\n\t // Swap\n\t var t = S[i];\n\t S[i] = S[j];\n\t S[j] = t;\n\t }\n\n\t // Counters\n\t this._i = this._j = 0;\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t M[offset] ^= generateKeystreamWord.call(this);\n\t },\n\n\t keySize: 256/32,\n\n\t ivSize: 0\n\t });\n\n\t function generateKeystreamWord() {\n\t // Shortcuts\n\t var S = this._S;\n\t var i = this._i;\n\t var j = this._j;\n\n\t // Generate keystream word\n\t var keystreamWord = 0;\n\t for (var n = 0; n < 4; n++) {\n\t i = (i + 1) % 256;\n\t j = (j + S[i]) % 256;\n\n\t // Swap\n\t var t = S[i];\n\t S[i] = S[j];\n\t S[j] = t;\n\n\t keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8);\n\t }\n\n\t // Update counters\n\t this._i = i;\n\t this._j = j;\n\n\t return keystreamWord;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RC4 = StreamCipher._createHelper(RC4);\n\n\t /**\n\t * Modified RC4 stream cipher algorithm.\n\t */\n\t var RC4Drop = C_algo.RC4Drop = RC4.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} drop The number of keystream words to drop. Default 192\n\t */\n\t cfg: RC4.cfg.extend({\n\t drop: 192\n\t }),\n\n\t _doReset: function () {\n\t RC4._doReset.call(this);\n\n\t // Drop\n\t for (var i = this.cfg.drop; i > 0; i--) {\n\t generateKeystreamWord.call(this);\n\t }\n\t }\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RC4Drop = StreamCipher._createHelper(RC4Drop);\n\t}());\n\n\n\treturn CryptoJS.RC4;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/rc4.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/ripemd160.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/ripemd160.js ***! - \*****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t/** @preserve\n\t(c) 2012 by Cédric Mesnil. All rights reserved.\n\n\tRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n\t - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\t - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t*/\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var _zl = WordArray.create([\n\t 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n\t 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n\t 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n\t 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n\t 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]);\n\t var _zr = WordArray.create([\n\t 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n\t 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n\t 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n\t 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n\t 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]);\n\t var _sl = WordArray.create([\n\t 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n\t 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n\t 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n\t 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n\t 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]);\n\t var _sr = WordArray.create([\n\t 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n\t 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n\t 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n\t 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n\t 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]);\n\n\t var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);\n\t var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);\n\n\t /**\n\t * RIPEMD160 hash algorithm.\n\t */\n\t var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t // Swap\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\t // Shortcut\n\t var H = this._hash.words;\n\t var hl = _hl.words;\n\t var hr = _hr.words;\n\t var zl = _zl.words;\n\t var zr = _zr.words;\n\t var sl = _sl.words;\n\t var sr = _sr.words;\n\n\t // Working variables\n\t var al, bl, cl, dl, el;\n\t var ar, br, cr, dr, er;\n\n\t ar = al = H[0];\n\t br = bl = H[1];\n\t cr = cl = H[2];\n\t dr = dl = H[3];\n\t er = el = H[4];\n\t // Computation\n\t var t;\n\t for (var i = 0; i < 80; i += 1) {\n\t t = (al + M[offset+zl[i]])|0;\n\t if (i<16){\n\t\t t += f1(bl,cl,dl) + hl[0];\n\t } else if (i<32) {\n\t\t t += f2(bl,cl,dl) + hl[1];\n\t } else if (i<48) {\n\t\t t += f3(bl,cl,dl) + hl[2];\n\t } else if (i<64) {\n\t\t t += f4(bl,cl,dl) + hl[3];\n\t } else {// if (i<80) {\n\t\t t += f5(bl,cl,dl) + hl[4];\n\t }\n\t t = t|0;\n\t t = rotl(t,sl[i]);\n\t t = (t+el)|0;\n\t al = el;\n\t el = dl;\n\t dl = rotl(cl, 10);\n\t cl = bl;\n\t bl = t;\n\n\t t = (ar + M[offset+zr[i]])|0;\n\t if (i<16){\n\t\t t += f5(br,cr,dr) + hr[0];\n\t } else if (i<32) {\n\t\t t += f4(br,cr,dr) + hr[1];\n\t } else if (i<48) {\n\t\t t += f3(br,cr,dr) + hr[2];\n\t } else if (i<64) {\n\t\t t += f2(br,cr,dr) + hr[3];\n\t } else {// if (i<80) {\n\t\t t += f1(br,cr,dr) + hr[4];\n\t }\n\t t = t|0;\n\t t = rotl(t,sr[i]) ;\n\t t = (t+er)|0;\n\t ar = er;\n\t er = dr;\n\t dr = rotl(cr, 10);\n\t cr = br;\n\t br = t;\n\t }\n\t // Intermediate hash value\n\t t = (H[1] + cl + dr)|0;\n\t H[1] = (H[2] + dl + er)|0;\n\t H[2] = (H[3] + el + ar)|0;\n\t H[3] = (H[4] + al + br)|0;\n\t H[4] = (H[0] + bl + cr)|0;\n\t H[0] = t;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)\n\t );\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 5; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t // Swap\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\n\t function f1(x, y, z) {\n\t return ((x) ^ (y) ^ (z));\n\n\t }\n\n\t function f2(x, y, z) {\n\t return (((x)&(y)) | ((~x)&(z)));\n\t }\n\n\t function f3(x, y, z) {\n\t return (((x) | (~(y))) ^ (z));\n\t }\n\n\t function f4(x, y, z) {\n\t return (((x) & (z)) | ((y)&(~(z))));\n\t }\n\n\t function f5(x, y, z) {\n\t return ((x) ^ ((y) |(~(z))));\n\n\t }\n\n\t function rotl(x,n) {\n\t return (x<>>(32-n));\n\t }\n\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.RIPEMD160('message');\n\t * var hash = CryptoJS.RIPEMD160(wordArray);\n\t */\n\t C.RIPEMD160 = Hasher._createHelper(RIPEMD160);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacRIPEMD160(message, key);\n\t */\n\t C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);\n\t}(Math));\n\n\n\treturn CryptoJS.RIPEMD160;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/ripemd160.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha1.js": -/*!************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha1.js ***! - \************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-1 hash algorithm.\n\t */\n\t var SHA1 = C_algo.SHA1 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476,\n\t 0xc3d2e1f0\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\n\t // Computation\n\t for (var i = 0; i < 80; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\n\t W[i] = (n << 1) | (n >>> 31);\n\t }\n\n\t var t = ((a << 5) | (a >>> 27)) + e + W[i];\n\t if (i < 20) {\n\t t += ((b & c) | (~b & d)) + 0x5a827999;\n\t } else if (i < 40) {\n\t t += (b ^ c ^ d) + 0x6ed9eba1;\n\t } else if (i < 60) {\n\t t += ((b & c) | (b & d) | (c & d)) - 0x70e44324;\n\t } else /* if (i < 80) */ {\n\t t += (b ^ c ^ d) - 0x359d3e2a;\n\t }\n\n\t e = d;\n\t d = c;\n\t c = (b << 30) | (b >>> 2);\n\t b = a;\n\t a = t;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA1('message');\n\t * var hash = CryptoJS.SHA1(wordArray);\n\t */\n\t C.SHA1 = Hasher._createHelper(SHA1);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA1(message, key);\n\t */\n\t C.HmacSHA1 = Hasher._createHmacHelper(SHA1);\n\t}());\n\n\n\treturn CryptoJS.SHA1;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha1.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha224.js": -/*!**************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha224.js ***! - \**************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./sha256 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha256.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var SHA256 = C_algo.SHA256;\n\n\t /**\n\t * SHA-224 hash algorithm.\n\t */\n\t var SHA224 = C_algo.SHA224 = SHA256.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n\t 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4\n\t ]);\n\t },\n\n\t _doFinalize: function () {\n\t var hash = SHA256._doFinalize.call(this);\n\n\t hash.sigBytes -= 4;\n\n\t return hash;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA224('message');\n\t * var hash = CryptoJS.SHA224(wordArray);\n\t */\n\t C.SHA224 = SHA256._createHelper(SHA224);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA224(message, key);\n\t */\n\t C.HmacSHA224 = SHA256._createHmacHelper(SHA224);\n\t}());\n\n\n\treturn CryptoJS.SHA224;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha224.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha256.js": -/*!**************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha256.js ***! - \**************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Initialization and round constants tables\n\t var H = [];\n\t var K = [];\n\n\t // Compute constants\n\t (function () {\n\t function isPrime(n) {\n\t var sqrtN = Math.sqrt(n);\n\t for (var factor = 2; factor <= sqrtN; factor++) {\n\t if (!(n % factor)) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t }\n\n\t function getFractionalBits(n) {\n\t return ((n - (n | 0)) * 0x100000000) | 0;\n\t }\n\n\t var n = 2;\n\t var nPrime = 0;\n\t while (nPrime < 64) {\n\t if (isPrime(n)) {\n\t if (nPrime < 8) {\n\t H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));\n\t }\n\t K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));\n\n\t nPrime++;\n\t }\n\n\t n++;\n\t }\n\t }());\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-256 hash algorithm.\n\t */\n\t var SHA256 = C_algo.SHA256 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init(H.slice(0));\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\t var f = H[5];\n\t var g = H[6];\n\t var h = H[7];\n\n\t // Computation\n\t for (var i = 0; i < 64; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var gamma0x = W[i - 15];\n\t var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^\n\t ((gamma0x << 14) | (gamma0x >>> 18)) ^\n\t (gamma0x >>> 3);\n\n\t var gamma1x = W[i - 2];\n\t var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^\n\t ((gamma1x << 13) | (gamma1x >>> 19)) ^\n\t (gamma1x >>> 10);\n\n\t W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];\n\t }\n\n\t var ch = (e & f) ^ (~e & g);\n\t var maj = (a & b) ^ (a & c) ^ (b & c);\n\n\t var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));\n\t var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25));\n\n\t var t1 = h + sigma1 + ch + K[i] + W[i];\n\t var t2 = sigma0 + maj;\n\n\t h = g;\n\t g = f;\n\t f = e;\n\t e = (d + t1) | 0;\n\t d = c;\n\t c = b;\n\t b = a;\n\t a = (t1 + t2) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t H[5] = (H[5] + f) | 0;\n\t H[6] = (H[6] + g) | 0;\n\t H[7] = (H[7] + h) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA256('message');\n\t * var hash = CryptoJS.SHA256(wordArray);\n\t */\n\t C.SHA256 = Hasher._createHelper(SHA256);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA256(message, key);\n\t */\n\t C.HmacSHA256 = Hasher._createHmacHelper(SHA256);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA256;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha256.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha3.js": -/*!************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha3.js ***! - \************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./x64-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/x64-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var C_algo = C.algo;\n\n\t // Constants tables\n\t var RHO_OFFSETS = [];\n\t var PI_INDEXES = [];\n\t var ROUND_CONSTANTS = [];\n\n\t // Compute Constants\n\t (function () {\n\t // Compute rho offset constants\n\t var x = 1, y = 0;\n\t for (var t = 0; t < 24; t++) {\n\t RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64;\n\n\t var newX = y % 5;\n\t var newY = (2 * x + 3 * y) % 5;\n\t x = newX;\n\t y = newY;\n\t }\n\n\t // Compute pi index constants\n\t for (var x = 0; x < 5; x++) {\n\t for (var y = 0; y < 5; y++) {\n\t PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5;\n\t }\n\t }\n\n\t // Compute round constants\n\t var LFSR = 0x01;\n\t for (var i = 0; i < 24; i++) {\n\t var roundConstantMsw = 0;\n\t var roundConstantLsw = 0;\n\n\t for (var j = 0; j < 7; j++) {\n\t if (LFSR & 0x01) {\n\t var bitPosition = (1 << j) - 1;\n\t if (bitPosition < 32) {\n\t roundConstantLsw ^= 1 << bitPosition;\n\t } else /* if (bitPosition >= 32) */ {\n\t roundConstantMsw ^= 1 << (bitPosition - 32);\n\t }\n\t }\n\n\t // Compute next LFSR\n\t if (LFSR & 0x80) {\n\t // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1\n\t LFSR = (LFSR << 1) ^ 0x71;\n\t } else {\n\t LFSR <<= 1;\n\t }\n\t }\n\n\t ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);\n\t }\n\t }());\n\n\t // Reusable objects for temporary values\n\t var T = [];\n\t (function () {\n\t for (var i = 0; i < 25; i++) {\n\t T[i] = X64Word.create();\n\t }\n\t }());\n\n\t /**\n\t * SHA-3 hash algorithm.\n\t */\n\t var SHA3 = C_algo.SHA3 = Hasher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} outputLength\n\t * The desired number of bits in the output hash.\n\t * Only values permitted are: 224, 256, 384, 512.\n\t * Default: 512\n\t */\n\t cfg: Hasher.cfg.extend({\n\t outputLength: 512\n\t }),\n\n\t _doReset: function () {\n\t var state = this._state = []\n\t for (var i = 0; i < 25; i++) {\n\t state[i] = new X64Word.init();\n\t }\n\n\t this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcuts\n\t var state = this._state;\n\t var nBlockSizeLanes = this.blockSize / 2;\n\n\t // Absorb\n\t for (var i = 0; i < nBlockSizeLanes; i++) {\n\t // Shortcuts\n\t var M2i = M[offset + 2 * i];\n\t var M2i1 = M[offset + 2 * i + 1];\n\n\t // Swap endian\n\t M2i = (\n\t (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) |\n\t (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00)\n\t );\n\t M2i1 = (\n\t (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) |\n\t (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00)\n\t );\n\n\t // Absorb message into state\n\t var lane = state[i];\n\t lane.high ^= M2i1;\n\t lane.low ^= M2i;\n\t }\n\n\t // Rounds\n\t for (var round = 0; round < 24; round++) {\n\t // Theta\n\t for (var x = 0; x < 5; x++) {\n\t // Mix column lanes\n\t var tMsw = 0, tLsw = 0;\n\t for (var y = 0; y < 5; y++) {\n\t var lane = state[x + 5 * y];\n\t tMsw ^= lane.high;\n\t tLsw ^= lane.low;\n\t }\n\n\t // Temporary values\n\t var Tx = T[x];\n\t Tx.high = tMsw;\n\t Tx.low = tLsw;\n\t }\n\t for (var x = 0; x < 5; x++) {\n\t // Shortcuts\n\t var Tx4 = T[(x + 4) % 5];\n\t var Tx1 = T[(x + 1) % 5];\n\t var Tx1Msw = Tx1.high;\n\t var Tx1Lsw = Tx1.low;\n\n\t // Mix surrounding columns\n\t var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31));\n\t var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31));\n\t for (var y = 0; y < 5; y++) {\n\t var lane = state[x + 5 * y];\n\t lane.high ^= tMsw;\n\t lane.low ^= tLsw;\n\t }\n\t }\n\n\t // Rho Pi\n\t for (var laneIndex = 1; laneIndex < 25; laneIndex++) {\n\t // Shortcuts\n\t var lane = state[laneIndex];\n\t var laneMsw = lane.high;\n\t var laneLsw = lane.low;\n\t var rhoOffset = RHO_OFFSETS[laneIndex];\n\n\t // Rotate lanes\n\t if (rhoOffset < 32) {\n\t var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset));\n\t var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset));\n\t } else /* if (rhoOffset >= 32) */ {\n\t var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset));\n\t var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset));\n\t }\n\n\t // Transpose lanes\n\t var TPiLane = T[PI_INDEXES[laneIndex]];\n\t TPiLane.high = tMsw;\n\t TPiLane.low = tLsw;\n\t }\n\n\t // Rho pi at x = y = 0\n\t var T0 = T[0];\n\t var state0 = state[0];\n\t T0.high = state0.high;\n\t T0.low = state0.low;\n\n\t // Chi\n\t for (var x = 0; x < 5; x++) {\n\t for (var y = 0; y < 5; y++) {\n\t // Shortcuts\n\t var laneIndex = x + 5 * y;\n\t var lane = state[laneIndex];\n\t var TLane = T[laneIndex];\n\t var Tx1Lane = T[((x + 1) % 5) + 5 * y];\n\t var Tx2Lane = T[((x + 2) % 5) + 5 * y];\n\n\t // Mix rows\n\t lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high);\n\t lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low);\n\t }\n\t }\n\n\t // Iota\n\t var lane = state[0];\n\t var roundConstant = ROUND_CONSTANTS[round];\n\t lane.high ^= roundConstant.high;\n\t lane.low ^= roundConstant.low;;\n\t }\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\t var blockSizeBits = this.blockSize * 32;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32);\n\t dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var state = this._state;\n\t var outputLengthBytes = this.cfg.outputLength / 8;\n\t var outputLengthLanes = outputLengthBytes / 8;\n\n\t // Squeeze\n\t var hashWords = [];\n\t for (var i = 0; i < outputLengthLanes; i++) {\n\t // Shortcuts\n\t var lane = state[i];\n\t var laneMsw = lane.high;\n\t var laneLsw = lane.low;\n\n\t // Swap endian\n\t laneMsw = (\n\t (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) |\n\t (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00)\n\t );\n\t laneLsw = (\n\t (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) |\n\t (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00)\n\t );\n\n\t // Squeeze state to retrieve hash\n\t hashWords.push(laneLsw);\n\t hashWords.push(laneMsw);\n\t }\n\n\t // Return final computed hash\n\t return new WordArray.init(hashWords, outputLengthBytes);\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\n\t var state = clone._state = this._state.slice(0);\n\t for (var i = 0; i < 25; i++) {\n\t state[i] = state[i].clone();\n\t }\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA3('message');\n\t * var hash = CryptoJS.SHA3(wordArray);\n\t */\n\t C.SHA3 = Hasher._createHelper(SHA3);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA3(message, key);\n\t */\n\t C.HmacSHA3 = Hasher._createHmacHelper(SHA3);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA3;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha3.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha384.js": -/*!**************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha384.js ***! - \**************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./x64-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/x64-core.js\"), __webpack_require__(/*! ./sha512 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha512.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var X64WordArray = C_x64.WordArray;\n\t var C_algo = C.algo;\n\t var SHA512 = C_algo.SHA512;\n\n\t /**\n\t * SHA-384 hash algorithm.\n\t */\n\t var SHA384 = C_algo.SHA384 = SHA512.extend({\n\t _doReset: function () {\n\t this._hash = new X64WordArray.init([\n\t new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),\n\t new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),\n\t new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),\n\t new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)\n\t ]);\n\t },\n\n\t _doFinalize: function () {\n\t var hash = SHA512._doFinalize.call(this);\n\n\t hash.sigBytes -= 16;\n\n\t return hash;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA384('message');\n\t * var hash = CryptoJS.SHA384(wordArray);\n\t */\n\t C.SHA384 = SHA512._createHelper(SHA384);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA384(message, key);\n\t */\n\t C.HmacSHA384 = SHA512._createHmacHelper(SHA384);\n\t}());\n\n\n\treturn CryptoJS.SHA384;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha384.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha512.js": -/*!**************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha512.js ***! - \**************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./x64-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/x64-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Hasher = C_lib.Hasher;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var X64WordArray = C_x64.WordArray;\n\t var C_algo = C.algo;\n\n\t function X64Word_create() {\n\t return X64Word.create.apply(X64Word, arguments);\n\t }\n\n\t // Constants\n\t var K = [\n\t X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd),\n\t X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc),\n\t X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019),\n\t X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118),\n\t X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe),\n\t X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2),\n\t X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1),\n\t X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694),\n\t X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3),\n\t X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65),\n\t X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483),\n\t X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5),\n\t X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210),\n\t X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4),\n\t X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725),\n\t X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70),\n\t X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926),\n\t X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df),\n\t X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8),\n\t X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b),\n\t X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001),\n\t X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30),\n\t X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910),\n\t X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8),\n\t X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53),\n\t X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8),\n\t X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb),\n\t X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3),\n\t X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60),\n\t X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec),\n\t X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9),\n\t X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b),\n\t X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207),\n\t X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178),\n\t X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6),\n\t X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b),\n\t X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493),\n\t X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c),\n\t X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a),\n\t X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)\n\t ];\n\n\t // Reusable objects\n\t var W = [];\n\t (function () {\n\t for (var i = 0; i < 80; i++) {\n\t W[i] = X64Word_create();\n\t }\n\t }());\n\n\t /**\n\t * SHA-512 hash algorithm.\n\t */\n\t var SHA512 = C_algo.SHA512 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new X64WordArray.init([\n\t new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b),\n\t new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1),\n\t new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f),\n\t new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcuts\n\t var H = this._hash.words;\n\n\t var H0 = H[0];\n\t var H1 = H[1];\n\t var H2 = H[2];\n\t var H3 = H[3];\n\t var H4 = H[4];\n\t var H5 = H[5];\n\t var H6 = H[6];\n\t var H7 = H[7];\n\n\t var H0h = H0.high;\n\t var H0l = H0.low;\n\t var H1h = H1.high;\n\t var H1l = H1.low;\n\t var H2h = H2.high;\n\t var H2l = H2.low;\n\t var H3h = H3.high;\n\t var H3l = H3.low;\n\t var H4h = H4.high;\n\t var H4l = H4.low;\n\t var H5h = H5.high;\n\t var H5l = H5.low;\n\t var H6h = H6.high;\n\t var H6l = H6.low;\n\t var H7h = H7.high;\n\t var H7l = H7.low;\n\n\t // Working variables\n\t var ah = H0h;\n\t var al = H0l;\n\t var bh = H1h;\n\t var bl = H1l;\n\t var ch = H2h;\n\t var cl = H2l;\n\t var dh = H3h;\n\t var dl = H3l;\n\t var eh = H4h;\n\t var el = H4l;\n\t var fh = H5h;\n\t var fl = H5l;\n\t var gh = H6h;\n\t var gl = H6l;\n\t var hh = H7h;\n\t var hl = H7l;\n\n\t // Rounds\n\t for (var i = 0; i < 80; i++) {\n\t // Shortcut\n\t var Wi = W[i];\n\n\t // Extend message\n\t if (i < 16) {\n\t var Wih = Wi.high = M[offset + i * 2] | 0;\n\t var Wil = Wi.low = M[offset + i * 2 + 1] | 0;\n\t } else {\n\t // Gamma0\n\t var gamma0x = W[i - 15];\n\t var gamma0xh = gamma0x.high;\n\t var gamma0xl = gamma0x.low;\n\t var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7);\n\t var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25));\n\n\t // Gamma1\n\t var gamma1x = W[i - 2];\n\t var gamma1xh = gamma1x.high;\n\t var gamma1xl = gamma1x.low;\n\t var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6);\n\t var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26));\n\n\t // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]\n\t var Wi7 = W[i - 7];\n\t var Wi7h = Wi7.high;\n\t var Wi7l = Wi7.low;\n\n\t var Wi16 = W[i - 16];\n\t var Wi16h = Wi16.high;\n\t var Wi16l = Wi16.low;\n\n\t var Wil = gamma0l + Wi7l;\n\t var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0);\n\t var Wil = Wil + gamma1l;\n\t var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0);\n\t var Wil = Wil + Wi16l;\n\t var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0);\n\n\t Wi.high = Wih;\n\t Wi.low = Wil;\n\t }\n\n\t var chh = (eh & fh) ^ (~eh & gh);\n\t var chl = (el & fl) ^ (~el & gl);\n\t var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch);\n\t var majl = (al & bl) ^ (al & cl) ^ (bl & cl);\n\n\t var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7));\n\t var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7));\n\t var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9));\n\t var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9));\n\n\t // t1 = h + sigma1 + ch + K[i] + W[i]\n\t var Ki = K[i];\n\t var Kih = Ki.high;\n\t var Kil = Ki.low;\n\n\t var t1l = hl + sigma1l;\n\t var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0);\n\t var t1l = t1l + chl;\n\t var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0);\n\t var t1l = t1l + Kil;\n\t var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0);\n\t var t1l = t1l + Wil;\n\t var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0);\n\n\t // t2 = sigma0 + maj\n\t var t2l = sigma0l + majl;\n\t var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0);\n\n\t // Update working variables\n\t hh = gh;\n\t hl = gl;\n\t gh = fh;\n\t gl = fl;\n\t fh = eh;\n\t fl = el;\n\t el = (dl + t1l) | 0;\n\t eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0;\n\t dh = ch;\n\t dl = cl;\n\t ch = bh;\n\t cl = bl;\n\t bh = ah;\n\t bl = al;\n\t al = (t1l + t2l) | 0;\n\t ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H0l = H0.low = (H0l + al);\n\t H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0));\n\t H1l = H1.low = (H1l + bl);\n\t H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0));\n\t H2l = H2.low = (H2l + cl);\n\t H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0));\n\t H3l = H3.low = (H3l + dl);\n\t H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0));\n\t H4l = H4.low = (H4l + el);\n\t H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0));\n\t H5l = H5.low = (H5l + fl);\n\t H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0));\n\t H6l = H6.low = (H6l + gl);\n\t H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0));\n\t H7l = H7.low = (H7l + hl);\n\t H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0));\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Convert hash to 32-bit word array before returning\n\t var hash = this._hash.toX32();\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t },\n\n\t blockSize: 1024/32\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA512('message');\n\t * var hash = CryptoJS.SHA512(wordArray);\n\t */\n\t C.SHA512 = Hasher._createHelper(SHA512);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA512(message, key);\n\t */\n\t C.HmacSHA512 = Hasher._createHmacHelper(SHA512);\n\t}());\n\n\n\treturn CryptoJS.SHA512;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha512.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/tripledes.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/tripledes.js ***! - \*****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory, undef) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"), __webpack_require__(/*! ./enc-base64 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js\"), __webpack_require__(/*! ./md5 */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js\"), __webpack_require__(/*! ./evpkdf */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js\"), __webpack_require__(/*! ./cipher-core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Permuted Choice 1 constants\n\t var PC1 = [\n\t 57, 49, 41, 33, 25, 17, 9, 1,\n\t 58, 50, 42, 34, 26, 18, 10, 2,\n\t 59, 51, 43, 35, 27, 19, 11, 3,\n\t 60, 52, 44, 36, 63, 55, 47, 39,\n\t 31, 23, 15, 7, 62, 54, 46, 38,\n\t 30, 22, 14, 6, 61, 53, 45, 37,\n\t 29, 21, 13, 5, 28, 20, 12, 4\n\t ];\n\n\t // Permuted Choice 2 constants\n\t var PC2 = [\n\t 14, 17, 11, 24, 1, 5,\n\t 3, 28, 15, 6, 21, 10,\n\t 23, 19, 12, 4, 26, 8,\n\t 16, 7, 27, 20, 13, 2,\n\t 41, 52, 31, 37, 47, 55,\n\t 30, 40, 51, 45, 33, 48,\n\t 44, 49, 39, 56, 34, 53,\n\t 46, 42, 50, 36, 29, 32\n\t ];\n\n\t // Cumulative bit shift constants\n\t var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];\n\n\t // SBOXes and round permutation constants\n\t var SBOX_P = [\n\t {\n\t 0x0: 0x808200,\n\t 0x10000000: 0x8000,\n\t 0x20000000: 0x808002,\n\t 0x30000000: 0x2,\n\t 0x40000000: 0x200,\n\t 0x50000000: 0x808202,\n\t 0x60000000: 0x800202,\n\t 0x70000000: 0x800000,\n\t 0x80000000: 0x202,\n\t 0x90000000: 0x800200,\n\t 0xa0000000: 0x8200,\n\t 0xb0000000: 0x808000,\n\t 0xc0000000: 0x8002,\n\t 0xd0000000: 0x800002,\n\t 0xe0000000: 0x0,\n\t 0xf0000000: 0x8202,\n\t 0x8000000: 0x0,\n\t 0x18000000: 0x808202,\n\t 0x28000000: 0x8202,\n\t 0x38000000: 0x8000,\n\t 0x48000000: 0x808200,\n\t 0x58000000: 0x200,\n\t 0x68000000: 0x808002,\n\t 0x78000000: 0x2,\n\t 0x88000000: 0x800200,\n\t 0x98000000: 0x8200,\n\t 0xa8000000: 0x808000,\n\t 0xb8000000: 0x800202,\n\t 0xc8000000: 0x800002,\n\t 0xd8000000: 0x8002,\n\t 0xe8000000: 0x202,\n\t 0xf8000000: 0x800000,\n\t 0x1: 0x8000,\n\t 0x10000001: 0x2,\n\t 0x20000001: 0x808200,\n\t 0x30000001: 0x800000,\n\t 0x40000001: 0x808002,\n\t 0x50000001: 0x8200,\n\t 0x60000001: 0x200,\n\t 0x70000001: 0x800202,\n\t 0x80000001: 0x808202,\n\t 0x90000001: 0x808000,\n\t 0xa0000001: 0x800002,\n\t 0xb0000001: 0x8202,\n\t 0xc0000001: 0x202,\n\t 0xd0000001: 0x800200,\n\t 0xe0000001: 0x8002,\n\t 0xf0000001: 0x0,\n\t 0x8000001: 0x808202,\n\t 0x18000001: 0x808000,\n\t 0x28000001: 0x800000,\n\t 0x38000001: 0x200,\n\t 0x48000001: 0x8000,\n\t 0x58000001: 0x800002,\n\t 0x68000001: 0x2,\n\t 0x78000001: 0x8202,\n\t 0x88000001: 0x8002,\n\t 0x98000001: 0x800202,\n\t 0xa8000001: 0x202,\n\t 0xb8000001: 0x808200,\n\t 0xc8000001: 0x800200,\n\t 0xd8000001: 0x0,\n\t 0xe8000001: 0x8200,\n\t 0xf8000001: 0x808002\n\t },\n\t {\n\t 0x0: 0x40084010,\n\t 0x1000000: 0x4000,\n\t 0x2000000: 0x80000,\n\t 0x3000000: 0x40080010,\n\t 0x4000000: 0x40000010,\n\t 0x5000000: 0x40084000,\n\t 0x6000000: 0x40004000,\n\t 0x7000000: 0x10,\n\t 0x8000000: 0x84000,\n\t 0x9000000: 0x40004010,\n\t 0xa000000: 0x40000000,\n\t 0xb000000: 0x84010,\n\t 0xc000000: 0x80010,\n\t 0xd000000: 0x0,\n\t 0xe000000: 0x4010,\n\t 0xf000000: 0x40080000,\n\t 0x800000: 0x40004000,\n\t 0x1800000: 0x84010,\n\t 0x2800000: 0x10,\n\t 0x3800000: 0x40004010,\n\t 0x4800000: 0x40084010,\n\t 0x5800000: 0x40000000,\n\t 0x6800000: 0x80000,\n\t 0x7800000: 0x40080010,\n\t 0x8800000: 0x80010,\n\t 0x9800000: 0x0,\n\t 0xa800000: 0x4000,\n\t 0xb800000: 0x40080000,\n\t 0xc800000: 0x40000010,\n\t 0xd800000: 0x84000,\n\t 0xe800000: 0x40084000,\n\t 0xf800000: 0x4010,\n\t 0x10000000: 0x0,\n\t 0x11000000: 0x40080010,\n\t 0x12000000: 0x40004010,\n\t 0x13000000: 0x40084000,\n\t 0x14000000: 0x40080000,\n\t 0x15000000: 0x10,\n\t 0x16000000: 0x84010,\n\t 0x17000000: 0x4000,\n\t 0x18000000: 0x4010,\n\t 0x19000000: 0x80000,\n\t 0x1a000000: 0x80010,\n\t 0x1b000000: 0x40000010,\n\t 0x1c000000: 0x84000,\n\t 0x1d000000: 0x40004000,\n\t 0x1e000000: 0x40000000,\n\t 0x1f000000: 0x40084010,\n\t 0x10800000: 0x84010,\n\t 0x11800000: 0x80000,\n\t 0x12800000: 0x40080000,\n\t 0x13800000: 0x4000,\n\t 0x14800000: 0x40004000,\n\t 0x15800000: 0x40084010,\n\t 0x16800000: 0x10,\n\t 0x17800000: 0x40000000,\n\t 0x18800000: 0x40084000,\n\t 0x19800000: 0x40000010,\n\t 0x1a800000: 0x40004010,\n\t 0x1b800000: 0x80010,\n\t 0x1c800000: 0x0,\n\t 0x1d800000: 0x4010,\n\t 0x1e800000: 0x40080010,\n\t 0x1f800000: 0x84000\n\t },\n\t {\n\t 0x0: 0x104,\n\t 0x100000: 0x0,\n\t 0x200000: 0x4000100,\n\t 0x300000: 0x10104,\n\t 0x400000: 0x10004,\n\t 0x500000: 0x4000004,\n\t 0x600000: 0x4010104,\n\t 0x700000: 0x4010000,\n\t 0x800000: 0x4000000,\n\t 0x900000: 0x4010100,\n\t 0xa00000: 0x10100,\n\t 0xb00000: 0x4010004,\n\t 0xc00000: 0x4000104,\n\t 0xd00000: 0x10000,\n\t 0xe00000: 0x4,\n\t 0xf00000: 0x100,\n\t 0x80000: 0x4010100,\n\t 0x180000: 0x4010004,\n\t 0x280000: 0x0,\n\t 0x380000: 0x4000100,\n\t 0x480000: 0x4000004,\n\t 0x580000: 0x10000,\n\t 0x680000: 0x10004,\n\t 0x780000: 0x104,\n\t 0x880000: 0x4,\n\t 0x980000: 0x100,\n\t 0xa80000: 0x4010000,\n\t 0xb80000: 0x10104,\n\t 0xc80000: 0x10100,\n\t 0xd80000: 0x4000104,\n\t 0xe80000: 0x4010104,\n\t 0xf80000: 0x4000000,\n\t 0x1000000: 0x4010100,\n\t 0x1100000: 0x10004,\n\t 0x1200000: 0x10000,\n\t 0x1300000: 0x4000100,\n\t 0x1400000: 0x100,\n\t 0x1500000: 0x4010104,\n\t 0x1600000: 0x4000004,\n\t 0x1700000: 0x0,\n\t 0x1800000: 0x4000104,\n\t 0x1900000: 0x4000000,\n\t 0x1a00000: 0x4,\n\t 0x1b00000: 0x10100,\n\t 0x1c00000: 0x4010000,\n\t 0x1d00000: 0x104,\n\t 0x1e00000: 0x10104,\n\t 0x1f00000: 0x4010004,\n\t 0x1080000: 0x4000000,\n\t 0x1180000: 0x104,\n\t 0x1280000: 0x4010100,\n\t 0x1380000: 0x0,\n\t 0x1480000: 0x10004,\n\t 0x1580000: 0x4000100,\n\t 0x1680000: 0x100,\n\t 0x1780000: 0x4010004,\n\t 0x1880000: 0x10000,\n\t 0x1980000: 0x4010104,\n\t 0x1a80000: 0x10104,\n\t 0x1b80000: 0x4000004,\n\t 0x1c80000: 0x4000104,\n\t 0x1d80000: 0x4010000,\n\t 0x1e80000: 0x4,\n\t 0x1f80000: 0x10100\n\t },\n\t {\n\t 0x0: 0x80401000,\n\t 0x10000: 0x80001040,\n\t 0x20000: 0x401040,\n\t 0x30000: 0x80400000,\n\t 0x40000: 0x0,\n\t 0x50000: 0x401000,\n\t 0x60000: 0x80000040,\n\t 0x70000: 0x400040,\n\t 0x80000: 0x80000000,\n\t 0x90000: 0x400000,\n\t 0xa0000: 0x40,\n\t 0xb0000: 0x80001000,\n\t 0xc0000: 0x80400040,\n\t 0xd0000: 0x1040,\n\t 0xe0000: 0x1000,\n\t 0xf0000: 0x80401040,\n\t 0x8000: 0x80001040,\n\t 0x18000: 0x40,\n\t 0x28000: 0x80400040,\n\t 0x38000: 0x80001000,\n\t 0x48000: 0x401000,\n\t 0x58000: 0x80401040,\n\t 0x68000: 0x0,\n\t 0x78000: 0x80400000,\n\t 0x88000: 0x1000,\n\t 0x98000: 0x80401000,\n\t 0xa8000: 0x400000,\n\t 0xb8000: 0x1040,\n\t 0xc8000: 0x80000000,\n\t 0xd8000: 0x400040,\n\t 0xe8000: 0x401040,\n\t 0xf8000: 0x80000040,\n\t 0x100000: 0x400040,\n\t 0x110000: 0x401000,\n\t 0x120000: 0x80000040,\n\t 0x130000: 0x0,\n\t 0x140000: 0x1040,\n\t 0x150000: 0x80400040,\n\t 0x160000: 0x80401000,\n\t 0x170000: 0x80001040,\n\t 0x180000: 0x80401040,\n\t 0x190000: 0x80000000,\n\t 0x1a0000: 0x80400000,\n\t 0x1b0000: 0x401040,\n\t 0x1c0000: 0x80001000,\n\t 0x1d0000: 0x400000,\n\t 0x1e0000: 0x40,\n\t 0x1f0000: 0x1000,\n\t 0x108000: 0x80400000,\n\t 0x118000: 0x80401040,\n\t 0x128000: 0x0,\n\t 0x138000: 0x401000,\n\t 0x148000: 0x400040,\n\t 0x158000: 0x80000000,\n\t 0x168000: 0x80001040,\n\t 0x178000: 0x40,\n\t 0x188000: 0x80000040,\n\t 0x198000: 0x1000,\n\t 0x1a8000: 0x80001000,\n\t 0x1b8000: 0x80400040,\n\t 0x1c8000: 0x1040,\n\t 0x1d8000: 0x80401000,\n\t 0x1e8000: 0x400000,\n\t 0x1f8000: 0x401040\n\t },\n\t {\n\t 0x0: 0x80,\n\t 0x1000: 0x1040000,\n\t 0x2000: 0x40000,\n\t 0x3000: 0x20000000,\n\t 0x4000: 0x20040080,\n\t 0x5000: 0x1000080,\n\t 0x6000: 0x21000080,\n\t 0x7000: 0x40080,\n\t 0x8000: 0x1000000,\n\t 0x9000: 0x20040000,\n\t 0xa000: 0x20000080,\n\t 0xb000: 0x21040080,\n\t 0xc000: 0x21040000,\n\t 0xd000: 0x0,\n\t 0xe000: 0x1040080,\n\t 0xf000: 0x21000000,\n\t 0x800: 0x1040080,\n\t 0x1800: 0x21000080,\n\t 0x2800: 0x80,\n\t 0x3800: 0x1040000,\n\t 0x4800: 0x40000,\n\t 0x5800: 0x20040080,\n\t 0x6800: 0x21040000,\n\t 0x7800: 0x20000000,\n\t 0x8800: 0x20040000,\n\t 0x9800: 0x0,\n\t 0xa800: 0x21040080,\n\t 0xb800: 0x1000080,\n\t 0xc800: 0x20000080,\n\t 0xd800: 0x21000000,\n\t 0xe800: 0x1000000,\n\t 0xf800: 0x40080,\n\t 0x10000: 0x40000,\n\t 0x11000: 0x80,\n\t 0x12000: 0x20000000,\n\t 0x13000: 0x21000080,\n\t 0x14000: 0x1000080,\n\t 0x15000: 0x21040000,\n\t 0x16000: 0x20040080,\n\t 0x17000: 0x1000000,\n\t 0x18000: 0x21040080,\n\t 0x19000: 0x21000000,\n\t 0x1a000: 0x1040000,\n\t 0x1b000: 0x20040000,\n\t 0x1c000: 0x40080,\n\t 0x1d000: 0x20000080,\n\t 0x1e000: 0x0,\n\t 0x1f000: 0x1040080,\n\t 0x10800: 0x21000080,\n\t 0x11800: 0x1000000,\n\t 0x12800: 0x1040000,\n\t 0x13800: 0x20040080,\n\t 0x14800: 0x20000000,\n\t 0x15800: 0x1040080,\n\t 0x16800: 0x80,\n\t 0x17800: 0x21040000,\n\t 0x18800: 0x40080,\n\t 0x19800: 0x21040080,\n\t 0x1a800: 0x0,\n\t 0x1b800: 0x21000000,\n\t 0x1c800: 0x1000080,\n\t 0x1d800: 0x40000,\n\t 0x1e800: 0x20040000,\n\t 0x1f800: 0x20000080\n\t },\n\t {\n\t 0x0: 0x10000008,\n\t 0x100: 0x2000,\n\t 0x200: 0x10200000,\n\t 0x300: 0x10202008,\n\t 0x400: 0x10002000,\n\t 0x500: 0x200000,\n\t 0x600: 0x200008,\n\t 0x700: 0x10000000,\n\t 0x800: 0x0,\n\t 0x900: 0x10002008,\n\t 0xa00: 0x202000,\n\t 0xb00: 0x8,\n\t 0xc00: 0x10200008,\n\t 0xd00: 0x202008,\n\t 0xe00: 0x2008,\n\t 0xf00: 0x10202000,\n\t 0x80: 0x10200000,\n\t 0x180: 0x10202008,\n\t 0x280: 0x8,\n\t 0x380: 0x200000,\n\t 0x480: 0x202008,\n\t 0x580: 0x10000008,\n\t 0x680: 0x10002000,\n\t 0x780: 0x2008,\n\t 0x880: 0x200008,\n\t 0x980: 0x2000,\n\t 0xa80: 0x10002008,\n\t 0xb80: 0x10200008,\n\t 0xc80: 0x0,\n\t 0xd80: 0x10202000,\n\t 0xe80: 0x202000,\n\t 0xf80: 0x10000000,\n\t 0x1000: 0x10002000,\n\t 0x1100: 0x10200008,\n\t 0x1200: 0x10202008,\n\t 0x1300: 0x2008,\n\t 0x1400: 0x200000,\n\t 0x1500: 0x10000000,\n\t 0x1600: 0x10000008,\n\t 0x1700: 0x202000,\n\t 0x1800: 0x202008,\n\t 0x1900: 0x0,\n\t 0x1a00: 0x8,\n\t 0x1b00: 0x10200000,\n\t 0x1c00: 0x2000,\n\t 0x1d00: 0x10002008,\n\t 0x1e00: 0x10202000,\n\t 0x1f00: 0x200008,\n\t 0x1080: 0x8,\n\t 0x1180: 0x202000,\n\t 0x1280: 0x200000,\n\t 0x1380: 0x10000008,\n\t 0x1480: 0x10002000,\n\t 0x1580: 0x2008,\n\t 0x1680: 0x10202008,\n\t 0x1780: 0x10200000,\n\t 0x1880: 0x10202000,\n\t 0x1980: 0x10200008,\n\t 0x1a80: 0x2000,\n\t 0x1b80: 0x202008,\n\t 0x1c80: 0x200008,\n\t 0x1d80: 0x0,\n\t 0x1e80: 0x10000000,\n\t 0x1f80: 0x10002008\n\t },\n\t {\n\t 0x0: 0x100000,\n\t 0x10: 0x2000401,\n\t 0x20: 0x400,\n\t 0x30: 0x100401,\n\t 0x40: 0x2100401,\n\t 0x50: 0x0,\n\t 0x60: 0x1,\n\t 0x70: 0x2100001,\n\t 0x80: 0x2000400,\n\t 0x90: 0x100001,\n\t 0xa0: 0x2000001,\n\t 0xb0: 0x2100400,\n\t 0xc0: 0x2100000,\n\t 0xd0: 0x401,\n\t 0xe0: 0x100400,\n\t 0xf0: 0x2000000,\n\t 0x8: 0x2100001,\n\t 0x18: 0x0,\n\t 0x28: 0x2000401,\n\t 0x38: 0x2100400,\n\t 0x48: 0x100000,\n\t 0x58: 0x2000001,\n\t 0x68: 0x2000000,\n\t 0x78: 0x401,\n\t 0x88: 0x100401,\n\t 0x98: 0x2000400,\n\t 0xa8: 0x2100000,\n\t 0xb8: 0x100001,\n\t 0xc8: 0x400,\n\t 0xd8: 0x2100401,\n\t 0xe8: 0x1,\n\t 0xf8: 0x100400,\n\t 0x100: 0x2000000,\n\t 0x110: 0x100000,\n\t 0x120: 0x2000401,\n\t 0x130: 0x2100001,\n\t 0x140: 0x100001,\n\t 0x150: 0x2000400,\n\t 0x160: 0x2100400,\n\t 0x170: 0x100401,\n\t 0x180: 0x401,\n\t 0x190: 0x2100401,\n\t 0x1a0: 0x100400,\n\t 0x1b0: 0x1,\n\t 0x1c0: 0x0,\n\t 0x1d0: 0x2100000,\n\t 0x1e0: 0x2000001,\n\t 0x1f0: 0x400,\n\t 0x108: 0x100400,\n\t 0x118: 0x2000401,\n\t 0x128: 0x2100001,\n\t 0x138: 0x1,\n\t 0x148: 0x2000000,\n\t 0x158: 0x100000,\n\t 0x168: 0x401,\n\t 0x178: 0x2100400,\n\t 0x188: 0x2000001,\n\t 0x198: 0x2100000,\n\t 0x1a8: 0x0,\n\t 0x1b8: 0x2100401,\n\t 0x1c8: 0x100401,\n\t 0x1d8: 0x400,\n\t 0x1e8: 0x2000400,\n\t 0x1f8: 0x100001\n\t },\n\t {\n\t 0x0: 0x8000820,\n\t 0x1: 0x20000,\n\t 0x2: 0x8000000,\n\t 0x3: 0x20,\n\t 0x4: 0x20020,\n\t 0x5: 0x8020820,\n\t 0x6: 0x8020800,\n\t 0x7: 0x800,\n\t 0x8: 0x8020000,\n\t 0x9: 0x8000800,\n\t 0xa: 0x20800,\n\t 0xb: 0x8020020,\n\t 0xc: 0x820,\n\t 0xd: 0x0,\n\t 0xe: 0x8000020,\n\t 0xf: 0x20820,\n\t 0x80000000: 0x800,\n\t 0x80000001: 0x8020820,\n\t 0x80000002: 0x8000820,\n\t 0x80000003: 0x8000000,\n\t 0x80000004: 0x8020000,\n\t 0x80000005: 0x20800,\n\t 0x80000006: 0x20820,\n\t 0x80000007: 0x20,\n\t 0x80000008: 0x8000020,\n\t 0x80000009: 0x820,\n\t 0x8000000a: 0x20020,\n\t 0x8000000b: 0x8020800,\n\t 0x8000000c: 0x0,\n\t 0x8000000d: 0x8020020,\n\t 0x8000000e: 0x8000800,\n\t 0x8000000f: 0x20000,\n\t 0x10: 0x20820,\n\t 0x11: 0x8020800,\n\t 0x12: 0x20,\n\t 0x13: 0x800,\n\t 0x14: 0x8000800,\n\t 0x15: 0x8000020,\n\t 0x16: 0x8020020,\n\t 0x17: 0x20000,\n\t 0x18: 0x0,\n\t 0x19: 0x20020,\n\t 0x1a: 0x8020000,\n\t 0x1b: 0x8000820,\n\t 0x1c: 0x8020820,\n\t 0x1d: 0x20800,\n\t 0x1e: 0x820,\n\t 0x1f: 0x8000000,\n\t 0x80000010: 0x20000,\n\t 0x80000011: 0x800,\n\t 0x80000012: 0x8020020,\n\t 0x80000013: 0x20820,\n\t 0x80000014: 0x20,\n\t 0x80000015: 0x8020000,\n\t 0x80000016: 0x8000000,\n\t 0x80000017: 0x8000820,\n\t 0x80000018: 0x8020820,\n\t 0x80000019: 0x8000020,\n\t 0x8000001a: 0x8000800,\n\t 0x8000001b: 0x0,\n\t 0x8000001c: 0x20800,\n\t 0x8000001d: 0x820,\n\t 0x8000001e: 0x20020,\n\t 0x8000001f: 0x8020800\n\t }\n\t ];\n\n\t // Masks that select the SBOX input\n\t var SBOX_MASK = [\n\t 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000,\n\t 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f\n\t ];\n\n\t /**\n\t * DES block cipher algorithm.\n\t */\n\t var DES = C_algo.DES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\n\t // Select 56 bits according to PC1\n\t var keyBits = [];\n\t for (var i = 0; i < 56; i++) {\n\t var keyBitPos = PC1[i] - 1;\n\t keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1;\n\t }\n\n\t // Assemble 16 subkeys\n\t var subKeys = this._subKeys = [];\n\t for (var nSubKey = 0; nSubKey < 16; nSubKey++) {\n\t // Create subkey\n\t var subKey = subKeys[nSubKey] = [];\n\n\t // Shortcut\n\t var bitShift = BIT_SHIFTS[nSubKey];\n\n\t // Select 48 bits according to PC2\n\t for (var i = 0; i < 24; i++) {\n\t // Select from the left 28 key bits\n\t subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6);\n\n\t // Select from the right 28 key bits\n\t subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6);\n\t }\n\n\t // Since each subkey is applied to an expanded 32-bit input,\n\t // the subkey can be broken into 8 values scaled to 32-bits,\n\t // which allows the key to be used without expansion\n\t subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31);\n\t for (var i = 1; i < 7; i++) {\n\t subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3);\n\t }\n\t subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27);\n\t }\n\n\t // Compute inverse subkeys\n\t var invSubKeys = this._invSubKeys = [];\n\t for (var i = 0; i < 16; i++) {\n\t invSubKeys[i] = subKeys[15 - i];\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._subKeys);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._invSubKeys);\n\t },\n\n\t _doCryptBlock: function (M, offset, subKeys) {\n\t // Get input\n\t this._lBlock = M[offset];\n\t this._rBlock = M[offset + 1];\n\n\t // Initial permutation\n\t exchangeLR.call(this, 4, 0x0f0f0f0f);\n\t exchangeLR.call(this, 16, 0x0000ffff);\n\t exchangeRL.call(this, 2, 0x33333333);\n\t exchangeRL.call(this, 8, 0x00ff00ff);\n\t exchangeLR.call(this, 1, 0x55555555);\n\n\t // Rounds\n\t for (var round = 0; round < 16; round++) {\n\t // Shortcuts\n\t var subKey = subKeys[round];\n\t var lBlock = this._lBlock;\n\t var rBlock = this._rBlock;\n\n\t // Feistel function\n\t var f = 0;\n\t for (var i = 0; i < 8; i++) {\n\t f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];\n\t }\n\t this._lBlock = rBlock;\n\t this._rBlock = lBlock ^ f;\n\t }\n\n\t // Undo swap from last round\n\t var t = this._lBlock;\n\t this._lBlock = this._rBlock;\n\t this._rBlock = t;\n\n\t // Final permutation\n\t exchangeLR.call(this, 1, 0x55555555);\n\t exchangeRL.call(this, 8, 0x00ff00ff);\n\t exchangeRL.call(this, 2, 0x33333333);\n\t exchangeLR.call(this, 16, 0x0000ffff);\n\t exchangeLR.call(this, 4, 0x0f0f0f0f);\n\n\t // Set output\n\t M[offset] = this._lBlock;\n\t M[offset + 1] = this._rBlock;\n\t },\n\n\t keySize: 64/32,\n\n\t ivSize: 64/32,\n\n\t blockSize: 64/32\n\t });\n\n\t // Swap bits across the left and right words\n\t function exchangeLR(offset, mask) {\n\t var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask;\n\t this._rBlock ^= t;\n\t this._lBlock ^= t << offset;\n\t }\n\n\t function exchangeRL(offset, mask) {\n\t var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask;\n\t this._lBlock ^= t;\n\t this._rBlock ^= t << offset;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.DES = BlockCipher._createHelper(DES);\n\n\t /**\n\t * Triple-DES block cipher algorithm.\n\t */\n\t var TripleDES = C_algo.TripleDES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\n\t // Create DES instances\n\t this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2)));\n\t this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4)));\n\t this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6)));\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._des1.encryptBlock(M, offset);\n\t this._des2.decryptBlock(M, offset);\n\t this._des3.encryptBlock(M, offset);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t this._des3.decryptBlock(M, offset);\n\t this._des2.encryptBlock(M, offset);\n\t this._des1.decryptBlock(M, offset);\n\t },\n\n\t keySize: 192/32,\n\n\t ivSize: 64/32,\n\n\t blockSize: 64/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.TripleDES = BlockCipher._createHelper(TripleDES);\n\t}());\n\n\n\treturn CryptoJS.TripleDES;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/tripledes.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/node_modules/crypto-js/x64-core.js": -/*!****************************************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/node_modules/crypto-js/x64-core.js ***! - \****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval(";(function (root, factory) {\n\tif (true) {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(__webpack_require__(/*! ./core */ \"./node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js\"));\n\t}\n\telse {}\n}(this, function (CryptoJS) {\n\n\t(function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var X32WordArray = C_lib.WordArray;\n\n\t /**\n\t * x64 namespace.\n\t */\n\t var C_x64 = C.x64 = {};\n\n\t /**\n\t * A 64-bit word.\n\t */\n\t var X64Word = C_x64.Word = Base.extend({\n\t /**\n\t * Initializes a newly created 64-bit word.\n\t *\n\t * @param {number} high The high 32 bits.\n\t * @param {number} low The low 32 bits.\n\t *\n\t * @example\n\t *\n\t * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);\n\t */\n\t init: function (high, low) {\n\t this.high = high;\n\t this.low = low;\n\t }\n\n\t /**\n\t * Bitwise NOTs this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after negating.\n\t *\n\t * @example\n\t *\n\t * var negated = x64Word.not();\n\t */\n\t // not: function () {\n\t // var high = ~this.high;\n\t // var low = ~this.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise ANDs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to AND with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after ANDing.\n\t *\n\t * @example\n\t *\n\t * var anded = x64Word.and(anotherX64Word);\n\t */\n\t // and: function (word) {\n\t // var high = this.high & word.high;\n\t // var low = this.low & word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise ORs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to OR with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after ORing.\n\t *\n\t * @example\n\t *\n\t * var ored = x64Word.or(anotherX64Word);\n\t */\n\t // or: function (word) {\n\t // var high = this.high | word.high;\n\t // var low = this.low | word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise XORs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to XOR with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after XORing.\n\t *\n\t * @example\n\t *\n\t * var xored = x64Word.xor(anotherX64Word);\n\t */\n\t // xor: function (word) {\n\t // var high = this.high ^ word.high;\n\t // var low = this.low ^ word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Shifts this word n bits to the left.\n\t *\n\t * @param {number} n The number of bits to shift.\n\t *\n\t * @return {X64Word} A new x64-Word object after shifting.\n\t *\n\t * @example\n\t *\n\t * var shifted = x64Word.shiftL(25);\n\t */\n\t // shiftL: function (n) {\n\t // if (n < 32) {\n\t // var high = (this.high << n) | (this.low >>> (32 - n));\n\t // var low = this.low << n;\n\t // } else {\n\t // var high = this.low << (n - 32);\n\t // var low = 0;\n\t // }\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Shifts this word n bits to the right.\n\t *\n\t * @param {number} n The number of bits to shift.\n\t *\n\t * @return {X64Word} A new x64-Word object after shifting.\n\t *\n\t * @example\n\t *\n\t * var shifted = x64Word.shiftR(7);\n\t */\n\t // shiftR: function (n) {\n\t // if (n < 32) {\n\t // var low = (this.low >>> n) | (this.high << (32 - n));\n\t // var high = this.high >>> n;\n\t // } else {\n\t // var low = this.high >>> (n - 32);\n\t // var high = 0;\n\t // }\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Rotates this word n bits to the left.\n\t *\n\t * @param {number} n The number of bits to rotate.\n\t *\n\t * @return {X64Word} A new x64-Word object after rotating.\n\t *\n\t * @example\n\t *\n\t * var rotated = x64Word.rotL(25);\n\t */\n\t // rotL: function (n) {\n\t // return this.shiftL(n).or(this.shiftR(64 - n));\n\t // },\n\n\t /**\n\t * Rotates this word n bits to the right.\n\t *\n\t * @param {number} n The number of bits to rotate.\n\t *\n\t * @return {X64Word} A new x64-Word object after rotating.\n\t *\n\t * @example\n\t *\n\t * var rotated = x64Word.rotR(7);\n\t */\n\t // rotR: function (n) {\n\t // return this.shiftR(n).or(this.shiftL(64 - n));\n\t // },\n\n\t /**\n\t * Adds this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to add with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after adding.\n\t *\n\t * @example\n\t *\n\t * var added = x64Word.add(anotherX64Word);\n\t */\n\t // add: function (word) {\n\t // var low = (this.low + word.low) | 0;\n\t // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;\n\t // var high = (this.high + word.high + carry) | 0;\n\n\t // return X64Word.create(high, low);\n\t // }\n\t });\n\n\t /**\n\t * An array of 64-bit words.\n\t *\n\t * @property {Array} words The array of CryptoJS.x64.Word objects.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var X64WordArray = C_x64.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create();\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create([\n\t * CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n\t * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n\t * ]);\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create([\n\t * CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n\t * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n\t * ], 10);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 8;\n\t }\n\t },\n\n\t /**\n\t * Converts this 64-bit word array to a 32-bit word array.\n\t *\n\t * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.\n\t *\n\t * @example\n\t *\n\t * var x32WordArray = x64WordArray.toX32();\n\t */\n\t toX32: function () {\n\t // Shortcuts\n\t var x64Words = this.words;\n\t var x64WordsLength = x64Words.length;\n\n\t // Convert\n\t var x32Words = [];\n\t for (var i = 0; i < x64WordsLength; i++) {\n\t var x64Word = x64Words[i];\n\t x32Words.push(x64Word.high);\n\t x32Words.push(x64Word.low);\n\t }\n\n\t return X32WordArray.create(x32Words, this.sigBytes);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {X64WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = x64WordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\n\t // Clone \"words\" array\n\t var words = clone.words = this.words.slice(0);\n\n\t // Clone each X64Word object\n\t var wordsLength = words.length;\n\t for (var i = 0; i < wordsLength; i++) {\n\t words[i] = words[i].clone();\n\t }\n\n\t return clone;\n\t }\n\t });\n\t}());\n\n\n\treturn CryptoJS;\n\n}));\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/node_modules/crypto-js/x64-core.js?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/package.json": -/*!******************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/package.json ***! - \******************************************************/ -/*! exports provided: _from, _id, _inBundle, _integrity, _location, _phantomChildren, _requested, _requiredBy, _resolved, _shasum, _spec, _where, author, bugs, bundleDependencies, dependencies, deprecated, description, devDependencies, engines, homepage, keywords, license, main, name, repository, scripts, version, default */ -/***/ (function(module) { - -eval("module.exports = {\"_from\":\"aws-iot-device-sdk@^2.2.1\",\"_id\":\"aws-iot-device-sdk@2.2.3\",\"_inBundle\":false,\"_integrity\":\"sha512-XhKPEZjwtSNJ0oV9l1gJ0YBlcg/M7QzeiUSbW2lLBa3Nuh84OOkQzcUFzNrSWro6sOdrLmLPqWKi7SsERUAbQg==\",\"_location\":\"/aws-iot-device-sdk\",\"_phantomChildren\":{},\"_requested\":{\"type\":\"range\",\"registry\":true,\"raw\":\"aws-iot-device-sdk@^2.2.1\",\"name\":\"aws-iot-device-sdk\",\"escapedName\":\"aws-iot-device-sdk\",\"rawSpec\":\"^2.2.1\",\"saveSpec\":null,\"fetchSpec\":\"^2.2.1\"},\"_requiredBy\":[\"/\"],\"_resolved\":\"https://registry.npmjs.org/aws-iot-device-sdk/-/aws-iot-device-sdk-2.2.3.tgz\",\"_shasum\":\"8041b7acdcbfa1b4e425cb66ac1228aac4277926\",\"_spec\":\"aws-iot-device-sdk@^2.2.1\",\"_where\":\"/opt/lampp/htdocs/Channelize/channelize-websdk\",\"author\":{\"name\":\"Amazon Web Services\",\"url\":\"http://aws.amazon.com\"},\"bugs\":{\"url\":\"http://github.com/aws/aws-iot-device-sdk-js/issues\"},\"bundleDependencies\":false,\"dependencies\":{\"crypto-js\":\"3.1.6\",\"minimist\":\"1.2.0\",\"mqtt\":\"2.18.8\",\"websocket-stream\":\"^5.0.1\"},\"deprecated\":false,\"description\":\"AWS IoT Node.js SDK for Embedded Devices\",\"devDependencies\":{\"gulp\":\"^3.9.0\",\"gulp-beautify\":\"^2.0.0\",\"gulp-concat\":\"^2.6.0\",\"gulp-coverage\":\"^0.3.38\",\"gulp-jscs\":\"^4.0.0\",\"gulp-jshint\":\"^2.0.0\",\"gulp-mocha\":\"^3.0.1\",\"jshint\":\"^2.9.1\",\"jshint-stylish\":\"^2.2.1\",\"rewire\":\"^2.5.1\",\"sinon\":\"^1.17.3\"},\"engines\":{\"node\":\">=4.0.0\"},\"homepage\":\"https://github.com/aws/aws-iot-device-sdk-js\",\"keywords\":[\"api\",\"amazon\",\"aws\",\"iot\",\"mqtt\"],\"license\":\"Apache-2.0\",\"main\":\"index.js\",\"name\":\"aws-iot-device-sdk\",\"repository\":{\"type\":\"git\",\"url\":\"git://github.com/aws/aws-iot-device-sdk-js.git\"},\"scripts\":{\"beautify\":\"node ./node_modules/gulp/bin/gulp.js beautify\",\"browserize\":\"./scripts/browserize.sh\",\"test\":\"node ./node_modules/gulp/bin/gulp.js test --verbose\"},\"version\":\"2.2.3\"};\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/package.json?"); - -/***/ }), - -/***/ "./node_modules/aws-iot-device-sdk/thing/index.js": -/*!********************************************************!*\ - !*** ./node_modules/aws-iot-device-sdk/thing/index.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("/*\n * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n\n//node.js deps\nvar events = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\");\nvar inherits = __webpack_require__(/*! util */ \"./node_modules/util/util.js\").inherits;\n\n//npm deps\n\n//app deps\nvar deviceModule = __webpack_require__(/*! ../device */ \"./node_modules/aws-iot-device-sdk/device/index.js\");\nvar isUndefined = __webpack_require__(/*! ../common/lib/is-undefined */ \"./node_modules/aws-iot-device-sdk/common/lib/is-undefined.js\");\n\n//\n// private functions\n//\nfunction buildThingShadowTopic(thingName, operation, type) {\n if (!isUndefined(type)) {\n return '$aws/things/' + thingName + '/shadow/' + operation + '/' + type;\n }\n return '$aws/things/' + thingName + '/shadow/' + operation;\n}\n\nfunction isReservedTopic(topic) {\n if (topic.substring(0, 12) === '$aws/things/') {\n return true;\n }\n return false;\n}\n\nfunction isThingShadowTopic(topicTokens, direction) {\n var rc = false;\n if (topicTokens[0] === '$aws') {\n //\n // Thing shadow topics have the form:\n //\n // $aws/things/{thingName}/shadow/{Operation}/{Status}\n //\n // Where {Operation} === update|get|delete\n // And {Status} === accepted|rejected|delta\n //\n if ((topicTokens[1] === 'things') &&\n (topicTokens[3] === 'shadow') &&\n ((topicTokens[4] === 'update') ||\n (topicTokens[4] === 'get') ||\n (topicTokens[4] === 'delete'))) {\n //\n // Looks good so far; now check the direction and see if\n // still makes sense.\n //\n if (direction === 'subscribe') {\n if (((topicTokens[5] === 'accepted') ||\n (topicTokens[5] === 'rejected') ||\n (topicTokens[5] === 'delta')) &&\n (topicTokens.length === 6)) {\n rc = true;\n }\n } else // direction === 'publish'\n {\n if (topicTokens.length === 5) {\n rc = true;\n }\n }\n }\n }\n return rc;\n}\n\n//begin module\n\nfunction ThingShadowsClient(deviceOptions, thingShadowOptions) {\n //\n // Force instantiation using the 'new' operator; this will cause inherited\n // constructors (e.g. the 'events' class) to be called.\n //\n if (!(this instanceof ThingShadowsClient)) {\n return new ThingShadowsClient(deviceOptions, thingShadowOptions);\n }\n\n //\n // A copy of 'this' for use inside of closures\n //\n var that = this;\n\n //\n // Track Thing Shadow registrations in here.\n //\n var thingShadows = [{}];\n\n //\n // Implements for every operation, used to construct clientToken.\n //\n var operationCount = 0;\n\n //\n // Operation timeout (milliseconds). If no accepted or rejected response\n // to a thing operation is received within this time, subscriptions\n // to the accepted and rejected sub-topics for a thing are cancelled.\n //\n var operationTimeout = 10000; /* milliseconds */\n\n //\n // Variable used by the testing API setConnectionStatus() to simulate\n // network connectivity failures.\n //\n var connected = true;\n\n //\n // Instantiate the device.\n //\n var device = deviceModule.DeviceClient(deviceOptions);\n\n if (!isUndefined(thingShadowOptions)) {\n if (!isUndefined(thingShadowOptions.operationTimeout)) {\n operationTimeout = thingShadowOptions.operationTimeout;\n }\n }\n\n //\n // Private function to subscribe and unsubscribe from topics.\n //\n this._handleSubscriptions = function(thingName, topicSpecs, devFunction, callback) {\n var topics = [];\n\n //\n // Build an array of topic names.\n //\n for (var i = 0, topicsLen = topicSpecs.length; i < topicsLen; i++) {\n for (var j = 0, opsLen = topicSpecs[i].operations.length; j < opsLen; j++) {\n for (var k = 0, statLen = topicSpecs[i].statii.length; k < statLen; k++) {\n topics.push(buildThingShadowTopic(thingName,\n topicSpecs[i].operations[j],\n topicSpecs[i].statii[k]));\n }\n }\n }\n\n if (thingShadows[thingName].debug === true) {\n console.log(devFunction + ' on ' + topics);\n }\n //\n // Subscribe/unsubscribe from the topics and perform callback when complete.\n //\n var args = [];\n args.push(topics);\n if (devFunction === 'subscribe') {\n // QoS only applicable for subscribe\n args.push({\n qos: thingShadows[thingName].qos\n });\n // add our callback to check the SUBACK response for granted subscriptions\n args.push(function(err, granted) {\n if (!isUndefined(callback)) {\n if (err) {\n callback(err);\n return;\n }\n //\n // Check to see if we got all topic subscriptions granted.\n //\n var failedTopics = [];\n for (var k = 0, grantedLen = granted.length; k < grantedLen; k++) {\n //\n // 128 is 0x80 - Failure from the MQTT lib.\n //\n if (granted[k].qos === 128) {\n failedTopics.push(granted[k]);\n }\n }\n\n if (failedTopics.length > 0) {\n callback('Not all subscriptions were granted', failedTopics);\n return;\n }\n\n // all subscriptions were granted\n callback();\n }\n });\n } else {\n if (!isUndefined(callback)) {\n args.push(callback);\n }\n }\n\n device[devFunction].apply(device, args);\n };\n\n //\n // Private function to handle messages and dispatch them accordingly.\n //\n this._handleMessages = function(thingName, operation, operationStatus, payload) {\n var stateObject = {};\n try {\n stateObject = JSON.parse(payload.toString());\n } catch (err) {\n if (deviceOptions.debug === true) {\n console.error('failed parsing JSON \\'' + payload.toString() + '\\', ' + err);\n }\n return;\n }\n var clientToken = stateObject.clientToken;\n var version = stateObject.version;\n //\n // Remove the properties 'clientToken' and 'version' from the stateObject;\n // these properties are internal to this class.\n //\n delete stateObject.clientToken;\n //Expose shadow version from raw object\n //delete stateObject.version;\n //\n // Update the thing version on every accepted or delta message which \n // contains it.\n //\n if ((!isUndefined(version)) && (operationStatus !== 'rejected')) {\n //\n // The thing shadow version is incremented by AWS IoT and should always\n // increase. Do not update our local version if the received version is\n // less than our version. \n //\n if ((isUndefined(thingShadows[thingName].version)) ||\n (version >= thingShadows[thingName].version)) {\n thingShadows[thingName].version = version;\n } else {\n //\n // We've received a message from AWS IoT with a version number lower than\n // we would expect. There are two things that can cause this:\n //\n // 1) The shadow has been deleted (version # reverts to 1 in this case.)\n // 2) The message has arrived out-of-order.\n //\n // For case 1) we can look at the operation to determine that this\n // is the case and notify the client if appropriate. For case 2, \n // we will not process it unless the client has specifically expressed\n // an interested in these messages by setting 'discardStale' to false.\n //\n if (operation !== 'delete' && thingShadows[thingName].discardStale === true) {\n if (deviceOptions.debug === true) {\n console.warn('out-of-date version \\'' + version + '\\' on \\'' +\n thingName + '\\' (local version \\'' +\n thingShadows[thingName].version + '\\')');\n }\n return;\n }\n }\n }\n //\n // If this is a 'delta' message, emit an event for it and return.\n //\n if (operationStatus === 'delta') {\n this.emit('delta', thingName, stateObject);\n return;\n }\n //\n // only accepted/rejected messages past this point\n // ===============================================\n // If this is an unkown clientToken (e.g., it doesn't have a corresponding\n // client token property, the shadow has been modified by another client.\n // If it's an update/accepted or delete/accepted, update the shadow and\n // notify the client.\n //\n if (isUndefined(thingShadows[thingName].clientToken) ||\n thingShadows[thingName].clientToken !== clientToken) {\n if ((operationStatus === 'accepted') && (operation !== 'get')) {\n //\n // This is a foreign update or delete accepted, update our\n // shadow with the latest state and send a notification.\n //\n this.emit('foreignStateChange', thingName, operation, stateObject);\n }\n return;\n }\n //\n // A response has been received, so cancel any outstanding timeout on this\n // thingName/clientToken, delete the timeout handle, and unsubscribe from\n // all sub-topics.\n //\n clearTimeout(\n thingShadows[thingName].timeout);\n\n delete thingShadows[thingName].timeout;\n //\n // Delete the operation's client token.\n //\n delete thingShadows[thingName].clientToken;\n //\n // Mark this operation as complete.\n //\n thingShadows[thingName].pending = false;\n\n //\n // Unsubscribe from the 'accepted' and 'rejected' sub-topics unless we are\n // persistently subscribed to this thing shadow.\n //\n if (thingShadows[thingName].persistentSubscribe === false) {\n this._handleSubscriptions(thingName, [{\n operations: [operation],\n statii: ['accepted', 'rejected']\n }], 'unsubscribe');\n }\n\n //\n // Emit an event detailing the operation status; the clientToken is included\n // as an argument so that the application can correlate status events to\n // the operations they are associated with.\n //\n this.emit('status', thingName, operationStatus, clientToken, stateObject);\n };\n\n device.on('connect', function() {\n that.emit('connect');\n });\n device.on('close', function() {\n that.emit('close');\n });\n device.on('reconnect', function() {\n that.emit('reconnect');\n });\n device.on('offline', function() {\n that.emit('offline');\n });\n device.on('error', function(error) {\n that.emit('error', error);\n });\n device.on('packetsend', function(packet) {\n that.emit('packetsend', packet);\n });\n device.on('packetreceive', function(packet) {\n that.emit('packetreceive', packet);\n });\n device.on('message', function(topic, payload) {\n\n if (connected === true) {\n //\n // Parse the topic to determine what to do with it.\n //\n var topicTokens = topic.split('/');\n //\n // First, do a rough check to see if we should continue or not.\n //\n if (isThingShadowTopic(topicTokens, 'subscribe')) {\n //\n // This looks like a valid Thing topic, so see if the Thing is in the\n // registered Thing table.\n //\n if (thingShadows.hasOwnProperty(topicTokens[2])) {\n //\n // This is a registered Thing, so perform message handling on it.\n //\n that._handleMessages(topicTokens[2], // thingName\n topicTokens[4], // operation\n topicTokens[5], // status\n payload);\n }\n //\n // Any messages received for unregistered Things fall here and are ignored.\n //\n } else {\n //\n // This isn't a Thing topic, so pass it along to the instance if they have\n // indicated they want to handle it.\n //\n that.emit('message', topic, payload);\n }\n }\n });\n\n this._thingOperation = function(thingName, operation, stateObject) {\n var rc = null;\n\n if (thingShadows.hasOwnProperty(thingName)) {\n //\n // Don't allow a new operation if an existing one is still in process.\n //\n if (thingShadows[thingName].pending === false) {\n //\n // Starting a new operation\n //\n thingShadows[thingName].pending = true;\n //\n // If not provided, construct a clientToken from the clientId and a rolling \n // operation count. The clientToken is transmitted in any published stateObject \n // and is returned to the caller for each operation. Applications can use\n // clientToken values to correlate received responses or timeouts with\n // the original operations.\n //\n var clientToken;\n\n if (isUndefined(stateObject.clientToken)) {\n //\n // AWS IoT restricts client tokens to 64 bytes, so use only the last 48\n // characters of the client ID when constructing a client token.\n //\n var clientIdLength = deviceOptions.clientId.length;\n\n if (clientIdLength > 48) {\n clientToken = deviceOptions.clientId.substr(clientIdLength - 48) + '-' + operationCount++;\n } else {\n clientToken = deviceOptions.clientId + '-' + operationCount++;\n }\n } else {\n clientToken = stateObject.clientToken;\n }\n //\n // Remember the client token for this operation; it will be\n // deleted when the operation completes or times out.\n //\n thingShadows[thingName].clientToken = clientToken;\n\n var publishTopic = buildThingShadowTopic(thingName,\n operation);\n //\n // Subscribe to the 'accepted' and 'rejected' sub-topics for this get\n // operation and set a timeout beyond which they will be unsubscribed if \n // no messages have been received for either of them.\n //\n thingShadows[thingName].timeout = setTimeout(\n function(thingName, clientToken) {\n //\n // Timed-out. Unsubscribe from the 'accepted' and 'rejected' sub-topics unless\n // we are persistently subscribing to this thing shadow.\n //\n if (thingShadows[thingName].persistentSubscribe === false) {\n that._handleSubscriptions(thingName, [{\n operations: [operation],\n statii: ['accepted', 'rejected']\n }], 'unsubscribe');\n }\n //\n // Mark this operation as complete.\n //\n thingShadows[thingName].pending = false;\n\n //\n // Delete the timeout handle and client token for this thingName.\n //\n delete thingShadows[thingName].timeout;\n delete thingShadows[thingName].clientToken;\n\n //\n // Emit an event for the timeout; the clientToken is included as an argument\n // so that the application can correlate timeout events to the operations\n // they are associated with.\n //\n that.emit('timeout', thingName, clientToken);\n }, operationTimeout,\n thingName, clientToken);\n //\n // Subscribe to the 'accepted' and 'rejected' sub-topics unless we are\n // persistently subscribing, in which case we can publish to the topic immediately\n // since we are already subscribed to all applicable sub-topics.\n //\n if (thingShadows[thingName].persistentSubscribe === false) {\n this._handleSubscriptions(thingName, [{\n operations: [operation],\n statii: ['accepted', 'rejected'],\n }], 'subscribe',\n function(err, failedTopics) {\n if (!isUndefined(err) || !isUndefined(failedTopics)) {\n console.warn('failed subscription to accepted/rejected topics');\n return;\n }\n\n //\n // If 'stateObject' is defined, publish it to the publish topic for this\n // thingName+operation.\n //\n if (!isUndefined(stateObject)) {\n //\n // Add the version # (if known and versioning is enabled) and \n // 'clientToken' properties to the stateObject.\n //\n if (!isUndefined(thingShadows[thingName].version) &&\n thingShadows[thingName].enableVersioning) {\n stateObject.version = thingShadows[thingName].version;\n }\n stateObject.clientToken = clientToken;\n\n device.publish(publishTopic,\n JSON.stringify(stateObject), {\n qos: thingShadows[thingName].qos\n });\n if (!(isUndefined(thingShadows[thingName])) &&\n thingShadows[thingName].debug === true) {\n console.log('publishing \\'' + JSON.stringify(stateObject) +\n ' on \\'' + publishTopic + '\\'');\n }\n }\n });\n } else {\n //\n // Add the version # (if known and versioning is enabled) and \n // 'clientToken' properties to the stateObject.\n //\n if (!isUndefined(thingShadows[thingName].version) &&\n thingShadows[thingName].enableVersioning) {\n stateObject.version = thingShadows[thingName].version;\n }\n stateObject.clientToken = clientToken;\n\n device.publish(publishTopic,\n JSON.stringify(stateObject), {\n qos: thingShadows[thingName].qos\n });\n if (thingShadows[thingName].debug === true) {\n console.log('publishing \\'' + JSON.stringify(stateObject) +\n ' on \\'' + publishTopic + '\\'');\n }\n }\n rc = clientToken; // return the clientToken to the caller\n } else {\n if (deviceOptions.debug === true) {\n console.error(operation + ' still in progress on thing: ', thingName);\n }\n }\n } else {\n if (deviceOptions.debug === true) {\n console.error('attempting to ' + operation + ' unknown thing: ', thingName);\n }\n }\n return rc;\n };\n\n this.register = function(thingName, options, callback) {\n\n if (!thingShadows.hasOwnProperty(thingName)) {\n //\n // Initialize the registration entry for this thing; because the version # is \n // not yet known, do not add the property for it yet. The version number \n // property will be added after the first accepted update from AWS IoT.\n //\n var ignoreDeltas = false;\n var topicSpecs = [];\n thingShadows[thingName] = {\n persistentSubscribe: true,\n debug: false,\n discardStale: true,\n enableVersioning: true,\n qos: 0,\n pending: true\n };\n if (typeof options === 'function') {\n callback = options;\n options = null;\n }\n if (!isUndefined(options)) {\n if (!isUndefined(options.ignoreDeltas)) {\n ignoreDeltas = options.ignoreDeltas;\n }\n if (!isUndefined(options.persistentSubscribe)) {\n thingShadows[thingName].persistentSubscribe = options.persistentSubscribe;\n }\n if (!isUndefined(options.debug)) {\n thingShadows[thingName].debug = options.debug;\n }\n if (!isUndefined(options.discardStale)) {\n thingShadows[thingName].discardStale = options.discardStale;\n }\n if (!isUndefined(options.enableVersioning)) {\n thingShadows[thingName].enableVersioning = options.enableVersioning;\n }\n if (!isUndefined(options.qos)) {\n thingShadows[thingName].qos = options.qos;\n }\n }\n //\n // Always listen for deltas unless requested otherwise.\n //\n if (ignoreDeltas === false) {\n topicSpecs.push({\n operations: ['update'],\n statii: ['delta']\n });\n }\n //\n // If we are persistently subscribing, we subscribe to everything we could ever\n // possibly be interested in. This will provide us the ability to publish\n // without waiting at the cost of potentially increased irrelevant traffic\n // which the application will need to filter out.\n //\n if (thingShadows[thingName].persistentSubscribe === true) {\n topicSpecs.push({\n operations: ['update', 'get', 'delete'],\n statii: ['accepted', 'rejected']\n });\n }\n\n if (topicSpecs.length > 0) {\n this._handleSubscriptions(thingName, topicSpecs, 'subscribe', function(err, failedTopics) {\n if (isUndefined(err) && isUndefined(failedTopics)) {\n thingShadows[thingName].pending = false;\n }\n if (!isUndefined(callback)) {\n callback(err, failedTopics);\n }\n });\n } else {\n thingShadows[thingName].pending = false;\n if (!isUndefined(callback)) {\n callback();\n }\n }\n\n } else {\n if (deviceOptions.debug === true) {\n console.error('thing already registered: ', thingName);\n }\n }\n };\n\n this.unregister = function(thingName) {\n if (thingShadows.hasOwnProperty(thingName)) {\n var topicSpecs = [];\n\n //\n // If an operation is outstanding, it will have a timeout set; when it\n // expires any accept/reject sub-topic subscriptions for the thing will be \n // deleted. If any messages arrive after the thing has been deleted, they\n // will simply be ignored as it no longer exists in the thing registrations.\n // The only sub-topic we need to unsubscribe from is the delta sub-topic,\n // which is always active.\n //\n topicSpecs.push({\n operations: ['update'],\n statii: ['delta']\n });\n //\n // If we are persistently subscribing, we subscribe to everything we could ever\n // possibly be interested in; this means that when it's time to unregister\n // interest in a thing, we need to unsubscribe from all of these topics.\n //\n if (thingShadows[thingName].persistentSubscribe === true) {\n topicSpecs.push({\n operations: ['update', 'get', 'delete'],\n statii: ['accepted', 'rejected']\n });\n }\n\n this._handleSubscriptions(thingName, topicSpecs, 'unsubscribe');\n\n //\n // Delete any pending timeout\n //\n if (!isUndefined(thingShadows[thingName].timeout)) {\n clearTimeout(thingShadows[thingName].timeout);\n }\n //\n // Delete the thing from the Thing registrations.\n //\n delete thingShadows[thingName];\n } else {\n if (deviceOptions.debug === true) {\n console.error('attempting to unregister unknown thing: ', thingName);\n }\n }\n };\n\n //\n // Perform an update operation on the given thing shadow.\n //\n this.update = function(thingName, stateObject) {\n var rc = null;\n //\n // Verify that the message does not contain a property named 'version',\n // as these property is reserved for use within this class.\n //\n if (isUndefined(stateObject.version)) {\n rc = that._thingOperation(thingName, 'update', stateObject);\n } else {\n console.error('message can\\'t contain \\'version\\' property');\n }\n return rc;\n };\n\n //\n // Perform a get operation on the given thing shadow; allow the user\n // to specify their own client token if they don't want to use the\n // default.\n //\n this.get = function(thingName, clientToken) {\n var stateObject = {};\n if (!isUndefined(clientToken)) {\n stateObject.clientToken = clientToken;\n }\n return that._thingOperation(thingName, 'get', stateObject);\n };\n\n //\n // Perform a delete operation on the given thing shadow.\n //\n this.delete = function(thingName, clientToken) {\n var stateObject = {};\n if (!isUndefined(clientToken)) {\n stateObject.clientToken = clientToken;\n }\n return that._thingOperation(thingName, 'delete', stateObject);\n };\n //\n // Publish on non-thing topics.\n //\n this.publish = function(topic, message, options, callback) {\n if (!isReservedTopic(topic)) {\n device.publish(topic, message, options, callback);\n } else {\n throw ('cannot publish to reserved topic \\'' + topic + '\\'');\n }\n };\n\n //\n // Subscribe to non-thing topics.\n //\n this.subscribe = function(topics, options, callback) {\n var topicsArray = [];\n if (typeof topics === 'string') {\n topicsArray.push(topics);\n } else if (typeof topics === 'object' && topics.length) {\n topicsArray = topics;\n }\n for (var i = 0; i < topicsArray.length; i++) {\n if (isReservedTopic(topicsArray[i])) {\n throw ('cannot subscribe to topic array since one of them is a reserved topic \\'' + topicsArray[i] + '\\'');\n }\n }\n device.subscribe(topicsArray, options, callback);\n };\n //\n // Unsubscribe from non-thing topics.\n //\n this.unsubscribe = function(topics, callback) {\n var topicsArray = [];\n if (typeof topics === 'string') {\n topicsArray.push(topics);\n } else if (typeof topics === 'object' && topics.length) {\n topicsArray = topics;\n }\n for (var i = 0; i < topicsArray.length; i++) {\n if (isReservedTopic(topicsArray[i])) {\n throw ('cannot unsubscribe from topic array since one of them is a reserved topic \\'' + topicsArray[i] + '\\'');\n }\n }\n device.unsubscribe(topicsArray, callback);\n };\n //\n // Close the device connection; this will be passed through to\n // the device class.\n //\n this.end = function(force, callback) {\n device.end(force, callback);\n };\n //\n // Call this function to update the credentials used when\n // connecting via WebSocket/SigV4; this will be passed through\n // to the device class.\n //\n this.updateWebSocketCredentials = function(accessKeyId, secretKey, sessionToken, expiration) {\n device.updateWebSocketCredentials(accessKeyId, secretKey, sessionToken, expiration);\n };\n //\n // Call this function to update the custom auth headers\n // This will be passed through to the device class\n //\n this.updateCustomAuthHeaders = function(newHeaders) {\n device.updateCustomAuthHeaders(newHeaders);\n };\n\n //\n // This is an unpublished API used for testing.\n //\n this.setConnectionStatus = function(connectionStatus) {\n connected = connectionStatus;\n };\n events.EventEmitter.call(this);\n}\n\n//\n// Allow instances to listen in on events that we produce for them\n//\ninherits(ThingShadowsClient, events.EventEmitter);\n\nmodule.exports = ThingShadowsClient;\n\n\n//# sourceURL=webpack:///./node_modules/aws-iot-device-sdk/thing/index.js?"); - -/***/ }), - -/***/ "./node_modules/axios/index.js": -/*!*************************************!*\ - !*** ./node_modules/axios/index.js ***! - \*************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("module.exports = __webpack_require__(/*! ./lib/axios */ \"./node_modules/axios/lib/axios.js\");\n\n//# sourceURL=webpack:///./node_modules/axios/index.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/adapters/xhr.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/adapters/xhr.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar settle = __webpack_require__(/*! ./../core/settle */ \"./node_modules/axios/lib/core/settle.js\");\nvar buildURL = __webpack_require__(/*! ./../helpers/buildURL */ \"./node_modules/axios/lib/helpers/buildURL.js\");\nvar parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ \"./node_modules/axios/lib/helpers/parseHeaders.js\");\nvar isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ \"./node_modules/axios/lib/helpers/isURLSameOrigin.js\");\nvar createError = __webpack_require__(/*! ../core/createError */ \"./node_modules/axios/lib/core/createError.js\");\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = __webpack_require__(/*! ./../helpers/cookies */ \"./node_modules/axios/lib/helpers/cookies.js\");\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/adapters/xhr.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/axios.js": -/*!*****************************************!*\ - !*** ./node_modules/axios/lib/axios.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/axios/lib/utils.js\");\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/axios/lib/helpers/bind.js\");\nvar Axios = __webpack_require__(/*! ./core/Axios */ \"./node_modules/axios/lib/core/Axios.js\");\nvar defaults = __webpack_require__(/*! ./defaults */ \"./node_modules/axios/lib/defaults.js\");\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ \"./node_modules/axios/lib/cancel/Cancel.js\");\naxios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ \"./node_modules/axios/lib/cancel/CancelToken.js\");\naxios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ \"./node_modules/axios/lib/cancel/isCancel.js\");\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = __webpack_require__(/*! ./helpers/spread */ \"./node_modules/axios/lib/helpers/spread.js\");\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/axios.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/Cancel.js": -/*!*************************************************!*\ - !*** ./node_modules/axios/lib/cancel/Cancel.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/cancel/Cancel.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/CancelToken.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/cancel/CancelToken.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar Cancel = __webpack_require__(/*! ./Cancel */ \"./node_modules/axios/lib/cancel/Cancel.js\");\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/cancel/CancelToken.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/isCancel.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/cancel/isCancel.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/cancel/isCancel.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/core/Axios.js": -/*!**********************************************!*\ - !*** ./node_modules/axios/lib/core/Axios.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar defaults = __webpack_require__(/*! ./../defaults */ \"./node_modules/axios/lib/defaults.js\");\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ \"./node_modules/axios/lib/core/InterceptorManager.js\");\nvar dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ \"./node_modules/axios/lib/core/dispatchRequest.js\");\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, {method: 'get'}, this.defaults, config);\n config.method = config.method.toLowerCase();\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/Axios.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/core/InterceptorManager.js": -/*!***********************************************************!*\ - !*** ./node_modules/axios/lib/core/InterceptorManager.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/InterceptorManager.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/core/createError.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/core/createError.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar enhanceError = __webpack_require__(/*! ./enhanceError */ \"./node_modules/axios/lib/core/enhanceError.js\");\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/createError.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/core/dispatchRequest.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/core/dispatchRequest.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar transformData = __webpack_require__(/*! ./transformData */ \"./node_modules/axios/lib/core/transformData.js\");\nvar isCancel = __webpack_require__(/*! ../cancel/isCancel */ \"./node_modules/axios/lib/cancel/isCancel.js\");\nvar defaults = __webpack_require__(/*! ../defaults */ \"./node_modules/axios/lib/defaults.js\");\nvar isAbsoluteURL = __webpack_require__(/*! ./../helpers/isAbsoluteURL */ \"./node_modules/axios/lib/helpers/isAbsoluteURL.js\");\nvar combineURLs = __webpack_require__(/*! ./../helpers/combineURLs */ \"./node_modules/axios/lib/helpers/combineURLs.js\");\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/dispatchRequest.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/core/enhanceError.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/core/enhanceError.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/enhanceError.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/core/settle.js": -/*!***********************************************!*\ - !*** ./node_modules/axios/lib/core/settle.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar createError = __webpack_require__(/*! ./createError */ \"./node_modules/axios/lib/core/createError.js\");\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/settle.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/core/transformData.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/core/transformData.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/core/transformData.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/defaults.js": -/*!********************************************!*\ - !*** ./node_modules/axios/lib/defaults.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/axios/lib/utils.js\");\nvar normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ \"./node_modules/axios/lib/helpers/normalizeHeaderName.js\");\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = __webpack_require__(/*! ./adapters/xhr */ \"./node_modules/axios/lib/adapters/xhr.js\");\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = __webpack_require__(/*! ./adapters/http */ \"./node_modules/axios/lib/adapters/xhr.js\");\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/axios/lib/defaults.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/bind.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/helpers/bind.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/bind.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/buildURL.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/buildURL.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/buildURL.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/combineURLs.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/combineURLs.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/combineURLs.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/cookies.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/helpers/cookies.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/cookies.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/isAbsoluteURL.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js": -/*!***********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/isURLSameOrigin.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/normalizeHeaderName.js": -/*!***************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/normalizeHeaderName.js ***! - \***************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ../utils */ \"./node_modules/axios/lib/utils.js\");\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/normalizeHeaderName.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/parseHeaders.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/parseHeaders.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/spread.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/helpers/spread.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/helpers/spread.js?"); - -/***/ }), - -/***/ "./node_modules/axios/lib/utils.js": -/*!*****************************************!*\ - !*** ./node_modules/axios/lib/utils.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/axios/lib/helpers/bind.js\");\nvar isBuffer = __webpack_require__(/*! is-buffer */ \"./node_modules/is-buffer/index.js\");\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim\n};\n\n\n//# sourceURL=webpack:///./node_modules/axios/lib/utils.js?"); - -/***/ }), - -/***/ "./node_modules/base64-js/index.js": -/*!*****************************************!*\ - !*** ./node_modules/base64-js/index.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n//# sourceURL=webpack:///./node_modules/base64-js/index.js?"); - -/***/ }), - -/***/ "./node_modules/bl/bl.js": -/*!*******************************!*\ - !*** ./node_modules/bl/bl.js ***! - \*******************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("var DuplexStream = __webpack_require__(/*! readable-stream/duplex */ \"./node_modules/readable-stream/duplex-browser.js\")\n , util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\")\n , Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer\n\n\nfunction BufferList (callback) {\n if (!(this instanceof BufferList))\n return new BufferList(callback)\n\n this._bufs = []\n this.length = 0\n\n if (typeof callback == 'function') {\n this._callback = callback\n\n var piper = function piper (err) {\n if (this._callback) {\n this._callback(err)\n this._callback = null\n }\n }.bind(this)\n\n this.on('pipe', function onPipe (src) {\n src.on('error', piper)\n })\n this.on('unpipe', function onUnpipe (src) {\n src.removeListener('error', piper)\n })\n } else {\n this.append(callback)\n }\n\n DuplexStream.call(this)\n}\n\n\nutil.inherits(BufferList, DuplexStream)\n\n\nBufferList.prototype._offset = function _offset (offset) {\n var tot = 0, i = 0, _t\n if (offset === 0) return [ 0, 0 ]\n for (; i < this._bufs.length; i++) {\n _t = tot + this._bufs[i].length\n if (offset < _t || i == this._bufs.length - 1)\n return [ i, offset - tot ]\n tot = _t\n }\n}\n\n\nBufferList.prototype.append = function append (buf) {\n var i = 0\n\n if (Buffer.isBuffer(buf)) {\n this._appendBuffer(buf);\n } else if (Array.isArray(buf)) {\n for (; i < buf.length; i++)\n this.append(buf[i])\n } else if (buf instanceof BufferList) {\n // unwrap argument into individual BufferLists\n for (; i < buf._bufs.length; i++)\n this.append(buf._bufs[i])\n } else if (buf != null) {\n // coerce number arguments to strings, since Buffer(number) does\n // uninitialized memory allocation\n if (typeof buf == 'number')\n buf = buf.toString()\n\n this._appendBuffer(Buffer.from(buf));\n }\n\n return this\n}\n\n\nBufferList.prototype._appendBuffer = function appendBuffer (buf) {\n this._bufs.push(buf)\n this.length += buf.length\n}\n\n\nBufferList.prototype._write = function _write (buf, encoding, callback) {\n this._appendBuffer(buf)\n\n if (typeof callback == 'function')\n callback()\n}\n\n\nBufferList.prototype._read = function _read (size) {\n if (!this.length)\n return this.push(null)\n\n size = Math.min(size, this.length)\n this.push(this.slice(0, size))\n this.consume(size)\n}\n\n\nBufferList.prototype.end = function end (chunk) {\n DuplexStream.prototype.end.call(this, chunk)\n\n if (this._callback) {\n this._callback(null, this.slice())\n this._callback = null\n }\n}\n\n\nBufferList.prototype.get = function get (index) {\n return this.slice(index, index + 1)[0]\n}\n\n\nBufferList.prototype.slice = function slice (start, end) {\n if (typeof start == 'number' && start < 0)\n start += this.length\n if (typeof end == 'number' && end < 0)\n end += this.length\n return this.copy(null, 0, start, end)\n}\n\n\nBufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) {\n if (typeof srcStart != 'number' || srcStart < 0)\n srcStart = 0\n if (typeof srcEnd != 'number' || srcEnd > this.length)\n srcEnd = this.length\n if (srcStart >= this.length)\n return dst || Buffer.alloc(0)\n if (srcEnd <= 0)\n return dst || Buffer.alloc(0)\n\n var copy = !!dst\n , off = this._offset(srcStart)\n , len = srcEnd - srcStart\n , bytes = len\n , bufoff = (copy && dstStart) || 0\n , start = off[1]\n , l\n , i\n\n // copy/slice everything\n if (srcStart === 0 && srcEnd == this.length) {\n if (!copy) { // slice, but full concat if multiple buffers\n return this._bufs.length === 1\n ? this._bufs[0]\n : Buffer.concat(this._bufs, this.length)\n }\n\n // copy, need to copy individual buffers\n for (i = 0; i < this._bufs.length; i++) {\n this._bufs[i].copy(dst, bufoff)\n bufoff += this._bufs[i].length\n }\n\n return dst\n }\n\n // easy, cheap case where it's a subset of one of the buffers\n if (bytes <= this._bufs[off[0]].length - start) {\n return copy\n ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes)\n : this._bufs[off[0]].slice(start, start + bytes)\n }\n\n if (!copy) // a slice, we need something to copy in to\n dst = Buffer.allocUnsafe(len)\n\n for (i = off[0]; i < this._bufs.length; i++) {\n l = this._bufs[i].length - start\n\n if (bytes > l) {\n this._bufs[i].copy(dst, bufoff, start)\n } else {\n this._bufs[i].copy(dst, bufoff, start, start + bytes)\n break\n }\n\n bufoff += l\n bytes -= l\n\n if (start)\n start = 0\n }\n\n return dst\n}\n\nBufferList.prototype.shallowSlice = function shallowSlice (start, end) {\n start = start || 0\n end = end || this.length\n\n if (start < 0)\n start += this.length\n if (end < 0)\n end += this.length\n\n var startOffset = this._offset(start)\n , endOffset = this._offset(end)\n , buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1)\n\n if (endOffset[1] == 0)\n buffers.pop()\n else\n buffers[buffers.length-1] = buffers[buffers.length-1].slice(0, endOffset[1])\n\n if (startOffset[1] != 0)\n buffers[0] = buffers[0].slice(startOffset[1])\n\n return new BufferList(buffers)\n}\n\nBufferList.prototype.toString = function toString (encoding, start, end) {\n return this.slice(start, end).toString(encoding)\n}\n\nBufferList.prototype.consume = function consume (bytes) {\n while (this._bufs.length) {\n if (bytes >= this._bufs[0].length) {\n bytes -= this._bufs[0].length\n this.length -= this._bufs[0].length\n this._bufs.shift()\n } else {\n this._bufs[0] = this._bufs[0].slice(bytes)\n this.length -= bytes\n break\n }\n }\n return this\n}\n\n\nBufferList.prototype.duplicate = function duplicate () {\n var i = 0\n , copy = new BufferList()\n\n for (; i < this._bufs.length; i++)\n copy.append(this._bufs[i])\n\n return copy\n}\n\n\nBufferList.prototype.destroy = function destroy () {\n this._bufs.length = 0\n this.length = 0\n this.push(null)\n}\n\n\n;(function () {\n var methods = {\n 'readDoubleBE' : 8\n , 'readDoubleLE' : 8\n , 'readFloatBE' : 4\n , 'readFloatLE' : 4\n , 'readInt32BE' : 4\n , 'readInt32LE' : 4\n , 'readUInt32BE' : 4\n , 'readUInt32LE' : 4\n , 'readInt16BE' : 2\n , 'readInt16LE' : 2\n , 'readUInt16BE' : 2\n , 'readUInt16LE' : 2\n , 'readInt8' : 1\n , 'readUInt8' : 1\n }\n\n for (var m in methods) {\n (function (m) {\n BufferList.prototype[m] = function (offset) {\n return this.slice(offset, offset + methods[m])[m](0)\n }\n }(m))\n }\n}())\n\n\nmodule.exports = BufferList\n\n\n//# sourceURL=webpack:///./node_modules/bl/bl.js?"); - -/***/ }), - -/***/ "./node_modules/buffer/index.js": -/*!**************************************!*\ - !*** ./node_modules/buffer/index.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/* WEBPACK VAR INJECTION */(function(global) {/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\n\nvar base64 = __webpack_require__(/*! base64-js */ \"./node_modules/base64-js/index.js\")\nvar ieee754 = __webpack_require__(/*! ieee754 */ \"./node_modules/ieee754/index.js\")\nvar isArray = __webpack_require__(/*! isarray */ \"./node_modules/isarray/index.js\")\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/buffer/index.js?"); - -/***/ }), - -/***/ "./node_modules/core-util-is/lib/util.js": -/*!***********************************************!*\ - !*** ./node_modules/core-util-is/lib/util.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n if (Array.isArray) {\n return Array.isArray(arg);\n }\n return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack:///./node_modules/core-util-is/lib/util.js?"); - -/***/ }), - -/***/ "./node_modules/d/auto-bind.js": -/*!*************************************!*\ - !*** ./node_modules/d/auto-bind.js ***! - \*************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar isValue = __webpack_require__(/*! type/value/is */ \"./node_modules/type/value/is.js\")\n , ensureValue = __webpack_require__(/*! type/value/ensure */ \"./node_modules/type/value/ensure.js\")\n , ensurePlainFunction = __webpack_require__(/*! type/plain-function/ensure */ \"./node_modules/type/plain-function/ensure.js\")\n , copy = __webpack_require__(/*! es5-ext/object/copy */ \"./node_modules/es5-ext/object/copy.js\")\n , normalizeOptions = __webpack_require__(/*! es5-ext/object/normalize-options */ \"./node_modules/es5-ext/object/normalize-options.js\")\n , map = __webpack_require__(/*! es5-ext/object/map */ \"./node_modules/es5-ext/object/map.js\");\n\nvar bind = Function.prototype.bind\n , defineProperty = Object.defineProperty\n , hasOwnProperty = Object.prototype.hasOwnProperty\n , define;\n\ndefine = function (name, desc, options) {\n\tvar value = ensureValue(desc) && ensurePlainFunction(desc.value), dgs;\n\tdgs = copy(desc);\n\tdelete dgs.writable;\n\tdelete dgs.value;\n\tdgs.get = function () {\n\t\tif (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value;\n\t\tdesc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this);\n\t\tdefineProperty(this, name, desc);\n\t\treturn this[name];\n\t};\n\treturn dgs;\n};\n\nmodule.exports = function (props/*, options*/) {\n\tvar options = normalizeOptions(arguments[1]);\n\tif (isValue(options.resolveContext)) ensurePlainFunction(options.resolveContext);\n\treturn map(props, function (desc, name) { return define(name, desc, options); });\n};\n\n\n//# sourceURL=webpack:///./node_modules/d/auto-bind.js?"); - -/***/ }), - -/***/ "./node_modules/d/index.js": -/*!*********************************!*\ - !*** ./node_modules/d/index.js ***! - \*********************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar isValue = __webpack_require__(/*! type/value/is */ \"./node_modules/type/value/is.js\")\n , isPlainFunction = __webpack_require__(/*! type/plain-function/is */ \"./node_modules/type/plain-function/is.js\")\n , assign = __webpack_require__(/*! es5-ext/object/assign */ \"./node_modules/es5-ext/object/assign/index.js\")\n , normalizeOpts = __webpack_require__(/*! es5-ext/object/normalize-options */ \"./node_modules/es5-ext/object/normalize-options.js\")\n , contains = __webpack_require__(/*! es5-ext/string/#/contains */ \"./node_modules/es5-ext/string/#/contains/index.js\");\n\nvar d = (module.exports = function (dscr, value/*, options*/) {\n\tvar c, e, w, options, desc;\n\tif (arguments.length < 2 || typeof dscr !== \"string\") {\n\t\toptions = value;\n\t\tvalue = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[2];\n\t}\n\tif (isValue(dscr)) {\n\t\tc = contains.call(dscr, \"c\");\n\t\te = contains.call(dscr, \"e\");\n\t\tw = contains.call(dscr, \"w\");\n\t} else {\n\t\tc = w = true;\n\t\te = false;\n\t}\n\n\tdesc = { value: value, configurable: c, enumerable: e, writable: w };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n});\n\nd.gs = function (dscr, get, set/*, options*/) {\n\tvar c, e, options, desc;\n\tif (typeof dscr !== \"string\") {\n\t\toptions = set;\n\t\tset = get;\n\t\tget = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[3];\n\t}\n\tif (!isValue(get)) {\n\t\tget = undefined;\n\t} else if (!isPlainFunction(get)) {\n\t\toptions = get;\n\t\tget = set = undefined;\n\t} else if (!isValue(set)) {\n\t\tset = undefined;\n\t} else if (!isPlainFunction(set)) {\n\t\toptions = set;\n\t\tset = undefined;\n\t}\n\tif (isValue(dscr)) {\n\t\tc = contains.call(dscr, \"c\");\n\t\te = contains.call(dscr, \"e\");\n\t} else {\n\t\tc = true;\n\t\te = false;\n\t}\n\n\tdesc = { get: get, set: set, configurable: c, enumerable: e };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n};\n\n\n//# sourceURL=webpack:///./node_modules/d/index.js?"); - -/***/ }), - -/***/ "./node_modules/duplexify/index.js": -/*!*****************************************!*\ - !*** ./node_modules/duplexify/index.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("/* WEBPACK VAR INJECTION */(function(Buffer, process) {var stream = __webpack_require__(/*! readable-stream */ \"./node_modules/readable-stream/readable-browser.js\")\nvar eos = __webpack_require__(/*! end-of-stream */ \"./node_modules/end-of-stream/index.js\")\nvar inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\")\nvar shift = __webpack_require__(/*! stream-shift */ \"./node_modules/stream-shift/index.js\")\n\nvar SIGNAL_FLUSH = (Buffer.from && Buffer.from !== Uint8Array.from)\n ? Buffer.from([0])\n : new Buffer([0])\n\nvar onuncork = function(self, fn) {\n if (self._corked) self.once('uncork', fn)\n else fn()\n}\n\nvar autoDestroy = function (self, err) {\n if (self._autoDestroy) self.destroy(err)\n}\n\nvar destroyer = function(self, end) {\n return function(err) {\n if (err) autoDestroy(self, err.message === 'premature close' ? null : err)\n else if (end && !self._ended) self.end()\n }\n}\n\nvar end = function(ws, fn) {\n if (!ws) return fn()\n if (ws._writableState && ws._writableState.finished) return fn()\n if (ws._writableState) return ws.end(fn)\n ws.end()\n fn()\n}\n\nvar toStreams2 = function(rs) {\n return new (stream.Readable)({objectMode:true, highWaterMark:16}).wrap(rs)\n}\n\nvar Duplexify = function(writable, readable, opts) {\n if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts)\n stream.Duplex.call(this, opts)\n\n this._writable = null\n this._readable = null\n this._readable2 = null\n\n this._autoDestroy = !opts || opts.autoDestroy !== false\n this._forwardDestroy = !opts || opts.destroy !== false\n this._forwardEnd = !opts || opts.end !== false\n this._corked = 1 // start corked\n this._ondrain = null\n this._drained = false\n this._forwarding = false\n this._unwrite = null\n this._unread = null\n this._ended = false\n\n this.destroyed = false\n\n if (writable) this.setWritable(writable)\n if (readable) this.setReadable(readable)\n}\n\ninherits(Duplexify, stream.Duplex)\n\nDuplexify.obj = function(writable, readable, opts) {\n if (!opts) opts = {}\n opts.objectMode = true\n opts.highWaterMark = 16\n return new Duplexify(writable, readable, opts)\n}\n\nDuplexify.prototype.cork = function() {\n if (++this._corked === 1) this.emit('cork')\n}\n\nDuplexify.prototype.uncork = function() {\n if (this._corked && --this._corked === 0) this.emit('uncork')\n}\n\nDuplexify.prototype.setWritable = function(writable) {\n if (this._unwrite) this._unwrite()\n\n if (this.destroyed) {\n if (writable && writable.destroy) writable.destroy()\n return\n }\n\n if (writable === null || writable === false) {\n this.end()\n return\n }\n\n var self = this\n var unend = eos(writable, {writable:true, readable:false}, destroyer(this, this._forwardEnd))\n\n var ondrain = function() {\n var ondrain = self._ondrain\n self._ondrain = null\n if (ondrain) ondrain()\n }\n\n var clear = function() {\n self._writable.removeListener('drain', ondrain)\n unend()\n }\n\n if (this._unwrite) process.nextTick(ondrain) // force a drain on stream reset to avoid livelocks\n\n this._writable = writable\n this._writable.on('drain', ondrain)\n this._unwrite = clear\n\n this.uncork() // always uncork setWritable\n}\n\nDuplexify.prototype.setReadable = function(readable) {\n if (this._unread) this._unread()\n\n if (this.destroyed) {\n if (readable && readable.destroy) readable.destroy()\n return\n }\n\n if (readable === null || readable === false) {\n this.push(null)\n this.resume()\n return\n }\n\n var self = this\n var unend = eos(readable, {writable:false, readable:true}, destroyer(this))\n\n var onreadable = function() {\n self._forward()\n }\n\n var onend = function() {\n self.push(null)\n }\n\n var clear = function() {\n self._readable2.removeListener('readable', onreadable)\n self._readable2.removeListener('end', onend)\n unend()\n }\n\n this._drained = true\n this._readable = readable\n this._readable2 = readable._readableState ? readable : toStreams2(readable)\n this._readable2.on('readable', onreadable)\n this._readable2.on('end', onend)\n this._unread = clear\n\n this._forward()\n}\n\nDuplexify.prototype._read = function() {\n this._drained = true\n this._forward()\n}\n\nDuplexify.prototype._forward = function() {\n if (this._forwarding || !this._readable2 || !this._drained) return\n this._forwarding = true\n\n var data\n\n while (this._drained && (data = shift(this._readable2)) !== null) {\n if (this.destroyed) continue\n this._drained = this.push(data)\n }\n\n this._forwarding = false\n}\n\nDuplexify.prototype.destroy = function(err) {\n if (this.destroyed) return\n this.destroyed = true\n\n var self = this\n process.nextTick(function() {\n self._destroy(err)\n })\n}\n\nDuplexify.prototype._destroy = function(err) {\n if (err) {\n var ondrain = this._ondrain\n this._ondrain = null\n if (ondrain) ondrain(err)\n else this.emit('error', err)\n }\n\n if (this._forwardDestroy) {\n if (this._readable && this._readable.destroy) this._readable.destroy()\n if (this._writable && this._writable.destroy) this._writable.destroy()\n }\n\n this.emit('close')\n}\n\nDuplexify.prototype._write = function(data, enc, cb) {\n if (this.destroyed) return cb()\n if (this._corked) return onuncork(this, this._write.bind(this, data, enc, cb))\n if (data === SIGNAL_FLUSH) return this._finish(cb)\n if (!this._writable) return cb()\n\n if (this._writable.write(data) === false) this._ondrain = cb\n else cb()\n}\n\nDuplexify.prototype._finish = function(cb) {\n var self = this\n this.emit('preend')\n onuncork(this, function() {\n end(self._forwardEnd && self._writable, function() {\n // haxx to not emit prefinish twice\n if (self._writableState.prefinished === false) self._writableState.prefinished = true\n self.emit('prefinish')\n onuncork(self, cb)\n })\n })\n}\n\nDuplexify.prototype.end = function(data, enc, cb) {\n if (typeof data === 'function') return this.end(null, null, data)\n if (typeof enc === 'function') return this.end(data, null, enc)\n this._ended = true\n if (data) this.write(data)\n if (!this._writableState.ending) this.write(SIGNAL_FLUSH)\n return stream.Writable.prototype.end.call(this, cb)\n}\n\nmodule.exports = Duplexify\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer, __webpack_require__(/*! ./../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/duplexify/index.js?"); - -/***/ }), - -/***/ "./node_modules/end-of-stream/index.js": -/*!*********************************************!*\ - !*** ./node_modules/end-of-stream/index.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("var once = __webpack_require__(/*! once */ \"./node_modules/once/once.js\");\n\nvar noop = function() {};\n\nvar isRequest = function(stream) {\n\treturn stream.setHeader && typeof stream.abort === 'function';\n};\n\nvar isChildProcess = function(stream) {\n\treturn stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3\n};\n\nvar eos = function(stream, opts, callback) {\n\tif (typeof opts === 'function') return eos(stream, null, opts);\n\tif (!opts) opts = {};\n\n\tcallback = once(callback || noop);\n\n\tvar ws = stream._writableState;\n\tvar rs = stream._readableState;\n\tvar readable = opts.readable || (opts.readable !== false && stream.readable);\n\tvar writable = opts.writable || (opts.writable !== false && stream.writable);\n\n\tvar onlegacyfinish = function() {\n\t\tif (!stream.writable) onfinish();\n\t};\n\n\tvar onfinish = function() {\n\t\twritable = false;\n\t\tif (!readable) callback.call(stream);\n\t};\n\n\tvar onend = function() {\n\t\treadable = false;\n\t\tif (!writable) callback.call(stream);\n\t};\n\n\tvar onexit = function(exitCode) {\n\t\tcallback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);\n\t};\n\n\tvar onerror = function(err) {\n\t\tcallback.call(stream, err);\n\t};\n\n\tvar onclose = function() {\n\t\tif (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close'));\n\t\tif (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close'));\n\t};\n\n\tvar onrequest = function() {\n\t\tstream.req.on('finish', onfinish);\n\t};\n\n\tif (isRequest(stream)) {\n\t\tstream.on('complete', onfinish);\n\t\tstream.on('abort', onclose);\n\t\tif (stream.req) onrequest();\n\t\telse stream.on('request', onrequest);\n\t} else if (writable && !ws) { // legacy streams\n\t\tstream.on('end', onlegacyfinish);\n\t\tstream.on('close', onlegacyfinish);\n\t}\n\n\tif (isChildProcess(stream)) stream.on('exit', onexit);\n\n\tstream.on('end', onend);\n\tstream.on('finish', onfinish);\n\tif (opts.error !== false) stream.on('error', onerror);\n\tstream.on('close', onclose);\n\n\treturn function() {\n\t\tstream.removeListener('complete', onfinish);\n\t\tstream.removeListener('abort', onclose);\n\t\tstream.removeListener('request', onrequest);\n\t\tif (stream.req) stream.req.removeListener('finish', onfinish);\n\t\tstream.removeListener('end', onlegacyfinish);\n\t\tstream.removeListener('close', onlegacyfinish);\n\t\tstream.removeListener('finish', onfinish);\n\t\tstream.removeListener('exit', onexit);\n\t\tstream.removeListener('end', onend);\n\t\tstream.removeListener('error', onerror);\n\t\tstream.removeListener('close', onclose);\n\t};\n};\n\nmodule.exports = eos;\n\n\n//# sourceURL=webpack:///./node_modules/end-of-stream/index.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/array/#/clear.js": -/*!***********************************************!*\ - !*** ./node_modules/es5-ext/array/#/clear.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Inspired by Google Closure:\n// http://closure-library.googlecode.com/svn/docs/\n// closure_goog_array_array.js.html#goog.array.clear\n\n\n\nvar value = __webpack_require__(/*! ../../object/valid-value */ \"./node_modules/es5-ext/object/valid-value.js\");\n\nmodule.exports = function () {\n\tvalue(this).length = 0;\n\treturn this;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/array/#/clear.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/array/#/e-index-of.js": -/*!****************************************************!*\ - !*** ./node_modules/es5-ext/array/#/e-index-of.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar numberIsNaN = __webpack_require__(/*! ../../number/is-nan */ \"./node_modules/es5-ext/number/is-nan/index.js\")\n , toPosInt = __webpack_require__(/*! ../../number/to-pos-integer */ \"./node_modules/es5-ext/number/to-pos-integer.js\")\n , value = __webpack_require__(/*! ../../object/valid-value */ \"./node_modules/es5-ext/object/valid-value.js\")\n , indexOf = Array.prototype.indexOf\n , objHasOwnProperty = Object.prototype.hasOwnProperty\n , abs = Math.abs\n , floor = Math.floor;\n\nmodule.exports = function (searchElement/*, fromIndex*/) {\n\tvar i, length, fromIndex, val;\n\tif (!numberIsNaN(searchElement)) return indexOf.apply(this, arguments);\n\n\tlength = toPosInt(value(this).length);\n\tfromIndex = arguments[1];\n\tif (isNaN(fromIndex)) fromIndex = 0;\n\telse if (fromIndex >= 0) fromIndex = floor(fromIndex);\n\telse fromIndex = toPosInt(this.length) - floor(abs(fromIndex));\n\n\tfor (i = fromIndex; i < length; ++i) {\n\t\tif (objHasOwnProperty.call(this, i)) {\n\t\t\tval = this[i];\n\t\t\tif (numberIsNaN(val)) return i; // Jslint: ignore\n\t\t}\n\t}\n\treturn -1;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/array/#/e-index-of.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/array/from/index.js": -/*!**************************************************!*\ - !*** ./node_modules/es5-ext/array/from/index.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es5-ext/array/from/is-implemented.js\")() ? Array.from : __webpack_require__(/*! ./shim */ \"./node_modules/es5-ext/array/from/shim.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/array/from/index.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/array/from/is-implemented.js": -/*!***********************************************************!*\ - !*** ./node_modules/es5-ext/array/from/is-implemented.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function () {\n\tvar from = Array.from, arr, result;\n\tif (typeof from !== \"function\") return false;\n\tarr = [\"raz\", \"dwa\"];\n\tresult = from(arr);\n\treturn Boolean(result && result !== arr && result[1] === \"dwa\");\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/array/from/is-implemented.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/array/from/shim.js": -/*!*************************************************!*\ - !*** ./node_modules/es5-ext/array/from/shim.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar iteratorSymbol = __webpack_require__(/*! es6-symbol */ \"./node_modules/es6-symbol/index.js\").iterator\n , isArguments = __webpack_require__(/*! ../../function/is-arguments */ \"./node_modules/es5-ext/function/is-arguments.js\")\n , isFunction = __webpack_require__(/*! ../../function/is-function */ \"./node_modules/es5-ext/function/is-function.js\")\n , toPosInt = __webpack_require__(/*! ../../number/to-pos-integer */ \"./node_modules/es5-ext/number/to-pos-integer.js\")\n , callable = __webpack_require__(/*! ../../object/valid-callable */ \"./node_modules/es5-ext/object/valid-callable.js\")\n , validValue = __webpack_require__(/*! ../../object/valid-value */ \"./node_modules/es5-ext/object/valid-value.js\")\n , isValue = __webpack_require__(/*! ../../object/is-value */ \"./node_modules/es5-ext/object/is-value.js\")\n , isString = __webpack_require__(/*! ../../string/is-string */ \"./node_modules/es5-ext/string/is-string.js\")\n , isArray = Array.isArray\n , call = Function.prototype.call\n , desc = { configurable: true, enumerable: true, writable: true, value: null }\n , defineProperty = Object.defineProperty;\n\n// eslint-disable-next-line complexity, max-lines-per-function\nmodule.exports = function (arrayLike/*, mapFn, thisArg*/) {\n\tvar mapFn = arguments[1]\n\t , thisArg = arguments[2]\n\t , Context\n\t , i\n\t , j\n\t , arr\n\t , length\n\t , code\n\t , iterator\n\t , result\n\t , getIterator\n\t , value;\n\n\tarrayLike = Object(validValue(arrayLike));\n\n\tif (isValue(mapFn)) callable(mapFn);\n\tif (!this || this === Array || !isFunction(this)) {\n\t\t// Result: Plain array\n\t\tif (!mapFn) {\n\t\t\tif (isArguments(arrayLike)) {\n\t\t\t\t// Source: Arguments\n\t\t\t\tlength = arrayLike.length;\n\t\t\t\tif (length !== 1) return Array.apply(null, arrayLike);\n\t\t\t\tarr = new Array(1);\n\t\t\t\tarr[0] = arrayLike[0];\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t\tif (isArray(arrayLike)) {\n\t\t\t\t// Source: Array\n\t\t\t\tarr = new Array((length = arrayLike.length));\n\t\t\t\tfor (i = 0; i < length; ++i) arr[i] = arrayLike[i];\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t}\n\t\tarr = [];\n\t} else {\n\t\t// Result: Non plain array\n\t\tContext = this;\n\t}\n\n\tif (!isArray(arrayLike)) {\n\t\tif ((getIterator = arrayLike[iteratorSymbol]) !== undefined) {\n\t\t\t// Source: Iterator\n\t\t\titerator = callable(getIterator).call(arrayLike);\n\t\t\tif (Context) arr = new Context();\n\t\t\tresult = iterator.next();\n\t\t\ti = 0;\n\t\t\twhile (!result.done) {\n\t\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;\n\t\t\t\tif (Context) {\n\t\t\t\t\tdesc.value = value;\n\t\t\t\t\tdefineProperty(arr, i, desc);\n\t\t\t\t} else {\n\t\t\t\t\tarr[i] = value;\n\t\t\t\t}\n\t\t\t\tresult = iterator.next();\n\t\t\t\t++i;\n\t\t\t}\n\t\t\tlength = i;\n\t\t} else if (isString(arrayLike)) {\n\t\t\t// Source: String\n\t\t\tlength = arrayLike.length;\n\t\t\tif (Context) arr = new Context();\n\t\t\tfor (i = 0, j = 0; i < length; ++i) {\n\t\t\t\tvalue = arrayLike[i];\n\t\t\t\tif (i + 1 < length) {\n\t\t\t\t\tcode = value.charCodeAt(0);\n\t\t\t\t\t// eslint-disable-next-line max-depth\n\t\t\t\t\tif (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i];\n\t\t\t\t}\n\t\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, value, j) : value;\n\t\t\t\tif (Context) {\n\t\t\t\t\tdesc.value = value;\n\t\t\t\t\tdefineProperty(arr, j, desc);\n\t\t\t\t} else {\n\t\t\t\t\tarr[j] = value;\n\t\t\t\t}\n\t\t\t\t++j;\n\t\t\t}\n\t\t\tlength = j;\n\t\t}\n\t}\n\tif (length === undefined) {\n\t\t// Source: array or array-like\n\t\tlength = toPosInt(arrayLike.length);\n\t\tif (Context) arr = new Context(length);\n\t\tfor (i = 0; i < length; ++i) {\n\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];\n\t\t\tif (Context) {\n\t\t\t\tdesc.value = value;\n\t\t\t\tdefineProperty(arr, i, desc);\n\t\t\t} else {\n\t\t\t\tarr[i] = value;\n\t\t\t}\n\t\t}\n\t}\n\tif (Context) {\n\t\tdesc.value = null;\n\t\tarr.length = length;\n\t}\n\treturn arr;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/array/from/shim.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/function/is-arguments.js": -/*!*******************************************************!*\ - !*** ./node_modules/es5-ext/function/is-arguments.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar objToString = Object.prototype.toString\n , id = objToString.call((function () { return arguments; })());\n\nmodule.exports = function (value) { return objToString.call(value) === id; };\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/function/is-arguments.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/function/is-function.js": -/*!******************************************************!*\ - !*** ./node_modules/es5-ext/function/is-function.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar objToString = Object.prototype.toString\n , isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);\n\nmodule.exports = function (value) {\n\treturn typeof value === \"function\" && isFunctionStringTag(objToString.call(value));\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/function/is-function.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/function/noop.js": -/*!***********************************************!*\ - !*** ./node_modules/es5-ext/function/noop.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\n// eslint-disable-next-line no-empty-function\nmodule.exports = function () {};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/function/noop.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/math/sign/index.js": -/*!*************************************************!*\ - !*** ./node_modules/es5-ext/math/sign/index.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es5-ext/math/sign/is-implemented.js\")() ? Math.sign : __webpack_require__(/*! ./shim */ \"./node_modules/es5-ext/math/sign/shim.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/math/sign/index.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/math/sign/is-implemented.js": -/*!**********************************************************!*\ - !*** ./node_modules/es5-ext/math/sign/is-implemented.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function () {\n\tvar sign = Math.sign;\n\tif (typeof sign !== \"function\") return false;\n\treturn sign(10) === 1 && sign(-20) === -1;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/math/sign/is-implemented.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/math/sign/shim.js": -/*!************************************************!*\ - !*** ./node_modules/es5-ext/math/sign/shim.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function (value) {\n\tvalue = Number(value);\n\tif (isNaN(value) || value === 0) return value;\n\treturn value > 0 ? 1 : -1;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/math/sign/shim.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/number/is-nan/index.js": -/*!*****************************************************!*\ - !*** ./node_modules/es5-ext/number/is-nan/index.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es5-ext/number/is-nan/is-implemented.js\")() ? Number.isNaN : __webpack_require__(/*! ./shim */ \"./node_modules/es5-ext/number/is-nan/shim.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/number/is-nan/index.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/number/is-nan/is-implemented.js": -/*!**************************************************************!*\ - !*** ./node_modules/es5-ext/number/is-nan/is-implemented.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function () {\n\tvar numberIsNaN = Number.isNaN;\n\tif (typeof numberIsNaN !== \"function\") return false;\n\treturn !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/number/is-nan/is-implemented.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/number/is-nan/shim.js": -/*!****************************************************!*\ - !*** ./node_modules/es5-ext/number/is-nan/shim.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function (value) {\n\t// eslint-disable-next-line no-self-compare\n\treturn value !== value;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/number/is-nan/shim.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/number/to-integer.js": -/*!***************************************************!*\ - !*** ./node_modules/es5-ext/number/to-integer.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar sign = __webpack_require__(/*! ../math/sign */ \"./node_modules/es5-ext/math/sign/index.js\")\n , abs = Math.abs\n , floor = Math.floor;\n\nmodule.exports = function (value) {\n\tif (isNaN(value)) return 0;\n\tvalue = Number(value);\n\tif (value === 0 || !isFinite(value)) return value;\n\treturn sign(value) * floor(abs(value));\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/number/to-integer.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/number/to-pos-integer.js": -/*!*******************************************************!*\ - !*** ./node_modules/es5-ext/number/to-pos-integer.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar toInteger = __webpack_require__(/*! ./to-integer */ \"./node_modules/es5-ext/number/to-integer.js\")\n , max = Math.max;\n\nmodule.exports = function (value) { return max(0, toInteger(value)); };\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/number/to-pos-integer.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/_iterate.js": -/*!*************************************************!*\ - !*** ./node_modules/es5-ext/object/_iterate.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Internal method, used by iteration functions.\n// Calls a function for each key-value pair found in object\n// Optionally takes compareFn to iterate object in specific order\n\n\n\nvar callable = __webpack_require__(/*! ./valid-callable */ \"./node_modules/es5-ext/object/valid-callable.js\")\n , value = __webpack_require__(/*! ./valid-value */ \"./node_modules/es5-ext/object/valid-value.js\")\n , bind = Function.prototype.bind\n , call = Function.prototype.call\n , keys = Object.keys\n , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nmodule.exports = function (method, defVal) {\n\treturn function (obj, cb/*, thisArg, compareFn*/) {\n\t\tvar list, thisArg = arguments[2], compareFn = arguments[3];\n\t\tobj = Object(value(obj));\n\t\tcallable(cb);\n\n\t\tlist = keys(obj);\n\t\tif (compareFn) {\n\t\t\tlist.sort(typeof compareFn === \"function\" ? bind.call(compareFn, obj) : undefined);\n\t\t}\n\t\tif (typeof method !== \"function\") method = list[method];\n\t\treturn call.call(method, list, function (key, index) {\n\t\t\tif (!objPropertyIsEnumerable.call(obj, key)) return defVal;\n\t\t\treturn call.call(cb, thisArg, obj[key], key, obj, index);\n\t\t});\n\t};\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/_iterate.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/assign/index.js": -/*!*****************************************************!*\ - !*** ./node_modules/es5-ext/object/assign/index.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es5-ext/object/assign/is-implemented.js\")() ? Object.assign : __webpack_require__(/*! ./shim */ \"./node_modules/es5-ext/object/assign/shim.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/assign/index.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/assign/is-implemented.js": -/*!**************************************************************!*\ - !*** ./node_modules/es5-ext/object/assign/is-implemented.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function () {\n\tvar assign = Object.assign, obj;\n\tif (typeof assign !== \"function\") return false;\n\tobj = { foo: \"raz\" };\n\tassign(obj, { bar: \"dwa\" }, { trzy: \"trzy\" });\n\treturn obj.foo + obj.bar + obj.trzy === \"razdwatrzy\";\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/assign/is-implemented.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/assign/shim.js": -/*!****************************************************!*\ - !*** ./node_modules/es5-ext/object/assign/shim.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar keys = __webpack_require__(/*! ../keys */ \"./node_modules/es5-ext/object/keys/index.js\")\n , value = __webpack_require__(/*! ../valid-value */ \"./node_modules/es5-ext/object/valid-value.js\")\n , max = Math.max;\n\nmodule.exports = function (dest, src/*, …srcn*/) {\n\tvar error, i, length = max(arguments.length, 2), assign;\n\tdest = Object(value(dest));\n\tassign = function (key) {\n\t\ttry {\n\t\t\tdest[key] = src[key];\n\t\t} catch (e) {\n\t\t\tif (!error) error = e;\n\t\t}\n\t};\n\tfor (i = 1; i < length; ++i) {\n\t\tsrc = arguments[i];\n\t\tkeys(src).forEach(assign);\n\t}\n\tif (error !== undefined) throw error;\n\treturn dest;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/assign/shim.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/copy.js": -/*!*********************************************!*\ - !*** ./node_modules/es5-ext/object/copy.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar aFrom = __webpack_require__(/*! ../array/from */ \"./node_modules/es5-ext/array/from/index.js\")\n , assign = __webpack_require__(/*! ./assign */ \"./node_modules/es5-ext/object/assign/index.js\")\n , value = __webpack_require__(/*! ./valid-value */ \"./node_modules/es5-ext/object/valid-value.js\");\n\nmodule.exports = function (obj/*, propertyNames, options*/) {\n\tvar copy = Object(value(obj)), propertyNames = arguments[1], options = Object(arguments[2]);\n\tif (copy !== obj && !propertyNames) return copy;\n\tvar result = {};\n\tif (propertyNames) {\n\t\taFrom(propertyNames, function (propertyName) {\n\t\t\tif (options.ensure || propertyName in obj) result[propertyName] = obj[propertyName];\n\t\t});\n\t} else {\n\t\tassign(result, obj);\n\t}\n\treturn result;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/copy.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/create.js": -/*!***********************************************!*\ - !*** ./node_modules/es5-ext/object/create.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Workaround for http://code.google.com/p/v8/issues/detail?id=2804\n\n\n\nvar create = Object.create, shim;\n\nif (!__webpack_require__(/*! ./set-prototype-of/is-implemented */ \"./node_modules/es5-ext/object/set-prototype-of/is-implemented.js\")()) {\n\tshim = __webpack_require__(/*! ./set-prototype-of/shim */ \"./node_modules/es5-ext/object/set-prototype-of/shim.js\");\n}\n\nmodule.exports = (function () {\n\tvar nullObject, polyProps, desc;\n\tif (!shim) return create;\n\tif (shim.level !== 1) return create;\n\n\tnullObject = {};\n\tpolyProps = {};\n\tdesc = { configurable: false, enumerable: false, writable: true, value: undefined };\n\tObject.getOwnPropertyNames(Object.prototype).forEach(function (name) {\n\t\tif (name === \"__proto__\") {\n\t\t\tpolyProps[name] = {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: undefined\n\t\t\t};\n\t\t\treturn;\n\t\t}\n\t\tpolyProps[name] = desc;\n\t});\n\tObject.defineProperties(nullObject, polyProps);\n\n\tObject.defineProperty(shim, \"nullPolyfill\", {\n\t\tconfigurable: false,\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tvalue: nullObject\n\t});\n\n\treturn function (prototype, props) {\n\t\treturn create(prototype === null ? nullObject : prototype, props);\n\t};\n})();\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/create.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/for-each.js": -/*!*************************************************!*\ - !*** ./node_modules/es5-ext/object/for-each.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = __webpack_require__(/*! ./_iterate */ \"./node_modules/es5-ext/object/_iterate.js\")(\"forEach\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/for-each.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/is-object.js": -/*!**************************************************!*\ - !*** ./node_modules/es5-ext/object/is-object.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar isValue = __webpack_require__(/*! ./is-value */ \"./node_modules/es5-ext/object/is-value.js\");\n\nvar map = { function: true, object: true };\n\nmodule.exports = function (value) { return (isValue(value) && map[typeof value]) || false; };\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/is-object.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/is-value.js": -/*!*************************************************!*\ - !*** ./node_modules/es5-ext/object/is-value.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar _undefined = __webpack_require__(/*! ../function/noop */ \"./node_modules/es5-ext/function/noop.js\")(); // Support ES3 engines\n\nmodule.exports = function (val) { return val !== _undefined && val !== null; };\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/is-value.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/keys/index.js": -/*!***************************************************!*\ - !*** ./node_modules/es5-ext/object/keys/index.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es5-ext/object/keys/is-implemented.js\")() ? Object.keys : __webpack_require__(/*! ./shim */ \"./node_modules/es5-ext/object/keys/shim.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/keys/index.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/keys/is-implemented.js": -/*!************************************************************!*\ - !*** ./node_modules/es5-ext/object/keys/is-implemented.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function () {\n\ttry {\n\t\tObject.keys(\"primitive\");\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/keys/is-implemented.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/keys/shim.js": -/*!**************************************************!*\ - !*** ./node_modules/es5-ext/object/keys/shim.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar isValue = __webpack_require__(/*! ../is-value */ \"./node_modules/es5-ext/object/is-value.js\");\n\nvar keys = Object.keys;\n\nmodule.exports = function (object) { return keys(isValue(object) ? Object(object) : object); };\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/keys/shim.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/map.js": -/*!********************************************!*\ - !*** ./node_modules/es5-ext/object/map.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar callable = __webpack_require__(/*! ./valid-callable */ \"./node_modules/es5-ext/object/valid-callable.js\")\n , forEach = __webpack_require__(/*! ./for-each */ \"./node_modules/es5-ext/object/for-each.js\")\n , call = Function.prototype.call;\n\nmodule.exports = function (obj, cb/*, thisArg*/) {\n\tvar result = {}, thisArg = arguments[2];\n\tcallable(cb);\n\tforEach(obj, function (value, key, targetObj, index) {\n\t\tresult[key] = call.call(cb, thisArg, value, key, targetObj, index);\n\t});\n\treturn result;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/map.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/normalize-options.js": -/*!**********************************************************!*\ - !*** ./node_modules/es5-ext/object/normalize-options.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar isValue = __webpack_require__(/*! ./is-value */ \"./node_modules/es5-ext/object/is-value.js\");\n\nvar forEach = Array.prototype.forEach, create = Object.create;\n\nvar process = function (src, obj) {\n\tvar key;\n\tfor (key in src) obj[key] = src[key];\n};\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function (opts1/*, …options*/) {\n\tvar result = create(null);\n\tforEach.call(arguments, function (options) {\n\t\tif (!isValue(options)) return;\n\t\tprocess(Object(options), result);\n\t});\n\treturn result;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/normalize-options.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/primitive-set.js": -/*!******************************************************!*\ - !*** ./node_modules/es5-ext/object/primitive-set.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar forEach = Array.prototype.forEach, create = Object.create;\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function (arg/*, …args*/) {\n\tvar set = create(null);\n\tforEach.call(arguments, function (name) { set[name] = true; });\n\treturn set;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/primitive-set.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/set-prototype-of/index.js": -/*!***************************************************************!*\ - !*** ./node_modules/es5-ext/object/set-prototype-of/index.js ***! - \***************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es5-ext/object/set-prototype-of/is-implemented.js\")() ? Object.setPrototypeOf : __webpack_require__(/*! ./shim */ \"./node_modules/es5-ext/object/set-prototype-of/shim.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/set-prototype-of/index.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/set-prototype-of/is-implemented.js": -/*!************************************************************************!*\ - !*** ./node_modules/es5-ext/object/set-prototype-of/is-implemented.js ***! - \************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar create = Object.create, getPrototypeOf = Object.getPrototypeOf, plainObject = {};\n\nmodule.exports = function (/* CustomCreate*/) {\n\tvar setPrototypeOf = Object.setPrototypeOf, customCreate = arguments[0] || create;\n\tif (typeof setPrototypeOf !== \"function\") return false;\n\treturn getPrototypeOf(setPrototypeOf(customCreate(null), plainObject)) === plainObject;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/set-prototype-of/is-implemented.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/set-prototype-of/shim.js": -/*!**************************************************************!*\ - !*** ./node_modules/es5-ext/object/set-prototype-of/shim.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/* eslint no-proto: \"off\" */\n\n// Big thanks to @WebReflection for sorting this out\n// https://gist.github.com/WebReflection/5593554\n\n\n\nvar isObject = __webpack_require__(/*! ../is-object */ \"./node_modules/es5-ext/object/is-object.js\")\n , value = __webpack_require__(/*! ../valid-value */ \"./node_modules/es5-ext/object/valid-value.js\")\n , objIsPrototypeOf = Object.prototype.isPrototypeOf\n , defineProperty = Object.defineProperty\n , nullDesc = { configurable: true, enumerable: false, writable: true, value: undefined }\n , validate;\n\nvalidate = function (obj, prototype) {\n\tvalue(obj);\n\tif (prototype === null || isObject(prototype)) return obj;\n\tthrow new TypeError(\"Prototype must be null or an object\");\n};\n\nmodule.exports = (function (status) {\n\tvar fn, set;\n\tif (!status) return null;\n\tif (status.level === 2) {\n\t\tif (status.set) {\n\t\t\tset = status.set;\n\t\t\tfn = function (obj, prototype) {\n\t\t\t\tset.call(validate(obj, prototype), prototype);\n\t\t\t\treturn obj;\n\t\t\t};\n\t\t} else {\n\t\t\tfn = function (obj, prototype) {\n\t\t\t\tvalidate(obj, prototype).__proto__ = prototype;\n\t\t\t\treturn obj;\n\t\t\t};\n\t\t}\n\t} else {\n\t\tfn = function self(obj, prototype) {\n\t\t\tvar isNullBase;\n\t\t\tvalidate(obj, prototype);\n\t\t\tisNullBase = objIsPrototypeOf.call(self.nullPolyfill, obj);\n\t\t\tif (isNullBase) delete self.nullPolyfill.__proto__;\n\t\t\tif (prototype === null) prototype = self.nullPolyfill;\n\t\t\tobj.__proto__ = prototype;\n\t\t\tif (isNullBase) defineProperty(self.nullPolyfill, \"__proto__\", nullDesc);\n\t\t\treturn obj;\n\t\t};\n\t}\n\treturn Object.defineProperty(fn, \"level\", {\n\t\tconfigurable: false,\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tvalue: status.level\n\t});\n})(\n\t(function () {\n\t\tvar tmpObj1 = Object.create(null)\n\t\t , tmpObj2 = {}\n\t\t , set\n\t\t , desc = Object.getOwnPropertyDescriptor(Object.prototype, \"__proto__\");\n\n\t\tif (desc) {\n\t\t\ttry {\n\t\t\t\tset = desc.set; // Opera crashes at this point\n\t\t\t\tset.call(tmpObj1, tmpObj2);\n\t\t\t} catch (ignore) {}\n\t\t\tif (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { set: set, level: 2 };\n\t\t}\n\n\t\ttmpObj1.__proto__ = tmpObj2;\n\t\tif (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 2 };\n\n\t\ttmpObj1 = {};\n\t\ttmpObj1.__proto__ = tmpObj2;\n\t\tif (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 1 };\n\n\t\treturn false;\n\t})()\n);\n\n__webpack_require__(/*! ../create */ \"./node_modules/es5-ext/object/create.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/set-prototype-of/shim.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/valid-callable.js": -/*!*******************************************************!*\ - !*** ./node_modules/es5-ext/object/valid-callable.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function (fn) {\n\tif (typeof fn !== \"function\") throw new TypeError(fn + \" is not a function\");\n\treturn fn;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/valid-callable.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/object/valid-value.js": -/*!****************************************************!*\ - !*** ./node_modules/es5-ext/object/valid-value.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar isValue = __webpack_require__(/*! ./is-value */ \"./node_modules/es5-ext/object/is-value.js\");\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) throw new TypeError(\"Cannot use null or undefined\");\n\treturn value;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/object/valid-value.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/string/#/contains/index.js": -/*!*********************************************************!*\ - !*** ./node_modules/es5-ext/string/#/contains/index.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es5-ext/string/#/contains/is-implemented.js\")() ? String.prototype.contains : __webpack_require__(/*! ./shim */ \"./node_modules/es5-ext/string/#/contains/shim.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/string/#/contains/index.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/string/#/contains/is-implemented.js": -/*!******************************************************************!*\ - !*** ./node_modules/es5-ext/string/#/contains/is-implemented.js ***! - \******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar str = \"razdwatrzy\";\n\nmodule.exports = function () {\n\tif (typeof str.contains !== \"function\") return false;\n\treturn str.contains(\"dwa\") === true && str.contains(\"foo\") === false;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/string/#/contains/is-implemented.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/string/#/contains/shim.js": -/*!********************************************************!*\ - !*** ./node_modules/es5-ext/string/#/contains/shim.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar indexOf = String.prototype.indexOf;\n\nmodule.exports = function (searchString/*, position*/) {\n\treturn indexOf.call(this, searchString, arguments[1]) > -1;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/string/#/contains/shim.js?"); - -/***/ }), - -/***/ "./node_modules/es5-ext/string/is-string.js": -/*!**************************************************!*\ - !*** ./node_modules/es5-ext/string/is-string.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar objToString = Object.prototype.toString, id = objToString.call(\"\");\n\nmodule.exports = function (value) {\n\treturn (\n\t\ttypeof value === \"string\" ||\n\t\t(value &&\n\t\t\ttypeof value === \"object\" &&\n\t\t\t(value instanceof String || objToString.call(value) === id)) ||\n\t\tfalse\n\t);\n};\n\n\n//# sourceURL=webpack:///./node_modules/es5-ext/string/is-string.js?"); - -/***/ }), - -/***/ "./node_modules/es6-iterator/array.js": -/*!********************************************!*\ - !*** ./node_modules/es6-iterator/array.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar setPrototypeOf = __webpack_require__(/*! es5-ext/object/set-prototype-of */ \"./node_modules/es5-ext/object/set-prototype-of/index.js\")\n , contains = __webpack_require__(/*! es5-ext/string/#/contains */ \"./node_modules/es5-ext/string/#/contains/index.js\")\n , d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , Symbol = __webpack_require__(/*! es6-symbol */ \"./node_modules/es6-symbol/index.js\")\n , Iterator = __webpack_require__(/*! ./ */ \"./node_modules/es6-iterator/index.js\");\n\nvar defineProperty = Object.defineProperty, ArrayIterator;\n\nArrayIterator = module.exports = function (arr, kind) {\n\tif (!(this instanceof ArrayIterator)) throw new TypeError(\"Constructor requires 'new'\");\n\tIterator.call(this, arr);\n\tif (!kind) kind = \"value\";\n\telse if (contains.call(kind, \"key+value\")) kind = \"key+value\";\n\telse if (contains.call(kind, \"key\")) kind = \"key\";\n\telse kind = \"value\";\n\tdefineProperty(this, \"__kind__\", d(\"\", kind));\n};\nif (setPrototypeOf) setPrototypeOf(ArrayIterator, Iterator);\n\n// Internal %ArrayIteratorPrototype% doesn't expose its constructor\ndelete ArrayIterator.prototype.constructor;\n\nArrayIterator.prototype = Object.create(Iterator.prototype, {\n\t_resolve: d(function (i) {\n\t\tif (this.__kind__ === \"value\") return this.__list__[i];\n\t\tif (this.__kind__ === \"key+value\") return [i, this.__list__[i]];\n\t\treturn i;\n\t})\n});\ndefineProperty(ArrayIterator.prototype, Symbol.toStringTag, d(\"c\", \"Array Iterator\"));\n\n\n//# sourceURL=webpack:///./node_modules/es6-iterator/array.js?"); - -/***/ }), - -/***/ "./node_modules/es6-iterator/for-of.js": -/*!*********************************************!*\ - !*** ./node_modules/es6-iterator/for-of.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar isArguments = __webpack_require__(/*! es5-ext/function/is-arguments */ \"./node_modules/es5-ext/function/is-arguments.js\")\n , callable = __webpack_require__(/*! es5-ext/object/valid-callable */ \"./node_modules/es5-ext/object/valid-callable.js\")\n , isString = __webpack_require__(/*! es5-ext/string/is-string */ \"./node_modules/es5-ext/string/is-string.js\")\n , get = __webpack_require__(/*! ./get */ \"./node_modules/es6-iterator/get.js\");\n\nvar isArray = Array.isArray, call = Function.prototype.call, some = Array.prototype.some;\n\nmodule.exports = function (iterable, cb /*, thisArg*/) {\n\tvar mode, thisArg = arguments[2], result, doBreak, broken, i, length, char, code;\n\tif (isArray(iterable) || isArguments(iterable)) mode = \"array\";\n\telse if (isString(iterable)) mode = \"string\";\n\telse iterable = get(iterable);\n\n\tcallable(cb);\n\tdoBreak = function () {\n\t\tbroken = true;\n\t};\n\tif (mode === \"array\") {\n\t\tsome.call(iterable, function (value) {\n\t\t\tcall.call(cb, thisArg, value, doBreak);\n\t\t\treturn broken;\n\t\t});\n\t\treturn;\n\t}\n\tif (mode === \"string\") {\n\t\tlength = iterable.length;\n\t\tfor (i = 0; i < length; ++i) {\n\t\t\tchar = iterable[i];\n\t\t\tif (i + 1 < length) {\n\t\t\t\tcode = char.charCodeAt(0);\n\t\t\t\tif (code >= 0xd800 && code <= 0xdbff) char += iterable[++i];\n\t\t\t}\n\t\t\tcall.call(cb, thisArg, char, doBreak);\n\t\t\tif (broken) break;\n\t\t}\n\t\treturn;\n\t}\n\tresult = iterable.next();\n\n\twhile (!result.done) {\n\t\tcall.call(cb, thisArg, result.value, doBreak);\n\t\tif (broken) return;\n\t\tresult = iterable.next();\n\t}\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-iterator/for-of.js?"); - -/***/ }), - -/***/ "./node_modules/es6-iterator/get.js": -/*!******************************************!*\ - !*** ./node_modules/es6-iterator/get.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar isArguments = __webpack_require__(/*! es5-ext/function/is-arguments */ \"./node_modules/es5-ext/function/is-arguments.js\")\n , isString = __webpack_require__(/*! es5-ext/string/is-string */ \"./node_modules/es5-ext/string/is-string.js\")\n , ArrayIterator = __webpack_require__(/*! ./array */ \"./node_modules/es6-iterator/array.js\")\n , StringIterator = __webpack_require__(/*! ./string */ \"./node_modules/es6-iterator/string.js\")\n , iterable = __webpack_require__(/*! ./valid-iterable */ \"./node_modules/es6-iterator/valid-iterable.js\")\n , iteratorSymbol = __webpack_require__(/*! es6-symbol */ \"./node_modules/es6-symbol/index.js\").iterator;\n\nmodule.exports = function (obj) {\n\tif (typeof iterable(obj)[iteratorSymbol] === \"function\") return obj[iteratorSymbol]();\n\tif (isArguments(obj)) return new ArrayIterator(obj);\n\tif (isString(obj)) return new StringIterator(obj);\n\treturn new ArrayIterator(obj);\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-iterator/get.js?"); - -/***/ }), - -/***/ "./node_modules/es6-iterator/index.js": -/*!********************************************!*\ - !*** ./node_modules/es6-iterator/index.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar clear = __webpack_require__(/*! es5-ext/array/#/clear */ \"./node_modules/es5-ext/array/#/clear.js\")\n , assign = __webpack_require__(/*! es5-ext/object/assign */ \"./node_modules/es5-ext/object/assign/index.js\")\n , callable = __webpack_require__(/*! es5-ext/object/valid-callable */ \"./node_modules/es5-ext/object/valid-callable.js\")\n , value = __webpack_require__(/*! es5-ext/object/valid-value */ \"./node_modules/es5-ext/object/valid-value.js\")\n , d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , autoBind = __webpack_require__(/*! d/auto-bind */ \"./node_modules/d/auto-bind.js\")\n , Symbol = __webpack_require__(/*! es6-symbol */ \"./node_modules/es6-symbol/index.js\");\n\nvar defineProperty = Object.defineProperty, defineProperties = Object.defineProperties, Iterator;\n\nmodule.exports = Iterator = function (list, context) {\n\tif (!(this instanceof Iterator)) throw new TypeError(\"Constructor requires 'new'\");\n\tdefineProperties(this, {\n\t\t__list__: d(\"w\", value(list)),\n\t\t__context__: d(\"w\", context),\n\t\t__nextIndex__: d(\"w\", 0)\n\t});\n\tif (!context) return;\n\tcallable(context.on);\n\tcontext.on(\"_add\", this._onAdd);\n\tcontext.on(\"_delete\", this._onDelete);\n\tcontext.on(\"_clear\", this._onClear);\n};\n\n// Internal %IteratorPrototype% doesn't expose its constructor\ndelete Iterator.prototype.constructor;\n\ndefineProperties(\n\tIterator.prototype,\n\tassign(\n\t\t{\n\t\t\t_next: d(function () {\n\t\t\t\tvar i;\n\t\t\t\tif (!this.__list__) return undefined;\n\t\t\t\tif (this.__redo__) {\n\t\t\t\t\ti = this.__redo__.shift();\n\t\t\t\t\tif (i !== undefined) return i;\n\t\t\t\t}\n\t\t\t\tif (this.__nextIndex__ < this.__list__.length) return this.__nextIndex__++;\n\t\t\t\tthis._unBind();\n\t\t\t\treturn undefined;\n\t\t\t}),\n\t\t\tnext: d(function () {\n\t\t\t\treturn this._createResult(this._next());\n\t\t\t}),\n\t\t\t_createResult: d(function (i) {\n\t\t\t\tif (i === undefined) return { done: true, value: undefined };\n\t\t\t\treturn { done: false, value: this._resolve(i) };\n\t\t\t}),\n\t\t\t_resolve: d(function (i) {\n\t\t\t\treturn this.__list__[i];\n\t\t\t}),\n\t\t\t_unBind: d(function () {\n\t\t\t\tthis.__list__ = null;\n\t\t\t\tdelete this.__redo__;\n\t\t\t\tif (!this.__context__) return;\n\t\t\t\tthis.__context__.off(\"_add\", this._onAdd);\n\t\t\t\tthis.__context__.off(\"_delete\", this._onDelete);\n\t\t\t\tthis.__context__.off(\"_clear\", this._onClear);\n\t\t\t\tthis.__context__ = null;\n\t\t\t}),\n\t\t\ttoString: d(function () {\n\t\t\t\treturn \"[object \" + (this[Symbol.toStringTag] || \"Object\") + \"]\";\n\t\t\t})\n\t\t},\n\t\tautoBind({\n\t\t\t_onAdd: d(function (index) {\n\t\t\t\tif (index >= this.__nextIndex__) return;\n\t\t\t\t++this.__nextIndex__;\n\t\t\t\tif (!this.__redo__) {\n\t\t\t\t\tdefineProperty(this, \"__redo__\", d(\"c\", [index]));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.__redo__.forEach(function (redo, i) {\n\t\t\t\t\tif (redo >= index) this.__redo__[i] = ++redo;\n\t\t\t\t}, this);\n\t\t\t\tthis.__redo__.push(index);\n\t\t\t}),\n\t\t\t_onDelete: d(function (index) {\n\t\t\t\tvar i;\n\t\t\t\tif (index >= this.__nextIndex__) return;\n\t\t\t\t--this.__nextIndex__;\n\t\t\t\tif (!this.__redo__) return;\n\t\t\t\ti = this.__redo__.indexOf(index);\n\t\t\t\tif (i !== -1) this.__redo__.splice(i, 1);\n\t\t\t\tthis.__redo__.forEach(function (redo, j) {\n\t\t\t\t\tif (redo > index) this.__redo__[j] = --redo;\n\t\t\t\t}, this);\n\t\t\t}),\n\t\t\t_onClear: d(function () {\n\t\t\t\tif (this.__redo__) clear.call(this.__redo__);\n\t\t\t\tthis.__nextIndex__ = 0;\n\t\t\t})\n\t\t})\n\t)\n);\n\ndefineProperty(\n\tIterator.prototype,\n\tSymbol.iterator,\n\td(function () {\n\t\treturn this;\n\t})\n);\n\n\n//# sourceURL=webpack:///./node_modules/es6-iterator/index.js?"); - -/***/ }), - -/***/ "./node_modules/es6-iterator/is-iterable.js": -/*!**************************************************!*\ - !*** ./node_modules/es6-iterator/is-iterable.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar isArguments = __webpack_require__(/*! es5-ext/function/is-arguments */ \"./node_modules/es5-ext/function/is-arguments.js\")\n , isValue = __webpack_require__(/*! es5-ext/object/is-value */ \"./node_modules/es5-ext/object/is-value.js\")\n , isString = __webpack_require__(/*! es5-ext/string/is-string */ \"./node_modules/es5-ext/string/is-string.js\");\n\nvar iteratorSymbol = __webpack_require__(/*! es6-symbol */ \"./node_modules/es6-symbol/index.js\").iterator\n , isArray = Array.isArray;\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) return false;\n\tif (isArray(value)) return true;\n\tif (isString(value)) return true;\n\tif (isArguments(value)) return true;\n\treturn typeof value[iteratorSymbol] === \"function\";\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-iterator/is-iterable.js?"); - -/***/ }), - -/***/ "./node_modules/es6-iterator/string.js": -/*!*********************************************!*\ - !*** ./node_modules/es6-iterator/string.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Thanks @mathiasbynens\n// http://mathiasbynens.be/notes/javascript-unicode#iterating-over-symbols\n\n\n\nvar setPrototypeOf = __webpack_require__(/*! es5-ext/object/set-prototype-of */ \"./node_modules/es5-ext/object/set-prototype-of/index.js\")\n , d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , Symbol = __webpack_require__(/*! es6-symbol */ \"./node_modules/es6-symbol/index.js\")\n , Iterator = __webpack_require__(/*! ./ */ \"./node_modules/es6-iterator/index.js\");\n\nvar defineProperty = Object.defineProperty, StringIterator;\n\nStringIterator = module.exports = function (str) {\n\tif (!(this instanceof StringIterator)) throw new TypeError(\"Constructor requires 'new'\");\n\tstr = String(str);\n\tIterator.call(this, str);\n\tdefineProperty(this, \"__length__\", d(\"\", str.length));\n};\nif (setPrototypeOf) setPrototypeOf(StringIterator, Iterator);\n\n// Internal %ArrayIteratorPrototype% doesn't expose its constructor\ndelete StringIterator.prototype.constructor;\n\nStringIterator.prototype = Object.create(Iterator.prototype, {\n\t_next: d(function () {\n\t\tif (!this.__list__) return undefined;\n\t\tif (this.__nextIndex__ < this.__length__) return this.__nextIndex__++;\n\t\tthis._unBind();\n\t\treturn undefined;\n\t}),\n\t_resolve: d(function (i) {\n\t\tvar char = this.__list__[i], code;\n\t\tif (this.__nextIndex__ === this.__length__) return char;\n\t\tcode = char.charCodeAt(0);\n\t\tif (code >= 0xd800 && code <= 0xdbff) return char + this.__list__[this.__nextIndex__++];\n\t\treturn char;\n\t})\n});\ndefineProperty(StringIterator.prototype, Symbol.toStringTag, d(\"c\", \"String Iterator\"));\n\n\n//# sourceURL=webpack:///./node_modules/es6-iterator/string.js?"); - -/***/ }), - -/***/ "./node_modules/es6-iterator/valid-iterable.js": -/*!*****************************************************!*\ - !*** ./node_modules/es6-iterator/valid-iterable.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar isIterable = __webpack_require__(/*! ./is-iterable */ \"./node_modules/es6-iterator/is-iterable.js\");\n\nmodule.exports = function (value) {\n\tif (!isIterable(value)) throw new TypeError(value + \" is not iterable\");\n\treturn value;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-iterator/valid-iterable.js?"); - -/***/ }), - -/***/ "./node_modules/es6-map/index.js": -/*!***************************************!*\ - !*** ./node_modules/es6-map/index.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es6-map/is-implemented.js\")() ? Map : __webpack_require__(/*! ./polyfill */ \"./node_modules/es6-map/polyfill.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es6-map/index.js?"); - -/***/ }), - -/***/ "./node_modules/es6-map/is-implemented.js": -/*!************************************************!*\ - !*** ./node_modules/es6-map/is-implemented.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function () {\n\tvar map, iterator, result;\n\tif (typeof Map !== 'function') return false;\n\ttry {\n\t\t// WebKit doesn't support arguments and crashes\n\t\tmap = new Map([['raz', 'one'], ['dwa', 'two'], ['trzy', 'three']]);\n\t} catch (e) {\n\t\treturn false;\n\t}\n\tif (String(map) !== '[object Map]') return false;\n\tif (map.size !== 3) return false;\n\tif (typeof map.clear !== 'function') return false;\n\tif (typeof map.delete !== 'function') return false;\n\tif (typeof map.entries !== 'function') return false;\n\tif (typeof map.forEach !== 'function') return false;\n\tif (typeof map.get !== 'function') return false;\n\tif (typeof map.has !== 'function') return false;\n\tif (typeof map.keys !== 'function') return false;\n\tif (typeof map.set !== 'function') return false;\n\tif (typeof map.values !== 'function') return false;\n\n\titerator = map.entries();\n\tresult = iterator.next();\n\tif (result.done !== false) return false;\n\tif (!result.value) return false;\n\tif (result.value[0] !== 'raz') return false;\n\tif (result.value[1] !== 'one') return false;\n\n\treturn true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-map/is-implemented.js?"); - -/***/ }), - -/***/ "./node_modules/es6-map/is-native-implemented.js": -/*!*******************************************************!*\ - !*** ./node_modules/es6-map/is-native-implemented.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Exports true if environment provides native `Map` implementation,\n// whatever that is.\n\n\n\nmodule.exports = (function () {\n\tif (typeof Map === 'undefined') return false;\n\treturn (Object.prototype.toString.call(new Map()) === '[object Map]');\n}());\n\n\n//# sourceURL=webpack:///./node_modules/es6-map/is-native-implemented.js?"); - -/***/ }), - -/***/ "./node_modules/es6-map/lib/iterator-kinds.js": -/*!****************************************************!*\ - !*** ./node_modules/es6-map/lib/iterator-kinds.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = __webpack_require__(/*! es5-ext/object/primitive-set */ \"./node_modules/es5-ext/object/primitive-set.js\")('key',\n\t'value', 'key+value');\n\n\n//# sourceURL=webpack:///./node_modules/es6-map/lib/iterator-kinds.js?"); - -/***/ }), - -/***/ "./node_modules/es6-map/lib/iterator.js": -/*!**********************************************!*\ - !*** ./node_modules/es6-map/lib/iterator.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar setPrototypeOf = __webpack_require__(/*! es5-ext/object/set-prototype-of */ \"./node_modules/es5-ext/object/set-prototype-of/index.js\")\n , d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , Iterator = __webpack_require__(/*! es6-iterator */ \"./node_modules/es6-iterator/index.js\")\n , toStringTagSymbol = __webpack_require__(/*! es6-symbol */ \"./node_modules/es6-symbol/index.js\").toStringTag\n , kinds = __webpack_require__(/*! ./iterator-kinds */ \"./node_modules/es6-map/lib/iterator-kinds.js\")\n\n , defineProperties = Object.defineProperties\n , unBind = Iterator.prototype._unBind\n , MapIterator;\n\nMapIterator = module.exports = function (map, kind) {\n\tif (!(this instanceof MapIterator)) return new MapIterator(map, kind);\n\tIterator.call(this, map.__mapKeysData__, map);\n\tif (!kind || !kinds[kind]) kind = 'key+value';\n\tdefineProperties(this, {\n\t\t__kind__: d('', kind),\n\t\t__values__: d('w', map.__mapValuesData__)\n\t});\n};\nif (setPrototypeOf) setPrototypeOf(MapIterator, Iterator);\n\nMapIterator.prototype = Object.create(Iterator.prototype, {\n\tconstructor: d(MapIterator),\n\t_resolve: d(function (i) {\n\t\tif (this.__kind__ === 'value') return this.__values__[i];\n\t\tif (this.__kind__ === 'key') return this.__list__[i];\n\t\treturn [this.__list__[i], this.__values__[i]];\n\t}),\n\t_unBind: d(function () {\n\t\tthis.__values__ = null;\n\t\tunBind.call(this);\n\t}),\n\ttoString: d(function () { return '[object Map Iterator]'; })\n});\nObject.defineProperty(MapIterator.prototype, toStringTagSymbol,\n\td('c', 'Map Iterator'));\n\n\n//# sourceURL=webpack:///./node_modules/es6-map/lib/iterator.js?"); - -/***/ }), - -/***/ "./node_modules/es6-map/polyfill.js": -/*!******************************************!*\ - !*** ./node_modules/es6-map/polyfill.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar clear = __webpack_require__(/*! es5-ext/array/#/clear */ \"./node_modules/es5-ext/array/#/clear.js\")\n , eIndexOf = __webpack_require__(/*! es5-ext/array/#/e-index-of */ \"./node_modules/es5-ext/array/#/e-index-of.js\")\n , setPrototypeOf = __webpack_require__(/*! es5-ext/object/set-prototype-of */ \"./node_modules/es5-ext/object/set-prototype-of/index.js\")\n , callable = __webpack_require__(/*! es5-ext/object/valid-callable */ \"./node_modules/es5-ext/object/valid-callable.js\")\n , validValue = __webpack_require__(/*! es5-ext/object/valid-value */ \"./node_modules/es5-ext/object/valid-value.js\")\n , d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , ee = __webpack_require__(/*! event-emitter */ \"./node_modules/event-emitter/index.js\")\n , Symbol = __webpack_require__(/*! es6-symbol */ \"./node_modules/es6-symbol/index.js\")\n , iterator = __webpack_require__(/*! es6-iterator/valid-iterable */ \"./node_modules/es6-iterator/valid-iterable.js\")\n , forOf = __webpack_require__(/*! es6-iterator/for-of */ \"./node_modules/es6-iterator/for-of.js\")\n , Iterator = __webpack_require__(/*! ./lib/iterator */ \"./node_modules/es6-map/lib/iterator.js\")\n , isNative = __webpack_require__(/*! ./is-native-implemented */ \"./node_modules/es6-map/is-native-implemented.js\")\n\n , call = Function.prototype.call\n , defineProperties = Object.defineProperties, getPrototypeOf = Object.getPrototypeOf\n , MapPoly;\n\nmodule.exports = MapPoly = function (/*iterable*/) {\n\tvar iterable = arguments[0], keys, values, self;\n\tif (!(this instanceof MapPoly)) throw new TypeError('Constructor requires \\'new\\'');\n\tif (isNative && setPrototypeOf && (Map !== MapPoly)) {\n\t\tself = setPrototypeOf(new Map(), getPrototypeOf(this));\n\t} else {\n\t\tself = this;\n\t}\n\tif (iterable != null) iterator(iterable);\n\tdefineProperties(self, {\n\t\t__mapKeysData__: d('c', keys = []),\n\t\t__mapValuesData__: d('c', values = [])\n\t});\n\tif (!iterable) return self;\n\tforOf(iterable, function (value) {\n\t\tvar key = validValue(value)[0];\n\t\tvalue = value[1];\n\t\tif (eIndexOf.call(keys, key) !== -1) return;\n\t\tkeys.push(key);\n\t\tvalues.push(value);\n\t}, self);\n\treturn self;\n};\n\nif (isNative) {\n\tif (setPrototypeOf) setPrototypeOf(MapPoly, Map);\n\tMapPoly.prototype = Object.create(Map.prototype, {\n\t\tconstructor: d(MapPoly)\n\t});\n}\n\nee(defineProperties(MapPoly.prototype, {\n\tclear: d(function () {\n\t\tif (!this.__mapKeysData__.length) return;\n\t\tclear.call(this.__mapKeysData__);\n\t\tclear.call(this.__mapValuesData__);\n\t\tthis.emit('_clear');\n\t}),\n\tdelete: d(function (key) {\n\t\tvar index = eIndexOf.call(this.__mapKeysData__, key);\n\t\tif (index === -1) return false;\n\t\tthis.__mapKeysData__.splice(index, 1);\n\t\tthis.__mapValuesData__.splice(index, 1);\n\t\tthis.emit('_delete', index, key);\n\t\treturn true;\n\t}),\n\tentries: d(function () { return new Iterator(this, 'key+value'); }),\n\tforEach: d(function (cb/*, thisArg*/) {\n\t\tvar thisArg = arguments[1], iterator, result;\n\t\tcallable(cb);\n\t\titerator = this.entries();\n\t\tresult = iterator._next();\n\t\twhile (result !== undefined) {\n\t\t\tcall.call(cb, thisArg, this.__mapValuesData__[result],\n\t\t\t\tthis.__mapKeysData__[result], this);\n\t\t\tresult = iterator._next();\n\t\t}\n\t}),\n\tget: d(function (key) {\n\t\tvar index = eIndexOf.call(this.__mapKeysData__, key);\n\t\tif (index === -1) return;\n\t\treturn this.__mapValuesData__[index];\n\t}),\n\thas: d(function (key) {\n\t\treturn (eIndexOf.call(this.__mapKeysData__, key) !== -1);\n\t}),\n\tkeys: d(function () { return new Iterator(this, 'key'); }),\n\tset: d(function (key, value) {\n\t\tvar index = eIndexOf.call(this.__mapKeysData__, key), emit;\n\t\tif (index === -1) {\n\t\t\tindex = this.__mapKeysData__.push(key) - 1;\n\t\t\temit = true;\n\t\t}\n\t\tthis.__mapValuesData__[index] = value;\n\t\tif (emit) this.emit('_add', index, key);\n\t\treturn this;\n\t}),\n\tsize: d.gs(function () { return this.__mapKeysData__.length; }),\n\tvalues: d(function () { return new Iterator(this, 'value'); }),\n\ttoString: d(function () { return '[object Map]'; })\n}));\nObject.defineProperty(MapPoly.prototype, Symbol.iterator, d(function () {\n\treturn this.entries();\n}));\nObject.defineProperty(MapPoly.prototype, Symbol.toStringTag, d('c', 'Map'));\n\n\n//# sourceURL=webpack:///./node_modules/es6-map/polyfill.js?"); - -/***/ }), - -/***/ "./node_modules/es6-symbol/index.js": -/*!******************************************!*\ - !*** ./node_modules/es6-symbol/index.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/es6-symbol/is-implemented.js\")()\n\t? __webpack_require__(/*! ext/global-this */ \"./node_modules/ext/global-this/index.js\").Symbol\n\t: __webpack_require__(/*! ./polyfill */ \"./node_modules/es6-symbol/polyfill.js\");\n\n\n//# sourceURL=webpack:///./node_modules/es6-symbol/index.js?"); - -/***/ }), - -/***/ "./node_modules/es6-symbol/is-implemented.js": -/*!***************************************************!*\ - !*** ./node_modules/es6-symbol/is-implemented.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar global = __webpack_require__(/*! ext/global-this */ \"./node_modules/ext/global-this/index.js\")\n , validTypes = { object: true, symbol: true };\n\nmodule.exports = function () {\n\tvar Symbol = global.Symbol;\n\tvar symbol;\n\tif (typeof Symbol !== \"function\") return false;\n\tsymbol = Symbol(\"test symbol\");\n\ttry { String(symbol); }\n\tcatch (e) { return false; }\n\n\t// Return 'true' also for polyfills\n\tif (!validTypes[typeof Symbol.iterator]) return false;\n\tif (!validTypes[typeof Symbol.toPrimitive]) return false;\n\tif (!validTypes[typeof Symbol.toStringTag]) return false;\n\n\treturn true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-symbol/is-implemented.js?"); - -/***/ }), - -/***/ "./node_modules/es6-symbol/is-symbol.js": -/*!**********************************************!*\ - !*** ./node_modules/es6-symbol/is-symbol.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function (value) {\n\tif (!value) return false;\n\tif (typeof value === \"symbol\") return true;\n\tif (!value.constructor) return false;\n\tif (value.constructor.name !== \"Symbol\") return false;\n\treturn value[value.constructor.toStringTag] === \"Symbol\";\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-symbol/is-symbol.js?"); - -/***/ }), - -/***/ "./node_modules/es6-symbol/lib/private/generate-name.js": -/*!**************************************************************!*\ - !*** ./node_modules/es6-symbol/lib/private/generate-name.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\");\n\nvar create = Object.create, defineProperty = Object.defineProperty, objPrototype = Object.prototype;\n\nvar created = create(null);\nmodule.exports = function (desc) {\n\tvar postfix = 0, name, ie11BugWorkaround;\n\twhile (created[desc + (postfix || \"\")]) ++postfix;\n\tdesc += postfix || \"\";\n\tcreated[desc] = true;\n\tname = \"@@\" + desc;\n\tdefineProperty(\n\t\tobjPrototype,\n\t\tname,\n\t\td.gs(null, function (value) {\n\t\t\t// For IE11 issue see:\n\t\t\t// https://connect.microsoft.com/IE/feedbackdetail/view/1928508/\n\t\t\t// ie11-broken-getters-on-dom-objects\n\t\t\t// https://github.com/medikoo/es6-symbol/issues/12\n\t\t\tif (ie11BugWorkaround) return;\n\t\t\tie11BugWorkaround = true;\n\t\t\tdefineProperty(this, name, d(value));\n\t\t\tie11BugWorkaround = false;\n\t\t})\n\t);\n\treturn name;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-symbol/lib/private/generate-name.js?"); - -/***/ }), - -/***/ "./node_modules/es6-symbol/lib/private/setup/standard-symbols.js": -/*!***********************************************************************!*\ - !*** ./node_modules/es6-symbol/lib/private/setup/standard-symbols.js ***! - \***********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , NativeSymbol = __webpack_require__(/*! ext/global-this */ \"./node_modules/ext/global-this/index.js\").Symbol;\n\nmodule.exports = function (SymbolPolyfill) {\n\treturn Object.defineProperties(SymbolPolyfill, {\n\t\t// To ensure proper interoperability with other native functions (e.g. Array.from)\n\t\t// fallback to eventual native implementation of given symbol\n\t\thasInstance: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill(\"hasInstance\")\n\t\t),\n\t\tisConcatSpreadable: d(\n\t\t\t\"\",\n\t\t\t(NativeSymbol && NativeSymbol.isConcatSpreadable) ||\n\t\t\t\tSymbolPolyfill(\"isConcatSpreadable\")\n\t\t),\n\t\titerator: d(\"\", (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill(\"iterator\")),\n\t\tmatch: d(\"\", (NativeSymbol && NativeSymbol.match) || SymbolPolyfill(\"match\")),\n\t\treplace: d(\"\", (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill(\"replace\")),\n\t\tsearch: d(\"\", (NativeSymbol && NativeSymbol.search) || SymbolPolyfill(\"search\")),\n\t\tspecies: d(\"\", (NativeSymbol && NativeSymbol.species) || SymbolPolyfill(\"species\")),\n\t\tsplit: d(\"\", (NativeSymbol && NativeSymbol.split) || SymbolPolyfill(\"split\")),\n\t\ttoPrimitive: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill(\"toPrimitive\")\n\t\t),\n\t\ttoStringTag: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill(\"toStringTag\")\n\t\t),\n\t\tunscopables: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill(\"unscopables\")\n\t\t)\n\t});\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-symbol/lib/private/setup/standard-symbols.js?"); - -/***/ }), - -/***/ "./node_modules/es6-symbol/lib/private/setup/symbol-registry.js": -/*!**********************************************************************!*\ - !*** ./node_modules/es6-symbol/lib/private/setup/symbol-registry.js ***! - \**********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , validateSymbol = __webpack_require__(/*! ../../../validate-symbol */ \"./node_modules/es6-symbol/validate-symbol.js\");\n\nvar registry = Object.create(null);\n\nmodule.exports = function (SymbolPolyfill) {\n\treturn Object.defineProperties(SymbolPolyfill, {\n\t\tfor: d(function (key) {\n\t\t\tif (registry[key]) return registry[key];\n\t\t\treturn (registry[key] = SymbolPolyfill(String(key)));\n\t\t}),\n\t\tkeyFor: d(function (symbol) {\n\t\t\tvar key;\n\t\t\tvalidateSymbol(symbol);\n\t\t\tfor (key in registry) {\n\t\t\t\tif (registry[key] === symbol) return key;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t})\n\t});\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-symbol/lib/private/setup/symbol-registry.js?"); - -/***/ }), - -/***/ "./node_modules/es6-symbol/polyfill.js": -/*!*********************************************!*\ - !*** ./node_modules/es6-symbol/polyfill.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// ES2015 Symbol polyfill for environments that do not (or partially) support it\n\n\n\nvar d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , validateSymbol = __webpack_require__(/*! ./validate-symbol */ \"./node_modules/es6-symbol/validate-symbol.js\")\n , NativeSymbol = __webpack_require__(/*! ext/global-this */ \"./node_modules/ext/global-this/index.js\").Symbol\n , generateName = __webpack_require__(/*! ./lib/private/generate-name */ \"./node_modules/es6-symbol/lib/private/generate-name.js\")\n , setupStandardSymbols = __webpack_require__(/*! ./lib/private/setup/standard-symbols */ \"./node_modules/es6-symbol/lib/private/setup/standard-symbols.js\")\n , setupSymbolRegistry = __webpack_require__(/*! ./lib/private/setup/symbol-registry */ \"./node_modules/es6-symbol/lib/private/setup/symbol-registry.js\");\n\nvar create = Object.create\n , defineProperties = Object.defineProperties\n , defineProperty = Object.defineProperty;\n\nvar SymbolPolyfill, HiddenSymbol, isNativeSafe;\n\nif (typeof NativeSymbol === \"function\") {\n\ttry {\n\t\tString(NativeSymbol());\n\t\tisNativeSafe = true;\n\t} catch (ignore) {}\n} else {\n\tNativeSymbol = null;\n}\n\n// Internal constructor (not one exposed) for creating Symbol instances.\n// This one is used to ensure that `someSymbol instanceof Symbol` always return false\nHiddenSymbol = function Symbol(description) {\n\tif (this instanceof HiddenSymbol) throw new TypeError(\"Symbol is not a constructor\");\n\treturn SymbolPolyfill(description);\n};\n\n// Exposed `Symbol` constructor\n// (returns instances of HiddenSymbol)\nmodule.exports = SymbolPolyfill = function Symbol(description) {\n\tvar symbol;\n\tif (this instanceof Symbol) throw new TypeError(\"Symbol is not a constructor\");\n\tif (isNativeSafe) return NativeSymbol(description);\n\tsymbol = create(HiddenSymbol.prototype);\n\tdescription = description === undefined ? \"\" : String(description);\n\treturn defineProperties(symbol, {\n\t\t__description__: d(\"\", description),\n\t\t__name__: d(\"\", generateName(description))\n\t});\n};\n\nsetupStandardSymbols(SymbolPolyfill);\nsetupSymbolRegistry(SymbolPolyfill);\n\n// Internal tweaks for real symbol producer\ndefineProperties(HiddenSymbol.prototype, {\n\tconstructor: d(SymbolPolyfill),\n\ttoString: d(\"\", function () { return this.__name__; })\n});\n\n// Proper implementation of methods exposed on Symbol.prototype\n// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype\ndefineProperties(SymbolPolyfill.prototype, {\n\ttoString: d(function () { return \"Symbol (\" + validateSymbol(this).__description__ + \")\"; }),\n\tvalueOf: d(function () { return validateSymbol(this); })\n});\ndefineProperty(\n\tSymbolPolyfill.prototype,\n\tSymbolPolyfill.toPrimitive,\n\td(\"\", function () {\n\t\tvar symbol = validateSymbol(this);\n\t\tif (typeof symbol === \"symbol\") return symbol;\n\t\treturn symbol.toString();\n\t})\n);\ndefineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d(\"c\", \"Symbol\"));\n\n// Proper implementaton of toPrimitive and toStringTag for returned symbol instances\ndefineProperty(\n\tHiddenSymbol.prototype, SymbolPolyfill.toStringTag,\n\td(\"c\", SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])\n);\n\n// Note: It's important to define `toPrimitive` as last one, as some implementations\n// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols)\n// And that may invoke error in definition flow:\n// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149\ndefineProperty(\n\tHiddenSymbol.prototype, SymbolPolyfill.toPrimitive,\n\td(\"c\", SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])\n);\n\n\n//# sourceURL=webpack:///./node_modules/es6-symbol/polyfill.js?"); - -/***/ }), - -/***/ "./node_modules/es6-symbol/validate-symbol.js": -/*!****************************************************!*\ - !*** ./node_modules/es6-symbol/validate-symbol.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar isSymbol = __webpack_require__(/*! ./is-symbol */ \"./node_modules/es6-symbol/is-symbol.js\");\n\nmodule.exports = function (value) {\n\tif (!isSymbol(value)) throw new TypeError(value + \" is not a symbol\");\n\treturn value;\n};\n\n\n//# sourceURL=webpack:///./node_modules/es6-symbol/validate-symbol.js?"); - -/***/ }), - -/***/ "./node_modules/event-emitter/index.js": -/*!*********************************************!*\ - !*** ./node_modules/event-emitter/index.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar d = __webpack_require__(/*! d */ \"./node_modules/d/index.js\")\n , callable = __webpack_require__(/*! es5-ext/object/valid-callable */ \"./node_modules/es5-ext/object/valid-callable.js\")\n\n , apply = Function.prototype.apply, call = Function.prototype.call\n , create = Object.create, defineProperty = Object.defineProperty\n , defineProperties = Object.defineProperties\n , hasOwnProperty = Object.prototype.hasOwnProperty\n , descriptor = { configurable: true, enumerable: false, writable: true }\n\n , on, once, off, emit, methods, descriptors, base;\n\non = function (type, listener) {\n\tvar data;\n\n\tcallable(listener);\n\n\tif (!hasOwnProperty.call(this, '__ee__')) {\n\t\tdata = descriptor.value = create(null);\n\t\tdefineProperty(this, '__ee__', descriptor);\n\t\tdescriptor.value = null;\n\t} else {\n\t\tdata = this.__ee__;\n\t}\n\tif (!data[type]) data[type] = listener;\n\telse if (typeof data[type] === 'object') data[type].push(listener);\n\telse data[type] = [data[type], listener];\n\n\treturn this;\n};\n\nonce = function (type, listener) {\n\tvar once, self;\n\n\tcallable(listener);\n\tself = this;\n\ton.call(this, type, once = function () {\n\t\toff.call(self, type, once);\n\t\tapply.call(listener, this, arguments);\n\t});\n\n\tonce.__eeOnceListener__ = listener;\n\treturn this;\n};\n\noff = function (type, listener) {\n\tvar data, listeners, candidate, i;\n\n\tcallable(listener);\n\n\tif (!hasOwnProperty.call(this, '__ee__')) return this;\n\tdata = this.__ee__;\n\tif (!data[type]) return this;\n\tlisteners = data[type];\n\n\tif (typeof listeners === 'object') {\n\t\tfor (i = 0; (candidate = listeners[i]); ++i) {\n\t\t\tif ((candidate === listener) ||\n\t\t\t\t\t(candidate.__eeOnceListener__ === listener)) {\n\t\t\t\tif (listeners.length === 2) data[type] = listeners[i ? 0 : 1];\n\t\t\t\telse listeners.splice(i, 1);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif ((listeners === listener) ||\n\t\t\t\t(listeners.__eeOnceListener__ === listener)) {\n\t\t\tdelete data[type];\n\t\t}\n\t}\n\n\treturn this;\n};\n\nemit = function (type) {\n\tvar i, l, listener, listeners, args;\n\n\tif (!hasOwnProperty.call(this, '__ee__')) return;\n\tlisteners = this.__ee__[type];\n\tif (!listeners) return;\n\n\tif (typeof listeners === 'object') {\n\t\tl = arguments.length;\n\t\targs = new Array(l - 1);\n\t\tfor (i = 1; i < l; ++i) args[i - 1] = arguments[i];\n\n\t\tlisteners = listeners.slice();\n\t\tfor (i = 0; (listener = listeners[i]); ++i) {\n\t\t\tapply.call(listener, this, args);\n\t\t}\n\t} else {\n\t\tswitch (arguments.length) {\n\t\tcase 1:\n\t\t\tcall.call(listeners, this);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcall.call(listeners, this, arguments[1]);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tcall.call(listeners, this, arguments[1], arguments[2]);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tl = arguments.length;\n\t\t\targs = new Array(l - 1);\n\t\t\tfor (i = 1; i < l; ++i) {\n\t\t\t\targs[i - 1] = arguments[i];\n\t\t\t}\n\t\t\tapply.call(listeners, this, args);\n\t\t}\n\t}\n};\n\nmethods = {\n\ton: on,\n\tonce: once,\n\toff: off,\n\temit: emit\n};\n\ndescriptors = {\n\ton: d(on),\n\tonce: d(once),\n\toff: d(off),\n\temit: d(emit)\n};\n\nbase = defineProperties({}, descriptors);\n\nmodule.exports = exports = function (o) {\n\treturn (o == null) ? create(base) : defineProperties(Object(o), descriptors);\n};\nexports.methods = methods;\n\n\n//# sourceURL=webpack:///./node_modules/event-emitter/index.js?"); - -/***/ }), - -/***/ "./node_modules/ext/global-this/implementation.js": -/*!********************************************************!*\ - !*** ./node_modules/ext/global-this/implementation.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("var naiveFallback = function () {\n\tif (typeof self === \"object\" && self) return self;\n\tif (typeof window === \"object\" && window) return window;\n\tthrow new Error(\"Unable to resolve global `this`\");\n};\n\nmodule.exports = (function () {\n\tif (this) return this;\n\n\t// Unexpected strict mode (may happen if e.g. bundled into ESM module)\n\n\t// Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis\n\t// In all ES5+ engines global object inherits from Object.prototype\n\t// (if you approached one that doesn't please report)\n\ttry {\n\t\tObject.defineProperty(Object.prototype, \"__global__\", {\n\t\t\tget: function () { return this; },\n\t\t\tconfigurable: true\n\t\t});\n\t} catch (error) {\n\t\t// Unfortunate case of Object.prototype being sealed (via preventExtensions, seal or freeze)\n\t\treturn naiveFallback();\n\t}\n\ttry {\n\t\t// Safari case (window.__global__ is resolved with global context, but __global__ does not)\n\t\tif (!__global__) return naiveFallback();\n\t\treturn __global__;\n\t} finally {\n\t\tdelete Object.prototype.__global__;\n\t}\n})();\n\n\n//# sourceURL=webpack:///./node_modules/ext/global-this/implementation.js?"); - -/***/ }), - -/***/ "./node_modules/ext/global-this/index.js": -/*!***********************************************!*\ - !*** ./node_modules/ext/global-this/index.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = __webpack_require__(/*! ./is-implemented */ \"./node_modules/ext/global-this/is-implemented.js\")() ? globalThis : __webpack_require__(/*! ./implementation */ \"./node_modules/ext/global-this/implementation.js\");\n\n\n//# sourceURL=webpack:///./node_modules/ext/global-this/index.js?"); - -/***/ }), - -/***/ "./node_modules/ext/global-this/is-implemented.js": -/*!********************************************************!*\ - !*** ./node_modules/ext/global-this/is-implemented.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function () {\n\tif (typeof globalThis !== \"object\") return false;\n\tif (!globalThis) return false;\n\treturn globalThis.Array === Array;\n};\n\n\n//# sourceURL=webpack:///./node_modules/ext/global-this/is-implemented.js?"); - -/***/ }), - -/***/ "./node_modules/ieee754/index.js": -/*!***************************************!*\ - !*** ./node_modules/ieee754/index.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n//# sourceURL=webpack:///./node_modules/ieee754/index.js?"); - -/***/ }), - -/***/ "./node_modules/inherits/inherits_browser.js": -/*!***************************************************!*\ - !*** ./node_modules/inherits/inherits_browser.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n\n\n//# sourceURL=webpack:///./node_modules/inherits/inherits_browser.js?"); - -/***/ }), - -/***/ "./node_modules/is-buffer/index.js": -/*!*****************************************!*\ - !*** ./node_modules/is-buffer/index.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\nmodule.exports = function isBuffer (obj) {\n return obj != null && obj.constructor != null &&\n typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n\n//# sourceURL=webpack:///./node_modules/is-buffer/index.js?"); - -/***/ }), - -/***/ "./node_modules/isarray/index.js": -/*!***************************************!*\ - !*** ./node_modules/isarray/index.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n//# sourceURL=webpack:///./node_modules/isarray/index.js?"); - -/***/ }), - -/***/ "./node_modules/mqtt-packet/constants.js": -/*!***********************************************!*\ - !*** ./node_modules/mqtt-packet/constants.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer\n\n/* Protocol - protocol constants */\nvar protocol = module.exports\n\n/* Command code => mnemonic */\nprotocol.types = {\n 0: 'reserved',\n 1: 'connect',\n 2: 'connack',\n 3: 'publish',\n 4: 'puback',\n 5: 'pubrec',\n 6: 'pubrel',\n 7: 'pubcomp',\n 8: 'subscribe',\n 9: 'suback',\n 10: 'unsubscribe',\n 11: 'unsuback',\n 12: 'pingreq',\n 13: 'pingresp',\n 14: 'disconnect',\n 15: 'reserved'\n}\n\n/* Mnemonic => Command code */\nprotocol.codes = {}\nfor (var k in protocol.types) {\n var v = protocol.types[k]\n protocol.codes[v] = k\n}\n\n/* Header */\nprotocol.CMD_SHIFT = 4\nprotocol.CMD_MASK = 0xF0\nprotocol.DUP_MASK = 0x08\nprotocol.QOS_MASK = 0x03\nprotocol.QOS_SHIFT = 1\nprotocol.RETAIN_MASK = 0x01\n\n/* Length */\nprotocol.LENGTH_MASK = 0x7F\nprotocol.LENGTH_FIN_MASK = 0x80\n\n/* Connack */\nprotocol.SESSIONPRESENT_MASK = 0x01\nprotocol.SESSIONPRESENT_HEADER = Buffer.from([protocol.SESSIONPRESENT_MASK])\nprotocol.CONNACK_HEADER = Buffer.from([protocol.codes['connack'] << protocol.CMD_SHIFT])\n\n/* Connect */\nprotocol.USERNAME_MASK = 0x80\nprotocol.PASSWORD_MASK = 0x40\nprotocol.WILL_RETAIN_MASK = 0x20\nprotocol.WILL_QOS_MASK = 0x18\nprotocol.WILL_QOS_SHIFT = 3\nprotocol.WILL_FLAG_MASK = 0x04\nprotocol.CLEAN_SESSION_MASK = 0x02\nprotocol.CONNECT_HEADER = Buffer.from([protocol.codes['connect'] << protocol.CMD_SHIFT])\n\nfunction genHeader (type) {\n return [0, 1, 2].map(function (qos) {\n return [0, 1].map(function (dup) {\n return [0, 1].map(function (retain) {\n var buf = new Buffer(1)\n buf.writeUInt8(\n protocol.codes[type] << protocol.CMD_SHIFT |\n (dup ? protocol.DUP_MASK : 0) |\n qos << protocol.QOS_SHIFT | retain, 0, true)\n return buf\n })\n })\n })\n}\n\n/* Publish */\nprotocol.PUBLISH_HEADER = genHeader('publish')\n\n/* Subscribe */\nprotocol.SUBSCRIBE_HEADER = genHeader('subscribe')\n\n/* Unsubscribe */\nprotocol.UNSUBSCRIBE_HEADER = genHeader('unsubscribe')\n\n/* Confirmations */\nprotocol.ACKS = {\n unsuback: genHeader('unsuback'),\n puback: genHeader('puback'),\n pubcomp: genHeader('pubcomp'),\n pubrel: genHeader('pubrel'),\n pubrec: genHeader('pubrec')\n}\n\nprotocol.SUBACK_HEADER = Buffer.from([protocol.codes['suback'] << protocol.CMD_SHIFT])\n\n/* Protocol versions */\nprotocol.VERSION3 = Buffer.from([3])\nprotocol.VERSION4 = Buffer.from([4])\n\n/* QoS */\nprotocol.QOS = [0, 1, 2].map(function (qos) {\n return Buffer.from([qos])\n})\n\n/* Empty packets */\nprotocol.EMPTY = {\n pingreq: Buffer.from([protocol.codes['pingreq'] << 4, 0]),\n pingresp: Buffer.from([protocol.codes['pingresp'] << 4, 0]),\n disconnect: Buffer.from([protocol.codes['disconnect'] << 4, 0])\n}\n\n\n//# sourceURL=webpack:///./node_modules/mqtt-packet/constants.js?"); - -/***/ }), - -/***/ "./node_modules/mqtt-packet/generate.js": -/*!**********************************************!*\ - !*** ./node_modules/mqtt-packet/generate.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer\nvar writeToStream = __webpack_require__(/*! ./writeToStream */ \"./node_modules/mqtt-packet/writeToStream.js\")\nvar EE = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\").EventEmitter\nvar inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\")\n\nfunction generate (packet) {\n var stream = new Accumulator()\n writeToStream(packet, stream)\n return stream.concat()\n}\n\nfunction Accumulator () {\n this._array = new Array(20)\n this._i = 0\n}\n\ninherits(Accumulator, EE)\n\nAccumulator.prototype.write = function (chunk) {\n this._array[this._i++] = chunk\n return true\n}\n\nAccumulator.prototype.concat = function () {\n var length = 0\n var lengths = new Array(this._array.length)\n var list = this._array\n var pos = 0\n var i\n var result\n\n for (i = 0; i < list.length && list[i] !== undefined; i++) {\n if (typeof list[i] !== 'string') lengths[i] = list[i].length\n else lengths[i] = Buffer.byteLength(list[i])\n\n length += lengths[i]\n }\n\n result = Buffer.allocUnsafe(length)\n\n for (i = 0; i < list.length && list[i] !== undefined; i++) {\n if (typeof list[i] !== 'string') {\n list[i].copy(result, pos)\n pos += lengths[i]\n } else {\n result.write(list[i], pos)\n pos += lengths[i]\n }\n }\n\n return result\n}\n\nmodule.exports = generate\n\n\n//# sourceURL=webpack:///./node_modules/mqtt-packet/generate.js?"); - -/***/ }), - -/***/ "./node_modules/mqtt-packet/mqtt.js": -/*!******************************************!*\ - !*** ./node_modules/mqtt-packet/mqtt.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nexports.parser = __webpack_require__(/*! ./parser */ \"./node_modules/mqtt-packet/parser.js\")\nexports.generate = __webpack_require__(/*! ./generate */ \"./node_modules/mqtt-packet/generate.js\")\nexports.writeToStream = __webpack_require__(/*! ./writeToStream */ \"./node_modules/mqtt-packet/writeToStream.js\")\n\n\n//# sourceURL=webpack:///./node_modules/mqtt-packet/mqtt.js?"); - -/***/ }), - -/***/ "./node_modules/mqtt-packet/numbers.js": -/*!*********************************************!*\ - !*** ./node_modules/mqtt-packet/numbers.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer\nvar max = 65536\nvar cache = {}\n\nfunction generateBuffer (i) {\n var buffer = Buffer.allocUnsafe(2)\n buffer.writeUInt8(i >> 8, 0)\n buffer.writeUInt8(i & 0x00FF, 0 + 1)\n\n return buffer\n}\n\nfunction generateCache () {\n for (var i = 0; i < max; i++) {\n cache[i] = generateBuffer(i)\n }\n}\n\nmodule.exports = {\n cache: cache,\n generateCache: generateCache,\n generateNumber: generateBuffer\n}\n\n\n//# sourceURL=webpack:///./node_modules/mqtt-packet/numbers.js?"); - -/***/ }), - -/***/ "./node_modules/mqtt-packet/packet.js": -/*!********************************************!*\ - !*** ./node_modules/mqtt-packet/packet.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("\nfunction Packet () {\n this.cmd = null\n this.retain = false\n this.qos = 0\n this.dup = false\n this.length = -1\n this.topic = null\n this.payload = null\n}\n\nmodule.exports = Packet\n\n\n//# sourceURL=webpack:///./node_modules/mqtt-packet/packet.js?"); - -/***/ }), - -/***/ "./node_modules/mqtt-packet/parser.js": -/*!********************************************!*\ - !*** ./node_modules/mqtt-packet/parser.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar bl = __webpack_require__(/*! bl */ \"./node_modules/bl/bl.js\")\nvar inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\")\nvar EE = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\").EventEmitter\nvar Packet = __webpack_require__(/*! ./packet */ \"./node_modules/mqtt-packet/packet.js\")\nvar constants = __webpack_require__(/*! ./constants */ \"./node_modules/mqtt-packet/constants.js\")\n\nfunction Parser () {\n if (!(this instanceof Parser)) return new Parser()\n\n this._states = [\n '_parseHeader',\n '_parseLength',\n '_parsePayload',\n '_newPacket'\n ]\n\n this._resetState()\n}\n\ninherits(Parser, EE)\n\nParser.prototype._resetState = function () {\n this.packet = new Packet()\n this.error = null\n this._list = bl()\n this._stateCounter = 0\n}\n\nParser.prototype.parse = function (buf) {\n if (this.error) this._resetState()\n\n this._list.append(buf)\n\n while ((this.packet.length !== -1 || this._list.length > 0) &&\n this[this._states[this._stateCounter]]() &&\n !this.error) {\n this._stateCounter++\n\n if (this._stateCounter >= this._states.length) this._stateCounter = 0\n }\n\n return this._list.length\n}\n\nParser.prototype._parseHeader = function () {\n // There is at least one byte in the buffer\n var zero = this._list.readUInt8(0)\n this.packet.cmd = constants.types[zero >> constants.CMD_SHIFT]\n this.packet.retain = (zero & constants.RETAIN_MASK) !== 0\n this.packet.qos = (zero >> constants.QOS_SHIFT) & constants.QOS_MASK\n this.packet.dup = (zero & constants.DUP_MASK) !== 0\n\n this._list.consume(1)\n\n return true\n}\n\nParser.prototype._parseLength = function () {\n // There is at least one byte in the list\n var bytes = 0\n var mul = 1\n var length = 0\n var result = true\n var current\n\n while (bytes < 5) {\n current = this._list.readUInt8(bytes++)\n length += mul * (current & constants.LENGTH_MASK)\n mul *= 0x80\n\n if ((current & constants.LENGTH_FIN_MASK) === 0) break\n if (this._list.length <= bytes) {\n result = false\n break\n }\n }\n\n if (result) {\n this.packet.length = length\n this._list.consume(bytes)\n }\n\n return result\n}\n\nParser.prototype._parsePayload = function () {\n var result = false\n\n // Do we have a payload? Do we have enough data to complete the payload?\n // PINGs have no payload\n if (this.packet.length === 0 || this._list.length >= this.packet.length) {\n this._pos = 0\n\n switch (this.packet.cmd) {\n case 'connect':\n this._parseConnect()\n break\n case 'connack':\n this._parseConnack()\n break\n case 'publish':\n this._parsePublish()\n break\n case 'puback':\n case 'pubrec':\n case 'pubrel':\n case 'pubcomp':\n this._parseMessageId()\n break\n case 'subscribe':\n this._parseSubscribe()\n break\n case 'suback':\n this._parseSuback()\n break\n case 'unsubscribe':\n this._parseUnsubscribe()\n break\n case 'unsuback':\n this._parseUnsuback()\n break\n case 'pingreq':\n case 'pingresp':\n case 'disconnect':\n // These are empty, nothing to do\n break\n default:\n this._emitError(new Error('Not supported'))\n }\n\n result = true\n }\n\n return result\n}\n\nParser.prototype._parseConnect = function () {\n var protocolId // Protocol ID\n var clientId // Client ID\n var topic // Will topic\n var payload // Will payload\n var password // Password\n var username // Username\n var flags = {}\n var packet = this.packet\n\n // Parse protocolId\n protocolId = this._parseString()\n\n if (protocolId === null) return this._emitError(new Error('Cannot parse protocolId'))\n if (protocolId !== 'MQTT' && protocolId !== 'MQIsdp') {\n return this._emitError(new Error('Invalid protocolId'))\n }\n\n packet.protocolId = protocolId\n\n // Parse constants version number\n if (this._pos >= this._list.length) return this._emitError(new Error('Packet too short'))\n\n packet.protocolVersion = this._list.readUInt8(this._pos)\n\n if (packet.protocolVersion !== 3 && packet.protocolVersion !== 4) {\n return this._emitError(new Error('Invalid protocol version'))\n }\n\n this._pos++\n\n if (this._pos >= this._list.length) {\n return this._emitError(new Error('Packet too short'))\n }\n\n // Parse connect flags\n flags.username = (this._list.readUInt8(this._pos) & constants.USERNAME_MASK)\n flags.password = (this._list.readUInt8(this._pos) & constants.PASSWORD_MASK)\n flags.will = (this._list.readUInt8(this._pos) & constants.WILL_FLAG_MASK)\n\n if (flags.will) {\n packet.will = {}\n packet.will.retain = (this._list.readUInt8(this._pos) & constants.WILL_RETAIN_MASK) !== 0\n packet.will.qos = (this._list.readUInt8(this._pos) &\n constants.WILL_QOS_MASK) >> constants.WILL_QOS_SHIFT\n }\n\n packet.clean = (this._list.readUInt8(this._pos) & constants.CLEAN_SESSION_MASK) !== 0\n this._pos++\n\n // Parse keepalive\n packet.keepalive = this._parseNum()\n if (packet.keepalive === -1) return this._emitError(new Error('Packet too short'))\n\n // Parse clientId\n clientId = this._parseString()\n if (clientId === null) return this._emitError(new Error('Packet too short'))\n packet.clientId = clientId\n\n if (flags.will) {\n // Parse will topic\n topic = this._parseString()\n if (topic === null) return this._emitError(new Error('Cannot parse will topic'))\n packet.will.topic = topic\n\n // Parse will payload\n payload = this._parseBuffer()\n if (payload === null) return this._emitError(new Error('Cannot parse will payload'))\n packet.will.payload = payload\n }\n\n // Parse username\n if (flags.username) {\n username = this._parseString()\n if (username === null) return this._emitError(new Error('Cannot parse username'))\n packet.username = username\n }\n\n // Parse password\n if (flags.password) {\n password = this._parseBuffer()\n if (password === null) return this._emitError(new Error('Cannot parse password'))\n packet.password = password\n }\n\n return packet\n}\n\nParser.prototype._parseConnack = function () {\n var packet = this.packet\n\n if (this._list.length < 2) return null\n\n packet.sessionPresent = !!(this._list.readUInt8(this._pos++) & constants.SESSIONPRESENT_MASK)\n packet.returnCode = this._list.readUInt8(this._pos)\n\n if (packet.returnCode === -1) return this._emitError(new Error('Cannot parse return code'))\n}\n\nParser.prototype._parsePublish = function () {\n var packet = this.packet\n packet.topic = this._parseString()\n\n if (packet.topic === null) return this._emitError(new Error('Cannot parse topic'))\n\n // Parse messageId\n if (packet.qos > 0) if (!this._parseMessageId()) { return }\n\n packet.payload = this._list.slice(this._pos, packet.length)\n}\n\nParser.prototype._parseSubscribe = function () {\n var packet = this.packet\n var topic\n var qos\n\n if (packet.qos !== 1) {\n return this._emitError(new Error('Wrong subscribe header'))\n }\n\n packet.subscriptions = []\n\n if (!this._parseMessageId()) { return }\n\n while (this._pos < packet.length) {\n // Parse topic\n topic = this._parseString()\n if (topic === null) return this._emitError(new Error('Cannot parse topic'))\n\n if (this._pos >= packet.length) return this._emitError(new Error('Malformed Subscribe Payload'))\n qos = this._list.readUInt8(this._pos++)\n\n // Push pair to subscriptions\n packet.subscriptions.push({ topic: topic, qos: qos })\n }\n}\n\nParser.prototype._parseSuback = function () {\n this.packet.granted = []\n\n if (!this._parseMessageId()) { return }\n\n // Parse granted QoSes\n while (this._pos < this.packet.length) {\n this.packet.granted.push(this._list.readUInt8(this._pos++))\n }\n}\n\nParser.prototype._parseUnsubscribe = function () {\n var packet = this.packet\n\n packet.unsubscriptions = []\n\n // Parse messageId\n if (!this._parseMessageId()) { return }\n\n while (this._pos < packet.length) {\n var topic\n\n // Parse topic\n topic = this._parseString()\n if (topic === null) return this._emitError(new Error('Cannot parse topic'))\n\n // Push topic to unsubscriptions\n packet.unsubscriptions.push(topic)\n }\n}\n\nParser.prototype._parseUnsuback = function () {\n if (!this._parseMessageId()) return this._emitError(new Error('Cannot parse messageId'))\n}\n\nParser.prototype._parseMessageId = function () {\n var packet = this.packet\n\n packet.messageId = this._parseNum()\n\n if (packet.messageId === null) {\n this._emitError(new Error('Cannot parse messageId'))\n return false\n }\n\n return true\n}\n\nParser.prototype._parseString = function (maybeBuffer) {\n var length = this._parseNum()\n var result\n var end = length + this._pos\n\n if (length === -1 || end > this._list.length || end > this.packet.length) return null\n\n result = this._list.toString('utf8', this._pos, end)\n this._pos += length\n\n return result\n}\n\nParser.prototype._parseBuffer = function () {\n var length = this._parseNum()\n var result\n var end = length + this._pos\n\n if (length === -1 || end > this._list.length || end > this.packet.length) return null\n\n result = this._list.slice(this._pos, end)\n\n this._pos += length\n\n return result\n}\n\nParser.prototype._parseNum = function () {\n if (this._list.length - this._pos < 2) return -1\n\n var result = this._list.readUInt16BE(this._pos)\n this._pos += 2\n\n return result\n}\n\nParser.prototype._newPacket = function () {\n if (this.packet) {\n this._list.consume(this.packet.length)\n this.emit('packet', this.packet)\n }\n\n this.packet = new Packet()\n\n return true\n}\n\nParser.prototype._emitError = function (err) {\n this.error = err\n this.emit('error', err)\n}\n\nmodule.exports = Parser\n\n\n//# sourceURL=webpack:///./node_modules/mqtt-packet/parser.js?"); - -/***/ }), - -/***/ "./node_modules/mqtt-packet/writeToStream.js": -/*!***************************************************!*\ - !*** ./node_modules/mqtt-packet/writeToStream.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar protocol = __webpack_require__(/*! ./constants */ \"./node_modules/mqtt-packet/constants.js\")\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer\nvar empty = Buffer.allocUnsafe(0)\nvar zeroBuf = Buffer.from([0])\nvar numbers = __webpack_require__(/*! ./numbers */ \"./node_modules/mqtt-packet/numbers.js\")\nvar nextTick = __webpack_require__(/*! process-nextick-args */ \"./node_modules/process-nextick-args/index.js\").nextTick\n\nvar numCache = numbers.cache\nvar generateNumber = numbers.generateNumber\nvar generateCache = numbers.generateCache\nvar writeNumber = writeNumberCached\nvar toGenerate = true\n\nfunction generate (packet, stream) {\n if (stream.cork) {\n stream.cork()\n nextTick(uncork, stream)\n }\n\n if (toGenerate) {\n toGenerate = false\n generateCache()\n }\n\n switch (packet.cmd) {\n case 'connect':\n return connect(packet, stream)\n case 'connack':\n return connack(packet, stream)\n case 'publish':\n return publish(packet, stream)\n case 'puback':\n case 'pubrec':\n case 'pubrel':\n case 'pubcomp':\n case 'unsuback':\n return confirmation(packet, stream)\n case 'subscribe':\n return subscribe(packet, stream)\n case 'suback':\n return suback(packet, stream)\n case 'unsubscribe':\n return unsubscribe(packet, stream)\n case 'pingreq':\n case 'pingresp':\n case 'disconnect':\n return emptyPacket(packet, stream)\n default:\n stream.emit('error', new Error('Unknown command'))\n return false\n }\n}\n/**\n * Controls numbers cache.\n * Set to \"false\" to allocate buffers on-the-flight instead of pre-generated cache\n */\nObject.defineProperty(generate, 'cacheNumbers', {\n get: function () {\n return writeNumber === writeNumberCached\n },\n set: function (value) {\n if (value) {\n if (!numCache || Object.keys(numCache).length === 0) toGenerate = true\n writeNumber = writeNumberCached\n } else {\n toGenerate = false\n writeNumber = writeNumberGenerated\n }\n }\n})\n\nfunction uncork (stream) {\n stream.uncork()\n}\n\nfunction connect (opts, stream) {\n var settings = opts || {}\n var protocolId = settings.protocolId || 'MQTT'\n var protocolVersion = settings.protocolVersion || 4\n var will = settings.will\n var clean = settings.clean\n var keepalive = settings.keepalive || 0\n var clientId = settings.clientId || ''\n var username = settings.username\n var password = settings.password\n\n if (clean === undefined) clean = true\n\n var length = 0\n\n // Must be a string and non-falsy\n if (!protocolId ||\n (typeof protocolId !== 'string' && !Buffer.isBuffer(protocolId))) {\n stream.emit('error', new Error('Invalid protocolId'))\n return false\n } else length += protocolId.length + 2\n\n // Must be 3 or 4\n if (protocolVersion !== 3 && protocolVersion !== 4) {\n stream.emit('error', new Error('Invalid protocol version'))\n return false\n } else length += 1\n\n // ClientId might be omitted in 3.1.1, but only if cleanSession is set to 1\n if ((typeof clientId === 'string' || Buffer.isBuffer(clientId)) &&\n (clientId || protocolVersion === 4) && (clientId || clean)) {\n length += clientId.length + 2\n } else {\n if (protocolVersion < 4) {\n stream.emit('error', new Error('clientId must be supplied before 3.1.1'))\n return false\n }\n if ((clean * 1) === 0) {\n stream.emit('error', new Error('clientId must be given if cleanSession set to 0'))\n return false\n }\n }\n\n // Must be a two byte number\n if (typeof keepalive !== 'number' ||\n keepalive < 0 ||\n keepalive > 65535 ||\n keepalive % 1 !== 0) {\n stream.emit('error', new Error('Invalid keepalive'))\n return false\n } else length += 2\n\n // Connect flags\n length += 1\n\n // If will exists...\n if (will) {\n // It must be an object\n if (typeof will !== 'object') {\n stream.emit('error', new Error('Invalid will'))\n return false\n }\n // It must have topic typeof string\n if (!will.topic || typeof will.topic !== 'string') {\n stream.emit('error', new Error('Invalid will topic'))\n return false\n } else {\n length += Buffer.byteLength(will.topic) + 2\n }\n\n // Payload\n if (will.payload && will.payload) {\n if (will.payload.length >= 0) {\n if (typeof will.payload === 'string') {\n length += Buffer.byteLength(will.payload) + 2\n } else {\n length += will.payload.length + 2\n }\n } else {\n stream.emit('error', new Error('Invalid will payload'))\n return false\n }\n } else {\n length += 2\n }\n }\n\n // Username\n var providedUsername = false\n if (username != null) {\n if (isStringOrBuffer(username)) {\n providedUsername = true\n length += Buffer.byteLength(username) + 2\n } else {\n stream.emit('error', new Error('Invalid username'))\n return false\n }\n }\n\n // Password\n if (password != null) {\n if (!providedUsername) {\n stream.emit('error', new Error('Username is required to use password'))\n return false\n }\n\n if (isStringOrBuffer(password)) {\n length += byteLength(password) + 2\n } else {\n stream.emit('error', new Error('Invalid password'))\n return false\n }\n }\n\n // Generate header\n stream.write(protocol.CONNECT_HEADER)\n\n // Generate length\n writeLength(stream, length)\n\n // Generate protocol ID\n writeStringOrBuffer(stream, protocolId)\n stream.write(\n protocolVersion === 4 ? protocol.VERSION4 : protocol.VERSION3\n )\n\n // Connect flags\n var flags = 0\n flags |= (username != null) ? protocol.USERNAME_MASK : 0\n flags |= (password != null) ? protocol.PASSWORD_MASK : 0\n flags |= (will && will.retain) ? protocol.WILL_RETAIN_MASK : 0\n flags |= (will && will.qos) ? will.qos << protocol.WILL_QOS_SHIFT : 0\n flags |= will ? protocol.WILL_FLAG_MASK : 0\n flags |= clean ? protocol.CLEAN_SESSION_MASK : 0\n\n stream.write(Buffer.from([flags]))\n\n // Keepalive\n writeNumber(stream, keepalive)\n\n // Client ID\n writeStringOrBuffer(stream, clientId)\n\n // Will\n if (will) {\n writeString(stream, will.topic)\n writeStringOrBuffer(stream, will.payload)\n }\n\n // Username and password\n if (username != null) {\n writeStringOrBuffer(stream, username)\n }\n if (password != null) {\n writeStringOrBuffer(stream, password)\n }\n // This is a small packet that happens only once on a stream\n // We assume the stream is always free to receive more data after this\n return true\n}\n\nfunction connack (opts, stream) {\n var settings = opts || {}\n var rc = settings.returnCode\n\n // Check return code\n if (typeof rc !== 'number') {\n stream.emit('error', new Error('Invalid return code'))\n return false\n }\n\n stream.write(protocol.CONNACK_HEADER)\n writeLength(stream, 2)\n stream.write(opts.sessionPresent ? protocol.SESSIONPRESENT_HEADER : zeroBuf)\n\n return stream.write(Buffer.from([rc]))\n}\n\nfunction publish (opts, stream) {\n var settings = opts || {}\n var qos = settings.qos || 0\n var retain = settings.retain ? protocol.RETAIN_MASK : 0\n var topic = settings.topic\n var payload = settings.payload || empty\n var id = settings.messageId\n\n var length = 0\n\n // Topic must be a non-empty string or Buffer\n if (typeof topic === 'string') length += Buffer.byteLength(topic) + 2\n else if (Buffer.isBuffer(topic)) length += topic.length + 2\n else {\n stream.emit('error', new Error('Invalid topic'))\n return false\n }\n\n // Get the payload length\n if (!Buffer.isBuffer(payload)) length += Buffer.byteLength(payload)\n else length += payload.length\n\n // Message ID must a number if qos > 0\n if (qos && typeof id !== 'number') {\n stream.emit('error', new Error('Invalid messageId'))\n return false\n } else if (qos) length += 2\n\n // Header\n stream.write(protocol.PUBLISH_HEADER[qos][opts.dup ? 1 : 0][retain ? 1 : 0])\n\n // Remaining length\n writeLength(stream, length)\n\n // Topic\n writeNumber(stream, byteLength(topic))\n stream.write(topic)\n\n // Message ID\n if (qos > 0) writeNumber(stream, id)\n\n // Payload\n return stream.write(payload)\n}\n\n/* Puback, pubrec, pubrel and pubcomp */\nfunction confirmation (opts, stream) {\n var settings = opts || {}\n var type = settings.cmd || 'puback'\n var id = settings.messageId\n var dup = (settings.dup && type === 'pubrel') ? protocol.DUP_MASK : 0\n var qos = 0\n\n if (type === 'pubrel') qos = 1\n\n // Check message ID\n if (typeof id !== 'number') {\n stream.emit('error', new Error('Invalid messageId'))\n return false\n }\n\n // Header\n stream.write(protocol.ACKS[type][qos][dup][0])\n\n // Length\n writeLength(stream, 2)\n\n // Message ID\n return writeNumber(stream, id)\n}\n\nfunction subscribe (opts, stream) {\n var settings = opts || {}\n var dup = settings.dup ? protocol.DUP_MASK : 0\n var id = settings.messageId\n var subs = settings.subscriptions\n\n var length = 0\n\n // Check message ID\n if (typeof id !== 'number') {\n stream.emit('error', new Error('Invalid messageId'))\n return false\n } else length += 2\n\n // Check subscriptions\n if (typeof subs === 'object' && subs.length) {\n for (var i = 0; i < subs.length; i += 1) {\n var itopic = subs[i].topic\n var iqos = subs[i].qos\n\n if (typeof itopic !== 'string') {\n stream.emit('error', new Error('Invalid subscriptions - invalid topic'))\n return false\n }\n if (typeof iqos !== 'number') {\n stream.emit('error', new Error('Invalid subscriptions - invalid qos'))\n return false\n }\n\n length += Buffer.byteLength(itopic) + 2 + 1\n }\n } else {\n stream.emit('error', new Error('Invalid subscriptions'))\n return false\n }\n\n // Generate header\n stream.write(protocol.SUBSCRIBE_HEADER[1][dup ? 1 : 0][0])\n\n // Generate length\n writeLength(stream, length)\n\n // Generate message ID\n writeNumber(stream, id)\n\n var result = true\n\n // Generate subs\n for (var j = 0; j < subs.length; j++) {\n var sub = subs[j]\n var jtopic = sub.topic\n var jqos = sub.qos\n\n // Write topic string\n writeString(stream, jtopic)\n\n // Write qos\n result = stream.write(protocol.QOS[jqos])\n }\n\n return result\n}\n\nfunction suback (opts, stream) {\n var settings = opts || {}\n var id = settings.messageId\n var granted = settings.granted\n\n var length = 0\n\n // Check message ID\n if (typeof id !== 'number') {\n stream.emit('error', new Error('Invalid messageId'))\n return false\n } else length += 2\n\n // Check granted qos vector\n if (typeof granted === 'object' && granted.length) {\n for (var i = 0; i < granted.length; i += 1) {\n if (typeof granted[i] !== 'number') {\n stream.emit('error', new Error('Invalid qos vector'))\n return false\n }\n length += 1\n }\n } else {\n stream.emit('error', new Error('Invalid qos vector'))\n return false\n }\n\n // header\n stream.write(protocol.SUBACK_HEADER)\n\n // Length\n writeLength(stream, length)\n\n // Message ID\n writeNumber(stream, id)\n\n return stream.write(Buffer.from(granted))\n}\n\nfunction unsubscribe (opts, stream) {\n var settings = opts || {}\n var id = settings.messageId\n var dup = settings.dup ? protocol.DUP_MASK : 0\n var unsubs = settings.unsubscriptions\n\n var length = 0\n\n // Check message ID\n if (typeof id !== 'number') {\n stream.emit('error', new Error('Invalid messageId'))\n return false\n } else {\n length += 2\n }\n // Check unsubs\n if (typeof unsubs === 'object' && unsubs.length) {\n for (var i = 0; i < unsubs.length; i += 1) {\n if (typeof unsubs[i] !== 'string') {\n stream.emit('error', new Error('Invalid unsubscriptions'))\n return false\n }\n length += Buffer.byteLength(unsubs[i]) + 2\n }\n } else {\n stream.emit('error', new Error('Invalid unsubscriptions'))\n return false\n }\n\n // Header\n stream.write(protocol.UNSUBSCRIBE_HEADER[1][dup ? 1 : 0][0])\n\n // Length\n writeLength(stream, length)\n\n // Message ID\n writeNumber(stream, id)\n\n // Unsubs\n var result = true\n for (var j = 0; j < unsubs.length; j++) {\n result = writeString(stream, unsubs[j])\n }\n\n return result\n}\n\nfunction emptyPacket (opts, stream) {\n return stream.write(protocol.EMPTY[opts.cmd])\n}\n\n/**\n * calcLengthLength - calculate the length of the remaining\n * length field\n *\n * @api private\n */\nfunction calcLengthLength (length) {\n if (length >= 0 && length < 128) return 1\n else if (length >= 128 && length < 16384) return 2\n else if (length >= 16384 && length < 2097152) return 3\n else if (length >= 2097152 && length < 268435456) return 4\n else return 0\n}\n\nfunction genBufLength (length) {\n var digit = 0\n var pos = 0\n var buffer = Buffer.allocUnsafe(calcLengthLength(length))\n\n do {\n digit = length % 128 | 0\n length = length / 128 | 0\n if (length > 0) digit = digit | 0x80\n\n buffer.writeUInt8(digit, pos++)\n } while (length > 0)\n\n return buffer\n}\n\n/**\n * writeLength - write an MQTT style length field to the buffer\n *\n * @param buffer - destination\n * @param pos - offset\n * @param length - length (>0)\n * @returns number of bytes written\n *\n * @api private\n */\n\nvar lengthCache = {}\nfunction writeLength (stream, length) {\n var buffer = lengthCache[length]\n\n if (!buffer) {\n buffer = genBufLength(length)\n if (length < 16384) lengthCache[length] = buffer\n }\n\n stream.write(buffer)\n}\n\n/**\n * writeString - write a utf8 string to the buffer\n *\n * @param buffer - destination\n * @param pos - offset\n * @param string - string to write\n * @return number of bytes written\n *\n * @api private\n */\n\nfunction writeString (stream, string) {\n var strlen = Buffer.byteLength(string)\n writeNumber(stream, strlen)\n\n stream.write(string, 'utf8')\n}\n\n/**\n * writeNumber - write a two byte number to the buffer\n *\n * @param buffer - destination\n * @param pos - offset\n * @param number - number to write\n * @return number of bytes written\n *\n * @api private\n */\nfunction writeNumberCached (stream, number) {\n return stream.write(numCache[number])\n}\nfunction writeNumberGenerated (stream, number) {\n return stream.write(generateNumber(number))\n}\n\n/**\n * writeStringOrBuffer - write a String or Buffer with the its length prefix\n *\n * @param buffer - destination\n * @param pos - offset\n * @param toWrite - String or Buffer\n * @return number of bytes written\n */\nfunction writeStringOrBuffer (stream, toWrite) {\n if (typeof toWrite === 'string') {\n writeString(stream, toWrite)\n } else if (toWrite) {\n writeNumber(stream, toWrite.length)\n stream.write(toWrite)\n } else writeNumber(stream, 0)\n}\n\nfunction byteLength (bufOrString) {\n if (!bufOrString) return 0\n else if (bufOrString instanceof Buffer) return bufOrString.length\n else return Buffer.byteLength(bufOrString)\n}\n\nfunction isStringOrBuffer (field) {\n return typeof field === 'string' || field instanceof Buffer\n}\n\nmodule.exports = generate\n\n\n//# sourceURL=webpack:///./node_modules/mqtt-packet/writeToStream.js?"); - -/***/ }), - -/***/ "./node_modules/mqtt/lib/client.js": -/*!*****************************************!*\ - !*** ./node_modules/mqtt/lib/client.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/* WEBPACK VAR INJECTION */(function(global, process) {\n\n/**\n * Module dependencies\n */\nvar events = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\")\nvar Store = __webpack_require__(/*! ./store */ \"./node_modules/mqtt/lib/store.js\")\nvar eos = __webpack_require__(/*! end-of-stream */ \"./node_modules/end-of-stream/index.js\")\nvar mqttPacket = __webpack_require__(/*! mqtt-packet */ \"./node_modules/mqtt-packet/mqtt.js\")\nvar Writable = __webpack_require__(/*! readable-stream */ \"./node_modules/readable-stream/readable-browser.js\").Writable\nvar inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\")\nvar reInterval = __webpack_require__(/*! reinterval */ \"./node_modules/reinterval/index.js\")\nvar validations = __webpack_require__(/*! ./validations */ \"./node_modules/mqtt/lib/validations.js\")\nvar xtend = __webpack_require__(/*! xtend */ \"./node_modules/xtend/immutable.js\")\nvar setImmediate = global.setImmediate || function (callback) {\n // works in node v0.8\n process.nextTick(callback)\n}\nvar defaultConnectOptions = {\n keepalive: 60,\n reschedulePings: true,\n protocolId: 'MQTT',\n protocolVersion: 4,\n reconnectPeriod: 1000,\n connectTimeout: 30 * 1000,\n clean: true,\n resubscribe: true\n}\n\nfunction defaultId () {\n return 'mqttjs_' + Math.random().toString(16).substr(2, 8)\n}\n\nfunction sendPacket (client, packet, cb) {\n client.emit('packetsend', packet)\n\n var result = mqttPacket.writeToStream(packet, client.stream)\n\n if (!result && cb) {\n client.stream.once('drain', cb)\n } else if (cb) {\n cb()\n }\n}\n\nfunction flush (queue) {\n if (queue) {\n Object.keys(queue).forEach(function (messageId) {\n if (typeof queue[messageId] === 'function') {\n queue[messageId](new Error('Connection closed'))\n delete queue[messageId]\n }\n })\n }\n}\n\nfunction storeAndSend (client, packet, cb) {\n client.outgoingStore.put(packet, function storedPacket (err) {\n if (err) {\n return cb && cb(err)\n }\n sendPacket(client, packet, cb)\n })\n}\n\nfunction nop () {}\n\n/**\n * MqttClient constructor\n *\n * @param {Stream} stream - stream\n * @param {Object} [options] - connection options\n * (see Connection#connect)\n */\nfunction MqttClient (streamBuilder, options) {\n var k\n var that = this\n\n if (!(this instanceof MqttClient)) {\n return new MqttClient(streamBuilder, options)\n }\n\n this.options = options || {}\n\n // Defaults\n for (k in defaultConnectOptions) {\n if (typeof this.options[k] === 'undefined') {\n this.options[k] = defaultConnectOptions[k]\n } else {\n this.options[k] = options[k]\n }\n }\n\n this.options.clientId = (typeof this.options.clientId === 'string') ? this.options.clientId : defaultId()\n\n this.streamBuilder = streamBuilder\n\n // Inflight message storages\n this.outgoingStore = this.options.outgoingStore || new Store()\n this.incomingStore = this.options.incomingStore || new Store()\n\n // Should QoS zero messages be queued when the connection is broken?\n this.queueQoSZero = this.options.queueQoSZero === undefined ? true : this.options.queueQoSZero\n\n // map of subscribed topics to support reconnection\n this._resubscribeTopics = {}\n\n // map of a subscribe messageId and a topic\n this.messageIdToTopic = {}\n\n // Ping timer, setup in _setupPingTimer\n this.pingTimer = null\n // Is the client connected?\n this.connected = false\n // Are we disconnecting?\n this.disconnecting = false\n // Packet queue\n this.queue = []\n // connack timer\n this.connackTimer = null\n // Reconnect timer\n this.reconnectTimer = null\n /**\n * MessageIDs starting with 1\n * ensure that nextId is min. 1, see https://github.com/mqttjs/MQTT.js/issues/810\n */\n this.nextId = Math.max(1, Math.floor(Math.random() * 65535))\n\n // Inflight callbacks\n this.outgoing = {}\n\n // Mark connected on connect\n this.on('connect', function () {\n if (this.disconnected) {\n return\n }\n\n this.connected = true\n var outStore = this.outgoingStore.createStream()\n\n this.once('close', remove)\n outStore.on('end', function () {\n that.removeListener('close', remove)\n })\n outStore.on('error', function (err) {\n that.removeListener('close', remove)\n that.emit('error', err)\n })\n\n function remove () {\n outStore.destroy()\n outStore = null\n }\n\n function storeDeliver () {\n // edge case, we wrapped this twice\n if (!outStore) {\n return\n }\n\n var packet = outStore.read(1)\n var cb\n\n if (!packet) {\n // read when data is available in the future\n outStore.once('readable', storeDeliver)\n return\n }\n\n // Avoid unnecessary stream read operations when disconnected\n if (!that.disconnecting && !that.reconnectTimer) {\n cb = that.outgoing[packet.messageId]\n that.outgoing[packet.messageId] = function (err, status) {\n // Ensure that the original callback passed in to publish gets invoked\n if (cb) {\n cb(err, status)\n }\n\n storeDeliver()\n }\n that._sendPacket(packet)\n } else if (outStore.destroy) {\n outStore.destroy()\n }\n }\n\n // start flowing\n storeDeliver()\n })\n\n // Mark disconnected on stream close\n this.on('close', function () {\n this.connected = false\n clearTimeout(this.connackTimer)\n })\n\n // Setup ping timer\n this.on('connect', this._setupPingTimer)\n\n // Send queued packets\n this.on('connect', function () {\n var queue = this.queue\n\n function deliver () {\n var entry = queue.shift()\n var packet = null\n\n if (!entry) {\n return\n }\n\n packet = entry.packet\n\n that._sendPacket(\n packet,\n function (err) {\n if (entry.cb) {\n entry.cb(err)\n }\n deliver()\n }\n )\n }\n\n deliver()\n })\n\n var firstConnection = true\n // resubscribe\n this.on('connect', function () {\n if (!firstConnection &&\n this.options.clean &&\n Object.keys(this._resubscribeTopics).length > 0) {\n if (this.options.resubscribe) {\n this._resubscribeTopics.resubscribe = true\n this.subscribe(this._resubscribeTopics)\n } else {\n this._resubscribeTopics = {}\n }\n }\n\n firstConnection = false\n })\n\n // Clear ping timer\n this.on('close', function () {\n if (that.pingTimer !== null) {\n that.pingTimer.clear()\n that.pingTimer = null\n }\n })\n\n // Setup reconnect timer on disconnect\n this.on('close', this._setupReconnect)\n\n events.EventEmitter.call(this)\n\n this._setupStream()\n}\ninherits(MqttClient, events.EventEmitter)\n\n/**\n * setup the event handlers in the inner stream.\n *\n * @api private\n */\nMqttClient.prototype._setupStream = function () {\n var connectPacket\n var that = this\n var writable = new Writable()\n var parser = mqttPacket.parser(this.options)\n var completeParse = null\n var packets = []\n\n this._clearReconnect()\n\n this.stream = this.streamBuilder(this)\n\n parser.on('packet', function (packet) {\n packets.push(packet)\n })\n\n function nextTickWork () {\n process.nextTick(work)\n }\n\n function work () {\n var packet = packets.shift()\n var done = completeParse\n\n if (packet) {\n that._handlePacket(packet, nextTickWork)\n } else {\n completeParse = null\n done()\n }\n }\n\n writable._write = function (buf, enc, done) {\n completeParse = done\n parser.parse(buf)\n work()\n }\n\n this.stream.pipe(writable)\n\n // Suppress connection errors\n this.stream.on('error', nop)\n\n // Echo stream close\n eos(this.stream, this.emit.bind(this, 'close'))\n\n // Send a connect packet\n connectPacket = Object.create(this.options)\n connectPacket.cmd = 'connect'\n // avoid message queue\n sendPacket(this, connectPacket)\n\n // Echo connection errors\n parser.on('error', this.emit.bind(this, 'error'))\n\n // many drain listeners are needed for qos 1 callbacks if the connection is intermittent\n this.stream.setMaxListeners(1000)\n\n clearTimeout(this.connackTimer)\n this.connackTimer = setTimeout(function () {\n that._cleanUp(true)\n }, this.options.connectTimeout)\n}\n\nMqttClient.prototype._handlePacket = function (packet, done) {\n this.emit('packetreceive', packet)\n\n switch (packet.cmd) {\n case 'publish':\n this._handlePublish(packet, done)\n break\n case 'puback':\n case 'pubrec':\n case 'pubcomp':\n case 'suback':\n case 'unsuback':\n this._handleAck(packet)\n done()\n break\n case 'pubrel':\n this._handlePubrel(packet, done)\n break\n case 'connack':\n this._handleConnack(packet)\n done()\n break\n case 'pingresp':\n this._handlePingresp(packet)\n done()\n break\n default:\n // do nothing\n // maybe we should do an error handling\n // or just log it\n break\n }\n}\n\nMqttClient.prototype._checkDisconnecting = function (callback) {\n if (this.disconnecting) {\n if (callback) {\n callback(new Error('client disconnecting'))\n } else {\n this.emit('error', new Error('client disconnecting'))\n }\n }\n return this.disconnecting\n}\n\n/**\n * publish - publish to \n *\n * @param {String} topic - topic to publish to\n * @param {String, Buffer} message - message to publish\n * @param {Object} [opts] - publish options, includes:\n * {Number} qos - qos level to publish on\n * {Boolean} retain - whether or not to retain the message\n * {Boolean} dup - whether or not mark a message as duplicate\n * @param {Function} [callback] - function(err){}\n * called when publish succeeds or fails\n * @returns {MqttClient} this - for chaining\n * @api public\n *\n * @example client.publish('topic', 'message');\n * @example\n * client.publish('topic', 'message', {qos: 1, retain: true, dup: true});\n * @example client.publish('topic', 'message', console.log);\n */\nMqttClient.prototype.publish = function (topic, message, opts, callback) {\n var packet\n\n // .publish(topic, payload, cb);\n if (typeof opts === 'function') {\n callback = opts\n opts = null\n }\n\n // default opts\n var defaultOpts = {qos: 0, retain: false, dup: false}\n opts = xtend(defaultOpts, opts)\n\n if (this._checkDisconnecting(callback)) {\n return this\n }\n\n packet = {\n cmd: 'publish',\n topic: topic,\n payload: message,\n qos: opts.qos,\n retain: opts.retain,\n messageId: this._nextId(),\n dup: opts.dup\n }\n\n switch (opts.qos) {\n case 1:\n case 2:\n\n // Add to callbacks\n this.outgoing[packet.messageId] = callback || nop\n this._sendPacket(packet)\n break\n default:\n this._sendPacket(packet, callback)\n break\n }\n\n return this\n}\n\n/**\n * subscribe - subscribe to \n *\n * @param {String, Array, Object} topic - topic(s) to subscribe to, supports objects in the form {'topic': qos}\n * @param {Object} [opts] - optional subscription options, includes:\n * {Number} qos - subscribe qos level\n * @param {Function} [callback] - function(err, granted){} where:\n * {Error} err - subscription error (none at the moment!)\n * {Array} granted - array of {topic: 't', qos: 0}\n * @returns {MqttClient} this - for chaining\n * @api public\n * @example client.subscribe('topic');\n * @example client.subscribe('topic', {qos: 1});\n * @example client.subscribe({'topic': 0, 'topic2': 1}, console.log);\n * @example client.subscribe('topic', console.log);\n */\nMqttClient.prototype.subscribe = function () {\n var packet\n var args = Array.prototype.slice.call(arguments)\n var subs = []\n var obj = args.shift()\n var resubscribe = obj.resubscribe\n var callback = args.pop() || nop\n var opts = args.pop()\n var invalidTopic\n var that = this\n\n delete obj.resubscribe\n\n if (typeof obj === 'string') {\n obj = [obj]\n }\n\n if (typeof callback !== 'function') {\n opts = callback\n callback = nop\n }\n\n invalidTopic = validations.validateTopics(obj)\n if (invalidTopic !== null) {\n setImmediate(callback, new Error('Invalid topic ' + invalidTopic))\n return this\n }\n\n if (this._checkDisconnecting(callback)) {\n return this\n }\n\n var defaultOpts = { qos: 0 }\n opts = xtend(defaultOpts, opts)\n\n if (Array.isArray(obj)) {\n obj.forEach(function (topic) {\n if (that._resubscribeTopics[topic] < opts.qos ||\n !that._resubscribeTopics.hasOwnProperty(topic) ||\n resubscribe) {\n subs.push({\n topic: topic,\n qos: opts.qos\n })\n }\n })\n } else {\n Object\n .keys(obj)\n .forEach(function (k) {\n if (that._resubscribeTopics[k] < obj[k] ||\n !that._resubscribeTopics.hasOwnProperty(k) ||\n resubscribe) {\n subs.push({\n topic: k,\n qos: obj[k]\n })\n }\n })\n }\n\n packet = {\n cmd: 'subscribe',\n subscriptions: subs,\n qos: 1,\n retain: false,\n dup: false,\n messageId: this._nextId()\n }\n\n if (!subs.length) {\n callback(null, [])\n return\n }\n\n // subscriptions to resubscribe to in case of disconnect\n if (this.options.resubscribe) {\n var topics = []\n subs.forEach(function (sub) {\n if (that.options.reconnectPeriod > 0) {\n that._resubscribeTopics[sub.topic] = sub.qos\n topics.push(sub.topic)\n }\n })\n that.messageIdToTopic[packet.messageId] = topics\n }\n\n this.outgoing[packet.messageId] = function (err, packet) {\n if (!err) {\n var granted = packet.granted\n for (var i = 0; i < granted.length; i += 1) {\n subs[i].qos = granted[i]\n }\n }\n\n callback(err, subs)\n }\n\n this._sendPacket(packet)\n\n return this\n}\n\n/**\n * unsubscribe - unsubscribe from topic(s)\n *\n * @param {String, Array} topic - topics to unsubscribe from\n * @param {Function} [callback] - callback fired on unsuback\n * @returns {MqttClient} this - for chaining\n * @api public\n * @example client.unsubscribe('topic');\n * @example client.unsubscribe('topic', console.log);\n */\nMqttClient.prototype.unsubscribe = function (topic, callback) {\n var packet = {\n cmd: 'unsubscribe',\n qos: 1,\n messageId: this._nextId()\n }\n var that = this\n\n callback = callback || nop\n\n if (this._checkDisconnecting(callback)) {\n return this\n }\n\n if (typeof topic === 'string') {\n packet.unsubscriptions = [topic]\n } else if (typeof topic === 'object' && topic.length) {\n packet.unsubscriptions = topic\n }\n\n if (this.options.resubscribe) {\n packet.unsubscriptions.forEach(function (topic) {\n delete that._resubscribeTopics[topic]\n })\n }\n\n this.outgoing[packet.messageId] = callback\n\n this._sendPacket(packet)\n\n return this\n}\n\n/**\n * end - close connection\n *\n * @returns {MqttClient} this - for chaining\n * @param {Boolean} force - do not wait for all in-flight messages to be acked\n * @param {Function} cb - called when the client has been closed\n *\n * @api public\n */\nMqttClient.prototype.end = function (force, cb) {\n var that = this\n\n if (typeof force === 'function') {\n cb = force\n force = false\n }\n\n function closeStores () {\n that.disconnected = true\n that.incomingStore.close(function () {\n that.outgoingStore.close(function () {\n if (cb) {\n cb.apply(null, arguments)\n }\n that.emit('end')\n })\n })\n if (that._deferredReconnect) {\n that._deferredReconnect()\n }\n }\n\n function finish () {\n // defer closesStores of an I/O cycle,\n // just to make sure things are\n // ok for websockets\n that._cleanUp(force, setImmediate.bind(null, closeStores))\n }\n\n if (this.disconnecting) {\n return this\n }\n\n this._clearReconnect()\n\n this.disconnecting = true\n\n if (!force && Object.keys(this.outgoing).length > 0) {\n // wait 10ms, just to be sure we received all of it\n this.once('outgoingEmpty', setTimeout.bind(null, finish, 10))\n } else {\n finish()\n }\n\n return this\n}\n\n/**\n * removeOutgoingMessage - remove a message in outgoing store\n * the outgoing callback will be called withe Error('Message removed') if the message is removed\n *\n * @param {Number} mid - messageId to remove message\n * @returns {MqttClient} this - for chaining\n * @api public\n *\n * @example client.removeOutgoingMessage(client.getLastMessageId());\n */\nMqttClient.prototype.removeOutgoingMessage = function (mid) {\n var cb = this.outgoing[mid]\n delete this.outgoing[mid]\n this.outgoingStore.del({messageId: mid}, function () {\n cb(new Error('Message removed'))\n })\n return this\n}\n\n/**\n * reconnect - connect again using the same options as connect()\n *\n * @param {Object} [opts] - optional reconnect options, includes:\n * {Store} incomingStore - a store for the incoming packets\n * {Store} outgoingStore - a store for the outgoing packets\n * if opts is not given, current stores are used\n * @returns {MqttClient} this - for chaining\n *\n * @api public\n */\nMqttClient.prototype.reconnect = function (opts) {\n var that = this\n var f = function () {\n if (opts) {\n that.options.incomingStore = opts.incomingStore\n that.options.outgoingStore = opts.outgoingStore\n } else {\n that.options.incomingStore = null\n that.options.outgoingStore = null\n }\n that.incomingStore = that.options.incomingStore || new Store()\n that.outgoingStore = that.options.outgoingStore || new Store()\n that.disconnecting = false\n that.disconnected = false\n that._deferredReconnect = null\n that._reconnect()\n }\n\n if (this.disconnecting && !this.disconnected) {\n this._deferredReconnect = f\n } else {\n f()\n }\n return this\n}\n\n/**\n * _reconnect - implement reconnection\n * @api privateish\n */\nMqttClient.prototype._reconnect = function () {\n this.emit('reconnect')\n this._setupStream()\n}\n\n/**\n * _setupReconnect - setup reconnect timer\n */\nMqttClient.prototype._setupReconnect = function () {\n var that = this\n\n if (!that.disconnecting && !that.reconnectTimer && (that.options.reconnectPeriod > 0)) {\n if (!this.reconnecting) {\n this.emit('offline')\n this.reconnecting = true\n }\n that.reconnectTimer = setInterval(function () {\n that._reconnect()\n }, that.options.reconnectPeriod)\n }\n}\n\n/**\n * _clearReconnect - clear the reconnect timer\n */\nMqttClient.prototype._clearReconnect = function () {\n if (this.reconnectTimer) {\n clearInterval(this.reconnectTimer)\n this.reconnectTimer = null\n }\n}\n\n/**\n * _cleanUp - clean up on connection end\n * @api private\n */\nMqttClient.prototype._cleanUp = function (forced, done) {\n if (done) {\n this.stream.on('close', done)\n }\n\n if (forced) {\n if ((this.options.reconnectPeriod === 0) && this.options.clean) {\n flush(this.outgoing)\n }\n this.stream.destroy()\n } else {\n this._sendPacket(\n { cmd: 'disconnect' },\n setImmediate.bind(\n null,\n this.stream.end.bind(this.stream)\n )\n )\n }\n\n if (!this.disconnecting) {\n this._clearReconnect()\n this._setupReconnect()\n }\n\n if (this.pingTimer !== null) {\n this.pingTimer.clear()\n this.pingTimer = null\n }\n\n if (done && !this.connected) {\n this.stream.removeListener('close', done)\n done()\n }\n}\n\n/**\n * _sendPacket - send or queue a packet\n * @param {String} type - packet type (see `protocol`)\n * @param {Object} packet - packet options\n * @param {Function} cb - callback when the packet is sent\n * @api private\n */\nMqttClient.prototype._sendPacket = function (packet, cb) {\n if (!this.connected) {\n if (((packet.qos || 0) === 0 && this.queueQoSZero) || packet.cmd !== 'publish') {\n this.queue.push({ packet: packet, cb: cb })\n } else if (packet.qos > 0) {\n cb = this.outgoing[packet.messageId]\n this.outgoingStore.put(packet, function (err) {\n if (err) {\n return cb && cb(err)\n }\n })\n } else if (cb) {\n cb(new Error('No connection to broker'))\n }\n\n return\n }\n\n // When sending a packet, reschedule the ping timer\n this._shiftPingInterval()\n\n switch (packet.cmd) {\n case 'publish':\n break\n case 'pubrel':\n storeAndSend(this, packet, cb)\n return\n default:\n sendPacket(this, packet, cb)\n return\n }\n\n switch (packet.qos) {\n case 2:\n case 1:\n storeAndSend(this, packet, cb)\n break\n /**\n * no need of case here since it will be caught by default\n * and jshint comply that before default it must be a break\n * anyway it will result in -1 evaluation\n */\n case 0:\n /* falls through */\n default:\n sendPacket(this, packet, cb)\n break\n }\n}\n\n/**\n * _setupPingTimer - setup the ping timer\n *\n * @api private\n */\nMqttClient.prototype._setupPingTimer = function () {\n var that = this\n\n if (!this.pingTimer && this.options.keepalive) {\n this.pingResp = true\n this.pingTimer = reInterval(function () {\n that._checkPing()\n }, this.options.keepalive * 1000)\n }\n}\n\n/**\n * _shiftPingInterval - reschedule the ping interval\n *\n * @api private\n */\nMqttClient.prototype._shiftPingInterval = function () {\n if (this.pingTimer && this.options.keepalive && this.options.reschedulePings) {\n this.pingTimer.reschedule(this.options.keepalive * 1000)\n }\n}\n/**\n * _checkPing - check if a pingresp has come back, and ping the server again\n *\n * @api private\n */\nMqttClient.prototype._checkPing = function () {\n if (this.pingResp) {\n this.pingResp = false\n this._sendPacket({ cmd: 'pingreq' })\n } else {\n // do a forced cleanup since socket will be in bad shape\n this._cleanUp(true)\n }\n}\n\n/**\n * _handlePingresp - handle a pingresp\n *\n * @api private\n */\nMqttClient.prototype._handlePingresp = function () {\n this.pingResp = true\n}\n\n/**\n * _handleConnack\n *\n * @param {Object} packet\n * @api private\n */\n\nMqttClient.prototype._handleConnack = function (packet) {\n var rc = packet.returnCode\n var errors = [\n '',\n 'Unacceptable protocol version',\n 'Identifier rejected',\n 'Server unavailable',\n 'Bad username or password',\n 'Not authorized'\n ]\n\n clearTimeout(this.connackTimer)\n\n if (rc === 0) {\n this.reconnecting = false\n this.emit('connect', packet)\n } else if (rc > 0) {\n var err = new Error('Connection refused: ' + errors[rc])\n err.code = rc\n this.emit('error', err)\n }\n}\n\n/**\n * _handlePublish\n *\n * @param {Object} packet\n * @api private\n */\n/*\nthose late 2 case should be rewrite to comply with coding style:\n\ncase 1:\ncase 0:\n // do not wait sending a puback\n // no callback passed\n if (1 === qos) {\n this._sendPacket({\n cmd: 'puback',\n messageId: mid\n });\n }\n // emit the message event for both qos 1 and 0\n this.emit('message', topic, message, packet);\n this.handleMessage(packet, done);\n break;\ndefault:\n // do nothing but every switch mus have a default\n // log or throw an error about unknown qos\n break;\n\nfor now i just suppressed the warnings\n*/\nMqttClient.prototype._handlePublish = function (packet, done) {\n done = typeof done !== 'undefined' ? done : nop\n var topic = packet.topic.toString()\n var message = packet.payload\n var qos = packet.qos\n var mid = packet.messageId\n var that = this\n\n switch (qos) {\n case 2:\n this.incomingStore.put(packet, function (err) {\n if (err) {\n return done(err)\n }\n that._sendPacket({cmd: 'pubrec', messageId: mid}, done)\n })\n break\n case 1:\n // emit the message event\n this.emit('message', topic, message, packet)\n this.handleMessage(packet, function (err) {\n if (err) {\n return done(err)\n }\n // send 'puback' if the above 'handleMessage' method executed\n // successfully.\n that._sendPacket({cmd: 'puback', messageId: mid}, done)\n })\n break\n case 0:\n // emit the message event\n this.emit('message', topic, message, packet)\n this.handleMessage(packet, done)\n break\n default:\n // do nothing\n // log or throw an error about unknown qos\n break\n }\n}\n\n/**\n * Handle messages with backpressure support, one at a time.\n * Override at will.\n *\n * @param Packet packet the packet\n * @param Function callback call when finished\n * @api public\n */\nMqttClient.prototype.handleMessage = function (packet, callback) {\n callback()\n}\n\n/**\n * _handleAck\n *\n * @param {Object} packet\n * @api private\n */\n\nMqttClient.prototype._handleAck = function (packet) {\n /* eslint no-fallthrough: \"off\" */\n var mid = packet.messageId\n var type = packet.cmd\n var response = null\n var cb = this.outgoing[mid]\n var that = this\n\n if (!cb) {\n // Server sent an ack in error, ignore it.\n return\n }\n\n // Process\n switch (type) {\n case 'pubcomp':\n // same thing as puback for QoS 2\n case 'puback':\n // Callback - we're done\n delete this.outgoing[mid]\n this.outgoingStore.del(packet, cb)\n break\n case 'pubrec':\n response = {\n cmd: 'pubrel',\n qos: 2,\n messageId: mid\n }\n\n this._sendPacket(response)\n break\n case 'suback':\n delete this.outgoing[mid]\n if (packet.granted.length === 1 && (packet.granted[0] & 0x80) !== 0) {\n // suback with Failure status\n var topics = this.messageIdToTopic[mid]\n if (topics) {\n topics.forEach(function (topic) {\n delete that._resubscribeTopics[topic]\n })\n }\n }\n cb(null, packet)\n break\n case 'unsuback':\n delete this.outgoing[mid]\n cb(null)\n break\n default:\n that.emit('error', new Error('unrecognized packet type'))\n }\n\n if (this.disconnecting &&\n Object.keys(this.outgoing).length === 0) {\n this.emit('outgoingEmpty')\n }\n}\n\n/**\n * _handlePubrel\n *\n * @param {Object} packet\n * @api private\n */\nMqttClient.prototype._handlePubrel = function (packet, callback) {\n callback = typeof callback !== 'undefined' ? callback : nop\n var mid = packet.messageId\n var that = this\n\n var comp = {cmd: 'pubcomp', messageId: mid}\n\n that.incomingStore.get(packet, function (err, pub) {\n if (!err && pub.cmd !== 'pubrel') {\n that.emit('message', pub.topic, pub.payload, pub)\n that.incomingStore.put(packet, function (err) {\n if (err) {\n return callback(err)\n }\n that.handleMessage(pub, function (err) {\n if (err) {\n return callback(err)\n }\n that._sendPacket(comp, callback)\n })\n })\n } else {\n that._sendPacket(comp, callback)\n }\n })\n}\n\n/**\n * _nextId\n * @return unsigned int\n */\nMqttClient.prototype._nextId = function () {\n // id becomes current state of this.nextId and increments afterwards\n var id = this.nextId++\n // Ensure 16 bit unsigned int (max 65535, nextId got one higher)\n if (this.nextId === 65536) {\n this.nextId = 1\n }\n return id\n}\n\n/**\n * getLastMessageId\n * @return unsigned int\n */\nMqttClient.prototype.getLastMessageId = function () {\n return (this.nextId === 1) ? 65535 : (this.nextId - 1)\n}\n\nmodule.exports = MqttClient\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/mqtt/lib/client.js?"); - -/***/ }), - -/***/ "./node_modules/mqtt/lib/connect/index.js": -/*!************************************************!*\ - !*** ./node_modules/mqtt/lib/connect/index.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nvar MqttClient = __webpack_require__(/*! ../client */ \"./node_modules/mqtt/lib/client.js\")\nvar Store = __webpack_require__(/*! ../store */ \"./node_modules/mqtt/lib/store.js\")\nvar url = __webpack_require__(/*! url */ \"./node_modules/node-libs-browser/node_modules/url/url.js\")\nvar xtend = __webpack_require__(/*! xtend */ \"./node_modules/xtend/immutable.js\")\nvar protocols = {}\n\nif (process.title !== 'browser') {\n protocols.mqtt = __webpack_require__(/*! ./tcp */ \"./node_modules/mqtt/lib/connect/tcp.js\")\n protocols.tcp = __webpack_require__(/*! ./tcp */ \"./node_modules/mqtt/lib/connect/tcp.js\")\n protocols.ssl = __webpack_require__(/*! ./tls */ \"./node_modules/mqtt/lib/connect/tls.js\")\n protocols.tls = __webpack_require__(/*! ./tls */ \"./node_modules/mqtt/lib/connect/tls.js\")\n protocols.mqtts = __webpack_require__(/*! ./tls */ \"./node_modules/mqtt/lib/connect/tls.js\")\n} else {\n protocols.wx = __webpack_require__(/*! ./wx */ \"./node_modules/mqtt/lib/connect/wx.js\")\n protocols.wxs = __webpack_require__(/*! ./wx */ \"./node_modules/mqtt/lib/connect/wx.js\")\n}\n\nprotocols.ws = __webpack_require__(/*! ./ws */ \"./node_modules/mqtt/lib/connect/ws.js\")\nprotocols.wss = __webpack_require__(/*! ./ws */ \"./node_modules/mqtt/lib/connect/ws.js\")\n\n/**\n * Parse the auth attribute and merge username and password in the options object.\n *\n * @param {Object} [opts] option object\n */\nfunction parseAuthOptions (opts) {\n var matches\n if (opts.auth) {\n matches = opts.auth.match(/^(.+):(.+)$/)\n if (matches) {\n opts.username = matches[1]\n opts.password = matches[2]\n } else {\n opts.username = opts.auth\n }\n }\n}\n\n/**\n * connect - connect to an MQTT broker.\n *\n * @param {String} [brokerUrl] - url of the broker, optional\n * @param {Object} opts - see MqttClient#constructor\n */\nfunction connect (brokerUrl, opts) {\n if ((typeof brokerUrl === 'object') && !opts) {\n opts = brokerUrl\n brokerUrl = null\n }\n\n opts = opts || {}\n\n if (brokerUrl) {\n var parsed = url.parse(brokerUrl, true)\n if (parsed.port != null) {\n parsed.port = Number(parsed.port)\n }\n\n opts = xtend(parsed, opts)\n\n if (opts.protocol === null) {\n throw new Error('Missing protocol')\n }\n opts.protocol = opts.protocol.replace(/:$/, '')\n }\n\n // merge in the auth options if supplied\n parseAuthOptions(opts)\n\n // support clientId passed in the query string of the url\n if (opts.query && typeof opts.query.clientId === 'string') {\n opts.clientId = opts.query.clientId\n }\n\n if (opts.cert && opts.key) {\n if (opts.protocol) {\n if (['mqtts', 'wss', 'wxs'].indexOf(opts.protocol) === -1) {\n switch (opts.protocol) {\n case 'mqtt':\n opts.protocol = 'mqtts'\n break\n case 'ws':\n opts.protocol = 'wss'\n break\n case 'wx':\n opts.protocol = 'wxs'\n break\n default:\n throw new Error('Unknown protocol for secure connection: \"' + opts.protocol + '\"!')\n }\n }\n } else {\n // don't know what protocol he want to use, mqtts or wss\n throw new Error('Missing secure protocol key')\n }\n }\n\n if (!protocols[opts.protocol]) {\n var isSecure = ['mqtts', 'wss'].indexOf(opts.protocol) !== -1\n opts.protocol = [\n 'mqtt',\n 'mqtts',\n 'ws',\n 'wss',\n 'wx',\n 'wxs'\n ].filter(function (key, index) {\n if (isSecure && index % 2 === 0) {\n // Skip insecure protocols when requesting a secure one.\n return false\n }\n return (typeof protocols[key] === 'function')\n })[0]\n }\n\n if (opts.clean === false && !opts.clientId) {\n throw new Error('Missing clientId for unclean clients')\n }\n\n if (opts.protocol) {\n opts.defaultProtocol = opts.protocol\n }\n\n function wrapper (client) {\n if (opts.servers) {\n if (!client._reconnectCount || client._reconnectCount === opts.servers.length) {\n client._reconnectCount = 0\n }\n\n opts.host = opts.servers[client._reconnectCount].host\n opts.port = opts.servers[client._reconnectCount].port\n opts.protocol = (!opts.servers[client._reconnectCount].protocol ? opts.defaultProtocol : opts.servers[client._reconnectCount].protocol)\n opts.hostname = opts.host\n\n client._reconnectCount++\n }\n\n return protocols[opts.protocol](client, opts)\n }\n\n return new MqttClient(wrapper, opts)\n}\n\nmodule.exports = connect\nmodule.exports.connect = connect\nmodule.exports.MqttClient = MqttClient\nmodule.exports.Store = Store\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/mqtt/lib/connect/index.js?"); - -/***/ }), - -/***/ "./node_modules/mqtt/lib/connect/tcp.js": -/*!**********************************************!*\ - !*** ./node_modules/mqtt/lib/connect/tcp.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\nvar net = __webpack_require__(/*! net */ 2)\n\n/*\n variables port and host can be removed since\n you have all required information in opts object\n*/\nfunction buildBuilder (client, opts) {\n var port, host\n opts.port = opts.port || 1883\n opts.hostname = opts.hostname || opts.host || 'localhost'\n\n port = opts.port\n host = opts.hostname\n\n return net.createConnection(port, host)\n}\n\nmodule.exports = buildBuilder\n\n\n//# sourceURL=webpack:///./node_modules/mqtt/lib/connect/tcp.js?"); - -/***/ }), - -/***/ "./node_modules/mqtt/lib/connect/tls.js": -/*!**********************************************!*\ - !*** ./node_modules/mqtt/lib/connect/tls.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\nvar tls = __webpack_require__(/*! tls */ 3)\n\nfunction buildBuilder (mqttClient, opts) {\n var connection\n opts.port = opts.port || 8883\n opts.host = opts.hostname || opts.host || 'localhost'\n\n opts.rejectUnauthorized = opts.rejectUnauthorized !== false\n\n delete opts.path\n\n connection = tls.connect(opts)\n /* eslint no-use-before-define: [2, \"nofunc\"] */\n connection.on('secureConnect', function () {\n if (opts.rejectUnauthorized && !connection.authorized) {\n connection.emit('error', new Error('TLS not authorized'))\n } else {\n connection.removeListener('error', handleTLSerrors)\n }\n })\n\n function handleTLSerrors (err) {\n // How can I get verify this error is a tls error?\n if (opts.rejectUnauthorized) {\n mqttClient.emit('error', err)\n }\n\n // close this connection to match the behaviour of net\n // otherwise all we get is an error from the connection\n // and close event doesn't fire. This is a work around\n // to enable the reconnect code to work the same as with\n // net.createConnection\n connection.end()\n }\n\n connection.on('error', handleTLSerrors)\n return connection\n}\n\nmodule.exports = buildBuilder\n\n\n//# sourceURL=webpack:///./node_modules/mqtt/lib/connect/tls.js?"); - -/***/ }), - -/***/ "./node_modules/mqtt/lib/connect/ws.js": -/*!*********************************************!*\ - !*** ./node_modules/mqtt/lib/connect/ws.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nvar websocket = __webpack_require__(/*! websocket-stream */ \"./node_modules/websocket-stream/stream.js\")\nvar urlModule = __webpack_require__(/*! url */ \"./node_modules/node-libs-browser/node_modules/url/url.js\")\nvar WSS_OPTIONS = [\n 'rejectUnauthorized',\n 'ca',\n 'cert',\n 'key',\n 'pfx',\n 'passphrase'\n]\nvar IS_BROWSER = process.title === 'browser'\n\nfunction buildUrl (opts, client) {\n var url = opts.protocol + '://' + opts.hostname + ':' + opts.port + opts.path\n if (typeof (opts.transformWsUrl) === 'function') {\n url = opts.transformWsUrl(url, opts, client)\n }\n return url\n}\n\nfunction setDefaultOpts (opts) {\n if (!opts.hostname) {\n opts.hostname = 'localhost'\n }\n if (!opts.port) {\n if (opts.protocol === 'wss') {\n opts.port = 443\n } else {\n opts.port = 80\n }\n }\n if (!opts.path) {\n opts.path = '/'\n }\n\n if (!opts.wsOptions) {\n opts.wsOptions = {}\n }\n if (!IS_BROWSER && opts.protocol === 'wss') {\n // Add cert/key/ca etc options\n WSS_OPTIONS.forEach(function (prop) {\n if (opts.hasOwnProperty(prop) && !opts.wsOptions.hasOwnProperty(prop)) {\n opts.wsOptions[prop] = opts[prop]\n }\n })\n }\n}\n\nfunction createWebSocket (client, opts) {\n var websocketSubProtocol =\n (opts.protocolId === 'MQIsdp') && (opts.protocolVersion === 3)\n ? 'mqttv3.1'\n : 'mqtt'\n\n setDefaultOpts(opts)\n var url = buildUrl(opts, client)\n return websocket(url, [websocketSubProtocol], opts.wsOptions)\n}\n\nfunction buildBuilder (client, opts) {\n return createWebSocket(client, opts)\n}\n\nfunction buildBuilderBrowser (client, opts) {\n if (!opts.hostname) {\n opts.hostname = opts.host\n }\n\n if (!opts.hostname) {\n // Throwing an error in a Web Worker if no `hostname` is given, because we\n // can not determine the `hostname` automatically. If connecting to\n // localhost, please supply the `hostname` as an argument.\n if (typeof (document) === 'undefined') {\n throw new Error('Could not determine host. Specify host manually.')\n }\n var parsed = urlModule.parse(document.URL)\n opts.hostname = parsed.hostname\n\n if (!opts.port) {\n opts.port = parsed.port\n }\n }\n return createWebSocket(client, opts)\n}\n\nif (IS_BROWSER) {\n module.exports = buildBuilderBrowser\n} else {\n module.exports = buildBuilder\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/mqtt/lib/connect/ws.js?"); - -/***/ }), - -/***/ "./node_modules/mqtt/lib/connect/wx.js": -/*!*********************************************!*\ - !*** ./node_modules/mqtt/lib/connect/wx.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\n/* global wx */\nvar socketOpen = false\nvar socketMsgQueue = []\n\nfunction sendSocketMessage (msg) {\n if (socketOpen) {\n wx.sendSocketMessage({\n data: msg.buffer || msg\n })\n } else {\n socketMsgQueue.push(msg)\n }\n}\n\nfunction WebSocket (url, protocols) {\n var ws = {\n OPEN: 1,\n CLOSING: 2,\n CLOSED: 3,\n readyState: socketOpen ? 1 : 0,\n send: sendSocketMessage,\n close: wx.closeSocket,\n onopen: null,\n onmessage: null,\n onclose: null,\n onerror: null\n }\n\n wx.connectSocket({\n url: url,\n protocols: protocols\n })\n wx.onSocketOpen(function (res) {\n ws.readyState = ws.OPEN\n socketOpen = true\n for (var i = 0; i < socketMsgQueue.length; i++) {\n sendSocketMessage(socketMsgQueue[i])\n }\n socketMsgQueue = []\n\n ws.onopen && ws.onopen.apply(ws, arguments)\n })\n wx.onSocketMessage(function (res) {\n ws.onmessage && ws.onmessage.apply(ws, arguments)\n })\n wx.onSocketClose(function () {\n ws.onclose && ws.onclose.apply(ws, arguments)\n ws.readyState = ws.CLOSED\n socketOpen = false\n })\n wx.onSocketError(function () {\n ws.onerror && ws.onerror.apply(ws, arguments)\n ws.readyState = ws.CLOSED\n socketOpen = false\n })\n\n return ws\n}\n\nvar websocket = __webpack_require__(/*! websocket-stream */ \"./node_modules/websocket-stream/stream.js\")\n\nfunction buildUrl (opts, client) {\n var protocol = opts.protocol === 'wxs' ? 'wss' : 'ws'\n var url = protocol + '://' + opts.hostname + opts.path\n if (opts.port && opts.port !== 80 && opts.port !== 443) {\n url = protocol + '://' + opts.hostname + ':' + opts.port + opts.path\n }\n if (typeof (opts.transformWsUrl) === 'function') {\n url = opts.transformWsUrl(url, opts, client)\n }\n return url\n}\n\nfunction setDefaultOpts (opts) {\n if (!opts.hostname) {\n opts.hostname = 'localhost'\n }\n if (!opts.path) {\n opts.path = '/'\n }\n\n if (!opts.wsOptions) {\n opts.wsOptions = {}\n }\n}\n\nfunction createWebSocket (client, opts) {\n var websocketSubProtocol =\n (opts.protocolId === 'MQIsdp') && (opts.protocolVersion === 3)\n ? 'mqttv3.1'\n : 'mqtt'\n\n setDefaultOpts(opts)\n var url = buildUrl(opts, client)\n return websocket(WebSocket(url, [websocketSubProtocol]))\n}\n\nfunction buildBuilder (client, opts) {\n opts.hostname = opts.hostname || opts.host\n\n if (!opts.hostname) {\n throw new Error('Could not determine host. Specify host manually.')\n }\n\n return createWebSocket(client, opts)\n}\n\nmodule.exports = buildBuilder\n\n\n//# sourceURL=webpack:///./node_modules/mqtt/lib/connect/wx.js?"); - -/***/ }), - -/***/ "./node_modules/mqtt/lib/store.js": -/*!****************************************!*\ - !*** ./node_modules/mqtt/lib/store.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/* WEBPACK VAR INJECTION */(function(process) {\n\n/**\n * Module dependencies\n */\nvar xtend = __webpack_require__(/*! xtend */ \"./node_modules/xtend/immutable.js\")\n\nvar Readable = __webpack_require__(/*! readable-stream */ \"./node_modules/readable-stream/readable-browser.js\").Readable\nvar streamsOpts = { objectMode: true }\nvar defaultStoreOptions = {\n clean: true\n}\n\n/**\n * es6-map can preserve insertion order even if ES version is older.\n *\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Description\n * It should be noted that a Map which is a map of an object, especially\n * a dictionary of dictionaries, will only map to the object's insertion\n * order. In ES2015 this is ordered for objects but for older versions of\n * ES, this may be random and not ordered.\n *\n */\nvar Map = __webpack_require__(/*! es6-map */ \"./node_modules/es6-map/index.js\")\n\n/**\n * In-memory implementation of the message store\n * This can actually be saved into files.\n *\n * @param {Object} [options] - store options\n */\nfunction Store (options) {\n if (!(this instanceof Store)) {\n return new Store(options)\n }\n\n this.options = options || {}\n\n // Defaults\n this.options = xtend(defaultStoreOptions, options)\n\n this._inflights = new Map()\n}\n\n/**\n * Adds a packet to the store, a packet is\n * anything that has a messageId property.\n *\n */\nStore.prototype.put = function (packet, cb) {\n this._inflights.set(packet.messageId, packet)\n\n if (cb) {\n cb()\n }\n\n return this\n}\n\n/**\n * Creates a stream with all the packets in the store\n *\n */\nStore.prototype.createStream = function () {\n var stream = new Readable(streamsOpts)\n var destroyed = false\n var values = []\n var i = 0\n\n this._inflights.forEach(function (value, key) {\n values.push(value)\n })\n\n stream._read = function () {\n if (!destroyed && i < values.length) {\n this.push(values[i++])\n } else {\n this.push(null)\n }\n }\n\n stream.destroy = function () {\n if (destroyed) {\n return\n }\n\n var self = this\n\n destroyed = true\n\n process.nextTick(function () {\n self.emit('close')\n })\n }\n\n return stream\n}\n\n/**\n * deletes a packet from the store.\n */\nStore.prototype.del = function (packet, cb) {\n packet = this._inflights.get(packet.messageId)\n if (packet) {\n this._inflights.delete(packet.messageId)\n cb(null, packet)\n } else if (cb) {\n cb(new Error('missing packet'))\n }\n\n return this\n}\n\n/**\n * get a packet from the store.\n */\nStore.prototype.get = function (packet, cb) {\n packet = this._inflights.get(packet.messageId)\n if (packet) {\n cb(null, packet)\n } else if (cb) {\n cb(new Error('missing packet'))\n }\n\n return this\n}\n\n/**\n * Close the store\n */\nStore.prototype.close = function (cb) {\n if (this.options.clean) {\n this._inflights = null\n }\n if (cb) {\n cb()\n }\n}\n\nmodule.exports = Store\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/mqtt/lib/store.js?"); - -/***/ }), - -/***/ "./node_modules/mqtt/lib/validations.js": -/*!**********************************************!*\ - !*** ./node_modules/mqtt/lib/validations.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\n/**\n * Validate a topic to see if it's valid or not.\n * A topic is valid if it follow below rules:\n * - Rule #1: If any part of the topic is not `+` or `#`, then it must not contain `+` and '#'\n * - Rule #2: Part `#` must be located at the end of the mailbox\n *\n * @param {String} topic - A topic\n * @returns {Boolean} If the topic is valid, returns true. Otherwise, returns false.\n */\nfunction validateTopic (topic) {\n var parts = topic.split('/')\n\n for (var i = 0; i < parts.length; i++) {\n if (parts[i] === '+') {\n continue\n }\n\n if (parts[i] === '#') {\n // for Rule #2\n return i === parts.length - 1\n }\n\n if (parts[i].indexOf('+') !== -1 || parts[i].indexOf('#') !== -1) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * Validate an array of topics to see if any of them is valid or not\n * @param {Array} topics - Array of topics\n * @returns {String} If the topics is valid, returns null. Otherwise, returns the invalid one\n */\nfunction validateTopics (topics) {\n if (topics.length === 0) {\n return 'empty_topic_list'\n }\n for (var i = 0; i < topics.length; i++) {\n if (!validateTopic(topics[i])) {\n return topics[i]\n }\n }\n return null\n}\n\nmodule.exports = {\n validateTopics: validateTopics\n}\n\n\n//# sourceURL=webpack:///./node_modules/mqtt/lib/validations.js?"); - -/***/ }), - -/***/ "./node_modules/node-libs-browser/mock/empty.js": -/*!******************************************************!*\ - !*** ./node_modules/node-libs-browser/mock/empty.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("\n\n//# sourceURL=webpack:///./node_modules/node-libs-browser/mock/empty.js?"); - -/***/ }), - -/***/ "./node_modules/node-libs-browser/node_modules/events/events.js": -/*!**********************************************************************!*\ - !*** ./node_modules/node-libs-browser/node_modules/events/events.js ***! - \**********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction $getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return $getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = $getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) args.push(arguments[i]);\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n ReflectApply(this.listener, this.target, args);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\n\n//# sourceURL=webpack:///./node_modules/node-libs-browser/node_modules/events/events.js?"); - -/***/ }), - -/***/ "./node_modules/node-libs-browser/node_modules/url/url.js": -/*!****************************************************************!*\ - !*** ./node_modules/node-libs-browser/node_modules/url/url.js ***! - \****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nvar punycode = __webpack_require__(/*! punycode */ \"./node_modules/punycode/punycode.js\");\nvar util = __webpack_require__(/*! ./util */ \"./node_modules/node-libs-browser/node_modules/url/util.js\");\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = __webpack_require__(/*! querystring */ \"./node_modules/querystring-es3/index.js\");\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter =\n (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1)\n continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n util.isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol')\n result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host || srcPath.length > 1) &&\n (last === '.' || last === '..') || last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n\n\n//# sourceURL=webpack:///./node_modules/node-libs-browser/node_modules/url/url.js?"); - -/***/ }), - -/***/ "./node_modules/node-libs-browser/node_modules/url/util.js": -/*!*****************************************************************!*\ - !*** ./node_modules/node-libs-browser/node_modules/url/util.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = {\n isString: function(arg) {\n return typeof(arg) === 'string';\n },\n isObject: function(arg) {\n return typeof(arg) === 'object' && arg !== null;\n },\n isNull: function(arg) {\n return arg === null;\n },\n isNullOrUndefined: function(arg) {\n return arg == null;\n }\n};\n\n\n//# sourceURL=webpack:///./node_modules/node-libs-browser/node_modules/url/util.js?"); - -/***/ }), - -/***/ "./node_modules/once/once.js": -/*!***********************************!*\ - !*** ./node_modules/once/once.js ***! - \***********************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("var wrappy = __webpack_require__(/*! wrappy */ \"./node_modules/wrappy/wrappy.js\")\nmodule.exports = wrappy(once)\nmodule.exports.strict = wrappy(onceStrict)\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n\n Object.defineProperty(Function.prototype, 'onceStrict', {\n value: function () {\n return onceStrict(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var f = function () {\n if (f.called) return f.value\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n f.called = false\n return f\n}\n\nfunction onceStrict (fn) {\n var f = function () {\n if (f.called)\n throw new Error(f.onceError)\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n var name = fn.name || 'Function wrapped with `once`'\n f.onceError = name + \" shouldn't be called more than once\"\n f.called = false\n return f\n}\n\n\n//# sourceURL=webpack:///./node_modules/once/once.js?"); - -/***/ }), - -/***/ "./node_modules/path-browserify/index.js": -/*!***********************************************!*\ - !*** ./node_modules/path-browserify/index.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\nvar splitPath = function(filename) {\n return splitPathRe.exec(filename).slice(1);\n};\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function(path) {\n var result = splitPath(path),\n root = result[0],\n dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n};\n\n\nexports.basename = function(path, ext) {\n var f = splitPath(path)[2];\n // TODO: make this comparison case-insensitive on windows?\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\n\nexports.extname = function(path) {\n return splitPath(path)[3];\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/path-browserify/index.js?"); - -/***/ }), - -/***/ "./node_modules/process-nextick-args/index.js": -/*!****************************************************!*\ - !*** ./node_modules/process-nextick-args/index.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nif (!process.version ||\n process.version.indexOf('v0.') === 0 ||\n process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\n module.exports = { nextTick: nextTick };\n} else {\n module.exports = process\n}\n\nfunction nextTick(fn, arg1, arg2, arg3) {\n if (typeof fn !== 'function') {\n throw new TypeError('\"callback\" argument must be a function');\n }\n var len = arguments.length;\n var args, i;\n switch (len) {\n case 0:\n case 1:\n return process.nextTick(fn);\n case 2:\n return process.nextTick(function afterTickOne() {\n fn.call(null, arg1);\n });\n case 3:\n return process.nextTick(function afterTickTwo() {\n fn.call(null, arg1, arg2);\n });\n case 4:\n return process.nextTick(function afterTickThree() {\n fn.call(null, arg1, arg2, arg3);\n });\n default:\n args = new Array(len - 1);\n i = 0;\n while (i < args.length) {\n args[i++] = arguments[i];\n }\n return process.nextTick(function afterTick() {\n fn.apply(null, args);\n });\n }\n}\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/process-nextick-args/index.js?"); - -/***/ }), - -/***/ "./node_modules/process/browser.js": -/*!*****************************************!*\ - !*** ./node_modules/process/browser.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack:///./node_modules/process/browser.js?"); - -/***/ }), - -/***/ "./node_modules/punycode/punycode.js": -/*!*******************************************!*\ - !*** ./node_modules/punycode/punycode.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.3.2 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = true && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = true && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * http://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttrue\n\t) {\n\t\t!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {\n\t\t\treturn punycode;\n\t\t}).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n\n}(this));\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module), __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/punycode/punycode.js?"); - -/***/ }), - -/***/ "./node_modules/querystring-es3/decode.js": -/*!************************************************!*\ - !*** ./node_modules/querystring-es3/decode.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\n\n//# sourceURL=webpack:///./node_modules/querystring-es3/decode.js?"); - -/***/ }), - -/***/ "./node_modules/querystring-es3/encode.js": -/*!************************************************!*\ - !*** ./node_modules/querystring-es3/encode.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n\n\n//# sourceURL=webpack:///./node_modules/querystring-es3/encode.js?"); - -/***/ }), - -/***/ "./node_modules/querystring-es3/index.js": -/*!***********************************************!*\ - !*** ./node_modules/querystring-es3/index.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nexports.decode = exports.parse = __webpack_require__(/*! ./decode */ \"./node_modules/querystring-es3/decode.js\");\nexports.encode = exports.stringify = __webpack_require__(/*! ./encode */ \"./node_modules/querystring-es3/encode.js\");\n\n\n//# sourceURL=webpack:///./node_modules/querystring-es3/index.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/duplex-browser.js": -/*!********************************************************!*\ - !*** ./node_modules/readable-stream/duplex-browser.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("module.exports = __webpack_require__(/*! ./lib/_stream_duplex.js */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\n\n\n//# sourceURL=webpack:///./node_modules/readable-stream/duplex-browser.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/_stream_duplex.js": -/*!************************************************************!*\ - !*** ./node_modules/readable-stream/lib/_stream_duplex.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n\n\n/**/\n\nvar pna = __webpack_require__(/*! process-nextick-args */ \"./node_modules/process-nextick-args/index.js\");\n/**/\n\n/**/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n keys.push(key);\n }return keys;\n};\n/**/\n\nmodule.exports = Duplex;\n\n/**/\nvar util = __webpack_require__(/*! core-util-is */ \"./node_modules/core-util-is/lib/util.js\");\nutil.inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n/**/\n\nvar Readable = __webpack_require__(/*! ./_stream_readable */ \"./node_modules/readable-stream/lib/_stream_readable.js\");\nvar Writable = __webpack_require__(/*! ./_stream_writable */ \"./node_modules/readable-stream/lib/_stream_writable.js\");\n\nutil.inherits(Duplex, Readable);\n\n{\n // avoid scope creep, the keys array can then be collected\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n\n Readable.call(this, options);\n Writable.call(this, options);\n\n if (options && options.readable === false) this.readable = false;\n\n if (options && options.writable === false) this.writable = false;\n\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n this.once('end', onend);\n}\n\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._writableState.highWaterMark;\n }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n pna.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});\n\nDuplex.prototype._destroy = function (err, cb) {\n this.push(null);\n this.end();\n\n pna.nextTick(cb, err);\n};\n\n//# sourceURL=webpack:///./node_modules/readable-stream/lib/_stream_duplex.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/_stream_passthrough.js": -/*!*****************************************************************!*\ - !*** ./node_modules/readable-stream/lib/_stream_passthrough.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n\n\nmodule.exports = PassThrough;\n\nvar Transform = __webpack_require__(/*! ./_stream_transform */ \"./node_modules/readable-stream/lib/_stream_transform.js\");\n\n/**/\nvar util = __webpack_require__(/*! core-util-is */ \"./node_modules/core-util-is/lib/util.js\");\nutil.inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n/**/\n\nutil.inherits(PassThrough, Transform);\n\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};\n\n//# sourceURL=webpack:///./node_modules/readable-stream/lib/_stream_passthrough.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/_stream_readable.js": -/*!**************************************************************!*\ - !*** ./node_modules/readable-stream/lib/_stream_readable.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n/**/\n\nvar pna = __webpack_require__(/*! process-nextick-args */ \"./node_modules/process-nextick-args/index.js\");\n/**/\n\nmodule.exports = Readable;\n\n/**/\nvar isArray = __webpack_require__(/*! isarray */ \"./node_modules/isarray/index.js\");\n/**/\n\n/**/\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n\n/**/\nvar EE = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\").EventEmitter;\n\nvar EElistenerCount = function (emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\nvar Stream = __webpack_require__(/*! ./internal/streams/stream */ \"./node_modules/readable-stream/lib/internal/streams/stream-browser.js\");\n/**/\n\n/**/\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/**/\n\n/**/\nvar util = __webpack_require__(/*! core-util-is */ \"./node_modules/core-util-is/lib/util.js\");\nutil.inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n/**/\n\n/**/\nvar debugUtil = __webpack_require__(/*! util */ 0);\nvar debug = void 0;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function () {};\n}\n/**/\n\nvar BufferList = __webpack_require__(/*! ./internal/streams/BufferList */ \"./node_modules/readable-stream/lib/internal/streams/BufferList.js\");\nvar destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ \"./node_modules/readable-stream/lib/internal/streams/destroy.js\");\nvar StringDecoder;\n\nutil.inherits(Readable, Stream);\n\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n var hwm = options.highWaterMark;\n var readableHwm = options.readableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ \"./node_modules/string_decoder/lib/string_decoder.js\").StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nfunction Readable(options) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\n\n if (!(this instanceof Readable)) return new Readable(options);\n\n this._readableState = new ReadableState(options, this);\n\n // legacy\n this.readable = true;\n\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n\n Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\n\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n this.push(null);\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n stream.emit('error', er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (addToFront) {\n if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n stream.emit('error', new Error('stream.push() after EOF'));\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n }\n\n return needMoreData(state);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n return er;\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ \"./node_modules/string_decoder/lib/string_decoder.js\").StringDecoder;\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n\n return ret;\n};\n\nfunction onEofChunk(stream, state) {\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n\n // emit 'readable' now to make sure it gets picked up.\n emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n pna.nextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n this.emit('error', new Error('_read() is not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);\n\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n increasedAwaitDrain = true;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = { hasUnpiped: false };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var i = 0; i < len; i++) {\n dests[i].emit('unpipe', this, unpipeInfo);\n }return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n dest.emit('unpipe', this, unpipeInfo);\n\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n if (!state.reading) {\n pna.nextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this);\n }\n }\n }\n\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n pna.nextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n\n var state = this._readableState;\n var paused = false;\n\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n\n _this.push(null);\n });\n\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return this;\n};\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._readableState.highWaterMark;\n }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n\n return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n var ret;\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n\n // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n pna.nextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/readable-stream/lib/_stream_readable.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/_stream_transform.js": -/*!***************************************************************!*\ - !*** ./node_modules/readable-stream/lib/_stream_transform.js ***! - \***************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n\n\nmodule.exports = Transform;\n\nvar Duplex = __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\n\n/**/\nvar util = __webpack_require__(/*! core-util-is */ \"./node_modules/core-util-is/lib/util.js\");\nutil.inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n/**/\n\nutil.inherits(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n\n var cb = ts.writecb;\n\n if (!cb) {\n return this.emit('error', new Error('write callback called multiple times'));\n }\n\n ts.writechunk = null;\n ts.writecb = null;\n\n if (data != null) // single equals check for both `null` and `undefined`\n this.push(data);\n\n cb(er);\n\n var rs = this._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\n\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n\n Duplex.call(this, options);\n\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n };\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n // When the writable side finishes, then flush out anything remaining.\n this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n var _this = this;\n\n if (typeof this._flush === 'function') {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n throw new Error('_transform() is not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\nTransform.prototype._destroy = function (err, cb) {\n var _this2 = this;\n\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n _this2.emit('close');\n });\n};\n\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n\n if (data != null) // single equals check for both `null` and `undefined`\n stream.push(data);\n\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');\n\n if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');\n\n return stream.push(null);\n}\n\n//# sourceURL=webpack:///./node_modules/readable-stream/lib/_stream_transform.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/_stream_writable.js": -/*!**************************************************************!*\ - !*** ./node_modules/readable-stream/lib/_stream_writable.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n\n\n/**/\n\nvar pna = __webpack_require__(/*! process-nextick-args */ \"./node_modules/process-nextick-args/index.js\");\n/**/\n\nmodule.exports = Writable;\n\n/* */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* */\n\n/**/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;\n/**/\n\n/**/\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n\n/**/\nvar util = __webpack_require__(/*! core-util-is */ \"./node_modules/core-util-is/lib/util.js\");\nutil.inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n/**/\n\n/**/\nvar internalUtil = {\n deprecate: __webpack_require__(/*! util-deprecate */ \"./node_modules/util-deprecate/browser.js\")\n};\n/**/\n\n/**/\nvar Stream = __webpack_require__(/*! ./internal/streams/stream */ \"./node_modules/readable-stream/lib/internal/streams/stream-browser.js\");\n/**/\n\n/**/\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/**/\n\nvar destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ \"./node_modules/readable-stream/lib/internal/streams/destroy.js\");\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var writableHwm = options.writableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function (object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function (object) {\n return object instanceof this;\n };\n}\n\nfunction Writable(options) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\n return new Writable(options);\n }\n\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n\n if (typeof options.writev === 'function') this._writev = options.writev;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n\n if (typeof options.final === 'function') this._final = options.final;\n }\n\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n pna.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n pna.nextTick(cb, er);\n valid = false;\n }\n return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n if (typeof cb !== 'function') cb = nop;\n\n if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n\n return ret;\n};\n\nWritable.prototype.cork = function () {\n var state = this._writableState;\n\n state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n\n if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._writableState.highWaterMark;\n }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n\n state.length += len;\n\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n pna.nextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n pna.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n\n onwriteStateUpdate(state);\n\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n /**/\n asyncWrite(afterWrite, stream, state, finished, cb);\n /**/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('_write() is not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n stream.emit('error', err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function') {\n state.pendingcb++;\n state.finalCalled = true;\n pna.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n }\n }\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n if (state.corkedRequestsFree) {\n state.corkedRequestsFree.next = corkReq;\n } else {\n state.corkedRequestsFree = corkReq;\n }\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n get: function () {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\n\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n this.end();\n cb(err);\n};\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\"), __webpack_require__(/*! ./../../timers-browserify/main.js */ \"./node_modules/timers-browserify/main.js\").setImmediate, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/readable-stream/lib/_stream_writable.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/internal/streams/BufferList.js": -/*!*************************************************************************!*\ - !*** ./node_modules/readable-stream/lib/internal/streams/BufferList.js ***! - \*************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Buffer = __webpack_require__(/*! safe-buffer */ \"./node_modules/safe-buffer/index.js\").Buffer;\nvar util = __webpack_require__(/*! util */ 1);\n\nfunction copyBuffer(src, target, offset) {\n src.copy(target, offset);\n}\n\nmodule.exports = function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n\n BufferList.prototype.push = function push(v) {\n var entry = { data: v, next: null };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n };\n\n BufferList.prototype.unshift = function unshift(v) {\n var entry = { data: v, next: this.head };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n };\n\n BufferList.prototype.shift = function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n };\n\n BufferList.prototype.clear = function clear() {\n this.head = this.tail = null;\n this.length = 0;\n };\n\n BufferList.prototype.join = function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) {\n ret += s + p.data;\n }return ret;\n };\n\n BufferList.prototype.concat = function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n if (this.length === 1) return this.head.data;\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n };\n\n return BufferList;\n}();\n\nif (util && util.inspect && util.inspect.custom) {\n module.exports.prototype[util.inspect.custom] = function () {\n var obj = util.inspect({ length: this.length });\n return this.constructor.name + ' ' + obj;\n };\n}\n\n//# sourceURL=webpack:///./node_modules/readable-stream/lib/internal/streams/BufferList.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/internal/streams/destroy.js": -/*!**********************************************************************!*\ - !*** ./node_modules/readable-stream/lib/internal/streams/destroy.js ***! - \**********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\n/**/\n\nvar pna = __webpack_require__(/*! process-nextick-args */ \"./node_modules/process-nextick-args/index.js\");\n/**/\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n var _this = this;\n\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {\n pna.nextTick(emitErrorNT, this, err);\n }\n return this;\n }\n\n // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n\n // if this is a duplex stream mark the writable part as destroyed as well\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n pna.nextTick(emitErrorNT, _this, err);\n if (_this._writableState) {\n _this._writableState.errorEmitted = true;\n }\n } else if (cb) {\n cb(err);\n }\n });\n\n return this;\n}\n\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\n\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\n\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy\n};\n\n//# sourceURL=webpack:///./node_modules/readable-stream/lib/internal/streams/destroy.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/lib/internal/streams/stream-browser.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/readable-stream/lib/internal/streams/stream-browser.js ***! - \*****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("module.exports = __webpack_require__(/*! events */ \"./node_modules/node-libs-browser/node_modules/events/events.js\").EventEmitter;\n\n\n//# sourceURL=webpack:///./node_modules/readable-stream/lib/internal/streams/stream-browser.js?"); - -/***/ }), - -/***/ "./node_modules/readable-stream/readable-browser.js": -/*!**********************************************************!*\ - !*** ./node_modules/readable-stream/readable-browser.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("exports = module.exports = __webpack_require__(/*! ./lib/_stream_readable.js */ \"./node_modules/readable-stream/lib/_stream_readable.js\");\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = __webpack_require__(/*! ./lib/_stream_writable.js */ \"./node_modules/readable-stream/lib/_stream_writable.js\");\nexports.Duplex = __webpack_require__(/*! ./lib/_stream_duplex.js */ \"./node_modules/readable-stream/lib/_stream_duplex.js\");\nexports.Transform = __webpack_require__(/*! ./lib/_stream_transform.js */ \"./node_modules/readable-stream/lib/_stream_transform.js\");\nexports.PassThrough = __webpack_require__(/*! ./lib/_stream_passthrough.js */ \"./node_modules/readable-stream/lib/_stream_passthrough.js\");\n\n\n//# sourceURL=webpack:///./node_modules/readable-stream/readable-browser.js?"); - -/***/ }), - -/***/ "./node_modules/reinterval/index.js": -/*!******************************************!*\ - !*** ./node_modules/reinterval/index.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nfunction ReInterval (callback, interval, args) {\n var self = this;\n\n this._callback = callback;\n this._args = args;\n\n this._interval = setInterval(callback, interval, this._args);\n\n this.reschedule = function (interval) {\n // if no interval entered, use the interval passed in on creation\n if (!interval)\n interval = self._interval;\n\n if (self._interval)\n clearInterval(self._interval);\n self._interval = setInterval(self._callback, interval, self._args);\n };\n\n this.clear = function () {\n if (self._interval) {\n clearInterval(self._interval);\n self._interval = undefined;\n }\n };\n \n this.destroy = function () {\n if (self._interval) {\n clearInterval(self._interval);\n }\n self._callback = undefined;\n self._interval = undefined;\n self._args = undefined;\n };\n}\n\nfunction reInterval () {\n if (typeof arguments[0] !== 'function')\n throw new Error('callback needed');\n if (typeof arguments[1] !== 'number')\n throw new Error('interval needed');\n\n var args;\n\n if (arguments.length > 0) {\n args = new Array(arguments.length - 2);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 2];\n }\n }\n\n return new ReInterval(arguments[0], arguments[1], args);\n}\n\nmodule.exports = reInterval;\n\n\n//# sourceURL=webpack:///./node_modules/reinterval/index.js?"); - -/***/ }), - -/***/ "./node_modules/safe-buffer/index.js": -/*!*******************************************!*\ - !*** ./node_modules/safe-buffer/index.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("/* eslint-disable node/no-deprecated-api */\nvar buffer = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\")\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n\n\n//# sourceURL=webpack:///./node_modules/safe-buffer/index.js?"); - -/***/ }), - -/***/ "./node_modules/setimmediate/setImmediate.js": -/*!***************************************************!*\ - !*** ./node_modules/setimmediate/setImmediate.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a - + + diff --git a/web-widget/src/js/components/conversation-window.js b/web-widget/src/js/components/conversation-window.js index 91f539d..6eab7bb 100644 --- a/web-widget/src/js/components/conversation-window.js +++ b/web-widget/src/js/components/conversation-window.js @@ -67,7 +67,13 @@ class ConversationWindow { // Create conversation header title let titleAttributes = [{"class":"ch-conv-title"}]; - this.utility.createElement("div", titleAttributes, conversation.title, detailsWrapper); + let headerTitle = this.utility.createElement("div", titleAttributes, conversation.title, detailsWrapper); + + if(this.conversation.isGroup) { + headerTitle.addEventListener("click", (data) => { + this.widget.loadConversationMembers(this.conversation.id); + }); + } // Create option button let optionAttributes = [{"id":"ch_conv_options"}]; diff --git a/web-widget/src/js/components/members.js b/web-widget/src/js/components/members.js new file mode 100644 index 0000000..c8a3ab1 --- /dev/null +++ b/web-widget/src/js/components/members.js @@ -0,0 +1,126 @@ +import Utility from "../utility.js"; +import ConversationWindow from "./conversation-window.js"; +import { LANGUAGE_PHRASES, IMAGES } from "../constants.js"; + +class Members { + constructor(widget, conversationId) { + this.widget = widget; + this.chAdapter = widget.chAdapter; + this.conversationId = conversationId; + this.utility = new Utility(); + this.createMembersList(); + } + + createMembersList() { + // Remove previous members window if exist + let olderMembersWindow = document.getElementById("ch_members_window"); + if(olderMembersWindow) { + olderMembersWindow.remove(); + } + + // Create members box components + let widget = document.getElementById("ch_frame"); + let membersWindowAttributes = [{"id": "ch_members_window"},{"class":"ch-members-window"}]; + let membersWindow = this.utility.createElement("div", membersWindowAttributes, null, widget); + + // Create members header + let membersHeaderAttributes = [{"id":"ch_members_header"},{"class":"ch-header"}]; + let membersHeader = this.utility.createElement("div", membersHeaderAttributes, LANGUAGE_PHRASES.MEMBERS, membersWindow); + + // Create members Close button + let closeBtnAttributes = [{"id":"ch_members_close_btn"}]; + let closeBtn = this.utility.createElement("i", closeBtnAttributes, "arrow_back", membersHeader); + closeBtn.classList.add("material-icons", "ch-close-btn"); + + // Create members listing box + let membersBoxAttributes = [{"id":"ch_members_box"},{"class":"ch-members-box"}]; + this.utility.createElement("div", membersBoxAttributes, null, membersWindow); + + // get conversation Members + this.chAdapter.getConversation(this.conversationId, (err, conversation) => { + if (err) return console.error(err); + + if(conversation.members) { + conversation.members.forEach(member => { + this._loadMembers(member); + }); + } + }); + + this._registerClickEventHandlers(); + } + + _loadMembers(member) { + let membersBox = document.getElementById("ch_members_box"); + let membersListAttributes = [{"id":member.userId},{"class":"ch-members-list"}]; + let membersList = this.utility.createElement("li", membersListAttributes, null, membersBox); + + if(member.userId !== this.widget.userId) { + // Add click listener on members list + membersList.addEventListener("click", (data) => { + // Remove conversation window + if(document.getElementById("ch_conv_window")) { + document.getElementById("ch_conv_window").remove(); + this.widget.convWindows.pop(); + } + + // Remove members window + document.getElementById("ch_members_window").remove(); + + // Check for exist conversation + this.chAdapter.getConversationsList(1, 0 , member.userId, "members", null, null, null, null, null, (err, conversation) => { + if(err) return console.error(err); + + conversation = conversation[0]; + + if(conversation) { + const conversationWindow = new ConversationWindow(this.widget); + conversationWindow.init(conversation); + this.widget.convWindows.push(conversationWindow); + } + else { + // Open new conversation window + const conversationWindow = new ConversationWindow(this.widget); + conversationWindow.init(null, member.user); + this.widget.convWindows.push(conversationWindow); + } + }); + }); + } + else { + membersList.style.cursor = "text"; + } + + // Create image tag + member.profileImageUrl = member.user.profileImageUrl ? member.user.profileImageUrl : IMAGES.AVTAR; + let imageAttributes = [{"id":"ch_member_img"},{"class":"ch-member-img"}]; + let memberImg = this.utility.createElement("div", imageAttributes, null, membersList); + memberImg.style.backgroundImage = "url(" + member.profileImageUrl + ")"; + + // Create name div + const memberName = member.userId === this.widget.userId ? member.user.displayName + " (You)" : member.user.displayName; + let nameAttributes = [{"id":"ch_member_name"},{"class":"ch-member-name"}]; + this.utility.createElement("div", nameAttributes, memberName, membersList); + + // Create online icon + let iconAttributes = [{"id":member.user.id+"_member_online_icon"},{"class":"ch-online-icon"}]; + let icon = this.utility.createElement("span", iconAttributes, null, memberImg); + + // Show online icon + if(member.user.isOnline) { + icon.classList.add("ch-show-element"); + } + } + + _registerClickEventHandlers() { + // Close search button listener + let closeBtn = document.getElementById("ch_members_close_btn"); + if(closeBtn) { + closeBtn.addEventListener("click", (data) => { + document.getElementById("ch_members_window").remove(); + }); + } + } +} + +export { Members as default } \ No newline at end of file diff --git a/web-widget/src/js/widget.js b/web-widget/src/js/widget.js index 3e6767b..9d2c3ac 100644 --- a/web-widget/src/js/widget.js +++ b/web-widget/src/js/widget.js @@ -2,6 +2,7 @@ import '../scss/main.scss'; import ChannelizeAdapter from "./adapter.js"; import Utility from "./utility.js"; import Login from "./components/login.js"; +import Members from "./components/members.js"; import RecentConversations from "./components/recent-conversations.js"; import ConversationWindow from "./components/conversation-window.js"; import { LANGUAGE_PHRASES, IMAGES } from "./constants.js"; @@ -24,7 +25,7 @@ class ChannelizeWidget { } // Load channelize - load() { + load(cb) { // Check for already login user let userId = this.getCookie("ch_user_id"); let accessToken = this.getCookie("ch_access_token"); @@ -35,6 +36,7 @@ class ChannelizeWidget { this.userId = userId; this._createLauncher(); + cb(null, res); }); } else { @@ -52,13 +54,14 @@ class ChannelizeWidget { } // Connect and load channelize - loadWithUserId(userId, accessToken) { + loadWithUserId(userId, accessToken, cb) { this.connect(userId, accessToken, (err, res) => { if(err) return console.error(err); this.userId = userId; this.setCookie(userId, accessToken, 30); this._createLauncher(); + cb(null, res); }); } @@ -179,6 +182,15 @@ class ChannelizeWidget { this.convWindows.forEach(conversationWindow => { conversationWindow.updateUserStatus(data.user); }); + + if(document.getElementById(data.user.id+"_member_online_icon")) { + if(data.user.isOnline) { + document.getElementById(data.user.id+"_member_online_icon").classList.add("ch-show-element"); + } + else { + document.getElementById(data.user.id+"_member_online_icon").classList.remove("ch-show-element"); + } + } }); // Handle clear conversation @@ -302,6 +314,10 @@ class ChannelizeWidget { }); } } + + loadConversationMembers(conversationId) { + new Members(this, conversationId); + } } window.ChannelizeWidget = ChannelizeWidget; \ No newline at end of file diff --git a/web-widget/src/scss/main.scss b/web-widget/src/scss/main.scss index 29d4b1d..b305cb5 100644 --- a/web-widget/src/scss/main.scss +++ b/web-widget/src/scss/main.scss @@ -15,6 +15,9 @@ ul { .right { float: right; } +.ch-text-pointer { + cursor: text !important; +} .ch-loader-bg { position: absolute; height: inherit; @@ -150,7 +153,7 @@ ul { } } /*screen window common style*/ -.ch-login-window, .ch-conv-window, .ch-search-window, .ch-recent-window { +.ch-login-window, .ch-conv-window, .ch-search-window, .ch-recent-window, .ch-members-window { border-top-left-radius: 8px; border-top-right-radius: 8px; position: fixed; @@ -504,6 +507,7 @@ ul { color: $ch-title-color; text-transform: capitalize; font-size: $ch-title-fontsize; + cursor: pointer; } .ch-conv-options { vertical-align: middle; @@ -836,3 +840,76 @@ ul { } } /*conversation style end here*/ + +/*Members style start here*/ + +.ch-members-window { + right: 24%; + top: 35%; + bottom: 0; + width: 22%; + background-color: #fff; + box-shadow: rgba(0,0,0,.3) 0 0 1.2em; + .ch-header { + line-height: 35px; + text-align: center; + color: $ch-title-color; + i#ch_members_close_btn { + position: absolute; + left: 10px; + top: 17px; + color: $ch-recent-conversation-header-font-icon-color; + &:hover { + color: $ch-recent-conversation-header-font-icon-hover-color; + } + } + } + .ch-members-box { + height: calc(100% - 92px); + overflow: auto; + li { + cursor: pointer; + list-style: none; + position: relative; + padding: 10px; + min-height: 32px; + border-bottom: 1px solid rgba(90,122,190,.08); + .ch-member-img { + height: 32px; + width: 32px; + border-radius: 50%; + float: left; + margin-right: 10px; + position: relative; + background-size: cover; + .ch-online-icon { + background: #64ba00; + border-radius: 50%; + border: 2px solid #fff; + bottom: 0; + position: absolute; + right: 1px; + width: 6px; + height: 6px; + display: none; + } + } + .ch-member-name { + width: 180px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + padding-right: 5px; + font-size: 13px; + display: inline-block; + vertical-align: middle; + color: #4a505a; + font-weight: 400; + margin-top: 8px; + text-transform: capitalize; + } + } + } +} + +/*Members style end here*/ From 28ba7d360a2616a65cdea084c7c38cebc9139c2f Mon Sep 17 00:00:00 2001 From: chetan-b-bigstep Date: Tue, 7 Apr 2020 12:03:45 +0530 Subject: [PATCH 3/7] Fixed message delay issue --- web-widget/index.html | 2 +- web-widget/package.json | 7 +- .../src/js/components/conversation-window.js | 85 ++++++++++++++++--- .../src/js/components/recent-conversations.js | 45 +++------- web-widget/src/js/widget.js | 28 ++++-- 5 files changed, 112 insertions(+), 55 deletions(-) diff --git a/web-widget/index.html b/web-widget/index.html index 65b51a5..9ed2263 100644 --- a/web-widget/index.html +++ b/web-widget/index.html @@ -8,7 +8,7 @@
- + + ``` ##### Step 3: Import Channelize JS-SDK ##### @@ -32,7 +32,7 @@ Import the `widget.Channelize.js` file after body tag in your website. Import the [`Channelize JS-SDK`](https://docs.channelize.io/javascript-sdk-introduction-overview) after body tag in your website. ```javascript - + ``` ##### Step 4: Create widget object ##### @@ -109,16 +109,17 @@ Load the recent conversations screen using `loadRecentConversation()` method. It ``` ### Load Conversation Window -Load conversation window using `loadConversationWindow()` method. It requires two arguments otherMemberId and conversationId. +Load conversation window using `loadConversationWindow()` method. It requires conversation-id as argument. -```html -... +```js + loadConversationWindow(conversationId) +``` - - +### Load Conversation Window By User-Id +Load conversation window using `loadConversationWindowByUserId(userId)` method. It requires user-id as argument. + +```js + loadConversationWindowByUserId(userId) ``` ## File Structure of Channelize Sample App @@ -132,8 +133,10 @@ Load conversation window using `loadConversationWindow()` method. It requires tw |-- components |-- conversation-window.js - conversation screen class |-- login.js - login class + |-- members.js - members class |-- recent-conversation.js - recent conversation class |-- search.js - search class + |-- thread.js - thread screen class |-- adapter.js - Channelize JS SDK functions |-- constants.js - const variables |-- utility.js - utility functions diff --git a/web-widget/index.html b/web-widget/index.html old mode 100644 new mode 100755 index 9ed2263..16cf922 --- a/web-widget/index.html +++ b/web-widget/index.html @@ -8,8 +8,8 @@
- - + +