exports.ids = [13];
exports.modules = {

/***/ 189:
/***/ (function(module, exports) {

// Exports
module.exports = {

};


/***/ }),

/***/ 228:
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__.p + "img/bg_city.0014771.png";

/***/ }),

/***/ 229:
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__.p + "img/tree.a71d2d2.png";

/***/ }),

/***/ 230:
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABACAYAAABFqxrgAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKMSURBVHgB7ZsxaBNRGMf/r62DQuXUMQ5ZhGZQ0qWOWlzUxaijYC242UgyiV0SF4tTq61QcEgjOGrSqZNYN81iwcGAyy0Z1aBDh7Y873upgldPG3j53qP3/YaQPC6B++V9/+R9707hF6WxLLZRg1J5QAc46GjdxLYqY7kdKjNAAnbUh1Sc/B/oLrbU+Ih5vqMXoseUCSBUgEOoDe2+uILUovNDSD0qEAkRIgEiwSASIBIMIgEiwSASIBIMI2CkdO4mKpdmEBwZ/edx4ZcOqmtPUW81wEFvFVkc02Dg26MWgsOj+zq2u/kdx+6dBQes5bBfAb1jj4IL6+Vwa6IAWyR9VnfzB5ofX8MWVsuhcXsJhTMXwMH65xYmF6dgA6vlwCWAOH9qAraQn0iIBINIgEcSHq8/hyu8kLDR+YTSqzm4wrmE8GsHV58V4RLnEkgAiXCJUwkPokUSlYJrnEmgIKyuLcEHnEig6e+LAIJdAgmYfDJlFkG+wC5h+sWs8yCMw9pZoiCk1V8S6m5uzxh1o+av38cgYZsJK+8bfedAPpMbuACCRQJN/3Kf/wizxzNRf2IRHLCUQ/1dA4XTe3sNK61m4ntIQPZEBhywSKhcnvnreJKEysU7yJ/MgQvvltIUhNUEaYPCKwmUA7QvwY03EkjAm2L9vxszg8AbCbUbD9mCMI4XEigIbXaP+8W5BNpg4Q7COE4lUA7MX5uFa5xKcBWEcdzOBEdBGEf2HSASDFYlcHaL6CIOW1iVUH45x9I1ItnUoLEF6+U6viKZAJFgEAkQCQaRAJFgEAkQCQaRgN8SVBcpZleC3kBq0as9CcOYTudsUHTDeKknYaEdYliPR4OrSAXmC3+Lreicl9vhT/KxrgeMYboWAAAAAElFTkSuQmCC"

/***/ }),

/***/ 231:
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABACAYAAABFqxrgAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALpSURBVHgB7Zw/aBNxFMe/lzo0giW0isUGrEMhHcQsTUEQU3CoLia6CKJJR2lis8alZnFNYlVEhSYV56ZTp+J10qRL1cGAHTKYMZJaUIQm5+89UUQtXnK/tqR5H7iQ+5vL59773S/83sUAkRj2YLt3BoaRACwPDjqWtY6mkcWjco5me3hh4PgrwLim3vWiGzCMQbgQwtjAJtZqrw3EfVG1eB5diVVHz7dTLlgIomsxVDPgDrrQ7TQtj0hQiASIBEYkQCQwh6CR4f4hJII3cPn0BQwPDEEn9S9bWK++R764iFypAJ0YiPly6jUChyTO30T6ahJ7QaVWRfhZTEkpwzENTGlJh9nJ6T0TQFCUvbyd58jTgeN0oBO5eylme/usuYDCu5Ud16fDSfi9PvwPj7sP89fvYWLOcRA7lxAdD7W0PYVypfZx5/WfqrYkEMGRAF8E2scJWiKhFShtdKZOcGQMuaIzCXKLhEhgtPYTiKyZR2b1OXYLM57HyX69fRDtEupft7jx6yQkHSASGJEAkcCIBIgERiRAJDAiASKBEQkQCYxIgEhgRAJEAiMSIBIYkQCRwIgEiARGJEAkMCIBuzAC5XEfUSPVJ9BJaJcwE4zw1Elol2AXKsJKLT/ksUuqcUhfSXIU7Qf7IoEqSybuR1jAr2VqEJfqkFrl92O0i+OGsZ1SGfND6a+TNzdKaAcdI+COJeSKrdcU/qvEp51KNEopHWV8PQgcDcGAH21CV3RTTZOj52zvw4WeFrC6scbz1BYs33qCwb5jto9Bn/tnSrWFhSUtbULGXOCSutmL07b3obK/6HhYfYnPKgq88By23yhSCoafxh1Xrf1EW0UrwTWNSoTfO4ozQ/bK8OxCV/yNCv/C2xWVgotaGkSmgSmtdwe6MtEXd9BpSLcZIoERCRAJjEiASCADFZfqI5joZrZJwhw/OW6iGzGQwuNy5cdT82e9S2g23Co0BtXcwf/rAPWzRfUUU3hQztDMd6sl2XQVdGtJAAAAAElFTkSuQmCC"

