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

/***/ "./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/packages/Switches.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/packages/Switches.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_mdc__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/mdc */ \"./src/utils/mdc.js\");\n/* harmony import */ var _utils_packages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/packages */ \"./src/utils/packages.js\");\n/* harmony import */ var _utils_packageStatus__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/packageStatus */ \"./src/utils/packageStatus.js\");\n/* harmony import */ var _utils_groupPackageStatus__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/groupPackageStatus */ \"./src/utils/groupPackageStatus.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/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  components: {\n    CheckboxText: () => __webpack_require__.e(/*! import() */ 5).then(__webpack_require__.bind(null, /*! @/components/singles/CheckboxText.vue */ \"./src/components/singles/CheckboxText.vue\"))\n  },\n  props: {\n    item: Object,\n    isGroup: Boolean\n  },\n  computed: {\n    store() {\n      if (this.isGroup) return \"groupPackage\";else return \"computerPackage\";\n    },\n    hasParam() {\n      return (params, param) => {\n        return Object(_utils_mdc__WEBPACK_IMPORTED_MODULE_0__[\"hasParam\"])(params, param);\n      };\n    },\n    isGroupAutoUpgrade() {\n      return _utils_groupPackageStatus__WEBPACK_IMPORTED_MODULE_3__[\"default\"].isTempAutoUpgrade(this.item);\n    },\n    installable() {\n      return _utils_packageStatus__WEBPACK_IMPORTED_MODULE_2__[\"default\"].isInstallable(this.item);\n    },\n    uninstallable() {\n      return _utils_packageStatus__WEBPACK_IMPORTED_MODULE_2__[\"default\"].isUninstallable(this.item);\n    }\n  },\n  methods: {\n    addRunAsUser(item) {\n      this.$store.commit(`${this.store}/editMergedPackage`, {\n        p: this.item,\n        obj: {\n          tempCommand: {\n            ...item.tempCommand,\n            execAsUser: !item.tempCommand.execAsUser\n          }\n        }\n      });\n    },\n    addOverride(item) {\n      this.$store.commit(`${this.store}/editMergedPackage`, {\n        p: this.item,\n        obj: {\n          tempCommand: {\n            ...item.tempCommand,\n            override: !item.tempCommand.override\n          }\n        }\n      });\n    },\n    addTempParam(item, param) {\n      const newParams = Object(_utils_packages__WEBPACK_IMPORTED_MODULE_1__[\"addTempParam\"])(item.tempCommand.parameters, param);\n      this.$store.commit(`${this.store}/editMergedPackage`, {\n        p: this.item,\n        obj: {\n          tempCommand: {\n            ...item.tempCommand,\n            parameters: newParams\n          }\n        }\n      });\n    },\n    setStreamLog(item, param) {\n      this.$store.commit(`${this.store}/editMergedPackage`, {\n        p: this.item,\n        obj: {\n          tempCommand: {\n            ...item.tempCommand,\n            streamLog: !item.tempCommand.streamLog\n          }\n        }\n      });\n    }\n  }\n});\n\n//# sourceURL=webpack:///./src/components/main/packages/Switches.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\":\"7d40fa80-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/packages/Switches.vue?vue&type=template&id=e40bfbc4&":
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7d40fa80-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/packages/Switches.vue?vue&type=template&id=e40bfbc4& ***!
  \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! 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 _c(\"div\", { staticClass: \"box\" }, [\n    _c(\"h2\", { staticClass: \"title is-5 is-unselectable\" }, [\n      _vm._v(\" Options/switches \")\n    ]),\n    _c(\n      \"div\",\n      { staticClass: \"extrapadding\" },\n      [\n        (!_vm.isGroup && _vm.installable) ||\n        (_vm.isGroup && !_vm.isGroupAutoUpgrade)\n          ? _c(\n              \"CheckboxText\",\n              {\n                attrs: {\n                  checked: _vm.hasParam(_vm.item.tempCommand.parameters, \"-m\"),\n                  tooltip: \"Allows multiple versions of a package\",\n                  tooltipCss: \"has-tooltip-right\"\n                },\n                on: {\n                  click: function($event) {\n                    return _vm.addTempParam(_vm.item, \"-m\")\n                  }\n                }\n              },\n              [_vm._v(\"Multiple versions (-m)\")]\n            )\n          : _vm._e(),\n        _c(\n          \"CheckboxText\",\n          {\n            attrs: {\n              checked: _vm.hasParam(_vm.item.tempCommand.parameters, \"-n\"),\n              tooltip: \"Only adds/remove the package\",\n              tooltipCss: \"has-tooltip-right\"\n            },\n            on: {\n              click: function($event) {\n                return _vm.addTempParam(_vm.item, \"-n\")\n              }\n            }\n          },\n          [_vm._v(\"Add/remove package only (-n)\")]\n        ),\n        _c(\n          \"CheckboxText\",\n          {\n            attrs: { checked: _vm.item.tempCommand.execAsUser },\n            on: {\n              click: function($event) {\n                return _vm.addRunAsUser(_vm.item)\n              }\n            }\n          },\n          [\n            _c(\n              \"span\",\n              {\n                attrs: {\n                  \"data-tooltip\":\n                    \"Run command as logged on (administrator) user\",\n                  tooltipCss: \"has-tooltip-right\"\n                }\n              },\n              [_vm._v(\"Run as logged on user\")]\n            )\n          ]\n        ),\n        !_vm.isGroup\n          ? _c(\n              \"CheckboxText\",\n              {\n                attrs: { checked: _vm.item.tempCommand.streamLog },\n                on: {\n                  click: function($event) {\n                    return _vm.setStreamLog(_vm.item)\n                  }\n                }\n              },\n              [\n                _c(\n                  \"span\",\n                  {\n                    attrs: {\n                      \"data-tooltip\": \"Command log updates in real-time\",\n                      tooltipCss: \"has-tooltip-right\"\n                    }\n                  },\n                  [_vm._v(\"Stream log\")]\n                )\n              ]\n            )\n          : _vm._e()\n      ],\n      1\n    )\n  ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/components/main/packages/Switches.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%227d40fa80-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/packages/Switches.vue":
/*!***************************************************!*\
  !*** ./src/components/main/packages/Switches.vue ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Switches_vue_vue_type_template_id_e40bfbc4___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Switches.vue?vue&type=template&id=e40bfbc4& */ \"./src/components/main/packages/Switches.vue?vue&type=template&id=e40bfbc4&\");\n/* harmony import */ var _Switches_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Switches.vue?vue&type=script&lang=js& */ \"./src/components/main/packages/Switches.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  _Switches_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _Switches_vue_vue_type_template_id_e40bfbc4___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n  _Switches_vue_vue_type_template_id_e40bfbc4___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/packages/Switches.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./src/components/main/packages/Switches.vue?");

