Files
mohiit1502.github.io/dist/bundle.js
2018-07-25 12:53:58 +05:30

288 lines
85 KiB
JavaScript

/******/ (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 = 0);
/******/ })
/************************************************************************/
/******/ ({
/***/ "./node_modules/css-loader/index.js!./node_modules/sass-loader/lib/loader.js!./src/styles/css/base.css":
/*!****************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./src/styles/css/base.css ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/lib/css-base.js */ \"./node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.i, \"\", \"\"]);\n\n// exports\n\n\n//# sourceURL=webpack:///./src/styles/css/base.css?./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js");
/***/ }),
/***/ "./node_modules/css-loader/index.js!./node_modules/sass-loader/lib/loader.js!./src/styles/scss/base.scss":
/*!******************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./src/styles/scss/base.scss ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/lib/css-base.js */ \"./node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.i, \"body {\\n font-family: 'Poppins', sans-serif;\\n background-color: #252525; }\\n\\np {\\n font-family: 'Poppins', sans-serif;\\n font-size: 1.1em;\\n font-weight: 300;\\n line-height: 1.7em;\\n color: #999; }\\n\\na,\\na:hover,\\na:focus {\\n color: inherit;\\n text-decoration: none;\\n transition: all 0.3s; }\\n\\n.navbar {\\n padding: 15px 10px;\\n background: #fff;\\n border: none;\\n border-radius: 0 5px 5px 0;\\n margin-bottom: 40px;\\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1); }\\n\\n.navbar-btn {\\n box-shadow: none;\\n outline: none !important;\\n border: none; }\\n\\n.line {\\n width: 100%;\\n height: 1px;\\n border-bottom: 1px dashed #ddd;\\n margin: 20px 0; }\\n\\ni,\\nspan {\\n display: inline-block; }\\n\\n/* ---------------------------------------------------\\r\\n SIDEBAR STYLE\\r\\n----------------------------------------------------- */\\n.wrapper {\\n display: flex;\\n align-items: stretch; }\\n\\n#sidebar {\\n min-width: 250px;\\n max-width: 250px;\\n background: #f39c12;\\n color: #252525;\\n transition: all 0.3s; }\\n\\n#sidebar.active {\\n min-width: 80px;\\n max-width: 80px;\\n text-align: center; }\\n\\n#sidebar.active .sidebar-header h3,\\n#sidebar.active .CTAs {\\n display: none; }\\n\\n.sidebar-header h3 {\\n display: inline;\\n padding-left: 0.6em;\\n vertical-align: middle; }\\n\\n#sidebar.active .sidebar-header strong {\\n display: block; }\\n\\n#sidebar ul li a {\\n text-align: left; }\\n\\n#sidebar.active ul li a {\\n padding: 20px 10px;\\n text-align: center;\\n font-size: 0.85em; }\\n\\n#sidebar.active ul li a i {\\n margin-right: 0;\\n display: block;\\n font-size: 1.8em;\\n margin-bottom: 5px; }\\n\\n#sidebar.active ul ul a {\\n padding: 10px !important; }\\n\\n#sidebar.active .dropdown-toggle::after {\\n top: auto;\\n bottom: 10px;\\n right: 50%;\\n -webkit-transform: translateX(50%);\\n -ms-transform: translateX(50%);\\n transform: translateX(50%); }\\n\\n#sidebar .sidebar-header {\\n padding: 20px;\\n background: #252525; }\\n\\n#sidebar .sidebar-header strong {\\n display: none;\\n font-size: 1.8em; }\\n\\n#sidebar ul.components {\\n padding: 20px 0;\\n border-bottom: 3px solid #252525; }\\n\\n#sidebar ul li a {\\n padding: 10px;\\n font-size: 1.1em;\\n display: block; }\\n\\n#sidebar ul li a:hover {\\n color: #7386D5;\\n background: #fff; }\\n\\n#sidebar ul li a i {\\n margin-right: 10px; }\\n\\n#sidebar ul li.active > a,\\na[aria-expanded=\\\"true\\\"] {\\n color: #f39c12;\\n background: #252525; }\\n\\na[data-toggle=\\\"collapse\\\"] {\\n position: relative; }\\n\\n.dropdown-toggle::after {\\n display: block;\\n position: absolute;\\n top: 50%;\\n right: 20px;\\n transform: translateY(-50%); }\\n\\nul ul a {\\n font-size: 0.9em !important;\\n padding-left: 30px !important;\\n background: white;\\n font-weight: bolder; }\\n\\nul.CTAs {\\n padding: 20px; }\\n\\nul.CTAs a {\\n text-align: center;\\n font-size: 0.9em !important;\\n display: block;\\n border-radius: 5px;\\n margin-bottom: 5px; }\\n\\na.download {\\n background: #fff;\\n color: #7386D5; }\\n\\na.article,\\na.article:hover {\\n background: #6d7fcc !important;\\n color: #fff !important; }\\n\\n/* ---------------------------------------------------\\r\\n CONTENT STYLE\\r\\n----------------------------------------------------- */\\n#content {\\n width: 100%;\\n padding: 20px;\\n min-height: 100vh;\\n transition: all 0.3s; }\\n\\n/* ---------------------------------------------------\\r\\n MEDIAQUERIES\\r\\n----------------------------------------------------- */\\n@media (max-width: 768px) {\\n #sidebar {\\n min-width: 80px;\\n max-width: 80px;\\n text-align: center;\\n margin-left: -80px !important; }\\n .dropdown-toggle::after {\\n top: auto;\\n bottom: 10px;\\n right: 50%;\\n -webkit-transform: translateX(50%);\\n -ms-transform: translateX(50%);\\n transform: translateX(50%); }\\n #sidebar.active {\\n margin-left: 0 !important; }\\n #sidebar .sidebar-header h3,\\n #sidebar .CTAs {\\n display: none; }\\n #sidebar .sidebar-header strong {\\n display: block; }\\n #sidebar ul li a {\\n padding: 20px 10px; }\\n #sidebar ul li a span {\\n font-size: 0.85em; }\\n #sidebar ul li a i {\\n margin-right: 0;\\n display: block; }\\n #sidebar ul ul a {\\n padding: 10px !important; }\\n #sidebar ul li a i {\\n font-size: 1.3em; }\\n #sidebar {\\n margin-left: 0; }\\n #sidebarCollapse span {\\n display: none; }\\n .text-muted {\\n color: #bcb !important; } }\\n\\n@media (min-width: 576px) {\\n .card-group > .card:first-child {\\n border-top-right-radius: .25rem;\\n border-bottom-right-radius: .25rem; }\\n .card-group > .card:not(:first-child):not(:last-child):not(:only-child) {\\n border-radius: .25rem; }\\n .card-group > .card:last-child {\\n border-top-left-radius: .25rem;\\n border-bottom-left-radius: .25rem; } }\\n\\n/* -------------------------------------------------\\r\\nADDITIONS\\r\\n--------------------------------------------------*/\\n.hide {\\n display: none; }\\n\\n.prompt {\\n display: flex;\\n width: 2em;\\n border-right: 1px solid #c99034;\\n background-color: #f5d38b;\\n width: 4%;\\n margin-bottom: 40px;\\n border-radius: 4px 0 0 4px; }\\n\\n.promptext {\\n animation: blinkingText 0.8s infinite;\\n color: #975f04;\\n text-align: center;\\n line-height: 2em;\\n font: 1.5em bolder;\\n margin: auto; }\\n\\n.good {\\n animation: anim .3s ease-in-out; }\\n\\n.repoLink {\\n color: #000;\\n font-weight: bolder;\\n text-decoration: underline; }\\n\\n.headerprompt {\\n display: flex;\\n width: 100%; }\\n\\n.logotext {\\n color: #f39c12; }\\n\\n#content nav div.collapse li a.nav-link i.far {\\n color: #f39c12;\\n font-size: 1.8em;\\n padding: 0.2em; }\\n\\n#loading-img {\\n background: url(http://preloaders.net/preloaders/360/Velocity.gif) center center no-repeat;\\n height: 100%;\\n z-index: 20; }\\n\\n.overlay {\\n background: #e9e9e9;\\n display: none;\\n position: absolute;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 0;\\n opacity: 0.5; }\\n\\n.loader {\\n border: 0px solid #f3f3f3;\\n border-radius: 50%;\\n border-top: 2px solid #3498db;\\n border-right: 2px solid #3498db;\\n width: 20px;\\n height: 20px;\\n -webkit-animation: spin 2s linear infinite;\\n /* Safari */\\n animation: spin 2s linear infinite; }\\n\\n@keyframes spin {\\n 0% {\\n transform: rotate(0deg); }\\n 100% {\\n transform: rotate(360deg); } }\\n\\n@keyframes anim {\\n 0% {\\n display: none;\\n opacity: 0; }\\n 1% {\\n display: block;\\n opacity: 0;\\n transform: scale(0); }\\n 100% {\\n opacity: 1;\\n transform: scale(1); } }\\n\\n@keyframes blinkingText {\\n 0% {\\n color: #000; }\\n 49% {\\n color: transparent; }\\n 50% {\\n color: transparent; }\\n 99% {\\n color: transparent; }\\n 100% {\\n color: #000; } }\\n\\n/* --------------------------------------------------\\r\\n OVERRIDES\\r\\n --------------------------------------------------*/\\n.btn {\\n background-color: #f39c12;\\n color: #252525; }\\n\\n#content #header .navbar {\\n width: 96%; }\\n\\n.navbar-form {\\n width: 88%; }\\n\\n.form-control {\\n padding: .6rem 1em; }\\n\\n.container-fluid {\\n padding-left: 0.3em; }\\n\\n.card-group {\\n flex-direction: column; }\\n\\n#command.form-control {\\n width: 87%; }\\n\\n.ml-auto {\\n margin-left: 0 !important; }\\n\", \"\"]);\n\n// exports\n\n\n//# sourceURL=webpack:///./src/styles/scss/base.scss?./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js");
/***/ }),
/***/ "./node_modules/css-loader/lib/css-base.js":
/*!*************************************************!*\
!*** ./node_modules/css-loader/lib/css-base.js ***!
\*************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n\n\n//# sourceURL=webpack:///./node_modules/css-loader/lib/css-base.js?");
/***/ }),
/***/ "./node_modules/style-loader/lib/addStyles.js":
/*!****************************************************!*\
!*** ./node_modules/style-loader/lib/addStyles.js ***!
\****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target) {\n return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target) {\n // If passing function in options, then use it for resolve \"head\" element.\n // Useful for Shadow Root style i.e\n // {\n // insertInto: function () { return document.querySelector(\"#foo\").shadowRoot }\n // }\n if (typeof target === 'function') {\n return target();\n }\n if (typeof memo[target] === \"undefined\") {\n\t\t\tvar styleTarget = getTarget.call(this, target);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = __webpack_require__(/*! ./urls */ \"./node_modules/style-loader/lib/urls.js\");\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif (typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === \"object\" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n\t// tags it will allow on a page\n\tif (!options.singleton && typeof options.singleton !== \"boolean\") options.singleton = isOldIE();\n\n\t// By default, add <style> tags to the <head> element\n if (!options.insertInto) options.insertInto = \"head\";\n\n\t// By default, add <style> tags to the bottom of the target\n\tif (!options.insertAt) options.insertAt = \"bottom\";\n\n\tvar styles = listToStyles(list, options);\n\n\taddStylesToDom(styles, options);\n\n\treturn function update (newList) {\n\t\tvar mayRemove = [];\n\n\t\tfor (var i = 0; i < styles.length; i++) {\n\t\t\tvar item = styles[i];\n\t\t\tvar domStyle = stylesInDom[item.id];\n\n\t\t\tdomStyle.refs--;\n\t\t\tmayRemove.push(domStyle);\n\t\t}\n\n\t\tif(newList) {\n\t\t\tvar newStyles = listToStyles(newList, options);\n\t\t\taddStylesToDom(newStyles, options);\n\t\t}\n\n\t\tfor (var i = 0; i < mayRemove.length; i++) {\n\t\t\tvar domStyle = mayRemove[i];\n\n\t\t\tif(domStyle.refs === 0) {\n\t\t\t\tfor (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();\n\n\t\t\t\tdelete stylesInDom[domStyle.id];\n\t\t\t}\n\t\t}\n\t};\n};\n\nfunction addStylesToDom (styles, options) {\n\tfor (var i = 0; i < styles.length; i++) {\n\t\tvar item = styles[i];\n\t\tvar domStyle = stylesInDom[item.id];\n\n\t\tif(domStyle) {\n\t\t\tdomStyle.refs++;\n\n\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\n\t\t\t\tdomStyle.parts[j](item.parts[j]);\n\t\t\t}\n\n\t\t\tfor(; j < item.parts.length; j++) {\n\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\t\t} else {\n\t\t\tvar parts = [];\n\n\t\t\tfor(var j = 0; j < item.parts.length; j++) {\n\t\t\t\tparts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\n\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\n\t\t}\n\t}\n}\n\nfunction listToStyles (list, options) {\n\tvar styles = [];\n\tvar newStyles = {};\n\n\tfor (var i = 0; i < list.length; i++) {\n\t\tvar item = list[i];\n\t\tvar id = options.base ? item[0] + options.base : item[0];\n\t\tvar css = item[1];\n\t\tvar media = item[2];\n\t\tvar sourceMap = item[3];\n\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\n\n\t\tif(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});\n\t\telse newStyles[id].parts.push(part);\n\t}\n\n\treturn styles;\n}\n\nfunction insertStyleElement (options, style) {\n\tvar target = getElement(options.insertInto)\n\n\tif (!target) {\n\t\tthrow new Error(\"Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.\");\n\t}\n\n\tvar lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];\n\n\tif (options.insertAt === \"top\") {\n\t\tif (!lastStyleElementInsertedAtTop) {\n\t\t\ttarget.insertBefore(style, target.firstChild);\n\t\t} else if (lastStyleElementInsertedAtTop.nextSibling) {\n\t\t\ttarget.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);\n\t\t} else {\n\t\t\ttarget.appendChild(style);\n\t\t}\n\t\tstylesInsertedAtTop.push(style);\n\t} else if (options.insertAt === \"bottom\") {\n\t\ttarget.appendChild(style);\n\t} else if (typeof options.insertAt === \"object\" && options.insertAt.before) {\n\t\tvar nextSibling = getElement(options.insertInto + \" \" + options.insertAt.before);\n\t\ttarget.insertBefore(style, nextSibling);\n\t} else {\n\t\tthrow new Error(\"[Style Loader]\\n\\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\\n Must be 'top', 'bottom', or Object.\\n (https://github.com/webpack-contrib/style-loader#insertat)\\n\");\n\t}\n}\n\nfunction removeStyleElement (style) {\n\tif (style.parentNode === null) return false;\n\tstyle.parentNode.removeChild(style);\n\n\tvar idx = stylesInsertedAtTop.indexOf(style);\n\tif(idx >= 0) {\n\t\tstylesInsertedAtTop.splice(idx, 1);\n\t}\n}\n\nfunction createStyleElement (options) {\n\tvar style = document.createElement(\"style\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\n\taddAttrs(style, options.attrs);\n\tinsertStyleElement(options, style);\n\n\treturn style;\n}\n\nfunction createLinkElement (options) {\n\tvar link = document.createElement(\"link\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\toptions.attrs.rel = \"stylesheet\";\n\n\taddAttrs(link, options.attrs);\n\tinsertStyleElement(options, link);\n\n\treturn link;\n}\n\nfunction addAttrs (el, attrs) {\n\tObject.keys(attrs).forEach(function (key) {\n\t\tel.setAttribute(key, attrs[key]);\n\t});\n}\n\nfunction addStyle (obj, options) {\n\tvar style, update, remove, result;\n\n\t// If a transform function was defined, run it on the css\n\tif (options.transform && obj.css) {\n\t result = options.transform(obj.css);\n\n\t if (result) {\n\t \t// If transform returns a value, use that instead of the original css.\n\t \t// This allows running runtime transformations on the css.\n\t \tobj.css = result;\n\t } else {\n\t \t// If the transform function returns a falsy value, don't add this css.\n\t \t// This allows conditional loading of css\n\t \treturn function() {\n\t \t\t// noop\n\t \t};\n\t }\n\t}\n\n\tif (options.singleton) {\n\t\tvar styleIndex = singletonCounter++;\n\n\t\tstyle = singleton || (singleton = createStyleElement(options));\n\n\t\tupdate = applyToSingletonTag.bind(null, style, styleIndex, false);\n\t\tremove = applyToSingletonTag.bind(null, style, styleIndex, true);\n\n\t} else if (\n\t\tobj.sourceMap &&\n\t\ttypeof URL === \"function\" &&\n\t\ttypeof URL.createObjectURL === \"function\" &&\n\t\ttypeof URL.revokeObjectURL === \"function\" &&\n\t\ttypeof Blob === \"function\" &&\n\t\ttypeof btoa === \"function\"\n\t) {\n\t\tstyle = createLinkElement(options);\n\t\tupdate = updateLink.bind(null, style, options);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\n\t\t\tif(style.href) URL.revokeObjectURL(style.href);\n\t\t};\n\t} else {\n\t\tstyle = createStyleElement(options);\n\t\tupdate = applyToTag.bind(null, style);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\t\t};\n\t}\n\n\tupdate(obj);\n\n\treturn function updateStyle (newObj) {\n\t\tif (newObj) {\n\t\t\tif (\n\t\t\t\tnewObj.css === obj.css &&\n\t\t\t\tnewObj.media === obj.media &&\n\t\t\t\tnewObj.sourceMap === obj.sourceMap\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdate(obj = newObj);\n\t\t} else {\n\t\t\tremove();\n\t\t}\n\t};\n}\n\nvar replaceText = (function () {\n\tvar textStore = [];\n\n\treturn function (index, replacement) {\n\t\ttextStore[index] = replacement;\n\n\t\treturn textStore.filter(Boolean).join('\\n');\n\t};\n})();\n\nfunction applyToSingletonTag (style, index, remove, obj) {\n\tvar css = remove ? \"\" : obj.css;\n\n\tif (style.styleSheet) {\n\t\tstyle.styleSheet.cssText = replaceText(index, css);\n\t} else {\n\t\tvar cssNode = document.createTextNode(css);\n\t\tvar childNodes = style.childNodes;\n\n\t\tif (childNodes[index]) style.removeChild(childNodes[index]);\n\n\t\tif (childNodes.length) {\n\t\t\tstyle.insertBefore(cssNode, childNodes[index]);\n\t\t} else {\n\t\t\tstyle.appendChild(cssNode);\n\t\t}\n\t}\n}\n\nfunction applyToTag (style, obj) {\n\tvar css = obj.css;\n\tvar media = obj.media;\n\n\tif(media) {\n\t\tstyle.setAttribute(\"media\", media)\n\t}\n\n\tif(style.styleSheet) {\n\t\tstyle.styleSheet.cssText = css;\n\t} else {\n\t\twhile(style.firstChild) {\n\t\t\tstyle.removeChild(style.firstChild);\n\t\t}\n\n\t\tstyle.appendChild(document.createTextNode(css));\n\t}\n}\n\nfunction updateLink (link, options, obj) {\n\tvar css = obj.css;\n\tvar sourceMap = obj.sourceMap;\n\n\t/*\n\t\tIf convertToAbsoluteUrls isn't defined, but sourcemaps are enabled\n\t\tand there is no publicPath defined then lets turn convertToAbsoluteUrls\n\t\ton by default. Otherwise default to the convertToAbsoluteUrls option\n\t\tdirectly\n\t*/\n\tvar autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;\n\n\tif (options.convertToAbsoluteUrls || autoFixUrls) {\n\t\tcss = fixUrls(css);\n\t}\n\n\tif (sourceMap) {\n\t\t// http://stackoverflow.com/a/26603875\n\t\tcss += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + \" */\";\n\t}\n\n\tvar blob = new Blob([css], { type: \"text/css\" });\n\n\tvar oldSrc = link.href;\n\n\tlink.href = URL.createObjectURL(blob);\n\n\tif(oldSrc) URL.revokeObjectURL(oldSrc);\n}\n\n\n//# sourceURL=webpack:///./node_modules/style-loader/lib/addStyles.js?");
/***/ }),
/***/ "./node_modules/style-loader/lib/urls.js":
/*!***********************************************!*\
!*** ./node_modules/style-loader/lib/urls.js ***!
\***********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("\n/**\n * When source maps are enabled, `style-loader` uses a link element with a data-uri to\n * embed the css on the page. This breaks all relative urls because now they are relative to a\n * bundle instead of the current page.\n *\n * One solution is to only use full urls, but that may be impossible.\n *\n * Instead, this function \"fixes\" the relative urls to be absolute according to the current page location.\n *\n * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.\n *\n */\n\nmodule.exports = function (css) {\n // get current location\n var location = typeof window !== \"undefined\" && window.location;\n\n if (!location) {\n throw new Error(\"fixUrls requires window.location\");\n }\n\n\t// blank or null?\n\tif (!css || typeof css !== \"string\") {\n\t return css;\n }\n\n var baseUrl = location.protocol + \"//\" + location.host;\n var currentDir = baseUrl + location.pathname.replace(/\\/[^\\/]*$/, \"/\");\n\n\t// convert each url(...)\n\t/*\n\tThis regular expression is just a way to recursively match brackets within\n\ta string.\n\n\t /url\\s*\\( = Match on the word \"url\" with any whitespace after it and then a parens\n\t ( = Start a capturing group\n\t (?: = Start a non-capturing group\n\t [^)(] = Match anything that isn't a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t (?: = Start another non-capturing groups\n\t [^)(]+ = Match anything that isn't a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t [^)(]* = Match anything that isn't a parentheses\n\t \\) = Match a end parentheses\n\t ) = End Group\n *\\) = Match anything and then a close parens\n ) = Close non-capturing group\n * = Match anything\n ) = Close capturing group\n\t \\) = Match a close parens\n\n\t /gi = Get all matches, not the first. Be case insensitive.\n\t */\n\tvar fixedCss = css.replace(/url\\s*\\(((?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)\\)/gi, function(fullMatch, origUrl) {\n\t\t// strip quotes (if they exist)\n\t\tvar unquotedOrigUrl = origUrl\n\t\t\t.trim()\n\t\t\t.replace(/^\"(.*)\"$/, function(o, $1){ return $1; })\n\t\t\t.replace(/^'(.*)'$/, function(o, $1){ return $1; });\n\n\t\t// already a full url? no change\n\t\tif (/^(#|data:|http:\\/\\/|https:\\/\\/|file:\\/\\/\\/|\\s*$)/i.test(unquotedOrigUrl)) {\n\t\t return fullMatch;\n\t\t}\n\n\t\t// convert the url to a full url\n\t\tvar newUrl;\n\n\t\tif (unquotedOrigUrl.indexOf(\"//\") === 0) {\n\t\t \t//TODO: should we add protocol?\n\t\t\tnewUrl = unquotedOrigUrl;\n\t\t} else if (unquotedOrigUrl.indexOf(\"/\") === 0) {\n\t\t\t// path should be relative to the base url\n\t\t\tnewUrl = baseUrl + unquotedOrigUrl; // already starts with '/'\n\t\t} else {\n\t\t\t// path should be relative to current directory\n\t\t\tnewUrl = currentDir + unquotedOrigUrl.replace(/^\\.\\//, \"\"); // Strip leading './'\n\t\t}\n\n\t\t// send back the fixed url(...)\n\t\treturn \"url(\" + JSON.stringify(newUrl) + \")\";\n\t});\n\n\t// send back the fixed css\n\treturn fixedCss;\n};\n\n\n//# sourceURL=webpack:///./node_modules/style-loader/lib/urls.js?");
/***/ }),
/***/ "./src/js/app.js":
/*!***********************!*\
!*** ./src/js/app.js ***!
\***********************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _styles_scss_base_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../styles/scss/base.scss */ \"./src/styles/scss/base.scss\");\n/* harmony import */ var _styles_scss_base_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_styles_scss_base_scss__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _styles_css_base_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../styles/css/base.css */ \"./src/styles/css/base.css\");\n/* harmony import */ var _styles_css_base_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_styles_css_base_css__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\n__webpack_require__(/*! ./event-toggles.js */ \"./src/js/event-toggles.js\");\n\n//# sourceURL=webpack:///./src/js/app.js?");
/***/ }),
/***/ "./src/js/bot/config.js":
/*!******************************!*\
!*** ./src/js/bot/config.js ***!
\******************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = {\n recasttoken: \"26021d055040a9d9f1ad48476efab4a0\"\n};\n\n//# sourceURL=webpack:///./src/js/bot/config.js?");
/***/ }),
/***/ "./src/js/bot/recast-ops.js":
/*!**********************************!*\
!*** ./src/js/bot/recast-ops.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("const $configBot = __webpack_require__(/*! ./config.js */ \"./src/js/bot/config.js\");\nconst $config = __webpack_require__(/*! ./../config.js */ \"./src/js/config.js\");\nconst Microbot = __webpack_require__(/*! ./../microbot-ops.js */ \"./src/js/microbot-ops.js\");\nconst app = new Microbot();\nconst DomManipulator = __webpack_require__(/*! ./../dom-ops.js */ \"./src/js/dom-ops.js\");\nconst domManipulator = new DomManipulator();\n\nmodule.exports = class Recast {\n constructor() {\n this.recastToken = $configBot.recasttoken;\n this.requestUrl = \"https://api.recast.ai/v2/request\";\n }\n\n getAndCallProcessIntent(command, text) {\n self = this;\n var url = this.requestUrl + \"?text=\" + command;\n var bodyRelevant = '';\n var intent = '';\n fetch(url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json; charset=utf-8\",\n \"Authorization\": \"Token \" + this.recastToken\n },\n data: text\n }).then(function (response) {\n response.json().then(function (body) {\n bodyRelevant = body.results;\n intent = bodyRelevant.intents[0][\"slug\"];\n $('#' + $config.costants.hiddenIntentFieldId).val(intent);\n if (intent !== undefined) {\n domManipulator.displayIntentBox(intent);\n domManipulator.showWidget(intent);\n domManipulator.addGitOperationHistory(command, 'command');\n domManipulator.populateRecastData(intent, bodyRelevant);\n // self.processIntent(intent);\n }\n return intent;\n });\n }).catch(function (error) {\n console.error('Fetch Error =\\n', error);\n });\n }\n\n processIntent(intent) {\n switch (intent) {\n case \"createrepo\":\n app.createRepository();\n break;\n case \"updaterepo\":\n app.updateRepository();\n break;\n case \"viewrepos\":\n app.viewRepositories();\n break;\n case \"deleterepo\":\n app.deleteRepository();\n break;\n case \"createissue\":\n app.createIssue();\n break;\n case \"updateissue\":\n app.updateIssue();\n break;\n case \"closeissue\":\n app.closeIssue();\n break;\n case \"reopenissue\":\n app.reopenIssue();\n break;\n case \"displayissue\":\n app.displayIssue();\n break;\n case \"addissuecomment\":\n app.addIssueComment();\n break;\n case \"displaylastcomment\":\n app.displayLastComment();\n break;\n case \"addcollab\":\n app.addCollaborator();\n break;\n case \"removecollab\":\n app.removeCollaborator();\n break;\n default:\n console.log(\"default\");\n }\n }\n};\n\n//# sourceURL=webpack:///./src/js/bot/recast-ops.js?");
/***/ }),
/***/ "./src/js/config.js":
/*!**************************!*\
!*** ./src/js/config.js ***!
\**************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = {\n gitToken: '96ead73c54cbbf023a73ee57af145b205d460851',\n intentSlugToOperations: {\n createrepo: {\n requestMethod: 'post',\n intentMessage: 'Create a Repository in Github',\n getDataOperation: 'getCreateRepoJson',\n githubOperation: 'createRepository',\n showWidgetOperation: 'showCreateRepoWidget',\n populateDataOperation: 'populateCreateRepoData',\n successMessage: 'Repository Added!',\n cardMsg: 'Requested Repository has been added and is available at ',\n cardDataUrl: 'html_url',\n cardDataName: 'name'\n },\n createissue: {\n requestMethod: 'post',\n intentMessage: 'Raise an issue in Github',\n getDataOperation: 'getCreateIssueJson',\n githubOperation: 'createIssue',\n showWidgetOperation: 'showCreateIssueWidget',\n populateDataOperation: 'populateCreateIssueData',\n successMessage: 'Issue Created!',\n cardMsg: 'Issue Created as requested, issue details available at ',\n cardDataUrl: 'html_url',\n cardDataName: 'title'\n },\n closeissue: {\n requestMethod: 'post',\n intentMessage: 'Close an issue in Github',\n getDataOperation: 'getCloseIssueJson',\n githubOperation: 'closeIssue',\n showWidgetOperation: 'showCloseIssueWidget',\n populateDataOperation: 'populateCloseIssueData',\n successMessage: 'Issue Closed!',\n cardMsg: 'Issue Closed as requested, closed issue available at: ',\n cardDataUrl: 'html_url',\n cardDataName: 'title'\n },\n addissuecomment: {\n requestMethod: 'post',\n intentMessage: 'Add a comment on an issue in Github',\n getDataOperation: 'getAddCommentJson',\n githubOperation: 'addIssueComment',\n showWidgetOperation: 'showAddCommentWidget',\n populateDataOperation: 'populateAddCommentData',\n successMessage: 'Comment Added!',\n cardMsg: 'Comment Added as Requested, view here: ',\n cardDataUrl: 'html_url',\n cardDataName: 'title'\n },\n displaylastcomment: {\n requestMethod: 'get',\n intentMessage: 'Display last comment of an issue in Github',\n getDataOperation: 'getDisplayCommentJson',\n githubOperation: 'displayLastComment',\n showWidgetOperation: 'showDisplayCommentWidget',\n populateDataOperation: 'populateDisplayCommentData',\n successMessage: 'Comment Retrieved!',\n cardMsg: 'Please find requested comment below: ',\n cardDataUrl: 'html_url',\n cardDataName: 'title'\n },\n addcollab: {\n requestMethod: 'post',\n intentMessage: 'Add a collaborator',\n getDataOperation: 'getAddCollaboratorJson',\n githubOperation: 'addCollaborator',\n showWidgetOperation: 'showAddCollaboratorWidget',\n populateDataOperation: 'populateAddCollaboratorData',\n successMessage: 'Collaborator Added!',\n cardMsg: 'Collaborator added, details available at ',\n cardDataUrl: 'html_url',\n cardDataName: 'invitee,login'\n },\n viewrepos: {\n requestMethod: 'get',\n intentMessage: 'View Repositories for current user',\n getDataOperation: 'getViewRepositoryJson',\n githubOperation: 'viewRepositories',\n showWidgetOperation: 'showViewRepoWidget',\n populateDataOperation: 'populateViewRepoData',\n successMessage: 'Showing repositories',\n cardMsg: 'Repository Details available below: ',\n cardDataUrl: 'html_url',\n cardDataName: 'invitee,login'\n }\n },\n costants: {\n hiddenIntentFieldId: 'intentHidden'\n }\n};\n\n//# sourceURL=webpack:///./src/js/config.js?");
/***/ }),
/***/ "./src/js/dom-ops.js":
/*!***************************!*\
!*** ./src/js/dom-ops.js ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("const $config = __webpack_require__(/*! ./config.js */ \"./src/js/config.js\");\nconst GithubHelper = __webpack_require__(/*! ./helper.js */ \"./src/js/helper.js\");\n\nconst githubHelper = new GithubHelper();\n\nmodule.exports = class DomManipulator {\n constructor() {\n this.createRepoWidgetCreated = false;\n this.commandCardCounter = 1;\n }\n\n showWidget(intent) {\n // var intent = $('#' + $config.costants.hiddenIntentFieldId).val();\n const widget = this.createRepoWidget(intent);\n if (!this.isVisible(widget)) {\n widget.classList.remove('hide');\n $('#underWidgetLine').removeClass('hide');\n }\n }\n\n displayIntentBox(intent) {\n const intentBox = document.getElementById('intentBox');\n if (!this.isVisible(intentBox)) {\n intentBox.classList.remove('hide');\n }\n $('#intentName').text(`${$config.intentSlugToOperations[intent].intentMessage} [slug: ${intent}].`);\n }\n\n createRepoWidget(intent) {\n const existingWidget = document.getElementById(intent);\n if (existingWidget) {\n return existingWidget;\n }\n\n // Create Elements\n const widgets = document.getElementById('widgets');\n const createRepoWidget = document.createElement('div');\n const cardBody = document.createElement('div');\n const header = document.createElement('div');\n const form = document.createElement('form');\n\n const formRow1 = document.createElement('div');\n const formGroup1_1 = document.createElement('div');\n const repoNamelabel = document.createElement('label');\n const repoNameTextField = document.createElement('input');\n const formGroup1_2 = document.createElement('div');\n const homePageURLLabel = document.createElement('label');\n const homePageURLTextField = document.createElement('input');\n\n const formRow2 = document.createElement('div');\n const formGroup2_1 = document.createElement('div');\n const formCheck1 = document.createElement('div');\n const privateLabel = document.createElement('label');\n const privateCB = document.createElement('input');\n const formGroup2_2 = document.createElement('div');\n const formCheck2 = document.createElement('div');\n const addIssueLabel = document.createElement('label');\n const addIssueCB = document.createElement('input');\n const formGroup2_3 = document.createElement('div');\n const formCheck3 = document.createElement('div');\n const addWikiLabel = document.createElement('label');\n const addWikiCB = document.createElement('input');\n\n const formGroup3_1 = document.createElement('div');\n const descriptionLabel = document.createElement('label');\n const descriptionTextArea = document.createElement('textarea');\n\n const submitRepoCreate = document.createElement('button');\n\n // Add Attributes\n widgets.classList.add('card-group');\n createRepoWidget.setAttribute('id', 'createrepo');\n createRepoWidget.classList.add('card', 'hide', 'widget', 'good');\n cardBody.classList.add('card-body');\n header.classList.add('card-title');\n\n formRow1.classList.add('form-row');\n formGroup1_1.classList.add('form-group', 'col-md-6', 'col-sm-6', 'col-lg-6', 'col-xs-6', 'mb-3');\n repoNamelabel.setAttribute('for', 'repositoryName');\n repoNameTextField.setAttribute('type', 'text');\n repoNameTextField.setAttribute('id', 'repositoryName');\n repoNameTextField.setAttribute('placeholder', 'Repository Name... ');\n repoNameTextField.required = true;\n repoNameTextField.classList.add('form-control');\n formGroup1_2.classList.add('form-group', 'col-md-6', 'col-sm-6', 'col-lg-6', 'col-xs-6', 'mb-3');\n homePageURLLabel.setAttribute('for', 'homePageURL');\n homePageURLTextField.setAttribute('type', 'text');\n homePageURLTextField.setAttribute('id', 'homePageURL');\n homePageURLTextField.setAttribute('placeholder', 'Home Page URL... ');\n homePageURLTextField.classList.add('form-control');\n\n formRow2.classList.add('form-row');\n formGroup2_1.classList.add('form-group', 'col-md-3', 'col-sm-3', 'col-lg-3', 'col-xs-3', 'mb-3');\n formCheck1.classList.add('form-check', 'form-check-inline');\n privateLabel.setAttribute('for', 'privateRepoChk');\n privateLabel.classList.add('form-check-label');\n privateCB.setAttribute('type', 'checkbox');\n privateCB.setAttribute('id', 'privateRepoChk');\n privateCB.setAttribute('value', 'Option 1');\n privateCB.classList.add('form-check-input');\n\n formGroup2_2.classList.add('form-group', 'col-md-4', 'col-sm-4', 'col-lg-4', 'col-xs-4', 'mb-3');\n formCheck2.classList.add('form-check', 'form-check-inline');\n addIssueLabel.setAttribute('for', 'issuesChk');\n addIssueLabel.classList.add('form-check-label');\n addIssueCB.setAttribute('type', 'checkbox');\n addIssueCB.setAttribute('id', 'issuesChk');\n addIssueCB.setAttribute('value', 'Option 2');\n addIssueCB.classList.add('form-check-input');\n\n formGroup2_3.classList.add('form-group', 'col-md-4', 'col-sm-4', 'col-lg-4', 'col-xs-4', 'mb-3');\n formCheck3.classList.add('form-check', 'form-check-inline');\n addWikiLabel.setAttribute('for', 'wikiChk');\n addWikiLabel.classList.add('form-check-label');\n addWikiCB.setAttribute('type', 'checkbox');\n addWikiCB.setAttribute('id', 'wikiChk');\n addWikiCB.setAttribute('value', 'Option 3');\n addWikiCB.classList.add('form-check-input');\n\n formGroup3_1.classList.add('form-group');\n descriptionLabel.setAttribute('for', 'description');\n descriptionTextArea.setAttribute('rows', '3');\n descriptionTextArea.classList.add('form-control');\n descriptionTextArea.setAttribute('id', 'description');\n\n submitRepoCreate.setAttribute('type', 'button');\n submitRepoCreate.setAttribute('data-toggle', 'modal');\n submitRepoCreate.setAttribute('data-target', '#submitConfirm');\n submitRepoCreate.setAttribute('id', 'submitForm');\n submitRepoCreate.classList.add('btn', 'btn-primary');\n\n // Add inner HTML\n header.innerHTML = 'Create Repository';\n repoNamelabel.innerHTML = 'Repository Name';\n homePageURLLabel.innerHTML = 'Home Page URL';\n privateLabel.innerHTML = 'Private';\n addIssueLabel.innerHTML = 'Allow Adding Issues?';\n addWikiLabel.innerHTML = 'Add Wiki?';\n descriptionLabel.innerHTML = 'Add some Description for this repository:';\n submitRepoCreate.innerHTML = 'Submit';\n\n // Associations\n formCheck1.appendChild(privateCB);\n formCheck1.appendChild(privateLabel);\n\n formCheck2.appendChild(addIssueCB);\n formCheck2.appendChild(addIssueLabel);\n\n formCheck3.appendChild(addWikiCB);\n formCheck3.appendChild(addWikiLabel);\n\n formGroup1_1.appendChild(repoNamelabel);\n formGroup1_1.appendChild(repoNameTextField);\n\n formGroup1_2.appendChild(homePageURLLabel);\n formGroup1_2.appendChild(homePageURLTextField);\n\n formGroup2_1.appendChild(formCheck1);\n formGroup2_2.appendChild(formCheck2);\n formGroup2_3.appendChild(formCheck3);\n\n formGroup3_1.appendChild(descriptionLabel);\n formGroup3_1.appendChild(descriptionTextArea);\n\n formRow1.appendChild(formGroup1_1);\n formRow1.appendChild(formGroup1_2);\n\n formRow2.appendChild(formGroup2_1);\n formRow2.appendChild(formGroup2_2);\n formRow2.appendChild(formGroup2_3);\n\n form.appendChild(formRow1);\n form.appendChild(formRow2);\n form.appendChild(formGroup3_1);\n form.appendChild(submitRepoCreate);\n\n cardBody.appendChild(header);\n cardBody.appendChild(form);\n\n createRepoWidget.appendChild(cardBody);\n widgets.appendChild(createRepoWidget);\n $('#createrepo').insertBefore($('#underWidgetLine'));\n\n this.createRepoWidgetCreated = true;\n\n return createRepoWidget;\n }\n\n showEmptyCommandMessage() {\n $('#emptyCommandMsgDisplayer').click();\n }\n\n populateWidgetWithGithubResponse() {}\n\n populateRecastData(widgetName, recastResponse) {\n // var requestMethod = $config.intentSlugToOperations[widgetName]['requestMethod'];\n const operation = $config.intentSlugToOperations[widgetName].populateDataOperation;\n if (typeof this[operation] === 'function') {\n this[operation](recastResponse);\n }\n }\n\n populateCreateRepoData(recastResponse) {\n const repoNameTextField = document.getElementById('repositoryName');\n if (repoNameTextField && recastResponse && recastResponse.entities['git-repository'] && recastResponse.entities['git-repository'].length > 0 && recastResponse.entities['git-repository']['0'].value) {\n const repoName = recastResponse.entities['git-repository']['0'].value;\n repoNameTextField.value = repoName;\n }\n }\n\n populateCreateIssueData(recastResponse) {\n const issueTitleTextField = document.getElementById('issueTitle');\n const issueRepositoryTextField = document.getElementById('issueRepository');\n if (issueTitleTextField && recastResponse && recastResponse.entities.issue_title && recastResponse.entities.issue_title.length > 0 && recastResponse.entities.issue_title['0'].value) {\n const issueTitle = recastResponse.entities.issue_title['0'].value;\n issueTitleTextField.value = issueTitle;\n }\n if (issueRepositoryTextField && recastResponse && recastResponse.entities['git-repository'] && recastResponse.entities['git-repository'].length > 0 && recastResponse.entities['git-repository']['0'].value) {\n const repoName = recastResponse.entities['git-repository']['0'].value;\n issueRepositoryTextField.value = repoName;\n }\n }\n\n populateCloseIssueData(recastResponse) {\n const issueNumberTextField = document.getElementById('issueNumerToClose');\n const issueRepositoryTextField = document.getElementById('repoForIssueClose');\n if (issueNumberTextField && recastResponse && recastResponse.entities.issue_id && recastResponse.entities.issue_id.length > 0 && recastResponse.entities.issue_id['0'].value) {\n const issueNumber = recastResponse.entities.issue_id['0'].value;\n issueNumberTextField.value = issueNumber;\n }\n if (issueRepositoryTextField && recastResponse && recastResponse.entities['git-repository'] && recastResponse.entities['git-repository'].length > 0 && recastResponse.entities['git-repository']['0'].value) {\n const repoName = recastResponse.entities['git-repository']['0'].value;\n issueRepositoryTextField.value = repoName;\n }\n }\n\n populateAddCollaboratorData(recastResponse) {\n const collaboratorNameTextField = document.getElementById('collaboratorName');\n const repoForCollabTextField = document.getElementById('repoForCollab');\n if (collaboratorNameTextField && recastResponse && recastResponse.entities.git_collaborator && recastResponse.entities.git_collaborator.length > 0 && recastResponse.entities.git_collaborator['0'].value) {\n const collaboratorName = recastResponse.entities.git_collaborator['0'].value;\n collaboratorNameTextField.value = collaboratorName;\n }\n if (repoForCollabTextField && recastResponse && recastResponse.entities['git-repository'] && recastResponse.entities['git-repository'].length > 0 && recastResponse.entities['git-repository']['0'].value) {\n const repoName = recastResponse.entities['git-repository']['0'].value;\n repoForCollabTextField.value = repoName;\n }\n }\n\n populateAddCommentData(recastResponse) {\n const repoForIssueCommentTextField = document.getElementById('repoForIssueComment');\n const issueNumberTextField = document.getElementById('issueNumber');\n const issueCommentTextArea = document.getElementById('issueComment');\n if (repoForIssueCommentTextField && recastResponse && recastResponse.entities['git-repository'] && recastResponse.entities['git-repository'].length > 0 && recastResponse.entities['git-repository']['0'].value) {\n const repoForIssueComment = recastResponse.entities['git-repository']['0'].value;\n repoForIssueCommentTextField.value = repoForIssueComment;\n }\n if (issueNumberTextField && recastResponse && recastResponse.entities.issue_id && recastResponse.entities.issue_id.length > 0 && recastResponse.entities.issue_id['0'].value) {\n const issueNumber = recastResponse.entities.issue_id['0'].value;\n issueNumberTextField.value = issueNumber;\n }\n if (issueCommentTextArea && recastResponse && recastResponse.entities.issue_comment && recastResponse.entities.issue_comment.length > 0 && recastResponse.entities.issue_comment['0'].value) {\n const issueComment = recastResponse.entities.issue_comment['0'].value;\n issueCommentTextArea.value = issueComment;\n }\n }\n\n populateDisplayCommentData(recastResponse) {\n const issueNumberTextField = document.getElementById('issueNumberForCommentView');\n const issueRepositoryTextField = document.getElementById('repoForCommentView');\n if (issueNumberTextField && recastResponse && recastResponse.entities.issue_id && recastResponse.entities.issue_id.length > 0 && recastResponse.entities.issue_id['0'].value) {\n const issueNumber = recastResponse.entities.issue_id['0'].value;\n issueNumberTextField.value = issueNumber;\n }\n if (issueRepositoryTextField && recastResponse && recastResponse.entities['git-repository'] && recastResponse.entities['git-repository'].length > 0 && recastResponse.entities['git-repository']['0'].value) {\n const repoName = recastResponse.entities['git-repository']['0'].value;\n issueRepositoryTextField.value = repoName;\n }\n }\n\n isVisible(element) {\n return element ? !element.classList.contains('hide') : false;\n }\n\n getDataFromFormAsJSON() {\n let data = {};\n const intent = $(`#${$config.costants.hiddenIntentFieldId}`).val();\n const requestMethod = $config.intentSlugToOperations[intent].requestMethod;\n if (intent) {\n const operation = $config.intentSlugToOperations[intent].getDataOperation;\n if (typeof this[operation] === 'function') {\n data = this[operation]();\n }\n }\n return data;\n }\n\n getCreateRepoJson() {\n const data = {};\n const request = {};\n if (this.isVisible(document.getElementById('createrepo'))) {\n request.name = document.getElementById('repositoryName').value;\n request.description = document.getElementById('description').value;\n request.homepage = document.getElementById('homePageURL').value;\n request.private = document.getElementById('privateRepoChk').checked;\n request.has_issues = document.getElementById('issuesChk').checked;\n request.has_wiki = document.getElementById('wikiChk').checked;\n }\n data.request = request;\n return data;\n }\n\n getCreateIssueJson() {\n const data = {};\n data.urlParams = {};\n const request = {};\n if (this.isVisible(document.getElementById('createissue'))) {\n request.title = document.getElementById('issueTitle').value;\n request.body = document.getElementById('description').value;\n request.assignees = document.getElementById('assignees').value ? document.getElementById('assignees').value.split(',') : [];\n request.labels = document.getElementById('labels').value ? document.getElementById('labels').value.split(',') : [];\n data.urlParams.repoName = document.getElementById('issueRepository').value;\n }\n data.request = request;\n return data;\n }\n\n getCloseIssueJson() {\n const data = {};\n data.urlParams = {};\n if (this.isVisible(document.getElementById('closeissue'))) {\n data.urlParams.issueId = document.getElementById('issueNumerToClose').value;\n data.urlParams.repoName = document.getElementById('repoForIssueClose').value;\n }\n return data;\n }\n\n getAddCollaboratorJson() {\n const data = {};\n data.urlParams = {};\n if (this.isVisible(document.getElementById('addcollab'))) {\n data.urlParams.collaborator = document.getElementById('collaboratorName').value;\n data.urlParams.repoName = document.getElementById('repoForCollab').value;\n }\n return data;\n }\n\n getAddCommentJson() {\n const data = {};\n data.urlParams = {};\n const request = {};\n if (this.isVisible(document.getElementById('addissuecomment'))) {\n request.body = document.getElementById('issueComment').value;\n data.urlParams.issueId = document.getElementById('issueNumber').value;\n data.urlParams.repoName = document.getElementById('repoForIssueComment').value;\n }\n data.request = request;\n return data;\n }\n\n getDisplayCommentJson() {\n const data = {};\n data.urlParams = {};\n if (this.isVisible(document.getElementById('displaylastcomment'))) {\n data.urlParams.issueId = document.getElementById('issueNumberForCommentView').value;\n data.urlParams.repoName = document.getElementById('repoForCommentView').value;\n }\n return data;\n }\n\n addGitOperationHistory(data, type) {\n const intent = $(`#${$config.costants.hiddenIntentFieldId}`).val();\n const requestMethod = $config.intentSlugToOperations[intent].requestMethod;\n const conversations = document.getElementById('conversations');\n let table;\n let comment;\n // Create Elements\n const card = document.createElement('div');\n const cardBody = document.createElement('div');\n const cardTitle = document.createElement('h5');\n const closeAnchor = document.createElement('a');\n const closeHeader = document.createElement('h6');\n const cardText = document.createElement('p');\n const cardFooter = document.createElement('div');\n const textMuted = document.createElement('small');\n const underCardLine = document.createElement('div');\n\n // Add Attributes\n card.classList.add('card', type);\n cardBody.classList.add('card-body');\n cardTitle.classList.add('card-title');\n closeAnchor.classList.add('close');\n // closeAnchor.setAttribute('href', '#');\n cardText.classList.add('card-text');\n cardFooter.classList.add('card-footer');\n textMuted.classList.add('text-muted');\n underCardLine.classList.add('line');\n\n // Add content\n closeHeader.innerHTML = 'x';\n\n const x = this.display_ct(0, textMuted);\n if (type === 'command') {\n // Add content\n cardTitle.innerHTML = 'You Said';\n cardText.innerHTML = data;\n const repeat = document.createElement('a');\n repeat.classList.add('btn', 'btn-info', 'float-right');\n repeat.setAttribute('role', 'button');\n repeat.setAttribute('href', '#');\n repeat.setAttribute('id', `btnRepeatCommand${this.commandCardCounter++}`);\n repeat.innerHTML = 'Repeat';\n cardText.appendChild(repeat);\n } else if (type === 'response') {\n // Add content\n cardTitle.innerHTML = 'Server Responded As..';\n if (requestMethod == 'post') {\n cardText.innerHTML = `${$config.intentSlugToOperations[intent].cardMsg}<a class='repoLink' href='${data[$config.intentSlugToOperations[intent].cardDataUrl]}'>${this.getVariable(data, $config.intentSlugToOperations[intent].cardDataName)}</a>`;\n } else if (requestMethod == 'get') {\n cardText.innerHTML = $config.intentSlugToOperations[intent].cardMsg;\n if (data && data.length && data.length > 0) {\n if (intent === 'viewrepos') {\n table = this.createRepoTable(data);\n } else if (intent === 'displaylastcomment') {\n comment = this.createCommentBody(data);\n }\n }\n }\n } else {\n cardTitle.innerHTML = 'Server Responded As..';\n cardText.innerHTML = `Operation failed with status: ${type}`;\n }\n\n // Associations\n closeAnchor.appendChild(closeHeader);\n cardTitle.appendChild(closeAnchor);\n cardBody.appendChild(cardTitle);\n cardBody.appendChild(cardText);\n if (comment) {\n cardBody.appendChild(comment);\n }\n cardFooter.appendChild(textMuted);\n card.appendChild(cardBody);\n if (table) {\n card.appendChild(table);\n }\n card.appendChild(cardFooter);\n\n conversations.insertBefore(underCardLine, conversations.firstChild);\n conversations.insertBefore(card, conversations.firstChild);\n }\n\n getVariable(data, commaSeparatedValue) {\n const arr = commaSeparatedValue.split(',');\n for (let i = 0; i < arr.length; i++) {\n data = data[arr[i]];\n }\n return data;\n }\n\n createRepoTable(data) {\n // Create Elements\n const table = document.createElement('table');\n const thead = document.createElement('thead');\n const tr_head = document.createElement('tr');\n const th_1 = document.createElement('th');\n const th_2 = document.createElement('th');\n const th_3 = document.createElement('th');\n const th_4 = document.createElement('th');\n const th_5 = document.createElement('th');\n const th_6 = document.createElement('th');\n const th_7 = document.createElement('th');\n\n // Add Attributes\n table.classList.add('table', 'tabled-bordered', 'table-striped', 'table-hover');\n thead.classList.add('thead-dark');\n th_1.setAttribute('scope', 'col');\n th_2.setAttribute('scope', 'col');\n th_3.setAttribute('scope', 'col');\n th_4.setAttribute('scope', 'col');\n th_5.setAttribute('scope', 'col');\n th_6.setAttribute('scope', 'col');\n th_7.setAttribute('scope', 'col');\n\n // Add Inner HTML\n th_1.innerHTML = '#';\n th_2.innerHTML = 'Repository Name';\n th_3.innerHTML = 'Repository ID';\n th_4.innerHTML = 'Created On';\n th_5.innerHTML = 'Created By';\n th_6.innerHTML = 'View Raw';\n th_7.innerHTML = 'Delete Repository';\n\n // Associations\n tr_head.appendChild(th_1);\n tr_head.appendChild(th_2);\n tr_head.appendChild(th_3);\n tr_head.appendChild(th_4);\n tr_head.appendChild(th_5);\n tr_head.appendChild(th_6);\n tr_head.appendChild(th_7);\n thead.appendChild(tr_head);\n table.appendChild(thead);\n\n for (let i = 0; i < data.length; i++) {\n const currentRepo = data[i];\n // Create Elements\n const tbody = document.createElement('tbody');\n const tr_body = document.createElement('tr');\n const th_vertical = document.createElement('th');\n const td_1 = document.createElement('td');\n const td_2 = document.createElement('td');\n const td_3 = document.createElement('td');\n const td_4 = document.createElement('td');\n const td_5 = document.createElement('td');\n const td_6 = document.createElement('td');\n\n // Add Attributes\n th_vertical.setAttribute('scope', 'row');\n tr_body.setAttribute('id', `repoRow${i}`);\n\n // Add Inner HTML\n th_vertical.innerHTML = i + 1;\n td_1.innerHTML = currentRepo.name;\n td_2.innerHTML = `<a href='${currentRepo.html_url}' class='repoLink'>${currentRepo.id}</a>`;\n td_3.innerHTML = currentRepo.created_at;\n td_4.innerHTML = `<a href='${currentRepo.owner.html_url}' class='btn btn-info'>${currentRepo.owner.login}</a>`;\n td_5.innerHTML = `<a href='${currentRepo.url}' class='btn btn-info'>View</a>`;\n td_6.innerHTML = `<a href='${currentRepo.owner.html_url}' class='btn btn-danger'>Delete</a>`;\n\n // Associations\n tr_body.appendChild(th_vertical);\n tr_body.appendChild(td_1);\n tr_body.appendChild(td_2);\n tr_body.appendChild(td_3);\n tr_body.appendChild(td_4);\n tr_body.appendChild(td_5);\n tr_body.appendChild(td_6);\n tbody.appendChild(tr_body);\n table.appendChild(tbody);\n }\n\n return table;\n }\n\n createCommentBody(data) {\n const commentPara = document.createElement('p');\n const lastComment = githubHelper.getLatestComment(data);\n commentPara.classList.add('card-text');\n commentPara.innerHTML = `<strong style='color:black'>COMMENT:</strong> <i>${lastComment}</i>`;\n return commentPara;\n }\n\n concealCodeInUrl() {\n window.location = 'http://localhost:8080';\n }\n\n toggleModals(response) {\n const self = this;\n const promise = response.json();\n const intent = $(`#${$config.costants.hiddenIntentFieldId}`).val();\n $('#submitConfirm').addClass('hide');\n $('#btnCancelConfirm').click();\n $('.modal-backdrop').removeClass('modal-backdrop');\n $('#underWidgetLine').addClass('hide');\n $('#intentBox').addClass('hide');\n if (response && response.status && (response.status === 201 || response.status === 200 || response.status === 204)) {\n $('#successAlert').removeClass('hide');\n $('#widgets').children().addClass('hide');\n promise.then(body => {\n $('#op-msg').text($config.intentSlugToOperations[intent].successMessage);\n $('#successAlert').removeClass('hide');\n self.addGitOperationHistory(body, 'response');\n // clear intent\n $(`#${$config.costants.hiddenIntentFieldId}`).val('');\n });\n } else {\n $('#widgets').children().addClass('hide');\n $('#dangerAlert').removeClass('hide');\n self.addGitOperationHistory(response.status);\n // clear intent\n $(`#${$config.costants.hiddenIntentFieldId}`).val('');\n }\n }\n\n display_ct(start, element) {\n this.start = start;\n this.element = element;\n const days = Math.floor(this.start / 86400);\n const hours = Math.floor((this.start - days * 86400) / 3600);\n const minutes = Math.floor((this.start - days * 86400 - hours * 3600) / 60);\n const secs = Math.floor(this.start - days * 86400 - hours * 3600 - minutes * 60);\n let x = '';\n if (days != 0) {\n x = `${x + days} days`;\n }\n if (hours != 0) {\n x = `${x + hours} hours`;\n }\n if (minutes != 0) {\n x = `${x + minutes} minutes`;\n }\n x = `${x + secs} seconds ago`;\n element.innerHTML = x;\n this.start = this.start + 1;\n // setTimeout(this['display_ct](this.start, this.element)', 1000 )\n }\n};\n\n//# sourceURL=webpack:///./src/js/dom-ops.js?");
/***/ }),
/***/ "./src/js/event-toggles.js":
/*!*********************************!*\
!*** ./src/js/event-toggles.js ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("const Recast = __webpack_require__(/*! ./bot/recast-ops.js */ \"./src/js/bot/recast-ops.js\");\n\nconst recastclient = new Recast();\nconst DomManipulator = __webpack_require__(/*! ./dom-ops.js */ \"./src/js/dom-ops.js\");\n\nconst dom = new DomManipulator();\nconst Microbot = __webpack_require__(/*! ./microbot-ops.js */ \"./src/js/microbot-ops.js\");\n\nconst app = new Microbot();\nconst $config = __webpack_require__(/*! ./config.js */ \"./src/js/config.js\");\n\nmodule.exports = $(document).ready(() => {\n // console.log('test');\n app.setToken();\n $('#sidebarCollapse').on('click', () => {\n $('#sidebar').toggleClass('active');\n $('.hideable').toggleClass('hide');\n });\n $('#content nav div.collapse li a.nav-link i.far.fa-star').hover(() => {\n $('#content nav div.collapse li a.nav-link i.far.fa-star').toggleClass('fas');\n });\n $('#content nav div.collapse li a.nav-link i.far.fa-trash-alt').hover(() => {\n $('#content nav div.collapse li a.nav-link i.far.fa-trash-alt').toggleClass('fas');\n });\n $('#content nav div.collapse li a.nav-link i.far.fa-paper-plane').hover(() => {\n $('#content nav div.collapse li a.nav-link i.far.fa-paper-plane').toggleClass('fas');\n });\n $('#command').keyup(e => {\n const code = e.keyCode ? e.keyCode : e.which;\n if (code == 13) {\n $('#widgets').children().addClass('hide');\n $('#successAlert').addClass('hide');\n $('#dangetAlert').addClass('hide');\n $('#intentBox').addClass('hide');\n const command = document.getElementById('command').value;\n if (command) {\n const text = { text: command };\n recastclient.getAndCallProcessIntent(command, text);\n } else {\n dom.showEmptyCommandMessage();\n }\n }\n });\n $('#btnSubmitConfirm').on('click', () => {\n $('#submitConfirm').removeClass('hide');\n });\n $('#submitGitData').on('click', () => {\n const data = dom.getDataFromFormAsJSON();\n const intent = $(`#${$config.costants.hiddenIntentFieldId}`).val();\n if (intent) {\n const operation = $config.intentSlugToOperations[intent].githubOperation;\n app[operation](data);\n }\n });\n $('#hideInfoAlert').on('click', () => {\n $('#intentBox').addClass('hide');\n });\n $('#hideSuccessAlert').on('click', () => {\n $('#successAlert').addClass('hide');\n });\n $('#conversations').on('click', '.close', function () {\n const $target = $(this).closest('.card');\n const line = $target.next();\n $target.hide('slow', () => {\n $target.remove();\n });\n line.hide('slow', () => {\n line.remove();\n });\n });\n $('#hideDangerAlert').on('click', () => {\n $('#dangerAlert').addClass('hide');\n });\n $('#git_bridge').on('click', () => {\n window.location.href = 'https://github.com/login/oauth/authorize?scope=user:email:repo&client_id=f6f649a1fe2dfea082ba';\n // var user = app.getCurrentUser();\n // if(user) {\n // window.location.href = './../continue.html'\n // } else {\n // window.location.href = 'https://github.com/login/oauth/authorize?scope=user:email:repo&client_id=f6f649a1fe2dfea082ba';\n // }\n });\n if (window.location.href.match(/\\?code=(.*)/)) {\n const code = window.location.href.match(/\\?code=(.*)/)[1];\n app.getToken(code);\n }\n});\n\n//# sourceURL=webpack:///./src/js/event-toggles.js?");
/***/ }),
/***/ "./src/js/github-ops.js":
/*!******************************!*\
!*** ./src/js/github-ops.js ***!
\******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("const config = __webpack_require__(/*! ./config.js */ \"./src/js/config.js\");\nconst GithubHelper = __webpack_require__(/*! ./helper.js */ \"./src/js/helper.js\");\n\nconst githubHelper = new GithubHelper();\nconst DomManipulator = __webpack_require__(/*! ./dom-ops.js */ \"./src/js/dom-ops.js\");\n\nconst dom = new DomManipulator();\nconst PersistentOps = __webpack_require__(/*! ./persistent-ops.js */ \"./src/js/persistent-ops.js\");\n\nconst persistentOps = new PersistentOps();\n\nmodule.exports = class Github {\n constructor() {\n this.authorizationToken = `token ${config.gitToken}`;\n }\n\n getToken(code) {\n let token = '';\n self = this;\n $.getJSON(`http://localhost:9999/authenticate/${code}`, data => {\n console.log(data.token);\n token = data.token;\n // set cookie here\n persistentOps.setCookie('gitToken', token, 30);\n // self.authorizationToken = \"token \" + persistentOps.getCookie('gitToken');\n dom.concealCodeInUrl();\n });\n return token;\n }\n\n getCurrentUser() {\n let repositories = '';\n const url = 'https://api.github.com/user/';\n fetch(url, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8'\n }\n }).then(response => {\n response.json().then(body => {\n repositories = body;\n console.log(repositories);\n return repositories;\n });\n dom.toggleModals(response);\n }).catch(error => console.error('Fetch Error =\\n', error));\n return repositories;\n }\n\n authenticate() {}\n\n viewRepositories() {\n const repositories = '';\n const url = 'https://api.github.com/user/repos';\n fetch(url, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n }\n }).then(response => {\n // response.json().then(function(body){\n // repositories = body;\n // console.log(repositories);\n // return repositories;\n // });\n dom.toggleModals(response);\n }).catch(error => console.error('Fetch Error =\\n', error));\n return repositories;\n }\n\n createRepository(newRepoJson) {\n const url = 'https://api.github.com/user/repos';\n const responsePromise = '';\n fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n },\n body: JSON.stringify(newRepoJson)\n }).then(response => {\n dom.toggleModals(response);\n }).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n updateRepository(updateRepoJson, repoName) {\n repoName = 'Hello-World3';\n const url = `https://api.github.com/repos/mohiit1502/${repoName}`;\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n },\n body: JSON.stringify(updateRepoJson)\n }).then(response => response.json()).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n deleteRepository(repoName) {\n repoName = 'Hello-World2';\n const url = `https://api.github.com/repos/mohiit1502/${repoName}`;\n fetch(url, {\n method: 'DELETE',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n }\n }).then(response => response.json()).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n createIssue(newIssueJson, repoName) {\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/issues`;\n fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n },\n body: JSON.stringify(newIssueJson)\n }).then(response => {\n dom.toggleModals(response);\n }).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n updateIssue(updateIssueJson, repoName, issueNumber) {\n repoName = 'stack_route_prj7';\n issueNumber = 2;\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/issues/${issueNumber}`;\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n },\n body: JSON.stringify(updateIssueJson)\n }).then(response => response.json()).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n closeIssue(closeIssueJson, repoName, issueNumber) {\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/issues/${issueNumber}`;\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n },\n body: JSON.stringify(closeIssueJson)\n }).then(response => {\n dom.toggleModals(response);\n }).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n reopenIssue(reopenIssueJson, repoName, issueNumber) {\n repoName = 'stack_route_prj7';\n issueNumber = 2;\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/issues/${issueNumber}`;\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n },\n body: JSON.stringify(reopenIssueJson)\n }).then(response => response.json()).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n displayIssue(repoName, issueNumber) {\n repoName = 'stack_route_prj7';\n issueNumber = 2;\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/issues/${issueNumber}`;\n let issues = '';\n fetch(url, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n }\n }).then(response => {\n response.json().then(body => {\n issues = body;\n console.log(issues);\n return issues;\n });\n }).catch(error => console.error('Fetch Error =\\n', error));\n return issues;\n }\n\n addIssueComment(commentBodyJson, repoName, issueId) {\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/issues/${issueId}/comments`;\n fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n },\n body: JSON.stringify(commentBodyJson)\n }).then(response => {\n dom.toggleModals(response);\n }).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n displayLastComment(repoName, issueNumber) {\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/issues/${issueNumber}/comments`;\n const comments = [];\n const latestComment = '';\n fetch(url, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n }\n }).then(response => {\n dom.toggleModals(response);\n // response.json().then(function(body){\n // comments = body;\n // latestComment = githubHelper.getLatestComment(comments);\n // console.log(comments);\n // console.log(latestComment);\n // });\n }).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n displayIssuesForUser() {\n const url = 'https://api.github.com/user/issues';\n fetch(url, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n }\n }).then(response => response.json()).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n displayIssuesOnRepo() {\n repoName = 'stack_route_prj7';\n issueNumber = 2;\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/issues/`;\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n Authorization: this.authorizationToken\n },\n body: JSON.stringify(updateIssueJson)\n }).then(response => response.json()).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n addCollaborator(repoName, collaborator) {\n repoName = 'stack_route_prj7';\n collaborator = 'swat1508';\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/collaborators/${collaborator}`;\n fetch(url, {\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: this.authorizationToken\n }\n }).then(response => {\n dom.toggleModals(response);\n }).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n removeCollaborator(repoName, collaborator) {\n repoName = 'stack_route_prj7';\n collaborator = 'swat1508';\n const url = `https://api.github.com/repos/mohiit1502/${repoName}/collaborators/${collaborator}`;\n fetch(url, {\n method: 'DELETE',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: this.authorizationToken\n }\n }).then(response => response.json()).catch(error => console.error('Fetch Error =\\n', error));\n }\n\n createUser(newuserJson) {}\n\n updateUser(updateUserJson) {}\n\n deleteUser(userId) {}\n};\n\n//# sourceURL=webpack:///./src/js/github-ops.js?");
/***/ }),
/***/ "./src/js/helper.js":
/*!**************************!*\
!*** ./src/js/helper.js ***!
\**************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = class GithubHelper {\n getLatestComment(comments) {\n if (comments && comments.length > 0) {\n return comments[comments.length - 1].body;\n }\n }\n};\n\n//# sourceURL=webpack:///./src/js/helper.js?");
/***/ }),
/***/ "./src/js/microbot-ops.js":
/*!********************************!*\
!*** ./src/js/microbot-ops.js ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("const Github = __webpack_require__(/*! ./github-ops.js */ \"./src/js/github-ops.js\");\n\nconst $github = new Github();\nconst PersistentOps = __webpack_require__(/*! ./persistent-ops.js */ \"./src/js/persistent-ops.js\");\n\nconst persistentOps = new PersistentOps();\n\nmodule.exports = class Microbot {\n constructor(clientId, clientSecret) {\n // TODO move to config or env variables\n this.clientId = 'f6f649a1fe2dfea082ba';\n this.clientSecret = '7e9a33d05ffdb36b4a498140bb9bb06d62de4f0e';\n }\n\n getToken(code) {\n $github.getToken(code);\n }\n\n setToken() {\n $github.authorizationToken = `token ${persistentOps.getCookie('gitToken')}`;\n }\n\n getCurrentUser() {\n $github.getCurrentUser();\n }\n\n viewRepositories() {\n return $github.viewRepositories();\n }\n\n createRepository(requestData) {\n const requestJson = requestData.request;\n $github.createRepository(requestJson);\n // $github.createRepository({\n // \"name\": \"new-test-js-git-api-repo\",\n // \"description\": \"This is your first repository\",\n // \"homepage\": \"https://github.com\",\n // \"private\": false,\n // \"has_issues\": true,\n // \"has_wiki\": true\n // })\n }\n\n updateRepository(repoName, repoType) {\n $github.authenticate();\n $github.updateRepository({\n name: 'Hello-World4',\n description: 'This is your test description',\n homepage: 'https://github.com',\n private: false,\n has_issues: true,\n has_projects: true,\n has_wiki: true\n });\n }\n\n deleteRepository() {\n $github.deleteRepository();\n }\n\n createIssue(requestData) {\n const requestJson = requestData.request;\n const repoName = requestData.urlParams.repoName;\n $github.createIssue(requestJson, repoName);\n }\n\n updateIssue() {\n $github.updateIssue({\n title: 'Found a bug - title updated',\n body: 'This is the updated problem description.',\n assignees: ['mohiit1502'],\n milestone: 1,\n state: 'open',\n labels: ['bug', 'issue']\n });\n }\n\n closeIssue(requestData) {\n const repoName = requestData.urlParams.repoName;\n const issueId = requestData.urlParams.issueId;\n $github.closeIssue({\n state: 'close'\n }, repoName, issueId);\n }\n\n displayIssue() {\n return $github.displayIssue();\n }\n\n reopenIssue() {\n $github.reopenIssue({\n milestone: 1,\n state: 'open'\n });\n }\n\n addIssueComment(requestData) {\n const requestJson = requestData.request;\n const repoName = requestData.urlParams.repoName;\n const issueId = requestData.urlParams.issueId;\n $github.addIssueComment(requestJson, repoName, issueId);\n }\n\n displayLastComment(requestData) {\n const repoName = requestData.urlParams.repoName;\n const issueId = requestData.urlParams.issueId;\n return $github.displayLastComment(repoName, issueId);\n }\n\n addCollaborator(requestData) {\n const repoName = requestData.urlParams.repoName;\n const collaborator = requestData.urlParams.collaborator;\n $github.addCollaborator(repoName, collaborator);\n }\n\n removeCollaborator() {\n $github.removeCollaborator();\n }\n\n callAppropriate(intent) {}\n};\n\n//# sourceURL=webpack:///./src/js/microbot-ops.js?");
/***/ }),
/***/ "./src/js/persistent-ops.js":
/*!**********************************!*\
!*** ./src/js/persistent-ops.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = class PersistentOps {\n getLatestComment(comments) {\n if (comments && comments.length > 0) {\n return comments[comments.length - 1].body;\n }\n }\n\n setCookie(cname, cvalue, exdays) {\n const d = new Date();\n d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);\n const expires = `expires=${d.toUTCString()}`;\n document.cookie = `${cname}=${cvalue};${expires};path=/`;\n }\n\n getCookie(cname) {\n const name = `${cname}=`;\n const decodedCookie = decodeURIComponent(document.cookie);\n const ca = decodedCookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return '';\n }\n};\n\n//# sourceURL=webpack:///./src/js/persistent-ops.js?");
/***/ }),
/***/ "./src/styles/css/base.css":
/*!*********************************!*\
!*** ./src/styles/css/base.css ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("\nvar content = __webpack_require__(/*! !../../../node_modules/css-loader!../../../node_modules/sass-loader/lib/loader.js!./base.css */ \"./node_modules/css-loader/index.js!./node_modules/sass-loader/lib/loader.js!./src/styles/css/base.css\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n//# sourceURL=webpack:///./src/styles/css/base.css?");
/***/ }),
/***/ "./src/styles/scss/base.scss":
/*!***********************************!*\
!*** ./src/styles/scss/base.scss ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("\nvar content = __webpack_require__(/*! !../../../node_modules/css-loader!../../../node_modules/sass-loader/lib/loader.js!./base.scss */ \"./node_modules/css-loader/index.js!./node_modules/sass-loader/lib/loader.js!./src/styles/scss/base.scss\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n//# sourceURL=webpack:///./src/styles/scss/base.scss?");
/***/ }),
/***/ 0:
/*!*****************************!*\
!*** multi ./src/js/app.js ***!
\*****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("module.exports = __webpack_require__(/*! ./src/js/app.js */\"./src/js/app.js\");\n\n\n//# sourceURL=webpack:///multi_./src/js/app.js?");
/***/ })
/******/ });