@riab/cpm-archiving 1.1.22-beta.6 → 1.1.22-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cpm-archiving.js +1 -1
- package/package.json +1 -1
package/dist/cpm-archiving.js
CHANGED
|
@@ -506,7 +506,7 @@ mark.taylor@example.com,Eve Davis,+16505554321,Family\r
|
|
|
506
506
|
}
|
|
507
507
|
`),r.default.createElement("div",Object.assign({},l,{className:(0,n.default)("rsme-spinner",l.className),style:Object.assign({width:10,height:10},l.style)})))};return Io.BorderSpinner=a,Io}var mu={},XN;function cpe(){return XN||(XN=1,(function(e){var t=mu&&mu.__rest||function(f,g){var p={};for(var b in f)Object.prototype.hasOwnProperty.call(f,b)&&g.indexOf(b)<0&&(p[b]=f[b]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,b=Object.getOwnPropertySymbols(f);v<b.length;v++)g.indexOf(b[v])<0&&Object.prototype.propertyIsEnumerable.call(f,b[v])&&(p[b[v]]=f[b[v]]);return p},n=mu&&mu.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.ShareArrowIcon=e.ChatBubbleIcon=e.HeartIcon=e.EngagementIconsPlaceholder=void 0;const r=n(ki()),a=n(Hn()),i=f=>{var g=t(f,[]);return a.default.createElement("div",Object.assign({},g,{className:(0,r.default)(g.className),style:Object.assign({display:"flex",alignItems:"center",columnGap:14},g.style)}),a.default.createElement(e.HeartIcon,null),a.default.createElement(e.ChatBubbleIcon,null),a.default.createElement(e.ShareArrowIcon,null))};e.EngagementIconsPlaceholder=i;const l=f=>a.default.createElement("div",Object.assign({},f),a.default.createElement("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"50%",height:"12.5px",width:"12.5px",transform:"translateX(0px) translateY(7px)"}}),a.default.createElement("div",{style:{backgroundColor:"#F4F4F4",height:"12.5px",transform:"rotate(-45deg) translateX(3px) translateY(1px)",width:"12.5px",flexGrow:0,marginRight:"6px",marginLeft:"2px"}}),a.default.createElement("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"50%",height:"12.5px",width:"12.5px",transform:"translateX(9px) translateY(-18px)"}}));e.HeartIcon=l;const u=f=>a.default.createElement("div",Object.assign({},f),a.default.createElement("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"50%",height:"20px",width:"20px"}}),a.default.createElement("div",{style:{width:0,height:0,borderTop:"2px solid transparent",borderLeft:"6px solid #f4f4f4",borderBottom:"2px solid transparent",transform:"translateX(16px) translateY(-4px) rotate(30deg)"}}));e.ChatBubbleIcon=u;const d=f=>a.default.createElement("div",Object.assign({},f,{style:{height:25,width:25,transform:"translateX(0px) translateY(-2px)"}}),a.default.createElement("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",xmlSpace:"preserve"},a.default.createElement("path",{style:{fill:"#F4F4F4"},d:`M295.204,180.593C132.168,180.593,0,312.759,0,475.796
|
|
508
508
|
c51.398-130.047,184.869-203.22,317.483-183.603L295.204,180.593z`}),a.default.createElement("path",{style:{fill:"#F4F4F4"},d:`M512,253L295.204,36.204v217.818C159.946,249.655,34.992,339.262,0,475.794
|
|
509
|
-
c59.905-109.171,178.724-165.463,295.204-151.033v145.035L512,253z`})));e.ShareArrowIcon=d})(mu)),mu}var jo={},zN;function upe(){if(zN)return jo;zN=1;var e=jo&&jo.__rest||function(i,l){var u={};for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&l.indexOf(d)<0&&(u[d]=i[d]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,d=Object.getOwnPropertySymbols(i);f<d.length;f++)l.indexOf(d[f])<0&&Object.prototype.propertyIsEnumerable.call(i,d[f])&&(u[d[f]]=i[d[f]]);return u},t=jo&&jo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(jo,"__esModule",{value:!0}),jo.ProfilePlaceholder=void 0;const n=t(ki()),r=t(Hn()),a=i=>{var l=e(i,[]);return r.default.createElement("div",Object.assign({},l,{className:(0,n.default)(l.className),style:Object.assign({},l.style)}),r.default.createElement("div",{style:{display:"flex",columnGap:14}},r.default.createElement("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"50%",width:40,height:40}}),r.default.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",rowGap:6}},r.default.createElement("div",{style:{backgroundColor:"#F4F4F4",borderRadius:4,width:100,height:14}}),r.default.createElement("div",{style:{backgroundColor:"#F4F4F4",borderRadius:4,width:60,height:14}}))))};return jo.ProfilePlaceholder=a,jo}var qN;function dpe(){if(qN)return Mo;qN=1;var e=Mo&&Mo.__rest||function(g,p){var b={};for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&p.indexOf(v)<0&&(b[v]=g[v]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var y=0,v=Object.getOwnPropertySymbols(g);y<v.length;y++)p.indexOf(v[y])<0&&Object.prototype.propertyIsEnumerable.call(g,v[y])&&(b[v[y]]=g[v[y]]);return b},t=Mo&&Mo.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.PlaceholderEmbed=void 0;const n=t(ki()),r=t(Hn()),a=dH(),i=lpe(),l=cpe(),u=upe(),d=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,f=g=>{var p,{url:b,linkText:v="View post",imageUrl:y,spinner:w=r.default.createElement(i.BorderSpinner,null),allowJavaScriptUrls:A=!0,spinnerDisabled:E}=g,R=e(g,["url","linkText","imageUrl","spinner","allowJavaScriptUrls","spinnerDisabled"]);return d.test(b)&&!A?(console.warn("PlaceholderEmbed has blocked a javascript: URL as a security precaution"),null):r.default.createElement("div",Object.assign({},R,{className:(0,n.default)(R.className),style:Object.assign({overflow:"hidden",border:"1px solid #dee2e6",backgroundColor:"#ffffff",borderRadius:0,boxSizing:"border-box",position:"relative"},R.style)}),r.default.createElement(a.EmbedStyle,null),r.default.createElement("a",{href:b,style:{textDecoration:"none"},target:"_blank",rel:"noopener noreferrer"},!y&&r.default.createElement("div",{style:{position:"absolute",top:0,left:0,display:"flex",justifyContent:"space-between",alignItems:"start",paddingLeft:16,paddingRight:16,paddingTop:16,paddingBottom:16,zIndex:2,backgroundColor:"#ffffff"}},r.default.createElement(u.ProfilePlaceholder,null)),r.default.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:y?"start":"center",height:"100%",width:"100%"}},!y&&r.default.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",rowGap:16,zIndex:3,padding:8,backgroundColor:"#ffffff"}},!E&&w,!!v&&r.default.createElement("div",{style:{color:"#000000",fontFamily:"Arial,sans-serif",fontSize:"14px",fontStyle:"normal",fontWeight:550,lineHeight:"18px",textAlign:"center"}},v)),y&&(typeof((p=R.style)===null||p===void 0?void 0:p.height)!="undefined"?r.default.createElement("div",{style:{width:"100%",height:"100%",background:`url("${y}")`,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",marginBottom:"40"}}):r.default.createElement("div",{style:{width:"100%",marginBottom:40}},r.default.createElement("img",{src:y,style:{width:"100%"}})))),r.default.createElement("div",{style:{position:"absolute",bottom:0,left:0,height:40,width:"100%",backgroundColor:"#ffffff",zIndex:1}},!y&&r.default.createElement(l.EngagementIconsPlaceholder,{style:{marginLeft:16}}),y&&r.default.createElement("div",{style:{display:"flex",height:"100%",alignItems:"center",justifyContent:"space-between",columnGap:16}},r.default.createElement("div",{style:{color:"#0095f6",fontWeight:600,fontFamily:"Arial,sans-serif",fontSize:"14px",fontStyle:"normal",whiteSpace:"nowrap",marginLeft:16}},v),!E&&r.default.createElement("div",{style:{marginRight:16}},w)))))};return Mo.PlaceholderEmbed=f,Mo}var QN;function fpe(){if(QN)return Ua;QN=1;var e=Ua&&Ua.__createBinding||(Object.create?(function(y,w,A,E){E===void 0&&(E=A);var R=Object.getOwnPropertyDescriptor(w,A);(!R||("get"in R?!w.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return w[A]}}),Object.defineProperty(y,E,R)}):(function(y,w,A,E){E===void 0&&(E=A),y[E]=w[A]})),t=Ua&&Ua.__setModuleDefault||(Object.create?(function(y,w){Object.defineProperty(y,"default",{enumerable:!0,value:w})}):function(y,w){y.default=w}),n=Ua&&Ua.__importStar||function(y){if(y&&y.__esModule)return y;var w={};if(y!=null)for(var A in y)A!=="default"&&Object.prototype.hasOwnProperty.call(y,A)&&e(w,y,A);return t(w,y),w},r=Ua&&Ua.__rest||function(y,w){var A={};for(var E in y)Object.prototype.hasOwnProperty.call(y,E)&&w.indexOf(E)<0&&(A[E]=y[E]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,E=Object.getOwnPropertySymbols(y);R<E.length;R++)w.indexOf(E[R])<0&&Object.prototype.propertyIsEnumerable.call(y,E[R])&&(A[E[R]]=y[E[R]]);return A},a=Ua&&Ua.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.LinkedInEmbed=void 0;const i=a(ki()),l=n(Hn()),u=dpe(),d=dH(),f=250,g=550,p=550,b=8,v=y=>{var w,A,{url:E,postUrl:R,width:I,height:S=500,linkText:M="View post on LinkedIn",placeholderImageUrl:O,placeholderSpinner:P,placeholderSpinnerDisabled:N=!1,placeholderProps:T,embedPlaceholder:_,placeholderDisabled:k=!1}=y,z=r(y,["url","postUrl","width","height","linkText","placeholderImageUrl","placeholderSpinner","placeholderSpinnerDisabled","placeholderProps","embedPlaceholder","placeholderDisabled"]);const[Q,X]=l.useState(!1),q={minWidth:f,maxWidth:g,width:typeof I!="undefined"?I:"100%",height:typeof S!="undefined"?S:typeof((w=z.style)===null||w===void 0?void 0:w.height)!="undefined"||typeof((A=z.style)===null||A===void 0?void 0:A.maxHeight)!="undefined"?"100%":p,border:"solid 1px rgba(0, 0, 0, 0.15)",borderRadius:b},L=_!=null?_:l.createElement(u.PlaceholderEmbed,Object.assign({url:R!=null?R:E,imageUrl:O,linkText:M,spinner:P,spinnerDisabled:N},T,{style:Object.assign(Object.assign({},q),T==null?void 0:T.style)}));return l.createElement("div",Object.assign({},z,{className:(0,i.default)("rsme-embed rsme-linkedin-embed",z.className),style:Object.assign({overflow:"hidden",width:I!=null?I:void 0,height:S!=null?S:void 0,borderRadius:b},z.style)}),l.createElement(d.EmbedStyle,null),l.createElement("iframe",{className:(0,i.default)("linkedin-post",!Q&&"rsme-d-none"),src:E,width:"100%",height:Q?S:0,frameBorder:"0",onLoad:()=>X(!0)}),!Q&&!k&&L)};return Ua.LinkedInEmbed=v,Ua}var fH=fpe();const hpe=(e,t)=>{if(!t)return!1;const n=e.toLowerCase(),r=t.toLowerCase();return r===Oi||r===rh?n===Oi||n===rh:n===r},mpe=({isDetailsFetching:e,connectedId:t,requests:n,esId:r,reviewPeriodId:a,postedByLabel:i,platformType:l,platformLabel:u})=>{var S,M;const[d,f]=D.useState(null),[g,p]=D.useState(!0),[b,v]=D.useState(!0),[y,w]=D.useState(null),A=ipe(),E=spe(),R=n==null?void 0:n.filter(O=>{const P=!g||hpe(O.name,l),N=!b||O.fullName===i;return P&&N}),I=n==null?void 0:n.find(O=>O.id===t);return o.jsxs("div",{id:"social-media-requests",className:"flex flex-col h-full min-h-0 overflow-hidden",children:[o.jsx("h6",{className:"shrink-0 text-brand-dark-800 font-semibold text-lg border-b border-neutral-grey-100 p-3",children:"Social Media Requests"}),t?o.jsxs("div",{className:"p-3 bg-[#fafcfb] flex-1 min-h-0 overflow-y-auto",children:[o.jsxs("p",{className:"flex items-center gap-1 text-brand-medium-500 text-sm font-semibold mb-3",children:[o.jsx(se,{icon:Xte,size:"medium"}),"Request Matched"]}),o.jsxs("div",{id:"connected-social-media-request",className:"relative block border border-brand-medium-500 rounded text-brand-dark-800 p-3 bg-[#f0faf3]",children:[o.jsx("span",{className:"absolute top-3 right-3 text-white text-sm bg-brand-medium-500 text-xs font-semibold px-2 py-1 rounded-xl",children:"Matched"}),o.jsxs("div",{className:"",children:[o.jsx("p",{className:"font-semibold text-brand-dark-800 text-sm",children:I==null?void 0:I.fullName}),o.jsx("p",{className:"text-neutral-grey-400 text-sm",children:(I==null?void 0:I.dateEffective)&&Mn(new Date(I==null?void 0:I.dateEffective),"yyyy-MM-dd")}),o.jsxs("p",{className:"text-neutral-grey-400 text-sm",children:["Platform:"," ",(M=lh[(S=I==null?void 0:I.name)==null?void 0:S.toLowerCase()])!=null?M:Hu(I==null?void 0:I.name)]})]}),o.jsx("p",{className:"text-sm font-normal mt-3 [word-break:break-word] border-t border-neutral-grey-100 pt-3",children:I==null?void 0:I.postText}),o.jsx("div",{className:"flex justify-end mt-3",children:o.jsx(U5,{className:"text-sm! px-3! py-1.5!",disabled:d!==null,onClick:()=>{f({activityId:I==null?void 0:I.id,action:"unmatch"}),E.mutate({activityId:I==null?void 0:I.id,esId:r},{onSettled:()=>f(null)})},children:(d==null?void 0:d.activityId)===(I==null?void 0:I.id)&&(d==null?void 0:d.action)==="unmatch"||e&&(I==null?void 0:I.id)===t?o.jsx(qt,{size:"sm"}):"Unmatch"})})]})]}):o.jsxs("div",{className:"bg-[#fafcfb] flex flex-col flex-1 min-h-0 overflow-hidden",children:[o.jsxs("div",{id:"social-media-filter-requests",className:"shrink-0 p-3 text-neutral-grey-400 border-b border-neutral-grey-100",children:[o.jsx("p",{className:"font-medium text-sm uppercase",children:"Filter by"}),o.jsxs("div",{id:"filter-requests-from",className:"flex flex-wrap gap-2 mt-2",children:[o.jsxs("button",{type:"button",onClick:()=>v(O=>!O),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-xl border bg-white text-sm font-medium cursor-pointer outline-none ${b?"border-brand-medium-500 text-brand-medium-500":"border-neutral-grey-400 text-neutral-grey-400"}`,children:[o.jsx(se,{icon:V6,size:"small"}),i]}),o.jsxs("button",{type:"button",onClick:()=>p(O=>!O),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-xl border bg-white text-sm font-medium cursor-pointer outline-none ${g?"border-brand-medium-500 text-brand-medium-500":"border-neutral-grey-400 text-neutral-grey-400"}`,children:[o.jsx(se,{icon:H6,size:"small"}),Hu(u||l||"")]})]})]}),o.jsx("div",{id:"social-media-requests-list",className:"p-3 flex-1 basis-0 overflow-y-auto min-h-[490px]",children:R==null?void 0:R.map(O=>{var P,N;return o.jsxs("div",{className:"block border border-neutral-grey-100 rounded p-3 text-brand-dark-800 mb-3",children:[o.jsxs("div",{className:"",children:[o.jsxs("p",{className:"text-neutral-grey-400 text-sm",children:["Requested by:"," ",o.jsx("span",{className:"font-semibold text-brand-dark-800",children:O.fullName})]}),o.jsxs("p",{className:"text-neutral-grey-400 text-sm",children:["Date:"," ",O.dateEffective&&Mn(new Date(O.dateEffective),"yyyy-MM-dd")]}),o.jsxs("p",{className:"text-neutral-grey-400 text-sm",children:["Platform:"," ",(N=lh[(P=O==null?void 0:O.name)==null?void 0:P.toLowerCase()])!=null?N:Hu(O.name)]})]}),o.jsx("p",{className:"text-sm font-normal mt-3 [word-break:break-word] border-t border-neutral-grey-100 pt-3",children:O.postText}),o.jsx("div",{className:"text-right mt-3",children:o.jsx("a",{className:"text-sm! inline-block px-3! py-1.5! cursor-pointer text-brand-medium-500 font-semibold hover:underline",onClick:()=>{w(O.id),f({activityId:O.id,action:"match"}),A.mutate({activityId:O.id,esId:r},{onSettled:()=>f(null)})},children:(d==null?void 0:d.activityId)===O.id&&d.action==="match"||e&&O.id===y?o.jsx(qt,{size:"sm",colorClass:"color-white"}):"Match request"})})]},O.id)})})]})]})},ppe="external_",gpe="Comment preview is unavailable",s9=e=>e.esId.startsWith(ppe),HN=["","pl-12","pl-24","pl-36"],VN=e=>HN[Math.min(e,HN.length-1)],vpe=e=>{var n;const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":`${t[0][0]}${t.length>1?(n=t.at(-1))==null?void 0:n[0]:""}`.toUpperCase()},bpe=e=>e.userId!==null?Math.abs(e.userId):Array.from(e.fullName).reduce((t,n)=>(t*31+n.charCodeAt(0))%1e5,7),xpe=e=>{const t=bpe(e)*137.508%360,n=t>40&&t<200?32:42;return`hsl(${t.toFixed(1)} 62% ${n}%)`},ype=e=>{if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?e:Mn(t,"hh:mma")},Ape=e=>{if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?e:Mn(t,"MM/dd/yyyy")},wpe=({direction:e})=>o.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",className:`size-4 ${e==="up"?"rotate-180":""}`,children:o.jsx("path",{d:"m6 9 6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),hH=({comment:e,depth:t,allHighlightedWords:n,highlightTag:r})=>{var g;const[a,i]=D.useState(!1),l=e.fullName||"Unknown user",u=s9(e),d=e.eventType==="updated",f=(g=e.replies)!=null?g:[];return o.jsxs("div",{className:t===0?"border-b border-neutral-grey-100":"",children:[o.jsxs("article",{className:`flex gap-3 py-4 ${VN(t)}`,children:[o.jsx("span",{"aria-hidden":"true",className:`flex size-9 shrink-0 items-center justify-center rounded-full text-xs font-semibold text-white ${u?"bg-neutral-grey-400":""}`,style:u?void 0:{backgroundColor:xpe(e)},children:vpe(l)}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-2 text-sm",children:[o.jsx("span",{className:`font-semibold ${u?"text-neutral-grey-400":"text-brand-dark-800"}`,children:l}),e.posted&&o.jsxs("span",{className:"text-neutral-grey-400",children:[ype(e.posted)," ·"," ",Ape(e.posted)]}),d&&!u&&o.jsx("span",{className:"text-neutral-grey-400",children:"· Edited"})]}),o.jsx("div",{className:"mt-1 text-sm leading-5 break-words whitespace-pre-wrap text-brand-dark-800",children:u?o.jsx("span",{className:"text-neutral-grey-400 italic",children:e.postText||gpe}):o.jsx(q5,{searchWords:n,autoEscape:!0,textToHighlight:e.postText||"",highlightTag:r,findChunks:F5})})]})]}),f.length>0&&o.jsxs(o.Fragment,{children:[a&&f.map(p=>o.jsx(hH,{comment:p,depth:t+1,allHighlightedWords:n,highlightTag:r},p.esId)),o.jsxs("button",{type:"button",onClick:()=>i(p=>!p),className:`flex cursor-pointer items-center gap-1 pb-4 text-sm font-medium text-neutral-grey-400 ${VN(t+1)}`,children:[a?"Hide Replies":"View Replies",o.jsx(wpe,{direction:a?"up":"down"})]})]})]})},mH=({comments:e,flaggedWords:t=[],safePhrases:n=[]})=>{const r=[...t,...n],a=({children:i})=>{var d;const l=(d=i==null?void 0:i.toString())!=null?d:"",u=n.some(f=>f.toLowerCase()===l.toLowerCase());return o.jsx("mark",{className:u?"bg-[#B9FFFF]":"bg-[#FFE562]",children:i})};return o.jsxs("section",{id:"social-media-comments",className:"flex h-[630px] min-h-0 flex-col overflow-hidden rounded border border-neutral-grey-100 bg-white",children:[o.jsxs("div",{className:"mx-4 shrink-0 border-b border-neutral-grey-100 py-4",children:[o.jsxs("h6",{className:"flex items-center gap-2 text-lg font-semibold text-brand-dark-800",children:[o.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",className:"size-5",children:o.jsx("path",{d:"M20 11.5a7.5 7.5 0 0 1-8 7.48 8.7 8.7 0 0 1-3.38-.84L4 20l1.45-4.05A7.5 7.5 0 1 1 20 11.5Z",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"})}),"Comments",o.jsx("span",{className:"inline-flex min-w-6 items-center justify-center rounded-full border border-brand-medium-500 px-1.5 py-0.5 text-xs font-medium text-brand-medium-500",children:e.length})]}),o.jsx("p",{className:"mt-3 text-sm text-neutral-grey-400",children:"Public comments on this post, captured for review."})]}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4",children:e.length===0?o.jsx("p",{className:"py-6 text-sm text-neutral-grey-400",children:"No comments"}):e.map(i=>o.jsx(hH,{comment:i,depth:0,allHighlightedWords:r,highlightTag:a},i.esId))})]})};function pH({url:e,width:t=600,captioned:n=!0}){const r=D.useRef(null),[a,i]=D.useState(400);return D.useEffect(()=>{i(400)},[e]),D.useEffect(()=>{var v,y;const l=r.current;if(!l)return;let u=!0;try{const w=l.contentDocument||((v=l.contentWindow)==null?void 0:v.document);w&&(w.open(),w.write(""),w.close())}catch(w){}const d=`
|
|
509
|
+
c59.905-109.171,178.724-165.463,295.204-151.033v145.035L512,253z`})));e.ShareArrowIcon=d})(mu)),mu}var jo={},zN;function upe(){if(zN)return jo;zN=1;var e=jo&&jo.__rest||function(i,l){var u={};for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&l.indexOf(d)<0&&(u[d]=i[d]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,d=Object.getOwnPropertySymbols(i);f<d.length;f++)l.indexOf(d[f])<0&&Object.prototype.propertyIsEnumerable.call(i,d[f])&&(u[d[f]]=i[d[f]]);return u},t=jo&&jo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(jo,"__esModule",{value:!0}),jo.ProfilePlaceholder=void 0;const n=t(ki()),r=t(Hn()),a=i=>{var l=e(i,[]);return r.default.createElement("div",Object.assign({},l,{className:(0,n.default)(l.className),style:Object.assign({},l.style)}),r.default.createElement("div",{style:{display:"flex",columnGap:14}},r.default.createElement("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"50%",width:40,height:40}}),r.default.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",rowGap:6}},r.default.createElement("div",{style:{backgroundColor:"#F4F4F4",borderRadius:4,width:100,height:14}}),r.default.createElement("div",{style:{backgroundColor:"#F4F4F4",borderRadius:4,width:60,height:14}}))))};return jo.ProfilePlaceholder=a,jo}var qN;function dpe(){if(qN)return Mo;qN=1;var e=Mo&&Mo.__rest||function(g,p){var b={};for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&p.indexOf(v)<0&&(b[v]=g[v]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var y=0,v=Object.getOwnPropertySymbols(g);y<v.length;y++)p.indexOf(v[y])<0&&Object.prototype.propertyIsEnumerable.call(g,v[y])&&(b[v[y]]=g[v[y]]);return b},t=Mo&&Mo.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.PlaceholderEmbed=void 0;const n=t(ki()),r=t(Hn()),a=dH(),i=lpe(),l=cpe(),u=upe(),d=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,f=g=>{var p,{url:b,linkText:v="View post",imageUrl:y,spinner:w=r.default.createElement(i.BorderSpinner,null),allowJavaScriptUrls:A=!0,spinnerDisabled:E}=g,R=e(g,["url","linkText","imageUrl","spinner","allowJavaScriptUrls","spinnerDisabled"]);return d.test(b)&&!A?(console.warn("PlaceholderEmbed has blocked a javascript: URL as a security precaution"),null):r.default.createElement("div",Object.assign({},R,{className:(0,n.default)(R.className),style:Object.assign({overflow:"hidden",border:"1px solid #dee2e6",backgroundColor:"#ffffff",borderRadius:0,boxSizing:"border-box",position:"relative"},R.style)}),r.default.createElement(a.EmbedStyle,null),r.default.createElement("a",{href:b,style:{textDecoration:"none"},target:"_blank",rel:"noopener noreferrer"},!y&&r.default.createElement("div",{style:{position:"absolute",top:0,left:0,display:"flex",justifyContent:"space-between",alignItems:"start",paddingLeft:16,paddingRight:16,paddingTop:16,paddingBottom:16,zIndex:2,backgroundColor:"#ffffff"}},r.default.createElement(u.ProfilePlaceholder,null)),r.default.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:y?"start":"center",height:"100%",width:"100%"}},!y&&r.default.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",rowGap:16,zIndex:3,padding:8,backgroundColor:"#ffffff"}},!E&&w,!!v&&r.default.createElement("div",{style:{color:"#000000",fontFamily:"Arial,sans-serif",fontSize:"14px",fontStyle:"normal",fontWeight:550,lineHeight:"18px",textAlign:"center"}},v)),y&&(typeof((p=R.style)===null||p===void 0?void 0:p.height)!="undefined"?r.default.createElement("div",{style:{width:"100%",height:"100%",background:`url("${y}")`,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",marginBottom:"40"}}):r.default.createElement("div",{style:{width:"100%",marginBottom:40}},r.default.createElement("img",{src:y,style:{width:"100%"}})))),r.default.createElement("div",{style:{position:"absolute",bottom:0,left:0,height:40,width:"100%",backgroundColor:"#ffffff",zIndex:1}},!y&&r.default.createElement(l.EngagementIconsPlaceholder,{style:{marginLeft:16}}),y&&r.default.createElement("div",{style:{display:"flex",height:"100%",alignItems:"center",justifyContent:"space-between",columnGap:16}},r.default.createElement("div",{style:{color:"#0095f6",fontWeight:600,fontFamily:"Arial,sans-serif",fontSize:"14px",fontStyle:"normal",whiteSpace:"nowrap",marginLeft:16}},v),!E&&r.default.createElement("div",{style:{marginRight:16}},w)))))};return Mo.PlaceholderEmbed=f,Mo}var QN;function fpe(){if(QN)return Ua;QN=1;var e=Ua&&Ua.__createBinding||(Object.create?(function(y,w,A,E){E===void 0&&(E=A);var R=Object.getOwnPropertyDescriptor(w,A);(!R||("get"in R?!w.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return w[A]}}),Object.defineProperty(y,E,R)}):(function(y,w,A,E){E===void 0&&(E=A),y[E]=w[A]})),t=Ua&&Ua.__setModuleDefault||(Object.create?(function(y,w){Object.defineProperty(y,"default",{enumerable:!0,value:w})}):function(y,w){y.default=w}),n=Ua&&Ua.__importStar||function(y){if(y&&y.__esModule)return y;var w={};if(y!=null)for(var A in y)A!=="default"&&Object.prototype.hasOwnProperty.call(y,A)&&e(w,y,A);return t(w,y),w},r=Ua&&Ua.__rest||function(y,w){var A={};for(var E in y)Object.prototype.hasOwnProperty.call(y,E)&&w.indexOf(E)<0&&(A[E]=y[E]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,E=Object.getOwnPropertySymbols(y);R<E.length;R++)w.indexOf(E[R])<0&&Object.prototype.propertyIsEnumerable.call(y,E[R])&&(A[E[R]]=y[E[R]]);return A},a=Ua&&Ua.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.LinkedInEmbed=void 0;const i=a(ki()),l=n(Hn()),u=dpe(),d=dH(),f=250,g=550,p=550,b=8,v=y=>{var w,A,{url:E,postUrl:R,width:I,height:S=500,linkText:M="View post on LinkedIn",placeholderImageUrl:O,placeholderSpinner:P,placeholderSpinnerDisabled:N=!1,placeholderProps:T,embedPlaceholder:_,placeholderDisabled:k=!1}=y,z=r(y,["url","postUrl","width","height","linkText","placeholderImageUrl","placeholderSpinner","placeholderSpinnerDisabled","placeholderProps","embedPlaceholder","placeholderDisabled"]);const[Q,X]=l.useState(!1),q={minWidth:f,maxWidth:g,width:typeof I!="undefined"?I:"100%",height:typeof S!="undefined"?S:typeof((w=z.style)===null||w===void 0?void 0:w.height)!="undefined"||typeof((A=z.style)===null||A===void 0?void 0:A.maxHeight)!="undefined"?"100%":p,border:"solid 1px rgba(0, 0, 0, 0.15)",borderRadius:b},L=_!=null?_:l.createElement(u.PlaceholderEmbed,Object.assign({url:R!=null?R:E,imageUrl:O,linkText:M,spinner:P,spinnerDisabled:N},T,{style:Object.assign(Object.assign({},q),T==null?void 0:T.style)}));return l.createElement("div",Object.assign({},z,{className:(0,i.default)("rsme-embed rsme-linkedin-embed",z.className),style:Object.assign({overflow:"hidden",width:I!=null?I:void 0,height:S!=null?S:void 0,borderRadius:b},z.style)}),l.createElement(d.EmbedStyle,null),l.createElement("iframe",{className:(0,i.default)("linkedin-post",!Q&&"rsme-d-none"),src:E,width:"100%",height:Q?S:0,frameBorder:"0",onLoad:()=>X(!0)}),!Q&&!k&&L)};return Ua.LinkedInEmbed=v,Ua}var fH=fpe();const hpe=(e,t)=>{if(!t)return!1;const n=e.toLowerCase(),r=t.toLowerCase();return r===Oi||r===rh?n===Oi||n===rh:n===r},mpe=({isDetailsFetching:e,connectedId:t,requests:n,esId:r,reviewPeriodId:a,postedByLabel:i,platformType:l,platformLabel:u})=>{var S,M;const[d,f]=D.useState(null),[g,p]=D.useState(!0),[b,v]=D.useState(!0),[y,w]=D.useState(null),A=ipe(),E=spe(),R=n==null?void 0:n.filter(O=>{const P=!g||hpe(O.name,l),N=!b||O.fullName===i;return P&&N}),I=n==null?void 0:n.find(O=>O.id===t);return o.jsxs("div",{id:"social-media-requests",className:"flex flex-col h-full min-h-0 overflow-hidden",children:[o.jsx("h6",{className:"shrink-0 text-brand-dark-800 font-semibold text-lg border-b border-neutral-grey-100 p-3",children:"Social Media Requests"}),t?o.jsxs("div",{className:"p-3 bg-[#fafcfb] flex-1 min-h-0 overflow-y-auto",children:[o.jsxs("p",{className:"flex items-center gap-1 text-brand-medium-500 text-sm font-semibold mb-3",children:[o.jsx(se,{icon:Xte,size:"medium"}),"Request Matched"]}),o.jsxs("div",{id:"connected-social-media-request",className:"relative block border border-brand-medium-500 rounded text-brand-dark-800 p-3 bg-[#f0faf3]",children:[o.jsx("span",{className:"absolute top-3 right-3 text-white text-sm bg-brand-medium-500 text-xs font-semibold px-2 py-1 rounded-xl",children:"Matched"}),o.jsxs("div",{className:"",children:[o.jsx("p",{className:"font-semibold text-brand-dark-800 text-sm",children:I==null?void 0:I.fullName}),o.jsx("p",{className:"text-neutral-grey-400 text-sm",children:(I==null?void 0:I.dateEffective)&&Mn(new Date(I==null?void 0:I.dateEffective),"yyyy-MM-dd")}),o.jsxs("p",{className:"text-neutral-grey-400 text-sm",children:["Platform:"," ",(M=lh[(S=I==null?void 0:I.name)==null?void 0:S.toLowerCase()])!=null?M:Hu(I==null?void 0:I.name)]})]}),o.jsx("p",{className:"text-sm font-normal mt-3 [word-break:break-word] border-t border-neutral-grey-100 pt-3",children:I==null?void 0:I.postText}),o.jsx("div",{className:"flex justify-end mt-3",children:o.jsx(U5,{className:"text-sm! px-3! py-1.5!",disabled:d!==null,onClick:()=>{f({activityId:I==null?void 0:I.id,action:"unmatch"}),E.mutate({activityId:I==null?void 0:I.id,esId:r},{onSettled:()=>f(null)})},children:(d==null?void 0:d.activityId)===(I==null?void 0:I.id)&&(d==null?void 0:d.action)==="unmatch"||e&&(I==null?void 0:I.id)===t?o.jsx(qt,{size:"sm"}):"Unmatch"})})]})]}):o.jsxs("div",{className:"bg-[#fafcfb] flex flex-col flex-1 min-h-0 overflow-hidden",children:[o.jsxs("div",{id:"social-media-filter-requests",className:"shrink-0 p-3 text-neutral-grey-400 border-b border-neutral-grey-100",children:[o.jsx("p",{className:"font-medium text-sm uppercase",children:"Filter by"}),o.jsxs("div",{id:"filter-requests-from",className:"flex flex-wrap gap-2 mt-2",children:[o.jsxs("button",{type:"button",onClick:()=>v(O=>!O),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-xl border bg-white text-sm font-medium cursor-pointer outline-none ${b?"border-brand-medium-500 text-brand-medium-500":"border-neutral-grey-400 text-neutral-grey-400"}`,children:[o.jsx(se,{icon:V6,size:"small"}),i]}),o.jsxs("button",{type:"button",onClick:()=>p(O=>!O),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-xl border bg-white text-sm font-medium cursor-pointer outline-none ${g?"border-brand-medium-500 text-brand-medium-500":"border-neutral-grey-400 text-neutral-grey-400"}`,children:[o.jsx(se,{icon:H6,size:"small"}),Hu(u||l||"")]})]})]}),o.jsx("div",{id:"social-media-requests-list",className:"p-3 flex-1 basis-0 overflow-y-auto min-h-[490px]",children:R==null?void 0:R.map(O=>{var P,N;return o.jsxs("div",{className:"block border border-neutral-grey-100 rounded p-3 text-brand-dark-800 mb-3",children:[o.jsxs("div",{className:"",children:[o.jsxs("p",{className:"text-neutral-grey-400 text-sm",children:["Requested by:"," ",o.jsx("span",{className:"font-semibold text-brand-dark-800",children:O.fullName})]}),o.jsxs("p",{className:"text-neutral-grey-400 text-sm",children:["Date:"," ",O.dateEffective&&Mn(new Date(O.dateEffective),"yyyy-MM-dd")]}),o.jsxs("p",{className:"text-neutral-grey-400 text-sm",children:["Platform:"," ",(N=lh[(P=O==null?void 0:O.name)==null?void 0:P.toLowerCase()])!=null?N:Hu(O.name)]})]}),o.jsx("p",{className:"text-sm font-normal mt-3 [word-break:break-word] border-t border-neutral-grey-100 pt-3",children:O.postText}),o.jsx("div",{className:"text-right mt-3",children:o.jsx("a",{className:"text-sm! inline-block px-3! py-1.5! cursor-pointer text-brand-medium-500 font-semibold hover:underline",onClick:()=>{w(O.id),f({activityId:O.id,action:"match"}),A.mutate({activityId:O.id,esId:r},{onSettled:()=>f(null)})},children:(d==null?void 0:d.activityId)===O.id&&d.action==="match"||e&&O.id===y?o.jsx(qt,{size:"sm",colorClass:"color-white"}):"Match request"})})]},O.id)})})]})]})},ppe="external_",gpe="Comment preview is unavailable",s9=e=>e.esId.startsWith(ppe),HN=["","pl-12","pl-24","pl-36"],VN=e=>HN[Math.min(e,HN.length-1)],vpe=e=>{var n;const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":`${t[0][0]}${t.length>1?(n=t.at(-1))==null?void 0:n[0]:""}`.toUpperCase()},bpe=e=>{var n;if(e.userId!==null)return Math.abs(e.userId);const t=(n=e.fullName)==null?void 0:n.trim();return t?Array.from(t).reduce((r,a)=>(r*31+a.charCodeAt(0))%1e5,7):7},xpe=e=>{const t=bpe(e)*137.508%360,n=t>40&&t<200?32:42;return`hsl(${t.toFixed(1)} 62% ${n}%)`},ype=e=>{if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?e:Mn(t,"hh:mma")},Ape=e=>{if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?e:Mn(t,"MM/dd/yyyy")},wpe=({direction:e})=>o.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",className:`size-4 ${e==="up"?"rotate-180":""}`,children:o.jsx("path",{d:"m6 9 6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),hH=({comment:e,depth:t,allHighlightedWords:n,highlightTag:r})=>{var g;const[a,i]=D.useState(!1),l=e.fullName||"Unknown user",u=s9(e),d=e.eventType==="updated",f=(g=e.replies)!=null?g:[];return o.jsxs("div",{className:t===0?"border-b border-neutral-grey-100":"",children:[o.jsxs("article",{className:`flex gap-3 py-4 ${VN(t)}`,children:[o.jsx("span",{"aria-hidden":"true",className:`flex size-9 shrink-0 items-center justify-center rounded-full text-xs font-semibold text-white ${u?"bg-neutral-grey-400":""}`,style:u?void 0:{backgroundColor:xpe(e)},children:vpe(l)}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-2 text-sm",children:[o.jsx("span",{className:`font-semibold ${u?"text-neutral-grey-400":"text-brand-dark-800"}`,children:l}),e.posted&&o.jsxs("span",{className:"text-neutral-grey-400",children:[ype(e.posted)," ·"," ",Ape(e.posted)]}),d&&!u&&o.jsx("span",{className:"text-neutral-grey-400",children:"· Edited"})]}),o.jsx("div",{className:"mt-1 text-sm leading-5 break-words whitespace-pre-wrap text-brand-dark-800",children:u?o.jsx("span",{className:"text-neutral-grey-400 italic",children:e.postText||gpe}):o.jsx(q5,{searchWords:n,autoEscape:!0,textToHighlight:e.postText||"",highlightTag:r,findChunks:F5})})]})]}),f.length>0&&o.jsxs(o.Fragment,{children:[a&&f.map(p=>o.jsx(hH,{comment:p,depth:t+1,allHighlightedWords:n,highlightTag:r},p.esId)),o.jsxs("button",{type:"button",onClick:()=>i(p=>!p),className:`flex cursor-pointer items-center gap-1 pb-4 text-sm font-medium text-neutral-grey-400 ${VN(t+1)}`,children:[a?"Hide Replies":"View Replies",o.jsx(wpe,{direction:a?"up":"down"})]})]})]})},mH=({comments:e,flaggedWords:t=[],safePhrases:n=[]})=>{const r=[...t,...n],a=({children:i})=>{var d;const l=(d=i==null?void 0:i.toString())!=null?d:"",u=n.some(f=>f.toLowerCase()===l.toLowerCase());return o.jsx("mark",{className:u?"bg-[#B9FFFF]":"bg-[#FFE562]",children:i})};return o.jsxs("section",{id:"social-media-comments",className:"flex h-[630px] min-h-0 flex-col overflow-hidden rounded border border-neutral-grey-100 bg-white",children:[o.jsxs("div",{className:"mx-4 shrink-0 border-b border-neutral-grey-100 py-4",children:[o.jsxs("h6",{className:"flex items-center gap-2 text-lg font-semibold text-brand-dark-800",children:[o.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",className:"size-5",children:o.jsx("path",{d:"M20 11.5a7.5 7.5 0 0 1-8 7.48 8.7 8.7 0 0 1-3.38-.84L4 20l1.45-4.05A7.5 7.5 0 1 1 20 11.5Z",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"})}),"Comments",o.jsx("span",{className:"inline-flex min-w-6 items-center justify-center rounded-full border border-brand-medium-500 px-1.5 py-0.5 text-xs font-medium text-brand-medium-500",children:e.length})]}),o.jsx("p",{className:"mt-3 text-sm text-neutral-grey-400",children:"Public comments on this post, captured for review."})]}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4",children:e.length===0?o.jsx("p",{className:"py-6 text-sm text-neutral-grey-400",children:"No comments"}):e.map(i=>o.jsx(hH,{comment:i,depth:0,allHighlightedWords:r,highlightTag:a},i.esId))})]})};function pH({url:e,width:t=600,captioned:n=!0}){const r=D.useRef(null),[a,i]=D.useState(400);return D.useEffect(()=>{i(400)},[e]),D.useEffect(()=>{var v,y;const l=r.current;if(!l)return;let u=!0;try{const w=l.contentDocument||((v=l.contentWindow)==null?void 0:v.document);w&&(w.open(),w.write(""),w.close())}catch(w){}const d=`
|
|
510
510
|
<!DOCTYPE html>
|
|
511
511
|
<html>
|
|
512
512
|
<head>
|