/***/ }),

/***/ 232:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FootprintReportDialog_vue_vue_type_style_index_0_id_d80d814e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(189);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FootprintReportDialog_vue_vue_type_style_index_0_id_d80d814e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FootprintReportDialog_vue_vue_type_style_index_0_id_d80d814e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FootprintReportDialog_vue_vue_type_style_index_0_id_d80d814e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FootprintReportDialog_vue_vue_type_style_index_0_id_d80d814e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));


/***/ }),

/***/ 242:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/FootprintReportDialog.vue?vue&type=template&id=d80d814e&scoped=true
var render = function render() {
  var _this$carbon$this$for, _vm$comEquallist$equa, _vm$comEquallist$equa2, _vm$comEquallist$equa3;
  var _vm = this,
    _c = _vm._self._c;
  return _c('el-dialog', {
    attrs: {
      "visible": _vm.visible,
      "width": "550px",
      "title": 'Carbon Footprint Report',
      "before-close": _vm.handleClose,
      "lock-scroll": false
    },
    on: {
      "update:visible": function ($event) {
        _vm.visible = $event;
      }
    }
  }, [_c('div', [_c('el-form', {
    attrs: {
      "label-width": "70px"
    }
  }, [_c('el-form-item', {
    attrs: {
      "label": "Model"
    }
  }, [_c('el-select', {
    staticStyle: {
      "width": "100%"
    },
    attrs: {
      "placeholder": "Please select",
      "clearable": "",
      "filterable": ""
    },
    model: {
      value: _vm.form.model,
      callback: function ($$v) {
        _vm.$set(_vm.form, "model", $$v);
      },
      expression: "form.model"
    }
  }, _vm._l(_vm.carbon, function (item, idx) {
    return _c('el-option', {
      key: idx,
      attrs: {
        "label": item.accountName.replace(/\s*[\(\（][^)\）]*[\)\）]$/, ''),
        "value": idx
      }
    });
  }), 1)], 1), _vm._v(" "), _c('div', {
    staticClass: "form-row"
  }, [_c('el-form-item', {
    staticStyle: {
      "flex": "1"
    },
    attrs: {
      "label": "Quantity"
    }
  }, [_c('el-input', {
    staticClass: "left-input-number",
    attrs: {
      "type": "number",
      "min": 1,
      "step": 1,
      "controls": false,
      "placeholder": "Please input"
    },
    model: {
      value: _vm.form.quantity,
      callback: function ($$v) {
        _vm.$set(_vm.form, "quantity", $$v);
      },
      expression: "form.quantity"
    }
  })], 1), _vm._v(" "), _c('el-form-item', {
    staticStyle: {
      "flex": "1",
      "margin-left": "10px"
    },
    attrs: {
      "label": "Transport"
    }
  }, [_c('el-select', {
    staticStyle: {
      "width": "100%"
    },
    attrs: {
      "placeholder": "Please select",
      "clearable": ""
    },
    model: {
      value: _vm.form.transport,
      callback: function ($$v) {
        _vm.$set(_vm.form, "transport", $$v);
      },
      expression: "form.transport"
    }
  }, [_c('el-option', {
    attrs: {
      "label": "UK-Sea",
      "value": "UK-Sea"
    }
  }), _vm._v(" "), _c('el-option', {
    attrs: {
      "label": "UK-Air",
      "value": "UK-Air"
    }
  })], 1)], 1)], 1)], 1), _vm._v(" "), _c('div', {
    staticClass: "carbon-report-card"
  }, [_c('div', {
    staticClass: "carbon-report-main"
  }, [_c('div', {
    staticClass: "carbon-report-header"
  }, [_c('span', [_vm._v("Product Carbon Footprint")])]), _vm._v(" "), _c('div', {
    staticClass: "carbon-report-value"
  }, [_vm._v(_vm._s(_vm.comEmissionTotal))]), _vm._v(" "), _c('div', {
    staticClass: "carbon-report-date"
  }, [_vm._v("kgCO₂e per product unit")]), _vm._v(" "), _c('div', {
    staticClass: "carbon-report-date"
  }, [_vm._v("Accounting Period：" + _vm._s((_this$carbon$this$for = this.carbon[this.form.model]) === null || _this$carbon$this$for === void 0 ? void 0 : _this$carbon$this$for.accountTime))]), _vm._v(" "), _c('img', {
    staticClass: "carbon-bg",
    attrs: {
      "src": __webpack_require__(228),
      "alt": "bg"
    }
  }), _vm._v(" "), _c('div', {
    staticClass: "carbon-report-equal"
  }, [_c('div', {
    staticClass: "equal-title"
  }, [_vm._v("Equivalent to")]), _vm._v(" "), _c('div', {
    staticClass: "equal-list"
  }, [_c('div', {
    staticClass: "equal-item"
  }, [_c('img', {
    attrs: {
      "src": __webpack_require__(229),
      "alt": "tree"
    }
  }), _vm._v(" "), _c('div', [_vm._v(_vm._s(_vm.multiply((_vm$comEquallist$equa = _vm.comEquallist.equallist[0]) === null || _vm$comEquallist$equa === void 0 ? void 0 : _vm$comEquallist$equa.amount, _vm.form.quantity) || 0) + " "), _c('span', [_vm._v("tree")])]), _vm._v(" "), _c('div', {
    staticClass: "equal-desc"
  }, [_vm._v("CO₂ uptake by 1 ammodendron tree")])]), _vm._v(" "), _c('div', {
    staticClass: "equal-item"
  }, [_c('img', {
    attrs: {
      "src": __webpack_require__(230),
      "alt": "electricity"
    }
  }), _vm._v(" "), _c('div', [_vm._v(_vm._s(_vm.multiply((_vm$comEquallist$equa2 = _vm.comEquallist.equallist[1]) === null || _vm$comEquallist$equa2 === void 0 ? void 0 : _vm$comEquallist$equa2.amount, _vm.form.quantity) || 0) + " "), _c('span', [_vm._v("kWh")])]), _vm._v(" "), _c('div', {
    staticClass: "equal-desc"
  }, [_vm._v("Household electricity consumption")])]), _vm._v(" "), _c('div', {
    staticClass: "equal-item"
  }, [_c('img', {
    attrs: {
      "src": __webpack_require__(231),
      "alt": "iphone"
    }
  }), _vm._v(" "), _c('div', [_vm._v(_vm._s(_vm.multiply((_vm$comEquallist$equa3 = _vm.comEquallist.equallist[2]) === null || _vm$comEquallist$equa3 === void 0 ? void 0 : _vm$comEquallist$equa3.amount, _vm.form.quantity) || 0) + " "), _c('span', [_vm._v("day")])]), _vm._v(" "), _c('div', {
    staticClass: "equal-desc"
  }, [_vm._v("The number of days an iPhone is used")])])])])])]), _vm._v(" "), _c('div', {
    staticStyle: {
      "text-align": "right",
      "margin-top": "20px"
    }
  }, [_c('el-button', {
    staticClass: "report-btn",
    attrs: {
      "type": "primary"
    },
    on: {
      "click": function ($event) {
        var _vm$comEquallist;
        return _vm.download((_vm$comEquallist = _vm.comEquallist) === null || _vm$comEquallist === void 0 ? void 0 : _vm$comEquallist.url);
      }
    }
  }, [_vm._v("Download")])], 1)], 1)]);
};
var staticRenderFns = [];

