`},{type:"checkbox",name:"newtab",label:t.open_new_window},{type:"htmlpanel",html:``},{type:"htmlpanel",html:``}]},initialData:{},buttons:[{type:"cancel",text:t.close},{type:"submit",name:"insert",text:t.insert,primary:!0}],onChange:(t,e)=>{},onSubmit:function(t){const n=t.getData(),r=n.url?.trim()||"",i=n.text?.trim()||"",o=n.newtab||!1,s=document.getElementById("bgColor").value||"rgb(0, 115, 170)",a=document.getElementById("txtColor").value||"rgb(255, 255, 255)",l=document.getElementById("url-error"),c=document.getElementById("text-error");if(""==r.trim())return void(l.style.display="");if(l.style.display="none",""==i.trim())return void(c.style.display="");c.style.display="none";const u=t=>t?t.replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/&/g,"&"):"",d=wp&&wp.sanitize&&wp.sanitize.stripTagsAndEncodeText,f=`${d?wp.sanitize.stripTagsAndEncodeText(i.trim()):u(i.trim())}`;e.insertContent(f),t.close()}});let n=window.jQuery;setTimeout((()=>{n(".tox-dialog-wrap .colorpicker").each((function(){n(this).wpColorPicker({change:function(t,e){var r=n(this).parents(".wp-picker-container").find("input.colorpicker");n(this).parents(".wp-picker-container").find("button.wp-color-result").css("background-color",e.color.toCSS("rgba")),r.data("new-color",e.color.toCSS("rgba")),r.attr("value",e.color.toCSS("rgba")),r.val(e.color.toCSS("rgba"))}}).promise().done((function(){t&&(n(this).parents(".wp-picker-container").find(".iris-strip").eq(0).prepend(`${t.tone}`),n(this).parents(".wp-picker-container").find(".iris-strip").eq(1).prepend(`${t.opacity}`))}))}))}),100)}}),e.on("input",(function(){r(e)})),e.on("ExecCommand",(function(){r(e)}));var r=function(t){var e=document.getElementById(t.id);e&&(e.value=t.getContent())}}}})}tinymce.init(ah(ah({},{selector:`#${e}`,init_instance_callback:t=>{if(this.editorContent){const e=function(t){const e=document.getElementById(t.id);e&&(e.value=t.getContent())};t.setContent(this.editorContent),e(t)}}}),metaslider.tinymce.find((t=>"image"===t.type)).configuration)),this.editorInstance=!0}}))},destroyTinyMCE(){if(this.editorInstance){const t=`caption_override_${this.$parent.id}`;this.editorContent=tinymce.get(t).getContent(),tinymce.get(t).destroy(),this.editorInstance=!1}},convertStyleAttributes(t){return t.replace(/style=\\(".*?"|'.*?')/g,(t=>t.replace(/\\(?="|')/g,"")))},cleanupQuotes(t){return t.replace(/\\'|\\'|\\\"/g,(t=>"\\'"===t||"\\'"===t?"'":'\\"'===t?'"':void 0))}},watch:{selectedSource(t,e){"undefined"!=typeof tinymce?"override"===t&&"override"!==e?this.initializeTinyMCE():"override"!==t&&"override"===e&&this.destroyTinyMCE():console.log("TinyMCE is not defined or disabled in MetaSlider settings!")}}},uh=jd(ch,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"row caption mb-0"},[e("div",{staticClass:"flex justify-between"},[e("label",{staticClass:"mr-4 caption-label"},[t._v("\n\t\t\t"+t._s(t.__("Caption","ml-slider"))+"\n\t\t\t"),e("span",{staticClass:"dashicons dashicons-info tipsy-tooltip-top",staticStyle:{"line-height":"1.2em"},attrs:{title:t.__("Enter text that will appear with your image slide.","ml-slider")}})]),t._v(" "),e("div",{staticClass:"mb-1 mr-1",attrs:{"aria-labelledby":"caption_source_"+t.$parent.id,role:"radiogroup"}},t._l(t.sources,(function(n,r){return e("div",{key:r,staticClass:"whitespace-no-wrap inline-block mb-1 px-1"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedSource,expression:"selectedSource"}],staticClass:"m-0",attrs:{id:r+"-"+t.$parent.id,name:"attachment["+t.$parent.id+"][caption_source]",type:"radio"},domProps:{value:r,checked:t._q(t.selectedSource,r)},on:{click:t.maybeFocusTextarea,change:function(e){t.selectedSource=r}}}),t._v(" "),e("label",{staticClass:"m-0 truncate",attrs:{for:r+"-"+t.$parent.id,title:t.language[r]}},[t._v("\n\t\t\t\t\t"+t._s(t.language[r])+"\n\t\t\t\t")])])})),0)]),t._v(" "),"override"!==t.selectedSource?e("textarea",{staticClass:"tipsy-tooltip-top",attrs:{title:t.__("Automatically updates directly from the WP Media Library","ml-slider"),readonly:""},domProps:{value:t.sources[t.selectedSource].length?t.sources[t.selectedSource]:t.__("No default was found","ml-slider")}}):t._e(),t._v(" "),"override"===t.selectedSource?e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.textareaContent,expression:"textareaContent"}],staticClass:"tipsy-tooltip-top wysiwyg",attrs:{title:t.__("You may use HTML here","ml-slider"),id:"caption_override_"+t.$parent.id,name:"attachment["+t.$parent.id+"][post_excerpt]","data-type":"image"},domProps:{value:t.textareaContent},on:{input:function(e){e.target.composing||(t.textareaContent=e.target.value)}}}):t._e()])}),[],!1,null,null,null).exports,dh={props:{},data(){return{}},computed:{loading(){return this.$parent.loadingFresh}},mounted(){if(!document.querySelector(".media-frame-content").dataset.columns){let t=document.querySelector(".attachments-browser .attachments").offsetWidth/150;document.querySelector(".media-frame-content").dataset.columns=Math.round(t)}},methods:{searchByTerm:ku.debounce((function(){this.$parent.searchByTerm()}),500)}},fh=n(4159),hh={insert:"head",singleton:!1},ph=(Wd()(fh.A,hh),fh.A.locals,jd(dh,(function(){var t=this,e=t._self._c;return e("div",{staticStyle:{height:"100%"}},[e("div",{staticClass:"media-toolbar"},[e("div",{staticClass:"media-toolbar-secondary"},[e("label",{staticClass:"screen-reader-text",attrs:{for:"media-attachment-filters"}},[t._v(t._s(t.__("Filter by type","ml-slider")))]),t._v(" "),t.$parent.filters.length?e("select",{staticClass:"attachment-filters",staticStyle:{"min-width":"150px"}},[e("option",{attrs:{value:"all"}},[t._v(t._s(t.__("All media items","ml-slider")))]),t._v(" "),t._l(t.$parent.filters,(function(n,r){return e("option",{key:r,domProps:{value:r}},[t._v(t._s(n))])}))],2):t._e(),t._v(" "),e("span",{staticClass:"spinner"})]),t._v(" "),e("div",{staticClass:"media-toolbar-primary search-form"},[e("label",{staticClass:"screen-reader-text",attrs:{for:"media-search-input"}},[t._v(t._s(t.__("Search Unsplash API","ml-slider")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.$parent.searchTerm,expression:"$parent.searchTerm"}],staticClass:"search",attrs:{id:"search-unsplash",placeholder:t.__("Search unsplash.com...","ml-slider"),type:"search"},domProps:{value:t.$parent.searchTerm},on:{focus:function(e){return t.notifyInfo("metaslider/unsplash-search-focused","Unsplash search was focused")},keyup:t.searchByTerm,search:t.searchByTerm,input:function(e){e.target.composing||t.$set(t.$parent,"searchTerm",e.target.value)}}})])]),t._v(" "),t.loading&&!t.$parent.errorMessage?e("div",{staticClass:"attachments ui-sortable ui-sortable-disabled"},[e("span",{staticClass:"ms-full-loading"},[e("svg",{staticClass:"w-6 ms-spin",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"}})])])]):t._e(),t._v(" "),t.$parent.errorMessage?e("div",{staticClass:"external-api-error"},[t._v(t._s(t.$parent.errorMessage)+"\n\t\t")]):t._e(),t._v(" "),t.loading||t.$parent.errorMessage?t._e():e("ul",{staticClass:"attachments ui-sortable ui-sortable-disabled",attrs:{tabindex:"-1"}},[t._t("media-list"),t._v(" "),t.$parent.canLoadMore?e("li",{staticClass:"attachment ms-load-more-api"},[e("div",{staticClass:"attachment-preview"},[t.$parent.loadingMore?e("span",{staticClass:"ms-loading-more-images"},[e("svg",{staticClass:"w-6 ms-spin",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"}})])]):e("button",{staticClass:"ms-load-more-button",on:{click:t.$parent.loadMore}},[e("svg",{staticClass:"w-6",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"}})]),t._v(" "),e("span",[t._v(t._s(t.__("Load more","ml-slider")))])])])]):t._e()],2),t._v(" "),e("div",{staticClass:"media-sidebar"},[e("div",{staticClass:"ms-api-sidebar"},[e("div",{staticClass:"ms-api-photo-details"},[t._t("sidebar")],2),t._v(" "),e("div",{staticClass:"ms-api-copyright"},[t._t("copyright")],2)])])])}),[],!1,null,null,null)),mh={components:{MediaContainer:ph.exports},props:{},data(){return{errorMessage:"",canLoadMore:!1,loadingFresh:!0,loadingMore:!0,searchTerm:"",page:1,photos:[],selected:{id:null},filters:{},mediaButton:{},qualityOptions:["raw","full","regular"],upload:{title:"",caption:"",alt:"",description:"",quality:"full"}}},computed:{fileName(){return this.selected.id?this.selected.user.name.replace(" ","-").toLowerCase()+"-"+this.selected.id+"-unsplash.jpg":""}},watch:{selected(t){this.upload.caption=t.user?this.sprintf(this.__("Photo by %s on Unsplash","ml-slider"),t.user.name):this.__("Photo on Unsplash","ml-slider")}},mounted(){this.notifyInfo("metaslider/unsplash-tab-opened",this.__("Opening Unsplash tab...","ml-slider")),this.loadFreshImages()},destroyed(){this.notifyInfo("metaslider/unsplash-tab-closed",this.__("Unsplash tab closed","ml-slider"))},methods:{async getImages(){this.errorMessage="";const{data:t}=await Iu.photos(this.page,this.searchTerm);if(!t.data.length)throw this.__("No photots found.","ml-slider");t.data.forEach((t=>{this.photos.some((e=>e.id===t.id))||this.photos.push(t)}))},loadFreshImages(){this.readyToLoad(!1),this.page=1,this.photos=[],this.selected={id:null},this.getImages().then((()=>this.readyToLoad())).catch((t=>{this.errorMessage=t,this.loadingFresh=!1,this.throwError(t)}))},async loadMore(){this.page++,this.loadingMore=!0,await new Promise((t=>setTimeout(t,1e3))),this.getImages().then((()=>this.readyToLoad())).catch((()=>{this.canLoadMore=!1}))},download(){return Iu.download(this.selected.urls[this.upload.quality],this.selected.id)},fetchFilters(){this.filters={}},searchByTerm(){this.loadFreshImages()},readyToLoad(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.canLoadMore=t,this.loadingMore=!t,this.loadingFresh=!t}}},gh=mh,vh=n(7130),wh={insert:"head",singleton:!1},yh=(Wd()(vh.A,wh),vh.A.locals,{components:{unsplash:jd(gh,(function(){var t=this,e=t._self._c;return e("media-container",[e("template",{slot:"media-list"},t._l(t.photos,(function(n){return e("li",{key:n.id,staticClass:"attachment save-ready",class:{selected:t.selected===n,details:t.selected===n},attrs:{"aria-label":t.sprintf(t.__("Photo by %s","ml-slider"),n.user.name),tabindex:"0",role:"checkbox","aria-checked":"false"},on:{click:function(e){t.selected=t.selected===n?{}:n}}},[e("div",{staticClass:"attachment-preview js--select-attachment type-image subtype-jpeg",class:n.orientation},[e("div",{staticClass:"thumbnail"},[e("div",{staticClass:"centered"},[e("img",{attrs:{alt:t.sprintf(t.__("Photo by %s","ml-slider"),n.user.name),src:n.urls.thumb,draggable:"false"}})])])]),t._v(" "),e("button",{staticClass:"check",attrs:{type:"button",tabindex:"-1"}},[e("span",{staticClass:"media-modal-icon"}),t._v(" "),e("span",{staticClass:"screen-reader-text"},[t._v(t._s(t.__("Deselect","ml-slider")))])])])})),0),t._v(" "),e("template",{slot:"sidebar"},[t.selected.id?e("div",[e("div",{staticClass:"attachment-details",attrs:{tabindex:"0"}},[e("h2",[t._v(t._s(t.__("Attachment Details","ml-slider")))]),t._v(" "),e("div",{staticClass:"attachment-info"},[e("div",{staticClass:"thumbnail thumbnail-image"},[e("img",{attrs:{src:t.selected.urls.small,alt:t.fileName,draggable:"false"}})]),t._v(" "),e("div",{staticClass:"details"},[e("div",{staticClass:"filename"},[t._v(t._s(t.fileName))]),t._v(" "),e("div",{staticClass:"dimensions"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.sprintf(t._x("%s by %s pixels","1000 by 1000 pixels","ml-slider"),t.selected.width,t.selected.height))+"\n\t\t\t\t\t\t")]),t._v(" "),e("a",{attrs:{href:t.selected.links.html,target:"_blank"}},[t._v(t._s(t.__("view original","ml-slider")))])])]),t._v(" "),e("div",{staticClass:"ms-api-user"},[e("img",{staticClass:"rtl:mr-0 rtl:ml-4",attrs:{src:t.selected.user.profile_image.medium}}),t._v(" "),e("div",{staticClass:"ms-profile-data"},[e("div",{staticClass:"ms-profile-details"},[e("h3",[t._v(t._s(t.selected.user.name))]),t._v(" "),e("p",{staticClass:"ms-user-location",domProps:{innerHTML:t._s(t.selected.user.location)}}),t._v(" "),t.selected.user.bio?e("div",{staticClass:"ms-user-bio",domProps:{innerHTML:t._s(t.selected.user.bio)}}):t._e()]),t._v(" "),e("ul",{staticClass:"ms-profile-meta"},[t.selected.user.username?e("li",[e("a",{staticClass:"ms-profile-username",attrs:{href:t.selected.user.links.html,title:t.selected.user.links.html,target:"_blank"}},[t._v(t._s(t.__("Profile","ml-slider"))+"\n\t\t\t\t\t\t\t\t")])]):t._e(),t._v(" "),t.selected.user.portfolio_url?e("li",{staticClass:"ms-user-portfolio-url"},[e("a",{attrs:{href:t.selected.user.portfolio_url,title:t.selected.user.portfolio_url,target:"_blank"}},[t._v(t._s(t.__("Portfolio","ml-slider"))+"\n\t\t\t\t\t\t\t\t")])]):t._e()])])]),t._v(" "),e("label",{staticClass:"setting"},[e("span",{staticClass:"name"},[t._v(t._s(t.__("Title","ml-slider")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.upload.title,expression:"upload.title"}],attrs:{type:"text"},domProps:{value:t.upload.title},on:{input:function(e){e.target.composing||t.$set(t.upload,"title",e.target.value)}}})]),t._v(" "),e("label",{staticClass:"setting"},[e("span",{staticClass:"name"},[t._v(t._s(t.__("Caption","ml-slider")))]),t._v(" "),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.upload.caption,expression:"upload.caption"}],domProps:{value:t.upload.caption},on:{input:function(e){e.target.composing||t.$set(t.upload,"caption",e.target.value)}}})]),t._v(" "),e("label",{staticClass:"setting"},[e("span",{staticClass:"name"},[t._v(t._s(t.__("Alt Text","ml-slider")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.upload.alt,expression:"upload.alt"}],attrs:{type:"text"},domProps:{value:t.upload.alt},on:{input:function(e){e.target.composing||t.$set(t.upload,"alt",e.target.value)}}})]),t._v(" "),e("label",{staticClass:"setting"},[e("span",{staticClass:"name"},[t._v(t._s(t.__("Description","ml-slider")))]),t._v(" "),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.upload.description,expression:"upload.description"}],domProps:{value:t.upload.description},on:{input:function(e){e.target.composing||t.$set(t.upload,"description",e.target.value)}}})]),t._v(" "),e("label",{staticClass:"quality setting"},[e("span",{staticClass:"name"},[t._v(t._s(t.__("Quality","ml-slider")))]),t._v(" "),e("select",{directives:[{name:"model",rawName:"v-model",value:t.upload.quality,expression:"upload.quality"}],staticClass:"alignment",on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.upload,"quality",e.target.multiple?n:n[0])}}},t._l(t.qualityOptions,(function(n){return e("option",{key:n,domProps:{value:n}},[t._v("\n\t\t\t\t\t\t\t"+t._s(n.charAt(0).toUpperCase()+n.slice(1))+"\n\t\t\t\t\t\t")])})),0)])])]):t._e()]),t._v(" "),e("template",{slot:"copyright"},[e("p",[t._v("\n\t\t\t"+t._s(t.__("All photos published on Unsplash can be used for free.","ml-slider"))+" "),e("a",{attrs:{target:"_blank",href:"https://unsplash.com/license"}},[t._v(t._s(t.__("view license","ml-slider")))])])])],2)}),[],!1,null,null,null).exports},props:{source:{type:[String],default:"unsplash"},slideshowId:{type:[String,Number],default:null},slideId:{type:[String,Number],default:null},slideType:{type:[String],default:"image"}},data(){return{page:1,component:null,mediaButton:{},ourMediaButton:{},downloading:!1,uploadPercentage:1,downloadingMessage:""}},watch:{downloading(){this.ourMediaButton.disabled=this.downloading,this.downloading&&(window.metaslider.about_to_reload=!0)}},created(){this.component=this.source},mounted(){xu.$on("metaslider/external-api-percentage",(t=>{let{percentage:e}=t;this.uploadPercentage=e}));const t=document.querySelector(".external-media-importer");let e=t.closest(".media-modal-content");e=e.querySelector("button.clear-selection"),e&&e.click();const n=document.querySelectorAll(".attachment.save-ready.selected");n&&n.forEach((t=>{t.click()}));let r=t.closest(".media-modal-content");this.mediaButton=r.querySelector(".media-frame-toolbar .media-toolbar-primary button.media-button"),this.ourMediaButton=this.mediaButton.cloneNode(),this.ourMediaButton.classList.add("float-right","rtl:float-left"),this.ourMediaButton.innerHTML=this.mediaButton.innerHTML,this.mediaButton.parentNode.insertBefore(this.ourMediaButton,this.mediaButton),this.ourMediaButton.disabled=!1,this.mediaButton.style.visibility="hidden",this.ourMediaButton.addEventListener("click",this.interceptAddButton)},destroyed(){this.ourMediaButton.removeEventListener("click",this.interceptAddButton),this.ourMediaButton.parentNode.removeChild(this.ourMediaButton),this.mediaButton.style.visibility="visible";const t=document.getElementById("image-api-container");t&&t.parentNode.removeChild(t),window.metaslider.about_to_reload&&(delete window.metaslider.about_to_reload,window.create_slides&&window.create_slides.close(),window.update_slide_frame&&window.update_slide_frame.close())},methods:{async interceptAddButton(t){if(this.$refs["external-api"].selected.id){this.downloading=!0,this.downloadingMessage=this.__("Saving...","ml-slider");const{data:t}=await this.$refs["external-api"].download(),e=this.$refs["external-api"].upload,n=new FormData,r=this.$refs["external-api"].fileName;n.append("files["+r+"]",t,r),Object.keys(this.$refs["external-api"].upload).forEach((t=>{let i=e[t];n.append("image_data["+r+"]["+t+"]",i)})),n.append("slideshow_id",this.slideshowId),this.slideType&&n.append("slide_type",this.slideType),this.slideId&&n.append("slide_id",this.slideId),n.append("action","ms_import_images");const i=await _u.post("import/images",n).catch((t=>{this.notifyError("metaslider/image-import-error",t,!0),this.slideId=!0,this.$destroy()}));if(this.uploadPercentage=100,this.downloadingMessage=this.__("Complete!","ml-slider"),await new Promise((t=>setTimeout(t,1500))),!this.slideId&&window.location.reload(!0),this.slideId){if(document.querySelector('[data-slide-id="'+this.slideId+'"] .thumb').style.backgroundImage="url("+i.data.data+")",this.proUser&&"local_video"===this.slideType){const t=document.querySelector("#slide-"+this.slideId+" .update-cover-image");t.style.backgroundImage="url("+i.data.data+")",t.innerHTML=""}xu.$emit("metaslider/image-meta-updated",[""+this.slideId],this.$refs["external-api"].upload)}this.$destroy()}}}}),bh=yh,_h=n(3674),xh={insert:"head",singleton:!1},kh=(Wd()(_h.A,xh),_h.A.locals,jd(bh,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"attachments-browser external-media-importer"},[t.downloading?e("div",{staticClass:"ms-hero-status"},[t.uploadPercentage>0?e("div",{staticClass:"ms-upload-progress"},[e("div",{staticClass:"ms-upload-image"},[e("span",{staticClass:"attachment save-ready",staticStyle:{width:"150px",height:"150px"},attrs:{"aria-label":t.$refs["external-api"].fileName,tabindex:"0",role:"checkbox","aria-checked":"false"}},[e("div",{staticClass:"attachment-preview js--select-attachment type-image subtype-jpeg portrait"},[e("div",{staticClass:"thumbnail"},[e("div",{staticClass:"centered"},[e("img",{attrs:{src:t.$refs["external-api"].selected.urls.regular,alt:t.$refs["external-api"].fileName,draggable:"false"}})])])])])]),t._v(" "),e("div",{staticClass:"ms-progress"},[e("div",{staticClass:"ms-progress-bar",style:{width:t.uploadPercentage+"%"}}),t._v(" "),e("span",{staticClass:"text-lg"},[t._v(t._s(t.downloadingMessage?t.downloadingMessage:t.__("Crunching...","ml-slider")))])])]):t._e()]):t._e(),t._v(" "),e(t.component,{directives:[{name:"show",rawName:"v-show",value:!t.downloading,expression:"!downloading"}],ref:"external-api",tag:"component"},[e("template",{slot:"search-tools"},[t._t("search-tools")],2)],2)],1)}),[],!1,null,null,null).exports),Sh=jd({mounted(){xu.$on("import-notice",(t=>{this.showNotice(t)}))},computed:Xu({current:"slideshows/getCurrent"}),methods:{showNotice(t){Nd().fire({title:this.__("Import Slides","ml-slider"),confirmButtonText:this.__("Import slides","ml-slider"),showCancelButton:!0,icon:"info",iconHtml:'',customClass:"shadow-lg",html:'
'+this.__("You currently do not have any slides to preview. If you want, we can import some image slides for you.","ml-slider")+"
",showLoaderOnConfirm:!0,allowOutsideClick:()=>!Nd().isLoading(),preConfirm:()=>_u.post("import/images",wd().stringify({action:"ms_import_images",slideshow_id:this.current.id,theme_id:t})).catch((t=>{Nd().showValidationMessage(t)}))}).then((t=>{t.dismiss||window.location.reload(!0)}))}},render:()=>!0},undefined,undefined,!1,null,null,null).exports,Ch={data(){return{dragAndDropCapable:!1,files:[],uploadPercentage:0,isDragHovering:!1,error:!1}},mounted(){const t=["drag","dragstart","dragend","dragover","dragenter","dragleave","drop"];this.dragAndDropCapable=this.determineDragAndDropCapable(),this.dragAndDropCapable&&(t.forEach((t=>{this.$refs.fileform.addEventListener(t,(t=>{t.preventDefault(),t.stopPropagation()}))})),this.$refs.fileform.addEventListener("drop",this.attachDropEvent))},methods:{attachDropEvent(t){this.isDragHovering=!0;for(let e=0;e{let e=parseInt(Math.round(100*t.loaded/t.total))-20;this.uploadPercentage=e>1?e:1}}).then((t=>{console.info("MetaSlider: ",t),this.uploadPercentage=100,window.location.reload(!0)})).catch((t=>{this.uploadPercentage=0,this.isDragHovering=!1,this.$refs.fileform.removeEventListener("drop",this.attachDropEvent),this.error=this.getErrorMessage(t.response),this.notifyError("metaslider/drag-and-drop-error",t,!0)}))}}},Eh=Ch,Oh=n(201),Th={insert:"head",singleton:!1},Ph=(Wd()(Oh.A,Th),Oh.A.locals,jd(Eh,(function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"ms-image-drag-drop"}},[t.dragAndDropCapable?t._e():e("span",[t._v(t._s(t.__("Drag and drop interface not available.","ml-slider")))]),t._v(" "),e("form",{directives:[{name:"show",rawName:"v-show",value:t.dragAndDropCapable,expression:"dragAndDropCapable"}]},[e("div",{ref:"fileform",staticClass:"ms-drag-drop",class:{"ms-drag-hovering":t.isDragHovering||t.uploadPercentage>0,"has-error":t.error},on:{dragenter:function(e){t.isDragHovering=!0},dragleave:function(e){t.isDragHovering=!1}}},[t.uploadPercentage>0?e("div",{staticClass:"ms-upload-progress"},[e("div",{staticClass:"ms-progress"},[e("div",{staticClass:"ms-progress-bar",style:{width:t.uploadPercentage+"%"}}),t._v(" "),e("span",[t._v(t._s(t.__("Crunching...","ml-slider")))])])]):t._e()]),t._v(" "),0!==t.uploadPercentage||t.error?t._e():e("span",[t._v(t._s(t.__("Drop images here","ml-slider")))]),t._v(" "),t.error?e("span",{domProps:{textContent:t._s(t.error)}}):t._e()])])}),[],!1,null,"4f6cf952",null).exports),Ah={props:{},data(){return{}},mounted(){let t=window.jQuery;t(".useWithCaution").on("change",(function(){if(!this.checked)return alert(metaslider.useWithCaution)})),t(".metaslider-ui").on("click",".ms-toggle .hndle, .ms-toggle .handlediv",(function(){t(this).parent().toggleClass("closed")})),t(".metaslider-ui").on("keypress",".slider-lib-row label",(function(e){32===e.which&&(e.preventDefault(),t(".slider-lib-row #"+t(this).attr("for")).trigger("click"))}));var e=function(e,n,r){var i=e.is('input[type="checkbox"]')?"checkbox":"select",o="checkbox"===i&&e.is(":checked")===r,s=!("select"!==i||!(e.val()===r||Array.isArray(r)&&-1!==r.indexOf(e.val())));o||s?"#"===n.charAt(0)||"."===n.charAt(0)?t("#metaslider-slides-list").find(n).show():t(".ms-settings-table").find(`[name="settings[${n}]"]`).closest("tr").show():"#"===n.charAt(0)||"."===n.charAt(0)?t("#metaslider-slides-list").find(n).hide():t(".ms-settings-table").find(`[name="settings[${n}]"]`).closest("tr").hide()},n=function(n){t(n).each((function(){var n=t(this);JSON.parse(t(this).attr("data-dependencies")).forEach((function(r){e(n,r.show,r.when),t(document).on("change",".metaslider-ui",n,(function(){e(n,r.show,r.when)}))}))}))},r=function(e){t(".metaslider .option:not(."+e+")").attr("disabled","disabled").parents("tr").hide(),t(".metaslider .option."+e).removeAttr("disabled").parents("tr").show(),t(".metaslider input.radio:not(."+e+")").attr("disabled","disabled"),t(".metaslider input.radio."+e).removeAttr("disabled"),t(".metaslider .showNextWhenChecked:visible").closest("tr").next("tr").hide(),t(".metaslider .showNextWhenChecked:visible:checked").closest("tr").next("tr").show(),"disabled"===t(".effect option:selected").attr("disabled")&&t(".effect option:enabled:first").attr("selected","selected"),"disabled"===t(".theme option:selected").attr("disabled")&&t(".theme option:enabled:first").attr("selected","selected"),n(".ms-settings-table [data-dependencies], #metaslider-slides-list [data-dependencies]"),"flex"==e?t(".flex-setting").show():t(".flex-setting").hide()};xu.$on(["metaslider/app-loaded","metaslider/slides-created","metaslider/slide-duplicated"],(()=>{n("#metaslider-slides-list [data-dependencies]")})),r(t(".metaslider .select-slider:checked").attr("rel"));var i=function(t){t.is(":checked")?t.closest("tr").next("tr").show():t.closest("tr").next("tr").hide()};i(t(".showNextWhenChecked")),xu.$on("metaslider/app-loaded",(()=>{i(t(".showNextWhenChecked"))})),t(".metaslider-ui").on("change",".showNextWhenChecked",(function(){i(t(this))})),t(".metaslider-ui").on("change",".left tr.slide .crop_position",(function(){t(this).closest("tr").data("crop_changed",!0)})),t(".metaslider-ui").on("click",".select-slider",(function(){r(t(this).attr("rel"))}))}},jh=jd(Ah,undefined,undefined,!1,null,null,null).exports;function Ih(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Mh(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Dh={props:{},data(){return{currentSavedTitle:""}},watch:{current:{immediate:!0,handler:function(t){this.currentSavedTitle=t.title}}},computed:function(t){for(var e=1;e{this.notifySuccess("metaslider/title-saved",this.__("Slideshow title updated"),!0),this.currentSavedTitle=this.current.title}))}else this.notifyError("metaslider/title-saved",this.__("Please add a slideshow title"),!0)},bail(t){this.$store.commit("slideshows/updateTitle",this.currentSavedTitle),this.$nextTick((()=>{t.target.blur()}))}}},Lh=Dh,Bh=n(244),Rh={insert:"head",singleton:!1},Nh=(Wd()(Bh.A,Rh),Bh.A.locals,jd(Lh,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"mb-12"},[e("div",{staticClass:"relative"},[e("input",{staticClass:"h-16 text-2xl font-light rounded-none shadow-none bg-transparent border-0 border-l-4 border-transparent hover:border-gray-light hover:bg-white focus:bg-white focus:shadow-sm focus:border-gray-light rtl:border-l-0 rtl:border-r-0 rtl:ml-0 rtl:-mr-4 rtl:pl-12 rtl:pr-4",staticStyle:{width:"100%!important",transition:"background .3s ease,border-left .3s ease!important"},attrs:{id:"metaslider-current-title","data-lpignore":"true",type:"text",required:""},domProps:{value:t.current.title},on:{change:function(e){return t.$store.commit("slideshows/updateTitle",e.target.value)},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"escape",void 0,e.key,void 0)?null:(e.preventDefault(),t.bail(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.target.blur()}],keyup:function(e){return t.$store.commit("slideshows/updateTitle",e.target.value)},blur:function(e){return t.save()}}}),t._v(" "),e("svg",{staticClass:"pointer-events-none opacity-0 transition-all duration-300 ease-in absolute m-2 w-6 top-0 right-0 text-gray rtl:left-0 rtl:right-auto",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}})])]),t._v(" "),e("transition",{attrs:{name:"pop-in-quick-top"}},[t.currentSavedTitle.trim()!==t.current.title.trim()?e("div",{staticClass:"absolute text-gray-dark -ml-4 mt-2 mb-0 text-xs",domProps:{innerHTML:t._s(t.sprintf(t.__("Press %s to save or %s to cancel.","ml-slider"),t.sprintf("%s",t._x("Enter","The ENTER key on a keyboard","ml-slider")),t.sprintf("%s",t._x("Escape","The ESCAPE key on a keyboard","ml-slider"))))}}):t._e()])],1)}),[],!1,null,null,null).exports);function Fh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Hh(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var zh={data(){return{useTitle:!1}},computed:function(t){for(var e=1;e{let e=window.getSelection().toString().split("'").map((function(t,e){return t.trim()})).join("'");t.clipboardData.setData("text/plain",e),t.preventDefault()}))},methods:{copyShortcode(t){this.selectText(t.target).copySelected()},copyAll(){this.selectText(this.$refs.shortcode).copySelected()},selectText(t){let e,n;return window.getSelection?(n=window.getSelection(),e=document.createRange(),e.selectNodeContents(t),n.removeAllRanges(),n.addRange(e)):document.body.createTextRange&&(e=document.body.createTextRange(),e.moveToElementText(t),e.select()),this},copySelected(){try{document.execCommand("copy")&&this.notifySuccess("metaslider/copy-success",this.__("Shortcode copied","ml-slider"),!0)}catch(t){this.notifySuccess("metaslider/copy-error",this.__("Shortcode unable to be copied automatically","ml-slider"),!0)}}}},Uh=jd(zh,undefined,undefined,!1,null,null,null).exports,Qh={data(){return{component:null,filename:"",classes:"w-full max-h-screen",forceOpen:!1,showX:!0}},computed:{},mounted(){xu.$on("metaslider/open-utility-modal",(t=>{if(!1=="render"in t)return this.notifyError("metaslider/utility-modal-opening-ui",this.__("Failed to open utility modal...","ml-slider")),!1;this.filename="filename"in t?t.filename:"Name not found",this.notifyInfo("metaslider/utility-modal-opening-ui",this.__("Opening utility modal...","ml-slider")+" ("+this.filename+")"),this.component=t,document.body.style.overflow="hidden"}))},methods:{close(){if(this.forceOpen)return this.forceOpen(),void this.$nextTick((()=>{this.forceOpen=!1}));this.notifyInfo("metaslider/utility-modal-closing-ui",this.__("Closing utility modal...","ml-slider")+" ("+this.filename+")"),this.filename="",this.component=null,document.body.style.overflow="initial"}}},qh=jd(Qh,(function(){var t=this,e=t._self._c;return t.component?e("div",{staticClass:"fixed w-full h-full inset-0 bg-white-70 flex items-center justify-center p-8 md:p-16",staticStyle:{"z-index":"99999"},attrs:{role:"dialog","aria-modal":"true"}},[e("div",{staticClass:"relative bg-white shadow-xl mt-16 md:mt-0",class:t.classes},[e(t.component,{tag:"component"}),t._v(" "),t.showX?e("button",{staticClass:"close-pin-btn absolute top-0 right-0 rtl:right-auto rtl:left-0 text-gray-dark -mr-3 rtl:mr-0 rtl:-ml-3 -mt-3 p-1.5 bg-white rounded-full w-8 h-8 flex items-center justify-center shadow cursor-pointer border border-gray-lighter",attrs:{"aria-label":"Close Modal"},on:{click:t.close}},[e("svg",{staticClass:"w-full",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"}})])]):t._e()],1)]):t._e()}),[],!1,null,null,null).exports,Vh=n(1272);function Yh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Jh(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Wh={props:{slideshow:{type:Object,default:()=>{}},includeImages:{type:Boolean,default:!0}},data(){return{currentSlideImage:0,slideshowPaused:!0,slideshowTimer:0}},computed:function(t){for(var e=1;et?.thumbnail)):[]}},Xu({current:"slideshows/getCurrent"})),created(){this.currentSlideImage=Math.floor(Math.random()*this.visibleSlides.length)},mounted(){this.$refs["sl-meta"+this.slideshow.id].addEventListener("mouseenter",(()=>{clearTimeout(this.slideshowTimer),this.slideshowPaused&&this.startSlideshow(),this.slideshowPaused=!1})),this.$refs["sl-meta"+this.slideshow.id].addEventListener("mouseleave",(()=>{clearTimeout(this.slideshowTimer),this.slideshowPaused=!0}))},methods:{startSlideshow(){const t=()=>{this.slideshowPaused||(this.currentSlideImage=this.currentSlideImage===this.visibleSlides.length-1?0:this.currentSlideImage+1,this.slideshowTimer=setTimeout((()=>{requestAnimationFrame(t)}),1100))};requestAnimationFrame(t)},setting(t){return this.slideshow.settings&&this.slideshow.settings.hasOwnProperty(t)?this.slideshow.settings[t]:""},modifiedAt(){return Vh.c9.fromSQL(this.slideshow.modified_at_gmt,{zone:"utc"}).setLocale(metaslider.locale).toRelative()},loadSlideshow(){window.location.replace(this.metasliderPage+"&id="+this.slideshow.id)}}},Gh=Wh,Zh=n(2050),$h={insert:"head",singleton:!1},Kh=(Wd()(Zh.A,$h),Zh.A.locals,jd(Gh,(function(){var t=this,e=t._self._c;return e("a",{ref:"sl-meta"+t.slideshow.id,staticClass:"shadow-none outline-none flex items-start p-4 px-2 group hover:bg-blue-highlight",attrs:{href:this.metasliderPage+"&id="+t.slideshow.id},on:{click:function(e){return e.preventDefault(),t.loadSlideshow()}}},[e("div",{staticClass:"mx-2 w-16 h-16 bg-gray-light"},[t.visibleSlides.length&&t.includeImages?e("div",{staticClass:"relative w-16 h-16"},t._l(t.visibleSlides,(function(n,r){return e("img",{key:n.id,staticClass:"absolute block inset-0 transition-all duration-1000 ease-linear",class:{"opacity-0":r!==t.currentSlideImage},attrs:{src:n.thumbnail}})})),0):t.includeImages?e("div",{staticClass:"border border-gray-dark flex w-16 h-16 items-center justify-center p-2 text-center text-red text-xs"},[t._v("\n\t\t\t"+t._s(t.__("No slides","ml-slider"))+"\n\t\t")]):t._e()]),t._v(" "),e("div",{staticClass:"px-2 flex-grow truncate"},[e("div",{staticClass:"flex pb-2 border-b border-gray-light group-hover:border-gray w-full truncate align-end"},[t.slideshow.id===t.current.id?e("span",{staticClass:"uppercase rounded bg-gray-darkest text-white text-xs px-1 mr-2 rtl:mr-0 rtl:ml-2"},[t._v(t._s(t.__("Current","ml-slider")))]):t._e(),t._v(" "),e("h4",{staticClass:"truncate text-base font-thin m-0 p-0 text-gray-darker group-hover:text-black"},[t._v("\n\t\t\t\t"+t._s(t.slideshow.title)+"\n\t\t\t")])]),t._v(" "),e("p",{staticClass:"text-gray group-hover:text-gray-darker text-xs m-0 mt-1 whitespace-normal"},[t._v("\n\t\t\tid: #"+t._s(t.slideshow.id)+" "),e("span",{staticClass:"text-black"},[t._v("·")]),t._v("\n\t\t\t"+t._s(t.setting("width"))+"x"+t._s(t.setting("height"))+" "),e("span",{staticClass:"text-blackest"},[t._v("·")]),t._v("\n\t\t\t"+t._s(t.sprintf(t._x("%s slides",'number of slides, ex "7 slides"',"ml-slider"),t.slideshow.slides.length))+" "),e("span",{staticClass:"text-blackest"},[t._v("·")]),t._v(" "),e("span",{attrs:{title:t.slideshow.modified_at_gmt}},[t._v(t._s(t.sprintf(t.__("last updated: %s","ml-slider"),t.modifiedAt())))])])])])}),[],!1,null,null,null).exports);function Xh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function tp(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ep={components:{"slideshow-meta":Kh},props:{max:{type:Number|String,default:25}},data(){return{focused:!1,selectedSlideshow:-1,maybeAboutToClick:!1,searchTerm:"",searching:!0,slideshows:{}}},watch:{focused(){this.focused||!this.slideshows.length||this.maybeAboutToClick||this.resetSelectedPosition()},searchTerm(){this.searching=!0,this.slideshows={},this.resetSelectedPosition(),this.search()}},computed:function(t){for(var e=1;e-1?this.slideshows[this.selectedSlideshow].id:null},minHeight(){return this.slideshows.length>4?300:50*this.slideshows.length}},$u({totalSlideshows:t=>t.slideshows.totalSlideshows})),created(){xu.$on("metaslider/title-saved",(()=>{this.search()}))},mounted(){Vf("ctrl+/",(()=>this.focusInput())),Vf("escape",(()=>this.blurInput())),Vf("enter",(()=>this.loadSlideshow())),Vf("up,down",((t,e)=>this.navigateSlideshows(t,e))),Vf.filter=t=>!0,this.search()},methods:{focusInput(){this.$refs.switcher.focus()},blurInput(){this.maybeAboutToClick=!1,this.focused&&this.$refs.switcher.blur()},resetInput(){this.focusInput(),this.searchTerm=""},loadSlideshow(){this.focused&&(this.selectedSlideshow<0||this.slideshows.length&&(event.preventDefault(),window.location.replace(this.metasliderPage+"&id="+this.slideshows[this.selectedSlideshow].id)))},navigateSlideshows(t,e){if(this.focused)switch(t.preventDefault(),e.key){case"down":this.selectedSlideshow+10&&(this.selectedSlideshow--,this.bringSelectedItemIntoFocus())}},bringSelectedItemIntoFocus(){this.$refs["switcher-view-area"]&&this.$refs["switcher-view-area"].children[this.selectedSlideshow].scrollIntoView({block:"nearest"})},resetSelectedPosition(){this.selectedSlideshow=0,this.bringSelectedItemIntoFocus(),this.selectedSlideshow=-1},search:ku.debounce((function(){this.searching=!0,Td.search(this.searchTerm,this.max).then((t=>{this.slideshows=t.data.data})).catch((t=>{this.notifyError("metaslider/search-error",t,!0)})).finally((()=>{this.searching=!1}))}),500)}},np=ep,rp=n(1803),ip={insert:"head",singleton:!1},op=(Wd()(rp.A,ip),rp.A.locals,jd(np,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"relative w-full h-full py-4"},[e("span",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.searchTerm,expression:"searchTerm"}],ref:"switcher",staticClass:"h-full w-full border border-gray-light focus:bg-white focus:shadow bg-gray-lightest transition duration-300 ease-in shadow-none focus:outline-none border-transparent placeholder-gray-darker rounded m-0 px-8 block appearance-none leading-normal ds-input",attrs:{placeholder:t.__("Search slideshows (Press ctrl + / to focus)","ml-slider"),"data-lpignore":"true",type:"text",id:"ms-slideshow-switcher"},domProps:{value:t.searchTerm},on:{focus:function(e){t.focused=!0,e.target.select()},blur:function(e){t.focused=!1},input:function(e){e.target.composing||(t.searchTerm=e.target.value)}}}),t._v(" "),e("span",{staticClass:"top-arrow absolute z-50 w-full mt-3 shadow-md",class:{hidden:!t.maybeAboutToClick&&!t.focused},attrs:{role:"listbox"},on:{mouseover:function(e){t.maybeAboutToClick=!0},mouseout:function(e){t.maybeAboutToClick=!1}}},[e("div",{staticClass:"relative border border-gray-light bg-white rounded pb-2"},[t.searching?[e("span",{staticClass:"block text-sm font-hairline m-4 mb-2"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.__("Searching slideshows...","ml-slider"))+"\n\t\t\t\t\t\t")])]:[e("div",{staticClass:"flex justify-between items-center pb-2 m-4 mb-2 border-b border-gray-lighter"},[e("h3",{staticClass:"text-sm text-gray-dark font-hairline m-0"},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.summaryText)+"\n\t\t\t\t\t\t\t")])]),t._v(" "),t.slideshows.length?e("ul",{ref:"switcher-view-area",staticClass:"overflow-scroll overflow-x-hidden",staticStyle:{"max-height":"30vh"},style:"min-height:"+t.minHeight+"px",attrs:{role:"navigation","aria-label":"Slideshow search"}},t._l(t.slideshows,(function(n,r){return e("li",{key:n.id,ref:"switch-item-"+n.id,refInFor:!0,staticClass:"m-0",class:{"bg-blue-highlight highlighted-slideshow-nav":t.highlighted===n.id},on:{mouseover:function(e){t.selectedSlideshow=r}}},[e("slideshow-meta",{attrs:{slideshow:n}})],1)})),0):e("div",{staticClass:"py-2 px-4"},[t._v(t._s(t.__("No slideshows found","ml-slider")))])]],2)])]),t._v(" "),e("div",{staticClass:"absolute inset-y-0 left-0 pl-3 rtl:left-auto rtl:right-0 rtl:pr-3 rtl:pl-0 flex items-center text-gray-dark",class:{"pointer-events-none":t.focused},on:{click:function(e){return t.focusInput()}}},[t.searching?e("svg",{staticClass:"mt-px w-4 ms-spin",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"}})]):e("svg",{staticClass:"mt-px w-4 cursor-pointer",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"}})])]),t._v(" "),e("div",{staticClass:"absolute inset-y-0 right-0 rtl:right-auto rtl:left-0 pr-3 rtl:pl-3 rtl:pr-0 flex items-center text-gray-dark",class:{invisible:!t.searchTerm.length},on:{click:function(e){return t.resetInput()}}},[e("svg",{staticClass:"w-4 mt-px",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"}})])])])}),[],!1,null,null,null).exports),sp=n(9439),ap=n.n(sp);function lp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function cp(t){for(var e=1;e{this.sort()}),1500)()},opened(){this.opened||(this.$refs["drawer-container"].style.maxHeight="12rem",this.expanded=!1),this.saveNavPosition()},expanded(){this.$refs["drawer-container"].style.maxHeight="none"},slideshowsFiltered(){this.slideshowCountdown=this.totalSlideshows-this.slideshowsFiltered.length}},computed:cp(cp({drawerHeight(){return this.opened?"12rem":"0"},summaryText(){if(!this.slideshowsFiltered.length||!this.slideshows.length)return"";let t=this.slideshowsFiltered.length+1;if(this.slideshows.length==this.totalSlideshows){const e=1==t?this.__("1 slideshow","ml-slider"):this.__("Viewing %s out of %s slideshows","ml-slider");return this.sprintf(e,t,this.totalSlideshows)}const e=1==t?this.__("1 slideshow","ml-slider"):this.__("Viewing %s out of %s slideshows (%s loaded)","ml-slider");return this.sprintf(e,t,this.totalSlideshows,this.slideshows.length)}},$u({slideshows:t=>t.slideshows.all,fetchingAllSlideshows:t=>t.slideshows.fetchingAll,totalSlideshows:t=>t.slideshows.totalSlideshows})),Xu({currentSlideshow:"slideshows/getCurrent"})),created(){this.opened=this.open,xu.$on("metaslider/open-drawer",(()=>{this.opened=!0})),xu.$on("metaslider/close-drawer",(()=>{this.opened=!1})),xu.$on("metaslider/title-saved",(()=>{this.sort()}))},mounted(){},methods:{toggleDrawer(){this.opened=!this.opened},saveNavPosition:ku.debounce((function(){Ad.saveUserSetting("metaslider_nav_drawer_opened",this.opened)}),3e3),sort(){let t=this.searchTerm.trim().length?this.searcher.search(this.searchTerm.replace(/\s/g,"")):[...this.slideshows];this.currentSlideshow&&(t=t.filter((t=>t.id!=this.currentSlideshow.id))),this.slideshowsFiltered=t.sort(this[this.sortType]),this.sorting=!1},sortByTitle(t,e){let n=t.title.toUpperCase(),r=e.title.toUpperCase();return nr?1:0},clearCache(){window.localStorage.removeItem("metaslider-vuex-"+this.siteId),window.location.reload(!0)},fetchAllSlideshows(){this.slideshowCountdown=this.totalSlideshows-this.slideshowsFiltered.length;const t=()=>{for(this.slideshowCountdown=this.slideshowCountdown-1;Math.random()>1e-7;);this.slideshowCountdown>0&&requestAnimationFrame(t)};requestAnimationFrame(t),this.notifyInfo("metaslider-loading-all-slideshows",this.sprintf(this.__("Indexing %s slideshows into local storage...","ml-slider"),this.totalSlideshows)),this.$store.dispatch("slideshows/getAllSlideshows").then((()=>{this.notifySuccess("metaslider/all-slideshows-loaded",this.__("All Slideshows loaded","ml-slider"),!0)}))},loadingSlideshowsText(){return this.totalSlideshows<200?this.__("Fetching slideshows...","ml-slider"):this.slideshowCountdown<=0?this.__("Finished","ml-slider"):sprintf(this.__("Indexing slideshows... %s remaining","ml-slider"),this.slideshowCountdown)}}},fp=jd(dp,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"relative w-full"},[e("div",{ref:"drawer-container",staticClass:"w-full bg-gray-light transition-all duration-300 ease-in overflow-hidden border-b border-gray-lightest",style:{"max-height":t.drawerHeight}},[t.isIE11&&t.expanded&&t.totalSlideshows>25?e("div",{staticClass:"text-center p-2"},[t._v("\n\t\t\t"+t._s(t.__("This feature is not fully supported in Internet Explorer 11 and you may experience slow search result times.","ml-slider"))+"\n\t\t\t")]):t._e(),t._v(" "),t.expanded?e("div",{staticClass:"relative bg-gray border-b border-gray py-2 text-base text-black text-white w-full"},[e("div",{staticClass:"container px-6"},[e("div",{staticClass:"lg:flex items-center justify-between -mx-2"},[e("div",{staticClass:"flex lg:w-1/2 px-2 mb-2 lg:mb-0"},[e("div",{staticClass:"mr-2 rtl:mr-0 rtl:ml-2"},[e("select",{directives:[{name:"model",rawName:"v-model",value:t.sortType,expression:"sortType"}],staticClass:"text-black bg-gray-lightest block focus:bg-white h-full leading-normal m-0 rounded shadow-none",on:{change:[function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.sortType=e.target.multiple?n:n[0]},function(e){return t.sort()}]}},[e("option",{attrs:{value:"sortByTitle"}},[t._v(t._s(t.__("Sort by title","ml-slider")))]),t._v(" "),e("option",{attrs:{value:""}},[t._v(t._s(t.__("Sort by modified date","ml-slider")))])])]),t._v(" "),e("div",{staticClass:"flex-grow relative"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.searchTerm,expression:"searchTerm"}],staticClass:"appearance-none text-black bg-gray-lightest block focus:bg-white h-full leading-normal m-0 placeholder-gray-darker rounded shadow-none transition-all duration-300 ease-in w-full",attrs:{placeholder:t.__("Filter slideshows","ml-slider"),"data-lpignore":"true",type:"text"},domProps:{value:t.searchTerm},on:{input:function(e){e.target.composing||(t.searchTerm=e.target.value)}}}),t._v(" "),e("div",{staticClass:"absolute inset-y-0 right-0 rtl:right-auto rtl:left-0 pr-2 rtl:pl-2 rtl:pr-0 flex items-center text-gray-dark",class:{invisible:!t.searchTerm.length},on:{click:function(e){t.searchTerm=""}}},[e("svg",{staticClass:"w-4",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"}})])])])]),t._v(" "),e("div",{staticClass:"lg:w-1/2 px-2"},[e("div",{staticClass:"flex items-center justify-between -mx-2"},[t.sorting?e("p",{staticClass:"m-0 text-center"},[e("svg",{staticClass:"inline w-5 ms-spin text-gray-darker",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"}})]),t._v("\n "+t._s(t.__("Searching...","ml-slider"))+"\n\t\t\t\t\t\t\t")]):e("p",{staticClass:"m-0 p-2 text-center"},[t._v(t._s(t.summaryText))]),t._v(" "),e("div",{staticClass:"p-2 flex"},[t.fetchingAllSlideshows?e("div",{staticClass:"flex items-center"},[e("svg",{staticClass:"w-4 ms-spin mr-1 rtl:mr-0 rtl:ml-1",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}})]),t._v(" "),t.slideshows.length0}})],1)])})),t._v(" "),t.expanded?t._e():e("li",{staticStyle:{"min-width":"4rem"}})],2)])]:[e("span",{staticClass:"flex items-center font-normal container text-xl my-4 h-24"},[t._v("\n\t\t\t\t"+t._s(t.searchTerm.length?t.__("No slideshows found","ml-slider"):t.__("Loading slideshows...","ml-slider"))+"\n\t\t\t")])]],2),t._v(" "),e("div",{staticClass:"container mx-auto flex px-6"},[e("button",{staticClass:"block relative transition-all duration-300 ease-in text-xs text-gray-dark px-4 -mt-px border border-t-0 hover:bg-gray-light focus:bg-gray-light rounded-b shadow-none outline-none",class:{"bg-gray-light border-gray-light":t.opened,"bg-gray-lighter pt-1 border-transparent":!t.opened},on:{click:function(e){e.preventDefault(),t.toggleDrawer(),t.searchTerm=""}}},[t.opened?e("svg",{staticClass:"w-4",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"}})]):[t._v("\n\t\t\t\t\t"+t._s(t.__("Browse slideshows","ml-slider"))+"\n\t\t\t")]],2),t._v(" "),t.opened&&t.slideshowsFiltered.length>4?e("button",{staticClass:"block relative transition-all duration-300 ease-in text-xs text-gray-dark px-4 -mt-px border border-t-0 bg-gray-lighter hover:bg-gray-light rounded-b shadow-none outline-none border-gray-light tipsy-tooltip-bottom-toolbar",attrs:{title:t.expanded?t.__("Collapse","ml-slider"):t.__("Press to expand","ml-slider")},on:{click:function(e){e.preventDefault(),t.expanded=!t.expanded,t.searchTerm=""}}},[e("svg",{staticClass:"w-4",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 9l4-4 4 4m0 6l-4 4-4-4"}})])]):t._e()])])}),[],!1,null,null,null).exports,hp=jd({props:{},data(){return{}},created(){},mounted(){},methods:{}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"mt-6 md:mt-0"},[e("div",{staticClass:"md:grid md:grid-cols-3 md:gap-6"},[e("div",{staticClass:"md:col-span-1"},[e("div",{staticClass:"px-0 inner-wrap"},[e("h3",{staticClass:"text-lg font-medium m-0 leading-6 text-gray-darkest"},[t._t("header")],2),t._v(" "),e("p",{staticClass:"m-0 mt-1 text-sm leading-5 text-gray-darker"},[t._t("description")],2),t._v(" "),this.$slots.description2?e("p",{staticClass:"m-0 font-bold mt-2 text-sm leading-5 text-gray-darker"},[t._t("description2")],2):t._e(),t._v(" "),this.$slots.description3?e("p",{staticClass:"m-0 italic mt-2 text-sm leading-5 text-gray-darker"},[t._t("description3")],2):t._e()])]),t._v(" "),e("div",{staticClass:"mt-5 md:mt-0 md:col-span-2"},[t._t("fields")],2)])])}),[],!1,null,null,null).exports,pp={data(){return{}},created(){},mounted(){},methods:{variableWidth(){return"width:"+(Math.floor(75*Math.random())+30)+"%"}}},mp=n(6375),gp={insert:"head",singleton:!1},vp=(Wd()(mp.A,gp),mp.A.locals,jd(pp,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"absolute bg-white inset-0 sm:p-6 px-4 py-5"},[e("div",{staticClass:"gradient max-w-full rounded-lg h-7",style:t.variableWidth()}),t._v(" "),e("div",{staticClass:"gradient max-w-full rounded-lg h-7 mt-2",style:t.variableWidth()}),t._v(" "),e("div",{staticClass:"gradient max-w-full rounded-lg h-7 mt-5",staticStyle:{width:"50%"}})])}),[],!1,null,"36b0821f",null).exports),yp=jd({props:{value:String,name:String,wrapperClass:{type:String,default:"w-full"}},components:{"loading-element":vp},data(){return{}},created(){},mounted(){},methods:{save(){this.$emit("click")}}},(function(){var t=this,e=t._self._c;return e("form",{staticClass:"bg-white shadow mb-4 relative",attrs:{autocomplete:"off",action:"#",method:"POST"},on:{keydown:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;e.preventDefault()}}},[e("div",{staticClass:"px-4 py-5 md:p-6"},[e("h3",{staticClass:"text-lg leading-6 m-0 font-medium text-gray-darkest"},[t._t("header")],2),t._v(" "),e("div",{staticClass:"mt-2 max-w-xl text-sm leading-5 text-gray-dark"},[e("div",{staticClass:"m-0 pt-0"},[t._t("description")],2)]),t._v(" "),e("div",{staticClass:"mt-5 md:flex md:items-center"},[e("div",{class:[t.wrapperClass,"max-w-xs"]},[e("label",{staticClass:"sr-only",attrs:{for:t.name}},[t._t("input-label")],2),t._v(" "),e("div",{staticClass:"relative rounded-md shadow-sm"},[e("input",{staticClass:"form-input block w-full md:text-sm md:leading-5",attrs:{id:t.name,placeholder:t.value},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}})])]),t._v(" "),e("span",{staticClass:"mt-3 inline-flex rounded-md shadow-sm md:mt-0 md:ml-3 md:w-auto"},[e("button",{staticClass:"w-full inline-flex items-center justify-center px-4 py-2 border border-transparent font-medium rounded-md text-white bg-orange hover:bg-orange-darker active:bg-orange-darkest transition ease-in-out duration-150 md:w-auto md:text-sm md:leading-5",attrs:{type:"button"},on:{click:t.save}},[t._v("\n\t\t"+t._s(t.__("Save","ml-slider"))+"\n\t\t")])])])]),t._v(" "),e("transition",{attrs:{name:"settings-fade",mode:"in-out"}},[t.$parent.$attrs.loading?e("loading-element"):t._e()],1)],1)}),[],!1,null,null,null).exports,bp={data(){return{}},created(){},mounted(){},methods:{variableWidth(){return"width:"+(Math.floor(75*Math.random())+30)+"%"}}},_p=n(3512),xp={insert:"head",singleton:!1},kp=(Wd()(_p.A,xp),_p.A.locals,jd(bp,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"absolute flex flex-col bg-white inset-0 sm:p-6 px-4 py-5"},[e("div",{staticClass:"gradient max-w-full rounded-lg h-7",style:t.variableWidth()}),t._v(" "),e("div",{staticClass:"mt-2 sm:flex md:flex-grow sm:items-start sm:justify-between h-7"},[e("div",{staticClass:"rounded-lg gradient max-w-xl h-full",style:t.variableWidth()}),t._v(" "),e("div",{staticClass:"rounded-lg gradient mt-5 w-12 sm:mt-0 sm:ml-6 sm:flex-shrink-0 sm:flex h-7 sm:items-center"})])])}),[],!1,null,"54e7a0bf",null).exports),Sp=jd({props:{value:{},containerMargin:{type:String,default:"mb-4"}},components:{"loading-element":kp},data(){return{}},created(){},mounted(){},methods:{toggle(){const t=!this.value;this.$emit("input",t),this.$emit("change",t)}}},(function(){var t=this,e=t._self._c;return e("form",{staticClass:"bg-white shadow relative",class:[t.containerMargin],attrs:{autocomplete:"off",action:"#",method:"POST"},on:{keydown:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;e.preventDefault()}}},[e("div",{staticClass:"px-4 py-5 sm:p-6"},[e("h3",{staticClass:"text-lg m-0 leading-6 font-medium text-gray-darkest",attrs:{id:"renew-headline"}},[t._t("header")],2),t._v(" "),this.$slots.subheader?e("p",{staticClass:"m-0 mb-2 text-gray-darker text-xs whitespace-normal"},[t._t("subheader")],2):t._e(),t._v(" "),e("div",{staticClass:"mt-2 sm:flex sm:items-start sm:justify-between"},[e("div",{staticClass:"max-w-xl text-sm leading-5 text-gray-dark overflow-hidden"},[e("div",{staticClass:"m-0 p-0",attrs:{id:"renew-description"}},[t._t("description")],2)]),t._v(" "),e("div",{staticClass:"mt-5 sm:mt-0 sm:ml-6 sm:flex-shrink-0 sm:flex sm:items-center"},[e("span",{staticClass:"relative inline-block flex-no-shrink h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-50 focus:outline-none focus:shadow-outline",class:{"bg-gray-light":!t.value,"bg-orange":t.value},attrs:{"aria-checked":!!t.value&&t.value.toString(),role:"checkbox",tabindex:"0"},on:{click:t.toggle,keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:(e.preventDefault(),t.toggle.apply(null,arguments))}}},[e("span",{staticClass:"inline-block h-5 w-5 rounded-full bg-white shadow transform transition ease-in-out duration-150",class:{"translate-x-5":t.value,"translate-x-0":!t.value},attrs:{"aria-hidden":"true"}})])])]),t._v(" "),t._t("legacy-notices")],2),t._v(" "),e("transition",{attrs:{name:"settings-fade",mode:"in-out"}},[t.$parent.$attrs.loading?e("loading-element"):t._e()],1)],1)}),[],!1,null,null,null),Cp=Sp.exports,Ep=jd({props:{link:{type:String,default:""},newTab:{type:Boolean,default:!1}},components:{},data(){return{}},created(){},mounted(){},methods:{}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"bg-white shadow"},[e("div",{staticClass:"px-4 py-5 sm:p-6 flex justify-between items-start"},[e("div",[e("h3",{staticClass:"text-lg m-0 leading-6 font-medium text-gray-900"},[t._t("header")],2),t._v(" "),this.$slots.description?e("div",{staticClass:"mt-2 max-w-xl text-sm leading-5 text-gray-500"},[e("p",[t._t("description")],2)]):t._e()]),t._v(" "),t.link?e("div",{staticClass:"mt-0 text-sm leading-5"},[e("a",{staticClass:"w-full inline-flex items-center justify-center px-4 py-2 border border-transparent font-medium rounded-md transition ease-in-out duration-150 md:w-auto md:text-sm md:leading-5 bg-orange hover:bg-orange-darker active:bg-orange-darkest text-white",attrs:{href:t.link,target:t.newTab?"_blank":"_self"}},[t._t("link-text")],2)]):t._e()])])}),[],!1,null,null,null).exports,Op={data(){return{}},created(){},mounted(){},methods:{variableWidth(){return"width:"+(Math.floor(75*Math.random())+30)+"%"}}},Tp=n(8183),Pp={insert:"head",singleton:!1},Ap=(Wd()(Tp.A,Pp),Tp.A.locals,jd(Op,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"absolute bg-white inset-0 sm:p-6 px-4 py-5"},[e("div",{staticClass:"gradient max-w-full rounded-lg h-7",style:t.variableWidth()}),t._v(" "),e("div",{staticClass:"gradient max-w-full rounded-lg h-7 mt-2",style:t.variableWidth()}),t._v(" "),e("div",{staticClass:"gradient max-w-full rounded-lg h-7 mt-5",staticStyle:{width:"50%"}})])}),[],!1,null,"14128e16",null).exports),jp=jd({props:{data:{type:Object,default:{}},canCopy:{type:Boolean,default:!0}},components:{"loading-element":Ap},data(){return{}},created(){},mounted(){},methods:{}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"bg-white shadow mb-4 relative"},[e("div",{staticClass:"px-4 py-5 sm:p-6"},[e("div",{staticClass:"flex items-start justify-between"},[e("h3",{staticClass:"text-lg m-0 leading-6 font-medium text-gray-900"},[t._t("header")],2),t._v(" "),t.canCopy?e("button",{staticClass:"w-5 text-blue",attrs:{"aria-label":t.__("Copy all","ml-slider"),title:t.__("Copy all","ml-slider")}},[e("svg",{staticClass:"w-5 inline mr-2",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}})])]):t._e()]),t._v(" "),this.$slots.description?e("div",{staticClass:"mt-2 text-sm leading-5 text-gray-500"},[e("p",[t._t("description")],2),t._v(" "),t._t("data-extra")],2):t._e()]),t._v(" "),e("transition",{attrs:{name:"settings-fade",mode:"in-out"}},[t.$parent.$attrs.loading?e("loading-element"):t._e()],1)],1)}),[],!1,null,null,null),Ip=jd({components:{"data-box":jp.exports,"split-layout":hp,"text-single-input":yp,"textbox-with-link":Ep,"switch-single-input":Cp},props:{},data(){return{loading:!0,settings:{license:"",optIn:!1}}},computed:{},created(){},mounted(){},methods:{saveSettings(){const t=JSON.stringify(this.settings);Ad.saveDefaults(t).then((t=>{let{data:e}=t;this.notifyInfo("metaslider/settings-page-setting-saved",this.__("All settings saved","ml-slider"),!0)})).catch((t=>{this.notifyError("metaslider/settings-save-error",t.response,!0)}))}}},(function(){var t=this,e=t._self._c;return e("div",[e("split-layout",{attrs:{loading:t.loading}},[e("template",{slot:"header"},[t._v(t._s(t.__("Help Center","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Here you will find documentation, and two support tiers to choose from. Additionally, you may supply us with extra information specific to your website, server, etc.","ml-slider")))]),t._v(" "),e("template",{slot:"fields"},[e("textbox-with-link",{staticClass:"mb-4",attrs:{link:"https://www.metaslider.com/docs/","new-tab":!0}},[e("template",{slot:"header"},[t._v(t._s(t.__("Documentation 📚","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Check out our documentation page for examples, and more information about what you can do with MetaSlider.","ml-slider")))]),t._v(" "),e("template",{slot:"link-text"},[t._v(t._s(t.__("Visit documentation","ml-slider")))])],2),t._v(" "),e("textbox-with-link",{staticClass:"mb-4",attrs:{link:"https://wordpress.org/plugins/ml-slider","new-tab":!0}},[e("template",{slot:"header"},[t._v(t._s(t.__("Free Basic Support 🚀","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("For users of the free version of MetaSlider, we offer full free support on the wordpress.org forums.","ml-slider")))]),t._v(" "),e("template",{slot:"link-text"},[t._v(t._s(t.__("Visit wordpress.org","ml-slider")))])],2),t._v(" "),e("textbox-with-link",{staticClass:"mb-4",attrs:{link:"https://www.metaslider.com/support","new-tab":!0}},[e("template",{slot:"header"},[t._v(t._s(t.__("Paid Premium Support 🌟","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Paid users of the premium plugin can open a ticket on our private support center to receive personalized support and faster response times.","ml-slider")))]),t._v(" "),e("template",{slot:"link-text"},[t._v(t._s(t.__("Visit metaslider.com","ml-slider")))])],2),t._v(" "),e("data-box",{staticClass:"lg:mt-10 hidden",attrs:{data:{foo:"bar"},"can-copy":!0}},[e("template",{slot:"header"},[t._v(t._s(t.__("Site Information","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v("\n "+t._s(t.__("For your convenience, you can copy the basic site information before to help us speed up the debugging process. Be sure to verify that no personal information is included that you might want to keep private.","ml-slider"))+"\n ")]),t._v(" "),e("template",{slot:"data-extra"},[e("div",{staticClass:"border-2 border-gray border-dashed h-64"})])],2)],1)],2)],1)}),[],!1,null,null,null).exports,Mp=jd({props:["value","name"],components:{"loading-element":vp},data(){return{}},created(){},mounted(){},methods:{save(){this.$emit("click")}}},(function(){var t=this,e=t._self._c;return e("form",{staticClass:"mobile-settings-form",attrs:{autocomplete:"off",action:"#",method:"POST"},on:{keydown:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;e.preventDefault()}}},[e("div",{staticClass:"mt-5 flex items-center"},[e("div",{staticClass:"max-w-xs w-full"},[e("input",{staticClass:"form-input block w-full md:text-sm md:leading-5 relative rounded-md shadow-sm",attrs:{id:t.name,placeholder:t.value},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}})]),t._v(" "),e("span",{staticClass:"ml-2 inline-flex rounded-md shadow-sm md:mt-0 md:ml-3 md:w-auto mobile-settings"},[e("button",{staticClass:"w-full inline-flex items-center justify-center px-4 py-2 border border-transparent font-medium rounded-md text-white bg-orange hover:bg-orange-darker active:bg-orange-darkest transition ease-in-out duration-150 md:w-auto md:text-sm md:leading-5",attrs:{type:"button"},on:{click:t.save}},[t._v("\n "+t._s(t.__("Save","ml-slider"))+"\n ")])])]),t._v(" "),e("transition",{attrs:{name:"settings-fade",mode:"in-out"}},[t.$parent.$attrs.loading?e("loading-element"):t._e()],1)],1)}),[],!1,null,null,null).exports,Dp=jd({props:{value:{},containerMargin:{type:String,default:"mb-4"}},components:{"loading-element":kp},data(){return{}},created(){},mounted(){},methods:{},computed:{proText(){const t=this.$slots.proText;return t&&t.length&&t[0].text||""}}},(function(){var t=this,e=t._self._c;return e("form",{staticClass:"bg-white shadow relative",class:[t.containerMargin],attrs:{autocomplete:"off",action:"#",method:"POST"},on:{keydown:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;e.preventDefault()}}},[e("div",{staticClass:"px-4 py-5 sm:p-6"},[e("h3",{staticClass:"text-lg m-0 leading-6 font-medium text-gray-darkest",attrs:{id:"renew-headline"}},[t._t("header")],2),t._v(" "),this.$slots.subheader?e("p",{staticClass:"m-0 mb-2 text-gray-darker text-xs whitespace-normal"},[t._t("subheader")],2):t._e(),t._v(" "),e("div",{staticClass:"mt-2 sm:flex sm:items-start sm:justify-between"},[e("div",{staticClass:"max-w-xl text-sm leading-5 text-gray-dark overflow-hidden"},[e("div",{staticClass:"m-0 p-0",attrs:{id:"renew-description"}},[t._t("description")],2)]),t._v(" "),e("div",{staticClass:"mt-5 sm:mt-0 sm:ml-6 sm:flex-shrink-0 sm:flex sm:items-center"},[e("span",{staticClass:"opacity-50 pointer-events-none relative inline-block flex-no-shrink h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-50 focus:outline-none focus:shadow-outline",class:{"bg-gray-light":!t.value,"bg-orange":t.value},attrs:{"aria-checked":!!t.value&&t.value.toString(),role:"checkbox",tabindex:"0"}},[e("span",{staticClass:"inline-block h-5 w-5 rounded-full bg-white shadow transform transition ease-in-out duration-150",class:{"translate-x-5":t.value,"translate-x-0":!t.value},attrs:{"aria-hidden":"true"}})]),t._v(" "),e("a",{staticClass:"dashicons dashicons-lock is-pro-setting tipsy-tooltip-top",attrs:{"original-title":t.proText,href:"https://www.metaslider.com/upgrade?utm_source=lite&utm_medium=banner&utm_campaign=pro",target:"_blank"}})])]),t._v(" "),t._t("legacy-notices")],2),t._v(" "),e("transition",{attrs:{name:"settings-fade",mode:"in-out"}},[t.$parent.$attrs.loading?e("loading-element"):t._e()],1)],1)}),[],!1,null,null,null).exports,Lp=jd({props:["value","options"],components:{"loading-element":vp},data(){return{selectedValue:this.value}},watch:{value(t){this.selectedValue=t},selectedValue(t){this.$emit("input",t)}},created(){},mounted(){},methods:{save(){this.$emit("click")}}},(function(){var t=this,e=t._self._c;return e("form",{staticClass:"bg-white shadow mb-4 relative",attrs:{autocomplete:"off",action:"#",method:"POST"},on:{keydown:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;e.preventDefault()}}},[e("div",{staticClass:"px-4 py-5 md:p-6"},[e("h3",{staticClass:"text-lg leading-6 m-0 font-medium text-gray-darkest"},[t._t("header")],2),t._v(" "),e("div",{staticClass:"mt-2 max-w-xl text-sm leading-5 text-gray-dark"},[e("div",{staticClass:"m-0 pt-0"},[t._t("description")],2)]),t._v(" "),e("div",{staticClass:"mt-5 md:flex md:items-center"},[e("div",{staticClass:"max-w-xs w-full"},[e("label",{staticClass:"sr-only",attrs:{for:t.name}},[t._t("input-label")],2),t._v(" "),e("div",{staticClass:"relative rounded-md shadow-sm"},[e("select",{directives:[{name:"model",rawName:"v-model",value:t.selectedValue,expression:"selectedValue"}],staticClass:"form-select form-select--forced block w-full md:text-sm md:leading-5",attrs:{id:t.name},on:{input:function(e){return t.$emit("input",e.target.value)},change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.selectedValue=e.target.multiple?n:n[0]}}},t._l(t.options,(function(n){return e("option",{key:n.value,attrs:{disabled:void 0!==n.disabled&&n.disabled},domProps:{value:n.value,selected:n.value===t.selectedValue}},[t._v("\n\t\t\t\t\t"+t._s(n.label)+"\n\t\t\t\t")])})),0)])]),t._v(" "),e("span",{staticClass:"mt-3 inline-flex rounded-md shadow-sm md:mt-0 md:ml-3 md:w-auto"},[e("button",{staticClass:"w-full inline-flex items-center justify-center px-4 py-2 border border-transparent font-medium rounded-md text-white bg-orange hover:bg-orange-darker active:bg-orange-darkest transition ease-in-out duration-150 md:w-auto md:text-sm md:leading-5",attrs:{type:"button"},on:{click:t.save}},[t._v("\n\t\t"+t._s(t.__("Save","ml-slider"))+"\n\t\t")])])])]),t._v(" "),e("transition",{attrs:{name:"settings-fade",mode:"in-out"}},[t.$parent.$attrs.loading?e("loading-element"):t._e()],1)],1)}),[],!1,null,null,null).exports,Bp=jd({props:{link:{type:String,default:""},newTab:{type:Boolean,default:!1}},components:{},data(){return{}},created(){},mounted(){},methods:{}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"max-w-4xl mb-6"},[e("div",{staticClass:"bg-yellow-50 border-l-4 border-yellow-400 p-4"},[e("div",{staticClass:"flex"},[e("div",{staticClass:"flex-shrink-0"},[e("svg",{staticClass:"h-5 w-5 text-yellow-400",attrs:{fill:"currentColor",viewBox:"0 0 20 20"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"}})])]),t._v(" "),e("div",{staticClass:"ml-3"},[e("p",{staticClass:"text-sm p-0 m-0 leading-5 text-yellow-700"},[t._t("description"),t._v(" "),t.link?e("a",{staticClass:"font-medium underline text-yellow-700 hover:text-yellow-600 transition ease-in-out duration-150",attrs:{href:t.link,target:t.newTab?"_blank":"_self"}},[t._t("link-text")],2):t._e()],2)])])])])}),[],!1,null,null,null).exports,Rp={components:{"split-layout":hp,"text-single-input":yp,"text-multiple-input":Mp,"switch-single-input":Cp,"switch-single-input-ad":Dp,"select-field-input":Lp,"alert-warning-small":Bp},props:{},data(){return{loading:!0,slideshowDefaults:{title:"",fullWidth:!1,navigation:!0,autoPlay:!0,width:0,height:0,smartphone:480,tablet:768,laptop:1024,desktop:1440},globalSettings:{license:"",adminBar:!0,editLink:!1,legacy:!0,newSlideOrder:"last",mobileSettings:!0,legacyWidget:!0,tinyMce:!0,fixTouchSwipe:!1,autoThemeConfig:!0,dashboardSort:"ID",dashboardOrder:"asc",dashboardItems:10},proSettings:{postFeedFields:100,legacyThemeEditor:!1,flushCache:!1},legacySlideshows:{}}},computed:{defaultTitleDescription(){return this.sprintf(this.__("Change the default title that will be used when creating a new slideshow. Use %s and it will be replaced by the current slideshow ID.","ml-slider"),'{id}')},licenseDescription(){return this.sprintf(this.__("If you are a pro member, enter your license key here to receive updates. %s","ml-slider"),`${this.__("Upgrade here","ml-slider")}`)},isDisabled(){return legacySlideshows,this.form.validated},navigationOptions(){return[...[{value:!1,label:this.__("Hidden","ml-slider")},{value:!0,label:this.__("Dots","ml-slider")},{value:"dots_onhover",label:this.__("Dots - Visible On Hover","ml-slider")}],{value:"thumbs",label:this.isPro()?this.__("Thumbnail","ml-slider"):this.__("Thumbnail (Pro)","ml-slider"),disabled:!this.isPro()},{value:"thumbs_onhover",label:this.isPro()?this.__("Thumbnails - Visible On Hover","ml-slider"):this.__("Thumbnails - Visible On Hover (Pro)","ml-slider"),disabled:!this.isPro()},{value:"filmstrip",label:this.isPro()?this.__("Filmstrip","ml-slider"):this.__("Filmstrip (Pro)","ml-slider"),disabled:!this.isPro()},{value:"filmstrip_onhover",label:this.isPro()?this.__("Filmstrip - Visible On Hover","ml-slider"):this.__("Filmstrip - Visible On Hover (Pro)","ml-slider"),disabled:!this.isPro()}]}},created(){Ad.getSlideshowDefaults().then((t=>{let{data:e}=t;Object.keys(e.data).forEach((t=>{this.slideshowDefaults.hasOwnProperty(t)&&(this.slideshowDefaults[t]=e.data[t])})),this.loading=!1})).catch((t=>{this.notifyError("metaslider/settings-load-error",t.response,!0)})),Ad.getGlobalSettings().then((t=>{let{data:e}=t;Object.keys(e.data).forEach((t=>{this.globalSettings.hasOwnProperty(t)&&(this.globalSettings[t]=e.data[t])})),this.loading=!1})).catch((t=>{this.notifyError("metaslider/settings-load-error",t.response,!0)})),Ad.getProSettings().then((t=>{let{data:e}=t;Object.keys(e.data).forEach((t=>{this.proSettings.hasOwnProperty(t)&&(this.proSettings[t]=e.data[t])})),this.loading=!1})).catch((t=>{this.notifyError("metaslider/settings-load-error",t.response,!0)})),Td.legacy().then((t=>{let{data:e}=t;this.legacySlideshows=e.data}))},mounted(){},methods:{saveSlideshowDefaultSettings(){const t=JSON.stringify(this.slideshowDefaults);Ad.saveSlideshowDefaults(t).then((t=>{let{data:e}=t;this.notifyInfo("metaslider/settings-page-slideshow-settings-saved",this.__("Slideshow settings saved","ml-slider"),!0)})).catch((t=>{this.notifyError("metaslider/settings-save-error",t.response,!0)}))},async saveGlobalSettings(){const t=JSON.stringify(this.globalSettings);Ad.saveGlobalSettings(t).then((t=>{let{data:e}=t;this.notifyInfo("metaslider/settings-page-global-settings-saved",this.__("Global settings saved","ml-slider"),!0)})).catch((t=>{this.notifyError("metaslider/settings-save-error",t.response,!0)}))},saveProSettings(){const t=JSON.stringify(this.proSettings);Ad.saveProSettings(t).then((t=>{let{data:e}=t;this.notifyInfo("metaslider/settings-page-slideshow-settings-saved",this.__("Pro settings saved","ml-slider"),!0)})).catch((t=>{this.notifyError("metaslider/settings-save-error",t.response,!0)}))},isPro(){return"undefined"!==metaslider_api.proUser&&1===Number(metaslider_api.proUser)}},watch:{legacySlideshows(t){0!==t&&(this.globalSettings.legacy=!1)}}},Np=jd(Rp,(function(){var t=this,e=t._self._c;return e("div",[e("split-layout",{attrs:{loading:t.loading}},[e("template",{slot:"header"},[t._v(t._s(t.__("Slideshow Defaults","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Update the default settings used when creating new slideshows.","ml-slider")))]),t._v(" "),e("template",{slot:"fields"},[e("text-single-input",{attrs:{name:"default-slideshow-title"},on:{click:function(e){return t.saveSlideshowDefaultSettings()}},model:{value:t.slideshowDefaults.title,callback:function(e){t.$set(t.slideshowDefaults,"title",e)},expression:"slideshowDefaults.title"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Default Slideshow Title","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[e("span",{domProps:{innerHTML:t._s(t.defaultTitleDescription)}})]),t._v(" "),e("template",{slot:"input-label"},[t._v("\n\t\t\t\t\t"+t._s(t.__("Change the default title","ml-slider"))+"\n\t\t\t\t")])],2),t._v(" "),e("text-single-input",{attrs:{name:"default-slideshow-width","wrapper-class":"w-24"},on:{click:function(e){return t.saveSlideshowDefaultSettings()}},model:{value:t.slideshowDefaults.width,callback:function(e){t.$set(t.slideshowDefaults,"width",e)},expression:"slideshowDefaults.width"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Default Base Image Width","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Update the default width for the base image. This will be used for the slideshow dimensions and base image cropping.","ml-slider")))]),t._v(" "),e("template",{slot:"input-label"},[t._v("\n\t\t\t\t\t"+t._s(t.__("Change the default width","ml-slider"))+"\n\t\t\t\t")])],2),t._v(" "),e("text-single-input",{attrs:{name:"default-slideshow-height","wrapper-class":"w-24"},on:{click:function(e){return t.saveSlideshowDefaultSettings()}},model:{value:t.slideshowDefaults.height,callback:function(e){t.$set(t.slideshowDefaults,"height",e)},expression:"slideshowDefaults.height"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Default Base Image Height","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Update the default height for the base image. This will be used for the base image cropping and slideshow dimensions. If set to 100% width, the height will scale accordingly.","ml-slider")))]),t._v(" "),e("template",{slot:"input-label"},[t._v("\n\t\t\t\t\t"+t._s(t.__("Change the default width","ml-slider"))+"\n\t\t\t\t")])],2),t._v(" "),e("switch-single-input",{on:{change:function(e){return t.saveSlideshowDefaultSettings()}},model:{value:t.slideshowDefaults.fullWidth,callback:function(e){t.$set(t.slideshowDefaults,"fullWidth",e)},expression:"slideshowDefaults.fullWidth"}},[e("template",{slot:"header"},[t._v(t._s(t.__("100% Width","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("While the width and height defined above will be used for cropping (if enabled) and the base slideshow dimensions, you may also set the slideshow to stretch to its container.","ml-slider")))])],2),t._v(" "),e("select-field-input",{attrs:{options:t.navigationOptions},on:{click:function(e){return t.saveSlideshowDefaultSettings()}},model:{value:t.slideshowDefaults.navigation,callback:function(e){t.$set(t.slideshowDefaults,"navigation",e)},expression:"slideshowDefaults.navigation"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Default Navigation","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Change the default navigation when creating a new slideshow.","ml-slider")))])],2),t._v(" "),e("switch-single-input",{on:{change:function(e){return t.saveSlideshowDefaultSettings()}},model:{value:t.slideshowDefaults.autoPlay,callback:function(e){t.$set(t.slideshowDefaults,"autoPlay",e)},expression:"slideshowDefaults.autoPlay"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Auto Play","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Change the default transition between slides.","ml-slider")))])],2)],1)],2),t._v(" "),e("split-layout",{staticClass:"lg:mt-6",attrs:{loading:t.loading}},[e("template",{slot:"header"},[t._v(t._s(t.__("Global Settings","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Update the settings used for all the slideshows on your site.","ml-slider")))]),t._v(" "),e("template",{slot:"fields"},[e("text-single-input",{staticClass:"hidden",attrs:{name:"ms-license"},on:{click:function(e){return t.saveGlobalSettings()}},model:{value:t.globalSettings.license,callback:function(e){t.$set(t.globalSettings,"license",e)},expression:"globalSettings.license"}},[e("template",{slot:"header"},[t._v(t._s(t.__("License Key","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[e("span",{domProps:{innerHTML:t._s(t.licenseDescription)}})]),t._v(" "),e("template",{slot:"input-label"},[t._v("\n\t\t\t\t\t"+t._s(t.__("Update license key","ml-slider"))+"\n\t\t\t\t")])],2),t._v(" "),e("switch-single-input",{on:{change:function(e){return t.saveGlobalSettings()}},model:{value:t.globalSettings.mobileSettings,callback:function(e){t.$set(t.globalSettings,"mobileSettings",e)},expression:"globalSettings.mobileSettings"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Enable Device Settings","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Add option to hide slides, captions, arrows, navigation, and the slideshow per screen size.","ml-slider")))])],2),t._v(" "),t.globalSettings.mobileSettings?[e("div",{staticClass:"bg-white shadow mb-4 relative px-4 py-5 md:p-6",attrs:{id:"mobile-settings"}},[e("h3",{staticClass:"text-lg leading-6 m-0 font-medium text-gray-darkest"},[t._v("\n\t\t\t\t\t\t"+t._s(t.__("Device Settings","ml-slider"))+"\n\t\t\t\t\t")]),t._v(" "),e("div",{staticClass:"mt-2 max-w-xl text-sm leading-5 text-gray-dark"},[e("div",{staticClass:"m-0 pt-0"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.__("Set breakpoints for different screen sizes","ml-slider"))+"\n\t\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"flex flex-wrap ms-settings-row"},[e("div",{staticClass:"flex items-center ms-settings-col"},[e("div",{staticClass:"mobile-icon-wrap text-gray-dark flex items-center"},[e("span",{staticClass:"dashicons dashicons-smartphone text-3xl"}),t._v(" "),e("span",{staticClass:"ms-icon-name"},[t._v(t._s(t.__("Smartphone","ml-slider")))])]),t._v(" "),e("text-multiple-input",{attrs:{name:"default-slideshow-smartphone"},on:{click:function(e){return t.saveSlideshowDefaultSettings()}},model:{value:t.slideshowDefaults.smartphone,callback:function(e){t.$set(t.slideshowDefaults,"smartphone",e)},expression:"slideshowDefaults.smartphone"}})],1),t._v(" "),e("div",{staticClass:"flex items-center ms-settings-col"},[e("div",{staticClass:"mobile-icon-wrap text-gray-dark flex items-center"},[e("span",{staticClass:"dashicons dashicons-tablet text-3xl"}),t._v(" "),e("span",{staticClass:"ms-icon-name"},[t._v(t._s(t.__("Tablet","ml-slider")))])]),t._v(" "),e("text-multiple-input",{attrs:{name:"default-slideshow-tablet"},on:{click:function(e){return t.saveSlideshowDefaultSettings()}},model:{value:t.slideshowDefaults.tablet,callback:function(e){t.$set(t.slideshowDefaults,"tablet",e)},expression:"slideshowDefaults.tablet"}})],1),t._v(" "),e("div",{staticClass:"flex items-center ms-settings-col"},[e("div",{staticClass:"mobile-icon-wrap text-gray-dark flex items-center"},[e("span",{staticClass:"dashicons dashicons-laptop text-3xl"}),t._v(" "),e("span",{staticClass:"ms-icon-name"},[t._v(t._s(t.__("Laptop","ml-slider")))])]),t._v(" "),e("text-multiple-input",{attrs:{name:"default-slideshow-laptop"},on:{click:function(e){return t.saveSlideshowDefaultSettings()}},model:{value:t.slideshowDefaults.laptop,callback:function(e){t.$set(t.slideshowDefaults,"laptop",e)},expression:"slideshowDefaults.laptop"}})],1),t._v(" "),e("div",{staticClass:"flex items-cente ms-settings-col"},[e("div",{staticClass:"mobile-icon-wrap text-gray-dark flex items-center"},[e("span",{staticClass:"dashicons dashicons-desktop text-3xl"}),t._v(" "),e("span",{staticClass:"ms-icon-name"},[t._v(t._s(t.__("Desktop","ml-slider")))])]),t._v(" "),e("text-multiple-input",{attrs:{name:"default-slideshow-desktop"},on:{click:function(e){return t.saveSlideshowDefaultSettings()}},model:{value:t.slideshowDefaults.desktop,callback:function(e){t.$set(t.slideshowDefaults,"desktop",e)},expression:"slideshowDefaults.desktop"}})],1)])])]:t._e(),t._v(" "),e("switch-single-input",{class:{disableSwitch:0!==t.legacySlideshows},on:{change:function(e){return t.saveGlobalSettings()}},model:{value:t.globalSettings.legacy,callback:function(e){t.$set(t.globalSettings,"legacy",e)},expression:"globalSettings.legacy"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Disable Legacy Libraries","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("This setting allows you to disable the legacy slideshow libraries: Nivo Slider, Coin Slider, and Responsive Slides","ml-slider")))]),t._v(" "),0===t.legacySlideshows?e("template",{slot:"legacy-notices"},[e("div",{staticClass:"notice notice-success ml-legacy-notice"},[e("p",[t._v(t._s(t.__("We recommend disabling these libraries. You can safely disable the libraries. None of your slideshows use the legacy libraries.","ml-slider")))])])]):t._e(),t._v(" "),0!==t.legacySlideshows?e("template",{slot:"legacy-notices"},[e("div",{staticClass:"notice notice-warning ml-legacy-notice"},[e("p",[t._v(t._s(t.legacySlideshows>1?t.sprintf(t.__("You currently have %s slideshows that use legacy libraries.","ml-slider"),t.legacySlideshows):t.sprintf(t.__("You currently have %s slideshow that uses legacy libraries.","ml-slider"),t.legacySlideshows)))])])]):t._e()],2),t._v(" "),e("switch-single-input",{on:{change:function(e){return t.saveGlobalSettings()}},model:{value:t.globalSettings.adminBar,callback:function(e){t.$set(t.globalSettings,"adminBar",e)},expression:"globalSettings.adminBar"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Enable MetaSlider on Admin Bar","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Add and edit slideshows easier by showing MetaSlider on your admin bar.","ml-slider")))])],2),t._v(" "),e("switch-single-input",{on:{change:function(e){return t.saveGlobalSettings()}},model:{value:t.globalSettings.editLink,callback:function(e){t.$set(t.globalSettings,"editLink",e)},expression:"globalSettings.editLink"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Enable Frontend Edit Links","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Edit slideshows easily by showing MetaSlider link under each slideshow.","ml-slider")))])],2),t._v(" "),e("select-field-input",{attrs:{options:[{value:"last",label:t.__("Last","ml-slider")},{value:"first",label:t.__("First","ml-slider")}]},on:{click:function(e){return t.saveGlobalSettings()}},model:{value:t.globalSettings.newSlideOrder,callback:function(e){t.$set(t.globalSettings,"newSlideOrder",e)},expression:"globalSettings.newSlideOrder"}},[e("template",{slot:"header"},[t._v(t._s(t.__("New slides order","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Select the position for new added slides.","ml-slider")))])],2),t._v(" "),e("switch-single-input",{on:{change:function(e){return t.saveGlobalSettings()}},model:{value:t.globalSettings.legacyWidget,callback:function(e){t.$set(t.globalSettings,"legacyWidget",e)},expression:"globalSettings.legacyWidget"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Disable Legacy Widget","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("This setting allows you to disable the legacy MetaSlider widget.","ml-slider")))])],2),t._v(" "),e("switch-single-input",{on:{change:function(e){return t.saveGlobalSettings()}},model:{value:t.globalSettings.tinyMce,callback:function(e){t.$set(t.globalSettings,"tinyMce",e)},expression:"globalSettings.tinyMce"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Enable TinyMCE","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("TinyMCE is a WYSIWYG editor you can use in slide captions.","ml-slider")))])],2),t._v(" "),e("switch-single-input",{on:{change:function(e){return t.saveGlobalSettings()}},model:{value:t.globalSettings.fixTouchSwipe,callback:function(e){t.$set(t.globalSettings,"fixTouchSwipe",e)},expression:"globalSettings.fixTouchSwipe"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Fix Touch Swipe","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("If Touch Swipe doesn't work as expected, enable this setting.","ml-slider")))])],2),t._v(" "),e("switch-single-input",{on:{change:function(e){return t.saveGlobalSettings()}},model:{value:t.globalSettings.autoThemeConfig,callback:function(e){t.$set(t.globalSettings,"autoThemeConfig",e)},expression:"globalSettings.autoThemeConfig"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Recommended Theme Options","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Automatically apply recommended slideshow options when selecting a theme. This will replace some of the previous options.","ml-slider")))])],2),t._v(" "),[e("div",{staticClass:"bg-white shadow mb-4 relative px-4 py-5 md:p-6",attrs:{id:"dashboard-settings"}},[e("h3",{staticClass:"text-lg leading-6 m-0 font-medium text-gray-darkest"},[t._v("\n\t\t\t\t\t\t"+t._s(t.__("Dashboard Settings","ml-slider"))+"\n\t\t\t\t\t")]),t._v(" "),e("div",{staticClass:"mt-2 max-w-xl text-sm leading-5 text-gray-dark"},[e("div",{staticClass:"m-0 pt-0"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.__("Set default sorting options and items per page for your Dashboard.","ml-slider"))+"\n\t\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"flex flex-wrap ms-settings-row"},[e("div",{staticClass:"flex items-center ms-settings-col"},[e("select-field-input",{attrs:{options:[{value:"ID",label:t.__("Slideshow ID","ml-slider")},{value:"post_title",label:t.__("Title","ml-slider")},{value:"post_date",label:t.__("Date Created","ml-slider")}]},on:{click:function(e){return t.saveGlobalSettings()}},model:{value:t.globalSettings.dashboardSort,callback:function(e){t.$set(t.globalSettings,"dashboardSort",e)},expression:"globalSettings.dashboardSort"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Sort Slideshows By","ml-slider")))])],2)],1),t._v(" "),e("div",{staticClass:"flex items-center ms-settings-col"},[e("select-field-input",{attrs:{options:[{value:"asc",label:t.__("Ascending","ml-slider")},{value:"desc",label:t.__("Descending","ml-slider")}]},on:{click:function(e){return t.saveGlobalSettings()}},model:{value:t.globalSettings.dashboardOrder,callback:function(e){t.$set(t.globalSettings,"dashboardOrder",e)},expression:"globalSettings.dashboardOrder"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Order By","ml-slider")))])],2)],1),t._v(" "),e("div",{staticClass:"flex items-center ms-settings-col"},[e("text-single-input",{attrs:{name:"dashboard-items","wrapper-class":"w-24"},on:{click:function(e){return t.saveGlobalSettings()}},model:{value:t.globalSettings.dashboardItems,callback:function(e){t.$set(t.globalSettings,"dashboardItems",e)},expression:"globalSettings.dashboardItems"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Items Per Page","ml-slider")))])],2)],1)])])]],2)],2),t._v(" "),t.isPro()?t._e():e("split-layout",{staticClass:"lg:mt-6",attrs:{loading:t.loading}},[e("template",{slot:"header"},[t._v(t._s(t.__("Pro Settings","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Update the MetaSlider Pro settings.","ml-slider")))]),t._v(" "),e("template",{slot:"fields"},[e("switch-single-input-ad",{attrs:{value:!1}},[e("template",{slot:"header"},[t._v(t._s(t.__("Flush Cache when Saving Changes","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("This setting allows you to automatically flush the cache when saving slideshow changes. Supports WP Rocket, WP Super Cache, W3 Total Cache, WP-Optimize and WP Fastest Cache plugins.","ml-slider")))]),t._v(" "),e("template",{slot:"proText"},[t._v(t._s(t.__("This feature is available in MetaSlider Pro","ml-slider")))])],2)],1)],2),t._v(" "),t.isPro()?e("split-layout",{staticClass:"lg:mt-6",attrs:{loading:t.loading}},[e("template",{slot:"header"},[t._v(t._s(t.__("Pro Settings","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Update the MetaSlider Pro settings.","ml-slider")))]),t._v(" "),e("template",{slot:"fields"},[e("text-single-input",{attrs:{name:"default-slideshow-width","wrapper-class":"w-24"},on:{click:function(e){return t.saveProSettings()}},model:{value:t.proSettings.postFeedFields,callback:function(e){t.$set(t.proSettings,"postFeedFields",e)},expression:"proSettings.postFeedFields"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Maximum Number of Custom Fields in Post Feed and WooCommerce Slides","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("Select how many custom fields will display in the dropdown menu when you are inserting tags.","ml-slider")))]),t._v(" "),e("template",{slot:"input-label"},[t._v("\n\t\t\t\t\t"+t._s(t.__("Change the maximum custom fields for Post Feed and WooCommerce","ml-slider"))+"\n\t\t\t\t")])],2),t._v(" "),e("switch-single-input",{on:{change:function(e){return t.saveProSettings()}},model:{value:t.proSettings.legacyThemeEditor,callback:function(e){t.$set(t.proSettings,"legacyThemeEditor",e)},expression:"proSettings.legacyThemeEditor"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Enable Legacy Theme Editor","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("This setting allows you to enable the legacy Theme Editor.","ml-slider")))])],2),t._v(" "),e("switch-single-input",{on:{change:function(e){return t.saveProSettings()}},model:{value:t.proSettings.flushCache,callback:function(e){t.$set(t.proSettings,"flushCache",e)},expression:"proSettings.flushCache"}},[e("template",{slot:"header"},[t._v(t._s(t.__("Flush Cache when Saving Changes","ml-slider")))]),t._v(" "),e("template",{slot:"description"},[t._v(t._s(t.__("This setting allows you to automatically flush the cache when saving slideshow changes. Supports WP Rocket, WP Super Cache, W3 Total Cache, WP-Optimize and WP Fastest Cache plugins.","ml-slider")))])],2)],1)],2):t._e()],1)}),[],!1,null,null,null).exports,Fp={data(){return{}},created(){},mounted(){},methods:{variableWidth(){return"width:"+(Math.floor(75*Math.random())+30)+"%"}}},Hp=n(8118),zp={insert:"head",singleton:!1},Up=(Wd()(Hp.A,zp),Hp.A.locals,jd(Fp,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"absolute bg-white inset-0 sm:p-6 px-4 py-5"},[e("div",{staticClass:"gradient max-w-full rounded-lg h-7",style:t.variableWidth()}),t._v(" "),e("div",{staticClass:"mt-2 sm:flex sm:items-start sm:justify-between h-7"},[e("div",{staticClass:"rounded-lg gradient max-w-xl h-7",style:t.variableWidth()}),t._v(" "),e("div",{staticClass:"rounded-lg gradient mt-5 w-12 sm:mt-0 sm:ml-6 sm:flex-shrink-0 sm:flex h-7 sm:items-center"})])])}),[],!1,null,"59da3806",null).exports),Qp=jd({props:{value:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},containerMargin:{type:String,default:"mb-4"}},components:{"loading-element":Up},data(){return{}},created(){},mounted(){},methods:{}},(function(){var t=this,e=t._self._c;return e("form",{staticClass:"bg-white shadow relative",class:[t.containerMargin],attrs:{autocomplete:"off",action:"#",method:"POST"},on:{keydown:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;e.preventDefault()}}},[e("div",{staticClass:"px-4 py-5 sm:p-6"},[e("h3",{staticClass:"text-lg m-0 leading-6 font-medium text-gray-darkest"},[t._t("header")],2),t._v(" "),e("div",{staticClass:"mt-2 sm:flex sm:items-start sm:justify-between"},[e("div",{staticClass:"max-w-xl text-sm leading-5 text-gray-500"},[e("div",{staticClass:"m-0 p-0"},[t._t("description")],2)]),t._v(" "),e("div",{staticClass:"mt-5 sm:mt-0 sm:ml-6 sm:flex-shrink-0 sm:flex sm:items-center"},[e("span",{staticClass:"inline-flex rounded-md shadow-sm"},[e("button",{staticClass:"w-full inline-flex items-center justify-center px-4 py-2 border border-transparent font-medium rounded-md transition ease-in-out duration-150 md:w-auto md:text-sm md:leading-5",class:{"bg-gray-darker text-gray-light":t.disabled,"bg-orange hover:bg-orange-darker active:bg-orange-darkest text-white":!t.disabled},attrs:{type:"button",tabindex:"0",disabled:t.disabled},on:{click:function(e){return t.$emit("click")},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.$emit("click"))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:(e.preventDefault(),t.$emit("click"))}]}},[t._t("button")],2)])])])]),t._v(" "),e("transition",{attrs:{name:"settings-fade",mode:"in-out"}},[t.$parent.$attrs.loading?e("loading-element"):t._e()],1)],1)}),[],!1,null,null,null).exports,qp=jd({props:{name:{type:String,default:""},value:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},accept:{type:String,default:""},containerMargin:{type:String,default:"mb-4"}},components:{"loading-element":Up},data(){return{}},created(){},mounted(){},methods:{loadFile(t){if(this.disabled)return;if(!t.target.files[0])return;const e=new FileReader;e.onload=t=>this.$emit("loaded",t.target.result),e.readAsText(t.target.files[0]),t.target.value=""}}},(function(){var t=this,e=t._self._c;return e("form",{staticClass:"bg-white shadow relative",class:[t.containerMargin],attrs:{autocomplete:"off",action:"#",method:"POST"},on:{keydown:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;e.preventDefault()}}},[e("div",{staticClass:"px-4 py-5 sm:p-6"},[e("h3",{staticClass:"text-lg m-0 leading-6 font-medium text-gray-darkest"},[t._t("header")],2),t._v(" "),e("div",{staticClass:"mt-2 sm:flex sm:items-start sm:justify-between"},[e("div",{staticClass:"max-w-xl text-sm leading-5 text-gray-500"},[e("div",{staticClass:"m-0 p-0"},[t._t("description")],2)]),t._v(" "),e("div",{staticClass:"mt-5 sm:mt-0 sm:ml-6 sm:flex-shrink-0 sm:flex sm:items-center"},[e("span",{staticClass:"inline-flex rounded-md shadow-sm"},[e("label",{staticClass:"w-full inline-flex items-center justify-center px-4 py-2 border border-transparent font-medium rounded-md transition ease-in-out duration-150 md:w-auto md:text-sm md:leading-5",class:{"bg-gray-darker text-gray-light":t.disabled,"bg-orange hover:bg-orange-darker active:bg-orange-darkest text-white":!t.disabled},attrs:{for:t.name,tabindex:"0",disabled:t.disabled}},[t._t("button")],2),t._v(" "),e("input",{staticClass:"hidden",attrs:{id:t.name,accept:t.accept,disabled:t.disabled,type:"file"},on:{change:t.loadFile}})])])])]),t._v(" "),e("transition",{attrs:{name:"settings-fade",mode:"in-out"}},[t.$parent.$attrs.loading?e("loading-element"):t._e()],1)],1)}),[],!1,null,null,null).exports,Vp=n(5419),Yp=n.n(Vp),Jp={components:{"split-layout":hp,"switch-single-input":Cp,"file-button":qp,"action-button":Qp},computed:{slideshowsToImport(){if(!Object.keys(this.slideshowsListSelection).length)return[];let t=[];return Object.keys(this.slideshowsListSelection).forEach((e=>{this.slideshowsListSelection[e]&&t.push(e)})),t}},watch:{missingImages(t){console.log("Missing images:",t)}},props:{},data(){return{metadata:"",slideshowsList:{},slideshowsListSelection:{},processing:!1,importing:!1,userSawProcessingImagesMessage:!1,environment:"",missingImages:[]}},created(){},mounted(){},methods:{loadSlideshowsFromFile(t){this.slideshowsList={},this.slideshowsListSelection={},t||this.notifyWarning("metaslider-importing-slideshows-bad-data",this.__("The data in this file does not appear to be valid.","ml-slider"),!0),this.processing=!0;try{t=JSON.parse(t),this.metadata=t.metadata,delete t.metadata,this.slideshowsList=t,this.environment=this.metadata.environment??"unknown",this.missingImages=[],Object.values(this.slideshowsList).forEach((async t=>{if(t.slides)for(const e of t.slides)if(e.image_url){const t=await this.imageExists(e.image_url);this.$set(e,"imageExists",t),t||this.missingImages.push(e.image_url)}else this.$set(e,"imageExists",!1)}));const e={};for(const[t,n]of Object.entries(this.slideshowsList))e[t]=!0;this.slideshowsListSelection=e,this.notifySuccess("metaslider/all-slideshows-from-file-loaded",this.sprintf(this.__("Found %s slideshows","ml-slider"),Object.keys(this.slideshowsList).length),!0)}catch(t){this.slideshowsList={},this.notifyError("metaslider/all-slideshows-from-file-error",t.message,!0)}this.processing=!1},async importSlideshows(){this.slideshowsToImport.length||this.notifyWarning("metaslider-importing-slideshows-no-slideshows",this.__("You have no slideshows to import","ml-slider"),!0),this.importing=!0,this.processing=!0;const t=[];this.slideshowsToImport.forEach((e=>{t.push(this.slideshowsList[e])}));let e="";"local"===this.environment&&(e=this.__("Export file is from a local site. Exporting from a local site may cause issues during import. This is because the images and videos need to be accessible from a live server.","ml-slider")),this.missingImages.length&&(e="
"+this.__("Some images are missing. Please ensure all images are accessible from the source website before importing.","ml-slider"));if(!("local"===this.environment||this.missingImages.length?await Nd().fire({title:this.__("Important!","ml-slider"),html:'