/***/ }),

/***/ "./src/components/main/packages/Switches.vue?vue&type=script&lang=js&":
/*!****************************************************************************!*\
  !*** ./src/components/main/packages/Switches.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_Switches_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!./Switches.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/packages/Switches.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_Switches_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack:///./src/components/main/packages/Switches.vue?");

/***/ }),

/***/ "./src/components/main/packages/Switches.vue?vue&type=template&id=e40bfbc4&":
/*!**********************************************************************************!*\
  !*** ./src/components/main/packages/Switches.vue?vue&type=template&id=e40bfbc4& ***!
  \**********************************************************************************/
/*! 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_7d40fa80_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_Switches_vue_vue_type_template_id_e40bfbc4___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"7d40fa80-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!./Switches.vue?vue&type=template&id=e40bfbc4& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"7d40fa80-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/packages/Switches.vue?vue&type=template&id=e40bfbc4&\");\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_7d40fa80_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_Switches_vue_vue_type_template_id_e40bfbc4___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_7d40fa80_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_Switches_vue_vue_type_template_id_e40bfbc4___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./src/components/main/packages/Switches.vue?");

/***/ }),

/***/ "./src/utils/groupPackageStatus.js":
/*!*****************************************!*\
  !*** ./src/utils/groupPackageStatus.js ***!
  \*****************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/store */ \"./src/store/index.js\");\n/* harmony import */ var _packages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./packages */ \"./src/utils/packages.js\");\n/* harmony import */ var _mdc__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mdc */ \"./src/utils/mdc.js\");\n/* harmony import */ var _utils_packageDate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/packageDate */ \"./src/utils/packageDate.js\");\n\n\n\n\nfunction hasValidSchedule(item) {\n  return Object(_utils_packageDate__WEBPACK_IMPORTED_MODULE_3__[\"isScheduleValid\"])(Object(_utils_packageDate__WEBPACK_IMPORTED_MODULE_3__[\"objectifySchedule\"])(item.schedule));\n}\nfunction hasAutoUpgrade(item) {\n  const packages = _store__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getters[\"groupPackage/packageGroup\"]({\n    p: item,\n    filter: x => isAutoUpgrade(x)\n  });\n  return packages.length !== 0;\n}\nfunction isAutoUpgrade(item) {\n  return Object(_utils_packageDate__WEBPACK_IMPORTED_MODULE_3__[\"isScheduleValid\"])(Object(_utils_packageDate__WEBPACK_IMPORTED_MODULE_3__[\"objectifySchedule\"])(item.schedule)) && item.schedule.type === 1;\n}\nfunction isTempAutoUpgrade(item) {\n  return Object(_utils_packageDate__WEBPACK_IMPORTED_MODULE_3__[\"isScheduleValid\"])(Object(_utils_packageDate__WEBPACK_IMPORTED_MODULE_3__[\"objectifySchedule\"])(item.tempSchedule)) && item.tempSchedule.type === 1;\n}\nfunction isHigherVersionInstalled(item) {\n  const packages = _store__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getters[\"groupPackage/packageGroup\"]({\n    p: item,\n    filter: x => isInstallOrUpgrade(x)\n  });\n  if (packages.length !== 0) {\n    const p1NV = Object(_mdc__WEBPACK_IMPORTED_MODULE_2__[\"getPackageNameVersionAndHash\"])(packages[0]);\n    const p2NV = Object(_mdc__WEBPACK_IMPORTED_MODULE_2__[\"getPackageNameVersionAndHash\"])(item);\n    return Object(_packages__WEBPACK_IMPORTED_MODULE_1__[\"compareVersions\"])(p1NV.version, p2NV.version) > 0;\n  }\n  return false;\n}\nfunction hasMultipleVersions(item) {\n  const packages = _store__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getters[\"groupPackage/packageGroup\"]({\n    p: item,\n    filter: x => isInstallOrUpgrade(x) && !Object(_mdc__WEBPACK_IMPORTED_MODULE_2__[\"isSamePackage\"])(x, item)\n  });\n  return packages.length !== 0;\n}\nfunction isUpgradable(item) {\n  if (!hasAutoUpgrade(item)) {\n    const packages = _store__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getters[\"groupPackage/packageGroup\"]({\n      p: item,\n      filter: x => isInstallOrUpgrade(x) && x.command.name && !Object(_mdc__WEBPACK_IMPORTED_MODULE_2__[\"isSamePackage\"])(item, x)\n    });\n    if (packages.length === 0) return true;else return !hasMultipleVersions(item) && Object(_packages__WEBPACK_IMPORTED_MODULE_1__[\"upgradable\"])(packages, item);\n  }\n  return false;\n}\nfunction isInstallOrUpgrade(item) {\n  return item.command.name && item.command.name !== \"uninstall\";\n}\nfunction isInstallable(item) {\n  return !item.command.name || item.command && item.command.name == \"uninstall\";\n}\nfunction isUninstallable(item) {\n  return !item.command.name || item.command && item.command.name != \"uninstall\";\n}\nfunction isInstall(item) {\n  return item.command.name === \"install\";\n}\nfunction isUninstall(item) {\n  return item.command.name === \"uninstall\";\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  isUpgradable,\n  hasMultipleVersions,\n  isHigherVersionInstalled,\n  isAutoUpgrade,\n  hasAutoUpgrade,\n  hasValidSchedule,\n  isInstall,\n  isUninstall,\n  isInstallable,\n  isUninstallable,\n  isTempAutoUpgrade\n});\n\n//# sourceURL=webpack:///./src/utils/groupPackageStatus.js?");

/***/ })

}]);