exports.ids = [37,38,39];
exports.modules = {

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

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(129);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add CSS to SSR context
var add = __webpack_require__(6).default
module.exports.__inject__ = function (context) {
  add("ac43ed1c", content, true, context)
};

/***/ }),

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

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

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/pug-plain-loader??ref--1-oneOf-0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/event/embedEvent.vue?vue&type=template&id=25af38f4&lang=pug&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-card',[_c('v-card-title',{domProps:{"textContent":_vm._s(_vm.$t('common.embed_title'))}}),_c('v-card-text',[_c('v-alert',{staticClass:"mb-3 mt-1",attrs:{"type":"info","show-icon":""}},[_vm._v(_vm._s(_vm.$t('common.embed_help')))]),_c('v-alert',{staticClass:"pa-5 my-4 blue-grey darken-4 text-body-1 lime--text text--lighten-3"},[_c('pre',[_vm._v(_vm._s(_vm.code))]),_c('v-btn',{staticClass:"float-end",attrs:{"text":"","color":"primary"},on:{"click":function($event){return _vm.clipboard(_vm.code)}}},[_vm._v(_vm._s(_vm.$t("common.copy"))),_c('v-icon',{staticClass:"ml-1"},[_vm._v("mdi-content-copy")])],1)],1),_c('p',{staticClass:"mx-auto"}),_c('div',{staticClass:"mx-auto"},[_c('gancio-event',{attrs:{"id":_vm.event.id,"baseurl":_vm.settings.baseurl}})],1),_c('p')],1),_c('v-card-actions',[_c('v-spacer'),_c('v-btn',{attrs:{"text":"","color":"warning"},on:{"click":function($event){return _vm.$emit('close')}}},[_vm._v(_vm._s(_vm.$t("common.cancel")))]),_c('v-btn',{attrs:{"text":"","color":"primary"},on:{"click":function($event){return _vm.clipboard(_vm.code)}}},[_vm._v(_vm._s(_vm.$t("common.copy")))])],1)],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./pages/event/embedEvent.vue?vue&type=template&id=25af38f4&lang=pug&

// EXTERNAL MODULE: external "vuex"
var external_vuex_ = __webpack_require__(3);

// EXTERNAL MODULE: ./assets/clipboard.js
var clipboard = __webpack_require__(14);

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--2-0!./node_modules/babel-loader/lib??ref--2-1!./node_modules/vue-loader/lib??vue-loader-options!./pages/event/embedEvent.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


/* harmony default export */ var embedEventvue_type_script_lang_js_ = ({
  name: 'EmbedEvent',
  mixins: [clipboard["a" /* default */]],
  props: {
    event: {
      type: Object,
      default: () => ({})
    }
  },
  computed: { ...Object(external_vuex_["mapState"])(['settings']),

    code() {
      return `<script src='${this.settings.baseurl}\/gancio-events.es.js'><\/script>\n<gancio-event baseurl='${this.settings.baseurl}' id=${this.event.id}></gancio-event>\n\n`;
    }

  }
});
// CONCATENATED MODULE: ./pages/event/embedEvent.vue?vue&type=script&lang=js&
 /* harmony default export */ var event_embedEventvue_type_script_lang_js_ = (embedEventvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(1);

// CONCATENATED MODULE: ./pages/event/embedEvent.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  event_embedEventvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  "d230370c"
  
)

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

