PageSourceSearch

https://commmune.com/_next/static/chunks/8854-3f89f799bce3414e.js

js commmune.com collected 2026-09-24 20:07:36 UTC 10,161 bytes, 5 lines download raw bytes

1"use strict";
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="792b3bb3-4f3f-565e-a4c0-b3038a54fff0")}catch(e){}}();
3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8854],{18147:(e,t,n)=>{n.d(t,{Q:()=>N});var i=n(45023),o=n(36439),s=n(38356),r=n.n(s),a=n(28317),l=n(41471),p=n(816),c=n(92362),d=n(43719),u=n(96328),m=n(9662);let h={display:"block",textAlign:"center",color:"#919191",cursor:"pointer",overflow:"hidden"},g=[...d.D2,...d.do,...d.FW],f=e=>{let t=(e,t)=>new File([e],e.name,{type:t});return e.name.endsWith(".csv")?t(e,"text/csv"):e.name.endsWith(".zip")?t(e,"application/zip"):e},v=e=>Object.assign(e,{preview:URL.createObjectURL(e)}),C=({acceptMimetypes:e,iconStyle:t,iconSize:n,children:o,onDrop:s})=>(0,i.Y)(u.A,{accept:(e||g).join(","),onDrop:(e,t,n)=>s&&s(e.map(f).map(v),t.map(v),n),children:({getRootProps:e,getInputProps:s})=>(0,i.FD)("div",{...e(),style:{...h,...t},children:[(0,i.Y)("input",{"data-cy":"drop-zone-input",...s()}),(0,i.Y)(m.A,{fontSize:n,style:{color:"#757575"},"data-cy":"attach-file-icon"}),o]})});var b=n(87512),x=n(20251);let w=(e,t)=>e.filter(e=>t.includes(e));class y extends o.Component{preSaveVideos(e){let t=e.filter(e=>e.type&&e.type.startsWith("video/"));if((0,x.I)(t))return!1;this.props.onFileUploading(!0);let n=t=>{let n=e.map(e=>{let n=t.findIndex(t=>t.name===e.name);return -1!==n&&(e.thumbnail=t[n].thumbnail,e.video=t[n].video,e.tmpVideo=t[n].tmpVideo),e});n=w(n,this.props.files),this.props.onChange(n),this.props.onFileUploading(!1)},i=()=>{this.props.onFileUploading(!1)};return this.props.dispatch(b.iG.request({successCb:n,errorCb:i,videos:t})),!0}preSaveImages(e){let t=e.filter(e=>(!e.type||!!e.type.startsWith("image/"))&&!(e.preview&&e.preview&&e.preview.startsWith("https://")));if((0,x.I)(t))return!1;this.props.onFileUploading(!0);let n=t=>{let n=e.map(e=>{let n=t.findIndex(t=>t.name===e.name);return -1!==n&&(e.preview=t[n].preview),e});n=w(n,this.props.files),this.props.onChange(n),this.props.onFileUploading(!1)},i=()=>{this.props.onFileUploading(!1)};return this.props.dispatch(b.Sp.request({successCb:n,errorCb:i,images:t})),!0}render(){return(0,i.Y)(o.Fragment,{children:(0,i.Y)(C,{...this.props,onDrop:this.onDrop,acceptMimetypes:this.props.acceptMimetypes})})}constructor(...e){super(...e),this.onDrop=e=>{let{maxUploadFiles:t,t:n}=this.props,i=n("This file is too large to upload. It should be less than 100MB. File:"),o=(e=e.filter(e=>{let t=e.size<p.default.MAX_UPLOAD_FILE_SIZE;return t||this.props.dispatch((0,c.mO)(i+e.name)),t})).map(e=>{let t=/^video/.test(e.type)?new File([e],`${r()()}_${e.name}`,{type:e.type}):new File([e],e.name,{type:e.type});return e.preview&&(t.preview=e.preview),t}
3),s=this.props.files.concat(o);s.length>t&&(s=s.slice(0,t));let a=this.preSaveVideos(s),l=this.preSaveImages(s);this.props.onChange(s),a||l||this.props.onFileUploading(!1)}}}let N=(0,l.connect)()((0,a.C)(["components/molecules"])(y))},30293:(e,t,n)=>{n.d(t,{O:()=>s});var i=n(45023);n(36439);var o=n(30915);function s({lines:e=2,children:t}){return(0,i.Y)("span",{css:r(e),children:t})}let r=e=>(0,o.AH)("display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:",e,";")},43248:(e,t,n)=>{n.d(t,{P:()=>k});var i=n(45023),o=n(51949),s=n.n(o),r=n(36439),a=n(41471),l=n(60138),p=n.n(l),c=n(31700),d=n(87512),u=n(25571),m=n(28317),h=n(93998),g=n(27570),f=n(30293),v=n(78201);class C extends r.Component{getDeviseHeight(e){return e<4?32*e:96}getWebHeight(e){return e<6?32*e:160}render(){let{t:e}=this.props,{onChangeMouseOver:t,onChangeMouseOut:n}=this,{suggestions:o,onClick:s,selectItemIndex:r,classes:a}=this.props,{mouseOverIndex:l}=this.state,p=this.resolveSuggestionStyle();return(0,i.Y)(v.az,{border:1,borderColor:"rgba(0,0,0,0.1)",borderRadius:5,className:a?.container,style:p,children:(0,i.Y)(v.B8,{className:a?.list,children:o.map((o,p)=>9999===l&&r===p||l===p?(0,i.FD)(v.ck,{className:a?.selectedItem,onClick:s(o),onMouseOut:n,"data-cy":"suggestion-list-item",children:[o.type===c.MENTION_ACCOUNT_TYPE.USER?(0,i.Y)(b,{nickname:o.nickname,accountName:o.accountName}):(0,i.Y)(w,{groupName:o.groupName}),(0,i.Y)(v.o5,{className:a?.itemTextEnd,children:o.type===c.MENTION_ACCOUNT_TYPE.USER?e("User"):e("Group")})]},o.id):(0,i.FD)(v.ck,{className:a?.item,onClick:s(o),onMouseOver:()=>t(p),"data-cy":"suggestion-list-item",children:[o.type===c.MENTION_ACCOUNT_TYPE.USER?(0,i.Y)(b,{nickname:o.nickname,accountName:o.accountName}):(0,i.Y)(w,{groupName:o.groupName}),(0,i.Y)(v.o5,{className:a?.itemTextEnd,children:o.type===c.MENTION_ACCOUNT_TYPE.USER?e("User"):e("Group")})]},o.id))})})}constructor(...e){super(...e),this.state={mouseOverIndex:9999},this.onChangeMouseOver=e=>this.setState({mouseOverIndex:e}),this.onChangeMouseOut=()=>this.setState({mouseOverIndex:9999}),this.resolveSuggestionStyle=()=>{let{userAgent:e,variant:t,suggestions:n}=this.props,i=n.length,o=i>=7?7:i,s=this.getWebHeight(i),r=this.getDeviseHeight(i);return(0,h.Cx)(e)?{width:"100%",top:-r-3,maxHeight:100,backgroundColor:"#ffffff",overflow:"auto",position:"absolute",zIndex:g.Pj.popover}:"body"===t?{width:"100%",top:-32*o,position:"absolute",overflow:"auto",maxHeight:160,backgroundColor:"#ffffff",zIndex:g.Pj.popover}:{width:"100%",top:-s,position:"absolute",overflow:"auto",maxHeight:160,backgroundColor:"#ffffff",zIndex:g.Pj.popover}}}}function b({nickname:e,accountName:t}){let{classes:n}=x();return(0,i.Y)(v.Zq,{children:(0,i.Y)(v.o5,{children:(0,i.FD)("div",{className:n.names,children:[(0,i.Y)(f.O,{lines:1,children:(0,i.Y)("span",{className:n.nickname,children:e})}),(0,i.Y)(f.O,{lines:1,children:(0,i.FD)("span",{className:n.accountName,children:["@",t]})})]})})})}let x=(0,v.n9)()(()=>({names:{display:"flex",alignItems:"center",gap:4},nickname:{fontSize:15,fontWeight:"bold"},accountName:{fontSize:13}}));function w({groupName:e}){return(0,i.Y)(v.Zq,{children:e})}let y=(0,m.C)(["components/organisms/mention"])((0,a.connect)(e=>({userAgent:e.user.userAgent}))((0,v.Xy)(C,{container:{paddongTop:0,paddingBottom:0},item:{gap:4,paddingTop:2,paddingBottom:2,justifyContent:"flex-between"},selectedItem:{gap:4,paddingTop:2,paddingBottom:2,color:"#ffffff",backgroundColor:"#3269E9",justifyContent:"flex-between"},itemTextEnd:{fontSize:11,whiteSpace:"nowrap"},list:{paddingTop:0,paddingBottom:0}}))),N=r.forwardRef(({value:e,placeholder:t,variant:n,rows:o,onCompositionEnd:s,onChange:r,onKeyDown:a,...l},p)=>{let{classes:c}=I();return"body"===n?(0,i.Y)(v.pd,{inputRef:p,name:n,placeholder:t,rows:o,maxRows:50,fullWidth:!0,multiline:!0,onChange:r,onCompositionEnd:s,value:e,onKeyDown:a,style:{padding:"10px"},...l}):(0,i.Y)(v.A_,{className:c.textField,placeholder:t||"",autoFocus:!1,fullWidth:!0,multiline:!0,variant:"outlined",margin:"dense",size:"small",inputRef:p,onChange:r,onCompositionEnd:s,value:e,onKeyDown:a,InputProps:{className:c.input},...l})});N.displayName="TextInput";let I=(0,v.n9)()({textField:{margin:0,"& fieldset":{borderRadius:40,borderColor:"white"}}
3,input:{background:"#F1F1F1",borderRadius:40}}),S=e=>{let t=e.split("\n");return t[t.length-1]},k=r.forwardRef(({placeholder:e,value:t,variant:n,rows:o,disabled:l,onChangeValue:m},h)=>{let g,{isOpenSuggest:f,openSuggest:v,closeSuggest:C}=(()=>{let[e,t]=(0,r.useState)(!1);return{isOpenSuggest:e,openSuggest:(0,r.useCallback)(()=>{t(!0)},[t]),closeSuggest:(0,r.useCallback)(()=>{t(!1)},[t])}})(),[b,x]=(0,r.useState)([]),{selectItemIndex:w,incrementSelectIndex:I,decrementSelectIndex:k}=(()=>{let[e,t]=(0,r.useState)(0);return{selectItemIndex:e,incrementSelectIndex:(0,r.useCallback)(()=>{t(e=>e>0?e-1:e)},[t]),decrementSelectIndex:(0,r.useCallback)(e=>{t(t=>t<e-1?t+1:t)},[t])}})(),Y=(g=(0,a.useDispatch)(),(0,r.useCallback)((e,t)=>{e&&!(e.length<1)&&g(d.tc.request({successCb:e=>{t((0,u.W)(e))},keyword:e.replace(/$@/,"").replace(/@/,"")}))},[g])),E=(0,r.useRef)(void 0);(0,r.useImperativeHandle)(h,()=>({focus:()=>{E.current?.focus()},scrollIntoView:e=>{E.current?.scrollIntoView(e)},caretTopPosition:()=>{let e=E.current;if(e)return p()(e,e.selectionEnd).top},getBoundingClientRectTop:()=>E.current?.getBoundingClientRect().top}));let F=(e,t)=>{let n=e.substring(0,t);if(!(n.indexOf(" ")>0||/ +/.test(n)))return n?.trim()??"";{let e=n.split(/\s| +/),t=e[e.length-1];return t?.trim()??""}},O=e=>{if(C(),!e||!E.current)return;let n=e.type===c.MENTION_ACCOUNT_TYPE.USER?e.accountName:e.groupName,i=E.current.selectionStart,o=t.substring(0,i),s=o.substring(0,Math.max(o.lastIndexOf("@"),o.lastIndexOf("@"))),r=t.substring(i,t.length);m(`${s}@${n}${r} `)};return(0,i.FD)("div",{className:"jsx-aef71ce0f0840308 mention",children:[f&&0!==b.length&&(0,i.Y)(y,{suggestions:b,onClick:e=>t=>{t.preventDefault(),O(e)},selectItemIndex:w,variant:n}),(0,i.Y)(N,{ref:E,rows:o,onChange:e=>{m(e.target.value);let t=e.target,n=t.selectionStart,i=F(t.value,n);/(@|@)/g.test(i)?(v(),Y(S(i).replace(/(@|@)/g,""),e=>{x(e)})):C()},onCompositionEnd:()=>{let e=E.current?.selectionStart;if(!e)return;let n=F(t,e);/(@|@)/g.test(n)?(v(),Y(S(n).replace(/(@|@)/g,""),e=>{x(e)})):C()},value:t,placeholder:e,onKeyDown:e=>{if(f)switch(e.keyCode){case 13:return void O(b[w]);case 38:e.preventDefault(),I();return;case 40:k(b.length)}},variant:n,disabled:l,"data-cy":"plain-text-editor"}),(0,i.Y)(s(),{id:"aef71ce0f0840308",children:".mention.jsx-aef71ce0f0840308{position:relative}"})]})});k.displayName="Mention"},43719:(e,t,n)=>{n.d(t,{D2:()=>o,FW:()=>s,do:()=>i});let i=["video/*"],o=["image/jpeg","image/png","image/gif","image/heif","image/heic",".heif",".heic"],s=["application/pdf","text/csv,application/octet-stream","application/zip,application/octet-stream,application/x-zip-compressed,multipart/x-zip","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]}}]);
4//# sourceMappingURL=8854-3f89f799bce3414e.js.map
5//# debugId=792b3bb3-4f3f-565e-a4c0-b3038a54fff0

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.