{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./texts/text_1.txt","webpack:///./src/main.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","Vue","el","product","image","debugText","$keyDownTime","$keyUpTime","$keyDownPrev","$keyUpPrev","$keyPrev","$groupPrev","$holdTime","$flightTime","$latencyTime","teleContent","text1","barStyle","progressPct","methods","lostFocus","event","keyDown","this","performance","now","keyUp","code","holdTime","undefined","keyCode","len","dateTime","formatDate","Date","totalCount","inclCount","console","log","String","substr","includeKey","debugTextArea","disabled","focus","selectionStart","inputText","tarea","document","getElementById","inarea","highlight","toFixed","rawDate","year","getFullYear","month","getMonth","day","getDate","hour","getHours","minute","getMinutes","second","getSeconds","getMilliseconds","a","b","cols","start","selectionEnd","charsPerRow","selectionRow","lineHeight","clientHeight","rows","scrollTop","highlight1_Notused","lineNum","lines","split","startPos","endPos","x","selection","createRange","select","range","collapse","moveEnd","moveStart","zeroPad","num","numZeros","Math","abs","zeros","max","floor","toString","zeroString","pow"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAU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AC/BwI,EAAI,EAAGA,EAAIJ,EAAMpI,OAAQwI,IAAK,CAClC,GAAGA,GAAKL,EACJ,MAGJG,GAAaF,EAAMI,GAAGxI,OAAO,EAE7BuI,EAASH,EAAMD,GAASnI,OAAOsI,EAQnC,GALHA,EAAW,EAEXnC,EAAMJ,UAAS,EAGuB,oBAAzBI,EAAMF,eAEZE,EAAMF,eAAiBqC,EAC7BnC,EAAMwB,aAAeY,EACrBpC,EAAMH,aAIN,GAAII,SAASqC,WAAarC,SAASqC,UAAUC,YAAa,CAEzDvC,EAAMwC,SACN,IAAIC,EAAQxC,SAASqC,UAAUC,cAC/BE,EAAMC,UAAS,GACfD,EAAME,QAAQ,YAAaP,GAC3BK,EAAMG,UAAU,YAAaT,GAC7BM,EAAMD,SACNxC,EAAMH,QAIRG,EAAMF,eAAiBE,EAAMnG,OAE7BmG,EAAMH,QACNG,EAAMJ,UAAS,GAIhBiD,QAAS,SAAiBC,EAAKC,GAC9B,IAAIrG,EAAIsG,KAAKC,IAAIH,GACbI,EAAQF,KAAKG,IAAI,EAAGJ,EAAWC,KAAKI,MAAM1G,GAAG2G,WAAWxJ,QACxDyJ,EAAaN,KAAKO,IAAI,GAAGL,GAAOG,WAAW5D,OAAO,GAItD,OAHIqD,EAAM,IACTQ,EAAa,IAAMA,GAEbA,EAAW5G,O","file":"js/app.443f2b90.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","export default \" She sprang it on me before breakfast. There in seven words you have a complete character sketch of my Aunt Agatha. I could go on indefinitely about brutality and lack of consideration. I merely say that she routed me out of bed to listen to her painful story somewhere in the small hours. It can’t have been half past eleven when Jeeves, my man, woke me out of the dreamless and broke the news:\\r\\n “Mrs. Gregson to see you, sir.”\\r\\n I thought she must be walking in her sleep, but I crawled out of bed and got into a dressing-gown. I knew Aunt Agatha well enough to know that, if she had come to see me, she was going to see me. That’s the sort of woman she is.\\r\\n She was sitting bolt upright in a chair, staring into space. When I came in she looked at me in that darn critical way that always makes me feel as if I had gelatine where my spine ought to be. Aunt Agatha is one of those strong-minded women. I should think Queen Elizabeth must have been something like her. She bosses her husband, Spencer Gregson, a battered little chappie on the Stock Exchange. She bosses my cousin, Gussie Mannering-Phipps. She bosses her sister-in-law, Gussie’s mother. And, worst of all, she bosses me. She has an eye like a man-eating fish, and she has got moral suasion down to a fine point.\\r\\n I dare say there are fellows in the world—men of blood and iron, don’t you know, and all that sort of thing—whom she couldn’t intimidate; but if you’re a chappie like me, fond of a quiet life, you simply curl into a ball when you see her coming, and hope for the best. My experience is that when Aunt Agatha wants you to do a thing you do it, or else you find yourself wondering why those fellows in the olden days made such a fuss when they had trouble with the Spanish Inquisition.\\r\\n “Halloa, Aunt Agatha!” I said\\r\\n “Bertie,” she said, “you look a sight. You look perfectly dissipated.”\\r\\n I was feeling like a badly wrapped brown-paper parcel. I’m never at my best in the early morning. I said so.\\r\\n\";","/**\n * index.js\n * - All our useful JS goes here, awesome!\n */\n\n/* */\n// import Vue from 'vue'\n// require('/styles/index.css')\nimport '../styles/index.css';\n\n// This will eventually be randomised\nimport text1 from '!raw-loader!../texts/text_1.txt';\n//alert(\"*\" + text1 + \"*\")\n\n// Vue.prototype.$keyDownTime = 0; // Leave these here, just in case existing way has problems\n// Vue.prototype.$keyUpTime = 0;\nvar app = new Vue({\n\n\tel: '#app',\n\n\tdata: {\n \tproduct: 'Socks',\n \timage: 'https://www.vuemastery.com/images/challenges/vmSocks-green-onWhite.jpg',\n\t\tdebugText: '',\n\t\t$keyDownTime: 0,\n\t\t$keyUpTime: 0,\n\n\t\t$keyDownPrev: 0,\t// From Tappy code\n\t\t$keyUpPrev: 0,\t\t//\n\t\t$keyPrev: '',\t\t//\n\t\t$groupPrev: '',\t\t//\n\t\t$holdTime: 0,\t\t//\n\t\t$flightTime: 0,\t\t//\n\t\t$latencyTime: 0,\t//\n\n\t\tteleContent: text1,\n\t\tbarStyle: \"width:15%\",\n\t\tprogressPct: '0% complete'\n\n\t\t// function() {\n\t\t// \treturn {\n\t\t// \t\tteleText: text1\n\t\t// \t}\n\t\t// }\n\t}, \n\t\n\tmethods: {\n\t\t//~~~~~~~~~~~~~~~~~~~\n\t\t// To plug a series of values into an output string:\n\t\t// \t var fmt = require('sprintf-js').sprintf\n\t\t// To retrun a fixed number of decimal places:\n\t\t// alert((3/7).toFixed(2)) \n\t\t// To zero pad a number (or string)\n\t\t// this.zeroPad(num, numZeros) This is defined herein\n\t\t//~~~~~~~~~~~~~~~~~~~\n\n\t\tlostFocus: function(event) {\n\t\t\t//event.preventDefault(); ccccc\n\t\t\t//event.cancellable=false;\n\t\t\t//event.stopImmediatePropagation();\n\t\t },\n\n\t\tkeyDown: function(event) {\n\t\t\tthis.$keyDownTime = performance.now()\n\t\t},\t\t\t\n\t\tkeyUp: function(event) {\n\t\t\tvar code = null\n\t\t\tvar holdTime = 0\n\t\t\tthis.$keyUpTime = performance.now() \n\n\t\t\tif (event.keyCode !== undefined) {\n \t\t\t// Handle the event with KeyboardEvent.keyCode\n\t\t\t\tcode=event.keyCode\n \t\t\t} else {\n\t\t\t\t// Depends on browser, so this is the fallback\n\t\t\t\tcode=event.code\n\t\t\t}\n\t\t\tholdTime = this.$keyUpTime - this.$keyDownTime\n\t\t\tvar dateTime = this.formatDate(new Date(Date.now()))\n\t\t\t//alert(dateTime)\n\t\t\tvar len\n\t\t\tif (holdTime < 100) {\n\t\t\t\tlen = 5\n\t\t\t} else {\n\t\t\t\tlen = 6\n\t\t\t}\n\n\t\t\tif ( typeof this.totalCount == 'undefined' ) {\n\t\t\t\t// It has not... perform the initialization\n\t\t\t\tthis.totalCount = 0;\n\t\t\t\tthis.inclCount = 0;\n\t\t\t}\n\t\t\t++this.totalCount;\n\t\t\t++this.inclCount;\n\n\t\t\t//this.progressPct = string(this.totalCnt/1500)\n\n\t\t\t// Indicate the count so far\n\t\t\tconsole.log('totalCount: ' + (this.totalCount));\n\t\t\tconsole.log(dateTime + \" \" + event.key + \" (\" + code + \") \" + String(holdTime).substr(0,len))\n\n\t\t\t// Process timings & return whether its an included character (as per Tappy)\n\t\t\t// Saving the details is also done in this function\n\t\t\tif (this.includeKey(code)) {\n\t\t\t\t// Add to debug output\n\t\t\t\tthis.debugText = this.debugText + '\\n' + (dateTime + \"\\t\" + event.key + \n\t\t\t\t\t\" (\" + code + \")\\t\" + String(holdTime).substr(0,len))\n\t\t\t\t// Position cursor at bottom of existing text rather than top\n\t\t\t\tdebugTextArea.disabled=false\n\t\t\t\tdebugTextArea.focus()\n\t\t\t\tdebugTextArea.selectionStart=this.debugText.length + 50\n\t\t\t\tdebugTextArea.disabled=true\n\t\t\t\tinputText.focus()\n\t\t\t\t// Add to array\n\n\t\t\t\t// If 20 chars then calculate variance to date & reset count\n\t\t\t\t// Valid. 1) Increment counter & add to array 2) If >20 then calculate variance 3) Show var to date\n\t\t\t\t// 4) If 1500 then show complete\n\n\t\t\t\t// [1] \n\t\t\t\t// .totalCount is static within keyUp function - see https://stackoverflow.com/questions/1535631/static-variables-in-javascript#:~:text=The%20static%20keyword%20allows%20you,or%20methods%20in%20a%20class.&text=You%20might%20take%20advantage%20of,means%20they%20can%20have%20properties.&text=If%20you%20call%20that%20function,the%20counter%20is%20being%20incremented.\n\t\t\t\t// Check to see if it has been initialized\n\n\t\t\t}\n\n\t\t\tvar tarea = document.getElementById('teleText');\n\t\t\tvar inarea = document.getElementById('inputText');\n\t\t\t//console.log(\"tarea: \" + tarea)\n\t\t\tthis.highlight(tarea,inarea); // This does the scrolling of the teletext area\n\n\t\t\t// *** TESTING ONLY - forces totalCount to be the length of text ratherthan keystrokes\n\t\t\t// \tAlso should be using inclCount\n\t\t\tthis.totalCount=inarea.value.length\n\t\t\tconsole.log('totalCount: ' + this.totalCount)\n\t\t\tif (this.totalCount<=1500){\n\t\t\t\t// The factor '2' below is 100/(endwidth - startwidth). Then plus startwidth\n\t\t\t\tthis.progressPct = String((100*this.totalCount/1500).toFixed(0)) + '% complete'\n\t\t\t\tthis.barStyle = \"width:\" + String(this.totalCount*100/(1500*(100/45))+15) + '%'\n\t\t\t} else {\n\t\t\t\tthis.progressPct = '100% complete'\n\t\t\t\t//this.barStyle = \"width:\" + String(70) + '%'\n\t\t\t}\n\t\t},\n\t\tincludeKey: function includeKey(code) {\n\t\t\t// **** Needs all the code added here\n\t\t\treturn true;\n\t\t},\n\t\tformatDate: function formatDate(rawDate) {\n\t\t\tvar year = String(rawDate.getFullYear()).substr(2,2)\n\t\t\tvar month = String(rawDate.getMonth() + 1)\n\t\t\tif (month.length == 1) {\n\t\t\t\tmonth = '0' + month\n\t\t\t}\n\t\t\tvar day = String(rawDate.getDate())\n\t\t\tif (day.length == 1) {\n\t\t\t\tday = '0' + day\n\t\t\t}\n\t\t\tvar hour = String(rawDate.getHours())\n\t\t\tif (hour.length == 1) {\n\t\t\t\thour = '0' + hour\n\t\t\t}\n\t\t\tvar minute = String(rawDate.getMinutes())\n\t\t\tif (minute.length == 1) {\n\t\t\t\tminute = '0' + minute\n\t\t\t}\n\t\t\tvar second = String(rawDate.getSeconds())\n\t\t\tif (second.length == 1) {\n\t\t\t\tsecond = '0' + second\n\t\t\t}\n\t\t\treturn year + month + day + \" \" + hour + \":\" + minute + \":\" + \n\t\t\t\tsecond + \".\" + String(rawDate.getMilliseconds()).substr(0,3);\n\t\t},\n\t\thighlight: function selectTextAreaLine(a,b) {\n\t\t\t// var start = inputText.length, //a.selectionStart,\n\t\t\t// \tlen = 400,\n\t\t\t// \tpos = start + len;\n\t\t\t//var inputText = document.getElementById('inputText')\n\n\t\t\t// Max characters in text area is 80 * 10 = 800\n\t\t\t// If more than 30% then start scrolling\n\t\t\tconsole.log('Length of inputText: ' + b.value.length)\n\t\t\tif (b.value.length > a.cols*4) {\n\t\t\t\tvar start = b.value.length - 240\n\t\t\t\ta.disabled = false\t\n\t\t\t\ta.focus()\n\t\t\t\ta.selectionStart= start\n\t\t\t\ta.selectionEnd=start + 200\n\t\t\t\t// Calculate \n\t\t\t\t// we need the number of chars in a row\n\t\t\t\tvar charsPerRow = a.cols + 8;\t// Scroll 10% less to allow for CRLF's\n\t\t\t\t// we need to know at which row our selection starts\n\t\t\t\t//var selectionRow = (a.selectionStart - (a.selectionStart % charsPerRow)) / charsPerRow;\n\t\t\t\tvar selectionRow = (a.selectionStart) / charsPerRow;\n\n\t\t\t\t// we need to scroll to this row but scrolls are in pixels,\n\t\t\t\t// so we need to know a row's height, in pixels\n\t\t\t\tvar lineHeight = a.clientHeight / a.rows;\n\t\t\t\t// scroll !!\n\t\t\t\t//a.scrollTop = lineHeight * selectionRow;\t Whole lines\t\t\t \n\t\t\t\ta.scrollTop = lineHeight * selectionRow;\n\t\t\t\ta.disabled=true\n\t\t\t\tb.focus()\n\t\t\t}\n\t\t},\n\t\thighlight1_Notused: function selectTextAreaLine(tarea,lineNum) {\n\t\t\t// From https://stackoverflow.com/questions/13650534/how-to-select-line-of-text-in-textarea\n \t\tlineNum--; // array starts at 0\n\t\t\t//console.log(tarea.value)\n \t\tvar lines = tarea.value.split(\"\\n\") ;\n \t\t// calculate start/end\n \t\tvar startPos = 0, endPos = tarea.value.length;\n \t\tfor(var x = 0; x < lines.length; x++) {\n \t\tif(x == lineNum) {\n \t\tbreak;\n \t\t}\n\t\t\t\t// Set start as zero\n \t\tstartPos += (lines[x].length+1); \t\t\n\t\t }\n \t\tvar endPos = lines[lineNum].length+startPos;\n\t\t\t// In this case we want to highlight all text up to the \n\t\t\t// chosen line, so reset startPos\n\t\t\tstartPos = 0\n\t\t\t// do selection\n\t\t\ttarea.disabled=false\n\n \t\t// Chrome / Firefox\n \t\tif(typeof(tarea.selectionStart) != \"undefined\") {\n \t\t//tarea.focus();\n \t\ttarea.selectionStart = startPos;\n\t\t\t\ttarea.selectionEnd = endPos;\n\t\t\t\ttarea.focus()\n \t\t//return true;\n \t\t} else {\n\t\t\t\t// IE\n\t\t\t\tif (document.selection && document.selection.createRange) {\n\t\t\t\t\t//tarea.focus();\n\t\t\t\t\ttarea.select();\n\t\t\t\t\tvar range = document.selection.createRange();\n\t\t\t\t\trange.collapse(true);\n\t\t\t\t\trange.moveEnd(\"character\", endPos);\n\t\t\t\t\trange.moveStart(\"character\", startPos);\n\t\t\t\t\trange.select();\n\t\t\t\t\ttarea.focus()\n\t\t\t\t\t//return true;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarea.selectionStart = tarea.length;\n\t\t\t//tarea.selectionEnd = tarea.length;\n\t\t\ttarea.focus()\n\t\t\ttarea.disabled=true\n\t\t\t// XXX As soon as it loses focus the highlight also disappears\n\t\t\t//inputText.focus()\n\t\t},\t\n\t\tzeroPad: function zeroPad(num, numZeros) {\n\t\t\tvar n = Math.abs(num);\n\t\t\tvar zeros = Math.max(0, numZeros - Math.floor(n).toString().length );\n\t\t\tvar zeroString = Math.pow(10,zeros).toString().substr(1);\n\t\t\tif( num < 0 ) {\n\t\t\t\tzeroString = '-' + zeroString;\n\t\t\t}\n\t\t\treturn zeroString+n;\n\t\t}\t\n\t}\n})\n"],"sourceRoot":""}