/***/ }),

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

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

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/pug-plain-loader??ref--1-oneOf-0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/event/eventAdmin.vue?vue&type=template&id=0fb969f7&lang=pug&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.event.is_visible)?_c('v-btn',{attrs:{"text":"","color":"primary"},on:{"click":function($event){return _vm.toggle(false)}}},[_vm._v(_vm._s(_vm.$t(("common." + (_vm.event.parentId?'skip':'hide')))))]):_c('v-btn',{attrs:{"text":"","color":"success"},on:{"click":function($event){return _vm.toggle(false)}}},[_c('v-icon',{attrs:{"color":"yellow"}},[_vm._v("mdi-alert")]),_vm._v(" "+_vm._s(_vm.$t('common.confirm')))],1),_c('v-btn',{attrs:{"text":"","color":"primary"},on:{"click":function($event){return _vm.$router.push(("/add/" + (_vm.event.id)))}}},[_vm._v(_vm._s(_vm.$t('common.edit')))]),(!_vm.event.parentId)?_c('v-btn',{attrs:{"text":"","color":"primary"},on:{"click":function($event){return _vm.remove(false)}}},[_vm._v(_vm._s(_vm.$t('common.remove')))]):_vm._e(),(_vm.event.parentId)?[_c('v-divider'),_vm._ssrNode("<span class=\"mr-1\">","</span>",[_c('v-icon',[_vm._v("mdi-repeat")]),_vm._ssrNode(_vm._ssrEscape(" "+_vm._s(_vm.$t('event.edit_recurrent'))))],2),(_vm.event.parent.is_visible)?_c('v-btn',{attrs:{"text":"","color":"primary"},on:{"click":function($event){return _vm.toggle(true)}}},[_vm._v(_vm._s(_vm.$t('common.pause')))]):_c('v-btn',{attrs:{"text":"","color":"primary"},on:{"click":function($event){return _vm.toggle(true)}}},[_vm._v(_vm._s(_vm.$t('common.start')))]),_c('v-btn',{attrs:{"text":"","color":"primary"},on:{"click":function($event){return _vm.$router.push(("/add/" + (_vm.event.parentId)))}}},[_vm._v(_vm._s(_vm.$t('common.edit')))]),_c('v-btn',{attrs:{"text":"","color":"primary"},on:{"click":function($event){return _vm.remove(true)}}},[_vm._v(_vm._s(_vm.$t('common.remove')))])]:_vm._e()],2)}
var staticRenderFns = []


// CONCATENATED MODULE: ./pages/event/eventAdmin.vue?vue&type=template&id=0fb969f7&lang=pug&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--2-0!./node_modules/babel-loader/lib??ref--2-1!./node_modules/vue-loader/lib??vue-loader-options!./pages/event/eventAdmin.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var eventAdminvue_type_script_lang_js_ = ({
  name: 'EventAdmin',
  props: {
    event: {
      type: Object,
      default: () => ({})
    }
  },
  methods: {
    async remove(parent = false) {
      const ret = await this.$root.$confirm(`event.remove_${parent ? 'recurrent_' : ''}confirmation`);

      if (!ret) {
        return;
      }

      const id = parent ? this.event.parentId : this.event.id;
      await this.$axios.delete(`/event/${id}`);
      this.$router.replace('/');
    },

    async toggle(parent = false) {
      const id = parent ? this.event.parentId : this.event.id;
      const is_visible = parent ? this.event.parent.is_visible : this.event.is_visible;
      const method = is_visible ? 'unconfirm' : 'confirm';

      try {
        await this.$axios.$put(`/event/${method}/${id}`);

        if (parent) {
          this.event.parent.is_visible = !is_visible;
        } else {
          this.event.is_visible = !is_visible;
        }
      } catch (e) {
        console.error(e);
      }
    }

  }
});
// CONCATENATED MODULE: ./pages/event/eventAdmin.vue?vue&type=script&lang=js&
 /* harmony default export */ var event_eventAdminvue_type_script_lang_js_ = (eventAdminvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(1);

// CONCATENATED MODULE: ./pages/event/eventAdmin.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  event_eventAdminvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  "deb0cfe4"
  
)

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

/***/ }),

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

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


/***/ }),

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

// Imports
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(5);
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
// Module
___CSS_LOADER_EXPORT___.push([module.i, ".main_image[data-v-014479ac]{margin:0 auto;border-radius:5px;transition:max-height .2s}", ""]);
// Exports
module.exports = ___CSS_LOADER_EXPORT___;


