@riab/cpm-archiving 1.1.25-beta.2 → 1.1.25-beta.3

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.
@@ -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 Oo.BorderSpinner=a,Oo}var gu={},dD;function tge(){return dD||(dD=1,(function(e){var t=gu&&gu.__rest||function(f,g){var p={};for(var v in f)Object.prototype.hasOwnProperty.call(f,v)&&g.indexOf(v)<0&&(p[v]=f[v]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,v=Object.getOwnPropertySymbols(f);b<v.length;b++)g.indexOf(v[b])<0&&Object.prototype.propertyIsEnumerable.call(f,v[b])&&(p[v[b]]=f[v[b]]);return p},n=gu&&gu.__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(Bi()),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})(gu)),gu}var Po={},fD;function nge(){if(fD)return Po;fD=1;var e=Po&&Po.__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=Po&&Po.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Po,"__esModule",{value:!0}),Po.ProfilePlaceholder=void 0;const n=t(Bi()),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 Po.ProfilePlaceholder=a,Po}var hD;function rge(){if(hD)return Io;hD=1;var e=Io&&Io.__rest||function(g,p){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&p.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var x=0,b=Object.getOwnPropertySymbols(g);x<b.length;x++)p.indexOf(b[x])<0&&Object.prototype.propertyIsEnumerable.call(g,b[x])&&(v[b[x]]=g[b[x]]);return v},t=Io&&Io.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(Io,"__esModule",{value:!0}),Io.PlaceholderEmbed=void 0;const n=t(Bi()),r=t(Hn()),a=QH(),i=ege(),l=tge(),u=nge(),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:v,linkText:b="View post",imageUrl:x,spinner:w=r.default.createElement(i.BorderSpinner,null),allowJavaScriptUrls:A=!0,spinnerDisabled:E}=g,I=e(g,["url","linkText","imageUrl","spinner","allowJavaScriptUrls","spinnerDisabled"]);return d.test(v)&&!A?(console.warn("PlaceholderEmbed has blocked a javascript: URL as a security precaution"),null):r.default.createElement("div",Object.assign({},I,{className:(0,n.default)(I.className),style:Object.assign({overflow:"hidden",border:"1px solid #dee2e6",backgroundColor:"#ffffff",borderRadius:0,boxSizing:"border-box",position:"relative"},I.style)}),r.default.createElement(a.EmbedStyle,null),r.default.createElement("a",{href:v,style:{textDecoration:"none"},target:"_blank",rel:"noopener noreferrer"},!x&&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:x?"start":"center",height:"100%",width:"100%"}},!x&&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,!!b&&r.default.createElement("div",{style:{color:"#000000",fontFamily:"Arial,sans-serif",fontSize:"14px",fontStyle:"normal",fontWeight:550,lineHeight:"18px",textAlign:"center"}},b)),x&&(typeof((p=I.style)===null||p===void 0?void 0:p.height)!="undefined"?r.default.createElement("div",{style:{width:"100%",height:"100%",background:`url("${x}")`,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",marginBottom:"40"}}):r.default.createElement("div",{style:{width:"100%",marginBottom:40}},r.default.createElement("img",{src:x,style:{width:"100%"}})))),r.default.createElement("div",{style:{position:"absolute",bottom:0,left:0,height:40,width:"100%",backgroundColor:"#ffffff",zIndex:1}},!x&&r.default.createElement(l.EngagementIconsPlaceholder,{style:{marginLeft:16}}),x&&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}},b),!E&&r.default.createElement("div",{style:{marginRight:16}},w)))))};return Io.PlaceholderEmbed=f,Io}var mD;function age(){if(mD)return Ya;mD=1;var e=Ya&&Ya.__createBinding||(Object.create?(function(x,w,A,E){E===void 0&&(E=A);var I=Object.getOwnPropertyDescriptor(w,A);(!I||("get"in I?!w.__esModule:I.writable||I.configurable))&&(I={enumerable:!0,get:function(){return w[A]}}),Object.defineProperty(x,E,I)}):(function(x,w,A,E){E===void 0&&(E=A),x[E]=w[A]})),t=Ya&&Ya.__setModuleDefault||(Object.create?(function(x,w){Object.defineProperty(x,"default",{enumerable:!0,value:w})}):function(x,w){x.default=w}),n=Ya&&Ya.__importStar||function(x){if(x&&x.__esModule)return x;var w={};if(x!=null)for(var A in x)A!=="default"&&Object.prototype.hasOwnProperty.call(x,A)&&e(w,x,A);return t(w,x),w},r=Ya&&Ya.__rest||function(x,w){var A={};for(var E in x)Object.prototype.hasOwnProperty.call(x,E)&&w.indexOf(E)<0&&(A[E]=x[E]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,E=Object.getOwnPropertySymbols(x);I<E.length;I++)w.indexOf(E[I])<0&&Object.prototype.propertyIsEnumerable.call(x,E[I])&&(A[E[I]]=x[E[I]]);return A},a=Ya&&Ya.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.LinkedInEmbed=void 0;const i=a(Bi()),l=n(Hn()),u=rge(),d=QH(),f=250,g=550,p=550,v=8,b=x=>{var w,A,{url:E,postUrl:I,width:R,height:S=500,linkText:M="View post on LinkedIn",placeholderImageUrl:O,placeholderSpinner:P,placeholderSpinnerDisabled:N=!1,placeholderProps:T,embedPlaceholder:L,placeholderDisabled:k=!1}=x,_=r(x,["url","postUrl","width","height","linkText","placeholderImageUrl","placeholderSpinner","placeholderSpinnerDisabled","placeholderProps","embedPlaceholder","placeholderDisabled"]);const[z,B]=l.useState(!1),Q={minWidth:f,maxWidth:g,width:typeof R!="undefined"?R:"100%",height:typeof S!="undefined"?S:typeof((w=_.style)===null||w===void 0?void 0:w.height)!="undefined"||typeof((A=_.style)===null||A===void 0?void 0:A.maxHeight)!="undefined"?"100%":p,border:"solid 1px rgba(0, 0, 0, 0.15)",borderRadius:v},F=L!=null?L:l.createElement(u.PlaceholderEmbed,Object.assign({url:I!=null?I: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({},_,{className:(0,i.default)("rsme-embed rsme-linkedin-embed",_.className),style:Object.assign({overflow:"hidden",width:R!=null?R:void 0,height:S!=null?S:void 0,borderRadius:v},_.style)}),l.createElement(d.EmbedStyle,null),l.createElement("iframe",{className:(0,i.default)("linkedin-post",!z&&"rsme-d-none"),src:E,width:"100%",height:z?S:0,frameBorder:"0",onLoad:()=>B(!0)}),!z&&!k&&F)};return Ya.LinkedInEmbed=b,Ya}var HH=age();const ige=(e,t)=>{if(!t)return!1;const n=e.toLowerCase(),r=t.toLowerCase();return r===Ni||r===oh?n===Ni||n===oh:n===r},sge=({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),[v,b]=D.useState(!0),[x,w]=D.useState(null),A=Z0e(),E=$0e(),I=n==null?void 0:n.filter(O=>{const P=!g||ige(O.name,l),N=!v||O.fullName===i;return P&&N}),R=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:Pne,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:R==null?void 0:R.fullName}),o.jsx("p",{className:"text-neutral-grey-400 text-sm",children:(R==null?void 0:R.dateEffective)&&Cn(new Date(R==null?void 0:R.dateEffective),"yyyy-MM-dd")}),o.jsxs("p",{className:"text-neutral-grey-400 text-sm",children:["Platform:"," ",(M=fh[(S=R==null?void 0:R.name)==null?void 0:S.toLowerCase()])!=null?M:Uu(R==null?void 0:R.name)]})]}),o.jsx("p",{className:"text-sm font-normal mt-3 [word-break:break-word] border-t border-neutral-grey-100 pt-3",children:R==null?void 0:R.postText}),o.jsx("div",{className:"flex justify-end mt-3",children:o.jsx(u6,{className:"text-sm! px-3! py-1.5!",disabled:d!==null,onClick:()=>{f({activityId:R==null?void 0:R.id,action:"unmatch"}),E.mutate({activityId:R==null?void 0:R.id,esId:r},{onSettled:()=>f(null)})},children:(d==null?void 0:d.activityId)===(R==null?void 0:R.id)&&(d==null?void 0:d.action)==="unmatch"||e&&(R==null?void 0:R.id)===t?o.jsx(Pt,{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:()=>b(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 ${v?"border-brand-medium-500 text-brand-medium-500":"border-neutral-grey-400 text-neutral-grey-400"}`,children:[o.jsx(se,{icon:h8,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:f8,size:"small"}),Uu(u||l||"")]})]})]}),o.jsx("div",{id:"social-media-requests-list",className:"p-3 flex-1 basis-0 overflow-y-auto min-h-[490px]",children:I==null?void 0:I.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&&Cn(new Date(O.dateEffective),"yyyy-MM-dd")]}),o.jsxs("p",{className:"text-neutral-grey-400 text-sm",children:["Platform:"," ",(N=fh[(P=O==null?void 0:O.name)==null?void 0:P.toLowerCase()])!=null?N:Uu(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===x?o.jsx(Pt,{size:"sm",colorClass:"color-white"}):"Match request"})})]},O.id)})})]})]})},oge="external_",lge="Comment preview is unavailable",R9=e=>e.esId.startsWith(oge),pD=["","pl-12","pl-24","pl-36"],gD=e=>pD[Math.min(e,pD.length-1)],cge=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()},uge=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},dge=e=>{const t=uge(e)*137.508%360,n=t>40&&t<200?32:42;return`hsl(${t.toFixed(1)} 62% ${n}%)`},fge=e=>{if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?e:Cn(t,"hh:mma")},hge=e=>{if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?e:Cn(t,"MM/dd/yyyy")},mge=e=>{if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?"":`Edited on ${Cn(t,"MMM d, yyyy 'at' h:mm a")}`},pge=({editedDate:e})=>{const t=mge(e);return t?o.jsx("span",{className:"inline-flex w-4 shrink-0 self-center leading-none",children:o.jsx(ed,{content:t,trigger:"mouseenter focusin",children:o.jsx("button",{type:"button","aria-label":t,className:"inline-flex size-4 items-center justify-center rounded-sm text-neutral-grey-400 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-brand-medium-500",children:o.jsx(se,{icon:B0,size:"small",className:"size-3.5 rotate-180"})})})}):null},gge=({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"})}),VH=({comment:e,depth:t,allHighlightedWords:n,highlightTag:r})=>{var g;const[a,i]=D.useState(!1),l=e.fullName||"Unknown user",u=R9(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 ${gD(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:dge(e)},children:cge(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:[fge(e.posted)," ·"," ",hge(e.posted)]}),d&&!u&&o.jsxs("span",{className:"inline-flex items-baseline gap-0.5 text-neutral-grey-400",children:[o.jsx("span",{children:"· Edited"}),o.jsx(pge,{editedDate:e.editedDate})]})]}),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||lge}):o.jsx(s6,{searchWords:n,autoEscape:!0,textToHighlight:e.postText||"",highlightTag:r,findChunks:r6})})]})]}),f.length>0&&o.jsxs(o.Fragment,{children:[a&&f.map(p=>o.jsx(VH,{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 ${gD(t+1)}`,children:[a?"Hide Replies":"View Replies",o.jsx(gge,{direction:a?"up":"down"})]})]})]})},UH=({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(VH,{comment:i,depth:0,allHighlightedWords:r,highlightTag:a},i.esId))})]})};function WH({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 b,x;const l=r.current;if(!l)return;let u=!0;try{const w=l.contentDocument||((b=l.contentWindow)==null?void 0:b.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})(gu)),gu}var Po={},fD;function nge(){if(fD)return Po;fD=1;var e=Po&&Po.__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=Po&&Po.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Po,"__esModule",{value:!0}),Po.ProfilePlaceholder=void 0;const n=t(Bi()),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 Po.ProfilePlaceholder=a,Po}var hD;function rge(){if(hD)return Io;hD=1;var e=Io&&Io.__rest||function(g,p){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&p.indexOf(b)<0&&(v[b]=g[b]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var x=0,b=Object.getOwnPropertySymbols(g);x<b.length;x++)p.indexOf(b[x])<0&&Object.prototype.propertyIsEnumerable.call(g,b[x])&&(v[b[x]]=g[b[x]]);return v},t=Io&&Io.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(Io,"__esModule",{value:!0}),Io.PlaceholderEmbed=void 0;const n=t(Bi()),r=t(Hn()),a=QH(),i=ege(),l=tge(),u=nge(),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:v,linkText:b="View post",imageUrl:x,spinner:w=r.default.createElement(i.BorderSpinner,null),allowJavaScriptUrls:A=!0,spinnerDisabled:E}=g,I=e(g,["url","linkText","imageUrl","spinner","allowJavaScriptUrls","spinnerDisabled"]);return d.test(v)&&!A?(console.warn("PlaceholderEmbed has blocked a javascript: URL as a security precaution"),null):r.default.createElement("div",Object.assign({},I,{className:(0,n.default)(I.className),style:Object.assign({overflow:"hidden",border:"1px solid #dee2e6",backgroundColor:"#ffffff",borderRadius:0,boxSizing:"border-box",position:"relative"},I.style)}),r.default.createElement(a.EmbedStyle,null),r.default.createElement("a",{href:v,style:{textDecoration:"none"},target:"_blank",rel:"noopener noreferrer"},!x&&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:x?"start":"center",height:"100%",width:"100%"}},!x&&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,!!b&&r.default.createElement("div",{style:{color:"#000000",fontFamily:"Arial,sans-serif",fontSize:"14px",fontStyle:"normal",fontWeight:550,lineHeight:"18px",textAlign:"center"}},b)),x&&(typeof((p=I.style)===null||p===void 0?void 0:p.height)!="undefined"?r.default.createElement("div",{style:{width:"100%",height:"100%",background:`url("${x}")`,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",marginBottom:"40"}}):r.default.createElement("div",{style:{width:"100%",marginBottom:40}},r.default.createElement("img",{src:x,style:{width:"100%"}})))),r.default.createElement("div",{style:{position:"absolute",bottom:0,left:0,height:40,width:"100%",backgroundColor:"#ffffff",zIndex:1}},!x&&r.default.createElement(l.EngagementIconsPlaceholder,{style:{marginLeft:16}}),x&&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}},b),!E&&r.default.createElement("div",{style:{marginRight:16}},w)))))};return Io.PlaceholderEmbed=f,Io}var mD;function age(){if(mD)return Ya;mD=1;var e=Ya&&Ya.__createBinding||(Object.create?(function(x,w,A,E){E===void 0&&(E=A);var I=Object.getOwnPropertyDescriptor(w,A);(!I||("get"in I?!w.__esModule:I.writable||I.configurable))&&(I={enumerable:!0,get:function(){return w[A]}}),Object.defineProperty(x,E,I)}):(function(x,w,A,E){E===void 0&&(E=A),x[E]=w[A]})),t=Ya&&Ya.__setModuleDefault||(Object.create?(function(x,w){Object.defineProperty(x,"default",{enumerable:!0,value:w})}):function(x,w){x.default=w}),n=Ya&&Ya.__importStar||function(x){if(x&&x.__esModule)return x;var w={};if(x!=null)for(var A in x)A!=="default"&&Object.prototype.hasOwnProperty.call(x,A)&&e(w,x,A);return t(w,x),w},r=Ya&&Ya.__rest||function(x,w){var A={};for(var E in x)Object.prototype.hasOwnProperty.call(x,E)&&w.indexOf(E)<0&&(A[E]=x[E]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,E=Object.getOwnPropertySymbols(x);I<E.length;I++)w.indexOf(E[I])<0&&Object.prototype.propertyIsEnumerable.call(x,E[I])&&(A[E[I]]=x[E[I]]);return A},a=Ya&&Ya.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.LinkedInEmbed=void 0;const i=a(Bi()),l=n(Hn()),u=rge(),d=QH(),f=250,g=550,p=550,v=8,b=x=>{var w,A,{url:E,postUrl:I,width:R,height:S=500,linkText:M="View post on LinkedIn",placeholderImageUrl:O,placeholderSpinner:P,placeholderSpinnerDisabled:N=!1,placeholderProps:T,embedPlaceholder:L,placeholderDisabled:k=!1}=x,_=r(x,["url","postUrl","width","height","linkText","placeholderImageUrl","placeholderSpinner","placeholderSpinnerDisabled","placeholderProps","embedPlaceholder","placeholderDisabled"]);const[z,B]=l.useState(!1),Q={minWidth:f,maxWidth:g,width:typeof R!="undefined"?R:"100%",height:typeof S!="undefined"?S:typeof((w=_.style)===null||w===void 0?void 0:w.height)!="undefined"||typeof((A=_.style)===null||A===void 0?void 0:A.maxHeight)!="undefined"?"100%":p,border:"solid 1px rgba(0, 0, 0, 0.15)",borderRadius:v},F=L!=null?L:l.createElement(u.PlaceholderEmbed,Object.assign({url:I!=null?I: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({},_,{className:(0,i.default)("rsme-embed rsme-linkedin-embed",_.className),style:Object.assign({overflow:"hidden",width:R!=null?R:void 0,height:S!=null?S:void 0,borderRadius:v},_.style)}),l.createElement(d.EmbedStyle,null),l.createElement("iframe",{className:(0,i.default)("linkedin-post",!z&&"rsme-d-none"),src:E,width:"100%",height:z?S:0,frameBorder:"0",onLoad:()=>B(!0)}),!z&&!k&&F)};return Ya.LinkedInEmbed=b,Ya}var HH=age();const ige=(e,t)=>{if(!t)return!1;const n=e.toLowerCase(),r=t.toLowerCase();return r===Ni||r===oh?n===Ni||n===oh:n===r},sge=({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),[v,b]=D.useState(!0),[x,w]=D.useState(null),A=Z0e(),E=$0e(),I=n==null?void 0:n.filter(O=>{const P=!g||ige(O.name,l),N=!v||O.fullName===i;return P&&N}),R=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:Pne,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:R==null?void 0:R.fullName}),o.jsx("p",{className:"text-neutral-grey-400 text-sm",children:(R==null?void 0:R.dateEffective)&&Cn(new Date(R==null?void 0:R.dateEffective),"yyyy-MM-dd")}),o.jsxs("p",{className:"text-neutral-grey-400 text-sm",children:["Platform:"," ",(M=fh[(S=R==null?void 0:R.name)==null?void 0:S.toLowerCase()])!=null?M:Uu(R==null?void 0:R.name)]})]}),o.jsx("p",{className:"text-sm font-normal mt-3 [word-break:break-word] border-t border-neutral-grey-100 pt-3",children:R==null?void 0:R.postText}),o.jsx("div",{className:"flex justify-end mt-3",children:o.jsx(u6,{className:"text-sm! px-3! py-1.5!",disabled:d!==null,onClick:()=>{f({activityId:R==null?void 0:R.id,action:"unmatch"}),E.mutate({activityId:R==null?void 0:R.id,esId:r},{onSettled:()=>f(null)})},children:(d==null?void 0:d.activityId)===(R==null?void 0:R.id)&&(d==null?void 0:d.action)==="unmatch"||e&&(R==null?void 0:R.id)===t?o.jsx(Pt,{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:()=>b(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 ${v?"border-brand-medium-500 text-brand-medium-500":"border-neutral-grey-400 text-neutral-grey-400"}`,children:[o.jsx(se,{icon:h8,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:f8,size:"small"}),Uu(u||l||"")]})]})]}),o.jsx("div",{id:"social-media-requests-list",className:"p-3 flex-1 basis-0 overflow-y-auto min-h-[490px]",children:I==null?void 0:I.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&&Cn(new Date(O.dateEffective),"yyyy-MM-dd")]}),o.jsxs("p",{className:"text-neutral-grey-400 text-sm",children:["Platform:"," ",(N=fh[(P=O==null?void 0:O.name)==null?void 0:P.toLowerCase()])!=null?N:Uu(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===x?o.jsx(Pt,{size:"sm",colorClass:"color-white"}):"Match request"})})]},O.id)})})]})]})},oge="external_",lge="Comment preview is unavailable",R9=e=>e.esId.startsWith(oge),pD=["","pl-12","pl-24","pl-36"],gD=e=>pD[Math.min(e,pD.length-1)],cge=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()},uge=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},dge=e=>{const t=uge(e)*137.508%360,n=t>40&&t<200?32:42;return`hsl(${t.toFixed(1)} 62% ${n}%)`},fge=e=>{if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?e:Cn(t,"hh:mma")},hge=e=>{if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?e:Cn(t,"MM/dd/yyyy")},mge=e=>{if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?"":`Edited on ${Cn(t,"MMM d, yyyy 'at' h:mm a")}`},pge=({editedDate:e})=>{const t=mge(e);return t?o.jsx("span",{className:"inline-flex w-4 shrink-0 self-center leading-none",children:o.jsx(ed,{content:t,trigger:"mouseenter focusin",children:o.jsx("button",{type:"button","aria-label":t,className:"inline-flex size-4 items-center justify-center rounded-sm text-neutral-grey-400 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-brand-medium-500",children:o.jsx(se,{icon:B0,size:"small",className:"size-3.5 rotate-180"})})})}):null},gge=({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"})}),VH=({comment:e,depth:t,allHighlightedWords:n,highlightTag:r})=>{var g;const[a,i]=D.useState(!1),l=e.fullName||"Unknown user",u=R9(e),d=e.editedDate&&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 ${gD(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:dge(e)},children:cge(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:[fge(e.posted)," ·"," ",hge(e.posted)]}),d&&!u&&o.jsxs("span",{className:"inline-flex items-baseline gap-0.5 text-neutral-grey-400",children:[o.jsx("span",{children:"· Edited"}),o.jsx(pge,{editedDate:e.editedDate})]})]}),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||lge}):o.jsx(s6,{searchWords:n,autoEscape:!0,textToHighlight:e.postText||"",highlightTag:r,findChunks:r6})})]})]}),f.length>0&&o.jsxs(o.Fragment,{children:[a&&f.map(p=>o.jsx(VH,{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 ${gD(t+1)}`,children:[a?"Hide Replies":"View Replies",o.jsx(gge,{direction:a?"up":"down"})]})]})]})},UH=({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(VH,{comment:i,depth:0,allHighlightedWords:r,highlightTag:a},i.esId))})]})};function WH({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 b,x;const l=r.current;if(!l)return;let u=!0;try{const w=l.contentDocument||((b=l.contentWindow)==null?void 0:b.document);w&&(w.open(),w.write(""),w.close())}catch(w){}const d=`
510
510
  <!DOCTYPE html>
511
511
  <html>
512
512
  <head>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@riab/cpm-archiving",
3
3
  "private": false,
4
- "version": "1.1.25-beta.2",
4
+ "version": "1.1.25-beta.3",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=26.12.1 <27"