{"version":3,"sources":["webpack:///./src/views/auth/CreateResetPassword.vue?77ab","webpack:///src/views/auth/CreateResetPassword.vue","webpack:///./src/views/auth/CreateResetPassword.vue?facf","webpack:///./src/views/auth/CreateResetPassword.vue","webpack:///./src/views/auth/CreateResetPassword.vue?661e","webpack:///./src/scripts/toast.js","webpack:///./node_modules/toastify-js/src/toastify.js"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","on","$event","type","indexOf","_k","keyCode","key","preventDefault","_v","attrs","directives","name","rawName","value","expression","domProps","target","composing","password","staticStyle","passwordRepeat","isLoading","setPassword","staticRenderFns","component","toast","success","message","Toastify","text","duration","newWindow","close","gravity","position","backgroundColor","stopOnFocus","onClick","showToast","error","root","factory","module","exports","global","options","lib","init","version","getAxisOffsetAValue","axis","offset","isNaN","containsClass","elem","yourClass","className","trim","split","prototype","toastify","constructor","toastElement","node","selector","callback","destination","positionLeft","avatar","undefined","x","y","buildToast","divElement","document","createElement","console","warn","style","background","nodeType","Node","ELEMENT_NODE","appendChild","innerHTML","avatarElement","src","insertAdjacentElement","closeElement","addEventListener","event","stopPropagation","removeElement","window","clearTimeout","timeOutValue","bind","width","innerWidth","screen","self","setTimeout","open","location","xOffset","yOffset","transform","rootElement","body","getElementById","insertBefore","firstChild","reposition","hideToast","replace","parentNode","removeChild","call","classUsed","topLeftOffsetSize","top","bottom","topRightOffsetSize","offsetSize","allToasts","getElementsByClassName","i","length","height","offsetHeight","substr"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,OAAO,CAACF,EAAG,OAAO,CAACE,YAAY,YAAYC,GAAG,CAAC,SAAW,SAASC,GAAQ,IAAIA,EAAOC,KAAKC,QAAQ,QAAQV,EAAIW,GAAGH,EAAOI,QAAQ,QAAQ,GAAGJ,EAAOK,IAAI,SAAW,OAAO,KAAOL,EA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,GAAa,KAExDK,EAAWL,IAAcU,EAAS7E,IAEmB,IAAjDE,EAAcuE,EAAUE,GAAI,kBAE9BF,EAAUE,GAAGhD,MAAMwC,GAAaC,EAAkBD,GAAa,KAE/DC,EAAkBD,IAAcU,EAAS7E,IAGzCyE,EAAUE,GAAGhD,MAAMwC,GAAaI,EAAmBJ,GAAa,KAEhEI,EAAmBJ,IAAcU,EAAS7E,GAMhD,OAAOzD,MAoCTkC,EAASkB,IAAIC,KAAKY,UAAY/B,EAASkB,IAGhClB","file":"js/chunk-0e76bb04.1156da7b.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"app\"},[_c('form',{staticClass:\"auth-form\",on:{\"keypress\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }$event.preventDefault();}}},[_c('h1',[_vm._v(\"Reset Password\")]),_c('div',{staticClass:\"auth-site-name\"},[_vm._v(\"afkadvantage.com\")]),_c('div',{staticClass:\"auth-input\"},[_c('label',{attrs:{\"for\":\"inputNewPassword\"}},[_vm._v(\"New Password\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.password),expression:\"password\"}],attrs:{\"type\":\"password\",\"placeholder\":\"New Password\",\"id\":\"inputNewPassword\"},domProps:{\"value\":(_vm.password)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.password=$event.target.value}}})]),_c('div',{staticClass:\"auth-input\",staticStyle:{\"margin-bottom\":\"50px\"}},[_c('label',{attrs:{\"for\":\"inputRepeatPassword\"}},[_vm._v(\"Repeat Password\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.passwordRepeat),expression:\"passwordRepeat\"}],attrs:{\"type\":\"password\",\"placeholder\":\"Repeat Password\",\"id\":\"inputRepeatPassword\"},domProps:{\"value\":(_vm.passwordRepeat)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.passwordRepeat=$event.target.value}}})]),_c('div',{staticClass:\"auth-input\"},[_c('button',{staticClass:\"button-primary-2\",attrs:{\"type\":\"button\",\"disabled\":_vm.isLoading},on:{\"click\":_vm.setPassword}},[_vm._v(\"Change Password\")])]),_c('div',{staticClass:\"auth-switch-site\"},[_vm._v(\" Remembered your password? \"),_c('router-link',{attrs:{\"to\":\"/auth/login\"}},[_vm._v(\"Sign in\")])],1)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CreateResetPassword.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CreateResetPassword.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./CreateResetPassword.vue?vue&type=template&id=2e6c00af&scoped=true&\"\nimport script from \"./CreateResetPassword.vue?vue&type=script&lang=js&\"\nexport * from \"./CreateResetPassword.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CreateResetPassword.vue?vue&type=style&index=0&id=2e6c00af&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"2e6c00af\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CreateResetPassword.vue?vue&type=style&index=0&id=2e6c00af&scoped=true&lang=css&\"","import Toastify from 'toastify-js';\n\nlet toast = {\n success: (message) => {\n return Toastify({\n text: message,\n duration: 3000, \n newWindow: true,\n close: true,\n gravity: 'bottom', // `top` or `bottom`\n position: 'right', // `left`, `center` or `right`\n backgroundColor: \"linear-gradient(124deg, rgba(43,203,115,1) 0%, rgba(13,68,139,1) 100%)\",\n stopOnFocus: true, // Prevents dismissing of toast on hover\n onClick: function(){} // Callback after click\n }).showToast();\n },\n error: (message) => {\n return Toastify({\n text: message,\n duration: 3000, \n newWindow: true,\n close: true,\n gravity: 'bottom', // `top` or `bottom`\n position: 'right', // `left`, `center` or `right`\n backgroundColor: \"linear-gradient(124deg, rgba(203,43,43,1) 0%, rgba(13,68,139,1) 100%)\",\n stopOnFocus: true, // Prevents dismissing of toast on hover\n onClick: function(){} // Callback after click\n }).showToast();\n }\n}\nexport default toast;","/*!\n * Toastify js 1.9.3\n * https://github.com/apvarun/toastify-js\n * @license MIT licensed\n *\n * Copyright (C) 2018 Varun A P\n */\n(function(root, factory) {\n if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n } else {\n root.Toastify = factory();\n }\n})(this, function(global) {\n // Object initialization\n var Toastify = function(options) {\n // Returning a new init object\n return new Toastify.lib.init(options);\n },\n // Library version\n version = \"1.9.3\";\n\n // Defining the prototype of the object\n Toastify.lib = Toastify.prototype = {\n toastify: version,\n\n constructor: Toastify,\n\n // Initializing the object with required parameters\n init: function(options) {\n // Verifying and validating the input object\n if (!options) {\n options = {};\n }\n\n // Creating the options object\n this.options = {};\n\n this.toastElement = null;\n\n // Validating the options\n this.options.text = options.text || \"Hi there!\"; // Display message\n this.options.node = options.node // Display content as node\n this.options.duration = options.duration === 0 ? 0 : options.duration || 3000; // Display duration\n this.options.selector = options.selector; // Parent selector\n this.options.callback = options.callback || function() {}; // Callback after display\n this.options.destination = options.destination; // On-click destination\n this.options.newWindow = options.newWindow || false; // Open destination in new window\n this.options.close = options.close || false; // Show toast close icon\n this.options.gravity = options.gravity === \"bottom\" ? \"toastify-bottom\" : \"toastify-top\"; // toast position - top or bottom\n this.options.positionLeft = options.positionLeft || false; // toast position - left or right\n this.options.position = options.position || ''; // toast position - left or right\n this.options.backgroundColor = options.backgroundColor; // toast background color\n this.options.avatar = options.avatar || \"\"; // img element src - url or a path\n this.options.className = options.className || \"\"; // additional class names for the toast\n this.options.stopOnFocus = options.stopOnFocus === undefined? true: options.stopOnFocus; // stop timeout on focus\n this.options.onClick = options.onClick; // Callback after click\n\n this.options.offset = options.offset || { x: 0, y: 0 }; // toast offset\n\n // Returning the current object for chaining functions\n return this;\n },\n\n // Building the DOM element\n buildToast: function() {\n // Validating if the options are defined\n if (!this.options) {\n throw \"Toastify is not initialized\";\n }\n\n // Creating the DOM object\n var divElement = document.createElement(\"div\");\n divElement.className = \"toastify on \" + this.options.className;\n\n // Positioning toast to left or right or center\n if (!!this.options.position) {\n divElement.className += \" toastify-\" + this.options.position;\n } else {\n // To be depreciated in further versions\n if (this.options.positionLeft === true) {\n divElement.className += \" toastify-left\";\n console.warn('Property `positionLeft` will be depreciated in further versions. Please use `position` instead.')\n } else {\n // Default position\n divElement.className += \" toastify-right\";\n }\n }\n\n // Assigning gravity of element\n divElement.className += \" \" + this.options.gravity;\n\n if (this.options.backgroundColor) {\n divElement.style.background = this.options.backgroundColor;\n }\n\n // Adding the toast message/node\n if (this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE) {\n // If we have a valid node, we insert it\n divElement.appendChild(this.options.node)\n } else {\n divElement.innerHTML = this.options.text;\n\n if (this.options.avatar !== \"\") {\n var avatarElement = document.createElement(\"img\");\n avatarElement.src = this.options.avatar;\n\n avatarElement.className = \"toastify-avatar\";\n\n if (this.options.position == \"left\" || this.options.positionLeft === true) {\n // Adding close icon on the left of content\n divElement.appendChild(avatarElement);\n } else {\n // Adding close icon on the right of content\n divElement.insertAdjacentElement(\"afterbegin\", avatarElement);\n }\n }\n }\n\n // Adding a close icon to the toast\n if (this.options.close === true) {\n // Create a span for close element\n var closeElement = document.createElement(\"span\");\n closeElement.innerHTML = \"✖\";\n\n closeElement.className = \"toast-close\";\n\n // Triggering the removal of toast from DOM on close click\n closeElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n this.removeElement(this.toastElement);\n window.clearTimeout(this.toastElement.timeOutValue);\n }.bind(this)\n );\n\n //Calculating screen width\n var width = window.innerWidth > 0 ? window.innerWidth : screen.width;\n\n // Adding the close icon to the toast element\n // Display on the right if screen width is less than or equal to 360px\n if ((this.options.position == \"left\" || this.options.positionLeft === true) && width > 360) {\n // Adding close icon on the left of content\n divElement.insertAdjacentElement(\"afterbegin\", closeElement);\n } else {\n // Adding close icon on the right of content\n divElement.appendChild(closeElement);\n }\n }\n\n // Clear timeout while toast is focused\n if (this.options.stopOnFocus && this.options.duration > 0) {\n var self = this;\n // stop countdown\n divElement.addEventListener(\n \"mouseover\",\n function(event) {\n window.clearTimeout(divElement.timeOutValue);\n }\n )\n // add back the timeout\n divElement.addEventListener(\n \"mouseleave\",\n function() {\n divElement.timeOutValue = window.setTimeout(\n function() {\n // Remove the toast from DOM\n self.removeElement(divElement);\n },\n self.options.duration\n )\n }\n )\n }\n \n // Adding an on-click destination path\n if (typeof this.options.destination !== \"undefined\") {\n divElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n if (this.options.newWindow === true) {\n window.open(this.options.destination, \"_blank\");\n } else {\n window.location = this.options.destination;\n }\n }.bind(this)\n );\n }\n\n if (typeof this.options.onClick === \"function\" && typeof this.options.destination === \"undefined\") {\n divElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n this.options.onClick(); \n }.bind(this)\n );\n }\n\n // Adding offset\n if(typeof this.options.offset === \"object\") {\n\n var x = getAxisOffsetAValue(\"x\", this.options);\n var y = getAxisOffsetAValue(\"y\", this.options);\n \n var xOffset = this.options.position == \"left\" ? x : \"-\" + x;\n var yOffset = this.options.gravity == \"toastify-top\" ? y : \"-\" + y;\n\n divElement.style.transform = \"translate(\" + xOffset + \",\" + yOffset + \")\";\n\n }\n\n // Returning the generated element\n return divElement;\n },\n\n // Displaying the toast\n showToast: function() {\n // Creating the DOM object for the toast\n this.toastElement = this.buildToast();\n\n // Getting the root element to with the toast needs to be added\n var rootElement;\n if (typeof this.options.selector === \"undefined\") {\n rootElement = document.body;\n } else {\n rootElement = document.getElementById(this.options.selector);\n }\n\n // Validating if root element is present in DOM\n if (!rootElement) {\n throw \"Root element is not defined\";\n }\n\n // Adding the DOM element\n rootElement.insertBefore(this.toastElement, rootElement.firstChild);\n\n // Repositioning the toasts in case multiple toasts are present\n Toastify.reposition();\n\n if (this.options.duration > 0) {\n this.toastElement.timeOutValue = window.setTimeout(\n function() {\n // Remove the toast from DOM\n this.removeElement(this.toastElement);\n }.bind(this),\n this.options.duration\n ); // Binding `this` for function invocation\n }\n\n // Supporting function chaining\n return this;\n },\n\n hideToast: function() {\n if (this.toastElement.timeOutValue) {\n clearTimeout(this.toastElement.timeOutValue);\n }\n this.removeElement(this.toastElement);\n },\n\n // Removing the element from the DOM\n removeElement: function(toastElement) {\n // Hiding the element\n // toastElement.classList.remove(\"on\");\n toastElement.className = toastElement.className.replace(\" on\", \"\");\n\n // Removing the element from DOM after transition end\n window.setTimeout(\n function() {\n // remove options node if any\n if (this.options.node && this.options.node.parentNode) {\n this.options.node.parentNode.removeChild(this.options.node);\n }\n\n // Remove the elemenf from the DOM, only when the parent node was not removed before.\n if (toastElement.parentNode) {\n toastElement.parentNode.removeChild(toastElement);\n }\n\n // Calling the callback function\n this.options.callback.call(toastElement);\n\n // Repositioning the toasts again\n Toastify.reposition();\n }.bind(this),\n 400\n ); // Binding `this` for function invocation\n },\n };\n\n // Positioning the toasts on the DOM\n Toastify.reposition = function() {\n\n // Top margins with gravity\n var topLeftOffsetSize = {\n top: 15,\n bottom: 15,\n };\n var topRightOffsetSize = {\n top: 15,\n bottom: 15,\n };\n var offsetSize = {\n top: 15,\n bottom: 15,\n };\n\n // Get all toast messages on the DOM\n var allToasts = document.getElementsByClassName(\"toastify\");\n\n var classUsed;\n\n // Modifying the position of each toast element\n for (var i = 0; i < allToasts.length; i++) {\n // Getting the applied gravity\n if (containsClass(allToasts[i], \"toastify-top\") === true) {\n classUsed = \"toastify-top\";\n } else {\n classUsed = \"toastify-bottom\";\n }\n\n var height = allToasts[i].offsetHeight;\n classUsed = classUsed.substr(9, classUsed.length-1)\n // Spacing between toasts\n var offset = 15;\n\n var width = window.innerWidth > 0 ? window.innerWidth : screen.width;\n\n // Show toast in center if screen with less than or qual to 360px\n if (width <= 360) {\n // Setting the position\n allToasts[i].style[classUsed] = offsetSize[classUsed] + \"px\";\n\n offsetSize[classUsed] += height + offset;\n } else {\n if (containsClass(allToasts[i], \"toastify-left\") === true) {\n // Setting the position\n allToasts[i].style[classUsed] = topLeftOffsetSize[classUsed] + \"px\";\n\n topLeftOffsetSize[classUsed] += height + offset;\n } else {\n // Setting the position\n allToasts[i].style[classUsed] = topRightOffsetSize[classUsed] + \"px\";\n\n topRightOffsetSize[classUsed] += height + offset;\n }\n }\n }\n\n // Supporting function chaining\n return this;\n };\n\n // Helper function to get offset.\n function getAxisOffsetAValue(axis, options) {\n\n if(options.offset[axis]) {\n if(isNaN(options.offset[axis])) {\n return options.offset[axis];\n }\n else {\n return options.offset[axis] + 'px';\n }\n }\n\n return '0px';\n\n }\n\n function containsClass(elem, yourClass) {\n if (!elem || typeof yourClass !== \"string\") {\n return false;\n } else if (\n elem.className &&\n elem.className\n .trim()\n .split(/\\s+/gi)\n .indexOf(yourClass) > -1\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n // Setting up the prototype for the init object\n Toastify.lib.init.prototype = Toastify.lib;\n\n // Returning the Toastify function to be assigned to the window object/module\n return Toastify;\n});\n"],"sourceRoot":""}