(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[101],{

/***/ "./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/main/repo/Versions.vue?vue&type=script&lang=js&":
/*!***************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/main/repo/Versions.vue?vue&type=script&lang=js& ***!
  \***************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_packages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/packages */ \"./src/utils/packages.js\");\n/* harmony import */ var _utils_packageOdata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/packageOdata */ \"./src/utils/packageOdata.js\");\n/* harmony import */ var _utils_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/http */ \"./src/utils/http.js\");\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//\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/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  props: {\n    item: Object\n  },\n  computed: {\n    icon() {\n      return item => {\n        return item.chocoPackage.IconUrl ? item.chocoPackage.IconUrl : \"/box.png\";\n      };\n    },\n    visible() {\n      return this.items.filter(x => x.visible);\n    }\n  },\n  data() {\n    return {\n      show: false,\n      loading: false,\n      items: []\n    };\n  },\n  created() {},\n  methods: {\n    async getPackage(item, otherVersionItem) {\n      this.$emit(\"change\", otherVersionItem);\n      this.show = false;\n    },\n    async getPackageVersions(item, nameAndVersion, force) {\n      if (force || this.items.length === 0) {\n        this.loading = true;\n        const chocoResult = await Object(_utils_http__WEBPACK_IMPORTED_MODULE_2__[\"postApi\"])(\"choco/packages\", {\n          query: _utils_packageOdata__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getPackageSearchString(this.item.chocoPackage.Id, 10, this.items.length),\n          source: item.source\n        });\n        this.items = Object(_utils_packages__WEBPACK_IMPORTED_MODULE_0__[\"orderByVersion\"])([...this.items, ...chocoResult.packages]);\n      }\n      this.showVersions();\n      this.loading = false;\n    },\n    showVersions() {\n      this.show = true;\n      document.addEventListener(\"click\", this.hideVersions);\n    },\n    hideVersions() {\n      this.show = false;\n      document.removeEventListener(\"click\", this.hideVersions);\n    }\n  }\n});\n\n//# sourceURL=webpack:///./src/components/main/repo/Versions.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"60671cf1-vue-loader-template\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/main/repo/Versions.vue?vue&type=template&id=d0d4601c&":
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"60671cf1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/main/repo/Versions.vue?vue&type=template&id=d0d4601c& ***!
  \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _vm.items\n    ? _c(\n        \"div\",\n        {\n          staticClass: \"dropdown\",\n          class: { \"is-active\": _vm.show },\n          attrs: { name: \"version-dropdown\" }\n        },\n        [\n          _c(\"div\", { staticClass: \"dropdown-trigger\" }, [\n            _c(\n              \"a\",\n              {\n                staticClass: \"button is-small smaller no-border\",\n                class: {\n                  \"is-loading\": _vm.loading\n                },\n                attrs: {\n                  \"aria-haspopup\": \"true\",\n                  \"aria-controls\": \"dropdown-menu\"\n                },\n                on: {\n                  click: function($event) {\n                    $event.stopPropagation()\n                    return _vm.getPackageVersions(\n                      _vm.item,\n                      _vm.item.chocoPackage.Version\n                    )\n                  }\n                }\n              },\n              [\n                _c(\"span\", [_vm._v(_vm._s(_vm.item.chocoPackage.Version))]),\n                !_vm.show\n                  ? _c(\"span\", { staticClass: \"icon is-small\" }, [\n                      _c(\"i\", {\n                        staticClass: \"mdi mdi-chevron-down\",\n                        attrs: { \"aria-hidden\": \"true\" }\n                      })\n                    ])\n                  : _vm._e()\n              ]\n            )\n          ]),\n          _c(\n            \"div\",\n            {\n              staticClass: \"dropdown-menu\",\n              attrs: { id: \"dropdown-menu\", role: \"menu\" }\n            },\n            [\n              _c(\n                \"div\",\n                { staticClass: \"dropdown-content\" },\n                [\n                  _vm._l(_vm.items, function(otherVersionItem) {\n                    return _c(\n                      \"a\",\n                      {\n                        key: otherVersionItem.chocoPackage.PackageHash,\n                        staticClass: \"dropdown-item is-small\",\n                        on: {\n                          click: function($event) {\n                            return _vm.getPackage(_vm.item, otherVersionItem)\n                          }\n                        }\n                      },\n                      [_vm._v(_vm._s(otherVersionItem.chocoPackage.Version))]\n                    )\n                  }),\n                  _c(\n                    \"a\",\n                    {\n                      staticClass:\n                        \"dropdown-item has-text-centered has-text-link margin-top-5 is-unselectable\",\n                      attrs: { ignore: \"true\", disabled: _vm.loading },\n                      on: {\n                        click: function($event) {\n                          $event.stopPropagation()\n                          return _vm.getPackageVersions(\n                            _vm.item,\n                            _vm.item.chocoPackage.Version,\n                            true\n                          )\n                        }\n                      }\n                    },\n                    [\n                      _vm._v(\" \" + _vm._s(!_vm.loading ? \"More\" : \"\") + \" \"),\n                      _vm.item\n                        ? _c(\"span\", {\n                            staticClass: \"margin-left\",\n                            class: {\n                              \"spinner small margin\": _vm.loading\n                            }\n                          })\n                        : _vm._e()\n                    ]\n                  )\n                ],\n                2\n              )\n            ]\n          )\n        ]\n      )\n    : _vm._e()\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/components/main/repo/Versions.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2260671cf1-vue-loader-template%22%7D!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./src/components/main/repo/Versions.vue":
/*!***********************************************!*\
  !*** ./src/components/main/repo/Versions.vue ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Versions_vue_vue_type_template_id_d0d4601c___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Versions.vue?vue&type=template&id=d0d4601c& */ \"./src/components/main/repo/Versions.vue?vue&type=template&id=d0d4601c&\");\n/* harmony import */ var _Versions_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Versions.vue?vue&type=script&lang=js& */ \"./src/components/main/repo/Versions.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n  _Versions_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _Versions_vue_vue_type_template_id_d0d4601c___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n  _Versions_vue_vue_type_template_id_d0d4601c___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"src/components/main/repo/Versions.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./src/components/main/repo/Versions.vue?");

/***/ }),

/***/ "./src/components/main/repo/Versions.vue?vue&type=script&lang=js&":
/*!************************************************************************!*\
  !*** ./src/components/main/repo/Versions.vue?vue&type=script&lang=js& ***!
  \************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_ref_12_0_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_Versions_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/babel-loader/lib!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./Versions.vue?vue&type=script&lang=js& */ \"./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/main/repo/Versions.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_cache_loader_dist_cjs_js_ref_12_0_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_Versions_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack:///./src/components/main/repo/Versions.vue?");

/***/ }),

/***/ "./src/components/main/repo/Versions.vue?vue&type=template&id=d0d4601c&":
/*!******************************************************************************!*\
  !*** ./src/components/main/repo/Versions.vue?vue&type=template&id=d0d4601c& ***!
  \******************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_60671cf1_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Versions_vue_vue_type_template_id_d0d4601c___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"60671cf1-vue-loader-template\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./Versions.vue?vue&type=template&id=d0d4601c& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"60671cf1-vue-loader-template\\\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/main/repo/Versions.vue?vue&type=template&id=d0d4601c&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_60671cf1_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Versions_vue_vue_type_template_id_d0d4601c___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_60671cf1_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Versions_vue_vue_type_template_id_d0d4601c___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./src/components/main/repo/Versions.vue?");

/***/ })

}]);