/***/ }),

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

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

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/pug-plain-loader??ref--1-oneOf-0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/event/_slug.vue?vue&type=template&id=014479ac&scoped=true&lang=pug&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-container',{staticClass:"pa-0 pa-sm-2",attrs:{"id":"event"}},[_c('v-card',{staticClass:"h-event",attrs:{"itemscope":"","itemtype":"https://schema.org/Event"}},[_c('v-card-actions',[(_vm.is_mine)?_c('EventAdmin',{staticClass:"mb-1",attrs:{"event":_vm.event}}):_vm._e()],1),_c('v-card-text',[_c('v-row',[_c('v-col',{staticClass:"col-12 col-lg-8"},[(_vm.hasMedia)?_c('img',{directives:[{name:"show",rawName:"v-show",value:(false),expression:"false"}],staticClass:"u-featured",attrs:{"src":_vm._f("mediaURL")(_vm.event),"itemprop":"image"}}):_vm._e(),(_vm.hasMedia)?_c('v-img',{staticClass:"main_image mb-3",attrs:{"contain":"","alt":_vm._f("mediaURL")(_vm.event,"alt"),"src":_vm._f("mediaURL")(_vm.event),"lazy-src":_vm._f("mediaURL")(_vm.event,"thumb")}}):_vm._e(),(!_vm.hasMedia && _vm.event.description)?_c('div',{staticClass:"p-description text-body-1 pa-3 rounded",attrs:{"itemprop":"description"},domProps:{"innerHTML":_vm._s(_vm.event.description)}}):_vm._e()],1),_c('v-col',{staticClass:"col-12 col-lg-4"},[_c('v-card',[_c('v-card-text',[(_vm.event.parentId)?_c('v-icon',{staticClass:"float-right",attrs:{"color":"success"}},[_vm._v("mdi-repeat")]):_vm._e(),_c('div',{staticClass:"title text-h5"},[_c('b',{staticClass:"p-name",attrs:{"itemprop":"name"}},[_vm._v(_vm._s(_vm.event.title))])]),_c('time',{staticClass:"dt-start text-h6",attrs:{"datetime":_vm._f("unixFormat")(_vm.event.start_datetime,"YYYY-MM-DD HH:mm"),"itemprop":"startDate","content":_vm._f("unixFormat")(_vm.event.start_datetime,'YYYY-MM-DDTHH:mm')}},[_c('v-icon',[_vm._v("mdi-calendar")]),_c('b',{staticClass:"ml-2"},[_vm._v(_vm._s(_vm._f("when")(_vm.event)))])],1),_c('div',{staticClass:"text-subtitle-1"},[_vm._v(_vm._s(_vm._f("from")(_vm.event.start_datetime))),(_vm.event.parentId)?_c('small',[_vm._v(" ("+_vm._s(_vm._f("recurrentDetail")(_vm.event))+")")]):_vm._e()]),_c('div',{staticClass:"text-h6 p-location",attrs:{"itemprop":"location","itemscope":"","itemtype":"https://schema.org/Place"}},[_c('v-icon',[_vm._v("mdi-map-marker")]),_c('b',{staticClass:"vcard ml-2",attrs:{"itemprop":"name"}},[_vm._v(_vm._s(_vm.event.place && _vm.event.place.name))]),_c('div',{staticClass:"text-subtitle-1 adr",attrs:{"itemprop":"address"}},[_vm._v(_vm._s(_vm.event.place && _vm.event.place.address))])],1)],1),(_vm.event.tags.length)?_c('v-card-text',_vm._l((_vm.event.tags),function(tag){return _c('v-chip',{key:tag,staticClass:"p-category ml-1 mt-3",attrs:{"color":"primary","outlined":""}},[_c('span',{domProps:{"textContent":_vm._s(tag)}})])}),1):_vm._e(),_c('v-toolbar',[_c('v-tooltip',{attrs:{"bottom":""},scopedSlots:_vm._u([{key:"activator",fn:function(ref ){
var on = ref.on;
var attrs = ref.attrs;
return [_c('v-btn',_vm._g({staticClass:"ml-2",attrs:{"large":"","icon":"","color":"primary"},on:{"click":function($event){return _vm.clipboard(((_vm.settings.baseurl) + "/event/" + (_vm.event.slug || _vm.event.id)))}}},on),[_c('v-icon',[_vm._v("mdi-content-copy")])],1)]}}])},[_vm._v(_vm._s(_vm.$t('common.copy_link')))]),_c('v-tooltip',{attrs:{"bottom":""},scopedSlots:_vm._u([{key:"activator",fn:function(ref ){
var on = ref.on;
var attrs = ref.attrs;
return [_c('v-btn',_vm._g({staticClass:"ml-2",attrs:{"large":"","icon":"","color":"primary"},on:{"click":function($event){_vm.showEmbed=true}}},on),[_c('v-icon',[_vm._v("mdi-code-tags")])],1)]}}])},[_vm._v(_vm._s(_vm.$t('common.embed')))]),_c('v-tooltip',{attrs:{"bottom":""},scopedSlots:_vm._u([{key:"activator",fn:function(ref ){
var on = ref.on;
var attrs = ref.attrs;
return [_c('v-btn',_vm._g({staticClass:"ml-2",attrs:{"large":"","icon":"","color":"primary","href":("/api/event/" + (_vm.event.slug || _vm.event.id) + ".ics")}},on),[_c('v-icon',[_vm._v("mdi-calendar-export")])],1)]}}])},[_vm._v(_vm._s(_vm.$t('common.add_to_calendar')))])],1)],1)],1)],1),(_vm.hasMedia && _vm.event.description)?_c('div',{staticClass:"p-description text-body-1 pa-3 rounded",attrs:{"itemprop":"description"},domProps:{"innerHTML":_vm._s(_vm.event.description)}}):_vm._e(),(_vm.settings.enable_federation)?_c('div',{staticClass:"mt-1",attrs:{"id":"resources"}},[_c('v-dialog',{attrs:{"fullscreen":"","destroy-on-close":"","scrollable":"","transition":"dialog-bottom-transition"},model:{value:(_vm.showResources),callback:function ($$v) {_vm.showResources=$$v},expression:"showResources"}},[_c('v-card',[_c('v-btn',{staticClass:"ma-2",attrs:{"icon":"","dark":""},on:{"click":function($event){_vm.showResources = false}}},[_c('v-icon',[_vm._v("mdi-close")])],1),_c('v-carousel',{ref:"carousel",staticClass:"pa-5",attrs:{"interval":10000,"hide-delimiters":"","height":"100%","show-arrows-on-over":""},model:{value:(_vm.currentAttachment),callback:function ($$v) {_vm.currentAttachment=$$v},expression:"currentAttachment"}},_vm._l((_vm.selectedResource.data.attachment),function(attachment){return (_vm.isImg(attachment))?_c('v-carousel-item',{key:attachment.url},[_c('v-img',{attrs:{"src":attachment.url,"contain":"","max-width":"100%","max-height":"100%"}})],1):_vm._e()}),1),_c('v-card-actions',{staticClass:"align-center justify-center"},[_c('span',[_vm._v(_vm._s(_vm.currentAttachmentLabel))])])],1)],1),_vm._l((_vm.event.resources),function(resource){return (_vm.settings.enable_resources)?_c('v-card',{key:resource.id,staticClass:"grey darken-4 mb-3",class:{disabled: resource.hidden},attrs:{"id":"resources","elevation":"10","outlined":""}},[_c('v-card-title',[(_vm.$auth.user && _vm.$auth.user.is_admin)?_c('v-menu',{attrs:{"offset-y":""},scopedSlots:_vm._u([{key:"activator",fn:function(ref){
var on = ref.on;
return [_c('v-btn',_vm._g({staticClass:"mr-2",attrs:{"color":"primary","small":"","icon":""}},on),[_c('v-icon',[_vm._v("mdi-dots-vertical")])],1)]}}],null,true)},[_c('v-list',[(!resource.hidden)?_c('v-list-item',{on:{"click":function($event){return _vm.hideResource(resource, true)}}},[_c('v-list-item-title',[_c('v-icon',{attrs:{"left":""}},[_vm._v("mdi-eye-off")]),_vm._v(" "+_vm._s(_vm.$t('admin.hide_resource')))],1)],1):_c('v-list-item',{on:{"click":function($event){return _vm.hideResource(resource, false)}}},[_c('v-list-item-title',[_c('v-icon',{attrs:{"left":""}},[_vm._v("mdi-eye")]),_vm._v(" "+_vm._s(_vm.$t('admin.show_resource')))],1)],1),_c('v-list-item',{on:{"click":function($event){return _vm.deleteResource(resource)}}},[_c('v-list-item-title',[_c('v-icon',{attrs:{"left":""}},[_vm._v("mdi-delete")]),_vm._v(" "+_vm._s(_vm.$t('admin.delete_resource')))],1)],1),_c('v-list-item',{on:{"click":function($event){return _vm.blockUser(resource)}}},[_c('v-list-item-title',[_c('v-icon',{attrs:{"left":""}},[_vm._v("mdi-lock")]),_vm._v(" "+_vm._s(_vm.$t('admin.block_user')))],1)],1)],1)],1):_vm._e(),_c('a',{attrs:{"href":resource.data.url || resource.data.context}},[_c('small',[_vm._v(_vm._s(_vm._f("dateFormat")(resource.data.published,'ddd, D MMMM HH:mm')))])])],1),_c('v-card-text',[_c('div',{staticClass:"mt-1",domProps:{"innerHTML":_vm._s(_vm.resource_filter(resource.data.content))}}),_vm._l((resource.data.attachment),function(attachment){return _c('span',{key:attachment.url},[(_vm.isAudio(attachment))?_c('audio',{attrs:{"controls":""}},[_c('source',{attrs:{"src":attachment.url}})]):_vm._e(),(_vm.isImg(attachment))?_c('v-img',{staticClass:"cursorPointer",attrs:{"src":attachment.url,"max-height":"250px","max-width":"250px","contain":"","alt":attachment.name},on:{"click":function($event){return _vm.showResource(resource)}}}):_vm._e()],1)})],2)],1):_vm._e()})],2):_vm._e(),_c('div',{staticClass:"text-center mt-5 mb-5"},[_c('v-btn',{staticClass:"mr-2",attrs:{"nuxt":"","icon":"","outlined":"","color":"primary","to":("/event/" + (_vm.event.prev)),"disabled":!_vm.event.prev}},[_c('v-icon',[_vm._v("mdi-arrow-left")])],1),_c('v-btn',{attrs:{"nuxt":"","bottom":"","right":"","outlined":"","icon":"","color":"primary","to":("/event/" + (_vm.event.next)),"disabled":!_vm.event.next}},[_c('v-icon',[_vm._v("mdi-arrow-right")])],1)],1),_c('v-dialog',{attrs:{"width":"700px","fullscreen":_vm.$vuetify.breakpoint.xsOnly},model:{value:(_vm.showEmbed),callback:function ($$v) {_vm.showEmbed=$$v},expression:"showEmbed"}},[_c('EmbedEvent',{attrs:{"event":_vm.event},on:{"close":function($event){_vm.showEmbed=false}}})],1)],1)],1)],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./pages/event/_slug.vue?vue&type=template&id=014479ac&scoped=true&lang=pug&

