Files
ntspi-app/public/build/assets/PageSubSectionLinks-DL4XaNin.js
T
2024-09-19 16:06:49 +05:00

2 lines
29 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{P,F as T,I as L,a as O,H as z,b as F,S as M,V as N,c as q}from"./PageTabBuilder-CCvtc7Um.js";import{C as I}from"./ClientImageSlider-CnDaATj1.js";import{s as B}from"./SearchModal.vue_vue_type_style_index_0_scoped_a4fc4416_lang-CbsljUTZ.js";import{_ as m}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{r as w,o as s,c as o,b as t,F as h,d as b,n as x,t as c,a as y,m as g,i as p,h as $,w as S,g as v,f as _,e as C,l as j,j as k,T as D}from"./app-DmJ8GS-7.js";import"./v3-rkPj73qv.js";const V={name:"TabBlock",components:{PageTabBuilder:P},data(){return{activeTab:0}},methods:{generateSlug:function(r){return B(r,{lower:!0,strict:!0,locale:"ru"})}},mounted(){this.domainPath=window.location.origin},props:{block:{type:Object}}},H={class:""},E={class:"-mb-0.5 flex justify-center gap-2 flex-wrap","aria-label":"Tabs",role:"tablist","aria-orientation":"horizontal"},A=["onClick","id","data-hs-tab","aria-controls"],R={class:"mt-3"},Y=["id","aria-labelledby"];function U(r,l,e,d,n,a){const i=w("PageTabBuilder");return s(),o(h,null,[t("div",H,[t("nav",E,[(s(!0),o(h,null,b(e.block.data.tab,(u,f)=>(s(),o("button",{type:"button",class:x(["hs-tab-active:bg-gray-100 rounded-md hs-tab-active:text-gray-700 py-1.5 px-3 inline-flex items-center gap-x-2 border-b-2 border-transparent text-sm whitespace-nowrap text-gray-500 focus:outline-none disabled:opacity-50 disabled:pointer-events-none",n.activeTab===f?"active":""]),onClick:ro=>n.activeTab=f,id:a.generateSlug(u.title)+"-item","data-hs-tab":"#"+a.generateSlug(u.title),"aria-selected":"false","aria-controls":a.generateSlug(u.title),role:"tab"},c(u.title),11,A))),256))])]),t("div",R,[(s(!0),o(h,null,b(e.block.data.tab,(u,f)=>(s(),o("div",{id:a.generateSlug(u.title),class:x(n.activeTab===f?"":"hidden"),role:"tabpanel","aria-labelledby":a.generateSlug(u.title)+"-item"},[y(i,{blocks:u.content},null,8,["blocks"])],10,Y))),256))])],64)}const W=m(V,[["render",U]]),Z={name:"PageItemBlock",components:{axios:g,Link:p},data(){return{page:null,breadcrumbs:null,loading:!0}},methods:{getPage(r){g.get(route("client.widget.page.single",r)).then(l=>{this.page=l.data.data.page,this.breadcrumbs=l.data.data.breadcrumbs,this.loading=!1}).catch(l=>{console.error("Ошибка:",l),this.loading=!1})}},mounted(){this.getPage(this.block.data.page)},props:{block:{type:Object}}},G={key:0,class:"flex flex-col space-y-4"},J=$('<div class="flex animate-pulse"><div class="ms-4 mt-2 w-full border px-4 py-4 rounded-xl shadow-sm"><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></ul></div></div>',1),K=[J],Q={key:1,class:"w-full px-2 py-5 sm:px-3 lg:px-4 lg:py-7 mx-auto"},X=["href"],ee={class:"p-4 md:p-5"},te={class:"flex items-center gap-x-5"},se=t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"mt-1 shrink-0 size-7 text-gray-600"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})],-1),oe={class:"grow"},le={class:"flex items-center whitespace-nowrap"},re={class:"inline-flex items-center"},ne={class:"flex items-center text-sm text-gray-500 hover:text-blue-600 focus:outline-none focus:text-blue-600",href:"#"},ie=t("svg",{class:"shrink-0 mx-2 size-4 text-gray-400",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),ae={class:"inline-flex items-center"},ce={class:"flex items-center text-sm text-gray-500 hover:text-blue-600 focus:outline-none focus:text-blue-600",href:"#"},de=t("svg",{class:"shrink-0 mx-2 size-4 text-gray-400",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),ue={class:"inline-flex items-center"},me={class:"flex items-center text-sm text-gray-500 hover:text-blue-600 focus:outline-none focus:text-blue-600",href:"#"},he={class:"mt-1 group-hover:text-blue-600 font-semibold text-gray-700"};function _e(r,l,e,d,n,a){return n.loading?(s(),o("div",G,K)):(s(),o("div",Q,[t("a",{class:"group flex flex-col bg-white border shadow-sm rounded-xl hover:shadow-md focus:outline-none focus:shadow-md transition",href:n.page.is_url?n.page.path:r.route("page.view",n.page.path)+"/"},[t("div",ee,[t("div",te,[se,t("div",oe,[t("ol",le,[t("li",re,[t("span",ne,c(n.breadcrumbs.mainSection),1),ie]),t("li",ae,[t("span",ce,c(n.breadcrumbs.mainSection),1),de]),t("li",ue,[t("span",me,c(n.breadcrumbs.page),1)])]),t("h3",he,c(n.page.title),1)])])])],8,X)]))}const be=m(Z,[["render",_e]]),fe={name:"PostListBlock",components:{axios:g,Link:p},data(){return{post:null,loading:!0}},methods:{getPost(r){g.get(route("client.widget.post.single",r),{params:{count:this.block.data.count,category:this.block.data.category}}).then(l=>{this.post=l.data,this.loading=!1}).catch(l=>{console.error("Ошибка:",l),this.loading=!1})}},mounted(){this.getPost(this.block.data.post)},props:{block:{type:Object}}},xe={class:"w-full px-4 py-5 sm:px-6 lg:px-8 lg:py-7 mx-auto"},ge={key:0,class:"flex flex-col space-y-4"},pe=$('<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>',1),ke=[pe],ve={key:1,class:"grid lg:grid-cols-1 lg:gap-y-16 gap-10"},ye={class:"flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-5"},we={class:"shrink-0 relative rounded-xl overflow-hidden w-full sm:w-56 h-44"},$e=["src"],Be={class:"grow"},Se={class:"text-xl font-semibold text-gray-800 group-hover:text-gray-600"},Ce=t("p",{class:"mt-3 text-gray-600"}," Produce professional, reliable streams easily leveraging Preline's innovative broadcast studio ",-1),je=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"},[v(" Читать далее "),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);function Pe(r,l,e,d,n,a){const i=w("Link");return s(),o("div",xe,[n.loading?(s(),o("div",ge,ke)):(s(),o("div",ve,[y(i,{class:"group block rounded-xl overflow-hidden focus:outline-none",href:r.route("client.post.show",n.post.data.slug)},{default:S(()=>[t("div",ye,[t("div",we,[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:n.post.data.preview?"storage/images/"+n.post.data.preview:"/img/thumbnail-1.png"},null,8,$e)]),t("div",Be,[t("h3",Se,c(n.post.data.title),1),Ce,je])])]),_:1},8,["href"])]))])}const Te=m(fe,[["render",Pe]]),Le={name:"TextBlock",data(){return{}},methods:{},props:{block:{type:Object},error:{type:Object}}},Oe={class:"mb-4 sm:mb-8"},ze=["for"],Fe={class:"relative"},Me=["required","name","min","max","id","placeholder"],Ne={key:0,class:"absolute inset-y-0 end-0 flex items-center pointer-events-none pe-3"},qe=t("svg",{class:"shrink-0 size-4 text-red-500",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("circle",{cx:"12",cy:"12",r:"10"}),t("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),t("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})],-1),Ie=[qe],De={key:0,class:"mt-2 text-sm text-gray-500",id:"hs-input-helper-text"},Ve={class:"text-sm text-red-600 mt-2",id:"hs-validation-name-error-helper"};function He(r,l,e,d,n,a){return s(),o("div",Oe,[t("label",{for:e.block.data.name_field+"-id",class:"block mb-2 text-sm font-medium"},c(e.block.data.title_field),9,ze),t("div",Fe,[t("input",{required:e.block.data.rules.required,name:e.block.data.name_field,min:e.block.data.rules.min,max:e.block.data.rules.max,type:"text",id:e.block.data.name_field+"-id",class:x([e.error?"border-red-500 focus:border-red-500 focus:ring-red-500":"focus:border-blue-500 focus:ring-blue-500","py-3 px-4 block w-full border-gray-200 rounded-lg text-sm disabled:opacity-50 disabled:pointer-events-none"]),placeholder:e.block.data.title_field},null,10,Me),e.error?(s(),o("div",Ne,Ie)):_("",!0)]),e.error?_("",!0):(s(),o("p",De,c(e.block.data.description),1)),(s(!0),o(h,null,b(e.error,i=>(s(),o("p",Ve,c(i),1))),256))])}const Ee=m(Le,[["render",He]]),Ae={name:"PhoneBlock",data(){return{}},methods:{},props:{block:{type:Object},error:{type:Object}}},Re={class:"mb-4 sm:mb-8"},Ye=["for"],Ue={class:"relative"},We=["required","name","min","max","id","placeholder"],Ze={key:0,class:"absolute inset-y-0 end-0 flex items-center pointer-events-none pe-3"},Ge=t("svg",{class:"shrink-0 size-4 text-red-500",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("circle",{cx:"12",cy:"12",r:"10"}),t("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),t("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})],-1),Je=[Ge],Ke={key:0,class:"mt-2 text-sm text-gray-500",id:"hs-input-helper-text"},Qe={class:"text-sm text-red-600 mt-2",id:"hs-validation-name-error-helper"};function Xe(r,l,e,d,n,a){return s(),o("div",Re,[t("label",{for:e.block.data.name_field+"-id",class:"block mb-2 text-sm font-medium"},c(e.block.data.title_field),9,Ye),t("div",Ue,[t("input",{required:e.block.data.rules.required,name:e.block.data.name_field,min:e.block.data.rules.min,max:e.block.data.rules.max,type:"tel",id:e.block.data.name_field+"-id",class:x([e.error?"border-red-500 focus:border-red-500 focus:ring-red-500":"focus:border-blue-500 focus:ring-blue-500","py-3 px-4 block w-full border-gray-200 rounded-lg text-sm disabled:opacity-50 disabled:pointer-events-none"]),placeholder:e.block.data.title_field},null,10,We),e.error?(s(),o("div",Ze,Je)):_("",!0)]),e.error?_("",!0):(s(),o("p",Ke,c(e.block.data.description),1)),(s(!0),o(h,null,b(e.error,i=>(s(),o("p",Qe,c(i),1))),256))])}const et=m(Ae,[["render",Xe]]),tt={name:"EmailBlock",data(){return{}},methods:{},props:{block:{type:Object},error:{type:Object}}},st={class:"mb-4 sm:mb-8"},ot=["for"],lt={class:"relative"},rt=["required","name","min","max","id","placeholder"],nt={key:0,class:"absolute inset-y-0 end-0 flex items-center pointer-events-none pe-3"},it=t("svg",{class:"shrink-0 size-4 text-red-500",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("circle",{cx:"12",cy:"12",r:"10"}),t("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),t("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})],-1),at=[it],ct={key:0,class:"mt-2 text-sm text-gray-500",id:"hs-input-helper-text"},dt={class:"text-sm text-red-600 mt-2",id:"hs-validation-name-error-helper"};function ut(r,l,e,d,n,a){return s(),o("div",st,[t("label",{for:e.block.data.name_field+"-id",class:"block mb-2 text-sm font-medium"},c(e.block.data.title_field),9,ot),t("div",lt,[t("input",{required:e.block.data.rules.required,name:e.block.data.name_field,min:e.block.data.rules.min,max:e.block.data.rules.max,type:"email",id:e.block.data.name_field+"-id",class:x([e.error?"border-red-500 focus:border-red-500 focus:ring-red-500":"focus:border-blue-500 focus:ring-blue-500","py-3 px-4 block w-full border-gray-200 rounded-lg text-sm disabled:opacity-50 disabled:pointer-events-none"]),placeholder:e.block.data.title_field},null,10,rt),e.error?(s(),o("div",nt,at)):_("",!0)]),e.error?_("",!0):(s(),o("p",ct,c(e.block.data.description),1)),(s(!0),o(h,null,b(e.error,i=>(s(),o("p",dt,c(i),1))),256))])}const mt=m(tt,[["render",ut]]),ht={name:"SubmitBlock",methods:{},props:{block:{type:Object}}},_t={class:"mt-6 grid"},bt={type:"submit",class:"w-full py-3 px-4 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none"};function ft(r,l,e,d,n,a){return s(),o("div",_t,[t("button",bt,c(e.block),1)])}const xt=m(ht,[["render",ft]]),gt={name:"TextAreaBlock",data(){return{}},methods:{},props:{block:{type:Object},error:{type:Object}}},pt={class:"mb-4 sm:mb-8"},kt=["for"],vt={class:"relative"},yt=["required","name","min","max","id","placeholder"],wt={key:0,class:"absolute inset-y-0 end-0 flex items-center pointer-events-none pe-3"},$t=t("svg",{class:"shrink-0 size-4 text-red-500",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("circle",{cx:"12",cy:"12",r:"10"}),t("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),t("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})],-1),Bt=[$t],St={key:0,class:"mt-2 text-sm text-gray-500",id:"hs-input-helper-text"},Ct={class:"text-sm text-red-600 mt-2",id:"hs-validation-name-error-helper"};function jt(r,l,e,d,n,a){return s(),o("div",pt,[t("label",{for:e.block.data.name_field+"-id",class:"block mb-2 text-sm font-medium"},c(e.block.data.title_field),9,kt),t("div",vt,[t("input",{required:e.block.data.rules.required,name:e.block.data.name_field,min:e.block.data.rules.min,max:e.block.data.rules.max,type:"text",id:e.block.data.name_field+"-id",class:x([e.error?"border-red-500 focus:border-red-500 focus:ring-red-500":"focus:border-blue-500 focus:ring-blue-500","py-3 px-4 block w-full border-gray-200 rounded-lg text-sm disabled:opacity-50 disabled:pointer-events-none"]),placeholder:e.block.data.title_field},null,10,yt),e.error?(s(),o("div",wt,Bt)):_("",!0)]),e.error?_("",!0):(s(),o("p",St,c(e.block.data.description),1)),(s(!0),o(h,null,b(e.error,i=>(s(),o("p",Ct,c(i),1))),256))])}const Pt=m(gt,[["render",jt]]),Tt={name:"MultipleChoiceBlock",data(){return{}},methods:{},props:{block:{type:Object},error:{type:Object}}},Lt={class:"mb-4 sm:mb-8"},Ot={class:"block mb-3 text-sm font-medium"},zt={class:"space-y-2"},Ft={class:"flex"},Mt=["name","value","id"],Nt=["for"],qt={key:0,class:"mt-2 text-sm text-gray-500",id:"hs-input-helper-text"},It={class:"text-sm text-red-600 mt-2",id:"hs-validation-name-error-helper"};function Dt(r,l,e,d,n,a){return s(),o("div",Lt,[t("label",Ot,c(e.block.data.title_field),1),t("div",zt,[(s(!0),o(h,null,b(e.block.data.columns,i=>(s(),o("div",Ft,[t("input",{type:"checkbox",name:e.block.data.name_field+"[]",value:i.name_field,class:"shrink-0 mt-0.5 border-gray-200 rounded text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none",id:i.name_field+"-id"},null,8,Mt),t("label",{for:i.name_field+"-id",class:"text-sm text-gray-500 ms-3"},c(i.title_field),9,Nt)]))),256))]),e.error?_("",!0):(s(),o("p",qt,c(e.block.data.description),1)),(s(!0),o(h,null,b(e.error,i=>(s(),o("p",It,c(i),1))),256))])}const Vt=m(Tt,[["render",Dt]]),Ht={name:"SingleChoiceBlock",data(){return{}},methods:{},props:{block:{type:Object},error:{type:Object}}},Et={class:"mb-4 sm:mb-8"},At={class:"block mb-3 text-sm font-medium"},Rt={class:"space-y-2"},Yt={class:"flex"},Ut=["name","value","id"],Wt=["for"],Zt={key:0,class:"mt-2 text-sm text-gray-500",id:"hs-input-helper-text"},Gt={class:"text-sm text-red-600 mt-2",id:"hs-validation-name-error-helper"};function Jt(r,l,e,d,n,a){return s(),o("div",Et,[t("label",At,c(e.block.data.title_field),1),t("div",Rt,[(s(!0),o(h,null,b(e.block.data.columns,i=>(s(),o("div",Yt,[t("input",{type:"radio",name:e.block.data.name_field,value:i.name_field,class:"shrink-0 mt-0.5 border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none",id:i.name_field+"-id"},null,8,Ut),t("label",{for:i.name_field+"-id",class:"text-sm text-gray-500 ms-2"},c(i.title_field),9,Wt)]))),256))]),e.error?_("",!0):(s(),o("p",Zt,c(e.block.data.description),1)),(s(!0),o(h,null,b(e.error,i=>(s(),o("p",Gt,c(i),1))),256))])}const Kt=m(Ht,[["render",Jt]]),Qt={name:"FormBuilder",components:{SubmitBlock:xt,TextBlock:Ee,PhoneBlock:et,EmailBlock:mt,TextAreaBlock:Pt,MultipleChoiceBlock:Vt,SingleChoiceBlock:Kt},data(){return{formData:{},errors:null,success:!1,message:null}},methods:{getComponent(r){return{text:"TextBlock",phone:"PhoneBlock",email:"EmailBlock",textarea:"TextAreaBlock",multiple_choice:"MultipleChoiceBlock",single_choice:"SingleChoiceBlock"}[r]||null},submitForm(r){r.preventDefault();const l=r.target.elements;this.formData={};for(let e=0;e<l.length;e++){const d=l[e];if(d.tagName==="INPUT"){const n=d.name.endsWith("[]")?d.name.slice(0,-2):d.name;d.type==="checkbox"?(this.formData[n]||(this.formData[n]=[]),d.checked&&this.formData[n].push(d.value)):n&&n!=="choices"&&(this.formData[n]=d.value)}}g.post(route("client.widget.form.submit",this.blocks.data.id),this.formData).then(e=>{e.data.status==="ok"&&(this.success=!0,this.message=e.data.message,this.errors=null)}).catch(e=>{this.errors=e.response.data||["Неизвестная ошибка"],this.success=!1})}},props:{blocks:{type:Object}}},Xt={key:0,class:"bg-teal-50 border-t-2 border-teal-500 rounded-lg p-4 dark:bg-teal-800/30",role:"alert",tabindex:"-1","aria-labelledby":"hs-bordered-success-style-label"},es={class:"flex"},ts=$('<div class="shrink-0"><span class="inline-flex justify-center items-center size-8 rounded-full border-4 border-teal-100 bg-teal-200 text-teal-800 dark:border-teal-900 dark:bg-teal-800 dark:text-teal-400"><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"><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"></path><path d="m9 12 2 2 4-4"></path></svg></span></div>',1),ss={class:"ms-3"},os=t("h3",{id:"hs-bordered-success-style-label",class:"text-gray-800 font-semibold dark:text-white"}," Успешно отправлено! ",-1),ls={class:"text-sm text-gray-700 dark:text-neutral-400"},rs={key:1,class:"max-w-[85rem] py-10 sm:px-6 lg:px-8 lg:py-14 mx-auto"},ns={class:"mx-auto max-w-2xl"},is={class:"text-center"},as={class:"text-xl text-gray-800 font-bold sm:text-3xl"},cs={class:"mt-5 p-4 relative z-10 bg-white border rounded-xl sm:mt-10 md:p-10"};function ds(r,l,e,d,n,a){const i=w("SubmitBlock");return n.success?(s(),o("div",Xt,[t("div",es,[ts,t("div",ss,[os,t("p",ls,c(n.message),1)])])])):(s(),o("div",rs,[t("div",ns,[t("div",is,[t("h2",as,c(e.blocks.data.title),1)]),t("div",cs,[t("form",{onSubmit:l[0]||(l[0]=(...u)=>a.submitForm&&a.submitForm(...u))},[(s(!0),o(h,null,b(e.blocks.data.columns,(u,f)=>(s(),C(j(a.getComponent(u.type)),{key:f,block:u,error:n.errors&&n.errors[u.data.name_field]?n.errors[u.data.name_field]:null},null,8,["block","error"]))),128)),y(i,{block:e.blocks.data.button},null,8,["block"])],32)])])]))}const us=m(Qt,[["render",ds]]),ms={name:"FormBlock",components:{FormBuilder:us,axios:g,Link:p},data(){return{form:null,loading:!0}},methods:{getForm(r){g.get(route("client.widget.form.single",r)).then(l=>{this.form=l.data,this.loading=!1}).catch(l=>{console.error("Ошибка:",l)})}},mounted(){this.getForm(this.block.data.form)},props:{block:{type:Object}}},hs={key:0,class:"flex flex-col space-y-4"},_s=$('<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>',1),bs=[_s],fs={key:1};function xs(r,l,e,d,n,a){const i=w("FormBuilder");return n.loading?(s(),o("div",hs,bs)):(s(),o("div",fs,[y(i,{blocks:n.form},null,8,["blocks"])]))}const gs=m(ms,[["render",xs]]),ps={name:"PageBuilder",components:{FileBlock:T,ImageBlock:L,ClientImageSlider:I,ParagraphBlock:O,HeadingBlock:z,PersonBlock:F,StepperBlock:M,VideoBlock:N,TabBlock:W,PostListBlock:q,PageItemBlock:be,PostItemBlock:Te,FormBlock:gs},methods:{getComponent(r){return{heading:"HeadingBlock",paragraph:"ParagraphBlock",images:"ClientImageSlider",image:"ImageBlock",files:"FileBlock",person:"PersonBlock",stepper:"StepperBlock",video:"VideoBlock",tabs:"TabBlock",postsList:"PostListBlock",postItem:"PostItemBlock",pageItem:"PageItemBlock",customForm:"FormBlock"}[r]||null}},props:{blocks:{type:Object}}};function ks(r,l,e,d,n,a){return s(!0),o(h,null,b(e.blocks,(i,u)=>(s(),C(j(a.getComponent(i.type)),{key:u,block:i},null,8,["block"]))),128)}const ho=m(ps,[["render",ks]]),vs={name:"PageBreadcrumbs",components:{Link:p},data(){return{}},methods:{textLimit(r,l){if(r.length>l){let e;return e=r.substring(0,l),e+"..."}return r}},props:{breadcrumbs:{type:Object},pageTitle:{type:String}}},ys={class:"flex justify-between pb-4 items-center"},ws={class:"flex w-full sm:items-center gap-x-5 sm:gap-x-3"},$s={class:"grow"},Bs={class:"grid sm:flex sm:justify-between sm:items-center gap-2"},Ss={key:0,class:"flex items-center whitespace-normal min-w-0 flex-wrap gap-y-2","aria-label":"Breadcrumb"},Cs=t("li",{class:"text-sm"},[t("span",{class:"flex items-center text-gray-500 hover:text-primaryBlue"},[v(" Главная "),t("svg",{class:"flex-shrink-0 mx-3 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})])])],-1),js={class:"text-sm"},Ps=t("svg",{class:"flex-shrink-0 mx-3 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1),Ts={class:"text-sm"},Ls=t("svg",{class:"flex-shrink-0 mx-3 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1),Os={class:"text-sm"},zs={key:1,class:"flex items-center whitespace-nowrap min-w-0 flex-wrap","aria-label":"Breadcrumb"},Fs=t("li",{class:"text-sm"},[t("span",{class:"flex items-center text-gray-500 hover:text-blue-600",href:"/"},[v(" Главная "),t("svg",{class:"flex-shrink-0 mx-3 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})])])],-1),Ms={class:"text-sm"};function Ns(r,l,e,d,n,a){return s(),o("div",ys,[t("div",ws,[t("div",$s,[t("div",Bs,[e.breadcrumbs?(s(),o("ol",Ss,[Cs,t("li",js,[t("span",{class:"flex items-center text-gray-500 hover:text-primaryBlue",onClick:l[0]||(l[0]=k(()=>{},["prevent"]))},[v(c(a.textLimit(this.breadcrumbs.mainSection,25))+" ",1),Ps])]),t("li",Ts,[t("span",{class:"flex items-center text-gray-500 hover:text-primaryBlue",onClick:l[1]||(l[1]=k(()=>{},["prevent"]))},[v(c(a.textLimit(this.breadcrumbs.subSection,25))+" ",1),Ls])]),t("li",Os,[t("span",{class:"flex items-center text-gray-500 hover:text-primaryBlue",onClick:l[2]||(l[2]=k(()=>{},["prevent"]))},c(a.textLimit(this.breadcrumbs.page,25)),1)])])):_("",!0),e.breadcrumbs?_("",!0):(s(),o("ol",zs,[Fs,t("li",Ms,[t("span",{class:"flex items-center text-gray-500 hover:text-blue-600",onClick:l[3]||(l[3]=k(()=>{},["prevent"]))},c(a.textLimit(e.pageTitle,30)),1)])]))])])])])}const _o=m(vs,[["render",Ns]]),qs={name:"PageTitle",components:{Link:p},data(){return{}},methods:{textLimit(r,l){if(r.length>l){let e;return e=r.substring(0,l),e+"..."}return r}},props:{header:{type:String}}},Is={class:"space-y-3"},Ds={class:"text-2xl mb-10 font-bold md:text-3xl"};function Vs(r,l,e,d,n,a){return s(),o("div",Is,[t("h1",Ds,c(e.header),1)])}const bo=m(qs,[["render",Vs]]),Hs={name:"PageNavigateLinks",components:{Link:p},data(){return{currentNavSection:null,scrollTop:!1}},methods:{textLimit(r,l){if(r.length>l){let e;return e=r.substring(0,l),e+"..."}return r},generateSlug(r){return B(r,{lower:!0,strict:!0,locale:"ru"})},onScroll(r){const l=window.scrollY;this.scrollTop=l>100;const e=document.querySelectorAll("h2"),d=document.querySelector("#visor");let n=null;const a=d.getBoundingClientRect();if(a.top>window.scrollY){this.currentNavSection=null,n=null;return}for(let i=0;i<e.length;i++){const u=e[i],f=u.getBoundingClientRect();if(f.top>=0&&f.bottom<=window.innerHeight&&f.bottom>=a.top&&f.top<=a.bottom){u!==n&&(this.currentNavSection=u.id,n=u);break}}},scrollToTop(){window.scrollTo(0,0)}},mounted(){window.addEventListener("scroll",this.onScroll)},unmounted(){window.removeEventListener("scroll",this.onScroll)},props:{headerNavs:{type:Array}}},Es={class:"order-last hidden w-56 shrink-0 lg:block"},As={key:0,class:"sticky top-[100px] h-[calc(100vh-121px)]"},Rs=t("div",{class:"text-gray-1000 mb-2 text-md font-medium"},"На этой странице",-1),Ys={class:"styled-scrollbar max-h-[70vh] space-y-1.5 overflow-y-auto py-2 text-sm"},Us=["href"],Ws=t("button",{class:"bg-transperant text-gray-600 cursor-pointer hover:text-gray-900 duration-300 block px-2 leading-[1.6] rounded-md"},"К началу",-1),Zs=t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-[17px] text-gray-600"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 11.25l-3-3m0 0l-3 3m3-3v7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),Gs=[Ws,Zs];function Js(r,l,e,d,n,a){return s(),o("nav",Es,[e.headerNavs.length>0?(s(),o("div",As,[Rs,t("ul",Ys,[(s(!0),o(h,null,b(e.headerNavs,i=>(s(),o("li",{class:"anchor-li",key:i.id},[t("a",{class:x([{"translate-x-2 text-primaryBlue":n.currentNavSection===a.generateSlug(i.text),"bg-transperant text-gray-600 hover:text-gray-900":n.currentNavSection!==a.generateSlug(i.text)},"duration-150 block py-1 px-2 leading-[1.6] rounded-md"]),href:"#"+a.generateSlug(i.text)},c(i.text),11,Us)]))),128)),y(D,{name:"fade"},{default:S(()=>[n.scrollTop?(s(),o("li",{key:0,class:"anchor-li flex items-center py-2 border-t",onClick:l[0]||(l[0]=k((...i)=>a.scrollToTop&&a.scrollToTop(...i),["prevent"]))},Gs)):_("",!0)]),_:1})])])):_("",!0)])}const fo=m(Hs,[["render",Js]]),Ks={name:"PageSubSectionLinks",components:{Link:p},data(){return{currentNavSection:null,scrollTop:!1}},methods:{textLimit(r,l){if(r.length>l){let e;return e=r.substring(0,l),e+"..."}return r},isSameRoute(r){if(this.$page.props.ziggy.location===this.$page.props.ziggy.url+"/"+r)return!0}},props:{subSectionPages:{type:Object},currentSection:{type:String}}},Qs={class:"sticky top-[100px] hidden h-[calc(100vh-121px)] max-w-[20%] min-w-[20%] md:flex md:shrink-0 md:flex-col md:justify-between"},Xs={key:0,class:"styled-scrollbar flex h-[calc(100vh-200px)] flex-col overflow-y-scroll pr-2 pb-4"},eo={class:"text-gray-1000 mb-2 text-md font-medium"},to={class:"flex gap-x-1"},so={class:"px-0.5 last-of-type:mb-0 mb-8"},oo=["href"];function lo(r,l,e,d,n,a){return s(),o("div",Qs,[this.subSectionPages?(s(),o("nav",Xs,[t("div",eo,c(e.currentSection),1),t("div",to,[t("ul",so,[(s(!0),o(h,null,b(this.subSectionPages.data,i=>(s(),o("li",{key:i.id,class:"my-1.5 flex"},[t("a",{class:x([{"text-white font-semibold bg-primaryBlue":a.isSameRoute(i.path),"text-gray-600 hover:text-[#2C6288]":!a.isSameRoute(i.path)},"relative duration-300 flex gap-x-1 w-full rounded-md cursor-pointer items-center px-2 py-1 text-left text-sm"]),href:i.is_url?i.path:r.route("page.view",i.path)+"/"},c(i.title),11,oo)]))),128))])])])):_("",!0)])}const xo=m(Ks,[["render",lo]]);export{xo as P,fo as a,bo as b,_o as c,ho as d};