@reltio/remotes 1.4.1479 → 1.4.1480
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/3575.js +1 -1
- package/3575.js.map +1 -1
- package/package.json +1 -1
package/3575.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3575],{32528:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(13688),o=n(48852);const l=e=>t=>(0,o.l)(r.X,e,t)},68439:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),o=n.n(r),l=n(52730),a=n(71153),i=n.n(a),s=n(94079),c=n(47401),u=n(49885),d=n(95613);const p=(0,n(79692).Z)({"entityType-overflow":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",marginRight:"12px",borderRadius:"2px",flexShrink:0},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",marginRight:"16px",flexShrink:0}}),m=e=>{let{entity:t,className:n,size:r="small"}=e;const a=p(),m=(0,l.useSelector)(u.ZP.selectors.getMetadata),h=t.type,f=(0,c.nt9)(m,h)||{},g=(0,c.VD3)(m,f,"typeColor")||c.rSc.palette.primary.main,b=(0,c.jFi)(m,t);return o().createElement(d.Z,{value:b,placement:"top"},o().createElement(s.Typography,{style:{backgroundColor:g,color:c.P6Y.Colors.getColor(g)?"#FFFFFF":"#212121"},className:i()(a[`entityType-${r}`],a["entityType-overflow"],n),component:"div"},b))}},64459:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),o=n.n(r),l=n(71153),a=n.n(l),i=n(52730),s=n(17440),c=n(94079),u=n(87918),d=n.n(u),p=n(47401),m=n(49885),h=n(53180),f=n(68439);const g=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"0px 1px 0px rgba(0, 0, 0, 0.12)",marginBottom:"1px","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),b=e=>{let{className:t,entity:n,children:l,classes:u,renderLabel:b=s.identity}=e;const y=g({classes:u}),v=(0,i.useSelector)(m.ZP.selectors.getMetadata),x=(0,i.useSelector)(m.ZP.selectors.getShowEntityId),E=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,p.BTI)(n))}),[n]);if((0,s.isNil)(n))return null;const k=(0,p.idV)(n.label),w=n.secondaryLabel,C=(0,p.ptG)(v,n),S=(0,p.Fn9)(n),O=n.uri,P=(0,p.BTI)(n);return o().createElement("div",{className:a()(y.profileBandWrapper,t)},o().createElement("div",{className:a()(y.profileBand,{[y.inactive]:!S}),"data-entity-uri":O},o().createElement(h.Z,{key:n.uri,entity:n,avatarClassName:y.profileIcon,imageClassName:y.imageProfileIcon}),o().createElement("div",{className:y.profileInfo},o().createElement("div",null,o().createElement(c.Typography,{variant:"h6",className:y.label},b(k)),w&&o().createElement(c.Typography,{variant:"subtitle2",className:y.secondaryLabel},w),C&&o().createElement(c.Typography,{variant:"subtitle1",className:y.businessCard},C)),o().createElement("div",{className:y.specialInfo},o().createElement("div",{className:y.entityType},o().createElement(f.Z,{entity:n,size:"medium",className:y.badge}),!(0,p.ZiX)(O)&&x&&o().createElement(c.Tooltip,{title:d().text("Copy to clipboard")},o().createElement(c.Typography,{display:"inline",variant:"body2",className:y.entityId,onClick:E},d().text("Entity ID"),": ",P))))),l&&o().createElement("div",null,l)))}},93873:(e,t,n)=>{n.d(t,{a:()=>I});var r=n(24328),o=n.n(r),l=n(94079),a=n(67766),i=n(42767),s=n(47401),c=n(71153),u=n.n(c),d=n(17440),p=n(87918),m=n.n(p),h=n(79468),f=n(83348),g=n(8818);const b=(0,n(79692).Z)({container:{display:"flex",alignItems:"center"},link:{whiteSpace:"nowrap",marginRight:"9px"}}),y=(0,f.Z)(l.Link),v=e=>{var t;let{className:n,total:l=0,onPrev:c,onNext:p,onSearchResultsClick:f,isPrevDisabled:v,isNextDisabled:x}=e;const E=b(),k=(0,r.useContext)(h.T),{OPEN_RESULTS:w,SEARCH_RESULT:C,SEARCH_RESULTS:S,NEXT_PROFILE:O,PREVIOUS_PROFILE:P}=(0,d.mergeRight)({OPEN_RESULTS:m().text("Go to search results"),SEARCH_RESULT:m().text("Search result"),SEARCH_RESULTS:m().text("Search results"),PREVIOUS_PROFILE:m().text("Go to previous profile"),NEXT_PROFILE:m().text("Go to next profile")},null!==(t=null==k?void 0:k.profileBand)&&void 0!==t?t:{});return o().createElement("div",{className:u()(E.container,n)},o().createElement(y,{className:E.link,component:"button",variant:"caption",onClick:f,underline:"none",tooltipTitle:w},(0,s.k7L)(l,1e6)," ",1===l?C:S),o().createElement(g.k,{size:"L",icon:a.Z,tooltipTitle:P,onClick:c,disabled:v,showForDisabled:!0}),o().createElement(g.k,{size:"L",icon:i.Z,tooltipTitle:O,onClick:p,disabled:x,showForDisabled:!0}))};var x=n(52730),E=n(49885),k=n(39450),w=n(85229);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){S(e,t,n[t])}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class O{constructor(e){var t=this;let{data:{query:n,sortField:r,sortOrder:o},tenant:l,searchTenant:a,apiPath:i,dtssPath:c,globalSearchRequestOptions:u}=e;this.query=void 0,this.sortField=void 0,this.sortOrder=void 0,this.tenant=void 0,this.searchTenant=void 0,this.apiPath=void 0,this.dtssPath=void 0,this.globalSearchRequestOptions=void 0,this.isDT=()=>this.tenant!==this.searchTenant,this.getQueryFilter=()=>({rawFilter:this.query}),this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[t.getQueryFilter(),...e],o=C({},t.globalSearchRequestOptions,{sort:t.sortField,order:t.sortOrder,select:"uri,label,type",scoreEnabled:!1},n);return t.isDT()?(0,s.uqV)({filters:r,options:o,customerTenant:t.tenant,dataTenant:t.searchTenant,dtssPath:t.dtssPath}):(0,s.ZOr)(r,o)},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"uri",values:[e]}],{offset:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{offset:t,max:e}),this.requestTotal=()=>{const e=[this.getQueryFilter()],t=this.globalSearchRequestOptions;return(this.isDT()?(0,s.J$m)({filters:e,options:t,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,s.j_Q)(e,t)).then((e=>e.total))},this.query=n,this.sortField=r,this.sortOrder=o,this.tenant=l,this.searchTenant=a,this.apiPath=i,this.dtssPath=c,this.globalSearchRequestOptions=u}}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){T(e,t,n[t])}))}return e}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class R{constructor(e){var t=this;let{data:n,tenant:r,apiPath:o}=e;this.searchBody=void 0,this.tenant=void 0,this.apiPath=void 0,this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[{rawFilter:t.searchBody.filter},...e];return(0,s.P2h)({apiPath:t.apiPath,tenant:t.tenant,searchBody:P({},t.searchBody,{filter:e.length?(0,s.Uqd)()(r):t.searchBody.filter}),options:n})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"id",values:[(0,s.BTI)({uri:e})]}],{from:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{from:t,max:e}),this.requestTotal=()=>(0,s.dED)({apiPath:this.apiPath,tenant:this.tenant,searchBody:this.searchBody}).then((e=>e.count)),this.searchBody=n,this.tenant=r,this.apiPath=o}}const N=(e,t)=>(0,d.pipe)((0,d.map)((0,d.prop)("uri")),(0,d.reject)((e=>t.includes(e))))(e),I=e=>{let{className:t}=e;const{total:n,onPrev:l,onNext:a,onSearchResultsClick:i,isPrevDisabled:c,isNextDisabled:u}=(()=>{const e=(0,w._)(),t=(0,w._)(),n=(0,w._)(),{uri:o,index:l,total:a,tenant:i,cache:c}=(0,x.useSelector)(E.ZP.selectors.getSearchNavigationData)||{},{type:u,data:d}=(0,x.useSelector)(E.ZP.selectors.getSearchProviderData)||{},p=(0,x.useSelector)(E.ZP.selectors.getTenant),m=(0,x.useSelector)(E.ZP.selectors.getApiPath),h=(0,x.useSelector)(E.ZP.selectors.getDtssPath),f=(0,x.useSelector)((e=>E.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]))),g=(0,r.useContext)(k.m),b=(0,x.useDispatch)(),[y,v]=(0,r.useState)(!1),C=(0,r.useMemo)((()=>((e,t)=>{switch(e){case"search":return new O(t);case"graphsearch":return new R(t)}})(u,{data:d,tenant:p,searchTenant:i,apiPath:m,dtssPath:h,globalSearchRequestOptions:f})),[u,d,p,i,m,h,f]),S=(0,r.useCallback)((e=>{b(E.yC.actions.updateSearchNavigationDataFields(e))}),[b]),P=(0,r.useCallback)((e=>{const t=p!==i?(0,s.wwR)({uri:e,dataTenant:i}):e;b(E.ui.actions.openEntity({uri:t,viewId:g,source:"navigation"}))}),[b,g,p,i]),T=(0,r.useCallback)((()=>{b(E.ui.actions.openPerspective({perspectiveId:u,viewId:g}))}),[b,u,g]);(0,r.useEffect)((()=>{l>=a?S({index:a-1}):l<0&&S({index:0})}),[a,l,S]);const I=(0,r.useCallback)(((e,r,o)=>{v(!0),t(C.requestTotal()).then((e=>S({total:e})));const l=o+1;return n(C.requestEntities(15,l)).then((t=>{if(t){if(t.length){const n=N(t,e);if(n.length>0)return S({cache:e.concat(n),uri:n[0],index:l+t.length-n.length}),void P(n[0]);if(o+t.length<r-1)return I(e,r-t.length,o+t.length)}S({index:l})}})).finally((()=>{v(!1)}))}),[C,S,P]),j=(0,r.useCallback)(((e,r)=>{v(!0),t(C.requestTotal()).then((e=>S({total:e})));const o=r-1,l=Math.max(0,r-15),a=15+Math.min(0,r-15);return n(C.requestEntities(a,l)).then((t=>{if(t){if(t.length){const n=N(t,e);if(n.length>0)return S({cache:n.concat(e),uri:n[n.length-1],index:o-(t.length-n.length)}),void P(n[n.length-1]);if(r-t.length>0)return j(e,r-t.length)}S({index:0})}})).finally((()=>{v(!1)}))}),[C,S,P]),U=(0,r.useCallback)(((t,n,r,o)=>{if(n<t.length){const l=t[n];return v(!0),e(C.checkEntity(l)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),U(e,n,r-1,o)}S({index:o+1,uri:l,cache:t,total:r}),P(l)})).finally((()=>{v(!1)}))}if(!(o>=r-1))return I(t,r,o);S({cache:t,total:r,index:r-1})}),[C,S,P,I]),L=(0,r.useCallback)(((t,n,r,o)=>{if(n>-1){const l=t[n];return v(!0),e(C.checkEntity(l)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),L(e,n-1,r-1,o-1)}S({index:o-1,uri:l,cache:t,total:r}),P(l)})).finally((()=>{v(!1)}))}if(!(o<=0))return j(t,o);S({index:0,cache:t,total:r})}),[C,S,P,j]),D=(0,r.useCallback)((()=>{if(c&&o){const e=c.indexOf(o)-1;L(c,e,a,l)}}),[L,c,o,a,l]),Z=(0,r.useCallback)((()=>{if(c&&o){const e=c.indexOf(o)+1;U(c,e,a,l)}}),[U,c,o,a,l]);return{total:a,onPrev:D,onNext:Z,onSearchResultsClick:T,isPrevDisabled:y||l<=0,isNextDisabled:y||l>=a-1}})();return(()=>{const{cache:e}=(0,x.useSelector)(E.ZP.selectors.getSearchNavigationData)||{},t=(0,x.useSelector)(E.ZP.selectors.getMode),n=(0,x.useSelector)(E.ZP.selectors.getEntity);return(0,s.uzs)(t)&&(null==e?void 0:e.includes(null==n?void 0:n.uri))})()?o().createElement(v,{className:t,total:n,onPrev:l,onNext:a,onSearchResultsClick:i,isPrevDisabled:c,isNextDisabled:u}):null}},39827:(e,t,n)=>{n.d(t,{G:()=>m});var r=n(24328),o=n.n(r),l=n(71153),a=n.n(l),i=n(8818),s=n(79692),c=n(41128);const u=(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 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)}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(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)&&(o[n]=e[n])}return o}const m=e=>{let{buttonsProps:t,activeIndexId:n,className:r,onButtonClick:l,classes:s={}}=e;const c=u(),{active:m,buttonWrapper:h}=s,f=p(s,["active","buttonWrapper"]);return o().createElement("div",{className:a()(c.container,r)},t.map((e=>{let{id:t}=e,r=p(e,["id"]);return o().createElement(i.k,d({},r,{classes:f,size:"S",key:t,className:a()({[a()(c.active,m)]:n===t},c.buttonWrapper,h),onClick:()=>l(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},3409:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),o=n.n(r),l=n(52730),a=n(49885),i=n(94079),s=n(17440),c=n(87918),u=n.n(c);const d=(0,n(79692).Z)({root:{display:"flex",alignItems:"flex-start"},slice:{fontWeight:500},cancelButton:{width:"88px",flexShrink:0,marginLeft:"15px"}}),p=()=>{const e=d(),t=(0,l.useSelector)(a.ZP.selectors.getHistoryEvent),n=(0,l.useDispatch)(),r=(0,s.pipe)(a.N5.history.actions.clearHistoryEvent,n);return t?o().createElement("div",{className:e.root},o().createElement(i.Typography,{component:"div"},u().text("You are viewing a historic slice:")," ",o().createElement("span",{className:e.slice},u().date(t.aStamp,"llll"))),o().createElement(i.Button,{className:e.cancelButton,variant:"contained",color:"primary",onClick:r},u().text("Cancel"))):null}},79468:(e,t,n)=>{n.d(t,{T:()=>o});var r=n(24328);const o=n.n(r)().createContext({profileBand:{}});o.displayName="LabelsContext"},7718:(e,t,n)=>{n.d(t,{C:()=>h});var r=n(24328),o=n(52730),l=n(17440),a=n(47401),i=n(49885);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=(e,t)=>t.filter((t=>t.replyId!==e)),d=(e,t)=>{const n=e.replies.findIndex((e=>{let{replyId:n}=e;return n===t.replyId})),r=[...e.replies];return r[n]=t,r},p=[],m=e=>console.error("Collaboration error",e),h=e=>{let{objectIds:t=p,objectTypes:n,enabled:c=!0}=e;const h=(0,o.useSelector)(i.ZP.selectors.getEntity),f=(0,o.useSelector)(i.ZP.selectors.getTenant),g=(0,o.useSelector)(i.ZP.selectors.getCollaborationPath),b=(0,o.useSelector)(i.ZP.selectors.isCollaborationEnabled)&&c,[y,v]=(0,r.useState)(null),[x,E]=(0,r.useState)([]),[k,w]=(0,r.useState)(null),[C,S]=(0,r.useState)(null),[O,P]=(0,r.useState)(!1),[T,R]=(0,r.useState)(!1),[N,I]=(0,r.useState)({}),j=(0,r.useCallback)((e=>{w((t=>s({},t,e)))}),[]),U=null==h?void 0:h.uri,L=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(b&&U&&!(0,a.ZiX)(U)){const n=e=>{console.warn("Collaboration error",e),w(null)};(0,l.pipe)(a.$oF,(0,l.andThen)((0,l.map)((0,l.props)(["objectId","comments"]))),(0,l.andThen)(l.fromPairs),(0,l.andThen)(t?w:j),(0,l.otherwise)(n))({uris:e,tenant:f,collaborationPath:g})}else w(null)}),[j,g,U,b,f]);(0,r.useEffect)((()=>{L(t,!0)}),[t,L]);const D=(0,r.useCallback)(((e,t)=>{(0,a.liG)({collaborationPath:g,tenant:f,relatedObjectUri:e,pageToken:t}).then((e=>{let{items:n,nextPageToken:r}=e;E((e=>t?(0,l.uniqBy)((0,l.prop)("commentId"),[...e,...n]):n)),v(r)})).catch(m)}),[g,f]),Z=(0,r.useCallback)((e=>{R(!0),(0,a.d7q)({collaborationPath:g,tenant:f,commentId:e}).then(S).catch(m).finally((()=>R(!1)))}),[g,f]),M=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,objectType:r,uri:o,relatedObjectUris:l}=e;P(!0);const i={objectId:o,content:t,relatedObjectUris:l,objectType:r,visibility:"public",namedUsers:n,permanentLink:`${window.location.href}&commentId=${encodeURIComponent("{commentId}")}`};return(0,a.Yrx)({collaborationPath:g,tenant:f,data:i}).then((e=>{let[t]=e;return((e,t)=>{S(e),w((n=>s({},n,{[t]:[...n[t]||[],{commentId:e.commentId,replies:0,status:"open"}]}))),E((t=>[e,...t]))})(t,o)})).catch(m).finally((()=>P(!1)))}),[g,f]),B=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,objectType:r,uri:o,relatedObjectUris:i,commentId:c,replies:u}=e;P(!0);const d={objectId:o,content:t,relatedObjectUris:i,objectType:r,visibility:"public",namedUsers:n,commentId:c,replies:u};return(0,a.uAg)({collaborationPath:g,tenant:f,data:d}).then((e=>(e=>{S(e),E((0,l.map)((0,l.when)((0,l.propEq)("commentId",e.commentId),(0,l.always)(e))))})(s({},e,{replies:u})))).catch(m).finally((()=>P(!1)))}),[g,f]),z=(0,r.useCallback)((e=>{let{uri:t,commentId:n}=e;P(!0),(0,a.YFy)({collaborationPath:g,tenant:f,commentId:n}).then((()=>((e,t)=>{S(null),w((n=>{const r=n[t]||[];return s({},n,{[t]:r.filter((t=>t.commentId!==e))})})),E((t=>t.filter((t=>t.commentId!==e))))})(n,t))).catch(m).finally((()=>P(!1)))}),[g,f]),F=(0,r.useCallback)(((e,t,n,r)=>{const o="resolve"===e.action?"resolved":"open",{replyId:l}=e;S("resolved"===o?e=>{if(e)return null}:t=>{if(t)return s({},t,{replies:r?u(l,t.replies):[...t.replies,e]})}),w((e=>s({},e,{[t]:(e[t]||[]).map((e=>e.commentId===n?s({},e,{status:o,replies:r?e.replies-1:e.replies+1}):e))}))),E((t=>t.map((t=>t.commentId===n?s({},t,{status:o,replies:r?u(e.replyId,t.replies):[...t.replies,e]}):t))))}),[]),H=(0,r.useCallback)((e=>{let{uri:t,commentId:n,reply:r}=e;P(!0),(0,a.Mfr)({collaborationPath:g,tenant:f,commentId:n,replyId:r.replyId}).then((()=>F(r,t,n,!0))).catch(m).finally((()=>P(!1)))}),[g,F,f]),$=(0,r.useCallback)(((e,t)=>{S((t=>{if(t)return s({},t,{replies:d(t,e)})})),E((n=>n.map((n=>n.commentId===t?s({},n,{replies:d(n,e)}):n))))}),[]),A=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,commentId:r,replyId:o}=e;P(!0);const l={content:t,namedUsers:n};return(0,a.ufV)({collaborationPath:g,tenant:f,commentId:r,replyId:o,data:l}).then((e=>$(e,r))).catch(m).finally((()=>P(!1)))}),[g,f,$]),W=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,commentId:r,action:o,uri:l}=e;P(!0);const i={content:t,action:o,namedUsers:n};return(0,a.PP2)({collaborationPath:g,tenant:f,commentId:r,data:i}).then((e=>{let[t]=e;return F(t,l,r)})).catch(m).finally((()=>P(!1)))}),[g,f,F]),q=(0,r.useCallback)((e=>{let{commentId:t,uri:n}=e;W({content:"",namedUsers:[],commentId:t,action:"resolve",uri:n})}),[W]),G=(0,r.useCallback)((e=>{let{commentId:t,uri:n}=e;W({content:"",namedUsers:[],commentId:t,action:"reopen",uri:n})}),[W]);return{clearCurrentComment:(0,r.useCallback)((()=>{S(null)}),[]),comments:x,commentsMap:k,getCommentState:(e,t)=>(0,l.pathOr)({},[e,t],N),updateCommentState:(e,t,n)=>{I((r=>{const o=[e,t],a=(0,l.path)(o,r);return(0,l.assocPath)(o,(0,l.mergeRight)(a,n),r)}))},clearCommentState:(e,t)=>I((0,l.dissocPath)([e,t])),createComment:M,createReply:W,currentComment:C,deleteComment:z,editComment:B,getComment:Z,getComments:D,getCommentsCount:L,loading:T,objectTypes:n,pageToken:y,reOpenThread:G,resolveThread:q,sending:O,deleteReply:H,editReply:A}}},2804:(e,t,n)=>{n.d(t,{a:()=>o});var r=n(24328);const o=e=>{const[t,n]=(0,r.useState)(!1),[o,l]=(0,r.useState)({});return(0,r.useEffect)((()=>{e().then((e=>{l(e||{})})).then((e=>n(!0))).catch((e=>n(!0)))}),[]),{isLoaded:t,savedState:o}}},51386:(e,t,n)=>{n.r(t),n.d(t,{default:()=>bt});var r=n(24328),o=n.n(r),l=n(52730),a=n(8598),i=n(36138),s=n(44443),c=n(22664),u=n(39450),d=n(585),p=n(87918),m=n.n(p),h=n(49885),f=n(47401),g=n(71820),b=n(57730),y=n(20562),v=n(24605),x=n(2804),E=n(85965),k=n(44021),w=n(91515),C=n(54362),S=n(6674),O=n(63149),P=n(48017),T=n(96955),R=n(40715),N=n(66095),I=n(20982),j=n(39827),U=n(94079),L=n(80147),D=n(87685),Z=n(22385),M=n(79692);const B=(0,M.Z)({header:{display:"flex",flexDirection:"row",alignItems:"center",padding:"16px 12px",borderBottom:"1px solid rgba(0, 0, 0, 0.12);"},closeButton:{marginRight:"12px"}}),z=e=>{let{title:t,className:n,onClose:r,children:l}=e;const a=B();return o().createElement("div",{className:n},o().createElement("div",{className:a.header},o().createElement(Z.Z,{className:a.closeButton,icon:D.default,onClick:r}),t),l)};var F=n(99144),H=n(17440),$=n(31276),A=n(83401);let W;!function(e){e.Crosswalk="crosswalks",e.Source="source",e.Contributor="contributor"}(W||(W={}));const q=e=>(0,H.pipe)((0,H.map)((0,H.prop)("value")),H.sum)(e);function G(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){_(e,t,n[t])}))}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const V=e=>{let{data:t,width:n,height:o}=e;return(0,r.useMemo)((()=>{if(!n||!o)return{nodes:[],links:[]};const e=function(){let e=24,t=15,n=10,r=8,o=[1,1];function l(l){let{nodes:i,links:s}=l;const c={nodes:i,links:s};return function(e){let{nodes:t,links:n}=e;t.forEach((e=>{e.sourceLinks=[],e.targetLinks=[]})),n.forEach((e=>{e.source.sourceLinks.push(e),e.target.targetLinks.push(e)}))}(c),function(e){let{nodes:t}=e;t.forEach((e=>{e.value=Math.max(q(e.sourceLinks),q(e.targetLinks))}))}(c),function(t){let{nodes:n}=t;if(!n.length)return;let r,l=[n[0]],a=0;for(;l.length;)r=[],l.forEach((t=>{t.x=a,t.dx=e,t.targetLinks.forEach((e=>{r.indexOf(e.source)<0&&r.push(e.source)}))})),l=r,++a;if(n.forEach((e=>{e.x=a-1-e.x})),a>2){const t=(o[0]-2*e-22)/(a-2);n.forEach((n=>{n.sourceLinks&&0!=n.sourceLinks.length?n.x*=t:n.x=o[0]-e}))}else n[0].x=o[0]-e,n[1].x=n[0].x-22-e}(c),function(e){let{nodes:l,links:a}=e;const i=(0,H.pipe)((0,H.groupBy)((0,H.prop)("x")),H.toPairs,(0,H.sort)(((e,t)=>e[0]-t[0])),(0,H.map)((0,H.nth)(1)))(l);(function(){let e=(0,H.pipe)((0,H.map)((e=>(o[1]-(e.length-1)*r)/q(e))),(0,H.reduce)(Math.min,1/0))(i);const s=(0,H.pipe)((0,H.map)((e=>{var t;return e.value/((null===(t=e.targetLinks)||void 0===t?void 0:t.length)||1)})),(0,H.reduce)(Math.min,1/0))(l);e=Math.max(Math.min(e,t/s),n/s),i.forEach((t=>{t.forEach(((t,n)=>{t.y=n,t.dy=t.value*e}))})),a.forEach((t=>{t.dy=t.value*e}))})(),i.forEach((e=>{let t,n,l,a=0;const i=e.length;for(e.sort(((e,t)=>e.y-t.y)),l=0;l<i;++l)t=e[l],n=a-t.y,n>0&&(t.y+=n),a=t.y+t.dy+r;if(n=a-r-o[1],n>0)for(a=t.y-=n,l=i-2;l>=0;--l)t=e[l],n=t.y+t.dy+r-a,n>0&&(t.y-=n),a=t.y}));const s=(0,H.pipe)((0,H.map)((e=>(e.length-1)*r+(0,H.sum)((0,H.map)((e=>e.dy),e)))),(0,H.reduce)(Math.max,0))(i),c=(o[1]-s)/2;i.forEach((e=>{const{y:t,dy:n}=(0,H.last)(e),r=o[1]-(t+n);e.forEach((e=>{e.y+=r,c>0&&(e.y-=c)}))}))}(c),a(c),function(e){let{nodes:t}=e;(0,H.pipe)((0,H.groupBy)((0,H.prop)("x")),H.toPairs,(0,H.sort)(((e,t)=>t[0]-e[0])),(0,H.map)((0,H.nth)(1)))(t).forEach((e=>{(e=e.concat().sort(((e,t)=>e.y-t.y))).forEach(((t,n)=>{var o;if(null!==(o=t.sourceLinks)&&void 0!==o&&o.length){var l,a,i;const{target:o,ty:s,dy:c}=(0,H.last)(t.sourceLinks);let u=o.y+s+c-t.dy;(null===(l=e[n-1])||void 0===l?void 0:l.x)==t.x&&u<(null===(a=e[n-1])||void 0===a?void 0:a.y)+(null===(i=e[n-1])||void 0===i?void 0:i.dy)+r&&(u=e[n-1].y+e[n-1].dy+r),t.y>u&&(t.y=u)}}))}))}(c),c}function a(e){let{nodes:t}=e;(0,H.pipe)((0,H.groupBy)((0,H.prop)("x")),H.toPairs,(0,H.sort)(((e,t)=>e[0]-t[0])),(0,H.map)((0,H.nth)(1)))(t).forEach((e=>{e.forEach((e=>{var t,n;if(null!==(t=e.targetLinks)&&void 0!==t&&t.length){const t=[],n=e.targetLinks.map((e=>e.crosswalk.uuid)),r=[];e.targetLinks.forEach((function(e){-1==this.indexOf(e.source)&&this.push(e.source)}),r);for(let o=0;o<r.length;o++)for(let l=0;l<r[o].sourceLinks.length;l++){const a=n.indexOf(r[o].sourceLinks[l].crosswalk.uuid);-1!=a&&t.push(e.targetLinks[a])}e.targetLinks=t}if(null!==(n=e.sourceLinks)&&void 0!==n&&n.length){var r;const t=[];if(null!==(r=e.targetLinks)&&void 0!==r&&r.length){const n=e.sourceLinks.map((e=>e.crosswalk.uuid));for(let r=0;r<e.targetLinks.length;r++){const o=n.indexOf(e.targetLinks[r].crosswalk.uuid);-1!=o&&t.push(e.sourceLinks[o])}}const n=t.map((e=>e.crosswalk.uuid)),o=e.sourceLinks.filter((function(e){return-1==this.indexOf(e.crosswalk.uuid)}),n);if(e.sourceLinks=o.concat(t),t.length>0){let t=0;for(let e=0;e<o.length;e++)t+=o[e].dy;e.sizeForNewSources=t}}}))})),t.forEach((e=>{let t=0,n=e.sizeForNewSources||0;delete e.sizeForNewSources,e.sourceLinks.forEach((e=>{e.sy=t,t+=e.dy})),e.targetLinks.forEach((e=>{e.ty=n,n+=e.dy}))}))}return l.nodeWidth=()=>e,l.setNodeWidth=t=>(e=+t,l),l.nodePadding=()=>r,l.setNodePadding=e=>(r=+e,l),l.smallestNodeMaxHeight=()=>t,l.setSmallestNodeMaxHeight=e=>(t=+e,l),l.smallestNodeMinHeight=()=>n,l.setSmallestNodeMinHeight=e=>(n=+e,l),l.size=()=>o,l.setSize=e=>(o=e,l),l.update=e=>(a(e),e),l.link=()=>{let t=.5;function n(n){const r=!n.target.sourceLinks||0==n.target.sourceLinks.length,o=n.source.x+n.source.dx,l=n.target.x,a=(d=+(d=o),p=+(p=l),e=>d*(1-e)+p*e),i=a(t),s=a(1-t),c=n.source.y+n.sy-.13,u=n.target.y+n.ty-.13;var d,p;const m=r?"":`L${l+e},${u} L${l+e},${u+n.dy+.26}`;return c===u?`M${o},${c} \n L${l},${u}${m} \n L${l},${u+n.dy+.26} \n L${o},${c+n.dy+.26} Z`:`M${o},${c}\n C${i},${c} ${s},${u} ${l},${u}${m} \n L${l},${u+n.dy+.26} \n C${s},${u+n.dy+.26} ${i},${c+n.dy+.26} \n ${o},${c+n.dy+.26} Z`}return n.curvature=function(e){return arguments.length?(t=+e,n):t},n},l}().setNodeWidth(14).setNodePadding(20).setSize([o-2,n-2]),r=e.nodeWidth(),l=e.link(),a=(e=>{const t=e.nodes.map((e=>G({},e))),n=n=>{const r=e.nodes.indexOf(n);return t[r]},r=e.links.map((e=>G({},e,{source:n(e.source),target:n(e.target)})));return{nodes:t,links:r}})(t),{nodes:i,links:s}=e(a);return{nodes:i,links:s,nodeWidth:r,path:l}}),[t,o,n])};var X=n(94111),Y=n(12147),Q=n(98685);const K=(0,M.Z)({tooltipTitle:{fontWeight:500,fontSize:"16px",lineHeight:"24px",letterSpacing:"0.15px",marginBottom:"8px",userSelect:"none"},tooltipRow:{display:"flex",alignItems:"center",fontSize:"13px",lineHeight:"15px",fontWeight:"normal","&:not(:last-child)":{marginBottom:"4px"}},tooltipIcon:{fontSize:"18px",color:"rgba(0, 0, 0, 0.54)",marginRight:"8px"},node:{stroke:"#000000",strokeWidth:1,strokeOpacity:.38},rootNode:{transform:"rotate(90deg)",userSelect:"none",fontSize:"13px"}}),J=e=>{let{user:t,time:n,children:r}=e;const l=K(),a=o().createElement("div",null,o().createElement("span",{className:l.tooltipTitle},m().text("Merge details")),o().createElement("div",{className:l.tooltipRow},o().createElement(Y.Z,{className:l.tooltipIcon}),m().date(n,"L LTS")),o().createElement("div",{className:l.tooltipRow},o().createElement(Q.Z,{className:l.tooltipIcon}),t));return o().createElement(X.Z,{title:a,placement:"top"},r)},ee=e=>{let{node:t,nodeWidth:n,highlightEnabled:l,isColored:a}=e;const i=K(),[s,c]=(0,r.useState)(0),u=(0,r.useRef)(null),{x:d,y:p,name:m,label:h,targetLinks:f,sourceLinks:g,entity:{crosswalks:b=[],merges:y}}=t,[v]=b,{isDimmed:x,highlightCrosswalk:E,removeHighlight:k}=(0,O.pu)(v),w=(0,O.nX)(v),C=null!=b&&b.length?g[b.length-1].sy+g[b.length-1].dy:0;return(0,r.useEffect)((()=>{var e;const n=t.dy,r=(null==u||null===(e=u.current)||void 0===e?void 0:e.clientWidth)||0;n<r&&c(n/2-r/2)}),[]),o().createElement("g",{transform:`translate(${d},${p})`},"ROOT"===m?o().createElement("text",{dy:-5,dx:s,ref:u,className:i.rootNode},h||""):o().createElement(o().Fragment,null,o().createElement("rect",{height:C,width:14,className:i.node,fill:a?w:"#F0F0F0",key:"node-main",filter:l&&x?"url(#saturation)":null,opacity:l&&x?.19:1,onMouseEnter:()=>{l&&E()},onMouseLeave:()=>{l&&k()}}),!(null==f||!f.length)&&(()=>{const e=(0,H.pipe)((0,H.map)((0,H.prop)("source")),(0,H.groupBy)((0,H.prop)("time")))(f);return null==y?void 0:y.map(((t,r)=>{let{time:a,user:s}=t;const c=e[a];if(!c)return;const[u,d]=c.reduce(((e,t)=>{let{sourceLinks:n}=t;return[(0,H.min)((0,H.head)(n).ty,e[0]),(0,H.max)((0,H.last)(n).ty+(0,H.last)(n).dy,e[1])]}),[1/0,0]);return o().createElement(J,{user:s,time:a,key:"node-"+r},o().createElement("rect",{transform:`translate(0,${u})`,height:d-u,width:n,className:i.node,fillOpacity:.54,fill:"#F0F0F0",opacity:l&&x?.38:1}))}))})()))},te=e=>{let{link:t,path:n,highlightEnabled:r,isColored:l}=e;const{crosswalk:a}=t,i=(0,O.nX)(a),{isDimmed:s,highlightCrosswalk:c,removeHighlight:u}=(0,O.pu)(a);return o().createElement("path",{d:n,fill:l?i:"#F0F0F0",filter:r&&s?"url(#saturation)":null,opacity:r&&s?.19:1,onMouseEnter:()=>{r&&c()},onMouseLeave:()=>{r&&u()}})},ne=e=>{let{width:t,height:n,data:l,accentContributors:a}=e;const[i,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(0),[d,p]=(0,r.useState)(0),{links:m,nodes:h,nodeWidth:f,path:g}=V({data:l,width:t,height:n});(0,r.useEffect)((()=>{p(0),u(0)}),[t,n]);const b=(0,r.useMemo)((()=>h.map(((e,t)=>o().createElement(ee,{highlightEnabled:a,isColored:a,node:e,nodeWidth:f,key:`SankeyNode-${t}`})))),[h,a,f,t,n]),y=(0,r.useMemo)((()=>m.map(((e,t)=>o().createElement(te,{highlightEnabled:!a,isColored:!a,link:e,path:g(e),key:`SankeyLink-${t}`})))),[a,m,g]),v=e=>{const t=e.pageX,n=t-c;return u(t),n},x=()=>s(!1),E=i?"none":"auto",k=i?"move":"default";return o().createElement("svg",{width:t,height:n,cursor:k,onPointerDown:e=>{e.preventDefault(),s(!0),v(e)},onPointerMove:e=>{if(!i)return;const t=v(e);p(d+t)},onPointerUp:x,onPointerLeave:x},o().createElement("filter",{id:"saturation",filterUnits:"objectBoundingBox"},o().createElement("feColorMatrix",{id:"saturate",type:"saturate",values:"0.2"})),o().createElement("g",{transform:`translate(${d},${n-1}) rotate(-90)`,pointerEvents:E},o().createElement("g",null,y),o().createElement("g",null,b)))};function re(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=(0,H.curry)(((e,t)=>!e||e.some((0,f.aFF)(t)))),le=(0,H.curry)(((e,t)=>(0,H.evolve)({crosswalks:(0,H.filter)(oe(e)),merges:(0,H.map)((0,H.evolve)({losers:(0,H.map)(le(e))}))},t))),ae=e=>{let t=1;const n=(0,H.pipe)((0,H.evolve)({crosswalks:(0,H.map)((e=>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){re(e,t,n[t])}))}return e}({},e,{uuid:t++})))}),(0,H.evolve)({merges:(0,H.map)((0,H.evolve)({losers:(0,H.map)((e=>n(e)))}))}));return n(e)},ie=e=>{const t=[],n=[],r=(e,o,l)=>{const{crosswalks:a=[],merges:i=[],uri:s="",label:c}=e;t.push({entity:e,name:s,time:l,label:c});const u=t.length-1,d=(0,H.pipe)((0,H.chain)((e=>{let{losers:t,time:n}=e;return(0,H.pipe)((0,H.filter)((e=>{var t,n;return(null===(t=e.crosswalks)||void 0===t?void 0:t.length)||(null===(n=e.merges)||void 0===n?void 0:n.length)})),(0,H.chain)((e=>r(e,u,n))))(t)})),(0,H.concat)(a))(i);return-1!=o&&d.forEach((e=>n.push({source:t[u],target:t[o],value:10,crosswalk:e}))),d};r(e,-1,Date.now());const o=(0,H.pipe)((0,H.chain)((e=>{let{source:t,target:n}=e;return[t,n]})),H.uniq)(n);return{nodes:t.filter((e=>o.includes(e))),links:n}},se=(0,M.Z)((()=>({graph:{padding:"8px 0px",boxSizing:"border-box",height:"100%",width:"100%"}}))),ce=(0,r.memo)((e=>{let{crosswalkTree:t,entityLabel:n,visibleCrosswalks:r,accentContributors:l}=e;const a=se(),i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return(0,H.pipe)(le(n),ae,ie)({uri:"ROOT",label:t,crosswalks:[],merges:[{time:Date.now(),losers:[e]}]})}(t,n,r);return o().createElement("div",{className:a.graph},o().createElement(s.Z,{refreshMode:"debounce",refreshRate:100,handleWidth:!0,handleHeight:!0},(e=>{let{width:t=0,height:n=200}=e;return o().createElement(ne,{width:t,height:n,data:i,accentContributors:l})})))}));var ue=n(90186),de=n(77243);function pe(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){me(e,t,n[t])}))}return e}function me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var he=n(52017),fe=n(79769),ge=n(71153),be=n.n(ge),ye=n(65549);function ve(){return ve=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},ve.apply(this,arguments)}const xe=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(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)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",ve({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),o().createElement("defs",null,o().createElement("path",{d:"M17 13.138l4.5 4.5-4.5 4.5V18.5h-1.247l-3.488-3.479 1.413-1.414 2.901 2.893H17v-3.362zM17 1.5L21.5 6 17 10.5V7.138h-.421l-11.03 11H2v-2h2.723l11.03-11H17V1.5zm-11.45 4l3.294 3.286-1.414 1.413L4.723 7.5H2v-2h3.55z",id:"svg1833706754a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("mask",{id:"svg1833706754b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg1833706754a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg1833706754b)",d:"M0 0h24v24H0z"})))};var Ee=n(22983),ke=n(72753),we=n(8818),Ce=n(51229);const Se=(0,M.Z)((e=>({root:{display:"flex",alignItems:"center",paddingRight:"8px","& button + button":{marginLeft:"4px"}},focusedIcon:e=>{let{isFocused:t}=e;return{width:28,height:28,color:t?"#000":"rgba(0, 0, 0, 0.54)",borderRadius:0}},title:{color:e.palette.text.secondary,paddingLeft:"6px",paddingRight:"2px"},uri:{lineHeight:"15px",color:e.palette.text.primary}})));function Oe(){return Oe=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},Oe.apply(this,arguments)}const Pe=e=>{let{contributorUri:t,focusable:n,contributorActions:r,onToggleFocus:l,isFocused:a}=e;const i=Se({isFocused:a});return o().createElement("div",{className:i.root},o().createElement(we.k,{size:"XXS",onClick:()=>l(),className:i.focusedIcon,icon:n&&ke.Z,disabled:!n,tooltipTitle:n&&m().text("Focus")}),o().createElement(U.Typography,{variant:"body2",className:i.uri},o().createElement("span",{className:i.title},m().text("Entity ID:")),(0,f.nIW)(t)),o().createElement(Ce.Z,null),r.map(((e,t)=>{let{show:n}=e,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(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)&&(o[n]=e[n])}return o}(e,["show"]);return n&&o().createElement(we.k,Oe({key:t,size:"XS",showForDisabled:!0},r))})))},Te=(0,M.Z)((()=>({root:e=>{let{contributorColor:t}=e;return{fontSize:"13px",position:"relative",display:"flex",flexDirection:"column",alignItems:"stretch",border:"1px solid rgba(0, 0, 0, 0.05)",paddingLeft:"8px","&:before":{content:'" "',borderLeft:`8px solid ${t}`,position:"absolute",top:-1,left:0,bottom:-1},"& > div + div":{marginTop:"1px"}}},editor:{padding:"0px 30px 0px 25px"}}))),Re=e=>{let{className:t,contributorUri:n,accentContributor:a,crosswalksBySources:i,expandedSources:s,canUnmerge:c,disableAddCrosswalk:u,disableEditCrosswalk:d,disableDeleteCrosswalk:p,disableUnmergeContributor:g,onUnmerge:b,onEdit:y,onDelete:v,onAdd:x,onToggleSourceExpanded:E,onUnsubscribeContributor:k}=e;const w=a?(0,f.GtP)(n):"rgba(0, 0, 0, 0.38)",C=Te({contributorColor:w}),S=(0,l.useSelector)(h.ZP.selectors.getDataTenants),P=(0,r.useRef)(null),[T]=(0,O.RT)();(0,r.useEffect)((()=>{var e;a&&T&&((0,H.pipe)((0,H.find)((e=>{let{source:t}=e;return t===T.type})),(0,H.propOr)({},"crosswalksByTypes"),H.values,H.flatten)(i).some((e=>(0,f.aFF)(T,e)&&e!==T))&&(null==P||null===(e=P.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})))}),[T]);const[R,N]=(0,r.useState)(!1),I=(0,H.pipe)((0,H.pluck)("crosswalksByTypes"),(0,H.find)((e=>e[de.Y.Simple].length||e[de.Y.Empty].length)),(0,H.props)([de.Y.Simple,de.Y.Empty]),H.flatten,H.head)(i),{toggleCrosswalkFocus:j,isFocused:U}=(0,O.BF)(I),L=(0,H.pipe)((0,H.pluck)("crosswalksByTypes"),(0,H.chain)(H.values),H.flatten)(i),D=(0,f.KMQ)(L,S),Z=[{icon:ye.Z,tooltipTitle:m().text("Add crosswalk"),onClick:()=>N(!0),disabled:u,show:!!I},{icon:xe,tooltipTitle:m().text("Unmerge"),onClick:()=>b(),disabled:g,show:c},{icon:Ee.Z,tooltipTitle:m().text("Unsubscribe"),onClick:()=>k({contributorUri:n,dataTenant:D,crosswalk:I}),disabled:g,show:c&&!!D}];return o().createElement("div",{ref:P,className:be()(C.root,t)},o().createElement(Pe,{contributorUri:n,focusable:a&&!!I,isFocused:a&&U,onToggleFocus:j,contributorActions:Z}),i.map((e=>{let{source:t,crosswalksByTypes:n}=e;return o().createElement(he.Z,{key:t,source:t,crosswalksByTypes:n,showCrosswalkColors:!a,crosswalksFocusEnabled:!a,expanded:null==s?void 0:s.includes(t),disableEditCrosswalk:d,disableDeleteCrosswalk:p,onEdit:y,onDelete:v,onToggleExpanded:()=>E(t)})})),R&&o().createElement(fe.Z,{className:C.editor,onAdd:e=>x({contributorCrosswalk:I,crosswalk:e}),onClose:()=>N(!1)}))},Ne=(0,M.Z)((()=>({table:{overflowY:"auto",overflowX:"hidden",paddingLeft:"16px",paddingRight:"6px"},tableRow:{"& + &":{marginTop:"10px"},margin:"auto",maxWidth:"448px"}})));function Ie(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){je(e,t,n[t])}))}return e}function je(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ue=(0,r.memo)((e=>{let{accentContributors:t,entity:n,contributors:a,selectedAttributeTypes:i,onChangeVisibleCrosswalks:s,readOnly:c,canUnmerge:u,onAddCrosswalk:d=$.ZT,onEditCrosswalk:p=$.ZT,onDeleteCrosswalk:m=$.ZT,onUnmergeContributor:g=$.ZT,onUnsubscribeContributor:b=$.ZT}=e;const y=(0,l.useSelector)(h.ZP.selectors.getMetadata),v=(0,f.nt9)(y,n.type),x=Ne(),E=(0,r.useMemo)((()=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=e.crosswalks,o=(0,f.PUO)(e);return t.filter((e=>!(0,f.O27)(e.crosswalks))).map((t=>{let{uri:l,crosswalks:a}=t;return{contributorUri:l,crosswalksBySources:(0,H.pipe)((0,H.map)((e=>{if("relation"===e.ownerType){const t=o.find((0,f.aFF)(e));return t&&pe({ownerType:"relation"},t)}{const t=r.find((0,f.aFF)(e));return t&&pe({ownerType:"entity"},t)}})),(0,H.filter)((e=>!!e)),(0,ue.o)(e.type,n))(a)}})).filter((e=>{let{crosswalksBySources:t}=e;return t.length>0}))}(n,a,i)),[n,a,i]),[k,w]=(0,r.useState)({}),C=(0,r.useMemo)((()=>((e,t)=>e.reduce(((e,n)=>{let{contributorUri:r,crosswalksBySources:o}=n;const l=(0,H.chain)((e=>{var n;let{source:o,crosswalksByTypes:l}=e;const a=null===(n=t[r])||void 0===n?void 0:n.includes(o);return l[de.Y.Simple].concat(l[de.Y.Empty]).concat(a?l[de.Y.Dependent]:[])}),o);return e.concat(l)}),[]))(E,k)),[E,k]);(0,r.useEffect)((()=>{s(C)}),[C]);const S=(0,r.useCallback)((e=>{m({entityUri:null==n?void 0:n.uri,crosswalkId:e})}),[null==n?void 0:n.uri,m]),O=(0,r.useCallback)((e=>{p(Ie({},e,{entityUri:null==n?void 0:n.uri}))}),[null==n?void 0:n.uri,p]);return o().createElement("div",{className:x.table},E.map((e=>{let{contributorUri:r,crosswalksBySources:l}=e;return o().createElement(Re,{key:r,className:x.tableRow,canUnmerge:u,contributorUri:r,accentContributor:t,crosswalksBySources:l,disableAddCrosswalk:c||!(0,f.mkC)(v),disableEditCrosswalk:c||!(0,f.Zm0)(v),disableDeleteCrosswalk:c||!(0,f.a14)(v),disableUnmergeContributor:c||!(0,f.uGe)(f.BDP.UNMERGE,v),onAdd:e=>d(Ie({},e,{entity:n})),onDelete:S,onEdit:O,onUnmerge:()=>g(r),onUnsubscribeContributor:b,expandedSources:k[r],onToggleSourceExpanded:e=>{w((0,H.pipe)((0,H.unless)((0,H.has)(r),(0,H.assoc)(r,[])),(0,H.evolve)({[r]:(0,H.ifElse)((0,H.includes)(e),(0,H.without)([e]),(0,H.append)(e))})))}})})))}));var Le=n(81556);const De=(0,M.Z)((e=>({container:{display:"flex",flexDirection:"column","& + &":{marginLeft:"16px"}},title:{fontSize:"13px",lineHeight:"15px",color:"#666666",marginBottom:"7px"},hintIcon:{width:"16px",height:"16px",verticalAlign:"middle"},graph:{width:"400px",height:"300px",borderRadius:"8px",background:"rgba(0, 0, 0, 0.03)",border:"1px solid rgba(0, 0, 0, 0.03)",position:"relative"},checkedIcon:{position:"absolute",height:"20px",width:"20px",right:"10px",top:"10px",color:e.palette.primary.main},selectedTree:{border:`1px solid ${e.palette.primary.main}`,background:"rgba(0, 114, 206, 0.05)"}}))),Ze=e=>{let{coloredCrosswalks:t,crosswalkTree:n,selected:l,title:a,onSelect:i=$.ZT}=e;const s=De(),c=(0,r.useCallback)((e=>t.includes(e.uri)?(0,f.CJp)((0,f.uKF)(e)):"#CACCD1"),[t]);return o().createElement(O.hR,{getCrosswalkColor:c},o().createElement("div",{className:s.container,onClick:i},o().createElement("span",{className:s.title},a," ",o().createElement(F.Z,{className:s.hintIcon})),o().createElement("div",{className:be()(s.graph,{[`${s.selectedTree}`]:l})},l&&o().createElement(Le.Z,{className:s.checkedIcon}),o().createElement(ce,{crosswalkTree:n}))))},Me=(0,M.Z)((e=>({dialogContainer:{maxWidth:"unset"},dialogTitle:{padding:"13px 16px 0 16px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px"},dialogContent:{display:"flex",flexDirection:"column",padding:"13px 16px 0 16px"},trees:{display:"flex"},uri:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.primary,marginBottom:"15px"},title:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.secondary,paddingRight:"2px"}}))),Be=e=>{let{canUnmerge:t,contributor:n,crosswalkTree:l,onClose:a,onUnmergeContributor:i}=e;const s=Me(),[c,u]=(0,r.useState)(f.MBD.Unmerge),d=(0,r.useCallback)((e=>(0,f.keo)(n,e).map((e=>{let{uri:t}=e;return t}))),[n]);return o().createElement(U.Dialog,{open:!0,onClose:a,classes:{paper:s.dialogContainer}},o().createElement(U.DialogTitle,{classes:{root:s.dialogTitle}},m().text("Unmerge")),o().createElement(U.DialogContent,{classes:{root:s.dialogContent}},o().createElement(U.Typography,{variant:"body2",className:s.uri},o().createElement("span",{className:s.title},m().text("Entity URI:")),(0,f.nIW)(n.uri).toUpperCase()),o().createElement("div",{className:s.trees},o().createElement(Ze,{onSelect:()=>u(f.MBD.Unmerge),selected:c===f.MBD.Unmerge,title:m().text("Unmerge"),crosswalkTree:l,coloredCrosswalks:d(!0)}),n.merges&&n.uri!==l.uri&&o().createElement(Ze,{onSelect:()=>u(f.MBD.TreeUnmerge),selected:c===f.MBD.TreeUnmerge,title:m().text("Tree unmerge"),crosswalkTree:l,coloredCrosswalks:d(!1)}))),o().createElement(U.DialogActions,null,o().createElement(U.Button,{onClick:a},m().text("Cancel")),o().createElement(U.Button,{disabled:!t,onClick:()=>{i(c),a()},color:"primary"},m().text("Unmerge"))))},ze=(0,M.Z)((e=>({dialogContainer:{maxWidth:"unset"},dialogTitle:{padding:"13px 16px 0 16px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px"},dialogContent:{display:"flex",flexDirection:"column",padding:"13px 16px 0 16px"},uri:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.primary,marginBottom:"15px"},title:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.secondary,paddingRight:"2px"}}))),Fe=e=>{let{canUnsubscribe:t,contributor:n,crosswalkTree:l,onClose:a,onUnsubscribeContributor:i}=e;const s=ze(),c=(0,r.useMemo)((()=>(0,f.keo)(n,!0).map((e=>{let{uri:t}=e;return t}))),[n]);return o().createElement(U.Dialog,{open:!0,onClose:a,classes:{paper:s.dialogContainer}},o().createElement(U.DialogTitle,{classes:{root:s.dialogTitle}},m().text("Unsubscribe")),o().createElement(U.DialogContent,{classes:{root:s.dialogContent}},o().createElement(U.Typography,{variant:"body2",className:s.uri},o().createElement("span",{className:s.title},m().text("Entity URI:")),(0,f.nIW)(n.uri).toUpperCase()),o().createElement(Ze,{selected:!0,title:m().text("Unsubscribe"),crosswalkTree:l,coloredCrosswalks:c})),o().createElement(U.DialogActions,null,o().createElement(U.Button,{onClick:a},m().text("Cancel")),o().createElement(U.Button,{disabled:!t,onClick:()=>{i(),a()},color:"primary"},m().text("Unsubscribe"))))},He=(0,M.Z)((e=>({root:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%"},modeSwitcher:{backgroundColor:e.palette.background.paper,marginTop:"8px"},infoIcon:{fontSize:"18px",marginRight:"8px"},hint:{color:e.palette.text.secondary,display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"flex-start",margin:"5px 12px 10px 12px"},hintText:{fontSize:"12px",lineHeight:"16px"},crosswalksList:{height:"100%",width:"calc(100% - 24px)",margin:"8px 12px",background:e.palette.divider,opacity:.2},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"},resizablePanesWrapper:{flexGrow:1,width:"100%"}})));function $e(){return $e=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},$e.apply(this,arguments)}const Ae=(0,r.memo)((e=>{let{activeMode:t,contributors:n,crosswalkTree:l,entity:a,onChangeMode:i,onUnmergeContributor:s=$.ZT,onUnsubscribeContributor:c=$.ZT}=e,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(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)&&(o[n]=e[n])}return o}(e,["activeMode","contributors","crosswalkTree","entity","onChangeMode","onUnmergeContributor","onUnsubscribeContributor"]);const d=He(),p=(0,r.useRef)(),[h,g]=(0,r.useState)(170),b=(0,r.useCallback)((e=>{let{percentageSize:t}=e;return g(t)}),[]),[y,v]=(0,r.useState)(),[x,E]=(0,r.useState)(),k=(0,r.useMemo)((()=>(0,f.Qbq)(l)),[l]),w=k>1;(0,r.useEffect)((()=>{var e;const t=Math.max(170,60*k),n=(null===(e=p.current)||void 0===e?void 0:e.clientHeight)-170;g(Math.min(n,t))}),[k]);const C=(0,r.useMemo)((()=>[{id:W.Crosswalk,title:m().text("Crosswalk")},{id:W.Source,title:m().text("Source")},{id:W.Contributor,title:m().text("Contributor")}]),[]),[S,O]=(0,r.useState)(),P=t===W.Contributor;return o().createElement("div",{className:d.root,ref:p},y&&o().createElement(Be,{canUnmerge:w,onClose:()=>v(null),onUnmergeContributor:e=>{s({entityUri:a.uri,contributorUri:y,operationType:e})},crosswalkTree:l,contributor:n.find((e=>{let{uri:t}=e;return t===y}))}),x&&o().createElement(Fe,{canUnsubscribe:w,onClose:()=>E(null),onUnsubscribeContributor:()=>c({dataTenant:x.dataTenant,crosswalk:x.crosswalk}),crosswalkTree:l,contributor:n.find((e=>{let{uri:t}=e;return t===x.contributorUri}))}),o().createElement(A.Z,{modes:C,modeId:t,className:d.modeSwitcher,onChange:i}),o().createElement(T.Z,{className:d.resizablePanesWrapper,orientation:"horizontal",size:h,minSize:170,maxSize:-170,allowResize:!0,onChange:b},o().createElement("div",{className:d.pane},l&&!(0,H.isEmpty)(S)&&o().createElement(ce,{entityLabel:(0,f.idV)(null==a?void 0:a.label),crosswalkTree:l,visibleCrosswalks:S,accentContributors:P})),o().createElement("div",{className:d.pane},o().createElement("div",{className:d.hint},o().createElement(F.Z,{className:d.infoIcon}),o().createElement("span",{className:d.hintText},m().text("You can drag a crosswalk to add values to attributes swimlanes"))),a&&o().createElement(Ue,$e({onUnmergeContributor:v,onUnsubscribeContributor:E,accentContributors:P,contributors:n,entity:a,onChangeVisibleCrosswalks:O,canUnmerge:w},u)))))}));var We=n(85229);function qe(){return qe=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},qe.apply(this,arguments)}const Ge=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(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)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",qe({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("mask",{id:"svg4041339336a",masktype:"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"3",width:"19",height:"17"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S4.83 6.5 4 6.5 2.5 5.83 2.5 5zM21 20H8v-2h13v2zM8 10h13V8H8v2zm0-4V4h13v2H8zm0 10h13v-2H8v2zm-2.5.5v-3h-3v3h3z",fill:"#fff"})),o().createElement("g",{mask:"url(#svg4041339336a)"},o().createElement("path",{fillOpacity:".54",fill:"#000",d:"M0 0h24v24H0z"})))},_e=e=>{console.error(e),d.Z.addError({title:m().text("Error"),message:(0,f.xU7)(e,m().text("Something went wrong"))})};var Ve=n(39417),Xe=n(58651),Ye=n(13896);function Qe(){return Qe=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},Qe.apply(this,arguments)}const Ke=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(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)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",Qe({width:"90",height:"90",viewBox:"0 0 90 90",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("circle",{cx:"45",cy:"45",r:"45",fill:"#0072CE",fillOpacity:".1"}),o().createElement("mask",{id:"svg985456408a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"90",height:"90"},o().createElement("circle",{cx:"45",cy:"45",r:"45",fill:"#fff"})),o().createElement("g",{mask:"url(#svg985456408a)"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-5.625 3.164h90V90h-90V3.164z",fill:"url(#paint0_linear)"}),o().createElement("path",{opacity:".05",fillRule:"evenodd",clipRule:"evenodd",d:"M66.01 19.992l20.615 20.615v52.337H32.83L18.281 79.131V19.99H66.01z",fill:"url(#paint1_linear)"}),o().createElement("path",{opacity:".06",fillRule:"evenodd",clipRule:"evenodd",d:"M16.523 20.39H87.54A2.46 2.46 0 0190 22.853v55.195a2.46 2.46 0 01-2.46 2.46H16.522a2.46 2.46 0 01-2.46-2.46V22.852a2.46 2.46 0 012.46-2.461z",fill:"#000"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.578 19.688h70.664c.971 0 1.758.787 1.758 1.757v55.196c0 .97-.787 1.757-1.758 1.757H17.578c-.97 0-1.758-.787-1.758-1.757V21.445c0-.97.787-1.758 1.758-1.758z",fill:"#fff"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 25.536c0-.583.472-1.055 1.055-1.055h14.633a1.055 1.055 0 110 2.11H38.101a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 29.754c0-.582.472-1.054 1.055-1.054H60.54a1.055 1.055 0 110 2.11H37.969a1.055 1.055 0 01-1.055-1.056z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 57.305c0-.583.472-1.055 1.055-1.055h14.633a1.055 1.055 0 110 2.11H38.101a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 61.523c0-.582.472-1.054 1.055-1.054H60.54a1.055 1.055 0 110 2.11H37.969a1.055 1.055 0 01-1.055-1.056z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 67.852c0-.583.472-1.055 1.055-1.055h28.696a1.055 1.055 0 110 2.11H38.1a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 72.07c0-.582.472-1.054 1.055-1.054h26.087a1.055 1.055 0 110 2.109H37.97a1.055 1.055 0 01-1.055-1.055z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M48.648 36.21c0-.582.472-1.054 1.054-1.054h28.696a1.055 1.055 0 110 2.11H49.702a1.055 1.055 0 01-1.054-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M48.516 40.43c0-.583.472-1.055 1.054-1.055h22.572a1.055 1.055 0 110 2.11H49.57a1.055 1.055 0 01-1.054-1.055z",fill:"#979797"}),o().createElement("circle",{cx:"23.555",cy:"27.773",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"27.773",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"42.188",cy:"37.266",r:"2.109",fill:"#B6C7DB"}),o().createElement("circle",{cx:"42.188",cy:"47.813",r:"2.109",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"59.414",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"69.961",r:"3.164",fill:"#B6C7DB"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M48.648 46.758c0-.583.472-1.055 1.054-1.055h28.696a1.055 1.055 0 110 2.11H49.702a1.055 1.055 0 01-1.054-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M48.516 50.977c0-.583.472-1.055 1.054-1.055h26.088a1.055 1.055 0 110 2.11H49.57a1.055 1.055 0 01-1.054-1.055z",fill:"#979797"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M32.524 37.969v-2.813h-.703v14.191h3.93v-.703h-3.227v-9.972h3.227v-.703h-3.227z",fill:"#2B98F0"}),o().createElement("path",{opacity:".54",fillRule:"evenodd",clipRule:"evenodd",d:"M33.423 27.07l-1.242 1.243-1.243-1.243h2.485z",fill:"#000"}),o().createElement("path",{opacity:".6",fillRule:"evenodd",clipRule:"evenodd",d:"M17.578 7.734h65.39a2.11 2.11 0 012.11 2.11v6.328a2.11 2.11 0 01-2.11 2.11h-65.39a2.11 2.11 0 01-2.11-2.11V9.844a2.11 2.11 0 012.11-2.11z",fill:"#fff"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M20.39 13.008a2.11 2.11 0 012.11-2.11h24.61a2.11 2.11 0 110 4.22H22.5a2.11 2.11 0 01-2.11-2.11zM52.031 13.008a2.11 2.11 0 012.11-2.11h3.515a2.11 2.11 0 110 4.22h-3.515a2.11 2.11 0 01-2.11-2.11z",fill:"#979797"})),o().createElement("defs",null,o().createElement("linearGradient",{id:"paint0_linear",x1:"-5.625",y1:"3.164",x2:"-5.625",y2:"90",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:".01"}),o().createElement("stop",{offset:"1",stopColor:"#F4F4F4"})),o().createElement("linearGradient",{id:"paint1_linear",x1:"93.557",y1:"63.672",x2:"54.451",y2:"27.31",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:".01"}),o().createElement("stop",{offset:"1"}))))},Je=(0,M.Z)((e=>({root:{height:"100%",overflow:"hidden",background:e.palette.background.default,display:"flex",flexDirection:"column",alignItems:"center",paddingTop:"115px"},info:{color:e.palette.text.secondary,fontSize:"16px",lineHeight:"24px",marginTop:"16px"}}))),et=()=>{const e=Je();return o().createElement("div",{className:e.root},o().createElement(Ke,null),o().createElement("span",{className:e.info},m().text("Please persist your profile to be able to edit crosswalks")))};var tt=n(72383);const nt=(0,M.Z)({snackbarMessage:{display:"flex",alignItems:"center"},snackbarIcon:{paddingRight:16}}),rt=e=>{let{entity:t,message:n}=e;const a=nt(),i=(0,l.useSelector)(h.ZP.selectors.getUIPath),{generateEntityUrl:s}=(0,r.useContext)(tt.v),c=s({uiPath:i,uri:t.uri});return o().createElement("div",{className:a.snackbarMessage},o().createElement(F.Z,{className:a.snackbarIcon}),o().createElement(U.Typography,null,(0,f.idV)(t.label)," ",o().createElement(U.Link,{href:c,target:"_blank"},m().text("lookup profile"))," ",n))};var ot=n(24737);const lt=(0,M.Z)((e=>({root:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingTop:"14px",paddingBottom:"13px",borderBottom:"1px solid rgba(0, 0, 0, 0.05)",whiteSpace:"normal","&:last-child":{borderBottom:"none"}},label:{marginBottom:"2px",fontSize:"16px",lineHeight:"24px",color:e.palette.text.primary},description:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.secondary}})));function at(){return at=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},at.apply(this,arguments)}const it=e=>{let{innerRef:t,innerProps:n,data:r}=e;const l=lt(),{label:a,description:i}=r;return o().createElement(U.MenuItem,at({className:l.root,ref:t},n),o().createElement(U.Typography,{className:l.label},a),i&&o().createElement(U.Typography,{className:l.description},i))};function st(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ct=e=>{const{innerRef:t,getStyles:n,children:r}=e,l=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){st(e,t,n[t])}))}return e}({},n("menuList",e),{maxHeight:"500px",padding:0});return o().createElement("div",{ref:t,style:l},r)},ut=(0,M.Z)({root:{width:"280px"}});function dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const pt=e=>{let{survivorshipGroups:t,currentSurvivorshipGroupUri:n,onChange:r}=e;const l=ut(),a=t.map((e=>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){dt(e,t,n[t])}))}return e}({},e,{label:(0,f.idV)(e.label)}))),i=a.find((0,H.propEq)("uri",n));return o().createElement(ot.Z,{height:40,className:l.root,components:{Option:it,MenuList:ct},label:m().text("Rulesets"),options:a,value:i,onChange:(0,H.pipe)((0,H.prop)("uri"),r)})},mt=(0,M.Z)({sourcesView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowX:"hidden",overflowY:"auto",fontFamily:"Roboto, Helvetica, Arial, sans-serif",display:"flex"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},resizablePanesWrapper:{flexGrow:1,height:"100%"},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"},tabs:{marginLeft:"1px"},headerDivider:{marginLeft:"16px",marginRight:"8px",height:"32px",backgroundColor:"rgba(0, 0, 0, 0.12)"},attributesTable:{backgroundColor:"#fff"}});var ht;!function(e){e[e.Legend=0]="Legend",e[e.History=1]="History"}(ht||(ht={}));const ft=(0,l.connect)((e=>({entity:h.ZP.selectors.getEntity(e),metadata:h.ZP.selectors.getMetadata(e),historyEvent:h.ZP.selectors.getHistoryEvent(e)})))((e=>{var t,n;let{config:a,entity:i,metadata:s,getSavedState:c,saveState:u,dispatch:d,historyEvent:p}=e;const D=mt(),[Z,M]=(0,r.useState)(W.Crosswalk),[B,F]=(0,r.useState)(0),A=e=>F((t=>t===e?null:e)),q=null!==B,{survivorshipGroups:G,currentSurvivorshipGroupUri:_,onChangeSurvivorshipGroup:V,entity:X,isDefaultSurvivorshipGroupUri:Y,isLoading:Q}=(e=>{const t=null==e?void 0:e.type,n=(0,l.useSelector)(h.ZP.selectors.getMetadata),o=(0,H.pipe)((0,f.nt9)(n),(0,H.propOr)([],"survivorshipGroups"))(t),a=(0,H.pipe)((0,H.find)((0,H.propEq)("default",!0)),(0,H.prop)("uri"))(o),[i,s]=(0,r.useState)(null),[c,u]=(0,r.useState)(null),[d,p]=(0,r.useState)(!1),m=(0,We._)();return(0,r.useEffect)((()=>{e&&(u(e),s(a))}),[e,a]),{survivorshipGroups:o,currentSurvivorshipGroupUri:i,onChangeSurvivorshipGroup:(0,r.useCallback)((t=>{s(t),a===t?u(e):(p(!0),m((0,f.BXy)(c.uri,t)).then(u).finally((()=>p(!1))))}),[e,a,c,m]),entity:c,isLoading:d,isDefaultSurvivorshipGroupUri:a===i}})(i),K=B===ht.History,{isHistoryEnabled:J,isProfilePersisted:ee}=(0,g.C)({isHistoryTabActive:K,entity:X}),te=ee?X:null,ne=null==te?void 0:te.uri,re=(0,f.nt9)(s,null==X?void 0:X.type),{historySlice:oe}=(0,b.a)({entity:te,historyEvent:p}),[le,ae]=(0,r.useState)();(0,y.D)((()=>{ae(void 0)}),[oe]),(0,y.D)((()=>{ae(void 0)}),[ne]);const[ie,se]=(0,r.useState)(-480),ce=(0,r.useCallback)((e=>{let{percentageSize:t}=e;return se(t)}),[]),{SnackbarRenderer:ue,showSnackbarMessage:de}=(0,v.D)({anchorOrigin:{vertical:"top",horizontal:"center"},showDismiss:!0}),{isLoaded:pe,savedState:me}=(0,x.a)(c),[he,fe]=(0,r.useState)();(0,r.useEffect)((()=>{pe&&fe(me.visibleColumns)}),[pe]),(0,r.useEffect)((()=>{const e=!(0,H.equals)(he,me.visibleColumns);pe&&e&&u({visibleColumns:he})}),[he]);const{crosswalkTree:ge,reload:be}=(e=>{const[t,n]=(0,r.useState)(null),[o,l]=(0,r.useState)(!1),a=(0,We._)(),i=e=>{console.warn("Failed to load crosswalk tree",e),n(null)},s=(0,r.useCallback)((()=>{e?(l(!0),a((0,f.wo0)({entityUri:e})).then((e=>{n(e)})).catch(i).finally((()=>{l(!1)}))):n(null)}),[e]);return(0,r.useEffect)((()=>{s()}),[s]),{isLoading:o,crosswalkTree:t,reload:s}})((null==oe?void 0:oe.aEntity.uri)||ne),ye=(0,r.useMemo)((()=>(0,f.b7X)(ge)),[ge]),ve=(0,r.useCallback)((()=>{ne&&d(h.N5.entity.actions.loadEntity({viewId:a.id,uri:ne}))}),[ne,a,d]),xe=(0,r.useCallback)((0,H.pipe)(ve,be),[ve,be]),Ee=(0,r.useCallback)(((e,t)=>{de(t?o().createElement(rt,{entity:t,message:e}):e)}),[]),{modifiedEntity:ke,crosswalksMap:we,newlyCreatedAttributes:Ce,onDeleteAttribute:Se,onPinAttribute:Oe,onIgnoreAttribute:Pe,onEditAttribute:Te,onAddAttribute:Re}=(0,E.Q)({entity:(null==oe?void 0:oe.aEntity)||te,onModify:xe,onError:_e}),{addCrosswalk:Ne,deleteCrosswalk:Ie,editCrosswalk:je,unmergeContributor:Ue,unsubscribeContributor:Le}=(e=>{let{onLoad:t=$.ZT,onSuccess:n=$.ZT,onError:o=$.ZT,onShowMessage:a=$.ZT}=e;const{addCrosswalk:i,editCrosswalk:s,deleteCrosswalk:c}=(0,Ve.P)({onLoad:t,onSuccess:n,onError:o}),u=(0,l.useSelector)(h.ZP.selectors.getDtssPath),d=(0,l.useSelector)(h.ZP.selectors.getTenant),p=(0,r.useCallback)((e=>{t(),e.then((()=>{n()})).catch(o)}),[t,o,n]);return{addCrosswalk:i,editCrosswalk:s,deleteCrosswalk:c,unmergeContributor:(0,r.useCallback)((e=>(0,H.pipe)(f.L8n,(0,H.andThen)((e=>(a(m().text("has been unmerged"),e.b),e))),p)(e)),[p,a]),unsubscribeContributor:(0,r.useCallback)((e=>{let{crosswalk:t,dataTenant:n}=e;return(0,H.pipe)(f.R9X,(0,H.andThen)((e=>{if(!e.successful)throw new Error(m().text("Failed to unsubscribe contributor"));return e})),p)({dtssPath:u,value:t.value,type:t.type,sourceTable:t.sourceTable,dataTenant:n.id,customerTenant:d})}),[p,u,d])}})({onShowMessage:Ee,onSuccess:xe,onError:(0,r.useCallback)((e=>{_e(e),e.errorCode===f.Xt7.CROSSWALK_NOT_FOUND&&xe()}),[xe])}),{historyFilter:De,onApplyFilter:Ze,isLoading:Me,historicUris:Be,historyWithTotal:ze,canLoadMore:Fe,onLoadMore:He}=(0,k.k6)({entity:te,enabled:J}),$e=(e=>{let{activeMode:t,contributors:n,entity:o}=e;const l=(0,r.useCallback)((e=>{var r;switch(t){case W.Source:return(0,f.kW2)(e.type);case W.Contributor:return(0,f.GtP)((null===(r=(0,f.A1W)(n,e))||void 0===r?void 0:r.uri)||"");case W.Crosswalk:return(0,f.CJp)((0,f.uKF)(e))}}),[t,n]),[a,i]=(0,r.useState)([]),s=(0,r.useRef)([]),c=(0,r.useCallback)((0,f.DsO)((()=>{i([...s.current])}),50),[]),u=(0,r.useCallback)((e=>{s.current=e,c(e)}),[c]),d=(0,r.useCallback)(((e,r)=>{if(e)if(r)if(t===W.Contributor){const t=(0,f.A1W)(n,e);u([e,...(null==t?void 0:t.crosswalks)||[]])}else u([e]);else u([])}),[t,u,n]),[p,m]=(0,r.useState)([]),h=(0,r.useCallback)(((e,t)=>(0,H.concat)(e.filter((e=>!(0,H.any)((0,f.aFF)(e),t))),t.filter((t=>!(0,H.any)((0,f.aFF)(t),e))))),[]),g=(0,r.useCallback)((e=>{if(e)if(t===W.Contributor){const t=(0,f.A1W)(n,e);m((n=>h([e,...(null==t?void 0:t.crosswalks)||[]],n)))}else m((t=>h([e],t)))}),[t,h,n]);return(0,r.useEffect)((()=>{p.length&&m([])}),[t,o]),{getCrosswalkColor:l,highlightedCrosswalks:(0,r.useMemo)((()=>[...a,...p]),[a,p]),focusedCrosswalks:p,toggleCrosswalkFocus:g,setCrosswalkHighlighted:d}})({activeMode:Z,contributors:ye,entity:X}),qe=[{buttonProps:{id:ht.Legend,icon:Ge,tooltipTitle:m().text("Legend")},title:o().createElement(U.Typography,{variant:"h6"},m().text("Legend")),content:o().createElement(Ae,{activeMode:Z,onChangeMode:M,entity:(null==oe?void 0:oe.aEntity)||te,crosswalkTree:ge,contributors:ye,selectedAttributeTypes:le,readOnly:!!oe,onAddCrosswalk:Ne,onUnmergeContributor:Ue,onUnsubscribeContributor:Le,onEditCrosswalk:je,onDeleteCrosswalk:Ie})},{buttonProps:{id:ht.History,icon:L.Z,tooltipTitle:m().text("History")},title:o().createElement(w.Z,{total:((null==Be?void 0:Be.length)||0)+1,entityType:re,filter:De,onApplyFilter:Ze}),content:ee?o().createElement(C.Z,{isLoading:Me,historyWithTotal:ze,contributorsUris:Be,entityUri:ne,historyEvent:p,onLoadMore:He,canLoadMore:Fe}):o().createElement(S.Z,null)}],Qe=o().createElement(o().Fragment,null,o().createElement(pt,{survivorshipGroups:G,currentSurvivorshipGroupUri:_,onChange:V}),o().createElement(U.Divider,{className:D.headerDivider,orientation:"vertical"}));return o().createElement("div",{className:D.sourcesView},o().createElement(O.hR,$e,o().createElement(Ye.DndProvider,{backend:Xe.default},o().createElement(P.Z,null),o().createElement(T.Z,{className:D.resizablePanesWrapper,orientation:"vertical",size:q?ie:"100%",minSize:480,maxSize:-480,allowResize:q,onChange:ce},o().createElement("div",{className:D.pane},o().createElement(R.n,{entity:X,historySlice:oe}),ee?o().createElement(N.R,{attributeUris:Ce},o().createElement(I.Z,{className:D.attributesTable,isLoading:Q,visibleColumns:he,onChangeVisibleColumns:fe,entity:ke,crosswalksMap:we,selectedAttributeTypes:le,onSelectAttributeTypes:ae,readOnly:!!oe||!Y,onDelete:Se,onPin:Oe,onIgnore:Pe,onEdit:Te,onAdd:Re,additionalHeaderItems:Qe,activeSurvivorshipGroupUri:_})):o().createElement(et,null)),o().createElement(z,{className:D.pane,title:null===(t=qe[B])||void 0===t?void 0:t.title,onClose:()=>A(B)},null===(n=qe[B])||void 0===n?void 0:n.content)))),o().createElement(j.G,{className:D.tabs,buttonsProps:(0,H.pipe)((0,H.reject)((0,H.propEq)("hidden",!0)),(0,H.pluck)("buttonProps"))(qe),onButtonClick:A,activeIndexId:B}),o().createElement(ue,null))})),gt=(0,i.createGenerateClassName)({productionPrefix:"sourcesPerspective",disableGlobal:!0}),bt=e=>{let{config:t,store:n,onResize:p,saveState:m,getSavedState:h}=e;const g=(0,r.useCallback)((0,f.aYu)(h),[h]);return o().createElement(l.Provider,{store:n},o().createElement(u.m.Provider,{value:t.id},o().createElement(i.StylesProvider,{generateClassName:gt},o().createElement(c.MuiPickersUtilsProvider,{utils:a.Z},o().createElement(s.Z,{handleHeight:!0,onResize:(e,t)=>null==p?void 0:p(Math.floor(e),Math.floor(t))}),t&&o().createElement(ft,{config:t,saveState:m,getSavedState:g}),o().createElement(d.Z,null)))))}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3575],{32528:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(13688),o=n(48852);const l=e=>t=>(0,o.l)(r.X,e,t)},68439:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),o=n.n(r),l=n(52730),a=n(71153),i=n.n(a),s=n(94079),c=n(47401),u=n(49885),d=n(95613);const p=(0,n(79692).Z)({"entityType-overflow":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",marginRight:"12px",borderRadius:"2px",flexShrink:0},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",marginRight:"16px",flexShrink:0}}),m=e=>{let{entity:t,className:n,size:r="small"}=e;const a=p(),m=(0,l.useSelector)(u.ZP.selectors.getMetadata),h=t.type,f=(0,c.nt9)(m,h)||{},g=(0,c.VD3)(m,f,"typeColor")||c.rSc.palette.primary.main,b=(0,c.jFi)(m,t);return o().createElement(d.Z,{value:b,placement:"top"},o().createElement(s.Typography,{style:{backgroundColor:g,color:c.P6Y.Colors.getColor(g)?"#FFFFFF":"#212121"},className:i()(a[`entityType-${r}`],a["entityType-overflow"],n),component:"div"},b))}},64459:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),o=n.n(r),l=n(71153),a=n.n(l),i=n(52730),s=n(17440),c=n(94079),u=n(87918),d=n.n(u),p=n(47401),m=n(49885),h=n(53180),f=n(68439);const g=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"0px 1px 0px rgba(0, 0, 0, 0.12)",marginBottom:"1px","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),b=e=>{let{className:t,entity:n,children:l,classes:u,renderLabel:b=s.identity}=e;const y=g({classes:u}),v=(0,i.useSelector)(m.ZP.selectors.getMetadata),x=(0,i.useSelector)(m.ZP.selectors.getShowEntityId),E=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,p.BTI)(n))}),[n]);if((0,s.isNil)(n))return null;const k=(0,p.idV)(n.label),w=n.secondaryLabel,C=(0,p.ptG)(v,n),S=(0,p.Fn9)(n),O=n.uri,P=(0,p.BTI)(n);return o().createElement("div",{className:a()(y.profileBandWrapper,t)},o().createElement("div",{className:a()(y.profileBand,{[y.inactive]:!S}),"data-entity-uri":O},o().createElement(h.Z,{key:n.uri,entity:n,avatarClassName:y.profileIcon,imageClassName:y.imageProfileIcon}),o().createElement("div",{className:y.profileInfo},o().createElement("div",null,o().createElement(c.Typography,{variant:"h6",className:y.label},b(k)),w&&o().createElement(c.Typography,{variant:"subtitle2",className:y.secondaryLabel},w),C&&o().createElement(c.Typography,{variant:"subtitle1",className:y.businessCard},C)),o().createElement("div",{className:y.specialInfo},o().createElement("div",{className:y.entityType},o().createElement(f.Z,{entity:n,size:"medium",className:y.badge}),!(0,p.ZiX)(O)&&x&&o().createElement(c.Tooltip,{title:d().text("Copy to clipboard")},o().createElement(c.Typography,{display:"inline",variant:"body2",className:y.entityId,onClick:E},d().text("Entity ID"),": ",P))))),l&&o().createElement("div",null,l)))}},93873:(e,t,n)=>{n.d(t,{a:()=>I});var r=n(24328),o=n.n(r),l=n(94079),a=n(67766),i=n(42767),s=n(47401),c=n(71153),u=n.n(c),d=n(17440),p=n(87918),m=n.n(p),h=n(79468),f=n(83348),g=n(8818);const b=(0,n(79692).Z)({container:{display:"flex",alignItems:"center"},link:{whiteSpace:"nowrap",marginRight:"9px"}}),y=(0,f.Z)(l.Link),v=e=>{var t;let{className:n,total:l=0,onPrev:c,onNext:p,onSearchResultsClick:f,isPrevDisabled:v,isNextDisabled:x}=e;const E=b(),k=(0,r.useContext)(h.T),{OPEN_RESULTS:w,SEARCH_RESULT:C,SEARCH_RESULTS:S,NEXT_PROFILE:O,PREVIOUS_PROFILE:P}=(0,d.mergeRight)({OPEN_RESULTS:m().text("Go to search results"),SEARCH_RESULT:m().text("Search result"),SEARCH_RESULTS:m().text("Search results"),PREVIOUS_PROFILE:m().text("Go to previous profile"),NEXT_PROFILE:m().text("Go to next profile")},null!==(t=null==k?void 0:k.profileBand)&&void 0!==t?t:{});return o().createElement("div",{className:u()(E.container,n)},o().createElement(y,{className:E.link,component:"button",variant:"caption",onClick:f,underline:"none",tooltipTitle:w},(0,s.k7L)(l,1e6)," ",1===l?C:S),o().createElement(g.k,{size:"L",icon:a.Z,tooltipTitle:P,onClick:c,disabled:v,showForDisabled:!0}),o().createElement(g.k,{size:"L",icon:i.Z,tooltipTitle:O,onClick:p,disabled:x,showForDisabled:!0}))};var x=n(52730),E=n(49885),k=n(39450),w=n(85229);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){S(e,t,n[t])}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class O{constructor(e){var t=this;let{data:{query:n,sortField:r,sortOrder:o},tenant:l,searchTenant:a,apiPath:i,dtssPath:c,globalSearchRequestOptions:u}=e;this.query=void 0,this.sortField=void 0,this.sortOrder=void 0,this.tenant=void 0,this.searchTenant=void 0,this.apiPath=void 0,this.dtssPath=void 0,this.globalSearchRequestOptions=void 0,this.isDT=()=>this.tenant!==this.searchTenant,this.getQueryFilter=()=>({rawFilter:this.query}),this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[t.getQueryFilter(),...e],o=C({},t.globalSearchRequestOptions,{sort:t.sortField,order:t.sortOrder,select:"uri,label,type",scoreEnabled:!1},n);return t.isDT()?(0,s.uqV)({filters:r,options:o,customerTenant:t.tenant,dataTenant:t.searchTenant,dtssPath:t.dtssPath}):(0,s.ZOr)(r,o)},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"uri",values:[e]}],{offset:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{offset:t,max:e}),this.requestTotal=()=>{const e=[this.getQueryFilter()],t=this.globalSearchRequestOptions;return(this.isDT()?(0,s.J$m)({filters:e,options:t,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,s.j_Q)(e,t)).then((e=>e.total))},this.query=n,this.sortField=r,this.sortOrder=o,this.tenant=l,this.searchTenant=a,this.apiPath=i,this.dtssPath=c,this.globalSearchRequestOptions=u}}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){T(e,t,n[t])}))}return e}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class R{constructor(e){var t=this;let{data:n,tenant:r,apiPath:o}=e;this.searchBody=void 0,this.tenant=void 0,this.apiPath=void 0,this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[{rawFilter:t.searchBody.filter},...e];return(0,s.P2h)({apiPath:t.apiPath,tenant:t.tenant,searchBody:P({},t.searchBody,{filter:e.length?(0,s.Uqd)()(r):t.searchBody.filter}),options:n})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"id",values:[(0,s.BTI)({uri:e})]}],{from:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{from:t,max:e}),this.requestTotal=()=>(0,s.dED)({apiPath:this.apiPath,tenant:this.tenant,searchBody:this.searchBody}).then((e=>e.count)),this.searchBody=n,this.tenant=r,this.apiPath=o}}const N=(e,t)=>(0,d.pipe)((0,d.map)((0,d.prop)("uri")),(0,d.reject)((e=>t.includes(e))))(e),I=e=>{let{className:t}=e;const{total:n,onPrev:l,onNext:a,onSearchResultsClick:i,isPrevDisabled:c,isNextDisabled:u}=(()=>{const e=(0,w._)(),t=(0,w._)(),n=(0,w._)(),{uri:o,index:l,total:a,tenant:i,cache:c}=(0,x.useSelector)(E.ZP.selectors.getSearchNavigationData)||{},{type:u,data:d}=(0,x.useSelector)(E.ZP.selectors.getSearchProviderData)||{},p=(0,x.useSelector)(E.ZP.selectors.getTenant),m=(0,x.useSelector)(E.ZP.selectors.getApiPath),h=(0,x.useSelector)(E.ZP.selectors.getDtssPath),f=(0,x.useSelector)((e=>E.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]))),g=(0,r.useContext)(k.m),b=(0,x.useDispatch)(),[y,v]=(0,r.useState)(!1),C=(0,r.useMemo)((()=>((e,t)=>{switch(e){case"search":return new O(t);case"graphsearch":return new R(t)}})(u,{data:d,tenant:p,searchTenant:i,apiPath:m,dtssPath:h,globalSearchRequestOptions:f})),[u,d,p,i,m,h,f]),S=(0,r.useCallback)((e=>{b(E.yC.actions.updateSearchNavigationDataFields(e))}),[b]),P=(0,r.useCallback)((e=>{const t=p!==i?(0,s.wwR)({uri:e,dataTenant:i}):e;b(E.ui.actions.openEntity({uri:t,viewId:g,source:"navigation"}))}),[b,g,p,i]),T=(0,r.useCallback)((()=>{b(E.ui.actions.openPerspective({perspectiveId:u,viewId:g}))}),[b,u,g]);(0,r.useEffect)((()=>{l>=a?S({index:a-1}):l<0&&S({index:0})}),[a,l,S]);const I=(0,r.useCallback)(((e,r,o)=>{v(!0),t(C.requestTotal()).then((e=>S({total:e})));const l=o+1;return n(C.requestEntities(15,l)).then((t=>{if(t){if(t.length){const n=N(t,e);if(n.length>0)return S({cache:e.concat(n),uri:n[0],index:l+t.length-n.length}),void P(n[0]);if(o+t.length<r-1)return I(e,r-t.length,o+t.length)}S({index:l})}})).finally((()=>{v(!1)}))}),[C,S,P]),U=(0,r.useCallback)(((e,r)=>{v(!0),t(C.requestTotal()).then((e=>S({total:e})));const o=r-1,l=Math.max(0,r-15),a=15+Math.min(0,r-15);return n(C.requestEntities(a,l)).then((t=>{if(t){if(t.length){const n=N(t,e);if(n.length>0)return S({cache:n.concat(e),uri:n[n.length-1],index:o-(t.length-n.length)}),void P(n[n.length-1]);if(r-t.length>0)return U(e,r-t.length)}S({index:0})}})).finally((()=>{v(!1)}))}),[C,S,P]),j=(0,r.useCallback)(((t,n,r,o)=>{if(n<t.length){const l=t[n];return v(!0),e(C.checkEntity(l)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),j(e,n,r-1,o)}S({index:o+1,uri:l,cache:t,total:r}),P(l)})).finally((()=>{v(!1)}))}if(!(o>=r-1))return I(t,r,o);S({cache:t,total:r,index:r-1})}),[C,S,P,I]),L=(0,r.useCallback)(((t,n,r,o)=>{if(n>-1){const l=t[n];return v(!0),e(C.checkEntity(l)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),L(e,n-1,r-1,o-1)}S({index:o-1,uri:l,cache:t,total:r}),P(l)})).finally((()=>{v(!1)}))}if(!(o<=0))return U(t,o);S({index:0,cache:t,total:r})}),[C,S,P,U]),D=(0,r.useCallback)((()=>{if(c&&o){const e=c.indexOf(o)-1;L(c,e,a,l)}}),[L,c,o,a,l]),Z=(0,r.useCallback)((()=>{if(c&&o){const e=c.indexOf(o)+1;j(c,e,a,l)}}),[j,c,o,a,l]);return{total:a,onPrev:D,onNext:Z,onSearchResultsClick:T,isPrevDisabled:y||l<=0,isNextDisabled:y||l>=a-1}})();return(()=>{const{cache:e}=(0,x.useSelector)(E.ZP.selectors.getSearchNavigationData)||{},t=(0,x.useSelector)(E.ZP.selectors.getMode),n=(0,x.useSelector)(E.ZP.selectors.getEntity);return(0,s.uzs)(t)&&(null==e?void 0:e.includes(null==n?void 0:n.uri))})()?o().createElement(v,{className:t,total:n,onPrev:l,onNext:a,onSearchResultsClick:i,isPrevDisabled:c,isNextDisabled:u}):null}},39827:(e,t,n)=>{n.d(t,{G:()=>m});var r=n(24328),o=n.n(r),l=n(71153),a=n.n(l),i=n(8818),s=n(79692),c=n(41128);const u=(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 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)}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(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)&&(o[n]=e[n])}return o}const m=e=>{let{buttonsProps:t,activeIndexId:n,className:r,onButtonClick:l,classes:s={}}=e;const c=u(),{active:m,buttonWrapper:h}=s,f=p(s,["active","buttonWrapper"]);return o().createElement("div",{className:a()(c.container,r)},t.map((e=>{let{id:t}=e,r=p(e,["id"]);return o().createElement(i.k,d({},r,{classes:f,size:"S",key:t,className:a()({[a()(c.active,m)]:n===t},c.buttonWrapper,h),onClick:()=>l(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},3409:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),o=n.n(r),l=n(52730),a=n(49885),i=n(94079),s=n(17440),c=n(87918),u=n.n(c);const d=(0,n(79692).Z)({root:{display:"flex",alignItems:"flex-start"},slice:{fontWeight:500},cancelButton:{width:"88px",flexShrink:0,marginLeft:"15px"}}),p=()=>{const e=d(),t=(0,l.useSelector)(a.ZP.selectors.getHistoryEvent),n=(0,l.useDispatch)(),r=(0,s.pipe)(a.N5.history.actions.clearHistoryEvent,n);return t?o().createElement("div",{className:e.root},o().createElement(i.Typography,{component:"div"},u().text("You are viewing a historic slice:")," ",o().createElement("span",{className:e.slice},u().date(t.aStamp,"llll"))),o().createElement(i.Button,{className:e.cancelButton,variant:"contained",color:"primary",onClick:r},u().text("Cancel"))):null}},79468:(e,t,n)=>{n.d(t,{T:()=>o});var r=n(24328);const o=n.n(r)().createContext({profileBand:{}});o.displayName="LabelsContext"},7718:(e,t,n)=>{n.d(t,{C:()=>h});var r=n(24328),o=n(52730),l=n(17440),a=n(47401),i=n(49885);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=(e,t)=>t.filter((t=>t.replyId!==e)),d=(e,t)=>{const n=e.replies.findIndex((e=>{let{replyId:n}=e;return n===t.replyId})),r=[...e.replies];return r[n]=t,r},p=[],m=e=>console.error("Collaboration error",e),h=e=>{let{objectIds:t=p,objectTypes:n,enabled:c=!0}=e;const h=(0,o.useSelector)(i.ZP.selectors.getEntity),f=(0,o.useSelector)(i.ZP.selectors.getTenant),g=(0,o.useSelector)(i.ZP.selectors.getCollaborationPath),b=(0,o.useSelector)(i.ZP.selectors.isCollaborationEnabled)&&c,[y,v]=(0,r.useState)(null),[x,E]=(0,r.useState)([]),[k,w]=(0,r.useState)(null),[C,S]=(0,r.useState)(null),[O,P]=(0,r.useState)(!1),[T,R]=(0,r.useState)(!1),[N,I]=(0,r.useState)({}),U=(0,r.useCallback)((e=>{w((t=>s({},t,e)))}),[]),j=null==h?void 0:h.uri,L=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(b&&j&&!(0,a.ZiX)(j)){const n=e=>{console.warn("Collaboration error",e),w(null)};(0,l.pipe)(a.$oF,(0,l.andThen)((0,l.map)((0,l.props)(["objectId","comments"]))),(0,l.andThen)(l.fromPairs),(0,l.andThen)(t?w:U),(0,l.otherwise)(n))({uris:e,tenant:f,collaborationPath:g})}else w(null)}),[U,g,j,b,f]);(0,r.useEffect)((()=>{L(t,!0)}),[t,L]);const D=(0,r.useCallback)(((e,t)=>{(0,a.liG)({collaborationPath:g,tenant:f,relatedObjectUri:e,pageToken:t}).then((e=>{let{items:n,nextPageToken:r}=e;E((e=>t?(0,l.uniqBy)((0,l.prop)("commentId"),[...e,...n]):n)),v(r)})).catch(m)}),[g,f]),Z=(0,r.useCallback)((e=>{R(!0),(0,a.d7q)({collaborationPath:g,tenant:f,commentId:e}).then(S).catch(m).finally((()=>R(!1)))}),[g,f]),M=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,objectType:r,uri:o,relatedObjectUris:l}=e;P(!0);const i={objectId:o,content:t,relatedObjectUris:l,objectType:r,visibility:"public",namedUsers:n,permanentLink:`${window.location.href}&commentId=${encodeURIComponent("{commentId}")}`};return(0,a.Yrx)({collaborationPath:g,tenant:f,data:i}).then((e=>{let[t]=e;return((e,t)=>{S(e),w((n=>s({},n,{[t]:[...n[t]||[],{commentId:e.commentId,replies:0,status:"open"}]}))),E((t=>[e,...t]))})(t,o)})).catch(m).finally((()=>P(!1)))}),[g,f]),B=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,objectType:r,uri:o,relatedObjectUris:i,commentId:c,replies:u}=e;P(!0);const d={objectId:o,content:t,relatedObjectUris:i,objectType:r,visibility:"public",namedUsers:n,commentId:c,replies:u};return(0,a.uAg)({collaborationPath:g,tenant:f,data:d}).then((e=>(e=>{S(e),E((0,l.map)((0,l.when)((0,l.propEq)("commentId",e.commentId),(0,l.always)(e))))})(s({},e,{replies:u})))).catch(m).finally((()=>P(!1)))}),[g,f]),z=(0,r.useCallback)((e=>{let{uri:t,commentId:n}=e;P(!0),(0,a.YFy)({collaborationPath:g,tenant:f,commentId:n}).then((()=>((e,t)=>{S(null),w((n=>{const r=n[t]||[];return s({},n,{[t]:r.filter((t=>t.commentId!==e))})})),E((t=>t.filter((t=>t.commentId!==e))))})(n,t))).catch(m).finally((()=>P(!1)))}),[g,f]),F=(0,r.useCallback)(((e,t,n,r)=>{const o="resolve"===e.action?"resolved":"open",{replyId:l}=e;S("resolved"===o?e=>{if(e)return null}:t=>{if(t)return s({},t,{replies:r?u(l,t.replies):[...t.replies,e]})}),w((e=>s({},e,{[t]:(e[t]||[]).map((e=>e.commentId===n?s({},e,{status:o,replies:r?e.replies-1:e.replies+1}):e))}))),E((t=>t.map((t=>t.commentId===n?s({},t,{status:o,replies:r?u(e.replyId,t.replies):[...t.replies,e]}):t))))}),[]),H=(0,r.useCallback)((e=>{let{uri:t,commentId:n,reply:r}=e;P(!0),(0,a.Mfr)({collaborationPath:g,tenant:f,commentId:n,replyId:r.replyId}).then((()=>F(r,t,n,!0))).catch(m).finally((()=>P(!1)))}),[g,F,f]),$=(0,r.useCallback)(((e,t)=>{S((t=>{if(t)return s({},t,{replies:d(t,e)})})),E((n=>n.map((n=>n.commentId===t?s({},n,{replies:d(n,e)}):n))))}),[]),A=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,commentId:r,replyId:o}=e;P(!0);const l={content:t,namedUsers:n};return(0,a.ufV)({collaborationPath:g,tenant:f,commentId:r,replyId:o,data:l}).then((e=>$(e,r))).catch(m).finally((()=>P(!1)))}),[g,f,$]),W=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,commentId:r,action:o,uri:l}=e;P(!0);const i={content:t,action:o,namedUsers:n};return(0,a.PP2)({collaborationPath:g,tenant:f,commentId:r,data:i}).then((e=>{let[t]=e;return F(t,l,r)})).catch(m).finally((()=>P(!1)))}),[g,f,F]),q=(0,r.useCallback)((e=>{let{commentId:t,uri:n}=e;W({content:"",namedUsers:[],commentId:t,action:"resolve",uri:n})}),[W]),G=(0,r.useCallback)((e=>{let{commentId:t,uri:n}=e;W({content:"",namedUsers:[],commentId:t,action:"reopen",uri:n})}),[W]);return{clearCurrentComment:(0,r.useCallback)((()=>{S(null)}),[]),comments:x,commentsMap:k,getCommentState:(e,t)=>(0,l.pathOr)({},[e,t],N),updateCommentState:(e,t,n)=>{I((r=>{const o=[e,t],a=(0,l.path)(o,r);return(0,l.assocPath)(o,(0,l.mergeRight)(a,n),r)}))},clearCommentState:(e,t)=>I((0,l.dissocPath)([e,t])),createComment:M,createReply:W,currentComment:C,deleteComment:z,editComment:B,getComment:Z,getComments:D,getCommentsCount:L,loading:T,objectTypes:n,pageToken:y,reOpenThread:G,resolveThread:q,sending:O,deleteReply:H,editReply:A}}},2804:(e,t,n)=>{n.d(t,{a:()=>o});var r=n(24328);const o=e=>{const[t,n]=(0,r.useState)(!1),[o,l]=(0,r.useState)({});return(0,r.useEffect)((()=>{e().then((e=>{l(e||{})})).then((e=>n(!0))).catch((e=>n(!0)))}),[]),{isLoaded:t,savedState:o}}},51386:(e,t,n)=>{n.r(t),n.d(t,{default:()=>bt});var r=n(24328),o=n.n(r),l=n(52730),a=n(8598),i=n(36138),s=n(44443),c=n(22664),u=n(39450),d=n(585),p=n(87918),m=n.n(p),h=n(49885),f=n(47401),g=n(71820),b=n(57730),y=n(20562),v=n(24605),x=n(2804),E=n(85965),k=n(44021),w=n(91515),C=n(54362),S=n(6674),O=n(63149),P=n(48017),T=n(96955),R=n(40715),N=n(66095),I=n(20982),U=n(39827),j=n(94079),L=n(80147),D=n(87685),Z=n(22385),M=n(79692);const B=(0,M.Z)({header:{display:"flex",flexDirection:"row",alignItems:"center",padding:"16px 12px",borderBottom:"1px solid rgba(0, 0, 0, 0.12);"},closeButton:{marginRight:"12px"}}),z=e=>{let{title:t,className:n,onClose:r,children:l}=e;const a=B();return o().createElement("div",{className:n},o().createElement("div",{className:a.header},o().createElement(Z.Z,{className:a.closeButton,icon:D.default,onClick:r}),t),l)};var F=n(99144),H=n(17440),$=n(31276),A=n(83401);let W;!function(e){e.Crosswalk="crosswalks",e.Source="source",e.Contributor="contributor"}(W||(W={}));const q=e=>(0,H.pipe)((0,H.map)((0,H.prop)("value")),H.sum)(e);function G(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){_(e,t,n[t])}))}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const V=e=>{let{data:t,width:n,height:o}=e;return(0,r.useMemo)((()=>{if(!n||!o)return{nodes:[],links:[]};const e=function(){let e=24,t=15,n=10,r=8,o=[1,1];function l(l){let{nodes:i,links:s}=l;const c={nodes:i,links:s};return function(e){let{nodes:t,links:n}=e;t.forEach((e=>{e.sourceLinks=[],e.targetLinks=[]})),n.forEach((e=>{e.source.sourceLinks.push(e),e.target.targetLinks.push(e)}))}(c),function(e){let{nodes:t}=e;t.forEach((e=>{e.value=Math.max(q(e.sourceLinks),q(e.targetLinks))}))}(c),function(t){let{nodes:n}=t;if(!n.length)return;let r,l=[n[0]],a=0;for(;l.length;)r=[],l.forEach((t=>{t.x=a,t.dx=e,t.targetLinks.forEach((e=>{r.indexOf(e.source)<0&&r.push(e.source)}))})),l=r,++a;if(n.forEach((e=>{e.x=a-1-e.x})),a>2){const t=(o[0]-2*e-22)/(a-2);n.forEach((n=>{n.sourceLinks&&0!=n.sourceLinks.length?n.x*=t:n.x=o[0]-e}))}else n[0].x=o[0]-e,n[1].x=n[0].x-22-e}(c),function(e){let{nodes:l,links:a}=e;const i=(0,H.pipe)((0,H.groupBy)((0,H.prop)("x")),H.toPairs,(0,H.sort)(((e,t)=>e[0]-t[0])),(0,H.map)((0,H.nth)(1)))(l);(function(){let e=(0,H.pipe)((0,H.map)((e=>(o[1]-(e.length-1)*r)/q(e))),(0,H.reduce)(Math.min,1/0))(i);const s=(0,H.pipe)((0,H.map)((e=>{var t;return e.value/((null===(t=e.targetLinks)||void 0===t?void 0:t.length)||1)})),(0,H.reduce)(Math.min,1/0))(l);e=Math.max(Math.min(e,t/s),n/s),i.forEach((t=>{t.forEach(((t,n)=>{t.y=n,t.dy=t.value*e}))})),a.forEach((t=>{t.dy=t.value*e}))})(),i.forEach((e=>{let t,n,l,a=0;const i=e.length;for(e.sort(((e,t)=>e.y-t.y)),l=0;l<i;++l)t=e[l],n=a-t.y,n>0&&(t.y+=n),a=t.y+t.dy+r;if(n=a-r-o[1],n>0)for(a=t.y-=n,l=i-2;l>=0;--l)t=e[l],n=t.y+t.dy+r-a,n>0&&(t.y-=n),a=t.y}));const s=(0,H.pipe)((0,H.map)((e=>(e.length-1)*r+(0,H.sum)((0,H.map)((e=>e.dy),e)))),(0,H.reduce)(Math.max,0))(i),c=(o[1]-s)/2;i.forEach((e=>{const{y:t,dy:n}=(0,H.last)(e),r=o[1]-(t+n);e.forEach((e=>{e.y+=r,c>0&&(e.y-=c)}))}))}(c),a(c),function(e){let{nodes:t}=e;(0,H.pipe)((0,H.groupBy)((0,H.prop)("x")),H.toPairs,(0,H.sort)(((e,t)=>t[0]-e[0])),(0,H.map)((0,H.nth)(1)))(t).forEach((e=>{(e=e.concat().sort(((e,t)=>e.y-t.y))).forEach(((t,n)=>{var o;if(null!==(o=t.sourceLinks)&&void 0!==o&&o.length){var l,a,i;const{target:o,ty:s,dy:c}=(0,H.last)(t.sourceLinks);let u=o.y+s+c-t.dy;(null===(l=e[n-1])||void 0===l?void 0:l.x)==t.x&&u<(null===(a=e[n-1])||void 0===a?void 0:a.y)+(null===(i=e[n-1])||void 0===i?void 0:i.dy)+r&&(u=e[n-1].y+e[n-1].dy+r),t.y>u&&(t.y=u)}}))}))}(c),c}function a(e){let{nodes:t}=e;(0,H.pipe)((0,H.groupBy)((0,H.prop)("x")),H.toPairs,(0,H.sort)(((e,t)=>e[0]-t[0])),(0,H.map)((0,H.nth)(1)))(t).forEach((e=>{e.forEach((e=>{var t,n;if(null!==(t=e.targetLinks)&&void 0!==t&&t.length){const t=[],n=e.targetLinks.map((e=>e.crosswalk.uuid)),r=[];e.targetLinks.forEach((function(e){-1==this.indexOf(e.source)&&this.push(e.source)}),r);for(let o=0;o<r.length;o++)for(let l=0;l<r[o].sourceLinks.length;l++){const a=n.indexOf(r[o].sourceLinks[l].crosswalk.uuid);-1!=a&&t.push(e.targetLinks[a])}e.targetLinks=t}if(null!==(n=e.sourceLinks)&&void 0!==n&&n.length){var r;const t=[];if(null!==(r=e.targetLinks)&&void 0!==r&&r.length){const n=e.sourceLinks.map((e=>e.crosswalk.uuid));for(let r=0;r<e.targetLinks.length;r++){const o=n.indexOf(e.targetLinks[r].crosswalk.uuid);-1!=o&&t.push(e.sourceLinks[o])}}const n=t.map((e=>e.crosswalk.uuid)),o=e.sourceLinks.filter((function(e){return-1==this.indexOf(e.crosswalk.uuid)}),n);if(e.sourceLinks=o.concat(t),t.length>0){let t=0;for(let e=0;e<o.length;e++)t+=o[e].dy;e.sizeForNewSources=t}}}))})),t.forEach((e=>{let t=0,n=e.sizeForNewSources||0;delete e.sizeForNewSources,e.sourceLinks.forEach((e=>{e.sy=t,t+=e.dy})),e.targetLinks.forEach((e=>{e.ty=n,n+=e.dy}))}))}return l.nodeWidth=()=>e,l.setNodeWidth=t=>(e=+t,l),l.nodePadding=()=>r,l.setNodePadding=e=>(r=+e,l),l.smallestNodeMaxHeight=()=>t,l.setSmallestNodeMaxHeight=e=>(t=+e,l),l.smallestNodeMinHeight=()=>n,l.setSmallestNodeMinHeight=e=>(n=+e,l),l.size=()=>o,l.setSize=e=>(o=e,l),l.update=e=>(a(e),e),l.link=()=>{let t=.5;function n(n){const r=!n.target.sourceLinks||0==n.target.sourceLinks.length,o=n.source.x+n.source.dx,l=n.target.x,a=(d=+(d=o),p=+(p=l),e=>d*(1-e)+p*e),i=a(t),s=a(1-t),c=n.source.y+n.sy-.13,u=n.target.y+n.ty-.13;var d,p;const m=r?"":`L${l+e},${u} L${l+e},${u+n.dy+.26}`;return c===u?`M${o},${c} \n L${l},${u}${m} \n L${l},${u+n.dy+.26} \n L${o},${c+n.dy+.26} Z`:`M${o},${c}\n C${i},${c} ${s},${u} ${l},${u}${m} \n L${l},${u+n.dy+.26} \n C${s},${u+n.dy+.26} ${i},${c+n.dy+.26} \n ${o},${c+n.dy+.26} Z`}return n.curvature=function(e){return arguments.length?(t=+e,n):t},n},l}().setNodeWidth(14).setNodePadding(20).setSize([o-2,n-2]),r=e.nodeWidth(),l=e.link(),a=(e=>{const t=e.nodes.map((e=>G({},e))),n=n=>{const r=e.nodes.indexOf(n);return t[r]},r=e.links.map((e=>G({},e,{source:n(e.source),target:n(e.target)})));return{nodes:t,links:r}})(t),{nodes:i,links:s}=e(a);return{nodes:i,links:s,nodeWidth:r,path:l}}),[t,o,n])};var X=n(94111),Y=n(12147),Q=n(98685);const K=(0,M.Z)({tooltipTitle:{fontWeight:500,fontSize:"16px",lineHeight:"24px",letterSpacing:"0.15px",marginBottom:"8px",userSelect:"none"},tooltipRow:{display:"flex",alignItems:"center",fontSize:"13px",lineHeight:"15px",fontWeight:"normal","&:not(:last-child)":{marginBottom:"4px"}},tooltipIcon:{fontSize:"18px",color:"rgba(0, 0, 0, 0.54)",marginRight:"8px"},node:{stroke:"#000000",strokeWidth:1,strokeOpacity:.38},rootNode:{transform:"rotate(90deg)",userSelect:"none",fontSize:"13px"}}),J=e=>{let{user:t,time:n,children:r}=e;const l=K(),a=o().createElement("div",null,o().createElement("span",{className:l.tooltipTitle},m().text("Merge details")),o().createElement("div",{className:l.tooltipRow},o().createElement(Y.Z,{className:l.tooltipIcon}),m().date(n,"L LTS")),o().createElement("div",{className:l.tooltipRow},o().createElement(Q.Z,{className:l.tooltipIcon}),t));return o().createElement(X.Z,{title:a,placement:"top"},r)},ee=e=>{let{node:t,nodeWidth:n,highlightEnabled:l,isColored:a}=e;const i=K(),[s,c]=(0,r.useState)(0),u=(0,r.useRef)(null),{x:d,y:p,name:m,label:h,targetLinks:f,sourceLinks:g,entity:{crosswalks:b=[],merges:y}}=t,[v]=b,{isDimmed:x,highlightCrosswalk:E,removeHighlight:k}=(0,O.pu)(v),w=(0,O.nX)(v),C=null!=b&&b.length?g[b.length-1].sy+g[b.length-1].dy:0;return(0,r.useEffect)((()=>{var e;const n=t.dy,r=(null==u||null===(e=u.current)||void 0===e?void 0:e.clientWidth)||0;n<r&&c(n/2-r/2)}),[]),o().createElement("g",{transform:`translate(${d},${p})`},"ROOT"===m?o().createElement("text",{dy:-5,dx:s,ref:u,className:i.rootNode},h||""):o().createElement(o().Fragment,null,o().createElement("rect",{height:C,width:14,className:i.node,fill:a?w:"#F0F0F0",key:"node-main",filter:l&&x?"url(#saturation)":null,opacity:l&&x?.19:1,onMouseEnter:()=>{l&&E()},onMouseLeave:()=>{l&&k()}}),!(null==f||!f.length)&&(()=>{const e=(0,H.pipe)((0,H.map)((0,H.prop)("source")),(0,H.groupBy)((0,H.prop)("time")))(f);return null==y?void 0:y.map(((t,r)=>{let{time:a,user:s}=t;const c=e[a];if(!c)return;const[u,d]=c.reduce(((e,t)=>{let{sourceLinks:n}=t;return[(0,H.min)((0,H.head)(n).ty,e[0]),(0,H.max)((0,H.last)(n).ty+(0,H.last)(n).dy,e[1])]}),[1/0,0]);return o().createElement(J,{user:s,time:a,key:"node-"+r},o().createElement("rect",{transform:`translate(0,${u})`,height:d-u,width:n,className:i.node,fillOpacity:.54,fill:"#F0F0F0",opacity:l&&x?.38:1}))}))})()))},te=e=>{let{link:t,path:n,highlightEnabled:r,isColored:l}=e;const{crosswalk:a}=t,i=(0,O.nX)(a),{isDimmed:s,highlightCrosswalk:c,removeHighlight:u}=(0,O.pu)(a);return o().createElement("path",{d:n,fill:l?i:"#F0F0F0",filter:r&&s?"url(#saturation)":null,opacity:r&&s?.19:1,onMouseEnter:()=>{r&&c()},onMouseLeave:()=>{r&&u()}})},ne=e=>{let{width:t,height:n,data:l,accentContributors:a}=e;const[i,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(0),[d,p]=(0,r.useState)(0),{links:m,nodes:h,nodeWidth:f,path:g}=V({data:l,width:t,height:n});(0,r.useEffect)((()=>{p(0),u(0)}),[t,n]);const b=(0,r.useMemo)((()=>h.map(((e,t)=>o().createElement(ee,{highlightEnabled:a,isColored:a,node:e,nodeWidth:f,key:`SankeyNode-${t}`})))),[h,a,f,t,n]),y=(0,r.useMemo)((()=>m.map(((e,t)=>o().createElement(te,{highlightEnabled:!a,isColored:!a,link:e,path:g(e),key:`SankeyLink-${t}`})))),[a,m,g]),v=e=>{const t=e.pageX,n=t-c;return u(t),n},x=()=>s(!1),E=i?"none":"auto",k=i?"move":"default";return o().createElement("svg",{width:t,height:n,cursor:k,onPointerDown:e=>{e.preventDefault(),s(!0),v(e)},onPointerMove:e=>{if(!i)return;const t=v(e);p(d+t)},onPointerUp:x,onPointerLeave:x},o().createElement("filter",{id:"saturation",filterUnits:"objectBoundingBox"},o().createElement("feColorMatrix",{id:"saturate",type:"saturate",values:"0.2"})),o().createElement("g",{transform:`translate(${d},${n-1}) rotate(-90)`,pointerEvents:E},o().createElement("g",null,y),o().createElement("g",null,b)))};function re(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=(0,H.curry)(((e,t)=>!e||e.some((0,f.aFF)(t)))),le=(0,H.curry)(((e,t)=>(0,H.evolve)({crosswalks:(0,H.filter)(oe(e)),merges:(0,H.map)((0,H.evolve)({losers:(0,H.map)(le(e))}))},t))),ae=e=>{let t=1;const n=(0,H.pipe)((0,H.evolve)({crosswalks:(0,H.map)((e=>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){re(e,t,n[t])}))}return e}({},e,{uuid:t++})))}),(0,H.evolve)({merges:(0,H.map)((0,H.evolve)({losers:(0,H.map)((e=>n(e)))}))}));return n(e)},ie=e=>{const t=[],n=[],r=(e,o,l)=>{const{crosswalks:a=[],merges:i=[],uri:s="",label:c}=e;t.push({entity:e,name:s,time:l,label:c});const u=t.length-1,d=(0,H.pipe)((0,H.chain)((e=>{let{losers:t,time:n}=e;return(0,H.pipe)((0,H.filter)((e=>{var t,n;return(null===(t=e.crosswalks)||void 0===t?void 0:t.length)||(null===(n=e.merges)||void 0===n?void 0:n.length)})),(0,H.chain)((e=>r(e,u,n))))(t)})),(0,H.concat)(a))(i);return-1!=o&&d.forEach((e=>n.push({source:t[u],target:t[o],value:10,crosswalk:e}))),d};r(e,-1,Date.now());const o=(0,H.pipe)((0,H.chain)((e=>{let{source:t,target:n}=e;return[t,n]})),H.uniq)(n);return{nodes:t.filter((e=>o.includes(e))),links:n}},se=(0,M.Z)((()=>({graph:{padding:"8px 0px",boxSizing:"border-box",height:"100%",width:"100%"}}))),ce=(0,r.memo)((e=>{let{crosswalkTree:t,entityLabel:n,visibleCrosswalks:r,accentContributors:l}=e;const a=se(),i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return(0,H.pipe)(le(n),ae,ie)({uri:"ROOT",label:t,crosswalks:[],merges:[{time:Date.now(),losers:[e]}]})}(t,n,r);return o().createElement("div",{className:a.graph},o().createElement(s.Z,{refreshMode:"debounce",refreshRate:100,handleWidth:!0,handleHeight:!0},(e=>{let{width:t=0,height:n=200}=e;return o().createElement(ne,{width:t,height:n,data:i,accentContributors:l})})))}));var ue=n(90186),de=n(77243);function pe(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){me(e,t,n[t])}))}return e}function me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var he=n(52017),fe=n(79769),ge=n(71153),be=n.n(ge),ye=n(65549);function ve(){return ve=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},ve.apply(this,arguments)}const xe=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(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)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",ve({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),o().createElement("defs",null,o().createElement("path",{d:"M17 13.138l4.5 4.5-4.5 4.5V18.5h-1.247l-3.488-3.479 1.413-1.414 2.901 2.893H17v-3.362zM17 1.5L21.5 6 17 10.5V7.138h-.421l-11.03 11H2v-2h2.723l11.03-11H17V1.5zm-11.45 4l3.294 3.286-1.414 1.413L4.723 7.5H2v-2h3.55z",id:"svg1833706754a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("mask",{id:"svg1833706754b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg1833706754a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg1833706754b)",d:"M0 0h24v24H0z"})))};var Ee=n(22983),ke=n(72753),we=n(8818),Ce=n(51229);const Se=(0,M.Z)((e=>({root:{display:"flex",alignItems:"center",paddingRight:"8px","& button + button":{marginLeft:"4px"}},focusedIcon:e=>{let{isFocused:t}=e;return{width:28,height:28,color:t?"#000":"rgba(0, 0, 0, 0.54)",borderRadius:0}},title:{color:e.palette.text.secondary,paddingLeft:"6px",paddingRight:"2px"},uri:{lineHeight:"15px",color:e.palette.text.primary}})));function Oe(){return Oe=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},Oe.apply(this,arguments)}const Pe=e=>{let{contributorUri:t,focusable:n,contributorActions:r,onToggleFocus:l,isFocused:a}=e;const i=Se({isFocused:a});return o().createElement("div",{className:i.root},o().createElement(we.k,{size:"XXS",onClick:()=>l(),className:i.focusedIcon,icon:n&&ke.Z,disabled:!n,tooltipTitle:n&&m().text("Focus")}),o().createElement(j.Typography,{variant:"body2",className:i.uri},o().createElement("span",{className:i.title},m().text("Entity ID:")),(0,f.nIW)(t)),o().createElement(Ce.Z,null),r.map(((e,t)=>{let{show:n}=e,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(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)&&(o[n]=e[n])}return o}(e,["show"]);return n&&o().createElement(we.k,Oe({key:t,size:"XS",showForDisabled:!0},r))})))},Te=(0,M.Z)((()=>({root:e=>{let{contributorColor:t}=e;return{fontSize:"13px",position:"relative",display:"flex",flexDirection:"column",alignItems:"stretch",border:"1px solid rgba(0, 0, 0, 0.05)",paddingLeft:"8px","&:before":{content:'" "',borderLeft:`8px solid ${t}`,position:"absolute",top:-1,left:0,bottom:-1},"& > div + div":{marginTop:"1px"}}},editor:{padding:"0px 30px 0px 25px"}}))),Re=e=>{let{className:t,contributorUri:n,accentContributor:a,crosswalksBySources:i,expandedSources:s,canUnmerge:c,disableAddCrosswalk:u,disableEditCrosswalk:d,disableDeleteCrosswalk:p,disableUnmergeContributor:g,onUnmerge:b,onEdit:y,onDelete:v,onAdd:x,onToggleSourceExpanded:E,onUnsubscribeContributor:k}=e;const w=a?(0,f.GtP)(n):"rgba(0, 0, 0, 0.38)",C=Te({contributorColor:w}),S=(0,l.useSelector)(h.ZP.selectors.getDataTenants),P=(0,r.useRef)(null),[T]=(0,O.RT)();(0,r.useEffect)((()=>{var e;a&&T&&((0,H.pipe)((0,H.find)((e=>{let{source:t}=e;return t===T.type})),(0,H.propOr)({},"crosswalksByTypes"),H.values,H.flatten)(i).some((e=>(0,f.aFF)(T,e)&&e!==T))&&(null==P||null===(e=P.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})))}),[T]);const[R,N]=(0,r.useState)(!1),I=(0,H.pipe)((0,H.pluck)("crosswalksByTypes"),(0,H.find)((e=>e[de.Y.Simple].length||e[de.Y.Empty].length)),(0,H.props)([de.Y.Simple,de.Y.Empty]),H.flatten,H.head)(i),{toggleCrosswalkFocus:U,isFocused:j}=(0,O.BF)(I),L=(0,H.pipe)((0,H.pluck)("crosswalksByTypes"),(0,H.chain)(H.values),H.flatten)(i),D=(0,f.KMQ)(L,S),Z=[{icon:ye.Z,tooltipTitle:m().text("Add crosswalk"),onClick:()=>N(!0),disabled:u,show:!!I},{icon:xe,tooltipTitle:m().text("Unmerge"),onClick:()=>b(),disabled:g,show:c},{icon:Ee.Z,tooltipTitle:m().text("Unsubscribe"),onClick:()=>k({contributorUri:n,dataTenant:D,crosswalk:I}),disabled:g,show:c&&!!D}];return o().createElement("div",{ref:P,className:be()(C.root,t)},o().createElement(Pe,{contributorUri:n,focusable:a&&!!I,isFocused:a&&j,onToggleFocus:U,contributorActions:Z}),i.map((e=>{let{source:t,crosswalksByTypes:n}=e;return o().createElement(he.Z,{key:t,source:t,crosswalksByTypes:n,showCrosswalkColors:!a,crosswalksFocusEnabled:!a,expanded:null==s?void 0:s.includes(t),disableEditCrosswalk:d,disableDeleteCrosswalk:p,onEdit:y,onDelete:v,onToggleExpanded:()=>E(t)})})),R&&o().createElement(fe.Z,{className:C.editor,onAdd:e=>x({contributorCrosswalk:I,crosswalk:e}),onClose:()=>N(!1)}))},Ne=(0,M.Z)((()=>({table:{overflowY:"auto",overflowX:"hidden",paddingLeft:"16px",paddingRight:"6px"},tableRow:{"& + &":{marginTop:"10px"},margin:"auto",maxWidth:"448px"}})));function Ie(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){Ue(e,t,n[t])}))}return e}function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const je=(0,r.memo)((e=>{let{accentContributors:t,entity:n,contributors:a,selectedAttributeTypes:i,onChangeVisibleCrosswalks:s,readOnly:c,canUnmerge:u,onAddCrosswalk:d=$.ZT,onEditCrosswalk:p=$.ZT,onDeleteCrosswalk:m=$.ZT,onUnmergeContributor:g=$.ZT,onUnsubscribeContributor:b=$.ZT}=e;const y=(0,l.useSelector)(h.ZP.selectors.getMetadata),v=(0,f.nt9)(y,n.type),x=Ne(),E=(0,r.useMemo)((()=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=e.crosswalks,o=(0,f.PUO)(e);return t.filter((e=>!(0,f.O27)(e.crosswalks))).map((t=>{let{uri:l,crosswalks:a}=t;return{contributorUri:l,crosswalksBySources:(0,H.pipe)((0,H.map)((e=>{if("relation"===e.ownerType){const t=o.find((0,f.aFF)(e));return t&&pe({ownerType:"relation"},t)}{const t=r.find((0,f.aFF)(e));return t&&pe({ownerType:"entity"},t)}})),(0,H.filter)((e=>!!e)),(0,ue.o)(e.type,n))(a)}})).filter((e=>{let{crosswalksBySources:t}=e;return t.length>0}))}(n,a,i)),[n,a,i]),[k,w]=(0,r.useState)({}),C=(0,r.useMemo)((()=>((e,t)=>e.reduce(((e,n)=>{let{contributorUri:r,crosswalksBySources:o}=n;const l=(0,H.chain)((e=>{var n;let{source:o,crosswalksByTypes:l}=e;const a=null===(n=t[r])||void 0===n?void 0:n.includes(o);return l[de.Y.Simple].concat(l[de.Y.Empty]).concat(a?l[de.Y.Dependent]:[])}),o);return e.concat(l)}),[]))(E,k)),[E,k]);(0,r.useEffect)((()=>{s(C)}),[C]);const S=(0,r.useCallback)((e=>{m({entityUri:null==n?void 0:n.uri,crosswalkId:e})}),[null==n?void 0:n.uri,m]),O=(0,r.useCallback)((e=>{p(Ie({},e,{entityUri:null==n?void 0:n.uri}))}),[null==n?void 0:n.uri,p]);return o().createElement("div",{className:x.table},E.map((e=>{let{contributorUri:r,crosswalksBySources:l}=e;return o().createElement(Re,{key:r,className:x.tableRow,canUnmerge:u,contributorUri:r,accentContributor:t,crosswalksBySources:l,disableAddCrosswalk:c||!(0,f.mkC)(v),disableEditCrosswalk:c||!(0,f.Zm0)(v),disableDeleteCrosswalk:c||!(0,f.a14)(v),disableUnmergeContributor:c||!(0,f.uGe)(f.BDP.UNMERGE,v),onAdd:e=>d(Ie({},e,{entity:n})),onDelete:S,onEdit:O,onUnmerge:()=>g(r),onUnsubscribeContributor:b,expandedSources:k[r],onToggleSourceExpanded:e=>{w((0,H.pipe)((0,H.unless)((0,H.has)(r),(0,H.assoc)(r,[])),(0,H.evolve)({[r]:(0,H.ifElse)((0,H.includes)(e),(0,H.without)([e]),(0,H.append)(e))})))}})})))}));var Le=n(81556);const De=(0,M.Z)((e=>({container:{display:"flex",flexDirection:"column","& + &":{marginLeft:"16px"}},title:{fontSize:"13px",lineHeight:"15px",color:"#666666",marginBottom:"7px"},hintIcon:{width:"16px",height:"16px",verticalAlign:"middle"},graph:{width:"400px",height:"300px",borderRadius:"8px",background:"rgba(0, 0, 0, 0.03)",border:"1px solid rgba(0, 0, 0, 0.03)",position:"relative"},checkedIcon:{position:"absolute",height:"20px",width:"20px",right:"10px",top:"10px",color:e.palette.primary.main},selectedTree:{border:`1px solid ${e.palette.primary.main}`,background:"rgba(0, 114, 206, 0.05)"}}))),Ze=e=>{let{coloredCrosswalks:t,crosswalkTree:n,selected:l,title:a,onSelect:i=$.ZT}=e;const s=De(),c=(0,r.useCallback)((e=>t.includes(e.uri)?(0,f.CJp)((0,f.uKF)(e)):"#CACCD1"),[t]);return o().createElement(O.hR,{getCrosswalkColor:c},o().createElement("div",{className:s.container,onClick:i},o().createElement("span",{className:s.title},a," ",o().createElement(F.Z,{className:s.hintIcon})),o().createElement("div",{className:be()(s.graph,{[`${s.selectedTree}`]:l})},l&&o().createElement(Le.Z,{className:s.checkedIcon}),o().createElement(ce,{crosswalkTree:n}))))},Me=(0,M.Z)((e=>({dialogContainer:{maxWidth:"unset"},dialogTitle:{padding:"13px 16px 0 16px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px"},dialogContent:{display:"flex",flexDirection:"column",padding:"13px 16px 0 16px"},trees:{display:"flex"},uri:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.primary,marginBottom:"15px"},title:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.secondary,paddingRight:"2px"}}))),Be=e=>{let{canUnmerge:t,contributor:n,crosswalkTree:l,onClose:a,onUnmergeContributor:i}=e;const s=Me(),[c,u]=(0,r.useState)(f.MBD.Unmerge),d=(0,r.useCallback)((e=>(0,f.keo)(n,e).map((e=>{let{uri:t}=e;return t}))),[n]);return o().createElement(j.Dialog,{open:!0,onClose:a,classes:{paper:s.dialogContainer}},o().createElement(j.DialogTitle,{classes:{root:s.dialogTitle}},m().text("Unmerge")),o().createElement(j.DialogContent,{classes:{root:s.dialogContent}},o().createElement(j.Typography,{variant:"body2",className:s.uri},o().createElement("span",{className:s.title},m().text("Entity URI:")),(0,f.nIW)(n.uri).toUpperCase()),o().createElement("div",{className:s.trees},o().createElement(Ze,{onSelect:()=>u(f.MBD.Unmerge),selected:c===f.MBD.Unmerge,title:m().text("Unmerge"),crosswalkTree:l,coloredCrosswalks:d(!0)}),n.merges&&n.uri!==l.uri&&o().createElement(Ze,{onSelect:()=>u(f.MBD.TreeUnmerge),selected:c===f.MBD.TreeUnmerge,title:m().text("Tree unmerge"),crosswalkTree:l,coloredCrosswalks:d(!1)}))),o().createElement(j.DialogActions,null,o().createElement(j.Button,{onClick:a},m().text("Cancel")),o().createElement(j.Button,{disabled:!t,onClick:()=>{i(c),a()},color:"primary"},m().text("Unmerge"))))},ze=(0,M.Z)((e=>({dialogContainer:{maxWidth:"unset"},dialogTitle:{padding:"13px 16px 0 16px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px"},dialogContent:{display:"flex",flexDirection:"column",padding:"13px 16px 0 16px"},uri:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.primary,marginBottom:"15px"},title:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.secondary,paddingRight:"2px"}}))),Fe=e=>{let{canUnsubscribe:t,contributor:n,crosswalkTree:l,onClose:a,onUnsubscribeContributor:i}=e;const s=ze(),c=(0,r.useMemo)((()=>(0,f.keo)(n,!0).map((e=>{let{uri:t}=e;return t}))),[n]);return o().createElement(j.Dialog,{open:!0,onClose:a,classes:{paper:s.dialogContainer}},o().createElement(j.DialogTitle,{classes:{root:s.dialogTitle}},m().text("Unsubscribe")),o().createElement(j.DialogContent,{classes:{root:s.dialogContent}},o().createElement(j.Typography,{variant:"body2",className:s.uri},o().createElement("span",{className:s.title},m().text("Entity URI:")),(0,f.nIW)(n.uri).toUpperCase()),o().createElement(Ze,{selected:!0,title:m().text("Unsubscribe"),crosswalkTree:l,coloredCrosswalks:c})),o().createElement(j.DialogActions,null,o().createElement(j.Button,{onClick:a},m().text("Cancel")),o().createElement(j.Button,{disabled:!t,onClick:()=>{i(),a()},color:"primary"},m().text("Unsubscribe"))))},He=(0,M.Z)((e=>({root:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%"},modeSwitcher:{backgroundColor:e.palette.background.paper,marginTop:"8px"},infoIcon:{fontSize:"18px",marginRight:"8px"},hint:{color:e.palette.text.secondary,display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"flex-start",margin:"5px 12px 10px 12px"},hintText:{fontSize:"12px",lineHeight:"16px"},crosswalksList:{height:"100%",width:"calc(100% - 24px)",margin:"8px 12px",background:e.palette.divider,opacity:.2},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"},resizablePanesWrapper:{flexGrow:1,width:"100%"}})));function $e(){return $e=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},$e.apply(this,arguments)}const Ae=(0,r.memo)((e=>{let{activeMode:t,contributors:n,crosswalkTree:l,entity:a,onChangeMode:i,onUnmergeContributor:s=$.ZT,onUnsubscribeContributor:c=$.ZT}=e,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(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)&&(o[n]=e[n])}return o}(e,["activeMode","contributors","crosswalkTree","entity","onChangeMode","onUnmergeContributor","onUnsubscribeContributor"]);const d=He(),p=(0,r.useRef)(),[h,g]=(0,r.useState)(170),b=(0,r.useCallback)((e=>{let{percentageSize:t}=e;return g(t)}),[]),[y,v]=(0,r.useState)(),[x,E]=(0,r.useState)(),k=(0,r.useMemo)((()=>(0,f.Qbq)(l)),[l]),w=k>1;(0,r.useEffect)((()=>{var e;const t=Math.max(170,60*k),n=(null===(e=p.current)||void 0===e?void 0:e.clientHeight)-170;g(Math.min(n,t))}),[k]);const C=(0,r.useMemo)((()=>[{id:W.Crosswalk,title:m().text("Crosswalk")},{id:W.Source,title:m().text("Source")},{id:W.Contributor,title:m().text("Contributor")}]),[]),[S,O]=(0,r.useState)(),P=t===W.Contributor;return o().createElement("div",{className:d.root,ref:p},y&&o().createElement(Be,{canUnmerge:w,onClose:()=>v(null),onUnmergeContributor:e=>{s({entityUri:a.uri,contributorUri:y,operationType:e})},crosswalkTree:l,contributor:n.find((e=>{let{uri:t}=e;return t===y}))}),x&&o().createElement(Fe,{canUnsubscribe:w,onClose:()=>E(null),onUnsubscribeContributor:()=>c({dataTenant:x.dataTenant,crosswalk:x.crosswalk}),crosswalkTree:l,contributor:n.find((e=>{let{uri:t}=e;return t===x.contributorUri}))}),o().createElement(A.Z,{modes:C,modeId:t,className:d.modeSwitcher,onChange:i}),o().createElement(T.Z,{className:d.resizablePanesWrapper,orientation:"horizontal",size:h,minSize:170,maxSize:-170,allowResize:!0,onChange:b},o().createElement("div",{className:d.pane},l&&!(0,H.isEmpty)(S)&&o().createElement(ce,{entityLabel:(0,f.idV)(null==a?void 0:a.label),crosswalkTree:l,visibleCrosswalks:S,accentContributors:P})),o().createElement("div",{className:d.pane},o().createElement("div",{className:d.hint},o().createElement(F.Z,{className:d.infoIcon}),o().createElement("span",{className:d.hintText},m().text("You can drag a crosswalk to add values to attributes swimlanes"))),a&&o().createElement(je,$e({onUnmergeContributor:v,onUnsubscribeContributor:E,accentContributors:P,contributors:n,entity:a,onChangeVisibleCrosswalks:O,canUnmerge:w},u)))))}));var We=n(85229);function qe(){return qe=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},qe.apply(this,arguments)}const Ge=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(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)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",qe({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("mask",{id:"svg4041339336a",masktype:"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"3",width:"19",height:"17"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S4.83 6.5 4 6.5 2.5 5.83 2.5 5zM21 20H8v-2h13v2zM8 10h13V8H8v2zm0-4V4h13v2H8zm0 10h13v-2H8v2zm-2.5.5v-3h-3v3h3z",fill:"#fff"})),o().createElement("g",{mask:"url(#svg4041339336a)"},o().createElement("path",{fillOpacity:".54",fill:"#000",d:"M0 0h24v24H0z"})))},_e=e=>{console.error(e),d.Z.addError({title:m().text("Error"),message:(0,f.xU7)(e,m().text("Something went wrong"))})};var Ve=n(39417),Xe=n(58651),Ye=n(13896);function Qe(){return Qe=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},Qe.apply(this,arguments)}const Ke=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(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)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",Qe({width:"90",height:"90",viewBox:"0 0 90 90",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("circle",{cx:"45",cy:"45",r:"45",fill:"#0072CE",fillOpacity:".1"}),o().createElement("mask",{id:"svg985456408a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"90",height:"90"},o().createElement("circle",{cx:"45",cy:"45",r:"45",fill:"#fff"})),o().createElement("g",{mask:"url(#svg985456408a)"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-5.625 3.164h90V90h-90V3.164z",fill:"url(#paint0_linear)"}),o().createElement("path",{opacity:".05",fillRule:"evenodd",clipRule:"evenodd",d:"M66.01 19.992l20.615 20.615v52.337H32.83L18.281 79.131V19.99H66.01z",fill:"url(#paint1_linear)"}),o().createElement("path",{opacity:".06",fillRule:"evenodd",clipRule:"evenodd",d:"M16.523 20.39H87.54A2.46 2.46 0 0190 22.853v55.195a2.46 2.46 0 01-2.46 2.46H16.522a2.46 2.46 0 01-2.46-2.46V22.852a2.46 2.46 0 012.46-2.461z",fill:"#000"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.578 19.688h70.664c.971 0 1.758.787 1.758 1.757v55.196c0 .97-.787 1.757-1.758 1.757H17.578c-.97 0-1.758-.787-1.758-1.757V21.445c0-.97.787-1.758 1.758-1.758z",fill:"#fff"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 25.536c0-.583.472-1.055 1.055-1.055h14.633a1.055 1.055 0 110 2.11H38.101a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 29.754c0-.582.472-1.054 1.055-1.054H60.54a1.055 1.055 0 110 2.11H37.969a1.055 1.055 0 01-1.055-1.056z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 57.305c0-.583.472-1.055 1.055-1.055h14.633a1.055 1.055 0 110 2.11H38.101a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 61.523c0-.582.472-1.054 1.055-1.054H60.54a1.055 1.055 0 110 2.11H37.969a1.055 1.055 0 01-1.055-1.056z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 67.852c0-.583.472-1.055 1.055-1.055h28.696a1.055 1.055 0 110 2.11H38.1a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 72.07c0-.582.472-1.054 1.055-1.054h26.087a1.055 1.055 0 110 2.109H37.97a1.055 1.055 0 01-1.055-1.055z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M48.648 36.21c0-.582.472-1.054 1.054-1.054h28.696a1.055 1.055 0 110 2.11H49.702a1.055 1.055 0 01-1.054-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M48.516 40.43c0-.583.472-1.055 1.054-1.055h22.572a1.055 1.055 0 110 2.11H49.57a1.055 1.055 0 01-1.054-1.055z",fill:"#979797"}),o().createElement("circle",{cx:"23.555",cy:"27.773",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"27.773",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"42.188",cy:"37.266",r:"2.109",fill:"#B6C7DB"}),o().createElement("circle",{cx:"42.188",cy:"47.813",r:"2.109",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"59.414",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"69.961",r:"3.164",fill:"#B6C7DB"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M48.648 46.758c0-.583.472-1.055 1.054-1.055h28.696a1.055 1.055 0 110 2.11H49.702a1.055 1.055 0 01-1.054-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M48.516 50.977c0-.583.472-1.055 1.054-1.055h26.088a1.055 1.055 0 110 2.11H49.57a1.055 1.055 0 01-1.054-1.055z",fill:"#979797"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M32.524 37.969v-2.813h-.703v14.191h3.93v-.703h-3.227v-9.972h3.227v-.703h-3.227z",fill:"#2B98F0"}),o().createElement("path",{opacity:".54",fillRule:"evenodd",clipRule:"evenodd",d:"M33.423 27.07l-1.242 1.243-1.243-1.243h2.485z",fill:"#000"}),o().createElement("path",{opacity:".6",fillRule:"evenodd",clipRule:"evenodd",d:"M17.578 7.734h65.39a2.11 2.11 0 012.11 2.11v6.328a2.11 2.11 0 01-2.11 2.11h-65.39a2.11 2.11 0 01-2.11-2.11V9.844a2.11 2.11 0 012.11-2.11z",fill:"#fff"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M20.39 13.008a2.11 2.11 0 012.11-2.11h24.61a2.11 2.11 0 110 4.22H22.5a2.11 2.11 0 01-2.11-2.11zM52.031 13.008a2.11 2.11 0 012.11-2.11h3.515a2.11 2.11 0 110 4.22h-3.515a2.11 2.11 0 01-2.11-2.11z",fill:"#979797"})),o().createElement("defs",null,o().createElement("linearGradient",{id:"paint0_linear",x1:"-5.625",y1:"3.164",x2:"-5.625",y2:"90",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:".01"}),o().createElement("stop",{offset:"1",stopColor:"#F4F4F4"})),o().createElement("linearGradient",{id:"paint1_linear",x1:"93.557",y1:"63.672",x2:"54.451",y2:"27.31",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:".01"}),o().createElement("stop",{offset:"1"}))))},Je=(0,M.Z)((e=>({root:{height:"100%",overflow:"hidden",background:e.palette.background.default,display:"flex",flexDirection:"column",alignItems:"center",paddingTop:"115px"},info:{color:e.palette.text.secondary,fontSize:"16px",lineHeight:"24px",marginTop:"16px"}}))),et=()=>{const e=Je();return o().createElement("div",{className:e.root},o().createElement(Ke,null),o().createElement("span",{className:e.info},m().text("Please persist your profile to be able to edit crosswalks")))};var tt=n(72383);const nt=(0,M.Z)({snackbarMessage:{display:"flex",alignItems:"center"},snackbarIcon:{paddingRight:16}}),rt=e=>{let{entity:t,message:n}=e;const a=nt(),i=(0,l.useSelector)(h.ZP.selectors.getUIPath),{generateEntityUrl:s}=(0,r.useContext)(tt.v),c=s({uiPath:i,uri:t.uri});return o().createElement("div",{className:a.snackbarMessage},o().createElement(F.Z,{className:a.snackbarIcon}),o().createElement(j.Typography,null,(0,f.idV)(t.label)," ",o().createElement(j.Link,{href:c,target:"_blank"},m().text("lookup profile"))," ",n))};var ot=n(24737);const lt=(0,M.Z)((e=>({root:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingTop:"14px",paddingBottom:"13px",borderBottom:"1px solid rgba(0, 0, 0, 0.05)",whiteSpace:"normal","&:last-child":{borderBottom:"none"}},label:{marginBottom:"2px",fontSize:"16px",lineHeight:"24px",color:e.palette.text.primary},description:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.secondary}})));function at(){return at=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},at.apply(this,arguments)}const it=e=>{let{innerRef:t,innerProps:n,data:r}=e;const l=lt(),{label:a,description:i}=r;return o().createElement(j.MenuItem,at({className:l.root,ref:t},n),o().createElement(j.Typography,{className:l.label},a),i&&o().createElement(j.Typography,{className:l.description},i))};function st(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ct=e=>{const{innerRef:t,getStyles:n,children:r}=e,l=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){st(e,t,n[t])}))}return e}({},n("menuList",e),{maxHeight:"500px",padding:0});return o().createElement("div",{ref:t,style:l},r)},ut=(0,M.Z)({root:{width:"280px"}});function dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const pt=e=>{let{survivorshipGroups:t,currentSurvivorshipGroupUri:n,onChange:r}=e;const l=ut(),a=t.map((e=>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){dt(e,t,n[t])}))}return e}({},e,{label:(0,f.idV)(e.label)}))),i=a.find((0,H.propEq)("uri",n));return o().createElement(ot.Z,{height:40,className:l.root,components:{Option:it,MenuList:ct},label:m().text("Rulesets"),options:a,value:i,onChange:(0,H.pipe)((0,H.prop)("uri"),r)})},mt=(0,M.Z)({sourcesView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowX:"hidden",overflowY:"auto",fontFamily:"Roboto, Helvetica, Arial, sans-serif",display:"flex"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},resizablePanesWrapper:{flexGrow:1,height:"100%"},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"},tabs:{marginLeft:"1px"},headerDivider:{marginLeft:"16px",marginRight:"8px",height:"32px",backgroundColor:"rgba(0, 0, 0, 0.12)"},attributesTable:{backgroundColor:"#fff"}});var ht;!function(e){e[e.Legend=0]="Legend",e[e.History=1]="History"}(ht||(ht={}));const ft=(0,l.connect)((e=>({entity:h.ZP.selectors.getEntity(e),metadata:h.ZP.selectors.getMetadata(e),historyEvent:h.ZP.selectors.getHistoryEvent(e)})))((e=>{var t,n;let{config:a,entity:i,metadata:s,getSavedState:c,saveState:u,dispatch:d,historyEvent:p}=e;const D=mt(),[Z,M]=(0,r.useState)(W.Crosswalk),[B,F]=(0,r.useState)(0),[A,q]=(0,r.useState)(!1),G=e=>F((t=>t===e?null:e)),_=null!==B,{survivorshipGroups:V,currentSurvivorshipGroupUri:X,onChangeSurvivorshipGroup:Y,entity:Q,isDefaultSurvivorshipGroupUri:K,isLoading:J}=(e=>{const t=null==e?void 0:e.type,n=(0,l.useSelector)(h.ZP.selectors.getMetadata),o=(0,H.pipe)((0,f.nt9)(n),(0,H.propOr)([],"survivorshipGroups"))(t),a=(0,H.pipe)((0,H.find)((0,H.propEq)("default",!0)),(0,H.prop)("uri"))(o),[i,s]=(0,r.useState)(null),[c,u]=(0,r.useState)(null),[d,p]=(0,r.useState)(!1),m=(0,We._)();return(0,r.useEffect)((()=>{e&&(u(e),s(a))}),[e,a]),{survivorshipGroups:o,currentSurvivorshipGroupUri:i,onChangeSurvivorshipGroup:(0,r.useCallback)((t=>{s(t),a===t?u(e):(p(!0),m((0,f.BXy)(c.uri,t)).then(u).finally((()=>p(!1))))}),[e,a,c,m]),entity:c,isLoading:d,isDefaultSurvivorshipGroupUri:a===i}})(i),ee=B===ht.History,{isHistoryEnabled:te,isProfilePersisted:ne}=(0,g.C)({isHistoryTabActive:ee,entity:Q}),re=ne?Q:null,oe=null==re?void 0:re.uri,le=(0,f.nt9)(s,null==Q?void 0:Q.type),{historySlice:ae}=(0,b.a)({entity:re,historyEvent:p}),[ie,se]=(0,r.useState)();(0,y.D)((()=>{se(void 0)}),[ae]),(0,y.D)((()=>{se(void 0)}),[oe]);const[ce,ue]=(0,r.useState)(-480),de=(0,r.useCallback)((e=>{let{percentageSize:t}=e;return ue(t)}),[]),{SnackbarRenderer:pe,showSnackbarMessage:me}=(0,v.D)({anchorOrigin:{vertical:"top",horizontal:"center"},showDismiss:!0}),{isLoaded:he,savedState:fe}=(0,x.a)(c),[ge,be]=(0,r.useState)();(0,r.useEffect)((()=>{he&&be(fe.visibleColumns)}),[he]),(0,r.useEffect)((()=>{const e=!(0,H.equals)(ge,fe.visibleColumns);he&&e&&u({visibleColumns:ge})}),[ge]);const ye=(0,r.useCallback)((()=>{q(!1)}),[]),{crosswalkTree:ve,reload:xe}=(e=>{let{entityUri:t,onSuccess:n=$.ZT}=e;const[o,l]=(0,r.useState)(null),a=(0,We._)(),i=e=>{console.warn("Failed to load crosswalk tree",e),l(null)},s=(0,r.useCallback)((()=>{t?a((0,f.wo0)({entityUri:t})).then((e=>{l(e)})).catch(i).finally(n):(l(null),n())}),[t,n]);return(0,r.useEffect)((()=>{s()}),[s]),{crosswalkTree:o,reload:s}})({entityUri:(null==ae?void 0:ae.aEntity.uri)||oe,onSuccess:ye}),Ee=(0,r.useMemo)((()=>(0,f.b7X)(ve)),[ve]),ke=(0,r.useCallback)((()=>{oe&&d(h.N5.entity.actions.loadEntity({viewId:a.id,uri:oe}))}),[oe,a,d]),we=(0,r.useCallback)((0,H.pipe)(ke,xe),[ke,xe]),Ce=(0,r.useCallback)(((e,t)=>{me(t?o().createElement(rt,{entity:t,message:e}):e)}),[]),{modifiedEntity:Se,crosswalksMap:Oe,newlyCreatedAttributes:Pe,onDeleteAttribute:Te,onPinAttribute:Re,onIgnoreAttribute:Ne,onEditAttribute:Ie,onAddAttribute:Ue}=(0,E.Q)({entity:(null==ae?void 0:ae.aEntity)||re,onModify:we,onError:_e}),{addCrosswalk:je,deleteCrosswalk:Le,editCrosswalk:De,unmergeContributor:Ze,unsubscribeContributor:Me}=(e=>{let{onLoad:t=$.ZT,onSuccess:n=$.ZT,onError:o=$.ZT,onShowMessage:a=$.ZT}=e;const{addCrosswalk:i,editCrosswalk:s,deleteCrosswalk:c}=(0,Ve.P)({onLoad:t,onSuccess:n,onError:o}),u=(0,l.useSelector)(h.ZP.selectors.getDtssPath),d=(0,l.useSelector)(h.ZP.selectors.getTenant),p=(0,r.useCallback)((e=>{t(),e.then((()=>{n()})).catch(o)}),[t,o,n]);return{addCrosswalk:i,editCrosswalk:s,deleteCrosswalk:c,unmergeContributor:(0,r.useCallback)((e=>(0,H.pipe)(f.L8n,(0,H.andThen)((e=>(a(m().text("has been unmerged"),e.b),e))),p)(e)),[p,a]),unsubscribeContributor:(0,r.useCallback)((e=>{let{crosswalk:t,dataTenant:n}=e;return(0,H.pipe)(f.R9X,(0,H.andThen)((e=>{if(!e.successful)throw new Error(m().text("Failed to unsubscribe contributor"));return e})),p)({dtssPath:u,value:t.value,type:t.type,sourceTable:t.sourceTable,dataTenant:n.id,customerTenant:d})}),[p,u,d])}})({onShowMessage:Ce,onSuccess:we,onError:(0,r.useCallback)((e=>{_e(e),e.errorCode===f.Xt7.CROSSWALK_NOT_FOUND&&we()}),[we]),onLoad:(0,r.useCallback)((()=>q(!0)),[])}),{historyFilter:Be,onApplyFilter:ze,isLoading:Fe,historicUris:He,historyWithTotal:$e,canLoadMore:qe,onLoadMore:Qe}=(0,k.k6)({entity:re,enabled:te}),Ke=(e=>{let{activeMode:t,contributors:n,entity:o}=e;const l=(0,r.useCallback)((e=>{var r;switch(t){case W.Source:return(0,f.kW2)(e.type);case W.Contributor:return(0,f.GtP)((null===(r=(0,f.A1W)(n,e))||void 0===r?void 0:r.uri)||"");case W.Crosswalk:return(0,f.CJp)((0,f.uKF)(e))}}),[t,n]),[a,i]=(0,r.useState)([]),s=(0,r.useRef)([]),c=(0,r.useCallback)((0,f.DsO)((()=>{i([...s.current])}),50),[]),u=(0,r.useCallback)((e=>{s.current=e,c(e)}),[c]),d=(0,r.useCallback)(((e,r)=>{if(e)if(r)if(t===W.Contributor){const t=(0,f.A1W)(n,e);u([e,...(null==t?void 0:t.crosswalks)||[]])}else u([e]);else u([])}),[t,u,n]),[p,m]=(0,r.useState)([]),h=(0,r.useCallback)(((e,t)=>(0,H.concat)(e.filter((e=>!(0,H.any)((0,f.aFF)(e),t))),t.filter((t=>!(0,H.any)((0,f.aFF)(t),e))))),[]),g=(0,r.useCallback)((e=>{if(e)if(t===W.Contributor){const t=(0,f.A1W)(n,e);m((n=>h([e,...(null==t?void 0:t.crosswalks)||[]],n)))}else m((t=>h([e],t)))}),[t,h,n]);return(0,r.useEffect)((()=>{p.length&&m([])}),[t,o]),{getCrosswalkColor:l,highlightedCrosswalks:(0,r.useMemo)((()=>[...a,...p]),[a,p]),focusedCrosswalks:p,toggleCrosswalkFocus:g,setCrosswalkHighlighted:d}})({activeMode:Z,contributors:Ee,entity:Q}),Je=[{buttonProps:{id:ht.Legend,icon:Ge,tooltipTitle:m().text("Legend")},title:o().createElement(j.Typography,{variant:"h6"},m().text("Legend")),content:o().createElement(Ae,{activeMode:Z,onChangeMode:M,entity:(null==ae?void 0:ae.aEntity)||re,crosswalkTree:ve,contributors:Ee,selectedAttributeTypes:ie,readOnly:!!ae||A,onAddCrosswalk:je,onUnmergeContributor:Ze,onUnsubscribeContributor:Me,onEditCrosswalk:De,onDeleteCrosswalk:Le})},{buttonProps:{id:ht.History,icon:L.Z,tooltipTitle:m().text("History")},title:o().createElement(w.Z,{total:((null==He?void 0:He.length)||0)+1,entityType:le,filter:Be,onApplyFilter:ze}),content:ne?o().createElement(C.Z,{isLoading:Fe,historyWithTotal:$e,contributorsUris:He,entityUri:oe,historyEvent:p,onLoadMore:Qe,canLoadMore:qe}):o().createElement(S.Z,null)}],tt=o().createElement(o().Fragment,null,o().createElement(pt,{survivorshipGroups:V,currentSurvivorshipGroupUri:X,onChange:Y}),o().createElement(j.Divider,{className:D.headerDivider,orientation:"vertical"}));return o().createElement("div",{className:D.sourcesView},o().createElement(O.hR,Ke,o().createElement(Ye.DndProvider,{backend:Xe.default},o().createElement(P.Z,null),o().createElement(T.Z,{className:D.resizablePanesWrapper,orientation:"vertical",size:_?ce:"100%",minSize:480,maxSize:-480,allowResize:_,onChange:de},o().createElement("div",{className:D.pane},o().createElement(R.n,{entity:Q,historySlice:ae}),ne?o().createElement(N.R,{attributeUris:Pe},o().createElement(I.Z,{className:D.attributesTable,isLoading:J,visibleColumns:ge,onChangeVisibleColumns:be,entity:Se,crosswalksMap:Oe,selectedAttributeTypes:ie,onSelectAttributeTypes:se,readOnly:!!ae||!K,onDelete:Te,onPin:Re,onIgnore:Ne,onEdit:Ie,onAdd:Ue,additionalHeaderItems:tt,activeSurvivorshipGroupUri:X})):o().createElement(et,null)),o().createElement(z,{className:D.pane,title:null===(t=Je[B])||void 0===t?void 0:t.title,onClose:()=>G(B)},null===(n=Je[B])||void 0===n?void 0:n.content)))),o().createElement(U.G,{className:D.tabs,buttonsProps:(0,H.pipe)((0,H.reject)((0,H.propEq)("hidden",!0)),(0,H.pluck)("buttonProps"))(Je),onButtonClick:G,activeIndexId:B}),o().createElement(pe,null))})),gt=(0,i.createGenerateClassName)({productionPrefix:"sourcesPerspective",disableGlobal:!0}),bt=e=>{let{config:t,store:n,onResize:p,saveState:m,getSavedState:h}=e;const g=(0,r.useCallback)((0,f.aYu)(h),[h]);return o().createElement(l.Provider,{store:n},o().createElement(u.m.Provider,{value:t.id},o().createElement(i.StylesProvider,{generateClassName:gt},o().createElement(c.MuiPickersUtilsProvider,{utils:a.Z},o().createElement(s.Z,{handleHeight:!0,onResize:(e,t)=>null==p?void 0:p(Math.floor(e),Math.floor(t))}),t&&o().createElement(ft,{config:t,saveState:m,getSavedState:g}),o().createElement(d.Z,null)))))}}}]);
|
|
2
2
|
//# sourceMappingURL=3575.js.map
|