// CONCATENATED MODULE: ./components/FootprintReportDialog.vue?vue&type=template&id=d80d814e&scoped=true

// EXTERNAL MODULE: external "number-precision"
var external_number_precision_ = __webpack_require__(121);

// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/FootprintReportDialog.vue?vue&type=script&lang=js

/* harmony default export */ var FootprintReportDialogvue_type_script_lang_js = ({
  props: {
    visible: {
      type: Boolean,
      default: false
    },
    carbon: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      form: {
        model: '',
        quantity: 1,
        transport: ''
      }
    };
  },
  computed: {
    comEquallist() {
      var _this$carbon$this$for, _this$carbon$this$for2;
      return ((_this$carbon$this$for = this.carbon[this.form.model]) === null || _this$carbon$this$for === void 0 ? void 0 : (_this$carbon$this$for2 = _this$carbon$this$for.accountlist) === null || _this$carbon$this$for2 === void 0 ? void 0 : _this$carbon$this$for2.find(item => item.code === this.form.transport)) || {
        equallist: [],
        emissionTotal: 0
      };
    },
    comEmissionTotal() {
      return this.multiply(this.comEquallist.emissionTotal, this.form.quantity).toFixed(2) || 0;
    }
  },
  methods: {
    handleClose() {
      this.$emit('update:visible', false);
    },
    multiply(a, b) {
      return Object(external_number_precision_["times"])(Number(a), b);
    },
    download(url) {
      if (!url) {
        this.$message.error('No report available for download');
        return;
      }
      var urlStr = url.match('[^/]+(?!.*/)')[0];
      this.$utils.downloadBlob(url, urlStr);
    }
  }
});
// CONCATENATED MODULE: ./components/FootprintReportDialog.vue?vue&type=script&lang=js
 /* harmony default export */ var components_FootprintReportDialogvue_type_script_lang_js = (FootprintReportDialogvue_type_script_lang_js); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);

// CONCATENATED MODULE: ./components/FootprintReportDialog.vue



function injectStyles (context) {
  
  var style0 = __webpack_require__(232)
if (style0.__inject__) style0.__inject__(context)

}

/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  components_FootprintReportDialogvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  injectStyles,
  "d80d814e",
  "fcaa2e62"
  
)

/* harmony default export */ var FootprintReportDialog = __webpack_exports__["default"] = (component.exports);

/***/ })

};;
//# sourceMappingURL=footprint-report-dialog.js.map