1import{_ as Oe}from"./BtO04T-y.js";import{d as pe,y as h,P as Ae,R as He,aL as Ue,B as Y,i as ae,o as u,c as p,e,n as y,V as I,am as Fe,X as oe,t as O,j as R,F as we,aZ as Pe,a_ as Ze,aK as Be,ar as Ie,M as Xe,as as Qe,at as ze,bf as Ye,L as Ge,bh as Ke,k as se,l as Ce,q as Je,$ as We,bi as je,Q as et,H as $e,a7 as tt,w as nt,b as z,ao as it,m as ot}from"./D1ZZI4G5.js";import{u as st}from"./Dtp9YTtZ.js";import{a as at,d as lt,o as rt,u as dt}from"./iAmT2JDH.js";import{u as ct,b as ut,c as vt,_ as mt}from"./BtOMU2LN.js";import{d as ht}from"./ivnKJrkg.js";import{_ as ft}from"./CiI4F4zJ.js";import"./F8doVSIJ.js";import"./D5Fy5cAn.js";const le=i=>(Pe("data-v-b8a8670b"),i=i(),Ze(),i),gt={class:"shorts-video-container"},pt=["src","muted"],_t={key:0,class:"shorts-video-player__centered"},kt=le(()=>e("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("rect",{width:"40",height:"40",fill:"#E4E6FC"}),e("path",{d:"M16 13.1396V27.1396L27 20.1396L16 13.1396Z",fill:"#5A61ED"})],-1)),wt=[kt],Ct={class:"top__state"},yt=le(()=>e("path",{d:"M8.25 14H12.25V0H8.25M0.25 14H4.25V0H0.25V14Z",fill:"white"},null,-1)),St=[yt],Lt={key:0,class:"top__back"},Vt=le(()=>e("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M26.6674 14.6666V17.3333H10.6674L18.0007 24.6666L16.1074 26.5599L5.54736 15.9999L16.1074 5.43994L18.0007 7.33327L10.6674 14.6666H26.6674Z",fill:"white"})],-1)),bt=[Vt],Ft={width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$t={key:0,d:"M3.25 9V15H7.25L12.25 20V4L7.25 9H3.25ZM16.25 12C16.25 10.23 15.25 8.71 13.75 7.97V16.02C15.25 15.29 16.25 13.76 16.25 12Z",fill:"white"},Nt={key:1,d:"M14.25 3.23001V5.29001C17.14 6.15001 19.25 8.83001 19.25 12C19.25 15.17 17.14 17.84 14.25 18.7V20.77C18.25 19.86 21.25 16.28 21.25 12C21.25 7.72001 18.25 4.14001 14.25 3.23001ZM16.75 12C16.75 10.23 15.75 8.71001 14.25 7.97001V16C15.75 15.29 16.75 13.76 16.75 12ZM3.25 9.00001V15H7.25L12.25 20V4.00001L7.25 9.00001H3.25Z",fill:"white"},Et={key:2,d:"M3.25 9V15H7.25L12.25 20V4L7.25 9H3.25ZM16.25 12C16.25 10.23 15.25 8.71 13.75 7.97V16.02C15.25 15.29 16.25 13.76 16.25 12Z",fill:"white"},Mt={key:3,d:"M13.25 3.23V5.29C16.14 6.15 18.25 8.83 18.25 12C18.25 15.17 16.14 17.84 13.25 18.7V20.77C17.25 19.86 20.25 16.28 20.25 12C20.25 7.72 17.25 4.14 13.25 3.23ZM3.25 9V15H7.25L12.25 20V4L7.25 9H3.25Z",fill:"white"},xt={class:"info"},Tt={class:"info__source"},Dt={class:"info__source-name"},Ht=["href"],Pt={class:"info__published"},Zt={class:"info__title"},Bt={class:"info__description"},qt={key:3,class:"shorts-video-player__timing"},Rt={class:"timeline-container"},Ot=le(()=>e("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M21.25 12L14.25 5V9C7.25 10 4.25 15 3.25 20C5.75 16.5 9.25 14.9 14.25 14.9V19L21.25 12Z",fill:"#898989"})],-1)),At=[Ot],Ut=le(()=>e("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M9.75 22C9.48478 22 9.23043 21.8946 9.04289 21.7071C8.85536 21.5196 8.75 21.2652 8.75 21V18H4.75C4.21957 18 3.71086 17.7893 3.33579 17.4142C2.96071 17.0391 2.75 16.5304 2.75 16V4C2.75 2.89 3.65 2 4.75 2H20.75C21.2804 2 21.7891 2.21071 22.1642 2.58579C22.5393 2.96086 22.75 3.46957 22.75 4V16C22.75 16.5304 22.5393 17.0391 22.1642 17.4142C21.7891 17.7893 21.2804 18 20.75 18H14.65L10.95 21.71C10.75 21.9 10.5 22 10.25 22H9.75ZM17.75 11V9H15.75V11H17.75ZM13.75 11V9H11.75V11H13.75ZM9.75 11V9H7.75V11H9.75Z",fill:"#5157CF"})],-1)),It=pe({__name:"ShortsVideoPlayer",props:{shortVideo:{},volume:{},commentsCount:{},isMuted:{type:Boolean}},emits:["video-ended","update-volume","toggle-mute","toggle-comments","toggle-share"],setup(i,{expose:s,emit:l}){const a=i,k=l,n=h(null),r=h(!1),d=h(0),f=h(!1),S=h(!1),$=h(!1),_=h(0),Z=h(0),v=h(!1),F=h(!1),M=h(!1);let x;const B=Ae(),N=h(null),V=h(!1);let E;He(()=>{if(n.value){n.value.volume=a.volume,n.value.muted=a.isMuted,n.value.addEventListener("timeupdate",ne),n.value.addEventListener("loadedmetadata",()=>{var o;Z.value=((o=n.value)==null?void 0:o.duration)||0}),E=new ResizeObserver(o=>{const m=o[0].target;V.value=m.scrollHeight>m.clientHeight}),N.value&&E.observe(N.value);try{const{createView:o}=ct();o({time:1,shortVideo:{id:a.shortVideo.id,type:"SHORT_VIDEO"}})}catch(o){console.error(o)}}}),Ue(()=>{n.value&&(n.value.removeEventListener("timeupdate",ne),n.value.removeEventListener("loadedmetadata",()=>{})),clearTimeout(x),T(),A(),E&&E.disconnect()});const X=o=>{const m=Math.floor(o/60),w=Math.floor(o%60);return`${m}:${w<10?"0":""}${w}`},re=()=>{r.value=!1,k("video-ended")},L=o=>
1{const m=document.querySelector(".volume-progress");if(!m)return;const w=m.getBoundingClientRect();let U=(o.clientX-w.left)/w.width;U=Math.max(0,Math.min(1,U)),k("update-volume",U)};Y(()=>a.volume,o=>{n.value&&(n.value.volume=o,n.value.muted=o===0||a.isMuted)}),Y(()=>a.isMuted,o=>{n.value&&(n.value.muted=o)});const J=()=>{n.value&&(r.value?n.value.pause():n.value.play(),r.value=!r.value)},te=()=>{if(n.value)try{n.value.play().then(()=>{r.value=!0}).catch(o=>{console.log("Unable to play the video, User has not interacted yet.")})}catch(o){console.error(o)}},de=()=>{n.value&&(n.value.pause(),r.value=!1)},ce=()=>{S.value=!S.value},ne=()=>{!n.value||f.value||(_.value=n.value.currentTime,Z.value=n.value.duration,d.value=_.value/Z.value*100)},Q=o=>{o.preventDefault(),f.value=!0,n.value&&r.value&&n.value.pause(),document.addEventListener("mousemove",W),document.addEventListener("touchmove",W),document.addEventListener("mouseup",T),document.addEventListener("touchend",T),document.addEventListener("mouseleave",T)},W=o=>{if(!n.value||!f.value)return;const m=document.querySelector(".progress-bar");if(!m)return;F.value=!0;const w=m.getBoundingClientRect();let q=(("touches"in o?o.touches[0].clientX:o.clientX)-w.left)/w.width;q=Math.max(0,Math.min(1,q)),d.value=q*100,n.value.currentTime=q*n.value.duration,_.value=n.value.currentTime},T=()=>{f.value&&(f.value=!1,F.value=!1,document.removeEventListener("mousemove",W),document.removeEventListener("touchmove",W),document.removeEventListener("mouseup",T),document.removeEventListener("touchend",T),document.removeEventListener("mouseleave",T),r.value&&n.value&&n.value.play())},j=o=>{const m=document.querySelector(".progress-bar");if(!m||!n.value)return;const w=m.getBoundingClientRect(),q=(("touches"in o?o.touches[0].clientX:o.clientX)-w.left)/w.width;n.value.currentTime=q*n.value.duration,_.value=n.value.currentTime,d.value=q*100},ue=o=>{$.value=!0,L(o),document.addEventListener("mousemove",L),document.addEventListener("mouseup",A),document.addEventListener("mouseleave",A)},A=()=>{$.value=!1,document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",A),document.removeEventListener("mouseleave",A)},ve=()=>{n.value&&(n.value.volume>0&&!n.value.muted?(k("update-volume",0),n.value.volume=0,n.value.muted=!0):(D.value?(k("update-volume",1),n.value.volume=1):(k("update-volume",.7),n.value.volume=.7),n.value.muted=!1))},me=()=>{a.shortVideo.comm_disabled||k("toggle-comments")},he=()=>{k("toggle-share")},D=ae(()=>window.screen.width<1200),_e=()=>{B.push("/shorts")};return s({isPlaying:r,playVideo(){n.value&&te()},stopVideo(){n.value&&de()}}),(o,m)=>(u(),p("div",gt,[e("div",{class:"shorts-video-player",onClick:J,onMouseenter:m[6]||(m[6]=w=>M.value=!0),onMouseleave:m[7]||(m[7]=w=>M.value=!1)},[e("video",{ref_key:"videoRef",ref:n,class:"video-element",src:o.shortVideo.short_video_content.file.url,onEnded:re,preload:"metadata",muted:o.isMuted,playsinline:""},null,40,pt),r.value?y("",!0):(u(),p("div",_t,wt)),M.value&&!D.value||D.value&&!r.value?(u(),p("div",{key:1,class:"shorts-video-player__top",onClick:m[2]||(m[2]=I(()=>{},["stop"]))},[e("div",Ct,[(u(),p("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:I(J,["stop"])},St))]),D.value?(u(),p("div",Lt,[e("button",{onClick:_e},bt)])):y("",!0),e("div",{class:"top__volume",onMouseenter:m[0]||(m[0]=w=>v.value=!0),onMouseleave:m[1]||(m[1]=w=>v.value=!1)},[e("div",{class:"volume-icon",onClick:ve},[(u(),p("svg",Ft,[o.isMuted?(u(),p("path",$t)):o.volume>.5?(u(),p("path",Nt)):o.volume>0?(u(),p("path",Et)):(u(),p("path",Mt))]))]),v.value&&!o.isMuted&&!D.value?(u(),p("div",{key:0,class:"volume-progress",onClick:L},[e("div",{class:"volume-progress-bar",style:Fe({width:`${o.volume*100}%`})},[e("div",{class:"volume-handle",onMousedown:ue},null,32)],4)])):y("",!0)],32)])):y("",!0),!F.value&&D.value||!D.value&&!F.value?(u(),p("div",{key:2,class:oe(["shorts-video-player__info",{"shorts-video-player__info--active":!r.value}]),onClick:m[3]||(m[3]=I(()=>{},["stop"]))},[e("div",xt,[e("div",Tt,[e("div",Dt,[e("a",{href:o.shortVideo.short_video_content.source_link,target:"_blank"},O(o.shortVideo.short_video_content.source_name),9,Ht)]),e("div",Pt,O(R(at)(o.shortVideo.public_date_from)),1)]),e("h6",Zt,O(o.shortVideo.title),1),e("div",Bt,[e("p",{ref_key:"descriptionText",ref:N,class:oe(["info__description-text",{expanded:S.value}])},O(o.shortVideo.lead),3),!S.value&&V.value?(u(),p("div",{key:0,class:"info__description-more",onClick:I(ce,["stop"])}," еÑÑ ")):y("",!0)])])],2)):y("",!0),F.value?(u(),p("div",qt,O(X(_.value))+"/"+O(X(Z.value)),1)):y("",!0),e("div",{class:oe(["video-controls",{"video-controls--active":D.value&&!r.value}])},[e("div",Rt,[e("div",{class:"progress-bar",onClick:I(j,["stop"])},[e("div",{class:"progress",style:Fe({width:`${d.value}%`})},[!D.value&&M.value||D.value&&!r.value?(u(),p("div",{key:0,class:"progress-handle",onClick:m[4]||(m[4]=I(()=>{},["stop"])),onMousedown:Q,onTouchstart:Q},null,32)):y("",!0)],4)])])],2),e("div",{class:"shorts-video-player__extra",onClick:m[5]||(m[5]=I(()=>{},["stop"]))},[e("button",{onClick:he},At),e("button",{onClick:me},[o.shortVideo.comm_disabled?y("",!0):(u(),p(we,{key:0},[Ut,e("span",null,O(o.commentsCount),1)],64))])])],32)]))}}),Xt=Be(It,[["__scopeId","data-v-b8a8670b"]]);var b={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ShortVideoFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ShortVideo"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lead"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comm_disabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"public_date_from"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"heading"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CategoryFragment"},directives:[]},{kind:"Field",name:{kind:"Name",value:"children"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CategoryFragment"},directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"subheading"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CategoryFragment"},directives:[]},{kind:"Field",name:{kind:"Name",value:"parent"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CategoryFragment"},directives:[]}]}}]}}
1,{kind:"Field",name:{kind:"Name",value:"post_category"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PostCategoryFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"preview_image"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ImageFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"UserFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"seo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SeoFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"display_position"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"group"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"short_video_content"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"source_name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"source_link"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"file"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"FileFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"duration"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"likes_count"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dislikes_count"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rating"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"RatingFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"comment_count"},arguments:[],directives:[]}]}}],loc:{start:0,end:1109}};b.loc.source={body:`#import "../../categories/graphql/category.fragment.gql" 2#import "../../directory/postCategories/graphql/postCategory.fragment.gql" 3#import "../../directory/image/graphql/image.fragment.gql" 4#import "../../users/graphql/user.fragment.gql" 5#import "../../directory/seo/graphql/seo.fragment.gql" 6#import "../../rating/graphql/rating.fragment.gql" 7#import "../../directory/file/graphql/file.fragment.gql" 8 9fragment ShortVideoFragment on ShortVideo { 10 id 11 slug 12 title 13 lead 14 type 15 content 16 comm_disabled 17 public_date_from 18 heading { 19 ...CategoryFragment 20 children { 21 ...CategoryFragment 22 } 23 } 24 subheading { 25 ...CategoryFragment 26 parent { 27 ...CategoryFragment 28 } 29 } 30 post_category { 31 ...PostCategoryFragment 32 } 33 preview_image { 34 ...ImageFragment 35 } 36 author { 37 ...UserFragment 38 } 39 seo { 40 ...SeoFragment 41 } 42 display_position { 43 id 44 group 45 name 46 } 47 short_video_content { 48 source_name 49 source_link 50 file { 51 ...FileFragment 52 } 53 duration 54 } 55 likes_count 56 dislikes_count 57 rating { 58 ...RatingFragment 59 } 60 comment_count 61} 62`,name:"GraphQL request",locationOffset:{line:1,column:1}};var Ne={};function K(i){return i.filter(function(s){if(s.kind!=="FragmentDefinition")return!0;var l=s.name.value;return Ne[l]?!1:(Ne[l]=!0,!0)})}b.definitions=b.definitions.concat(K(Ie.definitions));b.definitions=b.definitions.concat(K(Xe.definitions));b.definitions=b.definitions.concat(K(Qe.definitions));b.definitions=b.definitions.concat(K(ht.definitions));b.definitions=b.definitions.concat(K(ze.definitions));b.definitions=b.definitions.concat(K(lt.definitions));b.definitions=b.definitions.concat(K(Ye.definitions));function fe(i,s){if(i.kind==="FragmentSpread")s.add(i.name.value);else if(i.kind==="VariableDefinition"){var l=i.type;l.kind==="NamedType"&&s.add(l.name.value)}i.selectionSet&&i.selectionSet.selections.forEach(function(a){fe(a,s)}),i.variableDefinitions&&i.variableDefinitions.forEach(function(a){fe(a,s)}),i.definitions&&i.definitions.forEach(function(a){fe(a,s)})}var ye={};(function(){b.definitions.forEach(function(s){if(s.name){var l=new Set;fe(s,l),ye[s.name.value]=l}})})();function Ee(i,s){for(var l=0;l<i.definitions.length;l++){var a=i.definitions[l];if(a.name&&a.name.value==s)return a}}function Qt(i,s){var l={kind:i.kind,definitions:[Ee(i,s)]};i.hasOwnProperty("loc")&&(l.loc=i.loc);var a=ye[s]||new Set,k=new Set,n=new Set;
62for(a.forEach(function(d){n.add(d)});n.size>0;){var r=n;n=new Set,r.forEach(function(d){if(!k.has(d)){k.add(d);var f=ye[d]||new Set;f.forEach(function(S){n.add(S)})}})}return k.forEach(function(d){var f=Ee(i,d);f&&l.definitions.push(f)}),l}Qt(b,"ShortVideoFragment");var G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ShortVideosGet"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"slug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shortVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"slug"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"current"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ShortVideoFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"previous"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ShortVideoFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"next"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ShortVideoFragment"},directives:[]}]}}]}}]}}],loc:{start:0,end:252}};G.loc.source={body:`#import "./shortVideo.fragment.gql" 63 64query ShortVideosGet($slug: String!) { 65 shortVideo(slug: $slug) { 66 current { 67 ...ShortVideoFragment 68 } 69 previous { 70 ...ShortVideoFragment 71 } 72 next { 73 ...ShortVideoFragment 74 } 75 } 76} 77`,name:"GraphQL request",locationOffset:{line:1,column:1}};var Me={};function zt(i){return i.filter(function(s){if(s.kind!=="FragmentDefinition")return!0;var l=s.name.value;return Me[l]?!1:(Me[l]=!0,!0)})}G.definitions=G.definitions.concat(zt(b.definitions));function ge(i,s){if(i.kind==="FragmentSpread")s.add(i.name.value);else if(i.kind==="VariableDefinition"){var l=i.type;l.kind==="NamedType"&&s.add(l.name.value)}i.selectionSet&&i.selectionSet.selections.forEach(function(a){ge(a,s)}),i.variableDefinitions&&i.variableDefinitions.forEach(function(a){ge(a,s)}),i.definitions&&i.definitions.forEach(function(a){ge(a,s)})}var Se={};(function(){G.definitions.forEach(function(s){if(s.name){var l=new Set;ge(s,l),Se[s.name.value]=l}})})();function xe(i,s){for(var l=0;l<i.definitions.length;l++){var a=i.definitions[l];if(a.name&&a.name.value==s)return a}}function Yt(i,s){var l={kind:i.kind,definitions:[xe(i,s)]};i.hasOwnProperty("loc")&&(l.loc=i.loc);var a=Se[s]||new Set,k=new Set,n=new Set;for(a.forEach(function(d){n.add(d)});n.size>0;){var r=n;n=new Set,r.forEach(function(d){if(!k.has(d)){k.add(d);var f=Se[d]||new Set;f.forEach(function(S){n.add(S)})}})}return k.forEach(function(d){var f=xe(i,d);f&&l.definitions.push(f)}),l}Yt(G,"ShortVideosGet");async function Gt(i){const{data:s,refresh:l,pending:a,error:k}=await Ge(G,{slug:i}),n=ae(()=>{var v;return((v=s.value)==null?void 0:v.shortVideo.current)||null}),r=h([]),d=h([]);Y(s,v=>{r.value=(v==null?void 0:v.shortVideo.next)??[],d.value=(v==null?void 0:v.shortVideo.previous)??[]},{immediate:!0});const{resolveClient:f}=Ke(),S=async v=>{var M;return((M=(await f().query({query:G,variables:{slug:v},fetchPolicy:"network-only"})).data)==null?void 0:M.shortVideo)??null},$=()=>new Set([...n.value?[n.value.id]:[],...r.value.map(v=>v.id),...d.value.map(v=>v.id)]);return{current:n,next:r,previous:d,appendNext:async v=>{const F=await S(v);if(!F)return 0;const M=$(),x=(F.next??[]).filter(B=>!M.has(B.id));return x.length&&(r.value=[...r.value,...x]),x.length},appendPrevious:async v=>{const F=await S(v);if(!F)return 0;const M=$(),x=(F.previous??[]).filter(B=>!M.has(B.id));return x.length&&(d.value=[...d.value,...x]),x.length},error:k,loading:ae(()=>a.value),refresh:l}}const Kt={class:"comments-mobile"},Jt={key:0,class:"comments-mobile__header"},Wt=e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"#898989"})],-1),jt=[Wt],en={class:"comments-mobile__tree comments-section"},tn=e("div",{class:"text"},"ÐÑÑавиÑÑ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑаÑий",-1),nn=e("div",{class:"hr"},null,-1),on=[tn,nn],sn=pe({__name:"CommentsMobileSection",props:{post:{}},emits:["close","comment-added"],setup(i,{emit:s}){const l=i,a=s,k=rt(l.post,["type","display_position","video_content","place","comment_count","dislikes_count","likes_count","rating"]),{comments:n,filters:r,meta:d,loading:f,fetchMore:S,refetch:$}=dt({per_page:50},{post:k}),_=ae(()=>d.value?d.value.current_page<d.value.last_page:!1);async function Z(){r.page=(r.page??1)+1,await S({variables:{page:r.page},updateQuery:(N,{fetchMoreResult:V})=>V?{list:{...N.list,items:[...N.list.items,...V.list.items],meta:{...V.list.meta}}}:N})}const v=h(!1),F=()=>{a("close")},M=async()=>{v.value=!1,await $(),B()},x=(N,V)=>{const E=[2,0,1,1,1,2];return V[N%100>4&&N%100<20?2:E[Math.min(N%10,5)]]},B=()=>{$(),a("comment-added",{id:l.post.id})};
77return(N,V)=>{var E,X;return u(),p("section",Kt,[!v.value&&R(n).length?(u(),p("div",Jt,[e("p",null,O(((E=R(d))==null?void 0:E.total)??"0")+" "+O(x(((X=R(d))==null?void 0:X.total)??0,["комменÑаÑий","комменÑаÑиÑ","комменÑаÑиев"])),1),e("button",{onClick:I(F,["stop"])},jt)])):y("",!0),e("div",en,[R(n).length&&!v.value?(u(),se(ut,{key:0,comments:R(n),post:R(k),onCommentAdded:B},null,8,["comments","post"])):y("",!0)]),v.value?(u(),se(vt,{key:1,class:"comments-mobile__form",post:R(k),onCommentAdded:M,onClose:F,"show-close":!0},null,8,["post"])):y("",!0),_.value?(u(),se(R(We),{key:2,disabled:R(f),onClick:Z},{default:Ce(()=>[Je(" ÐоказаÑÑ ÐµÑе ")]),_:1},8,["disabled"])):y("",!0),v.value?y("",!0):(u(),p("div",{key:3,class:"comments-bottom",onClick:V[0]||(V[0]=re=>v.value=!0)},on))])}}}),ee=i=>(Pe("data-v-3fc05aa4"),i=i(),Ze(),i),an={class:"share"},ln=ee(()=>e("p",{class:"share-title"},"ÐÐÐÐÐÐТЬСЯ",-1)),rn=ee(()=>e("div",{class:"share-line"},null,-1)),dn=ee(()=>e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"#898989"})],-1)),cn=[dn],un=je('<svg width="22" height="24" viewBox="0 0 22 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-3fc05aa4><g clip-path="url(#clip0_2487_41765)" data-v-3fc05aa4><path d="M1.64309 2.97609C0.166992 4.45228 0.166992 6.82837 0.166992 11.58V12.42C0.166992 17.1717 0.166992 19.5478 1.64309 21.0239C3.11927 22.5 5.49537 22.5 10.247 22.5H11.087C15.8387 22.5 18.2148 22.5 19.6909 21.0239C21.167 19.5478 21.167 17.1717 21.167 12.42V11.58C21.167 6.82833 21.167 4.45223 19.6909 2.97609C18.2148 1.5 15.8387 1.5 11.087 1.5H10.247C5.49532 1.5 3.11923 1.5 1.64309 2.97609ZM3.71074 7.88756H6.10826C6.18701 11.895 7.95448 13.5925 9.35449 13.9425V7.88752H11.612V11.3438C12.9945 11.195 14.447 9.62002 14.937 7.88752H17.1945C17.0098 8.78602 16.6417 9.63676 16.1132 10.3865C15.5848 11.1363 14.9073 11.769 14.1232 12.245C14.9987 12.6796 15.772 13.2952 16.3919 14.0508C17.0119 14.8065 17.4644 15.6852 17.7195 16.6288H15.2345C15.0055 15.8092 14.5395 15.0755 13.8951 14.5197C13.2506 13.964 12.4564 13.611 11.612 13.505V16.6288H11.3407C6.55451 16.6288 3.82451 13.3475 3.71074 7.88752V7.88756Z" fill="#191919" data-v-3fc05aa4></path></g><defs data-v-3fc05aa4><clipPath id="clip0_2487_41765" data-v-3fc05aa4><rect width="21" height="24" fill="white" transform="translate(0.166992)" data-v-3fc05aa4></rect></clipPath></defs></svg>',1),vn=[un],mn=ee(()=>e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M13.6634 8.70657C13.6634 7.79503 12.9182 7.04982 12 7.04982C11.0818 7.04982 10.3366 7.79503 10.3366 8.70657C10.3366 9.62477 11.0818 10.3633 12 10.3633C12.9182 10.3633 13.6634 9.62477 13.6634 8.70657Z",fill:"#191919"}),e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 2C4.68629 2 2 4.68629 2 8V16C2 19.3137 4.68629 22 8 22H16C19.3137 22 22 19.3137 22 16V8C22 4.68629 19.3137 2 16 2H8ZM14.4685 12.3261C15.1671 11.7872 15.6928 12.1066 15.8791 12.4858C16.2117 13.1512 15.8391 13.4772 14.9941 14.0162C14.2755 14.4753 13.2975 14.6549 12.6654 14.7148L13.191 15.2537L15.1738 17.2365C15.4798 17.5426 15.4798 18.0283 15.1738 18.3144L15.0873 18.4209C14.7812 18.7203 14.2955 18.7203 13.9961 18.4209C13.4904 17.9152 12.7652 17.1899 12 16.4381L10.0239 18.4209C9.72446 18.7203 9.2321 18.7203 8.93268 18.4209L8.83953 18.3144C8.54012 18.0283 8.54012 17.5426 8.83953 17.2365C9.3283 16.7412 10.0405 16.0353 10.7822 15.3001L10.829 15.2537L11.3613 14.7214C10.7225 14.6549 9.73112 14.4819 9.00587 14.0162C8.16086 13.4772 7.78826 13.1512 8.12094 12.4858C8.30724 12.1066 8.83288 11.7872 9.53151 12.3261C10.483 13.0847 12 13.0847 12 13.0847C12 13.0847 13.517 13.0847 14.4685 12.3261ZM15.3667 8.70657C15.3667 10.5696 13.863 12.0733 12 12.0733C10.137 12.0733 8.63327 10.5696 8.63327 8.70657C8.63327 7.81366 8.98798 6.95732 9.61936 6.32594C10.2507 5.69455 11.1071 5.33984 12 5.33984C12.8929 5.33984 13.7493 5.69455 14.3806 6.32594C15.012 6.95732 15.3667 7.81366 15.3667 8.70657Z",fill:"#191919"})],-1)),hn=[mn],fn=ee(()=>e("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M12.334 2C6.81398 2 2.33398 6.48 2.33398 12C2.33398 17.52 6.81398 22 12.334 22C17.854 22 22.334 17.52 22.334 12C22.334 6.48 17.854 2 12.334 2ZM16.974 8.8C16.824 10.38 16.174 14.22 15.844 15.99C15.704 16.74 15.424 16.99 15.164 17.02C14.584 17.07 14.144 16.64 13.584 16.27C12.704 15.69 12.204 15.33 11.354 14.77C10.364 14.12 11.004 13.76 11.574 13.18C11.724 13.03 14.284 10.7 14.334 10.49C14.3409 10.4582 14.34 10.4252 14.3313 10.3938C14.3226 10.3624 14.3063 10.3337 14.284 10.31C14.224 10.26 14.144 10.28 14.074 10.29C13.984 10.31 12.584 11.24 9.85398 13.08C9.45398 13.35 9.09398 13.49 8.77398 13.48C8.41398 13.47 7.73398 13.28 7.22398 13.11C6.59398 12.91 6.10398 12.8 6.14398 12.45C6.16398 12.27 6.41398 12.09 6.88398 11.9C9.80398 10.63 11.744 9.79 12.714 9.39C15.494 8.23 16.064 8.03 16.444 8.03C16.524 8.03 16.714 8.05 16.834 8.15C16.934 8.23 16.964 8.34 16.974 8.42C16.964 8.48 16.984 8.66 16.974 8.8Z",fill:"#191919"})],-1)),gn=[fn],pn=ee(()=>e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("rect",{x:"2",y:"2",width:"20",height:"20",rx:"6",fill:"black"}),e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.2852 17.9394C11.1075 17.9394 10.5602 17.7675 9.60896 17.0798C9.00724 17.8534 7.10181 18.458 7.01871 17.4236C7.01871 16.6471 6.84679 15.991 6.65195 15.2746C6.41986 14.3921 6.15625 13.4093 6.15625 11.9853C6.15625 8.58412 8.94707 6.02539 12.2537 6.02539C15.5631 6.02539 18.1562 8.7102 18.1562 12.0168C18.1673 15.2722 15.5406 17.922 12.2852 17.9394ZM12.3339 8.96521C10.7236 8.88212 9.46856 9.99673 9.19062 11.7446C8.9614 13.1916 9.36827 14.9537 9.71498 15.0454C9.88117 15.0855 10.2995 14.7474 10.5602 14.4867C10.9914 14.7845 11.4935 14.9634 12.0158 15.0053C13.6844 15.0856 15.1101 13.8153 15.2221 12.1486C15.2873 10.4783 14.0027 9.06366 12.3339 8.96808L12.3339 8.96521Z",fill:"white"})],-1)),_n=[pn],kn={class:"share__link"},wn=pe({__name:"ShareBlock",emits:["closed"],setup(i,{emit:s}){const l=s,a=h(!1),k=()=>{window.open(`https://vk.com/share.php?url=${encodeURIComponent(window.location.href)}`,"_blank","width=600,height=400")},n=()=>{window.open(`https://connect.ok.ru/offer?url=${encodeURIComponent(window.location.href)}`,"_blank","width=600,height=400")},r=()=>{window.open(`https://t.me/share/url?url=${encodeURIComponent(window.location.href)}`,"_blank","width=600,height=400")},d=()=>{window.open(`https://t.me/share/url?url=${encodeURIComponent(window.location.href)}`,"_blank","width=600,height=400")},f=()=>{l("closed")},S=async()=>{try{await navigator.clipboard.writeText(window.location.href),a.value=!0,setTimeout(()=>a.value=!1,2e3)}catch{const _=document.createElement("textarea");_.value=props.url,document.body.appendChild(_),_.select(),document.execCommand("copy"),document.body.removeChild(_),a.value=!0,setTimeout(()=>a.value=!1,2e3)}};return($,_)=>(u(),p("div",an,[e("div",{class:"share__header"},[ln,rn,e("div",{class:"share-close",onClick:f},cn)]),e("div",{class:"share__social"},[e("button",{onClick:k},vn),e("button",{onClick:n},hn),e("button",{onClick:r},gn),e("button",{onClick:d},_n)]),e("div",kn,[e("button",{onClick:S,class:oe({copied:a.value})},O(a.value?"СкопиÑовано!":"СкопиÑоваÑÑ ÑÑÑлкÑ"),3)])]))}}),Te=Be(wn,[["__scopeId","data-v-3fc05aa4"]]),Cn={class:"shorts-show"},yn={key:0,class:"shorts-modal"},Sn={class:"container container-padding position-relative"},Ln={class:"shorts-nav"},Vn=e("div",{class:"stub"},null,-1),bn={class:"shorts-container"},Fn=e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M7.41 15.41L12 10.83L16.59 15.41L18 14L12 8L6 14L7.41 15.41Z",fill:"#5A61ED"})],-1),$n=[Fn],Nn=e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M7.41 8.58002L12 13.17L16.59 8.58002L18 10L12 16L6 10L7.41 8.58002Z",fill:"#5A61ED"})],-1),En=[Nn],Mn={class:"shorts-container__video-list"},xn=["data-slug"],Tn={key:0,class:"shorts-container__comments--desc"},Dn={class:"comments-section"}
77,Hn={key:1,class:"shorts-container__comments--mobile"},Pn={key:2,class:"shorts-container__share--mobile"},De=3,Zn=300,zn=pe({__name:"show",async setup(i){let s,l;const a=h([{title:"ÐÑÑÑÑо и по делÑ",to:{name:"shorts"}},{title:"ÐоÑоÑкое видео",to:{name:"shorts"}}]),n=et().params.slug,r=h(0),d=h(!1),f=h([]),S=h(1),$=h(!1),_=h(!1);He(()=>{{window.addEventListener("wheel",ue,{passive:!1}),window.addEventListener("touchstart",me),window.addEventListener("touchend",he),window.addEventListener("touchmove",q,{passive:!1}),window.addEventListener("keydown",Z),Q(0),$e(()=>{Q(0),f.value[0]&&f.value[0].playVideo()}),document.body.classList.add("shorts-mode");const t=()=>{document.documentElement.style.setProperty("--vh",`${window.innerHeight*.01}px`)};window.addEventListener("resize",t),t()}}),tt(()=>{window.removeEventListener("wheel",ue),window.removeEventListener("touchstart",me),window.removeEventListener("touchend",he),window.removeEventListener("touchmove",q),window.removeEventListener("keydown",Z),document.body.classList.remove("shorts-mode")});const Z=t=>{var C,c;((C=document.activeElement)==null?void 0:C.tagName)==="INPUT"||((c=document.activeElement)==null?void 0:c.tagName)==="TEXTAREA"||((t.key==="ArrowUp"||t.keyCode===38)&&(t.preventDefault(),j()),(t.key==="ArrowDown"||t.keyCode===40)&&(t.preventDefault(),T()),(t.key===" "||t.keyCode===32)&&t.preventDefault())},v=t=>{S.value=t,$.value=t===0},F=()=>{$.value=!$.value,!$.value&&S.value===0&&(S.value=.7)},M=()=>{w.value=!w.value,o.value&&(_.value=!1)},x=(t,g)=>{f.value[g]=t},B=t=>{history.replaceState(history.state,"",`/shorts/${t.slug}`),a.value[2].title=t.title},{current:N,next:V,previous:E,appendNext:X,appendPrevious:re}=([s,l]=nt(()=>Gt(n)),s=await s,l(),s),L=h([]);Y([N,V,E],()=>{const t=[];N.value&&t.push(N.value),V.value&&t.push(...V.value),E.value&&t.push(...E.value),L.value=JSON.parse(JSON.stringify(t))},{immediate:!0});const J=h(!1),te=h(!1),de=h(!0),ce=h(!0);Y(r,async t=>{const g=1+V.value.length;if(t<g){if(!de.value||J.value||t<g-De||V.value.length===0)return;J.value=!0;try{const c=V.value[V.value.length-1].slug;await X(c)===0&&(de.value=!1)}finally{J.value=!1}return}if(!(!ce.value||te.value)&&!(t<L.value.length-De)&&E.value.length!==0){te.value=!0;try{const c=E.value[E.value.length-1].slug;await re(c)===0&&(ce.value=!1)}finally{te.value=!1}}}),Y(r,t=>{var g,C,c,H,P;L.value[t]&&st({title:"ÐÑÑÑÑо и по Ð´ÐµÐ»Ñ | "+L.value[t].title,ogTitle:(g=L.value[t].seo)==null?void 0:g.title,description:(C=L.value[t].seo)==null?void 0:C.description,ogDescription:(c=L.value[t].seo)==null?void 0:c.description,ogImage:(P=(H=L.value[t].preview_image)==null?void 0:H.file)==null?void 0:P.url})},{immediate:!0});const ne=t=>{const g=L.value.findIndex(C=>C.id===t.id);g!==!1&&L.value[g].comment_count++};Y(r,(t,g)=>{var C;g>=0&&f.value[g]&&((C=f.value[g])==null||C.stopVideo()),t>=0&&f.value[t]&&$e(()=>{var c;(c=f.value[t])==null||c.playVideo()})});const Q=t=>{if(d.value||t<0||t>=L.value.length)return;d.value=!0,r.value=t;const g=document.querySelectorAll(".video-block");if(g[t]){const c=g[t].offsetTop,H=window.scrollY,P=c-H,ie=Math.min(500,Math.abs(P)*.5);let ke=null;const Le=Ve=>{ke||(ke=Ve);const be=Ve-ke,Re=Math.min(be/ie,1);window.scrollTo(0,H+P*W(Re)),be<ie?requestAnimationFrame(Le):(B(L.value[t]),setTimeout(()=>{d.value=!1},Zn))};requestAnimationFrame(Le)}},W=t=>t<.5?2*t*t:-1+(4-2*t)*t,T=()=>{r.value<L.value.length-1&&(o.value&&(_.value=!1),Q(r.value+1))},j=()=>{r.value>0&&(o.value&&(_.value=!1),Q(r.value-1))},ue=t=>{const g=t.composedPath().find(C=>{var c;return(c=C.classList)==null?void 0:c.contains("comments-section")});d.value||g||(r.value!==L.value.length-1&&t.preventDefault(),t.deltaY>50?T():t.deltaY<-50&&j())};let A=0,ve=0;const me=t=>{t.composedPath().find(C=>{var c;return(c=C.classList)==null?void 0:c.contains("comments-section")})||(A=t.touches[0].clientY,ve=Date.now())},he=t=>{const g=t.composedPath().find(P=>{var ie;return(ie=P.classList)==null?void 0:ie.contains("comments-section")});if(d.value||g)return;const C=t.changedTouches[0].clientY,c=A-C;Date.now()-ve>300||Math.abs(c)<50||(c>50?T():c<-50&&j())},D=t=>({id:t.id}),_e=()=>{_.value=!_.value,o.value&&(w.value=!1)},o=ae(()=>window.screen.width<1200),m=()=>{_.value||w.value||T()},w=h(!1),U=()=>{w.value=!1},q=t=>{{if(t.composedPath().find(C=>{var c;return(c=C.classList)==null?void 0:c.contains("comments-section")}))return;t.preventDefault()}},qe=t=>{console.log(t)};return(t,g)=>{const C=Oe;return u(),p("div",Cn,[z(C,null,{default:Ce(()=>[w.value&&!o.value?(u(),p("div",yn,[z(Te,{onClosed:U})])):y("",!0)]),_:1}),e("section",Sn,[e("div",Ln,[Vn,z(ft,{style:{"z-index":"3",position:"relative"},items:a.value},null,8,["items"]),z(it,{"only-hr":!0,text:"ÐÑÑÑÑо и по делÑ",link:"/shorts"})]),e("div",bn,[e("div",{class:"shorts-container__navigation"},[e("button",{class:"nav-btn",onClick:j}
77,$n),e("button",{class:"nav-btn",onClick:T},En)]),e("div",Mn,[(u(!0),p(we,null,ot(L.value,(c,H)=>(u(),p("div",{key:c.slug,class:oe(["video-block",{"video-block--comments":_.value}]),"data-slug":c.slug},[r.value+2>H?(u(),p(we,{key:0},[z(Xt,{"short-video":c,class:"video-player",onUpdateVolume:v,onToggleMute:F,onVideoEnded:g[0]||(g[0]=P=>m()),onToggleComments:_e,ref_for:!0,ref:P=>x(P,H),"is-muted":$.value,volume:S.value,"comments-count":c.comment_count,onToggleShare:M},null,8,["short-video","is-muted","volume","comments-count"]),z(C,null,{default:Ce(()=>[_.value&&!o.value?(u(),p("div",Tn,[e("div",Dn,[c.comm_disabled?y("",!0):(u(),se(mt,{key:0,onCommentAdded:ne,post:D(c)},null,8,["post"]))])])):y("",!0),_.value&&o.value&&r.value===H?(u(),p("div",Hn,[c.comm_disabled?y("",!0):(u(),se(sn,{key:0,onScroll:qe,onCommentAdded:ne,onClose:g[1]||(g[1]=P=>_.value=!1),post:D(c)},null,8,["post"]))])):y("",!0),w.value&&o.value?(u(),p("div",Pn,[z(Te,{onClosed:U})])):y("",!0)]),_:2},1024)],64)):y("",!0)],10,xn))),128))])])])])}}});export{zn as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.