PageSourceSearch

https://baskadia.com/_next/static/chunks/771-cf19d4eccdd721ec.js

js baskadia.com collected 2026-09-24 09:03:52 UTC 7,731 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[771],{76792:function(e,n,t){var r=t(47568),o=t(26042),a=t(69396),s=t(828),c=t(20414),i=t(85893),l=t(60357),u=t.n(l),d=t(67294),f=t(11163),h=t(60253),v=t(36808),b=t.n(v),p=t(72091),x=t(17812),g=t(22318),Z=t(91910),m=t(48777),w=t(49384),j=t(61164),y=t(13048),k=t(92674),C=t(40570);n.Z=function(e){var n=e.user,t=e.onUserUpdate,l=(0,s.Z)((0,j.o)(),1)[0].auth,v=(0,y.Z)(l&&(null===n||void 0===n?void 0:n.ID)?"/auth/user/".concat(n.ID,"/follower"):null),I=v.data,D=v.mutate,_=(0,f.useRouter)(),E=(0,h.$G)().t,U=(0,p.Ds)().enqueueSnackbar,F=(0,k.Z)(),P=(0,s.Z)(d.useState(!1),2),N=P[0],S=P[1],A=(0,s.Z)(d.useState(!1),2),T=A[0],z=A[1],R=!(!l||!(null===I||void 0===I?void 0:I.length)),B=d.useMemo((function(){return!(l&&!I)&&((null===l||void 0===l?void 0:l.ID)!==(null===n||void 0===n?void 0:n.ID)&&!(null===n||void 0===n?void 0:n.DeletedAt))}),[l,I,null===n||void 0===n?void 0:n.DeletedAt,null===n||void 0===n?void 0:n.ID]),M=d.useCallback((function(){return z(!0)}),[]),O=d.useCallback((function(){return z(!1)}),[]),G=d.useCallback((0,r.Z)((function(){var e,r;return(0,c.__generator)(this,(function(s){switch(s.label){case 0:S(!0),s.label=1;case 1:return s.trys.push([1,6,,7]),l?[3,3]:(b().set("return_to",_.asPath,{expires:1,secure:!0,sameSite:"lax"}),[4,_.push("/signup")]);case 2:return s.sent(),[2];case 3:return l.Unconfirmed?(b().set("return_to",_.asPath,{expires:1,secure:!0,sameSite:"lax"}),[4,_.push("/auth/unconfirmed")]):[3,5];case 4:return s.sent(),[2];case 5:return[3,7];case 6:return e=s.sent(),(0,w.kg)(e),U(E("failed-to-follow"),{variant:"error"}),S(!1),[2];case 7:if(s.trys.push([7,10,,11]),!(null===n||void 0===n?void 0:n.ID))throw new Error("user.ID is undefined");return[4,F("/auth/user/".concat(n.ID,"/follower"),{method:"POST"})];case 8:return s.sent(),[4,D([{}],!1)];case 9:return s.sent(),t((0,a.Z)((0,o.Z)({},n),{FollowerCount:(n.FollowerCount||0)+1})),[3,11];case 10:return r=s.sent(),(0,w.kg)(r),U(E("failed-to-follow"),{variant:"error"}),S(!1),[2];case 11:return S(!1),[2]}}))})),[l,U,F,D,t,_,E,n]),L=d.useCallback((0,r.Z)((function(){var e;return(0,c.__generator)(this,(function(r){switch(r.label){case 0:S(!0),r.label=1;case 1:if(r.trys.push([1,4,,5]),!(null===n||void 0===n?void 0:n.ID))throw new Error("user.ID is undefined");return[4,F("/auth/user/".concat(n.ID,"/follower"),{method:"DELETE"})];
1case 2:return r.sent(),[4,D([],!1)];case 3:return r.sent(),t((0,a.Z)((0,o.Z)({},n),{FollowerCount:(n.FollowerCount||1)-1})),[3,5];case 4:return e=r.sent(),(0,w.kg)(e),U(E("failed-to-unfollow"),{variant:"error"}),S(!1),[2];case 5:return S(!1),[2]}}))})),[U,F,D,t,E,n]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"jsx-e20212abf16b2b5 sm",children:[(0,i.jsx)(g.Z,{component:"div",variant:"caption",style:{opacity:B?1:.38,marginBottom:"-8px",textAlign:"center"},children:E("follow")}),R&&(0,i.jsx)(x.Z,{disabled:N,onClick:L,children:(0,i.jsx)(Z.Z,{style:{color:"#FFEB3B"}})}),!R&&(0,i.jsx)(x.Z,{disabled:N||!B,onClick:G,children:(0,i.jsx)(m.Z,{})})]}),(0,i.jsxs)("div",{className:"jsx-e20212abf16b2b5 lg",children:[R&&(0,i.jsx)(C.Z,{color:T?"error":"default",disabled:N,variant:T?"contained":"outlined",style:{borderRadius:"18px"},onClick:L,onMouseEnter:M,onMouseLeave:O,children:E(T?"unfollow":"following")}),!R&&(0,i.jsx)(C.Z,{color:"primary",disabled:N||!B,variant:"contained",style:{borderRadius:"18px"},onClick:G,children:E("follow")})]}),(0,i.jsx)(u(),{id:"e20212abf16b2b5",children:".lg.jsx-e20212abf16b2b5{display:none}@media(min-width:360px){.sm.jsx-e20212abf16b2b5{display:none}.lg.jsx-e20212abf16b2b5{display:block}}"})]})}},37648:function(e,n,t){var r=t(828),o=t(85893),a=t(60357),s=t.n(a),c=t(67294),i=t(95477),l=t(61164);n.Z=function(e){var n=e.loading,t=e.completed,a=e.style,u=e.onIntersect,d=(0,r.Z)((0,l.o)(),1)[0].isIntersectionObserverEnabled,f=c.useRef(null);return c.useEffect((function(){if(d){var e=f.current;if(e&&!n&&!t){var r=new IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting&&u()}))}),{root:null,rootMargin:"2800px",threshold:0});return r.observe(e),function(){r.unobserve(e)}}}}),[t,d,n,u]),(0,o.jsxs)("div",{ref:f,style:a,className:"jsx-5625bc950d002bc8",children:[!t&&(0,o.jsx)(i.Z,{size:24}),(0,o.jsx)(s(),{id:"5625bc950d002bc8",children:"div.jsx-5625bc950d002bc8{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;height:24px;overflow-anchor:none}"})]})}},52803:function(e,n,t){var r=t(828),o=t(85893),a=t(60357),s=t.n(a),c=(t(67294),t(60253)),i=t(61164),l=t(13048);n.Z=function(e){var n=e.user,t=(0,r.Z)((0,i.o)(),1)[0].auth,a=(0,l.Z)(t&&(null===n||void 0===n?void 0:n.ID)?"/auth/user/".concat(n.ID,"/following-user"):null).data,u=(0,c.$G)().t;return(null===a||void 0===a?void 0:a.length)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:"jsx-1407cc0596a3aa55",children:u("is-following-you")}),(0,o.jsx)(s(),{id:"1407cc0596a3aa55",children:"span.jsx-1407cc0596a3aa55{background-color:#eee}"})]}):null}},31740:function(e,n,t){var r=t(85893),o=(t(67294),t(60253)),a=t(32427),s=t(94697),c=t(90227),i=t(76792),l=t(52803),u=(0,a.Z)((function(){return{content:{overflow:"hidden"},action:{alignSelf:"center",marginTop:"0"}}}));n.Z=function(e){var n=e.user,t=e.style,a=e.onUserUpdate,d=(0,o.$G)().t,f=u();return(0,r.jsx)(s.Z,{classes:f,avatar:(0,r.jsx)(c.Z,{user:n,onUserUpdate:a}),title:n.Name||d("guest"),titleTypographyProps:{noWrap:!0},subheader:(0,r.jsx)(l.Z,{user:n}),action:(0,r.jsx)(i.Z,{user:n,onUserUpdate:a}),style:t})}},11173:function(e,n,t){var r=t(47568),o=t(26042),a=t(69396),s=t(20414),c=t(11163),i=t(20958),l=t(36808),u=t.n(l);n.Z=function(e,n,t){var l=(0,c.useRouter)().locale,d=function(){var e=(0,r.Z)((function(e,n){var r,c,i,l,d;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:return r="".concat("https://api.baskadia.com").concat(e),c=(0,a.Z)((0,o.Z)({},t),{credentials:"omit",headers:(0,o.Z)({Accept:"application/json","Accept-Language":n,"Content-Type":"application/json"},null===t||void 0===t?void 0:t.headers)}),(i=u().get("auth._token.local"))&&(c=(0,a.Z)((0,o.Z)({},c),{credentials:"include",headers:(0,o.Z)({Authorization:i},c.headers)})),[4,fetch(r,c)];case 1:return[4,(l=s.sent()).text()];case 2:if(d=s.sent(),l.ok)try{return[2,JSON.parse(d)]}catch(f){return[2,null]}throw new Error(d)}}))}));return function(n,t){return e.apply(this,arguments)}}(),f=(0,o.Z)({},n);return(0,i.ZP)((function(n,t){var r=null===e||void 0===e?void 0:e(n,t);return r?[r,l||"en"]:null}),d,f)}}
1,98530:function(e,n){n.Z={getPublicUsers:function(e){var n=e.offset,t=e.auth,r="/user?offset=".concat(n);return(null===t||void 0===t?void 0:t.ID)&&(r+="&user=".concat(t.ID)),r},getPublicUser:function(e){var n=e.id,t=e.auth,r="/user/".concat(n);return t&&(r+="?auth=true"),r},getPublicContents:function(e){var n=e.type,t=e.sortBy,r=e.offset,o=e.lang,a="/content?type=".concat(n,"&date=any&sort_by=").concat(t,"&offset=").concat(r);return o&&(a+="&lang=".concat(o)),a},getPublicContent:function(e){var n=e.id,t=e.auth,r="/content/".concat(n);return t&&(r+="?auth=true"),r},getContentsFromContent:function(e){var n=e.id,t=e.offset;return"/content/".concat(n,"/content?offset=").concat(t)},getCommentsFromContent:function(e){var n=e.contentId,t=e.lastId,r=e.auth,o="/content/".concat(n,"/comment?last_id=").concat(t);return r&&(o+="&auth=true"),o},getTags:function(e){var n=e.offset,t=e.lang,r="/tag?offset=".concat(n);return t&&(r+="&lang=".concat(t)),r}}}}]);

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.