PageSourceSearch

https://baskadia.com/_next/static/chunks/pages/auth/subscription/[id]/thanks-5c7179e0ccb730c6.js

js baskadia.com collected 2026-10-01 10:34:17 UTC 12,475 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3847],{77293:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/subscription/[id]/thanks",function(){return r(70400)}])},76792:function(e,n,r){"use strict";var t=r(47568),o=r(26042),s=r(69396),a=r(828),i=r(20414),l=r(85893),u=r(60357),c=r.n(u),d=r(67294),f=r(11163),h=r(60253),v=r(36808),p=r.n(v),b=r(72091),x=r(17812),Z=r(22318),g=r(91910),j=r(48777),m=r(49384),y=r(61164),w=r(13048),k=r(92674),_=r(40570);n.Z=function(e){var n=e.user,r=e.onUserUpdate,u=(0,a.Z)((0,y.o)(),1)[0].auth,v=(0,w.Z)(u&&(null===n||void 0===n?void 0:n.ID)?"/auth/user/".concat(n.ID,"/follower"):null),C=v.data,D=v.mutate,I=(0,f.useRouter)(),S=(0,h.$G)().t,E=(0,b.Ds)().enqueueSnackbar,N=(0,k.Z)(),U=(0,a.Z)(d.useState(!1),2),F=U[0],R=U[1],T=(0,a.Z)(d.useState(!1),2),A=T[0],P=T[1],z=!(!u||!(null===C||void 0===C?void 0:C.length)),M=d.useMemo((function(){return!(u&&!C)&&((null===u||void 0===u?void 0:u.ID)!==(null===n||void 0===n?void 0:n.ID)&&!(null===n||void 0===n?void 0:n.DeletedAt))}),[u,C,null===n||void 0===n?void 0:n.DeletedAt,null===n||void 0===n?void 0:n.ID]),O=d.useCallback((function(){return P(!0)}),[]),q=d.useCallback((function(){return P(!1)}),[]),G=d.useCallback((0,t.Z)((function(){var e,t;return(0,i.__generator)(this,(function(a){switch(a.label){case 0:R(!0),a.label=1;case 1:return a.trys.push([1,6,,7]),u?[3,3]:(p().set("return_to",I.asPath,{expires:1,secure:!0,sameSite:"lax"}),[4,I.push("/signup")]);case 2:return a.sent(),[2];case 3:return u.Unconfirmed?(p().set("return_to",I.asPath,{expires:1,secure:!0,sameSite:"lax"}),[4,I.push("/auth/unconfirmed")]):[3,5];case 4:return a.sent(),[2];case 5:return[3,7];case 6:return e=a.sent(),(0,m.kg)(e),E(S("failed-to-follow"),{variant:"error"}),R(!1),[2];case 7:if(a.trys.push([7,10,,11]),!(null===n||void 0===n?void 0:n.ID))throw new Error("user.ID is undefined");return[4,N("/auth/user/".concat(n.ID,"/follower"),{method:"POST"})];case 8:return a.sent(),[4,D([{}],!1)];case 9:return a.sent(),r((0,s.Z)((0,o.Z)({},n),{FollowerCount:(n.FollowerCount||0)+1})),[3,11];case 10:return t=a.sent(),(0,m.kg)(t),E(S("failed-to-follow"),{variant:"error"}),R(!1),[2];case 11:return R(!1),[2]}}))})),[u,E,N,D,r,I,S,n]),$=d.useCallback((0,t.Z)((function(){var e;return(0,i.__generator)(this,(function(t){switch(t.label){case 0:R(!0),t.label=1;case 1:if(t.trys.push([1,4,,5]),!(null===n||void 0===n?void 0:n.ID))throw new Error("user.ID is undefined");return[4,N("/auth/user/".concat(n.ID,"/follower"),{method:"DELETE"})];
1case 2:return t.sent(),[4,D([],!1)];case 3:return t.sent(),r((0,s.Z)((0,o.Z)({},n),{FollowerCount:(n.FollowerCount||1)-1})),[3,5];case 4:return e=t.sent(),(0,m.kg)(e),E(S("failed-to-unfollow"),{variant:"error"}),R(!1),[2];case 5:return R(!1),[2]}}))})),[E,N,D,r,S,n]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"jsx-e20212abf16b2b5 sm",children:[(0,l.jsx)(Z.Z,{component:"div",variant:"caption",style:{opacity:M?1:.38,marginBottom:"-8px",textAlign:"center"},children:S("follow")}),z&&(0,l.jsx)(x.Z,{disabled:F,onClick:$,children:(0,l.jsx)(g.Z,{style:{color:"#FFEB3B"}})}),!z&&(0,l.jsx)(x.Z,{disabled:F||!M,onClick:G,children:(0,l.jsx)(j.Z,{})})]}),(0,l.jsxs)("div",{className:"jsx-e20212abf16b2b5 lg",children:[z&&(0,l.jsx)(_.Z,{color:A?"error":"default",disabled:F,variant:A?"contained":"outlined",style:{borderRadius:"18px"},onClick:$,onMouseEnter:O,onMouseLeave:q,children:S(A?"unfollow":"following")}),!z&&(0,l.jsx)(_.Z,{color:"primary",disabled:F||!M,variant:"contained",style:{borderRadius:"18px"},onClick:G,children:S("follow")})]}),(0,l.jsx)(c(),{id:"e20212abf16b2b5",children:".lg.jsx-e20212abf16b2b5{display:none}@media(min-width:360px){.sm.jsx-e20212abf16b2b5{display:none}.lg.jsx-e20212abf16b2b5{display:block}}"})]})}},78538:function(e,n,r){"use strict";var t=r(85893),o=r(67294),s=r(60253),a=r(32427),i=r(94697),l=r(90227),u=r(76792),c=r(52803),d=r(57308),f=(0,a.Z)((function(){return{content:{overflow:"hidden"},action:{alignSelf:"center",marginTop:"0"}}}));n.Z=function(e){var n=e.user,r=e.subheader,a=e.style,h=e.onUserUpdate,v=(0,s.$G)().t,p=f(),b=o.useMemo((function(){return(null===n||void 0===n?void 0:n.ID)?"/user/".concat(n.ID.toString(36)):""}),[null===n||void 0===n?void 0:n.ID]);return(0,t.jsx)(i.Z,{classes:p,avatar:(0,t.jsx)(l.Z,{user:n,onUserUpdate:h}),title:(0,t.jsx)(d.Z,{href:b,children:(null===n||void 0===n?void 0:n.Name)||v("guest")}),titleTypographyProps:{noWrap:!0},subheader:r||(0,t.jsx)(c.Z,{user:n}),action:(0,t.jsx)(u.Z,{user:n,onUserUpdate:h}),style:a})}},65267:function(e,n,r){"use strict";var t=r(14924),o=r(26042),s=r(85893),a=r(67294),i=r(32427),l=r(16204),u=(0,i.Z)((function(e){return{root:(0,t.Z)({minWidth:"60px",margin:"4px"},e.breakpoints.down("xs"),{height:"24px"}),label:(0,t.Z)({},e.breakpoints.down("xs"),{padding:"0 8px"}),icon:(0,t.Z)({},e.breakpoints.down("xs"),{width:"18px",height:"18px",margin:"0 -4px 0 4px"})}})),c=a.forwardRef((function(e,n){var r=u();return(0,s.jsx)(l.Z,(0,o.Z)({ref:n,classes:r},e))}));n.Z=c},48647:function(e,n,r){"use strict";var t=r(26042),o=r(69396),s=r(85893),a=r(67294),i=r(11163),l=r(60253),u=r(65267),c=r(57308),d=a.forwardRef((function(e,n){var r=e.label,l=e.value,d=e.onChange,f=(0,i.useRouter)(),h=f.pathname,v=f.query,p=v.sort_by||"trend",b=a.useCallback((function(){l!==p&&(null===d||void 0===d||d())}),[d,p,l]);return(0,s.jsx)(c.Z,{href:{pathname:h,query:(0,o.Z)((0,t.Z)({},v),{sort_by:l})},scroll:!1,shallow:!0,replace:!0,children:(0,s.jsx)(u.Z,{ref:n,clickable:!0,color:l===p?"primary":"default",label:r,onClick:b})})}));n.Z=function(e){var n=e.onChange,r=(0,l.$G)().t;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d,{label:r("trend"),value:"trend",onChange:n}),(0,s.jsx)(d,{label:r("new"),value:"date",onChange:n}),(0,s.jsx)(d,{label:r("ranking"),value:"tipping",onChange:n})]})}},37648:function(e,n,r){"use strict";
1var t=r(828),o=r(85893),s=r(60357),a=r.n(s),i=r(67294),l=r(95477),u=r(61164);n.Z=function(e){var n=e.loading,r=e.completed,s=e.style,c=e.onIntersect,d=(0,t.Z)((0,u.o)(),1)[0].isIntersectionObserverEnabled,f=i.useRef(null);return i.useEffect((function(){if(d){var e=f.current;if(e&&!n&&!r){var t=new IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting&&c()}))}),{root:null,rootMargin:"2800px",threshold:0});return t.observe(e),function(){t.unobserve(e)}}}}),[r,d,n,c]),(0,o.jsxs)("div",{ref:f,style:s,className:"jsx-5625bc950d002bc8",children:[!r&&(0,o.jsx)(l.Z,{size:24}),(0,o.jsx)(a(),{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,r){"use strict";
1var t=r(828),o=r(85893),s=r(60357),a=r.n(s),i=(r(67294),r(60253)),l=r(61164),u=r(13048);n.Z=function(e){var n=e.user,r=(0,t.Z)((0,l.o)(),1)[0].auth,s=(0,u.Z)(r&&(null===n||void 0===n?void 0:n.ID)?"/auth/user/".concat(n.ID,"/following-user"):null).data,c=(0,i.$G)().t;return(null===s||void 0===s?void 0:s.length)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:"jsx-1407cc0596a3aa55",children:c("is-following-you")}),(0,o.jsx)(a(),{id:"1407cc0596a3aa55",children:"span.jsx-1407cc0596a3aa55{background-color:#eee}"})]}):null}},11173:function(e,n,r){"use strict";var t=r(47568),o=r(26042),s=r(69396),a=r(20414),i=r(11163),l=r(20958),u=r(36808),c=r.n(u);n.Z=function(e,n,r){var u=(0,i.useRouter)().locale,d=function(){var e=(0,t.Z)((function(e,n){var t,i,l,u,d;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return t="".concat("https://api.baskadia.com").concat(e),i=(0,s.Z)((0,o.Z)({},r),{credentials:"omit",headers:(0,o.Z)({Accept:"application/json","Accept-Language":n,"Content-Type":"application/json"},null===r||void 0===r?void 0:r.headers)}),(l=c().get("auth._token.local"))&&(i=(0,s.Z)((0,o.Z)({},i),{credentials:"include",headers:(0,o.Z)({Authorization:l},i.headers)})),[4,fetch(t,i)];case 1:return[4,(u=a.sent()).text()];case 2:if(d=a.sent(),u.ok)try{return[2,JSON.parse(d)]}catch(f){return[2,null]}throw new Error(d)}}))}));return function(n,r){return e.apply(this,arguments)}}(),f=(0,o.Z)({},n);return(0,l.ZP)((function(n,r){var t=null===e||void 0===e?void 0:e(n,r);return t?[t,u||"en"]:null}),d,f)}},70400:function(e,n,r){"use strict";r.r(n),r.d(n,{__N_SSP:function(){return N},default:function(){return U}});var t=r(47568),o=r(20414),s=r(85893),a=r(67294),i=r(9008),l=r.n(i),u=r(11163),c=r(33681),d=r(49384),f=r(13048),h=r(26042),v=r(69396),p=r(60253),b=r(18463),x=r(79912),Z=r(22318),g=r(78538),j=function(e){var n,r,t,o,i=e.subscription,l=e.onSubscriptionUpdate,c=(0,u.useRouter)().locale,d=(0,p.$G)().t;"ja"===c?(n="\u3054\u8cfc\u8aad\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\uff01",r="".concat((null===i||void 0===i||null===(t=i.Seller)||void 0===t?void 0:t.Name)||d("guest")||"","\u3055\u3093\u306e\u30d7\u30ec\u30df\u30a2\u30e0\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u898b\u3089\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f")):(n="Thank you for subscribing!",r="You now have access to ".concat((null===i||void 0===i||null===(o=i.Seller)||void 0===o?void 0:o.Name)||d("guest")||"","'s premium content"));var f=a.useCallback((function(e){l((0,v.Z)((0,h.Z)({},i),{Seller:e}))}),[l,i]);return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(b.Z,{children:(0,s.jsxs)(x.Z,{children:[(0,s.jsx)(Z.Z,{variant:"h6",children:n}),(0,s.jsx)(Z.Z,{variant:"body1",style:{marginTop:"16px"},children:r}),(0,s.jsx)(g.Z,{user:i.Seller,style:{marginTop:"24px",border:"solid 1px #bdbdbd",borderRadius:"4px"},onUserUpdate:f})]})})})},m=r(62284),y=r(29815),w=r(11173),k=r(92843),_=r(48647),C=r(73844),D=r(37648),I=r(17674),S=function(e){var n,r=e.user,i=(0,u.useRouter)().query,l="string"===typeof i.sort_by?i.sort_by:"trend",c=(0,w.Z)((function(e){return r.ID?"/user/".concat(r.ID,"/content?sort_by=").concat(l,"&descending=true&offset=").concat(20*e):null})),f=c.data,h=c.mutate,v=c.size,p=c.setSize,b=((null===f||void 0===f?void 0:f.length)||0)<v,x=0===(null===f||void 0===f||null===(n=f[0])||void 0===n?void 0:n.length),Z=null===f||void 0===f?void 0:f[(null===f||void 0===f?void 0:f.length)-1],g=x||Z&&Z.length<20,j=a.useMemo((function(){var e;if(!f)return[];var n=f.filter((function(e){return!!e}));return(0,d.D8)((e=[]).concat.apply(e,(0,y.Z)(n)))}),[f]),m=a.useCallback(function(){var e=(0,t.Z)((function(e){var n;return(0,o.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,h((function(n){if(!n)return n;for(var r=(0,y.Z)(n),t=0;t<r.length;t+=1)for(var o=(0,y.Z)(r[t]||[]),s=0;s<o.length;s+=1)if(o[s].ID===e.ID){o.splice(s,1,e),r.splice(t,1,o);break}return r}),!1)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),(0,d.kg)(n),[3,3];case 3:return[2]}}
1))}));return function(n){return e.apply(this,arguments)}}(),[h]),S=a.useCallback((function(){return p((function(e){return e+1}))}),[p]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{children:(0,s.jsx)(_.Z,{})}),j.map((function(e){return(0,s.jsx)(C.Z,{children:(0,s.jsx)(k.Z,{content:e,onContentUpdate:m})},e.ID)})),b&&Array.from(Array(20).keys()).map((function(e){return(0,s.jsx)(C.Z,{children:(0,s.jsx)(I.Z,{})},e)})),(0,s.jsx)(C.Z,{children:(0,s.jsx)(D.Z,{loading:b,completed:!!g,onIntersect:S})})]})},E=r(86263),N=!0,U=function(){var e=(0,u.useRouter)().query,n="string"===typeof e.id?e.id:"",r=(0,f.Z)(n?"/auth/subscription/".concat(n):null),i=r.data,h=r.mutate,v=a.useCallback(function(){var e=(0,t.Z)((function(e){var n;return(0,o.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,h(e)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),(0,d.kg)(n),[3,3];case 3:return[2]}}))}));return function(n){return e.apply(this,arguments)}}(),[h]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l(),{children:(0,s.jsx)("title",{children:"Baskadia"})}),!i&&(0,s.jsx)(c.Z,{}),i&&(0,s.jsx)(m.Z,{style:{margin:"16px auto",overflowAnchor:"none"},children:(0,s.jsxs)(E.Z,{children:[(0,s.jsx)(C.Z,{children:(0,s.jsx)(j,{subscription:i,onSubscriptionUpdate:v})}),i.Seller&&(0,s.jsx)(S,{user:i.Seller})]})})]})}}},function(e){e.O(0,[8652,3576,868,4116,5749,2301,6405,1208,9774,2888,179],(function(){return n=77293,e(e.s=n);var n}));var n=e.O();_N_E=n}]);

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.