(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{1018:function(t,e,n){"use strict";(function(t){n(10);var r=n(0),l=n(848),o=n(838);e.a={mixins:[o.a],edit:!1,components:{AuiEditorBar:l.a},asyncData:function(t){var e,n,r,l,o,data;return regeneratorRuntime.async((function(c){for(;;)switch(c.prev=c.next){case 0:return e=t.app,n=t.store,r=t.params,l=t.error,o=r.slug,c.next=4,regeneratorRuntime.awrap(n.dispatch("firebase/getDocBySlug",{name:o,collection:"singletons"}));case 4:return(data=c.sent)||l({statusCode:404,message:e.i18n.t("general.pagina_non_trovata")}),c.abrupt("return",{data:data,page:o});case 7:case"end":return c.stop()}}))},methods:{onSave:function(){return regeneratorRuntime.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,regeneratorRuntime.awrap(this.$store.dispatch("firebase/saveDoc",{name:this.page,collection:"singletons",data:this.data}));case 2:case"end":return t.stop()}}),null,this)}},head:function(){var title=Object(r.get)(this.data,"title");return{title:title,meta:[{hid:"og:title",property:"og:title",content:title},{hid:"description",name:"description",content:Object(r.get)(this.data,"seo_description")||"Archiui - Archivio storico"},{hid:"keywords",name:"keywords",content:Object(r.get)(this.data,"seo_keywords")||t.env.keywords}],link:[{rel:"canonical",href:window.location.href}]}}}}).call(this,n(29))},1055:function(t,e,n){"use strict";n.r(e);var r={mixins:[n(1018).a]},l=n(4),component=Object(l.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"bg-background min-h-screen"},[n("article",{staticClass:"container py-10"},[n("div",{staticClass:"mb-8 w-full lg:w-2/3"},[n("h1",{staticClass:"mb-2",domProps:{innerHTML:t._s(t.data.title)}})]),t._v(" "),n("aui-editor-bar",{attrs:{page:t.page},model:{value:t.data.content,callback:function(e){t.$set(t.data,"content",e)},expression:"data.content"}})],1)])}),[],!1,null,null,null);e.default=component.exports},839:function(t,e,n){},840:function(t,e,n){},844:function(t,e,n){},845:function(t,e,n){"use strict";var r=n(839);n.n(r).a},846:function(t,e,n){t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var l=e[r]={i:r,l:!1,exports:{}};return t[r].call(l.exports,l,l.exports,n),l.l=!0,l.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var l in t)n.d(r,l,function(e){return t[e]}.bind(null,l));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(object,t){return Object.prototype.hasOwnProperty.call(object,t)},n.p="",n(n.s="fb15")}({7055:function(t,e,n){},8875:function(t,e,n){var r,l,o;"undefined"!=typeof self&&self,l=[],void 0===(o="function"==typeof(r=function(){return function(){if(document.currentScript)return document.currentScript;try{throw new Error}catch(d){var t,e,n,r=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(d.stack)||/@([^@]*):(\d+):(\d+)\s*$/gi.exec(d.stack),l=r&&r[1]||!1,line=r&&r[2]||!1,o=document.location.href.replace(document.location.hash,""),c=document.getElementsByTagName("script");l===o&&(t=document.documentElement.outerHTML,e=new RegExp("(?:[^\\n]+?\\n){0,"+(line-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),n=t.replace(e,"$1").trim());for(var i=0;i<c.length;i++){if("interactive"===c[i].readyState)return c[i];if(c[i].src===l)return c[i];if(l===o&&c[i].innerHTML&&c[i].innerHTML.trim()===n)return c[i]}return null}}})?r.apply(e,l):r)||(t.exports=o)},"8bbf":function(t,e){t.exports=n(3)},f990:function(t,e,n){"use strict";var r=n("7055");n.n(r).a},fb15:function(t,e,n){"use strict";if(n.r(e),"undefined"!=typeof window){var r=window.document.currentScript,l=n("8875");r=l(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:l});var o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var c=n("8bbf"),d=n.n(c),f={data(){return{imgOffset:null,slideOffset:this.offset,sliding:!1,containerStyle:{},overlayStyle:{}}},props:{before:{type:String,required:!0},beforeLabel:{type:String},after:{type:String,required:!0},afterLabel:{type:String},offset:{type:[String,Number],default:.5,validator:t=>t>0&&t<=1},keyboardStep:{type:[String,Number],default:.2,validator:t=>t>0&&t<=1}},methods:{setDimensions(){const img=this.$el.querySelector("img");this.imgOffset=img.getBoundingClientRect(),this.containerStyle={width:`${this.w}px`,height:`${this.h}px`}},startSlide(t){this.sliding=!0,this.moveSlide(t),this.overlayStyle={opacity:0}},handleArrowNavigation(t){return this.moveSlide(t)},moveSlide(t){if(this.sliding){var e=(t.touches?t.touches[0].pageX:t.pageX)-this.imgOffset.left;return e=e<0?0:e>this.w?this.w:e,this.slideOffset=e/this.w}if(t.key)switch(t.key){case"Left":case"ArrowLeft":this.slideOffset=this.floatOffset-this.floatKeyboardStep>=0?this.floatOffset-this.floatKeyboardStep:0;break;case"Right":case"ArrowRight":this.slideOffset=this.floatOffset+this.floatKeyboardStep<=1?this.floatOffset+this.floatKeyboardStep:1;break;default:return}},endSlide(){this.sliding=!1,this.overlayStyle={}},resize(){this.containerStyle={},this.$nextTick(()=>this.setDimensions())}},computed:{beforeImgStyle(){return{clip:`rect(0, ${this.x}px, ${this.h}px, 0)`}},handleStyle(){return{width:"40px",height:"40px",top:"calc(50% - 20px)",left:`calc(${100*this.slideOffset}% - 20px)`}},x(){return this.w*this.slideOffset},w(){return this.imgOffset?this.imgOffset.width:null},h(){return this.imgOffset?this.imgOffset.height:null},floatOffset(){return parseFloat(this.slideOffset)},floatKeyboardStep(){return parseFloat(this.keyboardStep)}},mounted(){document.addEventListener("touchmove",this.moveSlide),document.addEventListener("touchend",this.endSlide),document.addEventListener("mousemove",this.moveSlide),document.addEventListener("mouseup",this.endSlide),window.addEventListener("resize",this.resize)},beforeDestroy(){document.removeEventListener("touchmove",this.moveSlide),document.removeEventListener("touchend",this.endSlide),document.removeEventListener("mousemove",this.moveSlide),document.removeEventListener("mouseup",this.endSlide),window.removeEventListener("resize",this.resize)}};n("f990");var m=function(t,e,n,r,l,o,c,d){var f,m="function"==typeof t?t.options:t;if(e&&(m.render=e,m.staticRenderFns=n,m._compiled=!0),r&&(m.functional=!0),o&&(m._scopeId="data-v-"+o),c?(f=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),l&&l.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},m._ssrRegister=f):l&&(f=d?function(){l.call(this,(m.functional?this.parent:this).$root.$options.shadowRoot)}:l),f)if(m.functional){m._injectStyles=f;var v=m.render;m.render=function(t,e){return f.call(e),v(t,e)}}else{var h=m.beforeCreate;m.beforeCreate=h?[].concat(h,f):[f]}return{exports:t,options:m}}(f,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"twentytwenty-container",style:t.containerStyle,on:{touchstart:t.startSlide,mousedown:t.startSlide}},[n("img",{attrs:{src:t.after,alt:"after"},on:{mousedown:function(t){t.preventDefault()},load:t.setDimensions}}),n("img",{style:t.beforeImgStyle,attrs:{src:t.before,alt:"before"},on:{mousedown:function(t){t.preventDefault()}}}),n("div",{staticClass:"twentytwenty-overlay",style:t.overlayStyle},[t.beforeLabel?n("div",{staticClass:"twentytwenty-before-label"},[t._v(t._s(t.beforeLabel))]):t._e(),t.afterLabel?n("div",{staticClass:"twentytwenty-after-label"},[t._v(t._s(t.afterLabel))]):t._e()]),n("div",{staticClass:"twentytwenty-handle",style:t.handleStyle,attrs:{tabindex:"0"},on:{keydown:t.handleArrowNavigation}},[n("div",{staticClass:"twentytwenty-arrow-left"}),n("div",{staticClass:"twentytwenty-arrow-right"})])])}),[],!1,null,null,null).exports;d.a.component("TwentyTwenty",m);var v=m;e.default=v}})},847:function(t,e,n){"use strict";var r=n(840);n.n(r).a},848:function(t,e,n){"use strict";n(844);var r=n(212),l=n(836),o=n(865),c=n(863),d={components:{AuiEditorImage:l.a},props:{value:Array,page:String},data:function(){return{editorValue:this.value||[]}},watch:{value:function(t){this.editorValue=t}}},f=(n(845),n(4)),m=Object(f.a)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("aui-multiple-editor",{attrs:{data:t.editorValue,"default-value":{},limit:2}},[t.$store.state.admin.isEdit?n("div",{staticClass:"flex flex-wrap -mx-2 w-full"},t._l(t.editorValue,(function(e,r){return n("div",{staticClass:"px-4"},[n("div",{staticClass:"mx-2 mb-4 relative"},[n("aui-editor-image",{staticClass:"mb-2",attrs:{page:t.page,ratio:"4/3",showTrash:!1},model:{value:e.image,callback:function(n){t.$set(e,"image",n)},expression:"item.image"}},[e.image?n("aui-image",{attrs:{url:e.image.url,ratio:"square"}}):t._e()],1)],1)])})),0):t._t("default")],2)}),[],!1,null,"48828cb6",null).exports,v=n(846),h=n.n(v),y=n(837),w={props:["items","params","customClass"],components:{AuiSwiper:y.a},data:function(){return{paramsInner:null}},mounted:function(){this.paramsInner=Object.assign({},this.params,{customNav:!0,navigation:{prevEl:this.$refs.prev,nextEl:this.$refs.next}})}},_=Object(f.a)(w,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"gallery-full px-8 lg:px-16"},[t.paramsInner?n("aui-swiper",{attrs:{options:t.paramsInner,items:t.items},scopedSlots:t._u([{key:"swiper-item",fn:function(e){return[t._t("default",[n("div",{staticClass:"flex items-center justify-center"},[e.data.image?n("figure",{staticClass:"table"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.data.image.url,expression:"props.data.image.url"}],staticClass:"max-h-500",attrs:{alt:e.data.image.alt}}),t._v(" "),e.data.image.alt?n("figcaption",{staticClass:"text-xs text-center px-5 py-3 border border-gray-lighter caption-sized",domProps:{innerHTML:t._s(e.data.image.alt)}}):t._e()]):t._e()])],{props:e})]}}],null,!0)}):t._e()],1),t._v(" "),n("div",{staticClass:"container flex mt-8 swiper-nav"},[n("button",{ref:"prev",staticClass:"btn iconOnly light mx-2"},[n("span",{staticClass:"visuallyhidden"},[t._v("$t('general.indietro')")]),t._v(" "),n("font-awesome-icon",{attrs:{icon:["fal","long-arrow-left"]}})],1),t._v(" "),n("button",{ref:"next",staticClass:"btn iconOnly light mx-2"},[n("span",{staticClass:"visuallyhidden"},[t._v("$t('general.avanti')")]),t._v(" "),n("font-awesome-icon",{attrs:{icon:["fal","long-arrow-right"]}})],1)])])}),[],!1,null,null,null).exports,x=n(835),C=n(213),S={components:{draggable:n.n(C).a,AuiEditor:r.a,AuiEditorImage:l.a,AuiEditorGallery:o.a,AuiEditorGalleryCa:c.a,AuiEditorCompare:m,TwentyTwenty:h.a,AuiSlider:_,AuiSwiper:y.a,AuiCard:x.a},props:{value:Array,page:String,showCa:Boolean},data:function(){return{editorValue:this.value||[],swiperParams:{navigation:{prevEl:".prev",nextEl:".next"}},swiperParamsCards:{slidesPerView:3,spaceBetween:15,watchOverflow:!0,navigation:{prevEl:".prev",nextEl:".next"},breakpoints:{768:{slidesPerView:2},1024:{slidesPerView:3}}}}},watch:{value:function(t){this.editorValue=t||[]},editorValue:{handler:function(t){this.$emit("input",t)},deep:!0}},methods:{add:function(t){this.editorValue.push(t)},move:function(t,e){var n=this.editorValue.splice(t,1)[0];this.editorValue.splice(t+e,0,n)}}},k=(n(847),Object(f.a)(S,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("draggable",{staticClass:"min-h-100",attrs:{disabled:!t.$store.state.admin.isEdit},model:{value:t.editorValue,callback:function(e){t.editorValue=e},expression:"editorValue"}},t._l(t.editorValue,(function(e,r){return n("div",{staticClass:"relative group p-6"},[t.$store.state.admin.isEdit&&"paragraph"===e.type?n("div",{staticClass:"flex items-center"},[n("label",[t._v(t._s(t.$t("editorBar.seleziona_background")))]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.background,expression:"item.background"}],staticClass:"border border-aui-edit rounded p-2 m-2",on:{change:function(n){var r=Array.prototype.filter.call(n.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(e,"background",n.target.multiple?r:r[0])}}},[n("option",{attrs:{value:""}},[t._v(t._s(t.$t("editorBar.color_default")))]),t._v(" "),n("option",{attrs:{value:"#f2f2f2"}},[t._v(t._s(t.$t("editorBar.color_grigio")))])])]):t._e(),t._v(" "),"paragraph"===e.type?n("div",{staticClass:"lg:w-1/2",class:{"p-6":!!e.background},style:{background:e.background}},[n("aui-editor",{staticClass:"mb-8",attrs:{placeholder:e.placeholder},model:{value:e.value,callback:function(n){t.$set(e,"value",n)},expression:"item.value"}})],1):"title"===e.type?n("div",{staticClass:"lg:w-1/2"},[n("aui-content-editable",{staticClass:"mb-8",attrs:{tag:"h2"},model:{value:e.value,callback:function(n){t.$set(e,"value",n)},expression:"item.value"}})],1):"image"===e.type?n("div",{staticClass:"lg:w-1/2"},[n("aui-editor-image",{staticClass:"mb-8",attrs:{page:t.page},model:{value:e.value,callback:function(n){t.$set(e,"value",n)},expression:"item.value"}},[n("figure",{staticClass:"table"},[e.value?n("img",{staticClass:"py-0",attrs:{src:e.value.url,alt:e.value.alt}}):t._e(),t._v(" "),n("figcaption",{staticClass:"text-xs text-center px-5 py-3 border border-gray-lighter table-auto",domProps:{innerHTML:t._s(e.value.alt)}})])])],1):"gallery"===e.type?n("div",{staticClass:"my-16"},[n("aui-editor-gallery",{class:[t.$store.state.admin.isEdit?"":"alignfull"],attrs:{variant:"2/3","enable-remove":"","no-link":"",page:t.page},model:{value:e.value,callback:function(n){t.$set(e,"value",n)},expression:"item.value"}},[n("aui-slider",{class:[t.$store.state.admin.isEdit?"":"alignfull"],attrs:{items:e.value,params:t.swiperParams}})],1)],1):"galleryca"===e.type?n("div",{staticClass:"my-16"},[n("aui-editor-gallery-ca",{model:{value:e.value,callback:function(n){t.$set(e,"value",n)},expression:"item.value"}},[n("div",{staticClass:"alignfull-column border-t border-b border-gray-lighter pt-20 pb-16 gallery-ca"},[n("aui-swiper",{attrs:{options:t.swiperParamsCards,items:e.value},scopedSlots:t._u([{key:"swiper-item",fn:function(e){return[e.data.id?n("aui-card",{key:e.data.id,attrs:{variant:"scheda",imgUrl:e.data.primaryImg.medium,type:e.data.type_id.name,id:e.data.id,title:e.data.preferred_label,url:e.data.link}}):t._e()]}}],null,!0)})],1)])],1):"video"===e.type?n("div",{staticClass:"lg:w-1/2 my-16"},[t.$store.state.admin.isEdit?n("aui-input",{staticClass:"mt-2 ml-2",attrs:{variant:"admin",label:t.$t("general.inserisci_video"),hidelabel:"",placeholder:t.$t("general.inserisci_video")},model:{value:e.value,callback:function(n){t.$set(e,"value",n)},expression:"item.value"}}):t._e(),t._v(" "),n("aui-video",{attrs:{link:e.value}})],1):"compare"===e.type?n("div",{staticClass:"lg:w-2/3 my-16"},[n("aui-editor-compare",{attrs:{page:t.page},model:{value:e.value,callback:function(n){t.$set(e,"value",n)},expression:"item.value"}},[e.value[0]&&e.value[0].image&&e.value[1]&&e.value[1].image?n("TwentyTwenty",{staticClass:"z-0",attrs:{before:e.value[0].image.url,beforeLabel:e.value[0].image.alt,after:e.value[1].image.url,afterLabel:e.value[1].image.alt}}):t._e()],1)],1):t._e(),t._v(" "),t.$store.state.admin.isEdit?n("div",{staticClass:"editor-utility group-hover:inline-block"},[n("aui-btn",{staticClass:"trash",attrs:{variant:"admin","icon-only":"",icon:["fal","times"]},on:{click:function(e){return t.editorValue.splice(r,1)}}}),t._v(" "),n("aui-btn",{staticClass:"handle",attrs:{variant:"white","icon-only":"",icon:["fas","grip-vertical"]}}),t._v(" "),r>0?n("aui-btn",{attrs:{variant:"white","icon-only":"",icon:["fas","sort-up"]},on:{click:function(e){return t.move(r,-1)}}}):t._e(),t._v(" "),t.editorValue.length&&r<t.editorValue.length-1?n("aui-btn",{attrs:{variant:"white","icon-only":"",icon:["fas","sort-down"]},on:{click:function(e){return t.move(r,1)}}}):t._e()],1):t._e()])})),0),t._v(" "),t.$store.state.admin.isEdit?n("div",{staticClass:"my-10 align-full"},[n("span",{staticClass:"label"},[t._v(t._s(t.$t("general.aggiungi_contenuto")))]),t._v(" "),n("div",{staticClass:"flex flex-wrap justify-start items-center -mx-2 my-4"},[n("aui-btn",{staticClass:"mx-2 mb-4",attrs:{variant:"admin",text:t.$t("news.titolo_sezione"),icon:["fal","align-center"]},on:{click:function(e){return t.add({background:"",value:"",type:"title"})}}}),t._v(" "),n("aui-btn",{staticClass:"mx-2 mb-4",attrs:{variant:"admin",text:t.$t("news.paragrafo"),icon:["fal","paragraph"]},on:{click:function(e){return t.add({background:"",type:"paragraph"})}}}),t._v(" "),n("aui-btn",{staticClass:"mx-2 mb-4",attrs:{variant:"admin",text:t.$t("gallery.immagine"),icon:["fal","image"]},on:{click:function(e){return t.add({background:"",value:"",type:"image"})}}}),t._v(" "),n("aui-btn",{staticClass:"mx-2 mb-4",attrs:{variant:"admin",text:t.$t("gallery.gallery"),icon:["fal","image"]},on:{click:function(e){return t.add({background:"",value:[],type:"gallery"})}}}),t._v(" "),n("aui-btn",{staticClass:"mx-2 mb-4",attrs:{variant:"admin",text:t.$t("gallery.video"),icon:["fal","video"]},on:{click:function(e){return t.add({background:"",value:"",type:"video"})}}}),t._v(" "),t.showCa?n("aui-btn",{staticClass:"mx-2 mb-4",attrs:{variant:"admin",text:t.$t("gallery.gallery_ca"),icon:["fal","image"]},on:{click:function(e){return t.add({background:"",value:[],type:"galleryca"})}}}):t._e(),t._v(" "),t.showCa&&"musei"===t.$store.state.options.tracciato?n("aui-btn",{staticClass:"mx-2 mb-4",attrs:{variant:"admin",text:t.$t("gallery.compare"),icon:["fal","image"]},on:{click:function(e){return t.add({background:"",value:[],type:"compare"})}}}):t._e()],1)]):t._e()],1)}),[],!1,null,"06449fb0",null));e.a=k.exports}}]);