2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
import{o as n,c as a,b as t,t as d,r as f,a as x,F as m,d as h,g as b,m as v,i as w,e as k,w as y,h as $,l as B}from"./app-DmJ8GS-7.js";import{s as p}from"./SearchModal.vue_vue_type_style_index_0_scoped_a4fc4416_lang-CbsljUTZ.js";import{_ as g}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{C as P}from"./ClientImageSlider-CnDaATj1.js";import{F as _}from"./v3-rkPj73qv.js";import{B as j}from"./ClientFooterDown-D8UuGhzW.js";const L={name:"HeadingBlock",methods:{generateSlug:function(e){return p(e,{lower:!0,strict:!0,locale:"ru"})}},props:{block:{type:Object}}},S=["id"];function C(e,r,o,u,s,c){return n(),a("div",null,[t("h2",{id:c.generateSlug(o.block.data.content),class:"font-bold text-xl"},d(o.block.data.content),9,S)])}const F=g(L,[["render",C]]),z={name:"ParagraphBlock",methods:{wrapTables(e){if(e.type==="paragraph"&&e.data&&e.data.content){const r=e.data.content.replace(/<table([^>]*)>([\s\S]*?)<\/table>/g,(o,u,s)=>`<div class="div-table"><table${u}>${s}</table></div>`);return{...e,data:{...e.data,content:r}}}return e}},props:{block:{type:Object}}},I=["innerHTML"];function T(e,r,o,u,s,c){return n(),a("div",{class:"text-sm text-gray-600 leading-6 md:text-[16px] md:text-[#374151] md:leading-8 md:font-light paragraph-container",innerHTML:c.wrapTables(o.block).data.content},null,8,I)}const O=g(z,[["render",T]]),H={name:"ImageBlock",components:{FsLightbox:_},data(){return{toggler:!1,domainPath:null}},methods:{generateSlug:function(e){return p(e,{lower:!0,strict:!0,locale:"ru"})}},mounted(){this.domainPath=window.location.origin},props:{block:{type:Object}}},V=["src"];function M(e,r,o,u,s,c){const i=f("FsLightbox");return n(),a(m,null,[t("div",null,[t("img",{onClick:r[0]||(r[0]=l=>s.toggler=!s.toggler),loading:"lazy",class:"mx-auto object-cover rounded-md hover:opacity-95 hover:duration-200 transition",src:"/storage/"+o.block.data.url,alt:""},null,8,V)]),x(i,{class:"",toggler:s.toggler,sources:[s.domainPath+"/storage/"+o.block.data.url]},null,8,["toggler","sources"])],64)}const N=g(H,[["render",M]]),A={name:"FileBlock",components:{BaseIcon:j,FsLightbox:_},data(){return{toggler:!1,domainPath:null}},methods:{generateSlug:function(e){return p(e,{lower:!0,strict:!0,locale:"ru"})},textLimit(e,r){if(e.length>r){let o;return o=e.substring(0,r),o+"..."}return e}},mounted(){this.domainPath=window.location.origin},props:{block:{type:Object}}},D={class:"mb-4"},E=["href"],Y={class:"flex border rounded-lg px-4 py-2 items-center justify-between duration-300 hover:bg-gray-100"},q={class:"flex items-center justify-between"},G={class:"min-w-[30px] min-h-[30px] bg-[#303030] flex justify-center items-center rounded-md mr-2"},J={class:"text-sm text-gray-400"};function K(e,r,o,u,s,c){const i=f("BaseIcon");return n(!0),a(m,null,h(o.block.data.file,l=>(n(),a("div",D,[t("a",{class:"",href:"/storage/"+l.path,download:"",type:"button"},[t("div",Y,[t("div",q,[t("div",G,[x(i,{name:l.expansion,class:"w-5 h-5 flex-shrink-0"},null,8,["name"])]),t("div",null,d(c.textLimit(l.title,70)),1)]),t("span",J,d(l.size),1)])],8,E)]))),256)}const Q=g(A,[["render",K]]),R={name:"PersonBlock",components:{FsLightbox:_},data(){return{toggler:!1,domainPath:null}},methods:{generateSlug:function(e){return p(e,{lower:!0,strict:!0,locale:"ru"})}},mounted(){this.domainPath=window.location.origin},props:{block:{type:Object}}},U={class:"w-full rounded-xl mb-4 p-4 md:p-6 bg-white border border-gray-200"},W={class:"flex items-center gap-x-4 text-nowrap"},X=["src"],Z={class:"grow overflow-x-auto"},ee={class:"font-medium text-gray-800 hover:text-gray-500"},te={class:"text-xs text-gray-500 mt-2"};function oe(e,r,o,u,s,c){const i=f("FsLightbox");return n(),a(m,null,[t("div",U,[t("div",W,[t("img",{onClick:r[0]||(r[0]=l=>s.toggler=!s.toggler),loading:"lazy",class:"rounded-xl w-[150px]",src:"/storage/"+o.block.data.photo,alt:"Image Description"},null,8,X),t("div",Z,[t("p",ee,d(o.block.data.name),1),(n(!0),a(m,null,h(o.block.data.info,l=>(n(),a("p",te,d(l.column)+": "+d(l.content),1))),256))])])]),x(i,{class:"",toggler:s.toggler,sources:[s.domainPath+"/storage/"+o.block.data.photo]},null,8,["toggler","sources"])],64)}const se=g(R,[["render",oe],["__scopeId","data-v-73502669"]]),le={name:"StepperBlock",components:{FsLightbox:_},data(){return{toggler:!1,domainPath:null}},methods:{generateSlug:function(e){return p(e,{lower:!0,strict:!0,locale:"ru"})}},mounted(){this.domainPath=window.location.origin},props:{block:{type:Object}}},ne={class:"flex gap-x-3"},re={class:"w-16 text-end min-w-[4rem]"},ae={class:"text-xs text-gray-500"},ie=t("div",{class:"relative last:after:hidden after:absolute after:top-7 after:bottom-0 after:start-3.5 after:w-px after:-translate-x-[0.5px] after:bg-gray-200"},[t("div",{class:"relative z-10 size-7 flex justify-center items-center"},[t("div",{class:"size-2 rounded-full bg-primaryBlue"})])],-1),ce={class:"grow max-w-[70%] pt-0.5 pb-8 overflow-wrap break-words"},de={class:"flex gap-x-1.5 font-semibold text-gray-800"},ue=["innerHTML"];function ge(e,r,o,u,s,c){return n(),a("div",null,[(n(!0),a(m,null,h(o.block.data.steps,(i,l)=>(n(),a("div",ne,[t("div",re,[t("span",ae,d(o.block.data.step_name)+" "+d(l+1),1)]),ie,t("div",ce,[t("h3",de,d(i.title),1),t("p",{class:"mt-1 text-sm text-gray-600 step-content",innerHTML:i.content},null,8,ue)])]))),256))])}const me=g(le,[["render",ge]]),he={name:"VideoBlock",data(){return{toggler:!1,domainPath:null}},methods:{},mounted(){this.domainPath=window.location.origin},props:{block:{type:Object}}},pe={class:"h-full w-full rounded-lg",controls:""},fe=["src","type"],_e={class:"mt-3 text-sm text-center text-gray-500 dark:text-neutral-500"};function xe(e,r,o,u,s,c){return n(),a(m,null,[t("video",pe,[t("source",{src:s.domainPath+"/storage/"+o.block.data.path,type:o.block.data.mime},null,8,fe),b(" Your browser does not support the video tag. ")]),t("figcaption",_e,d(o.block.data.title),1)],64)}const be=g(he,[["render",xe]]),ve={name:"PostListBlock",components:{axios:v,Link:w},data(){return{posts:null,loading:!0}},methods:{getPosts(){v.get(route("client.widget.post.index"),{params:{count:this.block.data.count,category:this.block.data.category}}).then(e=>{this.posts=e.data,this.loading=!1}).catch(e=>{console.error("Ошибка:",e),this.loading=!1})}},mounted(){this.getPosts()},props:{block:{type:Object}}},we={class:"w-full px-4 py-5 sm:px-6 lg:px-8 lg:py-7 mx-auto"},ke={key:0,class:"flex flex-col space-y-4"},ye=$('<div class="flex animate-pulse"><div class="shrink-0 relative rounded-xl overflow-hidden w-full sm:w-56 h-44"><div class="bg-gray-200 group-focus:scale-105 transition-transform duration-500 ease-in-out size-full absolute top-0 start-0 object-cover rounded-xl"></div></div><div class="ms-4 mt-2 w-full"><p class="h-4 bg-gray-200 rounded-full" style="width:40%;"></p><ul class="mt-5 space-y-3 flex flex-col"><li class="w-full h-4 bg-gray-200 rounded-full"></li><li class="w-full h-4 bg-gray-200 rounded-full"></li><li class="w-full h-4 bg-gray-200 rounded-full"></li><li class="w-full h-4 bg-gray-200 rounded-full"></li><li class="w-20 h-4 bg-gray-200 rounded-full"></li></ul></div></div><div class="flex animate-pulse"><div class="shrink-0 relative rounded-xl overflow-hidden w-full sm:w-56 h-44"><div class="bg-gray-200 group-focus:scale-105 transition-transform duration-500 ease-in-out size-full absolute top-0 start-0 object-cover rounded-xl"></div></div><div class="ms-4 mt-2 w-full"><p class="h-4 bg-gray-200 rounded-full" style="width:40%;"></p><ul class="mt-5 space-y-3 flex flex-col"><li class="w-full h-4 bg-gray-200 rounded-full"></li><li class="w-full h-4 bg-gray-200 rounded-full"></li><li class="w-full h-4 bg-gray-200 rounded-full"></li><li class="w-full h-4 bg-gray-200 rounded-full"></li><li class="w-20 h-4 bg-gray-200 rounded-full"></li></ul></div></div><div class="flex animate-pulse"><div class="shrink-0 relative rounded-xl overflow-hidden w-full sm:w-56 h-44"><div class="bg-gray-200 group-focus:scale-105 transition-transform duration-500 ease-in-out size-full absolute top-0 start-0 object-cover rounded-xl"></div></div><div class="ms-4 mt-2 w-full"><p class="h-4 bg-gray-200 rounded-full" style="width:40%;"></p><ul class="mt-5 space-y-3 flex flex-col"><li class="w-full h-4 bg-gray-200 rounded-full"></li><li class="w-full h-4 bg-gray-200 rounded-full"></li><li class="w-full h-4 bg-gray-200 rounded-full"></li><li class="w-full h-4 bg-gray-200 rounded-full"></li><li class="w-20 h-4 bg-gray-200 rounded-full"></li></ul></div></div>',3),$e=[ye],Be={key:1,class:"grid lg:grid-cols-1 lg:gap-y-16 gap-10"},Pe={class:"flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-5"},je={class:"shrink-0 relative rounded-xl overflow-hidden w-full sm:w-56 h-44"},Le=["src"],Se={class:"grow"},Ce={class:"text-xl font-semibold text-gray-800 group-hover:text-gray-600"},Fe=t("p",{class:"mt-3 text-gray-600"}," Produce professional, reliable streams easily leveraging Preline's innovative broadcast studio ",-1),ze=t("p",{class:"mt-4 inline-flex items-center gap-x-1 text-sm text-primaryBlue decoration-2 group-hover:underline group-focus:underline font-medium"},[b(" Читать далее "),t("svg",{class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"m9 18 6-6-6-6"})])],-1),Ie={class:"flex justify-center"},Te=["href"],Oe=t("svg",{class:"flex-shrink-0 size-4 transition ease-in-out group-hover:translate-x-1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"m9 18 6-6-6-6"})],-1);function He(e,r,o,u,s,c){const i=f("Link");return n(),a("div",we,[s.loading?(n(),a("div",ke,$e)):(n(),a("div",Be,[(n(!0),a(m,null,h(s.posts.data,l=>(n(),k(i,{key:l.id,class:"group block rounded-xl overflow-hidden focus:outline-none",href:e.route("client.post.show",l.slug)},{default:y(()=>[t("div",Pe,[t("div",je,[t("img",{class:"group-hover:scale-105 group-focus:scale-105 transition-transform duration-500 ease-in-out size-full absolute top-0 start-0 object-cover rounded-xl",src:l.preview?"storage/images/"+l.preview:"/img/thumbnail-1.png"},null,8,Le)]),t("div",Se,[t("h3",Ce,d(l.title),1),Fe,ze])])]),_:2},1032,["href"]))),128)),t("div",Ie,[t("a",{href:e.route("client.post.index",{category:o.block.data.category}),class:"group inline-flex items-center gap-x-1 text-sm font-semibold text-[#1A5AAF]"},[b(" Все новости "),Oe],8,Te)])]))])}const Ve=g(ve,[["render",He]]),Me={name:"PageTabBuilder",components:{FileBlock:Q,ImageBlock:N,ClientImageSlider:P,ParagraphBlock:O,HeadingBlock:F,Link:w,PersonBlock:se,StepperBlock:me,VideoBlock:be,PostListBlock:Ve},methods:{getComponent(e){return{heading:"HeadingBlock",paragraph:"ParagraphBlock",images:"ClientImageSlider",image:"ImageBlock",files:"FileBlock",person:"PersonBlock",stepper:"StepperBlock",video:"VideoBlock",postsList:"PostListBlock"}[e]||null}},props:{blocks:{type:Object}}};function Ne(e,r,o,u,s,c){return n(!0),a(m,null,h(o.blocks,(i,l)=>(n(),k(B(c.getComponent(i.type)),{key:l,block:i},null,8,["block"]))),128)}const Je=g(Me,[["render",Ne]]);export{Q as F,F as H,N as I,Je as P,me as S,be as V,O as a,se as b,Ve as c};
|