1!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._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0f533-44fe-7252-8459-157718144fea")}catch(e){}}();;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="edb3e5e0-a01e-fe6d-44bc-1cdefeca6599")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,549837,515848,e=>{"use strict";var t=e.i(947500),r=e.i(294237),a=e.i(78829),s=e.i(237355),i=e.i(543836),o=e.i(657941),n=e.i(822566),l=Object.defineProperty,u=s.forwardRef(l(function(e,r){let{pressed:a,defaultPressed:s,onPressedChange:l,...u}=e,[d,c]=(0,o.useControllableState)({prop:a,onChange:l,defaultProp:s??!1,caller:"Toggle"});return(0,t.jsx)(n.Primitive.button,{type:"button","aria-pressed":d,"data-state":d?"on":"off","data-disabled":e.disabled?"":void 0,...u,ref:r,onClick:(0,i.composeEventHandlers)(e.onClick,()=>{e.disabled||c(!d)})})},"name",{value:"Toggle",configurable:!0}));e.s(["Root",0,u,"Toggle",0,u],515848);var d=e.i(515848),d=d;let c=(0,r.cva)("group/toggle inline-flex items-center justify-center gap-1 rounded-4xl text-sm font-medium whitespace-nowrap transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted"},size:{default:"h-9 min-w-9 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",sm:"h-8 min-w-8 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",lg:"h-10 min-w-10 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3"}},defaultVariants:{variant:"default",size:"default"}});e.s(["Toggle",0,({className:e,variant:r="default",size:s="default",...i})=>(0,t.jsx)(d.Root,{"data-slot":"toggle",className:(0,a.cn)(c({variant:r,size:s,className:e})),...i}),"toggleVariants",0,c],549837)},807103,e=>{"use strict";var t=e.i(947500),r=e.i(237355),a=e.i(78829),s=e.i(711926),i=e.i(822566),o=e.i(670555),n=e.i(515848),l=e.i(657941),u=e.i(524916),d=Object.defineProperty,c=(e,t)=>d(e,"name",{value:t,configurable:!0}),p="ToggleGroup",[g,m]=(0,s.createContextScope)(p,[o.createRovingFocusGroupScope]),f=(0,o.createRovingFocusGroupScope)(),h=r.forwardRef(c(function(e,r){let{type:a,...s}=e;if("single"===a)return(0,t.jsx)(x,{role:"radiogroup",...s,ref:r});if("multiple"===a)return(0,t.jsx)(y,{role:"toolbar",...s,ref:r});throw Error(`Missing prop \`type\` expected on \`${p}\``)},"ToggleGroup")),[v,b]=g(p),x=r.forwardRef(c(function(e,a){let{value:s,defaultValue:i,onValueChange:o=c(()=>{},"onValueChange"),...n}=e,[u,d]=(0,l.useControllableState)({prop:s,defaultProp:i??"",onChange:o,caller:p});return(0,t.jsx)(v,{scope:e.__scopeToggleGroup,type:"single",value:r.useMemo(()=>u?[u]:[],[u]),onItemActivate:d,onItemDeactivate:r.useCallback(()=>d(""),[d]),children:(0,t.jsx)(k,{...n,ref:a})})},"ToggleGroupImplSingle")),y=r.forwardRef(c(function(e,a){let{value:s,defaultValue:i,onValueChange:o=c(()=>{},"onValueChange"),...n}=e,[u,d]=(0,l.useControllableState)({prop:s,defaultProp:i??[],onChange:o,caller:p}),g=r.useCallback(e=>d((t=[])=>[...t,e]),[d]),m=r.useCallback(e=>d((t=[])=>t.filter(t=>t!==e)),[d]);return(0,t.jsx)(v,{scope:e.__scopeToggleGroup,type:"multiple",value:u,onItemActivate:g,onItemDeactivate:m,children:(0,t.jsx)(k,{...n,ref:a})})},"ToggleGroupImplMultiple")),[I,R]=g(p),k=r.forwardRef(c(function(e,r){let{__scopeToggleGroup:a,disabled:s=!1,rovingFocus:n=!0,orientation:l,dir:d,loop:c=!0,...p}=e,g=f(a),m=(0,u.useDirection)(d),h={dir:m,...p};return(0,t.jsx)(I,{scope:a,rovingFocus:n,disabled:s,children:n?(0,t.jsx)(o.Root,{asChild:!0,...g,orientation:l,dir:m,loop:c,children:(0,t.jsx)(i.Primitive.div,{...h,ref:r})}):(0,t.jsx)(i.Primitive.div,{...h,ref:r})})},"ToggleGroupImpl")),w="ToggleGroupItem",j=r.forwardRef(c(function(e,a){let s=b(w,e.__scopeToggleGroup),i=R(w,e.__scopeToggleGroup),n=f(e.__scopeToggleGroup),l=s.value.includes(e.value),u=i.disabled||e.disabled,d={...e,pressed:l,disabled:u},c=r.useRef(null);return i.rovingFocus?(0,t.jsx)(o.Item,{asChild:!0,...n,focusable:!u,active:l,ref:c,children:(0,t.jsx)(S,{...d,ref:a})}):(0,t.jsx)(S,{...d,ref:a})},"ToggleGroupItem")),S=r.forwardRef(c(function(e,r){let{__scopeToggleGroup:a,value:s,...i}=e,o=b(w,a),l={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},u="single"===o.type?l:void 0;
2return(0,t.jsx)(n.Toggle,{...u,...i,ref:r,onPressedChange:e=>{e?o.onItemActivate(s):o.onItemDeactivate(s)}})},"ToggleGroupItemImpl"));e.s(["Item",0,j,"Root",0,h,"ToggleGroup",0,h,"ToggleGroupItem",0,j,"createToggleGroupScope",0,m],759680);var P=e.i(759680),P=P,C=e.i(549837);let M=r.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});e.s(["ToggleGroup",0,({className:e,variant:r,size:s,spacing:i=2,orientation:o="horizontal",children:n,...l})=>(0,t.jsx)(P.Root,{"data-slot":"toggle-group","data-variant":r,"data-size":s,"data-spacing":i,"data-orientation":o,style:{"--gap":i},className:(0,a.cn)("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] data-[spacing=0]:data-[variant=outline]:rounded-4xl data-vertical:flex-col data-vertical:items-stretch",e),...l,children:(0,t.jsx)(M.Provider,{value:{variant:r,size:s,spacing:i,orientation:o},children:n})}),"ToggleGroupItem",0,({className:e,children:s,variant:i="default",size:o="default",...n})=>{let l=r.useContext(M);return(0,t.jsx)(P.Item,{"data-slot":"toggle-group-item","data-variant":l.variant||i,"data-size":l.size||o,"data-spacing":l.spacing,className:(0,a.cn)("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-3 group-data-[spacing=0]/toggle-group:shadow-none focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-2.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-2.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-3xl group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-3xl group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-3xl group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-3xl data-[state=on]:bg-muted group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",(0,C.toggleVariants)({variant:l.variant||i,size:l.size||o}),e),...n,children:s})}],807103)},767841,e=>{"use strict";var t=e.i(947500),r=e.i(78829),a=e.i(237355),s=e.i(543836),i=e.i(165542),o=e.i(711926),n=e.i(822566),l=e.i(670555),u=e.i(657941),d=e.i(524916),c=e.i(980325),p=e.i(983164),g=Object.defineProperty,m=(e,t)=>g(e,"name",{value:t,configurable:!0}),f="Radio",[h,v]=(0,o.createContextScope)(f),[b,x]=h(f);function y(e){let{__scopeRadio:r,checked:s=!1,children:i,disabled:o,form:n,name:l,onCheck:u,required:d,value:c="on",internal_do_not_use_render:p}=e,[g,f]=a.useState(null),[h,v]=a.useState(null),x=a.useRef(!1),[y,I]=a.useReducer(e=>e+1,0),R=!g||!!n||!!g.closest("form"),k={checked:s,disabled:o,required:d,name:l,form:n,value:c,control:g,setControl:f,hasConsumerStoppedPropagationRef:x,userInteractionCount:y,onUserInteraction:I,isFormControl:R,bubbleInput:h,setBubbleInput:v,onCheck:m(()=>u?.(),"onCheck")};return(0,t.jsx)(b,{scope:r,...k,children:w(p)?p(k):i})}m(y,"RadioProvider");var I=a.forwardRef(m(function({__scopeRadio:e,onClick:r,...a},o){let{checked:l,disabled:u,value:d,setControl:c,onCheck:p,hasConsumerStoppedPropagationRef:g,onUserInteraction:m,isFormControl:f,bubbleInput:h}=x("RadioTrigger",e),v=(0,i.useComposedRefs)(o,c);return(0,t.jsx)(n.Primitive.button,{type:"button",role:"radio","aria-checked":l,"data-state":j(l),"data-disabled":u?"":void 0,disabled:u,value:d,...a,ref:v,onClick:(0,s.composeEventHandlers)(r,e=>{l||(m(),p()),h&&f&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())})})},"RadioTrigger")),R=a.forwardRef(m(function(e,r){let{__scopeRadio:a,forceMount:s,...i}=e,o=x("RadioIndicator",a);return(0,t.jsx)(p.Presence,{present:s||o.checked,children:(0,t.jsx)(n.Primitive.span,{"data-state":j(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:r})})},"RadioIndicator")),k=a.forwardRef(m(function({__scopeRadio:e,onClick:r,...o},l){let{control:u,checked:d,required:p,disabled:g,name:m,value:f,form:h,bubbleInput:v,setBubbleInput:b,hasConsumerStoppedPropagationRef:y,userInteractionCount:I}=x("RadioBubbleInput",e),R=(0,i.useComposedRefs)(l,b),k=(0,c.useSize)(u),w=a.useRef(!1),j=a.useRef(d),S=a.useRef(I);a.useEffect(()=>{if(!v)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=I!==S.current;S.current=I;let r=j.current!==d;j.current=d;let a=!(t&&y.current);if(r&&e){w.current=!t;let r=new Event("click",{bubbles:a});e.call(v,d),v.dispatchEvent(r),w.current=!1}},[v,d,y,I]);let P=a.useRef(d);return(0,t.jsx)(n.Primitive.input,{type:"radio","aria-hidden":!0,defaultChecked:P.current,required:p,disabled:g,name:m,value:f,form:h,...o,tabIndex:-1,ref:R,onClick:(0,s.composeEventHandlers)(r,e=>{w.current&&e.stopPropagation()}),style:{...o.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"RadioBubbleInput"));function w(e){return"function"==typeof e}function j(e){return e?"checked":"unchecked"}m(w,"isFunction"),m(j,"getState");var S=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],P="RadioGroup",[C,M]=(0,o.createContextScope)(P,[l.createRovingFocusGroupScope,v]),T=(0,l.createRovingFocusGroupScope)(),A=v(),[G,F]=C(P),E=a.forwardRef(m(function(e,r){let{__scopeRadioGroup:s,name:o,form:c,defaultValue:p,value:g,required:f=!1,disabled:h=!1,orientation:v,dir:b,loop:x=!0,onValueChange:y,...I}=e,R=T(s),k=(0,d.useDirection)(b),[w,j]=(0,u.useControllableState)({prop:g,defaultProp:p??null,onChange:y,caller:P}),[S,C]=a.useState(null),M=(0,i.useComposedRefs)(r,C),A=a.useRef(w);return a.useEffect(()=>{let e=c?S?.ownerDocument.getElementById(c):S?.closest("form");if(e instanceof HTMLFormElement){let t=m(()=>j(A.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[S,c,j]),(0,t.jsx)(G,{scope:s,name:o,form:c,required:f,disabled:h,value:w,onValueChange:j,children:(0,t.jsx)(l.Root,{asChild:!0,...R,orientation:v,dir:k,loop:x,children:(0,t.jsx)(n.Primitive.div,{role:"radiogroup","aria-required":f,"aria-orientation":v,"data-disabled":h?"":void 0,dir:k,...I,ref:M})})})},"RadioGroup"));function N(e){let{__scopeRadioGroup:r,value:a,disabled:s,children:i,internal_do_not_use_render:o}=e,n=F("RadioGroupItemProvider",r),l=A(r),u=n.disabled||s;return(0,t.jsx)(y,{...l,checked:n.value===a,disabled:u,required:n.required,name:n.name,form:n.form,value:a,onCheck:()=>n.onValueChange(a),internal_do_not_use_render:o,children:i})}m(N,"RadioGroupItemProvider");var z=a.forwardRef(m(function(e,r){let{__scopeRadioGroup:o,...n}
2=e,u=T(o),d=A(o),{checked:c,disabled:p}=x("RadioGroupItemTrigger",d.__scopeRadio),g=a.useRef(null),f=(0,i.useComposedRefs)(r,g),h=a.useRef(!1);return a.useEffect(()=>{let e=m(e=>{S.includes(e.key)&&(h.current=!0)},"handleKeyDown"),t=m(()=>h.current=!1,"handleKeyUp");return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),(0,t.jsx)(l.Item,{asChild:!0,...u,focusable:!p,active:c,children:(0,t.jsx)(I,{...d,...n,ref:f,onKeyDown:(0,s.composeEventHandlers)(n.onKeyDown,e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:(0,s.composeEventHandlers)(n.onFocus,()=>{h.current&&g.current?.click()})})})},"RadioGroupItemTrigger")),O=a.forwardRef(m(function(e,r){let{__scopeRadioGroup:a,value:s,disabled:i,...o}=e;return(0,t.jsx)(N,{__scopeRadioGroup:a,value:s,disabled:i,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(z,{...o,ref:r,__scopeRadioGroup:a}),e&&(0,t.jsx)(_,{__scopeRadioGroup:a})]})})},"RadioGroupItem")),_=a.forwardRef(m(function(e,r){let{__scopeRadioGroup:a,...s}=e,i=A(a);return(0,t.jsx)(k,{...i,...s,ref:r})},"RadioGroupItemBubbleInput")),L=a.forwardRef(m(function(e,r){let{__scopeRadioGroup:a,...s}=e,i=A(a);return(0,t.jsx)(R,{...i,...s,ref:r})},"RadioGroupIndicator"));e.s(["Indicator",0,L,"Item",0,O,"RadioGroup",0,E,"RadioGroupIndicator",0,L,"RadioGroupItem",0,O,"Root",0,E,"createRadioGroupScope",0,M,"unstable_ItemBubbleInput",0,_,"unstable_ItemProvider",0,N,"unstable_ItemTrigger",0,z,"unstable_RadioGroupItemBubbleInput",0,_,"unstable_RadioGroupItemProvider",0,N,"unstable_RadioGroupItemTrigger",0,z],331359);var D=e.i(331359),D=D;e.s(["RadioGroup",0,({className:e,...a})=>(0,t.jsx)(D.Root,{"data-slot":"radio-group",className:(0,r.cn)("grid w-full gap-3",e),...a}),"RadioGroupItem",0,({className:e,...a})=>(0,t.jsx)(D.Item,{"data-slot":"radio-group-item",className:(0,r.cn)("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",e),...a,children:(0,t.jsx)(D.Indicator,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:(0,t.jsx)("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground"})})})],767841)},784995,439414,e=>{"use strict";e.i(452824);var t=e.i(947500),r=e.i(648646),a=e.i(430986),s=e.i(534792),i=e.i(78829);let o=({className:e,count:a})=>(0,t.jsxs)("div",{className:(0,i.cn)("mt-2 flex min-w-0 items-center gap-2",e),"data-slot":"post-skeleton-contributors",children:[(0,t.jsx)(r.AvatarStackSkeleton,{count:a,className:"shrink-0 [&_[data-slot=skeleton]]:animate-none [&_[data-slot=skeleton]]:bg-muted"}),(0,t.jsx)(s.Skeleton,{className:(0,i.cn)("h-2.5",2===a?"w-20":"w-28"),"data-slot":"post-skeleton-meta"})]});e.s(["PostSkeleton",0,({hasImage:e=!1,hero:r=!1,size:i="default",...n})=>{let l="sm"===i,u=e&&r&&!l;return(0,t.jsxs)(a.Item,{...n,"aria-hidden":"true","data-post-skeleton":!0,"data-has-image":e||void 0,"data-hero":u||void 0,size:l?"sm":"default",children:[(0,t.jsxs)(a.ItemContent,{children:[(0,t.jsx)(s.Skeleton,{className:"h-4 w-3/4","data-slot":"post-skeleton-title"}),u?null:(0,t.jsx)(o,{count:l?2:3})]}),u?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.ItemFooter,{children:(0,t.jsx)(a.ItemMedia,{variant:"image",className:"h-auto w-full",children:(0,t.jsx)(s.Skeleton,{className:"aspect-video w-full","data-slot":"post-skeleton-media"})})}),(0,t.jsx)(a.ItemContent,{children:(0,t.jsx)(o,{count:3,className:"mt-0"})})]}):null,!e||u||l?null:(0,t.jsx)(a.ItemMedia,{variant:"image",className:"lg"===i?"aspect-[4/3] h-auto w-16 sm:h-28 sm:w-auto":"aspect-[4/3] h-auto w-16 sm:h-20 sm:w-auto",children:(0,t.jsx)(s.Skeleton,{className:"size-full","data-slot":"post-skeleton-media"})})]})}],439414),e.s([],784995)},723165,128251,e=>{"use strict";var t=e.i(947500),r=e.i(368606),a=e.i(237355),s=e.i(948587),i=e.i(466691),o=e.i(430986);function n(e){let t=new Map;for(let r of e)for(let e of r.posts)t.set(e.clusterId,r);return t}function l(e,t){if(0===t.length)return e.map(e=>({post:e,type:"post"}));let r=n(t),a=new Map(e.map(e=>[e.clusterId,e])),s=new Set,i=[];for(let t of e){let e=r.get(t.clusterId);if(!e){i.push({post:t,type:"post"});continue}s.has(e.id)||(s.add(e.id),i.push({group:{...e,posts:e.posts.map(e=>a.get(e.clusterId)??e)},type:"group"}))}return i}e.s(["FeedGroup",0,({actionsFor:e,diggFor:n,groupId:l,hrefFor:u,lead:d,related:c})=>{let[p,g]=(0,a.useState)(!1),m=(0,a.useId)(),f=[...c].sort((e,t)=>
2(t.diggScore??0)-(e.diggScore??0)),h=p?f:f.slice(0,4),v=65+(Math.max(1,...c.map(e=>String(Math.max(0,e.diggScore??0)).length))-1)*7,b=f.length-h.length,x=f.length>4;return(0,t.jsxs)("div",{className:"flex flex-col pb-4","data-group-id":l,children:[d,c.length>0?(0,t.jsxs)("div",{className:"pl-4",children:[(0,t.jsx)("div",{"data-tldr-rule":!0,className:"py-2 pr-6 pl-3.5",children:(0,t.jsx)(o.ItemGroup,{"aria-label":"Related stories",id:m,children:h.map((a,i)=>{let l=n(a),d=e?.(a,i+1),c=a.summary.description?.trim();return(0,t.jsxs)(o.Item,{className:"p-2",role:"listitem","data-post-linked-item":!0,children:[(0,t.jsx)(o.ItemContent,{children:(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[null==l?null:(0,t.jsx)("div",{"data-post-accessory":!0,className:"flex shrink-0 empty:hidden",style:{width:v},children:l}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,t.jsx)(o.ItemTitle,{children:(0,t.jsx)(r.default,{href:u(a),prefetch:!1,"data-item-link":"stretched",children:a.summary.title})}),c?(0,t.jsx)(o.ItemDescription,{className:"line-clamp-1",children:c}):null]})]})}),a.image?.src?(0,t.jsx)(o.ItemMedia,{variant:"image",className:"aspect-[4/3] h-10 w-auto",children:(0,t.jsx)("div",{className:"relative size-full",children:(0,t.jsx)(s.ClusterPostThumbnailImage,{src:a.image.src,alt:a.image.alt??"",sizes:"56px"})})}):null,d?(0,t.jsx)(o.ItemActions,{"data-post-accessory":!0,children:d}):null]},a.clusterId)})})}),x?(0,t.jsx)("div",{"data-tldr-rule-more":!0,className:"flex",children:(0,t.jsx)(i.Button,{type:"button",variant:"link",size:"sm","aria-controls":m,"aria-expanded":p,onClick:()=>g(e=>!e),children:p?"View less":`View ${b} more`})}):null]}):null]})}],723165),e.s(["feedPlaceCount",0,function(e,t){return l(e,t).length},"feedPostsForPlaces",0,function(e,t,r){if(0===t.length)return e.slice(0,r);let a=n(t),s=new Set,i=0,o=0;for(let t of e){let e=a.get(t.clusterId);if(!e||!s.has(e.id)){if(i===r)break;i+=1,e&&s.add(e.id)}o+=1}return e.slice(0,o)},"groupFeedPosts",0,l],128251)},750351,e=>{"use strict";var t=e.i(237355),r=e.i(525738),a=e.i(10070),s=e.i(208009),i=e.i(504701),o=class extends s.Subscribable{#e;#t=void 0;#r;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,i.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,i.hashKey)(t.mutationKey)!==(0,i.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#s(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#s(),this.#i()}mutate(e,t){return this.#a=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#s(){let e=this.#r?.state??(0,r.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#i(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#a.onSuccess?.(e.data,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,r,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,r,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(888352),l=e.i(479069),u=e.i(360112),d=e.i(177917);let c=(0,d.createServerReference)("40b8e2561bafebcc9266f981440222e4406c46be61",d.callServer,void 0,d.findSourceMapURL,"setStoryBreaking");e.s(["useBreakingStories",0,function(e,r=!0,s){var d;let p=(0,n.useQueryClient)(),g=(0,l.useQuery)({queryKey:["breaking-stories",e],enabled:r,initialData:s,staleTime:15e3,refetchInterval:!!s&&3e4,queryFn:async({signal:t})=>{let r=await fetch(`/api/breaking?${new URLSearchParams({topic:e})}`,{signal:t,cache:"no-store"});if(!r.ok)throw Error("Breaking stories are unavailable.");return await r.json()}}),[m,f]=(0,t.useState)(0),h=g.data?g.data.nowMs+Math.max(0,m-g.dataUpdatedAt):0,v=(d=g.data?.stories??[],d.filter(e=>Date.parse(e.expiresAt)>h).toSorted((e,t)=>Date.parse(t.markedAt)-Date.parse(e.markedAt))),b=v.length?Math.min(...v.map(e=>Date.parse(e.expiresAt))):null;(0,t.useEffect)(()=>
2{if(null===b)return;let e=window.setTimeout(()=>{f(Date.now())},Math.max(0,b-h));return()=>{window.clearTimeout(e)}},[b,h]);let x=function(e){let r=(0,n.useQueryClient)(void 0),[s]=t.useState(()=>new o(r,e));t.useEffect(()=>{s.setOptions(e)},[s,e]);let l=t.useSyncExternalStore(t.useCallback(e=>s.subscribe(a.notifyManager.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),u=t.useCallback((e,t)=>{s.mutate(e,t).catch(i.noop)},[s]);if(l.error&&(0,i.shouldThrowError)(s.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:u,mutateAsync:l.mutate}}({mutationFn:async t=>{let r=await c({...t,topic:e,operationKey:crypto.randomUUID()});if(!r.ok)throw Error(r.message);return t},onSuccess:async t=>{await p.invalidateQueries({queryKey:["breaking-stories",e]}),u.toast.success(t.active?"Marked as breaking for 3 hours.":"Removed from Breaking.")},onError:e=>u.toast.error(e.message)});return{stories:v,ready:g.isSuccess,pendingId:x.isPending?x.variables.clusterPostId:null,setBreaking:x.mutate}}],750351)},653955,e=>{"use strict";var t=e.i(947500),r=e.i(359780),a=e.i(571272),s=e.i(237355),i=e.i(348565),o=e.i(723165),n=e.i(128251),l=e.i(430986),u=e.i(96222),d=e.i(479069),c=e.i(177917);let p=(0,c.createServerReference)("401d0b5afe9bca548f5c57d3165bb2d2937c58cbda",c.callServer,void 0,c.findSourceMapURL,"readClustersWithArticleBody"),g=new Set;var m=e.i(750351);let f={posts:[],status:"idle"};var h=e.i(823400),v=e.i(78829),b=e.i(983390),x=e.i(165971),y=e.i(66170),I=e.i(170769);e.i(784995);var R=e.i(452824),k=e.i(439414),w=e.i(292965);let j=({canMarkBreakingForPost:e,accessoryForPost:d,leadingAccessoryForPost:c,metaAccessoryForPost:p,adminLinksForPost:g,imageLinkForPost:m,onPromoteToTop:v,onRemoveFromTopic:x,promotionAvailableForPost:y,promotionDisabledForPost:I,promotionPendingForPost:w,insertions:j,nowMs:P,posts:C,groups:M,renderVersion:T,showActivityRows:A,postSize:G,heroImages:F,showSeparators:E,topic:N,storyBasePath:z,refreshSkeletons:O,expandableClusterPosts:_,articleBodyClusters:L,breaking:D})=>{let U=(0,b.useStoryImages)(),[B,$]=(0,s.useState)(new Set),K=function(){let[e,t]=(0,s.useState)({}),r=(0,s.useRef)(e),a=(0,s.useRef)(new Map);return r.current=e,(0,s.useEffect)(()=>{let e=a.current;return()=>{for(let t of e.values())t.abort();e.clear()}},[]),{entries:e,idleEntry:f,load:(0,s.useCallback)(async e=>{let s=r.current[e.clusterId];if(s?.status==="loading"||s?.status==="ready")return;let i=new AbortController;a.current.get(e.clusterId)?.abort(),a.current.set(e.clusterId,i);let o={posts:s?.posts??[],status:"loading"};r.current={...r.current,[e.clusterId]:o},t(r.current);try{let s=new URLSearchParams({mode:"source",topic:e.topic}),o=await fetch(`/api/stories/${encodeURIComponent(e.clusterUrlId)}/activity-posts?${s.toString()}`,{signal:i.signal});if(!o.ok)throw Error(`HTTP ${o.status}`);let n=await o.json();if(i.signal.aborted||a.current.get(e.clusterId)!==i)return;let l={posts:Array.isArray(n.posts)?n.posts:[],status:"ready"};r.current={...r.current,[e.clusterId]:l},t(r.current)}catch(s){var n;if(i.signal.aborted||(n=s)instanceof Error&&"AbortError"===n.name)return;let a={posts:r.current[e.clusterId]?.posts??[],status:"error"};r.current={...r.current,[e.clusterId]:a},t(r.current)}finally{a.current.get(e.clusterId)===i&&a.current.delete(e.clusterId)}},[])}}(),q=new Map;for(let e of j??[]){let t=q.get(e.afterRank)??[];t.push(e),q.set(e.afterRank,t)}let V=e=>{let t=U?.get(e.clusterId);return t?{...e,image:t.image}:e},H=new Map;for(let e of(0,n.groupFeedPosts)(C,M??[]))if("group"===e.type)for(let t of e.group.posts)H.set(t.clusterId,e.group);let Q=new Set,W=[];C.forEach((e,t)=>{let r=H.get(e.clusterId);if(r){if(!Q.has(r.id)){Q.add(r.id);let[e,...a]=r.posts.map(V);e&&W.push({id:r.id,lead:e,postIndex:t+1,related:a,type:"group"})}}else W.push({id:e.clusterId,post:V(e),postIndex:t+1,type:"post"});for(let t of q.get(e.rank)??[])W.push({id:t.id,node:t.node,type:"insertion",wrapperClassName:t.wrapperClassName})});let X=e=>(0,a.isLargePostImage)(e.image),J=e=>G??(X(e)?"lg":"default"),Y=e=>{let t=e.clusterUrlId??e.clusterId,a=e.topicSlug?(0,h.topicFeedPath)(e.topicSlug):z;return a?`${a.replace(/\/+$/u,"")}/${encodeURIComponent(t)}`:(0,r.getTopicClusterPath)(N,t)},Z=(r,a,s)=>{var o,n;return(0,t.jsx)(u.Collapsible,{asChild:!0,onOpenChange:e=>{_&&($(t=>{let a=new Set(t);return e?a.add(r.clusterId):a.delete(r.clusterId),a}),e&&K.load({clusterId:r.clusterId,clusterUrlId:r.clusterUrlId??r.clusterId,topic:N}))},open:!0===_&&B.has(r.clusterId),children:(0,t.jsx)(R.Post,{role:s,"data-newsletter-modal-trigger":10===a?"true":void 0,"data-feed-refresh-row-id":r.clusterId,refreshSkeleton:O?(0,t.jsx)(k.PostSkeleton,{hasImage:!!r.image,hero:F&&X(r),size:J(r)}):null,post:r,size:J(r),hero:F&&X(r),ageLabel:(o=r.createdAt,n=P,o?S(n-Date.parse(o)):null),updatedLabel:function(e,t){if(!e.lastSourcePostAt||!e.createdAt)return null;let r=Date.parse(e.lastSourcePostAt),a=Date.parse(e.createdAt);return Number.isFinite(r)&&Number.isFinite(a)&&r>a?S(t-r):null}(r,P),topic:N,storyBasePath:z,showActivityRows:A,accessory:d?.(r),leadingAccessory:c?.(r),metaAccessory:p?.(r),metaTrailingAccessory:_?(0,t.jsx)(i.ClusterSourcePostsTrigger,{open:B.has(r.clusterId),panelId:`cluster-source-posts-${r.clusterId}`,postCount:r.sourcePostCount??r.postCount,title:r.summary.title}):null,adminLinksFor:g?.(r),imageLinkFor:m?.(r),onPromoteToTop:v&&y?.(r)!==!1?()=>v(r):void 0,onSetBreaking:D?.ready&&(e?.(r)??!0)?()=>D.setBreaking({clusterPostId:r.clusterId,active:!D?.stories.some(e=>e.post.clusterId===r.clusterId)}):void 0,breakingActive:D?.stories.some(e=>e.post.clusterId===r.clusterId),breakingPending:D?.pendingId===r.clusterId,hasArticleBody:L?.has(r.clusterId)??!1,onRemoveFromTopic:x?()=>x(r):void 0,promotionDisabled:I?.(r),promotionPending:w?.(r),children:_&&B.has(r.clusterId)?(0,t.jsx)(i.ClusterSourcePostsContent,{entry:K.entries[r.clusterId]??K.idleEntry,onRetry:()=>{K.load({clusterId:r.clusterId,clusterUrlId:r.clusterUrlId??r.clusterId,topic:N})},panelId:`cluster-source-posts-${r.clusterId}`}):null})})};return(0,t.jsx)(l.ItemGroup,{"data-feed-posts":!0,"data-render-version":T,children:W.map((e,r)=>(0,t.jsxs)(s.Fragment,{children:[E&&r>0&&"insertion"!==e.type?(0,t.jsx)(l.ItemSeparator,{}):null,"post"===e.type?Z(e.post,e.postIndex,"listitem"):"group"===e.type?(0,t.jsx)("div",{role:"listitem","data-feed-group":!0,children:(0,t.jsx)(o.FeedGroup,{diggFor:e=>p?.(e)??null,groupId:e.id,hrefFor:Y,lead:Z(e.lead,e.postIndex),related:e.related})}):(0,t.jsxs)("div",{className:e.wrapperClassName,"data-feed-insertion":!0,role:"listitem",children:[E&&r>0?(0,t.jsx)(l.ItemSeparator,{}):null,e.node]})]},`${e.type}-${e.id}`))})};function S(e){if(e<0)return"0s";let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let r=Math.floor(t/60);if(r<60)return`${r}m`;let a=Math.floor(r/60);return a<24?`${a}h`:`${Math.floor(a/24)}d`}let P=e=>{let r=(0,m.useBreakingStories)(e.topic);return(0,t.jsx)(j,{...e,breaking:r})};e.s(["Feed",0,({allowFeedRemoval:e=!0,canMarkBreakingForPost:r,date:a,posts:s,groups:i,topic:o,storyBasePath:n,nowMs:l,renderVersion:u,header:c,headingId:m,bodyState:f,insertions:h,leadingAccessoryForPost:b,metaAccessoryForPost:R,accessoryForPost:k,onPromoteToTop:S,onRemoveFromTopic:C,promotionAvailableForPost:
2M,promotionDisabledForPost:T,promotionPendingForPost:A,showSeparators:G=!0,showActivityRows:F=!0,postSize:E,heroImages:N=!0,id:z,className:O,headerClassName:_,surface:L,refreshSkeletons:D=!1,expandableClusterPosts:U=!1})=>{var B,$;let K,q=(0,x.useFeedRemoval)(),V=(0,w.useOptionalFeedAdminAccess)(),H=(0,y.usePathname)(),Q=(e,t)=>n?.replace(/\/+$/u,"").endsWith("-preview")?new URL(e,"https://digg.com").href:`https://digg.com/${t.topicSlug??o}/${t.clusterUrlId??t.clusterId}`,W=e&&V.isResolved?V.storyLinks:null,X=W?e=>t=>W.menu.map(r=>(0,I.fillAdminRouteLink)(r,Q(t,e),(0,I.currentPagePath)(H))):void 0,J=W?.image?e=>t=>W.image?(0,I.fillAdminRouteLink)(W.image,Q(t,e),(0,I.currentPagePath)(H)):null:void 0,Y=e=>!q.removed.has(`${e.topicSlug??o}:${e.clusterId}`),Z=s.filter(Y),ee=(i??[]).flatMap(e=>{let t=e.posts.filter(Y);return t.length>=2?[{...e,posts:t}]:[]}),et=(B=[...Z,...ee.flatMap(e=>e.posts)].map(e=>e.clusterId),$=V.isResolved&&V.isAdmin,K=[...new Set(B)].toSorted(),(0,d.useQuery)({queryKey:["article-body-clusters",K],enabled:$&&K.length>0,staleTime:6e4,queryFn:async()=>new Set(await p(K))}).data??g),er=e&&q.onRemove?e=>q.onRemove?.({clusterId:e.clusterId,title:e.summary.title,topic:e.topicSlug??o}):void 0,ea=e&&V.isAdmin&&V.isResolved&&["tech","ai","gaming"].includes(o)?P:j,es=null!=f;return(0,t.jsxs)("section",{id:z,"aria-busy":D||void 0,"aria-labelledby":m,className:(0,v.cn)("min-w-0",O),"data-feed-date":a||void 0,"data-post-surface":L,"data-render-version":u,children:[(0,t.jsx)("div",{className:(0,v.cn)("min-w-0",_),"data-feed-header":!0,children:c}),es?f:(0,t.jsx)(ea,{accessoryForPost:k,canMarkBreakingForPost:r,leadingAccessoryForPost:b,metaAccessoryForPost:R,adminLinksForPost:X,articleBodyClusters:et,imageLinkForPost:J,onPromoteToTop:S,onRemoveFromTopic:C??er,promotionAvailableForPost:M,promotionDisabledForPost:T,promotionPendingForPost:A,insertions:h,nowMs:l,posts:Z,groups:ee,renderVersion:u,showActivityRows:F,postSize:E,heroImages:N,showSeparators:G,topic:o,storyBasePath:n,refreshSkeletons:D,expandableClusterPosts:U})]})}],653955)},860974,e=>{"use strict";let t=(0,e.i(540796).default)("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);e.s(["ImageOffIcon",0,t],860974)}]); 3 4//# debugId=edb3e5e0-a01e-fe6d-44bc-1cdefeca6599 5//# sourceMappingURL=440e07gve9dbz.js.map 6//# chunkId=01a0f533-44fe-7252-8459-157718144fea
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.