PageSourceSearch

https://heatmap.news/static/dist/social-ux/5598.f1d9854d6cb050b93704.bundle.mjs

js heatmap.news collected 2026-09-24 08:44:37 UTC 7,264 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunksocialUX=self.webpackChunksocialUX||[]).push([[5598],{1692:function(e,t,n){n.d(t,{Tj:function(){return o},pb:function(){return s},qI:function(){return c},qh:function(){return i}});var r=n(3964);const s=(0,r.A)(((e,t)=>t.filter(e))),o=(0,r.A)(((e,t)=>t.map(e))),i=(0,r.A)(((e,t)=>t.indexOf(e))),c=(0,r.A)(((e,t)=>t.flatMap(e)))},5598:function(e,t,n){n.r(t),n.d(t,{default:function(){return ce}});var r=n(3964),s=n(4361);var o=function(e,t){return e.getUserInfo().then((e=>e.runnerSite.permissions)).catch((e=>(console.log(e),{}))).then((n=>{const r=t.closest("[data-section-id]"),s=r?parseInt(r.dataset.sectionId,10):null,o=t.closest("[data-source]"),i=o?o.dataset.source:null,c=function(e,t){try{return JSON.parse(e)}catch{return[]}}(t.dataset.frozenSections);return{appContext:e,postElement:t,sectionId:s,source:i,permissions:n,postId:t.getAttribute("elid")||t.dataset.userPrefs,isFrozen:c.includes(s)}}))},i=n(254),c=n(1692),a=n(8879),u=n(298);function l(e,t,n,r){const s={post_id:e,action:t?"unfreeze_post":"freeze_post",section_id:n,position:r};return(0,u.af)("/core/roar/post_actions","POST",s)}var d=n(48),f=n(90);let p;function h(e){return p=e,p}const m=e=>{if(e<0)throw e;return e},A=(0,a.A)(((e,t)=>{(0,d.A)(e.isFrozen?"Post unfrozen":"Post frozen","success"),e.isFrozen=!e.isFrozen,t.classList.toggle("active")})),v=e=>{console.error(e),(0,d.A)(e.error||e.message||"There was an error freezing this post","error")};var _=n(9124),g=n(7611),b=n(88);const I="There was an error removing this post",S={title:"Information",body:"Are you sure you want to delete this post?",negativeAction:{label:"Cancel",callback:g.A}},y=(0,r.A)(((e,t)=>t!=e)),z=(0,a.A)((e=>{e.remove(),(0,d.A)("Post successfully removed","success")})),w=(0,r.A)(((e,t)=>{e.classList.remove("hidden"),(0,d.A)(t.error||t.message||I,"error")})),P=(0,a.A)(((e,t,n)=>{const r=(0,b.A)(`.post-context-${t}`,e);if(!r||!r.post||!r.post.sections)return void(0,d.A)(I,"error");const s=r.post.sections;return e.classList.add("hidden"),function(e,t){const n={sections:t,post_id:e,action:"move_post_to_sections"};return(0,u.af)("/core/roar/post_actions","POST",n)}(t,s.filter(y(n))).then(z(e)).catch(w(e))}));function C(e){const{postId:t,sectionId:n,postElement:r}=e;return{label:"Remove",callback:P(r,t,n)}}const N=(0,r.A)(((e,t)=>{return n=e.replace("{POST_ID}",t.postId),window.open(n,"_blank");var n}));var T={freeze:function(e,t){return(n=e.sectionId,(0,f.A)(p).catch((()=>(0,u.mQ)(`/core/feeds/site/section_posts_ordered?section_id=${n}&limit=100&offset=0`))).then(h)).then((0,c.qh)(parseInt(e.postId,10))).then(m).then((0,i.A)(l,e.postId,e.isFrozen,e.sectionId)).then(A(e,t)).catch(v);var n},remove:function(e){(0,_.A)(e.appContext,{...S,possitiveAction:C(e)})},edit:N("/r/entryeditor/{POST_ID}"),socialScheduling:N("/r/entryeditor/{POST_ID}#social_scheduling"),socialCopy:N("/r/entryeditor/{POST_ID}#social"),stats:N("/r/entryeditor/{POST_ID}#stats")},$=(...e)=>t=>e.every((e=>e(t)));const q=e=>![null,void 0].includes(e.sectionId)&&!isNaN(Number(e.sectionId)),D=(0,r.A)(((e,t)=>t.permissions[e]||!1));var E=n(367);function O(e){const t=document.createElement("template");return t.innerHTML=e,t.content.firstElementChild}const k=(0,E.A)((({className:e,title:t,icon:n,iconClass:r,dataAttrs:s,isActive:o})=>`<span\n        class="${((e,t)=>["hover-menu",e,t?"active":""].join(" "))(e,o)}"\n        title="${t}"\n        ${(e=>Object.entries(e||{}).reduce(((e,[t,n])=>`${e} data-${t}="${n}"`),""))(s)}>\n        <i class="${r||"material-icons"}">${n||""}</i>\n    </span>`),O),F={freeze(e){return e.isFrozen}},x=(0,r.A)((function(e,t){const n=t.name in F&&F[t.name](e);return{...t,isActive:n}}));var L=e=>t=>t.then(e);const U=(0,E.A)((e=>[e,[{name:"edit",className:"edit",title:"Edit",icon:"edit",requirement:D("edit_post")},{name:"freeze",className:"freeze",title:"Freeze Post: keep this story in this spot on the page",icon:"ac_unit",requirement:$(q,D("reorder_frontpage"))},{name:"socialScheduling",className:"editor-tab",title:"Social Scheduling",icon:"share",requirement:D("edit_post"),dataAttrs:{"tab-id":"social_scheduling"}},{name:"socialCopy",className:"editor-tab",title:"Social Copy",icon:null,iconClass:"icons--social",requirement:D("edit_post"),dataAttrs:{"tab-id":"stats"}},{name:"stats",className:"editor-tab",title:"Stats",icon:"trending_up",requirement:D("edit_post"),dataAttrs:{"tab-id":"social_scheduling"}},{name:"remove",className:"remove",title:"Remove",icon:"delete",requirement:$(q,D("delete_post"))}]]),(([e,t])=>[e,t.filter((t=>
1t.requirement(e)))]),(function([e,t]){const n=(0,E.A)(x(e),k);return[e,t.map((function(e){return{...e,html:n(e)}}))]}),(R="click",M=(e,t)=>(e.addEventListener(R,(n=>t(e,n))),e),Q=T,([e,t])=>t.map((t=>({...t,html:M(t.html,(n=>Q[t.name](e,n)))})))),(e=>{const t=O('<div class="user-prefs">\n            <div class="hover-menu-options"></div>\n        </div>');return(0,E.A)((e=>t=>(0,f.A)(t.querySelector(e)))(".hover-menu-options"),L((n=e.map((e=>e.html)),e=>(n.forEach((t=>e.appendChild(t))),e))),L((()=>t)))(t);var n})),j=(0,r.A)(((e,t)=>o(e,t).then(U).then((e=>{return t.matches("[data-user-prefs]")?t.appendChild(e):(r=e,(n=t).parentNode.insertBefore(r,n.nextSibling));var n,r}))));var M,Q,R,H=n(2320);const X=()=>n.e(3590).then(n.bind(n,3590)),B=()=>n.e(2455).then(n.bind(n,2455)),J=()=>n.e(3910).then(n.bind(n,3910));function G(e){return e.default}function K(e){const{profile:t}=e;return t&&t.type_name&&"technical"===t.type_name.toLowerCase()}function V(e){return e?n.e(4998).then(n.bind(n,4998)).then(G):Promise.resolve(g.A)}const W=(0,r.A)((function(e,t){t(e)}));var Y=n(8908);let Z,ee=Date.now();function te(e){return Z={runnerSite:e.parent_site,profileSite:e.user_site,user:e.user,sites:e.sites,menu:e.menu},Z}var ne=n(4465),re=n(8704);const se=[function(e){return(0,ne.ux)()&&(0,re.A)("https://fonts.googleapis.com/icon?family=Material+Icons",g.A,g.A),(0,re.A)(`/static/css-build/roar/runner/base/user-prefs.css?ts=${function(){const e=new Date,t=e.getDay(),n=(0===t?-6:1)-t;return e.setDate(e.getDate()+n),e.setHours(0,0,0,0),e.getTime()}()}`,g.A,g.A),e},e=>(0,s.A)("article[elid],[data-user-prefs]",j(e)),function(e){return e.settings.useRiver?(function(e){(0,H.A)(".rebel-use-info-wrapper",X,e)}(e),e):e},function(e){return(0,H.A)(".site-avatar-edit,.site-about-edit,.site-title-edit",B,e,!0),e},function(e){return(0,H.A)("nav.menu-global ul#main-menu",J,e),e},function(e){return(0,u.mQ)("/core/account/data").then(K).then(V).then(W(e)).catch(console.error),e}],oe=(0,r.A)((function(e,[t]){t(e)})),ie=(0,r.A)((function(e,[t,n]){n(e)}));function ce(e,t,n){let r=!1;function s(e,n){e?t.forEach(ie(e)):t.forEach(oe(n)),t.length=0,r=!1}function o(e,n){t.push([e,n])}function i(e){return r?new Promise(o):(r=!0,(t=e,!t&&Z?Promise.resolve(Z):(ee=Date.now(),(0,u.mQ)(`/core/users/light_settings.js?v=${ee}`).then(te))).then((e=>(s(null,e),e))).catch((e=>{throw s(e),e})));var t}function c(){i(!0).then((e=>{n.forEach((t=>t(null,e)))})).catch((e=>{n.forEach((t=>t(e,null)))}))}return e.getUserInfo=i,e.listenForUserInfo=function(e){n.push(e),i().then((t=>{e(null,t)})).catch((t=>{e(t,null)}))},e.refreshUserInfo=c,n.length&&c(),(0,Y.A)(se,e)}}}]);
2//# sourceMappingURL=5598.f1d9854d6cb050b93704.bundle.mjs.map

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.