PageSourceSearch

https://uptrusting.com/_next/static/chunks/3999-ea748c41f383ae65.js

js uptrusting.com collected 2026-10-02 00:58:05 UTC 32,077 bytes, 1 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a92620ad-83ec-49b1-963c-95a08cf72978",e._sentryDebugIdIdentifier="sentry-dbid-a92620ad-83ec-49b1-963c-95a08cf72978")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3999],{1690:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(95155),a=r(9484),i=r(51570);function s({images:e,onChange:t,disabled:r=!1}){if(0===e.length)return null;let l=(r,n)=>{let a=r+n;if(a<0||a>=e.length)return;let i=[...e],[s]=i.splice(r,1);s&&(i.splice(a,0,s),t(i))};return(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((s,o)=>(0,n.jsxs)("div",{className:"group/thumb relative h-20 w-20 shrink-0 overflow-hidden rounded-md border border-border",children:[(0,n.jsx)(a.A,{src:(0,i.r3)(s._uploadCareFile_uuid,s._uploadCareFile_transforms),alt:`Attached image ${o+1}`,fill:!0,className:"object-cover",sizes:"80px"}),(0,n.jsxs)("div",{className:"absolute inset-x-0 top-0 flex items-center justify-between p-0.5 opacity-0 transition-opacity focus-within:opacity-100 group-hover/thumb:opacity-100",children:[e.length>1?(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("button",{type:"button",id:`attached-image-move-left-${s._uploadCareFile_uuid}`,onClick:()=>l(o,-1),disabled:r||0===o,"aria-label":"Move image earlier",title:"Move earlier",className:"rounded p-0.5 text-white bg-black/60 hover:bg-black/80 disabled:opacity-30",children:(0,n.jsx)("i",{className:"ph ph-caret-left text-xs"})}),(0,n.jsx)("button",{type:"button",id:`attached-image-move-right-${s._uploadCareFile_uuid}`,onClick:()=>l(o,1),disabled:r||o===e.length-1,"aria-label":"Move image later",title:"Move later",className:"rounded p-0.5 text-white bg-black/60 hover:bg-black/80 disabled:opacity-30",children:(0,n.jsx)("i",{className:"ph ph-caret-right text-xs"})})]}):(0,n.jsx)("span",{}),(0,n.jsx)("button",{type:"button",id:`attached-image-remove-${s._uploadCareFile_uuid}`,onClick:()=>{t(e.filter((e,t)=>t!==o))},disabled:r,"aria-label":"Remove image",title:"Remove",className:"rounded-full p-0.5 text-white bg-black/60 hover:bg-black/80 disabled:opacity-30",children:(0,n.jsx)("i",{className:"ph ph-x text-xs"})})]})]},s._uploadCareFile_uuid))})}},5397:(e,t,r)=>{r.d(t,{Mi:()=>l,OO:()=>i,e6:()=>a,nq:()=>s});var n=r(43697);let a=["title","url","content"];function i(e,t,r){let a=(0,n.CF)(`${t}-${r}`);return a===e[`${t}-${r}`]||"content"!==r&&""===a}function s(e,t){return a.every(r=>i(e,t,r))}function l(e,t,r,l){let o=a.map(t=>{let a=`${e}-${t}`;return{field:t,key:a,held:(0,n.CF)(a),record:r[a],landed:!1}});for(let e of o)e.landed=(0,n.iR)(e.key,t[e.field]),e.landed&&(r[e.key]=t[e.field]);let u=o.every(e=>e.landed)&&s(r,e);if(u||!l)return u;for(let t of o){if(!t.landed)continue;if(!i(r,e,t.field)){delete r[t.key];continue}let a=(0,n.iR)(t.key,t.held);a||(0,n.nr)(t.key),a&&void 0!==t.record?r[t.key]=t.record:delete r[t.key]}return!1}},6296:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(78340).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},6594:(e,t,r)=>{r.d(t,{R:()=>n});function n(e){return null===e||!0===e.visible?"Anyone on UpTrust can read this.":!1===e.visible?`Members of ${e.groupName} can read this.`:null}},14213:(e,t,r)=>{r.d(t,{E3:()=>u,HA:()=>c,M1:()=>f,Q_:()=>o,S0:()=>s,XE:()=>p,i3:()=>l,mn:()=>d});var n=r(66436),a=r(43697),i=r(58205);function s(e,t,r,n){let a=(0,i.RK)(t);return{type:"sendFailed",token:e,refused:!(0,i.d0)(t,r),landedAndGone:null!==a,goneIds:null===a?void 0:n(a)}}function l(){(0,n.newSnackbar)("Signed in as someone else","failure",{label:"Reload",onClick:()=>window.location.reload()})}function o(){null!==(0,a.C0)()?l():(0,n.newSnackbar)("Signed out in another tab","failure",{label:"Reload",onClick:()=>window.location.reload()})}function u(e,t){e.isRetired()||(0,a.N)()?o():e.tooOldToRetry(t)&&(0,n.newSnackbar)("Too old to send again safely: it may have sent already. Check above, then remove it.","failure")}function d(e){e.isRetired()||(0,a.N)()?o():(0,n.newSnackbar)("Couldn't remove it: this browser's storage isn't letting go. Try again.","failure")}function c(e){return"AppError_AuthError"===e.tag&&"AuthError_SignedInAsSomeoneElse"===e.contents}function p(e){return{type:"sendFailed",token:e,refused:!1,landedAndGone:!1}}function f(e,t,r){if(e.isRetired()){r&&o();return}e.dispatch({type:"sendFailed",token:t,refused:!0,landedAndGone:!1}),r&&e.get().pending.some(e=>e.token===t)&&(e.isKept(t)?(0,n.newSnackbar)("Sign in with your password, then Retry it here.","failure",{label:"Sign in",onClick:i.Qc}):(0,n.newSnackbar)("Sign in with your password, then Retry. This browser couldn't save the message: copy it first.","failure"))}},16590:(e,t,r)=>{r.d(t,{aj:()=>c,jv:()=>d,mb:()=>u});var n=r(95155),a=r(30658),i=r(60331),s=r(51570),l=r(71444),o=r(25869);let u=`Markdown (.md) or text (.txt), up to ${s.bT}.`;function d({ctxName:e,onUploaded:t,children:r}){let s=(0,i.n)();return(0,n.jsx)(a.A,{ctxName:e,ucPubKey:(0,l.iF)().uploadCarePubKey,customButton:!0,kind:"text",onUploadedDetails:e=>{let r=e[0];r&&(s("Text File Attached",{markdown:r.name.toLowerCase().endsWith(".md")}),t({uuid:r.uuid,filename:r.name,size:r.size}))},onUploadComplete:()=>{},children:r})}function c({file:e,onRemove:t,disabled:r=!1}){return(0,n.jsxs)("div",{"data-testid":"attached-text-file",className:"inline-flex max-w-full items-center gap-2 rounded-lg border border-border bg-muted/50 py-1.5 pl-2.5 pr-1",children:[(0,n.jsx)("i",{className:"ph ph-file-text shrink-0 text-lg text-muted-foreground","aria-hidden":"true"}),(0,n.jsx)("span",{className:"min-w-0 truncate text-sm text-foreground",children:e.filename}),e.size>0&&(0,n.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:(0,o.v)(e.size)}),(0,n.jsx)("button",{type:"button",id:"attached-text-file-remove-btn",onClick:t,disabled:r,"aria-label":"Remove file",title:"Remove file",className:"shrink-0 rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-30",children:(0,n.jsx)("i",{className:"ph ph-x text-xs"})})]})}},20566:(e,t,r)=>{r.d(t,{Ik:()=>i,XO:()=>
1o,cu:()=>u});var n=r(12115),a=r(35837);let i=(0,n.createContext)({count:0,refresh:()=>{}}),s="draft-count";function l(){try{let e=localStorage.getItem(s);if(null===e)return 0;let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}catch{return 0}}function o(){let[e,t]=(0,n.useState)(l),r=(0,n.useRef)(!0),i=(0,n.useCallback)(async()=>{try{let e=await a.CL.requestResult("/user/drafts/count","get");if(r.current&&e.success){t(e.data);try{localStorage.setItem(s,String(e.data))}catch{}}}catch{}},[]);return(0,n.useEffect)(()=>(r.current=!0,i(),()=>{r.current=!1}),[i]),{count:e,refresh:i}}function u(){return(0,n.useContext)(i)}},23511:(e,t,r)=>{r.d(t,{E:()=>i});var n=r(95155),a=r(91337);function i({className:e,...t}){return(0,n.jsx)("div",{className:(0,a.cn)("animate-pulse rounded-md bg-primary/10 motion-reduce:animate-none",e),...t})}},25777:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(78340).A)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},28277:(e,t,r)=>{r.d(t,{Rr:()=>s,Vg:()=>i,kH:()=>l,rj:()=>o});var n=r(99106),a=r(32528);function i(e){return`draft-${e._draftView_id}`}function s(e){return(0,a.kx)(`draft=${encodeURIComponent(e)}`)}function l(e){return e._draftView_editorHtml??(0,n.FN)(e._draftView_content._postContent_body)}function o(e){return e.split(/\s+/).filter(Boolean).length}},42580:(e,t,r)=>{r.d(t,{f:()=>i});var n=r(14213),a=r(58205);async function i(e,t,r,s,l,o,u,{home:d,tell:c}){let p={...o,_postChannelMessageInput_clientToken:l,_postChannelMessageInput_sentAs:u};try{let i=await e.requestResultWithPathParams("/user/groups/{group-id}/channels/{channel-id}/messages",{"group-id":r,"channel-id":s},"post",p);if(i.success)return t.dispatch({type:"sendSucceeded",token:l,row:{view:i.data}}),{kind:"sent",view:i.data};if((0,a.SC)(i.error))return(0,n.M1)(t,l,c),{kind:"held"};let o=(0,n.S0)(l,i.error,i.status,e=>d?[]:[e]);return t.dispatch(o),{kind:"refused",error:i.error,landedAndGone:o.landedAndGone,stillUnsent:t.get().pending.some(e=>e.token===l)}}catch{return t.dispatch((0,n.XE)(l)),{kind:"lost",stillUnsent:t.get().pending.some(e=>e.token===l)}}finally{t.releaseSend(l)}}},49726:(e,t,r)=>{r.d(t,{Fu:()=>l,Zc:()=>o,gK:()=>i,w5:()=>s});var n=r(79853),a=r(34407);function i(e){return(0,n.uz)({title:"",url:"",hasPoll:!1,imageCount:0,body:e})?e:""}function s(e,t){return(0,n.uz)({title:e,url:"",hasPoll:!1,imageCount:0,body:t})}function l(e){return e.replace(/\r\n?/g,"\n").split(/\n[ \t]*\n/).map(e=>e.replace(/^\n+|\n+$/g,"")).filter(e=>""!==e.trim()).map(e=>`<p>${e.split("\n").map(a.ZD).join("<br>")}</p>`).join("")}function o({target:e,groupId:t,channelId:r=null,imageUuids:n}){let{draftId:a}=e,i=new URLSearchParams;t&&i.set("group",t),t&&r&&i.set("channel",r),a&&i.set("draft",a),n.length>0&&i.set("images",n.join(","));let s=i.toString();return s?`/posts/new?${s}`:"/posts/new"}},52301:(e,t,r)=>{r.d(t,{h:()=>n});function n(e,t,r,n,a,i,s){let l=n.length>0?{tag:"PostImage_Uploaded",contents:n.map(e=>e._uploadCareFile_uuid)}:{tag:"PostImage_None"};return{_channelMessageView_channelId:e,_channelMessageView_post:{_postView_id:a,_postView_author:t,_postView_content:{_postContent_body:{tag:"TextContent_Raw",contents:r},...i?{_postContent_title:i}:{}},_postView_counts:{_commentCounts_immediateReplies:0,_commentCounts_totalReplies:0},_postView_createdAt:new Date().toISOString(),_postView_editable:!0,_postView_linkedContentCount:0,_postView_pinnedToProfile:!1,_postView_isMuted:!1,_postView_isBookmarked:!1,_postView_postImage:l,...s?{_postView_textFile:{_postTextFile_uuid:s.uuid,_postTextFile_filename:s.filename,_postTextFile_size:s.size}}:{},_postView_promoted:!1,_postView_canPromote:!1,_postView_netUpvotes:0,_postView_reactions:[],_postView_readStatus:"ReadStatus_Read",_postView_showOnBlog:!1,_postView_tags:[],_postView_vote:{tag:"VoteState_NoVote"}},_channelMessageView_trustEligible:!1}}},73108:(e,t,r)=>{r.d(t,{D1:()=>u,FP:()=>o,Gu:()=>d});var n=r(95155),a=r(30658),i=r(60331),s=r(51570),l=r(71444);let o=`MP4, WebM or MOV, up to ${s.SB} and ${s.J$} minutes.`;function u({ctxName:e,onUploaded:t,children:r}){let s=(0,i.n)();return(0,n.jsx)(a.A,{ctxName:e,ucPubKey:(0,l.iF)().uploadCarePubKey,customButton:!0,kind:"video",onUploadComplete:e=>{let r=e[0];r&&(s("Video Attached"),t(r._uploadCareFile_uuid))},children:r})}function d({uuid:e,onRemove:t,disabled:r=!1}){return(0,n.jsxs)("div",{className:"relative inline-block overflow-hidden rounded-md border border-border bg-black",children:[(0,n.jsx)("video",{"data-testid":"attached-video-preview",src:`${(0,s.f_)(e)}
1#t=0.1`,controls:!0,preload:"metadata",playsInline:!0,className:"block h-40 max-w-full"}),(0,n.jsx)("button",{type:"button",id:"attached-video-remove-btn",onClick:t,disabled:r,"aria-label":"Remove video",title:"Remove video",className:"absolute top-1 right-1 rounded p-1 text-white bg-black/60 hover:bg-black/80 disabled:opacity-30",children:(0,n.jsx)("i",{className:"ph ph-x text-xs"})})]})}},77088:(e,t,r)=>{r.d(t,{A:()=>m});var n=r(95155),a=r(94258),i=r(9484),s=r(36387);function l({data:e,url:t,rich:r,onDismiss:a}){var d;return(0,n.jsxs)("div",{className:"relative mt-2",children:[a&&(0,n.jsx)(u,{onClick:a}),(0,n.jsxs)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"flex w-full min-w-0 flex-col overflow-hidden rounded-2xl border-2 border-gray-300 bg-gray-100 p-3 dark:border-charcoal dark:bg-stormy",children:[(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[r.image&&(0,s.IL)(r.image)&&(0,n.jsx)("div",{className:"relative h-16 w-16 flex-shrink-0 overflow-hidden rounded-lg bg-gray-800 dark:bg-eleven-pm",children:(0,n.jsx)(i.A,{src:r.image,alt:r.title,fill:!0,sizes:"64px",className:"object-cover",unoptimized:!0})}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("p",{className:"mb-0.5 text-xs text-gray-600 dark:text-gray-500",children:e._previewData_siteName||"Polymarket"}),(0,n.jsx)("p",{className:"text-sm sm:text-base font-medium !line-clamp-2 break-words text-gray-900 dark:text-white",children:r.title})]})]}),r.outcomes.length>0&&(0,n.jsx)("ul",{className:"mt-3 space-y-1.5",children:r.outcomes.map(e=>(0,n.jsx)(o,{label:e.label,probability:e.probability},e.label))}),(0,n.jsxs)("div",{className:"mt-3 flex items-center justify-between text-xs text-gray-600 dark:text-gray-400",children:[null!=r.volume&&(0,n.jsxs)("span",{children:[(d=r.volume)>=1e9?`$${(d/1e9).toFixed(1)}B`:d>=1e6?`$${(d/1e6).toFixed(1)}M`:d>=1e3?`$${(d/1e3).toFixed(1)}K`:`$${Math.round(d)}`," Vol."]}),r.endDate&&(0,n.jsx)("span",{children:function(e){let t=new Date(e);if(isNaN(t.getTime()))return"";let r=new Date,n=Math.round((t.getTime()-r.getTime())/864e5);return n<0?"Resolved":0===n?"Resolves today":1===n?"Resolves tomorrow":n<30?`Resolves in ${n}d`:n<365?`Resolves in ${Math.round(n/30)}mo`:`Resolves in ${Math.round(n/365)}y`}(r.endDate)})]})]})]})}function o({label:e,probability:t}){let r=Math.round(100*t);return(0,n.jsxs)("li",{className:"flex items-center gap-2 text-sm",children:[(0,n.jsx)("span",{className:"min-w-0 flex-1 truncate text-gray-900 dark:text-white",children:e}),(0,n.jsx)("div",{className:"relative h-2 w-24 sm:w-32 overflow-hidden rounded-full bg-gray-300 dark:bg-charcoal",children:(0,n.jsx)("div",{className:"absolute inset-y-0 left-0 bg-blue-500 dark:bg-blue-400",style:{width:`${Math.min(100,Math.max(0,r))}%`}})}),(0,n.jsxs)("span",{className:"w-10 text-right font-medium tabular-nums text-gray-900 dark:text-white",children:[r,"%"]})]})}function u({onClick:e}){return(0,n.jsx)("button",{type:"button",onClick:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-3 top-3 z-10 flex h-6 w-6 items-center justify-center rounded-full bg-gray-800/60 text-white hover:bg-gray-800/80","aria-label":"Dismiss preview",children:(0,n.jsx)("i",{className:"ph ph-x text-sm"})})}var d=r(59570),c=r(23511),p=r(78186),f=r(34407);function m({data:e,loading:t,error:r,url:a,onDismiss:i}){if(t)return(0,n.jsx)(_,{...i&&{onDismiss:i}});if(r||!e)return null;let s=(0,d.e)(e._previewData_richData);if(s)return(0,n.jsx)(d.A,{data:e,url:a,rich:s,...i&&{onDismiss:i}});let o=function(e){if(!e)return null;try{let t=JSON.parse(e);if("polymarket"!==t.kind)return null;return t}catch{return null}}(e._previewData_richData);return o?(0,n.jsx)(l,{data:e,url:a,rich:o,...i&&{onDismiss:i}}):e._previewData_oEmbedHtml?(0,n.jsx)(g,{data:e,url:a,...i&&{onDismiss:i}}):(0,n.jsx)(h,{data:e,url:a,...i&&{onDismiss:i}})}function h({data:e,url:t,onDismiss:r}){return(0,n.jsxs)("div",{className:"group relative",children:[r&&(0,n.jsx)(w,{onClick:r}),(0,n.jsx)(a.A,{data:e,url:t})]})}function _({onDismiss:e}){return(0,n.jsxs)("div",{className:"relative mt-2 flex items-start gap-3.5 rounded-xl border border-border bg-card px-4 py-3.5",children:[e&&(0,n.jsx)(w,{onClick:e}),(0,n.jsx)(c.E,{className:"h-10 w-10 shrink-0 rounded-lg"}),(0,n.jsxs)("div",{className:"w-full space-y-2 pr-2",children:[(0,n.jsx)(c.E,{className:"h-3 w-24"}),(0,n.jsx)(c.E,{className:"h-4 w-3/4"}),(0,n.jsx)(c.E,{className:"h-3 w-full"})]})]})}function g({data:e,url:t,onDismiss:r}){let a=e._previewData_oEmbedHtml??"",i=(0,p.E)(a,t,e._previewData_providerName);return i?(0,n.jsxs)("div",{className:"group relative mt-2",children:[r&&(0,n.jsx)(w,{onClick:r}),(0,n.jsx)("div",{className:"w-full aspect-video overflow-hidden rounded-2xl border-2 border-gray-300 bg-gray-200 shadow-md dark:border-charcoal dark:bg-rainy",children:(0,n.jsx)("iframe",{width:"100%",height:"100%",src:i,title:(e._previewData_title?(0,f.jT)(e._previewData_title):null)||"Embedded content",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture;
1 web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0})})]}):(0,n.jsx)(h,{data:e,url:t,...r&&{onDismiss:r}})}function w({onClick:e}){return(0,n.jsx)("button",{type:"button",onClick:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute -right-2 -top-2 z-10 flex h-6 w-6 items-center justify-center rounded-full bg-gray-800/80 text-white opacity-0 shadow-sm transition-opacity hover:bg-gray-800 focus-visible:opacity-100 group-hover:opacity-100","aria-label":"Dismiss preview",children:(0,n.jsx)("i",{className:"ph ph-x text-sm"})})}},79853:(e,t,r)=>{function n({title:e,url:t,hasPoll:r,imageCount:a,hasVideo:i=!1,hasTextFile:s=!1,body:l}){return e.trim().length>0||t.trim().length>0||r||a>0||i||s||/<(img|iframe|video|figure|table)/i.test(l)||l.replace(/<[^>]*>/g,"").replace(/&nbsp;/gi," ").trim().length>0}r.d(t,{D2:()=>o,GG:()=>i,pW:()=>s,rJ:()=>a,uz:()=>n,w1:()=>l});let a="new-post";function i(e){return`${a}-channel-${e}`}function s(e,t,r){let n=t??r??null;return null===n?e:`${e}-draft-${n}`}function l(e,t){let r=new URLSearchParams(e);return r.set("draft",t),r.delete("images"),r.toString()}function o(e,t){return null!==t?"update":e?"create":"refuse-empty"}},82043:(e,t,r)=>{r.d(t,{Tf:()=>a,RE:()=>_,sB:()=>o,$N:()=>f,jZ:()=>s,r:()=>u,yR:()=>h,kP:()=>d});var n=r(49163);let a=50,i=e=>e.view._channelMessageView_post._postView_id,s={id:i,createdAt:e=>e.view._channelMessageView_post._postView_createdAt,windowed:!0};function l(e){let t=e?.view?._channelMessageView_post;return"object"==typeof e&&null!==e&&"string"==typeof e.input?._postChannelMessageInput_submission?._submission_body&&"object"==typeof t&&null!==t&&"string"==typeof t._postView_id&&"string"==typeof t._postView_createdAt&&"string"==typeof t._postView_author?._userHeader_name&&"object"==typeof t._postView_content?._postContent_body&&"string"==typeof t._postView_postImage?.tag&&"number"==typeof t._postView_counts?._
1commentCounts_totalReplies&&Array.isArray(t._postView_reactions)&&Array.isArray(t._postView_tags)}function o(e,t){return(0,n.Qb)(`channel:${e}`,t,s,l)}function u(e,t){return e.map(e=>{let r=t[e._channelMessageView_post._postView_id];return r?.edited===!0?{view:e,edited:!0}:{view:e}})}function d(e,t,r={}){let n=new Map(Object.entries(r).map(([e,t])=>[t,e]));return[...e.map(e=>{let t=n.get(i(e));if(void 0===t)return e;let r=c.get(e);if(r?.clientToken===t)return r;let a={...e,clientToken:t};return c.set(e,a),a}),...t.map(e=>{let t=p.get(e);if(void 0!==t)return t;let r={view:e.draft.view,clientToken:e.token,sendState:e.state,restored:e.restored,input:e.draft.input};return p.set(e,r),r})]}let c=new WeakMap,p=new WeakMap;function f(){(0,n.FZ)()}function m(e,t){return{...e,view:{...e.view,_channelMessageView_post:{...e.view._channelMessageView_post,...t}}}}function h(e,t,r=!1){return{type:"change",id:e,apply:e=>m(e,{_postView_reactions:t}),replay:r,kind:"reactions"}}function _(e,t,r){switch(e.kind){case"message":return{type:"live",row:{view:e.message},token:e.clientToken};case"edit":{let t=e.message._channelMessageView_post;return{type:"change",id:e.postId,apply:e=>({...m(e,{_postView_content:t._postView_content,_postView_postImage:t._postView_postImage,_postView_editable:t._postView_editable}),edited:!0}),replay:!0,kind:"edit"}}case"reaction":{var n;let r=(n=e.message._channelMessageView_post._postView_reactions,n.map(([e,r])=>[e,{...r,_reactionView_isSet:r._reactionView_reactors.some(e=>e._reactorView_username===t)}]));return h(e.postId,r,!0)}case"delete":return{type:"change",id:e.postId,apply:e=>({...e,deleted:!0}),replay:!0,kind:"delete"};case"converted":return{type:"remove",ids:[e.postId],keepOut:!r};case"reply":{let t=+(1===e.comment._commentView_depth);return{type:"change",id:e.rootMessageId,apply:e=>{let r=e.view._channelMessageView_post._postView_counts;return m(e,{_postView_counts:{...r,_commentCounts_totalReplies:r._commentCounts_totalReplies+1,_commentCounts_immediateReplies:r._commentCounts_immediateReplies+t}})},replay:!1}}case"replyDelete":{let t=e.removedCount??1;return{type:"change",id:e.rootMessageId,apply:e=>{let r=e.view._channelMessageView_post._postView_counts;return m(e,{_postView_counts:{...r,_commentCounts_totalReplies:Math.max(0,r._commentCounts_totalReplies-t)}})},replay:!1}}default:return null}}},85484:(e,t,r)=>{r.d(t,{M:()=>$});var n=r(12115),a=r(66436),i=r(47536),s=r(79853),l=r(97504),o=r(49726),u=r(5397),d=r(29405),c=r(20566),p=r(26481),f=r(14244),m=r(28277),h=r(38661),_=r(32528),g=r(35837),w=r(82043),b=r(42580),y=r(52301),v=r(14213),x=r(43697),k=r(61356),C=r(58205),S=r(34407),V=r(1377);class j extends Error{notice;constructor(e){super(e??"channel send refused"),this.notice=e}}function $({onSubmitSuccess:e,onSubmitError:t,groupId:r=null,channelId:N=null,proposeToGroup:R=null,onProposalSuccess:M,bridgeRequestId:F,draft:P=null,initialTitle:I=null,initialImages:D,editorId:T,draftPrefix:A,requestedDraftId:E,reopensSavedDraft:U=!1,onDirtyChange:z,onDraftCreated:O}){let[L,W]=(0,n.useState)(""),[H,B]=(0,n.useState)(""),[G,q]=(0,n.use
1State)(""),[K,Q]=(0,n.useState)(_.tI),[J,Z]=(0,n.useState)([]),[X,Y]=(0,n.useState)(null),[ee,et]=(0,n.useState)(null),[er,en]=(0,n.useState)(null),[ea,ei]=(0,n.useState)(""),[es,el]=(0,n.useState)(!1),[eo,eu]=(0,n.useState)(!1),[ed,ec]=(0,n.useState)(!1),[ep,ef]=(0,n.useState)(!1),em=(0,n.useRef)(!1),[eh,e_]=(0,n.useState)(P?._draftView_id??null),eg=(0,n.useRef)(null),ew=(0,n.useRef)(0),[eb,ey]=(0,n.useState)(null),[ev,ex]=(0,n.useState)(null),[ek,eC]=(0,n.useState)(new Set),eS=(0,n.useRef)(null),eV=(0,n.useRef)({}),ej=(0,n.useRef)(null),e$=(0,n.useRef)(null),eN=(0,n.useRef)(L),eR=(0,n.useRef)(H),eM=(0,n.useRef)(G),eF=(0,n.useRef)(ek);(0,n.useEffect)(()=>{eN.current=L,eR.current=H,eM.current=G},[L,H,G]),(0,n.useEffect)(()=>{eF.current=ek},[ek]);let{refresh:eP}=(0,c.cu)(),eI=(0,p.L)(eb),eD=(0,p.L)(ev),{mixpanel:eT}=(0,k.o)(),eA=(0,s.uz)({title:L,url:H,hasPoll:null!==er,imageCount:J.length,hasVideo:null!==X,hasTextFile:null!==ee,body:G});(0,n.useEffect)(()=>{z?.(eA)},[eA,z]);let eE=(0,s.pW)(A,U?eh:null,E),eU=(0,n.useRef)(eE);eU.current=eE;let ez=(e,t)=>(0,u.OO)(eV.current,e,t),eO=e=>(0,u.nq)(eV.current,e),eL=(e,t)=>{let r=ej.current??eU.current;r===eU.current||eO(r)||eW();let n=e$.current;null===n||n===(ej.current??eU.current)||eO(n)||eH();let a=[ej.current??eU.current];for(let r of(null!==e$.current&&e$.current!==a[0]&&a.push(e$.current),a))(0,x.iR)(`${r}-${e}`,t)&&(eV.current[`${r}-${e}`]=t)},eW=()=>{let e=ej.current;if(ej.current=null,null===e||e===eU.current)return;e$.current=e,eO(e)||eH();let t=[["title",eN.current],["url",eR.current],["content",(0,d.VS)(T)??eM.current]];for(let[e,r]of t)eL(e,r);t.some(([,e])=>""!==e)&&(em.current=!0)},eH=()=>{let e=e$.current;if(e$.current=null,null!==e)for(let t of u.e6){let r=`${e}-${t}`;ez(e,t)&&(0,x.nr)(r),delete eV.current[r]}},eB=e=>{(0,x.nr)(e),delete eV.current[e]},eG=(e,t)=>{ew.current++,ep&&(""!==t&&(em.current=!0),eL(e,t))},eq=e=>{W(e),eN.current=e,eG("title",e)},eK=e=>{q(e),eM.current=e,eG("content",e),eS.current&&clearTimeout(eS.current),eS.current=setTimeout(()=>{let t=function(e){let t,r=/href=["'](https?:\/\/[^"']+)["']/gi,n=[];for(;null!==(t=r.exec(e));)t[1]&&n.push(t[1]);return[...new Set(n)]}(e),r=eR.current.trim(),n=eF.current;ex(t.find(e=>e!==r&&!n.has(e))??null)},500)},eQ=(0,i.ck)().loggedInEnv?.loggedInUser._userView_header,eJ=async e=>{if(r&&N){let t;if(void 0===eQ)throw new j("Sign in to post.");let n=(0,w.sB)(N,eQ._userHeader_id),a={_postChannelMessageInput_submission:e},i=JSON.stringify(e),s=e=>JSON.stringify(e.input._postChannelMessageInput_submission)===i,l=n.get().pending.find(e=>s(e.draft));if(l?.state==="sending")throw new j("This is still being sent. Check the channel in a moment.");if(void 0!==l){if(null===(t=null===n.retrySend(l.token)?null:l.token)){if(n.isRetired()||(0,x.N)())throw(0,v.Q_)(),new j(null);throw new j(n.tooOldToRetry(l.token)?"This may have posted already, and is too old to send again safely. Check the channel, and remove it there to post these words again.":"This was just sent or removed in another tab. Check the channel before posting it again.")}}else if(n.takeSettled(s))throw new j("This may be in the channel already. Check it, then Post again to send it as a new message.");else if(null===(t=n.beginSend(t=>({input:a,view:(0,y.h)(N,eQ,(0,S.QZ)(e._submission_body),[],t,e._submission_title)}))))throw(0,v.Q_)(),new j(null);let o=await (0,b.f)(g.CL,n,r,N,t,a,eQ._userHeader_id,{home:!1,tell:!1});if("sent"===o.kind)return{success:!0,data:o.view._channelMessageView_post};if("refused"===o.kind)return{success:!1,error:o.error,status:0};throw new j("held"===o.kind?"Sign in with your password, then post the same words again.":"The answer never came: it may have posted. Post the same words again to check; they won't post twice.")}let t=new URLSearchParams;return r&&t.append("group-id",r),F&&t.append("bridge-request-id",F),await g.CL.requestResult("/user/posts","post",e,t)},eZ=async()=>{if(ed)return;if(eW(),null!==X)return void(0,a.newSnackbar)("Drafts can't hold a video yet. Post it now, or remove the video to save.","failure");if(null!==ee)return void(0,a.newSnackbar)("Drafts can't hold a file yet. Post it now, or remove the file to save.","failure");let e=(0,d.VS)(T)??G,t=(0,s.uz)({title:L,url:H,hasPoll:null!==er,imageCount:J.length,body:e});if("refuse-empty"===(0,s.D2)(t,eh))return void(0,a.newSnackbar)("Nothing to save yet","failure");ec(!0);let n=(0,_.WL)(J,K),i={_submission_format:"Html",...L?{_submission_title:L}:{},...H?{_submission_url:H}:{},_submission_body:e,_submission_images:n},l=new URLSearchParams;r&&l.append("group-id",r);let o=ew.current,c=()=>{let t=(0,d.VS)(T);return null!==t&&t!==e},p=t=>{let r=(0,d.VS)(T);if(null!==r)return r===e?null:r;let n=(0,x.CF)(t),a=eV.current[t];return""!==n&&n===a&&n!==e?n:null};try{if(eh)if((await g.CL.requestResultWithPathParams("/user/drafts/{draft
1-id}",{"draft-id":eh},"put",i,l)).success){if(ew.current!==o||c()){let e=`${eE}-content`,t=p(e);null!==t?(0,x.iR)(e,t)?eV.current[e]=t:delete eV.current[e]:eB(e),em.current=!0}else{for(let e of u.e6)eB(`${eE}-${e}`);em.current=!1}(0,a.newSnackbar)("Draft updated","success"),eP()}else(0,a.newSnackbar)("Failed to update draft","failure");else{let e=await g.CL.requestResult("/user/drafts","post",i,l);if(e.success){let t=e.data._draftView_id;if(ew.current!==o||c()){let e=[["title",eN.current],["url",eR.current],["content",p(`${eU.current}-content`)??""]],r=U?`${A}-draft-${t}`:eU.current;for(let[t,n]of e){let e=!1;if(n&&(0,x.iR)(`${r}-${t}`,n)&&(eV.current[`${r}-${t}`]=n,e=!0),r===eU.current||n&&!e)continue;let a=`${eU.current}-${t}`,i=(0,x.CF)(a);""!==i&&i===eV.current[a]&&eB(a)}em.current=!0}else{for(let e of u.e6)eB(`${eE}-${e}`);em.current=!1}eg.current=t,e_(t),(0,a.newSnackbar)("Draft saved","success"),eP(),O?.(e.data)}else(0,a.newSnackbar)("Failed to save draft","failure")}}catch{(0,a.newSnackbar)("Failed to save draft","failure")}finally{ec(!1)}},eX=async()=>{if(eh)try{await g.CL.requestResultWithPathParams("/user/drafts/{draft
1-id}",{"draft-id":eh},"delete"),e_(null)}catch(e){console.warn("Failed to delete draft after posting:",e)}},eY=()=>{for(let e of(eW(),eH(),W(""),B(""),q(""),ei(""),Z([]),Y(null),et(null),en(null),ey(null),ex(null),eC(new Set),(0,d.SQ)(T),u.e6))eB(`${eE}-${e}`);em.current=!1},e0=async()=>{if(eo)return!1;eW();let n=(0,d.VS)(T)??G;if(H.trim()){let e=(0,V.wN)(H);if(!e.valid)return ei(e.error),t?.(e.error),!1}let i=(0,V.$9)(H,n);if(!i.isValid){let e=i.errorMsg||"";return ei(e),t?.(e),!1}if(er){let e=(0,h.Pl)(er);if(e)return ei(e),t?.(e),!1}if(ei(""),el(!1),eu(!0),R){try{let e=await g.CL.requestResultWithPathParams("/user/groups/{group-id}/proposals",{"group-id":R.groupId},"post",{tag:"Payload_PostAsGroup",...""!==L.trim()&&{_payloadPost_title:L.trim()},_payloadPost_body:n,...""!==H.trim()&&{_payloadPost_url:H.trim()},_payloadPost_tags:[]});if(e.success)return eT.track("Proposal Created",{groupId:R.groupId,proposalId:e.data,actionType:"post_as_group"}),await eX(),eP(),eY(),(0,a.newDelayedSnackbar)(`Proposed to ${R.groupName}.`,"success"),M?.(e.data),!0;{let r=(0,C.EC)(e.error);ei(r),t?.(r),(0,a.newSnackbar)(r,"failure"),eu(!1)}}catch(r){console.error("Error creating proposal:",r);let e="Failed to create the proposal.";ei(e),t?.(e),(0,a.newSnackbar)(e,"failure"),eu(!1)}return!1}eT.track("post submitted",{groupId:r||"none",imageCount:K===_.TU?J.length:0});let s=(0,_.WL)(J,K);try{let i={_submission_format:"Html",...L&&{_submission_title:L},...H&&{_submission_url:H},_submission_body:n,_submission_images:s,...er&&{_submission_poll:(0,h.c_)(er)},...X&&{_submission_video:(0,_.v6)(X)},...ee&&{_submission_textFile:(0,_.dm)(ee.uuid)}},o=await eJ(i);if(o.success){let t=o.data._postView_id;return er&&eT.track("Poll Created",{postId:t,optionCount:(0,h.c_)(er)._pollSubmission_options.length,durationDays:er.durationDays,trustedNetworkOnly:er.trustedNetworkOnly}),await eX(),eP(),eY(),(0,f.Tz)(),(0,a.newDelayedSnackbar)(`Posted. You can edit for ${l.G}.`,"success"),e?.(t),!0}if(r&&(0,C.dX)(o.error))el(!0),eu(!1);else{let e=(0,C.EC)(o.error);ei(e),t?.(e),(0,a.newSnackbar)(e,"failure"),eu(!1)}}catch(r){if(r instanceof j&&null===r.notice)return eu(!1),!1;console.error("Error submitting post:",r);let e=r instanceof j&&null!==r.notice?r.notice:"Failed to submit post.";ei(e),t?.(e),(0,a.newSnackbar)(e,"failure"),eu(!1)}return!1};return(0,n.useEffect)(()=>{if(!P||P._draftView_id!==eg.current){if(P){let e=P._draftView_content,t=(0,x.CF)(`${eE}-title`),r=(0,x.CF)(`${eE}-url`),n=(0,x.CF)(`${eE}-content`),a=e._postContent_title??"",i=e._postContent_url??"",s=(0,m.kH)(P);W(t||a),B(r||i),q(n||s),(t&&t!==a||r&&r!==i||n&&n!==s)&&(em.current=!0),t&&(eV.current[`${eE}-title`]=t),r&&(eV.current[`${eE}-url`]=r),n&&(eV.current[`${eE}-content`]=n),D&&D.length>0?(Z(D.map(e=>({_uploadCareFile_uuid:e,_uploadCareFile_transforms:""}))),Q(_.TU)):(Q((0,_.hL)(P._draftView_draftImage)),"PostImage_Uploaded"===P._draftView_draftImage.tag&&Z(P._draftView_draftImage.contents.map(e=>({_uploadCareFile_uuid:e,_uploadCareFile_transforms:""}))))}else{let e=(0,x.CF)(`${eE}-title`),t=(0,x.CF)(`${eE}-url`),r=(0,x.CF)(`${eE}-content`);e||t||r?(W(e),B(t),q(r),em.current=!0,e&&(eV.current[`${eE}-title`]=e),t&&(eV.current[`${eE}-url`]=t),r&&(eV.current[`${eE}-content`]=r)):I&&W(I),D&&D.length>0&&(Z(D.map(e=>({_uploadCareFile_uuid:e,_uploadCareFile_transforms:""}))),Q(_.TU))}ef(!0)}},[A,E,P?._draftView_id,I]),(0,n.useEffect)(()=>()=>{eS.current&&clearTimeout(eS.current)},[]),{title:L,setTitleWithDraft:eq,url:H,setUrlWithDraft:e=>{B(e),eR.current=e,eG("url",e)},handleUrlBlur:()=>{let e=(0,V.wN)(H);if(e.valid){ei("");let e=H.trim();e&&!ek.has(e)?ey(e):ey(null)}else ei(e.error),ey(null)},body:G,setBodyWithDraft:eK,imageChoice:K,setImageChoice:Q,attachedImages:J,setAttachedImages:Z,attachedVideo:X,setAttachedVideo:Y,attachedTextFile:ee,setAttachedTextFile:et,pollDraft:er,setPollDraft:en,togglePoll:()=>{(0,d.jO)(T);let e=!er,t=(0,d.VS)(T)??G;if(e&&eN.current.trim()){let e=""!==(0,o.gK)(t),r=`<p>${(0,S.ZD)(eN.current)}</p>`;eK(e?`${r}${t}`:r),eq("")}else eK(t);en(e=>e?null:(0,h.S7)())},error:ea,showJoinPrompt:es,setShowJoinPrompt:el,isDirty:eA,isSubmitting:eo,isSavingDraft:ed,savedDraftId:eh,hasDraftedLocally:em,previewUrl:eb,urlPreview:eI,dismissUrlPreview:()=>{null!==eb&&(eC(e=>new Set(e).add(eb)),ey(null))},bodyPreviewUrl:ev,bodyUrlPreview:eD,dismissBodyPreview:()=>{null!==ev&&(eC(e=>new Set(e).add(ev)),ex(null))},submitForm:e0,saveDraftApi:eZ,resetForm:eY,beginHandoff:()=>{let e=eh??E??null,t=(0,s.pW)(s.rJ,e),r=(0,o.gK)((0,d.VS)(T)??eM.current),n=(0,o.w5)(eN.current,r);e$.current===t&&n||eH();let a=!1;if(n){let e=t===eU.current;if((a=(0,u.Mi)(t,{title:eN.current,url:eR.current,content:r},eV.current,!e))&&!e)for(let e of(e$.current=t,u.e6))eB(`${eU.current}-${e}`)}return ej.current=a?t:null,(0,d.jO)(T),{draftId:e}},isHydrated:ep}}},93164:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(78340).A)("lock-open",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]])},97504:(e,t,r)=>{r.d(t,{G:()=>n});let n="the next hour"}}]);

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.