text: (window["webpackJsonp"] = window["webpackJsonp"] || []).push([["js/admin/BusEdit~js/admin/EncyclopediaEdit~js/admin/ItineraryAdd~js/admin/ItineraryEdit~js/admin/cal~4f89a0f8"],{
  
  /***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/admin/components/form/DropdownList.vue?vue&type=script&lang=js&":
  /*!**********************************************************************************************************************************************************************************!*\
    !*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/admin/components/form/DropdownList.vue?vue&type=script&lang=js& ***!
    \**********************************************************************************************************************************************************************************/
  /*! exports provided: default */
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* harmony import */ var _admin_directive_click_away_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/admin/directive/click-away.js */ "./resources/js/admin/directive/click-away.js");
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  
  /* harmony default export */ __webpack_exports__["default"] = ({
    name: "DropDownFilter",
    props: {
      itemList: {
        type: Array,
        required: true
      },
      value: {},
      placeholder: {
        type: String,
        "default": "Enter name to search"
      }
    },
    data: function data() {
      return {
        selectedItem: {},
        arrowCounter: 0,
        inputValue: "",
        apiLoaded: false,
        showlist: false,
        edit_flag: false,
        content: this.value
      };
    },
    watch: {
      itemList: function itemList() {
        if (this.itemList.length > 0) {
          this.getSelected(this.content);
        }
      }
    },
    created: function created() {
      if (this.value) {
        this.getSelected(this.value);
      }
  
      document.addEventListener("keyup", this.nextItem);
    },
    methods: {
      nextItem: function nextItem(event) {
        event.preventDefault();
  
        if (event.keyCode == 38 && this.arrowCounter > 1) {
          this.arrowCounter--;
          this.fixScrolling();
        } else if (event.keyCode == 40 && this.arrowCounter < this.itemList.length - 1) {
          this.arrowCounter++;
          this.fixScrolling();
        }
      },
      fixScrolling: function fixScrolling() {
        if (this.showlist) {
          if (this.$refs.options[this.arrowCounter]) {
            var liH = this.$refs.options[this.arrowCounter].clientHeight;
          }
  
          if (this.$refs.scrollContainer) {
            this.$refs.scrollContainer.scrollTop = liH * this.arrowCounter;
          }
        }
      },
      closeEvent: function closeEvent() {
        if (this.showlist) {
          this.edit_flag = false;
          this.getSelected(this.content);
          this.showlist = false;
          this.arrowCounter = 0;
        }
      },
      getSelected: function getSelected(value) {
        if (this.itemList != undefined && this.edit_flag == false) {
          for (var i = 0; i < this.itemList.length; i++) {
            if (this.itemList[i].id == value) {
              this.selectedItem = this.itemList[i];
              this.inputValue = this.itemList[i].name;
              this.edit_flag = true;
            }
          }
        }
      },
      showToggle: function showToggle() {
        this.showlist = !this.showlist;
      },
      optionChanged: function optionChanged() {
        this.$emit("input", this.selectedItem.id);
      },
      resetSelection: function resetSelection() {
        var _this = this;
  
        this.selectedItem = {};
        this.inputValue = "";
        this.showlist = true;
        this.$nextTick(function () {
          return _this.$refs.dropdowninput.focus();
        });
        this.$emit("on-item-reset");
      },
      remodeReadOnlyError: function remodeReadOnlyError() {
        $(".dropdown-input").attr("readonly", false);
      },
      selectItem: function selectItem(theItem) {
        this.selectedItem = theItem;
        this.content = theItem.id;
        this.$emit("input", this.content);
        this.inputValue = "";
        this.showlist = false;
        this.$emit("change", theItem.id);
      },
      itemVisible: function itemVisible(item) {
        var currentName = item.name.toLowerCase();
        var currentInput = this.inputValue.toLowerCase();
        return currentName.includes(currentInput);
      }
    },
    destroyed: function destroyed() {
      document.removeEventListener("keyup", this.nextItem);
    }
  });
  
  /***/ }),
  
  /***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/admin/components/form/DropdownList.vue?vue&type=template&id=6c5ef25f&":
  /*!**************************************************************************************************************************************************************************************************************************!*\
    !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/admin/components/form/DropdownList.vue?vue&type=template&id=6c5ef25f& ***!
    \**************************************************************************************************************************************************************************************************************************/
  /*! exports provided: render, staticRenderFns */
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
  var render = function() {
    var _vm = this
    var _h = _vm.$createElement
    var _c = _vm._self._c || _h
    return _vm.itemList
      ? _c(
          "div",
          {
            directives: [
              {
                name: "click-outside",
                rawName: "v-click-outside",
                value: _vm.closeEvent,
                expression: "closeEvent"
              }
            ],
            staticClass: "dropdown-field"
          },
          [
            Object.keys(_vm.selectedItem).length === 0
              ? _c("input", {
                  directives: [
                    {
                      name: "model",
                      rawName: "v-model.trim",
                      value: _vm.inputValue,
                      expression: "inputValue",
                      modifiers: { trim: true }
                    }
                  ],
                  ref: "dropdowninput",
                  staticClass: "form-control dropdown-input",
                  attrs: {
                    type: "text",
                    placeholder: _vm.placeholder,
                    autocomplete: "off"
                  },
                  domProps: { value: _vm.inputValue },
                  on: {
                    focus: function($event) {
                      _vm.showlist = true
                    },
                    click: function($event) {
                      return _vm.remodeReadOnlyError()
                    },
                    input: function($event) {
                      if ($event.target.composing) {
                        return
                      }
                      _vm.inputValue = $event.target.value.trim()
                    },
                    blur: function($event) {
                      return _vm.$forceUpdate()
                    }
                  }
                })
              : _c(
                  "div",
                  {
                    staticClass: "dropdown-selected",
                    on: { click: _vm.resetSelection }
                  },
                  [_vm._v("\n    " + _vm._s(_vm.selectedItem.name) + "\n  ")]
                ),
            _vm._v(" "),
            _c("i", {
              staticClass: "fas fa-caret-down",
              on: {
                click: function($event) {
                  return _vm.showToggle()
                }
              }
            }),
            _vm._v(" "),
            _vm.showlist == true
              ? _c(
                  "div",
                  { staticClass: "dropdown-list", on: { keyup: _vm.nextItem } },
                  [
                    _c(
                      "ul",
                      { ref: "scrollContainer" },
                      _vm._l(_vm.itemList, function(item, index) {
                        return _c(
                          "li",
                          {
                            directives: [
                              {
                                name: "show",
                                rawName: "v-show",
                                value: _vm.itemVisible(item),
                                expression: "itemVisible(item)"
                              }
                            ],
                            key: item.id,
                            ref: "options",
                            refInFor: true,
                            staticClass: "dropdown-item",
                            class: { "active-item": _vm.arrowCounter === index },
                            on: {
                              click: function($event) {
                                return _vm.selectItem(item)
                              },
                              keydown: [
                                function($event) {
                                  if (
                                    !$event.type.indexOf("key") &&
                                    _vm._k(
                                      $event.keyCode,
                                      "enter",
                                      13,
                                      $event.key,
                                      "Enter"
                                    )
                                  ) {
                                    return null
                                  }
                                  return _vm.selectItem(
                                    _vm.matches[_vm.arrowCounter]
                                  )
                                },
                                function($event) {
                                  if (
                                    !$event.type.indexOf("key") &&
                                    _vm._k(
                                      $event.keyCode,
                                      "esc",
                                      27,
                                      $event.key,
                                      ["Esc", "Escape"]
                                    )
                                  ) {
                                    return null
                                  }
                                  _vm.showlist = false
                                }
                              ]
                            }
                          },
                          [
                            _c("label", [
                              _c("input", {
                                staticClass: "d-none",
                                attrs: { type: "checkbox" },
                                domProps: { value: item.id }
                              }),
                              _vm._v(_vm._s(item.name))
                            ])
                          ]
                        )
                      }),
                      0
                    )
                  ]
                )
              : _vm._e()
          ]
        )
      : _vm._e()
  }
  var staticRenderFns = []
  render._withStripped = true
  
  
  
  /***/ }),
  
  /***/ "./resources/js/admin/components/form/DropdownList.vue":
  /*!*************************************************************!*\
    !*** ./resources/js/admin/components/form/DropdownList.vue ***!
    \*************************************************************/
  /*! exports provided: default */
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* harmony import */ var _DropdownList_vue_vue_type_template_id_6c5ef25f___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DropdownList.vue?vue&type=template&id=6c5ef25f& */ "./resources/js/admin/components/form/DropdownList.vue?vue&type=template&id=6c5ef25f&");
  /* harmony import */ var _DropdownList_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DropdownList.vue?vue&type=script&lang=js& */ "./resources/js/admin/components/form/DropdownList.vue?vue&type=script&lang=js&");
  /* 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");
  
  
  
  
  
  /* normalize component */
  
  var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
    _DropdownList_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
    _DropdownList_vue_vue_type_template_id_6c5ef25f___WEBPACK_IMPORTED_MODULE_0__["render"],
    _DropdownList_vue_vue_type_template_id_6c5ef25f___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
    false,
    null,
    null,
    null
    
  )
  
  /* hot reload */
  if (false) { var api; }
  component.options.__file = "resources/js/admin/components/form/DropdownList.vue"
  /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  
  /***/ }),
  
  /***/ "./resources/js/admin/components/form/DropdownList.vue?vue&type=script&lang=js&":
  /*!**************************************************************************************!*\
    !*** ./resources/js/admin/components/form/DropdownList.vue?vue&type=script&lang=js& ***!
    \**************************************************************************************/
  /*! exports provided: default */
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* harmony import */ var _node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_DropdownList_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/babel-loader/lib??ref--4-0!../../../../../node_modules/vue-loader/lib??vue-loader-options!./DropdownList.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/admin/components/form/DropdownList.vue?vue&type=script&lang=js&");
  /* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_DropdownList_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); 
  
  /***/ }),
  
  /***/ "./resources/js/admin/components/form/DropdownList.vue?vue&type=template&id=6c5ef25f&":
  /*!********************************************************************************************!*\
    !*** ./resources/js/admin/components/form/DropdownList.vue?vue&type=template&id=6c5ef25f& ***!
    \********************************************************************************************/
  /*! exports provided: render, staticRenderFns */
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_DropdownList_vue_vue_type_template_id_6c5ef25f___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../node_modules/vue-loader/lib??vue-loader-options!./DropdownList.vue?vue&type=template&id=6c5ef25f& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/admin/components/form/DropdownList.vue?vue&type=template&id=6c5ef25f&");
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_DropdownList_vue_vue_type_template_id_6c5ef25f___WEBPACK_IMPORTED_MODULE_0__["render"]; });
  
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_DropdownList_vue_vue_type_template_id_6c5ef25f___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
  
  
  
  /***/ }),
  
  /***/ "./resources/js/admin/directive/click-away.js":
  /*!****************************************************!*\
    !*** ./resources/js/admin/directive/click-away.js ***!
    \****************************************************/
  /*! no exports provided */
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.common.js");
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
  
  vue__WEBPACK_IMPORTED_MODULE_0___default.a.directive('click-outside', {
    bind: function bind(el, binding, vnode) {
      window.event = function (event) {
        if (!(el == event.target || el.contains(event.target))) {
          vnode.context[binding.expression](event);
        }
      };
  
      document.body.addEventListener('click', window.event);
    },
    unbind: function unbind(el) {
      document.body.removeEventListener('click', window.event);
    }
  });
  
  /***/ })
  
  }]);