1"use strict";(self.webpackChunkmicroblog=self.webpackChunkmicroblog||[]).push([[1497,5899],{94890(t,e,n){var i=n(2435),r=n(46249),o=n(69627),s=n(14643),a=n(52983),l=n(38211),u=n(73595),c=n(29015),m=n(46807),p=n(45532),d=n(54062),y=n(62219),g=n(73352);let f={key:0,class:"n-7x5mj0"},h=["innerHTML"],v=["aria-label"],b=["aria-label"],C={filled:{default:{borderClass:"n-p9lesg",backgroundClass:"n-jbiboi"},selected:{borderClass:"n-p9lesg",backgroundClass:"n-jbiboi"}},outlined:{default:{borderClass:"n-w5gncu",backgroundClass:"n-mrtinl"},selected:{borderClass:"n-p9lesg",backgroundClass:"n-u86rzz"}}},w=(0,i.pM)({__name:"ChipsItem",props:(0,i.zz)({type:{default:"simple"},text:{},loading:{type:Boolean},styleType:{default:"outlined"},action:{type:Function,default:void 0},addable:{type:Boolean,default:!0},isHtml:{type:Boolean,default:!1},removeIconClass:{default:""},link:{},textClass:{},disabled:{type:Boolean},icon:{}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:(0,i.zz)(["click","remove"],["update:modelValue"]),setup(t,{emit:e}){let n=(0,i.EW)(()=>t.disabled?"button":t.link?y.Wk:"button"),w=(0,i.fn)(t,"modelValue"),k=(0,i.EW)(()=>w.value?"selected":"default"),D=(0,g.KR)(!1),I=(0,i.EW)(()=>t.loading||D.value),{debouncedLoading:S}=(0,c.A)(I);function P(n){var i;t.link&&n.preventDefault(),e("click",n),I.value||(0,d.L)(null==(i=t.action)?void 0:i.bind(null,n),t.text,D)}function j(t){t.stopPropagation(),e("remove")}return(e,c)=>((0,i.uX)(),(0,i.Wv)((0,i.$y)((0,o.R1)(n)),{type:"button",class:(0,s.C4)(["n-jncvdq",[C[t.styleType][(0,o.R1)(k)].backgroundClass,C[t.styleType][(0,o.R1)(k)].borderClass,{"opacity-50":t.disabled}]]),inert:t.disabled,disabled:(0,o.R1)(I)||t.disabled,href:t.link,to:t.link,onClick:P},{default:(0,i.k6)(()=>[(0,o.R1)(S)?((0,i.uX)(),(0,i.CE)("div",f,[(0,i.bF)(p.A)])):(0,i.Q3)("",!0),(0,i.Lk)("div",{class:(0,s.C4)(["flex-center shrink-0 min-w-0",{invisible:(0,o.R1)(S)}])},[t.icon?((0,i.uX)(),(0,i.Wv)(m.A,{key:0,src:t.icon,class:"me-2 s-14px"},null,8,["src"])):(0,i.Q3)("",!0),(0,i.RG)(e.$slots,"text",{},()=>[t.isHtml?((0,i.uX)(),(0,i.CE)("bdi",{key:0,class:(0,s.C4)(t.textClass),innerHTML:t.text},null,10,h)):((0,i.uX)(),(0,i.CE)("bdi",{key:1,class:(0,s.C4)(t.textClass)},(0,s.v_)(t.text),3))]),"selectable"===t.type?((0,i.uX)(),(0,i.CE)("div",{key:1,class:(0,s.C4)(["flex items-center justify-end ms-1",{"w-64px":t.addable}])},[w.value&&t.addable?((0,i.uX)(),(0,i.Wv)(m.A,{key:0,src:a,class:"s-5 text-white"})):((0,i.uX)(),(0,i.CE)(i.FK,{key:1},[t.addable?((0,i.uX)(),(0,i.CE)(i.FK,{key:0},[(0,i.Lk)("button",{type:"button","aria-label":e.__("add")},[(0,i.bF)(m.A,{src:l,class:"s-5 text-primary-500 shrink-0"})],8,v),c[0]||(c[0]=(0,i.Lk)("div",{class:"w-1px h-full py-2 bg-gray-200 mx-3 shrink-0"},null,-1))],64)):(0,i.Q3)("",!0),(0,i.Lk)("button",{type:"button","aria-label":e.__("remove"),onClick:(0,r.D$)(j,["prevent"])},[(0,i.bF)(m.A,{src:u,class:(0,s.C4)(["n-hmm11v",t.removeIconClass])},null,8,["class"])],8,b)],64))],2)):(0,i.Q3)("",!0)],2)]),_:3},8,["class","inert","disabled","href","to"]))}});n.d(e,["A",0,w])},1961(t,e,n){n(18111),n(20116);var i=n(2435),r=n(69627),o=n(14643),s=n(64920),a=n(85829),l=n(6415),u=n(46807),c=n(51984),m=n(40306);let p={key:0,class:"pt-3 pb-4 border-b-1 border-black/15 px-4"},d={class:"flex items-center justify-between"},y={class:"@text-h3-b prosed ms-3 grow min-w-0 truncate"},g={class:"flex flex-wrap"},f={default:{styleType:"outlined",color:"secondary"},selected:{styleType:"filled",color:"primary"}},h=(0,i.pM)({__name:"CategoryItem",props:{category:{},community:{}},setup(t){let{getActiveCommunityInstance:e}=(0,m.r)(),n=(0,i.EW)(()=>e()),h=(0,i.EW)(()=>{var t;return null==(t=n.value)?void 0:t.canSelectSingleLevelCategory}),v=(0,i.EW)(()=>{if((!h.value||!t.community)&&n.value)return`${n.value.baseRoute}/list/${t.category.ID}`}),b=(0,i.EW)(()=>k(t.category)?"selected":"default"),C=(0,i.EW)(()=>!t.community||!!h.value),w=(0,i.EW)(()=>t.category.getChildren());function k(e){var n;return!!(null!=(n=t.community)&&null!=(n=n.categories)&&n.find(t=>t.ID===e.ID))}function D(e){var n,i;return k(e)?null==(i=t.community)?void 0:i.removeNetworkCategory(e):null==(n=t.community)?void 0:n.addNetworkCategory(e)}let I=(0,i.EW)(()=>!t.community||t.category.getChildren().length>0);return(e,m)=>{let h=(0,i.g2)("router-link");return(0,r.R1)(n)&&(0,r.R1)(I)?((0,i.uX)(),(0,i.CE)("div",p,[(0,i.Lk)("div",d,[((0,i.uX)(),(0,i.Wv)((0,i.$y)((0,r.R1)(C)?c.A:"div"),{class:"flex-center min-w-0","style-type":f[(0,r.R1)(b)].styleType,size:"small",color:f[(0,r.R1)(b)].color,"container-class":"min-w-0",action:()=>D(t.category),link:(0,r.R1)(v)},{default:(0,i.k6)(()=>[(0,i.bF)(l.A,{sid:t.category.iconSID,class:"s-6 rounded-full",alt:t.category.localizedTitle},null,8,["sid","alt"]),(0,i.Lk)("h3",y,(0,o.v_)(t.category.localizedTitle),
11)]),_:1},8,["style-type","color","action","link"])),!t.community&&e.$can("networkCategoryManagement")?((0,i.uX)(),(0,i.Wv)(h,{key:0,to:t.category.editLink,type:"button","aria-label":e.__("settings"),class:"ms-3"},{default:(0,i.k6)(()=>[(0,i.bF)(u.A,{src:s,class:"s-4"})]),_:1},8,["to","aria-label"])):(0,i.Q3)("",!0)]),(0,i.Lk)("div",g,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)((0,r.R1)(w),(e,o)=>((0,i.uX)(),(0,i.Wv)(a.A,{key:o,"model-value":k(e),text:e.localizedTitle,class:"me-1 mt-2 h-9 flex-center",action:()=>D(e),link:t.community?void 0:`${(0,r.R1)(n).baseRoute}/list/${e.ID}`},null,8,["model-value","text","action","link"]))),128))])])):(0,i.Q3)("",!0)}}});n.d(e,["A",0,h])},58867(t,e,n){var i=n(2435),r=n(14643),o=n(46807);let s={class:"n-np9k6l"},a=["innerHTML"],l=["textContent"],u={key:3,class:"@text-body text-gray-600 w-full break-words"},c={key:4,class:"mt-4"},m=(0,i.pM)({__name:"Empty",props:{title:{},subtitle:{},icon:{},isTitleHtml:{type:Boolean},titleClass:{}},setup:t=>(e,n)=>((0,i.uX)(),(0,i.CE)("div",s,[t.icon?((0,i.uX)(),(0,i.Wv)(o.A,{key:0,src:t.icon,class:"n-n1ry8y"},null,8,["src"])):(0,i.Q3)("",!0),(0,i.RG)(e.$slots,"image"),t.isTitleHtml?((0,i.uX)(),(0,i.CE)("div",{key:1,class:(0,r.C4)(["n-et9jeg",t.titleClass]),innerHTML:t.title},null,10,a)):((0,i.uX)(),(0,i.CE)("p",{key:2,class:(0,r.C4)(["n-et9jeg",t.titleClass]),textContent:(0,r.v_)(t.title)},null,10,l)),t.subtitle?((0,i.uX)(),(0,i.CE)("p",u,(0,r.v_)(t.subtitle),1)):(0,i.Q3)("",!0),e.$slots.button?((0,i.uX)(),(0,i.CE)("div",c,[(0,i.RG)(e.$slots,"button")])):(0,i.Q3)("",!0)]))});n.d(e,["A",0,m])},3616(t,e,n){n(3362);var i=n(2435),r=n(69627),o=n(34048),s=n(46422),a=n(97095),l=n(97949),u=n(71497),c=n(40306),m=n(43176),p=n(79201);let d={key:0,class:"pb-48px"},y=(0,i.pM)({__name:"categories",setup(t){let{getActiveCommunityInstance:e}=(0,c.r)(),n=(0,i.EW)(()=>e()),y=(0,m.x)(),g=(0,u.useCommunityStore)(),f=(0,l.m)("communityId"),h=(0,i.EW)(()=>n.value?(0,p.Ay)(n.value.entitySingleTitleKey):"Ù"),{LoadingContainer:v,result:b}=(0,a.A)(async()=>{if(!f.value)return;let t=await g.getOrFetchCommunity({communityID:f.value}),e=await y.getList();return{categories:e.categories,community:t,hasChildren:e.hasChildren}});return(t,e)=>{var n;let a=(0,i.g2)("BaseHeader");return(0,i.uX)(),(0,i.CE)(i.FK,null,[(0,i.bF)(a,{"start-section":"back","center-section":"title",title:t.__("category"),"is-subtitle-html":"",subtitle:(null==(n=(0,r.R1)(b))?void 0:n.community.sanitizedTitle)||(0,r.R1)(h)},null,8,["title","subtitle"]),(0,i.bF)((0,r.R1)(v),null,{default:(0,i.k6)(()=>{var e;return[null!=(e=(0,r.R1)(b))&&null!=(e=e.categories)&&e.length&&(0,r.R1)(b).hasChildren?((0,i.uX)(),(0,i.CE)("div",d,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)((0,r.R1)(b).categories,t=>((0,i.uX)(),(0,i.Wv)(o.A,{key:t.ID,category:t,community:(0,r.R1)(b).community},null,8,["category","community"]))),128))])):((0,i.uX)(),(0,i.Wv)(s.A,{key:1,title:t.__("empty-categories")},null,8,["title"]))]}),_:1})],64)}}});n.d(e,["A",0,y])},85829(t,e,n){let i=n(94890).A;n.d(e,["A",0,i])},34048(t,e,n){let i=n(1961).A;n.d(e,["A",0,i])},46422(t,e,n){let i=n(58867).A;n.d(e,["A",0,i])},55899(t,e,n){n.r(e);let i=n(3616).A;n.d(e,["default",0,i])},78261(t,e,n){n.d(e,{Jy:()=>r,Xg:()=>s,rg:()=>a,xF:()=>o}),n(3362);var i=n(85117);async function r(t){return(await (0,i.zA)("/networkCategory/list",t)).categories}function o(t){return(0,i.zA)("/networkCategory/create",t)}function s(t){return(0,i.zA)("/networkCategory/edit",t)}function a(t){return(0,i.zA)("/networkCategory/remove",t)}},97949(t,e,n){n.d(e,{m:()=>o,x:()=>s});var i=n(81727),r=n(21820);function o(t){let e=(0,i.t)();return(0,r.AI)(()=>e.params[t])}function s(t){let e=(0,i.t)();return(0,r.AI)(()=>e.query[t])}},25222(t,e,n){n.d(e,{E:()=>h,c:()=>f}),n(16280),n(23792),n(18111),n(7588),n(61701),n(3362),n(15472),n(62953);var i=n(13315),r=n(95288),o=n(70321),s=n(96566),a=n(5634),l=n(70886),u=n(81616),c=n(44712),m=n(14783),p=n(28661),d=n(20776),y=n(71497),g=function(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};class f extends d.k{constructor(){super(h,"ID")}}class h extends u.Y{constructor(t,e=!0){let n=(0,y.useCommunityStore)();super(t),this.subscribersShowcase=new m.L(this,c.g.center,"subscribers"),this.guestsShowcase=new m.L(this,c.g.center,"all"),this.posts=[],e&&n.map.addPlain(t)}get hasPost(){return!!this.posts.length}canMovePostDown(t){return t<this.posts.length-1}canMovePostUp(t){return t>0}isOwner(t){return this.ownerUserID===t.userID}async movePostDown(t){try{if(!this.canMovePostDown(t))return;await this.setPostOrder({operation:"down",postID:this.posts[t].postID}),(0,a.wg)(this.posts,t,t+1)}catch(t){(0,a.wH)(t)}}async movePostUp(t){try{if(!this.canMovePostUp(t))return;await this.setPostOrder({operation:"up",postID:this.posts[t].postID}),(0,a.wg)(this.posts,t,t-1)}catch(t){(0,a.wH)(t)}}async getPostsList(t){var e;let n=(0,s.D)(),l=(0,i.A)(),u=await (0,r.rd)(t);n.map.addPlainMany(u.posts),l.map.addPlainMany(u.usersSummary);let c=o.j.fromPlainList(u.index);if(null==(e=u.contentQuestionExerciseCount)||e.forEach(t=>{let e=n.map.get(t.postID);e&&(e.setExercisesCount(t.exercisesCount),e.setQuestionsCount(t.questionsCount))}),!t.pagination)throw Error("pagination not sent");let m=(0,a.n4)((0,p.F)(),t.pagination);return!this.posts.length||m?this.posts=c:this.posts=[...this.posts,...c],{pagination:u.pagination,indexes:c}}async getMembersList(t){let e=await (0,r.vb)(t),n=(0,i.A)().map.addPlainMany(e.usersSummary);return{...e,usersSummary:n}}async getModeratorsList(t){let e=await (0,r.if)(t),n=(0,i.A)().map.addPlainMany(e.usersSummary);return{...e,usersSummary:n}}addModerator(t){return(0,r.yE)(t)}removeModerator(t){return(0,r.jN)({...t,communityID:this.ID})}async edit(t){let e=(0,y.useCommunityStore)(),n=await (0,r.GD)({...this==null?void 0:this.toPlain(),...t});e.fromPlain(n.community)}async setPrice(t){let e=t.isFreeSubscription?0:t.subscriptionCost,n=0;if(!t.isFreeSubscription&&t.hasDiscount){if(null==t.subscriptionCostAfterDiscount)return!1;n=t.subscriptionCostAfterDiscount}if(null!=e&&n>e)return!1;let i=!t.isFreeSubscription&&t.hasDiscount&&null!=e&&n<e;return await (0,r.Np)({...t,subscriptionCost:e,subscriptionCostAfterDiscount:i?n:0,hasDiscount:i}),!0}async updateStatus(t){await (0,r.jZ)(t),this.status=t.status}setPostOrder(t){return(0,r.wB)(t)}addMember(t){return(0,r.yQ)({...t,communityID:this.ID})}async join(t={}){let e=await (0,r.yQ)({communityID:this.ID,...t});this.contributionStatus=e.status,"member"===e.status&&this.membersCount++}async leave(t={}){await (0,r.Nd)(t)}async kick(t){await (0,r.el)({userID:t.userID}),this.membersCount--}}g([(0,l.pj)()],h.prototype,"orderingMode",void 0),g([(0,l.pj)()],h.prototype,"viewMode",void 0),g([(0,l.pj)()],h.prototype,"hasShowcase",void 0),g([(0,l.pj)()],h.prototype,"bannerSID",void 0),g([(0,l.pj)()],h.prototype,"joinLink",void 0),g([(0,l.pj)()],h.prototype,"progressPercent",void 0),g([(0,l.pj)()],h.prototype,"networkCategory",void 0),g([(0,l.pj)()],h.prototype,"contentAccessWithDirectLink",void 0),g([(0,l.pj)()],h.prototype,"communityBundleContributionStatus",void 0)},9412(t,e,n){n.d(e,{w:()=>a}),n(18111),n(61701),n(15472);var i=n(71497),r=n(13315),o=n(70886),s=function(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};class a extends o.SS{get user(){return(0,r.A)().map.safeGet(this.userID)}get community(){return(0,i.useCommunityStore)().map.get(this.communityID)}}s([(0,o.pj)()],a.prototype,"ID",void 0),s([(0,o.pj)()],a.prototype,"userID",void 0),s([(0,o.pj)()],a.prototype,"communityID",void 0),s([(0,o.pj)()],a.prototype,"status",void 0)},39679(t,e,n){n.d(e,{O:()=>r}),n(18111),n(61701);var i=n(9412);let r=(0,n(46645).nY)("communityMember",()=>({fromPlainList:function(t){return t?t.map(t=>new i.w(t)):[]}}))},99945(t,e,n){n.d(e,{V:()=>l}),n(18111),n(61701),n(15472);var i=n(59313),r=n(71497),o=n(70886),s=n(95745),a=function(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};class l extends o.SS{get community(){return(0,r.useCommunityStore)().map.get(this.communityID)}
1get createdTimeString(){return i.$.fromTimestampSeconds(this.createdTime).formatDate("yyyy/mm/dd - hh:mm")}get finalAmountString(){return(0,s.$)(this.priceInfo.subscriptionCostAfterDiscount)}get subscriptionCostString(){return(0,s.$)(this.priceInfo.subscriptionCost)}get subscriptionCostAfterDiscountString(){return(0,s.$)(this.priceInfo.subscriptionCostAfterDiscount)}get currency(){switch(this.priceInfo.currency){case"IRR":return"n-currency.IRR";case"USD":return"n-currency.USD";default:return"n-currency.TMN"}}}a([(0,o.pj)()],l.prototype,"communityID",void 0),a([(0,o.pj)()],l.prototype,"createdTime",void 0),a([(0,o.pj)()],l.prototype,"priceInfo",void 0)},43408(t,e,n){n.d(e,{l:()=>o}),n(18111),n(61701);var i=n(46645),r=n(99945);let o=(0,i.nY)("communityPurchaseHistory",()=>({fromPlainList:function(t){return t?t.map(t=>new r.V(t)):[]}}))},71497(t,e,n){n.d(e,{useCommunityStore:()=>m}),n(18111),n(61701),n(3362);var i=n(95288),r=n(25222),o=n(39679),s=n(43408),a=n(29019),l=n(43176),u=n(13315),c=n(45179);let m=(0,n(46645).nY)("community",()=>{let t=new r.c;function e(e){let n=(0,l.x)(),i=t.addPlain(e);return i.categories=n.fromPlainList(e.networkCategories),i}function n(t){return t?t.map(e):[]}async function m(t){let n=(0,u.A)(),r=await (0,i.eR)(t);return n.map.addPlainMany(r.usersSummary),r.userSummary&&n.map.addPlain(r.userSummary),e(r.community)}async function p(e){let n=t.get(e.communityID),i=m(e);return n||i}async function d(t){if(t.title&&t.membershipType&&t.customizationType)return e((await (0,i.m$)({...t,title:t.title,membershipType:t.membershipType,writePermission:"owner",customizationType:t.customizationType,orderingMode:"contentCreatedTimeASC",viewMode:"postStyle"})).community)}async function y(t){let e=await (0,i.Q4)(t),r=(0,u.A)().map.addPlainMany(e.usersSummary);return{pagination:{...e.pagination},communities:n(e.communities),usersSummary:r}}async function g(t){let e=await (0,i.cg)(t),r=(0,u.A)().map.addPlainMany(e.usersSummary);return{pagination:{...e.pagination},communities:n(e.communities),usersSummary:r}}async function f(t){let e=await (0,i.jd)(t),r=(0,u.A)().map.addPlainMany(e.usersSummary);return{pagination:{...e.pagination},communities:n(e.communities),usersSummary:r}}async function h(){let t=await (0,i.jd)({},{"app-scope-tenant":"boshra"}),e=(0,u.A)().map.addPlainMany(t.usersSummary);return{pagination:{...t.pagination},communities:n(t.communities),usersSummary:e}}async function v(t){let e=await (0,i.SE)(t),r=(0,u.A)().map.addPlainMany(e.usersSummary),s=n(e.communities),a=(0,o.O)().fromPlainList(e.members);return{pagination:{...e.pagination},communities:s,usersSummary:r,members:a}}async function b(t){let e=await (0,i.Li)(t),r=(0,u.A)(),o=(0,s.l)();return r.fromPlainList(e.usersSummary),{pagination:{...e.pagination},communities:n(e.communities),purchaseHistory:o.fromPlainList(e.purchaseHistory)}}return{map:t,fromPlain:e,fromPlainList:n,create:d,get:m,getOrFetchCommunity:p,getCommunityListAll:y,getCommunityList:g,getCommunityListModeratedByMe:f,getCommunityListManagedByMe:v,getPurchaseHistory:b,getCommunityBasedOnRoute:function(e=c.p){let n,i=null==e?void 0:e.currentRoute.value.params.communityId;if(i){let e=(0,a.U)();n=t.get(i)||e.map.get(i)||void 0}return n},getBoshraCommunityListModeratedByMe:h}})},81616(t,e,n){n.d(e,{Y:()=>y,u:()=>d}),n(89463),n(23792),n(44114),n(18111),n(61701),n(3362),n(15472),n(62953);var i=n(95288),r=n(74544),o=n(15846),s=n(13315),a=n(5634),l=n(70886),u=n(20776),c=n(79201),m=n(75850),p=function(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};class d extends u.k{constructor(){super(y,"ID")}}class y extends r.M{constructor(){super(...arguments),this.mode="view",this.categories=[]}get recentModerators(){let t=(0,s.A)().map;return this.moderatorsRecentContributed.map(e=>t.safeGet(e))}get ownerUser(){return(0,s.A)().map.safeGet(this.ownerUserID)}get hasMoreDescription(){return this.description.length>300||this.description.split("\n").length>8}get sanitizedDescription(){return o.W.processText(this.description)}get membersCountString(){return(0,a.Nf)(this.membersCount)}get moderatorsCountString(){return(0,a.Nf)(this.moderatorsCount)}get staffsCountString(){return(0,a.Nf)(this.staffsCount)}get editLink(){return`${this.detailsLink}/set`}
1get createPostLink(){return`${this.detailsLink}/compose`}get membersPageLink(){return`${this.detailsLink}/members`}get viewSettingsPageLink(){return`${this.detailsLink}/settings/view`}get permissionsViewPageLink(){return`${this.detailsLink}/settings/permissions-view`}get permissionsWritePageLink(){return`${this.detailsLink}/settings/permissions-write`}get membershipPageLink(){return`${this.detailsLink}/settings/membership`}get moderatorsPageLink(){return`${this.detailsLink}/moderators`}get fullLink(){return"https://virasty.com"+this.detailsLink}get canViewMembersList(){let t=this.viewMembersPermission;switch(this.contributionStatus){case"member":return"member"===t||"all"===t;case"moderator":case"owner":return!0;default:return!1}}get summarizeContentsCount(){return(0,a.Nf)(this.contentsCount)}get mainCategoryTitleLocalized(){var t;return(null==(t=this.categories)||null==(t=t[0])?void 0:t.localizedTitle)||(0,c.Ay)("category")}get manageCategoriesLink(){if(this.isCurrentUserOwner)return`${this.detailsLink}/categories`}get canDisplayCategories(){var t;return!!this.isCurrentUserOwner||null!=(t=this.categories)&&!!t.length}get moreCategoriesNumber(){if(this.categories.length>1)return this.categories.length-1}getSanitizedSummarizedDescription(){return o.W.processText(this.getSummarizedDescription())}getSummarizedDescription(){if(!this.hasMoreDescription)return this.description;let t=this.description.substring(0,300);return t=t.split("\n").slice(0,8).join("\n"),`${t}â¦`}setMode(t){this.mode=t}acceptJoinRequest(t){return(0,i.lD)({action:"accept",communityID:this.ID,userID:t})}rejectJoinRequest(t){return(0,i.lD)({action:"reject",communityID:this.ID,userID:t})}removeJoinRequest(t){return(0,i.lD)({action:"remove",communityID:this.ID,userID:t})}async addNetworkCategory(t){3===this.categories.length?(0,m.GY)((0,c.Ay)("category-error-message",[3]),{type:"warning"}):(await (0,i.bU)({networkCategoryID:t.ID}),this.categories.push(t))}async removeNetworkCategory(t){await (0,i.ei)({networkCategoryID:t.ID});let e=this.categories.findIndex(e=>e.ID===t.ID);~e&&this.categories.splice(e,1)}}p([(0,l.pj)(),(0,l.W6)("sanitizedDescription")],y.prototype,"description",void 0),p([(0,l.pj)()],y.prototype,"ownerUserID",void 0),p([(0,l.pj)()],y.prototype,"customizationType",void 0),p([(0,l.pj)()],y.prototype,"viewMembersPermission",void 0),p([(0,l.pj)()],y.prototype,"showInPublicDirectory",void 0),p([(0,l.pj)()],y.prototype,"status",void 0),p([(0,l.pj)(),(0,l.W6)("membersCountString")],y.prototype,"membersCount",void 0),p([(0,l.pj)(),(0,l.W6)("summarizeContentsCount")],y.prototype,"contentsCount",void 0),p([(0,l.pj)(),(0,l.W6)("moderatorsCountString")],y.prototype,"moderatorsCount",void 0),p([(0,l.pj)()],y.prototype,"moderatorsRecentContributed",void 0),p([(0,l.pj)(),(0,l.W6)("staffsCountString")],y.prototype,"staffsCount",void 0),p([(0,l.pj)()],y.prototype,"createdTime",void 0),p([(0,l.pj)()],y.prototype,"staffAccessToThisCommunity",void 0),p([(0,l.pj)()],y.prototype,"networkCategories",void 0),p([(0,l.PP)()],y.prototype,"sanitizedDescription",null),p([(0,l.PP)()],y.prototype,"membersCountString",null),p([(0,l.PP)()],y.prototype,"moderatorsCountString",null),p([(0,l.PP)()],y.prototype,"staffsCountString",null),p([(0,l.PP)()],y.prototype,"summarizeContentsCount",null)},29019(t,e,n){n(18111),n(61701);var i=n(81616),r=n(43176);let o=(0,n(46645).nY)("communitySummary",()=>{let t=new i.u;function e(e){let n=(0,r.x)(),i=t.addPlain(e);return i.categories=n.fromPlainList(e.networkCategories),i}return{map:t,fromPlain:e,fromPlainList:function(t){return t?t.map(e):[]}}});n.d(e,["U",0,o])},14049(t,e,n){n.d(e,{x:()=>m,z:()=>c}),n(23792),n(44114),n(18111),n(7588),n(3362),n(15472),n(62953);var i=n(43176),r=n(78261),o=n(79201),s=n(70886),a=n(20776),l=n(40306),u=function(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};class c extends s.SS{constructor(t){super(t)}get localizedTitle(){let t=(0,o.TH)();return this.title[t.language]}get editLink(){let{getActiveCommunityInstance:t}=(0,l.r)(),e=t();return e?`${e.baseRoute}/category/set/${this.ID}`:""}getChildren(){if(!this.subCategories)return[];let t=[];
1return this.subCategories.forEach(e=>t.push(new c(e))),t}getCategoryWithChildren(){return[this,...this.getChildren()]}async edit(t){await (0,r.Xg)({...t,networkCategoryID:this.ID}),t.iconSID&&(this.iconSID=t.iconSID),t.title&&(this.title=t.title)}async remove(t){let e=(0,i.x)();await (0,r.rg)({networkCategoryID:this.ID}),t?e.removeSubCategory(t,this):e.removeCategory(this)}}u([(0,s.pj)()],c.prototype,"ID",void 0),u([(0,s.pj)()],c.prototype,"parentID",void 0),u([(0,s.pj)()],c.prototype,"title",void 0),u([(0,s.pj)()],c.prototype,"iconSID",void 0),u([(0,s.pj)()],c.prototype,"subCategories",void 0);class m extends a.k{constructor(){super(c,"ID")}safeGet(t){let e=(0,i.x)();return this.get(t)||e.getDefaultNetworkCategory()}}},43176(t,e,n){n.d(e,{x:()=>u}),n(23792),n(44114),n(18111),n(20116),n(61701),n(13579),n(3362),n(62953);var i=n(46645),r=n(14049),o=n(78261),s=n(40306),a=n(73352),l=n(2435);let u=(0,i.nY)("networkCategory",()=>{let t,e=new r.x,n=(0,a.Kh)({}),i=(0,l.EW)(()=>{let{getActiveCommunityInstance:t}=(0,s.r)(),e=t();return e?e.customizationType:"book"});function u(t){n[i.value]||(n[i.value]=[]),n[i.value].push(c(t))}function c(t){return e.addPlain(t)}function m(t){return t?t.map(c):[]}async function p(){var t,e,r;if(null!=(t=n[i.value])&&t.length)return{categories:n[i.value],hasChildren:null==(r=n[i.value])?void 0:r.some(t=>t.getChildren().length>0)};let s=await (0,o.Jy)({});n[i.value]=m(s);let a=null==(e=n[i.value])?void 0:e.some(t=>t.getChildren().length>0);return{categories:n[i.value],hasChildren:a}}async function d(t){let e=await (0,o.xF)(t);return t.parentID||u(e.networkCategory),e}async function y(t){var e;for(let r of(null!=(e=n[i.value])&&e.length||await p(),n[i.value])){if(r.ID===t)return r;let e=r.getChildren().find(e=>e.ID===t);if(e)return e}}return{getList:p,fromPlainList:m,fromPlain:c,getDefaultNetworkCategory:function(){return t||(t=new r.z({ID:"-1",iconSID:"",parentID:"-1",subCategories:[],title:{ar:"",en:"",fa:""}})),t},addCategory:u,addSubCategory:function(t,e){var r;let o=null==(r=n[i.value])?void 0:r.find(e=>e.ID===t);o&&(o.subCategories||(o.subCategories=[]),o.subCategories.push(e))},removeCategory:function(t){if(!n[i.value])return;let e=n[i.value].findIndex(e=>e.ID===t.ID);~e&&n[i.value].splice(e,1)},removeSubCategory:function(t,e){var r,o;let s=null==(r=n[i.value])?void 0:r.find(e=>e.ID===t);if(!s||!s.subCategories)return;let a=s.subCategories.findIndex(t=>t.ID===e.ID);~a&&(null==(o=s.subCategories)||o.splice(a,1))},categories:(0,l.EW)(()=>n[i.value]),create:d,get:async function(t){var e;let s=null==(e=n[i.value])?void 0:e.find(e=>e.ID===t);if(s)return s;let a=await (0,o.Jy)({parentCategoryID:t});return new r.z(a[0])},MAX_TITLE_LENGTH:32,search:y}})},14783(t,e,n){n.d(e,{L:()=>p}),n(16280),n(44114),n(18111),n(20116),n(7588),n(61701),n(3362);var i=n(57240),r=n(21953),o=n(37830),s=n(24370),a=n(49108),l=n(13315),u=n(84971),c=n(79201),m=n(69627);class p extends s._{constructor(t,e,n){super(),this.community=t,this.column=e,this.visibility=n}get key(){return this.community.ID}get defaultAutoBlockSeederType(){return"manual"}get canManageBlocks(){return this.community.isCurrentUserOwner}get canManageContents(){return this.community.canWrite}get addBlockLink(){return`${this.community.detailsLink}/showcase/block`}get contentSingleTitleKey(){return"content"}get contentPluralTitleKey(){return"contents"}isCommunityShowcase(){return!0}async addBlock(t){var e,n;let s=(0,r.q)(),p=(0,a.d)(),d=(0,l.A)();if(!t.type)throw(0,u.mT)((0,c.Ay)("block-type-error"));if(!t.contentType)throw(0,u.mT)({message:(0,c.Ay)("empty-block-content-type-error"),track:!1});let y=await (0,i.Xp)({communityID:this.community.ID,showcaseType:"community",title:t.title,titleURL:t.titleURL,type:t.type,location:o._.showcase,locationColumn:this.column,contentType:t.contentType,seeder:t.seeder||"manual",config:(0,m.ux)(t.config),visibility:this.visibility}),g=s.fromPlainList(y.blocks);await (null==(e=g[0].getMetaData())||null==(n=e.getData)?void 0:n.call(e)),g.forEach(t=>{var e;null==(e=t.blockTabs)||e.forEach(e=>{e.contents.forEach(e=>{var n;let i=null==(n=y.showcaseContents)?void 0:n.find(t=>t.entityID===e.entityID);i&&p.addPlainToMap(i,t.contentType)})})}),d.map.addPlainMany(y.usersSummary),this.blocks.push(g[0])}async getBlocksList(t=!1){let e=(0,r.q)(),n=(0,a.d)(),s=(0,l.A)();if(!this.community.ID)throw Error("community.ID not provided!");let u=await (0,i.gj)({location:o._.showcase,showcaseType:this.showcaseType(),visibility:this.visibility}),c=e.fromPlainList(u[`${this.column}Blocks`]);for(let t=0;t<c.length;t++){var m,p;let e=c[t];await (null==(m=e.getMetaData())||null==(p=m.getData)?void 0:p.call(m))}c.forEach(t=>{var e;
1null==(e=t.blockTabs)||e.forEach(e=>{e.contents.forEach(e=>{var i;let r=null==(i=u.showcaseContents)?void 0:i.find(t=>t.entityID===e.entityID);r&&n.addPlainToMap(r,t.contentType)})})}),s.map.addPlainMany(u.usersSummary),this.blocks=c}canSetAutoBlock(){return!1}showcaseType(){return"community"}canSetAutoBlockSource(){return!0}}},38211(t){t.exports='<svg fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M11.049 11.049 11.042 4h2.008l-.007 7.049 7.047-.007v2.008l-7.047-.007.007 7.047h-2.008l.007-7.047L4 13.05v-2.008z"/></svg>'}}]);
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.