/*! For license information please see main.948284de.js.LICENSE.txt */
(()=>{var __webpack_modules__={67787:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/behance.1a39d1b87cbcffc24495310a1d5a4770.svg"},55227:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/dribbble.96aa35fe9d561f658e438e47c1b2c5c2.svg"},64125:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/facebook.2728600b3606fd416738af6ab6d25d6e.svg"},16442:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/globe-icon.13641ca0d1bfe06b5f4b73accac86430.svg"},71703:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/instagram.c4874259f6de104db298e0d1ee63b0d1.svg"},48044:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/left-arrow-icon.48269c30fc3078a910c44504f9c21fb4.svg"},89859:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/linkedin.e7fb297d7eb0cb628f5dbdbdf9aa5f7b.svg"},86285:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/pinterest.be98129b3866c0a1dd38bef2f39c62e0.svg"},10515:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/plus-gray-icon.63c5c56d936e7933ac2e61befe03b6b3.svg"},57321:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/plus-icon.24b386f770f41ca5af4c243f32a84d0b.svg"},8233:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/question-icon.b5cbb12c691d7be444be5fcba8a460e0.svg"},13629:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/quiz-option-correct-icon.bc1f0923d52bf58345a9be18b554661a.svg"},32922:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/quiz-option-icon.de78ad2e114684f7926e235d8f269ca6.svg"},54790:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/quiz-question-remove-icon.16d1978a9fec6235d10b5b9e5c347ec7.svg"},30881:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/send-message-icon.8a9a6a9e473c72a2388b1defe438042c.svg"},38298:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/twitter.c5f280fa97bc754c8fcff3001370baee.svg"},92704:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(20975);const r=n.p+"static/media/youtube.6d684aa9d70ab53db76700a0a6e13cb8.svg"},61592:()=>{},56455:()=>{},91965:()=>{},28836:(e,t,n)=>{"use strict";n.d(t,{B:()=>O,A:()=>L});var r=n(20975),o=n(31305),i=n(82993),s=n(47760),a=n(89449),l=n(16478),c=n(65186);function d(e){const[t,n]=(0,r.useState)(!1);(0,r.useEffect)((()=>{e&&"admin"===e.myRole&&!t&&(setTimeout((()=>{(function(e,t,n){function r(){let e=t.getElementsByTagName("script")[0],n=t.createElement("script");n.type="text/javascript",n.async=!0,n.src="https://beacon-v2.helpscout.net",e.parentNode.insertBefore(n,e)}if(e.Beacon=n=function(t,n,r){e.Beacon.readyQueue.push({method:t,options:n,data:r})},n.readyQueue=[],"complete"===t.readyState)return r();e.attachEvent?e.attachEvent("onload",r):e.addEventListener("load",r,!1)})(window,document,window.Beacon||function(){}),window.Beacon("init","c8430dd6-2a64-4b61-962f-ed18a2da7ea4"),window.Beacon("config",{display:{style:"manual"}})}),8e3),n(!0))}),[e,t])}var u=n(51772),h=n(43039),p=n(42414),m=n(31696),f=n(82256),g=n(62391);const b=(0,a.wj)((0,o.Ng)((e=>({user:e.auth,community:e.community})),(e=>(0,i.zH)({updateCommunity:p.Km},e)))((function(e){let{user:t,community:n,updateCommunity:o,addToast:i,web3Logout:s}=e;const[l,d]=(0,r.useState)(!1),u=null===n||void 0===n?void 0:n.id,{analyticsService:p}=(0,c.W)();return(0,r.useEffect)((()=>{n&&!("joined"in n)&&t&&"New User"!==t.name&&(d(!0),h.BE.getCommunityById(t,n.id).then((e=>{let{community:n}=e;n.joined?(d(!1),o(n)):h.BE.joinCommunity(t,n.id).then((e=>{let{community:t}=e;d(!1),p.track("subscribe-community",{communityPlan:t.plan?t.plan.planType:"free"}),o(t),i("Subscribed to "+t.name)})).catch((e=>{d(!1),console.log({error:e,message:"Subscribe to community failed!"}),i("Could not subscribe to "+n.name,"",a.lm.danger)}))})).catch((e=>{d(!1),console.log({error:e,message:"Loading community by id failed!"}),i("Could not load community by id "+n.name,"",a.lm.danger)})))}),[u,t]),(0,g.jsxs)("div",{className:"flex h-screen flex-col items-center justify-center bg-background",children:[(0,g.jsx)(f.R,{}),n.joined?(0,g.jsxs)("div",{className:"flex flex-col items-center rounded bg-card p-12 pb-8",children:[(0,g.jsx)("img",{src:n.logo,alt:"",className:"w-72 rounded"}),(0,g.jsx)("div",{className:"my-4 text-center text-lg font-bold text-secondary-foreground/85",children:"Your membership is pending"}),(0,g.jsx)("div",{className:"w-72 text-center text-secondary-foreground/80",children:"You'll be notified if your request to join has been approved."}),(0,g.jsx)("div",{className:"my-8 h-0.5 w-full border-b border-border"}),(0,g.jsx)("div",{className:"theme-border-danger mt-4 flex w-64 cursor-pointer place-content-center border",children:(0,g.jsx)("button",{className:"w-full rounded-full px-4 py-2 text-alert",onClick:()=>{m.A.logout(n,s)},children:"Logout"})})]}):"Joining Community..."]})})));var v=n(55854),y=n(93591),w=n(64373),x=n(23277);function k(){return(0,g.jsxs)("div",{className:"h-screen w-full animate-pulse",children:[(0,g.jsx)("div",{children:(0,g.jsx)(w.A,{})}),(0,g.jsx)(y.g,{children:(0,g.jsxs)("div",{className:"AppContainer two-column h-screen w-full",children:[(0,g.jsx)("div",{className:"Sidebar",children:(0,g.jsx)(x.A,{})}),(0,g.jsxs)("div",{className:"flex flex-col space-y-2 px-4 sm:p-0",children:[(0,g.jsx)("div",{className:"h-96 w-full bg-card"}),(0,g.jsxs)("div",{className:"flex h-full space-x-2",children:[(0,g.jsx)("div",{className:"CommunityPostTab h-full w-full bg-card"}),(0,g.jsx)("div",{className:"hidden h-full w-1/3 bg-card xl:flex"})]})]})]})})]})}var _=n(78220),A=n(96621),C=n(16118),j=n(26914),S=n(77255),E=n(41153),N=n(93668);function D(e){if(!/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e))throw console.log("Could not parse Hex Color",{hex:e}),new Error("Could not parse Hex Color");e.startsWith("#")&&(e=e.slice(1));const t=parseInt(e.slice(0,2),16)/255,n=parseInt(e.slice(2,4),16)/255,r=parseInt(e.slice(4,6),16)/255,o=Math.max(t,n,r),i=Math.min(t,n,r),s=(o+i)/2;let a=0,l=0;if(o!==i){const e=o-i;switch(l=s>.5?e/(2-o-i):e/(o+i),o){case t:a=(n-r)/e+(n Hi, guys!0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},ae=se(oe),le=function(e,t){return ae(ne(e,t,X),e+"")},ce=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},de=function(e){return null!=e&&ce(e.length)&&!P(e)},ue=/^(?:0|[1-9]\d*)$/,he=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ue.test(e))&&e>-1&&e%1==0&&e
").replace(/\r?\n/g,"
").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g," ")).includes("
")||s.includes("
"))&&(s="
".concat(s,"
")),i=s),i=this.editor.data.htmlProcessor.toView(i));const a=new o(this,"inputTransformation");this.fire(a,{content:i,dataTransfer:r,targetRanges:t.targetRanges,method:t.method}),a.stop.called&&e.stop(),n.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((e,n)=>{if(n.content.isEmpty)return;const r=this.editor.data.toModel(n.content,"$clipboardHolder");0!=r.childCount&&(e.stop(),t.change((()=>{this.fire("contentInsertion",{content:r,method:n.method,dataTransfer:n.dataTransfer,targetRanges:n.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((e,n)=>{n.resultRange=t.insertContent(n.content)}),{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,n=e.editing.view.document;function r(r,o){const i=o.dataTransfer;o.preventDefault();const s=e.data.toView(e.model.getSelectedContent(t.selection));n.fire("clipboardOutput",{dataTransfer:i,content:s,method:r.name})}this.listenTo(n,"copy",r,{priority:"low"}),this.listenTo(n,"cut",((t,n)=>{e.isReadOnly?n.preventDefault():r(t,n)}),{priority:"low"}),this.listenTo(n,"clipboardOutput",((n,r)=>{r.content.isEmpty||(r.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(r.content)),r.dataTransfer.setData("text/plain",zp(r.content))),"cut"==r.method&&e.model.deleteContent(t.selection)}),{priority:"low"})}}class Up{constructor(){this._stack=[]}add(e,t){const n=this._stack,r=n[0];this._insertDescriptor(e);const o=n[0];r===o||Vp(r,o)||this.fire("change:top",{oldDescriptor:r,newDescriptor:o,writer:t})}remove(e,t){const n=this._stack,r=n[0];this._removeDescriptor(e);const o=n[0];r===o||Vp(r,o)||this.fire("change:top",{oldDescriptor:r,newDescriptor:o,writer:t})}_insertDescriptor(e){const t=this._stack,n=t.findIndex((t=>t.id===e.id));if(Vp(e,t[n]))return;n>-1&&t.splice(n,1);let r=0;for(;t[r]&&Hp(t[r],e);)r++;t.splice(r,0,e)}_removeDescriptor(e){const t=this._stack,n=t.findIndex((t=>t.id===e));n>-1&&t.splice(n,1)}}function Vp(e,t){return e&&t&&e.priority==t.priority&&Wp(e.classes)==Wp(t.classes)}function Hp(e,t){return e.priority>t.priority||!(e.priority