PageSourceSearch

https://enthub.it/build/assets/app-BwiOD-xT.js

js enthub.it collected 2026-09-25 04:23:25 UTC 336,317 bytes, 3 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Index-Dw5gArWk.js","assets/vendor-eWDfdwlh.js","assets/vendor-C9dgYgpk.css","assets/chat-round-dots-linear-DVr6ps0x.js","assets/hashtag-linear-I2AfMKMU.js","assets/eye-closed-linear-nxhGlT5l.js","assets/question-circle-linear-DCBeXFyk.js","assets/usePagePayload-DiIuREEi.js","assets/media-vendor-aRMZHiv3.js","assets/app-F6IboCHe.css","assets/ConfirmPassword-_GLkFAkq.js","assets/CardContent.vue_vue_type_script_setup_true_lang-Bg7jYQae.js","assets/CardHeader.vue_vue_type_script_setup_true_lang-B5Vbsyb2.js","assets/CardDescription.vue_vue_type_script_setup_true_lang-DAWsKKFd.js","assets/GuestLayout-BQqE8z85.js","assets/ForgotPassword-BmlJasGO.js","assets/Login-IIN4vAqt.js","assets/Checkbox.vue_vue_type_script_setup_true_lang-Dzf5ew_l.js","assets/eye-linear-D2ZdPvwl.js","assets/Register-DvrtDIGE.js","assets/useRecaptcha-gLnDkdLW.js","assets/ResetPassword-CoPn6ZXQ.js","assets/Restore-BiLvEM2C.js","assets/TwoFactorAuth-X0nSgg2s.js","assets/VerifyEmail-C6TfyzNx.js","assets/Comments-RBtf5wqk.js","assets/EmptyStateTimeline.vue_vue_type_script_setup_true_lang-BLwjjm_z.js","assets/card-ui-24-regular-vpn8swkG.js","assets/Loader-CNZS6PFa.js","assets/three-dots-loading-B0-IaqDh.js","assets/FeedCommentCard-CjTsBTnd.js","assets/AlertDialogTitle.vue_vue_type_script_setup_true_lang-Ao1wGrs-.js","assets/AlertDialogAction.vue_vue_type_script_setup_true_lang-BumDIWBO.js","assets/CommentBody-C_SSJyld.js","assets/useAlertDialog-VNm_616D.js","assets/DialogFooter.vue_vue_type_script_setup_true_lang-GIacIGyQ.js","assets/GTextarea-DHsfwaRX.js","assets/SelectContent.vue_vue_type_script_setup_true_lang-QITrU-Sa.js","assets/DialogTrigger.vue_vue_type_script_setup_true_lang-Di9Ar1KU.js","assets/flag-2-linear-CkNsn7V4.js","assets/ImageZoom-Aq1oagyv.js","assets/useLightboxZoom-DOF2j0An.js","assets/ImageZoom-BmXEVwI5.css","assets/trash-bin-2-linear-CpED-3EM.js","assets/refresh-bold-Cf-Ukeh8.js","assets/UserBookmarksFilter-DRdKImzf.js","assets/alt-arrow-down-linear-CKXsP312.js","assets/Stories-2qGjXsrq.js","assets/FeedCard-B1NKkoyu.js","assets/steam-DYzVjvt5.js","assets/link-bold-CCJTdI_-.js","assets/UserStoryMiniProfileCard-3DH-VRaj.js","assets/UserMessenger-Ceje57Pd.js","assets/useChatActions-Cd2tCvR4.js","assets/UserFollow-DY7814zP.js","assets/ButtonLink.vue_vue_type_script_setup_true_lang-TxzTPoIK.js","assets/ring-resize-CupSmS8N.js","assets/user-minus-rounded-linear-Cwe9KKH7.js","assets/UserRating-CZM6-1fv.js","assets/CommunityFollow-DAwzwqxm.js","assets/user-check-linear-s-z3Ss7L.js","assets/useSafeHtml-Cthc_4r3.js","assets/steam-DgZzqL1A.css","assets/TooltipTrigger.vue_vue_type_script_setup_true_lang-CGN39T9e.js","assets/Textarea.vue_vue_type_script_setup_true_lang-Dyer58ib.js","assets/pin-linear-Og3l9ZS5.js","assets/close-circle-linear-DoF6FoyN.js","assets/useVideoAutoplay-D19mw5ci.js","assets/FeedCard-CRO4ERRx.css","assets/Index-t1qnIaYc.js","assets/pin-bold-C8mqEqFY.js","assets/check-2s1vpebB.js","assets/chatFormat-CG2qF98m.js","assets/Info-CPkZQkor.js","assets/Show-CF6Lk7aF.js","assets/AlertDialogTrigger.vue_vue_type_script_setup_true_lang-DaekCucf.js","assets/settings-linear-CNtvnL79.js","assets/send-Djlh8qj3.js","assets/functions-gskAK0ED.js","assets/pen-linear-Bt442D0O.js","assets/Show-DFjG7lqv.css","assets/Create-U-uTkK_o.js","assets/sanitize-DYMtlCDm.js","assets/sanitize-B0hdQeh5.css","assets/Edit-BbXzZ_ov.js","assets/trash-bin-minimalistic-linear-f93L0QtQ.js","assets/Show-cb8w-8uR.js","assets/EmptyState.vue_vue_type_script_setup_true_lang-BZttJflu.js","assets/sort-horizontal-linear-CwdiEoVm.js","assets/alt-arrow-up-linear-BRLdpkOB.js","assets/About-CzDPTUjT.js","assets/CommunityPageHeader-Dq-glYlc.js","assets/CommunityIgnore-D-Rg0u4n.js","assets/image-01-B7f5T04J.js","assets/Create-DMDwP4YW.js","assets/Settings-D1EzEc-3.js","assets/Show-KIeRn2R8.js","assets/Top-CiDkbXB7.js","assets/Contact-CiDPZQQl.js","assets/Communities-Bey_00E3.js","assets/Index-CREB7Jny.js","assets/useScrollRestore-B6xIpHuy.js","assets/Search-CwyebXEV.js","assets/TopCommunities-DqmN_nYU.js","assets/TopUsers-DsOTgF-x.js","assets/Users-CP1Q_n2J.js","assets/Featured-CdYPO_Vc.js","assets/FeedNavbar-CvYjP5Y4.js","assets/Featured-CjX9AFs3.css","assets/Index-C9iFmm7W.js","assets/DropdownMenuRadioItem.vue_vue_type_script_setup_true_lang-CR4VbW7n.js","assets/MyCommunities-D3CXtUuz.js","assets/Home-DXqnNitm.js","assets/Create-BllGRePz.js","assets/Edit-CfI0yeBD.js","assets/Index-yFZgRhSB.js","assets/Rules-DInVhRYd.js","assets/Show-B_bMexNN.js","assets/CommentsContainer-DQb81fnL.js","assets/tuning-2-linear-Dt62Z55d.js","assets/alt-arrow-left-linear-ziexC3Uq.js","assets/lock-linear-DKE5UEop.js","assets/CommentGraffitiModal-Byj1hbQL.js","assets/CommentGraffitiModal-Bd-zF
1HoF.css","assets/forbidden-circle-linear-CpPAJuCs.js","assets/CommentsContainer-BmVgPYLV.css","assets/MyFeed-DFgjyWws.js","assets/News-dTf4z6X8.js","assets/Index-BwwWLsDx.js","assets/Page-Dr7fSA_w.js","assets/Create-1A8Vs5cc.js","assets/Edit-IDFe2ZKR.js","assets/Index-DtwFJ59g.js","assets/Rules--QPMX9Gi.js","assets/Show-B5Yd8ogs.js","assets/BlockGallery-DQ0UdHzB.js","assets/SocialLinkButton-DL89-p-n.js","assets/BlockGallery-CfTJs8H_.css","assets/Edit-DCclxMVv.js","assets/Separator.vue_vue_type_script_setup_true_lang-3jBToINd.js","assets/editor-vendor-CusBIL68.js","assets/Edit-S0aPb4My.css","assets/Show-CDx1p2LI.js","assets/Show-CzFcMYr0.css","assets/Show-DVNBerA3.js","assets/TagIgnore-3gzOwMDL.js","assets/Blocked-BR9sy_rR.js","assets/UserMenu-1N80bsf8.js","assets/RadioGroupItem.vue_vue_type_script_setup_true_lang-DELA6vFo.js","assets/UserIgnore-CnJlQKro.js","assets/Newest-aLWIU4de.js","assets/UserProfileCommentsFilter-DjOn9N7O.js","assets/UserProfileHeader-Bg8PhQQm.js","assets/Popular-BrYPaq4c.js","assets/Deleted-CxD5p1OD.js","assets/Draft-B2G05ZVE.js","assets/BulkEditBar-C7JvU80L.js","assets/Followers-BB2Eg6Qa.js","assets/Followings-DzjemOYV.js","assets/Index-BI-gy61j.js","assets/UserStoriesFeed-DBAUONUs.js","assets/UserProfilePostsFilter-BXCbnFXl.js","assets/Pinned-B0Sd1rLL.js","assets/Popular-DQMQhmtH.js","assets/Account-Cz7yrnY5.js","assets/SettingsHeader-D_yAUxyG.js","assets/axiosErrors-BLKeM6QF.js","assets/Badges-D87LmBGI.js","assets/asArray-D-L44Skv.js","assets/BlockedUsers-CmwszGms.js","assets/BlockedUsersFull-Bld02tS7.js","assets/Delete-B2r8LI-y.js","assets/IgnoredCommunities-5kcdFRYL.js","assets/IgnoredTags-BNl4CL8l.js","assets/IgnoredUsers-CUOV9osm.js","assets/Index-Cqu7d22m.js","assets/Notifications-BtkLG7Ps.js","assets/Password-CUw-ZkOB.js","assets/Preference-BNMOm7O1.js","assets/Privacy-cbQRVAYn.js","assets/Profile-DV2p7xAy.js","assets/TwoFactorAuth-yGmeWmKV.js","assets/Show-CEmkQC9v.js","assets/WallBoard-CBa_2c_o.js","assets/Wall-BrqevuQX.js","assets/NotEligible-q1Z8uokI.js","assets/NotReady-CrFY0K1W.js","assets/Show-B19aWtS1.js"])))=>i.map(i=>d[i]);
2import{P as e,E as t,a,l as n,d as s,r as o,c as i,b as r,_ as l,e as c,f as d,t as u,h as m,i as p,o as f,j as h,w as g,k as v,n as y,u as b,O as w,m as x,p as _,q as k,s as C,x as j,y as E,z as S,A,B as P,C as M,S as L,D as O,F as R,G as z,H as I,I as T,J as $,K as N,L as B,M as D,N as V,Q as U,T as F,R as q,U as H,V as W,W as Z,X as G,Y as K,Z as Q,$ as J,a0 as Y,a1 as X,a2 as ee,a3 as te,a4 as ae,a5 as ne,a6 as se,a7 as oe,a8 as ie,a9 as re,aa as le,ab as ce,ac as de,ad as ue,ae as me,af as pe,ag as fe,ah as he,ai as ge,aj as ve,ak as ye,al as be,am as we,an as xe,ao as _e,ap as ke,aq as Ce,ar as je,as as Ee,at as Se,au as Ae,av as Pe,aw as Me,ax as Le,ay as Oe,az as Re,aA as ze,aB as Ie,aC as Te,aD as $e,aE as Ne,aF as Be,aG as De,aH as Ve,aI as Ue,aJ as Fe,aK as qe,aL as He}from"./vendor-eWDfdwlh.js";/* empty css            */import{H as We}from"./media-vendor-aRMZHiv3.js";function Ze(){return Ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},Ze.apply(null,arguments)}window.Pusher=e,window.Echo=new t({broadcaster:"reverb",key:"ExMhyUouB8Qj3byyZ",wsHost:"enthub.it",wsPort:"443",wssPort:"443",forceTLS:!0,enabledTransports:["ws","wss"]}),window.axios=a,window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest",window.axios.defaults.headers.common.Accept="application/json",window.axios.defaults.withCredentials=!0,window.axios.interceptors.request.use(e=>{try{if((e=>{try{return!e||"string"!=typeof e||!!e.startsWith("/")||new URL(e,window.location.origin).origin===window.location.origin}catch(t){return!1}})(e.url)){const t=document.cookie.match(new RegExp("(?:^|; )XSRF-TOKEN=([^;]*)"));t&&t[1]&&(e.headers["X-XSRF-TOKEN"]=decodeURIComponent(t[1]))}else e.withCredentials=!1,delete e.headers["X-Requested-With"]}catch(t){}return e}),window.axios.interceptors.response.use(e=>{const t=e?.data?.toasts;
2return Array.isArray(t)&&t.length&&(t.forEach(e=>{e&&e.message&&n(e.message,{type:e.type||"success",autoClose:6e3,newestOnTop:!0})}),e.data.toasts=[]),e},e=>{const t=e?.response?.data?.toasts;return Array.isArray(t)&&t.length&&(t.forEach(e=>{e&&e.message&&n(e.message,{type:e.type||"error",autoClose:6e3,newestOnTop:!0})}),e.response?.data&&(e.response.data.toasts=[])),Promise.reject(e)});const Ge=String.prototype.replace,Ke=/%20/g,Qe={RFC1738:function(e){return Ge.call(e,Ke,"+")},RFC3986:function(e){return String(e)}};var Je="RFC3986";const Ye=Object.prototype.hasOwnProperty,Xe=Array.isArray,et=new WeakMap;var tt=function(e,t){return et.set(e,t),e};function at(e){return et.has(e)}var nt=function(e){return et.get(e)},st=function(e,t){et.set(e,t)};const ot=function(){const e=[];for(let t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),it=function(e,t){const a=t&&t.plainObjects?Object.create(null):{};for(let n=0;n<e.length;++n)void 0!==e[n]&&(a[n]=e[n]);return a},rt=function e(t,a,n){if(!a)return t;if("object"!=typeof a){if(Xe(t))t.push(a);else{if(!t||"object"!=typeof t)return[t,a];if(at(t)){var s=nt(t)+1;t[s]=a,st(t,s)}else(n&&(n.plainObjects||n.allowPrototypes)||!Ye.call(Object.prototype,a))&&(t[a]=!0)}return t}if(!t||"object"!=typeof t){if(at(a)){for(var o=Object.keys(a),i=n&&n.plainObjects?{__proto__:null,0:t}:{0:t},r=0;r<o.length;r++)i[parseInt(o[r],10)+1]=a[o[r]];return tt(i,nt(a)+1)}return[t].concat(a)}let l=t;return Xe(t)&&!Xe(a)&&(l=it(t,n)),Xe(t)&&Xe(a)?(a.forEach(function(a,s){if(Ye.call(t,s)){const o=t[s];o&&"object"==typeof o&&a&&"object"==typeof a?t[s]=e(o,a,n):t.push(a)}else t[s]=a}),t):Object.keys(a).reduce(function(t,s){const o=a[s];return t[s]=Ye.call(t,s)?e(t[s],o,n):o,t},l)},lt=1024,ct=function(e,t,a,n){if(at(e)){var s=nt(e)+1;return e[s]=t,st(e,s),e}var o=[].concat(e,t);return o.length>a?tt(it(o,{plainObjects:n}),o.length-1):o},dt=function(e,t){if(Xe(e)){const a=[];for(let n=0;n<e.length;n+=1)a.push(t(e[n]));return a}return t(e)},ut=Object.prototype.hasOwnProperty,mt={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},pt=Array.isArray,ft=Array.prototype.push,ht=function(e,t){ft.apply(e,pt(t)?t:[t])},gt=Date.prototype.toISOString,vt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:function(e,t,a,n,s){if(0===e.length)return e;let o=e;if("symbol"==typeof e?o=Symbol.prototype.toString.call(e):"string"!=typeof e&&(o=String(e)),"iso-8859-1"===a)return escape(o).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});let i="";for(let r=0;r<o.length;r+=lt){const e=o.length>=lt?o.slice(r,r+lt):o,t=[];for(let a=0;a<e.length;++a){let n=e.charCodeAt(a);45===n||46===n||95===n||126===n||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||"RFC1738"===s&&(40===n||41===n)?t[t.length]=e.charAt(a):n<128?t[t.length]=ot[n]:n<2048?t[t.length]=ot[192|n>>6]+ot[128|63&n]:n<55296||n>=57344?t[t.length]=ot[224|n>>12]+ot[128|n>>6&63]+ot[128|63&n]:(a+=1,n=65536+((1023&n)<<10|1023&e.charCodeAt(a)),t[t.length]=ot[240|n>>18]+ot[128|n>>12&63]+ot[128|n>>6&63]+ot[128|63&n])}i+=t.join("")}return i},encodeValuesOnly:!1,format:Je,formatter:Qe[Je],indices:!1,serializeDate:function(e){return gt.call(e)},skipNulls:!1,strictNullHandling:!1},yt={},bt=function(e,t,a,n,s,o,i,r,l,c,d,u,m,p,f,h,g,v){let y=e,b=v,w=0,x=!1;for(;void 0!==(b=b.get(yt))&&!x;){const t=b.get(e);if(w+=1,void 0!==t){if(t===w)throw new RangeError("Cyclic object value");x=!0}void 0===b.get(yt)&&(w=0)}if("function"==typeof c?y=c(t,y):y instanceof Date?y=m(y):"comma"===a&&pt(y)&&(y=dt(y,function(e){return e instanceof Date?m(e):e})),null===y){if(o)return l&&!h?l(t,vt.encoder,g,"key",p):t;y=""}if("string"==typeof(k=y)||"number"==typeof k||"boolean"==typeof k||"symbol"==typeof k||"bigint"==typeof k||(_=y)&&"object"==typeof _&&_.constructor&&_.constructor.isBuffer&&_.constructor.isBuffer(_))return l?[f(h?t:l(t,vt.encoder,g,"key",p))+"="+f(l(y,vt.encoder,g,"value",p))]:[f(t)+"="+f(String(y))];var _,k;const C=[];if(void 0===y)return C;let j;if("comma"===a&&pt(y))h&&l&&(y=dt(y,l)),j=[{value:y.length>0?y.join(",")||null:void 0}];else if(pt(c))j=c;else{const e=Object.keys(y);j=d?e.sort(d):e}const E=r?t.replace(/\./g,"%2E"):t,S=n&&pt(y)&&1===y.length?E+"[]":E;
2if(s&&pt(y)&&0===y.length)return S+"[]";for(let A=0;A<j.length;++A){const t=j[A],b="object"==typeof t&&void 0!==t.value?t.value:y[t];if(i&&null===b)continue;const x=u&&r?t.replace(/\./g,"%2E"):t,_=pt(y)?"function"==typeof a?a(S,x):S:S+(u?"."+x:"["+x+"]");v.set(e,w);const k=new WeakMap;k.set(yt,v),ht(C,bt(b,_,a,n,s,o,i,r,"comma"===a&&h&&pt(y)?null:l,c,d,u,m,p,f,h,g,k))}return C},wt=Object.prototype.hasOwnProperty,xt=Array.isArray,_t={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:function(e,t,a){const n=e.replace(/\+/g," ");if("iso-8859-1"===a)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(s){return n}},delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},kt=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},Ct=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},jt=function(e,t,a,n){if(!e)return;const s=a.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g;let i=a.depth>0&&/(\[[^[\]]*])/.exec(s);const r=i?s.slice(0,i.index):s,l=[];if(r){if(!a.plainObjects&&wt.call(Object.prototype,r)&&!a.allowPrototypes)return;l.push(r)}let c=0;for(;a.depth>0&&null!==(i=o.exec(s))&&c<a.depth;){if(c+=1,!a.plainObjects&&wt.call(Object.prototype,i[1].slice(1,-1))&&!a.allowPrototypes)return;l.push(i[1])}return i&&l.push("["+s.slice(i.index)+"]"),function(e,t,a,n){let s=n?t:Ct(t,a);for(let o=e.length-1;o>=0;--o){let t;const n=e[o];if("[]"===n&&a.parseArrays)t=at(s)?s:a.allowEmptyArrays&&(""===s||a.strictNullHandling&&null===s)?[]:ct([],s,a.arrayLimit,a.plainObjects);else{t=a.plainObjects?Object.create(null):{};const e="["===n.charAt(0)&&"]"===n.charAt(n.length-1)?n.slice(1,-1):n,o=a.decodeDotInKeys?e.replace(/%2E/g,"."):e,i=parseInt(o,10);a.parseArrays||""!==o?!isNaN(i)&&n!==o&&String(i)===o&&i>=0&&a.parseArrays&&i<=a.arrayLimit?(t=[],t[i]=s):"__proto__"!==o&&(t[o]=s):t={0:s}}s=t}return s}(l,t,a,n)};function Et(e,t){const a=function(){return _t}();if(""===e||null==e)return a.plainObjects?Object.create(null):{};const n="string"==typeof e?function(e,t){const a={__proto__:null},n=(t.ignoreQueryPrefix?e.replace(/^\?/,""):e).split(t.delimiter,1/0===t.parameterLimit?void 0:t.parameterLimit);let s,o=-1,i=t.charset;if(t.charsetSentinel)for(s=0;s<n.length;++s)0===n[s].indexOf("utf8=")&&("utf8=%E2%9C%93"===n[s]?i="utf-8":"utf8=%26%2310003%3B"===n[s]&&(i="iso-8859-1"),o=s,s=n.length);for(s=0;s<n.length;++s){if(s===o)continue;const e=n[s],r=e.indexOf("]="),l=-1===r?e.indexOf("="):r+1;let c,d;-1===l?(c=t.decoder(e,_t.decoder,i,"key"),d=t.strictNullHandling?null:""):(c=t.decoder(e.slice(0,l),_t.decoder,i,"key"),d=dt(Ct(e.slice(l+1),t),function(e){return t.decoder(e,_t.decoder,i,"value")})),d&&t.interpretNumericEntities&&"iso-8859-1"===i&&(d=kt(d)),e.indexOf("[]=")>-1&&(d=xt(d)?[d]:d);const u=wt.call(a,c);u&&"combine"===t.duplicates?a[c]=ct(a[c],d,t.arrayLimit,t.plainObjects):u&&"last"!==t.duplicates||(a[c]=d)}return a}(e,a):e;let s=a.plainObjects?Object.create(null):{};const o=Object.keys(n);for(let i=0;i<o.length;++i){const t=o[i],r=jt(t,n[t],a,"string"==typeof e);s=rt(s,r,a)}return!0===a.allowSparse?s:function(e){const t=[{obj:{o:e},prop:"o"}],a=[];for(let n=0;n<t.length;++n){const e=t[n],s=e.obj[e.prop],o=Object.keys(s);for(let n=0;n<o.length;++n){const e=o[n],i=s[e];"object"==typeof i&&null!==i&&-1===a.indexOf(i)&&(t.push({obj:s,prop:e}),a.push(i))}}return function(e){for(;e.length>1;){const t=e.pop(),a=t.obj[t.prop];if(Xe(a)){const e=[];for(let t=0;t<a.length;++t)void 0!==a[t]&&e.push(a[t]);t.obj[t.prop]=e}}}(t),e}(s)}class St{constructor(e,t,a){var n,s;this.name=e,this.definition=t,this.bindings=null!=(n=t.bindings)?n:{},this.wheres=null!=(s=t.wheres)?s:{},this.config=a}get template(){const e=`${this.origin}/${this.definition.uri}`.replace(/\/+$/,"");return""===e?"/":e}get origin(){return this.config.absolute?this.definition.domain?`${this.config.url.match(/^\w+:\/\//)[0]}${this.definition.domain}${this.config.port?`:${this.config.port}`:""}`:this.config.url:""}get parameterSegments(){var e,t;return null!=(e=null==(t=this.template.match(/{[^}?]+\??}/g))?void 0:t.map(e=>({name:e.replace(/{|\??}/g,""),required:!/\?}$/.test(e)})))?e:[]}matchesUrl(e){var t;if(!this.definition.methods.includes("GET"))return!1;const a=this.template.replace(/[.*+$()[\]]/g,"\\$&").replace(/(\/?){([^}?]*)(\??)}/g,(e,t,a,n)=>{var s;const o=`(?<${a}>${(null==(s=this.wheres[a])?void 0:s.replace(/(^\^)|(\$$)/g,""))||"[^/?]+"})`;return n?`(${t}${o})?`:`${t}${o}`}).replace(/^\w+:\/\//,""),[n,s]=e.replace(/^\w+:\/\//,"").split("?"),o=null!=(t=new RegExp(`^${a}/?$`).exec(n))?t:new RegExp(`^${a}/?$`).exec(decodeURI(n));if(o){for(const e in o.groups)o.groups[e]="string"==typeof o.groups[e]?decode
2URIComponent(o.groups[e]):o.groups[e];return{params:o.groups,query:Et(s)}}return!1}compile(e){return this.parameterSegments.length?this.template.replace(/{([^}?]+)(\??)}/g,(t,a,n)=>{var s,o;if(!n&&[null,void 0].includes(e[a]))throw new Error(`Ziggy error: '${a}' parameter is required for route '${this.name}'.`);if(this.wheres[a]&&!new RegExp(`^${n?`(${this.wheres[a]})?`:this.wheres[a]}$`).test(null!=(o=e[a])?o:""))throw new Error(`Ziggy error: '${a}' parameter '${e[a]}' does not match required format '${this.wheres[a]}' for route '${this.name}'.`);return encodeURI(null!=(s=e[a])?s:"").replace(/%7C/g,"|").replace(/%25/g,"%").replace(/\$/g,"%24")}).replace(this.config.absolute?/(\.[^/]+?)(\/\/)/:/(^)(\/\/)/,"$1/").replace(/\/+$/,""):this.template}}class At extends String{constructor(e,t,a=!0,n){if(super(),this.t=null!=n?n:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,!this.t&&"undefined"!=typeof document&&document.getElementById("ziggy-routes-json")&&(globalThis.Ziggy=JSON.parse(document.getElementById("ziggy-routes-json").textContent),this.t=globalThis.Ziggy),this.t=Ze({},this.t,{absolute:a}),e){if(!this.t.routes[e])throw new Error(`Ziggy error: route '${e}' is not in the route list.`);this.i=new St(e,this.t.routes[e],this.t),this.u=this.l(t)}}toString(){const e=Object.keys(this.u).filter(e=>!this.i.parameterSegments.some(({name:t})=>t===e)).filter(e=>"_query"!==e).reduce((e,t)=>Ze({},e,{[t]:this.u[t]}),{});return this.i.compile(this.u)+function(e,t){let a=e;const n=function(e){if(!e)return vt;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!=e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");const t=e.charset||vt.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let a=Je;if(void 0!==e.format){if(!ut.call(Qe,e.format))throw new TypeError("Unknown format option provided.");a=e.format}const n=Qe[a];let s,o=vt.filter;if(("function"==typeof e.filter||pt(e.filter))&&(o=e.filter),s=e.arrayFormat in mt?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":vt.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:vt.addQueryPrefix,allowDots:void 0===e.allowDots?!0===e.encodeDotInKeys||vt.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:vt.allowEmptyArrays,arrayFormat:s,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:vt.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:void 0===e.delimiter?vt.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:vt.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:vt.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:vt.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:vt.encodeValuesOnly,filter:o,format:a,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:vt.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:vt.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:vt.strictNullHandling}}(t);let s,o;"function"==typeof n.filter?(o=n.filter,a=o("",a)):pt(n.filter)&&(o=n.filter,s=o);const i=[];if("object"!=typeof a||null===a)return"";const r=mt[n.arrayFormat],l="comma"===r&&n.commaRoundTrip;s||(s=Object.keys(a)),n.sort&&s.sort(n.sort);const c=new WeakMap;for(let m=0;m<s.length;++m){const e=s[m];n.skipNulls&&null===a[e]||ht(i,bt(a[e],e,r,l,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,c))}const d=i.join(n.delimiter);let u=!0===n.addQueryPrefix?"?":"";return n.charsetSentinel&&(u+="iso-8859-1"===n.charset?"utf8=%26%2310003%3B&":"utf8=%E2%9C%93&"),d.length>0?u+d:""}(Ze({},e,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:(e,t)=>"boolean"==typeof e?Number(e):t(e)})}p(e){e?this.t.absolute&&e.startsWith("/")&&(e=this.h().host+e):e=this.m();let t={};const[a,n]=Object.entries(this.t.routes).find(([a,n])=>t=new St(a,n,this.t).matchesUrl(e))||[void 0,void 0];return Ze({name:a},t,{route:n})}m(){const{host:e,pathname:t,search:a}=this.h();return(this.t.absolute?e+t:t.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+a}current(e,t){const{name:a,params:n,query:s,route:o}=this.p();if(!e)return a;const i=new RegExp(`^${e.replace(/\./g,"\\.").replace(/\*/g,".*")}$`).test(a);if([null,void 0].includes(t)||!i)return i;const r=new St(a,o,this.t);t=this.l(t,r);const l=Ze({},n,s);if(Object.values(t).every(e=>!e)&&!Object.values(l).some(e=>void 0!==e))return!0;const c=(e,t)=>Object.entries(e).every(([e,a])=>Array.isArray(a)&&Array.isArray(t[e])?a.every(a=>t[e].includes(a)||t[e].includes(decodeURIComponent(a))):"object"==typeof a&&"object"==typeof t[e]&&null!==a&&null!==t[e]?c(a,t[e]):t[e]==a||t[e]==decodeURIComponent(a));return c(t,l)}h(){var e,t,a,n,s,o;const{host:i="",pathname:r="",search:l=""}="undefined"!=typeof window?window.location:{};return{host:null!=(e=null==(t=this.t.location)?void 0:t.host)?e:i,pathname:null!=(a=null==(n=this.t.location)?void 0:n.pathname)?a:r,search:null!=(s=null==(o=this.t.location)?void 0:o.search)?s:l}}get params(){const{params:e,query:t}=this.p();return Ze({},e,t)}
2get routeParams(){return this.p().params}get queryParams(){return this.p().query}has(e){return this.t.routes.hasOwnProperty(e)}l(e={},t=this.i){null!=e||(e={}),e=["string","number"].includes(typeof e)?[e]:e;const a=t.parameterSegments.filter(({name:e})=>!this.t.defaults[e]);return Array.isArray(e)?e=e.reduce((e,t,n)=>Ze({},e,a[n]?{[a[n].name]:t}:"object"==typeof t?t:{[t]:""}),{}):1!==a.length||e.hasOwnProperty(a[0].name)||!e.hasOwnProperty(Object.values(t.bindings)[0])&&!e.hasOwnProperty("id")||(e={[a[0].name]:e}),Ze({},this.v(t),this.j(e,t))}v(e){return e.parameterSegments.filter(({name:e})=>this.t.defaults[e]).reduce((e,{name:t},a)=>Ze({},e,{[t]:this.t.defaults[t]}),{})}j(e,{bindings:t,parameterSegments:a}){return Object.entries(e).reduce((e,[n,s])=>{if(!s||"object"!=typeof s||Array.isArray(s)||!a.some(({name:e})=>e===n))return Ze({},e,{[n]:s});const o=s.hasOwnProperty(t[n])?t[n]:s.hasOwnProperty("id")?"id":void 0;if(void 0===o)throw new Error(`Ziggy error: object passed as '${n}' parameter is missing route model binding key '${t[n]}'.`);return Ze({},e,{[n]:s[o]})},{})}valueOf(){return this.toString()}}const Pt={install(e,t){const a=(e,a,n,s=t)=>function(e,t,a,n){const s=new At(e,t,a,n);return e?s.toString():s}(e,a,n,s);parseInt(e.version)>2?(e.config.globalProperties.route=a,e.provide("route",a)):e.mixin({methods:{route:a}})}},Mt=s("app",()=>{const e=o(!1),t=o(!0),n=o({check:!1,user:null,onboarding_incomplete:!1,community_moderator_ids:[],unreaded_messages:null}),s=o([]),r=o([]),l=o({}),c=o({general:{},advanced:{},social_media_links:[]}),d=o({}),u=o({}),m=o({}),p=o({key:"default",palette:{}}),f=o(!1),h=o(!1),g=o(""),v=o({isEnabled:!1,apiKey:null}),y=o("ru"),b=o([]),w=o([]),x=o({top:[],feed:[],after_post:[],sidebar:[]}),_=i(()=>n.value.check),k=i(()=>n.value.user);let C=null;return{ready:e,loading:t,auth:n,translations:l,settings:c,appearance:d,themes:u,themePermissions:m,currentTheme:p,cookieActive:f,isVotable:h,recaptchaSiteKey:g,tenor:v,currentLocale:y,sidebarCommunities:b,sidebarFooterMenu:w,advertisements:x,blockedUserIds:s,ignoredUserIds:r,isLoggedIn:_,currentUser:k,boot:async function(){if(!e.value)return C||(t.value=!0,C=(async()=>{try{const{data:t}=await a.get("/api/spa-config");n.value=t.auth,s.value=t.auth?.blocked_user_ids||[],r.value=t.auth?.ignored_user_ids||[],l.value=t.translations||{},c.value=t.settings,d.value=t.appearance,u.value=t.themes,m.value=t.theme_permissions,p.value=t.current_theme,f.value=t.cookie_active,h.value=t.isVotable,g.value=t.recaptcha_site_key,v.value=t.tenor,y.value=t.current_locale,b.value=t.sidebar_communities,w.value=t.sidebar_footer_menu,x.value=t.advertisements,e.value=!0}catch(o){console.error("Failed to boot app config:",o)}finally{t.value=!1}})(),C)},refreshAuth:function(){return a.get("/api/spa-config").then(({data:e})=>{n.value=e.auth,s.value=e.auth?.blocked_user_ids||[],r.value=e.auth?.ignored_user_ids||[]})}}});function Lt(e,t={}){try{const a=Mt();let n=a?.translations?.[e]||e;return Object.keys(t).forEach(e=>{n=n.replace(`:${e}`,t[e])}),n}catch(a){return e}}let Ot=null;function Rt(){if(null!==Ot)return Ot;try{const e=performance.getEntriesByType?.("navigation")?.[0];if(e)Ot="reload"===e.type||"back_forward"===e.type;else{const e=performance.navigation?.type;Ot=1===e||2===e}}catch(e){Ot=!1}return Ot}const zt=new Set(["/","/active","/top/:period","/featured","/news","/my","/communities","/communities/mine","/explore","/explore/users","/explore/communities","/search","/search/users","/search/communities","/u/:username","/u/:username/posts","/u/:username/posts/popular","/u/:username/posts/pinned","/u/:username/comments","/u/:username/comments/popular","/u/:username/followers","/u/:username/followings","/u/:username/wall","/u/:username/blocked","/drafts","/u/:username/settings","/u/:username/settings/account","/u/:username/settings/destroy","/u/:username/settings/password","/u/:username/settings/profile","/u/:username/settings/privacy","/u/:username/settings/preferences","/u/:username/settings/notifications","/u/:username/settings/blocks","/u/:username/settings/ignored-users","/u/:username/settings/ignored-tags","/u/:username/settings/ignored-communities","/u/:username/settings/badges","/u/:username/settings/tfa","/c/:slug","/c/:slug/top","/c/:slug/about","/c/:slug/settings","/tag/:tag","/story/:slug","/p/:page","/contact","/achievements","/projects","/projects/:slug","/projects/:slug/edit","/projects/rules","/ideas","/ideas/create","/ideas/:slug","/ideas/:slug/edit","/ideas/rules","/bookmarks","/bookmarks/comments","/cl/create","/cl/:id","/cl/:id/edit","/my-:year","/my-:year/not-eligible","/my-:year/not-ready","/messages","/messages/:id","/messages/:id/info","/story/create","/story/:slug/edit","/login/restore"]),It={"/messages":{payloadKey:"chats",revalidate:!0},"/messages/:id":{payloadKey:"chat",revalidate:!0},"/messages/:id/info":{payloadKey:"chat"},"/u/:username/settings/badges":{payloadKey:"badges"},"/u/:username/settings/blocks":{payloadKey:"blockedUsers"},"/u/:username/settings/ignored-users":{payloadKey:"ignoredUsers"},"/u/:username/settings/ignored-communities":{payloadKey:"ignoredCommunities"},"/u/:username/settings/ignored-tags":{payloadKey:"ignoredTags"},"/login/restore":{payloadKey:"signature"},"/projects/:slug/edit":{payloadKey:"project"},"/ideas/:slug/edit":{payloadKey:"idea"},"/cl/:id/edit":{payloadKey:"collection"}};function Tt(e){return["/login","/register","/forgot-password","/reset-password","/login/restore"].includes(e)?{guestOnly:!0}:"/my"===e||"/drafts"===e||e.startsWith("/bookmarks")||e.startsWith("/messages")||e.startsWith("/notifications")||e.startsWith("/profile/")||e.startsWith("/u/")&&e.includes("/settings")||e.startsWith("/story/create")||e.startsWith("/achievements")||e.startsWith("/collections")||e.startsWith("/cl/")&&(e.includes("/edit")||e.includes("/create"))||"/projects/create"===e||e.endsWith("/edit")&&e.startsWith("/projects/")||e.startsWith("/ideas")||"/c/create"===e?{requiresAuth:!0}:{}}function $t(e){return"/"===e||"/active"===e||e.startsWith("/top/")?"home":"/news"===e?"news":"/my"===e?"my":"/featured"===e?"featured":"/communities"===e?"communities":"/communities/mine"===e?"my-communities":"/explore"===e?"explore":/^\/tag\/[^/]+$/.test(e)?"tag-"+e.replace(/^\/tag\//,""):/^\/u\/[^/]+$/.test(e)?"user-"+e.replace(/^\/u\//,""):null}let Nt=!1;const Bt=r({history:c(),routes:[...function(){const e=Object.assign({
2"../Pages/Achievements/Index.vue":()=>l(()=>import("./Index-Dw5gArWk.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])),
2"../Pages/Auth/ConfirmPassword.vue":()=>l(()=>import("./ConfirmPassword-_GLkFAkq.js"),__vite__mapDeps([10,11,1,2,12,13,14,8,9])),
2"../Pages/Auth/ForgotPassword.vue":()=>l(()=>import("./ForgotPassword-BmlJasGO.js"),__vite__mapDeps([15,11,1,2,12,13,14,8,9])),
2"../Pages/Auth/Login.vue":()=>l(()=>import("./Login-IIN4vAqt.js"),__vite__mapDeps([16,11,1,2,17,18,5,14,8,9])),
2"../Pages/Auth/Register.vue":()=>l(()=>import("./Register-DvrtDIGE.js"),__vite__mapDeps([19,11,1,2,14,20,8,9])),
2"../Pages/Auth/ResetPassword.vue":()=>l(()=>import("./ResetPassword-CoPn6ZXQ.js"),__vite__mapDeps([21,11,1,2,8,9])),
2"../Pages/Auth/Restore.vue":()=>l(()=>import("./Restore-BiLvEM2C.js"),__vite__mapDeps([22,1,2,14,8,9])),
2"../Pages/Auth/TwoFactorAuth.vue":()=>l(()=>import("./TwoFactorAuth-X0nSgg2s.js"),__vite__mapDeps([23,11,1,2,12,13,8,9])),
2"../Pages/Auth/VerifyEmail.vue":()=>l(()=>import("./VerifyEmail-C6TfyzNx.js"),__vite__mapDeps([24,11,1,2,12,13,14,8,9])),
2"../Pages/Bookmark/Comments.vue":()=>l(()=>import("./Comments-RBtf5wqk.js"),__vite__mapDeps([25,26,27,1,2,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,7,8,9])),
2"../Pages/Bookmark/Stories.vue":()=>l(()=>import("./Stories-2qGjXsrq.js"),__vite__mapDeps([47,26,27,1,2,28,29,48,38,18,49,50,51,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,45,46,7,8,9])),
2"../Pages/Chat/Index.vue":()=>l(()=>import("./Index-t1qnIaYc.js"),__vite__mapDeps([69,28,29,1,2,31,43,65,70,64,38,71,53,72,8,9])),
2"../Pages/Chat/Info.vue":()=>l(()=>import("./Info-CPkZQkor.js"),__vite__mapDeps([73,1,2,71,35,64,31,8,9])),
2"../Pages/Chat/Show.vue":()=>l(()=>import("./Show-CF6Lk7aF.js"),__vite__mapDeps([74,31,1,2,32,75,29,76,77,78,79,72,43,40,41,42,8,80,9])),
2"../Pages/Collections/Create.vue":()=>l(()=>import("./Create-U-uTkK_o.js"),__vite__mapDeps([81,28,29,1,2,36,66,48,38,18,49,50,51,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,37,39,65,43,5,44,67,41,68,82,83,8,9])),
2"../Pages/Collections/Edit.vue":()=>l(()=>import("./Edit-BbXzZ_ov.js"),__vite__mapDeps([84,28,29,1,2,36,48,38,18,49,50,51,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,37,39,65,66,43,5,44,67,41,68,85,82,83,8,9])),
2"../Pages/Collections/Show.vue":()=>l(()=>import("./Show-cb8w-8uR.js"),__vite__mapDeps([86,87,1,2,48,38,18,49,50,51,28,29,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,88,89,46,8,9])),
2"../Pages/Community/About.vue":()=>l(()=>import("./About-CzDPTUjT.js"),__vite__mapDeps([90,91,92,31,1,2,66,59,60,35,38,93,61,8,9])),
2"../Pages/Community/Create.vue":()=>l(()=>import("./Create-DMDwP4YW.js"),__vite__mapDeps([94,36,1,2,8,9])),
2"../Pages/Community/Settings.vue":()=>l(()=>import("./Settings-D1EzEc-3.js"),__vite__mapDeps([95,36,1,2,8,9])),
2"../Pages/Community/Show.vue":()=>l(()=>import("./Show-KIeRn2R8.js"),__vite__mapDeps([96,26,27,1,2,28,29,48,38,18,49,50,51,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,91,92,93,8,9])),
2"../Pages/Community/Top.vue":()=>l(()=>import("./Top-CiDkbXB7.js"),__vite__mapDeps([97,26,27,1,2,28,29,48,38,18,49,50,51,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,91,92,93,8,9])),
2"../Pages/Contact.vue":()=>l(()=>import("./Contact-CiDPZQQl.js"),__vite__mapDeps([98,1,2,20,36,8,9])),
2"../Pages/Explore/Communities.vue":()=>l(()=>import("./Communities-Bey_00E3.js"),__vite__mapDeps([99,26,27,1,2,28,29,59,60,8,9])),
2"../Pages/Explore/Index.vue":()=>l(()=>import("./Index-CREB7Jny.js"),__vite__mapDeps([100,26,27,1,2,28,29,48,38,18,49,50,51,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,101,8,9])),
2"../Pages/Explore/Search.vue":()=>l(()=>import("./Search-CwyebXEV.js"),__vite__mapDeps([102,48,1,2,38,18,49,50,51,28,29,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,26,27,8,9])),
2"../Pages/Explore/TopCommunities.vue":()=>l(()=>import("./TopCommunities-DqmN_nYU.js"),__vite__mapDeps([103,26,27,1,2,28,29,59,60,8,9])),
2"../Pages/Explore/TopUsers.vue":()=>l(()=>import("./TopUsers-DsOTgF-x.js"),__vite__mapDeps([104,26,27,1,2,28,29,54,55,56,57,8,9])),
2"../Pages/Explore/Users.vue":()=>l(()=>import("./Users-CP1Q_n2J.js"),__vite__mapDeps([105,26,27,1,2,28,29,54,55,56,57,8,9])),
2"../Pages/Featured.vue":()=>l(()=>import("./Featured-CdYPO_Vc.js"),__vite__mapDeps([106,26,27,1,2,28,29,48,38,18,49,50,51,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,101,17,107,46,8,108,9])),
2"../Pages/Feeds/Communities/Index.vue":()=>l(()=>import("./Index-C9iFmm7W.js"),__vite__mapDeps([109,87,1,2,28,29,59,60,27,88,101,37,110,8,9])),
2"../Pages/Feeds/Communities/MyCommunities.vue":()=>l(()=>import("./MyCommunities-D3CXtUuz.js"),__vite__mapDeps([111,31,1,2,87,28,29,27,88,101,37,110,8,9])),
2"../Pages/Home.vue":()=>l(()=>import("./Home-DXqnNitm.js"),__vite__mapDeps([112,1,2,48,38,18,49,50,51,28,29,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,107,46,101,8,9])),
2"../Pages/Ideas/Create.vue":()=>l(()=>import("./Create-BllGRePz.js"),__vite__mapDeps([113,1,2,8,9])),
2"../Pages/Ideas/Edit.vue":()=>l(()=>import("./Edit-CfI0yeBD.js"),__vite__mapDeps([114,1,2,8,9])),
2"../Pages/Ideas/Index.vue":()=>l(()=>import("./Index-yFZgRhSB.js"),__vite__mapDeps([115,1,2,7,46,8,9])),
2"../Pages/Ideas/Rules.vue":()=>l(()=>import("./Rules-DInVhRYd.js"),__vite__mapDeps([116,1,2,8,9])),
2"../Pages/Ideas/Show.vue":()=>l(()=>import("./Show-B_bMexNN.js"),__vite__mapDeps([117,1,2,118,77,119,6,120,110,78,67,38,121,122,35,79,123,89,46,43,124,65,70,33,34,36,37,39,63,31,32,40,41,42,125,8,9])),
2"../Pages/MyFeed.vue":()=>l(()=>import("./MyFeed-DFgjyWws.js"),__vite__mapDeps([126,87,1,2,28,29,48,38,18,49,50,51,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,27,101,8,9])),
2"../Pages/News.vue":()=>l(()=>import("./News-dTf4z6X8.js"),__vite__mapDeps([127,1,2,48,38,18,49,50,51,28,29,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,101,107,46,26,27,8,9])),
2"../Pages/Notification/Index.vue":()=>l(()=>import("./Index-BwwWLsDx.js"),__vite__mapDeps([128,1,2,8,9])),
2"../Pages/Page.vue":()=>l(()=>import("./Page-Dr7fSA_w.js"),__vite__mapDeps([129,61,1,2,8,9])),
2"../Pages/Projects/Create.vue":()=>l(()=>import("./Create-1A8Vs5cc.js"),__vite__mapDeps([130,1,2,8,9])),
2"../Pages/Projects/Edit.vue":()=>l(()=>import("./Edit-IDFe2ZKR.js"),__vite__mapDeps([131,1,2,8,9])),
2"../Pages/Projects/Index.vue":()=>l(()=>import("./Index-DtwFJ59g.js"),__vite__mapDeps([132,1,2,8,9])),
2"../Pages/Projects/Rules.vue":()=>l(()=>import("./Rules--QPMX9Gi.js"),__vite__mapDeps([133,1,2,8,9])),
2"../Pages/Projects/Show.vue":()=>l(()=>import("./Show-B5Yd8ogs.js"),__vite__mapDeps([134,135,54,55,56,1,2,57,52,53,136,78,41,137,118,77,119,6,120,110,67,38,121,122,35,79,123,89,46,43,124,65,70,33,34,36,37,39,63,31,32,40,42,125,8,9])),
2"../Pages/Story/Edit.vue":()=>l(()=>import("./Edit-DCclxMVv.js"),__vite__mapDeps([138,139,1,2,36,63,6,66,49,50,51,28,29,52,53,54,55,56,57,58,59,60,61,62,119,44,18,140,8,78,141,9])),
2"../Pages/Story/Show.vue":()=>l(()=>import("./Show-CDx1p2LI.js"),__vite__mapDeps([142,1,2,48,38,18,49,50,51,28,29,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,78,135,136,137,118,77,119,6,120,110,121,122,79,123,89,46,124,70,33,40,42,125,8,143,9])),
2"../Pages/Tag/Show.vue":()=>l(()=>import("./Show-DVNBerA3.js"),__vite__mapDeps([144,87,1,2,28,29,48,38,18,49,50,51,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,27,145,101,8,9])),
2"../Pages/User/Blocked.vue":()=>l(()=>import("./Blocked-BR9sy_rR.js"),__vite__mapDeps([146,147,35,1,2,36,38,39,31,124,64,148,149,66,50,8,9])),
2"../Pages/User/Comments/Newest.vue":()=>l(()=>import("./Newest-aLWIU4de.js"),__vite__mapDeps([150,26,27,1,2,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,151,152,75,147,124,64,148,149,66,50,52,53,54,55,56,57,93,58,136,7,8,9])),
2"../Pages/User/Comments/Popular.vue":()=>l(()=>import("./Popular-BrYPaq4c.js"),__vite__mapDeps([153,26,27,1,2,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,151,152,75,147,124,64,148,149,66,50,52,53,54,55,56,57,93,58,136,7,8,9])),
2"../Pages/User/Deleted.vue":()=>l(()=>import("./Deleted-CxD5p1OD.js"),__vite__mapDeps([154,55,56,1,2,8,9])),
2"../Pages/User/Draft.vue":()=>l(()=>import("./Draft-B2G05ZVE.js"),__vite__mapDeps([155,26,27,1,2,28,29,48,38,18,49,50,51,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,156,7,76,8,9])),
2"../Pages/User/Followers.vue":()=>l(()=>import("./Followers-BB2Eg6Qa.js"),__vite__mapDeps([157,26,27,1,2,28,29,152,31,75,147,35,36,38,39,124,64,148,149,66,50,52,53,54,55,56,57,93,32,58,136,7,8,9])),
2"../Pages/User/Followings.vue":()=>l(()=>import("./Followings-DzjemOYV.js"),__vite__mapDeps([158,26,27,1,2,28,29,152,31,75,147,35,36,38,39,124,64,148,149,66,50,52,53,54,55,56,57,93,32,58,136,7,8,9])),
2"../Pages/User/Posts/Index.vue":()=>l(()=>import("./Index-BI-gy61j.js"),__vite__mapDeps([159,160,1,2,88,120,48,38,18,49,50,51,28,29,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,26,27,161,76,156,101,7,152,75,147,124,148,149,93,136,8,9])),
2"../Pages/User/Posts/Pinned.vue":()=>l(()=>import("./Pinned-B0Sd1rLL.js"),__vite__mapDeps([162,26,27,1,2,28,29,48,38,18,49,50,51,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,161,76,152,75,147,124,148,149,93,136,7,8,9])),
2"../Pages/User/Posts/Popular.vue":()=>l(()=>import("./Popular-DQMQhmtH.js"),__vite__mapDeps([163,26,27,1,2,28,29,48,38,18,49,50,51,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,161,76,152,75,147,124,148,149,93,136,7,8,9])),
2"../Pages/User/Settings/Account.vue":()=>l(()=>import("./Account-Cz7yrnY5.js"),__vite__mapDeps([164,165,1,2,166,8,9])),
2"../Pages/User/Settings/Badges.vue":()=>l(()=>import("./Badges-D87LmBGI.js"),__vite__mapDeps([167,1,2,165,166,168,8,9])),
2"../Pages/User/Settings/BlockedUsers.vue":()=>l(()=>import("./BlockedUsers-CmwszGms.js"),__vite__mapDeps([169,1,2,165,29,56,57,60,31,149,66,92,145,168,4,8,9])),
2"../Pages/User/Settings/BlockedUsersFull.vue":()=>l(()=>import("./BlockedUsersFull-Bld02tS7.js"),__vite__mapDeps([170,26,27,1,2,51,28,29,52,53,54,55,56,57,58,168,8,9])),
2"../Pages/User/Settings/Delete.vue":()=>l(()=>import("./Delete-B2r8LI-y.js"),__vite__mapDeps([171,31,1,2,165,166,8,9])),
2"../Pages/User/Settings/IgnoredCommunities.vue":()=>l(()=>import("./IgnoredCommunities-5kcdFRYL.js"),__vite__mapDeps([172,26,27,1,2,92,31,66,168,8,9])),
2"../Pages/User/Settings/IgnoredTags.vue":()=>l(()=>import("./IgnoredTags-BNl4CL8l.js"),__vite__mapDeps([173,26,27,1,2,145,31,66,168,8,9])),
2"../Pages/User/Settings/IgnoredUsers.vue":()=>l(()=>import("./IgnoredUsers-CUOV9osm.js"),__vite__mapDeps([174,26,27,1,2,149,31,66,168,8,9])),
2"../Pages/User/Settings/Index.vue":()=>l(()=>import("./Index-Cqu7d22m.js"),__vite__mapDeps([175,165,1,2,85,124,8,9])),
2"../Pages/User/Settings/Notifications.vue":()=>l(()=>import("./Notifications-BtkLG7Ps.js"),__vite__mapDeps([176,165,1,2,166,8,9])),
2"../Pages/User/Settings/Password.vue":()=>l(()=>import("./Password-CUw-ZkOB.js"),__vite__mapDeps([177,165,1,2,166,8,9])),
2"../Pages/User/Settings/Preference.vue":()=>l(()=>import("./Preference-BNMOm7O1.js"),__vite__mapDeps([178,165,1,2,166,8,9])),
2"../Pages/User/Settings/Privacy.vue":()=>l(()=>import("./Privacy-cbQRVAYn.js"),__vite__mapDeps([179,139,1,2,148,165,166,8,9])),
2"../Pages/User/Settings/Profile.vue":()=>l(()=>import("./Profile-DV2p7xAy.js"),__vite__mapDeps([180,36,1,2,165,166,8,9])),
2"../Pages/User/Settings/TwoFactorAuth.vue":()=>l(()=>import("./TwoFactorAuth-yGmeWmKV.js"),__vite__mapDeps([181,165,1,2,166,61,8,9])),
2"../Pages/User/Show.vue":()=>l(()=>import("./Show-CEmkQC9v.js"),__vite__mapDeps([182,160,1,2,88,120,48,38,18,49,50,51,28,29,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,26,27,161,76,156,101,7,152,75,147,124,148,149,93,136,146,8,9,154,183,122,79,123])),
2"../Pages/User/Wall.vue":()=>l(()=>import("./Wall-BrqevuQX.js"),__vite__mapDeps([184,152,1,2,31,75,147,35,36,38,39,124,64,148,149,66,50,52,53,54,55,56,57,93,32,58,136,183,122,79,123,26,27,28,29,8,9])),
2"../Pages/YearRecap/NotEligible.vue":()=>l(()=>import("./NotEligible-q1Z8uokI.js"),__vite__mapDeps([185,11,1,2,121,8,9])),
2"../Pages/YearRecap/NotReady.vue":()=>l(()=>import("./NotReady-CrFY0K1W.js"),__vite__mapDeps([186,11,1,2,8,9])),
2"../Pages/YearRecap/Show.vue":()=>l(()=>import("./Show-B19aWtS1.js"),__vite__mapDeps([187,26,27,1,2,7,11,12,3,18,8,9]))
2});return Object.entries(e).map(([e,t])=>{const a=function(e){const t=e.replace(/\/Index$/i,"/").replace(/\/index$/i,"/").split("/").filter(Boolean),a=t[t.length-1].toLowerCase(),n={show:e=>{const a=t[t.length-2]?.toLowerCase();return"story"===a?"/story/:slug":"user"===a||"users"===a?"/u/:username":"community"===a?"/c/:slug":"tag"===a?"/tag/:tag":"chat"===a?"/messages/:id":"collection"===a||"collections"===a?"/cl/:id":"project"===a||"projects"===a?"/projects/:slug":"idea"===a||"ideas"===a?"/ideas/:slug":"yearrecap"===a?"/my-:year":"page"===a?"/p/:page":null},edit:e=>{const a=t[t.length-2]?.toLowerCase();return"story"===a?"/story/:slug/edit":"project"===a||"projects"===a?"/projects/:slug/edit":"idea"===a||"ideas"===a?"/ideas/:slug/edit":"collection"===a||"collections"===a?"/cl/:id/edit":"community"===a?"/c/:slug/settings":null},create:e=>{const a=t[t.length-2]?.toLowerCase();return"community"===a?"/c/create":"collection"===a||"collections"===a?"/cl/create":"project"===a||"projects"===a?"/projects/create":"idea"===a||"ideas"===a?"/ideas/create":null},newset:e=>"user/comments"===e.toLowerCase().replace("newest","").replace(/\/$/,"")?"/u/:username/comments":null,newest:e=>"user/comments"===e.toLowerCase().replace("newest","").replace(/\/$/,"")?"/u/:username/comments":null,popular:e=>{const a=t.slice(0,-1).join("/").toLowerCase();return"user/comments"===a?"/u/:username/comments/popular":"user/posts"===a?"/u/:username/posts/popular":null},pinned:e=>"user/posts"===t.slice(0,-1).join("/").toLowerCase()?"/u/:username/posts/pinned":null,followers:()=>"/u/:username/followers",followings:()=>"/u/:username/followings",settings:e=>(t[t.length-2]?.toLowerCase(),{index:"/u/:username/settings",account:"/u/:username/settings/account",password:"/u/:username/settings/password",profile:"/u/:username/settings/profile",privacy:"/u/:username/settings/privacy",preference:"/u/:username/settings/preferences",notifications:"/u/:username/settings/notifications",delete:"/u/:username/settings/destroy",blockedusers:"/u/:username/settings/blocks",blockedusersfull:null,ignoredusers:"/u/:username/settings/ignored-users",ignoredtags:"/u/:username/settings/ignored-tags",ignoredcommunities:"/u/:username/settings/ignored-communities",badges:"/u/:username/settings/badges",twofactorauth:"/u/:username/settings/tfa"}[a]||null),about:()=>"/c/:slug/about",top:e=>{const a=t[t.length-2]?.toLowerCase();return"community"===a?"/c/:slug/top":null},restorer:()=>"/restore"};if(a in n){const e=n[a](t.join("/"));if(e)return e}const s=[...t].map((e,a)=>a===t.length-1?e.replace(/\.vue$/i,""):e).join("/").toLowerCase().replace(/^pages\//,"");return{"auth/login":"/login","auth/register":"/register","auth/forgotpassword":"/forgot-password","auth/resetpassword":"/reset-password","auth/confirmpassword":"/confirm-password","auth/twofactorauth":"/login/2fa","auth/verifyemail":"/verify-email","auth/restore":"/login/restore",home:"/",myfeed:"/my",news:"/news",featured:"/featured","explore/index":"/explore",explore:"/explore","explore/search":"/search","explore/communities":"/search/communities","explore/topcommunities":"/explore/communities","explore/topusers":"/explore/users","explore/users":"/search/users","feeds/communities/index":"/communities","feeds/communities":"/communities","feeds/communities/mycommunities":"/communities/mine",contact:"/contact","achievements/index":"/achievements",achievements:"/achievements","yearrecap/noteligible":"/my-:year/not-eligible","yearrecap/notready":"/my-:year/not-ready","notification/index":"/notifications",notification:"/notifications","bookmark/stories":"/bookmarks","bookmark/comments":"/bookmarks/comments","projects/index":"/projects",projects:"/projects","projects/rules":"/projects/rules","projects/create":"/projects/create","projects/show":"/projects/:slug","projects/edit":"/projects/:slug/edit","ideas/index":"/ideas",ideas:"/ideas","ideas/rules":"/ideas/rules","ideas/create":"/ideas/create","ideas/show":"/ideas/:slug","ideas/edit":"/ideas/:slug/edit","user/show":"/u/:username","user/wall":"/u/:username/wall","user/posts":"/u/:username/posts","user/draft":"/drafts","user/followers":"/u/:username/followers","user/followings":"/u/:username/followings","user/blocked":"/u/:username/blocked","user/deleted":"/u/:username/deleted","user/settings":"/u/:username/settings","user/settings/index":"/u/:username/settings","user/settings/account":"/u/:username/settings/account","user/settings/delete":"/u/:username/settings/destroy","user/settings/password":"/u/:username/settings/password","user/settings/profile":"/u/:username/settings/profile","user/settings/privacy":"/u/:username/settings/privacy","user/settings/preference":"/u/:username/settings/preferences","user/settings/notifications":"/u/:username/settings/notifications","user/settings/blockedusers":"/u/:username/settings/blocks","user/settings/blockedusersfull":"/u/:username/settings/blocks","user/settings/ignoredusers":"/u/:username/settings/ignored-users","user/settings/ignoredtags":"/u/:username/settings/ignored-tags","user/settings/ignoredcommunities":"/u/:username/settings/ignored-communities","user/settings/badges":"/u/:username/settings/badges","user/settings/twofactorauth":"/u/:username/settings/tfa","chat/index":"/messages",chat:"/messages","chat/show":"/messages/:id","chat/info":"/messages/:id/info","collections/create":"/cl/create","collections/show":"/cl/:id","collections/edit":"/cl/:id/edit","story/show":"/story/:slug","story/edit":"/story/:slug/edit","community/show":"/c/:slug","community/create":"/c/create","community/settings":"/c/:slug/settings","community/about":"/c/:slug/about","community/top":"/c/:slug/top","tag/show":"/tag/:tag",page:"/p/:page"}[s]||"/"+s}(e.replace("../Pages/","").replace(/\.vue$/i,""));return a?{path:a,component:()=>t().then(e=>e.default||e),meta:{layout:"AppLayout",fetchData:zt.has(a),...It[a
2],...Tt(a)}}:null}).filter(Boolean)}(),{path:"/active",component:()=>l(()=>import("./Home-DXqnNitm.js"),__vite__mapDeps([112,1,2,48,38,18,49,50,51,28,29,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,107,46,101,8,9])),meta:{layout:"AppLayout",fetchData:!0}},{path:"/story/create",component:()=>l(()=>import("./Edit-DCclxMVv.js"),__vite__mapDeps([138,139,1,2,36,63,6,66,49,50,51,28,29,52,53,54,55,56,57,58,59,60,61,62,119,44,18,140,8,78,141,9])),meta:{layout:"AppLayout",fetchData:!0,requiresAuth:!0}},{path:"/top/:period",component:()=>l(()=>import("./Home-DXqnNitm.js"),__vite__mapDeps([112,1,2,48,38,18,49,50,51,28,29,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,107,46,101,8,9])),meta:{layout:"AppLayout",fetchData:!0}},{path:"/:pathMatch(.*)*",redirect:e=>{const t=e.path||"/";return/(https?:\/\/)/.test(t)&&"/"+t.replace(/^\/+/,"").replace(/(https?:\/\/[^/]+)\/?/g,"").replace(/^\/+/,"")||"/"}}],scrollBehavior(e,t,a){if(a)return a;const n=$t(e.path);if(n&&Rt())try{const e=JSON.parse(localStorage.getItem(`feed_scroll_${n}`)||"{}");if(e.scrollY&&Date.now()-e.timestamp<3e5)return{top:e.scrollY}}catch(s){}return e.hash&&/^\#[0-9]{2}$/.test(e.hash)?{el:e.hash,behavior:"smooth",top:-80}:(!e.hash||!/^#comment-\d+$/.test(e.hash))&&{top:0}}});Bt.beforeEach(async e=>{const t=Mt();return t.ready||await t.boot(),e.meta.requiresAuth&&!t.auth?.check?{path:"/login",query:{redirect:e.fullPath}}:e.meta.guestOnly&&t.auth?.check?{path:"/",replace:!0}:void 0});const Dt=d("inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",disabled:"bg-secondary text-secondary-foreground cursor-not-allowed"},size:{default:"h-9 px-4 py-2",xs:"h-7 px-2",sm:"h-8 px-3 text-xs",lg:"h-10 px-8",icon:"h-9 w-9",badge:"h-7 px-2 text-sm"},radius:{default:"rounded-lg",sm:"rounded-md",xl:"rounded-xl",xxl:"rounded-3xl"}},defaultVariants:{variant:"default",size:"default",radius:"default"}});function Vt(...e){return u(m(e))}function Ut(e){return e?String(e).replace(/\r\n?/g,"\n").replace(/\n/g,"<br>").replace(/<br\s*\/?>(?:\s|&nbsp;)+(?=<br\s*\/?>)/gi,"<br>").replace(/(?:<br\s*\/?>\s*){3,}/gi,"<br><br>"):""}const Ft=p({__name:"Button",props:{variant:{},size:{},radius:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(e,a)=>(f(),h(b(w),{as:e.as,"as-child":e.asChild,class:y(b(Vt)(b(Dt)({variant:e.variant,size:e.size,radius:e.radius}),t.class))},{default:g(()=>[v(e.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),qt={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Ht=x({name:"mdi-close",render:function(e,t){return f(),_("svg",qt,[...t[0]||(t[0]=[k("path",{fill:"currentColor",d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"},null,-1)])])}}),Wt={key:0,class:"flex w-full px-2 fixed max-w-[500px] left-1/2 -translate-x-1/2 z-40 bottom-20 min-h-[50px]"},Zt={class:"relative w-full md:max-w-lg bg-background dark:bg-background/80 backdrop-blur-lg rounded-xl shadow-2xl border border-border h-full p-4"},Gt={class:"p-2 text-base md:text-lg text-medium max-w-96 mx-auto text-center"},Kt={class:"flex items-center justify-center mt-2"},Qt={__name:"CookieConsent",setup(e){const t=o(!1);C(()=>{"undefined"!=typeof window&&(localStorage.getItem("cookie-consent")?t.value=!1:"pending"==localStorage.getItem("cookie-consent")?setTimeout(()=>{t.value=!0},6e4):t.value=!0)});const a=()=>{t.value=!1,"undefined"!=typeof window&&localStorage.setItem("cookie-consent","all")},n=()=>{t.value=!1,"undefined"!=typeof window&&localStorage.setItem("cookie-consent","pending")};
2return(e,s)=>{const o=Ft;return t.value?(f(),_("div",Wt,[k("div",Zt,[k("button",{onClick:n,class:"absolute w-8 h-8 top-2 right-2 flex items-center justify-center text-endpoint hover:text-foreground"},[j(b(Ht),{class:"cursor-pointer h-6 w-6 shrink-0"})]),k("div",Gt,E(("__"in e?e.__:b(Lt))("Your experience on this website will be improved by allowing cookies. By accepting all cookies, you agree to our use of cookies to deliver and maintain our services and website.")),1),k("div",Kt,[j(o,{onClick:a,class:"w-full",size:"lg"},{default:g(()=>[S(E(("__"in e?e.__:b(Lt))("Accept")),1)]),_:1})])])])):A("",!0)}}},Jt="notifications_state",Yt="undefined"!=typeof window,Xt=o([]),ea=o(0),ta=o(0),aa=o(null),na=o(!1);P([Xt,ea,ta,aa,na],([e,t,a,n,s])=>{(e=>{if(Yt)try{localStorage.setItem(Jt,JSON.stringify(e))}catch(t){console.error("Failed to save notifications state:",t)}})({notifications:e,unreadedNotifications:t,newNotificationsCount:a,lastSync:n,echoConnected:s})},{deep:!0});let sa=null,oa=null,ia=0;const ra=async()=>{if("undefined"==typeof window)return;if(document.hidden)return;if(oa)return oa;const e=Date.now();if(!(e<ia)){try{if(!Mt().isLoggedIn)return}catch(t){return}return ia=e+1e4,oa=a.get(route("notifications.status")).then(e=>{e.data&&("number"==typeof e.data.unreaded&&(ea.value=e.data.unreaded),"number"==typeof e.data.new_count&&(ta.value=e.data.new_count),"number"==typeof e.data.messages_unread&&sa&&sa(e.data.messages_unread)),aa.value=Date.now()}).catch(e=>{ia=Date.now()+6e4,console.error("Failed to sync counters:",e)}).finally(()=>{oa=null}),oa}},la=async()=>{if("undefined"!=typeof window)try{await a.post(route("notifications.viewed")),ta.value=0,aa.value=Date.now(),Yt&&localStorage.setItem("notifications_dot_reset",Date.now().toString())}catch(e){console.error("Failed to reset new notifications:",e)}},ca=async()=>{await ra()};let da=null;const ua=()=>{"undefined"==typeof window||da||(da=setInterval(()=>{ra()},/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?3e4:3e5))};"undefined"!=typeof window&&window.addEventListener("storage",e=>{if("notifications_dot_reset"===e.key&&(ta.value=0),"notifications_dot_count"===e.key){const t=parseInt(e.newValue,10);isNaN(t)||(ta.value=t)}});let ma=null;const pa=o([]),fa=o({next:null,prev:null}),ha=o(!1);async function ga(){ha.value=!0;try{const e=await a.get(route("notifications.index"));if(pa.value=e.data.data||e.data,fa.value=e.data.links||{next:null,prev:null},Array.isArray(pa.value)){const e=pa.value.filter(e=>!e.read_at).length;ea.value=e}}catch(e){console.error("Failed to fetch notifications:",e)}finally{ha.value=!1}}async function va(){if(fa.value.next&&!ha.value){ha.value=!0;try{const e=await a.get(fa.value.next);Array.isArray(e.data.data)&&(pa.value.push(...e.data.data),fa.value=e.data.links||{next:null,prev:null})}catch(e){console.error("Failed to fetch more notifications:",e)}finally{ha.value=!1}}}function ya(){pa.value=[],fa.value={next:null,prev:null}}const ba=()=>{try{const t=Mt();if(!window.Echo||!t.auth?.user?.id)return;try{ma&&(window.Echo.leave(`private-App.Models.User.${t.auth.user.id}`),ma=null),ma=window.Echo.private(`App.Models.User.${t.auth.user.id}`).notification(e=>{(e=>{e.type&&e.type.includes("MessageCreatedNotification")||Xt.value.some(t=>t.id===e.id)||(Xt.value.unshift(e),ka(),ta.value++)})(e)}).listen(".echo.connected",()=>{na.value=!0}).listen(".echo.disconnected",()=>{na.value=!1})}catch(e){na.value=!1}}catch(e){console.warn("useAppStore() not available in setupEcho",e)}};function wa(e){na.value=e}function xa(){return!aa.value||Date.now()-aa.value>3e5}function _a(e){ea.value=e,aa.value=Date.now()}function ka(){ea.value++,xa()&&ra()}function Ca(){ea.value>0&&(ea.value--,xa()&&ra())}function ja(){(()=>{try{const e=Mt();ma&&e?.props?.auth?.user?.id&&(window.Echo.leave(`private-App.Models.User.${e.props.auth.user.id}`),ma=null)}catch(e){console.warn("useAppStore() not available in cleanupEcho",e),ma&&(ma=null)}})()}function Ea(){return{notifications:Xt,unreadedNotifications:ea,newNotificationsCount:ta,lastSync:aa,echoConnected:na,setUnreaded:_a,incrementUnreaded:ka,decrementUnreaded:Ca,setEchoState:wa,syncAllCounters:ra,shouldSync:xa,cleanup:ja,setupEcho:ba,notificationsList:pa,notificationsLinks:fa,isNotificationsLoading:ha,fetchNotifications:ga,fetchMoreNotifications:va,resetNotifications:ya,pollNewNotificationsCount:ca,resetNewNotifications:la,initializeFromStorage:Sa,initPolling:ua}}"undefined"!=typeof window&&window.addEventListener("focus",()=>{"visible"===document.visibilityState&&ra()});const Sa=()=>
2{if("undefined"!=typeof window){const e=(()=>{if(!Yt)return null;try{const e=localStorage.getItem(Jt);return e?JSON.parse(e):null}catch(e){return console.error("Failed to load notifications state:",e),null}})();e&&(Xt.value=e.notifications||[],ea.value=e.unreadedNotifications||0,ta.value=e.newNotificationsCount||0,aa.value=e.lastSync||null,na.value=e.echoConnected||!1)}};let Aa=null,Pa=!1;function Ma(){null===Aa&&(Aa=o(0));const e=Aa;return Pa||(Pa=!0,sa=t=>{e.value=t}),{unreadedMessagesCount:e,setUnreadedMessagesCount:function(t){e.value=t},incrementUnreadedMessages:function(){e.value++},decrementUnreadedMessages:function(){e.value>0&&e.value--},resetUnreadedMessages:function(){e.value=0}}}const La={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Oa=x({name:"solar-home-2-linear",render:function(e,t){return f(),_("svg",La,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("path",{d:"M2 12.204c0-2.289 0-3.433.52-4.381c.518-.949 1.467-1.537 3.364-2.715l2-1.241C9.889 2.622 10.892 2 12 2s2.11.622 4.116 1.867l2 1.241c1.897 1.178 2.846 1.766 3.365 2.715S22 9.915 22 12.203v1.522c0 3.9 0 5.851-1.172 7.063S17.771 22 14 22h-4c-3.771 0-5.657 0-6.828-1.212S2 17.626 2 13.725z"}),k("path",{"stroke-linecap":"round",d:"M12 15v3"})],-1)])])}}),Ra={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},za=x({name:"solar-bell-linear",render:function(e,t){return f(),_("svg",Ra,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("path",{d:"M18.75 9.71v-.705C18.75 5.136 15.726 2 12 2S5.25 5.136 5.25 9.005v.705a4.4 4.4 0 0 1-.692 2.375L3.45 13.81c-1.011 1.575-.239 3.716 1.52 4.214a25.8 25.8 0 0 0 14.06 0c1.759-.498 2.531-2.639 1.52-4.213l-1.108-1.725a4.4 4.4 0 0 1-.693-2.375Z"}),k("path",{"stroke-linecap":"round",d:"M7.5 19c.655 1.748 2.422 3 4.5 3s3.845-1.252 4.5-3"})],-1)])])}}),Ia={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"},Ta=x({name:"ph-magnifying-glass",render:function(e,t){return f(),_("svg",Ia,[...t[0]||(t[0]=[k("path",{fill:"currentColor",d:"m229.66 218.34l-50.07-50.06a88.11 88.11 0 1 0-11.31 11.31l50.06 50.07a8 8 0 0 0 11.32-11.32M40 112a72 72 0 1 1 72 72a72.08 72.08 0 0 1-72-72"},null,-1)])])}}),$a={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Na=x({name:"solar-chat-line-linear",render:function(e,t){return f(),_("svg",$a,[...t[0]||(t[0]=[k("g",{fill:"none"},[k("path",{fill:"currentColor",d:"m13.087 21.388l.645.382zm.542-.916l-.646-.382zm-3.258 0l-.645.382zm.542.916l.646-.382zm-8.532-5.475l.693-.287zm5.409 3.078l-.013.75zm-2.703-.372l-.287.693zm16.532-2.706l.693.287zm-5.409 3.078l-.012-.75zm2.703-.372l.287.693zm.7-15.882l-.392.64zm1.65 1.65l.64-.391zM4.388 2.738l-.392-.64zm-1.651 1.65l-.64-.391zM9.403 19.21l.377-.649zm4.33 2.56l.541-.916l-1.29-.764l-.543.916zm-4.007-.916l.542.916l1.29-.764l-.541-.916zm2.715.152a.52.52 0 0 1-.882 0l-1.291.764c.773 1.307 2.69 1.307 3.464 0zM10.5 2.75h3v-1.5h-3zm10.75 7.75v1h1.5v-1zm-18.5 1v-1h-1.5v1zm-1.5 0c0 1.155 0 2.058.05 2.787c.05.735.153 1.347.388 1.913l1.386-.574c-.147-.352-.233-.782-.278-1.441c-.046-.666-.046-1.51-.046-2.685zm6.553 6.742c-1.256-.022-1.914-.102-2.43-.316L4.8 19.313c.805.334 1.721.408 2.977.43zM1.688 16.2A5.75 5.75 0 0 0 4.8 19.312l.574-1.386a4.25 4.25 0 0 1-2.3-2.3zm19.562-4.7c0 1.175 0 2.019-.046 2.685c-.045.659-.131 1.089-.277 1.441l1.385.574c.235-.566.338-1.178.389-1.913c.05-.729.049-1.632.049-2.787zm-5.027 8.241c1.256-.021 2.172-.095 2.977-.429l-.574-1.386c-.515.214-1.173.294-2.428.316zm4.704-4.115a4.25 4.25 0 0 1-2.3 2.3l.573 1.386a5.75 5.75 0 0 0 3.112-3.112zM13.5 2.75c1.651 0 2.837 0 3.762.089c.914.087 1.495.253 1.959.537l.783-1.279c-.739-.452-1.577-.654-2.6-.752c-1.012-.096-2.282-.095-3.904-.095zm9.25 7.75c0-1.622 0-2.891-.096-3.904c-.097-1.023-.299-1.862-.751-2.6l-1.28.783c.285.464.451 1.045.538 1.96c.088.924.089 2.11.089 3.761zm-3.53-7.124a4.25 4.25 0 0 1 1.404 1.403l1.279-.783a5.75 5.75 0 0 0-1.899-1.899zM10.5 1.25c-1.622 0-2.891 0-3.904.095c-1.023.098-1.862.3-2.6.752l.783 1.28c.464-.285 1.045-.451 1.96-.538c.924-.088 2.11-.089 3.761-.089zM2.75 10.5c0-1.651 0-2.837.089-3.762c.087-.914.253-1.495.537-1.959l-1.279-.783c-.452.738-.654 1.577-.752 2.6C1.25 7.61 1.25 8.878 1.25 10.5zm1.246-8.403a5.75 5.75 0 0 0-1.899 1.899l1.28.783a4.25 4.25 0 0 1 1.402-1.403zm7.02 17.993c-.202-.343-.38-.646-.554-.884a2.2 2.2 0 0 0-.682-.645l-.754 1.297c.047.028.112.078.224.232c.121.166.258.396.476.764zm-3.24-.349c.44.008.718.014.93.037c.198.022.275.054.32.08l.754-1.297a2.2 2.2 0 0 0-.909-.274c-.298-.033-.657-.038-1.069-.045zm6.498 1.113c.218-.367.355-.598.476-.764c.112-.154.177-.204.224-.232l-.754-1.297c-.29.17-.5.395-.682.645c-.173.238-.352.54-.555.884zm1.924-2.612c-.412.007-.771.012-1.069.045c-.311.035-.616.104-.909.274l.754 1.297c.045-.026.122-.058.32-.08c.212-.023.49-.03.93-.037z"}),k("path",{stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",d:"M8 9h8m-8 3.5h5.5"})],-1)])])}}),Ba={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Da=x({name:"hugeicons-logout-01",render:function(e,t){return f(),_("svg",Ba,[...t[0]||(t[0]=[k("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M15.5 8.04c-.041-1.16-.178-1.885-.636-2.453c-.653-.812-1.77-1.066-4.004-1.576l-1-.228c-3.395-.774-5.092-1.161-6.226-.27C2.5 4.405 2.5 6.126 2.5 9.568v4.864c0 3.442 0 5.164 1.134 6.055s2.83.504 6.225-.27l1.002-.228c2.233-.51 3.35-.764 4.003-1.576c.458-.567.595-1.293.636-2.453m3-6.948s3 2.21 3 3s-3 3-3 3m2.5-3H8.5"},null,-1)])])}}),Va={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"},Ua=x({name:"ph-gear",render:function(e,t){return f(),_("svg",Va,[...t[0]||(t[0]=[k("path",{fill:"currentColor",d:"M128 80a48 48 0 1 0 48 48a48.05 48.05 0 0 0-48-48m0 80a32 32 0 1 1 32-32a32 32 0 0 1-32 32m88-29.84q.06-2.16 0-4.32l14.92-18.64a8 8 0 0 0 1.48-7.06a107.2 107.2 0 0 0-10.88-26.25a8 8 0 0 0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186 40.54a8 8 0 0 0-3.94-6a107.7 107.7 0 0 0-26.25-10.87a8 8 0 0 0-7.06 1.49L130.16 40h-4.32L107.2 25.11a8 8 0 0 0-7.06-1.48a107.6 107.6 0 0 0-26.25 10.88a8 8 0 0 0-3.93 6l-2.64 23.76q-1.56 1.49-3 3L40.54 70a8 8 0 0 0-6 3.94a107.7 107.7 0 0 0-10.87 26.25a8 8 0 0 0 1.49 7.06L40 125.84v4.32L25.11 148.8a8 8 0 0 0-1.48 7.06a107.2 107.2 0 0 0 10.88 26.25a8 8 0 0 0 6 3.93l23.72 2.64q1.49 1.56 3 3L70 215.46a8 8 0 0 0 3.94 6a107.7 107.7 0 0 0 26.25 10.87a8 8 0 0 0 7.06-1.49L125.84 216q2.16.06 4.32 0l18.64 14.92a8 8 0 0 0 7.06 1.48a107.2 107.2 0 0 0 26.25-10.88a8 8 0 0 0 3.93-6l2.64-23.72q1.56-1.48 3-3l23.78-2.8a8 8 0 0 0 6-3.94a107.7 107.7 0 0 0 10.87-26.25a8 8 0 0 0-1.49-7.06Zm-16.1-6.5a74 74 0 0 1 0 8.68a8 8 0 0 0 1.74 5.48l14.19 17.73a91.6 91.6 0 0 1-6.23 15l-22.6 2.56a8 8 0 0 0-5.1 2.64a74 74 0 0 1-6.14 6.14a8 8 0 0 0-2.64 5.1l-2.51 22.58a91.3 91.3 0 0 1-15 6.23l-17.74-14.19a8 8 0 0 0-5-1.75h-.48a74 74 0 0 1-8.68 0a8 8 0 0 0-5.48 1.74l-17.78 14.2a91.6 91.6 0 0 1-15-6.23L82.89 187a8 8 0 0 0-2.64-5.1a74 74 0 0 1-6.14-6.14a8 8 0 0 0-5.1-2.64l-22.58-2.52a91.3 91.3 0 0 1-6.23-15l14.19-17.74a8 8 0 0 0 1.74-5.48a74 74 0 0 1 0-8.68a8 8 0 0 0-1.74-5.48L40.2 100.45a91.6 91.6 0 0 1 6.23-15L69 82.89a8 8 0 0 0 5.1-2.64a74 74 0 0 1 6.14-6.14A8 8 0 0 0 82.89 69l2.51-22.57a91.3 91.3 0 0 1 15-6.23l17.74 14.19a8 8 0 0 0 5.48 1.74a74 74 0 0 1 8.68 0a8 8 0 0 0 5.48-1.74l17.77-14.19a91.6 91.6 0 0 1 15 6.23L173.11 69a8 8 0 0 0 2.64 5.1a74 74 0 0 1 6.14 6.14a8 8 0 0 0 5.1 2.64l22.58 2.51a91.3 91.3 0 0 1 6.23 15l-14.19 17.74a8 8 0 0 0-1.74 5.53Z"},null,-1)])])}}),Fa={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},qa=x({name:"solar-moon-stars-linear",render:function(e,t){return f(),_("svg",Fa,[...t[0]||(t[0]=[k("g",{fill:"none"},[k("path",{stroke:"currentColor",d:"M19.9 2.307a.483.483 0 0 0-.9 0l-.43 1.095a.48.48 0 0 1-.272.274l-1.091.432a.486.486 0 0 0 0 .903l1.091.432a.48.48 0 0 1 .272.273L19 6.81c.162.41.74.41.9 0l.43-1.095a.48.48 0 0 1 .273-.273l1.091-.432a.486.486 0 0 0 0-.903l-1.091-.432a.48.48 0 0 1-.273-.274zM16.033 8.13a.483.483 0 0 0-.9 0l-.157.399a.48.48 0 0 1-.272.273l-.398.158a.486.486 0 0 0 0 .903l.398.157c.125.05.223.148.272.274l.157.399c.161.41.739.41.9 0l.157-.4a.48.48 0 0 1 .272-.273l.398-.157a.486.486 0 0 0 0-.903l-.398-.158a.48.48 0 0 1-.272-.273z"}),k("path",{fill:"currentColor",d:"m21.067 11.857l-.642-.388zm-8.924-8.924l-.388-.642zM21.25 12A9.25 9.25 0 0 1 12 21.25v1.5c5.937 0 10.75-4.813 10.75-10.75zM12 21.25A9.25 9.25 0 0 1 2.75 12h-1.5c0 5.937 4.813 10.75 10.75 10.75zM2.75 12A9.25 9.25 0 0 1 12 2.75v-1.5C6.063 1.25 1.25 6.063 1.25 12zm12.75 2.25A5.75 5.75 0 0 1 9.75 8.5h-1.5a7.25 7.25 0 0 0 7.25 7.25zm4.925-2.781A5.75 5.75 0 0 1 15.5 14.25v1.5a7.25 7.25 0 0 0 6.21-3.505zM9.75 8.5a5.75 5.75 0 0 1 2.781-4.925l-.776-1.284A7.25 7.25 0 0 0 8.25 8.5zM12 2.75a.38.38 0 0 1-.268-.118a.3.3 0 0 1-.082-.155c-.004-.031-.002-.121.105-.186l.776 1.284c.503-.304.665-.861.606-1.299c-.062-.45
25-.42-1.026-1.137-1.026zm9.71 9.495c-.066.107-.156.109-.187.105a.3.3 0 0 1-.155-.082a.38.38 0 0 1-.118-.268h1.5c0-.717-.571-1.075-1.026-1.137c-.438-.059-.995.103-1.299.606z"})],-1)])])}}),Ha={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Wa=x({name:"solar-user-circle-linear",render:function(e,t){return f(),_("svg",Ha,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("circle",{cx:"12",cy:"9",r:"3"}),k("circle",{cx:"12",cy:"12",r:"10"}),k("path",{"stroke-linecap":"round",d:"M17.97 20c-.16-2.892-1.045-5-5.97-5s-5.81 2.108-5.97 5"})],-1)])])}}),Za={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Ga=x({name:"solar-shield-user-linear",render:function(e,t){return f(),_("svg",Za,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("path",{d:"M3 10.417c0-3.198 0-4.797.378-5.335c.377-.537 1.88-1.052 4.887-2.081l.573-.196C10.405 2.268 11.188 2 12 2s1.595.268 3.162.805l.573.196c3.007 1.029 4.51 1.544 4.887 2.081C21 5.62 21 7.22 21 10.417v1.574c0 5.638-4.239 8.375-6.899 9.536C13.38 21.842 13.02 22 12 22s-1.38-.158-2.101-.473C7.239 20.365 3 17.63 3 11.991z"}),k("circle",{cx:"12",cy:"9",r:"2"}),k("path",{d:"M16 15c0 1.105 0 2-4 2s-4-.895-4-2s1.79-2 4-2s4 .895 4 2Z"})],-1)])])}}),Ka={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Qa=x({name:"solar-users-group-rounded-linear",render:function(e,t){return f(),_("svg",Ka,[...t[0]||(t[0]=[M('<g fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="9" cy="6" r="4"></circle><path stroke-linecap="round" d="M15 9a3 3 0 1 0 0-6"></path><ellipse cx="9" cy="17" rx="7" ry="4"></ellipse><path stroke-linecap="round" d="M18 14c1.754.385 3 1.359 3 2.5c0 1.03-1.014 1.923-2.5 2.37"></path></g>',1)])])}}),Ja={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Ya=x({name:"solar-cup-star-linear",render:function(e,t){return f(),_("svg",Ja,[...t[0]||(t[0]=[M('<g fill="none" stroke="currentColor" stroke-width="1.5"><path d="M12 16c-5.76 0-6.78-5.74-6.96-10.294c-.051-1.266-.076-1.9.4-2.485c.475-.586 1.044-.682 2.183-.874A26.4 26.4 0 0 1 12 2c1.784 0 3.253.157 4.377.347c1.139.192 1.708.288 2.184.874s.45 1.219.4 2.485C18.781 10.26 17.761 16 12.001 16Z"></path><path stroke-linecap="round" d="M12 16v3"></path><path stroke-linecap="round" stroke-linejoin="round" d="M15.5 22h-7l.34-1.696a1 1 0 0 1 .98-.804h4.36a1 1 0 0 1 .98.804z"></path><path d="m19 5l.949.316c.99.33 1.485.495 1.768.888S22 7.12 22 8.162v.073c0 .86 0 1.291-.207 1.643s-.584.561-1.336.98L17.5 12.5M5 5l-.949.316c-.99.33-1.485.495-1.768.888S2 7.12 2 8.162v.073c0 .86 0 1.291.207 1.643s.584.561 1.336.98L6.5 12.5m4.646-6.477C11.526 5.34 11.716 5 12 5s.474.34.854 1.023l.098.176c.108.194.162.29.246.354c.085.064.19.088.4.135l.19.044c.738.167 1.107.25 1.195.532s-.164.577-.667 1.165l-.13.152c-.143.167-.215.25-.247.354s-.021.215 0 .438l.02.203c.076.785.114 1.178-.115 1.352c-.23.174-.576.015-1.267-.303l-.178-.082c-.197-.09-.295-.135-.399-.135s-.202.045-.399.135l-.178.082c-.691.319-1.037.477-1.267.303s-.191-.567-.115-1.352l.02-.203c.021-.223.032-.334 0-.438s-.104-.187-.247-.354l-.13-.152c-.503-.588-.755-.882-.667-1.165c.088-.282.457-.365 1.195-.532l.19-.044c.21-.047.315-.07.4-.135c.084-.064.138-.16.246-.354z"></path><path stroke-linecap="round" d="M18 22H6"></path></g>',1)])])}}),Xa={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},en=x({name:"solar-lightbulb-linear",render:function(e,t){return f(),_("svg",Xa,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("path",{d:"M14.5 19.5h-5m5 0c0-.713 0-1.07.038-1.307c.123-.763.144-.812.631-1.412c.151-.186.711-.688 1.832-1.692A7.5 7.5 0 1 0 7 15.09c1.12 1.004 1.68 1.505 1.832 1.692c.487.6.508.649.63 1.412c.039.237.039.593.039 1.307m5 0c0 .935 0 1.402-.201 1.75a1.5 1.5 0 0 1-.549.549c-.349.2-.816.2-1.751.2s-1.402 0-1.75-.201a1.5 1.5 0 0 1-.549-.549c-.201-.348-.201-.815-.201-1.75"}),k("path",{"stroke-linecap":"round",d:"M12 17v-2m1.732-1a2 2 0 0 1-3.464 0"})],-1)])])}}),tn={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},an=x({name:"solar-pen-new-square-linear",render:function(e,t){return f(),_("svg",tn,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("path",{"stroke-linecap":"round",d:"M22 10.5V12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12s0-7.071 1.464-8.536C4.93 2 7.286 2 12 2h1.5"}),k("path",{d:"m16.652 3.455l.649-.649A2.753 2.753 0 0 1 21.194 6.7l-.65.649m-3.892-3.893s.081 1.379 1.298 2.595c1.216 1.217 2.595 1.298 2.595 1.298m-3.893-3.893L10.687 9.42c-.404.404-.606.606-.78.829q-.308.395-.524.848c-.121.255-.211.526-.392 1.068L8.412 13.9m12.133-6.552l-5.9
265 5.965c-.404.404-.606.606-.829.78a4.6 4.6 0 0 1-.848.524c-.255.121-.526.211-1.068.392l-1.735.579m0 0l-1.123.374a.742.742 0 0 1-.939-.94l.374-1.122m1.688 1.688L8.412 13.9"})],-1)])])}}),nn={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},sn=x({name:"solar-bookmark-linear",render:function(e,t){return f(),_("svg",nn,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("path",{d:"M21 16.09v-4.992c0-4.29 0-6.433-1.318-7.766C18.364 2 16.242 2 12 2S5.636 2 4.318 3.332S3 6.81 3 11.098v4.993c0 3.096 0 4.645.734 5.321c.35.323.792.526 1.263.58c.987.113 2.14-.907 4.445-2.946c1.02-.901 1.529-1.352 2.118-1.47c.29-.06.59-.06.88 0c.59.118 1.099.569 2.118 1.47c2.305 2.039 3.458 3.059 4.445 2.945c.47-.053.913-.256 1.263-.579c.734-.676.734-2.224.734-5.321Z"}),k("path",{"stroke-linecap":"round",d:"M15 6H9"})],-1)])])}}),on={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},rn=x({name:"solar-stars-minimalistic-linear",render:function(e,t){return f(),_("svg",on,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor"},[k("path",{"stroke-width":"1.5",d:"M10.08 7.897C11.157 5.966 11.695 5 12.5 5s1.343.966 2.42 2.897l.278.5c.306.549.46.823.698 1.004s.535.248 1.13.383l.54.122c2.091.473 3.137.71 3.385 1.51c.249.8-.464 1.633-1.89 3.3l-.368.43c-.405.474-.607.711-.699 1.004c-.09.293-.06.609.001 1.24l.056.576c.216 2.224.323 3.336-.328 3.83s-1.63.044-3.587-.857l-.507-.234c-.556-.256-.834-.384-1.129-.384s-.573.128-1.13.384l-.506.234c-1.957.9-2.936 1.352-3.587.857c-.651-.494-.543-1.606-.328-3.83l.056-.575c.061-.632.092-.948 0-1.24c-.09-.294-.293-.53-.698-1.004l-.369-.432c-1.425-1.666-2.138-2.5-1.89-3.3c.25-.8 1.295-1.036 3.386-1.509l.54-.122c.595-.135.892-.202 1.13-.383c.239-.18.392-.455.698-1.004z"}),k("path",{"stroke-linejoin":"round",d:"M4.99 2s.288 1.458.92 2.085C6.54 4.712 8 4.99 8 4.99s-1.458.288-2.085.92C5.288 6.54 5.01 8 5.01 8s-.288-1.458-.92-2.085C3.46 5.288 2 5.01 2 5.01s1.458-.288 2.085-.92C4.712 3.46 4.99 2 4.99 2Z"}),k("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M18 5h2m-1 1V4"})],-1)])])}}),ln={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},cn=x({name:"solar-user-plus-rounded-linear",render:function(e,t){return f(),_("svg",ln,[...t[0]||(t[0]=[M('<g fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="6" r="4"></circle><circle cx="17" cy="18" r="4"></circle><path stroke-linecap="round" stroke-linejoin="round" d="M17 16.667v2.666M15.667 18h2.666"></path><path d="M14 20.834c-.634.108-1.305.166-2 .166c-3.866 0-7-1.79-7-4s3.134-4 7-4c1.713 0 3.283.352 4.5.936"></path></g>',1)])])}}),dn=p({__name:"Switch",props:{defaultChecked:{type:Boolean},checked:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:checked"],setup(e,{emit:t}){const a=e,n=t,s=i(()=>{const{class:e,...t}=a;return t}),o=L(s,n);return(e,t)=>(f(),h(b(O),R(b(o),{class:b(Vt)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-muted",a.class)}),{default:g(()=>[j(b(z),{class:y(b(Vt)("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"))},null,8,["class"])]),_:1},16,["class"]))}}),un=T(),mn=I(un);function pn(e,t){return!(!e||"object"!=typeof e||Array.isArray(e)||t&&!e[t])}function fn(e,t){return pn(e,t)&&Object.keys(e).length>0}const hn=s("page",{state:()=>({data:{},loading:!1,loadingStartedAt:0,loadingUrl:null,cache:{},error:null,errorUrl:null,revalidatingUrl:null,refreshTick:{},loadSeq:0,dataUrl:null,loadingForceUrl:null}),actions:{bumpRefresh(e){this.refreshTick[e]=(this.refreshTick[e]||0)+1},async load(e,t=!1,{expect:n}={}){const s=++this.loadSeq;this.loading=!0,this.loadingStartedAt=Date.now(),this.error=null,this.errorUrl=null,t&&(this.loadingForceUrl=e);try{!t&&fn(this.cache[e],n)&&(this.data=this.cache[e],this.dataUrl=e,this.revalidatingUrl=e);const{data:o}=await a.get(e);if(s!==this.loadSeq)return;if(!pn(o,n))return delete this.cache[e],void this.setError(e,{expect:n,message:Lt("Сервер вернул некорректные данные страницы")});this.cache[e]=o,this.data=o,this.dataUrl=e}catch(o){if(s!==this.loadSeq)return;if(fn(this.cache[e],n))return this.data=this.cache[e],void(this.dataUrl=e);delete this.cache[e];const t=o.response?.status;this.setError(e,{expect:n,status:t,message:404===t?Lt("Страница не найдена"):403===t?Lt("Нет доступа к этой странице"):o.response?.data?.message||Lt("Не удалось загрузить страницу")})}finally{s===this.loadSeq&&(this.loading=!1,this.revalidatingUrl=null,this.loadingForceUrl===e&&(this.loadingForceUrl=null))}},setError(e,t){this.error=t,this.errorUrl=e},retry(){if(!this.errorUrl)return;const e=this.errorUrl;this.error?.hard?window.location.assign(e):this.load(e,!0,{expect:this.error?.expect})},async prefetch(e){if(!this.cache[e]&&e!==this.loadingUrl){this.loadingUrl=e;try{const{data:t}=await a.get(e);fn(t)&&(this.cache[e]=t)}catch(t){}finally{this.loadingUrl=null}}},clear(){this.loadSeq++,this.data={},this.dataUrl=null,this.loadingForceUrl=null,this.error=null,this.errorUrl=null,this.revalidatingUrl=null,this.loading=!1,this.loadingStartedAt=0},invalidateStory(e){if(!e)return;const t="/story/"+e;for(const a of Object.keys(this.cache))(a===t||a.startsWith(t+"?")||a.startsWith(t+"/")||a.startsWith(t+"#"))&&delete this.cache[a]},invalidateUser(e){if(!e)return;const t="/u/"+e;for(const a of Object.keys(this.cache))(a===t||a.startsWith(t+"/")||a.startsWith(t+"?"))&&delete this.cache[a]},invalidateCollection(e){if(!e)return;const t="/cl/"+e;for(const a of Object.keys(this.cache))(a===t||a.startsWith(t+"/")||a.startsWith(t+"?"))&&delete this.cache[a]},invalidateIdeas(e){const t=e?"/ideas/"+e:null;for(const a of Object.keys(this.cache))("/ideas"===a||a.startsWith("/ideas?")||t&&(a===t||a.startsWith(t+"?")||a.startsWith(t+"/")||a.startsWith(t+"#")))&&delete this.cache[a]},clearChatUnread(e){if(e)for(const t of Object.keys(this.cache)){if(!t.startsWith("/messages"))continue;const a=this.cache[t]?.chats?.data;if(!Array.isArray(a))continue;const n=a.find(t=>Number(t.id)===Number(e));n&&(n.unread_count=0)}}}});function gn(e){const t=hn(),a=Bt.currentRoute.value,{path:n,full:s}=(e=>{try{const t=new URL(e,window.location.origin);return{path:t.pathname,full:t.pathname+t.search}}catch(t){const a=e.startsWith("/")?e:"/"+e;return{path:a.split("?")[0],full:a}}})(e);if(a.path===n){const e=$t(n);e&&t.bumpRefresh(e);try{delete t.cache[a.fullPath]}catch(o){}return t.load(a.fullPath,!0),void window.scrollTo(0,0)}Nt=!0,Bt.push(s)}const vn={class:"flex md:hidden fixed !bottom-0 left-0 z-30 w-full footer-navbar bg-gradient-to-t from-background-deeper from-90% to-transparent px-2 pt-0.5"},yn={class:"grid w-full auto-cols-fr grid-flow-col items-center justify-between rounded-xl bg-background/90 bg-blur-[#00000000] backdrop-blur-[100px] shadow-[0px_3px_30px_rgba(0,0,0,0.2)] border border-border"},bn={class:"relative"},wn={key:0,class:"absolute -top-2 -right-2"},xn={class:"inline-flex justify-center min-w-4 text-xs bg-primary shadow-sm rounded-sm text-white px-0.5"},_n={class:"relative"},kn={key:0,class:"absolute top-0 right-0"},Cn={key:0,class:"relative flex h-full flex-col items-center justify-center py-2"},jn=["src","alt"],En=["src","alt"],Sn={class:"min-w-0"},An={key:0,class:"font-medium truncate"},Pn={class:"text-xs text-muted-foreground truncate"},Mn={class:"flex items-center justify-between px-3 py-2 text-sm"},Ln={class:"flex items-center gap-2"},On=["href"],Rn={__name:"MobileNavbar",emits:["switch-account"],setup(e,{emit:t}){const n=t,s=$(),r=Mt(),l=N(),c=r.auth?.user,d=i(()=>l.path),u=o(!1),m=o(!1),p=async()=>{try{await a.post(route("logout")),window.location.href="/"}catch(e){console.warn("Logout failed:",e)}},v=Ea(),w=i(()=>v.unreadedNotifications.value),x=i(()=>v.newNotificationsCount.value);i(()=>v.echoConnected.value);const M=()=>v.resetNewNotifications(),L=()=>v.syncAllCounters(),O=()=>v.setupEcho();P([()=>w.value,()=>x.value],([e,t])=>{});const R=i(()=>!u.value&&!W.value&&x.value>0),z=Ma(),I=i(()=>z.unreadedMessagesCount.value);i(()=>"/my"===d.value);const T=i(()=>"/"===d.value||"/active"===d.value||d.value.startsWith("/top/")),H=i(()=>d.value.startsWith("/explore")||d.value.startsWith("/search")),W=i(()=>d.value.startsWith("/notifications")),Z=i(()=>d.value.startsWith("/messages")),G=async()=>{try{const e=await a.get("/messages");if(Array.isArray(e.data.data)){const t=e.data.data.reduce((e,t)=>
2e+(t.unread_count||0),0);z.setUnreadedMessagesCount(t)}}catch(e){console.error("Error fetching chats:",e)}},K=()=>{"visible"===document.visibilityState&&r.isLoggedIn&&(L(),O())};C(()=>{v.initializeFromStorage(),r.isLoggedIn&&(O(),L(),v.initPolling()),window.Echo&&r.auth?.user?.id&&Echo.private(`App.Models.User.${r.auth.user?.id}`).listen(".message.created",()=>{G()}).listen(".message.updated",()=>{G()}).listen(".messages.read",()=>{G()}),document.addEventListener("visibilitychange",K)}),B(()=>{v.cleanup(),document.removeEventListener("visibilitychange",K)}),P(d,async(e,t)=>{e.startsWith("/notifications")&&x.value>0?M():e.startsWith("/messages")&&z.resetUnreadedMessages(),u.value=!1});const Q=async()=>{u.value=!0,await M(),s.push("/notifications").then(()=>{window.scrollTo(0,0),r.isLoggedIn&&setTimeout(()=>{L()},500)})};return(e,t)=>{const a=D("router-link");return f(),_("div",vn,[k("nav",yn,[k("button",{type:"button",onClick:t[0]||(t[0]=V(t=>b(gn)(e.route("feed.home")),["prevent"])),class:y(["relative flex h-full flex-col items-center justify-center py-2",T.value?"text-primary":""])},[j(b(Oa),{class:"w-7 h-7"})],2),j(a,{to:e.route("explore"),class:y(["relative flex h-full flex-col items-center justify-center py-2",H.value?"text-primary":""])},{default:g(()=>[j(b(Ta),{class:"w-7 h-7"})]),_:1},8,["to","class"]),j(a,{to:e.route("messenger.index"),class:y(["relative flex h-full flex-col items-center justify-center py-2",Z.value?"text-primary":""])},{default:g(()=>[k("div",bn,[j(b(Na),{class:"w-7 h-7"}),I.value>0?(f(),_("span",wn,[k("span",xn,E(I.value>9?"9+":I.value),1)])):A("",!0)])]),_:1},8,["to","class"]),k("button",{onClick:V(Q,["prevent"]),class:y(["relative flex h-full flex-col items-center justify-center py-2",W.value?"text-primary":""])},[k("div",_n,[j(b(za),{class:"w-7 h-7"}),R.value?(f(),_("span",kn,[...t[7]||(t[7]=[k("span",{class:"inline-flex rounded-full h-3 w-3 bg-primary"},null,-1)])])):A("",!0)])],2),b(c)?(f(),_("div",Cn,[k("button",{onClick:t[1]||(t[1]=e=>m.value=!m.value),class:y(["relative flex flex-col items-center border-2 rounded-full base-transition",m.value?"border-primary":"border-transparent"])},[k("img",{src:b(c).avatar_url,alt:b(c).username,class:"w-7 h-7 rounded-full"},null,8,jn)],2),(f(),h(q,{to:"body"},[m.value?(f(),_("div",{key:0,class:"fixed inset-0 z-40",onClick:t[2]||(t[2]=e=>m.value=!1)})):A("",!0),j(F,{name:"fade"},{default:g(()=>[m.value?(f(),_("div",{key:0,class:"fixed bottom-20 right-2 z-50 w-60 rounded-xl bg-popover border border-border shadow-lg p-1 max-h-[60vh] overflow-y-auto",onClick:t[6]||(t[6]=e=>m.value=!1)},[j(a,{to:e.route("user.show",b(c)),class:"flex items-center gap-3 px-3 py-2.5 text-sm rounded-lg hover:bg-accent"},{default:g(()=>[k("img",{src:b(c).avatar_url,alt:b(c).username,class:"h-10 w-10 rounded-full shrink-0"},null,8,En),k("div",Sn,[b(c).display_name?(f(),_("div",An,E(b(c).display_name),1)):A("",!0),k("div",Pn,"@"+E(b(c).username),1)])]),_:1},8,["to"]),t[19]||(t[19]=k("div",{class:"h-px bg-border my-1"},null,-1)),k("div",Mn,[k("span",Ln,[j(b(qa),{class:"h-4 w-4 shrink-0"}),t[8]||(t[8]=S(" Тёмная тема",-1))]),j(dn,{checked:b(un),"onUpdate:checked":t[3]||(t[3]=e=>U(un)?un.value=e:null),onClick:t[4]||(t[4]=e=>b(mn)())},null,8,["checked"])]),t[20]||(t[20]=k("div",{class:"h-px bg-border my-1"},null,-1)),b(c).user_can?.cp?(f(),_("a",{key:0,href:e.route("filament.cp.pages.dashboard"),target:"_blank",rel:"noopener",class:"flex items-center gap-2 px-3 py-2 text-sm rounded-lg hover:bg-accent"},[j(b(Ga),{class:"h-4 w-4 shrink-0"}),t[9]||(t[9]=S(" Админка ",-1))],8,On)):A("",!0),j(a,{to:e.route("communities.my"),class:"flex items-center gap-2 px-3 py-2 text-sm rounded-lg hover:bg-accent"},{default:g(()=>[j(b(Qa),{class:"h-4 w-4 shrink-0"}),t[10]||(t[10]=S(" Мои сообщества ",-1))]),_:1},8,["to"]),j(a,{to:e.route("achievements"),class:"flex items-center gap-2 px-3 py-2 text-sm rounded-lg hover:bg-accent"},{default:g(()=>[j(b(Ya),{class:"h-4 w-4 shrink-0"}),t[11]||(t[11]=S(" Достижения ",-1))]),_:1},8,["to"]),j(a,{to:e.route("ideas.index"),class:"flex items-center gap-2 px-3 py-2 text-sm rounded-lg hover:bg-accent"},{default:g(()=>[j(b(en),{class:"h-4 w-4 shrink-0"}),t[12]||(t[12]=S(" Идеи ",-1))]),_:1},8,["to"]),j(a,{to:e.route("user.draft"),class:"flex items-center gap-2 px-3 py-2 text-sm rounded-lg hover:bg-accent"},{default:g(()=>[j(b(an),{class:"h-4 w-4 shrink-0"}),t[13]||(t[13]=S(" Черновики ",-1))]),_:1},8,["to"]),j(a,{to:e.route("user.bookmarks.stories"),class:"flex items-center gap-2 px-3 py-2 text-sm rounded-lg hover:bg-accent"},{default:g(()=>[j(b(sn),{class:"h-4 w-4 shrink-0"}),t[14]||(t[14]=S(" Закладки ",-1))]),_:1},8,["to"]),j(a,{to:e.route("recap.show",{year:2025}),class:"flex items-center gap-2 px-3 py-2 text-sm rounded-lg hover:bg-accent"},{default:g(()=>[j(b(rn),{class:"h-4 w-4 shrink-0"}),t[15]||(t[15]=S(" Мой 2025 ",-1))]),_:1},8,["to"]),j(a,{to:e.route("user.settings.show",b(c)),class:"flex items-center gap-2 px-3 py-2 text-sm rounded-lg hover:bg-accent"},{default:g(()=>[j(b(Ua),{class:"h-4 w-4 shrink-0"}),t[16]||(t[16]=S(" Настройки ",-1))]),_:1},8,["to"]),t[21]||(t[21]=k("div",{class:"h-px bg-border my-1"},null,-1)),k("button",{onClick:t[5]||(t[5]=e=>{n("switch-account"),m.value=!1}),class:"flex items-center gap-2 px-3 py-2 text-sm rounded-lg hover:bg-accent w-full"},[j(b(cn),{class:"h-4 w-4 shrink-0"}),t[17]||(t[17]=S(" Переключить аккаунт ",-1))]),t[22]||(t[22]=k("div",{class:"h-px bg-border my-1"},null,-1)),k("button",{type:"button",onClick:V(p,["stop"]),class:"flex items-center gap-2 px-3 py-2 text-sm rounded-lg hover:bg-accent text-destructive w-full"},[j(b(Da),{class:"h-4 w-4 shrink-0"}),t[18]||(t[18]=S(" Выйти ",-1))])])):A("",!0)]),_:1})]))])):(f(),h(a,{key:1,to:e.route("login"),class:"relative flex h-full flex-col items-center justify-center py-2"},{default:g(()=>[j(b(Wa),{class:"w-7 h-7"})]),_:1},8,["to"]))])])}}},zn={key:0,class:"sticky top-20 self-start min-h-0 px-[10px] mt-4"},In={class:"flex flex-col justify-center items-center overflow-hidden z-0 min-w-0 
2w-full sm:rounded-lg max-w-[300px] max-h-[600px]"},Tn=["innerHTML"],$n={__name:"AdSidebar",setup(e){const t=Mt(),a=o(t.advertisements?.sidebar||[]),n=o({});return C(()=>{"undefined"!=typeof window&&(window.yaContextCb=window.yaContextCb||[])}),P(()=>t.advertisements?.sidebar,e=>{a.value=e||[],H(()=>{(a.value||[]).forEach(e=>{!function(e){if("undefined"!=typeof window){if(e&&e.css_content){const t=`ad-${e.id}-css`;if(!document.head.querySelector(`style[data-ad-css-id="${t}"]`)){const a=document.createElement("style");a.type="text/css",a.setAttribute("data-ad-css-id",t),a.textContent=e.css_content,document.head.appendChild(a)}}if(e&&e.js_content&&n.value[e.id]){const a=n.value[e.id];a.innerHTML="",a.innerHTML=e.js_content,t=a,"undefined"!=typeof window&&t&&Array.from(t.querySelectorAll("script")).forEach(e=>{const a=document.createElement("script");Array.from(e.attributes).forEach(e=>{a.setAttribute(e.name,e.value)}),e.textContent&&(a.textContent=e.textContent),e.parentNode?e.parentNode.replaceChild(a,e):(console.warn("Ad script's original node has no parent. Appending to ad container instead.",e),t.appendChild(a))})}}var t}(e)})})},{immediate:!0,deep:!0}),(e,t)=>a.value&&a.value.length?(f(),_("div",zn,[(f(!0),_(W,null,Z(a.value,e=>(f(),_("div",{key:e.id,class:"grid overflow-hidden items-center max-w-[300px] mb-5"},[k("div",In,[e.html_content?(f(),_("div",{key:0,innerHTML:e.html_content,class:"w-full h-full bg-background"},null,8,Tn)):A("",!0),e.js_content?(f(),_("div",{key:1,ref_for:!0,ref:t=>{t&&(n.value[e.id]=t)}},null,512)):A("",!0)])]))),128))])):A("",!0)}},Nn=["innerHTML"],Bn={__name:"BlockHtml",props:{data:String},setup(e){const t=e,a=i(()=>{if(!t.data||"string"!=typeof t.data)return"";try{return G.sanitize(t.data,{ALLOWED_TAGS:["p","br","strong","b","em","i","u","s","del","ins","h1","h2","h3","h4","h5","h6","ul","ol","li","blockquote","pre","code","a","span","div","table","thead","tbody","tr","th","td","img"],ALLOWED_ATTR:["href","class","rel","target","title","src","alt","width","height","align","valign"],ALLOW_DATA_ATTR:!1})}catch(e){console.warn("Error sanitizing HTML block:",e);const a=document.createElement("div");return a.textContent=t.data,a.innerHTML}});return(e,t)=>(f(),_("div",{innerHTML:a.value},null,8,Nn))}},Dn={class:"flex flex-col gap-2 animate-pulse"},Vn={__name:"LatestCommentsSkeleton",props:{quantity:String},setup(e){const t=e,a=i(()=>Number(t.quantity));return(e,t)=>(f(!0),_(W,null,Z(b(a),e=>(f(),_("div",Dn,[...t[0]||(t[0]=[M('<div class="flex items-center mt-4"><svg class="w-10 h-10 me-3 text-muted" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"></path></svg><div><div class="h-2.5 bg-muted rounded-full w-32 mb-2"></div><div class="w-48 h-2 bg-muted rounded-full"></div></div></div><div class="w-full flex flex-col gap-2 mt-2"><div class="h-2 w-64 bg-muted rounded-full"></div><div class="h-2 w-56 bg-muted rounded-full"></div><div class="h-2 w-60 bg-muted rounded-full"></div></div><div class="h-3 mt-2 w-16 bg-muted rounded-full"></div>',3)])]))),256))}},Un=(e,t)=>{const a=e.__vccOpts||e;for(const[n,s]of t)a[n]=s;return a},Fn={key:0,class:"relative p-4 flex flex-col items-center justify-center gap-4 text-red-500"},qn={class:"text-sm text-center"},Hn=Un({__name:"WidgetLoadError",props:{isError:Boolean},setup:e=>(t,a)=>e.isError?(f(),_("div",Fn,[a[0]||(a[0]=k("div",{class:"loading"},[k("svg",{width:"64px",height:"48px"},[k("polyline",{points:"0.157 23.954, 14 23.954, 21.843 48, 43 0, 50 24, 64 24",id:"back"}),k("polyline",{points:"0.157 23.954, 14 23.954, 21.843 48, 43 0, 50 24, 64 24",id:"front"})])],-1)),k("span",qn,E(("__"in t?t.__:b(Lt))("Failed to load widget, try reload the page")),1)])):A("",!0)},[["__scopeId","data-v-6b473859"]]),Wn=["aria-hidden"],Zn={key:0,class:"absolute inset-0 bg-muted animate-pulse rounded-full"},Gn=["src","alt","width","height","loading"],Kn={key:1,class:"avatar__lock","aria-hidden":"true"},Qn={key:2,class:"avatar__label","aria-hidden":"true"},Jn={__name:"LazyAvatar",props:{src:{type:String,required:!0},alt:{type:String,default:""},size:{type:String,default:"lg"},loading:{type:String,default:"lazy"},suspended:{type:Boolean,default:!1},banned:{type:Boolean,default:!1}},setup(e){const t=o(!1),a=o(!1),n=()=>{t.value=!0},s=()=>{a.value=!0,t.value=!0},i={xs:"h-5 w-5",sm:"h-6 w-6",md:"h-9 w-9",lg:"h-10 w-10",xl:"h-12 w-12"},r={xs:20,sm:24,md:36,lg:40,xl:48};return(o,l)=>(f(),_("div",{class:y(["avatar relative rounded-full overflow-hidden bg-muted",i[e.size],e.suspended?"avatar-suspended":"",e.banned?"avatar--banned avatar--banned-lock":""]),"aria-hidden":String(!e.banned)},[t.value?A("",!0):(f(),_("div",Zn)),k("img",{src:a.value?"/images/default-avatar.png":e.src,alt:e.alt,width:r[e.size],height:r[e.size],loading:e.loading,decoding:"async",class:y([i[e.size],"rounded-full object-cover base-transition dark:bg-deeper dark:hover:shadow-lg dark:hover:shadow-
2primary/10 transition-opacity duration-300",t.value?"opacity-100":"opacity-0"]),onLoad:n,onError:s},null,42,Gn),e.banned?(f(),_("span",Kn,[...l[0]||(l[0]=[k("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false"},[k("path",{d:"M17 8V7a5 5 0 0 0-10 0v1",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"}),k("rect",{x:"4",y:"8",width:"16",height:"12",rx:"2",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"}),k("circle",{cx:"12",cy:"14",r:"1.4",fill:"currentColor"})],-1)])])):A("",!0),e.banned?(f(),_("span",Qn,"ЗАБАНЕН")):A("",!0)],10,Wn))}},Yn={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Xn=x({name:"solar-bolt-linear",render:function(e,t){return f(),_("svg",Yn,[...t[0]||(t[0]=[k("path",{fill:"none",stroke:"currentColor","stroke-width":"1.5",d:"m5.67 9.914l3.062-4.143c1.979-2.678 2.969-4.017 3.892-3.734s.923 1.925.923 5.21v.31c0 1.185 0 1.777.379 2.148l.02.02c.387.363 1.003.363 2.236.363c2.22 0 3.329 0 3.704.673l.018.034c.354.683-.289 1.553-1.574 3.29l-3.062 4.144c-1.98 2.678-2.969 4.017-3.892 3.734s-.923-1.925-.923-5.21v-.31c0-1.185 0-1.777-.379-2.148l-.02-.02c-.387-.363-1.003-.363-2.236-.363c-2.22 0-3.329 0-3.703-.673l-.019-.034c-.354-.683.289-1.552 1.574-3.29Z"},null,-1)])])}}),es={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},ts=x({name:"solar-bolt-bold",render:function(e,t){return f(),_("svg",es,[...t[0]||(t[0]=[k("path",{fill:"currentColor",d:"m5.67 9.914l3.062-4.143c1.979-2.678 2.969-4.017 3.892-3.734s.923 1.925.923 5.21v.31c0 1.185 0 1.777.379 2.148l.02.02c.387.363 1.003.363 2.236.363c2.22 0 3.329 0 3.704.673l.018.034c.354.683-.289 1.553-1.574 3.29l-3.062 4.144c-1.98 2.678-2.969 4.017-3.892 3.734s-.923-1.925-.923-5.21v-.31c0-1.185 0-1.777-.379-2.148l-.02-.02c-.387-.363-1.003-.363-2.236-.363c-2.22 0-3.329 0-3.703-.673l-.019-.034c-.354-.683.289-1.552 1.574-3.29"},null,-1)])])}}),as=()=>{const e=new K({html:!1,linkify:!1,breaks:!0,typographer:!1});e.renderer.rules.softbreak=()=>"<br>",e.renderer.rules.hardbreak=()=>"<br>",e.disable(["image","link","heading","lheading","code"]),e.renderer.rules.blockquote_open,e.renderer.rules.blockquote_close,e.renderer.rules.blockquote_open=(e,t,a,n,s)=>"<blockquote>\n",e.renderer.rules.blockquote_close=(e,t,a,n,s)=>"</blockquote>\n",e.renderer.rules.fence,e.renderer.rules.fence=(e,t,a,n,s)=>{const o=e[t],i=o.info.trim().split(/\s+/g)[0]||"plaintext",r=o.content;let l=r;try{l=i&&"plaintext"!==i&&We.getLanguage(i)?We.highlight(r,{language:i,ignoreIllegals:!0}).value:"plaintext"===i?r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):We.highlightAuto(r).value}catch(c){console.warn(`Ошибка подсветки синтаксиса для ${i}:`,c),l=r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}return`<pre class="hljs language-${i}"><code class="hljs language-${i}">${l}</code></pre>`};const t={attribute:"href",nl2br:!1,attributes:(e,t)=>{const a={};if("url"===t)try{const t=new URL(e);if(!["http:","https:"].includes(t.protocol))return{};"undefined"!=typeof window&&t.host!==window.location.host&&(a.target="_blank",a.rel="nofollow ugc noopener noreferrer")}catch(n){return console.warn("Invalid URL detected:",e),{}}return"mention"===t&&(a.rel="nofollow ugc"),a},formatHref:{mention:e=>`/u/${e.replace(/^@/,"").trim().replace(/[^\w-]/g,"")}`}};return{parseMarkdown:(a,n={})=>{const s=!0===n.legacy;if(!a||"string"!=typeof a)return"";try{if(/<script|<iframe|<object|<embed|<style|javascript:|data:|on\w+\s*=|<!--/.test(a)){console.warn("Potentially dangerous pattern detected in markdown");const e=document.createElement("div");return e.textContent=a,e.innerHTML}const n=[];let r=a.replace(/::(.+?)::/gs,(e,t)=>{const a=`SPOILER${n.length}SPOILER`;return n.push(t.trim()),a});if(s){var o=r.split("\n").map(e=>e.trim()).filter(e=>""!==e).map(t=>{if(/^SPOILER\d+SPOILER$/.test(t))return`<p>${t}</p>\n`;const a=Q(t).replace(/^(>{2,})/gm,e=>"> "+"&gt;".repeat(e.length-1));return e.render(a)}).join("")}else if(/(^|\n)\s*([-+*]\s+|\d+\.\s+|>|```|~~~|#{1,6}\s+)/m.test(r)){const t=Q(r).replace(/^(>{2,})/gm,e=>"> "+"&gt;".repeat(e.length-1));o=e.render(t)}else{o=r.split("\n").map(e=>e.trim()).filter(e=>""!==e).map(t=>{if(/^SPOILER\d+SPOILER$/.test(t))return`<p>${t}</p>\n`;const a=Q(t).replace(/^(>{2,})/gm,e=>"> "+"&gt;".repeat(e.length-1));return e.render(a)}).join("")}const l=J(o,t);let c;try{c="undefined"!=typeof window&&"function"==typeof G?G(window):{sanitize:e=>String(e).replace(/<[^>]*>/g,"")}}catch(i){c={sanitize:e=>String(e).replace(/<[^>]*>/g,"")}}let d=(e=>{if(!e.includes("<blockquote>"))return e;const t=document.createElement("div");
2return t.innerHTML=e,t.querySelectorAll("blockquote").forEach(e=>{e.querySelectorAll("blockquote").forEach(e=>{const t=e.innerHTML,a=document.createElement("span");a.innerHTML=t,e.replaceWith(a)})}),t.innerHTML})(c.sanitize(l,{ALLOWED_TAGS:["p","br","strong","b","em","i","u","s","del","ins","h1","h2","h3","h4","h5","h6","ul","ol","li","blockquote","pre","code","a","span","div"],ALLOWED_ATTR:["href","class","rel","target","title","data-user","data-spoiler-id"],ALLOW_DATA_ATTR:!0,FORCE_BODY:!1,RETURN_DOM_FRAGMENT:!1,RETURN_DOM_IMPORT:!1}));return n.forEach((e,t)=>{const a=`<span class="spoiler" data-spoiler-id="${t}">${c.sanitize(e,{ALLOWED_TAGS:[],ALLOWED_ATTR:[]})}</span>`;d=d.replace(new RegExp(`SPOILER${t}SPOILER`,"g"),a)}),d}catch(r){if(console.warn("Markdown parsing error:",r),"undefined"!=typeof document){const e=document.createElement("div");return e.textContent=a,e.innerHTML}return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}},getMarkdownHints:()=>[{syntax:"**текст**",description:"Жирный текст"},{syntax:"*текст*",description:"Курсив"},{syntax:"~~текст~~",description:"Зачеркивание"},{syntax:"> цитата",description:"Цитата"},{syntax:"::спойлер::",description:"Спойлер (скрытый текст)"},{syntax:"- пункт",description:"Список"},{syntax:"1. пункт",description:"Нумерованный список"},{syntax:"```\nкод\n```",description:"Блок кода"},{syntax:"@username",description:"Упоминание пользователя"}],md:e}},ns=o([]);let ss=null;const os=new Set,is=(e,t)=>`${e}:${t}`,rs=async()=>{if(0===ns.value.length)return;const e=[...ns.value];ns.value=[];try{await a.post("/api/story/track-batch",{events:e})}catch(t){ns.value.push(...e)}},ls=()=>{ss||(ss=setInterval(()=>{rs()},1e4))};function cs(e,t){const a=o(!1);let n=null;return C(async()=>{await H(),t.value&&(ls(),n=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>=.5&&setTimeout(()=>{t.isIntersecting&&(()=>{if(a.value)return;const t="object"==typeof e&&"value"in e?e.value:e;if(!t)return;const n=is(t,"impression");os.has(n)||(os.add(n),a.value=!0,ns.value.push({story_id:t,event:"impression"}),ns.value.length>=20&&rs())})()},1e3)})},{threshold:.5,rootMargin:"0px"}),n.observe(t.value))}),B(()=>{n&&n.disconnect()}),{hasTracked:a}}function ds(e,t,n){const s=o(!1),i=o(0);let r=null,l=null,c=null;const d=()=>{i.value=(()=>{if(!t?.value)return 0;const e=t.value,a=e.getBoundingClientRect(),n=window.innerHeight,s=Math.max(0,-a.top),o=e.offsetHeight;return 0===o?0:Math.min(100,(s+n)/o*100)})()},u=async()=>{if(s.value)return;const t="object"==typeof e&&"value"in e?e.value:e;if(!t)return;const n=is(t,"read_complete");if(os.has(n))return;const o=Date.now()-l;if(o<7e3)c=setTimeout(()=>u(),7e3-o);else{os.add(n),s.value=!0;try{await a.post("/api/story/track",{story_id:t,event:"read_complete"})}catch(i){}}};return C(async()=>{await H(),l=Date.now(),window.addEventListener("scroll",d,{passive:!0}),d();const e=()=>{!r&&n?.value&&(r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&u()})},{threshold:.5,rootMargin:"0px"}),r.observe(n.value))};if(e(),!r){const t=P(n,a=>{a&&(e(),t())})}}),B(()=>{window.removeEventListener("scroll",d),c&&clearTimeout(c),r&&r.disconnect()}),{hasTracked:s,readProgress:i}}function us(e,t){const a=o(new Set);let n=null,s=!1;return C(async()=>{await H(),ls();const o=P(()=>e.value?.length>0&&t.value,i=>{i&&(t?.value&&(n=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>=.3&&setTimeout(()=>{t.isIntersecting&&(()=>{if(s)return;const t=e.value;if(!t||0===t.length)return;const n=[];t.forEach(e=>
2{if(!e?.id)return;const t=is(e.id,"impression");os.has(t)||a.value.has(e.id)||(os.add(t),a.value.add(e.id),n.push({story_id:e.id,event:"impression"}))}),0!==n.length&&(s=!0,ns.value.push(...n),ns.value.length>=20&&rs())})()},500)})},{threshold:.3,rootMargin:"0px"}),n.observe(t.value)),o())},{immediate:!0})}),B(()=>{n&&n.disconnect()}),{trackedStories:a}}"undefined"!=typeof window&&window.addEventListener("beforeunload",()=>{if(ns.value.length>0){const t=JSON.stringify({events:ns.value}),a=document.cookie.match(new RegExp("(?:^|; )XSRF-TOKEN=([^;]*)")),n={"Content-Type":"application/json"};a&&(n["X-XSRF-TOKEN"]=decodeURIComponent(a[1]));try{fetch("/api/story/track-batch",{method:"POST",headers:n,body:t,credentials:"include",keepalive:!0})}catch(e){}}});const ms={key:0,class:"max-w-md rounded-lg bg-background"},ps={class:"pt-4 pb-3 px-4 text-base font-medium"},fs={class:"flex justify-between items-center"},hs={class:"text-base font-medium"},gs=["aria-pressed","title"],vs={class:"sr-only"},ys={class:"flex items-start gap-3"},bs={class:"flex flex-col min-w-0 flex-1"},ws={key:1,class:"text-[13px] font-medium text-muted-foreground truncate"},xs=["innerHTML"],_s={class:"flex items-center gap-1 text-xs text-endpoint"},ks=["innerHTML"],Cs={class:"flex items-center gap-1 text-xs text-endpoint"},js=["innerHTML"],Es={class:"flex items-center gap-1 text-xs text-endpoint"},Ss="widgetLatestCommentsLive",As=Un({__name:"LatestComments",props:{quantity:{type:[Number,String],required:!0}},setup(e){Y.extend(X),Y.locale("ru");const{parseMarkdown:t}=as(),n=o(null),s=o(null),r=Mt(),l=i(()=>r.blockedUserIds||[]),c=i(()=>r.ignoredUserIds||[]),d=i(()=>[...l.value,...c.value]),u=e,m=e=>t(e);us(i(()=>{const e=new Set;return p.value.filter(t=>!(!t?.story?.id||e.has(t.story.id)||(e.add(t.story.id),0))).map(e=>e.story)}),s);const p=o([]),v=o(!0),w=o(!1),x=o(!0),M=o(!1);let L=!1,O=null;const R=async()=>{try{const e=await a.post("/api/widgets/latest-comments",{quantity:u.quantity});p.value=Array.isArray(e.data)?e.data.filter(e=>!(e.user_id&&d.value.includes(e.user_id))):[],z()}catch(e){w.value=!0}finally{v.value=!1}},z=()=>{p.value.forEach(e=>{e.date?.timestamp&&(e.date.human=Y(1e3*e.date.timestamp).fromNow())})},I=e=>{const t=e?.user_id??e?.user?.id??null;if(!t||!d.value.includes(t))if(e&&"object"==typeof e&&Object.keys(e).length>0){e.date&&e.date.timestamp&&(e.date.human=Y(1e3*e.date.timestamp).fromNow()),p.value.unshift(e);const t=Number(u.quantity);p.value.length>t&&p.value.pop()}else console.warn("Received empty or invalid comment data from WebSocket")},T=async()=>{L||(await R(),Echo.channel("widget.comment").listen(".comment.widget.added",I),L=!0)},$=()=>{L&&(Echo.leaveChannel("widget.comment"),L=!1)};function N(){x.value=!x.value,x.value&&(M.value=!1,H(()=>{M.value=!0}))}function B(){M.value=!1}C(async()=>{if("undefined"!=typeof window){const e=localStorage.getItem(Ss);null!==e&&(x.value="true"===e)}x.value?await T():await R(),O=setInterval(()=>{z()},3e4),n.value&&n.value.addEventListener("click",V)}),ee(()=>{$(),O&&clearInterval(O),n.value&&n.value.removeEventListener("click",V)}),P(x,e=>{"undefined"!=typeof window&&localStorage.setItem(Ss,e.toString()),e?T():$()});const V=e=>{const t=e.target.closest?.(".spoiler");t&&t.classList.toggle("revealed")};return(t,a)=>{const o=Hn,i=Vn,r=D("router-link");return w.value?(f(),_("section",ms,[k("h2",ps,E(("__"in t?t.__:b(Lt))("Latest comments")),1),j(o,{"is-error":w.value},null,8,["is-error"])])):(f(),_("section",{key:1,ref_key:"widgetRef",ref:s,class:"max-w-md rounded-lg bg-background p-4"},[k("div",fs,[k("h2",hs,E(("__"in t?t.__:b(Lt))("Latest comments")),1),k("button",{onClick:N,type:"button",class:"p-1 rounded-full base-transition hover:scale-110","aria-pressed":x.value.toString(),title:x.value?("__"in t?t.__:b(Lt))("Stop live comments"):("__"in t?t.__:b(Lt))("Live comments")},[k("span",vs,E(x.value?("__"in t?t.__:b(Lt))("Stop live comments"):("__"in t?t.__:b(Lt))("Live comments")),1),(f(),h(te(x.value?b(ts):b(Xn)),{class:y(["w-6 h-6",[x.value?"text-primary base-transition":"text-muted-foreground hover:text-primary base-transition",{"animate-play-fill":M.value}]]),onAnimationend:B},null,40,["class"]))],8,gs)]),v.value?(f(),h(i,{key:0,quantity:e.quantity},null,8,["quantity"])):(f(),_("div",{key:1,ref_key:"commentsContainerRef",ref:n,class:"flex flex-col divide-y divide-border"},[(f(!0),_(W,null,Z(p.value,(e,a)=>(f(),_("div",{key:e,class:y(p.value.length-1===a?"pt-3":"py-3")},[k("div",ys,[e.user?(f(),h(r,{key:0,to:t.route("user.show",e.user),class:"shrink-0"},{default:g(()=>[j(Jn,{src:e.user.avatar_url,alt:e.user?.username,size:"md"},null,8,["src","alt"])]),_:2},1032,["to"])):(f(),h(Jn,{key:1,src:"/images/default-avatar.png",alt:"avatar",size:"md"})),k("div",bs,[e.user?(f(),h(r,{key:0,to:t.route("user.show",e.user),class:"text-[13px] font-medium text-foreground hover:text-endpoint truncate",title:e.user.display_name||e.user.username},{default:g(()=>[S(E(e.user.display_name||e.user.username),1)]),_:2},1032,["to","title"])):(f(),_("div",ws,E(("__"in t?t.__:b(Lt))("Account deleted")),1)),"project"===e.type&&e.project?.slug?(f(),h(r,{key:2,to:t.route("projects.show",e.project.slug),class:"text-[13px] line-clamp-1 font-medium text-foreground hover:text-endpoint"},{default:g(()=>
2[S(E(e.project.title),1)]),_:2},1032,["to"])):"idea"===e.type&&e.idea?.slug?(f(),h(r,{key:3,to:t.route("ideas.show",e.idea.slug),class:"text-[13px] line-clamp-1 font-medium text-foreground hover:text-endpoint"},{default:g(()=>[S(E(e.idea.title),1)]),_:2},1032,["to"])):e.story?.slug?(f(),h(r,{key:4,to:t.route("story.show",{story:e.story.slug}),class:"text-[13px] line-clamp-1 font-medium text-foreground hover:text-endpoint"},{default:g(()=>[S(E(e.story.title),1)]),_:2},1032,["to"])):A("",!0)])]),"project"===e.type&&e.project?.slug?(f(),h(r,{key:0,to:t.route("projects.show",e.project.slug),class:"flex flex-col gap-2 pr-10 mt-2"},{default:g(()=>[k("div",{class:"line-clamp-3 latest-comment-body",innerHTML:m(e.comment)},null,8,xs),k("div",_s,E(e.date.human),1)]),_:2},1032,["to"])):"idea"===e.type&&e.idea?.slug?(f(),h(r,{key:1,to:`${t.route("ideas.show",e.idea.slug)}#comment-${e.id}`,class:"flex flex-col gap-2 pr-10 mt-2"},{default:g(()=>[k("div",{class:"line-clamp-3 latest-comment-body",innerHTML:m(e.comment)},null,8,ks),k("div",Cs,E(e.date.human),1)]),_:2},1032,["to"])):e.story?.slug?(f(),h(r,{key:2,to:`${t.route("story.show",{story:e.story.slug})}#comment-${e.id}`,class:"flex flex-col gap-2 pr-10 mt-2"},{default:g(()=>[k("div",{class:"line-clamp-3 latest-comment-body",innerHTML:m(e.comment)},null,8,js),k("div",Es,E(e.date.human),1)]),_:2},1032,["to"])):A("",!0)],2))),128))],512))],512))}}},[["__scopeId","data-v-e49008a9"]]),Ps={class:"flex flex-col gap-2 animate-pulse"},Ms={__name:"PopularCommentsSkeleton",props:{quantity:String},setup(e){const t=e,a=i(()=>Number(t.quantity));return(e,t)=>(f(!0),_(W,null,Z(b(a),e=>(f(),_("div",Ps,[...t[0]||(t[0]=[M('<div class="flex items-center mt-4"><svg class="w-10 h-10 me-3 text-muted" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"></path></svg><div><div class="h-2.5 bg-muted rounded-full w-32 mb-2"></div><div class="w-48 h-2 bg-muted rounded-full"></div></div></div><div class="w-full flex flex-col gap-2"><div class="h-2 w-64 bg-muted rounded-full"></div><div class="h-2 w-56 bg-muted rounded-full"></div><div class="h-2 w-60 bg-muted rounded-full"></div></div><div class="w-full flex items-center gap-2"><div class="h-5 w-5 bg-muted rounded-full"></div><div class="h-5 w-10 bg-muted rounded-full"></div></div>',3)])]))),256))}},Ls={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"},Os=x({name:"ph-heart-fill",render:function(e,t){return f(),_("svg",Ls,[...t[0]||(t[0]=[k("path",{fill:"currentColor",d:"M240 102c0 70-103.79 126.66-108.21 129a8 8 0 0 1-7.58 0C119.79 228.66 16 172 16 102a62.07 62.07 0 0 1 62-62c20.65 0 38.73 8.88 50 23.89C139.27 48.88 157.35 40 178 40a62.07 62.07 0 0 1 62 62"},null,-1)])])}});function Rs(e,t){if(e=Math.abs(e),"string"==typeof t&&(t=t.split(",")),!Array.isArray(t)||t.length<3)throw new Error("pluralizeRu: forms must be array or comma-separated string из 3 форм");return t[e%100>4&&e%100<20?2:[2,0,1,1,1,2][Math.min(e%10,5)]]}const zs={key:0,class:"max-w-md rounded-lg bg-background"},Is={class:"pt-4 pb-3 px-4 text-base font-medium"},Ts={class:"text-base font-medium"},$s={key:1,class:"flex flex-col divide-y divide-border"},Ns={class:"flex items-start gap-3"},Bs={class:"flex flex-col"},Ds={key:1,class:"text-[13px] font-medium text-muted-foreground"},Vs={class:"line-clamp-3"},Us={class:"flex items-center gap-1 text-xs text-endpoint"},Fs={__name:"PopularComments",props:{quantity:{type:[Number,String],required:!0},days:{type:[Number,String],required:!0}},setup(e){const t=e,n=o([]),s=o(!0),r=o(!1),l=o(null);return us(i(()=>{const e=new Set;return n.value.filter(t=>!(!t?.story?.id||e.has(t.story.id)||(e.add(t.story.id),0))).map(e=>e.story)}),l),C(()=>{(async()=>{try{const e=await a.post("/api/widgets/popular-comments",{quantity:t.quantity,days:t.days});n.value=e.data}catch(e){r.value=!0}finally{s.value=!1}})()}),(t,a)=>{const o=Hn,i=Ms,c=D("router-link");return b(r)?(f(),_("section",zs,[k("h2",Is,E(("__"in t?t.__:b(Lt))("Popular comments")),1),j(o,{"is-error":b(r)},null,8,["is-error"])])):b(n).length>0?(f(),_("section",{key:1,ref_key:"widgetRef",ref:l,class:"max-w-md rounded-lg bg-background p-4"},[k("h2",Ts,E(("__"in t?t.__:b(Lt))("Popular comments")),1),b(s)?(f(),h(i,{key:0,quantity:e.quantity},null,8,["quantity"])):(f(),_("div",$s,[(f(!0),_(W,null,Z(b(n),(e,a)=>(f(),_("div",{key:e,class:y(b(n).length-1===a?"pt-3":"py-3")},[k("div",Ns,[e.user?(f(),h(c,{key:0,to:t.route("user.show",e.user),class:"shrink-0"},{default:g(()=>[j(Jn,{src:e.user.avatar_url,alt:e.user?.username,size:"md"},null,8,["src","alt"])]),_:2},1032,["to"])):(f(),h(Jn,{key:1,src:"/images/default-avatar.png",alt:"avatar",size:"md"})),k("div",Bs,[e.user?(f(),h(c,{key:0,to:t.route("user.show",e.user),class:"text-[13px] font-medium text-foreground hover:text-endpoint"},{default:g(()=>[S(E(e.user.display_name?e.user.display_name:e.user.username),1)]),_:2},1032,["to"])):(f(),_("div",Ds,E(("__"in t?t.__:b(Lt))("Account deleted")),1)),j(c,{to:e.story?.slug?t.route("story.show",{story:e.story.slug}):"#",class:"text-[13px] line-clamp-1 font-medium text-foreground hover:text-endpoint"},{default:g(()=>[S(E(e.story.title),1)]),_:2},1032,["to"])])]),j(c,{to:e.story?.slug?`${t.route("story.show",{story:e.story.slug})}#comment-${e.id}`:"#",class:"flex flex-col gap-2 pr-10 mt-2"},{default:g(()=>[k("div",Vs,E(b(Q)(e.comment)),1),k("div",Us,[j(b(Os),{class:"h-5 w-5 text-like/80"}),k("span",null,E(e.likes_count),1),k("span",null,E(b(Rs)(e.likes_count,["лайк","лайка","лайков"])),1)])]),_:2},1032,["to"])],2))),128))]))],512)):A("",!0)}}},qs={class:"flex flex-col gap-2 px-3 pb-2"},Hs={__name:"PopularTagsSkeleton",props:{quantity:String},setup(e){const t=e,a=i(()=>Number(t.quantity));return(e,t)=>(f(),_("div",qs,[(f(!0),_(W,null,Z(b(a),e=>(f(),_("div",{key:e,class:"flex items-center gap-2 justify-between animate-pulse"},[...t[0]||(t[0]=[k("div",{class:"h-6 bg-muted rounded-full w-48 mb-2"},null,-1),k("div",{class:"h-8 w-8 bg-muted rounded-xl"},null,-1)])]))),128))]))}},Ws={class:"max-w-md rounded-lg bg-background"},Zs={class:"pt-4 pb-3 px-4 text-base font-medium"},Gs={key:2,class:"flex flex-col px-2 pb-2 gap-1"},Ks={class:"flex w-full items-center justify-between gap-4"},Qs={class:"text-base font-medium line-clamp-1"},Js={class:"text-medium rounded-full border-2 border-transparent text-base"},Ys={__name:"PopularTags",props:{quantity:{type:[Number,String],required:!0}},setup(e){const t=e,n=o([]),s=o(!0),i=o(!1);return C(()=>{(async()=>{try{const e=await a.post("/api/widgets/popular-tags",{quantity:t.quantity});n.value=e.data}catch(e){i.value=!0}finally{s.value=!1}})()}),(t,a)=>{const o=Hs,r=Hn,l=D("router-link");return f(),_("section",Ws,[k("h2",Zs,E(("__"in t?t.__:b(Lt))("Popular tags")),1),b(s)?(f(),h(o,{key:0,quantity:e.quantity},null,8,["quantity"])):b(i)?(f(),h(r,{key:1,"is-error":b(i)},null,8,["is-error"])):(f(),_("div",Gs,[(f(!0),_(W,null,Z(b(n),e=>(f(),h(l,{key:e,to:t.route("tag.show",e.slug),class:"group flex items-center hover:bg-accent rounded-lg px-2 py-1 base-transition last:hover:rounded-b-lg"},{default:g(()=>[k("div",Ks,[k("div",Qs,[k("span",null,"#"+E(e.name),1)]),k("div",Js,E(e.count),1)])]),_:2},1032,["to"]))),128))]))])}}},Xs={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},eo=x({name:"solar-gallery-bold",render:function(e,t){return f(),_("svg",Xs,[...t[0]||(t[0]=[k("path",{fill:"currentColor",d:"M18 8a2 2 0 1 1-4 0a2 2 0 0 1 4 0"},null,-1),k("path",{fill:"currentColor","fill-rule":"evenodd",d:"M11.943 1.25h.114c2.309 0 4.118 0 5.53.19c1.444.194 2.584.6 3.479 1.494c.895.895 1.3 2.035 1.494 3.48c.19 1.411.19 3.22.19 5.529v.088c0 1.909 0 3.471-.104 4.743c-.104 1.28-.317 2.347-.795 3.235q-.314.586-.785 1.057c-.895.895-2.035 1.3-3.48 1.494c-1.411.19-3.22.19-5.529.19h-.114c-2.309 0-4.118 0-5.53-.19c-1.444-.194-2.584-.6-3.479-1.494c-.793-.793-1.203-1.78-1.42-3.006c-.215-1.203-.254-2.7-.262-4.558Q1.25 12.792 1.25 12v-.058c0-2.309 0-4.118.19-5.53c.194-1.444.6-2.584 1.494-3.479c.895-.895 2.035-1.3 3.48-1.494c1.411-.19 3.22-.19 5.529-.19m-5.33 1.676c-1.278.172-2.049.5-2.618 1.069c-.57.57-.897 1.34-1.069 2.619c-.174 1.3-.176 3.008-.176 5.386v.844l1.001-.876a2.3 2.3 0 0 1 3.141.104l4.29 4.29a2 2 0 0 0 2.564.222l.298-.21a3 3 0 0 1 3.732.225l2.83 2.547c.286-.598.455-1.384.545-2.493c.098-1.205.099-2.707.099-4.653c0-2.378-.002-4.086-.176-5.386c-.172-1.279-.5-2.05-1.069-2.62c-.57-.569-1.34-.896-2.619-1.068c-1.3-.174-3.008-.176-5.386-.176s-4.086.002-5.386.176","clip-rule":"evenodd"},null,-1)])])}}),to={key:0,class:"absolute inset-0 bg-muted animate-pulse rounded-[inherit]"},ao=["src","alt","width","height","loading"],no={__name:"LazyImage",props:{src:{type:String,required:!0},alt:{type:String,default:""},imgClass:{type:String,default:""},containerClass:{type:String,default:""},loading:{type:String,default:"lazy"},width:{type:[Number,String],default:void 0},height:{type:[Number,String],default:void 0}},setup(e){const t=o(!1),a=o(!1),n=()=>{t.value=!0},s=()=>{a.value=!0,t.value=!0};return(a,o)=>(f(),_("div",{class:y(["relative",e.containerClass])},[t.value?A("",!0):(f(),_("div",to)),k("img",{src:e.src,alt:e.alt,width:e.width,height:e.height,loading:e.loading,decoding:"async",class:y([e.imgClass,"transition-opacity duration-300",t.value?"opacity-100":"opacity-0"]),onLoad:n,onError:s},null,42,ao)],2))}},so={class:"pt-4 pb-3 px-4 text-base font-medium"},oo={key:0,class:"px-4 pb-3 space-y-4"},io={key:1,class:"px-4 pb-3 text-destructive text-sm"},ro={key:2,class:"flex flex-col px-4 pb-3 gap-4"},lo={class:"flex items-center gap-2 justify-between"},co={class:"line-clamp-2 hover:text-endpoint font-medium"},uo={class:"h-14 w-14 shrink-0"},mo={__name:"NewsStories",props:{quantity:{type:[Number,String],required:!0},cache:{type:Boolean,required:!0}},setup(e){const t=e,n=o([]),s=o(!0),i=o(!1),r=o(null);return us(n,r),C(()=>{(async()=>{try{const e=await a.post("/api/widgets/news-stories",{quantity:t.quantity,cache:t.cache});n.value=e.data}catch(e){i.value=!0}finally{s.value=!1}})()}),(t,a)=>{const o=D("router-link");return f(),_("section",{ref_key:"widgetRef",ref:r,class:"max-w-md rounded-lg bg-background"},[k("h2",so,E(("__"in t?t.__:b(Lt))("News stories")),1),b(s)?(f(),_("div",oo,[(f(!0),_(W,null,Z(e.quantity,e=>(f(),_("div",{key:e,class:"flex items-center gap-2 justify-between animate-pulse"},[...a[0]||(a[0]=[k("div",{class:"h-4 w-3/4 bg-muted rounded"},null,-1),k("div",{class:"h-14 w-14 bg-muted rounded-xl"},null,-1)])]))),128))])):b(i)?(f(),_("div",io,E(("__"in t?t.__:b(Lt))("Failed to load widget")),1)):(f(),_("div",ro,[(f(!0),_(W,null,Z(b(n),e=>(f(),h(o,{key:e.id,to:e?.slug?t.route("story.show",{story:e.slug}):"#"},{default:g(()=>
2[k("div",lo,[k("div",co,E(e.title),1),k("div",uo,[e.image?(f(),h(no,{key:0,src:e.image,alt:"cover","img-class":"h-14 w-14 rounded-xl object-cover","container-class":"h-14 w-14 rounded-xl overflow-hidden"},null,8,["src"])):(f(),h(b(eo),{key:1,class:"h-14 w-14 bg-muted text-muted-foreground rounded-xl"}))])])]),_:2},1032,["to"]))),128))]))],512)}}},po={class:"flex flex-col gap-4 px-4 pb-3"},fo={__name:"FeaturedStoriesSkeleton",props:{quantity:String},setup(e){const t=e,a=i(()=>Number(t.quantity));return(e,t)=>(f(),_("div",po,[(f(!0),_(W,null,Z(b(a),e=>(f(),_("div",{key:e,class:"flex items-center gap-2 justify-between animate-pulse"},[...t[0]||(t[0]=[k("div",{class:"flex flex-col gap-3"},[k("div",{class:"h-4 bg-muted rounded-full w-40"}),k("div",{class:"h-4 bg-muted rounded-full w-48"})],-1),k("div",{class:"h-14 w-14 bg-muted rounded-xl"},null,-1)])]))),128))]))}},ho={class:"pt-4 pb-3 px-4 text-base font-medium"},go={key:2,class:"flex flex-col px-4 pb-3 gap-4"},vo={class:"flex items-center gap-2 justify-between"},yo={class:"line-clamp-2 hover:text-endpoint font-medium"},bo={class:"h-14 w-14 shrink-0"},wo={__name:"FeaturedStories",props:{quantity:{type:[Number,String],required:!0},cache:{type:Boolean,required:!0},storyId:{type:[Number,String],required:!1,default:null},widgetTitle:{type:String,required:!1,default:null}},setup(e){const t=e,n=o([]),s=o(!0),i=o(!1),r=o(null);return us(n,r),C(()=>{(async()=>{try{const e={quantity:t.quantity,cache:t.cache};t.storyId&&(e.story_id=t.storyId);const s=await a.post("/api/widgets/featured-stories",e);n.value=s.data}catch(e){i.value=!0}finally{s.value=!1}})()}),(a,o)=>{const l=fo,c=Hn,d=D("router-link");return f(),_("section",{ref_key:"widgetRef",ref:r,class:"max-w-md rounded-lg bg-background"},[k("h2",ho,E(t.widgetTitle?t.widgetTitle:t.storyId?"История месяца":("__"in a?a.__:b(Lt))("Featured stories")),1),b(s)?(f(),h(l,{key:0,quantity:e.quantity},null,8,["quantity"])):b(i)?(f(),h(c,{key:1,"is-error":b(i)},null,8,["is-error"])):(f(),_("div",go,[(f(!0),_(W,null,Z(b(n),e=>(f(),h(d,{key:e.id,to:e?.slug?a.route("story.show",{story:e.slug}):"#"},{default:g(()=>[k("div",vo,[k("div",yo,E(e.title),1),k("div",bo,[e.image?(f(),h(no,{key:0,src:e.image,alt:"cover","img-class":"h-14 w-14 rounded-xl object-cover","container-class":"h-14 w-14 rounded-xl overflow-hidden"},null,8,["src"])):(f(),h(b(eo),{key:1,class:"h-14 w-14 bg-muted text-muted-foreground rounded-xl"}))])])]),_:2},1032,["to"]))),128))]))],512)}}},xo={class:"flex flex-col gap-4 min-h-0"},_o={__name:"SidebarWidgets",props:{widgets:{type:Array,default:()=>[]},showAds:{type:Boolean,default:!0}},setup:e=>(t,a)=>{const n=wo,s=mo,o=Ys,i=Fs,r=As,l=Bn,c=$n;return f(),_("div",xo,[(f(!0),_(W,null,Z(e.widgets,e=>(f(),_(W,{key:e.id},["featured-stories"===e.name?(f(),h(n,{key:0,quantity:e.settings.quantity,cache:e.settings.cache,"story-id":e.settings.story_id,"widget-title":e.settings.title},null,8,["quantity","cache","story-id","widget-title"])):A("",!0),"news-stories"===e.name?(f(),h(s,{key:1,quantity:e.settings.quantity,cache:e.settings.cache},null,8,["quantity","cache"])):A("",!0),"popular-tags"===e.name?(f(),h(o,{key:2,quantity:e.settings.quantity},null,8,["quantity"])):A("",!0),"popular-comments"===e.name?(f(),h(i,{key:3,quantity:e.settings.quantity,days:e.settings.days},null,8,["quantity","days"])):A("",!0),"latest-comments"===e.name?(f(),h(r,{key:4,quantity:e.settings.quantity},null,8,["quantity"])):A("",!0),"block-html"===e.name?(f(),h(l,{key:5,data:e.settings.html},null,8,["data"])):A("",!0)],64))),128)),e.showAds?(f(),h(c,{key:0})):A("",!0)])}},ko={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Co=x({name:"solar-refresh-circle-linear",render:function(e,t){return f(),_("svg",ko,[...t[0]||(t[0]=[k("g",{fill:"none"},[k("path",{fill:"currentColor",d:"M7.378 11.63h-.75zm0 .926l-.562.497a.75.75 0 0 0 1.08.044zm2.141-1.015
2a.75.75 0 0 0-1.038-1.082zm-2.958-1.038a.75.75 0 1 0-1.122.994zm8.37-1.494a.75.75 0 1 0 1.102-1.018zM12.045 6.25c-2.986 0-5.416 2.403-5.416 5.38h1.5c0-2.137 1.747-3.88 3.916-3.88zm-5.416 5.38v.926h1.5v-.926zm1.269 1.467l1.622-1.556l-1.038-1.082l-1.622 1.555zm.042-1.039l-1.378-1.555l-1.122.994l1.377 1.556zm8.094-4.067a5.42 5.42 0 0 0-3.99-1.741v1.5a3.92 3.92 0 0 1 2.889 1.26zm.585 3.453l.56-.498a.75.75 0 0 0-1.08-.043zm-2.139 1.014a.75.75 0 1 0 1.04 1.082zm2.96 1.04a.75.75 0 0 0 1.12-.997zm-8.393 1.507a.75.75 0 0 0-1.094 1.026zm2.888 2.745c2.993 0 5.434-2.4 5.434-5.38h-1.5c0 2.135-1.753 3.88-3.934 3.88zm5.434-5.38v-.926h-1.5v.926zm-1.27-1.467l-1.619 1.555l1.04 1.082l1.618-1.555zm-.04 1.04l1.38 1.554l1.122-.996l-1.381-1.555zM7.952 16.03a5.45 5.45 0 0 0 3.982 1.719v-1.5c-1.143 0-2.17-.48-2.888-1.245z"}),k("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"1.5"})],-1)])])}}),jo={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Eo=x({name:"solar-shield-warning-linear",render:function(e,t){return f(),_("svg",jo,[...t[0]||(t[0]=[k("g",{fill:"none"},[k("path",{stroke:"currentColor","stroke-width":"1.5",d:"M3 10.417c0-3.198 0-4.797.378-5.335c.377-.537 1.88-1.052 4.887-2.081l.573-.196C10.405 2.268 11.188 2 12 2s1.595.268 3.162.805l.573.196c3.007 1.029 4.51 1.544 4.887 2.081C21 5.62 21 7.22 21 10.417v1.574c0 5.638-4.239 8.375-6.899 9.536C13.38 21.842 13.02 22 12 22s-1.38-.158-2.101-.473C7.239 20.365 3 17.63 3 11.991z"}),k("path",{stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",d:"M12 8v4"}),k("circle",{cx:"12",cy:"15",r:"1",fill:"currentColor"})],-1)])])}}),So={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Ao=x({name:"solar-chat-dots-linear",render:function(e,t){return f(),_("svg",So,[...t[0]||(t[0]=[k("g",{fill:"none"},[k("path",{fill:"currentColor",d:"m13.087 21.388l.645.382zm.542-.916l-.646-.382zm-3.258 0l-.645.382zm.542.916l.646-.382zm-8.532-5.475l.693-.287zm5.409 3.078l-.013.75zm-2.703-.372l-.287.693zm16.532-2.706l.693.287zm-5.409 3.078l-.012-.75zm2.703-.372l.287.693zm.7-15.882l-.392.64zm1.65 1.65l.64-.391zM4.388 2.738l-.392-.64zm-1.651 1.65l-.64-.391zM9.403 19.21l.377-.649zm4.33 2.56l.541-.916l-1.29-.764l-.543.916zm-4.007-.916l.542.916l1.29-.764l-.541-.916zm2.715.152a.52.52 0 0 1-.882 0l-1.291.764c.773 1.307 2.69 1.307 3.464 0zM10.5 2.75h3v-1.5h-3zm10.75 7.75v1h1.5v-1zm-18.5 1v-1h-1.5v1zm-1.5 0c0 1.155 0 2.058.05 2.787c.05.735.153 1.347.388 1.913l1.386-.574c-.147-.352-.233-.782-.278-1.441c-.046-.666-.046-1.51-.046-2.685zm6.553 6.742c-1.256-.022-1.914-.102-2.43-.316L4.8 19.313c.805.334 1.721.408 2.977.43zM1.688 16.2A5.75 5.75 0 0 0 4.8 19.312l.574-1.386a4.25 4.25 0 0 1-2.3-2.3zm19.562-4.7c0 1.175 0 2.019-.046 2.685c-.045.659-.131 1.089-.277 1.441l1.385.574c.235-.566.338-1.178.389-1.913c.05-.729.049-1.632.049-2.787zm-5.027 8.241c1.256-.021 2.172-.095 2.977-.429l-.574-1.386c-.515.214-1.173.294-2.428.316zm4.704-4.115a4.25 4.25 0 0 1-2.3 2.3l.573 1.386a5.75 5.75 0 0 0 3.112-3.112zM13.5 2.75c1.651 0 2.837 0 3.762.089c.914.087 1.495.253 1.959.537l.783-1.279c-.739-.452-1.577-.654-2.6-.752c-1.012-.096-2.282-.095-3.904-.095zm9.25 7.75c0-1.622 0-2.891-.096-3.904c-.097-1.023-.299-1.862-.751-2.6l-1.28.783c.285.464.451 1.045.538 1.96c.088.924.089 2.11.089 3.761zm-3.53-7.124a4.25 4.25 0 0 1 1.404 1.403l1.279-.783a5.75 5.75 0 0 0-1.899-1.899zM10.5 1.25c-1.622 0-2.891 0-3.904.095c-1.023.098-1.862.3-2.6.752l.783 1.28c.464-.285 1.045-.451 1.96-.538c.924-.088 2.11-.089 3.761-.089zM2.75 10.5c0-1.651 0-2.837.089-3.762c.087-.914.253-1.495.537-1.959l-1.279-.783c-.452.738-.654 1.577-.752 2.6C1.25 7.61 1.25 8.878 1.25 10.5zm1.246-8.403a5.75 5.75 0 0 0-1.899 1.899l1.28.783a4.25 4.25 0 0 1 1.402-1.403zm7.02 17.993c-.202-.343-.38-.646-.554-.884a2.2 2.2 0 0 0-.682-.645l-.754 1.297c.047.028.112.078.224.232c.121.166.258.396.476.764zm-3.24-.349c.44.008.718.014.93.037c.198.022.275.054.32.08l.754-1.297a2.2 2.2 0 0 0-.909-.274c-.298-.033-.657-.038-1.069-.045zm6.498 1.113c.218-.367.355-.598.476-.764c.112-.154.177-.204.224-.232l-.754-1.297c-.29.17-.5.395-.682.645c-.173.238-.352.54-.555.884zm1.924-2.612c-.412.007-.771.012-1.069.045c-.311.035-.616.104-.909.274l.754 1.297c.045-.026.122-.058.32-.08c.212-.023.49-.03.93-.037z"}),k("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 11h.009m3.982 0H12m3.991 0H16"})],-1)])])}}),Po={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Mo=x({name:"solar-home-linear",render:function(e,t){return f(),_("svg",Po,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("path",{"stroke-linecap":"round",d:"M22 22H2m0-11l8.126-6.5a3 3 0 0 1 3.748 0L22 11m-6.5-5.5v-2A.5.5 0 0 1 16 3h2.5a.5.5 0 0 1 .5.5v5M4 22V9.5M20 22V9.5"}),k("path",{d:"M15 22v-5c0-1.414 0-2.121-.44-2.56C14.122 14 13.415 14 12 14s-2.121 0-2.56.44C9 14.878 9 15.585 9 17v5m5-12.5a2 2 0 1 1-4 0a2 2 0 0 1 4 0Z"})],-1)])])}}),Lo={class:"flex flex-col items-center justify-center gap-4 py-20 px-4 text-center bg-background border border-border sm:rounded-lg"},Oo={class:"text-sm text-endpoint"},Ro={key:0,class:"text-muted-foreground"},zo={class:"flex items-center gap-2"},Io=["href"],To={__name:"PageLoadError",props:{error:{type:Object,default:()=>({})},fallbackHref:{type:String,default:"/"}},emits:["retry"],setup(e,{emit:t}){const a=e,n=t,s=i(()=>!!window.history.state?.back);function o(){s.value?window.history.back():window.location.href=a.fallbackHref}return(t,a)=>(f(),_("div",Lo,[j(b(Eo),{class:"h-8 w-8 text-muted-foreground"}
2),k("p",Oo,[S(E(e.error.message||("__"in t?t.__:b(Lt))("Не удалось загрузить страницу"))+" ",1),e.error.status?(f(),_("span",Ro,"("+E(e.error.status)+")",1)):A("",!0)]),k("div",zo,[k("button",{type:"button",class:"h-9 px-3 inline-flex items-center gap-2 rounded-full border border-border text-sm hover:bg-accent base-transition",onClick:a[0]||(a[0]=e=>n("retry"))},[j(b(Co),{class:"h-4 w-4"}),S(" "+E(("__"in t?t.__:b(Lt))("Повторить")),1)]),s.value?(f(),_("button",{key:0,type:"button",class:"h-9 px-3 inline-flex items-center gap-2 rounded-full border border-border text-sm hover:bg-accent base-transition",onClick:o},E(("__"in t?t.__:b(Lt))("Назад")),1)):(f(),_("a",{key:1,href:e.fallbackHref,class:"h-9 px-3 inline-flex items-center gap-2 rounded-full border border-border text-sm hover:bg-accent base-transition"},[(f(),h(te("/messages"===e.fallbackHref?b(Ao):b(Mo)),{class:"h-4 w-4"})),S(" "+E("/messages"===e.fallbackHref?("__"in t?t.__:b(Lt))("К чатам"):("__"in t?t.__:b(Lt))("На главную")),1)],8,Io))])]))}},$o={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},No=x({name:"solar-ufo-3-linear",render:function(e,t){return f(),_("svg",$o,[...t[0]||(t[0]=[M('<g fill="none"><path stroke="currentColor" stroke-width="1.5" d="M18.922 12.15c1.603 2.623 2.072 5 .98 6.091c-1.63 1.63-6.118-.214-10.023-4.12C5.974 10.217 4.129 5.73 5.759 4.1c1.092-1.092 3.468-.624 6.092.98"></path><path stroke="currentColor" stroke-width="1.5" d="M11.485 5.445a4.73 4.73 0 0 1 6.687 0l.384.383a4.73 4.73 0 0 1 0 6.688c-.126.125-.287.21-.461.178c-.496-.09-1.718-.56-3.974-2.815c-2.255-2.256-2.726-3.477-2.815-3.974c-.03-.174.053-.335.179-.46Z"></path><circle cx="12" cy="12" r="1" fill="currentColor" transform="rotate(45 12 12)"></circle><circle cx="9.171" cy="7.757" r="1" fill="currentColor" transform="rotate(45 9.171 7.757)"></circle><circle cx="16.243" cy="14.828" r="1" fill="currentColor" transform="rotate(45 16.243 14.828)"></circle><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="m3.636 20.364l4.121-4.122M10 22l2.707-2.222M2 14l2.222-2.707"></path></g>',1)])])}}),Bo={key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4"},Do={class:"relative z-10 w-full max-w-sm bg-card border border-border rounded-2xl shadow-2xl p-6"},Vo={class:"flex flex-col items-center text-center pt-2 pb-4"},Uo={class:"flex flex-col gap-2.5"},Fo=["href"],qo="registration_gate",Ho=Un({__name:"RegistrationGate",setup(e){const t=Mt(),a=t.auth?.user,n=o(!1);function s(e){if("undefined"!=typeof window)try{localStorage.setItem(qo,JSON.stringify(e))}catch(t){}}let i=function(){if("undefined"==typeof window)return{views:0,dismissedAt:0};try{const e=localStorage.getItem(qo);if(e)return JSON.parse(e)}catch(e){}return{views:0,dismissedAt:0}}();function r(){if(a)return!1;const e=i.views-i.dismissedAt,t=i.dismissedAt>0?5:8;return i.views>=t&&e>=t}function l(){a||(i.views++,s(i),r()&&(n.value=!0,document.body.style.overflow="hidden"))}function c(){i.dismissedAt=i.views,s(i),n.value=!1,document.body.style.overflow=""}function d(){n.value=!1,document.body.style.overflow=""}return C(()=>{r()&&(n.value=!0,document.body.style.overflow="hidden"),router.on("navigate",l),window.addEventListener("registration-gate:view",l)}),B(()=>{router.on("navigate",()=>{}),window.removeEventListener("registration-gate:view",l),document.body.style.overflow=""}),(e,t)=>(f(),h(q,{to:"body"},[j(F,{name:"gate-fade"},{default:g(()=>[n.value?(f(),_("div",Bo,[t[2]||(t[2]=k("div",{class:"absolute inset-0 bg-black/60 backdrop-blur-md"},null,-1)),k("div",Do,[k("button",{onClick:d,class:"absolute top-3 right-3 h-8 w-8 flex items-center justify-center rounded-lg text-muted-foreground hover:bg-accent base-transition"},[j(b(Ht),{class:"h-4 w-4"})]),k("div",Vo,[j(b(No),{class:"h-10 w-10 text-primary mb-3"}),t[0]||(t[0]=k("h2",{class:"text-lg font-semibold"},"Пора присоединиться!",-1)),t[1]||(t[1]=k("p",{class:"text-sm text-muted-foreground mt-1.5 leading-relaxed"},[S(" Ты посмотрел несколько публикаций."),k("br"),S(" Войди или зарегистрируйся, чтобы смотреть дальше,"),k("br"),S(" общаться и открыть все возможности. ")],-1))]),k("div",Uo,[k("a",{href:e.route("login"),class:"inline-flex items-center justify-center h-11 rounded-xl bg-primary text-primary-foreground text-sm font-medium hover:bg-primary/90 base-transition"}," Войти или зарегистрироваться ",8,Fo),k("button",{onClick:c,class:"text-xs text-muted-foreground hover:text-foreground base-transition pt-1"}," Продолжить без регистрации ")])])])):A("",!0)]),_:1})]))}},[["__scopeId","data-v-60358fbd"]]),Wo={key:0,class:"mb-3 p-4 bg-card/95 backdrop-blur border border-border rounded-lg shadow-sm"},Zo={class:"flex items-center justify-between gap-4"},Go={class:"flex items-center gap-2 shrink-0"},Ko=["href"],Qo=Un({__name:"GuestReminder",setup(e){const t=Mt(),a=t.auth?.user,n=o(!1),s=o(!1);let i=0,r=Date.now();function l(){if(a)return!1;if(s.value)return!1;const e=(Date.now()-r)/6e4;return i>=3||e>=2}function c(){a||(i++,l()&&(n.value=!0))}function d(){n.value=!1,s.value=!0}return C(()=>{r=Date.now(),i=0,l()&&(n.value=!0),router.on("navigate",c)}),B(()=>{router.on("navigate",()=>{})}),(e,t)=>(f(),h(F,{name:"slide-up"},{default:g(()=>[n.value?(f(),_("div",Wo,[k("div",Zo,[t[0]||(t[0]=k("div",{class:"flex-1"},[k("div",{class:"text-sm font-medium"},"Нравится на EntHub?"),k("div",{class:"text-sm text-muted-foreground"},"Зарегистрируйся, чтобы стать частью тусовки!")],-1)),k("div",Go,[k("a",{href:e.route("login"),class:"inline-flex items-center justify-center rounded-lg h-9 px-4 text-sm font-medium bg-primary text-primary-foreground hover:bg-primary/90 base-transition"}," Войти ",8,Ko),k("button",{onClick:d,class:"flex items-center justify-center h-9 w-9 rounded-lg hover:bg-accent base-transition shrink-0"},[j(b(Ht),{class:"h-4 w-4"})])])])])):A("",!0)]),_:1}))}},[["__scopeId","data-v-76191ae2"]]),Jo={key:0},Yo={class:"flex flex-col justify-center items-center overflow-hidden z-0 min-w-0 
2w-full sm:rounded-lg h-32"},Xo=["innerHTML"],ei={__name:"AdFeed",setup(e){const t=Mt(),a=o(t.advertisements?.feed||[]),n=o({});return C(()=>{"undefined"!=typeof window&&(window.yaContextCb=window.yaContextCb||[])}),P(()=>t.advertisements?.feed,e=>{a.value=e||[],H(()=>{(a.value||[]).forEach(e=>{!function(e){if("undefined"!=typeof window){if(e&&e.css_content){const t=`ad-${e.id}-css`;if(!document.head.querySelector(`style[data-ad-css-id="${t}"]`)){const a=document.createElement("style");a.type="text/css",a.setAttribute("data-ad-css-id",t),a.textContent=e.css_content,document.head.appendChild(a)}}if(e&&e.js_content&&n.value[e.id]){const a=n.value[e.id];a.innerHTML="",a.innerHTML=e.js_content,t=a,"undefined"!=typeof window&&t&&Array.from(t.querySelectorAll("script")).forEach(e=>{const a=document.createElement("script");Array.from(e.attributes).forEach(e=>{a.setAttribute(e.name,e.value)}),e.textContent&&(a.textContent=e.textContent),e.parentNode?e.parentNode.replaceChild(a,e):(console.warn("Ad script's original node has no parent. Appending to ad container instead.",e),t.appendChild(a))})}}var t}(e)})})},{immediate:!0,deep:!0}),(e,t)=>a.value&&a.value.length?(f(),_("div",Jo,[(f(!0),_(W,null,Z(a.value,e=>(f(),_("div",{key:e.id,class:"grid overflow-hidden items-center h-32 mb-5"},[k("div",Yo,[e.html_content?(f(),_("div",{key:0,innerHTML:e.html_content,class:"w-full h-full bg-background"},null,8,Xo)):A("",!0),e.js_content?(f(),_("div",{key:1,ref_for:!0,ref:t=>{t&&(n.value[e.id]=t)}},null,512)):A("",!0)])]))),128))])):A("",!0)}},ti=p({__name:"Sheet",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const a=L(e,t);return(e,t)=>(f(),h(b(ae),ne(se(b(a))),{default:g(()=>[v(e.$slots,"default")]),_:3},16))}}),ai=p({__name:"SheetTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,a)=>(f(),h(b(oe),ne(se(t)),{default:g(()=>[v(e.$slots,"default")]),_:3},16))}}),ni=p({__name:"SheetClose",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,a)=>(f(),h(b(ie),ne(se(t)),{default:g(()=>[v(e.$slots,"default")]),_:3},16))}}),si=p({__name:"SheetHeader",props:{class:{}},setup(e){const t=e;return(e,a)=>(f(),_("div",{class:y(b(Vt)("flex flex-col gap-y-2 p-6 border border-border text-left",t.class))},[v(e.$slots,"default")],2))}}),oi=p({__name:"SheetTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,a=i(()=>{const{class:e,...a}=t;return a});return(e,n)=>(f(),h(b(re),R({class:b(Vt)("text-lg font-semibold text-foreground",t.class)},a.value),{default:g(()=>[v(e.$slots,"default")]),_:3},16,["class"]))}}),ii=p({__name:"SheetDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,a=i(()=>{const{class:e,...a}=t;return a});return(e,n)=>(f(),h(b(le),R({class:b(Vt)("text-sm text-muted-foreground",t.class)},a.value),{default:g(()=>[v(e.$slots,"default")]),_:3},16,["class"]))}}),ri=d("fixed z-50 gap-4 bg-background shadow-xl transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-0 left-0 w-full h-full sm:inset-y-0 sm:top-0 sm:bottom-0 sm:left-0 sm:right-auto sm:w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-0 right-0 w-full h-full sm:inset-y-0 sm:top-0 sm:bottom-0 sm:right-0 sm:left-auto sm:w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),li=p({inheritAttrs:!1,__name:"SheetContent",props:{class:{},side:{},closeIcon:{type:Boolean},blurred:{type:Boolean,default:!0},preventBottomOnSmall:{type:Boolean,default:!1},forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const a=e,n=o(a.side);function s(){try{const e="undefined"!=typeof window?window.innerWidth:1024;!a.preventBottomOnSmall&&e<640&&("left"===a.side||"right"===a.side)?n.value="bottom":n.value=a.side}catch(e){n.value=a.side}}C(()=>{s();try{window.addEventListener("resize",s)}catch(e){}}),ee(()=>{try{window.removeEventListener("resize",s)}catch(e){}});const r=t,l=i(()=>{const{class:e,side:t,...n}=a;return n}),c=L(l,r);return(e,t)=>(f(),h(b(ce),null,{default:g(()=>[j(b(de),{class:y(["fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",{"bg-black/80 backdrop-blur-sm":a.blurred}])},null,8,["class"]),j(b(fe),R({class:b(Vt)(b(ri)({side:n.value}),a.class),style:function(){try{const t=void 0!==e.window?e.window.innerWidth:1024,a={touchAction:"pan-y"};return t<900?Object.assign(a,{transform:"none",left:"0px",right:"0px",width:"100vw",maxWidth:"100vw",borderRadius:"0px",paddingLeft:"env(safe-area-inset-left)",paddingRight:"env(safe-area-inset-right)",overscrollBehavior:"contain",WebkitOverflowScrolling:"touch"}):a}catch(t){return{touchAction:"pan-y"}}}()},{...b(c),...e.$attrs}),{default:g(()=>[v(e.$slots,"default"),ue(j(b(ie),{"aria-label":"Close",class:"absolute right-3 top-3 rounded-full p-2 opacity-90 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},{default:g(()=>[j(b(pe),{class:"w-5 h-5"})]),_:1},512),[[me,e.closeIcon]])]),_:3},16,["class","style"])]),_:3}))}}),ci=p({__name:"AvatarImage",props:{width:{},height:{},src:{},referrerPolicy:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,a)=>(f(),h(b(he),R(t,{width:t.width,height:t.height,class:"h-full w-full object-cover"}),null,16,["width","height"]))}}),di=p({__name:"AvatarFallback",props:{delayMs:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,a)=>(f(),h(b(ge),ne(se(t)),{default:g(()=>[v(e.$slots,"default")]),_:3},16))}}),ui=d("inline-flex items-center justify-center font-normal text-foreground select-none shrink-0 bg-secondary overflow-hidden",{variants:{size:{xs:"h-6 w-6 text-xs",sm:"h-10 w-10 text-xs",base:"h-16 w-16 text-2xl",lg:"h-32 w-32 text-5xl"},shape:{circle:"rounded-full",square:"rounded-md"}}}),mi=p({__name:"Avatar",props:{class:{},size:{default:"sm"},shape:{default:"circle"}},setup(e){const t=e;return(e,a)=>(f(),h(b(ve),{class:y(b(Vt)(b(ui)({size:e.size,shape:e.shape}),t.class))},{default:g(()=>[v(e.$slots,"default")]),_:3},8,["class"]))}}),pi={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},fi=x({name:"hugeicons-menu-02",render:function(e,t){return f(),_("svg",pi,[...t[0]||(t[0]=[k("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M4 5h12M4 12h16M4 19h8"},null,-1)])])}}),hi={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},gi=x({name:"solar-compass-linear",render:function(e,t){return f(),_("svg",hi,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("circle",{cx:"12",cy:"12",r:"10"}),k("path",{d:"M13.024 14.56c-2.31.924-3.465 1.386-4.124.938a1.5 1.5 0 0 1-.398-.398c-.448-.66.014-1.814.938-4.124c.197-.493.295-.74.465-.933q.065-.074.139-.138c.193-.17.44-.268.932
2-.465c2.31-.924 3.464-1.386 4.124-.938a1.5 1.5 0 0 1 .398.398c.448.66-.014 1.814-.938 4.124c-.197.493-.296.739-.465.932a2 2 0 0 1-.139.139c-.193.17-.44.268-.932.465Z"})],-1)])])}}),vi={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},yi=x({name:"solar-ufo-linear",render:function(e,t){return f(),_("svg",vi,[...t[0]||(t[0]=[M('<g fill="none"><path stroke="currentColor" stroke-width="1.5" d="M17 8.21c2.989.723 5 2.071 5 3.616C22 14.131 17.523 16 12 16S2 14.13 2 11.826c0-1.545 2.011-2.893 5-3.615"></path><path stroke="currentColor" stroke-width="1.5" d="M7 8.729A4.73 4.73 0 0 1 11.729 4h.542A4.73 4.73 0 0 1 17 8.729c0 .177-.054.35-.2.451c-.414.288-1.61.82-4.8.82s-4.386-.532-4.8-.82c-.146-.1-.2-.274-.2-.451Z"></path><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M12 16v3m-6.5-3.5l-1 2m14-2l1 2"></path><circle cx="12" cy="13" r="1" fill="currentColor"></circle><circle cx="7" cy="12" r="1" fill="currentColor"></circle><circle cx="17" cy="12" r="1" fill="currentColor"></circle></g>',1)])])}}),bi={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"},wi=x({name:"logos-facebook",render:function(e,t){return f(),_("svg",bi,[...t[0]||(t[0]=[k("path",{fill:"#1877F2",d:"M256 128C256 57.308 198.692 0 128 0S0 57.308 0 128c0 63.888 46.808 116.843 108 126.445V165H75.5v-37H108V99.8c0-32.08 19.11-49.8 48.348-49.8C170.352 50 185 52.5 185 52.5V84h-16.14C152.959 84 148 93.867 148 103.99V128h35.5l-5.675 37H148v89.445c61.192-9.602 108-62.556 108-126.445"},null,-1),k("path",{fill:"#FFF",d:"m177.825 165l5.675-37H148v-24.01C148 93.866 152.959 84 168.86 84H185V52.5S170.352 50 156.347 50C127.11 50 108 67.72 108 99.8V128H75.5v37H108v89.445A129 129 0 0 0 128 256a129 129 0 0 0 20-1.555V165z"},null,-1)])])}}),xi={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},_i=x({name:"hugeicons-new-twitter",render:function(e,t){return f(),_("svg",xi,[...t[0]||(t[0]=[k("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m3 21l7.548-7.548M21 3l-7.548 7.548m0 0L8 3H3l7.548 10.452m2.904-2.904L21 21h-5l-5.452-7.548"},null,-1)])])}}),ki={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"},Ci=["id"],ji=["fill"],Ei=x({name:"logos-telegram",render:function(e,t){return f(),_("svg",ki,[k("defs",null,[k("linearGradient",{id:e.idMap.SVGuySfwdaH,x1:"50%",x2:"50%",y1:"0%",y2:"100%"},[...t[0]||(t[0]=[k("stop",{offset:"0%","stop-color":"#2AABEE"},null,-1),k("stop",{offset:"100%","stop-color":"#229ED9"},null,-1)])],8,Ci)]),k("path",{fill:"url(#"+e.idMap.SVGuySfwdaH+")",d:"M128 0C94.06 0 61.48 13.494 37.5 37.49A128.04 128.04 0 0 0 0 128c0 33.934 13.5 66.514 37.5 90.51C61.48 242.506 94.06 256 128 256s66.52-13.494 90.5-37.49c24-23.996 37.5-56.576 37.5-90.51s-13.5-66.514-37.5-90.51C194.52 13.494 161.94 0 128 0"},null,8,ji),t[1]||(t[1]=k("path",{fill:"#FFF",d:"M57.94 126.648q55.98-24.384 74.64-32.152c35.56-14.786 42.94-17.354 47.76-17.441c1.06-.017 3.42.245 4.96 1.49c1.28 1.05 1.64 2.47 1.82 3.467c.16.996.38 3.266.2 5.038c-1.92 20.24-10.26 69.356-14.5 92.026c-1.78 9.592-5.32 12.808-8.74 13.122c-7.44.684-13.08-4.912-20.28-9.63c-11.26-7.386-17.62-11.982-28.56-19.188c-12.64-8.328-4.44-12.906 2.76-20.386c1.88-1.958 34.64-31.748 35.26-34.45c.08-.338.16-1.598-.6-2.262c-.74-.666-1.84-.438-2.64-.258c-1.14.256-19.12 12.152-54 35.686c-5.1 3.508-9.72 5.218-13.88 5.128c-4.56-.098-13.36-2.584-19.9-4.708c-8-2.606-14.38-3.984-13.82-8.41c.28-2.304 3.46-4.662 9.52-7.072"},null,-1))])},setup:()=>({idMap:{SVGuySfwdaH:"uicons-"+Math.random().toString(36).substr(2,10)}})}),Si={viewBox:"0 0 256 290",width:"1.07em",height:"1.2em"},Ai=x({name:"logos-tiktok-icon",render:function(e,t){return f(),_("svg",Si,[...t[0]||(t[0]=[k("path",{fill:"#FF004F",d:"M189.72 104.421c18.678 13.345 41.56 21.197 66.273 21.197v-47.53a67 67 0 0 1-13.918-1.456v37.413c-24.711 0-47.59-7.851-66.272-21.195v96.996c0 48.523-39.356 87.855-87.9 87.855c-18.113 0-34.949-5.473-48.934-14.86c15.962 16.313 38.222 26.432 62.848 26.432c48.548 0 87.905-39.332 87.905-87.857v-96.995zm17.17-47.952c-9.546-10.423-15.814-23.893-17.17-38.785v-6.113h-13.189c3.32 18.927 14.644 35.097 30.358 44.898M69.673 225.607a40 40 0 0 1-8.203-24.33c0-22.192 18.001-40.186 40.21-40.186a40.3 40.3 0 0 1 12.197 1.883v-48.593c-4.61-.631-9.262-.9-13.912-.801v37.822a40.3 40.3 0 0 0-12.203-1.882c-22.208 0-40.208 17.992-40.208 40.187c0 15.694 8.997 29.281 22.119 35.9"},null,-1),k("path",{d:"M175.803 92.849c18.683 13.344 41.56 21.195 66.272 21.195V76.631c-13.794-2.937-26.005-10.141-35.186-20.162c-15.715-9.802-27.038-25.972-30.358-44.898h-34.643v189.843c-.079 22.132-18.049 40.052-40.21 40.052c-13.058 0-24.66-6.221-32.007-15.86c-13.12-6.618-22.118-20.206-22.118-35.898c0-22.193 18-40.187 40.208-40.187c4.255 0 8.356.662 12.203 1.882v-37.822c-47.692.985-86.047 39.933-86.047 87.834c0 23.912 9.551 45.589 25.053 61.428c13.985 9.385 30.82 14.86 48.934 14.86c48.545 0 87.9-39.335 87.9-87.857z"},null,-1),k("path",{fill:"#00F2EA",d:"M242.075 76.63V66.516a66.3 66.3 0 0 1-35.186-10.047a66.47 66.47 0 0 0 35.186 20.163M176.53 11.57a68 68 0 0 1-.728-5.457V0h-47.834v189.845c-.076 22.13-18.046 40.05-40.208 40.05a40.06 40.06 0 0 1-18.09-4.287c7.347 9.637 18.949 15.857 32.007 15.857c22.16 0 40.132-17.918 40.21-40.05V11.571zM99.966 113.58v-10.769a89 89 0 0 0-12.061-.818C39.355 101.993 0 141.327 0 189.845c0 30.419 15.467 57.227 38.971 72.996c-15.502-15.838-25.053-37.516-25.053-61.427c0-47.9 38.354-86.848 86.048-87.833"},null,-1)])])}}),Pi={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Mi=x({name:"hugeicons-instagram",render:function(e,t){return f(),_("svg",Pi,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor"},[k("path",{"stroke-linejoin":"round","stroke-width":"1.5",d:"M2.5 12c0-4.478 0-6.718 1.391-8.109S7.521 2.5 12 2.5c4.478 0 6.718 0 8.109 1.391S21.5 7.521 21.5 12c0 4.478 0 6.718-1.391 8.109S16.479 21.5 12 21.5c-4.478 0-6.718 0-8.109-1.391S2.5 16.479 2.5 12Z"}),k("path",{"stroke-width":"1.5",d:"M16.5 12a4.5 4.5 0 1 1-9 0a4.5 4.5 0 0 1 9 0Z"}),k("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17.508 6.5h-.01"})],-1)])])}}),Li={viewBox:"0 0 256 268",width:"1.16em",height:"1.2em"},Oi=x({name:"logos-twitch",render:function(e,t){return f(),_("svg",Li,[...t[0]||(t[0]=[k("path",{fill:"#5A3E85",d:"M17.458 0L0 46.556v186.201h63.983v34.934h34.931l34.898-34.934h52.36L256 162.954V0zm23.259 23.263H232.73v128.029l-40.739 40.741H128L93.113 226.92v-34.886H40.717zm64.008 116.405H128V69.844h-23.275zm63.997 0h23.27V69.844h-23.27z"},null,-1)])])}}),Ri={viewBox:"0 0 256 199",width:"1.55em",height:"1.2em"},zi=x({name:"logos-discord-icon",render:function(e,t){return f(),_("svg",Ri,[...t[0]||(t[0]=[k("path",{fill:"#5865F2",d:"M216.856 16.597A208.5 208.5 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046q-29.538-4.442-58.533 0c-1.832-4.4-4.55-9.933-6.846-14.046a207.8 207.8 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161 161 0 0 0 79.735 175.3a136.4 136.4 0 0 1-21.846-10.632a109 109 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a132 132 0 0 0 5.355 4.237a136 136 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848c21.142-6.58 42.646-16.637 64.815-33.213c5.316-56.288-9.08-105.09-38.056-148.36M85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2s23.236 11.804 23.015 26.2c.02 14.375-10.148 26.18-23.015 26.18m85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2c0 14.375-10.148 26.18-23.015 26.18"},null,-1)])])}}),Ii={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Ti=x({name:"hugeicons-vk",render:function(e,t){return f(),_("svg",Ii,[...t[0]||(t[0]=[k("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M2 5.5h3.5c0 8 4.5 9 4.5 9l.002-9h3.5l-.003 5c4.5-2 5-5 5-5H22s-1 4.5-4.906 6.653C19.11 13.351 21.268 15.331 22 18.5h-3.5s-1-3-5-4.5l.002 4.5C1.887 18.5 2.002 7.5 2 5.5"},null,-1)])])}}
2),$i={viewBox:"0 0 256 180",width:"1.72em",height:"1.2em"},Ni=x({name:"logos-youtube-icon",render:function(e,t){return f(),_("svg",$i,[...t[0]||(t[0]=[k("path",{fill:"red",d:"M250.346 28.075A32.18 32.18 0 0 0 227.69 5.418C207.824 0 127.87 0 127.87 0S47.912.164 28.046 5.582A32.18 32.18 0 0 0 5.39 28.24c-6.009 35.298-8.34 89.084.165 122.97a32.18 32.18 0 0 0 22.656 22.657c19.866 5.418 99.822 5.418 99.822 5.418s79.955 0 99.82-5.418a32.18 32.18 0 0 0 22.657-22.657c6.338-35.348 8.291-89.1-.164-123.134"},null,-1),k("path",{fill:"#FFF",d:"m102.421 128.06l66.328-38.418l-66.328-38.418z"},null,-1)])])}}),Bi={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"},Di=x({name:"logos-linkedin-icon",render:function(e,t){return f(),_("svg",Bi,[...t[0]||(t[0]=[k("path",{fill:"#0A66C2",d:"M218.123 218.127h-37.931v-59.403c0-14.165-.253-32.4-19.728-32.4c-19.756 0-22.779 15.434-22.779 31.369v60.43h-37.93V95.967h36.413v16.694h.51a39.91 39.91 0 0 1 35.928-19.733c38.445 0 45.533 25.288 45.533 58.186zM56.955 79.27c-12.157.002-22.014-9.852-22.016-22.009s9.851-22.014 22.008-22.016c12.157-.003 22.014 9.851 22.016 22.008A22.013 22.013 0 0 1 56.955 79.27m18.966 138.858H37.95V95.967h37.97zM237.033.018H18.89C8.58-.098.125 8.161-.001 18.471v219.053c.122 10.315 8.576 18.582 18.89 18.474h218.144c10.336.128 18.823-8.139 18.966-18.474V18.454c-.147-10.33-8.635-18.588-18.966-18.453"},null,-1)])])}}),Vi={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Ui=x({name:"simple-icons-boosty",render:function(e,t){return f(),_("svg",Vi,[...t[0]||(t[0]=[k("path",{fill:"currentColor",d:"M2.661 14.337L6.801 0h6.362L11.88 4.444l-.038.077l-3.378 11.733h3.15q-1.982 4.934-3.086 7.733c-5.816-.063-7.442-4.228-6.02-9.155M8.554 24l7.67-11.035h-3.25l2.83-7.073c4.852.508 7.137 4.33 5.791 8.952C20.16 19.81 14.344 24 8.68 24h-.127z"},null,-1)])])}}),Fi={viewBox:"0 0 256 247",width:"1.25em",height:"1.2em"},qi=x({name:"logos-patreon",render:function(e,t){return f(),_("svg",Fi,[...t[0]||(t[0]=[k("path",{fill:"#FF424D",d:"M45.136 0v246.35H0V0zm118.521 0C214.657 0 256 41.343 256 92.343s-41.343 92.343-92.343 92.343s-92.343-41.344-92.343-92.343S112.658 0 163.657 0"},null,-1)])])}}),Hi={class:"flex flex-col gap-1"},Wi={class:"line-clamp-1"},Zi={class:"line-clamp-1"},Gi={class:"line-clamp-1"},Ki={class:"line-clamp-1"},Qi={class:"line-clamp-1"},Ji=["onClick"],Yi=["src"],Xi={class:"line-clamp-1"},er={key:0,class:"ml-2 text-xs text-primary"},tr={class:"rounded-lg p-3 flex flex-col justify-end gap-3 mt-auto"},ar={key:0,class:"flex flex-wrap items-center gap-1"},nr=["href"],sr=["href"],or=["href"],ir=["href"],rr=["href"],lr=["href"],cr=["href"],dr=["href"],ur=["href"],mr=["href"],pr=["href"],fr=["href"],hr={class:"flex flex-wrap gap-1.5 text-[13px] text-endpoint"},gr={class:"line-clamp-1"},vr={class:"line-clamp-1"},yr={class:"flex items-center gap-x-1"},br={class:"line-clamp-1"},wr={__name:"SidebarContent",setup(e){const t=$(),a=Mt(),n=i(()=>t.currentRoute.value.path),s=a.sidebarCommunities,o=a.sidebarFooterMenu,r=a.settings?.social_media_links,l=a.settings?.general?.site_name,c=a.auth.user,d=i(()=>"/my"===n.value),u=i(()=>"/"===n.value||"/active"===n.value||n.value.startsWith("/top/")),m=i(()=>n.value.startsWith("/explore")||n.value.startsWith("/search")),p=i(()=>"/communities"===n.value),v=e=>n.value===`/c/${e}/settings`,w=i(()=>n.value.startsWith("/projects"));return(e,t)=>{const a=ci,i=di,x=mi,C=D("router-link");return f(),_(W,null,[k("div",Hi,[b(c)?(f(),_("button",{key:0,type:"button",onClick:t[0]||(t[0]=e=>b(gn)("/my")),class:y(["flex items-center gap-3 h-12 px-3 min-w-0 base-transition rounded-xl dark:text-foreground w-full text-left",d.value?"bg-background":"hover:bg-background"])},[j(x,{class:"w-6 h-6"},{default:g(()=>[j(a,{src:b(c).avatar_url,alt:b(c).username},null,8,["src","alt"]),j(i,null,{default:g(()=>[S(E(b(c).username),1)]),_:1})]),_:1}),k("span",Wi,E(("__"in e?e.__:b(Lt))("My feed")),1)],2)):A("",!0),k("button",{type:"button",onClick:t[1]||(t[1]=e=>b(gn)("/")),class:y(["flex items-center gap-3 h-12 px-3 min-w-0 base-transition rounded-xl dark:text-foreground w-full text-left",u.value?"bg-background":"hover:bg-background"])},[j(b(Oa),{class:y(["h-6 w-6 shrink-0",u.value?"text-primary":"text-muted-foreground"])},null,8,["class"]),k("span",Zi,E(("__"in e?e.__:b(Lt))("Feed")),1)],2),j(C,{to:e.route("explore"),onClick:t[2]||(t[2]=V(t=>b(gn)(e.route("explore")),["prevent"])),class:y(["flex items-center gap-3 h-12 px-3 min-w-0 base-transition rounded-xl dark:text-foreground",m.value?"bg-background":"hover:bg-background"])},{default:g(()=>
2[j(b(gi),{class:y(["h-6 w-6 shrink-0",m.value?"text-primary":"text-muted-foreground"])},null,8,["class"]),k("span",Gi,E(("__"in e?e.__:b(Lt))("Explore")),1)]),_:1},8,["to","class"]),j(C,{to:e.route("projects.index"),onClick:t[3]||(t[3]=V(t=>b(gn)(e.route("projects.index")),["prevent"])),class:y(["flex items-center gap-3 h-12 px-3 min-w-0 base-transition rounded-xl dark:text-foreground",w.value?"bg-background":"hover:bg-background"])},{default:g(()=>[j(b(yi),{class:y(["h-6 w-6 shrink-0",w.value?"text-primary":"text-muted-foreground"])},null,8,["class"]),k("span",Ki,E(("__"in e?e.__:b(Lt))("Showcase")),1)]),_:1},8,["to","class"]),j(C,{to:e.route("communities"),onClick:t[4]||(t[4]=V(t=>b(gn)(e.route("communities")),["prevent"])),class:y(["flex items-center gap-3 h-12 px-3 min-w-0 base-transition rounded-xl dark:text-foreground",p.value?"bg-background":"hover:bg-background"])},{default:g(()=>[j(b(Qa),{class:y(["h-6 w-6 shrink-0",p.value?"text-primary":"text-muted-foreground"])},null,8,["class"]),k("span",Qi,E(("__"in e?e.__:b(Lt))("Communities")),1)]),_:1},8,["to","class"]),(f(!0),_(W,null,Z(b(s),e=>{return f(),_("button",{key:e.id,type:"button",onClick:t=>b(gn)(`/c/${e.slug}`),class:y(["flex items-center gap-3 h-12 px-3 min-w-0 base-transition rounded-xl dark:text-foreground w-full text-left",(t=e.slug,n.value===`/c/${t}`||n.value===`/c/${t}/about`||n.value===`/c/${t}/top`||n.value===`/c/${t}/settings`?"bg-background":"hover:bg-background")])},[k("img",{src:e.avatar_url,alt:"community",width:"28",height:"28",class:"w-7 h-7 shrink-0 rounded-full"},null,8,Yi),k("span",Xi,E(e.name),1),v(e.slug)?(f(),_("span",er,"(Settings)")):A("",!0)],10,Ji);var t}),128))]),k("div",tr,[Object.keys(b(o)).length>0?(f(),_("div",ar,[(f(!0),_(W,null,Z(b(r),(e,t)=>(f(),_(W,{key:t},["facebook"===t&&e?(f(),_("a",{key:0,href:e,target:"_blank",title:"Facebook",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(wi),{class:"h-4 w-4"})],8,nr)):A("",!0),"twitter_x"===t&&e?(f(),_("a",{key:1,href:e,target:"_blank",title:"X Corp.",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(_i),{class:"h-4 w-4"})],8,sr)):A("",!0),"instagram"===t&&e?(f(),_("a",{key:2,href:e,target:"_blank",title:"Instagram",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(Mi),{class:"h-4 w-4 text-[#d62976]"})],8,or)):A("",!0),"tiktok"===t&&e?(f(),_("a",{key:3,href:e,target:"_blank",title:"Tiktok",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(Ai),{class:"h-4 w-4"})],8,ir)):A("",!0),"twitch"===t&&e?(f(),_("a",{key:4,href:e,target:"_blank",title:"Twitch",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(Oi),{class:"h-4 w-4"})],8,rr)):A("",!0),"discord"===t&&e?(f(),_("a",{key:5,href:e,target:"_blank",title:"Discord",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(zi),{class:"h-4 w-4"})],8,lr)):A("",!0),"vk"===t&&e?(f(),_("a",{key:6,href:e,target:"_blank",title:"VK",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(Ti),{class:"h-4 w-4 text-[#0077ff]"})],8,cr)):A("",!0),"telegram"===t&&e?(f(),_("a",{key:7,href:e,target:"_blank",title:"Telegram",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(Ei),{class:"h-4 w-4"})],8,dr)):A("",!0),"youtube"===t&&e?(f(),_("a",{key:8,href:e,target:"_blank",title:"Youtube",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(Ni),{class:"h-4 w-4"})],8,ur)):A("",!0),"linkedin"===t&&e?(f(),_("a",{key:9,href:e,target:"_blank",title:"Linkedin",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(Di),{class:"h-4 w-4"})],8,mr)):A("",!0),"boosty"===t&&e?(f(),_("a",{key:10,href:e,target:"_blank",title:"Boosty",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(Ui),{class:"h-4 w-4 text-[#F15F2C]"})],8,pr)):A("",!0),"patreon"===t&&e?(f(),_("a",{key:11,href:e,target:"_blank",title:"Patreon",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(qi),{class:"h-4 w-4"})],8,fr)):A("",!0)],64))),128))])):A("",!0),t[5]||(t[5]=M('<div class="flex flex-col gap-1"><span class="text-xs text-muted-foreground">Приложение доступно в:</span><div class="flex items-center gap-2"><a href="https://play.google.com/store/apps/details?id=it.enthub.hubapp" target="_blank" class="inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-1 text-xs font-medium text-secondary-foreground hover:bg-secondary/80 base-transition"> Google Play </a><a href="https://apps.apple.com/ru/app/enthub/id6771769037" target="_blank" class="inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-1 text-xs font-medium text-secondary-foreground hover:bg-secondary/80 base-transition"> App Store </a></div></div>',1)),k("nav",hr,[(f(!0),_(W,null,Z(b(o),t=>(f(),h(C,{key:t.id,to:e.route("page.show",{page:t.slug}),class:"hover:text-primary dark:hover:text-primary base-transition"},{default:g(()=>
2[k("span",gr,E(t.title),1)]),_:2},1032,["to"]))),128)),j(C,{to:e.route("contact.show"),class:"hover:text-primary dark:hover:text-primary base-transition"},{default:g(()=>[k("span",vr,E(("__"in e?e.__:b(Lt))("Contact us")),1)]),_:1},8,["to"]),k("div",yr,[k("span",br,"© "+E((new Date).getFullYear()+" "+b(l)),1)])])])],64)}}},xr={class:"hidden md:block xl:hidden md:col-start-1"},_r={class:"sticky top-20"},kr={class:"flex flex-col items-center gap-1 w-full pt-1"},Cr=["title"],jr=["title"],Er=["title"],Sr=["title","onClick"],Ar=["src","alt"],Pr={class:"overflow-y-auto max-h-[100vh] flex flex-col gap-4 px-2 py-4 -webkit-overflow-scrolling-touch"},Mr={__name:"SidebarRail",setup(e){const t=Mt(),a=N(),n=i(()=>a.path),s=t.auth.user,r=t.sidebarCommunities,l=o(!1),c=i(()=>"/my"===n.value),d=i(()=>"/"===n.value||"/active"===n.value||n.value.startsWith("/top/")),u=i(()=>n.value.startsWith("/explore")||n.value.startsWith("/search")),m=i(()=>"/communities"===n.value),p=i(()=>n.value.startsWith("/projects"));P(()=>a.fullPath,()=>{l.value=!1});const h=e=>["h-11 w-11 shrink-0 flex items-center justify-center rounded-xl base-transition",e?"bg-background":"hover:bg-background"];return(e,t)=>{const a=ci,o=di,i=mi,v=D("router-link"),w=oi,x=ii,C=si,P=ye,M=li,L=ti;return f(),_("aside",xr,[k("div",_r,[k("nav",kr,[k("button",{type:"button",class:y(h(l.value)),title:("__"in e?e.__:b(Lt))("Menu"),onClick:t[0]||(t[0]=e=>l.value=!0)},[j(b(fi),{class:"h-6 w-6 text-muted-foreground"}),t[7]||(t[7]=k("span",{class:"sr-only"},"menu",-1))],10,Cr),b(s)?(f(),_("button",{key:0,type:"button",class:y(h(c.value)),title:("__"in e?e.__:b(Lt))("My feed"),onClick:t[1]||(t[1]=e=>b(gn)("/my"))},[j(i,{class:"w-6 h-6"},{default:g(()=>[j(a,{src:b(s).avatar_url,alt:b(s).username},null,8,["src","alt"]),j(o,null,{default:g(()=>[S(E(b(s).username),1)]),_:1})]),_:1})],10,jr)):A("",!0),k("button",{type:"button",class:y(h(d.value)),title:("__"in e?e.__:b(Lt))("Feed"),onClick:t[2]||(t[2]=e=>b(gn)("/"))},[j(b(Oa),{class:y(["h-6 w-6",d.value?"text-primary":"text-muted-foreground"])},null,8,["class"])],10,Er),j(v,{to:e.route("explore"),onClick:t[3]||(t[3]=V(t=>b(gn)(e.route("explore")),["prevent"])),class:y(h(u.value)),title:("__"in e?e.__:b(Lt))("Explore")},{default:g(()=>[j(b(gi),{class:y(["h-6 w-6",u.value?"text-primary":"text-muted-foreground"])},null,8,["class"])]),_:1},8,["to","class","title"]),j(v,{to:e.route("projects.index"),onClick:t[4]||(t[4]=V(t=>b(gn)(e.route("projects.index")),["prevent"])),class:y(h(p.value)),title:("__"in e?e.__:b(Lt))("Showcase")},{default:g(()=>[j(b(yi),{class:y(["h-6 w-6",p.value?"text-primary":"text-muted-foreground"])},null,8,["class"])]),_:1},8,["to","class","title"]),j(v,{to:e.route("communities"),onClick:t[5]||(t[5]=V(t=>b(gn)(e.route("communities")),["prevent"])),class:y(h(m.value)),title:("__"in e?e.__:b(Lt))("Communities")},{default:g(()=>[j(b(Qa),{class:y(["h-6 w-6",m.value?"text-primary":"text-muted-foreground"])},null,8,["class"])]),_:1},8,["to","class","title"]),(f(!0),_(W,null,Z(b(r),e=>{return f(),_("button",{key:e.id,type:"button",class:y(h((t=e.slug,n.value===`/c/${t}`||n.value===`/c/${t}/about`||n.value===`/c/${t}/top`||n.value===`/c/${t}/settings`))),title:e.name,onClick:t=>b(gn)(`/c/${e.slug}`)},[k("img",{src:e.avatar_url,alt:e.name,width:"26",height:"26",class:"w-[26px] h-[26px] rounded-full"},null,8,Ar)],10,Sr);var t}),128))])]),j(L,{open:l.value,"onUpdate:open":t[6]||(t[6]=e=>l.value=e)},{default:g(()=>[j(M,{side:"left",class:"w-full sm:w-[320px]","close-icon":!0,"prevent-bottom-on-small":""},{default:g(()=>[j(P,null,{default:g(()=>[j(C,null,{default:g(()=>[j(w),j(x)]),_:1})]),_:1}),k("div",Pr,[j(wr)])]),_:1})]),_:1},8,["open"])])}}},Lr={class:"hidden xl:block xl:col-start-1"},Or={class:"sticky top-20"},Rr={__name:"Sidebar",setup(e){const t=Mt(),a=N(),n=t.auth.user,s=Ma(),i=o(0),r=o(!1),l=()=>{"undefined"!=typeof window&&(i.value=window.innerHeight,r.value=i.value<=1040)},c=async()=>{if(t.auth?.user?.id&&n)try{const e=await axios.get("/messages");if(Array.isArray(e.data.data)){const t=e.data.data.reduce((e,t)=>e+(t.unread_count||0),0);s.setUnreadedMessagesCount(t)}}catch(e){console.error("Error fetching chats:",e)}};return P(()=>a.path,e=>{e.startsWith("/messages")&&s.resetUnreadedMessages()}),C(()=>
2{if(l(),window.addEventListener("resize",l),t.auth?.user?.id&&n&&window.Echo)try{Echo.private(`App.Models.User.${t.auth.user.id}`).listen(".message.created",()=>{c()}).listen(".message.updated",()=>{c()}).listen(".messages.read",()=>{c()})}catch(e){console.error("Echo connection failed:",e)}}),ee(()=>{window.removeEventListener("resize",l)}),(e,t)=>(f(),_("aside",Lr,[k("div",Or,[k("div",{class:y(["h-[calc(100vh-6rem)] overflow-y-auto max-h-full flex flex-col gap-4 pr-4 overflow-scrolling-touch",r.value?"base-scrollbar":"hide-scrollbar"])},[j(wr)],2)])]))}},zr=p({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const a=L(e,t);return(e,t)=>(f(),h(b(be),ne(se(b(a))),{default:g(()=>[v(e.$slots,"default")]),_:3},16))}}),Ir=p({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const a=e,n=t,s=i(()=>{const{class:e,...t}=a;return t}),o=L(s,n);return(e,t)=>(f(),h(b(we),null,{default:g(()=>[j(b(xe),R(b(o),{class:b(Vt)("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a.class)}),{default:g(()=>[v(e.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),Tr=p({__name:"DropdownMenuItemLink",props:{href:{type:String,required:!0},icon:Object,color:String},setup(e){const t=e;return(e,a)=>{const n=D("router-link");return f(),h(n,{to:t.href,class:"relative flex w-full select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50"},{default:g(()=>[(f(),h(te(t.icon),{class:y(["h-4 w-4 mr-2",t.color])},null,8,["class"])),k("div",{class:y(t.color)},[v(e.$slots,"default")],2)]),_:3},8,["to"])}}}),$r=p({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(e){const t=e,a=i(()=>{const{class:e,...a}=t;return a}),n=_e(a);return(e,a)=>(f(),h(b(ke),R(b(n),{class:b(Vt)("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e.inset&&"pl-8",t.class)}),{default:g(()=>[v(e.$slots,"default")]),_:3},16,["class"]))}}),Nr=p({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(e){const t=e,a=i(()=>{const{class:e,...a}=t;return a}),n=_e(a);return(e,a)=>(f(),h(b(Ce),R(b(n),{class:b(Vt)("px-2 py-1.5 text-sm font-semibold",e.inset&&"pl-8",t.class)}),{default:g(()=>[v(e.$slots,"default")]),_:3},16,["class"]))}}),Br=p({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,a=i(()=>{const{class:e,...a}=t;return a});return(e,n)=>(f(),h(b(je),R(a.value,{class:b(Vt)("-mx-1 my-1 h-px bg-border",t.class)}),null,16,["class"]))}}),Dr=p({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=_e(e);return(e,a)=>(f(),h(b(Ee),R({class:"outline-none"},b(t)),{default:g(()=>[v(e.$slots,"default")]),_:3},16))}}),Vr={class:"overflow-y-auto max-h-[100vh] px-3 py-4 -webkit-overflow-scrolling-touch"},Ur={__name:"SidebarWidgetsSheet",props:{widgets:{type:Array,default:()=>[]},showAds:{type:Boolean,default:!0}},setup(e){const t=N(),a=o(!1);return P(()=>t.fullPath,()=>{a.value=!1}),(t,n)=>{const s=ai,o=oi,i=ii,r=si,l=ye,c=li,d=ti;return e.widgets.length?(f(),h(d,{key:0,open:a.value,"onUpdate:open":n[0]||(n[0]=e=>a.value=e)},{default:g(()=>[j(s,{"as-child":""},{default:g(()=>[...n[1]||(n[1]=[k("button",{type:"button",title:"Виджеты",class:"hidden md:flex xl:hidden items-center justify-center h-10 w-10 rounded-full hover:bg-primary/5 base-transition shrink-0"},[k("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6",class:"h-5 w-5 shrink-0"},[k("rect",{x:"3",y:"4",width:"18",height:"16",rx:"3"}),k("path",{d:"M15 4v16"}),k("path",{d:"M17.4 9.5h1.6M17.4 12h1.6","stroke-linecap":"round"})]),k("span",{class:"sr-only"},"widgets")],-1)])]),_:1}),j(c,{side:"right",class:"w-full sm:w-[380px] sm:max-w-[380px] bg-deeper","close-icon":!0,"prevent-bottom-on-small":""},{default:g(()=>[j(l,null,{default:g(()=>[j(r,null,{default:g(()=>[j(o),j(i)]),_:1})]),_:1}),k("div",Vr,[j(_o,{widgets:e.widgets,"show-ads":e.showAds},null,8,["widgets","show-ads"])])]),_:1})]),_:1},8,["open"])):A("",!0)}}},Fr=p({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const a=L(e,t);return(e,t)=>(f(),h(b(Se),ne(se(b(a))),{default:g(()=>[v(e.$slots,"default")]),_:3},16))}}),qr=p({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{default:4},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const a=e,n=t,s=i(()=>{const{class:e,...t}=a;return t}),o=L(s,n);return(e,t)=>(f(),h(b(Ae),null,{default:g(()=>[j(b(Pe),R({...b(o),...e.$attrs},{class:b(Vt)("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
2de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a.class)}),{default:g(()=>[v(e.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),Hr=p({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,a)=>(f(),h(b(Me),ne(se(t)),{default:g(()=>[v(e.$slots,"default")]),_:3},16))}}),Wr={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Zr=x({name:"solar-menu-dots-bold",render:function(e,t){return f(),_("svg",Wr,[...t[0]||(t[0]=[k("path",{fill:"currentColor",d:"M7 12a2 2 0 1 1-4 0a2 2 0 0 1 4 0m7 0a2 2 0 1 1-4 0a2 2 0 0 1 4 0m7 0a2 2 0 1 1-4 0a2 2 0 0 1 4 0"},null,-1)])])}}),Gr={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Kr=x({name:"solar-check-read-linear",render:function(e,t){return f(),_("svg",Gr,[...t[0]||(t[0]=[k("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m4 12.9l3.143 3.6L15 7.5m5 .063l-8.572 9L11 16"},null,-1)])])}}),Qr={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Jr=x({name:"solar-trash-bin-trash-linear",render:function(e,t){return f(),_("svg",Qr,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("path",{"stroke-linecap":"round",d:"M20.5 6h-17m15.333 2.5l-.46 6.9c-.177 2.654-.265 3.981-1.13 4.79s-2.196.81-4.856.81h-.774c-2.66 0-3.991 0-4.856-.81c-.865-.809-.954-2.136-1.13-4.79l-.46-6.9M9.5 11l.5 5m4.5-5l-.5 5"}),k("path",{d:"M6.5 6h.11a2 2 0 0 0 1.83-1.32l.034-.103l.097-.291c.083-.249.125-.373.18-.479a1.5 1.5 0 0 1 1.094-.788C9.962 3 10.093 3 10.355 3h3.29c.262 0 .393 0 .51.019a1.5 1.5 0 0 1 1.094.788c.055.106.097.23.18.479l.097.291A2 2 0 0 0 17.5 6"})],-1)])])}}),Yr={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Xr=x({name:"solar-arrow-right-linear",render:function(e,t){return f(),_("svg",Yr,[...t[0]||(t[0]=[k("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M4 12h16m0 0l-6-6m6 6l-6 6"},null,-1)])])}}),el={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},tl=x({name:"solar-alarm-linear",render:function(e,t){return f(),_("svg",el,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("circle",{cx:"12",cy:"13",r:"9"}),k("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v4l2.5 2.5m-11-11l4-2.5m13 2.5l-4-2.5"})],-1)])])}}),al={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},nl=x({name:"solar-chat-round-dots-line-duotone",render:function(e,t){return f(),_("svg",al,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor"},[k("path",{"stroke-width":"1.5",d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12c0 1.6.376 3.112 1.043 4.453c.178.356.237.763.134 1.148l-.595 2.226a1.3 1.3 0 0 0 1.591 1.592l2.226-.596a1.63 1.63 0 0 1 1.149.133A9.96 9.96 0 0 0 12 22Z"}),k("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 12h.009m3.982 0H12m3.991 0H16",opacity:".5"})],-1)])])}}),sl={class:"relative shrink-0"},ol=["src","alt"],il={__name:"NotificationAvatarBadge",props:{src:{type:String,required:!0},alt:{type:String,default:"avatar"},icon:{type:Object,required:!0},bgColor:{type:String,default:"bg-primary"}},setup:e=>(t,a)=>(f(),_("div",sl,[k("img",{src:e.src,alt:e.alt,class:"h-8 w-8 rounded-full bg-background"},null,8,ol),k("div",{class:y(["absolute -bottom-0.5 -right-1 h-4 w-4 rounded-full shadow-sm ring-2 ring-background flex items-center justify-center pointer-events-none",e.bgColor])},[(f(),h(te(e.icon),{class:"h-2.5 w-2.5 text-white"}))],2)]))},rl=["data-destination"],ll={class:"flex items-center justify-between w-full gap-x-2"},cl={class:"flex items-start grow gap-x-3"},dl=["href"],ul={class:"flex flex-col text-left min-w-0"},ml={class:"text-endpoint text-xs flex items-center gap-x-1"},pl={class:"flex items-baseline gap-1 text-foreground flex-wrap"},fl={class:"font-semibold"},hl={class:"truncate max-w-[120px]"},gl={class:"line-clamp-2 text-endpoint"},vl={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},yl={__name:"Comment",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),n=e,s=t,o=i(()=>
2n.notification.data.user.name?n.notification.data.user.name:"@"+n.notification.data.user.nickname),r=i(()=>"App\\Models\\GameProject"===n.notification.data?.commentable_type),l=i(()=>"App\\Models\\Idea"===n.notification.data?.commentable_type),c=i(()=>r.value?`${route("projects.show",n.notification.data.project.slug)}#comment-${n.notification.data.comment.id}`:l.value?`${route("ideas.show",n.notification.data.idea.slug)}#comment-${n.notification.data.comment.id}`:`${route("story.show",n.notification.data.story.slug)}#comment-${n.notification.data.comment.id}`),d=async e=>{e.preventDefault();const t=e.currentTarget.getAttribute("data-destination");try{s("notification-read",n.notification.id),a.push(t)}catch(o){console.error("Failed to handle notification click:",o)}};return(t,n)=>"comment"===e.notification.data?.type?(f(),_("button",{key:0,onClick:d,"data-destination":c.value,class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",ll,[k("div",cl,[k("a",{href:`/u/${e.notification.data.user.nickname||e.notification.data.user.username}`,class:"shrink-0",tabindex:"0",onClick:n[0]||(n[0]=V(n=>{void 0!==t.isOpen&&(t.isOpen.value=!1),b(a).push(`/u/${e.notification.data.user.nickname||e.notification.data.user.username}`)},["prevent","stop"]))},[j(il,{src:e.notification.data.user.avatar,icon:b(nl),bgColor:"bg-emerald-500"},null,8,["src","icon"])],8,dl),k("div",ul,[k("div",ml,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at.human),1)]),k("div",pl,[k("span",fl,E(o.value),1),k("span",null,E(r.value?("__"in t?t.__:b(Lt))("commented on project"):l.value?"прокомментировал идею":("__"in t?t.__:b(Lt))("commented on")),1
2),k("span",hl,E(r.value?b(Q)(e.notification.data.project.title):l.value?b(Q)(e.notification.data.idea.title):b(Q)(e.notification.data.story.title)),1)]),k("div",gl,E(b(Q)(e.notification.data.comment.body)),1)])])]),null===e.notification.read_at?(f(),_("div",vl,[...n[1]||(n[1]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,rl)):A("",!0)}},bl={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},wl=x({name:"solar-mention-circle-linear",render:function(e,t){return f(),_("svg",bl,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("path",{"stroke-linecap":"round",d:"M12 18a6 6 0 1 1 5.64-3.946a1.54 1.54 0 0 1-.413.599l-.08.074a1.637 1.637 0 0 1-2.747-1.203V12m0 0a2.4 2.4 0 1 1-4.8 0a2.4 2.4 0 0 1 4.8 0Z"}),k("path",{d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12Z"})],-1)])])}}),xl=["data-destination"],_l={class:"flex items-center justify-between w-full gap-x-2"},kl={class:"flex items-start grow gap-x-3"},Cl=["href"],jl={class:"flex flex-col text-left min-w-0"},El={class:"text-endpoint text-xs flex items-center gap-x-1"},Sl={class:"flex items-baseline gap-1 text-foreground flex-wrap"},Al={class:"font-semibold"},Pl={class:"line-clamp-2 text-endpoint"},Ml={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},Ll={__name:"CommentMentioned",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),s=e,o=t,r=i(()=>s.notification.data.user.name?s.notification.data.user.name:"@"+s.notification.data.user.nickname),l=i(()=>"App\\Models\\GameProject"===s.notification.data?.commentable_type),c=i(()=>"App\\Models\\Idea"===s.notification.data?.commentable_type),d=i(()=>l.value?`${route("projects.show",s.notification.data.project.slug)}#comment-${s.notification.data.comment.id}`:c.value?`${route("ideas.show",s.notification.data.idea.slug)}#comment-${s.notification.data.comment.id}`:`${route("story.show",s.notification.data.story.slug)}#comment-${s.notification.data.comment.id}`);return(t,s)=>"comment_mention"===e.notification.data?.type?(f(),_("button",{key:0,onClick:s[1]||(s[1]=t=>(async(e,t)=>{e.preventDefault();const s=e.currentTarget.getAttribute("data-destination");o("notification-read",t,e);try{await axios.post(route("notifications.marked-comment-mention",t),{}).then(e=>{e.data.success?a.push(s):n.warning(e.data.message,{theme:un.value?"dark":"light"})})}catch(i){console.error("Failed to mark notification as read:",i)}})(t,e.notification.id)),"data-destination":d.value,class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",_l,[k("div",kl,[k("a",{href:`/u/${e.notification.data.user.nickname||e.notification.data.user.username}`,class:"shrink-0",tabindex:"0",onClick:s[0]||(s[0]=V(n=>{void 0!==t.isOpen&&(t.isOpen.value=!1),b(a).push(`/u/${e.notification.data.user.nickname||e.notification.data.user.username}`)},["prevent","stop"]))},[j(il,{src:e.notification.data.user.avatar,icon:b(wl),bgColor:"bg-purple-500"},null,8,["src","icon"])],8,Cl),k("div",jl,[k("div",El,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at.human),1)]),k("div",Sl,[k("span",Al,E(r.value),1),k("span",null,E(("__"in t?t.__:b(Lt))("mentioned you in a comment")),1)]),k("div",Pl,E(b(Q)(e.notification.data.comment.body)),1)])])]),null===e.notification.read_at?(f(),_("div",Ml,[...s[2]||(s[2]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,xl)):A("",!0)}},Ol={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Rl=x({name:"solar-chat-round-unread-linear",render:function(e,t){return f(),_("svg",Ol,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("circle",{cx:"3",cy:"3",r:"3",transform:"matrix(-1 0 0 1 22 2)"}),k("path",{"stroke-linecap":"round",d:"M14 2.2q-.97-.198-2-.2C6.477 2 2 6.477 2 12c0 1.6.376 3.112 1.043 4.453c.178.356.237.763.134 1.148l-.595 2.226a1.3 1.3 0 0 0 1.591 1.592l2.226-.596a1.63 1.63 0 0 1 1.149.133A9.96 9.96 0 0 0 12 22c5.523 0 10-4.477 10-10q-.002-1.03-.2-2"})],-1)])])}}),zl=["data-destination"],Il={class:"flex items-center justify-between w-full gap-x-2"},Tl={class:"flex items-start grow gap-x-3"},$l=["href"],Nl={class:"flex flex-col text-left min-w-0"},Bl={class:"text-endpoint text-xs flex items-center gap-x-1"},Dl={class:"flex items-baseline gap-1 text-foreground flex-wrap"},Vl={class:"font-semibold"},Ul={class:"line-clamp-2 text-endpoint"},Fl={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},ql={__name:"CommentReplyed",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),n=e,s=t,o=i(()=>
2n.notification.data.user.name?n.notification.data.user.name:"@"+n.notification.data.user.nickname),r=i(()=>"App\\Models\\GameProject"===n.notification.data?.commentable_type),l=i(()=>"App\\Models\\Idea"===n.notification.data?.commentable_type),c=i(()=>r.value?`${route("projects.show",n.notification.data.project.slug)}#comment-${n.notification.data.comment.id}`:l.value?`${route("ideas.show",n.notification.data.idea.slug)}#comment-${n.notification.data.comment.id}`:`${route("story.show",n.notification.data.story.slug)}#comment-${n.notification.data.comment.id}`),d=async e=>{e.preventDefault();const t=e.currentTarget.getAttribute("data-destination");try{s("notification-read",n.notification.id),a.push(t)}catch(o){console.error("Failed to handle notification click:",o)}};return(t,n)=>"comment_reply"===e.notification.data?.type?(f(),_("button",{key:0,onClick:d,"data-destination":c.value,class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",Il,[k("div",Tl,[k("a",{href:`/u/${e.notification.data.user.nickname||e.notification.data.user.username}`,class:"shrink-0",tabindex:"0",onClick:n[0]||(n[0]=V(t=>b(a).push(`/u/${e.notification.data.user.nickname||e.notification.data.user.username}`),["prevent","stop"]))},[j(il,{src:e.notification.data.user.avatar,icon:b(Rl),bgColor:"bg-teal-500"},null,8,["src","icon"])],8,$l),k("div",Nl,[k("div",Bl,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at.human),1)]),k("div",Dl,[k("span",Vl,E(o.value),1),k("span",null,E(("__"in t?t.__:b(Lt))("replied to your comment")),1)]),k("div",Ul,E(b(Q)(e.notification.data.comment.body)),1)])])]),null===e.notification.read_at?(f(),_("div",Fl,[...n[1]||(n[1]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,zl)):A("",!0)}},Hl={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Wl=x({name:"solar-cup-star-bold",render:function(e,t){return f(),_("svg",Hl,[...t[0]||(t[0]=[k("path",{fill:"currentColor",d:"M22 8.162v.073c0 .86 0 1.291-.207 1.643s-.584.561-1.336.98l-.793.44c.546-1.848.729-3.834.796-5.532l.01-.221l.002-.052c.651.226 1.017.395 1.245.711c.283.393.283.915.283 1.958m-20 0v.073c0 .86 0 1.291.207 1.643s.584.561 1.336.98l.794.44c-.547-1.848-.73-3.834-.797-5.532l-.01-.221l-.001-.052c-.652.226-1.018.395-1.246.711C2 6.597 2 7.12 2 8.162"},null,-1),k("path",{fill:"currentColor","fill-rule":"evenodd",d:"M12 2c1.784 0 3.253.157 4.377.347c1.139.192 1.708.288 2.184.874s.45 1.219.4 2.485c-.172 4.349-1.11 9.78-6.211 10.26V19.5h1.43a1 1 0 0 1 .98.804l.19.946H18a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1 0-1.5h2.65l.19-.946a1 1 0 0 1 .98-.804h1.43v-3.534c-5.1-.48-6.038-5.912-6.21-10.26c-.051-1.266-.076-1.9.4-2.485c.475-.586 1.044-.682 2.183-.874A26.4 26.4 0 0 1 12 2m.952 4.199l-.098-.176C12.474 5.34 12.284 5 12 5s-.474.34-.854 1.023l-.098.176c-.108.194-.162.29-.246.354c-.085.064-.19.088-.4.135l-.19.044c-.738.167-1.107.25-1.195.532s.164.577.667 1.165l.13.152c.143.167.215.25.247.354s.02
21.215 0 .438l-.02.203c-.076.785-.114 1.178.115 1.352c.23.174.576.015 1.267-.303l.178-.082c.197-.09.295-.135.399-.135s.202.045.399.135l.178.082c.691.319 1.037.477 1.267.303s.191-.567.115-1.352l-.02-.203c-.021-.223-.032-.334 0-.438s.104-.187.247-.354l.13-.152c.503-.588.755-.882.667-1.165c-.088-.282-.457-.365-1.195-.532l-.19-.044c-.21-.047-.315-.07-.4-.135c-.084-.064-.138-.16-.246-.354","clip-rule":"evenodd"},null,-1)])])}}),Zl=["data-destination"],Gl={class:"flex items-center justify-between w-full gap-x-2"},Kl={class:"flex items-start grow gap-x-3"},Ql={class:"w-9 h-9 rounded-lg bg-yellow-500/10 flex items-center justify-center shrink-0"},Jl={class:"flex flex-col text-left min-w-0"},Yl={class:"text-endpoint text-xs flex items-center gap-x-1"},Xl={class:"flex items-baseline gap-1 text-foreground flex-wrap"},ec={key:0,class:"line-clamp-2 text-endpoint"},tc={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},ac={__name:"AchievementUnlocked",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),n=e,s=t,o=i(()=>n.notification.data.achievement),r=i(()=>route("achievements"));return(t,n)=>"achievement_unlocked"===e.notification.data?.type?(f(),_("button",{key:0,onClick:n[0]||(n[0]=t=>{return n=e.notification.id,s("notification-read",n),void a.push(r.value);var n}),"data-destination":r.value,class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",Gl,[k("div",Kl,[k("div",Ql,[j(b(Wl),{class:"h-5 w-5 text-yellow-500"})]),k("div",Jl,[k("div",Yl,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at.human),1)]),k("div",Xl,[n[1]||(n[1]=k("span",{class:"font-semibold"},"Достижение разблокировано:",-1)),k("span",null,E(o.value.name),1)]),o.value.description?(f(),_("div",ec,E(o.value.description),1)):A("",!0)])])]),null===e.notification.read_at?(f(),_("div",tc,[...n[2]||(n[2]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,Zl)):A("",!0)}},nc={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},sc=x({name:"solar-medal-ribbon-star-linear",render:function(e,t){return f(),_("svg",nc,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("path",{d:"M11.146 7.023C11.526 6.34 11.716 6 12 6s.474.34.854 1.023l.098.176c.108.194.162.29.246.354c.085.064.19.088.4.135l.19.044c.738.167 1.107.25 1.195.532s-.164.577-.667 1.165l-.13.152c-.143.167-.215.25-.247.354s-.021.215 0 .438l.02.203c.076.785.114 1.178-.115 1.352c-.23.174-.576.015-1.267-.303l-.178-.082c-.197-.09-.295-.135-.399-.135s-.202.045-.399.135l-.178.082c-.691.319-1.037.477-1.267.303s-.191-.567-.115-1.352l.02-.203c.021-.223.032-.334 0-.438s-.104-.187-.247-.354l-.13-.152c-.503-.588-.755-.882-.667-1.165c.088-.282.457-.365 1.195-.532l.19-.044c.21-.047.315-.07.4-.135c.084-.064.138-.16.246-.354z"}),k("path",{d:"M19 9A7 7 0 1 1 5 9a7 7 0 0 1 14 0Z"}),k("path",{"stroke-linecap":"round",d:"m7.351 15l-.637 2.323c-.628 2.292-.942 3.438-.523 4.065c.147.22.344.396.573.513c.652.332 1.66-.193 3.675-1.243c.67-.35 1.006-.524 1.362-.562a2 2 0 0 1 .398 0c.356.038.691.213 1.362.562c2.015 1.05 3.023 1.575 3.675 1.243c.229-.117.426-.293.573-.513c.42-.627.105-1.773-.523-4.065L16.649 15"})],-1)])])}}),oc=["data-destination"],ic={class:"flex items-center justify-between w-full gap-x-2"},rc={class:"flex items-start grow gap-x-3"},lc={class:"w-9 h-9 rounded-lg bg-purple-500/10 flex items-center justify-center shrink-0"},cc={class:"flex flex-col text-left min-w-0"},dc={class:"text-endpoint text-xs flex items-center gap-x-1"},uc={class:"flex items-baseline gap-1 text-foreground flex-wrap"},mc={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},pc={__name:"BadgeUnlocked",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),n=e,s=t,o=i(()=>n.notification.data.badge),r=i(()=>{const e=n.notification.data.user;return`/u/${e.nickname||e.username}`});return(t,n)=>
2"badge_unlocked"===e.notification.data?.type?(f(),_("button",{key:0,onClick:n[0]||(n[0]=t=>{return n=e.notification.id,s("notification-read",n),void a.push(r.value);var n}),"data-destination":r.value,class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",ic,[k("div",rc,[k("div",lc,[j(b(sc),{class:"h-5 w-5 text-purple-500"})]),k("div",cc,[k("div",dc,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at.human),1)]),k("div",uc,[n[1]||(n[1]=k("span",{class:"font-semibold"},"Новый бейдж:",-1)),k("span",null,E(o.value.name),1)]),n[2]||(n[2]=k("div",{class:"line-clamp-2 text-endpoint"}," Вы получили новый бейдж — скорее проверьте профиль! ",-1))])])]),null===e.notification.read_at?(f(),_("div",mc,[...n[3]||(n[3]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,oc)):A("",!0)}},fc={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},hc=x({name:"solar-heart-linear",render:function(e,t){return f(),_("svg",fc,[...t[0]||(t[0]=[k("path",{fill:"currentColor",d:"m8.962 18.91l.464-.588zM12 5.5l-.54.52a.75.75 0 0 0 1.08 0zm3.038 13.41l.465.59zm-5.612-.588C7.91 17.127 6.253 15.96 4.938 14.48C3.65 13.028 2.75 11.335 2.75 9.137h-1.5c0 2.666 1.11 4.7 2.567 6.339c1.43 1.61 3.254 2.9 4.68 4.024zM2.75 9.137c0-2.15 1.215-3.954 2.874-4.713c1.612-.737 3.778-.541 5.836 1.597l1.08-1.04C10.1 2.444 7.264 2.025 5 3.06C2.786 4.073 1.25 6.425 1.25 9.137zM8.497 19.5c.513.404 1.063.834 1.62 1.16s1.193.59 1.883.59v-1.5c-.31 0-.674-.12-1.126-.385c-.453-.264-.922-.628-1.448-1.043zm7.006 0c1.426-1.125 3.25-2.413 4.68-4.024c1.457-1.64 2.567-3.673 2.567-6.339h-1.5c0 2.198-.9 3.891-2.188 5.343c-1.315 1.48-2.972 2.647-4.488 3.842zM22.75 9.137c0-2.712-1.535-5.064-3.75-6.077c-2.264-1.035-5.098-.616-7.54 1.92l1.08 1.04c2.058-2.137 4.224-2.333 5.836-1.596c1.659.759 2.874 2.562 2.874 4.713zm-8.176 9.185c-.526.415-.995.779-1.448 1.043s-.816.385-1.126.385v1.5c.69 0 1.326-.265 1.883-.59c.558-.326 1.107-.756 1.62-1.16z"},null,-1)])])}}),gc=["data-destination"],vc={class:"flex items-center justify-between w-full gap-x-2"},yc={class:"flex items-start grow gap-x-3"},bc=["href"],wc={class:"flex flex-col text-left min-w-0"},xc={class:"text-endpoint text-xs flex items-center gap-x-1"},_c={class:"flex items-baseline gap-1 text-foreground flex-wrap"},kc={class:"font-semibold"},Cc={class:"line-clamp-2 text-endpoint"},jc={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},Ec={__name:"LikedStory",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),s=e,o=t,r=i(()=>s.notification.data.liker.name?s.notification.data.liker.name:"@"+s.notification.data.liker.nickname),l=i(()=>route("story.show",s.notification.data.story.slug));return(t,s)=>"story_liked"===e.notification.data?.type?(f(),_("button",{key:0,onClick:s[1]||(s[1]=t=>(async(e,t)=>{e.preventDefault();const s=e.currentTarget.getAttribute("data-destination");if(s)try{await axios.post(route("notifications.marked-liked-story",t),{}).then(i=>{i.data.success?(o("notification-read",t,e),a.push(s)):n.warning(i.data.message)})}catch(i){console.error("Failed to mark notification as read:",i)}else console.error("Missing destination")})(t,e.notification.id)),"data-destination":l.value,class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",vc,[k("div",yc,[k("a",{href:`/u/${e.notification.data.liker.nickname||e.notification.data.liker.username}`,class:"shrink-0",tabindex:"0",onClick:s[0]||(s[0]=V(n=>{void 0!==t.isOpen&&(t.isOpen.value=!1),b(a).push(`/u/${e.notification.data.liker.nickname||e.notification.data.liker.username}`)},["prevent","stop"]))},[j(il,{src:e.notification.data.liker.avatar,icon:b(hc),bgColor:"bg-red-500"},null,8,["src","icon"])],8,bc),k("div",wc,[k("div",xc,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at.human),1)]),k("div",_c,[k("span",kc,E(r.value),1),k("span",null,E(("__"in t?t.__:b(Lt))("liked your story")),1)]),k("div",Cc,E(b(Q)(e.notification.data.story.title)),1)])])]),null===e.n
2otification.read_at?(f(),_("div",jc,[...s[2]||(s[2]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,gc)):A("",!0)}},Sc={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Ac=x({name:"solar-chat-round-like-linear",render:function(e,t){return f(),_("svg",Sc,[...t[0]||(t[0]=[k("g",{fill:"none"},[k("path",{stroke:"currentColor","stroke-width":"1.5",d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12c0 1.6.376 3.112 1.043 4.453c.178.356.237.763.134 1.148l-.595 2.226a1.3 1.3 0 0 0 1.591 1.592l2.226-.596a1.63 1.63 0 0 1 1.149.133A9.96 9.96 0 0 0 12 22Z"}),k("path",{fill:"currentColor",d:"m10.029 14.943l-.486.57zM12 9.5l-.536.524a.75.75 0 0 0 1.072 0zm1.971 5.442l-.486-.572zM12 15.993v-.75zm-1.485-1.622c-.582-.494-1.166-1.068-1.599-1.66c-.441-.605-.666-1.149-.666-1.602h-1.5c0 .916.435 1.774.955 2.486c.529.725 1.21 1.384 1.838 1.919zM8.25 11.11c0-1.107.495-1.69 1.003-1.881c.518-.193 1.342-.09 2.211.797l1.072-1.049c-1.156-1.18-2.581-1.612-3.808-1.153c-1.235.462-1.978 1.717-1.978 3.286zm6.207 4.405c.628-.534 1.309-1.194 1.838-1.918c.52-.713.955-1.571.955-2.487h-1.5c0 .453-.225.997-.666 1.602c-.433.593-1.017 1.166-1.598 1.66zm2.793-4.405c0-1.57-.743-2.824-1.978-3.286c-1.227-.459-2.652-.028-3.808 1.153l1.072 1.05c.869-.888 1.694-.991 2.21-.798c.51.19 1.004.774 1.004 1.881zm-7.707 4.405c.78.663 1.4 1.23 2.457 1.23v-1.5c-.414 0-.617-.134-1.485-.873zm3.943-1.143c-.869.739-1.072.873-1.486.873v1.5c1.057 0 1.678-.567 2.457-1.23z"})],-1)])])}}),Pc=["data-destination"],Mc={class:"flex items-center justify-between w-full gap-x-2"},Lc={class:"flex items-start grow gap-x-3"},Oc=["href"],Rc={class:"flex flex-col text-left min-w-0"},zc={class:"text-endpoint text-xs flex items-center gap-x-1"},Ic={class:"flex items-baseline gap-1 text-foreground flex-wrap"},Tc={class:"font-semibold"},$c={class:"line-clamp-2 text-endpoint"},Nc={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},Bc={__name:"LikedComment",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),s=e,o=t,r=i(()=>s.notification.data.liker.name?s.notification.data.liker.name:"@"+s.notification.data.liker.nickname),l=i(()=>"App\\Models\\GameProject"===s.notification.data?.commentable_type),c=i(()=>"App\\Models\\Idea"===s.notification.data?.commentable_type),d=i(()=>l.value?`${route("projects.show",s.notification.data.project.slug)}#comment-${s.notification.data.comment.id}`:c.value?`${route("ideas.show",s.notification.data.idea.slug)}#comment-${s.notification.data.comment.id}`:`${route("story.show",s.notification.data.story.slug)}#comment-${s.notification.data.comment.id}`);return(t,s)=>"liked_comment"===e.notification.data?.type?(f(),_("button",{key:0,onClick:s[1]||(s[1]=t=>(async(e,t)=>{e.preventDefault();const s=e.currentTarget.getAttribute("data-destination");if(s)try{await axios.post(route("notifications.marked-liked-comment",t),{}).then(i=>{i.data.success?(o("notification-read",t,e),a.push(s)):n.warning(i.data.message,{theme:void 0!==un&&un.value?"dark":"light"})})}catch(i){console.error("Failed to mark notification as read:",i)}else console.error("Missing destination")})(t,e.notification.id)),"data-destination":d.value,class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",Mc,[k("div",Lc,[k("a",{href:`/u/${e.notification.data.liker.nickname||e.notification.data.liker.username}`,class:"shrink-0",tabindex:"0",onClick:s[0]||(s[0]=V(n=>{void 0!==t.isOpen&&(t.isOpen.value=!1),b(a).push(`/u/${e.notification.data.liker.nickname||e.notification.data.liker.username}`)},["prevent","stop"]))},[j(il,{src:e.notification.data.liker.avatar,icon:b(Ac),bgColor:"bg-rose-500"},null,8,["src","icon"])],8,Oc),k("div",Rc,[k("div",zc,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at.human),1)]),k("div",Ic,[k("span",Tc,E(r.value),1),k("span",null,E(("__"in t?t.__:b(Lt))("liked your comment")),1)]),k("div",$c,E(b(Q)(e.notification.data.comment.body)),1)])])]),null===e.n
2otification.read_at?(f(),_("div",Nc,[...s[2]||(s[2]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,Pc)):A("",!0)}},Dc={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Vc=x({name:"solar-arrow-up-linear",render:function(e,t){return f(),_("svg",Dc,[...t[0]||(t[0]=[k("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M12 20V4m0 0l6 6m-6-6l-6 6"},null,-1)])])}}),Uc={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Fc=x({name:"solar-arrow-down-linear",render:function(e,t){return f(),_("svg",Uc,[...t[0]||(t[0]=[k("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M12 4v16m0 0l6-6m-6 6l-6-6"},null,-1)])])}}),qc=["data-destination"],Hc={class:"flex items-center justify-between w-full gap-x-2"},Wc={class:"flex items-start grow gap-x-3"},Zc=["href"],Gc={class:"flex flex-col text-left min-w-0"},Kc={class:"text-endpoint text-xs flex items-center gap-x-1"},Qc={class:"flex items-baseline gap-1 flex-wrap text-foreground"},Jc={class:"font-semibold"},Yc={key:0,class:"line-clamp-2 text-endpoint"},Xc={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},ed={__name:"StoryVoted",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),s=e,o=t,r=i(()=>s.notification?.data?.voter?s.notification.data.voter.name?s.notification.data.voter.name:"@"+s.notification.data.voter.nickname:""),l=i(()=>s.notification?.data?.vote_type?"like"===s.notification.data.vote_type?Lt("upvoted"):Lt("downvoted"):Lt("voted on")),c=i(()=>"like"===s.notification?.data?.vote_type?Vc:Fc),d=i(()=>"like"===s.notification?.data?.vote_type?"bg-green-500":"bg-red-500");return(t,s)=>
2"story_voted"===e.notification.data?.type&&e.notification.data?.story?.slug?(f(),_("button",{key:0,onClick:s[1]||(s[1]=t=>(async(e,t)=>{e.preventDefault();const s=e.currentTarget.getAttribute("data-destination");if(s)try{await axios.post(route("notifications.marked-story-voted",t),{}).then(i=>{i.data.success?(o("notification-read",t,e),a.push(s)):void 0!==n?n.warning(i.data.message,{theme:void 0!==un&&un.value?"dark":"light"}):console.warn(i.data.message)})}catch(i){console.error("Failed to mark notification as read:",i)}else console.error("Missing destination")})(t,e.notification.id)),"data-destination":t.route("story.show",e.notification.data.story.slug),class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",Hc,[k("div",Wc,[k("a",{href:`/u/${e.notification.data.voter.nickname||e.notification.data.voter.username}`,class:"shrink-0",tabindex:"0",onClick:s[0]||(s[0]=V(t=>b(a).push(`/u/${e.notification.data.voter.nickname||e.notification.data.voter.username}`),["prevent","stop"]))},[j(il,{src:e.notification.data.voter.avatar,icon:c.value,bgColor:d.value},null,8,["src","icon","bgColor"])],8,Zc),k("div",Gc,[k("div",Kc,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at?.human||""),1)]),k("div",Qc,[k("span",Jc,E(r.value),1),k("span",null,E(l.value),1),k("span",null,E(b(Lt)("your story")),1)]),e.notification.data?.story?.title?(f(),_("div",Yc,E(b(Q)(e.notification.data.story.title)),1)):A("",!0)])])]),null===e.notification.read_at?(f(),_("div",Xc,[...s[2]||(s[2]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,qc)):A("",!0)}},td=["data-destination"],ad={class:"flex items-center justify-between w-full gap-x-2"},nd={class:"flex items-start grow gap-x-3"},sd=["href"],od={class:"flex flex-col text-left min-w-0"},id={class:"text-endpoint text-xs flex items-center gap-x-1"},rd={class:"flex items-baseline gap-1 flex-wrap text-foreground"},ld={class:"font-semibold"},cd={key:0,class:"line-clamp-2 text-endpoint"},dd={class:"font-medium"},ud={class:"ml-1"},md={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},pd={__name:"CommentVoted",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),s=e,o=t,r=i(()=>s.notification?.data?.voter?s.notification.data.voter.name?s.notification.data.voter.name:"@"+s.notification.data.voter.nickname:""),l=i(()=>s.notification?.data?.vote_type?"like"===s.notification.data.vote_type?Lt("upvoted"):Lt("downvoted"):Lt("voted on")),c=i(()=>"App\\Models\\GameProject"===s.notification.data?.commentable_type),d=i(()=>"App\\Models\\Idea"===s.notification.data?.commentable_type),u=i(()=>c.value?s.notification.data?.project?.slug:d.value?s.notification.data?.idea?.slug:s.notification.data?.story?.slug),m=i(()=>c.value?route("projects.show",s.notification.data.project.slug):d.value?route("ideas.show",s.notification.data.idea.slug):route("story.show",s.notification.data.story.slug)),p=i(()=>"like"===s.notification?.data?.vote_type?Vc:Fc),h=i(()=>"like"===s.notification?.data?.vote_type?"bg-green-500":"bg-red-500");return(t,i)=>
2"comment_voted"===e.notification.data?.type&&u.value?(f(),_("button",{key:0,onClick:i[1]||(i[1]=t=>(async(e,t)=>{e.preventDefault();const i=e.currentTarget.getAttribute("data-destination"),r=s.notification?.data?.comment?.id;if(r&&i)try{await axios.post(route("notifications.marked-comment-voted",t),{}).then(s=>{s.data.success?(o("notification-read",t,e),a.push(`${i}#comment-${r}`)):void 0!==n?n.warning(s.data.message,{theme:void 0!==un&&un.value?"dark":"light"}):console.warn(s.data.message)})}catch(l){console.error("Failed to mark notification as read:",l)}else console.error("Missing commentId or destination")})(t,e.notification.id)),"data-destination":m.value,class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",ad,[k("div",nd,[k("a",{href:`/u/${e.notification.data.voter.nickname||e.notification.data.voter.username}`,class:"shrink-0",tabindex:"0",onClick:i[0]||(i[0]=V(n=>{void 0!==t.isOpen&&(t.isOpen.value=!1),b(a).push(`/u/${e.notification.data.voter.nickname||e.notification.data.voter.username}`)},["prevent","stop"]))},[j(il,{src:e.notification.data.voter.avatar,icon:p.value,bgColor:h.value},null,8,["src","icon","bgColor"])],8,sd),k("div",od,[k("div",id,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at?.human||""),1)]),i[2]||(i[2]=S()),k("div",rd,[k("span",ld,E(r.value),1),k("span",null,E(l.value),1),k("span",null,E(b(Lt)("your comment on")),1)]),i[3]||(i[3]=S()),e.notification.data?.comment?.body||e.notification.data?.story?.title||e.notification.data?.project?.title||e.notification.data?.idea?.title?(f(),_("div",cd,[k("span",dd,E(c.value?b(Q)(e.notification.data.project.title||""):d.value?b(Q)(e.notification.data.idea.title||""):b(Q)(e.notification.data.story.title||""))+":",1),k("span",ud,E(e.notification.data?.comment?.body?b(Q)(e.notification.data.comment.body):""),1)])):A("",!0)])])]),null===e.notification.read_at?(f(),_("div",md,[...i[4]||(i[4]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,td)):A("",!0)}},fd={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},hd=x({name:"solar-user-plus-linear",render:function(e,t){return f(),_("svg",fd,[...t[0]||(t[0]=[M('<g fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="6" r="4"></circle><path d="M15 13.327A13.6 13.6 0 0 0 12 13c-4.418 0-8 2.015-8 4.5S4 22 12 22c5.687 0 7.331-1.018 7.807-2.5"></path><circle cx="18" cy="16" r="4"></circle><path stroke-linecap="round" stroke-linejoin="round" d="M18 14.667v2.666M16.667 16h2.666"></path></g>',1)])])}}),gd=["data-destination"],vd={class:"flex items-center justify-between w-full gap-x-2"},yd={class:"flex items-start grow gap-x-3"},bd=["href"],wd={class:"flex flex-col text-left min-w-0"},xd={class:"text-endpoint text-xs flex items-center gap-x-1"},_d={class:"flex items-baseline gap-1 text-foreground flex-wrap"},kd={class:"font-semibold"},Cd={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},jd={__name:"Followed",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),n=e,s=t,o=i(()=>{const e=n.notification.data.user||n.notification.data.follower;return e.name?e.name:"@"+(e.nickname||e.username)}),r=i(()=>{const e=n.notification.data.user||n.notification.data.follower;return`/u/${e.nickname||e.username}`});return(t,i)=>"followed"===e.notification.data?.type||"new_follow"===e.notification.data?.type?(f(),_("button",{key:0,onClick:i[1]||(i[1]=t=>((e,t)=>{s("notification-read",t);const o=n.notification.data.user||n.notification.data.follower;a.push(`/u/${o.nickname||o.username}`)})(0,e.notification.id)),"data-destination":r.value,class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",vd,[k("div",yd,[k("a",{href:`/u/${n.notification.data.user?.nickname||n.notification.data.user?.username||n.notification.data.follower?.nickname||n.notification.data.follower?.username}`,class:"shrink-0",tabindex:"0",onClick:i[0]||(i[0]=V(e=>{void 0!==t.isOpen&&(t.isOpen.value=!1),n.notification.data.user||n.notification.data.follower,b(a).push(`/u/${t.user.nickname||t.user.username}`)},["prevent","stop"]))},[j(il,{src:n.notification.data.user?.avatar||n.notification.data.follower?.avatar,icon:b(hd),bgColor:"bg-blue-500"},null,8,["src","icon"])],8,bd),k("div",wd,[k("div",xd,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at.human),1)]),k("div",_d,[k("span",kd,E(o.value),1),k("span",null,E(("__"in t?t.__:b(Lt))("started following you")),1)])])])]),null===e.n
2otification.read_at?(f(),_("div",Cd,[...i[2]||(i[2]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,gd)):A("",!0)}},Ed=["data-destination"],Sd={class:"flex items-center justify-between w-full gap-x-2"},Ad={class:"flex items-start grow gap-x-3"},Pd=["href"],Md={class:"flex flex-col text-left min-w-0"},Ld={class:"text-endpoint text-xs flex items-center gap-x-1"},Od={class:"flex items-baseline gap-1 text-foreground flex-wrap"},Rd={class:"font-semibold"},zd={class:"line-clamp-2 text-endpoint"},Id={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},Td={__name:"FavoritedStory",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),n=e,s=t,o=i(()=>n.notification.data.user.name?n.notification.data.user.name:"@"+n.notification.data.user.nickname),r=i(()=>route("story.show",n.notification.data.story.slug));return(t,n)=>"story_favorited"===e.notification.data?.type?(f(),_("button",{key:0,onClick:n[1]||(n[1]=t=>(async(e,t)=>{e.preventDefault(),s("notification-read",t,e),await axios.post(route("notifications.marked-story-favorite",t)),a.push(r.value)})(t,e.notification.id)),"data-destination":r.value,class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",Sd,[k("div",Ad,[k("a",{href:`/u/${e.notification.data.user.nickname||e.notification.data.user.username}`,class:"shrink-0",tabindex:"0",onClick:n[0]||(n[0]=V(t=>b(a).push(`/u/${e.notification.data.user.nickname||e.notification.data.user.username}`),["prevent","stop"]))},[j(il,{src:e.notification.data.user.avatar,icon:b(hc),bgColor:"bg-red-500"},null,8,["src","icon"])],8,Pd),k("div",Md,[k("div",Ld,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at.human),1)]),k("div",Od,[k("span",Rd,E(o.value),1),k("span",null,E(("__"in t?t.__:b(Lt))("favorited your story")),1)]),k("div",zd,E(b(Q)(e.notification.data.story.title)),1)])])]),null===e.notification.read_at?(f(),_("div",Id,[...n[2]||(n[2]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,Ed)):A("",!0)}},$d={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Nd=x({name:"solar-danger-triangle-linear",render:function(e,t){return f(),_("svg",$d,[...t[0]||(t[0]=[k("g",{fill:"none"},[k("path",{stroke:"currentColor","stroke-width":"1.5",d:"M5.312 10.762C8.23 5.587 9.689 3 12 3s3.77 2.587 6.688 7.762l.364.644c2.425 4.3 3.638 6.45 2.542 8.022S17.786 21 12.364 21h-.728c-5.422 0-8.134 0-9.23-1.572s.117-3.722 2.542-8.022z"}),k("path",{stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",d:"M12 8v5"}),k("circle",{cx:"12",cy:"16",r:"1",fill:"currentColor"})],-1)])])}}),Bd=["data-destination"],Dd={class:"flex items-center justify-between w-full gap-x-2"},Vd={class:"flex items-start grow gap-x-3"},Ud=["href"],Fd={class:"flex flex-col text-left min-w-0"},qd={class:"text-endpoint text-xs flex items-center gap-x-1"},Hd={class:"flex items-baseline gap-1 text-foreground flex-wrap"},Wd={class:"font-semibold"},Zd={class:"line-clamp-2 text-foreground"},Gd={class:"line-clamp-1 mt-1 flex items-center gap-1 text-foreground"},Kd={class:"font-semibold"},Qd={key:0,class:"mt-1 text-endpoint"},Jd={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},Yd={__name:"ReportedStory",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),n=e,s=t,o=i(()=>n.notification.data.user.name?n.notification.data.user.name:"@"+n.notification.data.user.nickname),r=i(()=>route("story.show",n.notification.data.story.slug));return(t,i)=>"reported_story"===e.notification.data?.type?(f(),_("button",{key:0,onClick:i[1]||(i[1]=t=>(async(e,t)=>{e.preventDefault(),null===n.notification.read_at?(s("notification-read",t,e),await axios.post(route("notifications.marked-reported-story",t)),a.push(r.value)):a.push(r.value)})(t,e.notification.id)),"data-destination":r.value,class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",Dd,[k("div",Vd,[k("a",{href:`/u/${e.notification.data.user.nickname||e.notification.data.user.username}`,class:"shrink-0",tabindex:"0",onClick:i[0]||(i[0]=V(t=>b(a).push(`/u/${e.notification.data.user.nickname||e.notification.data.user.username}`),["prevent","stop"]))},[j(il,{src:e.notification.data.user.avatar,icon:b(Nd),bgColor:"bg-destructive"},null,8,["src","icon"])],8,Ud),k("div",Fd,[k("div",qd,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at.human),1)]),k("div",Hd,[k("span",Wd,E(o.value),1),k("span",null,E(("__"in t?t.__:b(Lt))("reported a story")),1)]),k("div",Zd,E(b(Q)(e.notification.data.story.title)),1),k("div",Gd,[k("span",null,E(("__"in t?t.__:b(Lt))("Reason")+":"),1),k("span",Kd,E(b(Q)(e.notification.data.reason)),1)]),e.notification.data.message?(f(),_("div",Qd,E(b(Q)(e.notification.data.message)),1)):A("",!0)])])]),null===e.n
2otification.read_at?(f(),_("div",Jd,[...i[2]||(i[2]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,Bd)):A("",!0)}},Xd=["data-destination"],eu={class:"flex items-center justify-between w-full gap-x-2"},tu={class:"flex items-start grow gap-x-3"},au=["href"],nu={class:"flex flex-col text-left min-w-0"},su={class:"text-endpoint text-xs flex items-center gap-x-1"},ou={class:"flex items-baseline gap-1 text-foreground flex-wrap"},iu={class:"font-semibold"},ru={class:"line-clamp-2 text-foreground"},lu={class:"line-clamp-1 mt-1 flex items-center gap-1 text-foreground"},cu={class:"font-semibold"},du={key:0,class:"mt-1 text-endpoint"},uu={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},mu={__name:"ReportedComment",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),n=e,s=t,o=i(()=>n.notification.data.user.name?n.notification.data.user.name:"@"+n.notification.data.user.nickname),r=i(()=>`${route("story.show",n.notification.data.story.slug)}#comment-${n.notification.data.comment.id}`);return(t,i)=>"reported_comment"===e.notification.data?.type?(f(),_("button",{key:0,onClick:i[1]||(i[1]=t=>(async(e,t)=>{e.preventDefault(),n.notification.read_at||(s("notification-read",t,e),await axios.post(route("notifications.marked-reported-comment",t),{})),a.push(r.value)})(t,e.notification.id)),"data-destination":r.value,class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",eu,[k("div",tu,[k("a",{href:`/u/${e.notification.data.user.nickname||e.notification.data.user.username}`,class:"shrink-0",tabindex:"0",onClick:i[0]||(i[0]=V(t=>b(a).push(`/u/${e.notification.data.user.nickname||e.notification.data.user.username}`),["prevent","stop"]))},[j(il,{src:e.notification.data.user.avatar,icon:b(Nd),bgColor:"bg-destructive"},null,8,["src","icon"])],8,au),k("div",nu,[k("div",su,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at.human),1)]),k("div",ou,[k("span",iu,E(o.value),1),k("span",null,E(("__"in t?t.__:b(Lt))("reported a comment")),1)]),k("div",ru,E(b(Q)(e.notification.data.story.title)),1),k("div",lu,[k("span",null,E(("__"in t?t.__:b(Lt))("Reason")+":"),1),k("span",cu,E(b(Q)(e.notification.data.reason)),1)]),e.notification.data.message?(f(),_("div",du,E(b(Q)(e.notification.data.message)),1)):A("",!0)])])]),null===e.notification.read_at?(f(),_("div",uu,[...i[2]||(i[2]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,Xd)):A("",!0)}},pu=["data-destination"],fu={class:"flex items-center justify-between w-full gap-x-2"},hu={class:"flex items-start grow gap-x-3"},gu=["href"],vu={class:"flex flex-col text-left min-w-0"},yu={class:"text-endpoint text-xs flex items-center gap-x-1"},bu={class:"flex items-baseline gap-1 text-foreground flex-wrap"},wu={class:"font-semibold"},xu={class:"line-clamp-1 mt-1 flex items-center gap-1 text-foreground"},_u={class:"font-semibold"},ku={key:0,class:"mt-1 text-endpoint"},Cu={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},ju={__name:"ReportedUser",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),n=e,s=t,o=i(()=>n.notification.data.reporter.name?n.notification.data.reporter.name:"@"+n.notification.data.reporter.nickname);i(()=>n.notification.data.reported.name?n.notification.data.reported.name:"@"+n.notification.data.reported.nickname);const r=i(()=>route("user.show",n.notification.data.reported.nickname));return(t,i)=>"reported_user"===e.notification.data?.type?(f(),_("button",{key:0,onClick:i[1]||(i[1]=t=>(async(e,t)=>{e.preventDefault(),null===n.notification.read_at?(s("notification-read",t,e),await axios.post(route("notifications.marked-reported-user",t)),a.push(r.value)):a.push(r.value)})(t,e.notification.id)),"data-destination":r.value,class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",fu,[k("div",hu,[k("a",{href:`/u/${e.notification.data.reporter.nickname||e.notification.data.reporter.username}`,class:"shrink-0",tabindex:"0",onClick:i[0]||(i[0]=V(t=>b(a).push(`/u/${e.notification.data.reporter.nickname||e.notification.data.reporter.username}`),["prevent","stop"]))},[j(il,{src:e.notification.data.reporter.avatar,icon:b(Nd),bgColor:"bg-destructive"},null,8,["src","icon"])],8,gu),k("div",vu,[k("div",yu,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at.human),1)]),k("div",bu,[k("span",wu,E(o.value),1),k("span",null,E(("__"in t?t.__:b(Lt))("reported a user")),1)]),k("div",xu,[k("span",null,E(("__"in t?t.__:b(Lt))("Reason")+":"),1),k("span",_u,E(b(Q)(e.notification.data.reason)),1)]),e.notification.data.message?(f(),_("div",ku,E(b(Q)(e.notification.data.message)),1)):A("",!0)])])]),null===e.n
2otification.read_at?(f(),_("div",Cu,[...i[2]||(i[2]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,pu)):A("",!0)}},Eu={key:0,class:"relative group w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent"},Su={class:"flex items-start grow gap-x-3"},Au={class:"flex flex-col text-left min-w-0 flex-1"},Pu={class:"text-endpoint text-xs flex items-center gap-x-1"},Mu={class:"flex items-baseline gap-1 text-foreground flex-wrap"},Lu={class:"font-semibold"},Ou={key:0,class:"mt-2 text-sm text-positive font-medium"},Ru={key:1,class:"mt-2 text-sm text-muted-foreground font-medium"},zu={key:2,class:"flex items-center gap-2 mt-2"},Iu={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},Tu={__name:"CollaboratorInvite",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const s=$(),i=e,r=t,l=o(!1),c=()=>`collab_invite_${i.notification.id}`,d=o(localStorage.getItem(c())||null),u=()=>{const e=i.notification.data.user||{};return e.name?e.name:"@"+(e.nickname||e.username)},m=()=>i.notification.data.story||{},p=async e=>{if(l.value)return;l.value=!0;const t=i.notification.data.story?.id;if(t)try{await a.post(route("story.utils.collaboration."+(e?"accept":"decline"),{story:t})),d.value=e?"accepted":"declined";try{localStorage.setItem(c(),d.value)}catch(s){}n.success(Lt(e?"Соавторство принято":"Соавторство отклонено"),{autoClose:3e3}),r("notification-read",i.notification.id)}catch(s){n.error(s.response?.data?.message||Lt("Не удалось выполнить действие"),{autoClose:3e3})}finally{l.value=!1}else l.value=!1},h=e=>{r("notification-read",i.notification.id);const t=m();t?.slug&&s.push(`/story/${t.slug}`)};return(t,a)=>{const n=Ft;return"collaborator_invite"===e.notification.data?.type?(f(),_("div",Eu,[k("div",Su,[j(il,{src:e.notification.data.user?.avatar,icon:b(an),bgColor:"bg-indigo-500"},null,8,["src","icon"]),k("div",Au,[k("div",Pu,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at.human),1)]),k("div",Mu,[k("span",Lu,E(u()),1),k("span",null,E(("__"in t?t.__:b(Lt))("добавил вас соавтором к статье")),1)]),k("button",{type:"button",onClick:V(h,["stop"]),class:"mt-1 text-primary hover:underline truncate max-w-full text-left"},E(m().title||("__"in t?t.__:b(Lt))("Открыть статью")),1),"accepted"===d.value?(f(),_("div",Ou,E(("__"in t?t.__:b(Lt))("Вы приняли приглашение")),1)):"declined"===d.value?(f(),_("div",Ru,E(("__"in t?t.__:b(Lt))("Вы отклонили приглашение")),1)):(f(),_("div",zu,[j(n,{type:"button",size:"sm",variant:"default",disabled:l.value,onClick:a[0]||(a[0]=V(e=>p(!0),["stop"]))},{default:g(()=>[S(E(("__"in t?t.__:b(Lt))("Принять")),1)]),_:1},8,["disabled"]),j(n,{type:"button",size:"sm",variant:"secondary",disabled:l.value,onClick:a[1]||(a[1]=V(e=>p(!1),["stop"]))},{default:g(()=>[S(E(("__"in t?t.__:b(Lt))("Отклонить")),1)]),_:1},8,["disabled"])]))])]),null===e.notification.read_at?(f(),_("div",Iu,[...a[2]||(a[2]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)])):A("",!0)}}},$u={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Nu=x({name:"solar-gallery-linear",render:function(e,t){return f(),_("svg",$u,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("path",{d:"M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z"}),k("circle",{cx:"16",cy:"8",r:"2"}),k("path",{"stroke-linecap":"round",d:"m2 12.5l1.752-1.533a2.3 2.3 0 0 1 3.14.105l4.29 4.29a2 2 0 0 0 2.564.222l.299-.21a3 3 0 0 1 3.731.225L21 18.5"})],-1)])])}}),Bu=["data-destination"],Du={class:"flex items-center justify-between w-full gap-x-2"},Vu={class:"flex items-start grow gap-x-3"},Uu=["href"],Fu={class:"flex flex-col text-left min-w-0"},qu={class:"text-endpoint text-xs flex items-center gap-x-1"},Hu={class:"flex items-baseline gap-1 text-foreground flex-wrap"},Wu={class:"font-semibold"},Zu={key:0,class:"text-xs text-muted-foreground mt-1 break-words line-clamp-2"},Gu={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},Ku={__name:"WallPost",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),n=e,s=t,o=i(()=>{const e=n.notification.data.user;return e?.name?e.name:"@"+(e?.nickname||e?.username||"")}),r=i(()=>{const e=n.notification.data?.wall_post?.owner_username;return e?`/u/${e}/wall`:`/u/${n.notification.data?.user?.nickname||n.notification.data?.user?.username}`});return(t,i)=>
2"wall_post"===e.notification.data?.type?(f(),_("button",{key:0,onClick:i[1]||(i[1]=t=>{return n=e.notification.id,s("notification-read",n),void a.push(r.value);var n}),"data-destination":r.value,class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",Du,[k("div",Vu,[k("a",{href:r.value,class:"shrink-0",tabindex:"0",onClick:i[0]||(i[0]=V(e=>b(a).push(r.value),["prevent","stop"]))},[j(il,{src:n.notification.data.user?.avatar,icon:b(Nu),bgColor:"bg-pink-500"},null,8,["src","icon"])],8,Uu),k("div",Fu,[k("div",qu,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at.human),1)]),k("div",Hu,[k("span",Wu,E(o.value),1),i[2]||(i[2]=k("span",null,"оставил(а) запись на вашей стене",-1))]),e.notification.data?.wall_post?.body?(f(),_("p",Zu,E(e.notification.data.wall_post.body),1)):A("",!0)])])]),null===e.notification.read_at?(f(),_("div",Gu,[...i[3]||(i[3]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,Bu)):A("",!0)}},Qu={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Ju=x({name:"solar-document-text-linear",render:function(e,t){return f(),_("svg",Qu,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("path",{d:"M3 10c0-3.771 0-5.657 1.172-6.828S7.229 2 11 2h2c3.771 0 5.657 0 6.828 1.172S21 6.229 21 10v4c0 3.771 0 5.657-1.172 6.828S16.771 22 13 22h-2c-3.771 0-5.657 0-6.828-1.172S3 17.771 3 14z"}),k("path",{"stroke-linecap":"round",d:"M8 12h8M8 8h8m-8 8h5"})],-1)])])}}),Yu=["data-destination"],Xu={class:"flex items-center justify-between w-full gap-x-2"},em={class:"flex items-start grow gap-x-3"},tm=["href"],am={class:"flex flex-col text-left min-w-0"},nm={class:"text-endpoint text-xs flex items-center gap-x-1"},sm={class:"flex items-baseline gap-1 text-foreground flex-wrap"},om={class:"font-semibold"},im={key:0,class:"text-xs text-muted-foreground mt-1 break-words line-clamp-2"},rm={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},lm={__name:"StoryPublished",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),n=e,s=t,o=i(()=>{const e=n.notification.data.user;return e?.name?e.name:"@"+(e?.nickname||e?.username||"")}),r=i(()=>{const e=n.notification.data?.story?.slug;return e?route("story.show",e):"/"});return(t,i)=>"story_published"===e.notification.data?.type?(f(),_("button",{key:0,onClick:i[1]||(i[1]=t=>{return n=e.notification.id,s("notification-read",n),void a.push(r.value);var n}),"data-destination":r.value,class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",Xu,[k("div",em,[k("a",{href:r.value,class:"shrink-0",tabindex:"0",onClick:i[0]||(i[0]=V(e=>b(a).push(r.value),["prevent","stop"]))},[j(il,{src:n.notification.data.user?.avatar,icon:b(Ju),bgColor:"bg-sky-500"},null,8,["src","icon"])],8,tm),k("div",am,[k("div",nm,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at.human),1)]),k("div",sm,[k("span",om,E(o.value),1),i[2]||(i[2]=k("span",null,"опубликовал историю",-1))]),e.notification.data?.story?.title?(f(),_("p",im,E(e.notification.data.story.title),1)):A("",!0)])])]),null===e.notification.read_at?(f(),_("div",rm,[...i[3]||(i[3]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,Yu)):A("",!0)}},cm={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},dm=x({name:"solar-star-linear",render:function(e,t){return f(),_("svg",cm,[...t[0]||(t[0]=[k("path",{fill:"none",stroke:"currentColor","stroke-width":"1.5",d:"M9.153 5.408C10.42 3.136 11.053 2 12 2s1.58 1.136 2.847 3.408l.328.588c.36.646.54.969.82 1.182s.63.292 1.33.45l.636.144c2.46.557 3.689.835 3.982 1.776c.292.94-.546 1.921-2.223 3.882l-.434.507c-.476.557-.715.836-.822 1.18c-.107.345-.071.717.001 1.46l.066.677c.253 2.617.38 3.925-.386 4.506s-1.918.051-4.22-1.009l-.597-.274c-.654-.302-.981-.452-1.328-.452s-.674.15-1.328.452l-.596.274c-2.303 1.06-3.455 1.59-4.22 1.01c-.767-.582-.64-1.89-.387-4.507l.066-.676c.072-.744.108-1.116 0-1.46c-.106-.345-.345-.624-.821-1.18l-.434-.508c-1.677-1.96-2.515-2.941-2.223-3.882S3.58 8.328 6.04 7.772l.636-.144c.699-.158 1.048-.237 1.329-.45s.46-.536.82-1.182z"},null,-1)])])}}),um=["data-destination"],mm={class:"flex items-center justify-between w-full gap-x-2"},pm={class:"flex items-start grow gap-x-3"},fm=["href"],hm={class:"flex flex-col text-left min-w-0"},gm={class:"text-endpoint text-xs flex items-center gap-x-1"},vm={key:0,class:"text-xs text-muted-foreground mt-1 break-words line-clamp-2"},ym={key:0,class:"flex absolute h-2 w-2 top-1/2 right-1"},bm={__name:"StoryFeatured",props:{notification:Object},emits:["notification-read"],setup(e,{emit:t}){const a=$(),n=e,s=t,o=i(()=>{const e=n.notification.data?.story?.slug;return e?route("story.show",e):"/"});return(t,i)=>
2"story_featured"===e.notification.data?.type?(f(),_("button",{key:0,onClick:i[1]||(i[1]=t=>{return n=e.notification.id,s("notification-read",n),void a.push(o.value);var n}),"data-destination":o.value,class:"relative group cursor-pointer w-full p-2 sm:p-4 text-sm flex items-center gap-x-2 justify-between hover:bg-accent",type:"button"},[k("div",mm,[k("div",pm,[k("a",{href:o.value,class:"shrink-0",tabindex:"0",onClick:i[0]||(i[0]=V(e=>b(a).push(o.value),["prevent","stop"]))},[j(il,{src:n.notification.data.user?.avatar,icon:b(dm),bgColor:"bg-amber-500"},null,8,["src","icon"])],8,fm),k("div",hm,[k("div",gm,[j(b(tl),{class:"h-3 w-3 shrink-0"}),k("span",null,E(e.notification.created_at.human),1)]),i[2]||(i[2]=k("div",{class:"flex items-baseline gap-1 text-foreground flex-wrap"},[k("span",{class:"font-semibold"},"Ваша история"),k("span",null,"попала в «Лучшее»")],-1)),e.notification.data?.story?.title?(f(),_("p",vm,E(e.notification.data.story.title),1)):A("",!0)])])]),null===e.notification.read_at?(f(),_("div",ym,[...i[3]||(i[3]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-primary/90"},null,-1)])])):A("",!0)],8,um)):A("",!0)}},wm=p({__name:"DropdownMenuGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,a)=>(f(),h(b(Le),ne(se(t)),{default:g(()=>[v(e.$slots,"default")]),_:3},16))}}),xm={key:0,class:"block bg-background sm:rounded-lg w-full"},_m={class:"relative h-14 flex items-center justify-between px-4 border-b border-border"},km={class:"font-semibold"},Cm={type:"button",class:"outline-none group flex items-center"},jm={class:"w-8 h-8 flex items-center justify-center group-hover:bg-muted dark:group-hover:bg-muted rounded-full"},Em={class:"flex-1 overflow-auto base-scrollbar"},Sm={key:1,class:"text-center text-muted-foreground py-8"},Am={class:"relative hidden md:inline-flex items-center h-full cursor-pointer whitespace-normal"},Pm={key:0,class:"flex absolute h-3 w-3 top-1 right-2"},Mm={class:"flex items-center justify-between border-b border-border text-sm p-3"},Lm={key:0,class:"font-medium leading-none flex items-center gap-1"},Om={class:"text-primary font-bold"},Rm={key:1,class:"font-medium leading-none flex items-center gap-0.5"},zm={class:"flex items-center gap-2"},Im={class:"w-8 h-8 flex items-center justify-center hover:bg-muted dark:hover:bg-muted rounded-full"},Tm={class:"max-h-[500px] overflow-auto base-scrollbar"},$m={key:1,class:"text-center text-muted-foreground py-8"},Nm={__name:"NotificationsBox",props:{asPage:{type:Boolean,default:!1}},setup(e){const t=e,n=$();o(!1);const s=t.asPage?void 0:o(!1);o(0);const r=o(!1),l=Mt();i(()=>l.auth?.user?.id);const{notificationsList:c,notificationsLinks:d,isNotificationsLoading:u,fetchNotifications:m,fetchMoreNotifications:p,resetNotifications:v,unreadedNotifications:w,newNotificationsCount:x,resetNewNotifications:M,syncAllCounters:L,cleanup:O,setupEcho:R,pollNewNotificationsCount:z,initializeFromStorage:I,initPolling:T}=Ea(),N=i(()=>c.value),D=i(()=>w.value>99),F=o(null),q=e=>{const t=e.target&&e.target.closest?e.target.closest("[data-destination]"):null;if(!t)return;const a=t.getAttribute("data-destination");if(!a)return;const s=a.match(/comment-(\d+)/);if(!s)return;let o=a;try{const e=new URL(a,window.location.origin);o=e.pathname+e.search+e.hash}catch(i){}o===n.currentRoute.value.fullPath&&window.dispatchEvent(new CustomEvent("comments:focus",{detail:{id:Number(s[1])}}))};C(()=>{I(),R(),m(),z(),T(),document.addEventListener("click",q,!0)}),B(()=>{O(),v(),document.removeEventListener("click",q,!0)});const{stop:H}=Oe(F,async([{isIntersecting:e}])=>{e&&!u.value&&d.value.next&&(await p(),d.value.next||H())}),G=async()=>{if(w.value>0)try{await a.post(route("notifications.marked")),w.value=0,await m()}catch(e){console.error("Failed to mark notifications as read:",e),L()}},K=async(e,t)=>{if(t&&t.preventDefault&&t.preventDefault(),e)try{const o=N.value.find(t=>t.id===e);if(!o)return;let i="",r=!1;switch(o?.data?.type){case"comment":i="notifications.marked-comment",r=!0;break;case"comment_reply":i="notifications.marked-comment-reply",r=!0;break;case"comment_mention":i="notifications.marked-comment-mention",r=!0;break;case"story_favorited":i="notifications.marked-story-favorite",r=!0;break;case"reported_story":i="notifications.marked-reported-story",r=!0;break;case"reported_comment":i="notifications.marked-reported-comment",r=!0;break;case"reported_user":i="notifications.marked-reported-user",r=!0;break;case"story_liked":i="notifications.marked-liked-story",r=!0;break;case"comment_liked":i="notifications.marked-liked-comment",r=!0;break;case"followed":case"new_follow":i="notifications.marked-follower",r=!0;break;case"story_voted":i="notifications.marked-story-voted",r=!0;break;case"comment_voted":i="notifications.marked-comment-voted",r=!0;break;case"achievement_unlocked":i="notifications.marked-achievement-unlocked",r=!0;break;case"badge_unlocked":i="notifications.marked-badge-unlocked",r=!0;break;case"collaborator_invite":i="notifications.marked-collaborator-invite",r=!0;break;case"wall_post":i="notifications.marked-wall-post",r=!0;break;case"story_published":i="notifications.marked-story-published",r=!0;break;case"story_featured":i="notifications.marked-story-featured",r=!0}if(i){const o=r?route(i,e):route(i);await a.post(o);const l=N.value.findIndex(t=>t.id===e);if(-1!==l&&(N.value[l].read_at=(new Date).toISOString()),M(),t&&t.currentTarget){const e=t.currentTarget.getAttribute("data-destination");if(e)return void n.push(e)}s&&(s.value=!1),await m()}}catch(o){console.error("Failed to handle notification read:",o),L()}};P(s,e=>{e&&(M(),m())});const Q=()=>{s&&(s.value=!1),n.push(route("notifications.index"))},J=async()=>
2{if(!r.value){r.value=!0;try{await a.post(route("notifications.delete")),await m()}catch(e){console.error("Failed to delete all notifications:",e)}finally{r.value=!1}}};return(t,a)=>{const n=Hr,o=qr,i=Fr;return e.asPage?(f(),_("div",xm,[k("div",_m,[k("div",km,E(("__"in t?t.__:b(Lt))("Notifications")),1),j(b(zr),null,{default:g(()=>[j(b(Dr),{"as-child":""},{default:g(()=>[k("button",Cm,[k("div",jm,[j(b(Zr),{class:"h-5 w-5 text-foreground"})])])]),_:1}),j(b(Ir),{class:"min-w-[200px]",align:"end"},{default:g(()=>[j(b(wm),null,{default:g(()=>[j(b($r),{icon:b(Kr),onClick:V(G,["prevent"]),disabled:0===b(w)},{default:g(()=>[S(E(("__"in t?t.__:b(Lt))("Mark all as read")),1)]),_:1},8,["icon","disabled"]),j(b($r),{icon:b(Jr),onClick:V(J,["prevent"]),disabled:r.value,class:"text-destructive"},{default:g(()=>[S(E(("__"in t?t.__:b(Lt))("Delete all")),1)]),_:1},8,["icon","disabled"]),j(b($r),{icon:b(Xr),onClick:V(Q,["prevent"])},{default:g(()=>[S(E(("__"in t?t.__:b(Lt))("Open all")),1)]),_:1},8,["icon"])]),_:1})]),_:1})]),_:1})]),k("div",Em,[N.value.length?(f(),_(W,{key:0},[(f(!0),_(W,null,Z(N.value,e=>(f(),_("div",{key:e.id},[j(jd,{notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"]),j(yl,{notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"]),j(ql,{notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"]),"comment_mention"===e.data?.type?(f(),h(Ll,{key:0,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),j(Td,{notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"]),"reported_story"===e.data?.type?(f(),h(Yd,{key:1,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),"reported_comment"===e.data?.type?(f(),h(mu,{key:2,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),"reported_user"===e.data?.type?(f(),h(ju,{key:3,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),j(Ec,{notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"]),j(Bc,{notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"]),j(ed,{notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"]),j(pd,{notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"]),"achievement_unlocked"===e.data?.type?(f(),h(ac,{key:4,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),"badge_unlocked"===e.data?.type?(f(),h(pc,{key:5,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),"collaborator_invite"===e.data?.type?(f(),h(Tu,{key:6,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),"wall_post"===e.data?.type?(f(),h(Ku,{key:7,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),"story_published"===e.data?.type?(f(),h(lm,{key:8,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),"story_featured"===e.data?.type?(f(),h(bm,{key:9,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0)]))),128)),b(d).next&&!b(u)?(f(),_("div",{key:0,ref_key:"last",ref:F,class:"h-8"},null,512)):A("",!0)],64)):A("",!0),N.value.length?A("",!0):(f(),_("div",Sm,E(("__"in t?t.__:b(Lt))("No notifications yet")),1))])])):b(l).auth?.user?(f(),h(i,{key:1,open:b(s),"onUpdate:open":a[1]||(a[1]=e=>U(s)?s.value=e:null)},{default:g(()=>[j(n,{"as-child":""},{default:g(()=>[k("div",Am,[k("button",{type:"button",onClick:a[0]||(a[0]=V((...e)=>b(m)&&b(m)(...e),["prevent"])),class:y(["relative flex items-center justify-center h-10 w-10 text-center hover:bg-primary/5 rounded-full base-transition",b(s)?"bg-primary/5 text-primary":"bg-transparent"])},[j(b(za),{class:y(["h-6 w-6",b(s)?"text-primary rotate-12":""])},null,8,["class"]),b(x)>0?(f(),_("div",Pm,[...a[2]||(a[2]=[k("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary/50"},null,-1),k("span",{class:"relative inline-flex rounded-full h-3 w-3 bg-primary/90"},null,-1)])])):A("",!0)],2)])]),_:1}),j(o,{class:"w-80 p-0 !pb-1 !border !border-border",align:"end"},{default:g(()=>[k("div",Mm,[b(w)>0?(f(),_("div",Lm,[k("span",null,E(("__"in t?t.__:b(Lt))("New notifications")),1),k("span",Om,E(D.value?"99+":b(w)),1)])):(f(),_("div",Rm,[k("span",null,E(("__"in t?t.__:b(Lt))("Notifications")),1)])),k("div",zm,[j(b(zr),null,{default:g(()=>[j(b(Dr),{"as-child":""},{default:g(()=>[k("button",Im,[j(b(Zr),{class:"h-5 w-5 text-foreground"})])]),_:1}),j(b(Ir),{class:"min-w-[200px]",align:"end"},{default:g(()=>[j(b(wm),null,{default:g(()=>[j(b($r),{icon:b(Kr),onClick:V(G,["prevent"]),disabled:0===b(w)},{default:g(()=>[S(E(("__"in t?t.__:b(Lt))("Mark all as read")),1)]),_:1},8,["icon","disabled"]),j(b($r),{icon:b(Jr),onClick:V(J,["prevent"]),disabled:r.value,class:"text-destructive"},{default:g(()=>[S(E(("__"in t?t.__:b(Lt))("Delete all")),1)]),_:1},8,["icon","disabled"]),j(b($r),{icon:b(Xr),onClick:V(Q,["prevent"])},{default:g(()=>[S(E(("__"in t?t.__:b(Lt))("Open all")),1)]),_:1},8,["icon"])]),_:1})]),_:1})]),_:1})])]),k("div",Tm,[N.value.length?(f(),_(W,{key:0},[(f(!0),_(W,null,Z(N.value,e=>(f(),_("div",{key:e.id},[j(jd,{notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"]),j(yl,{notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"]),j(ql,{notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"]),"comment_mention"===e.data?.type?(f
2(),h(Ll,{key:0,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),j(Td,{notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"]),"reported_story"===e.data?.type?(f(),h(Yd,{key:1,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),"reported_comment"===e.data?.type?(f(),h(mu,{key:2,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),"reported_user"===e.data?.type?(f(),h(ju,{key:3,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),j(Ec,{notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"]),j(Bc,{notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"]),j(ed,{notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"]),j(pd,{notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"]),"achievement_unlocked"===e.data?.type?(f(),h(ac,{key:4,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),"badge_unlocked"===e.data?.type?(f(),h(pc,{key:5,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),"collaborator_invite"===e.data?.type?(f(),h(Tu,{key:6,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),"wall_post"===e.data?.type?(f(),h(Ku,{key:7,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),"story_published"===e.data?.type?(f(),h(lm,{key:8,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0),"story_featured"===e.data?.type?(f(),h(bm,{key:9,notification:e,onNotificationRead:t=>K(t,e)},null,8,["notification","onNotificationRead"])):A("",!0)]))),128)),b(d).next&&!b(u)?(f(),_("div",{key:0,ref_key:"last",ref:F,class:"h-8"},null,512)):A("",!0)],64)):A("",!0),N.value.length?A("",!0):(f(),_("div",$m,E(("__"in t?t.__:b(Lt))("No notifications yet")),1))])]),_:1})]),_:1},8,["open"])):A("",!0)}}};function Bm(){const e="undefined"!=typeof window;e&&null===JSON.parse(localStorage.getItem("recent-searches")||"null")&&localStorage.setItem("recent-searches","[]");const t=o(e?JSON.parse(localStorage.getItem("recent-searches")||"[]"):[]);return C(()=>{P(t,t=>{e&&localStorage.setItem("recent-searches",JSON.stringify(t))},{deep:!0})}),{addQuery:function(e){t.value.includes(e)||(t.value.unshift(e),t.value.length>10&&t.value.splice(-1))},removeQuery:function(e){const a=t.value.indexOf(e);-1!==a&&t.value.splice(a,1)},getSearchHistory:function(){return t.value}}}const Dm={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Vm=x({name:"solar-clock-circle-linear",render:function(e,t){return f(),_("svg",Dm,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("circle",{cx:"12",cy:"12",r:"10"}),k("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 8v4l2.5 2.5"})],-1)])])}}),Um={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"},Fm=x({name:"ph-arrow-bend-down-left",render:function(e,t){return f(),_("svg",Um,[...t[0]||(t[0]=[k("path",{fill:"currentColor",d:"M232 56a104.11 104.11 0 0 1-104 104H51.31l34.35 34.34a8 8 0 0 1-11.32 11.32l-48-48a8 8 0 0 1 0-11.32l48-48a8 8 0 0 1 11.32 11.32L51.31 144H128a88.1 88.1 0 0 0 88-88a8 8 0 0 1 16 0"},null,-1)])])}}),qm={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Hm=x({name:"svg-spinners-3-dots-move",render:function(e,t){return f(),_("svg",qm,[...t[0]||(t[0]=[M('<circle cx="4" cy="12" r="0" fill="currentColor"><animate fill="freeze" attributeName="r" begin="0;SVGUppsBdVN.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="0;3"></animate><animate fill="freeze" attributeName="cx" begin="SVGqCgsydxJ.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="4;12"></animate><animate fill="freeze" attributeName="cx" begin="SVG3PwDNd6F.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="12;20"></animate><animate id="SVG3V8yEdYE" fill="freeze" attributeName="r" begin="SVG6wCQhd9Q.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="3;0"></animate><animate id="SVGUppsBdVN" fill="freeze" attributeName="cx" begin="SVG3V8yEdYE.end" dur="0.001s" values="20;4"></animate></circle><circle cx="4" cy="12" r="3" fill="currentColor"><animate fill="freeze" attributeName="cx" begin="0;SVGUppsBdVN.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="4;12"></animate><animate fill="freeze" attributeName="cx" begin="SVGqCgsydxJ.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="12;20"></animate><animate id="SVG4PgJdbds" fill="freeze" attributeName="r" begin="SVG3PwDNd6F.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="3;0"></animate><animate id="SVG6wCQhd9Q" fill="freeze" attributeName="cx" begin="SVG4PgJdbds.end" dur="0.001s" values="20;4"></animate><animate fill="freeze" attributeName="r" begin="SVG6wCQhd9Q.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="0;3"></animate></circle><circle cx="12" cy="12" r="3" fill="currentColor"><animate fill="freeze" attributeName="cx" begin="0;SVGUppsBdVN.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="12;20"></animate><animate id="SVG38aCdcdI" fill="freeze" attributeName="r" begin="SVGqCgsydxJ.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="3;0"></animate><animate id="SVG3PwDNd6F" fill="freeze" attributeName="cx" begin="SVG38aCdcdI.end" dur="0.001s" values="20;4"></animate><animate fill="freeze" attributeName="r" begin="SVG3PwDNd6F.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="0;3"></animate><animate fill="freeze" attributeName="cx" begin="SVG6wCQhd9Q.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="4;12"></animate></circle><circle cx="20" cy="12" r="3" fill="currentColor"><animate id="SVGwaWzveSq" fill="freeze" attributeName="r" begin="0;SVGUppsBdVN.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="3;0"></animate><animate id="SVGqCgsydxJ" fill="freeze" attributeName="cx" begin="SVGwaWzveSq.end" dur="0.001s" values="20;4"></animate><animate fill="freeze" attributeName="r" begin="SVGqCgsydxJ.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="0;3"></animate><animate fill="freeze" attributeName="cx" begin="SVG3PwDNd6F.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="4;12"></animate><animate fill="freeze" attributeName="cx" begin="SVG6wCQhd9Q.end" calcMode="spline" dur="0.5s" keySplines=".36,.6,.31,1" values="12;20"></animate></circle>',4)])])}}),Wm={class:"relative max-w-5xl w-full min-w-96"},Zm=["placeholder"],Gm={key:0,class:"absolute top-12 right-0 left-0 z-10 w-full flex flex-col"},Km={key:0,class:"flex items-center justify-center p-3 rounded-xl border border-input bg-card shadow-xl dark:shadow-lg dark:shadow-primary/10"},Qm={key:1,class:"max-h-80 overflow-y-auto overflow-x-hidden base-scrollbar p-2 mb-1 rounded-xl border border-input bg-card shadow-xl dark:shadow-lg dark:shadow-primary/10"},Jm={key:0,class:"relative text-muted-foreground my-2 flex items-center justify-start gap-2"},Ym={class:"relative inline-flex font-medium text-xs text-endpoint"},Xm={class:"flex items-center justify-between"},ep={class:"flex-col truncate"},tp={key:2,class:"max-h-80 overflow-y-auto overflow-x-hidden base-scrollbar p-2 mb-1 rounded-xl border border-input bg-card shadow-xl dark:shadow-lg dark:shadow-primary/10"},ap={key:0,class:"relative text-muted-foreground my-2 flex items-center justify-start gap-2"},np={class:"relative inline-flex font-bold text-xs"},sp={class:"flex flex-col truncate font-medium"},op={key:0,class:"relative text-muted-foreground my-2 flex items-center justify-start gap-2"},ip={class:"relative inline-flex font-bold text-xs"},rp={class:"flex flex-col truncate font-medium"}
2,lp={key:0,class:"relative text-muted-foreground my-2 flex items-center justify-start gap-2"},cp={class:"relative inline-flex font-bold text-xs"},dp={class:"flex-col truncate"},up={class:"line-clamp-1"},mp={key:3,class:"p-1 w-full rounded-b-lg my-0 text-sm rounded-xl border border-input bg-card shadow-xl dark:shadow-lg dark:shadow-primary/10"},pp={class:"line-clamp-1"},fp={__name:"SearchBar",setup(e){const t=o(""),{addQuery:n,getSearchHistory:s}=Bm(),r=o([]),l=o(!1),c=o(!1),d=o(),{focused:u}=Re(d);P(u,()=>{}),P(t,ze(async function(e){if(null!==e)try{const n=G.sanitize(e,{USE_PROFILES:{html:!1}});if(n.length>1){l.value=!0,r.value=[];try{const e=await a.post("/s",{search:n});r.value=p(e.data)}catch(t){r.value=[]}finally{l.value=!1}}}catch{}},800));const m=e=>{let t=G.sanitize(e,{USE_PROFILES:{html:!1}});t.length>0&&n(t)},p=e=>Array.isArray(e)?e:e&&"object"==typeof e?Object.keys(e).filter(e=>"seo"!==e&&"toasts"!==e).sort((e,t)=>Number(e)-Number(t)).map(t=>e[t]):[];C(()=>{"undefined"!=typeof window&&window.matchMedia("(max-width: 925px)").addEventListener("change",e=>{e.matches&&(c.value=!1)})});const v=e=>{"Backspace"===e.key&&""===t.value&&(r.value=[])},w=i(()=>r.value.filter(e=>"Community"===e.type)),x=i(()=>r.value.filter(e=>"Story"===e.type)),M=i(()=>r.value.filter(e=>"User"===e.type)),L=i(()=>[u.value?"border border-input bg-card dark:bg-card":"bg-card/50 dark:bg-background border border-transparent"].filter(e=>!!e).join(" "));return(e,a)=>{const n=Hr,o=D("router-link"),i=ci,p=di,C=mi,P=qr,O=Fr;return f(),h(O,{open:c.value,"onUpdate:open":a[10]||(a[10]=e=>c.value=e)},{default:g(()=>[j(n,{"as-child":""},{default:g(()=>[k("button",{type:"button",class:y(["relative hidden md:inline-flex items-center justify-center h-10 w-10 text-center hover:bg-primary/5 rounded-full base-transition cursor-pointer whitespace-normal",c.value?"bg-primary/5 text-primary":"bg-transparent border-transparent"]),"aria-label":"search"},[c.value?(f(),h(b(Ht),{key:1,class:"w-6 h-6 cursor-pointer","aria-hidden":"true"})):(f(),h(b(Ta),{key:0,class:"w-6 h-6 cursor-pointer","aria-hidden":"true"}))],2)]),_:1}),j(P,{side:"left",sideOffset:10,class:"!p-0 !bg-transparent !border-transparent !w-full !max-w-5xl !shadow-none"},{default:g(()=>[k("div",Wm,[k("div",{class:y(["flex items-center group w-full rounded-xl focus:shadow-sm px-4 h-10",L.value])},[j(b(Ta),{class:"w-5 h-5 text-endpoint","aria-hidden":"true"}),ue(k("input",{ref_key:"searchRef",ref:d,onKeydown:v,"onUpdate:modelValue":a[0]||(a[0]=e=>t.value=e),type:"text",placeholder:("__"in e?e.__:b(Lt))("Search..."),class:"flex h-9 w-full focus:ring-none px-3 !py-1 bg-transparent border-transparent text-sm transition duration-200 ease-linear placeholder:text-muted-foreground focus:outline-none focus:ring-0 focus:ring-offset-0 cleared-input focus:shadow-none disabled:cursor-not-allowed disabled:opacity-50"},null,40,Zm),[[Ie,t.value]]),t.value?(f(),_("button",{key:0,id:"animatedBtn",type:"button",onClick:a[1]||(a[1]=e=>(t.value=null,void(r.value=[])))},[j(b(Ht),{class:"h-5 w-5 text-endpoint hover:text-foreground"})])):A("",!0)],2),b(u)?(f(),_("div",Gm,[l.value?(f(),_("div",Km,[j(b(Hm),{class:"h-6 w-6 text-muted-foreground"})])):A("",!0),!b(s)().length||0!==r.value.length||l.value||t.value?A("",!0):(f(),_("ul",Qm,[(f(!0),_(W,null,Z(b(s)(),(t,n)=>(f(),_("li",{key:n,class:"w-full rounded-b-lg my-0 text-sm"},[0===n?(f(),_("div",Jm,[a[11]||(a[11]=k("hr",{class:"w-2 border border-border"},null,-1)),k("span",Ym,E(("__"in e?e.__:b(Lt))("Recent searches")),1),a[12]||(a[12]=k("hr",{class:"flex-1 border border-border"},null,-1))])):A("",!0),k("div",Xm,[j(o,{to:e.route("search",{q:t}),class:"w-full flex items-center p-2 rounded-lg text-sm font-medium cursor-pointer hover:bg-muted dark:hover:bg-muted/70",onMousedown:a[2]||(a[2]=V(()=>{},["prevent"]))},{default:g(()=>[j(b(Vm),{class:"h-4 w-4 !mr-2 shrink-0"}),k("div",ep,[k("strong",null,E(t),1)])]),_:2},1032,["to"])])]))),128))])),r.value.length&&t.value?(f(),_("ul",tp,[(f(!0),_(W,null,Z(M.value,(t,n)=>(f(),_("li",{key:n,class:"w-full rounded-b-lg my-0 text-sm"},["User"===t.type&&0===n?(f(),_("div",ap,[a[13]||(a[13]=k("hr",{class:"w-2 border border-border"},null,-1)),k("span",np,E(("__"in e?e.__:b(Lt))("Users")),1),a[14]||(a[14]=k("hr",{class:"flex-1 border border-border"}
2,null,-1))])):A("",!0),"User"===t.type?(f(),h(o,{key:1,to:e.route("user.show",{user:t.username}),class:"w-full flex items-center gap-2 p-2 rounded-lg text-sm font-medium cursor-pointer hover:bg-muted dark:hover:bg-muted/70",onMousedown:a[3]||(a[3]=V(()=>{},["prevent"]))},{default:g(()=>[j(C,{size:"xs",class:"h-5 w-5"},{default:g(()=>[j(i,{src:t.avatar_url,alt:t.username},null,8,["src","alt"]),j(p,null,{default:g(()=>[S(E(t.username),1)]),_:2},1024)]),_:2},1024),k("div",sp,E(t.display_name?t.display_name:t.username),1)]),_:2},1032,["to"])):A("",!0)]))),128)),(f(!0),_(W,null,Z(w.value,(t,n)=>(f(),_("li",{key:n,class:"w-full rounded-b-lg my-0 text-sm"},["Community"===t.type&&0===n?(f(),_("div",op,[a[15]||(a[15]=k("hr",{class:"w-2 border border-border"},null,-1)),k("span",ip,E(("__"in e?e.__:b(Lt))("Communities")),1),a[16]||(a[16]=k("hr",{class:"flex-1 border border-border"},null,-1))])):A("",!0),"Community"===t.type?(f(),h(o,{key:1,to:e.route("community.show",{community:t.slug}),class:"w-full flex items-center gap-2 p-2 rounded-lg text-sm font-medium cursor-pointer hover:bg-muted dark:hover:bg-muted/70",onMousedown:a[4]||(a[4]=V(()=>{},["prevent"]))},{default:g(()=>[j(C,{size:"xs",class:"h-5 w-5"},{default:g(()=>[j(i,{src:t.avatar_url,alt:t.username},null,8,["src","alt"]),j(p,null,{default:g(()=>[S(E(t.username),1)]),_:2},1024)]),_:2},1024),k("div",rp,E(t.name),1)]),_:2},1032,["to"])):A("",!0)]))),128)),(f(!0),_(W,null,Z(x.value,(t,n)=>(f(),_("li",{key:n,class:"w-full rounded-b-lg my-0 text-sm"},["Story"===t.type&&0===n?(f(),_("div",lp,[a[17]||(a[17]=k("hr",{class:"w-2 border border-border"},null,-1)),k("span",cp,E(("__"in e?e.__:b(Lt))("Stories")),1),a[18]||(a[18]=k("hr",{class:"flex-1 border border-border"},null,-1))])):A("",!0),"Story"===t.type?(f(),h(o,{key:1,to:e.route("story.show",{story:t.slug}),class:"w-full flex items-center gap-2 p-2 rounded-lg text-sm font-medium cursor-pointer hover:bg-muted dark:hover:bg-muted/70",onMousedown:a[5]||(a[5]=V(()=>{},["prevent"]))},{default:g(()=>[j(b(Ta),{class:"h-5 w-5 shrink-0"}),k("div",dp,[k("strong",null,E(t.title),1)])]),_:2},1032,["to"])):A("",!0)]))),128)),(f(!0),_(W,null,Z(r.value,(n,s)=>(f(),_("li",{key:s},[s===r.value.length-1?(f(),h(o,{key:0,to:e.route("search",{q:b(G).sanitize(t.value,{USE_PROFILES:{html:!1}})}),class:"w-full mt-1 flex items-center p-2 text-sm font-medium rounded-lg cursor-pointer hover:bg-muted dark:hover:bg-muted/70 hover:rounded-b-lg",onClick:a[6]||(a[6]=V(e=>m(t.value),["prevent"])),onMousedown:a[7]||(a[7]=V(()=>{},["prevent"]))},{default:g(()=>[j(b(Fm),{class:"h-5 w-5 !mr-2 shrink-0"}),k("span",up,E(("__"in e?e.__:b(Lt))("Show all results for:")+" "+t.value),1)]),_:1},8,["to"])):A("",!0)]))),128))])):A("",!0),!l.value&&0===r.value.length&&t.value?(f(),_("div",mp,[j(o,{to:e.route("search",{q:b(G).sanitize(t.value,{USE_PROFILES:{html:!1}})}),class:"w-full flex items-center p-2 text-sm font-medium rounded-lg cursor-pointer hover:bg-muted dark:hover:bg-muted/70 hover:rounded-b-lg",onClick:a[8]||(a[8]=V(e=>m(t.value),["prevent"])),onMousedown:a[9]||(a[9]=V(()=>{},["prevent"]))},{default:g(()=>[j(b(Fm),{class:"h-5 w-5 !mr-2 shrink-0"}),k("span",pp,E(("__"in e?e.__:b(Lt))("Show all results for:")+" "+t.value),1)]),_:1},8,["to"])])):A("",!0)])):A("",!0)])]),_:1})]),_:1},8,["open"])}}},hp=["src"],gp={__name:"Logo",setup(e){const t=Mt(),a=i(()=>{const e=t.settings?.general?.site_logo,a=t.settings?.general?.site_logo_dark;return un.value?a||e:e||a}),n=e=>{0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),gn("/"))};return(e,t)=>(f(),_("a",{href:"/",class:"flex justify-start items-start shrink-0 max-w-52 cursor-pointer","aria-label":"logo",onClick:n},[b(a)?(f(),_("img",{key:0,src:b(a),width:"160",height:"28",class:"h-7 w-auto",alt:"logo"},null,8,hp)):A("",!0)]))}},vp={variant:"outline",size:"icon",class:"md:hidden h-9 w-9 inline-flex items-center justify-center whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},yp={class:"overflow-y-auto max-h-[100vh] -webkit-overflow-scrolling-touch"},bp={class:"grid gap-1 text-lg font-medium pt-5 px-4 transition duration-150 ease-linear"},wp={class:"line-clamp-1"},xp={class:"line-clamp-1"},_p={class:"line-clamp-1"},kp=["src"],Cp={class:"line-clamp-1"},jp={class:"p-4 mb-5"},Ep={class:"flex flex-col gap-2"},Sp={class:"line-clamp-1"},Ap={class:"line-clamp-1"},Pp={class:"flex flex-wrap items-center gap-3 mt-2"},Mp=["href"],Lp=["href"],Op=["href"],Rp=["href"],zp=["href"],Ip=["href"],Tp=["href"],$p=["href"],Np=["href"],Bp=["href"],Dp=["href"],Vp=["href"],Up={__name:"MobileSidebar",setup(e){const t=Mt(),a=N(),n=i(()=>a.path),s=t.sidebarCommunities,o=t.sidebarFooterMenu,r=t.settings?.social_media_links,l=t.auth?.user,c=i(()=>"/my"===n.value);i(()=>"/"===n.value||"/active"===n.value||n.value.startsWith("/top/"));const d=i(()=>"/communities"===n.value),u=i(()=>"/contact"===n.value),m=i(()=>n.value.startsWith("/projects"));return(e,t)=>{const a=ai,i=oi,p=ii,v=si,w=ye,x=ci,C=di,P=mi,M=D("router-link"),L=ni,O=li,R=ti;return f(),h(R,null,{default:g(()=>[j(a,{"as-child":""},{default:g(()=>
2[k("button",vp,[j(b(fi),{class:"h-7 w-7 shrink-0"}),t[2]||(t[2]=k("span",{class:"sr-only"},"menu",-1))])]),_:1}),j(O,{side:"left",class:"w-full sm:w-[300px]","close-icon":!0,"prevent-bottom-on-small":""},{default:g(()=>[j(w,null,{default:g(()=>[j(v,null,{default:g(()=>[j(i),j(p)]),_:1})]),_:1}),k("div",yp,[k("nav",bp,[j(L,{"as-child":""},{default:g(()=>[b(l)?(f(),h(M,{key:0,to:e.route("feed.user"),onClick:t[0]||(t[0]=V(t=>b(gn)(e.route("feed.user")),["prevent"])),class:y([c.value?"text-primary bg-primary/5":"","flex gap-2 w-full rounded-xl text-lg px-4 py-3 items-center hover:text-primary"])},{default:g(()=>[j(P,{class:"w-6 h-6 shrink-0"},{default:g(()=>[j(x,{src:b(l).avatar_url,alt:b(l).username},null,8,["src","alt"]),j(C,null,{default:g(()=>[S(E(b(l).username),1)]),_:1})]),_:1}),k("span",wp,E(("__"in e?e.__:b(Lt))("My feed")),1)]),_:1},8,["to","class"])):A("",!0)]),_:1}),j(L,{"as-child":""},{default:g(()=>[j(M,{to:e.route("projects.index"),class:y([m.value?"text-primary bg-primary/5":"","flex gap-2 w-full rounded-xl text-lg px-4 py-3 items-center hover:text-primary"])},{default:g(()=>[j(b(yi),{class:"h-6 w-6 shrink-0"}),k("span",xp,E(("__"in e?e.__:b(Lt))("Showcase")),1)]),_:1},8,["to","class"])]),_:1}),j(L,{"as-child":""},{default:g(()=>[j(M,{to:e.route("communities"),onClick:t[1]||(t[1]=V(t=>b(gn)(e.route("communities")),["prevent"])),class:y([d.value?"text-primary bg-primary/5":"","flex gap-2 w-full rounded-xl text-lg px-4 py-3 items-center hover:text-primary"])},{default:g(()=>[j(b(Qa),{class:"h-6 w-6 shrink-0"}),k("span",_p,E(("__"in e?e.__:b(Lt))("Communities")),1)]),_:1},8,["to","class"])]),_:1}),(f(!0),_(W,null,Z(b(s),t=>(f(),h(L,{key:t.id,"as-child":""},{default:g(()=>{return[j(M,{to:e.route("community.show",t),class:y([(a=t.slug,n.value===`/c/${a}`||n.value===`/c/${a}/about`||n.value===`/c/${a}/top`||n.value===`/c/${a}/settings`?"text-primary bg-primary/5":""),"flex gap-2 w-full rounded-xl text-lg px-4 py-3 items-center hover:text-primary"])},{default:g(()=>[k("img",{src:t.avatar_url,alt:"community",class:"w-7 h-7 shrink-0 rounded-full"},null,8,kp),k("span",Cp,E(t.name),1)]),_:2},1032,["to","class"])];var a}),_:2},1024))),128)),k("div",jp,[k("nav",Ep,[(f(!0),_(W,null,Z(b(o),t=>(f(),h(L,{key:t.id,"as-child":""},{default:g(()=>{return[j(M,{to:e.route("page.show",{page:t.slug}),class:y([(a=t.slug,n.value===`/p/${a}`?"text-primary":"dark:text-muted-foreground"),"text-xs leading-6 base-transition hover:text-primary dark:hover:text-primary sm:text-sm"])},{default:g(()=>[k("span",Sp,E(t.title),1)]),_:2},1032,["to","class"])];var a}),_:2},1024))),128)),j(L,{"as-child":""},{default:g(()=>[j(M,{to:e.route("contact.show"),class:y([u.value?"text-primary":"dark:text-muted-foreground","text-xs leading-6 base-transition hover:text-primary dark:hover:text-primary"])},{default:g(()=>[k("span",Ap,E(("__"in e?e.__:b(Lt))("Contact us")),1)]),_:1},8,["to","class"])]),_:1}),k("div",Pp,[(f(!0),_(W,null,Z(b(r),(e,t)=>(f(),_(W,{key:t},["facebook"===t&&e?(f(),_("a",{key:0,href:e,target:"_blank",title:"Facebook",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(wi),{class:"h-4 w-4"})],8,Mp)):A("",!0),"twitter_x"===t&&e?(f(),_("a",{key:1,href:e,target:"_blank",title:"X Corp.",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(_i),{class:"h-4 w-4"})],8,Lp)):A("",!0),"instagram"===t&&e?(f(),_("a",{key:2,href:e,target:"_blank",title:"Instagram",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(Mi),{class:"h-4 w-4 text-[#d62976]"})],8,Op)):A("",!0),"tiktok"===t&&e?(f(),_("a",{key:3,href:e,target:"_blank",title:"Tiktok",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(Ai),{class:"h-4 w-4"})],8,Rp)):A("",!0),"twitch"===t&&e?(f(),_("a",{key:4,href:e,target:"_blank",title:"Twitch",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(Oi),{class:"h-4 w-4"})],8,zp)):A("",!0),"discord"===t&&e?(f(),_("a",{key:5,href:e,target:"_blank",title:"Discord",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"}
2,[j(b(zi),{class:"h-4 w-4"})],8,Ip)):A("",!0),"vk"===t&&e?(f(),_("a",{key:6,href:e,target:"_blank",title:"VK",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(Ti),{class:"h-4 w-4 text-[#0077ff]"})],8,Tp)):A("",!0),"telegram"===t&&e?(f(),_("a",{key:7,href:e,target:"_blank",title:"Telegram",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(Ei),{class:"h-4 w-4"})],8,$p)):A("",!0),"youtube"===t&&e?(f(),_("a",{key:8,href:e,target:"_blank",title:"Youtube",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(Ni),{class:"h-4 w-4"})],8,Np)):A("",!0),"linkedin"===t&&e?(f(),_("a",{key:9,href:e,target:"_blank",title:"Linkedin",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(Di),{class:"h-4 w-4"})],8,Bp)):A("",!0),"boosty"===t&&e?(f(),_("a",{key:10,href:e,target:"_blank",title:"Boosty",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(Ui),{class:"h-4 w-4 text-[#F15F2C]"})],8,Dp)):A("",!0),"patreon"===t&&e?(f(),_("a",{key:11,href:e,target:"_blank",title:"Patreon",class:"font-base cursor-pointer items-center rounded-lg p-1 base-transition hover:bg-white hover:shadow-sm focus:outline-none dark:hover:bg-background"},[j(b(qi),{class:"h-4 w-4"})],8,Vp)):A("",!0)],64))),128))]),t[3]||(t[3]=k("div",{class:"flex flex-col gap-1 mt-3"},[k("span",{class:"text-xs text-muted-foreground"},"Приложение доступно в:"),k("div",{class:"flex items-center gap-2"},[k("a",{href:"https://play.google.com/store/apps/details?id=it.enthub.hubapp",target:"_blank",class:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-1 text-xs font-medium text-secondary-foreground hover:bg-secondary/80 base-transition"}," Google Play "),k("a",{href:"https://apps.apple.com/ru/app/enthub/id6771769037",target:"_blank",class:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-1 text-xs font-medium text-secondary-foreground hover:bg-secondary/80 base-transition"}," App Store ")])],-1))])])])])]),_:1})]),_:1})}}},Fp={class:"flex flex-col justify-center items-center border-b overflow-hidden z-0 min-w-0 w-full max-w-full max-h-[250px]"},qp=["innerHTML"],Hp={__name:"AdTopHeader",setup(e){const t=Mt(),a=o(t.advertisements?.top||[]),n=o({});return C(()=>{"undefined"!=typeof window&&(window.yaContextCb=window.yaContextCb||[])}),P(()=>t.advertisements?.top,e=>{a.value=e||[],H(()=>{(a.value||[]).forEach(e=>{!function(e){if("undefined"!=typeof window){if(e&&e.css_content){const t=`ad-${e.id}-css`;if(!document.head.querySelector(`style[data-ad-css-id="${t}"]`)){const a=document.createElement("style");a.type="text/css",a.setAttribute("data-ad-css-id",t),a.textContent=e.css_content,document.head.appendChild(a)}}if(e&&e.js_content&&n.value[e.id]){const a=n.value[e.id];a.innerHTML="",a.innerHTML=e.js_content,t=a,"undefined"!=typeof window&&t&&Array.from(t.querySelectorAll("script")).forEac
2h(e=>{const a=document.createElement("script");Array.from(e.attributes).forEach(e=>{a.setAttribute(e.name,e.value)}),e.textContent&&(a.textContent=e.textContent),e.parentNode?e.parentNode.replaceChild(a,e):(console.warn("Ad script's original node has no parent. Appending to ad container instead.",e),t.appendChild(a))})}}var t}(e)})})},{immediate:!0,deep:!0}),(e,t)=>a.value&&a.value.length?(f(!0),_(W,{key:0},Z(a.value,e=>(f(),_("div",{key:e.id,class:"grid overflow-hidden items-center max-w-full"},[k("div",Fp,[e.html_content?(f(),_("div",{key:0,innerHTML:e.html_content,class:"w-full h-full bg-background"},null,8,qp)):A("",!0),e.js_content?(f(),_("div",{key:1,ref_for:!0,ref:t=>{t&&(n.value[e.id]=t)}},null,512)):A("",!0)])]))),128)):A("",!0)}},Wp={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Zp=x({name:"solar-sun-linear",render:function(e,t){return f(),_("svg",Wp,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("circle",{cx:"12",cy:"12",r:"6"}),k("path",{"stroke-linecap":"round",d:"M12 2v1m0 18v1m10-10h-1M3 12H2m17.07-7.07l-.392.393M5.322 18.678l-.393.393m14.141-.001l-.392-.393M5.322 5.322l-.393-.393"})],-1)])])}}),Gp={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Kp=x({name:"hugeicons-login-01",render:function(e,t){return f(),_("svg",Gp,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5"},[k("path",{d:"M8 8c0-.575 0-.822.045-1.075A2.98 2.98 0 0 1 9.833 4.7c.24-.1.523-.165 1.09-.294l2.728-.623c3.39-.774 5.084-1.161 6.217-.27C21 4.405 21 6.126 21 9.568v4.864c0 3.442 0 5.164-1.132 6.055c-1.133.891-2.827.504-6.217-.27l-2.728-.623c-.567-.13-.85-.194-1.09-.294a2.98 2.98 0 0 1-1.788-2.225C8 16.822 8 16.575 8 16"}),k("path",{d:"M13 9s3 2.21 3 3s-3 3-3 3m2.5-3H3"})],-1)])])}}),Qp={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Jp=x({name:"solar-gallery-add-linear",render:function(e,t){return f(),_("svg",Qp,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5"},[k("path",{d:"M22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12s0-7.071 1.464-8.536C4.93 2 7.286 2 12 2"}),k("path",{d:"m2 12.5l1.752-1.533a2.3 2.3 0 0 1 3.14.105l4.29 4.29a2 2 0 0 0 2.564.222l.299-.21a3 3 0 0 1 3.731.225L21 18.5m-6-13h3.5m0 0H22m-3.5 0V9m0-3.5V2"})],-1)])])}}),Yp={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Xp=x({name:"solar-arrow-left-linear",render:function(e,t){return f(),_("svg",Yp,[...t[0]||(t[0]=[k("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M20 12H4m0 0l6-6m-6 6l6 6"},null,-1)])])}}),ef=o(),tf=o(!1);function af(e,t=!1){n(e.message,{toastId:e.id,type:e.type,newestOnTop:!0,theme:un.value?"dark":"light",autoClose:!t&&7e3,closeOnClick:!t,onClose:()=>tf.value=!1})}function nf(){tf.value?n.remove():function(e=!1){ef.value?.forEach(t=>af(t,e))}(!0),tf.value=!tf.value}function sf(e,t="success"){af({id:Date.now(),message:e,type:t})}function of(e){Array.isArray(e)&&e.length&&e.forEach(e=>{e&&e.message&&af({id:e.id||Date.now()+Math.random(),message:e.message,type:e.type||"success"})})}function rf(){return{toasts:ef,toastAgain:nf,reToasted:tf,addToast:sf,showToasts:of}}const lf={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},cf=x({name:"solar-medal-star-bold-duotone",render:function(e,t){return f(),_("svg",lf,[...t[0]||(t[0]=[k("path",{fill:"currentColor",d:"M12.795 2h-2c-1.886 0-2.829 0-3.414.586c-.586.586-.586 1.528-.586 3.414v3.5h10V6c0-1.886 0-2.828-.586-3.414S14.681 2 12.795 2",opacity:".5"},null,-1),k("path",{fill:"currentColor","fill-rule":"evenodd",d:"M13.23 5.783a3 3 0 0 0-2.872 0L5.564 8.397A3 3 0 0 0 4 11.031v4.938a3 3 0 0 0 1.564 2.634l4.794 2.614a3 3 0 0 0 2.872 0l4.795-2.614a3 3 0 0 0 1.564-2.634V11.03a3 3 0 0 0-1.564-2.634zM11.794 10.5c-.284 0-.474.34-.854 1.023l-.098.176c-.108.194-.162.29-.246.354s-.19.088-.399.135l-.19.044c-.739.167-1.108.25-1.195.532c-.088.283.163.577.666 1.165l.13.152c.144.167.215.25.247.354s.022.215 0 .438l-.02.203c-.076.785-.114 1.178.116 1.352s.575.015 1.266-.303l.179-.082c.196-.09.294-.135.398-.135s.203.045.399.135l.179.082c.69.319 1.036.477 1.266.303s.192-.567.116-1.352l-.02-.203c-.022-.223-.033-.334 0-.438c.032-.103.103-.187.246-.354l.13-.152c.504-.588.755-.882.667-1.165c-.088-.282-.457-.365-1.194-.532l-.191-.044c-.21-.047-.315-.07-.399-.135c-.084-.064-.138-.16-.246-.354l-.098-.176c-.38-.682-.57-1.023-.855-1.023","clip-rule":"evenodd"},null,-1)])])}});function df(e,t=1){const a=e<0,n=Math.abs(e),s=[{value:1,symbol:""},{value:1e3,symbol:"K"},{value:1e6,symbol:"M"},{value:1e9,symbol:"B"},{value:1e12,symbol:"T"},{value:1e15,symbol:"P"}
2,{value:1e18,symbol:"E"}].slice().reverse().find(e=>n>=e.value);if(!s)return"0";const o=(n/s.value).toFixed(t).replace(/\.0+$/,"");return a?`-${o}${s.symbol}`:`${o}${s.symbol}`}const uf=["title"],mf={__name:"UserRatingCompact",props:{rating:{type:Number,required:!0}},setup(e){const t=e,a=i(()=>t.rating>0||t.rating<0),n=i(()=>t.rating>0?"text-positive":t.rating<0?"text-destructive":""),s=i(()=>t.rating>0?df(t.rating):t.rating);return(e,t)=>b(a)?(f(),_("span",{key:0,class:"flex items-center gap-0.5",title:("__"in e?e.__:b(Lt))("Rating")},[j(b(cf),{class:"h-5 w-5 shrink-0 inline text-primary"}),k("span",{class:y(["font-semibold",b(n)])},E(b(s)),3)],8,uf)):A("",!0)}};function pf(){const e=Mt(),t=e.appearance?.theme,a=e.appearance?.radius,n=Te("config",{theme:t,radius:parseFloat(String(a||0))});P(()=>[t,a],([e,t])=>{e!==n.value.theme&&(n.value.theme=e),String(t)!==String(n.value.radius)&&(n.value.radius=parseFloat(String(t||0)))},{immediate:!0});const s=i(()=>`theme-${n.value.theme}`),o=i(()=>n.value.theme),r=i(()=>n.value.radius),l=i(()=>{try{const t=(e.themes||{})[o.value]||null;return t&&t.palette&&t.palette.primary?t.palette.primary:e.appearance?.header_color||"#06b6d4"}catch(t){return"#06b6d4"}});return{config:n,theme:o,setTheme:function(e){n.value.theme=e},radius:r,setRadius:function(e){n.value.radius=e},themeClass:s,themePrimary:l}}let ff=null;const hf=o(!1);async function gf(e=3e3){const{Thumbmark:t}=await l(async()=>{const{Thumbmark:e}=await import("./vendor-eWDfdwlh.js").then(e=>e.bZ);return{Thumbmark:e}},__vite__mapDeps([1,2])),a={include:["fonts","screen","languages","timezone","hardwareConcurrency","deviceMemory"],exclude:["canvas","math","touch","private","iframe","audio","webgl","plugins","permissions","videocard"],stabilize:["private","iframe"]};try{const n=new t(a),s=await Promise.race([n.get(),new Promise((t,a)=>setTimeout(()=>a(new Error("thumbmark-timeout")),e))]);return s?.hash?s.hash:await vf()}catch(n){return await vf()}}async function vf(){try{const e=(await l(()=>import("./vendor-eWDfdwlh.js").then(e=>e.b_),__vite__mapDeps([1,2]))).default.load(),t=await e,a=await t.get();return a?.visitorId||null}catch(e){return null}}function yf(){const e=Mt(),t=hn();return $e({props:i(()=>({auth:e.auth,settings:e.settings,translations:e.translations,appearance:e.appearance,themes:e.themes,current_theme:e.currentTheme,theme_permissions:e.themePermissions,isVotable:e.isVotable,tenor:e.tenor,current_locale:e.currentLocale,flash:{toasts:t.data?.toasts||[]},...t.data}))})}const bf={class:"fixed inset-0 overflow-y-auto px-4 py-6 sm:px-0 z-50","scroll-region":""},wf={__name:"Modal",props:{show:{type:Boolean,default:!1},maxWidth:{type:String,default:"2xl"},closeable:{type:Boolean,default:!0}},emits:["close"],setup(e,{emit:t}){const a=e,n=t;P(()=>a.show,()=>{a.show?document.body.style.overflow="hidden":document.body.style.overflow=null});const s=()=>{a.closeable&&n("close")},o=e=>{"Escape"===e.key&&a.show&&s()};C(()=>document.addEventListener("keydown",o)),B(()=>{document.removeEventListener("keydown",o),document.body.style.overflow=null});const r=i(()=>({sm:"sm:max-w-sm",md:"sm:max-w-md",lg:"sm:max-w-lg",xl:"sm:max-w-xl","2xl":"sm:max-w-2xl"}[a.maxWidth]));return(t,a)=>(f(),h(q,{to:"body"},[j(F,{"leave-active-class":"duration-200"},{default:g(()=>[ue(k("div",bf,[j(F,{"enter-active-class":"ease-out duration-300","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"ease-in duration-200","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:g(()=>[ue(k("div",{class:"fixed inset-0 transform transition-all",onClick:s},[...a[0]||(a[0]=[k("div",{class:"absolute inset-0 bg-gray-500 dark:bg-gray-900 opacity-75"},null,-1)])],512),[[me,e.show]])]),_:1}),j(F,{"enter-active-class":"ease-out duration-300","enter-from-class":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to-class":"opacity-100 translate-y-0 sm:scale-100","leave-active-class":"ease-in duration-200","leave-from-class":"opacity-100 translate-y-0 sm:scale-100","leave-to-class":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:g(()=>[ue(k("div",{class:y(["mb-6 bg-white dark:bg-gray-800 rounded-lg overflow-hidden shadow-xl transform transition-all sm:w-full sm:mx-auto",r.value])},[e.show?v(t.$slots,"default",{key:0}):A("",!0)],2),[[me,e.show]])]),_:3})],512),[[me,e.show]])]),_:3})]))}},xf={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},_f=x({name:"solar-compass-big-linear",render:function(e,t){return f(),_("svg",xf,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("path",{d:"M14.79 18.975C8.497 21.49 5.35 22.75 3.554 21.529a4.1 4.1 0 0 1-1.083-1.083c-1.221-1.797.037-4.944 2.554-11.236c.537-1.342.806-2.013 1.267-2.54q.177-.201.378-.378c.527-.461 1.198-.73 2.54-1.267c6.292-2.517 9.439-3.775 11.236-2.554c.426.29.793.657 1.083 1.083c1.221 1.797-.038 4.943-2.554 11.236c-.537 1.342-.806 2.013-1.267 2.54q-.177.201-.378.378c-.527.461-1.198.73-2.54 1.267Z"}),k("circle",{cx:"12",cy:"12",r:"3"})],-1)])])}}),kf={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Cf=x({name:"solar-book-bookmark-linear",render:function(e,t){return f(),_("svg",kf,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"}
2,[k("path",{d:"M4 8c0-2.828 0-4.243.879-5.121C5.757 2 7.172 2 10 2h4c2.828 0 4.243 0 5.121.879C20 3.757 20 5.172 20 8v8c0 2.828 0 4.243-.879 5.121C18.243 22 16.828 22 14 22h-4c-2.828 0-4.243 0-5.121-.879C4 20.243 4 18.828 4 16z"}),k("path",{d:"M19.898 16h-12c-.93 0-1.395 0-1.777.102A3 3 0 0 0 4 18.224"}),k("path",{"stroke-linecap":"round",d:"M8 7h8m-8 3.5h5m0 5.5v3.53c0 .276 0 .414-.095.47s-.224-.006-.484-.13l-1.242-.59c-.088-.04-.132-.062-.179-.062s-.091.021-.179.063l-1.242.59c-.26.123-.39.185-.484.129C9 19.944 9 19.806 9 19.53v-3.08"})],-1)])])}}),jf={class:"bg-background rounded-lg flex flex-col max-h-[90vh]"},Ef={class:"flex items-center justify-center gap-2 pt-6 pb-2"},Sf={class:"flex items-center gap-3 px-6 pt-4 pb-2"},Af={class:"text-lg font-semibold text-foreground"},Pf={class:"text-sm text-muted-foreground"},Mf={class:"flex-1 flex flex-col min-h-0"},Lf={key:0,class:"flex items-center justify-center flex-1"},Of={key:1,class:"flex flex-col items-center justify-center flex-1 py-8 px-6"},Rf={class:"h-20 w-20 rounded-full bg-primary/10 flex items-center justify-center mb-6"},zf={class:"text-2xl font-bold text-foreground mb-3"},If={key:2,class:"flex flex-col items-center justify-center flex-1 py-8 px-6"},Tf={class:"w-full max-w-sm space-y-4"},$f={key:0,class:"text-xs text-red-500 mt-1"},Nf={key:0,class:"text-xs text-red-500 mt-1"},Bf={key:1,class:"text-xs text-muted-foreground mt-1"},Df={key:3,class:"flex-1 overflow-y-auto px-6 py-4"},Vf={class:"space-y-2"},Uf=["src","alt"],Ff={class:"flex-1 min-w-0"},qf={class:"flex items-center gap-2"},Hf={class:"font-medium text-sm text-foreground truncate"},Wf=["src","alt"],Zf={class:"text-xs text-muted-foreground truncate"},Gf={key:4,class:"flex-1 overflow-y-auto px-6 py-4"},Kf={class:"space-y-2"},Qf=["src","alt"],Jf={class:"flex-1 min-w-0"},Yf={class:"font-medium text-sm text-foreground truncate"},Xf={class:"text-xs text-muted-foreground"},eh={key:5,class:"flex flex-col items-center justify-center flex-1 py-8 px-6"},th={class:"w-full max-w-sm space-y-4"},ah=["href"],nh={class:"h-12 w-12 rounded-xl bg-primary/10 flex items-center justify-center shrink-0"},sh=["href"],oh={class:"h-12 w-12 rounded-xl bg-primary/10 flex items-center justify-center shrink-0"},ih={key:6,class:"flex flex-col items-center justify-center flex-1 py-8 px-6"},rh={class:"h-16 w-16 rounded-full bg-primary/10 flex items-center justify-center mb-4"},lh={key:7,class:"flex flex-col items-center justify-center flex-1 py-8 px-6"},ch={class:"h-16 w-16 rounded-2xl bg-primary/10 flex items-center justify-center mb-4"},dh={class:"flex items-center justify-between px-6 py-4 border-t border-border"},uh={class:"flex items-center gap-2"},mh={__name:"OnboardingWizard",props:{show:Boolean},emits:["close","completed"],setup(e,{emit:t}){const n=e,s=t;yf();const r=Mt(),l=o(1),c=o(!1),d=o([]),u=o([]),m=o(!1),p=o(""),v=o(""),w=o(""),x=o(""),C=o(!1),M=o(!1),L=i(()=>r.auth?.user);function O(e){const t=e.display_name?.trim(),a=e.bio?.trim();return a?t?`${t} — ${a}`:`@${e.username} — ${a}`:t?`${t} — @${e.username}`:`@${e.username}`}async function R(){if(!m.value){m.value=!0;try{await a.post(route("onboarding.complete")),s("completed")}catch(e){console.error("Failed to complete onboarding",e)}finally{m.value=!1}}}async function z(){(2!==l.value||await async function(){if(M.value)return!1;if(!p.value.trim()&&!v.value.trim())return!0;w.value=N();const e=p.value.trim().length>60?"Имя не должно быть длиннее 60 символов":"";if(w.value||e){if(w.value)return!1;if(e)return x.value=e,!1}if(!(await async function(){const e=v.value.trim(),t=N();if(t)return w.value=t,!1;if(e===L.value?.username)return w.value="",!0;C.value=!0,w.value="";try{return!!(await a.post(route("onboarding.check-username"),{username:e})).data.available||(w.value="Этот логин уже занят",!1)}catch{return!0}finally{C.value=!1}}()))return!1;M.value=!0;try{return await a.post(route("onboarding.profile"),{name:p.value.trim(),username:v.value.trim()}),!0}catch(t){return t.response?.data?.errors?.username&&(w.value=t.response.data.errors.username[0]),!1}finally{M.value=!1}}())&&l.value<7&&l.value++}function I(){l.value>1&&l.value--}function T(){R()}P(()=>n.show,async e=>{if(e){l.value=1,p.value=L.value?.display_name?.trim()||"",v.value=L.value?.username||"",w.value="",x.value="",c.value=!0;try{const[e,t]=await Promise.all([a.get(route("onboarding.authors")),a.get(route("onboarding.communities"))]);d.value=e.data.data,u.value=t.data.data}catch(t){console.error("Failed to load onboarding data",t)}finally{c.value=!1}}});const $=/^[0-9A-Za-z\-_]+$/;function N(){const e=v.value.trim();
2return e?e.length<2?"Логин должен быть не короче 2 символов":e.length>15?"Логин должен быть не длиннее 15 символов":$.test(e)?"":"Логин может содержать только латиницу, цифры, дефис и подчёркивание":"Логин не может быть пустым"}function B(){R(),window.location.href=route("story.create")}const D=e=>{const t={1:{title:"Добро пожаловать!",subtitle:"Сейчас я расскажу тебе как тут всё устроено",icon:dm},2:{title:"Ты кто?",subtitle:"Расскажи немного о себе",icon:Wa},3:{title:"Интересные авторы",subtitle:"Подпишись на авторов, которые создают интересный контент",icon:dm},4:{title:"Интересные сообщества",subtitle:"Вступи в сообщества по интересам",icon:Qa},5:{title:"Полезные ссылки",subtitle:"Познакомься с платформой",icon:_f},6:{title:"Поддержи хаб",subtitle:"Помоги проекту развиваться",icon:hc},7:{title:"Напиши историю",subtitle:"Не знаешь с чего начать?",icon:an}};return t[e]||t[1]};return(t,n)=>{const s=Ft;return f(),h(wf,{show:e.show,closeable:!1,"max-width":"2xl"},{default:g(()=>[k("div",jf,[k("div",Ef,[(f(),_(W,null,Z(7,e=>k("div",{key:e,class:y(["h-2 rounded-full transition-all duration-300",e===l.value?"w-8 bg-primary":e<l.value?"w-2 bg-primary/50":"w-2 bg-muted"])},null,2)),64))]),k("div",Sf,[(f(),h(te(D(l.value).icon),{class:"h-6 w-6 text-primary shrink-0"})),k("div",null,[k("h2",Af,E(D(l.value).title),1),k("p",Pf,E(D(l.value).subtitle),1)])]),k("div",Mf,[c.value?(f(),_("div",Lf,[...n[4]||(n[4]=[k("div",{class:"animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full"},null,-1)])])):A("",!0),c.value||1!==l.value?A("",!0):(f(),_("div",Of,[k("div",Rf,[j(b(dm),{class:"h-10 w-10 text-primary"})]),k("h3",zf," Привет, "+E(L.value?.display_name||L.value?.username)+"! ",1),n[5]||(n[5]=k("p",{class:"text-muted-foreground text-lg max-w-md leading-relaxed"},[S(" Спасибо за регистрацию на "),k("span",{class:"text-primary font-medium"},"EntHub"),S(". Сейчас я расскажу тебе как тут всё устроено! ")],-1))])),c.value||2!==l.value?A("",!0):(f(),_("div",If,[k("div",Tf,[k("div",null,[n[6]||(n[6]=k("label",{class:"block text-sm font-medium text-foreground mb-1"},"Укажи своё имя",-1)),ue(k("input",{"onUpdate:modelValue":n[0]||(n[0]=e=>p.value=e),type:"text",placeholder:"Имя",class:y(["w-full px-4 py-2.5 rounded-xl border border-border bg-background text-foreground placeholder-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50",x.value?"border-red-500 focus:ring-red-500/50":""]),onInput:n[1]||(n[1]=e=>x.value="")},null,34),[[Ie,p.value]]),x.value?(f(),_("p",$f,E(x.value),1)):A("",!0)]),k("div",null,[n[7]||(n[7]=k("label",{class:"block text-sm font-medium text-foreground mb-1"}
2,"Логин",-1)),ue(k("input",{"onUpdate:modelValue":n[2]||(n[2]=e=>v.value=e),type:"text",placeholder:"Логин",maxlength:"15",class:y(["w-full px-4 py-2.5 rounded-xl border border-border bg-background text-foreground placeholder-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50",w.value?"border-red-500 focus:ring-red-500/50":""]),onInput:n[3]||(n[3]=e=>w.value="")},null,34),[[Ie,v.value]]),w.value?(f(),_("p",Nf,E(w.value),1)):(f(),_("p",Bf,"До 15 символов: латиница, цифры, дефис, подчёркивание"))])])])),c.value||3!==l.value?A("",!0):(f(),_("div",Df,[k("div",Vf,[(f(!0),_(W,null,Z(d.value,e=>(f(),_("div",{key:e.id,class:"flex items-center gap-2 sm:gap-3 p-2 sm:p-3 rounded-xl border border-border hover:bg-accent/50 transition-colors"},[k("img",{src:e.avatar_url,alt:e.username,class:"h-9 w-9 sm:h-10 sm:w-10 rounded-full bg-muted shrink-0"},null,8,Uf),k("div",Ff,[k("div",qf,[k("span",Hf,E(e.display_name||"@"+e.username),1),e.primary_badge?.image?(f(),_("img",{key:0,src:e.primary_badge.image,alt:e.primary_badge.name,class:"h-4 w-4 shrink-0"},null,8,Wf)):A("",!0)]),k("div",Zf,E(O(e)),1)]),j(s,{variant:e.is_followed?"destructive":"default",size:"sm",onClick:t=>async function(e){try{const t=await a.post(route("user.utils.follow"),{following:e.id});t.data.success&&(e.is_followed=t.data.isFollowingBy)}catch(t){console.error("Failed to toggle follow",t)}}(e)},{default:g(()=>[S(E(e.is_followed?"Отписаться":"Читать"),1)]),_:2},1032,["variant","onClick"])]))),128))])])),c.value||4!==l.value?A("",!0):(f(),_("div",Gf,[k("div",Kf,[(f(!0),_(W,null,Z(u.value,e=>(f(),_("div",{key:e.id,class:"flex items-center gap-2 sm:gap-3 p-2 sm:p-3 rounded-xl border border-border hover:bg-accent/50 transition-colors"},[k("img",{src:e.avatar_url,alt:e.name,class:"h-9 w-9 sm:h-10 sm:w-10 rounded-lg bg-muted shrink-0"},null,8,Qf),k("div",Jf,[k("div",Yf,E(e.name),1),k("div",Xf,E(e.members_count)+" участников ",1)]),j(s,{variant:e.is_followed?"destructive":"default",size:"sm",onClick:t=>async function(e){try{const t=await a.post(route("community.utils.follow"),{following:e.id});t.data.success&&(e.is_followed=t.data.isFollowingBy)}catch(t){console.error("Failed to toggle follow",t)}}(e)},{default:g(()=>[S(E(e.is_followed?"Покинуть":"Вступить"),1)]),_:2},1032,["variant","onClick"])]))),128))])])),c.value||5!==l.value?A("",!0):(f(),_("div",eh,[k("div",th,[k("a",{href:t.route("page.show",{page:"rules"}),target:"_blank",class:"flex items-center gap-4 p-4 rounded-xl border border-border hover:bg-accent/50 transition-colors group"},[k("div",nh,[j(b(Cf),{class:"h-6 w-6 text-primary"})]),n[8]||(n[8]=k("div",null,[k("div",{class:"font-medium text-foreground group-hover:text-primary transition-colors"},"Правила сайта"),k("div",{class:"text-sm text-muted-foreground"},"Ознакомься с правилами поведения на хабе")],-1))],8,ah),k("a",{href:t.route("featured"),target:"_blank",class:"flex items-center gap-4 p-4 rounded-xl border border-border hover:bg-accent/50 transition-colors group"},[k("div",oh,[j(b(rn),{class:"h-6 w-6 text-primary"})]),n[9]||(n[9]=k("div",null,[k("div",{class:"font-medium text-foreground group-hover:text-primary transition-colors"},"Лучшие истории"),k("div",{class:"text-sm text-muted-foreground"},"Раздел Лучшее — лонгриды и интересное чтиво, отобранное сообществом")],-1))],8,sh)])])),c.value||6!==l.value?A("",!0):(f(),_("div",ih,[k("div",rh,[j(b(hc),{class:"h-8 w-8 text-primary"})]),n[10]||(n[10]=k("h3",{class:"text-xl font-semibold text-foreground mb-2"},"Поддержи хаб",-1)),n[11]||(n[11]=k("p",{class:"text-muted-foreground max-w-md mb-6 text-center"}," А ещё ты можешь поддержать проект на Boosty или Patreon ",-1)),n[12]||(n[12]=k("div",{class:"w-full max-w-sm space-y-4"},[k("a",{href:"https://boosty.to/enthub/",target:"_blank",class:"flex items-center gap-4 p-4 rounded-xl border border-border hover:bg-accent/50 transition-colors group"},[k("div",{class:"h-12 w-12 rounded-xl bg-[#F15A2C]/10 flex items-center justify-center shrink-0"},[k("span",{class:"text-lg font-bold text-[#F15A2C]"},"B")]),k("div",null,[k("div",{class:"font-medium text-foreground group-hover:text-[#F15A2C] transition-colors"},"Boosty"),k("div",{class:"text-sm text-muted-foreground"},"Подписка на русскоязычную аудиторию")])]),k("a",{href:"https://www.patreon.com/c/enthub",target:"_blank",class:"flex items-center gap-4 p-4 rounded-xl border border-border hover:bg-accent/50 transition-colors group"},[k("div",{class:"h-12 w-12 rounded-xl bg-[#FF424D]/10 flex items-center justify-center shrink-0"},[k("span",{class:"text-lg font-bold text-[#FF424D]"},"P")]),k("div",null,[k("div",{class:"font-medium text-foreground group-hover:text-[#FF424D] transition-colors"},"Patreon"),k("div",{class:"text-sm text-muted-foreground"},"Международная подписка")])])],-1)),n[13]||(n[13]=k("div",{class:"mt-4 text-sm text-muted-foreground text-center max-w-sm leading-relaxed"}," Подписчики получают хаб без рекламы, доступ к планировщику публикаций и изменение акцентной темы сайта ",-1))])),c.value||7!==l.value?A("",!0):(f(),_("div",lh,[k("div",ch,[j(b(an),{class:"h-8 w-8 text-primary"})]),n[15]||(n[15]=k("h3",{class:"text-xl font-semibold text-foreground mb-2"},"Поделись своими впечатлениями",-1)),n[16]||(n[16]=k("p",{class:"text-muted-foreground max-w-md mb-6 text-center"},[S(" Напиши о том, во что ты сейчас играешь, какой фильм недавно посмотрел,"),k("br"),S(" что тебя впечатлило или вдохновило. Расскажи свою историю! ")],-1)),j(s,{size:"lg",onClick:B},{default:g(()=>[j(b(an),{class:"h-4 w-4 mr-2"}),n[14]||(n[14]=S(" Написать историю ",-1))]),_:1})]))]),k("div",dh,[j(s,{variant:"ghost",onClick:T,disabled:m.value},{default:g(()=>[S(E(m.value?"Завершаем...":"Пропустить"),1)]),_:1},8,["disabled"]),k("div",uh,[l.value>1?(f(),h(s,{key:0,variant:"outline",size:"sm",onClick:I},{default:g(()=>[j(b(Xp),{class:"h-4 w-4 mr-1"}),n[17]||(n[17]=S(" Назад ",-1))]),_:1})):A("",!0),l.value<7?(f(),h(s,{key:1,size:"sm",onClick:z},{default:g(()=>[n[18]||(n[18]=S(" Далее ",-1)),j(b(Xr),{class:"h-4 w-4 ml-1"})]),_:1})):(f(),h(s,{key:2,variant:"default",onClick:R,disabled:m.value},{default:g(()=>[j(b(Kr),{class:"h-4 w-4 mr-1"}),S(" "+E(m.value?"Завершаем...":"Завершить"),1)]),_:1},8,["disabled"]))])])])]),_:1},8,["show"])}}},ph=p({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const a=L(e,t);return(e,t)=>(f(),h(b(ae),ne(se(b(a))),{default:g(()=>[v(e.$slots,"default")]),_:3},16))}}),fh=p({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{},closeIcon:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const a=e,n=t,s=i(()=>{const{class:e,...t}=a;return t}),o=L(s,n);return(e,t)=>(f(),h(b(ce),null,{default:g(()=>[j(b(de),{class:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),j(b(fe),R(b(o),{class:b(Vt)("fixed left-1/2 top-1/2 z-50 grid w-full max-w-sm md:max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background dark:bg-deeper p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",a.class)}),{default:g(()=>[v(e.$slots,"default"),e.closeIcon?A("",!0):(f(),h(b(ie),{key:0,class:"absolute right-4 top-4 roun
2ded-full p-1 hover:text-foreground hover:bg-muted opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-0 focus:ring-ring focus:ring-offset-0 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},{default:g(()=>[j(b(pe),{class:"w-4 h-4"}),t[0]||(t[0]=k("span",{class:"sr-only"},"Close",-1))]),_:1}))]),_:3},16,["class"])]),_:3}))}}),hh=p({__name:"DialogHeader",props:{class:{}},setup(e){const t=e;return(e,a)=>(f(),_("div",{class:y(b(Vt)("flex flex-col gap-y-1.5 text-center sm:text-left",t.class))},[v(e.$slots,"default")],2))}}),gh=p({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,a=i(()=>{const{class:e,...a}=t;return a}),n=_e(a);return(e,a)=>(f(),h(b(le),R(b(n),{class:b(Vt)("text-sm text-muted-foreground",t.class)}),{default:g(()=>[v(e.$slots,"default")]),_:3},16,["class"]))}}),vh=p({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,a=i(()=>{const{class:e,...a}=t;return a}),n=_e(a);return(e,a)=>(f(),h(b(re),R(b(n),{class:b(Vt)("text-lg font-semibold leading-none tracking-tight",t.class)}),{default:g(()=>[v(e.$slots,"default")]),_:3},16,["class"]))}}),yh={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},bh=x({name:"solar-add-circle-linear",render:function(e,t){return f(),_("svg",yh,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("circle",{cx:"12",cy:"12",r:"10"}),k("path",{"stroke-linecap":"round",d:"M15 12h-3m0 0H9m3 0V9m0 3v3"})],-1)])])}}),wh={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},xh=x({name:"solar-letter-linear",render:function(e,t){return f(),_("svg",wh,[...t[0]||(t[0]=[k("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[k("path",{d:"M2 12c0-3.771 0-5.657 1.172-6.828S6.229 4 10 4h4c3.771 0 5.657 0 6.828 1.172S22 8.229 22 12s0 5.657-1.172 6.828S17.771 20 14 20h-4c-3.771 0-5.657 0-6.828-1.172S2 15.771 2 12Z"}),k("path",{"stroke-linecap":"round",d:"m6 8l2.159 1.8c1.837 1.53 2.755 2.295 3.841 2.295s2.005-.765 3.841-2.296L18 8"})],-1)])])}}),_h={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},kh=x({name:"solar-code-linear",render:function(e,t){return f(),_("svg",_h,[...t[0]||(t[0]=[k("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",d:"m17 7.83l1.697 1.526c1.542 1.389 2.313 2.083 2.313 2.974c0 .89-.771 1.585-2.314 2.973L17 16.83M13.987 5L12 12.415l-1.987 7.415M7 7.83L5.304 9.356C3.76 10.745 2.99 11.44 2.99 12.33s.771 1.585 2.314 2.973L7 16.83"},null,-1)])])}}),Ch={class:"text-sm text-destructive"},jh={__name:"InputError",props:{message:{type:String}},setup:e=>(t,a)=>ue((f(),_("div",null,[k("p",Ch,E(e.message),1)],512)),[[me,e.message]])},Eh=p({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,a=i(()=>{const{class:e,...a}=t;return a});return(e,n)=>(f(),h(b(Ne),R(a.value,{class:b(Vt)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t.class)}),{default:g(()=>[v(e.$slots,"default")]),_:3},16,["class"]))}}),Sh=p({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=Be(a,"modelValue",t,{passive:!0,defaultValue:a.defaultValue});return(e,t)=>ue((f(),_("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>U(n)?n.value=e:null),class:y(b(Vt)("flex h-9 w-full rounded-lg border border-input bg-background dark:bg-deeper px-3 py-1 text-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary focus:shadow disabled:cursor-not-allowed disabled:opacity-50",a.class))},null,2)),[[Ie,b(n)]])}}),Ah={class:"space-y-2 max-h-80 overflow-y-auto"},Ph=["onClick"],Mh=["src","alt"],Lh={class:"flex-1 min-w-0"},Oh={class:"text-sm font-medium truncate"},Rh={class:"text-xs text-muted-foreground truncate"},zh={class:"flex items-center gap-1 shrink-0"},Ih=["onClick"],Th={key:0,class:"text-sm text-muted-foreground text-center py-4"},$h={key:0,class:"text-xs text-muted-foreground text-center"},Nh={key:1,class:"text-xs text-muted-foreground text-center"},Bh={class:"grid gap-2"},Dh={class:"flex gap-2"},Vh={class:"grid gap-2"},Uh={class:"text-sm text-muted-foreground flex items-center gap-2"},Fh={class:"grid gap-2"},qh=["value"],Hh={class:"flex gap-2"},Wh={class:"text-center text-sm"},Zh=["disabled"],Gh={__name:"SwitchAccountModal",props:{open:Boolean},emits:["update:open"],setup(e,{emit:t}){const{toastSuccess:n,toastError:s}=rf();
2yf();const r=Mt(),l=e,c=o([]),d=o(2),u=o(0),m=o(!1),p=o("list"),v=o(""),y=o(""),w=o({}),x=o(!1),C=o(!1);let M=null;const L=o(0);r.auth?.user.id;const O=async()=>{w.value={},x.value=!0;try{await a.post(route("account.switch.send-otp"),{email:v.value}),p.value="otp",$(60)}catch(e){e.response?.data?.errors?w.value=e.response.data.errors:s(e.response?.data?.message||"Ошибка отправки кода")}finally{x.value=!1}},R=async()=>{w.value={},C.value=!0;try{const e=await a.post(route("account.switch.store"),{email:v.value,otp:y.value});c.value.push(e.data.account),u.value--,T(),n(e.data.message)}catch(e){e.response?.data?.errors?w.value=e.response.data.errors:s(e.response?.data?.message||"Ошибка при привязке аккаунта")}finally{C.value=!1}},z=async()=>{if(!(L.value>0)){w.value={};try{await a.post(route("account.switch.send-otp"),{email:v.value}),$(60)}catch(e){e.response?.data?.errors?w.value=e.response.data.errors:s("Ошибка повторной отправки кода")}}},I=()=>{T()},T=()=>{p.value="list",v.value="",y.value="",w.value={},N(),L.value=0};function $(e=60){L.value=e,N(),M=setInterval(()=>{L.value--,L.value<=0&&N()},1e3)}function N(){M&&(clearInterval(M),M=null)}function D(e){y.value=e.target.value.replace(/\D/g,"").slice(0,6)}const U=i(()=>L.value>0?`Повторно через ${L.value}с`:"Отправить код повторно");return P(()=>l.open,e=>{e&&(T(),(async()=>{try{const e=await a.get(route("account.switch.index"));c.value=e.data.linked_accounts,d.value=e.data.limit,u.value=e.data.remaining}catch{}})())}),B(()=>{N()}),(t,o)=>{const i=vh,r=gh,l=hh,P=fh,M=ph;return f(),h(M,{open:e.open,"onUpdate:open":o[3]||(o[3]=e=>t.$emit("update:open",e))},{default:g(()=>[j(P,{class:"sm:max-w-sm"},{default:g(()=>[j(l,null,{default:g(()=>[j(i,null,{default:g(()=>[...o[4]||(o[4]=[S("Переключить аккаунт",-1)])]),_:1}),j(r,null,{default:g(()=>[...o[5]||(o[5]=[S(" Выберите или добавьте аккаунт для переключения. ",-1)])]),_:1})]),_:1}),"list"===p.value?(f(),_(W,{key:0},[k("div",Ah,[(f(!0),_(W,null,Z(c.value,e=>(f(),_("div",{key:e.id,class:"flex items-center gap-3 p-2 rounded-lg hover:bg-accent cursor-pointer transition-colors",onClick:t=>(async e=>{m.value=!0;try{const t=await a.post(route("account.switch.switch",e.id));window.location.href=t.data?.redirect||"/"}catch{m.value=!1}})(e)},[k("img",{src:e.avatar_url,alt:e.username,class:"h-9 w-9 rounded-full bg-muted shrink-0"},null,8,Mh),k("div",Lh,[k("div",Oh,E(e.name||e.username),1),k("div",Rh,"@"+E(e.username),1)]),k("div",zh,[k("button",{class:"p-1.5 text-muted-foreground hover:text-destructive transition-colors rounded-md hover:bg-destructive/10",title:"Отвязать",onClick:V(t=>(async e=>{try{await a.delete(route("account.switch.destroy",e.id)),c.value=c.value.filter(t=>t.id!==e.id),u.value++,n("Аккаунт отвязан")}catch{s("Ошибка при отвязке")}})(e),["stop"])},[j(b(Da),{class:"h-4 w-4"})],8,Ih),j(b(Xr),{class:"h-4 w-4 text-muted-foreground"})])],8,Ph))),128)),0===c.value.length?(f(),_("div",Th," Нет привязанных аккаунтов. ")):A("",!0)]),u.value>0?(f(),_("div",$h," Можно привязать ещё "+E(u.value)+" акк. ",1)):(f(),_("div",Nh," Лимит аккаунтов ("+E(d.value)+"). ",1)),u.value>0?(f(),h(Ft,{key:2,variant:"outline",class:"w-full gap-2",onClick:o[0]||(o[0]=e=>p.value="email")},{default:g(()=>[j(b(bh),{class:"h-4 w-4"}),o[6]||(o[6]=S(" Привязать аккаунт ",-1))]),_:1})):A("",!0)],64)):A("",!0),"email"===p.value?(f(),_("form",{key:1,onSubmit:V(O,["prevent"]),class:"space-y-3"},[k("div",Bh,[j(Eh,{for:"link-email"},{default:g(()=>[...o[7]||(o[7]=[S("Почта",-1)])]),_:1}),j(Sh,{id:"link-email",modelValue:v.value,"onUpdate:modelValue":o[1]||(o[1]=e=>v.value=e),type:"email",placeholder:"[email protected]",class:"w-full",autofocus:""},null,8,["modelValue"]),j(jh,{message:w.value.email},null,8,["message"])]),k("div",Dh,[j(Ft,{type:"button",variant:"ghost",class:"flex-1",onClick:I},{default:g(()=>[...o[8]||(o[8]=[S(" Отмена ",-1)])]),_:1}),j(Ft,{type:"submit",class:"flex-1 gap-2",disabled:x.value||!v.value},{default:g(()=>
2[j(b(xh),{class:"h-4 w-4"}),S(" "+E(x.value?"Отправка...":"Отправить код"),1)]),_:1},8,["disabled"])])],32)):A("",!0),"otp"===p.value?(f(),_("form",{key:2,onSubmit:V(R,["prevent"]),class:"space-y-3"},[k("div",Vh,[j(Eh,null,{default:g(()=>[...o[9]||(o[9]=[S("Почта",-1)])]),_:1}),k("div",Uh,[k("span",null,E(v.value),1),k("button",{type:"button",onClick:o[2]||(o[2]=e=>p.value="email"),class:"text-endpoint hover:underline text-xs"},"Изменить")])]),k("div",Fh,[j(Eh,{for:"link-otp"},{default:g(()=>[...o[10]||(o[10]=[S("Введите код из письма",-1)])]),_:1}),k("input",{id:"link-otp",type:"text",inputmode:"numeric",autocomplete:"one-time-code",maxlength:"6",value:y.value,onInput:D,class:"w-full text-center text-2xl tracking-[0.5em] font-mono h-12 rounded-lg border border-input bg-background px-3 py-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",placeholder:"000000",required:"",autofocus:""},null,40,qh),j(jh,{message:w.value.otp},null,8,["message"])]),k("div",Hh,[j(Ft,{type:"button",variant:"ghost",class:"flex-1",onClick:I},{default:g(()=>[...o[11]||(o[11]=[S(" Отмена ",-1)])]),_:1}),j(Ft,{type:"submit",class:"flex-1 gap-2",disabled:C.value||6!==y.value.length},{default:g(()=>[j(b(kh),{class:"h-4 w-4"}),S(" "+E(C.value?"Привязка...":"Подтвердить"),1)]),_:1},8,["disabled"])]),k("div",Wh,[k("button",{type:"button",onClick:z,disabled:L.value>0,class:"hover:underline text-endpoint hover:text-primary rounded-md focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed"},E(U.value),9,Zh)])],32)):A("",!0)]),_:1})]),_:1},8,["open"])}}},Kh=s("liveCounters",()=>{const e=o({});let t=null;function a(t){for(const[a,n]of Object.entries(t||{}))e.value[a]={...e.value[a]||{},...n}}return{counters:e,applyBatch:a,getFor:function(t){return e.value[t]||null},clear:function(t){t&&e.value[t]&&delete e.value[t]},connect:function(){if("undefined"!=typeof window&&window.Echo&&!t)try{t=window.Echo.channel("story-counters").listen(".counters.updated",e=>{e&&e.counters&&a(e.counters)})}catch(e){}},disconnect:function(){if(t){try{t.leave("story-counters")}catch(e){}t=null}}}}),Qh={class:"space-y-4"},Jh={__name:"PageSkeleton",setup(e){const t=[0,1,2];return(e,a)=>(f(),_("div",Qh,[(f(),_(W,null,Z(t,e=>k("div",{key:e,class:"bg-background sm:rounded-lg p-5"},[...a[0]||(a[0]=[M('<div class="flex items-center gap-3"><div class="h-10 w-10 rounded-full bg-muted/70 animate-pulse shrink-0"></div><div class="flex flex-col gap-2 grow"><div class="h-3 w-1/3 bg-muted/70 animate-pulse rounded-full"></div><div class="h-2.5 w-1/4 bg-muted/50 animate-pulse rounded-full"></div></div></div><div class="mt-4 h-5 w-3/4 bg-muted/70 animate-pulse rounded-full"></div><div class="mt-3 space-y-2"><div class="h-3 w-full bg-muted/50 animate-pulse rounded-full"></div><div class="h-3 w-11/12 bg-muted/50 animate-pulse rounded-full"></div><div class="h-3 w-2/3 bg-muted/50 animate-pulse rounded-full"></div></div><div class="mt-4 h-36 w-full bg-muted/40 animate-pulse rounded-lg"></div>',4)])])),64))]))}},Yh={class:"divide-y divide-border bg-background sm:rounded-lg"},Xh={__name:"IdeasRowsSkeleton",props:{rows:{type:Number,default:6}},setup(e){const t=e;return(e,a)=>(f(),_("div",Yh,[(f(!0),_(W,null,Z(t.rows,e=>(f(),_("div",{key:e,class:"flex items-stretch gap-0"},[...a[0]||(a[0]=[M('<div class="flex flex-col items-center justify-center px-3 py-4 shrink-0"><div class="flex flex-col items-center rounded-xl px-3 py-2 w-14"><div class="w-5 h-5 rounded-full bg-muted"></div><div class="h-3 w-6 rounded-full bg-muted my-1.5"></div><div class="w-5 h-5 rounded-full bg-muted"></div></div></div><div class="flex items-center gap-4 py-4 pr-4 min-w-0 flex-1"><div class="min-w-0 flex-1"><div class="h-3.5 bg-muted rounded-full w-3/5 mb-2.5"></div><div class="h-2.5 bg-muted rounded-full w-4/5 mb-3"></div><div class="flex items-center gap-2"><div class="h-2.5 bg-muted rounded-full w-20"></div><div class="h-2.5 bg-muted rounded-full w-8 ml-auto"></div></div></div></div>',2)])]))),128))]))}},eg={class:"flex flex-col max-w-3xl mx-auto w-full animate-pulse"},tg={class:"mt-4"},ag={__name:"IdeasSkeleton",props:{rows:{type:Number,default:6}},setup:e=>(t,a)=>(f(),_("div",eg,[a[0]||(a[0]=M('<div class="py-4 px-4 md:px-5 bg-background sm:rou
2nded-lg"><div class="h-5 w-16 rounded-full bg-muted"></div><div class="h-3.5 w-4/5 rounded-full bg-muted/70 mt-1.5"></div><div class="flex items-center justify-between gap-3 pt-3 mt-3 border-t border-border"><div class="h-8 w-32 rounded-lg bg-muted"></div><div class="h-8 w-28 rounded-lg bg-muted"></div></div></div>',1)),k("div",tg,[j(Xh,{rows:e.rows},null,8,["rows"])])]))},ng={class:"flex flex-col max-w-3xl mx-auto w-full animate-pulse"},sg={class:"mt-4 bg-background sm:rounded-lg divide-y divide-border"},og={__name:"ProjectsSkeleton",props:{rows:{type:Number,default:6}},setup:e=>(t,a)=>(f(),_("div",ng,[a[1]||(a[1]=M('<div class="py-4 px-4 md:px-5 bg-background sm:rounded-lg"><div class="h-5 w-40 rounded-full bg-muted"></div><div class="h-3.5 w-3/4 rounded-full bg-muted/70 mt-1.5"></div><div class="flex items-center justify-between gap-4 pt-3 mt-3 border-t border-border"><div class="flex items-center gap-1 bg-muted rounded-lg p-1"><div class="h-6 w-16 rounded-md bg-background/60"></div><div class="h-6 w-12 rounded-md"></div><div class="h-6 w-20 rounded-md"></div></div><div class="h-8 w-36 rounded-lg bg-muted"></div></div></div>',1)),k("div",sg,[(f(!0),_(W,null,Z(e.rows,e=>(f(),_("div",{key:e,class:"flex items-stretch gap-0"},[...a[0]||(a[0]=[M('<div class="flex flex-col items-center justify-center px-3 py-4 shrink-0"><div class="flex flex-col items-center gap-1 rounded-xl px-3 py-2 w-12"><div class="w-5 h-5 rounded-full bg-muted"></div><div class="h-3 w-5 rounded-full bg-muted"></div></div></div><div class="flex items-center gap-4 py-4 pr-4 min-w-0 flex-1"><div class="w-14 h-14 rounded-xl bg-muted shrink-0"></div><div class="min-w-0 flex-1"><div class="h-3.5 bg-muted rounded-full w-2/5 mb-2.5"></div><div class="h-2.5 bg-muted rounded-full w-3/4 mb-3"></div><div class="flex items-center gap-2"><div class="h-4 bg-muted rounded w-16"></div><div class="h-4 bg-muted rounded w-20"></div><div class="h-2.5 bg-muted rounded-full w-8 ml-auto"></div></div></div></div>',2)])]))),128))])]))},ig={class:"space-y-4 animate-pulse"},rg={class:"bg-background sm:rounded-lg divide-y divide-border"},lg={__name:"CommunitiesSkeleton",props:{rows:{type:Number,default:8}},setup:e=>(t,a)=>(f(),_("div",ig,[a[1]||(a[1]=M('<div class="bg-background sm:rounded-lg px-4 md:px-5 py-4"><div class="h-5 w-40 rounded-full bg-muted"></div><div class="h-3.5 w-2/3 rounded-full bg-muted/70 mt-2"></div><div class="flex items-center justify-between gap-4 pt-3 mt-3 border-t border-border"><div class="flex items-center gap-1 bg-muted rounded-lg p-1"><div class="h-6 w-32 rounded-md bg-background/60"></div><div class="h-6 w-32 rounded-md"></div></div><div class="h-9 w-40 rounded-lg bg-muted"></div></div></div>',1)),k("div",rg,[(f(!0),_(W,null,Z(e.rows,e=>(f(),_("div",{key:e,class:"flex items-center gap-4 px-4 py-3 first:pt-4 last:pb-4"},[...a[0]||(a[0]=[M('<div class="w-10 h-10 rounded-full bg-muted shrink-0"></div><div class="flex-1 min-w-0 grid gap-2"><div class="h-4 w-40 rounded-full bg-muted"></div><div class="h-2.5 w-24 rounded-full bg-muted/70"></div><div class="h-3 w-3/5 rounded-full bg-muted/50"></div></div><div class="h-6 w-16 rounded-full bg-muted/70 shrink-0"></div>',3)])]))),128))])]))},cg={class:"animate-pulse bg-background mb-3 sm:rounded-xl"},dg={class:"px-4 sm:px-6 mt-4"},ug={class:"flex items-start justify-between"},mg={key:0,class:"-mt-16 h-28 w-28 rounded-full bg-muted"},pg={key:1,class:"h-3"},fg={key:0,class:"h-12 mt-2 flex items-center gap-5"},hg={__name:"CoverHeaderSkeleton",props:{nav:{type:Boolean,default:!0},avatar:{type:Boolean,default:!0}},setup:e=>(t,a)=>(f(),_("div",cg,[a[3]||(a[3]=k("div",{class:"h-52 bg-muted/70 sm:rounded-t-xl"},null,-1)),k("div",dg,[k("div",ug,[e.avatar?(f(),_("div",mg)):(f(),_("div",pg)),a[0]||(a[0]=k("div",{class:"ml-auto flex items-end gap-2"},[k("div",{class:"h-9 w-24 rounded-full bg-muted/70"}),k("div",{class:"h-9 w-9 rounded-full bg-muted/70"})],-1))]),a[2]||(a[2]=k("div",{class:"my-2 flex flex-col gap-2"},[k("div",{class:"h-5 w-44 rounded-full bg-muted"}),k("div",{class:"h-3 w-36 rounded-full bg-muted/70"}
2),k("div",{class:"h-3 w-64 rounded-full bg-muted/70"})],-1)),e.nav?(f(),_("div",fg,[...a[1]||(a[1]=[k("div",{class:"h-3 w-16 rounded-full bg-muted/70"},null,-1),k("div",{class:"h-3 w-12 rounded-full bg-muted/50"},null,-1),k("div",{class:"h-3 w-14 rounded-full bg-muted/50"},null,-1)])])):A("",!0)])]))},gg={__name:"CommunityShowSkeleton",setup:e=>(e,t)=>(f(),_("div",null,[j(hg),j(Jh)]))},vg={__name:"CollectionShowSkeleton",setup:e=>(e,t)=>(f(),_("div",null,[t[0]||(t[0]=M('<div class="animate-pulse bg-background mb-5 sm:rounded-xl"><div class="h-44 bg-muted/70 sm:rounded-t-xl"></div><div class="px-4 sm:px-6 pt-4 pb-4 flex flex-col gap-2"><div class="h-5 w-52 rounded-full bg-muted"></div><div class="h-3 w-2/3 rounded-full bg-muted/70"></div><div class="h-7 w-24 rounded-md bg-muted/70 mt-1"></div></div></div>',1)),j(Jh)]))},yg={class:"animate-pulse space-y-5"},bg={class:"block bg-background sm:rounded-lg p-4 sm:p-5"},wg=Un({},[["render",function(e,t){return f(),_("div",yg,[(f(),_(W,null,Z(3,e=>k("div",bg,[...t[0]||(t[0]=[M('<div class="flex items-start gap-3"><svg class="w-10 h-10 shrink-0 text-muted" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"></path></svg><div class="min-w-0 flex-1 grid gap-2"><div class="flex items-center gap-2"><div class="h-2.5 bg-muted rounded-full w-32"></div><div class="h-2 bg-muted rounded-full w-16"></div></div><div class="h-2 bg-muted rounded-full max-w-[480px] mb-2"></div><div class="h-2 bg-muted rounded-full max-w-[440px] mb-2"></div><div class="h-2 bg-muted rounded-full max-w-[300px]"></div></div></div>',1)])])),64))])}]]),xg={__name:"UserWallSkeleton",setup:e=>(e,t)=>(f(),_("div",null,[j(hg),t[0]||(t[0]=M('<div class="animate-pulse bg-background sm:rounded-lg p-4 sm:p-5 mb-5"><div class="flex items-start gap-3"><div class="h-9 w-9 rounded-full bg-muted shrink-0"></div><div class="flex-1 grid gap-2"><div class="h-16 w-full rounded-lg bg-muted/70"></div><div class="flex items-center justify-between"><div class="h-8 w-8 rounded-full bg-muted/70"></div><div class="h-8 w-32 rounded-md bg-muted/70"></div></div></div></div></div>',1)),j(wg)]))},_g={__name:"UserPostsSkeleton",setup:e=>(e,t)=>(f(),_("div",null,[j(hg),j(Jh)]))},kg={class:"animate-pulse bg-background sm:rounded-lg py-4"},Cg={__name:"FollowListRowsSkeleton",setup(e){const t=[0,1,2,3,4,5];return(e,a)=>(f(),_("div",kg,[(f(),_(W,null,Z(t,e=>k("div",{key:e,class:"flex items-center gap-3 p-4"},[...a[0]||(a[0]=[k("div",{class:"h-10 w-10 rounded-full bg-muted shrink-0"},null,-1),k("div",{class:"h-3.5 w-40 rounded-full bg-muted/70"},null,-1),k("div",{class:"ml-auto h-5 w-8 rounded bg-muted/50"},null,-1)])])),64))]))}},jg={__name:"UserFollowListSkeleton",setup:e=>(e,t)=>(f(),_("div",null,[j(hg),j(Cg)]))},Eg={class:"animate-pulse block bg-background sm:rounded-lg pb-2 w-full"},Sg={class:"px-4 pb-6"},Ag={class:"flex flex-col gap-2"},Pg={__name:"AchievementsSkeleton",setup(e){const t=[0,1,2,3];return(e,a)=>(f(),_("div",Eg,[a[2]||(a[2]=M('<div class="flex items-center gap-3 px-4 py-3 border-b border-border"><div class="h-5 w-32 rounded-full bg-muted"></div><div class="ml-auto h-7 w-7 rounded-full bg-muted"></div></div><div class="grid grid-cols-2 gap-3 p-4"><div class="bg-card rounded-xl p-4 border border-border text-center"><div class="h-7 w-10 rounded-full bg-muted mx-auto"></div><div class="h-2.5 w-14 rounded-full bg-muted/60 mx-auto mt-2"></div></div><div class="bg-card rounded-xl p-4 border border-border text-center"><div class="h-7 w-10 rounded-full bg-muted mx-auto"></div><div class="h-2.5 w-16 rounded-full bg-muted/60 mx-auto mt-2"></div></div></div><div class="px-4 pb-4"><div class="bg-card rounded-xl p-4 border border-border text-center"><div class="h-2.5 w-24 rounded-full bg-muted/60 mx-auto"></div><div class="h-5 w-12 rounded-full bg-muted mx-auto mt-2"></div><div class="mt-3 h-2 bg-muted rounded-full overflow-hidden"></div></div></div>',3)),k("div",Sg,[a[1]||(a[1]=k("div",{class:"flex items-center gap-2 mb-3"},[k("div",{class:"h-5 w-5 rounded-full bg-muted"}),k("div",{class:"h-4 w-28 rounded-full bg-muted"})],-1)),k("div",Ag,[(f(),_(W,null,Z(t,e=>k("div",{key:e,class:"bg-card rounded-xl p-4 border border-border flex items-center gap-4"},[...a[0]||(a[0]=[M('<div class="w-11 h-11 rounded-xl bg-muted shrink-0"></div><div class="flex-1 min-w-0"><div class="h-3.5 w-2/5 rounded-full bg-muted"></div><div class="h-2.5 w-3/4 rounded-full bg-muted/60 mt-2"></div><div class="mt-3 h-1.5 w-full rounded-full bg-muted/60"></div></div>',2)])])),64))])])]))}},Mg={class:"pt-6"},Lg={__name:"DraftsSkeleton",setup:e=>(e,t)=>
2(f(),_("div",null,[t[0]||(t[0]=k("div",{class:"card-navbar flex items-center justify-between"},[k("div",{class:"h-5 w-24 rounded-full bg-muted"}),k("div",{class:"h-6 w-6 rounded-full bg-muted"})],-1)),k("div",Mg,[j(Jh)])]))},Og={class:"max-w-4xl mx-auto py-8 px-4 animate-pulse"},Rg={class:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8"},zg={class:"grid grid-cols-3 gap-4 text-center"},Ig={__name:"YearRecapSkeleton",setup(e){const t=[0,1,2,3],a=[0,1,2];return(e,n)=>(f(),_("div",Og,[n[3]||(n[3]=M('<div class="text-center mb-12"><div class="h-12 w-2/3 max-w-sm rounded-full bg-muted mx-auto mb-4"></div><div class="h-5 w-56 rounded-full bg-muted/60 mx-auto"></div></div><div class="mb-8 rounded-xl border border-border bg-card p-6 pt-6 text-center"><div class="w-20 h-20 rounded-full bg-muted mx-auto mb-4"></div><div class="h-6 w-40 rounded-full bg-muted mx-auto mb-3"></div><div class="h-3.5 w-64 rounded-full bg-muted/60 mx-auto"></div></div>',2)),k("div",Rg,[(f(),_(W,null,Z(t,e=>k("div",{key:e,class:"rounded-xl border border-border bg-card p-6 pt-6 text-center"},[...n[0]||(n[0]=[k("div",{class:"w-8 h-8 rounded-full bg-muted mx-auto mb-2"},null,-1),k("div",{class:"h-8 w-14 rounded-full bg-muted mx-auto"},null,-1),k("div",{class:"h-3 w-20 rounded-full bg-muted/60 mx-auto mt-2"},null,-1)])])),64))]),(f(),_(W,null,Z(a,e=>k("div",{key:e,class:"mb-8 rounded-xl border border-border bg-card p-6"},[n[2]||(n[2]=k("div",{class:"flex items-center gap-2 mb-6"},[k("div",{class:"w-5 h-5 rounded-full bg-muted"}),k("div",{class:"h-5 w-28 rounded-full bg-muted"})],-1)),k("div",zg,[(f(),_(W,null,Z(3,e=>k("div",{key:e},[...n[1]||(n[1]=[k("div",{class:"h-7 w-12 rounded-full bg-muted mx-auto"},null,-1),k("div",{class:"h-3 w-16 rounded-full bg-muted/60 mx-auto mt-2"},null,-1)])])),64))])])),64))]))}},Tg={class:"space-y-3"},$g={__name:"BookmarksSkeleton",setup:e=>(e,t)=>(f(),_("div",Tg,[t[0]||(t[0]=k("div",{class:"block mx-2"},[k("div",{class:"flex items-center gap-1 px-2 py-1.5 rounded-lg w-fit animate-pulse"},[k("div",{class:"h-4 w-20 rounded-full bg-muted"}),k("div",{class:"w-4 h-4 rounded-full bg-muted"})])],-1)),j(Jh)]))},Ng={class:"mt-5 pb-4 animate-pulse relative block bg-background sm:rounded-lg comment"},Bg={class:"flex flex-col gap-2 px-4 sm:px-5"},Dg=Un({},[["render",function(e,t){return f(),_("div",Ng,[(f(),_(W,null,Z(5,e=>k("div",Bg,[...t[0]||(t[0]=[M('<div class="flex items-center mt-4"><svg class="w-10 h-10 me-3 text-muted" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"></path></svg><div><div class="h-2.5 bg-muted rounded-full w-32 mb-2"></div><div class="w-48 h-2 bg-muted rounded-full"></div></div></div><div class="w-full"><div class="h-2 bg-muted rounded-full max-w-[480px] mb-2.5"></div><div class="h-2 bg-muted rounded-full mb-2.5"></div><div class="h-2 bg-muted rounded-full max-w-[440px] mb-2.5"></div><div class="h-2 bg-muted rounded-full max-w-[460px] mb-2.5"></div><div class="h-2 bg-muted rounded-full max-w-[360px]"></div></div>',2)])])),64))])}]]),Vg={class:"space-y-3"},Ug={__name:"BookmarkCommentsSkeleton",setup:e=>(e,t)=>(f(),_("div",Vg,[t[0]||(t[0]=k("div",{class:"block mx-2"},[k("div",{class:"flex items-center gap-1 px-2 py-1.5 rounded-lg w-fit animate-pulse"},[k("div",{class:"h-4 w-24 rounded-full bg-muted"}),k("div",{class:"w-4 h-4 rounded-full bg-muted"})])],-1)),j(Dg)]))},Fg={class:"animate-pulse"},qg=Un({},[["render",function(e,t){return f(),_("div",Fg,[(f(),_(W,null,Z(6,e=>k("div",{key:e,class:"flex items-center px-4 py-3 gap-3"},[...t[0]||(t[0]=[k("div",{class:"h-12 w-12 rounded-full bg-muted/70 shrink-0"},null,-1),k("div",{class:"flex flex-col gap-2 grow"},[k("div",{class:"h-3 w-1/3 bg-muted/70 rounded-full"}),k("div",{class:"h-2.5 w-2/3 bg-muted/50 rounded-full"})],-1)])])),64))])}]]),Hg=Un({},[["render",function(e,t){return f(),_("div",null,[(f(),_(W,null,Z(5,e=>k("div",{key:e,class:"flex flex-col gap-2 sm:gap-3 animate-pulse px-4 py-2 mb-4"},[...t[0]||(t[0]=[M('<div class="flex items-center gap-2 justify-between"><div class="flex items-start mt-4"><svg class="w-10 h-10 me-3 text-muted" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"></path></svg><div><div class="h-2.5 bg-muted rounded-full w-32 mb-2"></div><div class="w-full flex flex-col gap-2 mt-2"><div class="h-2 w-64 bg-muted rounded-full"></div><div class="h-2 w-56 bg-muted rounded-full"></div></div></div></div><div class="h-6 w-6 bg-muted rounded-full mr-2"></div></div>',1)])])),64))])}]]),Wg=[[/^\/ideas$/,ag],[/^\/achievements$/,Pg],[/^\/drafts$/,Lg],[/^\/my-\d{4}$/,Ig],[/^\/bookmarks\/comments$/,Ug],[/^\/bookmarks$/,$g],[/^\/projects$/,og],[/^\/communities/,lg],[/^\/(explore|search)\/communities/,lg],[/^\/c\/(?!create$)[^/]+/,gg],[/^\/cl\/\d+$/,vg],[/^\/u\/[^/]+\/wall$/,xg],[/^\/u\/[^/]+\/posts/,_g],[/^\/u\/[^/]+\/(followers|followings)$/,jg],[/^\/messages$/,qg],[/^\/messages\/.+/,Hg]],Zg={class:"max-w-7xl mx-auto w-full flex md:grid h-full gap-4 md:gap-8 items-center justify-between sm:max-w-[640px] md:max-w-[744px] md:grid-cols-main-tablet xl:max-w-7xl xl:grid-cols-main-xl"},Gg={class:"flex items-center gap-4 md:col-start-1 xl:col-start-1"},Kg=["title"],Qg={class:"flex items-center gap-4 justify-self-end min-w-0 md:col-start-2 xl:col-start-3"},Jg={class:"hidden xl:inline"},Yg={key:0,class:"flex absolute h-4 min-w-4 top-0 right-0 -mt-0.5 -mr-0.5"},Xg={class:"inline-flex justify-center items-center h-4 min-w-4 px-0.5 text-[10px] bg-primary shadow-sm rounded-full text-white leading-none"},ev=["title"],tv={key:4,class:"hidden md:block"},av=["src","alt"],nv=["src","alt"],sv={class:"flex flex-col"},ov={key:0,class:"font-medium text-base"},iv={class:"font-medium text-sm flex items-center gap-1"},rv={class:"text-muted-foreground"},lv={class:"flex items-center"},cv=["href"],dv={class:"block w-full md:col-start-2"},uv={class:"relative"},mv={key:4,class:"absolute inset-0 z-40 bg-deeper pt-4"},pv={key:2,class:"hidden xl:block xl:col-start-3 px-[10px]"},fv={__name:"AppLayout",setup(e){const t=$(),n=N(),s=0===t.currentRoute.value.matched.length,r=o(!s);s&&t.isReady().then(()=>{r.value=!0},()=>{r.value=!0});const l=s?(()=>{try{return t.resolve(window.location.pathname+window.location.search)}catch(e){return null}})():null,c=i(()=>
2{if(!l||r.value)return!1;const e=l.path||window.location.pathname||"/",t="/story/create"===e||e.startsWith("/story/")&&e.endsWith("/edit")||"/projects/create"===e||e.startsWith("/projects/")&&e.endsWith("/edit"),a="/messages"===e||e.startsWith("/messages/");return!!l.meta.fetchData&&!t&&!a}),d=Mt(),u=hn(),m=Kh(),p=i(()=>!!$t(n.path)),v=i(()=>u.dataUrl===n.fullPath&&(!u.loading||u.revalidatingUrl===n.fullPath)),w=i(()=>n.meta.fetchData&&!p&&!v),x=i(()=>!ae.value&&u.errorUrl===n.fullPath),M=i(()=>function(e){const t=Wg.find(([t])=>t.test(e||"/"));return t?t[1]:Jh}(l?.path||n.path)),L=i(()=>t.currentRoute.value.path),O=o([]),R=i(()=>O.value.length>0);let z=!1;const I=()=>{const e=O.value.pop()||"/";e!==t.currentRoute.value.fullPath&&(z=!0,t.replace(e))};t.afterEach((e,t)=>{z?z=!1:t&&t.matched&&t.matched.length>0&&t.fullPath&&O.value[O.value.length-1]!==t.fullPath&&O.value.push(t.fullPath)}),P(()=>u.data?.toasts,e=>{Array.isArray(e)&&e.length&&(T(e),u.data.toasts=[])},{deep:!0});const{showToasts:T}=rf(),{theme:B,radius:V}=pf(),F=o(!1),q=o(!1),H=o(!1),Z=i(()=>d.auth?.user),G=i(()=>d.appearance?.header_color),K=o([]);C(async()=>{try{const{data:e}=await a.get("/api/widgets");e?.data&&(K.value=e.data)}catch(e){}});const Q=i(()=>Boolean(Number(d.settings?.advanced?.rating_active))),J=i(()=>Boolean(Number(d.cookieActive))),Y=i(()=>{try{const e=n.path;return/^\/messages\/[^/]+$/.test(e)&&"/messages"!==e}catch(e){return!1}}),X=i(()=>{try{const e=n.path;return"/messages"===e||e.startsWith("/messages/")}catch(e){return!1}}),ae=i(()=>{const e=n.path;return"/story/create"===e||e.startsWith("/story/")&&e.endsWith("/edit")||"/projects/create"===e||e.startsWith("/projects/")&&e.endsWith("/edit")}),oe=["Home","Explore","UserShow","CommunitiesIndex","MyCommunities","TagShow","MyFeed","News","Featured"],ie=Ma(),re=i(()=>ie?.unreadedMessagesCount?.value??0),le=o("undefined"!=typeof window?window.innerWidth:1024),ce=Ea(),de=()=>ce.setupEcho(),ue=()=>ce.syncAllCounters(),{watchAndUpdate:me,clearBadge:pe}=function(){const e="undefined"!=typeof window,t=i(()=>e&&"setAppBadge"in navigator),a=()=>{if(!e||hf.value)return;const t=document.title;
2ff=t.replace(/^\(\d+\)\s*/,""),hf.value=!0},n=t=>{if(!e)return;hf.value||a();const n=ff||document.title.replace(/^\(\d+\+?\)\s*/,"");let s="";t>99?s="99+":t>0&&(s=String(t)),document.title=s?`(${s}) ${n}`:n},s=async a=>{if(e&&t.value)try{a>0?await navigator.setAppBadge(a>99?99:a):await navigator.clearAppBadge()}catch(n){}},o=(e=0,t=0)=>{const a=e+t;n(a),s(a)};return{initialize:a,updateBadge:o,updateTitleBadge:n,updateAppBadge:s,clearBadge:()=>{n(0),s(0)},watchAndUpdate:(t,n)=>e?(a(),P([t,n],([e,t])=>{o(e||0,t||0)},{immediate:!0})):()=>{},isInitialized:hf,isBadgingSupported:t}}();let fe=null;const he=()=>{"undefined"!=typeof window&&(le.value=window.innerWidth)},ge=()=>{try{if("undefined"==typeof document)return;const e=document.querySelector("header.sticky"),t=e?e.offsetHeight:64;document.documentElement.style.setProperty("--app-header-height",`${t}px`)}catch(e){}};function ve(){q.value=!1,d.auth.onboarding_incomplete=!1}async function ye(){await a.post(route("logout")),window.location.href="/"}C(()=>{d.auth?.onboarding_incomplete&&(q.value=!0),ce.initializeFromStorage(),m.connect(),d.auth?.check&&(de(),ue(),fe=me(ce.unreadedNotifications,ie.unreadedMessagesCount)),"undefined"!=typeof window&&window.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&d.auth?.check&&(ue(),de())}),window.addEventListener("resize",he),window.addEventListener("resize",ge),document.documentElement.classList.add(`theme-${B.value}`),document.documentElement.style.setProperty("--radius",`${V.value}rem`);try{const t=d.currentTheme||null;if(t&&t.key){const a=t.key,n=t.palette||{};try{Array.from(document.documentElement.classList||[]).forEach(e=>{e.startsWith("theme-")&&document.documentElement.classList.remove(e)})}catch(e){}try{document.documentElement.classList.add("theme-"+a)}catch(e){}try{document.body&&document.body.setAttribute("data-theme",a)}catch(e){}try{document.documentElement&&document.documentElement.setAttribute("data-theme",a)}catch(e){}try{n.header&&(document.documentElement||document.body).style.setProperty("--color-header",n.header)}catch(e){}}}catch(e){}try{ge()}catch(e){}if(d.auth?.check&&"undefined"!=typeof window){const t="fp_backfill_done";sessionStorage.getItem(t)||gf().then(async n=>{if(n)try{await a.post(route("device-fingerprint.store"),{visitor_id:n}),sessionStorage.setItem(t,"1")}catch(e){}})}}),P(()=>d.currentTheme,e=>{try{if(!e)return;const a=e.key,n=e.palette||{};try{Array.from(document.documentElement.classList||[]).forEach(e=>{e.startsWith("theme-")&&document.documentElement.classList.remove(e)})}catch(t){}try{document.documentElement.classList.add("theme-"+a)}catch(t){}try{document.body&&document.body.setAttribute("data-theme",a)}catch(t){}try{document.documentElement&&document.documentElement.setAttribute("data-theme",a)}catch(t){}try{n.header&&(document.documentElement||document.body).style.setProperty("--color-header",n.header)}catch(t){}}catch(t){}},{deep:!0}),ee(()=>{window.removeEventListener("resize",he),m.disconnect(),fe&&(fe(),pe())}),P(L,e=>{e.startsWith("/notifications")&&ce.resetNewNotifications(),e.startsWith("/messages")&&ie.resetUnreadedMessages()});const be=o(0),we=o(!1),xe=()=>{const e=window.scrollY;e<80?we.value=!1:e>be.value+5?we.value=!0:e<be.value-5&&(we.value=!1),be.value=e},_e=()=>{if("undefined"==typeof window)return;const e=window.innerWidth<925,t=document.documentElement;t.style.setProperty("--header-offset",we.value&&e?"0px":"4rem"),t.style.setProperty("--nav-offset",e?"64px":"0px")};P(we,_e,{immediate:!0}),C(()=>{window.addEventListener("scroll",xe,{passive:!0}),window.addEventListener("resize",_e)}),ee(()=>{window.removeEventListener("scroll",xe)});const ke=i(()=>we.value?"md:translate-y-0 -translate-y-full":"translate-y-0");return(e,t)=>{const a=Hp,s=Up,o=gp,i=fp,r=D("router-link"),l=Nm,m=Ur,v=Dr,C=Br,P=dn,L=Nr,O=$r,z=Tr,T=Ir,$=zr,N=Rr,B=Mr,V=ei,ee=Qo,ie=Ho,ce=To,de=D("router-view"),ue=_o,me=Rn,pe=Qt;return f(),_(W,null,[X.value||ae.value?A("",!0):(f(),h(a,{key:0})),k("div",{class:y(["min-h-dvh",ae.value?"bg-background":"bg-deeper"])},[ae.value?A("",!0):(f(),_("header",{key:0,class:y(["sticky top-0 flex bg-background/80 dark:bg-deeper/80 h-16 items-center md:px-6 z-20 w-full px-2 backdrop-blur-lg sm:px-4 lg:overflow-y-visible border-b border-border transition-transform duration-300 ease-out",ke.value]),style:De(b(un)?"":`background-color: var(--color-header, ${G.value||"transparent"})`)},[k("div",Zg,[k("div",Gg,[j(s),j(o),R.value?(f(),_("button",{key:0,onClick:I,type:"button","aria-label":"НаÐ
2·Ð°Ð´",title:("__"in e?e.__:b(Lt))("Назад"),class:"hidden md:inline-flex h-10 w-10 items-center justify-center rounded-full text-foreground hover:bg-muted/60 base-transition shrink-0"},[j(b(Xp),{class:"w-6 h-6"})],8,Kg)):A("",!0)]),k("div",Qg,[j(i,{class:"hidden md:flex"}),b(d).isLoggedIn?(f(),h(r,{key:0,to:e.route("story.create"),class:"hidden md:flex items-center justify-center gap-1.5 h-10 w-10 xl:w-auto xl:px-4 rounded-xl bg-primary text-primary-foreground hover:bg-primary/90 text-sm font-medium shrink-0"},{default:g(()=>[t[8]||(t[8]=k("svg",{viewBox:"0 0 28 28",width:"1.2em",height:"1.2em",class:"h-5 w-5 shrink-0"},[k("path",{fill:"currentColor",d:"M14 3.25a.75.75 0 0 1 .75.75v9.25H24a.75.75 0 0 1 0 1.5h-9.25V24a.75.75 0 0 1-1.5 0v-9.25H4a.75.75 0 0 1 0-1.5h9.25V4a.75.75 0 0 1 .75-.75"})],-1)),k("span",Jg,E(("__"in e?e.__:b(Lt))("Write")),1)]),_:1},8,["to"])):A("",!0),b(d).isLoggedIn?(f(),h(r,{key:1,to:e.route("messenger.index"),class:"hidden md:flex relative items-center justify-center h-10 w-10 text-center hover:bg-primary/5 rounded-full base-transition shrink-0"},{default:g(()=>[j(b(Na),{class:"h-6 w-6 shrink-0"}),re.value>0?(f(),_("div",Yg,[k("span",Xg,E(re.value>9?"9+":re.value),1)])):A("",!0)]),_:1},8,["to"])):A("",!0),j(l,{class:"hidden md:flex"}),j(m,{widgets:K.value,"show-ads":!X.value},null,8,["widgets","show-ads"]),b(d).isLoggedIn?A("",!0):(f(),_("button",{key:2,onClick:t[0]||(t[0]=e=>b(mn)()),class:"flex items-center justify-center h-10 w-10 text-center hover:bg-primary/5 rounded-full base-transition shrink-0",title:b(un)?("__"in e?e.__:b(Lt))("Light Mode"):("__"in e?e.__:b(Lt))("Dark Mode")},[b(un)?(f(),h(b(Zp),{key:1,class:"h-6 w-6 shrink-0"})):(f(),h(b(qa),{key:0,class:"h-6 w-6 shrink-0"}))],8,ev)),b(d).isLoggedIn?(f(),h(r,{key:3,to:e.route("story.create"),class:"md:hidden flex items-center justify-center h-10 w-10 rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 shrink-0"},{default:g(()=>[...t[9]||(t[9]=[k("svg",{viewBox:"0 0 28 28",width:"1.2em",height:"1.2em",class:"h-5 w-5"},[k("path",{fill:"currentColor",d:"M14 3.25a.75.75 0 0 1 .75.75v9.25H24a.75.75 0 0 1 0 1.5h-9.25V24a.75.75 0 0 1-1.5 0v-9.25H4a.75.75 0 0 1 0-1.5h9.25V4a.75.75 0 0 1 .75-.75"})],-1)])]),_:1},8,["to"])):A("",!0),b(d).isLoggedIn?(f(),_("div",tv,[j($,{modal:!1,open:F.value,"onUpdate:open":t[4]||(t[4]=e=>F.value=e)},{default:g(()=>[j(v,{class:y(["border hover:border-primary rounded-full base-transition shrink-0",F.value?"border-primary":"border-transparent"]),"aria-label":"user menu"},{default:g(()=>[k("img",{src:Z.value.avatar_url,alt:Z.value.username,class:"h-9 w-9 bg-muted rounded-full"},null,8,av)]),_:1},8,["class"]),j(T,{align:"end",class:"w-60"},{default:g(()=>[j(r,{to:e.route("user.show",Z.value.username),class:"flex gap-3 hover:bg-accent rounded-lg p-2 shrink-0"},{default:g(()=>[k("img",{src:Z.value.avatar_url,alt:Z.value.username,class:"h-10 w-10 bg-muted rounded-full"},null,8,nv),k("div",sv,[Z.value.display_name?(f(),_("div",ov,E(Z.value.display_name),1)):A("",!0),k("div",iv,[k("span",rv,E("@"+Z.value.username),1),Q.value?(f(),h(mf,{key:0,rating:Z.value.rating},null,8,["rating"])):A("",!0)])])]),_:1},8,["to"]),j(C),j(L,{class:"flex items-center justify-between text-sm font-normal"},{default:g(()=>[k("div",lv,[j(b(qa),{class:"h-4 w-4 mr-2"}),k("span",null,E(("__"in e?e.__:b(Lt))("Dark Mode")),1)]),j(P,{checked:b(un),"onUpdate:checked":t[1]||(t[1]=e=>U(un)?un.value=e:null),onClick:t[2]||(t[2]=e=>b(mn)())},null,8,["checked"])]),_:1}),j(C),Z.value.user_can.cp?(f(),h(O,{key:0},{default:g(()=>
2[k("a",{href:e.route("filament.cp.pages.dashboard"),class:"flex items-center w-full",target:"_blank",rel:"noopener"},[j(b(Ga),{class:"h-4 w-4 mr-2"}),k("span",null,E(("__"in e?e.__:b(Lt))("Control Panel")),1)],8,cv)]),_:1})):A("",!0),j(z,{icon:b(Qa),to:e.route("communities.my")},{default:g(()=>[S(E(("__"in e?e.__:b(Lt))("My communities")),1)]),_:1},8,["icon","to"]),j(z,{icon:b(Ya),to:e.route("achievements")},{default:g(()=>[S(E(("__"in e?e.__:b(Lt))("Achievements")),1)]),_:1},8,["icon","to"]),j(z,{icon:b(en),to:e.route("ideas.index")},{default:g(()=>[...t[10]||(t[10]=[S(" Идеи ",-1)])]),_:1},8,["icon","to"]),Z.value?.user_can?.edit&&(b(d).collections?.length??0)<5?(f(),h(z,{key:1,icon:b(Jp),to:e.route("collections.create",{user:Z.value.username})},{default:g(()=>[S(E(("__"in e?e.__:b(Lt))("Create a collection")),1)]),_:1},8,["icon","to"])):A("",!0),j(z,{icon:b(an),to:e.route("user.draft")},{default:g(()=>[S(E(("__"in e?e.__:b(Lt))("Drafts")),1)]),_:1},8,["icon","to"]),j(z,{icon:b(sn),to:e.route("user.bookmarks.stories")},{default:g(()=>[S(E(("__"in e?e.__:b(Lt))("Bookmarks")),1)]),_:1},8,["icon","to"]),j(z,{icon:b(rn),to:e.route("recap.show",{year:2025})},{default:g(()=>[S(E(("__"in e?e.__:b(Lt))("My 2025")),1)]),_:1},8,["icon","to"]),j(z,{icon:b(Ua),to:e.route("user.settings.show",Z.value)},{default:g(()=>[S(E(("__"in e?e.__:b(Lt))("Settings")),1)]),_:1},8,["icon","to"]),j(C),j(O,{onClick:t[3]||(t[3]=e=>H.value=!0),class:"flex items-center"},{default:g(()=>[j(b(cn),{class:"h-4 w-4 mr-2"}),t[11]||(t[11]=k("span",null,"Переключить аккаунт",-1))]),_:1}),j(C),j(O,{onClick:ye,class:"flex items-center"},{default:g(()=>[j(b(Da),{class:"h-4 w-4 mr-2"}),k("span",null,E(("__"in e?e.__:b(Lt))("Logout")),1)]),_:1})]),_:1})]),_:1},8,["open"])])):(f(),_(W,{key:5},[j(r,{to:e.route("login"),class:"hidden md:flex items-center justify-center gap-1.5 h-10 w-10 lg:w-auto lg:px-4 roun
2ded-xl bg-primary text-primary-foreground hover:bg-primary/90 text-sm font-medium shrink-0"},{default:g(()=>[j(b(Kp),{class:"h-5 w-5 shrink-0"}),t[12]||(t[12]=k("span",{class:"hidden lg:inline"},"Войти",-1))]),_:1},8,["to"]),j(r,{to:e.route("login"),class:"flex items-center justify-center h-10 w-10 text-center hover:bg-primary/5 rounded-full base-transition","aria-label":"login"},{default:g(()=>[j(b(Wa),{class:"h-6 w-6 shrink-0"})]),_:1},8,["to"])],64))])])],6)),k("main",{class:y(["relative w-full mx-auto",ae.value?"pt-0 max-w-none":"max-w-7xl md:grid pt-4 justify-between sm:max-w-[640px] md:grid-cols-main-tablet md:max-w-[744px] xl:max-w-7xl xl:grid-cols-main pb-16 md:pb-0"])},[ae.value?A("",!0):(f(),h(N,{key:0})),ae.value?A("",!0):(f(),h(B,{key:1})),k("div",dv,[X.value||ae.value?A("",!0):(f(),h(V,{key:0})),ae.value?A("",!0):(f(),h(ee,{key:1})),ae.value?A("",!0):(f(),h(ie,{key:2})),k("div",uv,[x.value?(f(),h(ce,{key:0,error:b(u).error||{},"fallback-href":X.value?"/messages":"/",onRetry:t[5]||(t[5]=e=>b(u).retry())},null,8,["error","fallback-href"])):!ae.value&&c.value?(f(),h(te(M.value),{key:1})):!ae.value&&w.value?(f(),h(te(M.value),{key:2,class:"pt-4"})):(f(),h(de,{key:3},{default:g(({Component:e})=>[e&&"function"!=typeof e?(f(),h(Ve,{key:1,include:oe},[(f(),h(te(e),ne(se(b(u).data)),null,16))],1024)):(f(),h(te(M.value),{key:0,class:"pt-4"}))]),_:1})),ae.value||!p.value||!b(u).loading||b(u).loadingForceUrl!==b(n).fullPath&&b(u).dataUrl===b(n).fullPath?A("",!0):(f(),_("div",mv,[(f(),h(te(M.value)))]))])]),!ae.value&&le.value>=b(1240)?(f(),_("div",pv,[j(ue,{widgets:K.value,"show-ads":!X.value},null,8,["widgets","show-ads"])])):A("",!0)],2)],2),ae.value||Y.value?A("",!0):(f(),h(me,{key:1,onSwitchAccount:t[6]||(t[6]=e=>H.value=!0)})),J.value?(f(),h(pe,{key:2})):A("",!0),j(mh,{show:q.value,onCompleted:ve},null,8,["show"]),b(d).isLoggedIn?(f(),h(Gh,{key:3,open:H.value,"onUpdate:open":t[7]||(t[7]=e=>H.value=e)},null,8,["open"])):A("",!0)],64)}}},hv=s("feeds",{state:()=>({feeds:{}}),actions:{ensure(e){return this.feeds[e]||(this.feeds[e]={data:[],links:{},scrollY:0,updatedAt:0}),this.feeds[e]},setData(e,{data:t,links:a}){const n=this.ensure(e);n.data=t,n.links=a??{},n.updatedAt=Date.now()},saveScroll(e,t){this.ensure(e).scrollY=t},reset(e){const t=this.ensure(e);t.data=[],t.links={},t.scrollY=0}}}),gv="device_fingerprint_v1",vv="device_fingerprint";function yv(){try{const e=navigator.userAgent||"",t=navigator.platform||"",a=`${e}::${t}::${(screen.width||0)+"x"+(screen.height||0)}::${Intl.DateTimeFormat().resolvedOptions().timeZone||""}`;let n=2166136261;for(let o=0;o<a.length;o++)n^=a.charCodeAt(o),n=Math.imul(n,16777619)>>>0;let s=localStorage.getItem(gv+":sfx");return s||(s=Math.random().toString(36).slice(2,10),localStorage.setItem(gv+":sfx",s)),`fp_${n.toString(36)}_${s}`}catch(e){return`fp_fallback_${Date.now()}_${Math.random().toString(36).slice(2,6)}`}}const bv=async function(){const e=localStorage.getItem(gv);if(e)return e;const t=await async function(){try{const e=await l(()=>import("./vendor-eWDfdwlh.js").then(e=>e.b_),__vite__mapDeps([1,2])),t=await e.default.load(),a=await t.get();if(a&&a.visitorId)return a.visitorId}catch(e){console.warn("FingerprintJS failed, falling back",e)}return null}()||yv();try{localStorage.setItem(gv,t)}catch(a){}try{localStorage.setItem(vv,t)}catch(a){}return t},wv=Ue(),xv=Fe({render:()=>qe(fv)});Bt.beforeEach(async e=>{const t=hn(wv),a=hv(wv),n=function(){const e=Nt;return Nt=!1,e}();if(e.meta.fetchData){if(n){const n=$t(e.path);if(n){t.bumpRefresh(n),a.reset(n);try{localStorage.removeItem(`feed_scroll_${n}`),localStorage.removeItem(`feed_state_${n}`)}catch(i){}}delete t.cache[e.fullPath]}t.load(e.fullPath,n||!($t(e.path)||e.meta.revalidate),{expect:e.meta.payloadKey})}else t.clear();const s=e.matched[e.matched.length-1],o=s?.components?.default;if("function"==typeof o){const a=await o().catch(()=>null),n=a&&(a.default||a);n?s.components.default=n:t.setError(e.fullPath,{expect:e.meta.payloadKey,hard:!0,message:Lt("Не удалось загрузить код страницы")})}}),Bt.afterEach(async e=>{const t=Mt(wv),a=hn(wv);if(e.meta.fetchData){const e=a.loadingStartedAt,t=async()=>{for(;a.loading&&a.loadingStartedAt===e;)await new Promise(e=>setTimeout(e,50))};await t()}const n=t.settings?.general?.site_name||"EntHub",s=a.data||{};let o=null;if(s.seo?.title)return void(document.title=s.seo.title);s.story?.title?o=s.story.title:s.user?.display_name||s.user?.username?o=s.user.display_name||"@"+s.user.username:s.community?.name?o=s.community.name:s.tag?.name?o="#"+s.tag.name:s.project?.title||s.project?.name?o=s.project.title||s.project.name:s.collection?.title?o=s.collection.title:s.page?.title&&(o=s.page.title);
2const i="home"===e.name||"/"===e.path?"":" — "+n;document.title=o?`${o}${i}`:n}),xv.use(wv),xv.use(Bt),xv.use(Pt),xv.use(He),xv.config.globalProperties.__=Lt,xv.config.globalProperties.$page=yf(),Mt().boot().finally(()=>{xv.mount("#app"),bv().catch(()=>{}),setTimeout(()=>l(()=>import("./Show-CDx1p2LI.js"),__vite__mapDeps([142,1,2,48,38,18,49,50,51,28,29,52,53,54,55,56,57,58,59,60,61,62,34,63,31,32,64,35,36,37,39,65,66,43,5,44,67,41,68,78,135,136,137,118,77,119,6,120,110,121,122,79,123,89,46,124,70,33,40,42,125,8,143,9])).catch(()=>{}),1e3)});export{dn as $,wi as A,Vt as B,pf as C,gp as D,Dg as E,Dr as F,Ir as G,wm as H,Qa as I,Tr as J,zr as K,$r as L,Zr as M,Br as N,Ht as O,gh as P,Ta as Q,Hm as R,Ma as S,Kr as T,qg as U,eo as V,mi as W,ci as X,Jr as Y,za as Z,Un as _,fh as a,Hr as a0,qr as a1,Fr as a2,Jp as a3,Vm as a4,Nd as a5,Hg as a6,df as a7,vg as a8,gg as a9,Os as aA,hv as aB,Rt as aC,gn as aD,Nr as aE,di as aF,us as aG,qi as aH,no as aI,Xh as aJ,Nm as aK,og as aL,qa as aM,mn as aN,Vc as aO,ti as aP,li as aQ,si as aR,oi as aS,ii as aT,Lg as aU,Cg as aV,rf as aW,wg as aX,Ig as aY,Ya as aZ,Ua as aa,Rs as ab,Ga as ac,xh as ad,Bm as ae,Cf as af,Kh as ag,sn as ah,cs as ai,Jn as aj,Nu as ak,as as al,bh as am,Dt as an,hd as ao,cn as ap,Ao as aq,Ui as ar,zi as as,Ei as at,Ti as au,Ni as av,Ai as aw,_i as ax,Mi as ay,hc as az,hh as b,vh as c,ph as d,Mt as e,fv as f,hn as g,ds as h,un as i,Xp as j,Jh as k,Lt as l,Pg as m,Ut as n,dm as o,en as p,kh as q,an as r,Wl as s,sc as t,yf as u,Eh as v,Sh as w,jh as x,Ft as y,gf as z};
3//# sourceMappingURL=app-BwiOD-xT.js.map

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.