@reltio/remotes 1.4.1575 → 1.4.1576

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/122.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[122],{97991:(e,t,n)=>{n.d(t,{Z:()=>u});var r,a=n(94079),i=n(71153),o=n.n(i),l=n(24328),s=n.n(l);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}!function(e){e[e.ICON_MODE=0]="ICON_MODE",e[e.TEXT_MODE=1]="TEXT_MODE",e[e.ERROR_MODE=2]="ERROR_MODE"}(r||(r={}));const u=e=>{let{className:t,icon:n,avatarText:i,rootClasses:u}=e,d=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","icon","avatarText","rootClasses"]);const[p,h]=(0,l.useState)(null);(0,l.useEffect)((()=>{h(n?r.ICON_MODE:r.TEXT_MODE)}),[n,i]);const m=()=>{h(r.ERROR_MODE)};switch(p){case r.ICON_MODE:return s().createElement(a.Avatar,c({className:o()(t,null==u?void 0:u.iconRoot),src:n,onError:m},d));case r.TEXT_MODE:case r.ERROR_MODE:return s().createElement(a.Avatar,c({className:o()(t,null==u?void 0:u.textRoot)},d),i);default:return null}}},32528:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(13688),a=n(48852);const i=e=>t=>(0,a.l)(r.X,e,t)},60894:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),a=n.n(r),i=n(13980),o=n.n(i),l=n(94656);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:20,height:18,viewBox:"0 0 20 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M16 7.24V6h-4v1.24a8.417 8.417 0 00-2 .768V6H6v6h.29a8.497 8.497 0 00-.15.358l-.29.733.29.733.07.176H2c-1.1 0-2-.9-2-2V2C0 .9.9 0 2 0h14c1.1 0 2 .9 2 2v6.008a8.417 8.417 0 00-2-.768zM4 12V6H2v6h2zm0-8V2H2v2h2zm6 0V2H6v2h4zm6 0V2h-4v2h4zm-2 5a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091A6.451 6.451 0 0014 9zm0 6.818a2.728 2.728 0 010-5.454 2.728 2.728 0 010 5.454zm0-4.363c-.905 0-1.636.73-1.636 1.636 0 .905.73 1.636 1.636 1.636.905 0 1.636-.73 1.636-1.636 0-.906-.73-1.636-1.636-1.636z",fill:"#000",fillRule:"nonzero",stroke:"none",strokeWidth:1,opacity:.54}));var u=n(8818),d=n(50914),p=n(47458),h=n(2507),m=n.n(h),g=n(85657);const f=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:i,title:o,tooltipTitle:l}=e;const[s,h]=(0,r.useState)(null),f=(0,r.useCallback)((e=>{const t=(0,d.pipe)(g.JJ,(0,d.pluck)("id"))(e),r=(0,g.u)(n,e);i(r?(0,d.difference)(n,t):(0,d.uniq)((0,d.concat)(n,t)))}),[n,i]);return a().createElement(a().Fragment,null,a().createElement(u.k,{tooltipTitle:l||m().text("Show/hide columns"),size:"L",icon:c,onClick:e=>h(e.currentTarget)}),a().createElement(p.G,{onColumnClick:f,anchorEl:s,columnsData:t,onClose:()=>h(null),title:o,selectedColumns:n}))};f.propTypes={columnsData:l.uz,selectedColumns:o().arrayOf(o().string),onChangeColumns:o().func,title:o().string,tooltipTitle:o().string};const b=f},47458:(e,t,n)=>{n.d(t,{G:()=>E});var r=n(24328),a=n.n(r),i=n(2507),o=n.n(i),l=n(50914),s=n(81559),c=n(44890),u=n(97820),d=n(85657),p=n(56656),h=n(54763),m=n(13980),g=n.n(m),f=n(7785),b=n(27239),y=n(71153),v=n.n(y);const x=(0,n(79692).Z)({popup:{minWidth:"200px"},groupItem:{backgroundColor:"rgba(0,0,0,0.04)"}}),C=e=>{let{item:t,onClick:n,checked:r,level:i,style:o,isFocused:l,isGroupItem:s,hideCheckBox:c}=e;const u=x();return a().createElement(f.Z,{hideCheckBox:c,key:t.id,onClick:n,checked:r,level:i,data:t,label:a().createElement(b.Z,{text:t.label,highlight:t.filterText}),labelInText:t.label,style:o,isFocused:l,hideIcon:s,className:v()({[u.groupItem]:s})})};C.propTypes={item:g().shape({label:g().string,filterText:g().string}),level:g().number,onClick:g().func,checked:g().bool,style:g().object,isGroupItem:g().bool,isFocused:g().bool,hideCheckBox:g().bool};const O=C,E=e=>{let{anchorEl:t,onClose:n,title:i,columnsData:m,onColumnClick:g,selectedColumns:f,hideCheckBox:b}=e;const y=x(),[v,C]=(0,r.useState)(""),E=(0,r.useMemo)((()=>(0,d.eX)(m,v)),[m,v]),S=(0,r.useMemo)((()=>(0,p.LG)(E)),[E]),k=(0,s.fW1)("label")(E)||308,P=(0,r.useCallback)((e=>{let{item:t}=e;return g(t)}),[g]),{focusIndex:I,handleKeyDown:T}=(0,h.t)({items:S,open:!0,onSelectFocusedItem:P,selectedItems:f,onClose:n}),w=(0,r.useCallback)((0,l.pipe)(n,(()=>C(""))),[n]),j=Math.min(300,32*S.length),N=Math.max(140,j+108);return a().createElement(u.Z,{className:y.popup,open:!!t,anchorEl:t,onClose:w,onSearch:C,title:i||o().text("Show/hide columns"),containerWidth:k,containerHeight:N,searchInputOnKeyDown:T},a().createElement(c.Z,{fixedTitle:!1,height:j,renderItem:(e,t,n)=>{let{item:r,level:i=0}=t;return a().createElement(O,{hideCheckBox:b,style:e,item:r,level:i,isFocused:I===n,checked:(0,d.u)(f,r),isGroupItem:(0,d.yf)(r),onClick:b?(0,l.pipe)(g,w):g})},items:S,getItemSize:()=>32,focusIndex:I}))}},85657:(e,t,n)=>{n.d(t,{eX:()=>b,JJ:()=>y,yf:()=>l,u:()=>v});var r=n(50914),a=n(81559);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){o(e,t,n[t])}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=e=>e.id===e.groupId,s=(0,r.curry)(((e,t)=>{let{id:n,groupId:r}=e;return t.groupId===r&&(n===t.id||n.startsWith(`${t.id}.`))})),c=(0,r.curry)(((e,t)=>{let{groupId:n}=e;return n===t.id})),u=(0,r.propOr)(!0,"hideable"),d=(e,t)=>{const n=((e,t)=>e.find((0,r.either)(c(t),s(t))))(e,t);return n?(n.children=d(n.children||[],t),e):e.concat(t)},p=(0,r.curry)(((e,t)=>a.P6Y.strings.search(t.label,e)||(t.children||[]).some(p(e)))),h=(0,r.reduce)(((e,t)=>d(e,{id:t.id,groupId:t.groupId,label:t.label,attrType:t.dataTypeDefinition})),[]),m=(0,r.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,r.pipe)((0,r.filter)(p(e)),(0,r.chain)((t=>[{item:i({},t,{filterText:e}),level:n},...t.children?m(e,t.children,n+1):[]])))(t)})),g=(0,r.has)("columns"),f=e=>{let{id:t,label:n,columns:a}=e;return[{id:t,groupId:t,label:n},...a.map((0,r.assoc)("groupId",t))]},b=(e,t)=>(0,r.pipe)((0,r.chain)((0,r.when)(g,f)),(0,r.filter)((0,r.either)(l,u)),h,m(t))(e),y=e=>e.children?(0,r.chain)(y,e.children):[e],v=(e,t)=>{const n=y(t),r=t=>e.includes(t.id);return l(t)?n.every(r):n.some(r)}},68439:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),a=n.n(r),i=n(52730),o=n(71153),l=n.n(o),s=n(94079),c=n(81559),u=n(86051),d=n(95613);const p=(0,n(79692).Z)({"entityType-overflow":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",marginRight:"12px",borderRadius:"2px",flexShrink:0},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",marginRight:"16px",flexShrink:0}}),h=e=>{let{entity:t,className:n,size:r="small"}=e;const o=p(),h=(0,i.useSelector)(u.ZP.selectors.getMetadata),m=t.type,g=(0,c.nt9)(h,m)||{},f=(0,c.VD3)(h,g,"typeColor")||c.rSc.palette.primary.main,b=(0,c.jFi)(h,t);return a().createElement(d.Z,{value:b,placement:"top"},a().createElement(s.Typography,{style:{backgroundColor:f,color:c.P6Y.Colors.getColor(f)?"#FFFFFF":"#212121"},className:l()(o[`entityType-${r}`],o["entityType-overflow"],n),component:"div"},b))}},64459:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),a=n.n(r),i=n(71153),o=n.n(i),l=n(52730),s=n(50914),c=n(94079),u=n(2507),d=n.n(u),p=n(81559),h=n(86051),m=n(53180),g=n(68439);const f=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"0px 1px 0px rgba(0, 0, 0, 0.12)",marginBottom:"1px","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),b=e=>{let{className:t,entity:n,children:i,classes:u,renderLabel:b=s.identity}=e;const y=f({classes:u}),v=(0,l.useSelector)(h.ZP.selectors.getMetadata),x=(0,l.useSelector)(h.ZP.selectors.getShowEntityId),C=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,p.BTI)(n))}),[n]);if((0,s.isNil)(n))return null;const O=(0,p.idV)(n.label),E=n.secondaryLabel,S=(0,p.ptG)(v,n),k=(0,p.Fn9)(n),P=n.uri,I=(0,p.BTI)(n);return a().createElement("div",{className:o()(y.profileBandWrapper,t)},a().createElement("div",{className:o()(y.profileBand,{[y.inactive]:!k}),"data-entity-uri":P},a().createElement(m.Z,{key:n.uri,entity:n,avatarClassName:y.profileIcon,imageClassName:y.imageProfileIcon}),a().createElement("div",{className:y.profileInfo},a().createElement("div",null,a().createElement(c.Typography,{variant:"h6",className:y.label},b(O)),E&&a().createElement(c.Typography,{variant:"subtitle2",className:y.secondaryLabel},E),S&&a().createElement(c.Typography,{variant:"subtitle1",className:y.businessCard},S)),a().createElement("div",{className:y.specialInfo},a().createElement("div",{className:y.entityType},a().createElement(g.Z,{entity:n,size:"medium",className:y.badge}),!(0,p.ZiX)(P)&&x&&a().createElement(c.Tooltip,{title:d().text("Copy to clipboard")},a().createElement(c.Typography,{display:"inline",variant:"body2",className:y.entityId,onClick:C},d().text("Entity ID"),": ",I))))),i&&a().createElement("div",null,i)))}},79618:(e,t,n)=>{n.d(t,{a:()=>F});var r=n(24328),a=n.n(r),i=n(94079),o=n(67766),l=n(42767),s=n(81559),c=n(71153),u=n.n(c),d=n(50914),p=n(2507),h=n.n(p),m=n(79468),g=n(83348),f=n(8818);const b=(0,n(79692).Z)({container:{display:"flex",alignItems:"center"},link:{whiteSpace:"nowrap",marginRight:"9px"}}),y=(0,g.Z)(i.Link),v=e=>{var t;let{className:n,total:i=0,onPrev:c,onNext:p,onSearchResultsClick:g,isPrevDisabled:v,isNextDisabled:x}=e;const C=b(),O=(0,r.useContext)(m.T),{OPEN_RESULTS:E,SEARCH_RESULT:S,SEARCH_RESULTS:k,NEXT_PROFILE:P,PREVIOUS_PROFILE:I}=(0,d.mergeRight)({OPEN_RESULTS:h().text("Go to search results"),SEARCH_RESULT:h().text("Search result"),SEARCH_RESULTS:h().text("Search results"),PREVIOUS_PROFILE:h().text("Go to previous profile"),NEXT_PROFILE:h().text("Go to next profile")},null!==(t=null==O?void 0:O.profileBand)&&void 0!==t?t:{});return a().createElement("div",{className:u()(C.container,n)},a().createElement(y,{className:C.link,component:"button",variant:"caption",onClick:g,underline:"none",tooltipTitle:E},(0,s.k7L)(i,1e6)," ",1===i?S:k),a().createElement(f.k,{size:"L",icon:o.Z,"data-reltio-id":"reltio-previous-profile-button",tooltipTitle:I,onClick:c,disabled:v,showForDisabled:!0}),a().createElement(f.k,{size:"L",icon:l.Z,"data-reltio-id":"reltio-next-profile-button",tooltipTitle:P,onClick:p,disabled:x,showForDisabled:!0}))};var x=n(52730),C=n(86051),O=n(94622),E=n(47898),S=n(54198),k=n(85229);function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){I(e,t,n[t])}))}return e}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class T{constructor(e){var t=this;let{data:{query:n,sortField:r,sortOrder:a},tenant:i,searchTenant:o,apiPath:l,dtssPath:c,globalSearchRequestOptions:u}=e;this.query=void 0,this.sortField=void 0,this.sortOrder=void 0,this.tenant=void 0,this.searchTenant=void 0,this.apiPath=void 0,this.dtssPath=void 0,this.globalSearchRequestOptions=void 0,this.isDT=()=>this.tenant!==this.searchTenant,this.getQueryFilter=()=>({rawFilter:this.query}),this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[t.getQueryFilter(),...e],a=P({},t.globalSearchRequestOptions,{sort:t.sortField,order:t.sortOrder,select:"uri,label,type",scoreEnabled:!1},n);return t.isDT()?(0,s.uqV)({filters:r,options:a,customerTenant:t.tenant,dataTenant:t.searchTenant,dtssPath:t.dtssPath}):(0,s.ZOr)(r,a)},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"uri",values:[e]}],{offset:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{offset:t,max:e}),this.requestTotal=()=>{const e=[this.getQueryFilter()],t=this.globalSearchRequestOptions;return(this.isDT()?(0,s.J$m)({filters:e,options:t,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,s.j_Q)(e,t)).then((e=>e.total))},this.query=n,this.sortField=r,this.sortOrder=a,this.tenant=i,this.searchTenant=o,this.apiPath=l,this.dtssPath=c,this.globalSearchRequestOptions=u}}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){j(e,t,n[t])}))}return e}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class N{constructor(e){var t=this;let{data:n,tenant:r,apiPath:a}=e;this.searchBody=void 0,this.tenant=void 0,this.apiPath=void 0,this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[{rawFilter:t.searchBody.filter},...e];return(0,s.P2h)({apiPath:t.apiPath,tenant:t.tenant,searchBody:w({},t.searchBody,{filter:e.length?(0,s.Uqd)()(r):t.searchBody.filter}),options:n})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"id",values:[(0,s.BTI)({uri:e})]}],{from:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{from:t,max:e}),this.requestTotal=()=>(0,s.dED)({apiPath:this.apiPath,tenant:this.tenant,searchBody:this.searchBody}).then((e=>e.count)),this.searchBody=n,this.tenant=r,this.apiPath=a}}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){D(e,t,n[t])}))}return e}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Z=(e,t)=>(0,d.pipe)((0,d.map)((0,d.prop)("uri")),(0,d.reject)((e=>t.includes(e))))(e),z=()=>{const e=(0,k._)(),t=(0,k._)(),n=(0,k._)(),{uri:a,index:i,total:o,tenant:l,cache:c}=(0,x.useSelector)(C.ZP.selectors.getSearchNavigationData)||{},{type:u,data:d}=(0,x.useSelector)(C.ZP.selectors.getSearchProviderData)||{},p=(0,x.useSelector)(C.ZP.selectors.getTenant),h=(0,x.useSelector)(C.ZP.selectors.getApiPath),m=(0,x.useSelector)(C.ZP.selectors.getDtssPath),g=(0,x.useSelector)((e=>C.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]))),{updateEntitiesNavigationLoadingState:f}=(0,O.M)(),b=(0,r.useContext)(E.m),y=(0,x.useDispatch)(),[v,P]=(0,r.useState)(!1),I=(0,r.useMemo)((()=>((e,t)=>{switch(e){case"search":return new T(t);case"graphsearch":return new N(t)}})(u,{data:d,tenant:p,searchTenant:l,apiPath:h,dtssPath:m,globalSearchRequestOptions:g})),[u,d,p,l,h,m,g]),w=(0,r.useCallback)((e=>{y(C.yC.actions.updateSearchNavigationDataFields(e))}),[y]),j=(0,r.useCallback)((e=>{const t=p!==l?(0,s.wwR)({uri:e,dataTenant:l}):e;y(C.ui.actions.openEntity({uri:t,viewId:b,source:"navigation"}))}),[y,b,p,l]),D=(0,r.useCallback)((()=>{y(C.ui.actions.openPerspective({perspectiveId:u,viewId:b}))}),[y,u,b]);(0,r.useEffect)((()=>{i>=o?w({index:o-1}):i<0&&w({index:0})}),[o,i,w]);const z=(0,S.u)();(0,r.useEffect)((()=>{const e=z(((e,t)=>{switch(e.type){case C.yC.constants.UPDATE_SEARCH_NAVIGATION_DATA_ON_MERGE:{const n=C.ZP.selectors.getSearchNavigationData(t);n&&w(((e,t)=>{const{winnerUri:n,losersUris:r=[]}=t,a=((e,t)=>{let{uri:n,index:r,total:a,cache:i}=e;if(t&&t!==n){if(i&&i.includes(n)){i=[...i];const e=i.indexOf(t);let o=i.indexOf(n);e>=0&&(i.splice(e,1),a--,e<o&&r--),o=i.indexOf(n),i.splice(o,1,t)}return n=t,R({},e,{uri:n,index:r,cache:i,total:a})}return e})(e,n);return((e,t)=>{const{cache:n=[],index:r,total:a,uri:i}=e,o=t.filter((e=>n.includes(e)));if(0===o.length)return e;const l=a-o.length,s=n.indexOf(i);let c=r;for(const e of o)n.indexOf(e)<s&&c--;const u=n.filter((e=>!o.includes(e)));return R({},e,{cache:u,index:c,total:l})})(a,r)})(n,e.payload));break}}}));return()=>e()}),[z,w]);const F=(0,r.useCallback)(((e,r,a)=>{P(!0),t(I.requestTotal()).then((e=>w({total:e})));const i=a+1;return n(I.requestEntities(15,i)).then((t=>{if(t){if(t.length){const n=Z(t,e);if(n.length>0)return w({cache:e.concat(n),uri:n[0],index:i+t.length-n.length}),void j(n[0]);if(a+t.length<r-1)return F(e,r-t.length,a+t.length)}w({index:i})}})).finally((()=>{P(!1)}))}),[I,w,j]),_=(0,r.useCallback)(((e,r)=>{P(!0),t(I.requestTotal()).then((e=>w({total:e})));const a=r-1,i=Math.max(0,r-15),o=15+Math.min(0,r-15);return n(I.requestEntities(o,i)).then((t=>{if(t){if(t.length){const n=Z(t,e);if(n.length>0)return w({cache:n.concat(e),uri:n[n.length-1],index:a-(t.length-n.length)}),void j(n[n.length-1]);if(r-t.length>0)return _(e,r-t.length)}w({index:0})}})).finally((()=>{P(!1)}))}),[I,w,j]),B=(0,r.useCallback)(((t,n,r,a)=>{if(n<t.length){const i=t[n];return P(!0),e(I.checkEntity(i)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),B(e,n,r-1,a)}w({index:a+1,uri:i,cache:t,total:r}),j(i)})).finally((()=>{P(!1)}))}if(!(a>=r-1))return F(t,r,a);w({cache:t,total:r,index:r-1})}),[I,w,j,F]),L=(0,r.useCallback)(((t,n,r,a)=>{if(n>-1){const i=t[n];return P(!0),e(I.checkEntity(i)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),L(e,n-1,r-1,a-1)}w({index:a-1,uri:i,cache:t,total:r}),j(i)})).finally((()=>{P(!1)}))}if(!(a<=0))return _(t,a);w({index:0,cache:t,total:r})}),[I,w,j,_]),M=(0,r.useCallback)((()=>{if(c&&a){const e=c.indexOf(a)-1;L(c,e,o,i)}}),[L,c,a,o,i]),q=(0,r.useCallback)((()=>{if(c&&a){const e=c.indexOf(a)+1;B(c,e,o,i)}}),[B,c,a,o,i]);return(0,r.useEffect)((()=>{f(v)}),[f,v]),(0,r.useEffect)((()=>()=>f(!1)),[]),{total:o,onPrev:M,onNext:q,onSearchResultsClick:D,isPrevDisabled:v||i<=0,isNextDisabled:v||i>=o-1}},F=e=>{let{className:t}=e;const{total:n,onPrev:r,onNext:i,onSearchResultsClick:o,isPrevDisabled:l,isNextDisabled:c}=z();return(()=>{const{cache:e}=(0,x.useSelector)(C.ZP.selectors.getSearchNavigationData)||{},t=(0,x.useSelector)(C.ZP.selectors.getMode),n=(0,x.useSelector)(C.ZP.selectors.getEntity);return(0,s.uzs)(t)&&(null==e?void 0:e.includes(null==n?void 0:n.uri))})()?a().createElement(v,{className:t,total:n,onPrev:r,onNext:i,onSearchResultsClick:o,isPrevDisabled:l,isNextDisabled:c}):null}},18798:(e,t,n)=>{n.d(t,{u:()=>h});var r=n(24328),a=n.n(r),i=n(71153),o=n.n(i),l=n(31396),s=n(60364),c=n(81559);const u=(0,n(79692).Z)((()=>({container:{position:"relative","& .Resizer":{zIndex:1,boxSizing:"border-box",backgroundClip:"padding-box","&.disabled":{cursor:"initial",height:0,margin:0},"&.horizontal":{height:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"100% 1px",backgroundPosition:"top",width:"100%",marginBottom:"-10px","&:not(.disabled):hover":{cursor:"row-resize",backgroundImage:"linear-gradient(rgba(0, 114, 206, 0), rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1))",backgroundSize:"100% 3px"}},"&.vertical":{width:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"1px 100%",backgroundPosition:"left",height:"100%",marginRight:"-10px","&:not(.disabled):hover":{cursor:"col-resize",backgroundImage:"linear-gradient(to left, rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1), rgba(0, 114, 206, 0.35))",backgroundSize:"3px 100%"}}}}}))),d=250,p=e=>"horizontal"===e,h=e=>{let{className:t,children:n,orientation:i,primary:h,defaultSize:m,size:g,minSize:f,maxSize:b,allowResize:y,debounceInterval:v=d,onChange:x}=e;const C=u(),O=(0,s.Z)(),[E,S]=(0,r.useState)(null),[k,P]=(0,r.useState)(!0),I=(0,r.useCallback)((()=>P(!0)),[]),T=(0,r.useCallback)((()=>P(!1)),[]),w=()=>p(i)?null==E?void 0:E.clientHeight:null==E?void 0:E.clientWidth,j=(0,r.useCallback)((0,c.DsO)((e=>{const t=w();x({percentageSize:e/t*100+"%",isMaxSize:+b>0?e===b:e===t+b,isMinSize:e===f,size:e})}),v),[x,i,b,E]),N=(0,r.useMemo)((()=>({transition:O.transitions.create(p(i)?"height":"width",{easing:O.transitions.easing.sharp,duration:O.transitions.duration.leavingScreen})})),[i,O]);return"number"==typeof g&&g<0&&(g=(w()||0)+g),a().createElement("div",{ref:S,className:o()(C.container,t)},a().createElement(l.Z,{split:i,size:g,primary:h,allowResize:y,onChange:j,defaultSize:m,minSize:f,maxSize:b,onDragStarted:T,onDragFinished:I,pane1Style:k?N:void 0},n))};h.displayName="ResizablePanes"},94175:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),i=n(52730),o=n(86051),l=n(81559),s=n(97991);const c=e=>{let{sourceType:t,className:n,classes:r}=e;const c=(0,i.useSelector)(o.ZP.selectors.getMetadata),{uri:u,icon:d}=(0,l.PWK)(c,t)||{},p=u?(0,l.tH7)(c,u)[0]:"",h=d?(0,l.vPL)("https://s3.amazonaws.com/reltio.images/api",d):null;return a().createElement(s.Z,{className:n,avatarText:p,icon:h,variant:"square",rootClasses:r})}},51229:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(24328),a=n.n(r);const i=()=>a().createElement("div",{style:{flex:1}})},3409:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),a=n.n(r),i=n(52730),o=n(86051),l=n(94079),s=n(50914),c=n(2507),u=n.n(c);const d=(0,n(79692).Z)({root:{display:"flex",alignItems:"flex-start"},slice:{fontWeight:500},cancelButton:{width:"88px",flexShrink:0,marginLeft:"15px"}}),p=()=>{const e=d(),t=(0,i.useSelector)(o.ZP.selectors.getHistoryEvent),n=(0,i.useDispatch)(),r=(0,s.pipe)(o.N5.history.actions.clearHistoryEvent,n);return t?a().createElement("div",{className:e.root},a().createElement(l.Typography,{component:"div"},u().text("You are viewing a historic slice:")," ",a().createElement("span",{className:e.slice},u().date(t.aStamp,"llll"))),a().createElement(l.Button,{className:e.cancelButton,variant:"contained",color:"primary",onClick:r},u().text("Cancel"))):null}},54198:(e,t,n)=>{n.d(t,{G:()=>o,u:()=>l});var r=n(24328),a=n.n(r);const i=(0,r.createContext)(null);i.displayName="ActionsHookContext";const o=e=>{let{children:t,hook:n}=e;return a().createElement(i.Provider,{value:n},t)},l=()=>{const e=(0,r.useContext)(i);if(!e)throw new Error("ActionsHookContext must be provided");return e}},63149:(e,t,n)=>{n.d(t,{hR:()=>c,nX:()=>u,RT:()=>d,pu:()=>p,BF:()=>h});var r=n(24328),a=n.n(r),i=n(81559),o=n(50914),l=n(31276);const s=(0,r.createContext)(null),c=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children"]);return a().createElement(s.Provider,{value:n},t)},u=e=>{const{getCrosswalkColor:t=(0,o.pipe)(i.uKF,i.CJp)}=(0,r.useContext)(s)||{};return e?t(e):""},d=()=>{const{highlightedCrosswalks:e=[]}=(0,r.useContext)(s)||{};return e},p=e=>{const{highlightedCrosswalks:t=[],setCrosswalkHighlighted:n=l.ZT}=(0,r.useContext)(s)||{},a=!!e&&!!t.find((0,o.eqBy)(i.uKF,e));return{isHighlighted:a,isDimmed:t.length>0&&!a,highlightCrosswalk:(0,r.useCallback)((()=>n(e,!0)),[e,n]),removeHighlight:(0,r.useCallback)((()=>n(e,!1)),[e,n])}},h=e=>{const{toggleCrosswalkFocus:t=l.ZT,focusedCrosswalks:n=[]}=(0,r.useContext)(s)||{};return{isFocused:!!e&&n.some((0,o.eqBy)(i.uKF,e)),toggleCrosswalkFocus:(0,r.useCallback)((()=>t(e)),[e,t])}}},94622:(e,t,n)=>{n.d(t,{f:()=>u,M:()=>d});var r=n(24328),a=n.n(r),i=n(31276);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const s=a().createContext({isLoading:!1,updateEntityLoadingState:i.ZT,updateEntitiesNavigationLoadingState:i.ZT,resetLoadingState:i.ZT}),c={entitiesNavigation:!1,entity:!1},u=e=>{let{children:t}=e;const n=(()=>{const[e,t]=(0,r.useState)(c),n=(0,r.useCallback)((e=>{t((t=>o({},t,{entity:e})))}),[]),a=(0,r.useCallback)((e=>{t((t=>o({},t,{entitiesNavigation:e})))}),[]),i=(0,r.useCallback)((()=>{t(c)}),[]);return{isLoading:Object.values(e).includes(!0),updateEntityLoadingState:n,updateEntitiesNavigationLoadingState:a,resetLoadingState:i}})();return a().createElement(s.Provider,{value:n},t)},d=()=>(0,r.useContext)(s)},79468:(e,t,n)=>{n.d(t,{T:()=>a});var r=n(24328);const a=n.n(r)().createContext({profileBand:{}});a.displayName="LabelsContext"},7718:(e,t,n)=>{n.d(t,{C:()=>m});var r=n(24328),a=n(52730),i=n(50914),o=n(81559),l=n(86051);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=(e,t)=>t.filter((t=>t.replyId!==e)),d=(e,t)=>{const n=e.replies.findIndex((e=>{let{replyId:n}=e;return n===t.replyId})),r=[...e.replies];return r[n]=t,r},p=[],h=e=>console.error("Collaboration error",e),m=e=>{let{objectIds:t=p,objectTypes:n,enabled:c=!0}=e;const m=(0,a.useSelector)(l.ZP.selectors.getEntity),g=(0,a.useSelector)(l.ZP.selectors.getTenant),f=(0,a.useSelector)(l.ZP.selectors.getCollaborationPath),b=(0,a.useSelector)(l.ZP.selectors.isCollaborationEnabled)&&c,[y,v]=(0,r.useState)(null),[x,C]=(0,r.useState)([]),[O,E]=(0,r.useState)(null),[S,k]=(0,r.useState)(null),[P,I]=(0,r.useState)(!1),[T,w]=(0,r.useState)(!1),[j,N]=(0,r.useState)({}),R=(0,r.useCallback)((e=>{E((t=>s({},t,e)))}),[]),D=null==m?void 0:m.uri,Z=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(b&&D&&!(0,o.ZiX)(D)){const n=e=>{console.warn("Collaboration error",e),E(null)};(0,i.pipe)(o.$oF,(0,i.andThen)((0,i.map)((0,i.props)(["objectId","comments"]))),(0,i.andThen)(i.fromPairs),(0,i.andThen)(t?E:R),(0,i.otherwise)(n))({uris:e,tenant:g,collaborationPath:f})}else E(null)}),[R,f,D,b,g]);(0,r.useEffect)((()=>{Z(t,!0)}),[t,Z]);const z=(0,r.useCallback)(((e,t)=>{(0,o.liG)({collaborationPath:f,tenant:g,relatedObjectUri:e,pageToken:t}).then((e=>{let{items:n,nextPageToken:r}=e;C((e=>t?(0,i.uniqBy)((0,i.prop)("commentId"),[...e,...n]):n)),v(r)})).catch(h)}),[f,g]),F=(0,r.useCallback)((e=>{w(!0),(0,o.d7q)({collaborationPath:f,tenant:g,commentId:e}).then(k).catch(h).finally((()=>w(!1)))}),[f,g]),_=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,objectType:r,uri:a,relatedObjectUris:i}=e;I(!0);const l={objectId:a,content:t,relatedObjectUris:i,objectType:r,visibility:"public",namedUsers:n,permanentLink:`${window.location.href}&commentId=${encodeURIComponent("{commentId}")}`};return(0,o.Yrx)({collaborationPath:f,tenant:g,data:l}).then((e=>{let[t]=e;return((e,t)=>{k(e),E((n=>s({},n,{[t]:[...n[t]||[],{commentId:e.commentId,replies:0,status:"open"}]}))),C((t=>[e,...t]))})(t,a)})).catch(h).finally((()=>I(!1)))}),[f,g]),B=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,objectType:r,uri:a,relatedObjectUris:l,commentId:c,replies:u}=e;I(!0);const d={objectId:a,content:t,relatedObjectUris:l,objectType:r,visibility:"public",namedUsers:n,commentId:c,replies:u};return(0,o.uAg)({collaborationPath:f,tenant:g,data:d}).then((e=>(e=>{k(e),C((0,i.map)((0,i.when)((0,i.propEq)("commentId",e.commentId),(0,i.always)(e))))})(s({},e,{replies:u})))).catch(h).finally((()=>I(!1)))}),[f,g]),L=(0,r.useCallback)((e=>{let{uri:t,commentId:n}=e;I(!0),(0,o.YFy)({collaborationPath:f,tenant:g,commentId:n}).then((()=>((e,t)=>{k(null),E((n=>{const r=n[t]||[];return s({},n,{[t]:r.filter((t=>t.commentId!==e))})})),C((t=>t.filter((t=>t.commentId!==e))))})(n,t))).catch(h).finally((()=>I(!1)))}),[f,g]),M=(0,r.useCallback)(((e,t,n,r)=>{const a="resolve"===e.action?"resolved":"open",{replyId:i}=e;k("resolved"===a?e=>{if(e)return null}:t=>{if(t)return s({},t,{replies:r?u(i,t.replies):[...t.replies,e]})}),E((e=>s({},e,{[t]:(e[t]||[]).map((e=>e.commentId===n?s({},e,{status:a,replies:r?e.replies-1:e.replies+1}):e))}))),C((t=>t.map((t=>t.commentId===n?s({},t,{status:a,replies:r?u(e.replyId,t.replies):[...t.replies,e]}):t))))}),[]),q=(0,r.useCallback)((e=>{let{uri:t,commentId:n,reply:r}=e;I(!0),(0,o.Mfr)({collaborationPath:f,tenant:g,commentId:n,replyId:r.replyId}).then((()=>M(r,t,n,!0))).catch(h).finally((()=>I(!1)))}),[f,M,g]),U=(0,r.useCallback)(((e,t)=>{k((t=>{if(t)return s({},t,{replies:d(t,e)})})),C((n=>n.map((n=>n.commentId===t?s({},n,{replies:d(n,e)}):n))))}),[]),H=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,commentId:r,replyId:a}=e;I(!0);const i={content:t,namedUsers:n};return(0,o.ufV)({collaborationPath:f,tenant:g,commentId:r,replyId:a,data:i}).then((e=>U(e,r))).catch(h).finally((()=>I(!1)))}),[f,g,U]),A=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,commentId:r,action:a,uri:i}=e;I(!0);const l={content:t,action:a,namedUsers:n};return(0,o.PP2)({collaborationPath:f,tenant:g,commentId:r,data:l}).then((e=>{let[t]=e;return M(t,i,r)})).catch(h).finally((()=>I(!1)))}),[f,g,M]),G=(0,r.useCallback)((e=>{let{commentId:t,uri:n}=e;A({content:"",namedUsers:[],commentId:t,action:"resolve",uri:n})}),[A]),V=(0,r.useCallback)((e=>{let{commentId:t,uri:n}=e;A({content:"",namedUsers:[],commentId:t,action:"reopen",uri:n})}),[A]);return{clearCurrentComment:(0,r.useCallback)((()=>{k(null)}),[]),comments:x,commentsMap:O,getCommentState:(e,t)=>(0,i.pathOr)({},[e,t],j),updateCommentState:(e,t,n)=>{N((r=>{const a=[e,t],o=(0,i.path)(a,r);return(0,i.assocPath)(a,(0,i.mergeRight)(o,n),r)}))},clearCommentState:(e,t)=>N((0,i.dissocPath)([e,t])),createComment:_,createReply:A,currentComment:S,deleteComment:L,editComment:B,getComment:F,getComments:z,getCommentsCount:Z,loading:T,objectTypes:n,pageToken:y,reOpenThread:V,resolveThread:G,sending:P,deleteReply:q,editReply:H}}}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[122],{97991:(e,t,n)=>{n.d(t,{Z:()=>u});var r,a=n(94079),i=n(71153),o=n.n(i),l=n(24328),s=n.n(l);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}!function(e){e[e.ICON_MODE=0]="ICON_MODE",e[e.TEXT_MODE=1]="TEXT_MODE",e[e.ERROR_MODE=2]="ERROR_MODE"}(r||(r={}));const u=e=>{let{className:t,icon:n,avatarText:i,rootClasses:u}=e,d=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","icon","avatarText","rootClasses"]);const[p,h]=(0,l.useState)(null);(0,l.useEffect)((()=>{h(n?r.ICON_MODE:r.TEXT_MODE)}),[n,i]);const m=()=>{h(r.ERROR_MODE)};switch(p){case r.ICON_MODE:return s().createElement(a.Avatar,c({className:o()(t,null==u?void 0:u.iconRoot),src:n,onError:m},d));case r.TEXT_MODE:case r.ERROR_MODE:return s().createElement(a.Avatar,c({className:o()(t,null==u?void 0:u.textRoot)},d),i);default:return null}}},32528:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(13688),a=n(48852);const i=e=>t=>(0,a.l)(r.X,e,t)},60894:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),a=n.n(r),i=n(13980),o=n.n(i),l=n(94656);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:20,height:18,viewBox:"0 0 20 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M16 7.24V6h-4v1.24a8.417 8.417 0 00-2 .768V6H6v6h.29a8.497 8.497 0 00-.15.358l-.29.733.29.733.07.176H2c-1.1 0-2-.9-2-2V2C0 .9.9 0 2 0h14c1.1 0 2 .9 2 2v6.008a8.417 8.417 0 00-2-.768zM4 12V6H2v6h2zm0-8V2H2v2h2zm6 0V2H6v2h4zm6 0V2h-4v2h4zm-2 5a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091A6.451 6.451 0 0014 9zm0 6.818a2.728 2.728 0 010-5.454 2.728 2.728 0 010 5.454zm0-4.363c-.905 0-1.636.73-1.636 1.636 0 .905.73 1.636 1.636 1.636.905 0 1.636-.73 1.636-1.636 0-.906-.73-1.636-1.636-1.636z",fill:"#000",fillRule:"nonzero",stroke:"none",strokeWidth:1,opacity:.54}));var u=n(8818),d=n(50914),p=n(47458),h=n(2507),m=n.n(h),g=n(85657);const f=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:i,title:o,tooltipTitle:l}=e;const[s,h]=(0,r.useState)(null),f=(0,r.useCallback)((e=>{const t=(0,d.pipe)(g.JJ,(0,d.pluck)("id"))(e),r=(0,g.u)(n,e);i(r?(0,d.difference)(n,t):(0,d.uniq)((0,d.concat)(n,t)))}),[n,i]);return a().createElement(a().Fragment,null,a().createElement(u.k,{tooltipTitle:l||m().text("Show/hide columns"),size:"L",icon:c,onClick:e=>h(e.currentTarget)}),a().createElement(p.G,{onColumnClick:f,anchorEl:s,columnsData:t,onClose:()=>h(null),title:o,selectedColumns:n}))};f.propTypes={columnsData:l.uz,selectedColumns:o().arrayOf(o().string),onChangeColumns:o().func,title:o().string,tooltipTitle:o().string};const b=f},47458:(e,t,n)=>{n.d(t,{G:()=>E});var r=n(24328),a=n.n(r),i=n(2507),o=n.n(i),l=n(50914),s=n(88832),c=n(44890),u=n(97820),d=n(85657),p=n(56656),h=n(54763),m=n(13980),g=n.n(m),f=n(7785),b=n(27239),y=n(71153),v=n.n(y);const x=(0,n(79692).Z)({popup:{minWidth:"200px"},groupItem:{backgroundColor:"rgba(0,0,0,0.04)"}}),C=e=>{let{item:t,onClick:n,checked:r,level:i,style:o,isFocused:l,isGroupItem:s,hideCheckBox:c}=e;const u=x();return a().createElement(f.Z,{hideCheckBox:c,key:t.id,onClick:n,checked:r,level:i,data:t,label:a().createElement(b.Z,{text:t.label,highlight:t.filterText}),labelInText:t.label,style:o,isFocused:l,hideIcon:s,className:v()({[u.groupItem]:s})})};C.propTypes={item:g().shape({label:g().string,filterText:g().string}),level:g().number,onClick:g().func,checked:g().bool,style:g().object,isGroupItem:g().bool,isFocused:g().bool,hideCheckBox:g().bool};const O=C,E=e=>{let{anchorEl:t,onClose:n,title:i,columnsData:m,onColumnClick:g,selectedColumns:f,hideCheckBox:b}=e;const y=x(),[v,C]=(0,r.useState)(""),E=(0,r.useMemo)((()=>(0,d.eX)(m,v)),[m,v]),S=(0,r.useMemo)((()=>(0,p.LG)(E)),[E]),k=(0,s.fW1)("label")(E)||308,P=(0,r.useCallback)((e=>{let{item:t}=e;return g(t)}),[g]),{focusIndex:I,handleKeyDown:T}=(0,h.t)({items:S,open:!0,onSelectFocusedItem:P,selectedItems:f,onClose:n}),w=(0,r.useCallback)((0,l.pipe)(n,(()=>C(""))),[n]),j=Math.min(300,32*S.length),N=Math.max(140,j+108);return a().createElement(u.Z,{className:y.popup,open:!!t,anchorEl:t,onClose:w,onSearch:C,title:i||o().text("Show/hide columns"),containerWidth:k,containerHeight:N,searchInputOnKeyDown:T},a().createElement(c.Z,{fixedTitle:!1,height:j,renderItem:(e,t,n)=>{let{item:r,level:i=0}=t;return a().createElement(O,{hideCheckBox:b,style:e,item:r,level:i,isFocused:I===n,checked:(0,d.u)(f,r),isGroupItem:(0,d.yf)(r),onClick:b?(0,l.pipe)(g,w):g})},items:S,getItemSize:()=>32,focusIndex:I}))}},85657:(e,t,n)=>{n.d(t,{eX:()=>b,JJ:()=>y,yf:()=>l,u:()=>v});var r=n(50914),a=n(88832);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){o(e,t,n[t])}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=e=>e.id===e.groupId,s=(0,r.curry)(((e,t)=>{let{id:n,groupId:r}=e;return t.groupId===r&&(n===t.id||n.startsWith(`${t.id}.`))})),c=(0,r.curry)(((e,t)=>{let{groupId:n}=e;return n===t.id})),u=(0,r.propOr)(!0,"hideable"),d=(e,t)=>{const n=((e,t)=>e.find((0,r.either)(c(t),s(t))))(e,t);return n?(n.children=d(n.children||[],t),e):e.concat(t)},p=(0,r.curry)(((e,t)=>a.P6Y.strings.search(t.label,e)||(t.children||[]).some(p(e)))),h=(0,r.reduce)(((e,t)=>d(e,{id:t.id,groupId:t.groupId,label:t.label,attrType:t.dataTypeDefinition})),[]),m=(0,r.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,r.pipe)((0,r.filter)(p(e)),(0,r.chain)((t=>[{item:i({},t,{filterText:e}),level:n},...t.children?m(e,t.children,n+1):[]])))(t)})),g=(0,r.has)("columns"),f=e=>{let{id:t,label:n,columns:a}=e;return[{id:t,groupId:t,label:n},...a.map((0,r.assoc)("groupId",t))]},b=(e,t)=>(0,r.pipe)((0,r.chain)((0,r.when)(g,f)),(0,r.filter)((0,r.either)(l,u)),h,m(t))(e),y=e=>e.children?(0,r.chain)(y,e.children):[e],v=(e,t)=>{const n=y(t),r=t=>e.includes(t.id);return l(t)?n.every(r):n.some(r)}},68439:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),a=n.n(r),i=n(52730),o=n(71153),l=n.n(o),s=n(94079),c=n(88832),u=n(86051),d=n(95613);const p=(0,n(79692).Z)({"entityType-overflow":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",marginRight:"12px",borderRadius:"2px",flexShrink:0},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",marginRight:"16px",flexShrink:0}}),h=e=>{let{entity:t,className:n,size:r="small"}=e;const o=p(),h=(0,i.useSelector)(u.ZP.selectors.getMetadata),m=t.type,g=(0,c.nt9)(h,m),f=(g?(0,c.VD3)(h,g,"typeColor"):null)||c.rSc.palette.primary.main,b=(0,c.jFi)(h,t);return a().createElement(d.Z,{value:b,placement:"top"},a().createElement(s.Typography,{style:{backgroundColor:f,color:c.P6Y.Colors.getColor(f)?"#FFFFFF":"#212121"},className:l()(o[`entityType-${r}`],o["entityType-overflow"],n),component:"div"},b))}},64459:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),a=n.n(r),i=n(71153),o=n.n(i),l=n(52730),s=n(50914),c=n(94079),u=n(2507),d=n.n(u),p=n(88832),h=n(86051),m=n(53180),g=n(68439);const f=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"0px 1px 0px rgba(0, 0, 0, 0.12)",marginBottom:"1px","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),b=e=>{let{className:t,entity:n,children:i,classes:u,renderLabel:b=s.identity}=e;const y=f({classes:u}),v=(0,l.useSelector)(h.ZP.selectors.getMetadata),x=(0,l.useSelector)(h.ZP.selectors.getShowEntityId),C=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,p.BTI)(n))}),[n]);if((0,s.isNil)(n))return null;const O=(0,p.idV)(n.label),E=n.secondaryLabel,S=(0,p.ptG)(v,n),k=(0,p.Fn9)(n),P=n.uri,I=(0,p.BTI)(n);return a().createElement("div",{className:o()(y.profileBandWrapper,t)},a().createElement("div",{className:o()(y.profileBand,{[y.inactive]:!k}),"data-entity-uri":P},a().createElement(m.Z,{key:n.uri,entity:n,avatarClassName:y.profileIcon,imageClassName:y.imageProfileIcon}),a().createElement("div",{className:y.profileInfo},a().createElement("div",null,a().createElement(c.Typography,{variant:"h6",className:y.label},b(O)),E&&a().createElement(c.Typography,{variant:"subtitle2",className:y.secondaryLabel},E),S&&a().createElement(c.Typography,{variant:"subtitle1",className:y.businessCard},S)),a().createElement("div",{className:y.specialInfo},a().createElement("div",{className:y.entityType},a().createElement(g.Z,{entity:n,size:"medium",className:y.badge}),!(0,p.ZiX)(P)&&x&&a().createElement(c.Tooltip,{title:d().text("Copy to clipboard")},a().createElement(c.Typography,{display:"inline",variant:"body2",className:y.entityId,onClick:C},d().text("Entity ID"),": ",I))))),i&&a().createElement("div",null,i)))}},79618:(e,t,n)=>{n.d(t,{a:()=>F});var r=n(24328),a=n.n(r),i=n(94079),o=n(67766),l=n(42767),s=n(88832),c=n(71153),u=n.n(c),d=n(50914),p=n(2507),h=n.n(p),m=n(79468),g=n(83348),f=n(8818);const b=(0,n(79692).Z)({container:{display:"flex",alignItems:"center"},link:{whiteSpace:"nowrap",marginRight:"9px"}}),y=(0,g.Z)(i.Link),v=e=>{var t;let{className:n,total:i=0,onPrev:c,onNext:p,onSearchResultsClick:g,isPrevDisabled:v,isNextDisabled:x}=e;const C=b(),O=(0,r.useContext)(m.T),{OPEN_RESULTS:E,SEARCH_RESULT:S,SEARCH_RESULTS:k,NEXT_PROFILE:P,PREVIOUS_PROFILE:I}=(0,d.mergeRight)({OPEN_RESULTS:h().text("Go to search results"),SEARCH_RESULT:h().text("Search result"),SEARCH_RESULTS:h().text("Search results"),PREVIOUS_PROFILE:h().text("Go to previous profile"),NEXT_PROFILE:h().text("Go to next profile")},null!==(t=null==O?void 0:O.profileBand)&&void 0!==t?t:{});return a().createElement("div",{className:u()(C.container,n)},a().createElement(y,{className:C.link,component:"button",variant:"caption",onClick:g,underline:"none",tooltipTitle:E},(0,s.k7L)(i,1e6)," ",1===i?S:k),a().createElement(f.k,{size:"L",icon:o.Z,"data-reltio-id":"reltio-previous-profile-button",tooltipTitle:I,onClick:c,disabled:v,showForDisabled:!0}),a().createElement(f.k,{size:"L",icon:l.Z,"data-reltio-id":"reltio-next-profile-button",tooltipTitle:P,onClick:p,disabled:x,showForDisabled:!0}))};var x=n(52730),C=n(86051),O=n(94622),E=n(47898),S=n(54198),k=n(85229);function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){I(e,t,n[t])}))}return e}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class T{constructor(e){var t=this;let{data:{query:n,sortField:r,sortOrder:a},tenant:i,searchTenant:o,apiPath:l,dtssPath:c,globalSearchRequestOptions:u}=e;this.query=void 0,this.sortField=void 0,this.sortOrder=void 0,this.tenant=void 0,this.searchTenant=void 0,this.apiPath=void 0,this.dtssPath=void 0,this.globalSearchRequestOptions=void 0,this.isDT=()=>this.tenant!==this.searchTenant,this.getQueryFilter=()=>({rawFilter:this.query}),this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[t.getQueryFilter(),...e],a=P({},t.globalSearchRequestOptions,{sort:t.sortField,order:t.sortOrder,select:"uri,label,type",scoreEnabled:!1},n);return t.isDT()?(0,s.uqV)({filters:r,options:a,customerTenant:t.tenant,dataTenant:t.searchTenant,dtssPath:t.dtssPath}):(0,s.ZOr)(r,a)},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"uri",values:[e]}],{offset:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{offset:t,max:e}),this.requestTotal=()=>{const e=[this.getQueryFilter()],t=this.globalSearchRequestOptions;return(this.isDT()?(0,s.J$m)({filters:e,options:t,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,s.j_Q)(e,t)).then((e=>e.total))},this.query=n,this.sortField=r,this.sortOrder=a,this.tenant=i,this.searchTenant=o,this.apiPath=l,this.dtssPath=c,this.globalSearchRequestOptions=u}}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){j(e,t,n[t])}))}return e}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class N{constructor(e){var t=this;let{data:n,tenant:r,apiPath:a}=e;this.searchBody=void 0,this.tenant=void 0,this.apiPath=void 0,this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[{rawFilter:t.searchBody.filter},...e];return(0,s.P2h)({apiPath:t.apiPath,tenant:t.tenant,searchBody:w({},t.searchBody,{filter:e.length?(0,s.Uqd)()(r):t.searchBody.filter}),options:n})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"id",values:[(0,s.BTI)({uri:e})]}],{from:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{from:t,max:e}),this.requestTotal=()=>(0,s.dED)({apiPath:this.apiPath,tenant:this.tenant,searchBody:this.searchBody}).then((e=>e.count)),this.searchBody=n,this.tenant=r,this.apiPath=a}}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){D(e,t,n[t])}))}return e}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Z=(e,t)=>(0,d.pipe)((0,d.map)((0,d.prop)("uri")),(0,d.reject)((e=>t.includes(e))))(e),z=()=>{const e=(0,k._)(),t=(0,k._)(),n=(0,k._)(),{uri:a,index:i,total:o,tenant:l,cache:c}=(0,x.useSelector)(C.ZP.selectors.getSearchNavigationData)||{},{type:u,data:d}=(0,x.useSelector)(C.ZP.selectors.getSearchProviderData)||{},p=(0,x.useSelector)(C.ZP.selectors.getTenant),h=(0,x.useSelector)(C.ZP.selectors.getApiPath),m=(0,x.useSelector)(C.ZP.selectors.getDtssPath),g=(0,x.useSelector)((e=>C.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]))),{updateEntitiesNavigationLoadingState:f}=(0,O.M)(),b=(0,r.useContext)(E.m),y=(0,x.useDispatch)(),[v,P]=(0,r.useState)(!1),I=(0,r.useMemo)((()=>((e,t)=>{switch(e){case"search":return new T(t);case"graphsearch":return new N(t)}})(u,{data:d,tenant:p,searchTenant:l,apiPath:h,dtssPath:m,globalSearchRequestOptions:g})),[u,d,p,l,h,m,g]),w=(0,r.useCallback)((e=>{y(C.yC.actions.updateSearchNavigationDataFields(e))}),[y]),j=(0,r.useCallback)((e=>{const t=p!==l?(0,s.wwR)({uri:e,dataTenant:l}):e;y(C.ui.actions.openEntity({uri:t,viewId:b,source:"navigation"}))}),[y,b,p,l]),D=(0,r.useCallback)((()=>{y(C.ui.actions.openPerspective({perspectiveId:u,viewId:b}))}),[y,u,b]);(0,r.useEffect)((()=>{i>=o?w({index:o-1}):i<0&&w({index:0})}),[o,i,w]);const z=(0,S.u)();(0,r.useEffect)((()=>{const e=z(((e,t)=>{switch(e.type){case C.yC.constants.UPDATE_SEARCH_NAVIGATION_DATA_ON_MERGE:{const n=C.ZP.selectors.getSearchNavigationData(t);n&&w(((e,t)=>{const{winnerUri:n,losersUris:r=[]}=t,a=((e,t)=>{let{uri:n,index:r,total:a,cache:i}=e;if(t&&t!==n){if(i&&i.includes(n)){i=[...i];const e=i.indexOf(t);let o=i.indexOf(n);e>=0&&(i.splice(e,1),a--,e<o&&r--),o=i.indexOf(n),i.splice(o,1,t)}return n=t,R({},e,{uri:n,index:r,cache:i,total:a})}return e})(e,n);return((e,t)=>{const{cache:n=[],index:r,total:a,uri:i}=e,o=t.filter((e=>n.includes(e)));if(0===o.length)return e;const l=a-o.length,s=n.indexOf(i);let c=r;for(const e of o)n.indexOf(e)<s&&c--;const u=n.filter((e=>!o.includes(e)));return R({},e,{cache:u,index:c,total:l})})(a,r)})(n,e.payload));break}}}));return()=>e()}),[z,w]);const F=(0,r.useCallback)(((e,r,a)=>{P(!0),t(I.requestTotal()).then((e=>w({total:e})));const i=a+1;return n(I.requestEntities(15,i)).then((t=>{if(t){if(t.length){const n=Z(t,e);if(n.length>0)return w({cache:e.concat(n),uri:n[0],index:i+t.length-n.length}),void j(n[0]);if(a+t.length<r-1)return F(e,r-t.length,a+t.length)}w({index:i})}})).finally((()=>{P(!1)}))}),[I,w,j]),_=(0,r.useCallback)(((e,r)=>{P(!0),t(I.requestTotal()).then((e=>w({total:e})));const a=r-1,i=Math.max(0,r-15),o=15+Math.min(0,r-15);return n(I.requestEntities(o,i)).then((t=>{if(t){if(t.length){const n=Z(t,e);if(n.length>0)return w({cache:n.concat(e),uri:n[n.length-1],index:a-(t.length-n.length)}),void j(n[n.length-1]);if(r-t.length>0)return _(e,r-t.length)}w({index:0})}})).finally((()=>{P(!1)}))}),[I,w,j]),B=(0,r.useCallback)(((t,n,r,a)=>{if(n<t.length){const i=t[n];return P(!0),e(I.checkEntity(i)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),B(e,n,r-1,a)}w({index:a+1,uri:i,cache:t,total:r}),j(i)})).finally((()=>{P(!1)}))}if(!(a>=r-1))return F(t,r,a);w({cache:t,total:r,index:r-1})}),[I,w,j,F]),L=(0,r.useCallback)(((t,n,r,a)=>{if(n>-1){const i=t[n];return P(!0),e(I.checkEntity(i)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),L(e,n-1,r-1,a-1)}w({index:a-1,uri:i,cache:t,total:r}),j(i)})).finally((()=>{P(!1)}))}if(!(a<=0))return _(t,a);w({index:0,cache:t,total:r})}),[I,w,j,_]),M=(0,r.useCallback)((()=>{if(c&&a){const e=c.indexOf(a)-1;L(c,e,o,i)}}),[L,c,a,o,i]),q=(0,r.useCallback)((()=>{if(c&&a){const e=c.indexOf(a)+1;B(c,e,o,i)}}),[B,c,a,o,i]);return(0,r.useEffect)((()=>{f(v)}),[f,v]),(0,r.useEffect)((()=>()=>f(!1)),[]),{total:o,onPrev:M,onNext:q,onSearchResultsClick:D,isPrevDisabled:v||i<=0,isNextDisabled:v||i>=o-1}},F=e=>{let{className:t}=e;const{total:n,onPrev:r,onNext:i,onSearchResultsClick:o,isPrevDisabled:l,isNextDisabled:c}=z();return(()=>{const{cache:e}=(0,x.useSelector)(C.ZP.selectors.getSearchNavigationData)||{},t=(0,x.useSelector)(C.ZP.selectors.getMode),n=(0,x.useSelector)(C.ZP.selectors.getEntity);return(0,s.uzs)(t)&&(null==e?void 0:e.includes(null==n?void 0:n.uri))})()?a().createElement(v,{className:t,total:n,onPrev:r,onNext:i,onSearchResultsClick:o,isPrevDisabled:l,isNextDisabled:c}):null}},18798:(e,t,n)=>{n.d(t,{u:()=>h});var r=n(24328),a=n.n(r),i=n(71153),o=n.n(i),l=n(31396),s=n(60364),c=n(88832);const u=(0,n(79692).Z)((()=>({container:{position:"relative","& .Resizer":{zIndex:1,boxSizing:"border-box",backgroundClip:"padding-box","&.disabled":{cursor:"initial",height:0,margin:0},"&.horizontal":{height:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"100% 1px",backgroundPosition:"top",width:"100%",marginBottom:"-10px","&:not(.disabled):hover":{cursor:"row-resize",backgroundImage:"linear-gradient(rgba(0, 114, 206, 0), rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1))",backgroundSize:"100% 3px"}},"&.vertical":{width:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"1px 100%",backgroundPosition:"left",height:"100%",marginRight:"-10px","&:not(.disabled):hover":{cursor:"col-resize",backgroundImage:"linear-gradient(to left, rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1), rgba(0, 114, 206, 0.35))",backgroundSize:"3px 100%"}}}}}))),d=250,p=e=>"horizontal"===e,h=e=>{let{className:t,children:n,orientation:i,primary:h,defaultSize:m,size:g,minSize:f,maxSize:b,allowResize:y,debounceInterval:v=d,onChange:x}=e;const C=u(),O=(0,s.Z)(),[E,S]=(0,r.useState)(null),[k,P]=(0,r.useState)(!0),I=(0,r.useCallback)((()=>P(!0)),[]),T=(0,r.useCallback)((()=>P(!1)),[]),w=()=>p(i)?null==E?void 0:E.clientHeight:null==E?void 0:E.clientWidth,j=(0,r.useCallback)((0,c.DsO)((e=>{const t=w();x({percentageSize:e/t*100+"%",isMaxSize:+b>0?e===b:e===t+b,isMinSize:e===f,size:e})}),v),[x,i,b,E]),N=(0,r.useMemo)((()=>({transition:O.transitions.create(p(i)?"height":"width",{easing:O.transitions.easing.sharp,duration:O.transitions.duration.leavingScreen})})),[i,O]);return"number"==typeof g&&g<0&&(g=(w()||0)+g),a().createElement("div",{ref:S,className:o()(C.container,t)},a().createElement(l.Z,{split:i,size:g,primary:h,allowResize:y,onChange:j,defaultSize:m,minSize:f,maxSize:b,onDragStarted:T,onDragFinished:I,pane1Style:k?N:void 0},n))};h.displayName="ResizablePanes"},94175:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),i=n(52730),o=n(86051),l=n(88832),s=n(97991);const c=e=>{let{sourceType:t,className:n,classes:r}=e;const c=(0,i.useSelector)(o.ZP.selectors.getMetadata),{uri:u,icon:d}=(0,l.PWK)(c,t)||{},p=u?(0,l.tH7)(c,u)[0]:"",h=d?(0,l.vPL)("https://s3.amazonaws.com/reltio.images/api",d):null;return a().createElement(s.Z,{className:n,avatarText:p,icon:h,variant:"square",rootClasses:r})}},51229:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(24328),a=n.n(r);const i=()=>a().createElement("div",{style:{flex:1}})},3409:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),a=n.n(r),i=n(52730),o=n(86051),l=n(94079),s=n(50914),c=n(2507),u=n.n(c);const d=(0,n(79692).Z)({root:{display:"flex",alignItems:"flex-start"},slice:{fontWeight:500},cancelButton:{width:"88px",flexShrink:0,marginLeft:"15px"}}),p=()=>{const e=d(),t=(0,i.useSelector)(o.ZP.selectors.getHistoryEvent),n=(0,i.useDispatch)(),r=(0,s.pipe)(o.N5.history.actions.clearHistoryEvent,n);return t?a().createElement("div",{className:e.root},a().createElement(l.Typography,{component:"div"},u().text("You are viewing a historic slice:")," ",a().createElement("span",{className:e.slice},u().date(t.aStamp,"llll"))),a().createElement(l.Button,{className:e.cancelButton,variant:"contained",color:"primary",onClick:r},u().text("Cancel"))):null}},54198:(e,t,n)=>{n.d(t,{G:()=>o,u:()=>l});var r=n(24328),a=n.n(r);const i=(0,r.createContext)(null);i.displayName="ActionsHookContext";const o=e=>{let{children:t,hook:n}=e;return a().createElement(i.Provider,{value:n},t)},l=()=>{const e=(0,r.useContext)(i);if(!e)throw new Error("ActionsHookContext must be provided");return e}},63149:(e,t,n)=>{n.d(t,{hR:()=>c,nX:()=>u,RT:()=>d,pu:()=>p,BF:()=>h});var r=n(24328),a=n.n(r),i=n(88832),o=n(50914),l=n(31276);const s=(0,r.createContext)(null),c=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children"]);return a().createElement(s.Provider,{value:n},t)},u=e=>{const{getCrosswalkColor:t=(0,o.pipe)(i.uKF,i.CJp)}=(0,r.useContext)(s)||{};return e?t(e):""},d=()=>{const{highlightedCrosswalks:e=[]}=(0,r.useContext)(s)||{};return e},p=e=>{const{highlightedCrosswalks:t=[],setCrosswalkHighlighted:n=l.ZT}=(0,r.useContext)(s)||{},a=!!e&&!!t.find((0,o.eqBy)(i.uKF,e));return{isHighlighted:a,isDimmed:t.length>0&&!a,highlightCrosswalk:(0,r.useCallback)((()=>n(e,!0)),[e,n]),removeHighlight:(0,r.useCallback)((()=>n(e,!1)),[e,n])}},h=e=>{const{toggleCrosswalkFocus:t=l.ZT,focusedCrosswalks:n=[]}=(0,r.useContext)(s)||{};return{isFocused:!!e&&n.some((0,o.eqBy)(i.uKF,e)),toggleCrosswalkFocus:(0,r.useCallback)((()=>t(e)),[e,t])}}},94622:(e,t,n)=>{n.d(t,{f:()=>u,M:()=>d});var r=n(24328),a=n.n(r),i=n(31276);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const s=a().createContext({isLoading:!1,updateEntityLoadingState:i.ZT,updateEntitiesNavigationLoadingState:i.ZT,resetLoadingState:i.ZT}),c={entitiesNavigation:!1,entity:!1},u=e=>{let{children:t}=e;const n=(()=>{const[e,t]=(0,r.useState)(c),n=(0,r.useCallback)((e=>{t((t=>o({},t,{entity:e})))}),[]),a=(0,r.useCallback)((e=>{t((t=>o({},t,{entitiesNavigation:e})))}),[]),i=(0,r.useCallback)((()=>{t(c)}),[]);return{isLoading:Object.values(e).includes(!0),updateEntityLoadingState:n,updateEntitiesNavigationLoadingState:a,resetLoadingState:i}})();return a().createElement(s.Provider,{value:n},t)},d=()=>(0,r.useContext)(s)},79468:(e,t,n)=>{n.d(t,{T:()=>a});var r=n(24328);const a=n.n(r)().createContext({profileBand:{}});a.displayName="LabelsContext"},7718:(e,t,n)=>{n.d(t,{C:()=>m});var r=n(24328),a=n(52730),i=n(50914),o=n(88832),l=n(86051);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=(e,t)=>t.filter((t=>t.replyId!==e)),d=(e,t)=>{const n=e.replies.findIndex((e=>{let{replyId:n}=e;return n===t.replyId})),r=[...e.replies];return r[n]=t,r},p=[],h=e=>console.error("Collaboration error",e),m=e=>{let{objectIds:t=p,objectTypes:n,enabled:c=!0}=e;const m=(0,a.useSelector)(l.ZP.selectors.getEntity),g=(0,a.useSelector)(l.ZP.selectors.getTenant),f=(0,a.useSelector)(l.ZP.selectors.getCollaborationPath),b=(0,a.useSelector)(l.ZP.selectors.isCollaborationEnabled)&&c,[y,v]=(0,r.useState)(null),[x,C]=(0,r.useState)([]),[O,E]=(0,r.useState)(null),[S,k]=(0,r.useState)(null),[P,I]=(0,r.useState)(!1),[T,w]=(0,r.useState)(!1),[j,N]=(0,r.useState)({}),R=(0,r.useCallback)((e=>{E((t=>s({},t,e)))}),[]),D=null==m?void 0:m.uri,Z=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(b&&D&&!(0,o.ZiX)(D)){const n=e=>{console.warn("Collaboration error",e),E(null)};(0,i.pipe)(o.$oF,(0,i.andThen)((0,i.map)((0,i.props)(["objectId","comments"]))),(0,i.andThen)(i.fromPairs),(0,i.andThen)(t?E:R),(0,i.otherwise)(n))({uris:e,tenant:g,collaborationPath:f})}else E(null)}),[R,f,D,b,g]);(0,r.useEffect)((()=>{Z(t,!0)}),[t,Z]);const z=(0,r.useCallback)(((e,t)=>{(0,o.liG)({collaborationPath:f,tenant:g,relatedObjectUri:e,pageToken:t}).then((e=>{let{items:n,nextPageToken:r}=e;C((e=>t?(0,i.uniqBy)((0,i.prop)("commentId"),[...e,...n]):n)),v(r)})).catch(h)}),[f,g]),F=(0,r.useCallback)((e=>{w(!0),(0,o.d7q)({collaborationPath:f,tenant:g,commentId:e}).then(k).catch(h).finally((()=>w(!1)))}),[f,g]),_=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,objectType:r,uri:a,relatedObjectUris:i}=e;I(!0);const l={objectId:a,content:t,relatedObjectUris:i,objectType:r,visibility:"public",namedUsers:n,permanentLink:`${window.location.href}&commentId=${encodeURIComponent("{commentId}")}`};return(0,o.Yrx)({collaborationPath:f,tenant:g,data:l}).then((e=>{let[t]=e;return((e,t)=>{k(e),E((n=>s({},n,{[t]:[...n[t]||[],{commentId:e.commentId,replies:0,status:"open"}]}))),C((t=>[e,...t]))})(t,a)})).catch(h).finally((()=>I(!1)))}),[f,g]),B=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,objectType:r,uri:a,relatedObjectUris:l,commentId:c,replies:u}=e;I(!0);const d={objectId:a,content:t,relatedObjectUris:l,objectType:r,visibility:"public",namedUsers:n,commentId:c,replies:u};return(0,o.uAg)({collaborationPath:f,tenant:g,data:d}).then((e=>(e=>{k(e),C((0,i.map)((0,i.when)((0,i.propEq)("commentId",e.commentId),(0,i.always)(e))))})(s({},e,{replies:u})))).catch(h).finally((()=>I(!1)))}),[f,g]),L=(0,r.useCallback)((e=>{let{uri:t,commentId:n}=e;I(!0),(0,o.YFy)({collaborationPath:f,tenant:g,commentId:n}).then((()=>((e,t)=>{k(null),E((n=>{const r=n[t]||[];return s({},n,{[t]:r.filter((t=>t.commentId!==e))})})),C((t=>t.filter((t=>t.commentId!==e))))})(n,t))).catch(h).finally((()=>I(!1)))}),[f,g]),M=(0,r.useCallback)(((e,t,n,r)=>{const a="resolve"===e.action?"resolved":"open",{replyId:i}=e;k("resolved"===a?e=>{if(e)return null}:t=>{if(t)return s({},t,{replies:r?u(i,t.replies):[...t.replies,e]})}),E((e=>s({},e,{[t]:(e[t]||[]).map((e=>e.commentId===n?s({},e,{status:a,replies:r?e.replies-1:e.replies+1}):e))}))),C((t=>t.map((t=>t.commentId===n?s({},t,{status:a,replies:r?u(e.replyId,t.replies):[...t.replies,e]}):t))))}),[]),q=(0,r.useCallback)((e=>{let{uri:t,commentId:n,reply:r}=e;I(!0),(0,o.Mfr)({collaborationPath:f,tenant:g,commentId:n,replyId:r.replyId}).then((()=>M(r,t,n,!0))).catch(h).finally((()=>I(!1)))}),[f,M,g]),U=(0,r.useCallback)(((e,t)=>{k((t=>{if(t)return s({},t,{replies:d(t,e)})})),C((n=>n.map((n=>n.commentId===t?s({},n,{replies:d(n,e)}):n))))}),[]),H=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,commentId:r,replyId:a}=e;I(!0);const i={content:t,namedUsers:n};return(0,o.ufV)({collaborationPath:f,tenant:g,commentId:r,replyId:a,data:i}).then((e=>U(e,r))).catch(h).finally((()=>I(!1)))}),[f,g,U]),A=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,commentId:r,action:a,uri:i}=e;I(!0);const l={content:t,action:a,namedUsers:n};return(0,o.PP2)({collaborationPath:f,tenant:g,commentId:r,data:l}).then((e=>{let[t]=e;return M(t,i,r)})).catch(h).finally((()=>I(!1)))}),[f,g,M]),G=(0,r.useCallback)((e=>{let{commentId:t,uri:n}=e;A({content:"",namedUsers:[],commentId:t,action:"resolve",uri:n})}),[A]),V=(0,r.useCallback)((e=>{let{commentId:t,uri:n}=e;A({content:"",namedUsers:[],commentId:t,action:"reopen",uri:n})}),[A]);return{clearCurrentComment:(0,r.useCallback)((()=>{k(null)}),[]),comments:x,commentsMap:O,getCommentState:(e,t)=>(0,i.pathOr)({},[e,t],j),updateCommentState:(e,t,n)=>{N((r=>{const a=[e,t],o=(0,i.path)(a,r);return(0,i.assocPath)(a,(0,i.mergeRight)(o,n),r)}))},clearCommentState:(e,t)=>N((0,i.dissocPath)([e,t])),createComment:_,createReply:A,currentComment:S,deleteComment:L,editComment:B,getComment:F,getComments:z,getCommentsCount:Z,loading:T,objectTypes:n,pageToken:y,reOpenThread:V,resolveThread:G,sending:P,deleteReply:q,editReply:H}}}}]);
2
2
  //# sourceMappingURL=122.js.map