@reltio/remotes 1.4.1049 → 1.4.1050

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/8911.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[8911],{50548:(e,t,n)=>{n.d(t,{l:()=>o});var r=n(24328),a=n.n(r);function l(){return l=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},l.apply(this,arguments)}const o=(e,t,n)=>{if(e&&t){const o=(0,r.memo)(n);return n=>a().createElement(e.Consumer,null,(e=>a().createElement(o,l({},n,t(e,n)))))}return n}},44938:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(24328),a=n.n(r),l=n(50166),o=n(44443),i=n(18435);const s=(0,n(79692).Z)({item:{overflow:"hidden"}});function c(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){p(e,t,n[t])}))}return e}function p(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=(0,r.memo)((e=>{let{width:t=0,height:n=0,defaultItemSize:p,data:u,children:d,itemKey:m,showNotMeasuredItems:f,listRef:h}=e;const g=s(),b=(0,r.useRef)({}),[y,x]=(0,r.useState)({}),v=(0,r.useCallback)((0,i.DsO)((()=>{x(c({},b.current))})),[]),E=(0,r.useCallback)(((e,t)=>m?m(t,e):t),[m]),w=(0,r.useRef)(),O=h||w;O.current&&O.current.resetAfterIndex(0,!1);const C=(0,r.useMemo)((()=>e=>{let{data:t,index:n,style:r}=e;const l=E(t,n);return a().createElement("div",{style:r,className:g.item},a().createElement("div",{style:f?void 0:{visibility:l in y?void 0:"hidden"}},a().createElement(o.Z,{handleHeight:!0,onResize:(e,t)=>{b.current[l]!==t&&(((e,t)=>{b.current=c({},b.current,{[e]:t})})(l,t),v())}}),d({data:t,index:n})))}),[d,f,E,v,!f&&y]);return a().createElement(l.VariableSizeList,{ref:O,width:t,height:n,itemCount:u.length,itemData:u,itemSize:e=>y[(e=>E(u,e))(e)]||p,itemKey:m},C)}))},42011:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(13980),a=n.n(r),l=n(24328),o=n.n(l),i=n(71153),s=n.n(i),c=n(28899),p=n(87918),u=n.n(p),d=n(79573),m=n(17440);const f=(0,n(79692).Z)({pagination:{display:"flex",alignItems:"center",justifyContent:"flex-end",height:"56px",borderTop:"1px solid rgba(0,0,0,0.12)",boxShadow:"none"},caption:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px"},selectRoot:{marginLeft:"5px",marginRight:"36px"},select:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px",textAlign:"right"},actions:{marginLeft:"32px"}});function h(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){g(e,t,n[t])}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const b=e=>{let{classes:t={},count:n,rowsPerPageOptions:r,page:a,onChangePage:i,rowsPerPage:p,onChangeRowsPerPage:g,basicTableRef:b,labelRowsPerPage:y}=e;const x=f(),v=(0,l.useCallback)((()=>{(0,m.pathOr)(m.identity,["current","resetScrollbarPosition"],b)()}),[b]),E=(0,l.useCallback)((e=>{i(e),v()}),[i,v]),w=(0,l.useCallback)((e=>{i(0),g(e),v()}),[i,g,v]);return o().createElement(c.Z,{classes:h({},t,{root:s()(x.pagination,t.root),select:s()(x.select,t.select),caption:x.caption,selectRoot:x.selectRoot,actions:x.actions}),component:"div",labelRowsPerPage:y||u().text("Rows per page:"),labelDisplayedRows:e=>{let{from:t,to:n,count:r}=e;return u().text("${fromRow}-${toRow} of ${countRows}",{fromRow:u().number(t,"0,0"),toRow:u().number(n,"0,0"),countRows:u().number(r,"0,0")})},count:n,rowsPerPageOptions:r,page:a,onChangePage:(0,m.pipe)((0,m.nthArg)(1),E),rowsPerPage:p,onChangeRowsPerPage:(0,m.pipe)(d.NA,w)})};b.propTypes={classes:a().object,rowsPerPageOptions:a().arrayOf(a().number),count:a().number,page:a().number,onChangePage:a().func,rowsPerPage:a().number,onChangeRowsPerPage:a().func,basicTableRef:a().shape({current:a().object}),labelRowsPerPage:a().string};const y=o().memo(b)},1730:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(27556),a=n(13980),l=n.n(a),o=n(24328),i=n.n(o);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 p=(0,n(79692).Z)((e=>({"basic-view__paper":s({display:"flex",flexDirection:"column"},e.basicView)})));function u(){return u=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},u.apply(this,arguments)}const d=(0,o.forwardRef)(((e,t)=>{let{children:n,className:a}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","className"]);const o=p();return i().createElement(r.Z,u({ref:t,className:a,classes:{root:o["basic-view__paper"]}},l),n)}));d.displayName="BasicView",d.propTypes={children:l().node,className:l().string};const m=d},20146:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),a=n.n(r),l=n(52730),o=n(71153),i=n.n(o),s=n(90436),c=n(18435),p=n(89810);const u=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),d=e=>{let{entity:t,className:n,size:r="small"}=e;const o=u(),d=(0,l.useSelector)(p.ZP.selectors.getMetadata),m=t.type,f=(0,c.nt9)(d,m)||{},h=(0,c.VD3)(d,f,"typeColor")||c.rSc.palette.primary.main;return a().createElement(s.Z,{style:{backgroundColor:h,color:c.P6Y.Colors.getColor(h)?"#FFFFFF":"#212121"},className:i()(o[`entityType-${r}`],n),component:"div"},(0,c.jFi)(d,t))}},92934:(e,t,n)=>{n.d(t,{Q:()=>c});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),i=n(18435),s=n(72108);const c=(0,r.memo)((e=>{let{entityTypes:t,selectedEntityTypes:n,single:l,placeholder:c,enableEmptyValueUnderline:p,onChange:u,classes:d={},ListLabelProps:m={},disabled:f=!1}=e;const h=(0,r.useMemo)((()=>t.filter(i.oDv)),[t]);return a().createElement(s.S,{items:h,selectedItemsUris:n,single:l,placeholder:c,enableEmptyValueUnderline:p,onChange:u,classes:d,ListLabelProps:m,disabled:f,label:o().text("Entity type"),dataReltioId:"entity-type-selector",selectionPopupTitle:o().text("Select entity types")})}));c.displayName="EntityTypesSelector"},52194:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(17998);const s=(0,n(79692).Z)({container:{padding:"0 16px",minHeight:"48px"},title:{fontSize:"16px",lineHeight:"19px",paddingTop:"16px",paddingBottom:"13px",justifyContent:"flex-start"}}),c=e=>{let{className:t,title:n,children:r}=e;const l=s();return a().createElement(i.Z,{title:n,classes:{root:o()(l.container,t),title:l.title}},r)}},72108:(e,t,n)=>{n.d(t,{S:()=>k});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(17440),s=n(18435),c=n(86619),p=n(83543),u=n(80030),d=n(79692);const m=(0,d.Z)({listLabelContainer:{display:"flex",alignItems:"center",position:"relative",overflow:"hidden",whiteSpace:"nowrap",justifyContent:"space-between",height:"100%",width:"100%"},listLabel:{visibility:"hidden",position:"absolute",overflow:"hidden"},visibleItemsLabel:{textOverflow:"ellipsis",marginRight:"5px",overflow:"hidden",flex:1,flexBasis:"auto"},hiddenCount:{color:"rgba(0,0,0,0.87)",fontSize:"13px",lineHeight:"15px",padding:"5px 8px",borderRadius:"16px",backgroundColor:"rgba(0,0,0,.12)"}}),f=(e,t)=>{const{childNodes:n,clientLeft:r,clientWidth:a}=t;if(n.length>0){const[t]=Array.from(n),l=document.createRange();l.setStart(t,0);for(let n=0;n<e.length;n++){l.setEnd(t,l.endOffset+e[n].length);const{width:o}=l.getBoundingClientRect();if(r+o>a)return n;n!==e.length-1&&l.setEnd(t,l.endOffset+", ".length)}}return-1},h=e=>e.join(", "),g=e=>`calc(${(0,i.isNil)(e)?"100%":`${e}px`} - 35px)`,b=e=>{let{list:t,maxWidth:n}=e;const l=m(),o=(0,r.useRef)(),[i,s]=(0,r.useState)(0);(0,r.useEffect)((()=>{s(((e,t)=>{const n=e.length,r=((e,t)=>{if(t){const n=f(e,t);return-1===n?0:e.length-n}return 0})(e,t);return n-Math.max(1,n-r)})(t,o.current))}),[t]);const c=h(t),p=i>0,d=p?h(t.slice(0,-i)):c;return a().createElement(u.ZP,{title:p?c:""},a().createElement("div",{className:l.listLabelContainer},a().createElement("div",{style:{width:g(n)},className:l.listLabel,ref:o},c),a().createElement("div",{className:l.visibleItemsLabel},d),p&&a().createElement("div",{className:l.hiddenCount},`+${i}`)))};var y=n(40435),x=n(22311),v=n(26638),E=n(33117),w=n(94792),O=n(63485);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)}const S=(0,i.always)(32),P=(0,r.memo)((e=>{let{selectedItems:t,onItemClick:n,focusIndex:r,width:l,height:o}=e,i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["selectedItems","onItemClick","focusIndex","width","height"]);return a().createElement(O.Z,C({getItemSize:S,renderItem:(e,l,o)=>{let{item:i}=l;const s=!!t.find((e=>i.uri===e)),c=o===r;return a().createElement(E.Z,{key:i.uri,onClick:n,checked:s,data:i,label:a().createElement(w.Z,{text:i.label,highlight:i.filterText}),labelInText:i.label,style:e,isFocused:c,hideIcon:!0,LogoIcon:i.LogoIcon})},focusIndex:r,fixedTitle:!1,disableHorizontalScrollbar:!0,width:l,height:o},i))}));P.displayName="SelectMetadataTypesList";const T=(0,d.Z)({root:{borderRadius:"4px 4px 0 0",margin:0,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},inputLabel:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%",top:"calc(50% - 23px)"},inputText:{display:"flex",flexGrow:1,alignItems:"center",height:"25px",width:"calc(100% - 53px)",paddingTop:"18px",paddingBottom:"4px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},input:{width:0,cursor:"pointer","&[disabled]":{backgroundColor:"transparent",cursor:"default"},"&$emptyInput":{width:"100%"}},emptyInput:{},disabledInput:{},disabledPointer:{},disabledUnderline:{},inputRoot:{flex:1,paddingRight:"4px",fontSize:"14px",letterSpacing:0,lineHeight:"16px","&$disabledInput":{backgroundColor:"rgba(0, 0, 0, 0.03)",cursor:"pointer","&$disabledPointer":{cursor:"default"},"&$disabledUnderline::before":{borderBottomStyle:"solid"}}},icon:{transform:"rotate(0deg)",transition:"transform 0.35s ease"},"popup-opened-icon":{transform:"rotate(-180deg)"}});function N(){return N=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},N.apply(this,arguments)}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){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}const k=(0,r.memo)((e=>{let{placeholder:t,classes:n={},items:l,selectedItemsUris:u,onChange:d,ListLabelProps:m={},disabled:f,enableEmptyValueUnderline:h,single:g,label:E,dataReltioId:w,selectionPopupTitle:O}=e;const C=T(),[S,j]=(0,r.useState)(!1),k=(0,r.useCallback)((()=>j(!0)),[]),I=(0,r.useCallback)((()=>j(!1)),[]),[Z,L]=(0,r.useState)(""),U=(0,r.useCallback)((()=>L("")),[]),z=(0,r.useCallback)((0,i.pipe)(U,I),[I,U]),D=l.filter((e=>{let{label:t}=e;return s.P6Y.strings.search(t,Z)})).map(((e,t)=>({item:{item:R({},e,{filterText:Z})},index:t}))),A=(0,r.useMemo)((()=>u.map((e=>l.find((0,i.propEq)("uri",e)))).map((0,i.prop)("label"))),[u,l]),B=(0,r.useCallback)(((e,t)=>{g?(d(t?[e.uri]:[]),z()):d(t?u.concat(e.uri):u.filter((t=>t!==e.uri)))}),[u,d,g,z]),H=(0,r.useCallback)((e=>{let{item:t}=e;const n=!u.includes(t.uri);B(t,n)}),[u,B]),{focusIndex:M,handleKeyDown:V}=(0,v.t)({items:D,open:S,onSelectFocusedItem:H,selectedItems:u,onClose:z}),F=(0,r.useRef)(),W=F.current?F.current.getBoundingClientRect().width:0,_=Math.max(W,255),G=0===u.length;return a().createElement(a().Fragment,null,a().createElement(c.Z,{label:E,ref:F,InputProps:{startAdornment:G&&!t?null:a().createElement("div",{className:o()(C.inputText,n.inputText)},G?a().createElement("div",null,t):a().createElement(b,N({},m,{list:A}))),classes:{root:C.inputRoot,input:o()(C.input,n.input,{[C.emptyInput]:G&&!t}),disabled:o()(C.disabledInput,{[C.disabledPointer]:f}),underline:C.disabledUnderline},endAdornment:a().createElement(y.Z,{size:"L",icon:p.Z,iconClassName:o()(C.icon,{[C["popup-opened-icon"]]:S}),disabled:f}),readOnly:!0,disabled:!0,disableUnderline:G&&!h},inputProps:{tabIndex:-1},InputLabelProps:{classes:{root:o()(C.inputLabel,n.label)}},value:"",onClick:f?void 0:k,classes:{root:o()(C.root,n.root)},margin:"dense",variant:"filled",disabled:f,"data-reltio-id":w}),a().createElement(x.Z,{open:S,anchorEl:F.current,onClose:z,onSearch:L,title:O,containerWidth:_,containerHeight:355,searchInputOnKeyDown:V,transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"left",vertical:"bottom"},PaperProps:{"data-reltio-id":`${w}-popup`}},a().createElement(P,{items:D,onItemClick:B,selectedItems:u,width:_,height:245,focusIndex:M})))}));k.displayName="MetadataTypesSelector"},33109:(e,t,n)=>{n.d(t,{Z:()=>E});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(71153),s=n.n(i),c=n(52730),p=n(17440),u=n(90436),d=n(80030),m=n(87918),f=n.n(m),h=n(18435),g=n(89810),b=n(37573),y=n(20146);const x=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&: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"}}}))),v=e=>{let{className:t,entity:n,children:l,classes:o}=e;const i=x({classes:o}),m=(0,c.useSelector)(g.ZP.selectors.getMetadata),v=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,h.BTI)(n))}),[n]);if((0,p.isNil)(n))return null;const E=(0,h.idV)(n.label),w=n.secondaryLabel,O=(0,h.ptG)(m,n),C=(0,h.Fn9)(n),S=n.uri,P=(0,h.BTI)(n);return a().createElement("div",{className:s()(i.profileBandWrapper,t)},a().createElement("div",{className:s()(i.profileBand,{[i.inactive]:!C}),"data-entity-uri":S},a().createElement(b.Z,{key:n.uri,entity:n,avatarClassName:i.profileIcon,imageClassName:i.imageProfileIcon}),a().createElement("div",{className:i.profileInfo},a().createElement("div",null,a().createElement(u.Z,{variant:"h6",className:i.label},E),w&&a().createElement(u.Z,{variant:"subtitle2",className:i.secondaryLabel},w),O&&a().createElement(u.Z,{variant:"subtitle1",className:i.businessCard},O)),a().createElement("div",{className:i.specialInfo},a().createElement("div",{className:i.entityType},a().createElement(y.Z,{entity:n,size:"medium",className:i.badge}),!(0,h.ZiX)(S)&&a().createElement(d.ZP,{title:f().text("Copy to clipboard")},a().createElement(u.Z,{display:"inline",variant:"body2",className:i.entityId,onClick:v},f().text("Entity ID"),": ",P))))),l&&a().createElement("div",null,l)))};v.propTypes={className:o().string,entity:o().object,children:o().node,classes:o().object};const E=v},68977:(e,t,n)=>{n.d(t,{U:()=>c});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),i=n(18435),s=n(72108);const c=(0,r.memo)((e=>{let{relationTypes:t,selectedRelationTypes:n,single:l,placeholder:c,enableEmptyValueUnderline:p,onChange:u,classes:d={},ListLabelProps:m={},disabled:f=!1}=e;const h=(0,r.useMemo)((()=>t.filter(i.Tt2)),[t]);return a().createElement(s.S,{items:h,selectedItemsUris:n,single:l,placeholder:c,enableEmptyValueUnderline:p,onChange:u,classes:d,ListLabelProps:m,disabled:f,label:o().text("Relation type"),dataReltioId:"relation-type-selector",selectionPopupTitle:o().text("Select relation types")})}));c.displayName="RelationTypesSelector"},28101:(e,t,n)=>{n.d(t,{G:()=>m});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(39475),s=n(79692),c=n(41128);const p=(0,s.Z)((e=>({container:{display:"flex",flexDirection:"column",flexShrink:0,width:"64px",paddingTop:"8px",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)"},active:{backgroundColor:(0,c.U1)(e.palette.primary.main,.12),color:e.palette.primary.main,"&:after":{content:'""',position:"absolute",height:"42px",width:"3px",backgroundColor:e.palette.primary.main,left:"-8px",borderRadius:"0 6px 6px 0"}},buttonWrapper:{position:"relative",width:"48px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",margin:"2px 8px",color:e.palette.text.secondary}})));function u(){return u=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},u.apply(this,arguments)}function d(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const m=e=>{let{buttonsProps:t,activeIndexId:n,className:r,onButtonClick:l,classes:s={}}=e;const c=p(),{active:m,buttonWrapper:f}=s,h=d(s,["active","buttonWrapper"]);return a().createElement("div",{className:o()(c.container,r)},t.map((e=>{let{id:t}=e,r=d(e,["id"]);return a().createElement(i.k,u({},r,{classes:h,size:"S",key:t,className:o()({[o()(c.active,m)]:n===t},c.buttonWrapper,f),onClick:()=>l(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},11821:(e,t,n)=>{n.d(t,{h:()=>o});var r=n(24328),a=n.n(r);const l=(0,n(79692).Z)((e=>({contentWrapper:{display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",marginLeft:"3px",transition:e.transitions.create(["width"],{duration:e.transitions.duration.enteringScreen})}}))),o=e=>{let{width:t,open:n,children:r}=e;const o=l();return a().createElement("div",{className:o.contentWrapper,style:{width:`${n?t:0}px`}},n&&a().createElement(a().Fragment,null,r))}},15177:(e,t,n)=>{n.d(t,{Z:()=>I});var r=n(52730),a=n(89810),l=n(24328),o=n.n(l),i=n(18435),s=n(71153),c=n.n(s),p=n(87918),u=n.n(p),d=n(95544),m=n(90436),f=n(80687),h=n(1730),g=n(52194),b=n(89978),y=n(26978),x=n(79692);const v=(0,x.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"},noData:{fontSize:"13px",color:"rgba(0,0,0,0.54)"}}),E=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},metadata:s,caption:p="",excludeUris:x=[],includeUris:E=[],attributesCount:w=16}=e;const O=v(),C=(0,r.useSelector)(a.ZP.selectors.getPivotingAttributes),S=(0,l.useMemo)((()=>(0,y.U)(s,n.type,E,x)),[x,E,s,n.type]),P=(0,i.fyF)(S,n).filter((e=>{let{values:t}=e;return!(0,i.O27)(t)})).length>0;return P||!(0,i.O27)(p)?o().createElement(f.J.Provider,{value:C},o().createElement(h.Z,{className:t},p&&o().createElement(g.Z,{className:O.header,title:p}),o().createElement(d.Z,{className:c()(O.attributesContainer,{[O.noCaption]:!p})},P?o().createElement(b.Z,{entity:n,attrTypes:S,parentUri:n.uri,drawLines:!1,max:w}):o().createElement(m.Z,{className:O.noData},u().text("No data found"))))):null}));var w=n(17440),O=n(76141),C=n(12212);const S=(0,x.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"}});var P=n(1108);function T(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){N(e,t,n[t])}))}return e}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const R=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},mode:s,metadata:p,caption:u="",excludeUris:m=[],includeUris:f=[],pinnedAttributes:b}=e;const x=S(),v=(0,r.useDispatch)(),E=(0,l.useContext)(C.m),N=(0,r.useSelector)(a.ZP.selectors.getUserRoles),R=(0,l.useMemo)((()=>(0,i.mC3)(b,N)),[b,N]),j=(0,r.useSelector)((e=>a.ZP.selectors.getModifiedEntity(e,n.uri)||{})),k=(0,l.useMemo)((()=>(0,y.U)(p,j.type,f,m)),[m,f,p,j.type]),I=(0,l.useCallback)((e=>(0,w.pipe)(a.N5.actions.addAttributes,v)(e.map((e=>T({},e,{viewId:E}))))),[E,v]),Z=(0,l.useCallback)((e=>(0,w.pipe)(a.N5.actions.modifyAttribute,v)(T({},e,{viewId:E}))),[E,v]),L=(0,l.useCallback)((e=>(0,w.pipe)(a.N5.actions.removeAttribute,v)(T({},e,{viewId:E}))),[E,v]);return o().createElement(h.Z,{className:t},u&&o().createElement(g.Z,{className:x.header,title:u}),o().createElement(d.Z,{className:c()(x.attributesContainer,{[x.noCaption]:!u})},o().createElement(P.c.Provider,{value:R},o().createElement(O.Z,{entity:j,attrTypes:k,parentUri:j.uri,drawLines:!1,mode:s,showEmptyEditors:(0,i.ZiX)(j.uri),crosswalks:j.crosswalks,onAddAttributes:I,onChangeAttribute:Z,onDeleteAttribute:L}))))}));var j=n(10609);function k(){return k=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},k.apply(this,arguments)}const I=(0,r.connect)(((e,t)=>({entity:t.entity||a.ZP.selectors.getEntityWithDiff(e),mode:t.mode||a.ZP.selectors.getMode(e)})))((e=>{let{mode:t=i.ARY.Viewing,attributesCount:n,pinnedAttributes:r,entity:a}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["mode","attributesCount","pinnedAttributes","entity"]);return o().createElement(j.u.Provider,{value:a},(0,i.uzs)(t)?o().createElement(E,k({attributesCount:n,entity:a},l)):o().createElement(R,k({mode:t,pinnedAttributes:r,entity:a},l)))}))},38911:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ct});var r=n(24328),a=n.n(r),l=n(52730),o=n(36138),i=n(97333),s=n(22664),c=n(52844),p=n(89810),u=n(87378),d=n(18435),m=n(87918),f=n.n(m),h=n(17440),g=n(29627);function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const y=(e,t)=>{const n=function(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){b(e,t,n[t])}))}return e}({},e,{[null==t?void 0:t.uri]:t}),r=Object.keys(n);return r.length>50&&delete n[r[0]],n},x=[25,50,100],v=(e,t,n)=>{const{startObject:r,endObject:a,type:l}=t,{directionalLabel:o}=(0,d.nqN)(t)===n?r:a;return o||(0,d.Lmx)(e,l)},E=(e,t,n)=>{const[a,o]=(0,r.useState)({field:"",order:"asc"}),[i,s]=(0,r.useState)(0),[c,u]=(0,r.useState)(x[0]),[m,f]=(0,r.useState)([]),g=(0,l.useSelector)(p.ZP.selectors.getMetadata),b=(0,r.useMemo)((()=>{const t=(null==e?void 0:e.entities)||[];return(0,h.zipObj)(t.map((0,h.prop)("uri")),t)}),[null==e?void 0:e.entities]),y=(0,r.useMemo)((()=>(0,h.pipe)((0,h.filter)((0,h.either)((0,h.pipe)(d.nqN,(0,h.equals)(t)),(0,h.pipe)(d.j5q,(0,h.equals)(t)))),(0,h.uniqBy)((0,h.prop)("uri")),(0,h.map)((e=>{const n=b[((e,t)=>{const n=(0,d.nqN)(t),r=(0,d.j5q)(t);return n===e?r:n})(t,e)];return{relation:e,entity:n,entityLabel:(0,d.idV)(n.label),entityTypeLabel:(0,d.jFi)(g,n),relationTypeLabel:v(g,e,n.uri)}})))((null==e?void 0:e.relations)||[])),[e,t,b,g]),{searchText:E,onChangeSearchText:w,filters:O,onFilter:C,relationTypesOptions:S,entityTypesOptions:P}=(e=>{const[t,n]=(0,r.useState)(""),[a,o]=(0,r.useState)({entityTypesUris:[],relationTypesUris:[]}),i=(0,l.useSelector)(p.ZP.selectors.getMetadata);return{searchText:t,onChangeSearchText:n,filters:a,onFilter:o,entityTypesOptions:(0,r.useMemo)((()=>(0,h.pipe)((0,h.map)((e=>{let{entity:t}=e;return t.type})),h.uniq,(0,h.map)((0,d.nt9)(i)))(e)),[e,i]),relationTypesOptions:(0,r.useMemo)((()=>(0,h.pipe)((0,h.map)((e=>{let{relation:t}=e;return t.type})),h.uniq,(0,h.map)((0,d.V3K)(i)))(e)),[e,i])}})(y),T=(0,r.useMemo)((()=>(0,h.pipe)((0,h.filter)((e=>{let{entityLabel:t,entity:n,relation:r}=e;const{entityTypesUris:a,relationTypesUris:l}=O;return t.toLowerCase().includes(E)&&(0,h.ifElse)((0,h.prop)("length"),(0,h.includes)(r.type),h.T)(l)&&(0,h.ifElse)((0,h.prop)("length"),(0,h.includes)(n.type),h.T)(a)})),a.field?(0,h.sort)(((e,t)=>d.P6Y.strings.sort(a.order,e[a.field],t[a.field]))):h.identity)(y)),[y,a,E,O]),N=(0,r.useMemo)((()=>T.slice(i*c,i*c+c)),[T,i,c]),R=(0,r.useCallback)((e=>{f((t=>[...t,e]))}),[]),j=(0,r.useCallback)((e=>{f((t=>(0,h.without)([e],t)))}),[]);return(0,r.useEffect)((()=>{s(0),w(""),C({entityTypesUris:[],relationTypesUris:[]})}),[t,n,w,C]),(0,r.useEffect)((()=>{s(0)}),[a,E,O]),{rowsData:N,onSort:o,sorting:a,searchText:E,onChangeSearchText:w,filters:O,onFilter:C,entityTypesOptions:P,relationTypesOptions:S,editingRelations:m,onStartRelationEditing:R,onFinishRelationEditing:j,total:T.length,page:i,rowsPerPage:c,onPageChange:s,onRowsPerPageChange:u}},w=a().createContext({graphLoading:!1,data:null,selectedEntityLoading:!1,selectedEntity:null,onEntitySelect:()=>{},relationshipTable:{}});w.displayName="GraphStateContext";var O=n(71153),C=n.n(O),S=n(33109),P=n(62901),T=n(72316),N=n(95544),R=n(79692);const j=(0,R.Z)({comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}}),k=(0,r.memo)((e=>{let{className:t}=e;const n=j(),r=(0,l.useSelector)(p.ZP.selectors.getEntity);return a().createElement(S.Z,{className:C()(t,P.U),entity:r},a().createElement(N.Z,{className:n.comments},a().createElement(T.Z,{uri:r.uri,relatedObjectUris:(0,d.wp9)(d.q7e.ENTITY,{entityUri:r.uri}),objectType:d.q7e.ENTITY})))}));k.displayName="GraphProfileBand";const I=k;var Z=n(11821),L=n(28101),U=n(82726);const z=(0,R.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0}});function D(){return D=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},D.apply(this,arguments)}const A=e=>{let{styles: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={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["styles"]);return a().createElement("svg",D({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7v2h2V7H6zm0 4v2h2v-2H6zm0 4v2h2v-2H6zm4-8v2h8V7h-8zm10-2v5.02a6.52 6.52 0 012 2.01V3H2v18h11.028a6.52 6.52 0 01-2.009-2H4V5h16zm-9.503 8a6.497 6.497 0 011.31-2H10v2h.497zM10 15.5c0-.168.006-.335.019-.5H10v.5zm0 0c0 .516.06 1.018.173 1.5H10v-1.5zm10.3 2.39L23.42 21 22 22.42l-3.12-3.12c-.69.44-1.51.7-2.39.7-2.48 0-4.49-2.01-4.49-4.5s2.01-4.5 4.5-4.5 4.5 2.01 4.5 4.5c0 .88-.26 1.69-.7 2.39zm-3.8.11a2.5 2.5 0 000-5 2.5 2.5 0 000 5z",fill:"currentColor"}))};var B=n(50548);const H=(0,B.l)(w,(0,h.pick)(["selectedEntity"]),(e=>{let{selectedEntity:t}=e;return a().createElement(S.Z,{entity:t})}));var M=n(15177);const V=(0,R.Z)({noShadowBlock:{boxShadow:"none"},wrapper:{position:"relative",paddingRight:"1px",overflow:"auto"}}),F=(0,B.l)(w,(0,h.pick)(["selectedEntity","selectedEntityLoading"]),(e=>{let{selectedEntity:t,selectedEntityLoading:n}=e;const r=V();return a().createElement("div",{className:r.wrapper},n&&a().createElement(u.Z,null),a().createElement(M.Z,{entity:t,caption:f().text("Entity details"),className:r.noShadowBlock}))}));var W=n(90436),_=n(42011),G=n(44443),$=n(44938),q=n(79573);const Y="1px solid rgba(0, 0, 0, 0.05)",K=(0,R.Z)({table:{flex:1,height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},tableBody:{height:"100%",overflow:"auto"},tableBodyWrapper:{height:"100%",overflow:"hidden"},tableRowWrapper:{borderBottom:Y},tableRow:{display:"flex",alignItems:"center","& > div":{flexShrink:0}},headRow:{borderBottom:Y}});function X(){return X=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},X.apply(this,arguments)}const Q=(0,r.memo)((e=>{let{columnsData:t,sorting:n,onSort:r}=e;const l=K();return a().createElement("div",{className:C()(l.tableRow,l.headRow)},t.map((e=>{const{id:t,sortable:l,headCellRenderer:o,columnClassName:i}=e,s=o,c=l?{sortField:n.field,sortOrder:n.order,sortHandler:()=>{r({field:t,order:n.field===t?(0,q.Dh)(n.order):"asc"})}}:{};return a().createElement("div",{key:t,className:i},a().createElement(s,X({headCellData:e},c)))})))})),J=(0,r.forwardRef)(((e,t)=>{let{classes:n,columnsData:l,rowsData:o,sorting:i,onSort:s,getRowKey:c,ExpandedRowRenderer:p,defaultRowHeight:u}=e;const d=K(),[m,f]=(0,r.useState)({width:0,height:0}),h=(0,r.useCallback)((e=>{let{data:t,index:r}=e;const o=t[r];return a().createElement("div",{className:C()(d.tableRowWrapper,null==n?void 0:n.tableRowWrapper)},a().createElement("div",{className:C()(d.tableRow,null==n?void 0:n.tableRow)},l.map((e=>{let{id:t,rowCellValueRenderer:n,columnClassName:r}=e;const l=n;return a().createElement("div",{key:t,className:r},a().createElement(l,{value:o[t],rowValue:o}))}))),o.expanded&&p&&a().createElement(p,{open:o.expanded,rowValue:o}))}),[l,p]),g=(0,r.useCallback)(((e,t)=>{f({width:e,height:t})}),[]),b=(0,r.useRef)(null);return(0,r.useImperativeHandle)(t,(()=>({resetScrollbarPosition:()=>{var e;null===(e=b.current)||void 0===e||e.scrollTo(0)}}))),a().createElement("div",{className:d.table},a().createElement(Q,{columnsData:l,sorting:i,onSort:s}),a().createElement("div",{className:d.tableBodyWrapper},a().createElement(G.Z,{handleHeight:!0,handleWidth:!0,onResize:g}),a().createElement("div",{className:d.tableBody},a().createElement($.Z,{listRef:b,width:m.width,height:m.height,data:o,defaultItemSize:u,itemKey:c,showNotMeasuredItems:!0},h))))})),ee=(0,r.memo)(J);var te=n(92332),ne=n(83088);const re="rgba(238, 238, 238, 1)",ae=(0,R.Z)({tableWithPagination:{flex:1,overflow:"hidden",paddingRight:"1px",display:"flex",flexDirection:"column"},tableContainer:{flex:1,overflow:"hidden"},profileColumn:{width:"200px"},relationshipTypeColumn:{width:"130px"},entityTypeColumn:{width:"140px"},row:{position:"relative","&:hover":{background:re}}});function le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const oe={content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)",pointerEvents:"none"},ie=".collapsibleTableRow:hover &",se=function(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){le(e,t,n[t])}))}return e}({},oe,{[ie]:{background:`linear-gradient(to right, rgba(238, 238, 238, 0), ${re} 100%)`}}),ce=(0,R.Z)((e=>({headCell:{position:"relative",display:"flex",alignItems:"center",height:"33px",padding:"6px 0 6px 16px","&>div":{flexDirection:"row"},"&>div>span[role=button]":{width:"calc(100% + 49px)"}},headLabel:{color:e.palette.text.primary,fontSize:"12px",fontWeight:500,lineHeight:"16px",whiteSpace:"nowrap",overflow:"hidden","&:after":oe},defaultCell:{position:"relative",color:e.palette.text.primary,fontSize:"13px",fontWeight:"normal",lineHeight:"15px",whiteSpace:"nowrap",overflow:"hidden",display:"flex",alignItems:"center",height:"100%",padding:"6px 16px","&:after":se},clickable:{cursor:"pointer"},profileCell:{paddingTop:"3px",paddingBottom:"4px"},controlsCell:{position:"absolute",display:"flex",alignItems:"center",height:"100%",flexShrink:0,top:0,right:"9px",visibility:"hidden",[ie]:{visibility:"visible",background:re}},editButton:{marginRight:"7px"},entityAvatar:{width:"20px",height:"20px",marginRight:"8px"}})));function pe(){return pe=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},pe.apply(this,arguments)}function ue(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){de(e,t,n[t])}))}return e}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const me=e=>{let{className:t,headCellData:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","headCellData"]);const l=ce();return a().createElement("div",{className:C()(l.headCell,t)},a().createElement(te.default,pe({},r,{headCellData:ue({},n,{label:a().createElement(ne.C,{value:n.label},a().createElement("div",{className:l.headLabel},n.label))})})))},fe=(0,r.memo)((e=>{let{value:t="",tooltip:n,onClick:r,className:l}=e;const o=ce();return n=n||t,a().createElement(ne.C,{value:n},a().createElement("div",{className:C()(o.defaultCell,l,{[o.clickable]:!!r}),onClick:r},t))}));var he=n(37573);const ge=(0,B.l)(w,(e=>{let{onEntitySelect:t}=e;return{onClick:t}}),(e=>{let{value:t,rowValue:{entity:n},className:r,onClick:l}=e;const o=ce(),i=a().createElement(a().Fragment,null,a().createElement(he.Z,{entity:n,avatarClassName:o.entityAvatar}),t);return a().createElement(fe,{value:i,tooltip:t,className:C()(o.profileCell,r),onClick:()=>l(n.uri)})})),be=(0,r.memo)((e=>{let{open:t,rowValue:n}=e;return t?a().createElement("div",{style:{padding:"6px 16px",fontSize:"13px"}},n.relation.uri):null}));var ye=n(39475),xe=n(27604),ve=n(22983);const Ee=(0,B.l)(w,(e=>{let{relationshipTable:{onStartRelationEditing:t,onFinishRelationEditing:n}}=e;return{onEdit:t,onDelete:n}}),(e=>{let{rowValue:{relation:{uri:t}},className:n,onEdit:r,onDelete:l}=e;const o=ce();return a().createElement("div",{className:C()(o.controlsCell,n)},a().createElement(ye.k,{className:o.editButton,icon:xe.Z,size:"XXS",tooltipTitle:f().text("Edit"),onClick:()=>r(t)}),a().createElement(ye.k,{icon:ve.Z,size:"XXS",tooltipTitle:f().text("Delete"),onClick:()=>l(t)}))}));function we(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){Oe(e,t,n[t])}))}return e}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ce=(e,t)=>t[e].relation.uri||`${e}`,Se=(0,B.l)(w,(e=>{let{relationshipTable:t}=e;return we({},t)}),(e=>{let{rowsData:t,sorting:n,onSort:l,total:o,page:i,rowsPerPage:s,onPageChange:c,onRowsPerPageChange:p,editingRelations:u}=e;const d=ae(),m=(0,r.useMemo)((()=>[{id:"entityLabel",label:f().text("Profile"),headCellRenderer:me,rowCellValueRenderer:ge,sortable:!0,columnClassName:d.profileColumn},{id:"relationTypeLabel",label:f().text("Relationship type"),headCellRenderer:me,rowCellValueRenderer:fe,sortable:!0,columnClassName:d.relationshipTypeColumn},{id:"entityTypeLabel",label:f().text("Entity Type"),headCellRenderer:me,rowCellValueRenderer:fe,sortable:!0,columnClassName:d.entityTypeColumn},{id:"controls",label:"",headCellRenderer:me,rowCellValueRenderer:Ee}]),[d]),h=(0,r.useRef)(null);(0,r.useEffect)((()=>{var e;null===(e=h.current)||void 0===e||e.resetScrollbarPosition()}),[t]);const g=(0,r.useMemo)((()=>t.map((e=>{var t;return null!=u&&u.includes(null==e||null===(t=e.relation)||void 0===t?void 0:t.uri)?we({},e,{expanded:!0}):e}))),[t,u]),b=(0,r.useMemo)((()=>({tableRow:C()(d.row,"collapsibleTableRow")})),[d]);return a().createElement("div",{className:d.tableWithPagination},a().createElement("div",{className:d.tableContainer},a().createElement(ee,{ref:h,columnsData:m,rowsData:g,sorting:n,onSort:l,getRowKey:Ce,ExpandedRowRenderer:be,defaultRowHeight:28,classes:b})),o>x[0]&&a().createElement(_.Z,{count:o,rowsPerPageOptions:x,rowsPerPage:s,onChangeRowsPerPage:p,page:i,onChangePage:c,basicTableRef:h}))}));var Pe=n(36444),Te=n(61837),Ne=n(33662);const Re=(0,R.Z)((e=>({inactiveSearchIcon:{color:e.palette.text.secondary},activeSearchIcon:{color:e.palette.text.primary},input:{fontSize:"14px","&::placeholder":{color:`${e.palette.text.secondary} !important`,opacity:1}}}))),je=(0,B.l)(w,(0,h.pipe)((0,h.prop)("relationshipTable"),(0,h.pick)(["searchText","onChangeSearchText"])),(e=>{let{searchText:t,onChangeSearchText:n}=e;const r=Re();return a().createElement(Ne.Z,{fullWidth:!0,height:40,autofocus:!1,value:t,onSearch:n,placeholder:f().text("Search profiles"),classes:{input:r.input}})}));var ke=n(92934),Ie=n(68977),Ze=n(77277),Le=n(8629);const Ue=(0,R.Z)((e=>({dialogPaper:{display:"flex",flexDirection:"column",padding:"12px 16px 8px"},title:{marginBottom:"21px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px",color:e.palette.text.primary},entityTypesSelector:{width:"468px",marginBottom:"20px"},relationTypesSelector:{width:"468px",marginBottom:"32px"},footer:{display:"flex"},clearAllButton:{marginRight:"auto"},cancelButton:{marginRight:"8px"}}))),ze=(0,B.l)(w,(0,h.pipe)((0,h.prop)("relationshipTable"),(0,h.pick)(["onFilter","filters","entityTypesOptions","relationTypesOptions"])),(e=>{let{open:t,onClose:n,filters:l,onFilter:o,entityTypesOptions:i,relationTypesOptions:s}=e;const c=Ue(),[p,u]=(0,r.useState)([]),[d,m]=(0,r.useState)([]),h=()=>{u(l.entityTypesUris),m(l.relationTypesUris),n()};return(0,r.useEffect)((()=>{u(l.entityTypesUris),m(l.relationTypesUris)}),[l.entityTypesUris,l.relationTypesUris]),a().createElement(Le.Z,{classes:{paper:c.dialogPaper},onClose:h,open:t},a().createElement(W.Z,{className:c.title},f().text("Filter")),a().createElement(ke.Q,{classes:{root:c.entityTypesSelector},entityTypes:i,selectedEntityTypes:p,enableEmptyValueUnderline:!0,onChange:u}),a().createElement(Ie.U,{classes:{root:c.relationTypesSelector},relationTypes:s,selectedRelationTypes:d,enableEmptyValueUnderline:!0,onChange:m}),a().createElement("div",{className:c.footer},a().createElement(Ze.Z,{className:c.clearAllButton,onClick:()=>{u([]),m([])}},f().text("Clear All")),a().createElement(Ze.Z,{className:c.cancelButton,onClick:h},f().text("Cancel")),a().createElement(Ze.Z,{onClick:()=>{o({entityTypesUris:p,relationTypesUris:d}),n()},color:"primary"},f().text("Apply"))))})),De=(0,R.Z)((e=>({wrapper:{display:"flex",alignItems:"center",paddingLeft:"16px",paddingRight:"2px"},iconButton:{marginLeft:"4px"},activeFiltersIcon:{color:e.palette.primary.main},inactiveFiltersIcon:{color:e.palette.text.secondary}}))),Ae=(0,B.l)(w,(0,h.pipe)((0,h.prop)("relationshipTable"),(0,h.pick)(["filters"])),(e=>{let{filters:t}=e;const n=De(),[l,o]=(0,r.useState)(!1),{entityTypesUris:i,relationTypesUris:s}=t,c=i.length||s.length;return a().createElement("div",{className:n.wrapper},a().createElement(je,null),a().createElement(Te.Z,{className:n.iconButton,onClick:()=>o(!0)},a().createElement(Pe.Z,{className:c?n.activeFiltersIcon:n.inactiveFiltersIcon})),a().createElement(ze,{open:l,onClose:()=>o(!1)}))})),Be=(0,R.Z)({caption:{marginLeft:"16px",marginTop:"12px",marginBottom:"14px",fontSize:"16px",lineHeight:"24px"},wrapper:{flex:1,display:"flex",flexDirection:"column",height:0}}),He=()=>{const e=Be();return a().createElement("div",{className:e.wrapper},a().createElement(W.Z,{className:e.caption,variant:"subtitle1"},f().text("Relationships")),a().createElement(Ae,null),a().createElement(Se,null))};let Me;!function(e){e[e.Relationship=0]="Relationship",e[e.EntityDetails=1]="EntityDetails"}(Me||(Me={}));const Ve=(0,r.memo)((()=>{var e;const t=z(),[n,l]=(0,r.useState)(null),o=(0,r.useCallback)((e=>{l((t=>t===e?null:e))}),[]),i=null!==n,s=(0,r.useMemo)((()=>[{buttonProps:{id:Me.Relationship,icon:A,tooltipTitle:f().text("Relationship")},content:a().createElement(He,null)},{buttonProps:{id:Me.EntityDetails,icon:U.Z,tooltipTitle:f().text("Entity Details")},content:a().createElement(F,null)}]),[]);return a().createElement("div",{className:t.wrapper},a().createElement(Z.h,{open:i,width:480},a().createElement(H,null),null===(e=s[n])||void 0===e?void 0:e.content),a().createElement(L.G,{buttonsProps:(0,h.pluck)("buttonProps",s),onButtonClick:o,activeIndexId:n}))}));Ve.displayName="GraphRightSidePanel";const Fe=Ve;var We=n(4986);const _e=e=>{let{children:t}=e;return a().createElement(We.SigmaContainer,{style:{background:"transparent"}},t)};var Ge=n(28833),$e=n.n(Ge),qe=n(3660),Ye=n.n(qe),Ke=n(98996),Xe=n.n(Ke),Qe=n(60715),Je=n(35174),et=n(30284);const tt=.6,nt=(e,t,n,r,a)=>{if(t.loop){const{size:r,color:a}=t,l=n.x,o=n.y,i=n.size,s=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{x1:e-7*(n+r),y1:t,x2:e,y2:t+7*(n+r)}}(l,o,.6*i);if(e.strokeStyle=a,e.lineWidth=r,"arrow"===t.type){const{aX:t,aY:n,vX:r,vY:c}=((e,t,n,r)=>{const a=Math.max(.5*r,5),l=Math.sqrt(Math.pow(t-e.x1,2)+Math.pow(n-e.y1,2));return{aX:e.x1+(t-e.x1)*(l-a-r)/l,aY:e.y1+(n-e.y1)*(l-a-r)/l,vX:(t-e.x1)*a/l,vY:(n-e.y1)*a/l}})(s,l,o,i);e.beginPath(),e.moveTo(l,o),e.bezierCurveTo(s.x2,s.y2,s.x1,s.y1,t,n),e.stroke(),e.fillStyle=a,e.beginPath(),e.moveTo(t+r,n+c),e.lineTo(t+c*tt,n-r*tt),e.lineTo(t-c*tt,n+r*tt),e.lineTo(t+r,n+c),e.closePath(),e.fill()}else e.beginPath(),e.moveTo(l,o),e.bezierCurveTo(s.x1,s.y1,s.x2,s.y2,l,o),e.stroke()}(0,et.default)(e,t,n,r,a)};function rt(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){at(e,t,n[t])}))}return e}function at(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const lt=e=>{let{data:t,arrangeNodes:n,selectedNode:a,onNodeClick:o}=e;const i=(0,We.useSigma)(),s=(0,We.useLoadGraph)(),c=(0,We.useRegisterEvents)(),u=(0,We.useSetSettings)(),d=(0,l.useSelector)(p.ZP.selectors.getEntity),[m,f]=(0,r.useState)({hoverNode:void 0,hoverNeighbours:void 0}),[h,g]=(0,r.useState)(null),[b,y]=(0,r.useState)({});(0,r.useEffect)((()=>{const e=new(Xe());t.nodes.forEach((t=>{e.addNode(t.id,{label:t.name,size:21,color:"#0072CE"})})),t.edges.forEach((t=>{if(!e.hasEdge(t.from,t.to)){const n=t.from===t.to;e.addEdge(t.from,t.to,{size:1,color:"rgba(0, 0, 0, 0.2)",forceLabel:n,loop:n})}})),n(e),s(e),g((0,Je.toUndirected)(e)),i.getCamera().setState({ratio:1.2})}),[s,t,i,n]);const x=(0,r.useCallback)((e=>{const t=i.getGraph(),n=null==d?void 0:d.uri;if(t&&h&&n&&e&&n!==e){const r=(0,Qe.Ar)(h,n,e),a=((e,t)=>{const n=[];return t.reduce(((t,r)=>(n.push(e.edge(t,r)||e.edge(r,t)),r))),n})(t,r);return{edges:a,nodes:r}}return{}}),[i,null==d?void 0:d.uri,h]);(0,r.useEffect)((()=>{y(x(a))}),[a,x]),(0,r.useEffect)((()=>{c({enterNode:e=>{let{node:t}=e;const n=i.getGraph();f({hoverNode:t,hoverNeighbours:n.neighbors(t)})},leaveNode:()=>{f({hoverNode:void 0,hoverNeighbours:void 0})},clickNode:e=>{let{node:t}=e;o(t)}})}),[i,c,o]),(0,r.useEffect)((()=>{u({nodeReducer:(e,t)=>{const n=rt({},t),r=(b.nodes||[]).includes(e);return!m.hoverNeighbours||m.hoverNeighbours.includes(e)||m.hoverNode===e||r||(n.label="",n.color="#f6f6f6"),e===a&&(n.color="red"),e===(null==d?void 0:d.uri)&&(n.color="green"),n},edgeReducer:(e,t)=>{const n=i.getGraph(),r=rt({},t,{hidden:!1}),a=(b.edges||[]).includes(e);return!m.hoverNode||n.hasExtremity(e,m.hoverNode)||a||(r.hidden=!0),a&&(r.color="#0072CE",r.size=4),r},renderEdgeLabels:!0,edgeLabelRenderer:nt})}),[i,u,m,a,b,null==d?void 0:d.uri])},ot=e=>{let{data:t,selectedNode:n,onNodeClick:a}=e;const l=(0,r.useCallback)((e=>{$e().assign(e);const t=Ye().inferSettings(e);Ye().assign(e,{settings:t,iterations:600})}),[]);return lt({arrangeNodes:l,data:t,selectedNode:n,onNodeClick:a}),null};var it=n(36039);let st;!function(e){e.SIMPLE_NETWORK="Simple network",e.VERTICAL_TB="Vertical hierarchy TB",e.VERTICAL_BT="Vertical hierarchy BT",e.HORIZONTAL_LR="Horizontal hierarchy LR",e.HORIZONTAL_RL="Horizontal hierarchy RL"}(st||(st={}));const ct=(e,t,n,r)=>{const a=new Set;return t.length||t.push(Array.from(e)),e.forEach((t=>{n.add(t),r.forEach((r=>{r.from!==t||e.has(r.to)||n.has(r.to)||a.add(r.to)}))})),a.size&&t.push(Array.from(a)),((e,t,n)=>{const r=new Set;return e.forEach((e=>{t.forEach((t=>{t.from!==e||n.has(t.to)||r.add(t.to)}))})),!!r.size})(a,r,n)?ct(a,t,n,r):t},pt=(e,t,n,r)=>{if(e.length<10&&(t[r]=[...e]),e.length>10){const a=e.slice(10),l=e.slice(0,10);t[r]=l,t[r+1]=n[r+1]?[...n[r+1],...a]:a}if(t[r+1]||n[r+1]){const e=t[++r]||n[r];return pt(e,t,n,r)}return t},ut=e=>{let{data:t,selectedNode:n,layout:a,onNodeClick:l}=e;const o=(0,r.useCallback)((e=>{const r=(e=>{switch(e){case st.VERTICAL_TB:return 180;case st.VERTICAL_BT:return 0;case st.HORIZONTAL_LR:return 270;case st.HORIZONTAL_RL:return 90}})(a),l=((e,t)=>{const n=e.nodes,r=e.edges.filter((e=>e.from!==e.to)),a=((e,t,n)=>{const r=new Set;return t.forEach((t=>{e.some((e=>e.to===t.id))||r.add(t.id)})),r.size||r.add(n),r})(r,n,t),l=ct(a,[],new Set,r);return pt(l[0],[],l,0)})(t,n),o=(e=>{const t=e.map((e=>e.length));return Math.max(...t)})(l);for(let t=0;t<l.length;++t)for(let n=0;n<l[t].length;++n)e.setNodeAttribute(l[t][n],"x",(s=n,(i=l[t].length)===(c=o)?5*s:1===i?5*(c-1)/2:5*(c-1)/(i+1)*(s+1))),e.setNodeAttribute(l[t][n],"y",0+10*t);var i,s,c;it.rotation.assign(e,r,{degrees:!0})}),[t,a,n]);return lt({arrangeNodes:o,data:t,selectedNode:n,onNodeClick:l}),null};var dt=n(84425);const mt=(0,R.Z)({graphTypeSelector:{minWidth:"200px",backgroundColor:"#FAFAFA",opacity:1,height:"40px"},filledInputRoot:{borderRadius:"4px"},valueContainer:{width:"auto",marginLeft:"16px"}}),ft=(0,B.l)(w,(e=>{let{graphTypeUri:t,setGraphTypeUri:n}=e;return{setGraphTypeUri:n,graphTypeUri:t}}),(e=>{let{graphTypeUri:t,setGraphTypeUri:n}=e;const o=mt(),i=(0,l.useSelector)(p.ZP.selectors.getMetadata),s=(0,l.useSelector)(p.ZP.selectors.getEntity),c=(0,r.useMemo)((()=>[{label:f().text("All"),value:null},...(0,d.mmY)(i,s.type).map((e=>{let{uri:t,label:n}=e;return{value:t,label:n}}))]),[s,i]),u=(0,r.useMemo)((()=>c.find((e=>e.value===t))),[c,t]);return a().createElement(dt.Z,{classes:{valueContainer:o.valueContainer},className:o.graphTypeSelector,height:42,label:f().text("Graph type"),value:u,options:c,onChange:e=>n(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:o.filledInputRoot}}}})})),ht=(0,R.Z)({graphLayoutSelector:{minWidth:"202px",backgroundColor:"#FAFAFA",opacity:1,marginLeft:"10px"},filledInputRoot:{borderRadius:"4px",height:"42px"}}),gt=(0,r.memo)((e=>{let{value:t,onChangeHandler:n}=e;const r=ht(),l=[{label:f().text("Simple network"),value:st.SIMPLE_NETWORK},{label:f().text("Vertical hierarchy TB"),value:st.VERTICAL_TB},{label:f().text("Vertical hierarchy BT"),value:st.VERTICAL_BT},{label:f().text("Horizontal hierarchy LR"),value:st.HORIZONTAL_LR},{label:f().text("Horizontal hierarchy RL"),value:st.HORIZONTAL_RL}];return a().createElement(dt.Z,{className:r.graphLayoutSelector,label:f().text("Graph layout"),value:l.find((0,h.propEq)("value",t)),options:l,onChange:e=>n(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:r.filledInputRoot}}}})})),bt=(0,R.Z)({wrapper:{height:"100%",position:"relative"},selectors:{display:"flex",position:"absolute",top:"12px",right:"16px",zIndex:2},graph:{height:"calc(100% - 5px)"}});function yt(){return yt=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},yt.apply(this,arguments)}const xt=(0,B.l)(w,(e=>{let{data:t,selectedEntity:n,onEntitySelect:r}=e;return{data:t,selectedNode:null==n?void 0:n.uri,onNodeSelect:r}}),(e=>{let{data:t,selectedNode:n,onNodeSelect:l}=e;const[o,i]=(0,r.useState)(st.SIMPLE_NETWORK),s=(0,r.useMemo)((()=>t&&(e=>{var t;const n=new Set,r=new Set;e.entities.forEach((e=>n.add(e.uri))),((null===(t=e.relations)||void 0===t?void 0:t.filter((e=>n.has(e.startObject.objectURI)&&n.has(e.endObject.objectURI))))||[]).forEach((e=>{r.has(`${e.endObject.objectURI}--${e.startObject.objectURI}`)||r.add(`${e.startObject.objectURI}--${e.endObject.objectURI}--${e.direction}`)}));const a=e.entities.map((e=>({id:e.uri,name:e.label}))),l=[];return r.forEach((e=>{const t=e.split("--");l.push({from:t[0],to:t[1]})})),{nodes:a,edges:l}})(t)),[t]),c=bt(),p={data:s,selectedNode:n,onNodeClick:l};return a().createElement("div",{className:c.wrapper},a().createElement("div",{className:c.selectors},a().createElement(ft,null),a().createElement(gt,{value:o,onChangeHandler:i})),a().createElement("div",{className:c.graph},s&&a().createElement(_e,null,o===st.SIMPLE_NETWORK?a().createElement(ot,p):a().createElement(ut,yt({},p,{layout:o})))))})),vt=(0,R.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},graphWrapper:{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1},graphContainer:{display:"flex",overflow:"hidden",flexGrow:1},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}}))),Et=(0,r.memo)((()=>{const e=vt(),t=(0,l.useSelector)(p.ZP.selectors.getEntity),n=(e=>{const{graphLoading:t,data:n,graphTypeUri:a,setGraphTypeUri:o}=(e=>{const[t,n]=(0,r.useState)(null),a=(0,l.useDispatch)(),[o,i]=(0,r.useState)(null),[s,c]=(0,r.useState)(!1),u=null==e?void 0:e.uri,m=(0,d.biM)(e);return(0,r.useEffect)((()=>(!u||(0,d.ZiX)(u)||m||(c(!0),(0,d.ZYI)({uri:u,deep:t?2:1,limitCreditsConsumption:!0,graphTypes:t?[(0,d.nIW)(t)]:null,activenessDate:null,max:t?200:3e3}).then(i).catch((e=>{i(null),a(p.ui.actions.errorSet((0,d.xU7)(e,f().text("Something went wrong"))))})).finally((()=>{c(!1)}))),()=>{i(null),c(!1)})),[u,m,a,t]),{graphLoading:s,data:o,graphTypeUri:t,setGraphTypeUri:n}})(e),{selectedEntity:i,onEntitySelect:s,selectedEntityLoading:c}=((e,t)=>{const n=(0,g._)(),a=(0,l.useDispatch)(),[o,i]=(0,r.useState)(null),s=(0,r.useRef)({}),[c,u]=(0,r.useState)(!1),m=(0,r.useCallback)((e=>{const t=s.current[e];return t?Promise.resolve(t):(0,d.HvW)(e).then((e=>(s.current=y(s.current,e),e)))}),[]),b=(0,r.useCallback)((e=>{var r;const l=null==t||null===(r=t.entities)||void 0===r?void 0:r.find((0,h.propEq)("uri",e));l&&i(l),u(!0),n(m(e)).then(i).catch((e=>{a(p.ui.actions.errorSet((0,d.xU7)(e,f().text("Something went wrong"))))})).finally((()=>{u(!1)}))}),[a,t,n,m]);return(0,r.useEffect)((()=>{null!=e&&e.uri&&(s.current=y({},e),b(e.uri))}),[null==e?void 0:e.uri]),(0,r.useEffect)((()=>{const n=null==t?void 0:t.entities.find((e=>(null==o?void 0:o.uri)===e.uri));n||(null!=e&&e.uri?(s.current=y({},e),b(e.uri)):(s.current={},i(null)))}),[t]),{selectedEntityLoading:c,selectedEntity:o,onEntitySelect:b}})(e,n);return{graphLoading:t,data:n,selectedEntity:i,onEntitySelect:s,selectedEntityLoading:c,graphTypeUri:a,setGraphTypeUri:o,relationshipTable:E(n,null==i?void 0:i.uri,a)}})(t),{graphLoading:o}=n;return a().createElement(w.Provider,{value:n},a().createElement("div",{className:e.perspectiveView},o&&a().createElement(u.Z,null),(null==t?void 0:t.uri)&&a().createElement("div",{className:e.graphContainer},a().createElement("div",{className:e.graphWrapper},a().createElement(I,null),a().createElement(xt,null)),a().createElement(Fe,null))))}));Et.displayName="GraphPerspectiveView";const wt=Et,Ot=(0,o.createGenerateClassName)({productionPrefix:"graph",disableGlobal:!0}),Ct=e=>{let{store:t}=e;return a().createElement(l.Provider,{store:t},a().createElement(o.StylesProvider,{generateClassName:Ot},a().createElement(s.MuiPickersUtilsProvider,{utils:c.Z},a().createElement(wt,null),a().createElement(i.Z,{showErrorFromStore:!0}))))}}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[8911],{50548:(e,t,n)=>{n.d(t,{l:()=>o});var r=n(24328),a=n.n(r);function l(){return l=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},l.apply(this,arguments)}const o=(e,t,n)=>{if(e&&t){const o=(0,r.memo)(n);return n=>a().createElement(e.Consumer,null,(e=>a().createElement(o,l({},n,t(e,n)))))}return n}},44938:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(24328),a=n.n(r),l=n(50166),o=n(44443),i=n(18435);const s=(0,n(79692).Z)({item:{overflow:"hidden"}});function c(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){p(e,t,n[t])}))}return e}function p(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=(0,r.memo)((e=>{let{width:t=0,height:n=0,defaultItemSize:p,data:u,children:d,itemKey:m,showNotMeasuredItems:f,listRef:h}=e;const g=s(),b=(0,r.useRef)({}),[y,x]=(0,r.useState)({}),v=(0,r.useCallback)((0,i.DsO)((()=>{x(c({},b.current))})),[]),E=(0,r.useCallback)(((e,t)=>m?m(t,e):t),[m]),w=(0,r.useRef)(),O=h||w;O.current&&O.current.resetAfterIndex(0,!1);const C=(0,r.useMemo)((()=>e=>{let{data:t,index:n,style:r}=e;const l=E(t,n);return a().createElement("div",{style:r,className:g.item},a().createElement("div",{style:f?void 0:{visibility:l in y?void 0:"hidden"}},a().createElement(o.Z,{handleHeight:!0,onResize:(e,t)=>{b.current[l]!==t&&(((e,t)=>{b.current=c({},b.current,{[e]:t})})(l,t),v())}}),d({data:t,index:n})))}),[d,f,E,v,!f&&y]);return a().createElement(l.VariableSizeList,{ref:O,width:t,height:n,itemCount:u.length,itemData:u,itemSize:e=>y[(e=>E(u,e))(e)]||p,itemKey:m},C)}))},42011:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(13980),a=n.n(r),l=n(24328),o=n.n(l),i=n(71153),s=n.n(i),c=n(28899),p=n(87918),u=n.n(p),d=n(79573),m=n(17440);const f=(0,n(79692).Z)({pagination:{display:"flex",alignItems:"center",justifyContent:"flex-end",height:"56px",borderTop:"1px solid rgba(0,0,0,0.12)",boxShadow:"none"},caption:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px"},selectRoot:{marginLeft:"5px",marginRight:"36px"},select:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px",textAlign:"right"},actions:{marginLeft:"32px"}});function h(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){g(e,t,n[t])}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const b=e=>{let{classes:t={},count:n,rowsPerPageOptions:r,page:a,onChangePage:i,rowsPerPage:p,onChangeRowsPerPage:g,basicTableRef:b,labelRowsPerPage:y}=e;const x=f(),v=(0,l.useCallback)((()=>{(0,m.pathOr)(m.identity,["current","resetScrollbarPosition"],b)()}),[b]),E=(0,l.useCallback)((e=>{i(e),v()}),[i,v]),w=(0,l.useCallback)((e=>{i(0),g(e),v()}),[i,g,v]);return o().createElement(c.Z,{classes:h({},t,{root:s()(x.pagination,t.root),select:s()(x.select,t.select),caption:x.caption,selectRoot:x.selectRoot,actions:x.actions}),component:"div",labelRowsPerPage:y||u().text("Rows per page:"),labelDisplayedRows:e=>{let{from:t,to:n,count:r}=e;return u().text("${fromRow}-${toRow} of ${countRows}",{fromRow:u().number(t,"0,0"),toRow:u().number(n,"0,0"),countRows:u().number(r,"0,0")})},count:n,rowsPerPageOptions:r,page:a,onChangePage:(0,m.pipe)((0,m.nthArg)(1),E),rowsPerPage:p,onChangeRowsPerPage:(0,m.pipe)(d.NA,w)})};b.propTypes={classes:a().object,rowsPerPageOptions:a().arrayOf(a().number),count:a().number,page:a().number,onChangePage:a().func,rowsPerPage:a().number,onChangeRowsPerPage:a().func,basicTableRef:a().shape({current:a().object}),labelRowsPerPage:a().string};const y=o().memo(b)},1730:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(27556),a=n(13980),l=n.n(a),o=n(24328),i=n.n(o);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 p=(0,n(79692).Z)((e=>({"basic-view__paper":s({display:"flex",flexDirection:"column"},e.basicView)})));function u(){return u=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},u.apply(this,arguments)}const d=(0,o.forwardRef)(((e,t)=>{let{children:n,className:a}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","className"]);const o=p();return i().createElement(r.Z,u({ref:t,className:a,classes:{root:o["basic-view__paper"]}},l),n)}));d.displayName="BasicView",d.propTypes={children:l().node,className:l().string};const m=d},20146:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),a=n.n(r),l=n(52730),o=n(71153),i=n.n(o),s=n(90436),c=n(18435),p=n(35674);const u=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),d=e=>{let{entity:t,className:n,size:r="small"}=e;const o=u(),d=(0,l.useSelector)(p.ZP.selectors.getMetadata),m=t.type,f=(0,c.nt9)(d,m)||{},h=(0,c.VD3)(d,f,"typeColor")||c.rSc.palette.primary.main;return a().createElement(s.Z,{style:{backgroundColor:h,color:c.P6Y.Colors.getColor(h)?"#FFFFFF":"#212121"},className:i()(o[`entityType-${r}`],n),component:"div"},(0,c.jFi)(d,t))}},92934:(e,t,n)=>{n.d(t,{Q:()=>c});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),i=n(18435),s=n(72108);const c=(0,r.memo)((e=>{let{entityTypes:t,selectedEntityTypes:n,single:l,placeholder:c,enableEmptyValueUnderline:p,onChange:u,classes:d={},ListLabelProps:m={},disabled:f=!1}=e;const h=(0,r.useMemo)((()=>t.filter(i.oDv)),[t]);return a().createElement(s.S,{items:h,selectedItemsUris:n,single:l,placeholder:c,enableEmptyValueUnderline:p,onChange:u,classes:d,ListLabelProps:m,disabled:f,label:o().text("Entity type"),dataReltioId:"entity-type-selector",selectionPopupTitle:o().text("Select entity types")})}));c.displayName="EntityTypesSelector"},52194:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(17998);const s=(0,n(79692).Z)({container:{padding:"0 16px",minHeight:"48px"},title:{fontSize:"16px",lineHeight:"19px",paddingTop:"16px",paddingBottom:"13px",justifyContent:"flex-start"}}),c=e=>{let{className:t,title:n,children:r}=e;const l=s();return a().createElement(i.Z,{title:n,classes:{root:o()(l.container,t),title:l.title}},r)}},72108:(e,t,n)=>{n.d(t,{S:()=>k});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(17440),s=n(18435),c=n(86619),p=n(83543),u=n(80030),d=n(79692);const m=(0,d.Z)({listLabelContainer:{display:"flex",alignItems:"center",position:"relative",overflow:"hidden",whiteSpace:"nowrap",justifyContent:"space-between",height:"100%",width:"100%"},listLabel:{visibility:"hidden",position:"absolute",overflow:"hidden"},visibleItemsLabel:{textOverflow:"ellipsis",marginRight:"5px",overflow:"hidden",flex:1,flexBasis:"auto"},hiddenCount:{color:"rgba(0,0,0,0.87)",fontSize:"13px",lineHeight:"15px",padding:"5px 8px",borderRadius:"16px",backgroundColor:"rgba(0,0,0,.12)"}}),f=(e,t)=>{const{childNodes:n,clientLeft:r,clientWidth:a}=t;if(n.length>0){const[t]=Array.from(n),l=document.createRange();l.setStart(t,0);for(let n=0;n<e.length;n++){l.setEnd(t,l.endOffset+e[n].length);const{width:o}=l.getBoundingClientRect();if(r+o>a)return n;n!==e.length-1&&l.setEnd(t,l.endOffset+", ".length)}}return-1},h=e=>e.join(", "),g=e=>`calc(${(0,i.isNil)(e)?"100%":`${e}px`} - 35px)`,b=e=>{let{list:t,maxWidth:n}=e;const l=m(),o=(0,r.useRef)(),[i,s]=(0,r.useState)(0);(0,r.useEffect)((()=>{s(((e,t)=>{const n=e.length,r=((e,t)=>{if(t){const n=f(e,t);return-1===n?0:e.length-n}return 0})(e,t);return n-Math.max(1,n-r)})(t,o.current))}),[t]);const c=h(t),p=i>0,d=p?h(t.slice(0,-i)):c;return a().createElement(u.ZP,{title:p?c:""},a().createElement("div",{className:l.listLabelContainer},a().createElement("div",{style:{width:g(n)},className:l.listLabel,ref:o},c),a().createElement("div",{className:l.visibleItemsLabel},d),p&&a().createElement("div",{className:l.hiddenCount},`+${i}`)))};var y=n(40435),x=n(22311),v=n(26638),E=n(33117),w=n(94792),O=n(63485);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)}const S=(0,i.always)(32),P=(0,r.memo)((e=>{let{selectedItems:t,onItemClick:n,focusIndex:r,width:l,height:o}=e,i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["selectedItems","onItemClick","focusIndex","width","height"]);return a().createElement(O.Z,C({getItemSize:S,renderItem:(e,l,o)=>{let{item:i}=l;const s=!!t.find((e=>i.uri===e)),c=o===r;return a().createElement(E.Z,{key:i.uri,onClick:n,checked:s,data:i,label:a().createElement(w.Z,{text:i.label,highlight:i.filterText}),labelInText:i.label,style:e,isFocused:c,hideIcon:!0,LogoIcon:i.LogoIcon})},focusIndex:r,fixedTitle:!1,disableHorizontalScrollbar:!0,width:l,height:o},i))}));P.displayName="SelectMetadataTypesList";const T=(0,d.Z)({root:{borderRadius:"4px 4px 0 0",margin:0,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},inputLabel:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%",top:"calc(50% - 23px)"},inputText:{display:"flex",flexGrow:1,alignItems:"center",height:"25px",width:"calc(100% - 53px)",paddingTop:"18px",paddingBottom:"4px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},input:{width:0,cursor:"pointer","&[disabled]":{backgroundColor:"transparent",cursor:"default"},"&$emptyInput":{width:"100%"}},emptyInput:{},disabledInput:{},disabledPointer:{},disabledUnderline:{},inputRoot:{flex:1,paddingRight:"4px",fontSize:"14px",letterSpacing:0,lineHeight:"16px","&$disabledInput":{backgroundColor:"rgba(0, 0, 0, 0.03)",cursor:"pointer","&$disabledPointer":{cursor:"default"},"&$disabledUnderline::before":{borderBottomStyle:"solid"}}},icon:{transform:"rotate(0deg)",transition:"transform 0.35s ease"},"popup-opened-icon":{transform:"rotate(-180deg)"}});function N(){return N=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},N.apply(this,arguments)}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){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}const k=(0,r.memo)((e=>{let{placeholder:t,classes:n={},items:l,selectedItemsUris:u,onChange:d,ListLabelProps:m={},disabled:f,enableEmptyValueUnderline:h,single:g,label:E,dataReltioId:w,selectionPopupTitle:O}=e;const C=T(),[S,j]=(0,r.useState)(!1),k=(0,r.useCallback)((()=>j(!0)),[]),I=(0,r.useCallback)((()=>j(!1)),[]),[Z,L]=(0,r.useState)(""),U=(0,r.useCallback)((()=>L("")),[]),z=(0,r.useCallback)((0,i.pipe)(U,I),[I,U]),D=l.filter((e=>{let{label:t}=e;return s.P6Y.strings.search(t,Z)})).map(((e,t)=>({item:{item:R({},e,{filterText:Z})},index:t}))),A=(0,r.useMemo)((()=>u.map((e=>l.find((0,i.propEq)("uri",e)))).map((0,i.prop)("label"))),[u,l]),B=(0,r.useCallback)(((e,t)=>{g?(d(t?[e.uri]:[]),z()):d(t?u.concat(e.uri):u.filter((t=>t!==e.uri)))}),[u,d,g,z]),H=(0,r.useCallback)((e=>{let{item:t}=e;const n=!u.includes(t.uri);B(t,n)}),[u,B]),{focusIndex:M,handleKeyDown:V}=(0,v.t)({items:D,open:S,onSelectFocusedItem:H,selectedItems:u,onClose:z}),F=(0,r.useRef)(),W=F.current?F.current.getBoundingClientRect().width:0,_=Math.max(W,255),G=0===u.length;return a().createElement(a().Fragment,null,a().createElement(c.Z,{label:E,ref:F,InputProps:{startAdornment:G&&!t?null:a().createElement("div",{className:o()(C.inputText,n.inputText)},G?a().createElement("div",null,t):a().createElement(b,N({},m,{list:A}))),classes:{root:C.inputRoot,input:o()(C.input,n.input,{[C.emptyInput]:G&&!t}),disabled:o()(C.disabledInput,{[C.disabledPointer]:f}),underline:C.disabledUnderline},endAdornment:a().createElement(y.Z,{size:"L",icon:p.Z,iconClassName:o()(C.icon,{[C["popup-opened-icon"]]:S}),disabled:f}),readOnly:!0,disabled:!0,disableUnderline:G&&!h},inputProps:{tabIndex:-1},InputLabelProps:{classes:{root:o()(C.inputLabel,n.label)}},value:"",onClick:f?void 0:k,classes:{root:o()(C.root,n.root)},margin:"dense",variant:"filled",disabled:f,"data-reltio-id":w}),a().createElement(x.Z,{open:S,anchorEl:F.current,onClose:z,onSearch:L,title:O,containerWidth:_,containerHeight:355,searchInputOnKeyDown:V,transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"left",vertical:"bottom"},PaperProps:{"data-reltio-id":`${w}-popup`}},a().createElement(P,{items:D,onItemClick:B,selectedItems:u,width:_,height:245,focusIndex:M})))}));k.displayName="MetadataTypesSelector"},33109:(e,t,n)=>{n.d(t,{Z:()=>E});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(71153),s=n.n(i),c=n(52730),p=n(17440),u=n(90436),d=n(80030),m=n(87918),f=n.n(m),h=n(18435),g=n(35674),b=n(37573),y=n(20146);const x=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&: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"}}}))),v=e=>{let{className:t,entity:n,children:l,classes:o}=e;const i=x({classes:o}),m=(0,c.useSelector)(g.ZP.selectors.getMetadata),v=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,h.BTI)(n))}),[n]);if((0,p.isNil)(n))return null;const E=(0,h.idV)(n.label),w=n.secondaryLabel,O=(0,h.ptG)(m,n),C=(0,h.Fn9)(n),S=n.uri,P=(0,h.BTI)(n);return a().createElement("div",{className:s()(i.profileBandWrapper,t)},a().createElement("div",{className:s()(i.profileBand,{[i.inactive]:!C}),"data-entity-uri":S},a().createElement(b.Z,{key:n.uri,entity:n,avatarClassName:i.profileIcon,imageClassName:i.imageProfileIcon}),a().createElement("div",{className:i.profileInfo},a().createElement("div",null,a().createElement(u.Z,{variant:"h6",className:i.label},E),w&&a().createElement(u.Z,{variant:"subtitle2",className:i.secondaryLabel},w),O&&a().createElement(u.Z,{variant:"subtitle1",className:i.businessCard},O)),a().createElement("div",{className:i.specialInfo},a().createElement("div",{className:i.entityType},a().createElement(y.Z,{entity:n,size:"medium",className:i.badge}),!(0,h.ZiX)(S)&&a().createElement(d.ZP,{title:f().text("Copy to clipboard")},a().createElement(u.Z,{display:"inline",variant:"body2",className:i.entityId,onClick:v},f().text("Entity ID"),": ",P))))),l&&a().createElement("div",null,l)))};v.propTypes={className:o().string,entity:o().object,children:o().node,classes:o().object};const E=v},68977:(e,t,n)=>{n.d(t,{U:()=>c});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),i=n(18435),s=n(72108);const c=(0,r.memo)((e=>{let{relationTypes:t,selectedRelationTypes:n,single:l,placeholder:c,enableEmptyValueUnderline:p,onChange:u,classes:d={},ListLabelProps:m={},disabled:f=!1}=e;const h=(0,r.useMemo)((()=>t.filter(i.Tt2)),[t]);return a().createElement(s.S,{items:h,selectedItemsUris:n,single:l,placeholder:c,enableEmptyValueUnderline:p,onChange:u,classes:d,ListLabelProps:m,disabled:f,label:o().text("Relation type"),dataReltioId:"relation-type-selector",selectionPopupTitle:o().text("Select relation types")})}));c.displayName="RelationTypesSelector"},28101:(e,t,n)=>{n.d(t,{G:()=>m});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(39475),s=n(79692),c=n(41128);const p=(0,s.Z)((e=>({container:{display:"flex",flexDirection:"column",flexShrink:0,width:"64px",paddingTop:"8px",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)"},active:{backgroundColor:(0,c.U1)(e.palette.primary.main,.12),color:e.palette.primary.main,"&:after":{content:'""',position:"absolute",height:"42px",width:"3px",backgroundColor:e.palette.primary.main,left:"-8px",borderRadius:"0 6px 6px 0"}},buttonWrapper:{position:"relative",width:"48px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",margin:"2px 8px",color:e.palette.text.secondary}})));function u(){return u=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},u.apply(this,arguments)}function d(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const m=e=>{let{buttonsProps:t,activeIndexId:n,className:r,onButtonClick:l,classes:s={}}=e;const c=p(),{active:m,buttonWrapper:f}=s,h=d(s,["active","buttonWrapper"]);return a().createElement("div",{className:o()(c.container,r)},t.map((e=>{let{id:t}=e,r=d(e,["id"]);return a().createElement(i.k,u({},r,{classes:h,size:"S",key:t,className:o()({[o()(c.active,m)]:n===t},c.buttonWrapper,f),onClick:()=>l(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},11821:(e,t,n)=>{n.d(t,{h:()=>o});var r=n(24328),a=n.n(r);const l=(0,n(79692).Z)((e=>({contentWrapper:{display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",marginLeft:"3px",transition:e.transitions.create(["width"],{duration:e.transitions.duration.enteringScreen})}}))),o=e=>{let{width:t,open:n,children:r}=e;const o=l();return a().createElement("div",{className:o.contentWrapper,style:{width:`${n?t:0}px`}},n&&a().createElement(a().Fragment,null,r))}},15177:(e,t,n)=>{n.d(t,{Z:()=>I});var r=n(52730),a=n(35674),l=n(24328),o=n.n(l),i=n(18435),s=n(71153),c=n.n(s),p=n(87918),u=n.n(p),d=n(95544),m=n(90436),f=n(80687),h=n(1730),g=n(52194),b=n(89978),y=n(26978),x=n(79692);const v=(0,x.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"},noData:{fontSize:"13px",color:"rgba(0,0,0,0.54)"}}),E=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},metadata:s,caption:p="",excludeUris:x=[],includeUris:E=[],attributesCount:w=16}=e;const O=v(),C=(0,r.useSelector)(a.ZP.selectors.getPivotingAttributes),S=(0,l.useMemo)((()=>(0,y.U)(s,n.type,E,x)),[x,E,s,n.type]),P=(0,i.fyF)(S,n).filter((e=>{let{values:t}=e;return!(0,i.O27)(t)})).length>0;return P||!(0,i.O27)(p)?o().createElement(f.J.Provider,{value:C},o().createElement(h.Z,{className:t},p&&o().createElement(g.Z,{className:O.header,title:p}),o().createElement(d.Z,{className:c()(O.attributesContainer,{[O.noCaption]:!p})},P?o().createElement(b.Z,{entity:n,attrTypes:S,parentUri:n.uri,drawLines:!1,max:w}):o().createElement(m.Z,{className:O.noData},u().text("No data found"))))):null}));var w=n(17440),O=n(76141),C=n(12212);const S=(0,x.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"}});var P=n(1108);function T(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){N(e,t,n[t])}))}return e}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const R=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},mode:s,metadata:p,caption:u="",excludeUris:m=[],includeUris:f=[],pinnedAttributes:b}=e;const x=S(),v=(0,r.useDispatch)(),E=(0,l.useContext)(C.m),N=(0,r.useSelector)(a.ZP.selectors.getUserRoles),R=(0,l.useMemo)((()=>(0,i.mC3)(b,N)),[b,N]),j=(0,r.useSelector)((e=>a.ZP.selectors.getModifiedEntity(e,n.uri)||{})),k=(0,l.useMemo)((()=>(0,y.U)(p,j.type,f,m)),[m,f,p,j.type]),I=(0,l.useCallback)((e=>(0,w.pipe)(a.N5.actions.addAttributes,v)(e.map((e=>T({},e,{viewId:E}))))),[E,v]),Z=(0,l.useCallback)((e=>(0,w.pipe)(a.N5.actions.modifyAttribute,v)(T({},e,{viewId:E}))),[E,v]),L=(0,l.useCallback)((e=>(0,w.pipe)(a.N5.actions.removeAttribute,v)(T({},e,{viewId:E}))),[E,v]);return o().createElement(h.Z,{className:t},u&&o().createElement(g.Z,{className:x.header,title:u}),o().createElement(d.Z,{className:c()(x.attributesContainer,{[x.noCaption]:!u})},o().createElement(P.c.Provider,{value:R},o().createElement(O.Z,{entity:j,attrTypes:k,parentUri:j.uri,drawLines:!1,mode:s,showEmptyEditors:(0,i.ZiX)(j.uri),crosswalks:j.crosswalks,onAddAttributes:I,onChangeAttribute:Z,onDeleteAttribute:L}))))}));var j=n(10609);function k(){return k=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},k.apply(this,arguments)}const I=(0,r.connect)(((e,t)=>({entity:t.entity||a.ZP.selectors.getEntityWithDiff(e),mode:t.mode||a.ZP.selectors.getMode(e)})))((e=>{let{mode:t=i.ARY.Viewing,attributesCount:n,pinnedAttributes:r,entity:a}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["mode","attributesCount","pinnedAttributes","entity"]);return o().createElement(j.u.Provider,{value:a},(0,i.uzs)(t)?o().createElement(E,k({attributesCount:n,entity:a},l)):o().createElement(R,k({mode:t,pinnedAttributes:r,entity:a},l)))}))},38911:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ct});var r=n(24328),a=n.n(r),l=n(52730),o=n(36138),i=n(97333),s=n(22664),c=n(52844),p=n(35674),u=n(87378),d=n(18435),m=n(87918),f=n.n(m),h=n(17440),g=n(29627);function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const y=(e,t)=>{const n=function(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){b(e,t,n[t])}))}return e}({},e,{[null==t?void 0:t.uri]:t}),r=Object.keys(n);return r.length>50&&delete n[r[0]],n},x=[25,50,100],v=(e,t,n)=>{const{startObject:r,endObject:a,type:l}=t,{directionalLabel:o}=(0,d.nqN)(t)===n?r:a;return o||(0,d.Lmx)(e,l)},E=(e,t,n)=>{const[a,o]=(0,r.useState)({field:"",order:"asc"}),[i,s]=(0,r.useState)(0),[c,u]=(0,r.useState)(x[0]),[m,f]=(0,r.useState)([]),g=(0,l.useSelector)(p.ZP.selectors.getMetadata),b=(0,r.useMemo)((()=>{const t=(null==e?void 0:e.entities)||[];return(0,h.zipObj)(t.map((0,h.prop)("uri")),t)}),[null==e?void 0:e.entities]),y=(0,r.useMemo)((()=>(0,h.pipe)((0,h.filter)((0,h.either)((0,h.pipe)(d.nqN,(0,h.equals)(t)),(0,h.pipe)(d.j5q,(0,h.equals)(t)))),(0,h.uniqBy)((0,h.prop)("uri")),(0,h.map)((e=>{const n=b[((e,t)=>{const n=(0,d.nqN)(t),r=(0,d.j5q)(t);return n===e?r:n})(t,e)];return{relation:e,entity:n,entityLabel:(0,d.idV)(n.label),entityTypeLabel:(0,d.jFi)(g,n),relationTypeLabel:v(g,e,n.uri)}})))((null==e?void 0:e.relations)||[])),[e,t,b,g]),{searchText:E,onChangeSearchText:w,filters:O,onFilter:C,relationTypesOptions:S,entityTypesOptions:P}=(e=>{const[t,n]=(0,r.useState)(""),[a,o]=(0,r.useState)({entityTypesUris:[],relationTypesUris:[]}),i=(0,l.useSelector)(p.ZP.selectors.getMetadata);return{searchText:t,onChangeSearchText:n,filters:a,onFilter:o,entityTypesOptions:(0,r.useMemo)((()=>(0,h.pipe)((0,h.map)((e=>{let{entity:t}=e;return t.type})),h.uniq,(0,h.map)((0,d.nt9)(i)))(e)),[e,i]),relationTypesOptions:(0,r.useMemo)((()=>(0,h.pipe)((0,h.map)((e=>{let{relation:t}=e;return t.type})),h.uniq,(0,h.map)((0,d.V3K)(i)))(e)),[e,i])}})(y),T=(0,r.useMemo)((()=>(0,h.pipe)((0,h.filter)((e=>{let{entityLabel:t,entity:n,relation:r}=e;const{entityTypesUris:a,relationTypesUris:l}=O;return t.toLowerCase().includes(E)&&(0,h.ifElse)((0,h.prop)("length"),(0,h.includes)(r.type),h.T)(l)&&(0,h.ifElse)((0,h.prop)("length"),(0,h.includes)(n.type),h.T)(a)})),a.field?(0,h.sort)(((e,t)=>d.P6Y.strings.sort(a.order,e[a.field],t[a.field]))):h.identity)(y)),[y,a,E,O]),N=(0,r.useMemo)((()=>T.slice(i*c,i*c+c)),[T,i,c]),R=(0,r.useCallback)((e=>{f((t=>[...t,e]))}),[]),j=(0,r.useCallback)((e=>{f((t=>(0,h.without)([e],t)))}),[]);return(0,r.useEffect)((()=>{s(0),w(""),C({entityTypesUris:[],relationTypesUris:[]})}),[t,n,w,C]),(0,r.useEffect)((()=>{s(0)}),[a,E,O]),{rowsData:N,onSort:o,sorting:a,searchText:E,onChangeSearchText:w,filters:O,onFilter:C,entityTypesOptions:P,relationTypesOptions:S,editingRelations:m,onStartRelationEditing:R,onFinishRelationEditing:j,total:T.length,page:i,rowsPerPage:c,onPageChange:s,onRowsPerPageChange:u}},w=a().createContext({graphLoading:!1,data:null,selectedEntityLoading:!1,selectedEntity:null,onEntitySelect:()=>{},relationshipTable:{}});w.displayName="GraphStateContext";var O=n(71153),C=n.n(O),S=n(33109),P=n(62901),T=n(72316),N=n(95544),R=n(79692);const j=(0,R.Z)({comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}}),k=(0,r.memo)((e=>{let{className:t}=e;const n=j(),r=(0,l.useSelector)(p.ZP.selectors.getEntity);return a().createElement(S.Z,{className:C()(t,P.U),entity:r},a().createElement(N.Z,{className:n.comments},a().createElement(T.Z,{uri:r.uri,relatedObjectUris:(0,d.wp9)(d.q7e.ENTITY,{entityUri:r.uri}),objectType:d.q7e.ENTITY})))}));k.displayName="GraphProfileBand";const I=k;var Z=n(11821),L=n(28101),U=n(82726);const z=(0,R.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0}});function D(){return D=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},D.apply(this,arguments)}const A=e=>{let{styles: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={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["styles"]);return a().createElement("svg",D({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7v2h2V7H6zm0 4v2h2v-2H6zm0 4v2h2v-2H6zm4-8v2h8V7h-8zm10-2v5.02a6.52 6.52 0 012 2.01V3H2v18h11.028a6.52 6.52 0 01-2.009-2H4V5h16zm-9.503 8a6.497 6.497 0 011.31-2H10v2h.497zM10 15.5c0-.168.006-.335.019-.5H10v.5zm0 0c0 .516.06 1.018.173 1.5H10v-1.5zm10.3 2.39L23.42 21 22 22.42l-3.12-3.12c-.69.44-1.51.7-2.39.7-2.48 0-4.49-2.01-4.49-4.5s2.01-4.5 4.5-4.5 4.5 2.01 4.5 4.5c0 .88-.26 1.69-.7 2.39zm-3.8.11a2.5 2.5 0 000-5 2.5 2.5 0 000 5z",fill:"currentColor"}))};var B=n(50548);const H=(0,B.l)(w,(0,h.pick)(["selectedEntity"]),(e=>{let{selectedEntity:t}=e;return a().createElement(S.Z,{entity:t})}));var M=n(15177);const V=(0,R.Z)({noShadowBlock:{boxShadow:"none"},wrapper:{position:"relative",paddingRight:"1px",overflow:"auto"}}),F=(0,B.l)(w,(0,h.pick)(["selectedEntity","selectedEntityLoading"]),(e=>{let{selectedEntity:t,selectedEntityLoading:n}=e;const r=V();return a().createElement("div",{className:r.wrapper},n&&a().createElement(u.Z,null),a().createElement(M.Z,{entity:t,caption:f().text("Entity details"),className:r.noShadowBlock}))}));var W=n(90436),_=n(42011),G=n(44443),$=n(44938),q=n(79573);const Y="1px solid rgba(0, 0, 0, 0.05)",K=(0,R.Z)({table:{flex:1,height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},tableBody:{height:"100%",overflow:"auto"},tableBodyWrapper:{height:"100%",overflow:"hidden"},tableRowWrapper:{borderBottom:Y},tableRow:{display:"flex",alignItems:"center","& > div":{flexShrink:0}},headRow:{borderBottom:Y}});function X(){return X=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},X.apply(this,arguments)}const Q=(0,r.memo)((e=>{let{columnsData:t,sorting:n,onSort:r}=e;const l=K();return a().createElement("div",{className:C()(l.tableRow,l.headRow)},t.map((e=>{const{id:t,sortable:l,headCellRenderer:o,columnClassName:i}=e,s=o,c=l?{sortField:n.field,sortOrder:n.order,sortHandler:()=>{r({field:t,order:n.field===t?(0,q.Dh)(n.order):"asc"})}}:{};return a().createElement("div",{key:t,className:i},a().createElement(s,X({headCellData:e},c)))})))})),J=(0,r.forwardRef)(((e,t)=>{let{classes:n,columnsData:l,rowsData:o,sorting:i,onSort:s,getRowKey:c,ExpandedRowRenderer:p,defaultRowHeight:u}=e;const d=K(),[m,f]=(0,r.useState)({width:0,height:0}),h=(0,r.useCallback)((e=>{let{data:t,index:r}=e;const o=t[r];return a().createElement("div",{className:C()(d.tableRowWrapper,null==n?void 0:n.tableRowWrapper)},a().createElement("div",{className:C()(d.tableRow,null==n?void 0:n.tableRow)},l.map((e=>{let{id:t,rowCellValueRenderer:n,columnClassName:r}=e;const l=n;return a().createElement("div",{key:t,className:r},a().createElement(l,{value:o[t],rowValue:o}))}))),o.expanded&&p&&a().createElement(p,{open:o.expanded,rowValue:o}))}),[l,p]),g=(0,r.useCallback)(((e,t)=>{f({width:e,height:t})}),[]),b=(0,r.useRef)(null);return(0,r.useImperativeHandle)(t,(()=>({resetScrollbarPosition:()=>{var e;null===(e=b.current)||void 0===e||e.scrollTo(0)}}))),a().createElement("div",{className:d.table},a().createElement(Q,{columnsData:l,sorting:i,onSort:s}),a().createElement("div",{className:d.tableBodyWrapper},a().createElement(G.Z,{handleHeight:!0,handleWidth:!0,onResize:g}),a().createElement("div",{className:d.tableBody},a().createElement($.Z,{listRef:b,width:m.width,height:m.height,data:o,defaultItemSize:u,itemKey:c,showNotMeasuredItems:!0},h))))})),ee=(0,r.memo)(J);var te=n(92332),ne=n(83088);const re="rgba(238, 238, 238, 1)",ae=(0,R.Z)({tableWithPagination:{flex:1,overflow:"hidden",paddingRight:"1px",display:"flex",flexDirection:"column"},tableContainer:{flex:1,overflow:"hidden"},profileColumn:{width:"200px"},relationshipTypeColumn:{width:"130px"},entityTypeColumn:{width:"140px"},row:{position:"relative","&:hover":{background:re}}});function le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const oe={content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)",pointerEvents:"none"},ie=".collapsibleTableRow:hover &",se=function(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){le(e,t,n[t])}))}return e}({},oe,{[ie]:{background:`linear-gradient(to right, rgba(238, 238, 238, 0), ${re} 100%)`}}),ce=(0,R.Z)((e=>({headCell:{position:"relative",display:"flex",alignItems:"center",height:"33px",padding:"6px 0 6px 16px","&>div":{flexDirection:"row"},"&>div>span[role=button]":{width:"calc(100% + 49px)"}},headLabel:{color:e.palette.text.primary,fontSize:"12px",fontWeight:500,lineHeight:"16px",whiteSpace:"nowrap",overflow:"hidden","&:after":oe},defaultCell:{position:"relative",color:e.palette.text.primary,fontSize:"13px",fontWeight:"normal",lineHeight:"15px",whiteSpace:"nowrap",overflow:"hidden",display:"flex",alignItems:"center",height:"100%",padding:"6px 16px","&:after":se},clickable:{cursor:"pointer"},profileCell:{paddingTop:"3px",paddingBottom:"4px"},controlsCell:{position:"absolute",display:"flex",alignItems:"center",height:"100%",flexShrink:0,top:0,right:"9px",visibility:"hidden",[ie]:{visibility:"visible",background:re}},editButton:{marginRight:"7px"},entityAvatar:{width:"20px",height:"20px",marginRight:"8px"}})));function pe(){return pe=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},pe.apply(this,arguments)}function ue(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){de(e,t,n[t])}))}return e}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const me=e=>{let{className:t,headCellData:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","headCellData"]);const l=ce();return a().createElement("div",{className:C()(l.headCell,t)},a().createElement(te.default,pe({},r,{headCellData:ue({},n,{label:a().createElement(ne.C,{value:n.label},a().createElement("div",{className:l.headLabel},n.label))})})))},fe=(0,r.memo)((e=>{let{value:t="",tooltip:n,onClick:r,className:l}=e;const o=ce();return n=n||t,a().createElement(ne.C,{value:n},a().createElement("div",{className:C()(o.defaultCell,l,{[o.clickable]:!!r}),onClick:r},t))}));var he=n(37573);const ge=(0,B.l)(w,(e=>{let{onEntitySelect:t}=e;return{onClick:t}}),(e=>{let{value:t,rowValue:{entity:n},className:r,onClick:l}=e;const o=ce(),i=a().createElement(a().Fragment,null,a().createElement(he.Z,{entity:n,avatarClassName:o.entityAvatar}),t);return a().createElement(fe,{value:i,tooltip:t,className:C()(o.profileCell,r),onClick:()=>l(n.uri)})})),be=(0,r.memo)((e=>{let{open:t,rowValue:n}=e;return t?a().createElement("div",{style:{padding:"6px 16px",fontSize:"13px"}},n.relation.uri):null}));var ye=n(39475),xe=n(27604),ve=n(22983);const Ee=(0,B.l)(w,(e=>{let{relationshipTable:{onStartRelationEditing:t,onFinishRelationEditing:n}}=e;return{onEdit:t,onDelete:n}}),(e=>{let{rowValue:{relation:{uri:t}},className:n,onEdit:r,onDelete:l}=e;const o=ce();return a().createElement("div",{className:C()(o.controlsCell,n)},a().createElement(ye.k,{className:o.editButton,icon:xe.Z,size:"XXS",tooltipTitle:f().text("Edit"),onClick:()=>r(t)}),a().createElement(ye.k,{icon:ve.Z,size:"XXS",tooltipTitle:f().text("Delete"),onClick:()=>l(t)}))}));function we(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){Oe(e,t,n[t])}))}return e}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ce=(e,t)=>t[e].relation.uri||`${e}`,Se=(0,B.l)(w,(e=>{let{relationshipTable:t}=e;return we({},t)}),(e=>{let{rowsData:t,sorting:n,onSort:l,total:o,page:i,rowsPerPage:s,onPageChange:c,onRowsPerPageChange:p,editingRelations:u}=e;const d=ae(),m=(0,r.useMemo)((()=>[{id:"entityLabel",label:f().text("Profile"),headCellRenderer:me,rowCellValueRenderer:ge,sortable:!0,columnClassName:d.profileColumn},{id:"relationTypeLabel",label:f().text("Relationship type"),headCellRenderer:me,rowCellValueRenderer:fe,sortable:!0,columnClassName:d.relationshipTypeColumn},{id:"entityTypeLabel",label:f().text("Entity Type"),headCellRenderer:me,rowCellValueRenderer:fe,sortable:!0,columnClassName:d.entityTypeColumn},{id:"controls",label:"",headCellRenderer:me,rowCellValueRenderer:Ee}]),[d]),h=(0,r.useRef)(null);(0,r.useEffect)((()=>{var e;null===(e=h.current)||void 0===e||e.resetScrollbarPosition()}),[t]);const g=(0,r.useMemo)((()=>t.map((e=>{var t;return null!=u&&u.includes(null==e||null===(t=e.relation)||void 0===t?void 0:t.uri)?we({},e,{expanded:!0}):e}))),[t,u]),b=(0,r.useMemo)((()=>({tableRow:C()(d.row,"collapsibleTableRow")})),[d]);return a().createElement("div",{className:d.tableWithPagination},a().createElement("div",{className:d.tableContainer},a().createElement(ee,{ref:h,columnsData:m,rowsData:g,sorting:n,onSort:l,getRowKey:Ce,ExpandedRowRenderer:be,defaultRowHeight:28,classes:b})),o>x[0]&&a().createElement(_.Z,{count:o,rowsPerPageOptions:x,rowsPerPage:s,onChangeRowsPerPage:p,page:i,onChangePage:c,basicTableRef:h}))}));var Pe=n(36444),Te=n(61837),Ne=n(33662);const Re=(0,R.Z)((e=>({inactiveSearchIcon:{color:e.palette.text.secondary},activeSearchIcon:{color:e.palette.text.primary},input:{fontSize:"14px","&::placeholder":{color:`${e.palette.text.secondary} !important`,opacity:1}}}))),je=(0,B.l)(w,(0,h.pipe)((0,h.prop)("relationshipTable"),(0,h.pick)(["searchText","onChangeSearchText"])),(e=>{let{searchText:t,onChangeSearchText:n}=e;const r=Re();return a().createElement(Ne.Z,{fullWidth:!0,height:40,autofocus:!1,value:t,onSearch:n,placeholder:f().text("Search profiles"),classes:{input:r.input}})}));var ke=n(92934),Ie=n(68977),Ze=n(77277),Le=n(8629);const Ue=(0,R.Z)((e=>({dialogPaper:{display:"flex",flexDirection:"column",padding:"12px 16px 8px"},title:{marginBottom:"21px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px",color:e.palette.text.primary},entityTypesSelector:{width:"468px",marginBottom:"20px"},relationTypesSelector:{width:"468px",marginBottom:"32px"},footer:{display:"flex"},clearAllButton:{marginRight:"auto"},cancelButton:{marginRight:"8px"}}))),ze=(0,B.l)(w,(0,h.pipe)((0,h.prop)("relationshipTable"),(0,h.pick)(["onFilter","filters","entityTypesOptions","relationTypesOptions"])),(e=>{let{open:t,onClose:n,filters:l,onFilter:o,entityTypesOptions:i,relationTypesOptions:s}=e;const c=Ue(),[p,u]=(0,r.useState)([]),[d,m]=(0,r.useState)([]),h=()=>{u(l.entityTypesUris),m(l.relationTypesUris),n()};return(0,r.useEffect)((()=>{u(l.entityTypesUris),m(l.relationTypesUris)}),[l.entityTypesUris,l.relationTypesUris]),a().createElement(Le.Z,{classes:{paper:c.dialogPaper},onClose:h,open:t},a().createElement(W.Z,{className:c.title},f().text("Filter")),a().createElement(ke.Q,{classes:{root:c.entityTypesSelector},entityTypes:i,selectedEntityTypes:p,enableEmptyValueUnderline:!0,onChange:u}),a().createElement(Ie.U,{classes:{root:c.relationTypesSelector},relationTypes:s,selectedRelationTypes:d,enableEmptyValueUnderline:!0,onChange:m}),a().createElement("div",{className:c.footer},a().createElement(Ze.Z,{className:c.clearAllButton,onClick:()=>{u([]),m([])}},f().text("Clear All")),a().createElement(Ze.Z,{className:c.cancelButton,onClick:h},f().text("Cancel")),a().createElement(Ze.Z,{onClick:()=>{o({entityTypesUris:p,relationTypesUris:d}),n()},color:"primary"},f().text("Apply"))))})),De=(0,R.Z)((e=>({wrapper:{display:"flex",alignItems:"center",paddingLeft:"16px",paddingRight:"2px"},iconButton:{marginLeft:"4px"},activeFiltersIcon:{color:e.palette.primary.main},inactiveFiltersIcon:{color:e.palette.text.secondary}}))),Ae=(0,B.l)(w,(0,h.pipe)((0,h.prop)("relationshipTable"),(0,h.pick)(["filters"])),(e=>{let{filters:t}=e;const n=De(),[l,o]=(0,r.useState)(!1),{entityTypesUris:i,relationTypesUris:s}=t,c=i.length||s.length;return a().createElement("div",{className:n.wrapper},a().createElement(je,null),a().createElement(Te.Z,{className:n.iconButton,onClick:()=>o(!0)},a().createElement(Pe.Z,{className:c?n.activeFiltersIcon:n.inactiveFiltersIcon})),a().createElement(ze,{open:l,onClose:()=>o(!1)}))})),Be=(0,R.Z)({caption:{marginLeft:"16px",marginTop:"12px",marginBottom:"14px",fontSize:"16px",lineHeight:"24px"},wrapper:{flex:1,display:"flex",flexDirection:"column",height:0}}),He=()=>{const e=Be();return a().createElement("div",{className:e.wrapper},a().createElement(W.Z,{className:e.caption,variant:"subtitle1"},f().text("Relationships")),a().createElement(Ae,null),a().createElement(Se,null))};let Me;!function(e){e[e.Relationship=0]="Relationship",e[e.EntityDetails=1]="EntityDetails"}(Me||(Me={}));const Ve=(0,r.memo)((()=>{var e;const t=z(),[n,l]=(0,r.useState)(null),o=(0,r.useCallback)((e=>{l((t=>t===e?null:e))}),[]),i=null!==n,s=(0,r.useMemo)((()=>[{buttonProps:{id:Me.Relationship,icon:A,tooltipTitle:f().text("Relationship")},content:a().createElement(He,null)},{buttonProps:{id:Me.EntityDetails,icon:U.Z,tooltipTitle:f().text("Entity Details")},content:a().createElement(F,null)}]),[]);return a().createElement("div",{className:t.wrapper},a().createElement(Z.h,{open:i,width:480},a().createElement(H,null),null===(e=s[n])||void 0===e?void 0:e.content),a().createElement(L.G,{buttonsProps:(0,h.pluck)("buttonProps",s),onButtonClick:o,activeIndexId:n}))}));Ve.displayName="GraphRightSidePanel";const Fe=Ve;var We=n(4986);const _e=e=>{let{children:t}=e;return a().createElement(We.SigmaContainer,{style:{background:"transparent"}},t)};var Ge=n(28833),$e=n.n(Ge),qe=n(3660),Ye=n.n(qe),Ke=n(98996),Xe=n.n(Ke),Qe=n(60715),Je=n(35174),et=n(30284);const tt=.6,nt=(e,t,n,r,a)=>{if(t.loop){const{size:r,color:a}=t,l=n.x,o=n.y,i=n.size,s=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{x1:e-7*(n+r),y1:t,x2:e,y2:t+7*(n+r)}}(l,o,.6*i);if(e.strokeStyle=a,e.lineWidth=r,"arrow"===t.type){const{aX:t,aY:n,vX:r,vY:c}=((e,t,n,r)=>{const a=Math.max(.5*r,5),l=Math.sqrt(Math.pow(t-e.x1,2)+Math.pow(n-e.y1,2));return{aX:e.x1+(t-e.x1)*(l-a-r)/l,aY:e.y1+(n-e.y1)*(l-a-r)/l,vX:(t-e.x1)*a/l,vY:(n-e.y1)*a/l}})(s,l,o,i);e.beginPath(),e.moveTo(l,o),e.bezierCurveTo(s.x2,s.y2,s.x1,s.y1,t,n),e.stroke(),e.fillStyle=a,e.beginPath(),e.moveTo(t+r,n+c),e.lineTo(t+c*tt,n-r*tt),e.lineTo(t-c*tt,n+r*tt),e.lineTo(t+r,n+c),e.closePath(),e.fill()}else e.beginPath(),e.moveTo(l,o),e.bezierCurveTo(s.x1,s.y1,s.x2,s.y2,l,o),e.stroke()}(0,et.default)(e,t,n,r,a)};function rt(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){at(e,t,n[t])}))}return e}function at(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const lt=e=>{let{data:t,arrangeNodes:n,selectedNode:a,onNodeClick:o}=e;const i=(0,We.useSigma)(),s=(0,We.useLoadGraph)(),c=(0,We.useRegisterEvents)(),u=(0,We.useSetSettings)(),d=(0,l.useSelector)(p.ZP.selectors.getEntity),[m,f]=(0,r.useState)({hoverNode:void 0,hoverNeighbours:void 0}),[h,g]=(0,r.useState)(null),[b,y]=(0,r.useState)({});(0,r.useEffect)((()=>{const e=new(Xe());t.nodes.forEach((t=>{e.addNode(t.id,{label:t.name,size:21,color:"#0072CE"})})),t.edges.forEach((t=>{if(!e.hasEdge(t.from,t.to)){const n=t.from===t.to;e.addEdge(t.from,t.to,{size:1,color:"rgba(0, 0, 0, 0.2)",forceLabel:n,loop:n})}})),n(e),s(e),g((0,Je.toUndirected)(e)),i.getCamera().setState({ratio:1.2})}),[s,t,i,n]);const x=(0,r.useCallback)((e=>{const t=i.getGraph(),n=null==d?void 0:d.uri;if(t&&h&&n&&e&&n!==e){const r=(0,Qe.Ar)(h,n,e),a=((e,t)=>{const n=[];return t.reduce(((t,r)=>(n.push(e.edge(t,r)||e.edge(r,t)),r))),n})(t,r);return{edges:a,nodes:r}}return{}}),[i,null==d?void 0:d.uri,h]);(0,r.useEffect)((()=>{y(x(a))}),[a,x]),(0,r.useEffect)((()=>{c({enterNode:e=>{let{node:t}=e;const n=i.getGraph();f({hoverNode:t,hoverNeighbours:n.neighbors(t)})},leaveNode:()=>{f({hoverNode:void 0,hoverNeighbours:void 0})},clickNode:e=>{let{node:t}=e;o(t)}})}),[i,c,o]),(0,r.useEffect)((()=>{u({nodeReducer:(e,t)=>{const n=rt({},t),r=(b.nodes||[]).includes(e);return!m.hoverNeighbours||m.hoverNeighbours.includes(e)||m.hoverNode===e||r||(n.label="",n.color="#f6f6f6"),e===a&&(n.color="red"),e===(null==d?void 0:d.uri)&&(n.color="green"),n},edgeReducer:(e,t)=>{const n=i.getGraph(),r=rt({},t,{hidden:!1}),a=(b.edges||[]).includes(e);return!m.hoverNode||n.hasExtremity(e,m.hoverNode)||a||(r.hidden=!0),a&&(r.color="#0072CE",r.size=4),r},renderEdgeLabels:!0,edgeLabelRenderer:nt})}),[i,u,m,a,b,null==d?void 0:d.uri])},ot=e=>{let{data:t,selectedNode:n,onNodeClick:a}=e;const l=(0,r.useCallback)((e=>{$e().assign(e);const t=Ye().inferSettings(e);Ye().assign(e,{settings:t,iterations:600})}),[]);return lt({arrangeNodes:l,data:t,selectedNode:n,onNodeClick:a}),null};var it=n(36039);let st;!function(e){e.SIMPLE_NETWORK="Simple network",e.VERTICAL_TB="Vertical hierarchy TB",e.VERTICAL_BT="Vertical hierarchy BT",e.HORIZONTAL_LR="Horizontal hierarchy LR",e.HORIZONTAL_RL="Horizontal hierarchy RL"}(st||(st={}));const ct=(e,t,n,r)=>{const a=new Set;return t.length||t.push(Array.from(e)),e.forEach((t=>{n.add(t),r.forEach((r=>{r.from!==t||e.has(r.to)||n.has(r.to)||a.add(r.to)}))})),a.size&&t.push(Array.from(a)),((e,t,n)=>{const r=new Set;return e.forEach((e=>{t.forEach((t=>{t.from!==e||n.has(t.to)||r.add(t.to)}))})),!!r.size})(a,r,n)?ct(a,t,n,r):t},pt=(e,t,n,r)=>{if(e.length<10&&(t[r]=[...e]),e.length>10){const a=e.slice(10),l=e.slice(0,10);t[r]=l,t[r+1]=n[r+1]?[...n[r+1],...a]:a}if(t[r+1]||n[r+1]){const e=t[++r]||n[r];return pt(e,t,n,r)}return t},ut=e=>{let{data:t,selectedNode:n,layout:a,onNodeClick:l}=e;const o=(0,r.useCallback)((e=>{const r=(e=>{switch(e){case st.VERTICAL_TB:return 180;case st.VERTICAL_BT:return 0;case st.HORIZONTAL_LR:return 270;case st.HORIZONTAL_RL:return 90}})(a),l=((e,t)=>{const n=e.nodes,r=e.edges.filter((e=>e.from!==e.to)),a=((e,t,n)=>{const r=new Set;return t.forEach((t=>{e.some((e=>e.to===t.id))||r.add(t.id)})),r.size||r.add(n),r})(r,n,t),l=ct(a,[],new Set,r);return pt(l[0],[],l,0)})(t,n),o=(e=>{const t=e.map((e=>e.length));return Math.max(...t)})(l);for(let t=0;t<l.length;++t)for(let n=0;n<l[t].length;++n)e.setNodeAttribute(l[t][n],"x",(s=n,(i=l[t].length)===(c=o)?5*s:1===i?5*(c-1)/2:5*(c-1)/(i+1)*(s+1))),e.setNodeAttribute(l[t][n],"y",0+10*t);var i,s,c;it.rotation.assign(e,r,{degrees:!0})}),[t,a,n]);return lt({arrangeNodes:o,data:t,selectedNode:n,onNodeClick:l}),null};var dt=n(84425);const mt=(0,R.Z)({graphTypeSelector:{minWidth:"200px",backgroundColor:"#FAFAFA",opacity:1,height:"40px"},filledInputRoot:{borderRadius:"4px"},valueContainer:{width:"auto",marginLeft:"16px"}}),ft=(0,B.l)(w,(e=>{let{graphTypeUri:t,setGraphTypeUri:n}=e;return{setGraphTypeUri:n,graphTypeUri:t}}),(e=>{let{graphTypeUri:t,setGraphTypeUri:n}=e;const o=mt(),i=(0,l.useSelector)(p.ZP.selectors.getMetadata),s=(0,l.useSelector)(p.ZP.selectors.getEntity),c=(0,r.useMemo)((()=>[{label:f().text("All"),value:null},...(0,d.mmY)(i,s.type).map((e=>{let{uri:t,label:n}=e;return{value:t,label:n}}))]),[s,i]),u=(0,r.useMemo)((()=>c.find((e=>e.value===t))),[c,t]);return a().createElement(dt.Z,{classes:{valueContainer:o.valueContainer},className:o.graphTypeSelector,height:42,label:f().text("Graph type"),value:u,options:c,onChange:e=>n(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:o.filledInputRoot}}}})})),ht=(0,R.Z)({graphLayoutSelector:{minWidth:"202px",backgroundColor:"#FAFAFA",opacity:1,marginLeft:"10px"},filledInputRoot:{borderRadius:"4px",height:"42px"}}),gt=(0,r.memo)((e=>{let{value:t,onChangeHandler:n}=e;const r=ht(),l=[{label:f().text("Simple network"),value:st.SIMPLE_NETWORK},{label:f().text("Vertical hierarchy TB"),value:st.VERTICAL_TB},{label:f().text("Vertical hierarchy BT"),value:st.VERTICAL_BT},{label:f().text("Horizontal hierarchy LR"),value:st.HORIZONTAL_LR},{label:f().text("Horizontal hierarchy RL"),value:st.HORIZONTAL_RL}];return a().createElement(dt.Z,{className:r.graphLayoutSelector,label:f().text("Graph layout"),value:l.find((0,h.propEq)("value",t)),options:l,onChange:e=>n(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:r.filledInputRoot}}}})})),bt=(0,R.Z)({wrapper:{height:"100%",position:"relative"},selectors:{display:"flex",position:"absolute",top:"12px",right:"16px",zIndex:2},graph:{height:"calc(100% - 5px)"}});function yt(){return yt=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},yt.apply(this,arguments)}const xt=(0,B.l)(w,(e=>{let{data:t,selectedEntity:n,onEntitySelect:r}=e;return{data:t,selectedNode:null==n?void 0:n.uri,onNodeSelect:r}}),(e=>{let{data:t,selectedNode:n,onNodeSelect:l}=e;const[o,i]=(0,r.useState)(st.SIMPLE_NETWORK),s=(0,r.useMemo)((()=>t&&(e=>{var t;const n=new Set,r=new Set;e.entities.forEach((e=>n.add(e.uri))),((null===(t=e.relations)||void 0===t?void 0:t.filter((e=>n.has(e.startObject.objectURI)&&n.has(e.endObject.objectURI))))||[]).forEach((e=>{r.has(`${e.endObject.objectURI}--${e.startObject.objectURI}`)||r.add(`${e.startObject.objectURI}--${e.endObject.objectURI}--${e.direction}`)}));const a=e.entities.map((e=>({id:e.uri,name:e.label}))),l=[];return r.forEach((e=>{const t=e.split("--");l.push({from:t[0],to:t[1]})})),{nodes:a,edges:l}})(t)),[t]),c=bt(),p={data:s,selectedNode:n,onNodeClick:l};return a().createElement("div",{className:c.wrapper},a().createElement("div",{className:c.selectors},a().createElement(ft,null),a().createElement(gt,{value:o,onChangeHandler:i})),a().createElement("div",{className:c.graph},s&&a().createElement(_e,null,o===st.SIMPLE_NETWORK?a().createElement(ot,p):a().createElement(ut,yt({},p,{layout:o})))))})),vt=(0,R.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},graphWrapper:{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1},graphContainer:{display:"flex",overflow:"hidden",flexGrow:1},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}}))),Et=(0,r.memo)((()=>{const e=vt(),t=(0,l.useSelector)(p.ZP.selectors.getEntity),n=(e=>{const{graphLoading:t,data:n,graphTypeUri:a,setGraphTypeUri:o}=(e=>{const[t,n]=(0,r.useState)(null),a=(0,l.useDispatch)(),[o,i]=(0,r.useState)(null),[s,c]=(0,r.useState)(!1),u=null==e?void 0:e.uri,m=(0,d.biM)(e);return(0,r.useEffect)((()=>(!u||(0,d.ZiX)(u)||m||(c(!0),(0,d.ZYI)({uri:u,deep:t?2:1,limitCreditsConsumption:!0,graphTypes:t?[(0,d.nIW)(t)]:null,activenessDate:null,max:t?200:3e3}).then(i).catch((e=>{i(null),a(p.ui.actions.errorSet((0,d.xU7)(e,f().text("Something went wrong"))))})).finally((()=>{c(!1)}))),()=>{i(null),c(!1)})),[u,m,a,t]),{graphLoading:s,data:o,graphTypeUri:t,setGraphTypeUri:n}})(e),{selectedEntity:i,onEntitySelect:s,selectedEntityLoading:c}=((e,t)=>{const n=(0,g._)(),a=(0,l.useDispatch)(),[o,i]=(0,r.useState)(null),s=(0,r.useRef)({}),[c,u]=(0,r.useState)(!1),m=(0,r.useCallback)((e=>{const t=s.current[e];return t?Promise.resolve(t):(0,d.HvW)(e).then((e=>(s.current=y(s.current,e),e)))}),[]),b=(0,r.useCallback)((e=>{var r;const l=null==t||null===(r=t.entities)||void 0===r?void 0:r.find((0,h.propEq)("uri",e));l&&i(l),u(!0),n(m(e)).then(i).catch((e=>{a(p.ui.actions.errorSet((0,d.xU7)(e,f().text("Something went wrong"))))})).finally((()=>{u(!1)}))}),[a,t,n,m]);return(0,r.useEffect)((()=>{null!=e&&e.uri&&(s.current=y({},e),b(e.uri))}),[null==e?void 0:e.uri]),(0,r.useEffect)((()=>{const n=null==t?void 0:t.entities.find((e=>(null==o?void 0:o.uri)===e.uri));n||(null!=e&&e.uri?(s.current=y({},e),b(e.uri)):(s.current={},i(null)))}),[t]),{selectedEntityLoading:c,selectedEntity:o,onEntitySelect:b}})(e,n);return{graphLoading:t,data:n,selectedEntity:i,onEntitySelect:s,selectedEntityLoading:c,graphTypeUri:a,setGraphTypeUri:o,relationshipTable:E(n,null==i?void 0:i.uri,a)}})(t),{graphLoading:o}=n;return a().createElement(w.Provider,{value:n},a().createElement("div",{className:e.perspectiveView},o&&a().createElement(u.Z,null),(null==t?void 0:t.uri)&&a().createElement("div",{className:e.graphContainer},a().createElement("div",{className:e.graphWrapper},a().createElement(I,null),a().createElement(xt,null)),a().createElement(Fe,null))))}));Et.displayName="GraphPerspectiveView";const wt=Et,Ot=(0,o.createGenerateClassName)({productionPrefix:"graph",disableGlobal:!0}),Ct=e=>{let{store:t}=e;return a().createElement(l.Provider,{store:t},a().createElement(o.StylesProvider,{generateClassName:Ot},a().createElement(s.MuiPickersUtilsProvider,{utils:c.Z},a().createElement(wt,null),a().createElement(i.Z,{showErrorFromStore:!0}))))}}}]);
package/9147.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[9147],{8359:(e,a,t)=>{t.d(a,{Z:()=>i});var n=t(49507),r=t(12733),o=t(9007);function i(e){return(0,n.Z)(e)||(0,r.Z)(e)||(0,o.Z)()}},27616:(e,a,t)=>{t.d(a,{Z:()=>g});var n=t(7560),r=t(8359),o=t(85354),i=t(54530),s=t(24328),l=(t(48570),t(13980),t(6277)),d=t(82113),c=t(27556),p=t(15459),m=t(85570),u=t(24514),f=s.forwardRef((function(e,a){var t=e.children,p=e.classes,f=e.className,g=e.defaultExpanded,b=void 0!==g&&g,h=e.disabled,v=void 0!==h&&h,x=e.expanded,Z=e.onChange,R=e.square,y=void 0!==R&&R,C=e.TransitionComponent,O=void 0===C?d.Z:C,k=e.TransitionProps,$=(0,i.Z)(e,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),B=(0,u.Z)({controlled:x,default:b,name:"Accordion",state:"expanded"}),N=(0,o.Z)(B,2),T=N[0],E=N[1],w=s.useCallback((function(e){E(!T),Z&&Z(e,!T)}),[T,Z,E]),I=s.Children.toArray(t),S=(0,r.Z)(I),L=S[0],z=S.slice(1),A=s.useMemo((function(){return{expanded:T,disabled:v,toggle:w}}),[T,v,w]);return s.createElement(c.Z,(0,n.Z)({className:(0,l.Z)(p.root,f,T&&p.expanded,v&&p.disabled,!y&&p.rounded),ref:a,square:y},$),s.createElement(m.Z.Provider,{value:A},L),s.createElement(O,(0,n.Z)({in:T,timeout:"auto"},k),s.createElement("div",{"aria-labelledby":L.props.id,id:L.props["aria-controls"],role:"region"},z)))}));const g=(0,p.Z)((function(e){var a={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],a),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:e.palette.divider,transition:e.transitions.create(["opacity","background-color"],a)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}}),{name:"MuiAccordion"})(f)},85570:(e,a,t)=>{t.d(a,{Z:()=>n});const n=t(24328).createContext({})},70660:(e,a,t)=>{t.d(a,{Z:()=>d});var n=t(7560),r=t(54530),o=t(24328),i=(t(13980),t(6277)),s=t(15459),l=o.forwardRef((function(e,a){var t=e.classes,s=e.className,l=(0,r.Z)(e,["classes","className"]);return o.createElement("div",(0,n.Z)({className:(0,i.Z)(t.root,s),ref:a},l))}));const d=(0,s.Z)((function(e){return{root:{display:"flex",padding:e.spacing(1,2,2)}}}),{name:"MuiAccordionDetails"})(l)},8284:(e,a,t)=>{t.d(a,{Z:()=>m});var n=t(7560),r=t(54530),o=t(24328),i=(t(13980),t(6277)),s=t(57074),l=t(61837),d=t(15459),c=t(85570),p=o.forwardRef((function(e,a){var t=e.children,d=e.classes,p=e.className,m=e.expandIcon,u=e.IconButtonProps,f=e.onBlur,g=e.onClick,b=e.onFocusVisible,h=(0,r.Z)(e,["children","classes","className","expandIcon","IconButtonProps","onBlur","onClick","onFocusVisible"]),v=o.useState(!1),x=v[0],Z=v[1],R=o.useContext(c.Z),y=R.disabled,C=void 0!==y&&y,O=R.expanded,k=R.toggle;return o.createElement(s.Z,(0,n.Z)({focusRipple:!1,disableRipple:!0,disabled:C,component:"div","aria-expanded":O,className:(0,i.Z)(d.root,p,C&&d.disabled,O&&d.expanded,x&&d.focused),onFocusVisible:function(e){Z(!0),b&&b(e)},onBlur:function(e){Z(!1),f&&f(e)},onClick:function(e){k&&k(e),g&&g(e)},ref:a},h),o.createElement("div",{className:(0,i.Z)(d.content,O&&d.expanded)},t),m&&o.createElement(l.Z,(0,n.Z)({className:(0,i.Z)(d.expandIcon,O&&d.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},u),m))}));const m=(0,d.Z)((function(e){var a={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:e.transitions.create(["min-height","background-color"],a),padding:e.spacing(0,2),"&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused":{backgroundColor:e.palette.action.focus},"&$disabled":{opacity:e.palette.action.disabledOpacity}},expanded:{},focused:{},disabled:{},content:{display:"flex",flexGrow:1,transition:e.transitions.create(["margin"],a),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",a),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}}),{name:"MuiAccordionSummary"})(p)},26739:(e,a,t)=>{t.d(a,{Z:()=>c});var n=t(7560),r=t(54530),o=t(24328),i=(t(13980),t(6277)),s=t(15459),l=t(97580),d=o.forwardRef((function(e,a){var t=e.anchorOrigin,s=void 0===t?{vertical:"top",horizontal:"right"}:t,d=e.badgeContent,c=e.children,p=e.classes,m=e.className,u=e.color,f=void 0===u?"default":u,g=e.component,b=void 0===g?"span":g,h=e.invisible,v=e.max,x=void 0===v?99:v,Z=e.overlap,R=void 0===Z?"rectangle":Z,y=e.showZero,C=void 0!==y&&y,O=e.variant,k=void 0===O?"standard":O,$=(0,r.Z)(e,["anchorOrigin","badgeContent","children","classes","className","color","component","invisible","max","overlap","showZero","variant"]),B=h;null==h&&(0===d&&!C||null==d&&"dot"!==k)&&(B=!0);var N="";return"dot"!==k&&(N=d>x?"".concat(x,"+"):d),o.createElement(b,(0,n.Z)({className:(0,i.Z)(p.root,m),ref:a},$),c,o.createElement("span",{className:(0,i.Z)(p.badge,p["".concat(s.horizontal).concat((0,l.Z)(s.vertical),"}")],p["anchorOrigin".concat((0,l.Z)(s.vertical)).concat((0,l.Z)(s.horizontal)).concat((0,l.Z)(R))],"default"!==f&&p["color".concat((0,l.Z)(f))],B&&p.invisible,"dot"===k&&p.dot)},N))}));const c=(0,s.Z)((function(e){return{root:{position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0},badge:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen})},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorError:{backgroundColor:e.palette.error.main,color:e.palette.error.contrastText},dot:{borderRadius:4,height:8,minWidth:8,padding:0},anchorOriginTopRightRectangle:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightRectangle:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftRectangle:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftRectangle:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},anchorOriginTopRightCircle:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightCircle:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftCircle:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftCircle:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},invisible:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}}),{name:"MuiBadge"})(d)}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[9147],{8359:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(49507),o=n(12733),a=n(9007);function i(e){return(0,r.Z)(e)||(0,o.Z)(e)||(0,a.Z)()}},27616:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(7560),o=n(8359),a=n(85354),i=n(54530),s=n(24328),l=(n(48570),n(13980),n(6277)),c=n(82113),d=n(27556),u=n(15459),m=n(85570),p=n(24514),f=s.forwardRef((function(e,t){var n=e.children,u=e.classes,f=e.className,g=e.defaultExpanded,h=void 0!==g&&g,v=e.disabled,b=void 0!==v&&v,x=e.expanded,Z=e.onChange,y=e.square,E=void 0!==y&&y,R=e.TransitionComponent,C=void 0===R?c.Z:R,O=e.TransitionProps,N=(0,i.Z)(e,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),k=(0,p.Z)({controlled:x,default:h,name:"Accordion",state:"expanded"}),w=(0,a.Z)(k,2),T=w[0],$=w[1],B=s.useCallback((function(e){$(!T),Z&&Z(e,!T)}),[T,Z,$]),I=s.Children.toArray(n),H=(0,o.Z)(I),S=H[0],M=H.slice(1),A=s.useMemo((function(){return{expanded:T,disabled:b,toggle:B}}),[T,b,B]);return s.createElement(d.Z,(0,r.Z)({className:(0,l.Z)(u.root,f,T&&u.expanded,b&&u.disabled,!E&&u.rounded),ref:t,square:E},N),s.createElement(m.Z.Provider,{value:A},S),s.createElement(C,(0,r.Z)({in:T,timeout:"auto"},O),s.createElement("div",{"aria-labelledby":S.props.id,id:S.props["aria-controls"],role:"region"},M)))}));const g=(0,u.Z)((function(e){var t={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],t),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:e.palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}}),{name:"MuiAccordion"})(f)},85570:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n(24328).createContext({})},70660:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(7560),o=n(54530),a=n(24328),i=(n(13980),n(6277)),s=n(15459),l=a.forwardRef((function(e,t){var n=e.classes,s=e.className,l=(0,o.Z)(e,["classes","className"]);return a.createElement("div",(0,r.Z)({className:(0,i.Z)(n.root,s),ref:t},l))}));const c=(0,s.Z)((function(e){return{root:{display:"flex",padding:e.spacing(1,2,2)}}}),{name:"MuiAccordionDetails"})(l)},8284:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(7560),o=n(54530),a=n(24328),i=(n(13980),n(6277)),s=n(57074),l=n(61837),c=n(15459),d=n(85570),u=a.forwardRef((function(e,t){var n=e.children,c=e.classes,u=e.className,m=e.expandIcon,p=e.IconButtonProps,f=e.onBlur,g=e.onClick,h=e.onFocusVisible,v=(0,o.Z)(e,["children","classes","className","expandIcon","IconButtonProps","onBlur","onClick","onFocusVisible"]),b=a.useState(!1),x=b[0],Z=b[1],y=a.useContext(d.Z),E=y.disabled,R=void 0!==E&&E,C=y.expanded,O=y.toggle;return a.createElement(s.Z,(0,r.Z)({focusRipple:!1,disableRipple:!0,disabled:R,component:"div","aria-expanded":C,className:(0,i.Z)(c.root,u,R&&c.disabled,C&&c.expanded,x&&c.focused),onFocusVisible:function(e){Z(!0),h&&h(e)},onBlur:function(e){Z(!1),f&&f(e)},onClick:function(e){O&&O(e),g&&g(e)},ref:t},v),a.createElement("div",{className:(0,i.Z)(c.content,C&&c.expanded)},n),m&&a.createElement(l.Z,(0,r.Z)({className:(0,i.Z)(c.expandIcon,C&&c.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},p),m))}));const m=(0,c.Z)((function(e){var t={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:e.transitions.create(["min-height","background-color"],t),padding:e.spacing(0,2),"&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused":{backgroundColor:e.palette.action.focus},"&$disabled":{opacity:e.palette.action.disabledOpacity}},expanded:{},focused:{},disabled:{},content:{display:"flex",flexGrow:1,transition:e.transitions.create(["margin"],t),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",t),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}}),{name:"MuiAccordionSummary"})(u)},26739:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(7560),o=n(54530),a=n(24328),i=(n(13980),n(6277)),s=n(15459),l=n(97580),c=a.forwardRef((function(e,t){var n=e.anchorOrigin,s=void 0===n?{vertical:"top",horizontal:"right"}:n,c=e.badgeContent,d=e.children,u=e.classes,m=e.className,p=e.color,f=void 0===p?"default":p,g=e.component,h=void 0===g?"span":g,v=e.invisible,b=e.max,x=void 0===b?99:b,Z=e.overlap,y=void 0===Z?"rectangle":Z,E=e.showZero,R=void 0!==E&&E,C=e.variant,O=void 0===C?"standard":C,N=(0,o.Z)(e,["anchorOrigin","badgeContent","children","classes","className","color","component","invisible","max","overlap","showZero","variant"]),k=v;null==v&&(0===c&&!R||null==c&&"dot"!==O)&&(k=!0);var w="";return"dot"!==O&&(w=c>x?"".concat(x,"+"):c),a.createElement(h,(0,r.Z)({className:(0,i.Z)(u.root,m),ref:t},N),d,a.createElement("span",{className:(0,i.Z)(u.badge,u["".concat(s.horizontal).concat((0,l.Z)(s.vertical),"}")],u["anchorOrigin".concat((0,l.Z)(s.vertical)).concat((0,l.Z)(s.horizontal)).concat((0,l.Z)(y))],"default"!==f&&u["color".concat((0,l.Z)(f))],k&&u.invisible,"dot"===O&&u.dot)},w))}));const d=(0,s.Z)((function(e){return{root:{position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0},badge:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen})},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorError:{backgroundColor:e.palette.error.main,color:e.palette.error.contrastText},dot:{borderRadius:4,height:8,minWidth:8,padding:0},anchorOriginTopRightRectangle:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightRectangle:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftRectangle:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftRectangle:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},anchorOriginTopRightCircle:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightCircle:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftCircle:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftCircle:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},invisible:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}}),{name:"MuiBadge"})(c)},82113:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(7560),o=n(85354),a=n(54530),i=n(24328),s=n(6277),l=(n(13980),n(75614)),c=n(15459),d=n(39265),u=n(41070),m=n(60364),p=n(85974),f=i.forwardRef((function(e,t){var n=e.children,c=e.classes,f=e.className,g=e.collapsedHeight,h=void 0===g?"0px":g,v=e.component,b=void 0===v?"div":v,x=e.disableStrictModeCompat,Z=void 0!==x&&x,y=e.in,E=e.onEnter,R=e.onEntered,C=e.onEntering,O=e.onExit,N=e.onExited,k=e.onExiting,w=e.style,T=e.timeout,$=void 0===T?d.x9.standard:T,B=e.TransitionComponent,I=void 0===B?l.ZP:B,H=(0,a.Z)(e,["children","classes","className","collapsedHeight","component","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),S=(0,m.Z)(),M=i.useRef(),A=i.useRef(null),D=i.useRef(),L="number"==typeof h?"".concat(h,"px"):h;i.useEffect((function(){return function(){clearTimeout(M.current)}}),[]);var P=S.unstable_strictMode&&!Z,z=i.useRef(null),F=(0,p.Z)(t,P?z:void 0),W=function(e){return function(t,n){if(e){var r=P?[z.current,t]:[t,n],a=(0,o.Z)(r,2),i=a[0],s=a[1];void 0===s?e(i):e(i,s)}}},_=W((function(e,t){e.style.height=L,E&&E(e,t)})),q=W((function(e,t){var n=A.current?A.current.clientHeight:0,r=(0,u.C)({style:w,timeout:$},{mode:"enter"}).duration;if("auto"===$){var o=S.transitions.getAutoHeightDuration(n);e.style.transitionDuration="".concat(o,"ms"),D.current=o}else e.style.transitionDuration="string"==typeof r?r:"".concat(r,"ms");e.style.height="".concat(n,"px"),C&&C(e,t)})),V=W((function(e,t){e.style.height="auto",R&&R(e,t)})),j=W((function(e){var t=A.current?A.current.clientHeight:0;e.style.height="".concat(t,"px"),O&&O(e)})),G=W(N),J=W((function(e){var t=A.current?A.current.clientHeight:0,n=(0,u.C)({style:w,timeout:$},{mode:"exit"}).duration;if("auto"===$){var r=S.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(r,"ms"),D.current=r}else e.style.transitionDuration="string"==typeof n?n:"".concat(n,"ms");e.style.height=L,k&&k(e)}));return i.createElement(I,(0,r.Z)({in:y,onEnter:_,onEntered:V,onEntering:q,onExit:j,onExited:G,onExiting:J,addEndListener:function(e,t){var n=P?e:t;"auto"===$&&(M.current=setTimeout(n,D.current||0))},nodeRef:P?z:void 0,timeout:"auto"===$?null:$},H),(function(e,t){return i.createElement(b,(0,r.Z)({className:(0,s.Z)(c.container,f,{entered:c.entered,exited:!y&&"0px"===L&&c.hidden}[e]),style:(0,r.Z)({minHeight:L},w),ref:F},t),i.createElement("div",{className:c.wrapper,ref:A},i.createElement("div",{className:c.wrapperInner},n)))}))}));f.muiSupportAuto=!0;const g=(0,c.Z)((function(e){return{container:{height:0,overflow:"hidden",transition:e.transitions.create("height")},entered:{height:"auto",overflow:"visible"},hidden:{visibility:"hidden"},wrapper:{display:"flex"},wrapperInner:{width:"100%"}}}),{name:"MuiCollapse"})(f)}}]);
package/9550.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[9550],{37573:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),i=n.n(r),l=n(52730),a=n(71153),o=n.n(a),c=n(43434),s=n(18435),u=n(89810);const d=e=>{let{entity:t,avatarClassName:n,imageClassName:r}=e;const a=(0,l.useSelector)(u.ZP.selectors.getMetadata),d=(0,l.useSelector)(u.ZP.selectors.getAbsoluteImagePath)||"",m=(0,s.uie)(a,d,t),h=(0,s.vPL)(d,(0,s.XH2)(a,t.type)),p=e=>{e.target.onError=null,e.target.src=(0,s.m5F)('\n<svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" fill-rule="nonzero">\n <rect id="Rectangle" fill="#DFE5E9" x="0" y="0" width="400" height="400"></rect>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M5.68434189e-14,387.023257 L5.68434189e-14,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 5.68434189e-14,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n </g>\n </g>\n</svg>\n')};return i().createElement(c.Z,{className:o()(n,r),src:m,imgProps:{onError:p}},i().createElement("img",{className:r,src:h,alt:"fallback entity avatar",onError:p}))}},94792:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(24328),i=n.n(r);const l=(0,n(79692).Z)({highlight:{fontWeight:600}}),a=e=>{let{text:t="",highlight:n="",className:r}=e;const a=l(),o=n&&t.split(new RegExp(`(${n})`,"gi"));return i().createElement("span",null,n?o.map(((e,t)=>i().createElement("span",{key:t,className:e.toLocaleLowerCase()===n.toLocaleLowerCase()?r||a.highlight:""},e))):t)}},87378:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),i=n.n(r),l=n(71153),a=n.n(l),o=n(67358);const c=(0,n(79692).Z)({loadingOverlay:{position:"absolute",width:"100%",height:"100%",top:0,left:0,opacity:.37,zIndex:10,backgroundColor:"#fff"},transparent:{backgroundColor:"transparent"},relativePosition:{"&$loadingOverlay":{position:"relative"}}}),s=e=>{let{transparent:t=!1,relativePosition:n=!1,className:r}=e;const l=c();return i().createElement(i().Fragment,null,i().createElement("div",{className:a()(l.loadingOverlay,r,{[l.transparent]:t,[l.relativePosition]:n})},i().createElement(o.Z,{color:"secondary"})))}},4270:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),i=n.n(r),l=n(77277),a=n(38592),o=n(71153),c=n.n(o),s=n(78223),u=n(79692),d=n(41128);const m=(0,u.Z)((e=>({button:{minWidth:"30px",padding:"8px 8px",justifyContent:"start",fill:"rgba(0,0,0,0.54)",textTransform:"none",borderColor:"rgba(0,0,0,0.12)"},icon:{color:"rgba(0,0,0,0.54)",width:"20px",height:"20px",marginRight:"8px"},title:{fontSize:"13px",lineHeight:"15px",letterSpacing:0},current:{"& $icon":{color:e.palette.primary.main},backgroundColor:(0,d.U1)(e.palette.primary.main,.12),fill:e.palette.primary.main,color:e.palette.primary.main,"&:hover":{backgroundColor:(0,d.U1)(e.palette.primary.main,.24)}}}))),h=(0,s.Z)(l.Z),p=e=>{let{className:t,classes:n={},modes:r=[],modeId:l,onChange:o}=e;const s=m();return i().createElement(a.Z,{className:t},r.map((e=>{let{id:t,title:r,tooltipTitle:a,Icon:u}=e;return i().createElement(h,{key:String(t),className:c()(s.button,{[s.current]:l===t},n.button),tooltipTitle:a,onClick:(d=t,()=>o(d)),"data-reltio-id":`reltio-search-mode-${t}`},u&&i().createElement(u,{className:s.icon}),r&&i().createElement("div",{className:s.title},r));var d})))}},33662:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(71153),i=n.n(r),l=n(17440),a=n(24328),o=n.n(a),c=n(87918),s=n.n(c),u=n(29611),d=n(50581),m=n(87685),h=n(21853),p=n(79573),f=n(40435),g=n(15311);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 b(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){x(e,t,n[t])}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const y=(0,a.memo)((e=>{let{value:t,autofocus:n,onSearch:r=p.ZT,rootRef:c,classes:x={},height:y,placeholder:v=s().text("Search")}=e,w=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["value","autofocus","onSearch","rootRef","classes","height","placeholder"]);const I=(0,g.y)({height:y}),[O,k]=(0,a.useState)(""),E=(0,l.pipe)((0,l.tap)(r),k),S=(0,l.isNil)(t)?O:t;return o().createElement(u.Z,C({startAdornment:o().createElement(d.Z,{position:"start"},o().createElement(h.default,{className:I.icon})),endAdornment:o().createElement(d.Z,{position:"end"},S.length>0&&o().createElement(f.Z,{icon:m.default,className:I.clearButton,onClick:()=>E("")})),autoFocus:n,classes:b({},x,{input:i()(I.input,x.input),root:i()(I.container,x.root)}),placeholder:v,value:S,onChange:(0,l.pipe)(p.NA,E),disableUnderline:!0,ref:c},w))}))},15311:(e,t,n)=>{n.d(t,{y:()=>r});const r=(0,n(79692).Z)((()=>({container:e=>{let{height:t=36}=e;return{height:t,borderRadius:"2px",alignItems:"center",backgroundColor:"rgba(0,0,0,0.03)",minWidth:"100px"}},icon:{opacity:.67,marginLeft:"10px",marginRight:"6px"},input:{fontSize:"13px",width:"100%"},clearButton:{marginRight:"10px"},white:{backgroundColor:"rgb(255, 255, 255)",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.24)"}})))},22311:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),i=n.n(r),l=n(71153),a=n.n(l),o=n(87918),c=n.n(o),s=n(79784),u=n(54275),d=n(33662);function m(){return m=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},m.apply(this,arguments)}const h=e=>{let{title:t,className:n,onSearch:r,hideTitle:l,hideSearchInput:o,headerPlacement:h="top",containerWidth:p,containerHeight:f,searchInputOnKeyDown:g,children:C,searchInputRef:b,anchorOrigin:x={vertical:"top",horizontal:"right"},transformOrigin:y={vertical:"top",horizontal:"right"}}=e,v=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["title","className","onSearch","hideTitle","hideSearchInput","headerPlacement","containerWidth","containerHeight","searchInputOnKeyDown","children","searchInputRef","anchorOrigin","transformOrigin"]);const w=(0,u.Z)({containerWidth:p,containerHeight:f}),I=i().createElement(i().Fragment,null,!l&&i().createElement("div",{className:w.header},t),!o&&i().createElement(d.Z,{onSearch:r,autofocus:!0,onKeyDown:g,inputRef:b,classes:{root:w.searchInputContainer},placeholder:c().text("Search & add attributes"),height:40}));return i().createElement(s.ZP,m({anchorOrigin:x,transformOrigin:y},v),i().createElement("div",{className:a()(w.container,n),style:{width:p}},"top"===h&&I,i().createElement("div",{className:w.list},C),"bottom"===h&&I))}},26638:(e,t,n)=>{n.d(t,{t:()=>a});var r=n(24328),i=n(17440),l=n(63485);const a=e=>{let{items:t,open:n,onSelectFocusedItem:a,selectedItems:o,onClose:c}=e;const[s,u]=(0,r.useState)(null),d=(0,r.useRef)(!1),m=(0,r.useCallback)((e=>{let n=null===e?m(-1):e;for(;null!==e&&n<t.length&&(n<=e||n>=0&&(0,l.c)(t[n]));)n+=1;return n!==t.length?n:m(-1)}),[t]),h=(0,r.useCallback)((e=>{let n=null===e?t.length-1:e;for(;null!==e&&n>=0&&(n>=e||(0,l.c)(t[n]));)n-=1;return n<0?t.length-1:n}),[t]),p=(0,r.useCallback)((()=>{if(!(0,i.isNil)(s)){const e=t[s].item;!e.item.notSelectable&&a({item:e.item,groupData:e})}}),[a,t,s]),f=(0,r.useCallback)((e=>{if(0!==t.length)switch(e.key){case"Down":case"ArrowDown":return u(m),e.preventDefault(),!1;case"Up":case"ArrowUp":return u(h),e.preventDefault(),!1;case"Enter":d.current=!0,p();break;case"Tab":c&&c(e);break;default:return}}),[t,m,h,p,c]);return(0,r.useEffect)((()=>{if(d.current){d.current=!1;const e=t.findIndex((e=>e.item.moveTo));e>-1&&u(e)}else u(null)}),[t,n,o]),{focusIndex:s,handleKeyDown:f}}},54275:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(79692);const i=(0,r.Z)((()=>({container:e=>{let{containerHeight:t=553,containerWidth:n}=e;return{display:"flex",flexDirection:"column",height:t,width:n,flexGrow:1}},header:{marginLeft:"16px",marginTop:"16px",marginBottom:"12px",fontSize:"16px",fontWeight:500,letterSpacing:"0.15px",lineHeight:"24px"},searchInputContainer:{margin:"0 16px 12px 16px",flexShrink:"0"},list:{flexGrow:1,height:0,overflow:"hidden",width:"100%",position:"relative","& ul":{paddingBottom:0,paddingTop:0}}})))},63485:(e,t,n)=>{n.d(t,{Z:()=>h,c:()=>d});var r=n(24328),i=n.n(r),l=n(13980),a=n.n(l),o=n(50166),c=n(44443);const s=(0,n(79692).Z)({stickyTitlesWrapper:{position:"absolute",top:0,"& > div":{zIndex:1,position:"absolute",top:0,width:"100%",visibility:"hidden"}}});var u=n(41008);const d=e=>e.titleItemIndex===e.index,m=e=>{let{items:t,getItemSize:n,renderItem:l,renderGroupTitle:a,width:m="100%",height:h,fixedTitle:p=!0,itemKey:f=(e=>e),disableHorizontalScrollbar:g,hideSubtitles:C,focusIndex:b=null,onInnerContainerResize:x}=e;const y=s(),v=(0,r.useRef)(null),w=(0,r.useRef)(null),I=(0,r.useRef)(null),O=(0,r.useRef)([0]),k={topMargin:0},E=(0,r.useMemo)((()=>!C||(t||[]).some((e=>null!==e.titleItemIndex))),[t,C]),S=(0,r.useCallback)((e=>{const r=O.current.length;let i=0;t.slice(r-1,e+1).forEach(((e,t)=>{const l=r+t-1;t>0&&(O.current[l]=O.current[l-1]+i),i=n(l,e.item)}))}),[n,t]),Z=(0,r.useCallback)((e=>t[e].titleItemIndex),[t]),L=(0,r.useCallback)((e=>t[e]),[t]);(0,r.useEffect)((()=>{requestAnimationFrame((()=>{v.current&&v.current.scrollTo(0)}))}),[t.length]),(0,r.useEffect)((()=>{v.current&&v.current.resetAfterIndex(0),R();const e=(e=>{const t=e.findIndex((e=>e.item.moveTo));if(t>-1){S(t);const e=Z(t);return{offset:O.current[t],titleHeight:n(e,L(e).item)}}})(t);if(e&&e.offset&&v.current){const{titleHeight:t}=e,n=e.offset-t;(n<v.current.state.scrollOffset||n>v.current.state.scrollOffset+h)&&requestAnimationFrame((()=>{v.current&&v.current.scrollTo(n-(h-t)/2)}))}}),[S,L,n,Z,h,O,t,v]);const R=()=>{I.current&&w.current&&(I.current.style.width=w.current.offsetWidth+"px")},N=(0,r.useCallback)((e=>{let n=null,r=0;return t.some(((t,i)=>{S(i+10);const l=O.current[i+1];return e>=r&&e<l&&(n={index:i,offset:r,listItem:t}),r=l,n})),n}),[S,O,t]),P=(0,r.useCallback)((e=>n(e,L(e).item)),[L,n]),T=(0,r.useCallback)((e=>{let{index:t,style:n,data:r}=e;const i=L(t);return i.item&&(d(i)&&a(n,i.item)||l(n,i.item,t,r))}),[L,a,l]),{handleOnItemsRendered:j}=(0,u.LW)({items:t,focusIndex:b,listRef:v}),z=(0,r.useCallback)((()=>t.filter((e=>d(e))).map((e=>(e=>i().createElement("div",{className:"stickyTitleItem",style:{visibility:"hidden"},"data-index":e.index,key:e.index},a({height:n(e.index,e.item)},e.item)))(e)))),[n,t,a]);return i().createElement(i().Fragment,null,i().createElement("div",{ref:I,className:y.stickyTitlesWrapper},p&&z()),x&&w.current&&i().createElement(c.Z,{handleHeight:!0,onResize:x,targetDomEl:w.current}),i().createElement(o.VariableSizeList,{ref:v,itemCount:t.length,itemSize:P,width:m,height:h,itemKey:f,innerRef:w,onScroll:e=>{let{scrollOffset:r,scrollDirection:i}=e;if(!p||!E)return;const l=N(r),a=l&&Z(l.index);var o;null!==a&&(o=a,I.current&&[...I.current.querySelectorAll(".stickyTitleItem")].forEach((e=>{e.dataset.index===o.toString()?(e.style.visibility="visible",k.index=o):e.style.visibility="hidden"}))),R();const c=null!==a&&n(a,L(a).item),s=N(r+c+k.topMargin);let u=0;if(s){switch(i){case"forward":s.offset-r>0&&d(s.listItem)&&(u=c-(s.offset-r));break;case"backward":{const e=a>-1&&(m=a,t.findIndex(((e,t)=>d(e)&&m<t))),n=(e=>(S(e),O.current[e]))(e);e>-1&&r<n&&c>=n-r&&(u=c-(n-r))}}(e=>{I.current&&(k.topMargin=-e,I.current.style.top=-e+"px")})(u)}var m},style:g?{overflowX:"hidden"}:void 0,overscanCount:5,onItemsRendered:j},T))};m.propTypes={items:a().arrayOf(a().object).isRequired,getItemSize:a().func.isRequired,renderItem:a().func.isRequired,width:a().oneOfType([a().number,a().string]),height:a().number.isRequired,renderGroupTitle:a().func,fixedTitle:a().bool,hideSubtitles:a().bool,itemKey:a().func,disableHorizontalScrollbar:a().bool,focusIndex:a().number,onInnerContainerResize:a().func};const h=m},41008:(e,t,n)=>{n.d(t,{LG:()=>l,LW:()=>a});var r=n(17440),i=n(24328);const l=e=>{const t=e=>(0,r.flatten)(e.map((e=>[e].concat(e.items?t(e.items):[]))));let n=null;return t(e).map(((e,t)=>(e&&e.items&&(n=t),{item:e,index:t,titleItemIndex:n})))},a=e=>{let{focusIndex:t,listRef:n,items:r}=e;const l=(0,i.useRef)(null),a=(0,i.useRef)(null),o=(0,i.useCallback)((e=>{let{visibleStartIndex:t,visibleStopIndex:n}=e;l.current=t,a.current=n}),[]);return(0,i.useEffect)((()=>{n.current&&null!==t&&0!==r.length&&(t<Math.max(l.current+3,0)?n.current.scrollToItem(Math.max(t-3,0),"start"):t>Math.min(a.current-3,r.length-1)&&n.current.scrollToItem(Math.min(t+3,r.length-1),"end"))}),[t,r.length,n]),{handleOnItemsRendered:o}}}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[9550],{37573:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),i=n.n(r),l=n(52730),a=n(71153),o=n.n(a),c=n(43434),s=n(18435),u=n(35674);const d=e=>{let{entity:t,avatarClassName:n,imageClassName:r}=e;const a=(0,l.useSelector)(u.ZP.selectors.getMetadata),d=(0,l.useSelector)(u.ZP.selectors.getAbsoluteImagePath)||"",m=(0,s.uie)(a,d,t),h=(0,s.vPL)(d,(0,s.XH2)(a,t.type)),p=e=>{e.target.onError=null,e.target.src=(0,s.m5F)('\n<svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" fill-rule="nonzero">\n <rect id="Rectangle" fill="#DFE5E9" x="0" y="0" width="400" height="400"></rect>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M5.68434189e-14,387.023257 L5.68434189e-14,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 5.68434189e-14,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n </g>\n </g>\n</svg>\n')};return i().createElement(c.Z,{className:o()(n,r),src:m,imgProps:{onError:p}},i().createElement("img",{className:r,src:h,alt:"fallback entity avatar",onError:p}))}},94792:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(24328),i=n.n(r);const l=(0,n(79692).Z)({highlight:{fontWeight:600}}),a=e=>{let{text:t="",highlight:n="",className:r}=e;const a=l(),o=n&&t.split(new RegExp(`(${n})`,"gi"));return i().createElement("span",null,n?o.map(((e,t)=>i().createElement("span",{key:t,className:e.toLocaleLowerCase()===n.toLocaleLowerCase()?r||a.highlight:""},e))):t)}},87378:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),i=n.n(r),l=n(71153),a=n.n(l),o=n(67358);const c=(0,n(79692).Z)({loadingOverlay:{position:"absolute",width:"100%",height:"100%",top:0,left:0,opacity:.37,zIndex:10,backgroundColor:"#fff"},transparent:{backgroundColor:"transparent"},relativePosition:{"&$loadingOverlay":{position:"relative"}}}),s=e=>{let{transparent:t=!1,relativePosition:n=!1,className:r}=e;const l=c();return i().createElement(i().Fragment,null,i().createElement("div",{className:a()(l.loadingOverlay,r,{[l.transparent]:t,[l.relativePosition]:n})},i().createElement(o.Z,{color:"secondary"})))}},4270:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),i=n.n(r),l=n(77277),a=n(38592),o=n(71153),c=n.n(o),s=n(78223),u=n(79692),d=n(41128);const m=(0,u.Z)((e=>({button:{minWidth:"30px",padding:"8px 8px",justifyContent:"start",fill:"rgba(0,0,0,0.54)",textTransform:"none",borderColor:"rgba(0,0,0,0.12)"},icon:{color:"rgba(0,0,0,0.54)",width:"20px",height:"20px",marginRight:"8px"},title:{fontSize:"13px",lineHeight:"15px",letterSpacing:0},current:{"& $icon":{color:e.palette.primary.main},backgroundColor:(0,d.U1)(e.palette.primary.main,.12),fill:e.palette.primary.main,color:e.palette.primary.main,"&:hover":{backgroundColor:(0,d.U1)(e.palette.primary.main,.24)}}}))),h=(0,s.Z)(l.Z),p=e=>{let{className:t,classes:n={},modes:r=[],modeId:l,onChange:o}=e;const s=m();return i().createElement(a.Z,{className:t},r.map((e=>{let{id:t,title:r,tooltipTitle:a,Icon:u}=e;return i().createElement(h,{key:String(t),className:c()(s.button,{[s.current]:l===t},n.button),tooltipTitle:a,onClick:(d=t,()=>o(d)),"data-reltio-id":`reltio-search-mode-${t}`},u&&i().createElement(u,{className:s.icon}),r&&i().createElement("div",{className:s.title},r));var d})))}},33662:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(71153),i=n.n(r),l=n(17440),a=n(24328),o=n.n(a),c=n(87918),s=n.n(c),u=n(29611),d=n(50581),m=n(87685),h=n(21853),p=n(79573),f=n(40435),g=n(15311);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 b(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){x(e,t,n[t])}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const y=(0,a.memo)((e=>{let{value:t,autofocus:n,onSearch:r=p.ZT,rootRef:c,classes:x={},height:y,placeholder:v=s().text("Search")}=e,w=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["value","autofocus","onSearch","rootRef","classes","height","placeholder"]);const I=(0,g.y)({height:y}),[O,k]=(0,a.useState)(""),E=(0,l.pipe)((0,l.tap)(r),k),S=(0,l.isNil)(t)?O:t;return o().createElement(u.Z,C({startAdornment:o().createElement(d.Z,{position:"start"},o().createElement(h.default,{className:I.icon})),endAdornment:o().createElement(d.Z,{position:"end"},S.length>0&&o().createElement(f.Z,{icon:m.default,className:I.clearButton,onClick:()=>E("")})),autoFocus:n,classes:b({},x,{input:i()(I.input,x.input),root:i()(I.container,x.root)}),placeholder:v,value:S,onChange:(0,l.pipe)(p.NA,E),disableUnderline:!0,ref:c},w))}))},15311:(e,t,n)=>{n.d(t,{y:()=>r});const r=(0,n(79692).Z)((()=>({container:e=>{let{height:t=36}=e;return{height:t,borderRadius:"2px",alignItems:"center",backgroundColor:"rgba(0,0,0,0.03)",minWidth:"100px"}},icon:{opacity:.67,marginLeft:"10px",marginRight:"6px"},input:{fontSize:"13px",width:"100%"},clearButton:{marginRight:"10px"},white:{backgroundColor:"rgb(255, 255, 255)",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.24)"}})))},22311:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),i=n.n(r),l=n(71153),a=n.n(l),o=n(87918),c=n.n(o),s=n(79784),u=n(54275),d=n(33662);function m(){return m=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},m.apply(this,arguments)}const h=e=>{let{title:t,className:n,onSearch:r,hideTitle:l,hideSearchInput:o,headerPlacement:h="top",containerWidth:p,containerHeight:f,searchInputOnKeyDown:g,children:C,searchInputRef:b,anchorOrigin:x={vertical:"top",horizontal:"right"},transformOrigin:y={vertical:"top",horizontal:"right"}}=e,v=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["title","className","onSearch","hideTitle","hideSearchInput","headerPlacement","containerWidth","containerHeight","searchInputOnKeyDown","children","searchInputRef","anchorOrigin","transformOrigin"]);const w=(0,u.Z)({containerWidth:p,containerHeight:f}),I=i().createElement(i().Fragment,null,!l&&i().createElement("div",{className:w.header},t),!o&&i().createElement(d.Z,{onSearch:r,autofocus:!0,onKeyDown:g,inputRef:b,classes:{root:w.searchInputContainer},placeholder:c().text("Search & add attributes"),height:40}));return i().createElement(s.ZP,m({anchorOrigin:x,transformOrigin:y},v),i().createElement("div",{className:a()(w.container,n),style:{width:p}},"top"===h&&I,i().createElement("div",{className:w.list},C),"bottom"===h&&I))}},26638:(e,t,n)=>{n.d(t,{t:()=>a});var r=n(24328),i=n(17440),l=n(63485);const a=e=>{let{items:t,open:n,onSelectFocusedItem:a,selectedItems:o,onClose:c}=e;const[s,u]=(0,r.useState)(null),d=(0,r.useRef)(!1),m=(0,r.useCallback)((e=>{let n=null===e?m(-1):e;for(;null!==e&&n<t.length&&(n<=e||n>=0&&(0,l.c)(t[n]));)n+=1;return n!==t.length?n:m(-1)}),[t]),h=(0,r.useCallback)((e=>{let n=null===e?t.length-1:e;for(;null!==e&&n>=0&&(n>=e||(0,l.c)(t[n]));)n-=1;return n<0?t.length-1:n}),[t]),p=(0,r.useCallback)((()=>{if(!(0,i.isNil)(s)){const e=t[s].item;!e.item.notSelectable&&a({item:e.item,groupData:e})}}),[a,t,s]),f=(0,r.useCallback)((e=>{if(0!==t.length)switch(e.key){case"Down":case"ArrowDown":return u(m),e.preventDefault(),!1;case"Up":case"ArrowUp":return u(h),e.preventDefault(),!1;case"Enter":d.current=!0,p();break;case"Tab":c&&c(e);break;default:return}}),[t,m,h,p,c]);return(0,r.useEffect)((()=>{if(d.current){d.current=!1;const e=t.findIndex((e=>e.item.moveTo));e>-1&&u(e)}else u(null)}),[t,n,o]),{focusIndex:s,handleKeyDown:f}}},54275:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(79692);const i=(0,r.Z)((()=>({container:e=>{let{containerHeight:t=553,containerWidth:n}=e;return{display:"flex",flexDirection:"column",height:t,width:n,flexGrow:1}},header:{marginLeft:"16px",marginTop:"16px",marginBottom:"12px",fontSize:"16px",fontWeight:500,letterSpacing:"0.15px",lineHeight:"24px"},searchInputContainer:{margin:"0 16px 12px 16px",flexShrink:"0"},list:{flexGrow:1,height:0,overflow:"hidden",width:"100%",position:"relative","& ul":{paddingBottom:0,paddingTop:0}}})))},63485:(e,t,n)=>{n.d(t,{Z:()=>h,c:()=>d});var r=n(24328),i=n.n(r),l=n(13980),a=n.n(l),o=n(50166),c=n(44443);const s=(0,n(79692).Z)({stickyTitlesWrapper:{position:"absolute",top:0,"& > div":{zIndex:1,position:"absolute",top:0,width:"100%",visibility:"hidden"}}});var u=n(41008);const d=e=>e.titleItemIndex===e.index,m=e=>{let{items:t,getItemSize:n,renderItem:l,renderGroupTitle:a,width:m="100%",height:h,fixedTitle:p=!0,itemKey:f=(e=>e),disableHorizontalScrollbar:g,hideSubtitles:C,focusIndex:b=null,onInnerContainerResize:x}=e;const y=s(),v=(0,r.useRef)(null),w=(0,r.useRef)(null),I=(0,r.useRef)(null),O=(0,r.useRef)([0]),k={topMargin:0},E=(0,r.useMemo)((()=>!C||(t||[]).some((e=>null!==e.titleItemIndex))),[t,C]),S=(0,r.useCallback)((e=>{const r=O.current.length;let i=0;t.slice(r-1,e+1).forEach(((e,t)=>{const l=r+t-1;t>0&&(O.current[l]=O.current[l-1]+i),i=n(l,e.item)}))}),[n,t]),Z=(0,r.useCallback)((e=>t[e].titleItemIndex),[t]),L=(0,r.useCallback)((e=>t[e]),[t]);(0,r.useEffect)((()=>{requestAnimationFrame((()=>{v.current&&v.current.scrollTo(0)}))}),[t.length]),(0,r.useEffect)((()=>{v.current&&v.current.resetAfterIndex(0),R();const e=(e=>{const t=e.findIndex((e=>e.item.moveTo));if(t>-1){S(t);const e=Z(t);return{offset:O.current[t],titleHeight:n(e,L(e).item)}}})(t);if(e&&e.offset&&v.current){const{titleHeight:t}=e,n=e.offset-t;(n<v.current.state.scrollOffset||n>v.current.state.scrollOffset+h)&&requestAnimationFrame((()=>{v.current&&v.current.scrollTo(n-(h-t)/2)}))}}),[S,L,n,Z,h,O,t,v]);const R=()=>{I.current&&w.current&&(I.current.style.width=w.current.offsetWidth+"px")},N=(0,r.useCallback)((e=>{let n=null,r=0;return t.some(((t,i)=>{S(i+10);const l=O.current[i+1];return e>=r&&e<l&&(n={index:i,offset:r,listItem:t}),r=l,n})),n}),[S,O,t]),P=(0,r.useCallback)((e=>n(e,L(e).item)),[L,n]),T=(0,r.useCallback)((e=>{let{index:t,style:n,data:r}=e;const i=L(t);return i.item&&(d(i)&&a(n,i.item)||l(n,i.item,t,r))}),[L,a,l]),{handleOnItemsRendered:j}=(0,u.LW)({items:t,focusIndex:b,listRef:v}),z=(0,r.useCallback)((()=>t.filter((e=>d(e))).map((e=>(e=>i().createElement("div",{className:"stickyTitleItem",style:{visibility:"hidden"},"data-index":e.index,key:e.index},a({height:n(e.index,e.item)},e.item)))(e)))),[n,t,a]);return i().createElement(i().Fragment,null,i().createElement("div",{ref:I,className:y.stickyTitlesWrapper},p&&z()),x&&w.current&&i().createElement(c.Z,{handleHeight:!0,onResize:x,targetDomEl:w.current}),i().createElement(o.VariableSizeList,{ref:v,itemCount:t.length,itemSize:P,width:m,height:h,itemKey:f,innerRef:w,onScroll:e=>{let{scrollOffset:r,scrollDirection:i}=e;if(!p||!E)return;const l=N(r),a=l&&Z(l.index);var o;null!==a&&(o=a,I.current&&[...I.current.querySelectorAll(".stickyTitleItem")].forEach((e=>{e.dataset.index===o.toString()?(e.style.visibility="visible",k.index=o):e.style.visibility="hidden"}))),R();const c=null!==a&&n(a,L(a).item),s=N(r+c+k.topMargin);let u=0;if(s){switch(i){case"forward":s.offset-r>0&&d(s.listItem)&&(u=c-(s.offset-r));break;case"backward":{const e=a>-1&&(m=a,t.findIndex(((e,t)=>d(e)&&m<t))),n=(e=>(S(e),O.current[e]))(e);e>-1&&r<n&&c>=n-r&&(u=c-(n-r))}}(e=>{I.current&&(k.topMargin=-e,I.current.style.top=-e+"px")})(u)}var m},style:g?{overflowX:"hidden"}:void 0,overscanCount:5,onItemsRendered:j},T))};m.propTypes={items:a().arrayOf(a().object).isRequired,getItemSize:a().func.isRequired,renderItem:a().func.isRequired,width:a().oneOfType([a().number,a().string]),height:a().number.isRequired,renderGroupTitle:a().func,fixedTitle:a().bool,hideSubtitles:a().bool,itemKey:a().func,disableHorizontalScrollbar:a().bool,focusIndex:a().number,onInnerContainerResize:a().func};const h=m},41008:(e,t,n)=>{n.d(t,{LG:()=>l,LW:()=>a});var r=n(17440),i=n(24328);const l=e=>{const t=e=>(0,r.flatten)(e.map((e=>[e].concat(e.items?t(e.items):[]))));let n=null;return t(e).map(((e,t)=>(e&&e.items&&(n=t),{item:e,index:t,titleItemIndex:n})))},a=e=>{let{focusIndex:t,listRef:n,items:r}=e;const l=(0,i.useRef)(null),a=(0,i.useRef)(null),o=(0,i.useCallback)((e=>{let{visibleStartIndex:t,visibleStopIndex:n}=e;l.current=t,a.current=n}),[]);return(0,i.useEffect)((()=>{n.current&&null!==t&&0!==r.length&&(t<Math.max(l.current+3,0)?n.current.scrollToItem(Math.max(t-3,0),"start"):t>Math.min(a.current-3,r.length-1)&&n.current.scrollToItem(Math.min(t+3,r.length-1),"end"))}),[t,r.length,n]),{handleOnItemsRendered:o}}}}]);