{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./app/javascript/packs/projects/data/money_data.js","webpack:///./app/javascript/packs/projects/money.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","selectOptions","countryOptions","rates","outputValue","inputNumber","document","getElementById","inputCurrency","outputCurrency","outputCountry","countriesDatalist","input","output","perPerson","perPersonCountry","update","inputValue","firstRate","secondRate","country","countryData","population","perPersonValue","innerHTML","toFixed","filter","element","parseInt","addEventListener","event","insertAdjacentHTML","length","fillCountriesDatalist","fetch","then","response","json","data"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,qBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsB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,SAElB,CACI,QAAW,UACX,WAAc,UAElB,CACI,QAAW,SACX,WAAc,QAElB,CACI,QAAW,QACX,WAAc,UAElB,CACI,QAAW,UACX,WAAc,OAElB,CACI,QAAW,SACX,WAAc,QAElB,CACI,QAAW,UACX,WAAc,UAElB,CACI,QAAW,yBACX,WAAc,SAElB,CACI,QAAW,WACX,WAAc,SAElB,CACI,QAAW,SACX,WAAc,WAElB,CACI,QAAW,SACX,WAAc,QAElB,CACI,QAAW,WACX,WAAc,SAElB,CACI,QAAW,eACX,WAAc,UAElB,CACI,QAAW,UACX,WAAc,UAElB,CACI,QAAW,WACX,WAAc,UAElB,CACI,QAAW,WACX,WAAc,UAElB,CACI,QAAW,SACX,WAAc,UAElB,CACI,QAAW,aACX,WAAc,QAElB,CACI,QAAW,iBACX,WAAc,OAElB,CACI,QAAW,2BACX,WAAc,SAElB,CACI,QAAW,OACX,WAAc,UAElB,CACI,QAAW,QACX,WAAc,UAElB,CACI,QAAW,QACX,WAAc,UAElB,CACI,QAAW,mBACX,WAAc,MAElB,CACI,QAAW,0BACX,WAAc,KAElB,CACI,QAAW,WACX,WAAc,UAElB,CACI,QAAW,UACX,WAAc,QAElB,CACI,QAAW,QACX,WAAc,SAElB,CACI,QAAW,eACX,WAAc,OAElB,CACI,QAAW,aACX,WAAc,SAElB,CACI,QAAW,UACX,WAAc,SAElB,CACI,QAAW,OACX,WAAc,UAElB,CACI,QAAW,SACX,WAAc,SAElB,CACI,QAAW,iBACX,WAAc,UAElB,CACI,QAAW,UACX,WAAc,SAElB,CACI,QAAW,WACX,WAAc,QAElB,CACI,QAAW,WACX,WAAc,OAElB,CACI,QAAW,qBACX,WAAc,UAElB,CACI,QAAW,aACX,WAAc,SAElB,CACI,QAAW,UACX,WAAc,UAElB,CACI,QAAW,QACX,WAAc,UAElB,CACI,QAAW,cACX,WAAc,SAElB,CACI,QAAW,UACX,WAAc,UAElB,CACI,QAAW,oBACX,WAAc,SAElB,CACI,QAAW,UACX,WAAc,SAElB,CACI,QAAW,UACX,WAAc,SAElB,CACI,QAAW,WACX,WAAc,WAElB,CACI,QAAW,mBACX,WAAc,MAElB,CACI,QAAW,gBACX,WAAc,OAElB,CACI,QAAW,eACX,WAAc,QAElB,CACI,QAAW,UACX,WAAc,SAElB,CACI,QAAW,SACX,WAAc,UAElB,CACI,QAAW,gBACX,WAAc,QAElB,CACI,QAAW,mBACX,WAAc,QAElB,CACI,QAAW,QACX,WAAc,SAElB,CACI,QAAW,SACX,WAAc,SAElB,CACI,QAAW,UACX,WAAc,SAElB,CACI,QAAW,UACX,WAAc,UAElB,CACI,QAAW,QACX,WAAc,UAElB,CACI,QAAW,YACX,WAAc,OAElB,CACI,QAAW,SACX,WAAc,UAElB,CACI,QAAW,YACX,WAAc,OAElB,CACI,QAAW,UACX,WAAc,QAElB,CACI,QAAW,aACX,WAAc,QAElB,CACI,QAAW,OACX,WAAc,QAElB,CACI,QAAW,YACX,WAAc,UAElB,CACI,QAAW,SACX,WAAc,UAElB,CACI,QAAW,gBACX,WAAc,SAElB,CACI,QAAW,SACX,WAAc,QAElB,CACI,QAAW,QACX,WAAc,UAElB,CACI,QAAW,gCACX,WAAc,KAElB,CACI,QAAW,WACX,WAAc,SAElB,CACI,QAAW,YACX,WAAc,QAElB,CACI,QAAW,UACX,WAAc,SAElB,CACI,QAAW,UACX,WAAc,QAElB,CACI,QAAW,QACX,WAAc,YAElB,CACI,QAAW,YACX,WAAc,WAElB,CACI,QAAW,OACX,WAAc,UAElB,CACI,QAAW,OACX,WAAc,UAElB,CACI,QAAW,UACX,WAAc,SAElB,CACI,QAAW,SACX,WAAc,SAElB,CACI,QAAW,QACX,WAAc,UAElB,CACI,QAAW,cACX,WAAc,UAElB,CACI,QAAW,UACX,WAAc,SAElB,CACI,QAAW,QACX,WAAc,WAElB,CACI,QAAW,SACX,WAAc,SAElB,CACI,QAAW,aACX,WAAc,UAElB,CACI,QAAW,QACX,WAAc,UAElB,CACI,QAAW,WACX,WAAc,QAElB,CACI,QAAW,SACX,WAAc,SAElB,CACI,QAAW,aACX,WAAc,SAElB,CACI,QAAW,OACX,WAAc,SAElB,CACI,QAAW,SACX,WAAc,SAElB,CACI,QAAW,UACX,WAAc,SAElB,CACI,QAAW,UACX,WAAc,SAElB,CACI,QAAW,UACX,WAAc,SAElB,CACI,QAAW,yBACX,WAAc,SAElB,CACI,QAAW,gBACX,WAAc,OAElB,CACI,QAAW,YACX,WAAc,SAElB,CACI,QAAW,aACX,WAAc,QAElB,CACI,QAAW,QACX,WAAc,QAElB,CACI,QAAW,kBACX,WAAc,SAElB,CACI,QAAW,aACX,WAAc,UAElB,CACI,QAAW,SACX,WAAc,UAElB,CACI,QAAW,WACX,WAAc,UAElB,CACI,QAAW,WACX,WAAc,QAElB,CACI,QAAW,OACX,WAAc,UAElB,CACI,QAAW,QACX,WAAc,QAElB,CACI,QAAW,mBACX,WAAc,OAElB,CACI,QAAW,aACX,WAAc,QAElB,CACI,QAAW,aACX,WAAc,SAElB,CACI,QAAW,YACX,WAAc,SAElB,CACI,QAAW,UACX,WAAc,QAElB,CACI,QAAW,SACX,WAAc,WAElB,CACI,QAAW,kCACX,WAAc,QAElB,CACI,QAAW,UACX,WAAc,SAElB,CACI,QAAW,SACX,WAAc,OAElB,CACI,QAAW,WACX,WAAc,SAElB,CACI,QAAW,aACX,WAAc,QAElB,CACI,QAAW,aACX,WAAc,MAElB,CACI,QAAW,UACX,WAAc,UAElB,CACI,QAAW,aACX,WAAc,UAElB,CACI,QAAW,UACX,WAAc,UAElB,CACI,QAAW,UACX,WAAc,SAElB,CACI,QAAW,QACX,WAAc,OAElB,CACI,QAAW,QACX,WAAc,UAElB,CACI,QAAW,cACX,WAAc,UAElB,CACI,QAAW,uBACX,WAAc,QAElB,CACI,QAAW,gBACX,WAAc,QAElB,CACI,QAAW,cACX,WAAc,QAElB,CACI,QAAW,YACX,WAAc,SAElB,CACI,QAAW,QACX,WAAc,UAElB,CACI,QAAW,UACX,WAAc,WAElB,CACI,QAAW,OACX,WAAc,MAElB,CACI,QAAW,iBACX,WAAc,MAElB,CACI,QAAW,cACX,WAAc,UAElB,CACI,QAAW,mBACX,WAAc,SAElB,CACI,QAAW,2BACX,WAAc,OAElB,CACI,QAAW,SACX,WAAc,SAElB,CACI,QAAW,OACX,WAAc,SAElB,CACI,QAAW,WACX,WAAc,WAElB,CACI,QAAW,QACX,WAAc,OAElB,CACI,QAAW,YACX,WAAc,SAElB,CACI,QAAW,SACX,WAAc,SAElB,CACI,QAAW,mBACX,WAAc,SAElB,CACI,QAAW,WACX,WAAc,SAElB,CACI,QAAW,OACX,WAAc,UAElB,CACI,QAAW,cACX,WAAc,WAElB,CACI,QAAW,WACX,WAAc,IAElB,CACI,QAAW,SACX,WAAc,UAElB,CACI,QAAW,WACX,WAAc,UAElB,CACI,QAAW,cACX,WAAc,SAElB,CACI,QAAW,QACX,WAAc,SAElB,CACI,QAAW,UACX,WAAc,QAElB,CACI,QAAW,UACX,WAAc,UAElB,CACI,QAAW,qBACX,WAAc,WAElB,CACI,QAAW,SACX,WAAc,UAElB,CACI,QAAW,eACX,WAAc,MAElB,CACI,QAAW,wBACX,WAAc,OAElB,CACI,QAAW,cACX,WAAc,QAElB,CACI,QAAW,4BACX,WAAc,MAElB,CACI,QAAW,mCACX,WAAc,QAElB,CACI,QAAW,QACX,WAAc,QAElB,CACI,QAAW,aACX,WAAc,OAElB,CACI,QAAW,wBACX,WAAc,QAElB,CACI,QAAW,eACX,WAAc,UAElB,CACI,QAAW,WACX,WAAc,SAElB,CACI,QAAW,UACX,WAAc,UAElB,CACI,QAAW,SACX,WAAc,SAElB,CACI,QAAW,aACX,WAAc,OAElB,CACI,QAAW,eACX,WAAc,SAElB,CACI,QAAW,YACX,WAAc,SAElB,CACI,QAAW,WACX,WAAc,SAElB,CACI,QAAW,WACX,WAAc,SAElB,CACI,QAAW,kBACX,WAAc,QAElB,CACI,QAAW,UACX,WAAc,UAElB,CACI,QAAW,eACX,WAAc,UAElB,CACI,QAAW,+CACX,WAAc,IAElB,CACI,QAAW,cACX,WAAc,UAElB,CACI,QAAW,cACX,WAAc,UAElB,CACI,QAAW,QACX,WAAc,UAElB,CACI,QAAW,WACX,WAAc,QAElB,CACI,QAAW,QACX,WAAc,UAElB,CACI,QAAW,WACX,WAAc,QAElB,CACI,QAAW,yBACX,WAAc,MAElB,CACI,QAAW,YACX,WAAc,SAElB,CACI,QAAW,SACX,WAAc,UAElB,CACI,QAAW,cACX,WAAc,SAElB,CACI,QAAW,QACX,WAAc,UAElB,CACI,QAAW,aACX,WAAc,SAElB,CACI,QAAW,WACX,WAAc,UAElB,CACI,QAAW,WACX,WAAc,UAElB,CACI,QAAW,mCACX,WAAc,UAElB,CACI,QAAW,OACX,WAAc,SAElB,CACI,QAAW,UACX,WAAc,MAElB,CACI,QAAW,QACX,WAAc,QAElB,CACI,QAAW,sBACX,WAAc,SAElB,CACI,QAAW,UACX,WAAc,UAElB,CACI,QAAW,SACX,WAAc,UAElB,CACI,QAAW,eACX,WAAc,SAElB,CACI,QAAW,2BACX,WAAc,OAElB,CACI,QAAW,SACX,WAAc,OAElB,CACI,QAAW,SACX,WAAc,UAElB,CACI,QAAW,UACX,WAAc,UAElB,CACI,QAAW,uBACX,WAAc,SAElB,CACI,QAAW,qBACX,WAAc,UAElB,CACI,QAAW,oBACX,WAAc,WAElB,CACI,QAAW,uCACX,WAAc,KAElB,CACI,QAAW,UACX,WAAc,SAElB,CACI,QAAW,aACX,WAAc,UAElB,CACI,QAAW,UACX,WAAc,QAElB,CACI,QAAW,YACX,WAAc,UAElB,CACI,QAAW,UACX,WAAc,UAElB,CACI,QAAW,0BACX,WAAc,OAElB,CACI,QAAW,uBACX,WAAc,QAElB,CACI,QAAW,QACX,WAAc,QAElB,CACI,QAAW,oBACX,WAAc,OAElB,CACI,QAAW,iBACX,WAAc,QAElB,CACI,QAAW,QACX,WAAc,UAElB,CACI,QAAW,SACX,WAAc,UAElB,CACI,QAAW,WACX,WAAc,Y,gCCj+BtB,WAE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AK,SAACC,GAAD,OAAcA,EAASC,UAC5BF,MAAK,SAACG,IACLnC,EAAQmC,EAAKnC,OACR,IAAU,EACfa","file":"js/projects/money-ae8d6ba4c67336fd6716.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/packs/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 55);\n","export const selectOptions = `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `;\n\nexport const countryOptions = [\n {\n \"country\": \"Afghanistan\",\n \"population\": 37172386\n },\n {\n \"country\": \"Albania\",\n \"population\": 2866376\n },\n {\n \"country\": \"Algeria\",\n \"population\": 42228429\n },\n {\n \"country\": \"American Samoa\",\n \"population\": 55465\n },\n {\n \"country\": \"Andorra\",\n \"population\": 77006\n },\n {\n \"country\": \"Angola\",\n \"population\": 30809762\n },\n {\n \"country\": \"Anguilla\",\n \"population\": 15094\n },\n {\n \"country\": \"Antarctica\",\n \"population\": 1106\n },\n {\n \"country\": \"Antigua and Barbuda\",\n \"population\": 96286\n },\n {\n \"country\": \"Argentina\",\n \"population\": 44494502\n },\n {\n \"country\": \"Armenia\",\n \"population\": 2951776\n },\n {\n \"country\": \"Aruba\",\n \"population\": 105845\n },\n {\n \"country\": \"Australia\",\n \"population\": 24982688\n },\n {\n \"country\": \"Austria\",\n \"population\": 8840521\n },\n {\n \"country\": \"Azerbaijan\",\n \"population\": 9939800\n },\n {\n \"country\": \"The Bahamas\",\n \"population\": 385640\n },\n {\n \"country\": \"Bahrain\",\n \"population\": 1569439\n },\n {\n \"country\": \"Bangladesh\",\n \"population\": 161356039\n },\n {\n \"country\": \"Barbados\",\n \"population\": 286641\n },\n {\n \"country\": \"Belarus\",\n \"population\": 9483499\n },\n {\n \"country\": \"Belgium\",\n \"population\": 11433256\n },\n {\n \"country\": \"Belize\",\n \"population\": 383071\n },\n {\n \"country\": \"Benin\",\n \"population\": 11485048\n },\n {\n \"country\": \"Bermuda\",\n \"population\": 63973\n },\n {\n \"country\": \"Bhutan\",\n \"population\": 754394\n },\n {\n \"country\": \"Bolivia\",\n \"population\": 11353142\n },\n {\n \"country\": \"Bosnia and Herzegovina\",\n \"population\": 3323929\n },\n {\n \"country\": \"Botswana\",\n \"population\": 2254126\n },\n {\n \"country\": \"Brazil\",\n \"population\": 209469333\n },\n {\n \"country\": \"Brunei\",\n \"population\": 428962\n },\n {\n \"country\": \"Bulgaria\",\n \"population\": 7025037\n },\n {\n \"country\": \"Burkina Faso\",\n \"population\": 19751535\n },\n {\n \"country\": \"Burundi\",\n \"population\": 11175378\n },\n {\n \"country\": \"Cambodia\",\n \"population\": 16249798\n },\n {\n \"country\": \"Cameroon\",\n \"population\": 25216237\n },\n {\n \"country\": \"Canada\",\n \"population\": 37057765\n },\n {\n \"country\": \"Cape Verde\",\n \"population\": 543767\n },\n {\n \"country\": \"Cayman Islands\",\n \"population\": 64174\n },\n {\n \"country\": \"Central African Republic\",\n \"population\": 4666377\n },\n {\n \"country\": \"Chad\",\n \"population\": 15477751\n },\n {\n \"country\": \"Chile\",\n \"population\": 18729160\n },\n {\n \"country\": \"China\",\n \"population\": 1392730000\n },\n {\n \"country\": \"Christmas Island\",\n \"population\": 1402\n },\n {\n \"country\": \"Cocos (Keeling) Islands\",\n \"population\": 596\n },\n {\n \"country\": \"Colombia\",\n \"population\": 49648685\n },\n {\n \"country\": \"Comoros\",\n \"population\": 832322\n },\n {\n \"country\": \"Congo\",\n \"population\": 5244363\n },\n {\n \"country\": \"Cook Islands\",\n \"population\": 17379\n },\n {\n \"country\": \"Costa Rica\",\n \"population\": 4999441\n },\n {\n \"country\": \"Croatia\",\n \"population\": 4087843\n },\n {\n \"country\": \"Cuba\",\n \"population\": 11338138\n },\n {\n \"country\": \"Cyprus\",\n \"population\": 1189265\n },\n {\n \"country\": \"Czech Republic\",\n \"population\": 10629928\n },\n {\n \"country\": \"Denmark\",\n \"population\": 5793636\n },\n {\n \"country\": \"Djibouti\",\n \"population\": 958920\n },\n {\n \"country\": \"Dominica\",\n \"population\": 71625\n },\n {\n \"country\": \"Dominican Republic\",\n \"population\": 10627165\n },\n {\n \"country\": \"East Timor\",\n \"population\": 1267972\n },\n {\n \"country\": \"Ecuador\",\n \"population\": 17084357\n },\n {\n \"country\": \"Egypt\",\n \"population\": 98423595\n },\n {\n \"country\": \"El Salvador\",\n \"population\": 6420744\n },\n {\n \"country\": \"England\",\n \"population\": 55619400\n },\n {\n \"country\": \"Equatorial Guinea\",\n \"population\": 1308974\n },\n {\n \"country\": \"Eritrea\",\n \"population\": 3213972\n },\n {\n \"country\": \"Estonia\",\n \"population\": 1321977\n },\n {\n \"country\": \"Ethiopia\",\n \"population\": 109224559\n },\n {\n \"country\": \"Falkland Islands\",\n \"population\": 2840\n },\n {\n \"country\": \"Faroe Islands\",\n \"population\": 48497\n },\n {\n \"country\": \"Fiji Islands\",\n \"population\": 883483\n },\n {\n \"country\": \"Finland\",\n \"population\": 5515525\n },\n {\n \"country\": \"France\",\n \"population\": 66977107\n },\n {\n \"country\": \"French Guiana\",\n \"population\": 290691\n },\n {\n \"country\": \"French Polynesia\",\n \"population\": 277679\n },\n {\n \"country\": \"Gabon\",\n \"population\": 2119275\n },\n {\n \"country\": \"Gambia\",\n \"population\": 2280102\n },\n {\n \"country\": \"Georgia\",\n \"population\": 3726549\n },\n {\n \"country\": \"Germany\",\n \"population\": 82905782\n },\n {\n \"country\": \"Ghana\",\n \"population\": 29767108\n },\n {\n \"country\": \"Gibraltar\",\n \"population\": 33718\n },\n {\n \"country\": \"Greece\",\n \"population\": 10731726\n },\n {\n \"country\": \"Greenland\",\n \"population\": 56025\n },\n {\n \"country\": \"Grenada\",\n \"population\": 111454\n },\n {\n \"country\": \"Guadeloupe\",\n \"population\": 395700\n },\n {\n \"country\": \"Guam\",\n \"population\": 165768\n },\n {\n \"country\": \"Guatemala\",\n \"population\": 17247807\n },\n {\n \"country\": \"Guinea\",\n \"population\": 12414318\n },\n {\n \"country\": \"Guinea-Bissau\",\n \"population\": 1874309\n },\n {\n \"country\": \"Guyana\",\n \"population\": 779004\n },\n {\n \"country\": \"Haiti\",\n \"population\": 11123176\n },\n {\n \"country\": \"Holy See (Vatican City State)\",\n \"population\": 825\n },\n {\n \"country\": \"Honduras\",\n \"population\": 9587522\n },\n {\n \"country\": \"Hong Kong\",\n \"population\": 7451000\n },\n {\n \"country\": \"Hungary\",\n \"population\": 9775564\n },\n {\n \"country\": \"Iceland\",\n \"population\": 352721\n },\n {\n \"country\": \"India\",\n \"population\": 1352617328\n },\n {\n \"country\": \"Indonesia\",\n \"population\": 267663435\n },\n {\n \"country\": \"Iran\",\n \"population\": 81800269\n },\n {\n \"country\": \"Iraq\",\n \"population\": 38433600\n },\n {\n \"country\": \"Ireland\",\n \"population\": 4867309\n },\n {\n \"country\": \"Israel\",\n \"population\": 8882800\n },\n {\n \"country\": \"Italy\",\n \"population\": 60421760\n },\n {\n \"country\": \"Ivory Coast\",\n \"population\": 25069229\n },\n {\n \"country\": \"Jamaica\",\n \"population\": 2934855\n },\n {\n \"country\": \"Japan\",\n \"population\": 126529100\n },\n {\n \"country\": \"Jordan\",\n \"population\": 9956011\n },\n {\n \"country\": \"Kazakhstan\",\n \"population\": 18272430\n },\n {\n \"country\": \"Kenya\",\n \"population\": 51393010\n },\n {\n \"country\": \"Kiribati\",\n \"population\": 115847\n },\n {\n \"country\": \"Kuwait\",\n \"population\": 4137309\n },\n {\n \"country\": \"Kyrgyzstan\",\n \"population\": 6322800\n },\n {\n \"country\": \"Laos\",\n \"population\": 7061507\n },\n {\n \"country\": \"Latvia\",\n \"population\": 1927174\n },\n {\n \"country\": \"Lebanon\",\n \"population\": 6848925\n },\n {\n \"country\": \"Lesotho\",\n \"population\": 2108132\n },\n {\n \"country\": \"Liberia\",\n \"population\": 4818977\n },\n {\n \"country\": \"Libyan Arab Jamahiriya\",\n \"population\": 6678567\n },\n {\n \"country\": \"Liechtenstein\",\n \"population\": 37910\n },\n {\n \"country\": \"Lithuania\",\n \"population\": 2801543\n },\n {\n \"country\": \"Luxembourg\",\n \"population\": 607950\n },\n {\n \"country\": \"Macao\",\n \"population\": 631636\n },\n {\n \"country\": \"North Macedonia\",\n \"population\": 2084367\n },\n {\n \"country\": \"Madagascar\",\n \"population\": 26262368\n },\n {\n \"country\": \"Malawi\",\n \"population\": 18143315\n },\n {\n \"country\": \"Malaysia\",\n \"population\": 31528585\n },\n {\n \"country\": \"Maldives\",\n \"population\": 515696\n },\n {\n \"country\": \"Mali\",\n \"population\": 19077690\n },\n {\n \"country\": \"Malta\",\n \"population\": 484630\n },\n {\n \"country\": \"Marshall Islands\",\n \"population\": 58413\n },\n {\n \"country\": \"Martinique\",\n \"population\": 376480\n },\n {\n \"country\": \"Mauritania\",\n \"population\": 4403319\n },\n {\n \"country\": \"Mauritius\",\n \"population\": 1265303\n },\n {\n \"country\": \"Mayotte\",\n \"population\": 270372\n },\n {\n \"country\": \"Mexico\",\n \"population\": 126190788\n },\n {\n \"country\": \"Micronesia, Federated States of\",\n \"population\": 112640\n },\n {\n \"country\": \"Moldova\",\n \"population\": 2706049\n },\n {\n \"country\": \"Monaco\",\n \"population\": 38682\n },\n {\n \"country\": \"Mongolia\",\n \"population\": 3170208\n },\n {\n \"country\": \"Montenegro\",\n \"population\": 631219\n },\n {\n \"country\": \"Montserrat\",\n \"population\": 5900\n },\n {\n \"country\": \"Morocco\",\n \"population\": 36029138\n },\n {\n \"country\": \"Mozambique\",\n \"population\": 29495962\n },\n {\n \"country\": \"Myanmar\",\n \"population\": 53708395\n },\n {\n \"country\": \"Namibia\",\n \"population\": 2448255\n },\n {\n \"country\": \"Nauru\",\n \"population\": 12704\n },\n {\n \"country\": \"Nepal\",\n \"population\": 28087871\n },\n {\n \"country\": \"Netherlands\",\n \"population\": 17231624\n },\n {\n \"country\": \"Netherlands Antilles\",\n \"population\": 227049\n },\n {\n \"country\": \"New Caledonia\",\n \"population\": 284060\n },\n {\n \"country\": \"New Zealand\",\n \"population\": 4841000\n },\n {\n \"country\": \"Nicaragua\",\n \"population\": 6465513\n },\n {\n \"country\": \"Niger\",\n \"population\": 22442948\n },\n {\n \"country\": \"Nigeria\",\n \"population\": 195874740\n },\n {\n \"country\": \"Niue\",\n \"population\": 1624\n },\n {\n \"country\": \"Norfolk Island\",\n \"population\": 2169\n },\n {\n \"country\": \"North Korea\",\n \"population\": 25549819\n },\n {\n \"country\": \"Northern Ireland\",\n \"population\": 1885400\n },\n {\n \"country\": \"Northern Mariana Islands\",\n \"population\": 56882\n },\n {\n \"country\": \"Norway\",\n \"population\": 5311916\n },\n {\n \"country\": \"Oman\",\n \"population\": 4829483\n },\n {\n \"country\": \"Pakistan\",\n \"population\": 212215030\n },\n {\n \"country\": \"Palau\",\n \"population\": 17907\n },\n {\n \"country\": \"Palestine\",\n \"population\": 4569087\n },\n {\n \"country\": \"Panama\",\n \"population\": 4176873\n },\n {\n \"country\": \"Papua New Guinea\",\n \"population\": 8606316\n },\n {\n \"country\": \"Paraguay\",\n \"population\": 6956071\n },\n {\n \"country\": \"Peru\",\n \"population\": 31989256\n },\n {\n \"country\": \"Philippines\",\n \"population\": 106651922\n },\n {\n \"country\": \"Pitcairn\",\n \"population\": 67\n },\n {\n \"country\": \"Poland\",\n \"population\": 37974750\n },\n {\n \"country\": \"Portugal\",\n \"population\": 10283822\n },\n {\n \"country\": \"Puerto Rico\",\n \"population\": 3195153\n },\n {\n \"country\": \"Qatar\",\n \"population\": 2781677\n },\n {\n \"country\": \"Reunion\",\n \"population\": 859959\n },\n {\n \"country\": \"Romania\",\n \"population\": 19466145\n },\n {\n \"country\": \"Russian Federation\",\n \"population\": 144478050\n },\n {\n \"country\": \"Rwanda\",\n \"population\": 12301939\n },\n {\n \"country\": \"Saint Helena\",\n \"population\": 6600\n },\n {\n \"country\": \"Saint Kitts and Nevis\",\n \"population\": 52441\n },\n {\n \"country\": \"Saint Lucia\",\n \"population\": 181889\n },\n {\n \"country\": \"Saint Pierre and Miquelon\",\n \"population\": 5888\n },\n {\n \"country\": \"Saint Vincent and the Grenadines\",\n \"population\": 110210\n },\n {\n \"country\": \"Samoa\",\n \"population\": 196130\n },\n {\n \"country\": \"San Marino\",\n \"population\": 33785\n },\n {\n \"country\": \"Sao Tome and Principe\",\n \"population\": 211028\n },\n {\n \"country\": \"Saudi Arabia\",\n \"population\": 33699947\n },\n {\n \"country\": \"Scotland\",\n \"population\": 5424800\n },\n {\n \"country\": \"Senegal\",\n \"population\": 15854360\n },\n {\n \"country\": \"Serbia\",\n \"population\": 6963764\n },\n {\n \"country\": \"Seychelles\",\n \"population\": 96762\n },\n {\n \"country\": \"Sierra Leone\",\n \"population\": 7650154\n },\n {\n \"country\": \"Singapore\",\n \"population\": 5638676\n },\n {\n \"country\": \"Slovakia\",\n \"population\": 5446771\n },\n {\n \"country\": \"Slovenia\",\n \"population\": 2073894\n },\n {\n \"country\": \"Solomon Islands\",\n \"population\": 652858\n },\n {\n \"country\": \"Somalia\",\n \"population\": 15008154\n },\n {\n \"country\": \"South Africa\",\n \"population\": 57779622\n },\n {\n \"country\": \"South Georgia and the South Sandwich Islands\",\n \"population\": 30\n },\n {\n \"country\": \"South Korea\",\n \"population\": 51606633\n },\n {\n \"country\": \"South Sudan\",\n \"population\": 10975920\n },\n {\n \"country\": \"Spain\",\n \"population\": 46796540\n },\n {\n \"country\": \"SriLanka\",\n \"population\": 21670000\n },\n {\n \"country\": \"Sudan\",\n \"population\": 41801533\n },\n {\n \"country\": \"Suriname\",\n \"population\": 575991\n },\n {\n \"country\": \"Svalbard and Jan Mayen\",\n \"population\": 2572\n },\n {\n \"country\": \"Swaziland\",\n \"population\": 1136191\n },\n {\n \"country\": \"Sweden\",\n \"population\": 10175214\n },\n {\n \"country\": \"Switzerland\",\n \"population\": 8513227\n },\n {\n \"country\": \"Syria\",\n \"population\": 16906283\n },\n {\n \"country\": \"Tajikistan\",\n \"population\": 9100837\n },\n {\n \"country\": \"Tanzania\",\n \"population\": 56318348\n },\n {\n \"country\": \"Thailand\",\n \"population\": 69428524\n },\n {\n \"country\": \"The Democratic Republic of Congo\",\n \"population\": 84068091\n },\n {\n \"country\": \"Togo\",\n \"population\": 7889094\n },\n {\n \"country\": \"Tokelau\",\n \"population\": 1411\n },\n {\n \"country\": \"Tonga\",\n \"population\": 103197\n },\n {\n \"country\": \"Trinidad and Tobago\",\n \"population\": 1389858\n },\n {\n \"country\": \"Tunisia\",\n \"population\": 11565204\n },\n {\n \"country\": \"Turkey\",\n \"population\": 82319724\n },\n {\n \"country\": \"Turkmenistan\",\n \"population\": 5850908\n },\n {\n \"country\": \"Turks and Caicos Islands\",\n \"population\": 37665\n },\n {\n \"country\": \"Tuvalu\",\n \"population\": 11508\n },\n {\n \"country\": \"Uganda\",\n \"population\": 42723139\n },\n {\n \"country\": \"Ukraine\",\n \"population\": 44622516\n },\n {\n \"country\": \"United Arab Emirates\",\n \"population\": 9630959\n },\n {\n \"country\": \"The United Kingdom\",\n \"population\": 66460344\n },\n {\n \"country\": \"The United States\",\n \"population\": 326687501\n },\n {\n \"country\": \"United States Minor Outlying Islands\",\n \"population\": 300\n },\n {\n \"country\": \"Uruguay\",\n \"population\": 3449299\n },\n {\n \"country\": \"Uzbekistan\",\n \"population\": 32955400\n },\n {\n \"country\": \"Vanuatu\",\n \"population\": 292680\n },\n {\n \"country\": \"Venezuela\",\n \"population\": 28870195\n },\n {\n \"country\": \"Vietnam\",\n \"population\": 95540395\n },\n {\n \"country\": \"Virgin Islands, British\",\n \"population\": 29802\n },\n {\n \"country\": \"Virgin Islands, U.S.\",\n \"population\": 106977\n },\n {\n \"country\": \"Wales\",\n \"population\": 3139000\n },\n {\n \"country\": \"Wallis and Futuna\",\n \"population\": 15289\n },\n {\n \"country\": \"Western Sahara\",\n \"population\": 652271\n },\n {\n \"country\": \"Yemen\",\n \"population\": 28498687\n },\n {\n \"country\": \"Zambia\",\n \"population\": 17351822\n },\n {\n \"country\": \"Zimbabwe\",\n \"population\": 14439018\n }\n];\n","import { selectOptions, countryOptions } from './data/money_data.js';\n\nlet rates, outputValue;\n\nconst inputNumber = document.getElementById('input-value');\nconst inputCurrency = document.getElementById('input-currency');\nconst outputCurrency = document.getElementById('output-currency');\nconst outputCountry = document.getElementById('output-country');\nconst countriesDatalist = document.getElementById('countries');\nconst input = document.getElementById('input');\nconst output = document.getElementById('output');\nconst perPerson = document.getElementById('per-person');\nconst perPersonCountry = document.getElementById('per-person-country');\n\nconst getRates = () => {\n fetch('https://api.exchangeratesapi.io/latest')\n .then((response) => response.json())\n .then((data) => {\n rates = data.rates;\n rates[\"EUR\"] = 1.0;\n update();\n });\n};\n\nconst convert = () => {\n const inputValue = inputNumber.value;\n const firstRate = rates[inputCurrency.value];\n const secondRate = rates[outputCurrency.value];\n\n outputValue = (inputValue / firstRate) * secondRate;\n\n input.innerHTML = `${inputValue} ${inputCurrency.value}`;\n output.innerHTML = `${outputValue.toFixed(2)} ${outputCurrency.value}`;\n};\n\nconst updatePerPerson = () => {\n const country = outputCountry.value || \"The United Kingdom\";\n const countryData = countryOptions.filter(element => element[\"country\"] == country);\n const population = parseInt(countryData[0][\"population\"]);\n const perPersonValue = outputValue / population;\n perPerson.innerHTML = `${perPersonValue.toFixed(2)} ${outputCurrency.value}`;\n perPersonCountry.innerHTML = country;\n};\n\nconst update = () => {\n convert();\n updatePerPerson();\n};\n\ninputNumber.addEventListener('input', (event) => {\n update();\n});\n\ninputCurrency.addEventListener('input', (event) => {\n update();\n});\n\noutputCurrency.addEventListener('input', (event) => {\n update();\n});\n\noutputCountry.addEventListener('input', (event) => {\n update();\n})\n\nconst fillCountriesDatalist = () => {\n for (let i = 0; i< countryOptions.length; i+= 1) {\n countriesDatalist.insertAdjacentHTML('beforeend', `