PageSourceSearch

https://baskadia.com/_next/static/chunks/pages/post/[cid]/comment-874a021773b77904.js

js baskadia.com collected 2026-10-01 10:35:50 UTC 7,294 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3803],{8535:function(t,n,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/post/[cid]/comment",function(){return e(76926)}])},76926:function(t,n,e){"use strict";e.r(n),e.d(n,{__N_SSP:function(){return A},default:function(){return N}});var o=e(47568),r=e(828),a=e(20414),i=e(85893),c=e(67294),u=e(9008),l=e.n(u),s=e(11163),d=e(60253),m=e(98530),v=e(49384),f=e(61164),h=e(13048),p=e(26042),g=e(69396),j=e(29815),Z=e(8936),x=e(11173),_=e(21036),b=e(92843),C=e(62284),y=e(86263),k=e(73844),I=e(4785),D=e(17674),w=function(t){var n,e=t.content,u=t.onContentUpdate,l=(0,r.Z)((0,f.o)(),1)[0].auth,s=(0,x.Z)((function(t,n){if(!(null===e||void 0===e?void 0:e.ID))return null;if(!t)return m.Z.getCommentsFromContent({contentId:e.ID,lastId:0,auth:!!l});if(!(null===n||void 0===n?void 0:n.length))return null;var o=n[n.length-1].ID;return o?m.Z.getCommentsFromContent({contentId:e.ID,lastId:o,auth:!!l}):null})),h=s.data,w=s.mutate,U=s.size,A=s.setSize,N=(0,d.$G)().t,P=((null===h||void 0===h?void 0:h.length)||0)<U,S=0===(null===h||void 0===h||null===(n=h[0])||void 0===n?void 0:n.length),T=null===h||void 0===h?void 0:h[(null===h||void 0===h?void 0:h.length)-1],E=S||T&&T.length<20,q=c.useMemo((function(){var t;if(!h)return[];var n=h.filter((function(t){return!!t}));return(t=[]).concat.apply(t,(0,j.Z)(n))}),[h]),F=c.useCallback(function(){var t=(0,o.Z)((function(t){var n;return(0,a.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,w((function(n){return n?[[t].concat((0,j.Z)(n[0]||[]))].concat((0,j.Z)(n.slice(1))):[[t]]}),!1)];case 1:return o.sent(),u((0,g.Z)((0,p.Z)({},e),{CommentCount:((null===e||void 0===e?void 0:e.CommentCount)||0)+1})),[3,3];case 2:return n=o.sent(),(0,v.kg)(n),[3,3];case 3:return[2]}}
1))}));return function(n){return t.apply(this,arguments)}}(),[e,w,u]),B=c.useCallback(function(){var t=(0,o.Z)((function(t){var n;return(0,a.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,w((function(n){if(!n)return n;for(var e=(0,j.Z)(n),o=0;o<e.length;o+=1)for(var r=(0,j.Z)(e[o]||[]),a=0;a<r.length;a+=1)if(r[a].ID===t.ID){r.splice(a,1),e.splice(o,1,r);break}return e}),!1)];case 1:return o.sent(),u((0,g.Z)((0,p.Z)({},e),{CommentCount:((null===e||void 0===e?void 0:e.CommentCount)||1)-1})),[3,3];case 2:return n=o.sent(),(0,v.kg)(n),[3,3];case 3:return[2]}}))}));return function(n){return t.apply(this,arguments)}}(),[e,w,u]),M=c.useCallback((function(){return A((function(t){return t+1}))}),[A]),z=c.useCallback(function(){var t=(0,o.Z)((function(t){var n;return(0,a.__generator)(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,w((function(n){if(!n)return n;for(var e=(0,j.Z)(n),o=0;o<e.length;o+=1)for(var r=(0,j.Z)(e[o]||[]),a=0;a<r.length;a+=1)if(r[a].ID===t.ID){r.splice(a,1,t),e.splice(o,1,r);break}return e}),!1)];case 1:return e.sent(),[3,3];case 2:return n=e.sent(),(0,v.kg)(n),[3,3];case 3:return[2]}}
1))}));return function(n){return t.apply(this,arguments)}}(),[w]);return(0,i.jsxs)(C.Z,{component:"main",style:{margin:"16px auto",overflowAnchor:"none"},children:[(0,i.jsxs)(y.Z,{style:{marginBottom:"0"},children:[!e&&Array.from(Array(20).keys()).map((function(t){return(0,i.jsx)(k.Z,{children:(0,i.jsx)(D.Z,{})},t)})),(null===e||void 0===e?void 0:e.DeletedAt)&&(0,i.jsx)(k.Z,{children:(0,i.jsx)(Z.Z,{severity:"error",variant:"filled",children:N("this-post-was-deleted")})}),e&&!e.DeletedAt&&!e.Published&&(0,i.jsx)(k.Z,{children:(0,i.jsx)(Z.Z,{severity:"warning",variant:"filled",children:N("this-post-is-unpublished")})}),!(null===e||void 0===e?void 0:e.DeletedAt)&&(null===e||void 0===e?void 0:e.Published)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(k.Z,{children:(0,i.jsx)(_.Z,{comments:q,completed:!!E,content:e,loading:P,onCommentAdd:F,onCommentDelete:B,onCommentLoad:M,onCommentUpdate:z})}),(0,i.jsx)(k.Z,{style:{display:(null===e||void 0===e?void 0:e.CommentCount)&&!h?"none":"block",marginTop:"0"},children:(0,i.jsx)(b.Z,{content:e,onContentUpdate:u})})]})]}),(0,i.jsx)(I.Z,{content:e,style:{display:(null===e||void 0===e?void 0:e.CommentCount)&&!h?"none":"flex",marginTop:"0"}})]})},U=function(t){var n=t.content,e=(0,s.useRouter)(),o=e.locale,r=e.query,a=(0,d.$G)().t;return c.useMemo((function(){var t;if(!n)return(0,i.jsx)(l(),{children:(0,i.jsx)("title",{children:"Baskadia"})});var e,c="https://baskadia.com",u="string"===typeof r.cid?r.cid:"0",s="/post/".concat(u),d=a("guest");!(null===n||void 0===n?void 0:n.DeletedAt)&&(null===n||void 0===n||null===(t=n.User)||void 0===t?void 0:t.Name)&&(d=n.User.Name),e=(null===n||void 0===n?void 0:n.DeletedAt)?a("this-post-was-deleted"):n&&!n.Published?a("this-post-is-unpublished"):"".concat((null===n||void 0===n?void 0:n.Title)||a("untitled")||""," by ").concat(d),e+=" | Baskadia";var m="",v="summary";if(null===n||void 0===n?void 0:n.Img)m="".concat("https://api.baskadia.com","/static/").concat((null===n||void 0===n?void 0:n.SmallImg)||n.Img),(null===n||void 0===n?void 0:n.ImgIsWide)&&(v="summary_large_image");else if("ja"===o)m="".concat(c,"/baskadia_ja_square.png");else m="".concat(c,"/baskadia_en_square.png");var f,h,p="",g="",j="",Z="";"ja"===o?(p="".concat(c,"/ja").concat(s),g="".concat(c,"/ja").concat(s),(null===n||void 0===n||null===(f=n.User)||void 0===f?void 0:f.ID)&&(j="".concat(c,"/ja/user/").concat(n.User.ID.toString(36))),Z="@baskadia"):(p="".concat(c).concat(s),g="".concat(c).concat(s),(null===n||void 0===n||null===(h=n.User)||void 0===h?void 0:h.ID)&&(j="".concat(c,"/user/").concat(n.User.ID.toString(36))),Z="@baskadia_en");return(0,i.jsxs)(l(),{children:[(0,i.jsx)("title",{children:e}),(0,i.jsx)("meta",{name:"og:type",content:"article"},"og:type"),(0,i.jsx)("meta",{name:"og:url",content:g},"og:url"),(0,i.jsx)("meta",{name:"og:site_name",content:"baskadia.com"},"og:site_name"),(0,i.jsx)("meta",{name:"og:title",content:e},"og:title"),(0,i.jsx)("meta",{name:"og:image",content:m},"og:image"),(0,i.jsx)("meta",{name:"article:author",content:j},"article:author"),(0,i.jsx)("meta",{name:"article:section",content:a((null===n||void 0===n?void 0:n.Type)||"")},"article:section"),(0,i.jsx)("meta",{name:"fb:app_id",content:"452215405391820"},"fb:app_id"),(0,i.jsx)("meta",{name:"twitter:card",content:v},"twitter:card"),(0,i.jsx)("meta",{name:"twitter:site",content:Z},"twitter:site"),(0,i.jsx)("link",{rel:"canonical",href:p},"canonical")]})}),[r.cid,a,n,o])},A=!0,N=function(t){var n=t.data,e=(0,s.useRouter)().query,u=(0,r.Z)((0,f.o)(),1)[0].auth,l=c.useMemo((function(){return"string"===typeof e.cid?parseInt(e.cid,36):0}),[e.cid]),d=(0,h.Z)(l?m.Z.getPublicContent({id:l,auth:!!u}):null,{fallbackData:n}),p=d.data,g=d.mutate,j=c.useCallback(function(){var t=(0,o.Z)((function(t){var n;return(0,a.__generator)(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,g(t)];case 1:return e.sent(),[3,3];case 2:return n=e.sent(),(0,v.kg)(n),[3,3];case 3:return[2]}}
1))}));return function(n){return t.apply(this,arguments)}}(),[g]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(U,{content:p}),(0,i.jsx)(w,{content:p,onContentUpdate:j})]})}}},function(t){t.O(0,[8652,3576,868,4116,3138,2387,4794,9803,3322,701,6405,1208,6267,4346,9774,2888,179],(function(){return n=8535,t(t.s=n);var n}));var n=t.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.