// EXTERNAL MODULE: external "vuex"
var external_vuex_ = __webpack_require__(3);

// EXTERNAL MODULE: ./pages/event/eventAdmin.vue + 4 modules
var eventAdmin = __webpack_require__(120);

// EXTERNAL MODULE: ./pages/event/embedEvent.vue + 4 modules
var embedEvent = __webpack_require__(119);

// EXTERNAL MODULE: external "lodash/get"
var get_ = __webpack_require__(59);
var get_default = /*#__PURE__*/__webpack_require__.n(get_);

// EXTERNAL MODULE: external "dayjs"
var external_dayjs_ = __webpack_require__(2);
var external_dayjs_default = /*#__PURE__*/__webpack_require__.n(external_dayjs_);

// EXTERNAL MODULE: ./assets/clipboard.js
var clipboard = __webpack_require__(14);

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--2-0!./node_modules/babel-loader/lib??ref--2-1!./node_modules/vue-loader/lib??vue-loader-options!./pages/event/_slug.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//







const htmlToText = __webpack_require__(66);

/* harmony default export */ var _slugvue_type_script_lang_js_ = ({
  name: 'Event',
  mixins: [clipboard["a" /* default */]],
  components: {
    EventAdmin: eventAdmin["default"],
    EmbedEvent: embedEvent["default"]
  },

  async asyncData({
    $axios,
    params,
    error,
    store
  }) {
    try {
      const event = await $axios.$get(`/event/${params.slug}`);
      return {
        event
      };
    } catch (e) {
      error({
        statusCode: 404,
        message: 'Event not found'
      });
    }
  },

  data() {
    return {
      currentAttachment: 0,
      event: {},
      showEmbed: false,
      showResources: false,
      selectedResource: {
        data: {
          attachment: []
        }
      }
    };
  },

  head() {
    if (!this.event) {
      return {};
    }

    const tags_feed = this.event.tags.map(tag => ({
      rel: 'alternate',
      type: 'application/rss+xml',
      title: `${this.settings.title} events tagged ${tag}`,
      href: this.settings.baseurl + `/feed/rss?tags=${tag}`
    }));
    const place_feed = {
      rel: 'alternate',
      type: 'application/rss+xml',
      title: `${this.settings.title} events  @${this.event.place && this.event.place.name}`,
      href: this.settings.baseurl + `/feed/rss?places=${this.event.place && this.event.place.id}`
    };
    return {
      title: `${this.settings.title} - ${this.event.title}`,
      meta: [// hid is used as unique identifier. Do not use `vmid` for it as it will not work
      {
        hid: 'description',
        name: 'description',
        content: this.plainDescription
      }, {
        hid: 'og-description',
        name: 'og:description',
        content: this.plainDescription
      }, {
        hid: 'og-title',
        property: 'og:title',
        content: this.event.title
      }, {
        hid: 'og-url',
        property: 'og:url',
        content: `${this.settings.baseurl}/event/${this.event.slug || this.event.id}`
      }, {
        property: 'og:type',
        content: 'event'
      }, {
        property: 'og:image',
        content: this.$options.filters.mediaURL(this.event)
      }, {
        property: 'og:site_name',
        content: this.settings.title
      }, {
        property: 'og:updated_time',
        content: external_dayjs_default.a.unix(this.event.start_datetime).format()
      }, {
        property: 'article:published_time',
        content: external_dayjs_default.a.unix(this.event.start_datetime).format()
      }, {
        property: 'article:section',
        content: 'event'
      }, {
        property: 'twitter:card',
        content: 'summary'
      }, {
        property: 'twitter:title',
        content: this.event.title
      }, {
        property: 'twitter:image',
        content: this.$options.filters.mediaURL(this.event, 'thumb')
      }, {
        property: 'twitter:description',
        content: this.plainDescription
      }],
      link: [{
        rel: 'image_src',
        href: this.$options.filters.mediaURL(this.event, 'thumb')
      }, {
        rel: 'alternate',
        type: 'application/rss+xml',
        title: this.settings.title,
        href: this.settings.baseurl + '/feed/rss'
      }, ...tags_feed, place_feed]
    };
  },

  computed: { ...Object(external_vuex_["mapState"])(['settings']),

    hasMedia() {
      return this.event.media && this.event.media.length;
    },

    plainDescription() {
      return htmlToText.fromString(this.event.description.replace('\n', '').slice(0, 1000));
    },

    currentAttachmentLabel() {
      return get_default()(this.selectedResource, `data.attachment[${this.currentAttachment}].name`, '');
    },

    is_mine() {
      if (!this.$auth.user) {
        return false;
      }

      return this.event.userId === this.$auth.user.id || this.$auth.user.is_admin;
    }

  },

  mounted() {
    window.addEventListener('keydown', this.keyDown);
  },

  destroyed() {
    window.removeEventListener('keydown', this.keyDown);
  },

  methods: {
    isImg(attachment) {
      const type = attachment.mediaType.split('/')[0];
      return type === 'image';
    },

    isAudio(attachment) {
      const type = attachment.mediaType.split('/')[0];
      return type === 'audio';
    },

    keyDown(ev) {
      if (ev.altKey || ev.ctrlKey || ev.metaKey || ev.shiftKey) {
        return;
      }

      if (ev.key === 'ArrowRight' && this.event.next) {
        this.$router.replace(`/event/${this.event.next}`);
      }

      if (ev.key === 'ArrowLeft' && this.event.prev) {
        this.$router.replace(`/event/${this.event.prev}`);
      }
    },

    showResource(resource) {
      this.showResources = true;
      this.selectedResource = resource; // document.getElementById('resourceDialog').focus()
    },

    async hideResource(resource, hidden) {
      await this.$axios.$put(`/resources/${resource.id}`, {
        hidden
      });
      resource.hidden = hidden;
    },

    async blockUser(resource) {
      try {
        const ret = await this.$root.$confirm('admin.user_block_confirm', {
          user: resource.ap_user.ap_id
        });

        if (!ret) {
          return;
        }

        await this.$axios.post('/instances/toggle_user_block', {
          ap_id: resource.ap_user.ap_id
        });
        this.$root.$message('admin.user_blocked', {
          user: resource.ap_user.ap_id,
          color: 'success'
        });
      } catch (e) {}
    },

    async deleteResource(resource) {
      try {
        const ret = await this.$root.$confirm('admin.delete_resource_confirm');

        if (!ret) {
          return;
        }

        await this.$axios.delete(`/resources/${resource.id}`);
        this.event.resources = this.event.resources.filter(r => r.id !== resource.id);
      } catch (e) {}
    },

    copyLink() {
      this.$root.$message('common.copied', {
        color: 'success'
      });
    },

    // TOFIX
    resource_filter(value) {
      return value.replace(/<a.*href="([^">]+).*>(?:.(?!<\/a>))*.<\/a>/, (orig, url) => {
        // get extension
        const ext = url.slice(-4);

        if (['.mp3', '.ogg'].includes(ext)) {
          return `<audio controls><source src='${url}'></audio>`;
        } else {
          return orig;
        }
      });
    }

  }
});
// CONCATENATED MODULE: ./pages/event/_slug.vue?vue&type=script&lang=js&
 /* harmony default export */ var event_slugvue_type_script_lang_js_ = (_slugvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(1);

// CONCATENATED MODULE: ./pages/event/_slug.vue



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

}

/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  event_slugvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  injectStyles,
  "014479ac",
  "dac0ad3e"
  
)

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

/***/ })

};;
//# sourceMappingURL=_slug.js.map