1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5636],{59592:function(e,t,s){s.d(t,{s:function(){return r}});var l=s(85893);let r=e=>{let{children:t,idname:s=null}=e;return(0,l.jsx)("li",{id:s,className:"border-b cursor-pointer w-full hover:bg-blue-100 hover:text-yaay-dark",children:t})};t.Z=e=>{let{visible:t=!0,children:s,style:r}=e;return t&&(0,l.jsx)("ul",{className:"p-0 bg-white rounded border border-gray-200 dark:bg-yaay-dark dark:text-yaay-lightgray",style:{...r},children:s})}},33233:function(e,t,s){s.d(t,{Z:function(){return f}});var l=s(85893),r=s(67294),i=s(5068),a=s(91189),n=s(54947),o=s(63480),d=s(41664),c=s.n(d),u=s(12607);function x(e){let{title:t="",showMoreUrl:s="",dataSource:i=[],itemClass:a="border-b p-1.5 font-normal text-gray-500",rowKey:n,renderItem:o,redirectToLogin:d=!1}=e,x={},{loggedIn:m}=(0,u.Z)(),h=[...i],f=(e,t)=>{let s;return o?((s="function"==typeof n?n(e):"string"==typeof n?e[n]:e.key)||(s="list-item-".concat(t)),x[t]=s,o(e,t)):null},p=(0,l.jsx)("span",{className:"p-3 text-center text-sm w-full"});if(h.length>0){let e=h.map((e,t)=>f(e,t)),t=r.Children.map(e,(e,t)=>{var s;let r=null==e?void 0:null===(s=e.props)||void 0===s?void 0:s.href;return r&&"undefined"!==r&&""!==r.trim()&&"/undefined"!==r?(0,l.jsx)(c(),{href:d?"/login":r,children:(0,l.jsx)("li",{className:a,children:e})},x[t]):(0,l.jsx)("li",{className:a,children:e},x[t])});p=(0,l.jsxs)("ul",{className:"h-auto w-full dark:bg-yaay-dark-bar",children:[t,s&&(0,l.jsx)("li",{children:"string"==typeof s?(0,l.jsx)(c(),{href:s,children:"Daha fazla g\xf6ster"}):s}
1)]})}return(0,l.jsxs)("div",{className:"p-6 border-b border-yaay-lightgray trend-area",children:[(0,l.jsx)("h3",{className:"font-black dark:text-gray-300 mb-3.5 ",children:t}),p]})}var m=s(71914);let h=(e,t,s)=>(0,n.ZP)().get("".concat(e,"limit=").concat(t,"&i18nFilterType=").concat(s||"4")).then(e=>e.data);var f=()=>{let{t:e}=(0,a.Z)(),[t,s]=(0,r.useState)([]),{isChangedSurveyOption:d,feedLocation:c}=(0,r.useContext)(m.w),{data:u,error:f}=(0,i.ZP)(c?["/sessions/posts/dailyPopularPosts?",20,c]:null,h),p=()=>{(0,n.ZP)().get("/sessions/posts/dailyPopularPosts?limit=20&i18nFilterType=".concat(c||"4"),{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(e=>s(e.data.filter(e=>!e.user.isBlockedYou)))};return(0,r.useEffect)(()=>{p()},[d]),(0,r.useEffect)(()=>{u&&s(u.filter(e=>!e.user.isBlockedYou))},[u]),(0,l.jsx)(x,{title:e("home.popularTitle.text"),itemClass:"p-0",showMoreUrl:null,dataSource:t,renderItem:e=>(0,l.jsx)(o.y,{isSimple:!1,post:e})})}},5636:function(e,t,s){s.d(t,{Z:function(){return tk}});var l,r,i=s(85893),a=s(41664),n=s.n(a),o=s(67294),d=s(16884),c=s(46003),u=s(91189),x=s(71914),m=s(12607),h=s(6844),f=s(77489),p=s(3915),v=s(49570);let g="#717182",y=()=>(0,i.jsxs)("svg",{width:"20",height:"20",viewBox:"6 6 20 20",fill:"none","aria-hidden":!0,className:"text-gray-600 dark:text-gray-400",children:[(0,i.jsx)("path",{d:"M13.25 18.75H18.75C21.2353 18.75 23.25 20.7647 23.25 23.25C23.25 23.8023 22.8023 24.25 22.25 24.25H9.75C9.19772 24.25 8.75 23.8023 8.75 23.25C8.75 20.7647 10.7647 18.75 13.25 18.75Z",stroke:"currentColor",strokeWidth:"1.5"}),(0,i.jsx)("circle",{cx:"16",cy:"12",r:"3.25",stroke:"currentColor",strokeWidth:"1.5"})]}),j=()=>(0,i.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":!0,children:[(0,i.jsx)("circle",{cx:"10",cy:"10",r:"7.5",stroke:g,strokeWidth:"1.5"}),(0,i.jsx)("path",{d:"M7.75 7.5C7.75 6.39543 8.64543 5.5 9.75 5.5C10.8546 5.5 11.75 6.39543 11.75 7.5C11.75 8.25 11.25 8.75 10.5 9.1C10.15 9.28 9.875 9.65 9.875 10.0625V10.5",stroke:g,strokeWidth:"1.5",strokeLinecap:"round"}),(0,i.jsx)("circle",{cx:"9.875",cy:"12.75",r:"0.75",fill:g})]}),w=()=>(0,i.jsxs)("svg",{width:"20",height:"20",viewBox:"4 3.5 24 25",fill:"none","aria-hidden":!0,className:"text-gray-600 dark:text-gray-400",children:[(0,i.jsx)("path",{d:"M12.9492 4.93567C14.837 3.84575 17.163 3.84575 19.0508 4.93567L24.0918 7.84582C25.9795 8.93578 27.1426 10.9502 27.1426 13.13V18.9503C27.1426 21.1301 25.9795 23.1445 24.0918 24.2345L19.0508 27.1447C17.163 28.2346 14.837 28.2346 12.9492 27.1447L7.9082 24.2345C6.0205 23.1446 4.85742 21.1301 4.85742 18.9503V13.13C4.85742 10.9502 6.02051 8.93577 7.9082 7.84582L12.9492 4.93567Z",stroke:"currentColor",strokeWidth:"1.5"}),(0,i.jsx)("path",{d:"M14.1476 8.80197C15.2939 8.14016 16.7062 8.14016 17.8525 8.80197L21.3423 10.8168C22.4885 11.4786 23.1947 12.7017 23.1947 14.0253V18.055C23.1947 19.3786 22.4885 20.6016 21.3423 21.2635L17.8525 23.2783C16.7062 23.9401 15.2939 23.9401 14.1476 23.2783L10.6578 21.2635C9.51154 20.6016 8.8054 19.3786 8.8054 18.055V14.0253C8.8054 12.7017 9.51154 11.4786 10.6578 10.8168L14.1476 8.80197Z",stroke:"currentColor",strokeWidth:"0.166154"}
1),(0,i.jsx)("path",{d:"M14.5593 10.4105C15.4509 9.89571 16.5493 9.89571 17.4409 10.4105L20.1551 11.9775C21.0467 12.4923 21.5959 13.4436 21.5959 14.473V17.6072C21.5959 18.6367 21.0467 19.588 20.1551 20.1027L17.4409 21.6698C16.5493 22.1845 15.4509 22.1845 14.5593 21.6698L11.845 20.1027C10.9535 19.588 10.4043 18.6367 10.4043 17.6072V14.473C10.4043 13.4436 10.9535 12.4923 11.845 11.9775L14.5593 10.4105Z",stroke:"currentColor",strokeWidth:"0.0923077"}),(0,i.jsx)("path",{d:"M13.9418 7.03758C15.2154 6.30223 16.7846 6.30223 18.0583 7.03758L22.7353 9.73783C24.0089 10.4732 24.7935 11.8321 24.7935 13.3028V18.7033C24.7935 20.174 24.0089 21.533 22.7353 22.2683L18.0583 24.9686C16.7846 25.7039 15.2154 25.7039 13.9418 24.9686L9.2648 22.2683C7.99115 21.533 7.20655 20.174 7.20655 18.7033V13.3028C7.20655 11.8321 7.99115 10.4732 9.2648 9.73783L13.9418 7.03758Z",stroke:"currentColor",strokeWidth:"0.461539"}),(0,i.jsx)("path",{d:"M15.6688 12.0957C15.8042 11.8212 16.1956 11.8212 16.331 12.0957L17.2704 13.9991C17.3242 14.1081 17.4281 14.1836 17.5484 14.2011L19.649 14.5063C19.9519 14.5503 20.0728 14.9225 19.8536 15.1361L18.3336 16.6178C18.2466 16.7026 18.2069 16.8248 18.2274 16.9446L18.5863 19.0367C18.638 19.3383 18.3214 19.5683 18.0505 19.4259L16.1717 18.4382C16.0641 18.3816 15.9356 18.3816 15.8281 18.4382L13.9492 19.4259C13.6784 19.5683 13.3618 19.3383 13.4135 19.0367L13.7723 16.9446C13.7929 16.8248 13.7532 16.7026 13.6661 16.6178L12.1461 15.1361C11.927 14.9225 12.0479 14.5503 12.3508 14.5063L14.4514 14.2011C14.5716 14.1836 14.6756 14.1081 14.7294 13.9991L15.6688 12.0957Z",fill:"currentColor"})]}),b=e=>{let{href:t,icon:s,label:l,danger:r=!1}=e;return(0,i.jsxs)(n(),{href:t,className:"flex items-center gap-3 px-4 py-2.5 text-sm font-medium transition-colors hover:bg-gray-50 dark:hover:bg-gray-800 ".concat(r?"text-red-600":"text-gray-800 dark:text-gray-200"),children:[(0,i.jsx)("span",{className:"flex-none w-5 h-5 flex items-center justify-center",children:s}),l]})};var N=e=>{let{username:t,t:s,onReputationClick:l}=e;return(0,i.jsxs)("div",{className:"bg-white dark:bg-yaay-dark-bar rounded-xl shadow-[0_8px_24px_rgba(16,24,40,0.12)] border border-gray-100 dark:border-gray-700 py-2 min-w-[210px] overflow-hidden",children:[(0,i.jsx)(b,{href:"/".concat(t),icon:(0,i.jsx)(y,{}),label:s("profile.settingsProfile.text")}),(0,i.jsx)(b,{href:"/settings",icon:(0,i.jsx)(v.ew,{size:20,fill:p.D.GRAY_DARK}),label:s("settings.settingsButtontext")}),l&&(0,i.jsxs)("button",{type:"button",onClick:l,className:"flex items-center gap-3 px-4 py-2.5 text-sm font-medium text-gray-800 dark:text-gray-200 transition-colors hover:bg-gray-50 dark:hover:bg-gray-800 w-full text-left",children:[(0,i.jsx)("span",{className:"flex-none w-5 h-5 flex items-center justify-center",children:(0,i.jsx)(w,{})}),s("settings.myPointsButton.text")]}),(0,i.jsx)(b,{href:"mailto:[email protected]",icon:(0,i.jsx)(h.P,{size:18,fill:p.D.GRAY_DARK}),label:s("settings.contactButton.text")}),(0,i.jsx)(b,{href:"/help",icon:(0,i.jsx)(j,{}),label:s("settings.HelpButton.text")}),(0,i.jsxs)("div",{className:"md:hidden",children:[(0,i.jsx)("div",{className:"my-1 border-t border-gray-100 dark:border-gray-700"}),(0,i.jsx)(b,{href:f.PageRoutes.USER_NOTIFICATIONS,icon:(0,i.jsx)(v.Dk,{size:20,fill:p.D.GRAY_DARK}),label:s("settings.notificationButton.text")}),(0,i.jsx)(b,{href:f.PageRoutes.MESSAGES,icon:(0,i.jsx)(h.P,{size:18,fill:p.D.GRAY_DARK}),label:s("settings.messageButton.text")})]}),(0,i.jsx)("div",{className:"my-1 border-t border-gray-100 dark:border-gray-700"}),(0,i.jsx)(b,{href:"/auth/logout",icon:(0,i.jsx)("img",{src:"/images/logout.svg",alt:"",className:"w-5 h-5","aria-hidden":!0}),label:s("settings.logOutButton.text"),danger:!0})]})},k=()=>{let{t:e}=(0,u.Z)(),{me:t,loading:s}=(0,c.Z)(),{setReputationModal:l}=(0,o.useContext)(x.w),{loggedIn:r,user:a}=(0,m.Z)(),[n,h]=(0,o.useState)(!1);return((0,o.useEffect)(()=>{!0==r&&!1==s&&t&&t.username==a.username&&h(!0)},[r,s,t,null==a?void 0:a.username]),n&&(null==t?void 0:t.username))?(0,i.jsx)(d.vb,{overlay:(0,i.jsx)(N,{username:t.username,t:e,onReputationClick:()=>l(!0)}),title:(0,i.jsx)("button",{type:"button",className:"w-8 h-8 sm:w-9 sm:h-9 md:w-10 md:h-10 rounded-full overflow-hidden cursor-pointer focus:outline-none ring-2 ring-transparent hover:ring-white/40 transition-shadow","aria-label":"Profil men\xfcs\xfc",children:(0,i.jsx)("img",{src:t.profileImage||"/images/user_blank.png",alt:"".concat(t.username," profil"),className:"w-full h-full object-cover"})})}):(0,i.jsx)(d.vb,{overlay:(0,i.jsx)(N,{username:(null==a?void 0:a.username)||"",t:e,onReputationClick:()=>l(!0)}),title:(0,i.jsx)("button",{type:"button",className:"w-8 h-8 sm:w-9 sm:h-9 md:w-10 md:h-10 rounded-full overflow-hidden cursor-pointer focus:outline-none","aria-label":"Menu",children:(0,i.jsx)("img",{src:"/images/user_blank.png",alt:"profile",className:"w-full h-full object-cover"})})})},C=s(80298);let S="w-[18px] h-[18px] sm:w-5 sm:h-5 invert opacity-95";var L=()=>{let[e,t]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let e=()=>t((0,C.K3)());e();let s=new MutationObserver(e);return s.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}
1),()=>s.disconnect()},[]),(0,i.jsxs)("button",{type:"button",onClick:()=>{let e=!(0,C.K3)();t(e),(0,C._v)(e?"dark":"light")},"aria-label":e?"Switch to light mode":"Switch to dark mode",className:"rounded-full w-8 h-8 sm:w-9 sm:h-9 md:w-10 md:h-10 flex items-center justify-center hover:bg-white/20 dark:hover:bg-gray-800 transition-colors",children:[(0,i.jsx)("img",{src:"/images/Moon.svg",alt:"","aria-hidden":"true",className:"".concat(S," dark:hidden")}),(0,i.jsx)("img",{src:"/images/Sun.svg",alt:"","aria-hidden":"true",className:"".concat(S," hidden dark:block")})]})},I=s(11163),E=s(5068),_=s(46658),M=s(69502),F=s(89287),R=s(34978);let W={refreshInterval:15e3,revalidateOnFocus:!0,revalidateOnReconnect:!0,dedupingInterval:2e3},Z=(e,t,s)=>{e.forEach(s),t.current=!0},z=e=>{let{enabled:t,t:s}=e,l=(0,I.useRouter)(),r=(0,o.useRef)(s);r.current=s;let{i18n:i}=(0,R.Q)(),a=l.pathname.startsWith("/notifications"),n=l.pathname.startsWith("/messages"),d=(0,o.useRef)(new Set),c=(0,o.useRef)(new Map),u=(0,o.useRef)(!1),x=(0,o.useRef)(!1),{data:m=[]}=(0,E.ZP)(F.rP,F.DX,W),{data:h=[]}=(0,E.ZP)(F.pZ,F.EU,W);return(0,o.useEffect)(()=>{if(!t)return;let e=()=>{"visible"===document.visibilityState&&((0,_.j)(F.rP),(0,_.j)(F.pZ))};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[t]),(0,o.useEffect)(()=>{if(t){if(a){Z(m,u,e=>d.current.add(e.id));return}if(!u.current){Z(m,u,e=>d.current.add(e.id));return}m.forEach(e=>{var t,s,l;if(e.read||d.current.has(e.id))return;d.current.add(e.id);let i=null===(t=e.notificationCategory)||void 0===t?void 0:t.name,a=i?r.current("push.".concat(i,".text")):r.current("desktopNotificationNewNotificationText"),n=(null===(s=e.fromUser)||void 0===s?void 0:s.name)||"";(0,M.w3)({title:r.current("push.notificationLabel.text"),body:n?"".concat(n,": ").concat(a):a,href:(null===(l=e.notificationCategory)||void 0===l?void 0:l.id)===9?"/notifications/followRequest":"/notifications",tag:"notification-".concat(e.id)})})}},[m,t,a]),(0,o.useEffect)(()=>{if(t){if(n||!x.current){Z(h,x,e=>{var t;(null===(t=e.fromUser)||void 0===t?void 0:t.id)!=null&&c.current.set(e.fromUser.id,e.id)});return}h.forEach(e=>{var t,s;let l=null===(t=e.fromUser)||void 0===t?void 0:t.id;if(null==l||e.unreadedCount<=0)return;let r=null!==(s=c.current.get(l))&&void 0!==s?s:0;e.id!==r&&(c.current.set(l,e.id),(0,M.w3)({title:e.fromUser.name,body:e.message,href:"/messages/".concat(l),tag:"message-".concat(l,"-").concat(e.id)}))})}},[h,t,n]),{notificationCount:(0,F.as)(m),messageCount:(0,F.Q)(h)}},P=e=>{let{path:t,notifyCount:s,children:l}=e;return(0,i.jsxs)(n(),{href:t,className:"relative hidden md:flex ".concat("rounded-full w-8 h-8 sm:w-9 sm:h-9 md:w-10 md:h-10 flex flex-none items-center justify-center hover:bg-white/20 dark:hover:bg-gray-800 transition-colors"),children:[l,s>0&&(0,i.jsx)("span",{className:"absolute -top-0.5 -right-0.5 min-w-[16px] h-4 px-1 flex items-center justify-center bg-red-500 text-white text-[10px] font-semibold leading-none rounded-full dark:border-yaay-dark",children:s>99?"99+":s})]})};var D=()=>{let{t:e}=(0,u.Z)(),{me:t}=(0,c.Z)(),{notificationCount:s,messageCount:l}=z({enabled:(null==t?void 0:t.send_notification)===!0,t:e});return(0,i.jsxs)("div",{className:"flex items-center mr-3",children:[(0,i.jsx)(L,{}),(0,i.jsx)(P,{notifyCount:s,path:f.PageRoutes.USER_NOTIFICATIONS,children:(0,i.jsx)("img",{src:"/images/Bell.svg",alt:"Bell",className:"w-[18px] h-[18px] sm:w-[21px] sm:h-[21px] invert opacity-95"})}),(0,i.jsx)(P,{notifyCount:l,path:f.PageRoutes.MESSAGES,children:(0,i.jsx)("img",{src:"/images/Messages.svg",alt:"Messages",className:"w-[18px] h-[18px] sm:w-[21px] sm:h-[21px] invert opacity-95"})})]})},T=s(87902);let B=e=>{let{className:t}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("img",{src:"/yaay_logo_light.svg",alt:"Yaay",className:"".concat(null!=t?t:""," dark:hidden")}),(0,i.jsx)("img",{src:"/yaay_logo.svg",alt:"Yaay",className:"".concat(null!=t?t:""," hidden dark:block")})]})},A=()=>{let{t:e}=(0,u.Z)();return(0,i.jsxs)("div",{className:"w-full max-w-[1404px] mx-auto h-16 px-4 flex items-center justify-between",children:[(0,i.jsx)(n(),{href:"/",className:"flex-shrink-0",children:(0,i.jsx)(B,{className:"h-9 w-auto"})}),(0,i.jsxs)("div",{className:"flex gap-3",children:[(0,i.jsx)(n(),{href:"/login",className:"btn btn-outline-primary border-white/80 rounded-full text-white hover:text-yaay-green hover:border-yaay-green w-28",children:e("reception.loginButton.text")}),(0,i.jsx)(n(),{href:"/register",className:"btn btn-primary bg-white text-yaay-blue rounded-full hover:bg-yaay-dirt-white border-0 w-28",children:e("reception.registerButton.text")})]})]})},H=()=>(0,i.jsx)("div",{className:"w-full px-3 sm:px-4 box-border",children:(0,i.jsxs)("div",{className:"w-full max-w-[1404px] mx-auto h-16 flex items-center justify-center gap-2 md:gap-6 xl:gap-10",children:[(0,i.jsx)("div",{className:"hidden md:flex min-w-0
1w-[278px] max-w-[278px] flex-[0_1_278px] items-center",children:(0,i.jsx)(n(),{href:"/",className:"inline-block",children:(0,i.jsx)(B,{className:"h-9 w-auto"})})}),(0,i.jsx)(n(),{href:"/",className:"md:hidden flex-shrink-0",children:(0,i.jsx)(B,{className:"h-7 w-auto sm:h-8"})}),(0,i.jsx)("div",{className:"min-w-0 flex-1 max-w-[720px] md:flex-[1_1_720px]",children:(0,i.jsx)(T.UI,{})}),(0,i.jsxs)("div",{className:"flex min-w-0 items-center justify-end w-auto md:w-[326px] md:max-w-[326px] md:flex-[0_1_326px]",children:[(0,i.jsx)(D,{}),(0,i.jsx)(k,{})]})]})});var V=()=>{let{loggedIn:e}=(0,m.Z)();return(0,i.jsx)("header",{className:"sticky top-0 z-100 max-w-full w-full bg-yaay-blue dark:bg-yaay-dark h-16",children:void 0===e?(0,i.jsx)(i.Fragment,{}):e?(0,i.jsx)(H,{}):(0,i.jsx)(A,{})})},U=s(94938),O=s(12227),Y=function(){let{topOffset:e=80,bottomOffset:t=8,minWidth:s=1024,storyExpandedTop:l,storyCollapseScrollPx:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[i,a]=(0,o.useState)(null),n=(0,o.useRef)({topOffset:e,bottomOffset:t,minWidth:s,storyExpandedTop:l,storyCollapseScrollPx:r});n.current={topOffset:e,bottomOffset:t,minWidth:s,storyExpandedTop:l,storyCollapseScrollPx:r};let d=(0,o.useRef)(null),c=(0,o.useCallback)(e=>{a(e)},[]);return(0,o.useEffect)(()=>{d.current&&d.current()},[e,t,s,l,r]),(0,o.useEffect)(()=>{var e,t;if(!i)return;let s=i.parentElement;if(!s)return;let l={position:i.style.position,top:i.style.top,left:i.style.left,width:i.style.width,maxWidth:i.style.maxWidth},r={minHeight:s.style.minHeight},a=window.pageYOffset,o=n.current.topOffset,c=!1,u=!1,x=0,m=0,h=0,f=()=>{let e=s.getBoundingClientRect(),t=i.getBoundingClientRect();x=e.left,m=e.width||t.width,u||(h=t.top-e.top)},p=()=>{if(!u)return;let e=s.getBoundingClientRect();x=e.left,m=e.width||m,i.style.left="".concat(x,"px"),i.style.width="".concat(m,"px"),i.style.maxWidth="".concat(m,"px")},v=()=>{i.style.position=l.position,i.style.top=l.top,i.style.left=l.left,i.style.width=l.width,i.style.maxWidth=l.maxWidth,s.style.minHeight=r.minHeight,u=!1},g=()=>{f(),s.style.minHeight="".concat(i.offsetHeight,"px"),i.style.position="fixed",i.style.left="".concat(x,"px"),i.style.width="".concat(m,"px"),i.style.maxWidth="".concat(m,"px"),u=!0},y=(e,t,s,l)=>t<=0?e:e+(s-e)*Math.min(1,Math.max(0,l/t)),j=()=>{let e;let{topOffset:t,bottomOffset:l,minWidth:r,storyExpandedTop:d,storyCollapseScrollPx:x}=n.current;if(window.innerWidth<r){u&&v(),c=!1;return}u||g(),s.style.minHeight="".concat(i.offsetHeight,"px");let m=window.pageYOffset,f=m-a,p=window.innerHeight,j=i.offsetHeight;o=j+(e="number"==typeof d&&d>0&&"number"==typeof x&&x>0?y(d,x,t,m):Math.max(t,s.getBoundingClientRect().top+h))<=p?e:Math.min(e,Math.max(p-j-l,o-f)),i.style.top="".concat(o,"px"),a=m,c=!1},w=()=>{c||(window.requestAnimationFrame(j),c=!0)};d.current=()=>{let{topOffset:e,storyExpandedTop:t,storyCollapseScrollPx:s}=n.current,l=window.pageYOffset;o="number"==typeof t&&t>0&&"number"==typeof s&&s>0?y(t,s,e,l):e,a=l,w()};let b=()=>{u?(v(),window.requestAnimationFrame(()=>{window.innerWidth>=n.current.minWidth&&(g(),j())})):w()};j(),window.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",b),null===(e=window.visualViewport)||void 0===e||e.addEventListener("resize",b),null===(t=window.visualViewport)||void 0===t||t.addEventListener("scroll",b);let N="undefined"!=typeof ResizeObserver?new ResizeObserver(()=>{p(),w()}):null;return null==N||N.observe(i),null==N||N.observe(s),N&&"undefined"!=typeof document&&document.body&&N.observe(document.body),()=>{var e,t;window.removeEventListener("scroll",w),window.removeEventListener("resize",b),null===(e=window.visualViewport)||void 0===e||e.removeEventListener("resize",b),null===(t=window.visualViewport)||void 0===t||t.removeEventListener("scroll",b),null==N||N.disconnect(),d.current=null,v()}},[i]),c};let q=e=>{let{text:t,className:s="",maxPx:l=14,minPx:r=9}=e,a=(0,o.useRef)(null),[n,d]=(0,o.useState)(l);return(0,o.useLayoutEffect)(()=>{let e=a.current;if(!e)return;let t=()=>{let t=l;for(e.style.fontSize="".concat(t,"px");t>r&&e.scrollWidth>e.clientWidth+.5;)t-=.5,e.style.fontSize="".concat(t,"px");d(t)};t();let s=e.parentElement;if(!s||"undefined"==typeof ResizeObserver)return;let i=new ResizeObserver(t);return i.observe(s),()=>i.disconnect()},[t,l,r]),(0,i.jsx)("span",{ref:a,className:s,style:{fontSize:n},title:t,children:t})},G=e=>{let{category:t,isSubscribed:s,size:l}=e,{t:r,locale:a}=(0,u.Z)();(0,o.useEffect)(()=>{},[t]);let{loggedIn:d}=(0,m.Z)();if(void 0==t)return(0,i.jsx)(i.Fragment,{});{let e=(0,U.LM)(t.follow_count,a);switch(l){case"large":return(0,i.jsxs)(n(),{style:{width:175,height:175},href:d?"/category/".concat(t.code,"/popular"):"/login",className:"rounded-md p-2 cursor-pointer text-sm dark:bg-yaay-dark-bar border-yaay-lightgray hover:border-yaay-blue",children:[(0,i.jsx)("div",{className:"m-0 mx-auto mb-2",style:{width:35,height:35},children:(0,i.jsx)("div",{className:"w-full h-full",children:(0,i.jsx)("img",{className:"w-full h-full",src:"/images/category/".concat(t.code.toLowerCase(),".png"),alt:"".concat(r(t.code))})})}),(0,i.jsx)("strong",{children:r(t.code)}),(0,i.jsx)("br",{}),(0,i.jsx)("span",{children:e})]});case"wide":return(0,i.jsxs)(n(),{className:"rounded-2xl gap-3 px-4 py-3.5 cursor-pointer flex items-center bg-white shadow-[0_1px_2px_rgba(16,24,40,0.06)] border hover:shadow-[0_2px_8px_rgba(16,24,40,0.08)] dark:bg-yaay-dark-bar dark:border-yaay-dark-bar transition-shadow",href:"/category/".concat(t.code,"/popular"),children:[(0,i.jsx)("div",{className:"flex-none w-9 h-9",children:(0,i.jsx)("img",{className:"w-full h-full object-contain",src:"/images/category/".concat(t.code,".png"),alt:"".concat(r(t.code)," ikonu")})}),(0,i.jsxs)("div",{className:"flex flex-col gap-1.5 min-w-0 items-start",children:[(0,i.jsx)(q,{text:r("category.".concat(t.code,".text")),className:"block w-full text-yaay-dark font-bold leading-3 dark:text-gray-300 whitespace-nowrap"}),(0,i.jsx)("span",{className:"mt-1 text-yaay-blue font-semibold text-xs leading-3",children:e})]})]});default:return(0,i.jsxs)(n(),{className:"rounded-2xl p-3 cursor-pointer bg-white shadow-[0_1px_2px_rgba(16,24,40,0.06)] border dark:border-none hover:shadow-[0_2px_8px_rgba(16,24,40,0.08)] dark:bg-yaay-dark-bar transition-shadow aspect-square flex flex-col items-center justify-center",href:d?"/category/".concat(t.code,"/popular"):"/login",children:[(0,i.jsx)("div",{className:"m-0 mx-auto mb-3",style:{width:30,height:30},children:(0,i.jsx)("div",{className:"w-full h-full",children:(0,i.jsx)("img",{className:"w-full h-full",src:"/images/category/".concat(t.code.toLowerCase(),".png"),alt:"".concat(r(t.code))})})}),(0,i.jsxs)("div",{className:"flex flex-col gap-1.5 items-center w-full min-w-0 px-0.5",children:[(0,i.jsx)(q,{text:r("category.".concat(t.code,".text")),className:"block w-full text-center text-yaay-dark font-bold leading-3 dark:text-gray-300 whitespace-nowrap"}),(0,i.jsx)("span",{className:"text-yaay-blue font-semibold text-xs leading-3",children:e})]})]})}}};var Q=e=>{let{idname:t=null}=e,{t:s}=(0,u.Z)(),l=Y({topOffset:64}),{data:r,error:a}=(0,E.ZP)("/sessions/kafes/recommendation",(0,O.C)().GetCategory);if(void 0!=a&&1111==a.code&&(location.href="/toomanyrequests"),!r)return(0,i.jsx)(d.$j,{isLoading:!0,size:64});let n=r[0].filter(e=>e.isSuscribed),o=r[0].filter(e=>!e.isSuscribed);return(0,i.jsxs)("div",{ref:l,className:"sticky-scroll pt-6 pb-6 pr-1 box-border w-full bg-white dark:bg-yaay-dark",id:"left_sidebar",children:[(0,i.jsx)(d.aV,{listClass:"grid grid-cols-1 gap-3 mb-6",dataSource:n,emptyList:"",header:(0,i.jsx)("h1",{className:"font-bold text-gray-900 dark:text-gray-200 text-base mb-3 pt-0",children:0===n.length?"":s("category.followedCategoriesLabel.text")}),renderItem:(e,t)=>
1(0,i.jsx)(G,{category:e.KafeDesc,isSubscribed:e.isSuscribed,size:"wide"},t.toString())}),o.length>0&&(0,i.jsx)(d.aV,{listClass:"grid grid-cols-3 gap-2.5 mb-6",dataSource:o,header:(0,i.jsx)("h1",{className:"font-bold text-gray-900 dark:text-gray-200 text-base mb-3 mt-2",children:s(0===n.length?"category.categoriesBrowseLabel.text":"category.otherCategoriesLabel.text")}),renderItem:e=>(0,i.jsx)(G,{category:e.KafeDesc,isSubscribed:e.isSuscribed,size:"small"})})]})},K=s(33233),$=s(20026),J=s(54947),X=s(43567);let ee=e=>{let{title:t,icon:s,showMore:l,children:r,className:a=""}=e;return(0,i.jsxs)("div",{className:"bg-white dark:bg-yaay-dark-bar rounded-2xl shadow-[0_1px_2px_rgba(16,24,40,0.06)] mx-0 p-4 ".concat(a),children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[s,(0,i.jsx)("h3",{className:"font-bold text-gray-900 dark:text-gray-200 text-base",children:t})]}),r,l]})},et=()=>(0,i.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":!0,children:[(0,i.jsx)("path",{d:"M3 14L8 9L11 12L17 6",stroke:"#3674ef",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{d:"M13 6H17V10",stroke:"#3674ef",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),es=()=>(0,i.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":!0,children:[(0,i.jsx)("circle",{cx:"7",cy:"6",r:"3",stroke:"#3674ef",strokeWidth:"1.5"}),(0,i.jsx)("path",{d:"M1 17C1 13.6863 3.68629 11 7 11C10.3137 11 13 13.6863 13 17",stroke:"#3674ef",strokeWidth:"1.5",strokeLinecap:"round"}),(0,i.jsx)("circle",{cx:"14",cy:"7",r:"2.5",stroke:"#3674ef",strokeWidth:"1.5"}),(0,i.jsx)("path",{d:"M11 17C11 14.7909 12.3431 13 14 13C15.6569 13 17 14.7909 17 17",stroke:"#3674ef",strokeWidth:"1.5",strokeLinecap:"round"})]});var el=s(60444),er=e=>{let{user:t}=e,{user:s}=(0,m.Z)(),{t:l}=(0,u.Z)(),[r,a]=(0,o.useState)((null==t?void 0:t.IFollowed)||!1);if((0,o.useEffect)(()=>{a((null==t?void 0:t.IFollowed)||!1)},[t]),!(null==t?void 0:t.username)||"undefined"===t.username)return null;let d=void 0!==t.profileImage?t.profileImage:"/images/user_blank.png";return(0,i.jsxs)("div",{className:"flex items-center gap-3 py-2",children:[(0,i.jsx)(n(),{href:"/".concat(t.username),className:"flex-shrink-0",children:(0,i.jsx)("img",{src:d,alt:"".concat(t.username,"-profile"),className:"w-10 h-10 rounded-full object-cover"})}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)(n(),{href:"/".concat(t.username),className:"font-semibold text-sm text-gray-900 dark:text-gray-200 hover:text-yaay-blue truncate block",children:t.name}),(0,i.jsxs)("p",{className:"text-xs text-gray-500 dark:text-gray-400 truncate",children:["@",t.username]})]}),!!s&&s.id!==t.id&&(0,i.jsx)("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),(0,el.X)().FollowToggle(r,t.username).then(()=>a(!r))},className:"flex-shrink-0 px-3 py-1.5 text-xs font-medium rounded-full transition ".concat(r?"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300":"bg-[#3674ef] text-white hover:bg-[#2a5fd4]"),children:l(r?"profile.unfollowButton.text":"profile.followButton.text")})]})};let ei=e=>(0,J.ZP)().get(e).then(e=>e.data);var ea=()=>{let{data:e}=(0,E.ZP)($.W.UserSuggest,ei),{t}=(0,u.Z)();if(!Array.isArray(e)||0===e.length)return(0,i.jsx)(i.Fragment,{});let s=e.slice(0,5);return(0,i.jsx)(X.Z,{isLoading:!e,size:64,children:(0,i.jsx)(ee,{title:t("home.suggestedProfilesLabel.text"),icon:(0,i.jsx)(es,{}),children:(0,i.jsx)("div",{className:"flex flex-col",children:s.map(e=>(0,i.jsx)(er,{user:e},e.id))})})})},en=()=>{let{loggedIn:e}=(0,m.Z)(),t=(0,I.useRouter)(),{feedLocation:s}=(0,o.useContext)(x.w),[l,r]=(0,o.useState)(10),[a,d]=(0,o.useState)(null),[c,h]=(0,o.useState)(!0),[f,p]=(0,o.useState)(!1),{i18n:v}=(0,R.Q)(),{t:g}=(0,u.Z)();return((0,o.useEffect)(()=>{let e=async()=>{try{h(!0);let e=await (0,J.ZP)().get($.W.PopularTags,{params:{limit:l,i18nFilterType:s}});d(e.data)}catch(e){d(null)}finally{h(!1)}};s&&e()},[l,s]),(0,o.useEffect)(()=>{r(10)},[e]),Array.isArray(a)&&0!==a.length)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ee,{title:g("search.hashtagLabel.text"),icon:(0,i.jsx)(et,{}),className:"!py-5",showMore:(0,i.jsx)("button",{className:"text-[#3674ef] hover:underline text-sm font-bold mt-4",onClick:()=>
1{if(!e){p(!0);return}l<10?r(l+5):t.push("/explore/tag")},children:g("home.moreHashtagButton.text")}),children:(0,i.jsx)("ul",{className:"flex flex-col py-2",children:a.map(t=>(0,i.jsx)("li",{className:"py-3.5 first:pt-1 last:pb-1",children:(0,i.jsxs)(n(),{href:e?"/explore/tag/".concat(t.hashtag):"#",className:"text-[#3674ef] text-sm font-medium hover:underline block",onClick:t=>{e||(t.preventDefault(),p(!0))},children:["#",t.hashtag]})},t.id))})}),f&&(0,i.jsx)("div",{"data-anon-watch-popup":"true",className:"fixed inset-0 z-[2147483647] flex items-center justify-center bg-black/70",children:(0,i.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-[20rem] text-center shadow-xl mx-4",children:[(0,i.jsx)("p",{className:"text-gray-800 font-medium mb-2",children:v.anonWatchPopUpHeader}),(0,i.jsx)("p",{className:"text-gray-600 text-sm mb-4",children:v.anonWatchPopUpDescription}),(0,i.jsx)("button",{onClick:()=>{p(!1),t.push("/login")},className:"w-full py-2.5 bg-[#3674ef] text-white rounded hover:bg-[#2a5fd4] transition font-medium",children:v.anonWatchPopUpButton})]})})]}):c?null:(0,i.jsx)(i.Fragment,{})},eo=()=>{let e=(0,I.useRouter)(),{loggedIn:t}=(0,m.Z)(),{i18n:s}=(0,R.Q)(),{t:l}=(0,u.Z)(),[r,a]=(0,o.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n(),{href:t?"/discover":"#",className:"block mx-0",onClick:e=>{t||(e.preventDefault(),a(!0))},children:(0,i.jsxs)("div",{className:"discover-card-gradient rounded-2xl p-4 flex items-center gap-3",children:[(0,i.jsx)("div",{className:"w-11 h-11 rounded-full bg-white/20 flex items-center justify-center flex-shrink-0",children:(0,i.jsx)("img",{src:"/images/Discover.svg",alt:"Discover",className:"w-5 h-5"})}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("h3",{className:"text-white font-bold text-base",children:l("discover.discoverLabel.text")}),(0,i.jsx)("p",{className:"text-white/80 text-sm",children:l("discover.discoverSubtitle.text")})]}),(0,i.jsx)(v.m9,{size:18,fill:p.D.WHITE})]})}),r&&(0,i.jsx)("div",{"data-anon-watch-popup":"true",className:"fixed inset-0 z-[2147483647] flex items-center justify-center bg-black/70",children:(0,i.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-[20rem] text-center shadow-xl mx-4",children:[(0,i.jsx)("p",{className:"text-gray-800 font-medium mb-2",children:s.anonWatchPopUpHeader}),(0,i.jsx)("p",{className:"text-gray-600 text-sm mb-4",children:s.anonWatchPopUpDescription}),(0,i.jsx)("button",{onClick:()=>{a(!1),e.push("/login")},className:"w-full py-2.5 bg-[#3674ef] text-white rounded hover:bg-[#2a5fd4] transition font-medium",children:s.anonWatchPopUpButton})]})})]})},ed=e=>{let{TrendTopicVisibility:t=!0,PopularPostsVisibility:s=!1,SuggestedProfilesVisibility:l=!0,DiscoverVisibility:r=!0}=e,{loggedIn:a}=(0,m.Z)(),n=(0,I.useRouter)(),d="/discover"===n.pathname,[c,u]=(0,o.useState)(0),[h,f]=(0,o.useState)(!1),{i18n:p}=(0,R.Q)(),{locale:v}=(0,o.useContext)(x.w),g=Y({topOffset:80});return(0,i.jsxs)("div",{ref:g,className:"sticky-scroll pb-6 flex flex-col gap-4 pt-6 px-1 box-border w-full",id:"right_sidebar",children:[h&&(0,i.jsx)("div",{"data-anon-watch-popup":"true",className:"fixed inset-0 z-[2147483647] flex items-center justify-center bg-black/70",children:(0,i.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-[20rem] text-center shadow-xl mx-4",children:[(0,i.jsx)("p",{className:"text-gray-800 font-medium mb-2",children:p.anonWatchPopUpHeader}),(0,i.jsx)("p",{className:"text-gray-600 text-sm mb-4",children:p.anonWatchPopUpDescription}),(0,i.jsx)("button",{onClick:()=>{f(!1),n.push("/login")},className:"w-full py-2.5 bg-[#3674ef] text-white rounded hover:bg-[#2a5fd4] transition font-medium",children:p.anonWatchPopUpButton})]})}),r&&!d&&(0,i.jsx)(eo,{}),t&&!d&&(0,i.jsx)(en,{}),a&&(0,i.jsxs)(i.Fragment,{children:[s&&(0,i.jsx)(K.Z,{}),l&&(0,i.jsx)(ea,{})]})]})},ec=s(5295),eu=s(96486),ex=s.n(eu),em=s(58202),eh=s(70971),ef=s(81449),ep=s(61818);let{get:ev,post:eg}=(0,J.ZP)(),ey=()=>{let{t:e,locale:t}=(0,u.Z)(),[s,l]=(0,o.useState)([]),[r,a]=(0,o.useState)([]),[c,m]=(0,o.useState)(!0),[h,f]=(0,o.useState)(!0),[v,g]=(0,o.useState)(!1),{setKvkkPopupDisplayStatus:y}=(0,o.useContext)(x.w),[j,w]=(0,o.useState)(""),[b,N]=(0,o.useState)(!1),[k,C]=(0,o.useState)(!1),[S,L]=(0,o.useState)(!1);(0,o.useEffect)(()=>{(async()=>{var e,t;let s=await ev("/auth/agreements/getAgreementListForUser");a(null===(e=s.data)||void 0===e?void 0:e.filter(e=>!0!=e.accept)),l(JSON.parse(JSON.stringify(null===(t=s.data)||void 0===t?void 0:t.filter(e=>!0!=e.accept)))),f(!1),s.data.every(e=>!1==e.must)&&N(!0);let r=localStorage.getItem("isThereAnyAgreements");!1==I(s.data)&&(L(!0),"true"==r&&C(!0))})()},[]);let I=e=>e.filter(e=>!0==e.must).every(e=>!0==e.accept),E=()=>r.filter(e=>!1==e.must),_=async e=>{let t=e.filter(e=>{let t=s.find(t=>
1t.id==e.id);if(e.accept!=t.accept)return e});if(0!=t.length){var l,r,i=ex().mapValues(ex().groupBy(t,"accept"),e=>e.map(e=>ex().omit(e,"accept")));if(void 0!=i){let e=null==i?void 0:null===(l=i.true)||void 0===l?void 0:l.map(e=>e.id),t=null==i?void 0:null===(r=i.false)||void 0===r?void 0:r.map(e=>e.id);try{t&&(null==t||t.forEach(async e=>{await ew(e).then(e=>e.data)})),e&&await ej(e).then(e=>e.data)}catch(e){localStorage.setItem("agreementsUserAction","error")}finally{localStorage.setItem("agreementsUserAction","approved"),localStorage.removeItem("isThereAnyAgreements")}}}else localStorage.setItem("agreementsUserAction","noChange"),g(!1)},M=async e=>{if(I(e))_(r),y(!1),"profile-not-found"==window.location.pathname.split("/")[1]?window.location.href="/":window.location.reload();else{r.filter(e=>!1==e.accept&&!0==e.must);let e=E();await _(e),w("Onaylamanız gereken s\xf6zleÅmeler var"),g(!1),localStorage.setItem("agreementsUserAction","thereAreAgreementsYouMustApprove");return}};return k?(0,i.jsx)(em.u,{appear:!0,show:c,as:o.Fragment,children:(0,i.jsxs)(eh.Vq,{as:"div",className:"relative z-50",onClose:()=>{},children:[(0,i.jsx)(em.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,i.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),(0,i.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,i.jsx)("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:(0,i.jsx)(em.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,i.jsx)(eh.EM,{className:"aggrementList w-full px-6 py-4 overflow-hidden bg-white rounded-t-lg dark:bg-gray-800 sm:rounded-lg sm:m-4 sm:max-w-4xl",children:!0==h?(0,i.jsx)(d.$j,{isLoading:!0,size:24}):(0,i.jsxs)(i.Fragment,{children:[b&&(0,i.jsx)("div",{className:"flex items-center justify-end absolute top-0 right-10",children:(0,i.jsx)("button",{id:"closeInfo",className:"inline-flex items-center justify-center w-6 h-6 text-gray-400 transition-colors duration-150 rounded dark:hover:text-gray-200 hover: hover:text-gray-700",onClick:()=>{localStorage.setItem("agreementsUserAction","closed"),y(!1),m(!1)},children:(0,i.jsx)(ef.F,{fill:p.D.BLACK,size:20})})}),(0,i.jsxs)("div",{className:"mt-5",children:[(0,i.jsx)("h2",{children:e("agreements.bsTitleLabel.text")}),(0,i.jsx)("h4",{children:e("agreements.bsInfoLabel.text")}),(0,i.jsx)("div",{className:"listWrp",children:(0,i.jsx)("ul",{children:null==r?void 0:r.map((e,s)=>(0,i.jsx)("li",{children:(0,i.jsxs)("div",{className:"flex justify-between items-center",children:[(0,i.jsxs)("div",{className:"w-[calc(100%-40px)]",children:[(0,i.jsx)(n(),{href:(0,ep.q)(e.path,t),target:"_blank",children:(0,i.jsx)("span",{id:e.id,children:"TR"===t||"tr"===t?e.typeName:e.typeNameEn})}),(0,i.jsx)("div",{className:"text-xs text-gray-400 mt-1",children:"TR"===t||"tr"===t?e.typeDescription:e.typeDescriptionEn})]}),(0,i.jsx)(d.U3,{checked:e.accept,name:"can_reply",onCheck:()=>{var t=r.find(t=>t.id==e.id);t.accept=!t.accept,a([...r]),L(!I([...r]))}})]})},s.toString()))})}),j&&(0,i.jsx)("div",{className:"w-full flex content-center justify-center mb-5",children:(0,i.jsx)("small",{className:"text-xs text-red-600 mt-1",children:j})}),(0,i.jsx)("div",{className:"w-full flex content-center justify-center",children:!0==v?(0,i.jsx)(d.$j,{isLoading:!0,size:24}):(0,i.jsx)("button",{disabled:S,className:"btn btn-primary rounded-full text-sm px-8 py-2",onClick:()=>{g(!0),M(r)}
1,children:e("agreements.continueButton.text")})})]})]})})})})})]})}):(0,i.jsx)(i.Fragment,{})},ej=async e=>await eg("/auth/agreements/acceptAgreements",{agreement:e}),ew=async e=>await eg("/auth/agreements/deleteAgrement",{agreement:e});var eb=s(59705);let eN=e=>{let{children:t,scrollSize:s,storyCount:l=0,scrollBehavior:r="smooth"}=e,a=(0,o.useRef)(null),n=(0,eb.i)(),[d,c]=(0,o.useState)(0),[u,x]=(0,o.useState)(0),[m,h]=(0,o.useState)(0);return(0,o.useEffect)(()=>{a.current&&(c(a.current.scrollLeft),h(a.current.offsetWidth))},[a.current,n]),(0,o.useEffect)(()=>{window&&x(76*a.current.children.length+10*a.current.children.length)},[n.width]),(0,i.jsxs)("div",{className:"relative w-full max-w-full overflow-hidden",children:[n.width>1200&&l>10||n.width<1200?(0,i.jsx)("button",{type:"button",className:"flex-none absolute top-0 h-full left-0 mt-[8px] focus:outline-none pl-2 z-10 ".concat(d<=0?"hidden":"block"),style:{background:"linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0) 88.19%)"},onClick:()=>{a.current&&(a.current.scrollLeft-=s,c(a.current.scrollLeft))},children:(0,i.jsx)("img",{src:"/images/story/story-next-icon-prev.svg",alt:"arrow left"})}):null,(0,i.jsx)("div",{className:"flex flex-nowrap overflow-x-auto overflow-y-hidden h-auto w-full gap-2.5 py-0.5 scrollbar-hide",style:{scrollBehavior:r},ref:a,onScroll:()=>{a.current&&c(a.current.scrollLeft)},children:t}),(0,i.jsx)("button",{type:"button",className:"flex-none absolute top-0 h-full right-0 mt-[8px] focus:outline-none pr-2 z-10 ".concat(u-d<m?"hidden":"block"),style:{background:"linear-gradient(270deg, #ffffff 0%, rgba(255, 255, 255, 0) 88.19%)"},onClick:()=>{a.current&&(a.current.scrollLeft+=s,c(a.current.scrollLeft))},children:(0,i.jsx)("img",{src:"/images/story/story-next-icon.svg",alt:"arrow right"})})]})};var ek=e=>{var t,s,l;let{liveStream:r,order:a,handleLiveStreamShowModal:n}=e,{i18n:o}=(0,R.Q)(),d=async()=>{n(r,a)};return(0,i.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 w-[76px]",children:[(0,i.jsxs)("div",{className:"storyRealTime relative cursor-pointer",onClick:d,children:[(0,i.jsx)("img",{src:(null===(t=r.user)||void 0===t?void 0:t.profileImage)?r.user.profileImage:"/images/user_blank.png",alt:(null===(s=r.user)||void 0===s?void 0:s.name)||"live"}),(0,i.jsx)("span",{className:"real-time-tag absolute p-0.5 bg-yaay-fusya text-white font-inter font-bold border",children:o.live.toUpperCase()})]}),(0,i.jsx)("h3",{className:"text-[11px] leading-tight font-inter truncate text-center w-full dark:text-white",children:null===(l=r.user)||void 0===l?void 0:l.name})]})},eC=s(30381),eS=s.n(eC),eL=s(59592);let eI=e=>(0,i.jsx)("li",{className:"border-b border-gray-100 last:border-b-0 cursor-pointer w-full bg-white text-yaay-dark hover:bg-gray-50 transition-colors",children:e.children});var eE=s(19156),e_=s(4022);let eM=(0,e_.I)(e=>{let{fill:t}=e;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("mask",{id:"path-1-inside-1_3727_33510",fill:t,children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.33712 2.375C2.97733 2.375 1.875 3.47733 1.875 4.83712V13.1709C1.875 14.5307 2.97733 15.6331 4.33712 15.6331H6.0608V17.8852C6.0608 18.5274 6.82378 18.8637 7.29778 18.4304L10.358 15.6331H15.6629C17.0227 15.6331 18.125 14.5307 18.125 13.1709V4.83712C18.125 3.47733 17.0227 2.375 15.6629 2.375H4.33712Z"})}),(0,i.jsx)("path",{d:"M6.0608 15.6331H7.29186V14.402H6.0608V15.6331ZM7.29778 18.4304L8.12837 19.339L8.12837 19.339L7.29778 18.4304ZM10.358 15.6331V14.402H9.88016L9.52745 14.7244L10.358 15.6331ZM3.10606 4.83712C3.10606 4.15723 3.65723 3.60606 4.33712 3.60606V1.14394C2.29743 1.14394 0.643939 2.79743 0.643939 4.83712H3.10606ZM3.10606 13.1709V4.83712H0.643939V13.1709H3.10606ZM4.33712 14.402C3.65723 14.402 3.10606 13.8508 3.10606 13.1709H0.643939C0.643939 15.2106 2.29743 16.8641 4.33712 16.8641V14.402ZM6.0608 14.402H4.33712V16.8641H6.0608V14.402ZM4.82974 15.6331V17.8852H7.29186V15.6331H4.82974ZM4.82974 17.8852C4.82974 19.5977 6.86435 20.4945 8.12837 19.339L6.4672 17.5218C6.78321 17.2329 7.29186 17.4571 7.29186 17.8852H4.82974ZM8.12837 19.339L11.1886 16.5417L9.52745 14.7244L6.4672 17.5218L8.12837 19.339ZM15.6629 14.402H10.358V16.8641H15.6629V14.402ZM16.8939 13.1709C16.8939 13.8508 16.3428 14.402 15.6629 14.402V16.8641C17.7026 16.8641 19.3561 15.2106 19.3561 13.1709H16.8939ZM16.8939 4.83712V13.1709H19.3561V4.83712H16.8939ZM15.6629 3.60606C16.3428 3.60606 16.8939 4.15723 16.8939 4.83712H19.3561C19.3561 2.79743 17.7026 1.14394 15.6629 1.14394V3.60606ZM4.33712 3.60606H15.6629V1.14394H4.33712V3.60606Z",fill:"#C4C4C4",mask:"url(#path-1-inside-1_3727_33510)"}),(0,i.jsx)("rect",{x:"9.01514",y:"6.54883",width:"1.47727",height:"3.92831",fill:"#C4C4C4"}),(0,i.jsx)("rect",{x:"9.01514",y:"11.2139",width:"1.47727",height:"1.2276",fill:"#C4C4C4"})]})})},20),eF=e=>{var t,s,l,r,a,m,h,f,g;
1let{storyModal:y,handleStoryClose:j,currentStoryId:w,onThreeDotsClicked:b}=e,{setStoryReportModalStatus:N,StoryLinkModalStatus:k,StoryReportModalStatus:C,ReportStatusModalStatus:S,StoryLikeListModalStatus:L,setDeleteStoryConfirmationModalShow:I}=(0,o.useContext)(x.w),E=(0,eb.i)(),{post:_}=(0,J.ZP)(),{t:M}=(0,u.Z)(),F=null==y?void 0:null===(t=y._userWithStories)||void 0===t?void 0:t.stories.find(e=>e.id==w),{me:W}=(0,c.Z)(),Z=(null==F?void 0:F.adv_id)>0&&(null==F?void 0:F.plan_id)>0&&(null===(s=F.adv_info)||void 0===s?void 0:s.length)>0,{i18n:z}=(0,R.Q)(),P=k||C||S||L,D=async()=>{let e=document.querySelector(".custom-video");e&&e.pause(),N(!0)},T=(0,i.jsx)(eL.Z,{style:{minWidth:180,borderRadius:12,overflow:"hidden",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.18)"},children:(null==W?void 0:W.id)==F.user.id?(0,i.jsx)(eI,{children:(0,i.jsxs)("a",{role:"button",className:"w-full flex items-center gap-2 px-4 py-3 whitespace-nowrap",onClick:()=>{I(!0)},children:[(0,i.jsx)(v.pJ,{size:20,fill:p.D.GRAY}),(0,i.jsx)("span",{children:"Sil"})]})}):(0,i.jsx)(eI,{children:(0,i.jsxs)("a",{role:"button",className:"w-full flex items-center gap-2 px-4 py-3 whitespace-nowrap",onClick:()=>{D()},children:[(0,i.jsx)(eM,{size:20}),(0,i.jsx)("span",{children:M("stories.complaintLabel.text")})]})})}),B=(0,o.useCallback)(()=>0===F.user.reputationLevel?"":F.user.reputationLevel>=10?(0,i.jsx)("img",{src:"/images/PointBadgeIcons/10.svg",className:"max-w-none"}):(0,i.jsx)("img",{src:"/images/PointBadgeIcons/0".concat(F.user.reputationLevel,".svg"),className:"max-w-none"}),[null==F?void 0:F.user]);return void 0==F?(0,i.jsx)(i.Fragment,{}):(0,i.jsx)("div",{className:"user absolute bottom-12 h-20 top-0 w-full rounded-t-[16px]",style:{background:"linear-gradient(176deg, rgba(0, 0, 0, 0.49) 0%, rgba(0, 0, 0, 0) 100%)",zIndex:100000001},children:(0,i.jsxs)("div",{className:"flex justify-between items-center p-5 pt-[32px]",children:[(0,i.jsxs)("div",{className:"flex max-w-[calc(100%-65px)] overflow-hidden min-w-0",children:[(0,i.jsx)(n(),{href:P?"#":"/".concat((null==F?void 0:null===(l=F.user)||void 0===l?void 0:l.username)||""),children:(0,i.jsx)("img",{className:"rounded-full cursor-pointer flex-shrink-0",src:(null==F?void 0:F.user.profileImage)?F.user.profileImage:"/images/user_blank.png",alt:"",style:{width:40,height:40},onClick:e=>{P&&e.preventDefault()}})}),(0,i.jsxs)("div",{className:"flex flex-col ml-[10px] min-w-0 flex-1",children:[(0,i.jsx)(n(),{href:P?"#":"/".concat((null==F?void 0:null===(r=F.user)||void 0===r?void 0:r.username)||""),children:(0,i.jsxs)("span",{className:"text-white text-xs cursor-pointer flex items-center min-w-0",children:[(0,i.jsx)("span",{className:"truncate",children:E.width<426?"@"+(null==F?void 0:null===(a=F.user)||void 0===a?void 0:a.username):null==F?void 0:null===(m=F.user)||void 0===m?void 0:m.name}),(null===(h=F.user)||void 0===h?void 0:h.permissions)===0?(0,i.jsx)("span",{title:M("profile.verifiedAccountLabel.text"),className:"hover:underline inline-block ml-1 flex-shrink-0",children:(0,i.jsx)(eE.$_,{})}):(0,i.jsx)("span",{title:M("reputation..level".concat(F.user.reputationLevel,".text")),className:"hover:underline inline-block ml-1 flex-shrink-0",children:B()})]})}),Z?(0,i.jsx)("span",{className:"text-white text-xs",children:z.advertisement}):(0,i.jsxs)("span",{className:"text-white text-xs flex flex-wrap items-center gap-x-2 min-w-0",children:[E.width>426&&(0,i.jsx)(n(),{href:P?"#":"/".concat((null===(f=F.user)||void 0===f?void 0:f.username)||""),children:(0,i.jsxs)("span",{className:"cursor-pointer flex items-center gap-x-2 flex-shrink-0",children:[(0,i.jsxs)("span",{children:["@",F.user.username]}),(0,i.jsx)("span",{className:"live-dot"})]})}),(0,i.jsxs)("span",{className:"flex items-center gap-x-2 flex-shrink-0",children:[(0,i.jsx)("span",{className:"whitespace-nowrap",children:eS()(null==F?void 0:F.createdAt).utcOffset(3,!0).fromNow()}),0!==F.kafeId&&(0,i.jsx)("span",{className:"live-dot"})]}),(null===(g=F.kafeDesc)||void 0===g?void 0:g.id)!==0&&(0,i.jsx)("span",{className:"whitespace-nowrap",children:M("category.".concat(F.kafeDesc.code,".text"))})]})]})]}),Z&&(0,i.jsx)("div",{className:"absolute flex justify-center min-w-36 w-auto h-auto z-40 mt-0.5 top-auto right-0 p-0",children:(0,i.jsx)("button",{className:"w-25 h-25 m-auto mr-[1rem] rounded-full",onClick:b,children:(0,i.jsx)(eE.Uc,{size:22,fill:p.D.WHITE})})}),(0,i.jsxs)("span",{className:"text-white text-xs flex",children:[!Z&&(0,i.jsx)("span",{children:(0,i.jsx)(d.vb,{title:(0,i.jsx)("button",{className:"flex w-25 h-25 rounded-full ",children:(0,i.jsx)(eE.Uc,{size:22,fill:p.D.WHITE})}),overlay:T})}),!Z&&(0,i.jsx)("a",{className:"relative cursor-pointer pl-4 block lg:hidden",onClick:j,children:(0,i.jsx)("div",{className:"",children:(0,i.jsx)(ef.F,{fill:p.D.WHITE,size:20})})})]})]})})};var eR=s(98824),eW=s(75424),eZ=e=>{let{t,locale:s}=(0,u.Z)(),l="TR"==s||"tr"==s?(0,i.jsxs)("p",{children:[e.storyUrl," ",(0,i.jsx)("span",{className:"font-inter text-[18px font-bold text-yaay-darkgray dark:text-gray-200",children:t("stories.informationVisitingLabel.text")})]}):(0,i.jsxs)("p",{children:[t("stories.informationVisitingLabel.text")," ",(0,i.jsx)("span",{className:"font-inter text-[18px font-bold text-yaay-darkgray dark:text-gray-200",children:e.storyUrl})]});return(0,i.jsx)(em.u,{appear:!0,show:e.isOpen,as:o.Fragment,children:(0,i.jsxs)(eh.Vq,{as:"div",className:"relative z-50",onClose:e.onClose,children:[(0,i.jsx)(em.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,i.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),(0,i.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,i.jsx)("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:(0,i.jsx)(em.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,i.jsxs)(eh.EM,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white dark:bg-yaay-dark-bar dark:text-gray-200 p-6 text-left align-middle shadow-xl transition-all",children:[(0,i.jsx)("div",{className:"flex flex-col w-full max-h-[96] mb-[30px] overflow-y-auto overscroll-none divide-y dark:divide-gray-700 my-[10px] text-left md:text-center",children:(0,i.jsxs)("div",{children:[(0,i.jsxs)("p",{className:"font-inter text-[18px font-bold text-yaay-darkgray dark:text-gray-200 mb-[10px]",children:[" ",t("stories.informationLabel.text")," "]}),l]})}),(0,i.jsxs)("div",{className:"flex justify-center",children:[(0,i.jsx)("a",{className:"border border-yaay-blue w-[115px] h-[35px] rounded-full text-sm px-8 flex justify-center items-center text-yaay-blue dark:hover:bg-gray-700 mr-[40px]",onClick:e.onClose,children:t("stories.urlCancelButton.text")}),(0,i.jsx)(n(),{target:"_blank",className:"bg-yaay-blue w-[115px] text-white h-[35px] flex justify-center items-center rounded-full text-sm px-8 text-center",href:e.storyUrl,children:t("stories.urlOkButton.text")})]})]})})})})]})})},ez=s(9473),eP=s(87150);let eD=e=>{var t;let{cuurentStory:s,currentStoryId:l,currentStoryOrder:r,storiesIndex:a,setIsActionTrigger:n,isAdvStory:d,likeList:m,setLikeList:h}=e,{post:f,get:v}=(0,J.ZP)(),{StoryLinkModalStatus:g,setStoryLinkModalStatus:y,setStoryLikeListModalStatus:j,setNotificationStatus:w,setNotificaitonBodyText:b}=(0,o.useContext)(x.w),{me:N}=(0,c.Z)(),[k,C]=(0,o.useState)(),{t:S}=(0,u.Z)(),L=(0,o.useRef)(null),I=(0,o.useRef)(null),E=(0,o.useRef)({}),_=(0,ez.I0)(),{data:M,splittedStories:F,isExistsStories:R,loading:W,error:Z}=(0,ez.v9)(e=>e.stories),z=async()=>
1{if(s){let e=document.getElementById("story-player-resume-button");e&&e.click();let t={...s};if(E.current[s.id]){let e=E.current[s.id];t={...t,...e}}I.current=s.id,C(t)}else C(null),I.current=null};(0,o.useEffect)(()=>{z()},[s]);let P=(0,o.useCallback)(e=>{let t=N.forbiddenEndpoints,s=[eR._E,e];var l=t.find(e=>s.includes(e.endpoint));return!l||(b((0,eW.k_)(S("error.userForbidden.text"),"#endDate#",ex().isNil(l.endAt)?"":eS()(l.endAt).format("LLLL"))),w(!0),!1)},[N,S]);(0,o.useEffect)(()=>{L.current!==a&&(L.current=a,z())},[a]);let D=(0,o.useCallback)(async()=>{let e=new CustomEvent("storyPause");window.dispatchEvent(e),await f($.W.storyLike,{storyId:l}).then(e=>{if(k){let e={isLiked:!0,likeCount:(k.likeCount||0)+1};C({...k,...e}),E.current[l]=e,_((0,eP.G$)({storyId:l,updates:e}))}n(!0);let t=new CustomEvent("storyResume");window.dispatchEvent(t)}).catch(e=>{let t=new CustomEvent("storyResume");window.dispatchEvent(t)})},[l,k,_]),T=(0,o.useCallback)(async()=>{let e=new CustomEvent("storyPause");window.dispatchEvent(e),await f($.W.storyUnlike,{storyId:l}).then(e=>{if(k){let e={isLiked:!1,likeCount:Math.max((k.likeCount||1)-1,0)};C({...k,...e}),E.current[l]=e,_((0,eP.G$)({storyId:l,updates:e}))}n(!0);let t=new CustomEvent("storyResume");window.dispatchEvent(t)}).catch(e=>{console.error("Unlike error:",e);let t=new CustomEvent("storyResume");window.dispatchEvent(t)})},[l,k,_]),B=(0,o.useCallback)(async()=>{document.getElementById("story-player-pause-button")&&document.getElementById("story-player-pause-button").click(),await f($.W.storyDislike,{storyId:l}).then(e=>{if(k){let e={isDisliked:!0};C({...k,...e}),E.current[l]={...E.current[l],...e},_((0,eP.G$)({storyId:l,updates:e}))}n(!0);let t=document.getElementById("story-player-resume-button");t&&t.click()}).catch(e=>{let t=document.getElementById("story-player-resume-button");t&&t.click()})},[l,k,_]),A=(0,o.useCallback)(async()=>{document.getElementById("story-player-pause-button")&&document.getElementById("story-player-pause-button").click(),await f($.W.storyUndislike,{storyId:l}).then(e=>{if(k){let e={isDisliked:!1};C({...k,...e}),E.current[l]={...E.current[l],...e},_((0,eP.G$)({storyId:l,updates:e}))}n(!0);let t=document.getElementById("story-player-resume-button");t&&t.click()}).catch(e=>{let t=document.getElementById("story-player-resume-button");t&&t.click()})},[l,k,_]),H=(0,o.useCallback)(async()=>{try{let e=await v($.W.getStoryLikeList+"?limit=5&storyId="+l+"&offset=0");(null==e?void 0:e.data)&&h(e.data)}catch(e){console.error("Error fetching story like list:",e)}},[l]),V=(0,o.useMemo)(()=>(null==k?void 0:k.isLiked)===!0?(0,i.jsx)("div",{className:"flex items-center justify-center",children:(0,i.jsx)("img",{src:"/images/heart-red.svg",alt:"Liked",width:20,height:20,className:"cursor-pointer mx-auto block"})}):(0,i.jsx)("div",{className:"flex items-center justify-center",children:(0,i.jsx)("img",{src:"/images/heart-normal.svg",alt:"Like",width:20,height:20,className:"cursor-pointer mx-auto block"})}),[null==k?void 0:k.isLiked]),U=(0,o.useCallback)(async()=>{var e;if((null==k?void 0:null===(e=k.user)||void 0===e?void 0:e.id)===(null==N?void 0:N.id)){let e=new CustomEvent("storyPause");window.dispatchEvent(e),await H(),j(!0)}else{if(!1==P(eR.aj))return;(null==k?void 0:k.isLiked)?T():D()}},[l,k,null==N?void 0:N.id]);return((0,o.useEffect)(()=>{if(k&&!k.url&&g){let e=document.getElementById("story-player-resume-button");e&&e.click(),y(!1)}},[k]),void 0==k)?(0,i.jsx)(i.Fragment,{}):(0,i.jsxs)("div",{className:"w-full flex justify-between items-center",children:[!d&&(0,i.jsxs)("span",{className:(null==k?void 0:null===(t=k.user)||void 0===t?void 0:t.id)===(null==N?void 0:N.id)?"flex justify-center h-[32px]":"flex justify-center",children:[(0,i.jsxs)("span",{className:"flex flex-row justify-center items-center px-2 py-1 rounded-full transition-colors duration-200",onClick:U,children:[V,(0,i.jsx)("span",{className:"ml-1 ".concat((null==k?void 0:k.isLiked)?"text-white font-semibold":"text-white"),children:(null==k?void 0:k.likeCount)||0})]}),(0,i.jsx)("span",{className:"ml-4 flex flex-row justify-center items-center",onClick:()=>{var e;if((null==k?void 0:null===(e=k.user)||void 0===e?void 0:e.id)!==(null==N?void 0:N.id)){if(!1==P(eR.aj))return;k.isDisliked?A():B()}}})]}),(0,i.jsx)(eZ,{isOpen:g,onClose:()=>{let e=document.getElementById("story-player-resume-button");e&&e.click(),y(!1)},storyUrl:k.url}),(0,i.jsx)("span",{children:(0,i.jsxs)("a",{onClick:()=>{let e=document.querySelector(".custom-video");e&&e.pause(),document.getElementById("story-player-pause-button")&&document.getElementById("story-player-pause-button").click(),y(!0)},target:"_blank",className:"cursor-pointer items-center px-2.5 py-1.5 rounded-full bg-black/40 backdrop-blur-sm hover:bg-black/60 transition-colors duration-200 ".concat(k.url?"inline-flex":"hidden"),children:[(0,i.jsx)(eE.xP,{fill:p.D.WHITE}),(0,i.jsx)("span",{className:"text-white ml-2",children:S("stories.visitUrlButton.text")})]})})]})};var eT=e=>{let{t}=(0,u.Z)(),{setReportStatusModalStatus:s}=(0,o.useContext)(x.w);return o.useEffect(()=>(e.reportStatus&&document.body.classList.add("story-report-modal"),()=>{document.body.classList.remove("story-report-modal")}),[e.reportStatus]),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{className:"text-sm absolute inset-0 bg-black bg-opacity-50 flex justify-center",style:{zIndex:9999},onClick:e=>{e.stopPropagation()},children:(0,i.jsxs)("div",{className:"h-[150px] relative bottom-0 bg-[#ffffff] rounded-sm shadow-lg mt-auto mb-0 p-3 sm:p-4 md:p-6 pl-4 sm:pl-6 md:pl-8 max-w-[36rem] w-full text-black",style:{maxHeight:"calc(100vh - 2rem)",minHeight:"auto",borderRadius:"10px"},onClick:e=>{e.stopPropagation()},children:[(0,i.jsx)("button",{onClick:()=>{document.body.classList.remove("story-report-modal"),e.setReportStatus(!1),s(!1)},className:"absolute top-2 right-2 bg-gray-400 w-6 h-6 rounded-full flex justify-center items-center hover:bg-gray-500 transition","aria-label":"Close",children:(0,i.jsxs)("svg",{className:"w-5 h-5",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("rect",{width:"2.1757",height:"26.1084",transform:"matrix(0.707104 0.707109 -0.707104 0.707109 24.4614 6)",fill:"#ffffff"}),(0,i.jsx)("rect",{width:"2.1757",height:"26.1084",transform:"matrix(-0.707104 0.707109 -0.707104 -0.707109 26 24.4615)",fill:"#ffffff"})]})}),(0,i.jsxs)("div",{className:"flex flex-col w-full h-[257] mt-[10px] text-left",children:[(0,i.jsx)("div",{className:"flex justify-between items-start mb-4",children:(0,i.jsx)("p",{className:"text-sm text-gray-700",children:"Åikayetin tarafımıza ulaÅmıÅtır."})}),(0,i.jsx)("div",{className:"flex justify-center",children:(0,i.jsx)("button",{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-6 rounded-full text-sm transition-colors duration-200 cursor-pointer",onClick:()=>{let t=document.getElementById("story-player-resume-button");t&&t.click(),document.body.classList.remove("story-report-modal"),e.setReportStatus(!1),s(!1)},children:"Tamam"})})]})]})})})};let eB=["stories.complaintOption1Button.text","stories.complaintOption2Button.text","stories.complaintOption3Button.text","stories.complaintOption4Button.text"];var eA=e=>{let t=(0,el.X)(),{StoryReportModalStatus:s,setStoryReportModalStatus:l,setReportStatusModalStatus:r}=(0,o.useContext)(x.w),[a,n]=(0,o.useState)(!1),{t:d}=(0,u.Z)(),{post:c}=(0,J.ZP)(),m=()=>{document.body.classList.remove("story-report-modal"),l(!1)};(0,o.useEffect)(()=>()=>{document.body.classList.remove("story-report-modal")},[]);let h=async t=>{await c($.W.storyReport,{storyId:e.story.id,description:t,reportValue:1},{headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"}}).then(e=>{let t=new CustomEvent("storyPause");window.dispatchEvent(t),document.body.classList.add("story-report-modal"),l(!1),n(!0),r(!0)}).catch(e=>{})},f=async()=>{await t.BlockToggle(!1,e.story.user.id).then(()=>{l(!1),n(!1);let e=document.getElementsByClassName("story-and-live-modal")[2];window.location.reload(),document.body.removeChild(e)}).catch(e=>{})};return(0,i.jsxs)(i.Fragment,{children:[s&&(0,i.jsxs)("div",{className:"absolute inset-0 z-[100000002] flex flex-col justify-end rounded-[16px] overflow-hidden",onClick:m,children:[(0,i.jsx)("div",{className:"absolute inset-0 bg-black/30 pointer-events-none"}),(0,i.jsxs)("div",{className:"relative w-full bg-white text-black rounded-t-2xl shadow-[0_-8px_32px_rgba(0,0,0,0.18)] overflow-x-hidden overflow-y-auto max-h-[75%]",onClick:e=>e.stopPropagation(),children:[(0,i.jsx)("div",{className:"flex justify-center pt-3 pb-1",children:(0,i.jsx)("span",{className:"w-11 h-1 rounded-full bg-gray-300"})}),(0,i.jsx)("button",{onClick:m,className:"absolute top-3 right-3 bg-gray-200 w-7 h-7 rounded-full flex justify-center items-center hover:bg-gray-300 transition z-10","aria-label":"Close",children:(0,i.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,i.jsx)("path",{d:"M1 1L11 11M11 1L1 11",stroke:"#666",strokeWidth:"1.8",strokeLinecap:"round"})})}),(0,i.jsxs)("div",{className:"px-4 pb-5",children:[(0,i.jsx)("h2",{className:"font-inter font-semibold text-[#2d2d2d] text-[15px] leading-snug pr-9",children:d("stories.complaintOptionTitleLabel.text")}),(0,i.jsx)("ul",{className:"mt-4 flex flex-col gap-2 list-none p-0 m-0",children:eB.map(e=>(0,i.jsx)("li",{children:(0,i.jsx)("button",{type:"button",className:"w-full text-left px-4 py-3.5 rounded-xl bg-[#f5f6f8] hover:bg-[#eceef2] text-[#2d2d2d] text-sm leading-snug transition-colors duration-150",onClick:()=>h(d(e)),children:d(e)})},e))}),(0,i.jsx)("div",{className:"mt-4 pt-4 border-t border-gray-100",children:(0,i.jsx)("button",{type:"button",className:"w-full text-left px-4 py-3.5 rounded-xl text-red-500 font-medium text-sm hover:bg-red-50 transition-colors duration-150",onClick:f,children:d("profile.blockButton.text")})})]})]})]}),a&&(0,i.jsx)(eT,{message:"stories.complaintRecordLabel.text",reportStatus:a,setReportStatus:n})]})};let eH=()=>{try{let e=JSON.parse(window.localStorage.getObjectHash("StoryLivePref"));if(e)return e.StoryLivePref.list;return null}catch(e){return}},eV=e=>{if(void 0==window.localStorage.getObjectHash("StoryLivePref")){let t={StoryLivePref:{name:"StoryLivePref",lastupdate:eS()(new Date).format("YYYY-MM-DD HH:MM"),list:e}};window.localStorage.setObjectHash("StoryLivePref",JSON.stringify(t))}else{let t={StoryLivePref:{name:"StoryLivePref",lastupdate:eS()(new Date).format("YYYY-MM-DD HH:MM"),list:e}};window.localStorage.setObjectHash("StoryLivePref",JSON.stringify(t))}};(l=r||(r={}))[l.Url=10]="Url",l[l.Location=20]="Location",l[l.User=30]="User",l[l.Music=40]="Music";let eU=(0,e_.I)(e=>{let{fill:t}=e;return(0,i.jsxs)("svg",{viewBox:"0 0 20 16",fill:"none",children:[(0,i.jsx)("path",{d:"M7.14141 1.00222C3.74969 1.00222 1 3.7519 1 7.14363C1 8.84613 1.69518 10.387 2.81321 11.4984L7.26097 17L11.7353 11.2106C12.6961 10.128 13.2828 8.70665 13.2828 7.14141C13.2828 3.74969 10.5331 1 7.14141 1V1.00222Z",stroke:"#0076F7",strokeWidth:"0.8",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{d:"M8.66921 6.80923C8.66921 7.65052 7.98511 8.33462 7.14382 8.33462C6.30253 8.33462 5.61621 7.65052 5.61621 6.80923C5.61621 5.96794 6.30032 5.28162 7.14382 5.28162C7.98732 5.28162 8.66921 5.96572 8.66921 6.80923Z",stroke:"#0076F7",strokeWidth:"0.8",strokeLinecap:"round",strokeLinejoin:"round"})]})},24),eO=(0,e_.I)(e=>{let{fill:t}=e;return(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,i.jsx)("path",{d:"M14.9873 1.01306C13.6368 -0.337688 11.4469 -0.337688 10.0964 1.01306L8.6989 2.41026C8.50596 2.60319 8.50596 2.91617 8.6989 3.1091C8.89183 3.30178 9.20482 3.30178 9.39775 3.1091L10.795 1.71166C11.7596 0.747014 13.3238 0.747014 14.2887 1.71166C15.2536 2.67631 15.2534 4.24024 14.2887 5.20538L10.0964 9.39745C9.1317 10.3621 7.56774 10.3621 6.60283 9.39745C6.4099 9.20452 6.09716 9.20452 5.90398 9.39745C5.71104 9.59014 5.71104 9.90312 5.90398 10.0961C7.25475 11.4468 9.44419 11.4468 10.795 10.0961L14.9873 5.90373C16.3381 4.55323 16.3381 2.36381 14.9873 1.01306Z",fill:"#0076F7"}),(0,i.jsx)("path",{d:"M7.30128 12.8909C7.10835 12.698 6.79561 12.698 6.60267 12.8909L5.20521 14.2883C4.24031 15.253 2.67635 15.253 1.71144 14.2883C0.746778 13.3234 0.746778 11.7597 1.71144 10.7946L5.90382 6.60228C6.86873 5.63764 8.43244 5.63764 9.3976 6.60228C9.59028 6.79521 9.90327 6.79521 10.0962 6.60228C10.2891 6.40936 10.2891 6.09662 10.0962 5.9
10369C8.74543 4.55294 6.55574 4.55294 5.20521 5.90369L1.01308 10.096C-0.337693 11.4468 -0.337693 13.6362 1.01308 14.9869C2.36385 16.3377 4.5533 16.3377 5.90407 14.9869L7.30153 13.5895C7.49446 13.3968 7.49446 13.0838 7.30128 12.8909Z",fill:"#0076F7"})]})},20),eY=(0,e_.I)(e=>{let{fill:t}=e;return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",children:(0,i.jsxs)("g",{clipPath:"url(#clip0_1145_5941)",children:[(0,i.jsx)("path",{d:"M11.7648 5.17646V9.88235C11.7648 10.9223 12.6072 11.7647 13.6472 11.7647C14.6872 11.7647 15.5295 10.9223 15.5295 9.88235V7.99999C15.5295 3.83999 12.1601 0.470581 8.00011 0.470581C3.84011 0.470581 0.470703 3.83999 0.470703 7.99999C0.470703 12.16 3.84011 15.5294 8.00011 15.5294H12.706",stroke:"#0076F7",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{d:"M8.00006 11.7647C10.0792 11.7647 11.7648 10.0792 11.7648 8C11.7648 5.92081 10.0792 4.23529 8.00006 4.23529C5.92087 4.23529 4.23535 5.92081 4.23535 8C4.23535 10.0792 5.92087 11.7647 8.00006 11.7647Z",stroke:"#0076F7",strokeLinecap:"round",strokeLinejoin:"round"})]})})},18);var eq=e=>{let{storyValue:t,isMini:s}=e,l=t.sac.split(","),r=l[0].replace("audio:",""),a=l[1],n=t.ac,o=t.h/t.w>1,d=e=>(null==e?void 0:e.length)>20?e.substring(0,o?19:30)+"...":e;return o?(0,i.jsxs)("div",{className:"relative w-full h-full m-[5%] flex flex-col justify-start items-center ",children:[(0,i.jsx)("img",{className:"!w-full !h-[60%] !object-fill cursor-none",src:n,alt:"Song image"}),(0,i.jsxs)("div",{className:"relative !w-full !h-1/3 flex flex-col justify-start cursor-none",children:[(0,i.jsx)("div",{className:"!w-full !h-1/4 mt-[2%] mb-[2%] text-left ml-0 mr-auto text-[80%]",children:d(r)}),(0,i.jsx)("div",{className:"!w-full !h-1/4 mt-[1%] mb-[2%] text-left ml-0 mr-auto text-gray-400 text-[80%]",children:d(a)}),(0,i.jsx)("img",{className:"!w-1/4 !h-[20%] pl-[1%] mt-auto mb-[3%] ml-auto mr-0 !object-fill ",src:"/images/muud/search-muud-logo.svg",alt:"Loading"})]})]}):(0,i.jsxs)("div",{className:"relative w-full h-full p-[2%] flex flex-row justify-start items-center ",children:[(0,i.jsx)("img",{className:"!w-1/4 !h-full m-[2%] !object-fill cursor-none",src:n,alt:"Song image"}),(0,i.jsxs)("div",{className:"relative !w-3/4 !h-full flex flex-col justify-start items-center cursor-none",children:[(0,i.jsx)("div",{className:"!w-full !h-1/2 mt-[2%] mb-[2%] text-left ml-0 mr-auto text-[80%] ",children:d(r)}),(0,i.jsx)("div",{className:"!w-full !h-1/2 mt-[1%] mb-[2%] text-left ml-0 mr-auto text-gray-400 text-[80%] ",children:d(a)}),(0,i.jsx)("img",{className:"!w-1/4 !h-[16%] pl-[1%] mt-auto mb-[20%] ml-auto mr-0 !object-fill ",src:"/images/muud/search-muud-logo.svg",alt:"Loading"})]})]})};let eG=e=>{let{story:t,isMini:s}=e,[l,a]=(0,o.useState)(null),n=e=>{var s;let l=(null===(s=e.advTitle)||void 0===s?void 0:s.length)*7;return l<200?l=200:l>400&&(l=400),[{id:0,storyId:t.id,type:10,value:{ac:e.advTitle,sac:e.advUrl,w:l,h:40,xc:50,xs:1.46,zr:0,ys:1.46,yc:68,xp:24.72,yp:59.86},createdAt:Date.now().toString()}]};(0,o.useEffect)(()=>{if(null!=t){if(t.adv_id>0&&t.plan_id>0&&t.adv_info.length>0){let e=JSON.parse(t.adv_info);(null==e?void 0:e.advTitle)&&(null==e?void 0:e.advUrl)&&a({...t,storyItems:n(e)})}else a({...t,storyItems:t.storyItems.map(e=>({...e,value:JSON.parse(e.value)}))})}},[t]);let d=e=>{switch(e.type){case r.Url:return(0,i.jsx)(eQ,{value:e.value,isMini:s},e.id);case r.Location:return(0,i.jsx)(eK,{value:e.value,isMini:s},e.id);case r.User:return(0,i.jsx)(e$,{value:e.value,isMini:s},e.id);case r.Music:return(0,i.jsx)(eJ,{value:e.value,isMini:s},e.id);default:return}},c=e=>{let t=e.value,s=0,l=document.querySelector(".stories-react-transition");if(l){let e=l.getBoundingClientRect();s=t.w*(180/e.width)}return s},u=e=>{let t=e.value,s=0,l=document.querySelector(".stories-react-transition");if(l){let e=l.getBoundingClientRect();s=t.h*(320/e.height)}return s},x=e=>{let t=e.value;return 10===e.type?{x:t.xc,y:50}:{x:t.xc,y:t.yc}},m=e=>180/Math.PI*e;return(0,i.jsx)(i.Fragment,{children:l&&l.storyItems.map((e,t)=>(0,i.jsx)("div",{className:"storyItem cursor-pointer rounded-lg",style:"object"!=typeof e.value||null===e.value||s?"object"==typeof e.value&&null!==e.value?{fontSize:"0.3rem",width:"".concat(c(e),"px"),height:"".concat(u(e),"px"),left:"".concat(x(e).x,"%"),top:"".concat(x(e).y,"%"),transform:"translateX(-50%) translateY(-50%) scaleX(".concat(e.value.xs,") scaleY(").concat(e.value.ys,") rotate(").concat(m(e.value.zr),"deg)")}:{}:{width:"".concat(e.value.w,"px"),height:"".concat(e.value.h,"px + 40px"),left:"".concat(e.value.xc,"%"),top:"".concat(e.value.yc,"%"),transform:"translateX(-50%) translateY(-50%) scaleX(".concat(e.value.xs,") scaleY(").concat(e.value.ys,") rotate(").concat(m(e.value.zr),"deg)")},children:d(e)},t))})},eQ=e=>{var t;let{value:s,isMini:l}=e,r=(null===(t=s.ac)||void 0===t?void 0:t.length)||0;return(0,i.jsxs)(n(),{href:"".concat(s.sac),onClick:e=>{l&&e.preventDefault()},target:"_blank",className:"flex flex-row items-center justify-center w-auto h-full p-1 ".concat(l?"":"text-xs"," ").concat(r>50?"min-w-[4.5rem] max-w-[20rem]":"min-w-[3.2rem] max-w-[20rem]"),children:[(0,i.jsx)(eO,{size:l&&8}),(0,i.jsx)("span",{children:s.ac})]})},eK=e=>{let{value:t,isMini:s}=e;return(0,i.jsxs)(n(),{href:"apple"===(()=>{let e=navigator.userAgent||navigator.vendor;return/Mac|iPhone|iPad|iPod/i.test(e)?"apple":"google"})()?"https://maps.apple.com/?q=".concat(t.sac):"https://www.google.com/maps?q=".concat(t.sac),onClick:e=>{s&&e.preventDefault()},target:"_blank",className:"flex items-center justify-center w-full h-full p-1",children:[(0,i.jsx)(eU,{size:s&&8}),(0,i.jsx)("span",{children:t.ac})]})},e$=e=>{let{value:t,isMini:s}=e;return s?(0,i.jsxs)("div",{className:"flex items-center justify-center w-full h-full p-1 gap-1",children:[(0,i.jsx)(eY,{size:8}),(0,i.jsx)("span",{children:t.ac})]}):(0,i.jsx)(n(),{href:"/".concat(t.ac||""),target:"_blank",children:(0,i.jsxs)("div",{className:"flex items-center justify-center w-full h-full p-1 gap-1",children:[(0,i.jsx)(eY,{}),(0,i.jsx)("span",{children:t.ac})]})})},eJ=e=>{let{value:t,isMini:s}=e;
1return(0,i.jsx)(eq,{storyValue:t,isMini:s})},eX=e=>{let{story:t,onClose:s,t:l,pointIcons:r}=e,{i18n:a}=(0,R.Q)();return(0,i.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-50 flex items-end justify-center z-999999",children:(0,i.jsxs)("div",{className:"relative bottom-0 bg-[#000000] rounded-sm shadow-lg mt-auto mb-0 p-3 sm:p-4 md:p-6 pl-4 sm:pl-6 md:pl-8 max-w-[36rem] w-full text-white",style:{maxHeight:"calc(100vh - 2rem)",minHeight:"auto",borderRadius:"10px"},children:[(0,i.jsx)("button",{onClick:s,className:"absolute top-2 right-2 bg-gray-600 w-6 h-6 rounded-full flex justify-center items-center hover:bg-gray-700 transition","aria-label":"Close",children:(0,i.jsxs)("svg",{className:"w-5 h-5",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("rect",{width:"2.1757",height:"26.1084",transform:"matrix(0.707104 0.707109 -0.707104 0.707109 24.4614 6)",fill:"#ffffff"}),(0,i.jsx)("rect",{width:"2.1757",height:"26.1084",transform:"matrix(-0.707104 0.707109 -0.707104 -0.707109 26 24.4615)",fill:"#ffffff"})]})}),(0,i.jsxs)("div",{className:"flex flex-row justify-start items-start mt-[1rem] mb-2 sm:mb-4 md:mb-6 space-x-3",children:[(0,i.jsx)("div",{className:"w-12 h-12 flex-shrink-0 cursor-default adv-story-overlay-profile-img",style:{borderRadius:"50%",overflow:"hidden"},children:(0,i.jsx)("img",{id:"adv-story-overlay-profile-img",src:(null==t?void 0:t.user.profileImage)||"/images/user_blank.png",alt:""})}),(0,i.jsxs)("div",{className:"flex flex-col h-auto min-h-[3rem] sm:min-h-[4rem]",children:[(0,i.jsxs)("div",{className:"font-bold whitespace-nowrap text-sm flex items-center",children:[null==t?void 0:t.user.name,(null==t?void 0:t.user.permissions)===0?(0,i.jsx)("span",{title:l("profile.verifiedAccountLabel.text"),className:"hover:underline inline-block ml-1",children:(0,i.jsx)(eE.SA,{size:18,fill:p.D.BLUE})}):(0,i.jsx)("span",{title:l("reputation..level".concat(null==t?void 0:t.user.reputationLevel,".text")),className:"hover:underline inline-block ml-1",children:r()})]}),(0,i.jsxs)("span",{className:"text-white text-sm",children:[a.confirmationDate," ",(null==t?void 0:t.user.createdAt)?new Date(null==t?void 0:t.user.createdAt).toLocaleDateString("tr-TR",{day:"2-digit",month:"2-digit",year:"numeric"}):""]}),(0,i.jsx)("br",{}),(0,i.jsx)("span",{className:"text-gray-400 text-sm",children:"-"}),(0,i.jsx)("span",{className:"text-gray-400 text-sm",children:a.thisAdvShowsEveryUser})]})]})]})})};var e0=s(2334);let e1=(e,t)=>{try{let i=null===(s=eH())||void 0===s?void 0:s[t.id][e.user.id];for(var s,l=i[0],r=0;r<i.length;r++)l<i[r]&&(l=i[r]);let a=e.stories.find(e=>e.id==l),n=e.stories.indexOf(a)||0;if(-1!=n)return n}catch(e){return 0}};var e2=e=>{let{UserWithStories:t,user:s,handleStoryShowModal:l,order:r}=e,{me:a}=(0,c.Z)(),n=()=>a.username===s.username?"Hikayen":s.username;return(0,i.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 w-[76px]",children:[(0,i.jsx)("div",{className:"storyImage cursor-pointer ".concat(t.isWatched?"passive-story":"active-story"),onClick:()=>{let e=e1(t,a);l(t,r,e)},children:(0,i.jsx)("img",{src:(null==s?void 0:s.profileImage)?s.profileImage:"/images/user_blank.png",alt:n()})}),(0,i.jsx)("h3",{className:"text-[11px] leading-tight font-inter truncate text-center w-full dark:text-white",children:n()})]})};let e3=e=>{var t,s;let{LiveAndStoryList:l=[],currentUserId:r,handleLiveStreamShowModal:a,storiesIndex:n,handleStoryShowModal:d}=e,[c,u]=(0,o.useState)({meStoryList:[],storyList:[]});(0,o.useEffect)(()=>{if(!Array.isArray(l[n]))return;let e=[],t=[];l[n].forEach((s,l)=>{let a=(0,i.jsx)(e2,{order:l,handleStoryShowModal:d,UserWithStories:s,user:s.user},s.id||"storyCard-".concat(l));r===s.user.id?e.push(a):t.push(a)}),u({meStoryList:e,storyList:t})},[l,n,r,d]);let x=((null===(t=l[0])||void 0===t?void 0:t.length)||0)+((null===(s=l[1])||void 0===s?void 0:s.length)||0);return(0,i.jsx)("div",{className:"w-full stories",children:(0,i.jsx)("div",{className:"w-full flex",children:(0,i.jsxs)(eN,{scrollSize:150,storyCount:x,children:[c.meStoryList,Array.isArray(l[0])&&l[0].length>0&&l[0].map((e,t)=>(0,i.jsx)(ek,{handleLiveStreamShowModal:a,order:t,liveStream:e},e.id||"live-".concat(t))),c.storyList]})})})};var e4=s(24670),e5=s(99643),e6=e=>{let{position:t,ApplyNextUserStory:s,ApplyPrevUserStory:l,NextUserWithStories:r,PrevUserWithStories:a,isAnyModalOpen:n}=e,[d,c]=(0,o.useState)(),[u,x]=(0,o.useState)(!0),[m,h]=(0,o.useState)(),[f,p]=(0,o.useState)(),{thumbnails:v}=(0,ez.v9)(e=>e.stories);(0,o.useEffect)(()=>{"left"===t&&a?(c(a.stories[0].fileEntriesStories[0]),x(!0),h(a)):"right"===t&&r&&(c(r.stories[0].fileEntriesStories[0]),x(!0),h(r)),("left"!==t||a)&&("right"!==t||r)||x(!1)},[a,r]),(0,o.useEffect)(()=>{d&&p((0,U.UM)(null==d?void 0:d.fileName))},[d]);let g=(0,eb.i)(),y=g.width>=1024&&g.width<=1440;return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{className:g.width>=1024?"story-user relative float-left flex flex-col items-center":"story-minicard-mobile relative float-left",style:{marginRight:"left"
1===t?y?"40px":"60px":"0",marginLeft:"right"===t?y?"40px":"60px":"0",display:g.width>=1024?"flex":"none",cursor:"pointer",visibility:u?"visible":"hidden",opacity:u?.75:0,transform:"left"===t?"rotateY(45deg) scale(0.85)":"rotateY(-45deg) scale(0.85)",transformOrigin:"left"===t?"right center":"left center",transition:"transform 400ms cubic-bezier(0.4, 0, 0.2, 1), opacity 400ms cubic-bezier(0.4, 0, 0.2, 1)"},onClick:()=>{"right"!==t||n?"left"===t&&!n&&l():s()},children:(0,i.jsxs)("div",{className:"relative w-[250px] h-[480px] overflow-hidden rounded-xl",children:[(0,i.jsx)(e=>{var t;let{fileEntriesStory:s,filename:l}=e,r=(null==s?void 0:s.storyId)?v[s.storyId]:null;return r?(0,i.jsx)("img",{src:r,alt:"Thumbnail",style:{width:250,height:480},className:"rounded-xl object-cover h-full"}):(null==s?void 0:null===(t=s.mime)||void 0===t?void 0:t.includes("video"))?(0,i.jsx)("video",{style:{width:250,height:480,objectFit:"fill",zIndex:1},controls:!1,children:(0,i.jsx)("source",{src:l,type:"video/mp4"})}):(0,i.jsx)("img",{src:l,alt:"Thumbnail",style:{width:250,height:480},className:"rounded-xl object-cover h-full"})},{fileEntriesStory:d,filename:f}),(0,i.jsx)("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:(0,i.jsx)(eG,{isMini:!0,story:null==m?void 0:m.stories[0]})}),(null==m?void 0:m.user)&&(0,i.jsxs)("div",{className:"absolute top-0 left-0 right-0 z-10 flex items-center gap-2 px-3 pt-3 pb-8 pointer-events-none",style:{background:"linear-gradient(176deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%)"},children:[(0,i.jsx)("img",{className:"rounded-full object-cover flex-shrink-0",src:m.user.profileImage||"/images/user_blank.png",alt:"",style:{width:32,height:32}}),(0,i.jsxs)("span",{className:"text-white text-xs font-medium truncate drop-shadow",children:["@",m.user.username]})]})]})})})},e7=s(30340),e8=s.n(e7),e9=s(58533),te=e=>{let{likeList:t,setLikeList:s,storyId:l}=e,{get:r}=(0,J.ZP)(),{StoryLikeListModalStatus:a,setStoryLikeListModalStatus:n}=(0,o.useContext)(x.w),[c,m]=(0,o.useState)(1),[h,f]=(0,o.useState)(!0),[p,v]=(0,o.useState)(!1),{t:g}=(0,u.Z)(),{i18n:y}=(0,R.Q)(),j=(0,o.useCallback)(()=>{let e=new CustomEvent("storyResume");window.dispatchEvent(e);let t=document.getElementById("story-player-resume-button");t&&t.click(),document.body.classList.remove("story-like-modal"),s([]),m(1),f(!0),v(!1),n(!1)},[s,n]),w=async()=>{if(!p){v(!0);try{let e=await r($.W.getStoryLikeList+"?limit=5&storyId="+l+"&offset="+5*c);if(null==e?void 0:e.data){let l=e.data;0===l.length?f(!1):(s([...t,...l]),m(c+1))}}catch(e){console.error("Error fetching story like list:",e)}finally{v(!1)}}},b=(0,o.useCallback)(e=>0===e.reputationLevel?null:e.reputationLevel>=10?(0,i.jsx)("img",{src:"/images/PointBadgeIcons/10.svg",className:"max-w-none",alt:"Level ".concat(e.reputationLevel)}):(0,i.jsx)("img",{src:"/images/PointBadgeIcons/0".concat(e.reputationLevel,".svg"),className:"max-w-none",alt:"Level ".concat(e.reputationLevel)}),[]);return(o.useEffect(()=>(a&&document.body.classList.add("story-like-modal"),()=>{document.body.classList.remove("story-like-modal")}),[a]),a&&void 0!=t)?(0,i.jsx)("div",{className:"text-sm absolute inset-0 bg-black bg-opacity-50 flex justify-center",style:{zIndex:9999},children:(0,i.jsxs)("div",{className:"relative bottom-0 bg-[#ffffff] rounded-sm shadow-lg mt-auto mb-0 max-w-[36rem] w-full text-black",style:{maxHeight:"calc(100vh - 2rem)",minHeight:"auto",borderRadius:"10px"},children:[(0,i.jsxs)("div",{className:"flex items-start justify-between p-4 pb-3",children:[(0,i.jsx)("h2",{className:"font-inter font-semibold text-yaay-darkgray text-lg",children:y.likes}),(0,i.jsx)("button",{onClick:j,className:"bg-gray-400 w-6 h-6 rounded-full flex justify-center items-center hover:bg-gray-500 transition","aria-label":"Close",children:(0,i.jsxs)("svg",{className:"w-5 h-5",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("rect",{width:"2.1757",height:"26.1084",transform:"matrix(0.707104 0.707109 -0.707104 0.707109 24.4614 6)",fill:"#ffffff"}),(0,i.jsx)("rect",{width:"2.1757",height:"26.1084",transform:"matrix(-0.707104 0.707109 -0.707104 -0.707109 26 24.4615)",fill:"#ffffff"})]})})]}),(0,i.jsx)("div",{className:"flex flex-col w-full max-h-[257] text-left px-4 pb-4",children:(0,i.jsx)("div",{className:"overflow-y-auto",children:(0,i.jsx)("ul",{children:0===t.length?(0,i.jsx)("div",{className:"flex justify-center items-center h-32",children:(0,i.jsx)("p",{className:"text-gray-500 text-sm",children:y.noUsersFoundLikedStory})}):(0,i.jsx)(e9.Z,{dataLength:t.length,next:w,height:200,hasMore:h,loader:(0,i.jsx)("div",{className:"flex justify-center py-2",children:(0,i.jsx)(d.$j,{size:32,isLoading:!0})}),className:"scrollhide",children:t.map((e,t)=>(0,i.jsx)("li",{className:t>0?"mt-3":"",children:(0,i.jsxs)("div",{className:"flex items-center",children:[(0,i.jsx)("div",{className:"mr-3 min-w-[35px]",children:(0,i.jsx)("img",{className:"rounded-full w-[35px] h-[35px] object-cover",src:e.profileImage?e.profileImage:"/images/user_blank.png",alt:e.name})}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsxs)("div",{className:"flex items-center",children:[(0,i.jsx)("span",{className:"font-inter font-bold text-sm text-[#2D2D2D] truncate",children:e.name}),0===e.permissions?(0,i.jsx)("span",{title:g("profile.verifiedAccountLabel.text"),className:"hover:underline inline-block ml-1",children:(0,i.jsx)(eE.$_,{})}):(0,i.jsx)("span",{title:g("reputation..level".concat(e.reputationLevel,".text")),className:"hover:underline inline-block ml-1",children:b(e)})]}),(0,i.jsxs)("div",{className:"font-inter text-sm text-[#808080] truncate",children:["@",e.username]})]})]})},t))})})})})]})}):(0,i.jsx)(i.Fragment,{})},tt=e=>{var t,s,l,r,a,n;
1let{currentStoryEValue:d,storiesIswatched:c,handleStoryClose:m,allStoriesLength:h,ApplyNextUserStory:f,storyModal:p,currentStoryId:v,setCurrentStoryId:g,LiveAndStoryList:y,storiesIndex:j,setCurrentStoryEValue:w,setIsActionTrigger:b,onAllStoriesEnd:N}=e,k=(0,eb.i)(),[C,S]=(0,o.useState)([]),[L,I]=(0,o.useState)(!1),[E,_]=(0,o.useState)(0),[M,F]=(0,o.useState)(!1),[R,W]=(0,o.useState)(!1),[Z,z]=(0,o.useState)(!1),{StoryLinkModalStatus:P,StoryReportModalStatus:D,ReportStatusModalStatus:T,StoryLikeListModalStatus:B,deleteStoryConfirmationModalShow:A}=(0,o.useContext)(x.w),{t:H}=(0,u.Z)(),V=(0,ez.I0)(),[U,O]=(0,o.useState)(!1),[Y,q]=(0,o.useState)([]),G=null==p?void 0:null===(t=p._userWithStories)||void 0===t?void 0:t.stories.find(e=>e.id==v),Q=(null==G?void 0:G.adv_id)>0&&(null==G?void 0:G.plan_id)>0&&(null===(s=G.adv_info)||void 0===s?void 0:s.length)>0,K=k.width&&k.width<678?72:88,$=(0,o.useCallback)(e=>{if(!e||!Array.isArray(e)){console.warn("Invalid stories data:",e);return}S(e.map(e=>{try{var t,s,l,r,i,a,n,o,d;let c=null===(t=e.fileEntriesStories[0])||void 0===t?void 0:t.fileName;if(!c)return console.warn("No file found for story:",e.id),null;let u={url:c,id:e.id,type:"image",duration:5e3};return(null===(l=e.fileEntriesStories[0])||void 0===l?void 0:null===(s=l.mime)||void 0===s?void 0:s.includes("video"))||(null===(i=e.fileEntriesStories[0])||void 0===i?void 0:null===(r=i.fileName)||void 0===r?void 0:r.includes(".mp4"))||(null===(n=e.fileEntriesStories[0])||void 0===n?void 0:null===(a=n.fileName)||void 0===a?void 0:a.includes(".mov"))||(null===(d=e.fileEntriesStories[0])||void 0===d?void 0:null===(o=d.fileName)||void 0===o?void 0:o.includes(".avi"))?(u.type="video",u.duration=1e4):(u.type="image",u.duration=5e3),e.storyItems&&e.storyItems.length>0&&(u.duration=1e4),u}catch(t){return console.error("Error processing story:",t,e),null}}).filter(Boolean)),I(!0)},[]);(0,o.useEffect)(()=>{try{if(void 0===p||(null==p?void 0:p._userWithStories)==void 0||!p.show)return;S([]),I(!1),$(p._userWithStories.stories)}catch(e){console.error("Error in story modal effect:",e)}},[null==p?void 0:p.show,null==p?void 0:p.order,null==p?void 0:null===(r=p._userWithStories)||void 0===r?void 0:null===(l=r.user)||void 0===l?void 0:l.id,$]);let J=(0,o.useCallback)(e=>{var t;if(void 0===p||!(null==p?void 0:null===(t=p._userWithStories)||void 0===t?void 0:t.stories))return;let s=p._userWithStories.stories[e];s&&e!==d&&(g(s.id),w(e),c(e),_(e))},[p,d,g,w,c]),X=(0,o.useCallback)(()=>{N()},[N]),ee=(0,o.useCallback)(e=>{J(e),e>0&&setTimeout(()=>{F(!1),W(!1)},100)},[J]),et=R||Z||P||U||D||T||B||A,es=P||U||D||T||B||A,el=(0,o.useCallback)(()=>{F(!0),W(!0)},[]),er=(0,o.useCallback)(()=>{F(!1),W(!1)},[]),ei=(0,o.useCallback)(e=>{" "===e.key&&(e.preventDefault(),R||Z?Z?(z(!1),F(!1)):er():el())},[R,Z,el,er]),ea=(0,o.useCallback)(()=>{O(!0),V((0,e0.vQ)(!0)),F(!0)},[V]),en=(0,o.useCallback)(()=>{O(!1),V((0,e0.vQ)(!1)),R||F(!1)},[V,R]),eo=(0,o.useCallback)(()=>(null==G?void 0:G.user.reputationLevel)===0?"":(null==G?void 0:G.user.reputationLevel)>=10?(0,i.jsx)("img",{src:"/images/PointBadgeIcons/10.svg",className:"max-w-none"}):(0,i.jsx)("img",{src:"/images/PointBadgeIcons/0".concat(null==G?void 0:G.user.reputationLevel,".svg"),className:"max-w-none"}),[null==G?void 0:G.user]);return((0,o.useEffect)(()=>{O(!1),V((0,e0.vQ)(!1))},[null==G?void 0:G.user,V]),(0,o.useEffect)(()=>{D?F(!0):R||P||U||T||B||A||F(!1)},[D,R,P,U,T,B,A]),(0,o.useEffect)(()=>{T?F(!0):R||P||U||D||B||A||F(!1)},[T,R,P,U,D,B,A]),(0,o.useEffect)(()=>{P?F(!0):R||D||U||T||B||A||F(!1)},[P,R,D,U,T,B,A]),(0,o.useEffect)(()=>{let e=()=>{z(!0),F(!0)},t=()=>{z(!1),R||P||U||D||T||B||A||F(!1)},s=e=>{ei(e)},l=()=>{F(!0)},r=()=>{R||P||U||D||T||B||A||F(!1)},i=()=>{R||P||U||D||T||B||A||F(!1)};return window.addEventListener("blur",e),window.addEventListener("focus",t),document.addEventListener("keydown",s),window.addEventListener("storyPause",l),window.addEventListener("storyResume",r),window.addEventListener("storyLikeAction",i),()=>{window.removeEventListener("blur",e),window.removeEventListener("focus",t),document.removeEventListener("keydown",s),window.removeEventListener("storyPause",l),window.removeEventListener("storyResume",r),window.removeEventListener("storyLikeAction",i)}},[R,Z,P,U,D,T,B,A,ei]),L&&0!==C.length)?(0,i.jsxs)("div",{className:k.width<678?"stories component":"position-relative component float-left w-full flex justify-center items-center h-full",children:[(0,i.jsx)("div",{className:"flex justify-center flex-col items-center relative stories-player",children:(0,i.jsxs)("div",{className:"storyPlayerWrapper",children:[(0,i.jsx)(eF,{currentStoryId:v,storyModal:p,handleStoryClose
1:m,onThreeDotsClicked:ea}),U&&(0,i.jsx)(eX,{story:G,onClose:en,t:H,pointIcons:eo}),(0,i.jsxs)("div",{className:"story-canvas",children:[(0,i.jsx)(e8(),{stories:C,currentIndex:d,defaultInterval:5e3,onStoryStart:ee,onStoryEnd:e=>{let t=e+1;t<C.length&&J(t)},onAllStoriesEnd:X,width:"100%",height:"100%",keyboardNavigation:!1,preventDefault:!1,isPaused:et,storyStyles:{objectFit:"cover",margin:0,padding:0,width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%"},storyContainerStyles:{background:"transparent",margin:0,padding:0},progressContainerStyles:{zIndex:2100,paddingTop:10,filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.7))"},progressWrapperStyles:{height:3,background:"rgba(255,255,255,0.32)",borderRadius:4},progressStyles:{background:"#ffffff",borderRadius:4}}),(0,i.jsx)("div",{style:{position:"absolute",top:K,left:0,width:"100%",height:"calc(100% - ".concat(K,"px)"),zIndex:99999999,pointerEvents:es?"none":"auto"},children:(0,i.jsx)(eG,{story:null==p?void 0:null===(a=p._userWithStories)||void 0===a?void 0:a.stories[d]})})]}),(0,i.jsx)("div",{className:"absolute bottom-0 left-0 w-full px-3 pb-3",style:{zIndex:1e8},children:(0,i.jsx)(eD,{storiesIndex:d,currentStoryId:v,currentStoryOrder:p.order,cuurentStory:p._userWithStories.stories[d],setIsActionTrigger:b,isAdvStory:Q,likeList:Y,setLikeList:q})}),(0,i.jsx)(eA,{story:null==p?void 0:null===(n=p._userWithStories)||void 0===n?void 0:n.stories[d]})]})}),(0,i.jsx)(te,{likeList:Y,storyId:v,setLikeList:q})]}):(0,i.jsx)("div",{className:k.width<678?"stories component":"position-relative stories component float-left w-full flex justify-center items-center h-full",children:(0,i.jsx)("div",{className:"flex justify-center flex-col items-center relative stories-player",children:(0,i.jsx)("div",{className:"storyPlayerWrapper"})})})};let ts=e=>{let{r:t,g:s,b:l}=e,r=t/255,i=s/255,a=l/255,n=Math.max(r,i,a),o=Math.min(r,i,a),d=0,c=0,u=(n+o)/2;if(n!==o){let e=n-o;switch(c=u>.5?e/(2-n-o):e/(n+o),n){case r:d=(i-a)/e+(i<a?6:0);break;case i:d=(a-r)/e+2;break;default:d=(r-i)/e+4}d/=6}return{h:360*d,s:c,l:u}},tl=(e,t)=>new Promise(s=>{let l=new Image;t&&(l.crossOrigin="anonymous"),l.onload=()=>{try{let e=document.createElement("canvas");e.width=32,e.height=32;let t=e.getContext("2d");if(!t){s(null);return}t.drawImage(l,0,0,32,32);let{data:r}=t.getImageData(0,0,32,32),i=0,a=0,n=0,o=0;for(let e=0;e<r.length;e+=4)!(r[e+3]<125)&&(i+=r[e],a+=r[e+1],n+=r[e+2],o++);if(0===o){s(null);return}s({r:Math.round(i/o),g:Math.round(a/o),b:Math.round(n/o)})}catch(e){s(null)}},l.onerror=()=>s(null),l.src=e}),tr=async e=>{if(!e)return null;if(e.startsWith("data:"))return tl(e);let t=null;try{let s=await fetch(e,{mode:"cors"});if(s.ok){let e=await s.blob();t=URL.createObjectURL(e);let l=await tl(t);if(l)return l}}catch(e){}finally{t&&URL.revokeObjectURL(t)}return tl(e,!0)},ti=e=>{if(!e)return"radial-gradient(circle at 50% 42%, ".concat("rgb(28, 34, 46)"," 0%, ").concat("rgb(8, 10, 14)"," 75%, #050608 100%)");let{h:t,s}=ts(e),l=100*Math.min(Math.max(s,.22),.8),r="hsl(".concat(t.toFixed(0),", ").concat(l.toFixed(0),"%, 24%)"),i="hsl(".concat(t.toFixed(0),", ").concat(l.toFixed(0),"%, 12%)"),a="hsl(".concat(t.toFixed(0),", ").concat(Math.min(l,35).toFixed(0),"%, 5%)");return"radial-gradient(circle at 50% 42%, ".concat(r," 0%, ").concat(i," 55%, ").concat(a," 100%)")},ta=e=>{var t,s,l;let{storyModal:r,size:a,LiveAndStoryList:n,storiesIndex:d,setStoryModal:u,currentStoryId:m,setCurrentStoryId:h,setCurrentStoryEValue:f,currentStoryEValue:v,setIsActionTrigger:g,IsActionTrigger:y,onClose:j}=e,{me:w}=(0,c.Z)(),b=(0,ez.I0)(),{StoryLinkModalStatus:N,StoryReportModalStatus:k,ReportStatusModalStatus:C,StoryLikeListModalStatus:S,setStoryLinkModalStatus:L,setStoryReportModalStatus:I,setReportStatusModalStatus:E,setStoryLikeListModalStatus:_,deleteStoryConfirmationModalShow:M,setDeleteStoryConfirmationModalShow:F}=(0,o.useContext)(x.w),{post:R}=(0,J.ZP)(),W=N||k||C||S,[Z,z]=(0,o.useState)(),[P,D]=(0,o.useState)(),[T,B]=(0,o.useState)(),A=(0,o.useRef)(null),{thumbnails:H}=(0,ez.v9)(e=>e.stories),[V,U]=(0,o.useState)(ti(null)),O=-1,{feed:Y,feedLocation:q}=(0,o.useContext)(x.w),{resetData:G}=(0,e4.Z)(e5.I.GetFeedListKey(Y,q),10);try{O=Z.stories.length}catch(e){}(0,o.useEffect)(()=>(r.show&&(document.body.style.overflow="hidden"),()=>{G(),document.body.style.overflow="visible"}),[r.show]),(0,o.useEffect)(()=>{z(n[d][r.order]);try{let e=n[d][r.order-1];D(e)}catch(e){}try{let e=n[d][r.order+1];B(e)}catch(e){}g(!1)},[r.order]);let Q=(0,o.useCallback)(async e=>{var t,s;let l=eH();try{t={[w.id]:{[null==r?void 0:r._userWithStories.user.id]:[null==r?void 0:null===(s=r._userWithStories)||void 0===s?void 0:s.stories[e].id]}}}catch(e){return}if("object"==typeof l&&void 0!==t){if(l[w.id]){let e=Object.keys(t[w.id])[0],s=Object.values(t[w.id])[0][0];l[w.id][e]?l[w.id][e].includes(s)||(l[w.id][e].push(s),eV({...l})):(l[w.id][e]=[s],eV(l))}else eV(Object.assign(l,t))}else eV(t)},[w,r]),K=(0,o.useCallback)(()=>{var e;let t=e1(P,w)||0;u({show:!0,_userWithStories:P,order:r.order-1,LastViewedStoryIndex:t}),h(null==P?void 0:null===(e=P.stories[t])||void 0===e?void 0:e.id),f(0)},[r,P,v]),X=(0,o.useCallback)(()=>{var e;let t=e1(T,w)||0;Q(t),u({show:!0,_userWithStories:T,order:r.order+1,LastViewedStoryIndex:t}),h(null==T?void 0:null===(e=T.stories[t])||void 0===e?void 0:e.id),f(0)},[r,T,v]),ee=(0,o.useCallback)(()=>{g(!1),u(e=>({...e,show:!1})),L(!1),I(!1),E(!1),_(!1),b((0,e0.vQ)(!1)),j()},[u,L,I,E,_,b,j]),et=(0,o.useCallback)(()=>{0==v?K():(u({show:!0,_userWithStories:Z,order:r.order,LastViewedStoryIndex:r.LastViewedStoryIndex-1}),h(Z.stories[v-1].id),f(v-1))},[Z,r,v]),es=(0,o.useCallback)(()=>{(null==Z?void 0:Z.stories.length)==v+1?X():(u({show:!0,_userWithStories:Z,order:r.order,LastViewedStoryIndex:r.LastViewedStoryIndex+1}),f(v+1),h(Z.stories[v+1].id))},[Z,r,v]),el=!(null===(t=n[d][r.order+1])||void 0===t?void 0:t.stories),er=(0,o.useCallback)(()=>{el?ee():X()},[el,ee,X]),ei=async()=>{F(!1),ea(m)},ea=async e=>{await R($.W.storyDelete,{storyId:e},{headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"}});let t=document.getElementsByClassName("story-and-live-modal")[2];window.location.reload(),document.body.removeChild(t)},en=0===r.order&&(0===r.LastViewedStoryIndex||0==v)||W,eo=(O-1===r.LastViewedStoryIndex||O-1===v)&&el||W,ed=en?null:(0,i.jsx)("button",{className:"prev-btn",id:"prevUserStories",onClick:et,children:(0,i.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M14.5 6L8.5 12L14.5 18",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),ec=eo?null:(0,i.jsx)("button",{className:"next-btn",id:"nextUserStories",onClick:es,children:(0,i.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M9.5 6L15.5 12L9.5 18",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})});return(0,o.useCallback)(()=>{var e,t,s;let l=A.current;l&&(document.fullscreenElement?null===(t=(s=document).exitFullscreen)||void 0===t||t.call(s):null===(e=l.requestFullscreen)||void 0===e||e.call(l))},[]),(0,o.useEffect)(()=>
1{if(!r.show)return;let e=e=>{if(!W){if("Escape"===e.key){if(document.fullscreenElement){var t,s;null===(t=(s=document).exitFullscreen)||void 0===t||t.call(s)}else ee()}else"ArrowLeft"===e.key?en||et():"ArrowRight"!==e.key||eo||es()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[r.show,W,en,eo,et,es,ee]),(0,o.useEffect)(()=>{var e,t,s,l;if(!r.show)return;let i=!1,a=(null==r?void 0:null===(t=r._userWithStories)||void 0===t?void 0:null===(e=t.stories)||void 0===e?void 0:e.find(e=>e.id==m))||(null==Z?void 0:null===(s=Z.stories)||void 0===s?void 0:s[v]),n=null==a?void 0:null===(l=a.fileEntriesStories)||void 0===l?void 0:l[0];if(!n){U(ti(null));return}return tr(H[n.storyId]||n.fileName).then(e=>{i||U(ti(e))}),()=>{i=!0}},[r.show,m,v,null==r?void 0:null===(l=r._userWithStories)||void 0===l?void 0:null===(s=l.user)||void 0===s?void 0:s.id,H]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(em.u,{show:!0==r.show||y,enter:"transition-opacity duration-0",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity duration-0",leaveFrom:"translate-x-0 opacity-100",leaveTo:"translate-x-full opacity-0",appear:!0,children:(0,i.jsxs)("div",{ref:A,className:a.width<1024?"relative ml-auto top-0 bg-yaay-dark-transparent story-modal-mobile story-and-live-modal":"ml-auto top-0 bg-yaay-dark-transparent story-and-live-modal fixed w-full z-100",
1style:{height:"100vh",width:"100vw",left:0,zIndex:1e3},children:[(0,i.jsx)("div",{className:"absolute inset-0 z-0 pointer-events-none",style:{background:V,transition:"background 450ms ease"}}),(0,i.jsxs)("div",{className:"relative z-[1] flex h-[100vh] justify-center overflow-auto pb-[10px]] story-container",children:[(0,i.jsx)("img",{src:"/yaay_logo.svg",alt:"",className:"hidden lg:block",style:{width:52,height:42,position:"absolute",top:"50px",left:"30px"}}),(0,i.jsxs)("div",{className:"flex justify-center items-center",style:{perspective:"1200px",perspectiveOrigin:"50% 50%"},children:[(0,i.jsx)(e6,{PrevUserWithStories:P,StoryModalOrder:r.order,ApplyPrevUserStory:K,position:"left",isAnyModalOpen:W}),(0,i.jsxs)("div",{className:"StoryPlayer relative",style:{zIndex:1001},children:[ed,(0,i.jsx)("div",{className:"float-left w-full flex justify-center items-center h-full relative sm:w-full story-card",style:{zIndex:1002},children:(0,i.jsx)(tt,{currentStoryId:m,setCurrentStoryId:h,storyModal:r,currentStoryEValue:v,storiesIswatched:Q,handleStoryClose:ee,allStoriesLength:n[d].length,LiveAndStoryList:n,storiesIndex:d,ApplyNextUserStory:X,setCurrentStoryEValue:f,setIsActionTrigger:g,onAllStoriesEnd:er})}),(0,i.jsx)("div",{children:ec})]}),(0,i.jsx)(e6,{NextUserWithStories:T,StoryModalOrder:r.order,position:"right",ApplyNextUserStory:X,isAnyModalOpen:W})]})]}),(0,i.jsx)("a",{onClick:ee,className:"absolute right-[30px] top-[30px] z-[999999] cursor-pointer hidden lg:flex items-center justify-center w-10 h-10 rounded-full bg-black/40 hover:bg-black/60 backdrop-blur-md transition-colors duration-200",children:(0,i.jsx)(ef.F,{fill:p.D.WHITE,size:20})})]})}),(0,i.jsx)(tn,{isOpen:M,onClose:()=>{F(!1)},onConfirm:ei})]})},tn=e=>{let{isOpen:t,onClose:s,onConfirm:l,isLoading:r=!1}=e;return(0,i.jsx)(em.u,{appear:!0,show:t,as:o.Fragment,children:(0,i.jsxs)(eh.Vq,{as:"div",className:"relative",onClose:r?()=>{}:s,children:[(0,i.jsx)(em.x,{as:"div",enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",className:"fixed inset-0 bg-black/40",style:{zIndex:1100},"aria-hidden":"true"}),(0,i.jsx)("div",{className:"fixed inset-0 overflow-y-auto",style:{zIndex:1101},children:(0,i.jsx)("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:(0,i.jsx)(em.x,{enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",as:"div",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white dark:bg-yaay-dark-bar dark:text-gray-200 p-6 text-left align-middle shadow-xl transition-all",children:(0,i.jsxs)(eh.EM,{className:"w-full",children:[(0,i.jsx)("h1",{className:"text-lg font-medium leading-6 text-yaay-gray dark:text-gray-200 mb-4 text-left md:text-center",children:"İ\xe7erik Silinecek"}),(0,i.jsxs)("div",{className:"flex flex-col items-center space-y-6",children:[(0,i.jsx)("p",{className:"text-center text-sm font-medium text-yaay-gray dark:text-gray-300",children:"Silmek istediÄinizden emin misiniz?"}),(0,i.jsxs)("div",{className:"flex justify-center gap-20",children:[(0,i.jsx)("button",{type:"button",className:"bg-yaay-blue w-[115px] text-white h-[35px] flex justify-center items-center rounded-full text-sm px-8 text-center disabled:opacity-50",onClick:l,disabled:r,children:r?"Siliniyor...":"Sil"}),(0,i.jsx)("button",{type:"button",className:"border border-yaay-blue w-[115px] h-[35px] rounded-full text-sm px-8 flex justify-center items-center text-yaay-blue disabled:opacity-50",onClick:s,disabled:r,children:"Vazge\xe7"})]})]})]})})})})]})})},to=e=>{var t,s,l,r,a,m,h,f,v,g,y,j,w,b,N,k,C,S,L,I,E,_;let{setNotificationStatus:M,setNotificaitonBodyText:F}=(0,o.useContext)(x.w),[W,Z]=(0,o.useState)(0),{me:z}=(0,c.Z)(),{t:P}=(0,u.Z)(),{post:D}=(0,J.ZP)(),T=e.liveSteram.liveStreamData,[B,A]=(0,o.useState)({show:!1,message:""}),{i18n:H}=(0,R.Q)(),V=async()=>{let e=window?JSON.parse(localStorage.getItem("liveSteramReport")):[],t=(e=null===e?[]:e).findIndex(e=>e.currentUserId===z.id),s=e.find(e=>e.currentUserId===z.id);-1!==t&&s&&s.jobId===T.jobId?A({show:!0,message:"stories.liveReportAgainLabel.text"}):await D($.W.livestreamReport,{jobId:T.jobId,description:"",reportValue:1}).then(t=>{let s=[...e];s.push({currentUserId:z.id,jobId:T.jobId,report:1}),localStorage.setItem("liveSteramReport",JSON.stringify(s)),A({show:!0,message:"stories.complaintRecordLabel.text"})}).catch(e=>{})},U=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;
1try{let s=await D("".concat($.W.liveStreamViewers,"?jobId=").concat(e),{jobId:e,join:t});200===s.status&&(!0===t?setTimeout(()=>{U(e)},250):void 0===t&&Z(s.data))}catch(e){console.error("Error fetching viewers:",e)}};(0,o.useEffect)(()=>{var t,s,l,r;let i=null===(s=e.liveSteram)||void 0===s?void 0:null===(t=s.liveStreamData)||void 0===t?void 0:t.jobId,a=null===(r=e.liveSteram)||void 0===r?void 0:null===(l=r.liveStreamData)||void 0===l?void 0:l.userId;if(!i||i<=0||!a||a<=0)return;U(i,!0);let n=setInterval(()=>{U(i)},5e3);return()=>{U(i,!1),clearInterval(n)}},[null===(s=e.liveSteram)||void 0===s?void 0:null===(t=s.liveStreamData)||void 0===t?void 0:t.jobId,null===(r=e.liveSteram)||void 0===r?void 0:null===(l=r.liveStreamData)||void 0===l?void 0:l.userId]);let O=(0,i.jsx)(eL.Z,{style:{minWidth:180,borderRadius:12,overflow:"hidden",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.18)"},children:(0,i.jsx)(eI,{children:(0,i.jsxs)("a",{role:"button",className:"w-full flex items-center gap-2 px-4 py-3 whitespace-nowrap",onClick:V,children:[(0,i.jsx)(eM,{size:20}),(0,i.jsx)("span",{children:P("stories.complaintLabel.text")})]})})}),Y=e.isRotated?{transition:"transform 0.3s ease, width 0.3s ease, height 0.3s ease"}:{transform:"rotate(-90deg)",transformOrigin:"center",transition:"transform 0.3s ease, width 0.3s ease, height 0.3s ease"};return(0,i.jsxs)("div",{className:"user ".concat(e.isRotated?"fixed":"absolute"," bottom-12 h-20 top-0 z-[1150] w-full max-w-[476px]\n transition-opacity ").concat(!e.isRotated||e.showHead?"opacity-100":"opacity-0 pointer-events-none"),style:{background:"linear-gradient(176deg, rgba(0, 0, 0, 0.49) 0%, rgba(0, 0, 0, 0) 100%)",transitionDuration:e.showHead?"200ms":"3000ms"},children:[(0,i.jsxs)("div",{className:"relative flex justify-between items-center p-5",children:[(0,i.jsxs)("div",{className:"flex",children:[(0,i.jsx)(n(),{href:"/".concat((null===(m=e.liveSteram)||void 0===m?void 0:null===(a=m.liveStreamData.user)||void 0===a?void 0:a.username)||""),children:(0,i.jsx)("img",{className:"rounded-full cursor-pointer",src:(null===(f=e.liveSteram)||void 0===f?void 0:null===(h=f.liveStreamData.user)||void 0===h?void 0:h.profileImage)||"/images/user_blank.png",alt:"",style:{width:40,height:40}})}),(0,i.jsxs)("span",{className:"real-time-tag absolute left-6 border-none bottom-[13px] p-0.5 bg-yaay-fusya text-white font-inter font-bold border",children:[" ",H.live.toUpperCase()," "]}),(0,i.jsxs)("div",{className:"flex flex-col ml-2",children:[(0,i.jsx)(n(),{href:"/".concat((null===(g=e.liveSteram)||void 0===g?void 0:null===(v=g.liveStreamData.user)||void 0===v?void 0:v.username)||""),children:(0,i.jsxs)("span",{className:"text-white text-xs cursor-pointer flex items-center",children:[(0,i.jsx)("span",{children:null===(j=e.liveSteram)||void 0===j?void 0:null===(y=j.liveStreamData.user)||void 0===y?void 0:y.name}),(null===(b=e.liveSteram)||void 0===b?void 0:null===(w=b.liveStreamData.user)||void 0===w?void 0:w.permissions)===0&&(0,i.jsx)("span",{className:"place-self-center ml-1",children:(0,i.jsx)(eE.$_,{})})]})}),(0,i.jsxs)("span",{className:"text-white text-xs float-left pt-1",children:[(0,i.jsxs)("span",{className:"flex float-left items-center",children:[(0,i.jsx)(eE.tE,{fill:p.D.WHITE}),(0,i.jsxs)("span",{className:"pl-2",children:[(0,i.jsx)("span",{children:W}),(0,i.jsx)("span",{className:"ml-2 live-dot"})]})]}),(0,i.jsx)(n(),{href:"/".concat((null===(k=e.liveSteram)||void 0===k?void 0:null===(N=k.liveStreamData.user)||void 0===N?void 0:N.username)||""),children:(0,i.jsxs)("span",{className:"float-left cursor-pointer ml-2",children:["@",null===(S=e.liveSteram)||void 0===S?void 0:null===(C=S.liveStreamData.user)||void 0===C?void 0:C.username,(0,i.jsx)("span",{className:"ml-2 live-dot"})]})}),(0,i.jsx)("span",{className:"ml-2",children:P((null===(I=e.liveSteram)||void 0===I?void 0:null===(L=I.liveStreamData)||void 0===L?void 0:L.kafeId)!==0?"category.".concat(null===(_=e.liveSteram)||void 0===_?void 0:null===(E=_.liveStreamData)||void 0===E?void 0:E.kafeId,".text"):"category.yaay.text")})]})]})]}),(0,i.jsxs)("div",{className:"flex flex-row justify-center items-end gap-2",children:[(0,i.jsxs)("button",{onClick:()=>{e.setIsRotated(!e.isRotated)},className:"flex flex-row justify-center items-center gap-1 w-fit h-fit px-2 py-1 m-auto border-white border-[1px] rounded-sm bg-transparent hover:bg-gray-600",children:[(0,i.jsx)("span",{className:"text-white text-sm text-right ",children:e.isRotated?H.vertical:H.horizontal}),(0,i.jsx)("img",{src:"/images/story/screen-rotate.svg",className:"w-3 h-3",alt:"rotate",style:Y})]}),(0,i.jsxs)("span",{className:"text-white text-xs flex m-auto ".concat(z.id==T.userId?"hidden":""),children:[(0,i.jsx)(d.vb,{title:(0,i.jsx)("button",{className:"flex w-25 h-25 rounded-full",children:(0,i.jsx)(eE.Uc,{size:22,fill:p.D.WHITE})}),overlay:O}),(0,i.jsx)("a",{className:"relative cursor-pointer pl-4 block lg:hidden",onClick:e.handleModalClose,children:(0,i.jsx)(ef.F,{fill:p.D.WHITE,size:20})})]})]})]}
1),B.show&&(0,i.jsx)(eT,{class:"live-player-modal",message:B.message,reportStatus:B.show,setReportStatus:A})]})};var td=s(22004),tc=s.n(td),tu=function(e){let{t}=(0,u.Z)(),[s,l]=(0,o.useState)(!1),r=e.isRotated?{transform:"rotate(90deg)",transformOrigin:"center",transition:"transform 0.3s ease, width 0.3s ease, height 0.3s ease",width:"360vh",height:"calc(360vh / 1.8)"}:{transition:"transform 0.3s ease, width 0.3s ease, height 0.3s ease",width:"calc(90vh / 1.8)",height:"90vh"};return s?(0,i.jsx)("div",{style:{width:"100%",height:"90vh",color:"white",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid #383838"},children:(0,i.jsx)("p",{children:t("stories.liveStreamPlayerEndedLabel.text")})}):(0,i.jsx)("div",{style:r,children:(0,i.jsx)(tc(),{onError:t=>{27===t.error.code?(l(!0),setTimeout(()=>{e.handleModalClose()},3e3)):l(!1)},url:e.src,playing:!0,width:"100%",height:"100%"})})},tx=e=>{var t,s;let[l,r]=(0,o.useState)(!1),[a,n]=(0,o.useState)(!1),d={src:null==e?void 0:null===(s=e.liveSteram)||void 0===s?void 0:null===(t=s.liveStreamData)||void 0===t?void 0:t.streamLink,autoPlay:!0,addSeekBar:!1};if(void 0===e.liveSteram)return(0,i.jsx)(i.Fragment,{});let c=()=>{l&&n(!0)};return(0,o.useEffect)(()=>{e.setIsRotated(l),e.setShowHead(a)},[l,a]),(0,i.jsxs)("div",{className:"relative flex flex-col justify-center items-center w-fit h-fit",onMouseEnter:c,onMouseLeave:()=>{l&&n(!1)},onMouseMove:c,children:[(0,i.jsx)(to,{liveSteram:e.liveSteram,handleModalClose:e.handleModalClose,currentIndex:e.currentIndex,isRotated:l,setIsRotated:r,showHead:a}),(0,i.jsx)(tu,{...d,handleModalClose:e.handleModalClose,isRotated:l})]})};let tm=e=>{let{liveStream:t,setLiveStream:s,size:l}=e,{post:r}=(0,J.ZP)(),{feed:a,feedLocation:n}=(0,o.useContext)(x.w),{resetData:d}=(0,e4.Z)(e5.I.GetFeedListKey(a,n),10),[c,u]=(0,o.useState)(!1),[m,h]=(0,o.useState)(!1);(0,o.useEffect)(()=>(t.show&&(document.body.style.overflow="hidden"),()=>{d(),document.body.style.overflow="visible"}),[t.show]);let f=async()=>{d(),s({show:!1,liveStreamData:{},order:0})};return(0,i.jsx)(em.u,{show:t.show,enter:"transition-opacity duration-0",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity duration-0",leaveFrom:"translate-x-0 opacity-100",leaveTo:"translate-x-full opacity-0",appear:!0,children:(0,i.jsxs)("div",{className:l.width<1024?"relative ml-auto top-0 bg-yaay-dark-transparent story-modal-mobile story-and-live-modal":"ml-auto top-0 bg-yaay-dark-transparent story-and-live-modal fixed w-full z-100",
1style:{height:"100vh",width:"100vw",left:0},children:[(0,i.jsxs)("div",{className:"flex h-[100vh] justify-center overflow-auto pb-[10px]] sm:w-screen",children:[window?window.innerWidth>=1024?(0,i.jsx)("img",{src:"/yaay_logo_light.svg",alt:"",style:{width:52,height:42,position:"absolute",top:"50px",left:"50px"}}):"":(0,i.jsx)("img",{src:"/yaay_logo_light.svg",alt:"",style:{width:52,height:42,position:"absolute",top:"50px",left:"50px"}}),(0,i.jsx)("div",{className:"flex flex-col justify-center items-center w-full h-full overflow-hidden",children:(0,i.jsx)(tx,{handleModalClose:f,liveSteram:t,currentIndex:t.order,setIsRotated:u,setShowHead:h})})]}),(0,i.jsx)("a",{onClick:f,className:"absolute right-[50px] z-[999999] top-6 sm:top-[50px] cursor-pointer hidden lg:block transition-opacity\n ".concat(!c||m?"opacity-100":"opacity-0"),style:{transitionDuration:m?"200ms":"3000ms"},children:(0,i.jsx)("div",{className:"absolute z-15 left-[-15px] top-[-5px]",children:(0,i.jsx)(ef.F,{fill:p.D.WHITE,size:25})})})]})})};var th=s(18591),tf=e=>{let{setIsActionTrigger:t,IsActionTrigger:s}=e,{me:l}=(0,c.Z)(),{revision:r}=(0,th.$)(),a=(0,eb.i)(),{setIsExistsStories:n,feed:d}=(0,o.useContext)(x.w),[u,m]=(0,o.useState)(),[h,f]=(0,o.useState)(0),[p,v]=(0,o.useState)({show:!1,_userWithStories:{},order:0,LastViewedStoryId:0}),[g,y]=(0,o.useState)({show:!1,liveStreamData:{},order:0}),[j,w]=(0,o.useState)(!0),b=(0,ez.I0)(),{data:N,splittedStories:k,isExistsStories:C,loading:S}=(0,ez.v9)(e=>e.stories),L=(0,o.useMemo)(()=>"2"===d?2:0,[d]),I=k.length>1?1:0,E=(0,o.useCallback)(()=>{void 0!==l&&(S||(w(!0),b((0,eP.dp)({filterType:L,force:!0,resetSplitPreview:!1}))))},[b,S,l,L]);(0,o.useEffect)(()=>{void 0!==l&&(w(!0),b((0,eP.dp)({filterType:L,force:!0,resetSplitPreview:!0})))},[l,L,b]),(0,o.useEffect)(()=>{0!==r&&void 0!==l&&(w(!0),b((0,eP.dp)({filterType:L,force:!0,resetSplitPreview:!0})))},[r,l,L,b]),(0,o.useEffect)(()=>{S||n(C)},[C,S,n]),(0,o.useEffect)(()=>{var e;if(S||!C||!(null==l?void 0:l.id)||!j||!(null==N?void 0:N.length))return;let t=l.id,s=(null!==(e=eH())&&void 0!==e?e:{})[t];b((0,eP.iu)({storiesData:N,userId:t,watchedStoryMap:s})),w(!1),b((0,eP.AH)())},[S,C,null==l?void 0:l.id,j,N,b]);let _=(0,o.useCallback)(function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;v({show:!0,_userWithStories:e,order:t,LastViewedStoryIndex:s}),m(e.stories[t>e.stories.length-1?0:t].id)},[]);return(null==k?void 0:k.length)>0?(0,i.jsxs)(i.Fragment,{children:[!1==j&&(0,i.jsx)(e3,{currentUserId:null==l?void 0:l.id,LiveAndStoryList:k,handleLiveStreamShowModal:(e,t)=>{y({show:!0,liveStreamData:e,order:t})},storiesIndex:I,handleStoryShowModal:_}),(0,i.jsx)(ta,{storyModal:p,size:a,LiveAndStoryList:k,storiesIndex:I,setStoryModal:v,currentStoryId:u,setCurrentStoryId:m,currentStoryEValue:h,setCurrentStoryEValue:f,setIsActionTrigger:t,IsActionTrigger:s,onClose:E}),(0,i.jsx)(tm,{size:a,liveStream:g,setLiveStream:y})]}):(0,i.jsx)(i.Fragment,{})},tp=e=>{let{ForbiddenEndpointsWarningModalStatus:t,setForbiddenEndpointsWarningModalStatus:s}=(0,o.useContext)(x.w),{t:l}=(0,u.Z)();return(0,i.jsx)(em.u,{appear:!0,show:t,as:o.Fragment,children:(0,i.jsxs)(eh.Vq,{as:"div",className:"relative z-50",onClose:()=>{},children:[(0,i.jsx)(em.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,i.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),(0,i.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,i.jsx)("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:(0,i.jsx)(em.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,i.jsxs)(eh.EM,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white dark:bg-yaay-dark-bar dark:text-gray-200 p-6 text-left align-middle shadow-xl transition-all",children:[(0,i.jsx)("div",{className:"flex flex-col w-full max-h-96 overflow-y-auto overscroll-none divide-y dark:divide-gray-700 my-[10px] text-center",children:l("error.1052.text")}),(0,i.jsx)("div",{className:"flex items-center justify-center",children:(0,i.jsx)("button",{className:"btn btn-primary rounded-full text-sm px-8 text-center",onClick:()=>{window.location.href="/auth/logout"},children:l("error.1052Button.text")})})]})})})})]})})},tv=s(48695),tg=s(15492),ty=s(14347),tj=s(91235),tw=()=>{let[e,t]=(0,o.useState)(),{get:s}=(0,J.ZP)(),{t:l}=(0,u.Z)();return((0,o.useEffect)(()=>{(async()=>{t(await s($.W.badgeDetail).then(e=>e.data))})()},[]),void 0==e)?(0,i.jsx)(i.Fragment,{}):(0,i.jsx)("div",{className:"MyScoreContainer sm:rounded-t",children:(0,i.jsxs)("div",{className:"",children:[(0,i.jsx)("header",{className:" pt-[15px] mt-[4px] pl-[24px] pr-[32px] relative",children:(0,i.jsx)("div",{className:"relative sm:left-[50%] sm:top-[50%] sm:translate-x-[-50%] sm:translate-y-[50%] sm:absolute",children:(0,i.jsx)("h2",{className:"text-white sm:text-center text-left text-[16px] font-inter font-bold ",children:l("lbl_my_point")})})}),(0,i.jsxs)("div",{className:"overflow-hidden ",children:[(0,i.jsx)("section",{className:"h-[250px] relative sm:mt-[60px] ",children:(0,i.jsxs)("div",{className:"justify-center h-full flex items-center relative",children:[(0,i.jsx)("div",{className:"absolute justify-center flex z-20 mb-[25px] ",children:(0,i.jsx)(ty.Z,{})}),(0,i.jsx)("div",{className:"absolute",children:(0,i.jsx)(tj.Z,{})}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)("h2",{className:"text-center mt-[-25px] text-[16px] text-yaay-main-green font-semibold leading-[19px] font-inter",children:l("lbl_total_point")}),(0,i.jsx)("h3",{className:"text-center text-[40px] text-white font-semibold drop-shadow-3xl leading-[48px] font-inter",children:e.total}),(0,i.jsx)("div",{className:"flex justify-center items-center",children:(0,i.jsx)("div",{className:"absolute top-[-102px]",children:(0,i.jsx)(tv.Z,{percent:e.reputationLevel})})}),(0,i.jsxs)("div",{className:"absolute right-[-71px] top-[-45px] z-20 flex justify-center items-center ",children:[(0,i.jsx)("div",{className:"",children:(0,i.jsx)(tg.Z,{})}),(0,i.jsx)("div",{className:"absolute",children:(0,i.jsx)("h3",{className:"font-bold text-[24px] font-inter text-yaay-main-blue",children:e.reputationLevel})})]})]})]})}),(0,i.jsx)("section",{className:"mb-[30px] pl-[32px] pr-[32px] xl:pl-[105px] xl:pr-[105px] ",children:(0,i.jsxs)("p",{className:"text-left font-normal text-[16px] leading-5 text-white font-inter",children:[(0,i.jsxs)("span",{className:"text-yaay-main-green font-bold font-inter",children:[l("text_desc_reputation")," "]}),l("text_desc_t_reputation")]})}),(0,i.jsxs)("section",{className:"pl-[32px] pr-[32px] xl:pl-[105px] xl:pr-[105px]",children:[(0,i.jsx)("h2",{className:"font-bold leading-[18px] text-[12px] text-yaay-main-green mb-[11px] font-inter ",children:l("lbl_scoreboard")}),(0,i.jsx)("div",{children:(0,i.jsxs)("ul",{className:"h-[430px] font-inter text-[14px] ",children:[(0,i.jsxs)("li",{className:"flex justify-between mb-6 text-white ",children:[(0,i.jsx)("p",{children:l("lbl_referance")}),(0,i.jsx)("p",{children:e.referencePoint})]}),(0,i.jsxs)("li",{className:"flex justify-between mb-6 text-white ",children:[(0,i.jsx)("p",{children:l("lbl_post")}),(0,i.jsx)("p",{children:e.postPoint})]}),(0,i.jsxs)("li",{className:"flex justify-between mb-6 text-white ",children:[(0,i.jsx)("p",{children:l("lbl_comments_received")}),(0,i.jsx)("p",{children:e.receivedComment})]}),(0,i.jsxs)("li",{className:"flex justify-between mb-6 text-white ",children:[(0,i.jsx)("p",{children:l("lbl_comments_made")}),(0,i.jsx)("p",{children:e.sendedComment})]}),(0,i.jsxs)("li",{className:"flex justify-between mb-6 text-white ",children:[(0,i.jsx)("p",{children:l("lbl_reposts")}),(0,i.jsx)("p",{children:e.repostPoint})]}),(0,i.jsxs)("li",{className:"flex justify-between mb-6 text-white ",children:[(0,i.jsx)("p",{children:l("lbl_likes")}),(0,i.jsx)("p",{children:e.receivedLikes})]}),(0,i.jsxs)("li",{className:"flex justify-between mb-6 text-white ",children:[(0,i.jsx)("p",{children:l("lbl_wrong_category")}),(0,i.jsx)("p",{children:e.categoryReportTotal})]}),(0,i.jsxs)("li",{className:"flex justify-between mb-6 text-white ",children:[(0,i.jsx)("p",{children:l("lbl_report")}),(0,i.jsx)("p",{children:e.commonReportTotal})]})]})})]})]})]})})},tb=()=>{let{ReputationModal:e,setReputationModal:t}=(0,o.useContext)(x.w);return((0,o.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="visible",()=>{document.body.style.overflow="visible"}),[e]),e)?(0,i.jsx)("div",{className:"bg-black/50 fixed inset-0 z-[100]",children:(0,i.jsx)(em.u,{show:e,as:o.Fragment,children:(0,i.jsxs)("div",{children:[(0,i.jsx)(em.x,{as:o.Fragment,enter:"ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in-out duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,i.jsx)("div",{className:"fixed inset-0 bg-black/50 transition-opacity",onClick:()=>t(!1)})}),(0,i.jsx)("div",{className:"fixed inset-0 overflow-hidden",children:(0,i.jsx)("div",{className:"absolute inset-0 overflow-hidden",children:(0,i.jsx)("div",{className:"pointer-events-none fixed inset-y-0 right-0 flex max-w-full",children:(0,i.jsx)(em.x,{as:o.Fragment,enter:"transform transition ease-in-out duration-300",enterFrom:"translate-x-full",enterTo:"translate-x-0",leave:"transform transition ease-in-out duration-300",leaveFrom:"translate-x-0",leaveTo:"translate-x-full",children:(0,i.jsxs)("div",{className:"pointer-events-auto relative w-screen max-w-md
1sm:max-w-lg 2xl:max-w-2xl",children:[(0,i.jsx)("a",{onClick:()=>t(!1),className:"absolute top-5 -left-12 cursor-pointer hidden sm:block ml-3",children:(0,i.jsx)("img",{src:"/images/CrossEllipseLight.svg",alt:"Kapat"})}),(0,i.jsxs)("div",{className:"flex h-full flex-col overflow-y-auto pt-8 sm:pt-0",style:{background:"linear-gradient(345.46deg, #2746BF 33.79%, #0776F7 70.09%)"},children:[(0,i.jsx)("a",{onClick:()=>t(!1),className:"absolute right-[10px] top-[10px] z-50 cursor-pointer sm:hidden",children:(0,i.jsx)("img",{src:"/images/CrossEllipseDark.svg",alt:"Kapat"})}),(0,i.jsx)(tw,{})]})]})})})})})]})})}):null};function tN(){let{postCopyModal:e,setPostCopyModal:t}=(0,o.useContext)(x.w),{t:s}=(0,u.Z)();return e&&(0,i.jsx)("div",{className:"fixed bottom-3 left-0 right-12 mx-auto w-[inherit] z-[10001]",children:(0,i.jsxs)("div",{className:"flex flex-row justify-between items-center bg-[rgb(45,45,45)] text-white mx-8 p-4 rounded-lg h-14",children:[(0,i.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,i.jsx)(eE.SA,{size:32,fill:p.D.GREEN}),(0,i.jsx)("span",{children:s("post.copyToPostButton.text")})]}),(0,i.jsx)("button",{className:"flex items-center justify-center",onClick:s=>t(!e),children:(0,i.jsx)(ef.F,{size:18,fill:p.D.WHITE})})]})})}var tk=e=>{let{children:t,leftMenuVisiblity:s=!0,rightMenuVisiblity:l=!0,TrendTopicVisibility:r=!0,PopularPostsVisibility:a=!1,SuggestedProfilesVisibility:n=!0,NavbarVisibility:d=!0,ShowGlobalMetaData:c=!0,compactCenter:u=!1}=e,[m,h]=(0,o.useState)(!1),f=(0,I.useRouter)(),{KvkkPopupDisplayStatus:p,ForbiddenEndpointsWarningModalStatus:v,ReputationModal:g,isExistsStories:y}=(0,o.useContext)(x.w),[j,w]=(0,o.useState)(!1);(0,o.useEffect)(()=>{let e=f.pathname||"";h("/"===e||""===e)},[f.pathname]);let b=function(){let[e,t]=(0,o.useState)({width:0,height:0});function s(){t({width:window.innerWidth,height:window.innerHeight})}return(0,o.useEffect)(()=>(window.addEventListener("resize",s),s(),()=>window.removeEventListener("resize",s)),[]),e}(),N="/discover"===f.pathname;return(0,i.jsxs)(i.Fragment,{children:[d&&(0,i.jsx)(V,{}),(0,i.jsxs)("div",{className:"min-h-screen bg-white dark:bg-yaay-dark overflow-x-clip",children:[c&&(0,i.jsx)(ec.U4,{}),"false"==p&&(0,i.jsx)("div",{className:"w-full px-3 sm:px-4 box-border",children:(0,i.jsxs)("section",{className:"yaay-home-columns flex flex-row justify-center items-start gap-0 md:gap-6 xl:gap-10 w-full max-w-[1404px] mx-auto h-full",children:[(0,i.jsx)("div",{className:"hidden md:flex layout-left self-stretch min-w-0 ".concat(N?"bg-white dark:bg-yaay-dark":"yaay-page-bg dark:bg-yaay-dark"),children:(0,i.jsx)("div",{className:"h-auto w-full min-w-0",children:!0==s&&(0,i.jsx)(Q,{})})}),(0,i.jsxs)("div",{style:u?void 0:{minHeight:b.height+700},className:"layout-center self-stretch min-w-0 ".concat(N?"bg-white dark:bg-yaay-dark":"yaay-feed-bg dark:bg-yaay-dark-bar"," ").concat(u?"h-[calc(100vh-4rem)] overflow-hidden flex flex-col":"h-auto"),id:"layout_center",children:[(0,i.jsx)(tN,{}),(0,i.jsxs)("div",{style:u?void 0:{minHeight:b.height+700},className:"w-full min-w-0 ".concat(u?"flex-1 min-h-0 overflow-hidden flex flex-col":""),children:[m&&(0,i.jsx)("div",{id:"stories",className:(y||j)&&m?"w-full px-4 pt-2.5 pb-1.5 border-b border-gray-100/80 dark:border-gray-700":"hidden",children:(0,i.jsx)(tf,{setIsActionTrigger:w,IsActionTrigger:j})}),t]})]}),(0,i.jsx)("div",{className:"hidden lg:flex layout-right bg-white dark:bg-yaay-dark dark:text-gray-300 self-stretch min-w-0",children:!0==l&&(0,i.jsx)(ed,{TrendTopicVisibility:r,PopularPostsVisibility:a,SuggestedProfilesVisibility:n})})]})}),(0,i.jsx)("div",{className:"tempBarier"}),!0==p&&(0,i.jsx)(ey,{}),!0==v&&(0,i.jsx)(tp,{})]}),!0==g&&(0,i.jsx)(tb,{})]})}}}]);
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.