@reltio/remotes 1.4.1157 → 1.4.1158

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.
Files changed (3) hide show
  1. package/4754.js +1 -1
  2. package/6971.js +1 -1
  3. package/package.json +1 -1
package/4754.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[4754],{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:()=>p});var r=n(24328),o=n.n(r),l=n(52730),a=n(71153),i=n.n(a),s=n(94079),c=n(58991),u=n(59431);const d=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),p=e=>{let{entity:t,className:n,size:r="small"}=e;const a=d(),p=(0,l.useSelector)(u.ZP.selectors.getMetadata),m=t.type,g=(0,c.nt9)(p,m)||{},h=(0,c.VD3)(p,g,"typeColor")||c.rSc.palette.primary.main;return o().createElement(s.Typography,{style:{backgroundColor:h,color:c.P6Y.Colors.getColor(h)?"#FFFFFF":"#212121"},className:i()(a[`entityType-${r}`],n),component:"div"},(0,c.jFi)(p,t))}},57304:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(24328),o=n.n(r),l=n(13980),a=n.n(l),i=n(71153),s=n.n(i),c=n(52730),u=n(17440),d=n(94079),p=n(87918),m=n.n(p),g=n(58991),h=n(59431),f=n(53180),y=n(68439);const b=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),v=e=>{let{className:t,entity:n,children:l,classes:a}=e;const i=b({classes:a}),p=(0,c.useSelector)(h.ZP.selectors.getMetadata),v=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,g.BTI)(n))}),[n]);if((0,u.isNil)(n))return null;const x=(0,g.idV)(n.label),k=n.secondaryLabel,E=(0,g.ptG)(p,n),w=(0,g.Fn9)(n),C=n.uri,S=(0,g.BTI)(n);return o().createElement("div",{className:s()(i.profileBandWrapper,t)},o().createElement("div",{className:s()(i.profileBand,{[i.inactive]:!w}),"data-entity-uri":C},o().createElement(f.Z,{key:n.uri,entity:n,avatarClassName:i.profileIcon,imageClassName:i.imageProfileIcon}),o().createElement("div",{className:i.profileInfo},o().createElement("div",null,o().createElement(d.Typography,{variant:"h6",className:i.label},x),k&&o().createElement(d.Typography,{variant:"subtitle2",className:i.secondaryLabel},k),E&&o().createElement(d.Typography,{variant:"subtitle1",className:i.businessCard},E)),o().createElement("div",{className:i.specialInfo},o().createElement("div",{className:i.entityType},o().createElement(y.Z,{entity:n,size:"medium",className:i.badge}),!(0,g.ZiX)(C)&&o().createElement(d.Tooltip,{title:m().text("Copy to clipboard")},o().createElement(d.Typography,{display:"inline",variant:"body2",className:i.entityId,onClick:v},m().text("Entity ID"),": ",S))))),l&&o().createElement("div",null,l)))};v.propTypes={className:a().string,entity:a().object,children:a().node,classes:a().object};const x=v},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}}},24605:(e,t,n)=>{n.d(t,{D:()=>c});var r=n(24328),o=n.n(r),l=n(87918),a=n.n(l),i=n(94079),s=n(37265);const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{anchorOrigin:t,showDismiss:n}=e,[l,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(""),p=(0,r.useCallback)((()=>{c(!1),d("")}),[]),m=(0,r.useCallback)((e=>{c(!0),d(e)}),[]),g=(0,r.useCallback)((()=>o().createElement(i.Portal,{container:document.body},o().createElement(s.Z,{open:l,anchorOrigin:t,autoHideDuration:5e3,onClose:p,message:u,action:n?o().createElement(i.Button,{color:"primary",onClick:p},a().text("Dismiss")):void 0}))),[l,p,u]);return{SnackbarRenderer:g,showSnackbarMessage:m}}},23352:(e,t,n)=>{n.r(t),n.d(t,{default:()=>it});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),g=n(59431),h=n(58991),f=n(71820),y=n(57730),b=n(20562),v=n(24605),x=n(2804),k=n(85965),E=n(85890),w=n(91515),C=n(54362),S=n(6674),T=n(63149),O=n(6521),M=n(48017),N=n(96955),R=n(57304),z=n(3409),L=n(93873),P=n(66095),U=n(20982),D=n(39827),Z=n(94079),B=n(80147),H=n(87685),F=n(22385),I=n(79692);const j=(0,I.Z)({header:{display:"flex",flexDirection:"row",alignItems:"center",padding:"16px 12px",borderBottom:"1px solid rgba(0, 0, 0, 0.12);"},closeButton:{marginRight:"12px"}}),$=e=>{let{title:t,className:n,onClose:r,children:l}=e;const a=j();return o().createElement("div",{className:n},o().createElement("div",{className:a.header},o().createElement(F.Z,{className:a.closeButton,icon:H.default,onClick:r}),t),l)};var A=n(99144),W=n(17440),V=n(31276),X=n(83401);let G;!function(e){e.Crosswalk="crosswalks",e.Source="source",e.Contributor="contributor"}(G||(G={}));const Y=e=>(0,W.pipe)((0,W.map)((0,W.prop)("value")),W.sum)(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){q(e,t,n[t])}))}return e}function q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const K=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(Y(e.sourceLinks),Y(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,W.pipe)((0,W.groupBy)((0,W.prop)("x")),W.toPairs,(0,W.sort)(((e,t)=>e[0]-t[0])),(0,W.map)((0,W.nth)(1)))(l);(function(){let e=(0,W.pipe)((0,W.map)((e=>(o[1]-(e.length-1)*r)/Y(e))),(0,W.reduce)(Math.min,1/0))(i);const s=(0,W.pipe)((0,W.map)((e=>{var t;return e.value/((null===(t=e.targetLinks)||void 0===t?void 0:t.length)||1)})),(0,W.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,W.pipe)((0,W.map)((e=>(e.length-1)*r+(0,W.sum)((0,W.map)((e=>e.dy),e)))),(0,W.reduce)(Math.max,0))(i),c=(o[1]-s)/2;i.forEach((e=>{const{y:t,dy:n}=(0,W.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,W.pipe)((0,W.groupBy)((0,W.prop)("x")),W.toPairs,(0,W.sort)(((e,t)=>t[0]-e[0])),(0,W.map)((0,W.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,W.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,W.pipe)((0,W.groupBy)((0,W.prop)("x")),W.toPairs,(0,W.sort)(((e,t)=>e[0]-t[0])),(0,W.map)((0,W.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=>_({},e))),n=n=>{const r=e.nodes.indexOf(n);return t[r]},r=e.links.map((e=>_({},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 Q=n(94111),J=n(12147),ee=n(98685);const te=(0,I.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"}}),ne=e=>{let{user:t,time:n,children:r}=e;const l=te(),a=o().createElement("div",null,o().createElement("span",{className:l.tooltipTitle},m().text("Merge details")),o().createElement("div",{className:l.tooltipRow},o().createElement(J.Z,{className:l.tooltipIcon}),m().date(n,"L LTS")),o().createElement("div",{className:l.tooltipRow},o().createElement(ee.Z,{className:l.tooltipIcon}),t));return o().createElement(Q.Z,{title:a,placement:"top"},r)},re=e=>{let{node:t,nodeWidth:n,highlightEnabled:l,isColored:a}=e;const i=te(),[s,c]=(0,r.useState)(0),u=(0,r.useRef)(null),{x:d,y:p,name:m,label:g,targetLinks:h,sourceLinks:f,entity:{crosswalks:y=[],merges:b}}=t,[v]=y,{isDimmed:x,highlightCrosswalk:k,removeHighlight:E}=(0,T.pu)(v),w=(0,T.nX)(v),C=null!=y&&y.length?f[y.length-1].sy+f[y.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},g||""):o().createElement(o().Fragment,null,o().createElement("rect",{height:C,width:14,className:i.node,fill:a?w:"#F0F0F0",key:"node-main",opacity:l&&x?.19:1,onMouseEnter:()=>{l&&k()},onMouseLeave:()=>{l&&E()}}),!(null==h||!h.length)&&(()=>{const e=(0,W.pipe)((0,W.map)((0,W.prop)("source")),(0,W.groupBy)((0,W.prop)("time")))(h);return null==b?void 0:b.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,W.min)((0,W.head)(n).ty,e[0]),(0,W.max)((0,W.last)(n).ty+(0,W.last)(n).dy,e[1])]}),[1/0,0]);return o().createElement(ne,{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}))}))})()))},oe=e=>{let{link:t,path:n,highlightEnabled:r,isColored:l}=e;const{crosswalk:a}=t,i=(0,T.nX)(a),{isDimmed:s,highlightCrosswalk:c,removeHighlight:u}=(0,T.pu)(a);return o().createElement("path",{d:n,fill:l?i:"#F0F0F0",opacity:r&&s?.1:1,onMouseEnter:()=>{r&&c()},onMouseLeave:()=>{r&&u()}})},le=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:g,nodeWidth:h,path:f}=K({data:l,width:t,height:n});(0,r.useEffect)((()=>{p(0),u(0)}),[t,n]);const y=(0,r.useMemo)((()=>g.map(((e,t)=>o().createElement(re,{highlightEnabled:a,isColored:a,node:e,nodeWidth:h,key:`SankeyNode-${t}`})))),[g,a,h,t,n]),b=(0,r.useMemo)((()=>m.map(((e,t)=>o().createElement(oe,{highlightEnabled:!a,isColored:!a,link:e,path:f(e),key:`SankeyLink-${t}`})))),[a,m,f]),v=e=>{const t=e.pageX,n=t-c;return u(t),n},x=()=>s(!1),k=i?"none":"auto",E=i?"move":"default";return o().createElement("svg",{width:t,height:n,cursor:E,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("g",{transform:`translate(${d},${n-1}) rotate(-90)`,pointerEvents:k},o().createElement("g",null,b),o().createElement("g",null,y)))};function ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ie=(0,W.curry)(((e,t)=>!e||e.some((0,h.aFF)(t)))),se=(0,W.curry)(((e,t)=>(0,W.evolve)({crosswalks:(0,W.filter)(ie(e)),merges:(0,W.map)((0,W.evolve)({losers:(0,W.map)(se(e))}))},t))),ce=e=>{let t=1;const n=(0,W.pipe)((0,W.evolve)({crosswalks:(0,W.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){ae(e,t,n[t])}))}return e}({},e,{uuid:t++})))}),(0,W.evolve)({merges:(0,W.map)((0,W.evolve)({losers:(0,W.map)((e=>n(e)))}))}));return n(e)},ue=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,W.pipe)((0,W.chain)((e=>{let{losers:t,time:n}=e;return(0,W.pipe)((0,W.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,W.chain)((e=>r(e,u,n))))(t)})),(0,W.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,W.pipe)((0,W.chain)((e=>{let{source:t,target:n}=e;return[t,n]})),W.uniq)(n);return{nodes:t.filter((e=>o.includes(e))),links:n}},de=(0,I.Z)((()=>({graph:{padding:"8px 0px",boxSizing:"border-box",height:"100%",width:"100%"}}))),pe=(0,r.memo)((e=>{let{crosswalkTree:t,entityLabel:n,visibleCrosswalks:r,accentContributors:l}=e;const a=de(),i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return(0,W.pipe)(se(n),ce,ue)({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(le,{width:t,height:n,data:i,accentContributors:l})})))}));var me=n(90186),ge=n(77243);function he(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){fe(e,t,n[t])}))}return e}function fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ye=n(52017),be=n(79769),ve=n(71153),xe=n.n(ve),ke=n(72753),Ee=n(65549);function we(){return we=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},we.apply(this,arguments)}const Ce=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",we({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:"svg457070356a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("mask",{id:"svg457070356b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg457070356a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg457070356b)",d:"M0 0h24v24H0z"})))};var Se=n(22983),Te=n(8818),Oe=n(51229);const Me=(0,I.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}}))),Ne=e=>{let{contributorUri:t,focusable:n,disableAdd:r,disableUnmerge:l,onAdd:a,onUnmerge:i,onToggleFocus:s,onUnsubscribe:c,isFocused:u}=e;const d=Me({isFocused:u});return o().createElement("div",{className:d.root},o().createElement(Te.k,{size:"XXS",onClick:()=>s(),className:d.focusedIcon,icon:n&&ke.Z,disabled:!n,tooltipTitle:n&&m().text("Focus")}),o().createElement(Z.Typography,{variant:"body2",className:d.uri},o().createElement("span",{className:d.title},m().text("Entity ID:")),(0,h.nIW)(t)),o().createElement(Oe.Z,null),a&&o().createElement(Te.k,{size:"XS",icon:Ee.Z,disabled:r,tooltipTitle:m().text("Add crosswalk"),showForDisabled:!0,onClick:()=>a()}),o().createElement(Te.k,{size:"XS",icon:Ce,disabled:l,tooltipTitle:m().text("Unmerge"),showForDisabled:!0,onClick:()=>i()}),c&&o().createElement(Te.k,{size:"XS",icon:Se.Z,disabled:l,tooltipTitle:m().text("Unsubscribe"),showForDisabled:!0,onClick:()=>c()}))},Re=(0,I.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"}}))),ze=e=>{let{className:t,contributorUri:n,accentContributor:a,crosswalksBySources:i,expandedSources:s,disableAddCrosswalk:c,disableEditCrosswalk:u,disableDeleteCrosswalk:d,disableUnmergeContributor:p,onUnmerge:m,onEdit:f,onDelete:y,onAdd:b,onToggleSourceExpanded:v,onUnsubscribeContributor:x}=e;const k=a?(0,h.GtP)(n):"rgba(0, 0, 0, 0.38)",E=Re({contributorColor:k}),w=(0,l.useSelector)(g.ZP.selectors.getDataTenants),C=(0,r.useRef)(null),[S]=(0,T.RT)();(0,r.useEffect)((()=>{var e;a&&S&&((0,W.pipe)((0,W.find)((e=>{let{source:t}=e;return t===S.type})),(0,W.propOr)({},"crosswalksByTypes"),W.values,W.flatten)(i).some((e=>(0,h.aFF)(S,e)&&e!==S))&&(null==C||null===(e=C.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})))}),[S]);const[O,M]=(0,r.useState)(!1),N=(0,W.pipe)((0,W.pluck)("crosswalksByTypes"),(0,W.find)((e=>e[ge.Y.Simple].length||e[ge.Y.Empty].length)),(0,W.props)([ge.Y.Simple,ge.Y.Empty]),W.flatten,W.head)(i),{toggleCrosswalkFocus:R,isFocused:z}=(0,T.BF)(N),L=(0,W.pipe)((0,W.pluck)("crosswalksByTypes"),(0,W.chain)(W.values),W.flatten)(i),P=(0,h.KMQ)(L,w);return o().createElement("div",{ref:C,className:xe()(E.root,t)},o().createElement(Ne,{contributorUri:n,focusable:a&&!!N,disableAdd:c,disableUnmerge:p,isFocused:a&&z,onToggleFocus:R,onAdd:N&&(()=>M(!0)),onUnmerge:m,onUnsubscribe:P&&(()=>x({contributorUri:n,dataTenant:P,crosswalk:N}))}),i.map((e=>{let{source:t,crosswalksByTypes:n}=e;return o().createElement(ye.Z,{key:t,source:t,crosswalksByTypes:n,showCrosswalkColors:!a,crosswalksFocusEnabled:!a,expanded:null==s?void 0:s.includes(t),disableEditCrosswalk:u,disableDeleteCrosswalk:d,onEdit:f,onDelete:y,onToggleExpanded:()=>v(t)})})),O&&o().createElement(be.Z,{className:E.editor,onAdd:e=>b({contributorCrosswalk:N,crosswalk:e}),onClose:()=>M(!1)}))},Le=(0,I.Z)((()=>({table:{overflowY:"auto",overflowX:"hidden",paddingLeft:"16px",paddingRight:"6px"},tableRow:{"& + &":{marginTop:"10px"},margin:"auto",maxWidth:"448px"}})));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){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 De=(0,r.memo)((e=>{let{accentContributors:t,entity:n,contributors:a,selectedAttributeTypes:i,onChangeVisibleCrosswalks:s,readOnly:c,onAddCrosswalk:u=V.ZT,onEditCrosswalk:d=V.ZT,onDeleteCrosswalk:p=V.ZT,onUnmergeContributor:m=V.ZT,onUnsubscribeContributor:f=V.ZT}=e;const y=(0,l.useSelector)(g.ZP.selectors.getMetadata),b=(0,h.nt9)(y,n.type),v=Le(),x=(0,r.useMemo)((()=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=e.crosswalks,o=(0,h.HQx)(e);return t.filter((e=>!(0,h.O27)(e.crosswalks))).map((t=>{let{uri:l,crosswalks:a}=t;return{contributorUri:l,crosswalksBySources:(0,W.pipe)((0,W.map)((e=>{if("relation"===e.ownerType){const t=o.find((0,h.aFF)(e));return t&&he({ownerType:"relation"},t)}{const t=r.find((0,h.aFF)(e));return t&&he({ownerType:"entity"},t)}})),(0,W.filter)((e=>!!e)),(0,me.o)(e.type,n))(a)}})).filter((e=>{let{crosswalksBySources:t}=e;return t.length>0}))}(n,a,i)),[n,a,i]),[k,E]=(0,r.useState)({}),w=(0,r.useMemo)((()=>((e,t)=>e.reduce(((e,n)=>{let{contributorUri:r,crosswalksBySources:o}=n;const l=(0,W.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[ge.Y.Simple].concat(l[ge.Y.Empty]).concat(a?l[ge.Y.Dependent]:[])}),o);return e.concat(l)}),[]))(x,k)),[x,k]);(0,r.useEffect)((()=>{s(w)}),[w]);const C=(0,r.useCallback)((e=>{p({entityUri:null==n?void 0:n.uri,crosswalkId:e})}),[null==n?void 0:n.uri,p]),S=(0,r.useCallback)((e=>{d(Pe({},e,{entityUri:null==n?void 0:n.uri}))}),[null==n?void 0:n.uri,d]);return o().createElement("div",{className:v.table},x.map((e=>{let{contributorUri:r,crosswalksBySources:l}=e;return o().createElement(ze,{key:r,className:v.tableRow,contributorUri:r,accentContributor:t,crosswalksBySources:l,disableAddCrosswalk:c||!(0,h.mkC)(b),disableEditCrosswalk:c||!(0,h.Zm0)(b),disableDeleteCrosswalk:c||!(0,h.a14)(b),disableUnmergeContributor:c||!(0,h.uGe)(h.BDP.UNMERGE,b),onAdd:e=>u(Pe({},e,{entity:n})),onDelete:C,onEdit:S,onUnmerge:()=>m(r),onUnsubscribeContributor:f,expandedSources:k[r],onToggleSourceExpanded:e=>{E((0,W.pipe)((0,W.unless)((0,W.has)(r),(0,W.assoc)(r,[])),(0,W.evolve)({[r]:(0,W.ifElse)((0,W.includes)(e),(0,W.without)([e]),(0,W.append)(e))})))}})})))}));var Ze=n(81556);const Be=(0,I.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)"}}))),He=e=>{let{coloredCrosswalks:t,crosswalkTree:n,selected:l,title:a,onSelect:i=V.ZT}=e;const s=Be(),c=(0,r.useCallback)((e=>t.includes(e.uri)?(0,h.CJp)((0,h.uKF)(e)):"#CACCD1"),[t]);return o().createElement(T.hR,{getCrosswalkColor:c},o().createElement("div",{className:s.container,onClick:i},o().createElement("span",{className:s.title},a," ",o().createElement(A.Z,{className:s.hintIcon})),o().createElement("div",{className:xe()(s.graph,{[`${s.selectedTree}`]:l})},l&&o().createElement(Ze.Z,{className:s.checkedIcon}),o().createElement(pe,{crosswalkTree:n}))))},Fe=(0,I.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"}}))),Ie=e=>{let{canUnmerge:t,contributor:n,crosswalkTree:l,onClose:a,onUnmergeContributor:i}=e;const s=Fe(),[c,u]=(0,r.useState)(h.MBD.Unmerge),d=(0,r.useCallback)((e=>(0,h.keo)(n,e).map((e=>{let{uri:t}=e;return t}))),[n]);return o().createElement(Z.Dialog,{open:!0,onClose:a,classes:{paper:s.dialogContainer}},o().createElement(Z.DialogTitle,{classes:{root:s.dialogTitle}},m().text("Unmerge")),o().createElement(Z.DialogContent,{classes:{root:s.dialogContent}},o().createElement(Z.Typography,{variant:"body2",className:s.uri},o().createElement("span",{className:s.title},m().text("Entity URI:")),(0,h.nIW)(n.uri).toUpperCase()),o().createElement("div",{className:s.trees},o().createElement(He,{onSelect:()=>u(h.MBD.Unmerge),selected:c===h.MBD.Unmerge,title:m().text("Unmerge"),crosswalkTree:l,coloredCrosswalks:d(!0)}),n.merges&&n.uri!==l.uri&&o().createElement(He,{onSelect:()=>u(h.MBD.TreeUnmerge),selected:c===h.MBD.TreeUnmerge,title:m().text("Tree unmerge"),crosswalkTree:l,coloredCrosswalks:d(!1)}))),o().createElement(Z.DialogActions,null,o().createElement(Z.Button,{onClick:a},m().text("Cancel")),o().createElement(Z.Button,{disabled:!t,onClick:()=>{i(c),a()},color:"primary"},m().text("Unmerge"))))},je=(0,I.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"}}))),$e=e=>{let{canUnsubscribe:t,contributor:n,crosswalkTree:l,onClose:a,onUnsubscribeContributor:i}=e;const s=je(),c=(0,r.useMemo)((()=>(0,h.keo)(n,!0).map((e=>{let{uri:t}=e;return t}))),[n]);return o().createElement(Z.Dialog,{open:!0,onClose:a,classes:{paper:s.dialogContainer}},o().createElement(Z.DialogTitle,{classes:{root:s.dialogTitle}},m().text("Unsubscribe")),o().createElement(Z.DialogContent,{classes:{root:s.dialogContent}},o().createElement(Z.Typography,{variant:"body2",className:s.uri},o().createElement("span",{className:s.title},m().text("Entity URI:")),(0,h.nIW)(n.uri).toUpperCase()),o().createElement(He,{selected:!0,title:m().text("Unsubscribe"),crosswalkTree:l,coloredCrosswalks:c})),o().createElement(Z.DialogActions,null,o().createElement(Z.Button,{onClick:a},m().text("Cancel")),o().createElement(Z.Button,{disabled:!t,onClick:()=>{i(),a()},color:"primary"},m().text("Unsubscribe"))))},Ae=(0,I.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 We(){return We=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},We.apply(this,arguments)}const Ve=(0,r.memo)((e=>{let{activeMode:t,contributors:n,crosswalkTree:l,entity:a,onChangeMode:i,onUnmergeContributor:s=V.ZT,onUnsubscribeContributor:c=V.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=Ae(),p=(0,r.useRef)(),[g,f]=(0,r.useState)(170),y=(0,r.useCallback)((e=>{let{percentageSize:t}=e;return f(t)}),[]),[b,v]=(0,r.useState)(),[x,k]=(0,r.useState)(),E=(0,r.useMemo)((()=>(0,h.Qbq)(l)),[l]),w=E>1;(0,r.useEffect)((()=>{var e;const t=Math.max(170,60*E),n=(null===(e=p.current)||void 0===e?void 0:e.clientHeight)-170;f(Math.min(n,t))}),[E]);const C=(0,r.useMemo)((()=>[{id:G.Crosswalk,title:m().text("Crosswalk")},{id:G.Source,title:m().text("Source")},{id:G.Contributor,title:m().text("Contributor")}]),[]),[S,T]=(0,r.useState)(),O=t===G.Contributor;return o().createElement("div",{className:d.root,ref:p},b&&o().createElement(Ie,{canUnmerge:w,onClose:()=>v(null),onUnmergeContributor:e=>{s({entityUri:a.uri,contributorUri:b,operationType:e})},crosswalkTree:l,contributor:n.find((e=>{let{uri:t}=e;return t===b}))}),x&&o().createElement($e,{canUnsubscribe:w,onClose:()=>k(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(X.Z,{modes:C,modeId:t,className:d.modeSwitcher,onChange:i}),o().createElement(N.Z,{className:d.resizablePanesWrapper,orientation:"horizontal",size:g,minSize:170,maxSize:-170,allowResize:!0,onChange:y},o().createElement("div",{className:d.pane},l&&!(0,W.isEmpty)(S)&&o().createElement(pe,{entityLabel:(0,h.idV)(null==a?void 0:a.label),crosswalkTree:l,visibleCrosswalks:S,accentContributors:O})),o().createElement("div",{className:d.pane},o().createElement("div",{className:d.hint},o().createElement(A.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(De,We({onUnmergeContributor:v,onUnsubscribeContributor:k,accentContributors:O,contributors:n,entity:a,onChangeVisibleCrosswalks:T},u)))))}));var Xe=n(67218);function Ge(){return Ge=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},Ge.apply(this,arguments)}const Ye=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",Ge({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,h.xU7)(e,m().text("Something went wrong"))})};var qe=n(39417);function Ke(){return Ke=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},Ke.apply(this,arguments)}const Qe=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",Ke({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,I.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(Qe,null),o().createElement("span",{className:e.info},m().text("Please persist your profile to be able to edit crosswalks")))},tt=(0,I.Z)({snackbarMessage:{display:"flex",alignItems:"center"},snackbarIcon:{paddingRight:16}}),nt=e=>{let{entity:t,message:n}=e;const r=tt(),a=(0,l.useSelector)(g.ZP.selectors.getUIPath),i=(0,h.ChB)({uiPath:a,uri:t.uri});return o().createElement("div",{className:r.snackbarMessage},o().createElement(A.Z,{className:r.snackbarIcon}),o().createElement(Z.Typography,null,(0,h.idV)(t.label)," ",o().createElement(Z.Link,{href:i,target:"_blank"},m().text("lookup profile"))," ",n))},rt=(0,I.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"}});var ot;!function(e){e[e.Legend=0]="Legend",e[e.History=1]="History"}(ot||(ot={}));const lt=(0,l.connect)((e=>({entity:g.ZP.selectors.getEntity(e),metadata:g.ZP.selectors.getMetadata(e),historyEvent:g.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 H=rt(),[F,I]=(0,r.useState)(G.Crosswalk),[j,A]=(0,r.useState)(0),X=e=>A((t=>t===e?null:e)),Y=null!==j,_=j===ot.History,{isHistoryEnabled:q,isProfilePersisted:K}=(0,f.C)({isHistoryTabActive:_,entity:i}),Q=K?i:null,J=null==Q?void 0:Q.uri,ee=(0,h.nt9)(s,null==i?void 0:i.type),{historySlice:te}=(0,y.a)({entity:Q,historyEvent:p}),[ne,re]=(0,r.useState)();(0,b.D)((()=>{re(void 0)}),[te]),(0,b.D)((()=>{re(void 0)}),[J]);const[oe,le]=(0,r.useState)(-480),ae=(0,r.useCallback)((e=>{let{percentageSize:t}=e;return le(t)}),[]),{SnackbarRenderer:ie,showSnackbarMessage:se}=(0,v.D)({anchorOrigin:{vertical:"top",horizontal:"center"},showDismiss:!0}),{isLoaded:ce,savedState:ue}=(0,x.a)(c),[de,pe]=(0,r.useState)();(0,r.useEffect)((()=>{ce&&pe(ue.visibleColumns)}),[ce]),(0,r.useEffect)((()=>{const e=!(0,W.equals)(de,ue.visibleColumns);ce&&e&&u({visibleColumns:de})}),[de]);const{crosswalkTree:me,reload:ge}=(e=>{const[t,n]=(0,r.useState)(null),[o,l]=(0,r.useState)(!1),a=(0,Xe._)(),i=e=>{console.warn("Failed to load crosswalk tree",e),n(null)},s=(0,r.useCallback)((()=>{e?(l(!0),a((0,h.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==te?void 0:te.aEntity.uri)||J),he=(0,r.useMemo)((()=>(0,h.b7X)(me)),[me]),fe=(0,r.useCallback)((()=>{J&&d(g.N5.entity.actions.loadEntity({viewId:a.id,uri:J}))}),[J,a,d]),ye=(0,r.useCallback)((0,W.pipe)(fe,ge),[fe,ge]),be=(0,r.useCallback)(((e,t)=>{se(t?o().createElement(nt,{entity:t,message:e}):e)}),[]),{modifiedEntity:ve,crosswalksMap:xe,newlyCreatedAttributes:ke,onDeleteAttribute:Ee,onPinAttribute:we,onIgnoreAttribute:Ce,onEditAttribute:Se,onAddAttribute:Te}=(0,k.Q)({entity:(null==te?void 0:te.aEntity)||Q,onModify:ye,onError:_e}),{addCrosswalk:Oe,deleteCrosswalk:Me,editCrosswalk:Ne,unmergeContributor:Re,unsubscribeContributor:ze}=(e=>{let{onLoad:t=V.ZT,onSuccess:n=V.ZT,onError:o=V.ZT,onShowMessage:a=V.ZT}=e;const{addCrosswalk:i,editCrosswalk:s,deleteCrosswalk:c}=(0,qe.P)({onLoad:t,onSuccess:n,onError:o}),u=(0,l.useSelector)(g.ZP.selectors.getDtssPath),d=(0,l.useSelector)(g.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,W.pipe)(h.L8n,(0,W.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,W.pipe)(h.R9X,(0,W.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:be,onSuccess:ye,onError:(0,r.useCallback)((e=>{_e(e),e.errorCode===h.Xt7.CROSSWALK_NOT_FOUND&&ye()}),[ye])}),{historyFilter:Le,onApplyFilter:Pe,isLoading:Ue,historicUris:De,historyWithTotal:Ze,canLoadMore:Be,onLoadMore:He}=(0,E.k6)({entity:Q,enabled:q}),Fe=(e=>{let{activeMode:t,contributors:n}=e;const o=(0,r.useCallback)((e=>{var r;switch(t){case G.Source:return(0,h.kW2)(e.type);case G.Contributor:return(0,h.GtP)((null===(r=(0,h.A1W)(n,e))||void 0===r?void 0:r.uri)||"");case G.Crosswalk:return(0,h.CJp)((0,h.uKF)(e))}}),[t,n]),[l,a]=(0,r.useState)([]),i=(0,r.useRef)([]),s=(0,r.useCallback)((0,h.DsO)((()=>{a([...i.current])}),50),[]),c=(0,r.useCallback)((e=>{i.current=e,s(e)}),[s]),u=(0,r.useCallback)(((e,r)=>{if(e)if(r)if(t===G.Contributor){const t=(0,h.A1W)(n,e);c([e,...(null==t?void 0:t.crosswalks)||[]])}else c([e]);else c([])}),[t,c,n]),[d,p]=(0,r.useState)([]),m=(0,r.useCallback)(((e,t)=>(0,W.concat)(e.filter((e=>!(0,W.any)((0,h.aFF)(e),t))),t.filter((t=>!(0,W.any)((0,h.aFF)(t),e))))),[]),g=(0,r.useCallback)((e=>{if(e)if(t===G.Contributor){const t=(0,h.A1W)(n,e);p((n=>m([e,...(null==t?void 0:t.crosswalks)||[]],n)))}else p((t=>m([e],t)))}),[t,m,n]);return(0,r.useEffect)((()=>{p([])}),[t]),{getCrosswalkColor:o,highlightedCrosswalks:(0,r.useMemo)((()=>[...l,...d]),[l,d]),focusedCrosswalks:d,toggleCrosswalkFocus:g,setCrosswalkHighlighted:u}})({activeMode:F,contributors:he}),Ie=[{buttonProps:{id:ot.Legend,icon:Ye,tooltipTitle:m().text("Legend")},title:o().createElement(Z.Typography,{variant:"h6"},m().text("Legend")),content:o().createElement(Ve,{activeMode:F,onChangeMode:I,entity:(null==te?void 0:te.aEntity)||Q,crosswalkTree:me,contributors:he,selectedAttributeTypes:ne,readOnly:!!te,onAddCrosswalk:Oe,onUnmergeContributor:Re,onUnsubscribeContributor:ze,onEditCrosswalk:Ne,onDeleteCrosswalk:Me})},{buttonProps:{id:ot.History,icon:B.Z,tooltipTitle:m().text("History")},title:o().createElement(w.Z,{total:((null==De?void 0:De.length)||0)+1,entityType:ee,filter:Le,onApplyFilter:Pe}),content:K?o().createElement(C.Z,{isLoading:Ue,historyWithTotal:Ze,contributorsUris:De,entityUri:J,historyEvent:p,onLoadMore:He,canLoadMore:Be}):o().createElement(S.Z,null)}];return o().createElement("div",{className:H.sourcesView},o().createElement(T.hR,Fe,o().createElement(O.l,null,o().createElement(M.Z,null),o().createElement(N.Z,{className:H.resizablePanesWrapper,orientation:"vertical",size:Y?oe:"100%",minSize:480,maxSize:-480,allowResize:Y,onChange:ae},o().createElement("div",{className:H.pane},o().createElement(R.Z,{entity:(null==te?void 0:te.aEntity)||i},te?o().createElement(z.Z,null):o().createElement(L.a,null)),K?o().createElement(P.R,{attributeUris:ke},o().createElement(U.Z,{visibleColumns:de,onChangeVisibleColumns:pe,entity:ve,crosswalksMap:xe,selectedAttributeTypes:ne,onSelectAttributeTypes:re,readOnly:!!te,onDelete:Ee,onPin:we,onIgnore:Ce,onEdit:Se,onAdd:Te})):o().createElement(et,null)),o().createElement($,{className:H.pane,title:null===(t=Ie[j])||void 0===t?void 0:t.title,onClose:()=>X(j)},null===(n=Ie[j])||void 0===n?void 0:n.content)))),o().createElement(D.G,{className:H.tabs,buttonsProps:(0,W.pipe)((0,W.reject)((0,W.propEq)("hidden",!0)),(0,W.pluck)("buttonProps"))(Ie),onButtonClick:X,activeIndexId:j}),o().createElement(ie,null))})),at=(0,i.createGenerateClassName)({productionPrefix:"sourcesPerspective",disableGlobal:!0}),it=e=>{let{config:t,store:n,onResize:p,saveState:m,getSavedState:g}=e;const f=(0,r.useCallback)((0,h.aYu)(g),[g]);return o().createElement(l.Provider,{store:n},o().createElement(u.m.Provider,{value:t.id},o().createElement(i.StylesProvider,{generateClassName:at},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(lt,{config:t,saveState:m,getSavedState:f}),o().createElement(d.Z,null)))))}}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[4754],{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:()=>p});var r=n(24328),o=n.n(r),l=n(52730),a=n(71153),i=n.n(a),s=n(94079),c=n(58991),u=n(59431);const d=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),p=e=>{let{entity:t,className:n,size:r="small"}=e;const a=d(),p=(0,l.useSelector)(u.ZP.selectors.getMetadata),m=t.type,g=(0,c.nt9)(p,m)||{},h=(0,c.VD3)(p,g,"typeColor")||c.rSc.palette.primary.main;return o().createElement(s.Typography,{style:{backgroundColor:h,color:c.P6Y.Colors.getColor(h)?"#FFFFFF":"#212121"},className:i()(a[`entityType-${r}`],n),component:"div"},(0,c.jFi)(p,t))}},57304:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(24328),o=n.n(r),l=n(13980),a=n.n(l),i=n(71153),s=n.n(i),c=n(52730),u=n(17440),d=n(94079),p=n(87918),m=n.n(p),g=n(58991),h=n(59431),f=n(53180),y=n(68439);const b=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),v=e=>{let{className:t,entity:n,children:l,classes:a}=e;const i=b({classes:a}),p=(0,c.useSelector)(h.ZP.selectors.getMetadata),v=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,g.BTI)(n))}),[n]);if((0,u.isNil)(n))return null;const x=(0,g.idV)(n.label),k=n.secondaryLabel,E=(0,g.ptG)(p,n),w=(0,g.Fn9)(n),C=n.uri,S=(0,g.BTI)(n);return o().createElement("div",{className:s()(i.profileBandWrapper,t)},o().createElement("div",{className:s()(i.profileBand,{[i.inactive]:!w}),"data-entity-uri":C},o().createElement(f.Z,{key:n.uri,entity:n,avatarClassName:i.profileIcon,imageClassName:i.imageProfileIcon}),o().createElement("div",{className:i.profileInfo},o().createElement("div",null,o().createElement(d.Typography,{variant:"h6",className:i.label},x),k&&o().createElement(d.Typography,{variant:"subtitle2",className:i.secondaryLabel},k),E&&o().createElement(d.Typography,{variant:"subtitle1",className:i.businessCard},E)),o().createElement("div",{className:i.specialInfo},o().createElement("div",{className:i.entityType},o().createElement(y.Z,{entity:n,size:"medium",className:i.badge}),!(0,g.ZiX)(C)&&o().createElement(d.Tooltip,{title:m().text("Copy to clipboard")},o().createElement(d.Typography,{display:"inline",variant:"body2",className:i.entityId,onClick:v},m().text("Entity ID"),": ",S))))),l&&o().createElement("div",null,l)))};v.propTypes={className:a().string,entity:a().object,children:a().node,classes:a().object};const x=v},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}}},24605:(e,t,n)=>{n.d(t,{D:()=>c});var r=n(24328),o=n.n(r),l=n(87918),a=n.n(l),i=n(94079),s=n(37265);const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{anchorOrigin:t,showDismiss:n}=e,[l,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(""),p=(0,r.useCallback)((()=>{c(!1),d("")}),[]),m=(0,r.useCallback)((e=>{c(!0),d(e)}),[]),g=(0,r.useCallback)((()=>o().createElement(i.Portal,{container:document.body},o().createElement(s.Z,{open:l,anchorOrigin:t,autoHideDuration:5e3,onClose:p,message:u,action:n?o().createElement(i.Button,{color:"primary",onClick:p},a().text("Dismiss")):void 0}))),[l,p,u]);return{SnackbarRenderer:g,showSnackbarMessage:m}}},23352:(e,t,n)=>{n.r(t),n.d(t,{default:()=>st});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),g=n(59431),h=n(58991),f=n(71820),y=n(57730),b=n(20562),v=n(24605),x=n(2804),k=n(85965),E=n(85890),w=n(91515),C=n(54362),S=n(6674),T=n(63149),O=n(48017),M=n(96955),N=n(57304),R=n(3409),z=n(93873),L=n(66095),P=n(20982),U=n(39827),D=n(94079),Z=n(80147),B=n(87685),H=n(22385),F=n(79692);const I=(0,F.Z)({header:{display:"flex",flexDirection:"row",alignItems:"center",padding:"16px 12px",borderBottom:"1px solid rgba(0, 0, 0, 0.12);"},closeButton:{marginRight:"12px"}}),j=e=>{let{title:t,className:n,onClose:r,children:l}=e;const a=I();return o().createElement("div",{className:n},o().createElement("div",{className:a.header},o().createElement(H.Z,{className:a.closeButton,icon:B.default,onClick:r}),t),l)};var $=n(99144),A=n(17440),W=n(31276),V=n(83401);let X;!function(e){e.Crosswalk="crosswalks",e.Source="source",e.Contributor="contributor"}(X||(X={}));const G=e=>(0,A.pipe)((0,A.map)((0,A.prop)("value")),A.sum)(e);function Y(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 q=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(G(e.sourceLinks),G(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,A.pipe)((0,A.groupBy)((0,A.prop)("x")),A.toPairs,(0,A.sort)(((e,t)=>e[0]-t[0])),(0,A.map)((0,A.nth)(1)))(l);(function(){let e=(0,A.pipe)((0,A.map)((e=>(o[1]-(e.length-1)*r)/G(e))),(0,A.reduce)(Math.min,1/0))(i);const s=(0,A.pipe)((0,A.map)((e=>{var t;return e.value/((null===(t=e.targetLinks)||void 0===t?void 0:t.length)||1)})),(0,A.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,A.pipe)((0,A.map)((e=>(e.length-1)*r+(0,A.sum)((0,A.map)((e=>e.dy),e)))),(0,A.reduce)(Math.max,0))(i),c=(o[1]-s)/2;i.forEach((e=>{const{y:t,dy:n}=(0,A.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,A.pipe)((0,A.groupBy)((0,A.prop)("x")),A.toPairs,(0,A.sort)(((e,t)=>t[0]-e[0])),(0,A.map)((0,A.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,A.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,A.pipe)((0,A.groupBy)((0,A.prop)("x")),A.toPairs,(0,A.sort)(((e,t)=>e[0]-t[0])),(0,A.map)((0,A.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=>Y({},e))),n=n=>{const r=e.nodes.indexOf(n);return t[r]},r=e.links.map((e=>Y({},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 K=n(94111),Q=n(12147),J=n(98685);const ee=(0,F.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"}}),te=e=>{let{user:t,time:n,children:r}=e;const l=ee(),a=o().createElement("div",null,o().createElement("span",{className:l.tooltipTitle},m().text("Merge details")),o().createElement("div",{className:l.tooltipRow},o().createElement(Q.Z,{className:l.tooltipIcon}),m().date(n,"L LTS")),o().createElement("div",{className:l.tooltipRow},o().createElement(J.Z,{className:l.tooltipIcon}),t));return o().createElement(K.Z,{title:a,placement:"top"},r)},ne=e=>{let{node:t,nodeWidth:n,highlightEnabled:l,isColored:a}=e;const i=ee(),[s,c]=(0,r.useState)(0),u=(0,r.useRef)(null),{x:d,y:p,name:m,label:g,targetLinks:h,sourceLinks:f,entity:{crosswalks:y=[],merges:b}}=t,[v]=y,{isDimmed:x,highlightCrosswalk:k,removeHighlight:E}=(0,T.pu)(v),w=(0,T.nX)(v),C=null!=y&&y.length?f[y.length-1].sy+f[y.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},g||""):o().createElement(o().Fragment,null,o().createElement("rect",{height:C,width:14,className:i.node,fill:a?w:"#F0F0F0",key:"node-main",opacity:l&&x?.19:1,onMouseEnter:()=>{l&&k()},onMouseLeave:()=>{l&&E()}}),!(null==h||!h.length)&&(()=>{const e=(0,A.pipe)((0,A.map)((0,A.prop)("source")),(0,A.groupBy)((0,A.prop)("time")))(h);return null==b?void 0:b.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,A.min)((0,A.head)(n).ty,e[0]),(0,A.max)((0,A.last)(n).ty+(0,A.last)(n).dy,e[1])]}),[1/0,0]);return o().createElement(te,{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}))}))})()))},re=e=>{let{link:t,path:n,highlightEnabled:r,isColored:l}=e;const{crosswalk:a}=t,i=(0,T.nX)(a),{isDimmed:s,highlightCrosswalk:c,removeHighlight:u}=(0,T.pu)(a);return o().createElement("path",{d:n,fill:l?i:"#F0F0F0",opacity:r&&s?.1:1,onMouseEnter:()=>{r&&c()},onMouseLeave:()=>{r&&u()}})},oe=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:g,nodeWidth:h,path:f}=q({data:l,width:t,height:n});(0,r.useEffect)((()=>{p(0),u(0)}),[t,n]);const y=(0,r.useMemo)((()=>g.map(((e,t)=>o().createElement(ne,{highlightEnabled:a,isColored:a,node:e,nodeWidth:h,key:`SankeyNode-${t}`})))),[g,a,h,t,n]),b=(0,r.useMemo)((()=>m.map(((e,t)=>o().createElement(re,{highlightEnabled:!a,isColored:!a,link:e,path:f(e),key:`SankeyLink-${t}`})))),[a,m,f]),v=e=>{const t=e.pageX,n=t-c;return u(t),n},x=()=>s(!1),k=i?"none":"auto",E=i?"move":"default";return o().createElement("svg",{width:t,height:n,cursor:E,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("g",{transform:`translate(${d},${n-1}) rotate(-90)`,pointerEvents:k},o().createElement("g",null,b),o().createElement("g",null,y)))};function le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ae=(0,A.curry)(((e,t)=>!e||e.some((0,h.aFF)(t)))),ie=(0,A.curry)(((e,t)=>(0,A.evolve)({crosswalks:(0,A.filter)(ae(e)),merges:(0,A.map)((0,A.evolve)({losers:(0,A.map)(ie(e))}))},t))),se=e=>{let t=1;const n=(0,A.pipe)((0,A.evolve)({crosswalks:(0,A.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){le(e,t,n[t])}))}return e}({},e,{uuid:t++})))}),(0,A.evolve)({merges:(0,A.map)((0,A.evolve)({losers:(0,A.map)((e=>n(e)))}))}));return n(e)},ce=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,A.pipe)((0,A.chain)((e=>{let{losers:t,time:n}=e;return(0,A.pipe)((0,A.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,A.chain)((e=>r(e,u,n))))(t)})),(0,A.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,A.pipe)((0,A.chain)((e=>{let{source:t,target:n}=e;return[t,n]})),A.uniq)(n);return{nodes:t.filter((e=>o.includes(e))),links:n}},ue=(0,F.Z)((()=>({graph:{padding:"8px 0px",boxSizing:"border-box",height:"100%",width:"100%"}}))),de=(0,r.memo)((e=>{let{crosswalkTree:t,entityLabel:n,visibleCrosswalks:r,accentContributors:l}=e;const a=ue(),i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return(0,A.pipe)(ie(n),se,ce)({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(oe,{width:t,height:n,data:i,accentContributors:l})})))}));var pe=n(90186),me=n(77243);function ge(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){he(e,t,n[t])}))}return e}function he(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fe=n(52017),ye=n(79769),be=n(71153),ve=n.n(be),xe=n(72753),ke=n(65549);function Ee(){return Ee=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},Ee.apply(this,arguments)}const we=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",Ee({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:"svg457070356a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("mask",{id:"svg457070356b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg457070356a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg457070356b)",d:"M0 0h24v24H0z"})))};var Ce=n(22983),Se=n(8818),Te=n(51229);const Oe=(0,F.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}}))),Me=e=>{let{contributorUri:t,focusable:n,disableAdd:r,disableUnmerge:l,onAdd:a,onUnmerge:i,onToggleFocus:s,onUnsubscribe:c,isFocused:u}=e;const d=Oe({isFocused:u});return o().createElement("div",{className:d.root},o().createElement(Se.k,{size:"XXS",onClick:()=>s(),className:d.focusedIcon,icon:n&&xe.Z,disabled:!n,tooltipTitle:n&&m().text("Focus")}),o().createElement(D.Typography,{variant:"body2",className:d.uri},o().createElement("span",{className:d.title},m().text("Entity ID:")),(0,h.nIW)(t)),o().createElement(Te.Z,null),a&&o().createElement(Se.k,{size:"XS",icon:ke.Z,disabled:r,tooltipTitle:m().text("Add crosswalk"),showForDisabled:!0,onClick:()=>a()}),o().createElement(Se.k,{size:"XS",icon:we,disabled:l,tooltipTitle:m().text("Unmerge"),showForDisabled:!0,onClick:()=>i()}),c&&o().createElement(Se.k,{size:"XS",icon:Ce.Z,disabled:l,tooltipTitle:m().text("Unsubscribe"),showForDisabled:!0,onClick:()=>c()}))},Ne=(0,F.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,disableAddCrosswalk:c,disableEditCrosswalk:u,disableDeleteCrosswalk:d,disableUnmergeContributor:p,onUnmerge:m,onEdit:f,onDelete:y,onAdd:b,onToggleSourceExpanded:v,onUnsubscribeContributor:x}=e;const k=a?(0,h.GtP)(n):"rgba(0, 0, 0, 0.38)",E=Ne({contributorColor:k}),w=(0,l.useSelector)(g.ZP.selectors.getDataTenants),C=(0,r.useRef)(null),[S]=(0,T.RT)();(0,r.useEffect)((()=>{var e;a&&S&&((0,A.pipe)((0,A.find)((e=>{let{source:t}=e;return t===S.type})),(0,A.propOr)({},"crosswalksByTypes"),A.values,A.flatten)(i).some((e=>(0,h.aFF)(S,e)&&e!==S))&&(null==C||null===(e=C.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})))}),[S]);const[O,M]=(0,r.useState)(!1),N=(0,A.pipe)((0,A.pluck)("crosswalksByTypes"),(0,A.find)((e=>e[me.Y.Simple].length||e[me.Y.Empty].length)),(0,A.props)([me.Y.Simple,me.Y.Empty]),A.flatten,A.head)(i),{toggleCrosswalkFocus:R,isFocused:z}=(0,T.BF)(N),L=(0,A.pipe)((0,A.pluck)("crosswalksByTypes"),(0,A.chain)(A.values),A.flatten)(i),P=(0,h.KMQ)(L,w);return o().createElement("div",{ref:C,className:ve()(E.root,t)},o().createElement(Me,{contributorUri:n,focusable:a&&!!N,disableAdd:c,disableUnmerge:p,isFocused:a&&z,onToggleFocus:R,onAdd:N&&(()=>M(!0)),onUnmerge:m,onUnsubscribe:P&&(()=>x({contributorUri:n,dataTenant:P,crosswalk:N}))}),i.map((e=>{let{source:t,crosswalksByTypes:n}=e;return o().createElement(fe.Z,{key:t,source:t,crosswalksByTypes:n,showCrosswalkColors:!a,crosswalksFocusEnabled:!a,expanded:null==s?void 0:s.includes(t),disableEditCrosswalk:u,disableDeleteCrosswalk:d,onEdit:f,onDelete:y,onToggleExpanded:()=>v(t)})})),O&&o().createElement(ye.Z,{className:E.editor,onAdd:e=>b({contributorCrosswalk:N,crosswalk:e}),onClose:()=>M(!1)}))},ze=(0,F.Z)((()=>({table:{overflowY:"auto",overflowX:"hidden",paddingLeft:"16px",paddingRight:"6px"},tableRow:{"& + &":{marginTop:"10px"},margin:"auto",maxWidth:"448px"}})));function Le(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){Pe(e,t,n[t])}))}return e}function Pe(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,onAddCrosswalk:u=W.ZT,onEditCrosswalk:d=W.ZT,onDeleteCrosswalk:p=W.ZT,onUnmergeContributor:m=W.ZT,onUnsubscribeContributor:f=W.ZT}=e;const y=(0,l.useSelector)(g.ZP.selectors.getMetadata),b=(0,h.nt9)(y,n.type),v=ze(),x=(0,r.useMemo)((()=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=e.crosswalks,o=(0,h.HQx)(e);return t.filter((e=>!(0,h.O27)(e.crosswalks))).map((t=>{let{uri:l,crosswalks:a}=t;return{contributorUri:l,crosswalksBySources:(0,A.pipe)((0,A.map)((e=>{if("relation"===e.ownerType){const t=o.find((0,h.aFF)(e));return t&&ge({ownerType:"relation"},t)}{const t=r.find((0,h.aFF)(e));return t&&ge({ownerType:"entity"},t)}})),(0,A.filter)((e=>!!e)),(0,pe.o)(e.type,n))(a)}})).filter((e=>{let{crosswalksBySources:t}=e;return t.length>0}))}(n,a,i)),[n,a,i]),[k,E]=(0,r.useState)({}),w=(0,r.useMemo)((()=>((e,t)=>e.reduce(((e,n)=>{let{contributorUri:r,crosswalksBySources:o}=n;const l=(0,A.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[me.Y.Simple].concat(l[me.Y.Empty]).concat(a?l[me.Y.Dependent]:[])}),o);return e.concat(l)}),[]))(x,k)),[x,k]);(0,r.useEffect)((()=>{s(w)}),[w]);const C=(0,r.useCallback)((e=>{p({entityUri:null==n?void 0:n.uri,crosswalkId:e})}),[null==n?void 0:n.uri,p]),S=(0,r.useCallback)((e=>{d(Le({},e,{entityUri:null==n?void 0:n.uri}))}),[null==n?void 0:n.uri,d]);return o().createElement("div",{className:v.table},x.map((e=>{let{contributorUri:r,crosswalksBySources:l}=e;return o().createElement(Re,{key:r,className:v.tableRow,contributorUri:r,accentContributor:t,crosswalksBySources:l,disableAddCrosswalk:c||!(0,h.mkC)(b),disableEditCrosswalk:c||!(0,h.Zm0)(b),disableDeleteCrosswalk:c||!(0,h.a14)(b),disableUnmergeContributor:c||!(0,h.uGe)(h.BDP.UNMERGE,b),onAdd:e=>u(Le({},e,{entity:n})),onDelete:C,onEdit:S,onUnmerge:()=>m(r),onUnsubscribeContributor:f,expandedSources:k[r],onToggleSourceExpanded:e=>{E((0,A.pipe)((0,A.unless)((0,A.has)(r),(0,A.assoc)(r,[])),(0,A.evolve)({[r]:(0,A.ifElse)((0,A.includes)(e),(0,A.without)([e]),(0,A.append)(e))})))}})})))}));var De=n(81556);const Ze=(0,F.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)"}}))),Be=e=>{let{coloredCrosswalks:t,crosswalkTree:n,selected:l,title:a,onSelect:i=W.ZT}=e;const s=Ze(),c=(0,r.useCallback)((e=>t.includes(e.uri)?(0,h.CJp)((0,h.uKF)(e)):"#CACCD1"),[t]);return o().createElement(T.hR,{getCrosswalkColor:c},o().createElement("div",{className:s.container,onClick:i},o().createElement("span",{className:s.title},a," ",o().createElement($.Z,{className:s.hintIcon})),o().createElement("div",{className:ve()(s.graph,{[`${s.selectedTree}`]:l})},l&&o().createElement(De.Z,{className:s.checkedIcon}),o().createElement(de,{crosswalkTree:n}))))},He=(0,F.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"}}))),Fe=e=>{let{canUnmerge:t,contributor:n,crosswalkTree:l,onClose:a,onUnmergeContributor:i}=e;const s=He(),[c,u]=(0,r.useState)(h.MBD.Unmerge),d=(0,r.useCallback)((e=>(0,h.keo)(n,e).map((e=>{let{uri:t}=e;return t}))),[n]);return o().createElement(D.Dialog,{open:!0,onClose:a,classes:{paper:s.dialogContainer}},o().createElement(D.DialogTitle,{classes:{root:s.dialogTitle}},m().text("Unmerge")),o().createElement(D.DialogContent,{classes:{root:s.dialogContent}},o().createElement(D.Typography,{variant:"body2",className:s.uri},o().createElement("span",{className:s.title},m().text("Entity URI:")),(0,h.nIW)(n.uri).toUpperCase()),o().createElement("div",{className:s.trees},o().createElement(Be,{onSelect:()=>u(h.MBD.Unmerge),selected:c===h.MBD.Unmerge,title:m().text("Unmerge"),crosswalkTree:l,coloredCrosswalks:d(!0)}),n.merges&&n.uri!==l.uri&&o().createElement(Be,{onSelect:()=>u(h.MBD.TreeUnmerge),selected:c===h.MBD.TreeUnmerge,title:m().text("Tree unmerge"),crosswalkTree:l,coloredCrosswalks:d(!1)}))),o().createElement(D.DialogActions,null,o().createElement(D.Button,{onClick:a},m().text("Cancel")),o().createElement(D.Button,{disabled:!t,onClick:()=>{i(c),a()},color:"primary"},m().text("Unmerge"))))},Ie=(0,F.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"}}))),je=e=>{let{canUnsubscribe:t,contributor:n,crosswalkTree:l,onClose:a,onUnsubscribeContributor:i}=e;const s=Ie(),c=(0,r.useMemo)((()=>(0,h.keo)(n,!0).map((e=>{let{uri:t}=e;return t}))),[n]);return o().createElement(D.Dialog,{open:!0,onClose:a,classes:{paper:s.dialogContainer}},o().createElement(D.DialogTitle,{classes:{root:s.dialogTitle}},m().text("Unsubscribe")),o().createElement(D.DialogContent,{classes:{root:s.dialogContent}},o().createElement(D.Typography,{variant:"body2",className:s.uri},o().createElement("span",{className:s.title},m().text("Entity URI:")),(0,h.nIW)(n.uri).toUpperCase()),o().createElement(Be,{selected:!0,title:m().text("Unsubscribe"),crosswalkTree:l,coloredCrosswalks:c})),o().createElement(D.DialogActions,null,o().createElement(D.Button,{onClick:a},m().text("Cancel")),o().createElement(D.Button,{disabled:!t,onClick:()=>{i(),a()},color:"primary"},m().text("Unsubscribe"))))},$e=(0,F.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 Ae(){return Ae=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},Ae.apply(this,arguments)}const We=(0,r.memo)((e=>{let{activeMode:t,contributors:n,crosswalkTree:l,entity:a,onChangeMode:i,onUnmergeContributor:s=W.ZT,onUnsubscribeContributor:c=W.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=$e(),p=(0,r.useRef)(),[g,f]=(0,r.useState)(170),y=(0,r.useCallback)((e=>{let{percentageSize:t}=e;return f(t)}),[]),[b,v]=(0,r.useState)(),[x,k]=(0,r.useState)(),E=(0,r.useMemo)((()=>(0,h.Qbq)(l)),[l]),w=E>1;(0,r.useEffect)((()=>{var e;const t=Math.max(170,60*E),n=(null===(e=p.current)||void 0===e?void 0:e.clientHeight)-170;f(Math.min(n,t))}),[E]);const C=(0,r.useMemo)((()=>[{id:X.Crosswalk,title:m().text("Crosswalk")},{id:X.Source,title:m().text("Source")},{id:X.Contributor,title:m().text("Contributor")}]),[]),[S,T]=(0,r.useState)(),O=t===X.Contributor;return o().createElement("div",{className:d.root,ref:p},b&&o().createElement(Fe,{canUnmerge:w,onClose:()=>v(null),onUnmergeContributor:e=>{s({entityUri:a.uri,contributorUri:b,operationType:e})},crosswalkTree:l,contributor:n.find((e=>{let{uri:t}=e;return t===b}))}),x&&o().createElement(je,{canUnsubscribe:w,onClose:()=>k(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(V.Z,{modes:C,modeId:t,className:d.modeSwitcher,onChange:i}),o().createElement(M.Z,{className:d.resizablePanesWrapper,orientation:"horizontal",size:g,minSize:170,maxSize:-170,allowResize:!0,onChange:y},o().createElement("div",{className:d.pane},l&&!(0,A.isEmpty)(S)&&o().createElement(de,{entityLabel:(0,h.idV)(null==a?void 0:a.label),crosswalkTree:l,visibleCrosswalks:S,accentContributors:O})),o().createElement("div",{className:d.pane},o().createElement("div",{className:d.hint},o().createElement($.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,Ae({onUnmergeContributor:v,onUnsubscribeContributor:k,accentContributors:O,contributors:n,entity:a,onChangeVisibleCrosswalks:T},u)))))}));var Ve=n(67218);function Xe(){return Xe=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},Xe.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",Xe({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"})))},Ye=e=>{console.error(e),d.Z.addError({title:m().text("Error"),message:(0,h.xU7)(e,m().text("Something went wrong"))})};var _e=n(39417),qe=n(58651),Ke=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 Je=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"}))))},et=(0,F.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"}}))),tt=()=>{const e=et();return o().createElement("div",{className:e.root},o().createElement(Je,null),o().createElement("span",{className:e.info},m().text("Please persist your profile to be able to edit crosswalks")))},nt=(0,F.Z)({snackbarMessage:{display:"flex",alignItems:"center"},snackbarIcon:{paddingRight:16}}),rt=e=>{let{entity:t,message:n}=e;const r=nt(),a=(0,l.useSelector)(g.ZP.selectors.getUIPath),i=(0,h.ChB)({uiPath:a,uri:t.uri});return o().createElement("div",{className:r.snackbarMessage},o().createElement($.Z,{className:r.snackbarIcon}),o().createElement(D.Typography,null,(0,h.idV)(t.label)," ",o().createElement(D.Link,{href:i,target:"_blank"},m().text("lookup profile"))," ",n))},ot=(0,F.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"}});var lt;!function(e){e[e.Legend=0]="Legend",e[e.History=1]="History"}(lt||(lt={}));const at=(0,l.connect)((e=>({entity:g.ZP.selectors.getEntity(e),metadata:g.ZP.selectors.getMetadata(e),historyEvent:g.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 B=ot(),[H,F]=(0,r.useState)(X.Crosswalk),[I,$]=(0,r.useState)(0),V=e=>$((t=>t===e?null:e)),G=null!==I,Y=I===lt.History,{isHistoryEnabled:_,isProfilePersisted:q}=(0,f.C)({isHistoryTabActive:Y,entity:i}),K=q?i:null,Q=null==K?void 0:K.uri,J=(0,h.nt9)(s,null==i?void 0:i.type),{historySlice:ee}=(0,y.a)({entity:K,historyEvent:p}),[te,ne]=(0,r.useState)();(0,b.D)((()=>{ne(void 0)}),[ee]),(0,b.D)((()=>{ne(void 0)}),[Q]);const[re,oe]=(0,r.useState)(-480),le=(0,r.useCallback)((e=>{let{percentageSize:t}=e;return oe(t)}),[]),{SnackbarRenderer:ae,showSnackbarMessage:ie}=(0,v.D)({anchorOrigin:{vertical:"top",horizontal:"center"},showDismiss:!0}),{isLoaded:se,savedState:ce}=(0,x.a)(c),[ue,de]=(0,r.useState)();(0,r.useEffect)((()=>{se&&de(ce.visibleColumns)}),[se]),(0,r.useEffect)((()=>{const e=!(0,A.equals)(ue,ce.visibleColumns);se&&e&&u({visibleColumns:ue})}),[ue]);const{crosswalkTree:pe,reload:me}=(e=>{const[t,n]=(0,r.useState)(null),[o,l]=(0,r.useState)(!1),a=(0,Ve._)(),i=e=>{console.warn("Failed to load crosswalk tree",e),n(null)},s=(0,r.useCallback)((()=>{e?(l(!0),a((0,h.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==ee?void 0:ee.aEntity.uri)||Q),ge=(0,r.useMemo)((()=>(0,h.b7X)(pe)),[pe]),he=(0,r.useCallback)((()=>{Q&&d(g.N5.entity.actions.loadEntity({viewId:a.id,uri:Q}))}),[Q,a,d]),fe=(0,r.useCallback)((0,A.pipe)(he,me),[he,me]),ye=(0,r.useCallback)(((e,t)=>{ie(t?o().createElement(rt,{entity:t,message:e}):e)}),[]),{modifiedEntity:be,crosswalksMap:ve,newlyCreatedAttributes:xe,onDeleteAttribute:ke,onPinAttribute:Ee,onIgnoreAttribute:we,onEditAttribute:Ce,onAddAttribute:Se}=(0,k.Q)({entity:(null==ee?void 0:ee.aEntity)||K,onModify:fe,onError:Ye}),{addCrosswalk:Te,deleteCrosswalk:Oe,editCrosswalk:Me,unmergeContributor:Ne,unsubscribeContributor:Re}=(e=>{let{onLoad:t=W.ZT,onSuccess:n=W.ZT,onError:o=W.ZT,onShowMessage:a=W.ZT}=e;const{addCrosswalk:i,editCrosswalk:s,deleteCrosswalk:c}=(0,_e.P)({onLoad:t,onSuccess:n,onError:o}),u=(0,l.useSelector)(g.ZP.selectors.getDtssPath),d=(0,l.useSelector)(g.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,A.pipe)(h.L8n,(0,A.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,A.pipe)(h.R9X,(0,A.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:ye,onSuccess:fe,onError:(0,r.useCallback)((e=>{Ye(e),e.errorCode===h.Xt7.CROSSWALK_NOT_FOUND&&fe()}),[fe])}),{historyFilter:ze,onApplyFilter:Le,isLoading:Pe,historicUris:Ue,historyWithTotal:De,canLoadMore:Ze,onLoadMore:Be}=(0,E.k6)({entity:K,enabled:_}),He=(e=>{let{activeMode:t,contributors:n}=e;const o=(0,r.useCallback)((e=>{var r;switch(t){case X.Source:return(0,h.kW2)(e.type);case X.Contributor:return(0,h.GtP)((null===(r=(0,h.A1W)(n,e))||void 0===r?void 0:r.uri)||"");case X.Crosswalk:return(0,h.CJp)((0,h.uKF)(e))}}),[t,n]),[l,a]=(0,r.useState)([]),i=(0,r.useRef)([]),s=(0,r.useCallback)((0,h.DsO)((()=>{a([...i.current])}),50),[]),c=(0,r.useCallback)((e=>{i.current=e,s(e)}),[s]),u=(0,r.useCallback)(((e,r)=>{if(e)if(r)if(t===X.Contributor){const t=(0,h.A1W)(n,e);c([e,...(null==t?void 0:t.crosswalks)||[]])}else c([e]);else c([])}),[t,c,n]),[d,p]=(0,r.useState)([]),m=(0,r.useCallback)(((e,t)=>(0,A.concat)(e.filter((e=>!(0,A.any)((0,h.aFF)(e),t))),t.filter((t=>!(0,A.any)((0,h.aFF)(t),e))))),[]),g=(0,r.useCallback)((e=>{if(e)if(t===X.Contributor){const t=(0,h.A1W)(n,e);p((n=>m([e,...(null==t?void 0:t.crosswalks)||[]],n)))}else p((t=>m([e],t)))}),[t,m,n]);return(0,r.useEffect)((()=>{p([])}),[t]),{getCrosswalkColor:o,highlightedCrosswalks:(0,r.useMemo)((()=>[...l,...d]),[l,d]),focusedCrosswalks:d,toggleCrosswalkFocus:g,setCrosswalkHighlighted:u}})({activeMode:H,contributors:ge}),Fe=[{buttonProps:{id:lt.Legend,icon:Ge,tooltipTitle:m().text("Legend")},title:o().createElement(D.Typography,{variant:"h6"},m().text("Legend")),content:o().createElement(We,{activeMode:H,onChangeMode:F,entity:(null==ee?void 0:ee.aEntity)||K,crosswalkTree:pe,contributors:ge,selectedAttributeTypes:te,readOnly:!!ee,onAddCrosswalk:Te,onUnmergeContributor:Ne,onUnsubscribeContributor:Re,onEditCrosswalk:Me,onDeleteCrosswalk:Oe})},{buttonProps:{id:lt.History,icon:Z.Z,tooltipTitle:m().text("History")},title:o().createElement(w.Z,{total:((null==Ue?void 0:Ue.length)||0)+1,entityType:J,filter:ze,onApplyFilter:Le}),content:q?o().createElement(C.Z,{isLoading:Pe,historyWithTotal:De,contributorsUris:Ue,entityUri:Q,historyEvent:p,onLoadMore:Be,canLoadMore:Ze}):o().createElement(S.Z,null)}];return o().createElement("div",{className:B.sourcesView},o().createElement(T.hR,He,o().createElement(Ke.DndProvider,{backend:qe.default},o().createElement(O.Z,null),o().createElement(M.Z,{className:B.resizablePanesWrapper,orientation:"vertical",size:G?re:"100%",minSize:480,maxSize:-480,allowResize:G,onChange:le},o().createElement("div",{className:B.pane},o().createElement(N.Z,{entity:(null==ee?void 0:ee.aEntity)||i},ee?o().createElement(R.Z,null):o().createElement(z.a,null)),q?o().createElement(L.R,{attributeUris:xe},o().createElement(P.Z,{visibleColumns:ue,onChangeVisibleColumns:de,entity:be,crosswalksMap:ve,selectedAttributeTypes:te,onSelectAttributeTypes:ne,readOnly:!!ee,onDelete:ke,onPin:Ee,onIgnore:we,onEdit:Ce,onAdd:Se})):o().createElement(tt,null)),o().createElement(j,{className:B.pane,title:null===(t=Fe[I])||void 0===t?void 0:t.title,onClose:()=>V(I)},null===(n=Fe[I])||void 0===n?void 0:n.content)))),o().createElement(U.G,{className:B.tabs,buttonsProps:(0,A.pipe)((0,A.reject)((0,A.propEq)("hidden",!0)),(0,A.pluck)("buttonProps"))(Fe),onButtonClick:V,activeIndexId:I}),o().createElement(ae,null))})),it=(0,i.createGenerateClassName)({productionPrefix:"sourcesPerspective",disableGlobal:!0}),st=e=>{let{config:t,store:n,onResize:p,saveState:m,getSavedState:g}=e;const f=(0,r.useCallback)((0,h.aYu)(g),[g]);return o().createElement(l.Provider,{store:n},o().createElement(u.m.Provider,{value:t.id},o().createElement(i.StylesProvider,{generateClassName:it},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(at,{config:t,saveState:m,getSavedState:f}),o().createElement(d.Z,null)))))}}}]);
package/6971.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6971],{8598:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(95038),o=n.n(a);const r=function(){function e(e){var t=void 0===e?{}:e,n=t.locale,a=t.instance,r=t.moment;this.yearFormat="YYYY",this.yearMonthFormat="MMMM YYYY",this.dateTime12hFormat="MMMM Do hh:mm a",this.dateTime24hFormat="MMMM Do HH:mm",this.time12hFormat="hh:mm A",this.time24hFormat="HH:mm",this.dateFormat="MMMM Do",this.moment=a||r||o(),this.locale=n}return e.prototype.parse=function(e,t){return""===e?null:this.moment(e,t,!0)},e.prototype.date=function(e){if(null===e)return null;var t=this.moment(e);return t.locale(this.locale),t},e.prototype.isValid=function(e){return this.moment(e).isValid()},e.prototype.isNull=function(e){return null===e},e.prototype.getDiff=function(e,t){return e.diff(t)},e.prototype.isAfter=function(e,t){return e.isAfter(t)},e.prototype.isBefore=function(e,t){return e.isBefore(t)},e.prototype.isAfterDay=function(e,t){return e.isAfter(t,"day")},e.prototype.isBeforeDay=function(e,t){return e.isBefore(t,"day")},e.prototype.isBeforeYear=function(e,t){return e.isBefore(t,"year")},e.prototype.isAfterYear=function(e,t){return e.isAfter(t,"year")},e.prototype.startOfDay=function(e){return e.clone().startOf("day")},e.prototype.endOfDay=function(e){return e.clone().endOf("day")},e.prototype.format=function(e,t){return e.locale(this.locale),e.format(t)},e.prototype.formatNumber=function(e){return e},e.prototype.getHours=function(e){return e.get("hours")},e.prototype.addDays=function(e,t){return t<0?e.clone().subtract(Math.abs(t),"days"):e.clone().add(t,"days")},e.prototype.setHours=function(e,t){return e.clone().hours(t)},e.prototype.getMinutes=function(e){return e.get("minutes")},e.prototype.setMinutes=function(e,t){return e.clone().minutes(t)},e.prototype.getSeconds=function(e){return e.get("seconds")},e.prototype.setSeconds=function(e,t){return e.clone().seconds(t)},e.prototype.getMonth=function(e){return e.get("month")},e.prototype.isSameDay=function(e,t){return e.isSame(t,"day")},e.prototype.isSameMonth=function(e,t){return e.isSame(t,"month")},e.prototype.isSameYear=function(e,t){return e.isSame(t,"year")},e.prototype.isSameHour=function(e,t){return e.isSame(t,"hour")},e.prototype.setMonth=function(e,t){return e.clone().month(t)},e.prototype.getMeridiemText=function(e){return"am"===e?"AM":"PM"},e.prototype.startOfMonth=function(e){return e.clone().startOf("month")},e.prototype.endOfMonth=function(e){return e.clone().endOf("month")},e.prototype.getNextMonth=function(e){return e.clone().add(1,"month")},e.prototype.getPreviousMonth=function(e){return e.clone().subtract(1,"month")},e.prototype.getMonthArray=function(e){for(var t=[e.clone().startOf("year")];t.length<12;){var n=t[t.length-1];t.push(this.getNextMonth(n))}return t},e.prototype.getYear=function(e){return e.get("year")},e.prototype.setYear=function(e,t){return e.clone().set("year",t)},e.prototype.mergeDateAndTime=function(e,t){return this.setMinutes(this.setHours(e,this.getHours(t)),this.getMinutes(t))},e.prototype.getWeekdays=function(){return this.moment.weekdaysShort(!0)},e.prototype.isEqual=function(e,t){return null===e&&null===t||this.moment(e).isSame(t)},e.prototype.getWeekArray=function(e){for(var t=e.clone().startOf("month").startOf("week"),n=e.clone().endOf("month").endOf("week"),a=0,o=t,r=[];o.isBefore(n);){var l=Math.floor(a/7);r[l]=r[l]||[],r[l].push(o),o=o.clone().add(1,"day"),a+=1}return r},e.prototype.getYearRange=function(e,t){for(var n=this.moment(e).startOf("year"),a=this.moment(t).endOf("year"),o=[],r=n;r.isBefore(a);)o.push(r),r=r.clone().add(1,"year");return o},e.prototype.getCalendarHeaderText=function(e){return this.format(e,this.yearMonthFormat)},e.prototype.getYearText=function(e){return this.format(e,"YYYY")},e.prototype.getDatePickerHeaderText=function(e){return this.format(e,"ddd, MMM D")},e.prototype.getDateTimePickerHeaderText=function(e){return this.format(e,"MMM D")},e.prototype.getMonthText=function(e){return this.format(e,"MMMM")},e.prototype.getDayText=function(e){return this.format(e,"D")},e.prototype.getHourText=function(e,t){return this.format(e,t?"hh":"HH")},e.prototype.getMinuteText=function(e){return this.format(e,"mm")},e.prototype.getSecondText=function(e){return this.format(e,"ss")},e}()},27604:(e,t,n)=>{var a=n(14859);t.Z=void 0;var o=a(n(24328)),r=(0,a(n(50175)).default)(o.default.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");t.Z=r},99144:(e,t,n)=>{var a=n(14859);t.Z=void 0;var o=a(n(24328)),r=(0,a(n(50175)).default)(o.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");t.Z=r},67766:(e,t,n)=>{var a=n(14859);t.Z=void 0;var o=a(n(24328)),r=(0,a(n(50175)).default)(o.default.createElement("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"KeyboardArrowLeft");t.Z=r},42767:(e,t,n)=>{var a=n(14859);t.Z=void 0;var o=a(n(24328)),r=(0,a(n(50175)).default)(o.default.createElement("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight");t.Z=r},72753:(e,t,n)=>{var a=n(14859);t.Z=void 0;var o=a(n(24328)),r=(0,a(n(50175)).default)(o.default.createElement("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");t.Z=r},32528:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(13688),o=n(48852);const r=e=>t=>(0,o.l)(a.X,e,t)},1876:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(24328),o=n.n(a),r=n(13980),l=n.n(r),i=n(87918),s=n.n(i),c=n(94079),p=n(87685);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}const d=e=>o().createElement("svg",u({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M18 2V0H0v2l7 8v8l4-2v-6z",fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:1})),m=(0,n(79692).Z)((e=>({"filterIcon--enabled":{color:e.palette.primary.main},closeIcon:{position:"absolute",right:"3px",bottom:"3px",transform:"scale(0.5)"},button:{padding:"11px"}}))),f=e=>{let{enabled:t,onClick:n}=e;const a=m();return o().createElement(c.Tooltip,{title:t?s().text("Clear all filters"):s().text("Filter")},o().createElement(c.IconButton,{onClick:n,classes:{root:a.button}},t?o().createElement(o().Fragment,null,o().createElement(d,{className:a["filterIcon--enabled"]}),o().createElement(p.default,{color:"primary",className:a.closeIcon})):o().createElement(d,null)))};f.propTypes={enabled:l().bool,onClick:l().func};const y=f},58662:(e,t,n)=>{n.d(t,{Z:()=>h});var a=n(13980),o=n.n(a),r=n(24328),l=n.n(r),i=n(71153),s=n.n(i),c=n(94079),p=n(87918),u=n.n(p),d=n(31276),m=n(17440);const f=(0,n(79692).Z)({pagination:{display:"flex",alignItems:"center",justifyContent:"flex-end",height:"56px",borderTop:"1px solid rgba(0,0,0,0.12)",boxShadow:"none"},caption:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px"},selectRoot:{marginLeft:"5px",marginRight:"36px"},select:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px",textAlign:"right"},actions:{marginLeft:"32px"}});function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){b(e,t,n[t])}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g=e=>{let{classes:t={},count:n,rowsPerPageOptions:a,page:o,onChangePage:i,rowsPerPage:p,onChangeRowsPerPage:b,basicTableRef:g,labelRowsPerPage:h}=e;const v=f(),x=(0,r.useCallback)((()=>{(0,m.pathOr)(m.identity,["current","resetScrollbarPosition"],g)()}),[g]),E=(0,r.useCallback)((e=>{i(e),x()}),[i,x]),C=(0,r.useCallback)((e=>{i(0),b(e),x()}),[i,b,x]);return l().createElement(c.TablePagination,{classes:y({},t,{root:s()(v.pagination,t.root),select:s()(v.select,t.select),caption:v.caption,selectRoot:v.selectRoot,actions:v.actions}),component:"div",labelRowsPerPage:h||u().text("Rows per page:"),labelDisplayedRows:e=>{let{from:t,to:n,count:a}=e;return u().text("${fromRow}-${toRow} of ${countRows}",{fromRow:u().number(t,"0,0"),toRow:u().number(n,"0,0"),countRows:u().number(a,"0,0")})},count:n,rowsPerPageOptions:a,page:o,onChangePage:(0,m.pipe)((0,m.nthArg)(1),E),rowsPerPage:p,onChangeRowsPerPage:(0,m.pipe)(d.NA,C)})};g.propTypes={classes:o().object,rowsPerPageOptions:o().arrayOf(o().number),count:o().number,page:o().number,onChangePage:o().func,rowsPerPage:o().number,onChangeRowsPerPage:o().func,basicTableRef:o().shape({current:o().object}),labelRowsPerPage:o().string};const h=l().memo(g)},26180:(e,t,n)=>{n.d(t,{ZP:()=>y});var a=n(17440),o=n(31276);function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){l(e,t,n[t])}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const i="CHANGE_COLUMNS",s="TOGGLE_FILTERS",c="CHANGE_FILTER",p="TOGGLE_SORT",u="CHANGE_PAGE",d="CHANGE_ROWS_PER_PAGE",m={changeColumns:(0,o.zD)(i),toggleFilters:(0,o.zD)(s),changeFilter:(0,o.zD)(c),toggleSort:(0,o.zD)(p),changePage:(0,o.zD)(u),changeRowsPerPage:(0,o.zD)(d)},f=(e,t)=>{const n=(0,a.difference)(e.visibleColumns,t),o=e=>n.includes(e);return(0,a.evolve)({visibleColumns:(0,a.always)(t),sorting:(0,a.when)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(e.field)}),(()=>{const[e]=t;return{field:e,order:"asc"}})),filters:e=>(0,a.keys)(e).reduce(((e,t)=>o(t)?(0,a.dissoc)(t,e):e),e)},e)},y={reducer:(e,t)=>{switch(t.type){case i:{const n=t.payload;return f(e,n)}case s:{const t=!e.filters;return r({},e,{filters:t?{}:null,page:t?e.page:0})}case c:{const{columnId:n,filter:o}=t.payload;return(0,a.evolve)({filters:o?(0,a.assoc)(n,o):(0,a.dissoc)(n),page:(0,a.always)(0)},e)}case p:{const n=t.payload,l=(0,a.path)(["sorting","field"],e),i=(0,a.path)(["sorting","order"],e);return r({},e,{sorting:{field:n,order:(0,o.Dh)(n===l?i:null)},page:0})}case u:return r({},e,{page:t.payload});case d:return r({},e,{rowsPerPage:t.payload});default:return e}},actions:m,changeVisibleColumns:f}},10237:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(27556),o=n(13980),r=n.n(o),l=n(24328),i=n.n(l);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=(0,n(79692).Z)((e=>({"basic-view__paper":s({display:"flex",flexDirection:"column"},e.basicView)})));function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}const d=(0,l.forwardRef)(((e,t)=>{let{children:n,className:o}=e,r=function(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","className"]);const l=p();return i().createElement(a.Z,u({ref:t,className:o,classes:{root:l["basic-view__paper"]}},r),n)}));d.displayName="BasicView",d.propTypes={children:r().node,className:r().string};const m=d},81137:(e,t,n)=>{n.d(t,{Z:()=>c});var a=n(24328),o=n.n(a),r=n(87918),l=n.n(r),i=n(94079);const s=(0,n(79692).Z)({paper:{minHeight:"180px"},title:{padding:"16px 16px 10px 16px",fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px"},content:{padding:"0 16px"},contentText:{marginBottom:0,fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px"},actionButtons:{display:"flex",paddingTop:"4px",fontSize:"14px",fontWeight:500,letterSpacing:0,lineHeight:"16px","& > div":{marginLeft:"auto"}},discardButton:{marginRight:"8px"}}),c=e=>{let{open:t,title:n,content:a,onCancel:r,cancelCaption:c=l().text("Cancel"),onDiscard:p,discardCaption:u="",onSave:d,saveCaption:m=l().text("Save"),disabledSave:f=!1}=e;const y=s();return o().createElement(i.Dialog,{open:t,onClose:r,classes:{paperScrollPaper:y.paper}},o().createElement(i.DialogTitle,{classes:{root:y.title}},n),o().createElement(i.DialogContent,{classes:{root:y.content}},o().createElement(i.DialogContentText,{classes:{root:y.contentText}},a)),o().createElement(i.DialogActions,{className:y.actionButtons,disableSpacing:!0},r&&o().createElement(i.Button,{onClick:r},c),o().createElement("div",null,p&&o().createElement(i.Button,{onClick:p,classes:{root:y.discardButton}},u),o().createElement(i.Button,{onClick:d,color:"primary",disabled:f,autoFocus:!0},m))))}},68439:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(24328),o=n.n(a),r=n(52730),l=n(71153),i=n.n(l),s=n(94079),c=n(58991),p=n(59431);const u=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),d=e=>{let{entity:t,className:n,size:a="small"}=e;const l=u(),d=(0,r.useSelector)(p.ZP.selectors.getMetadata),m=t.type,f=(0,c.nt9)(d,m)||{},y=(0,c.VD3)(d,f,"typeColor")||c.rSc.palette.primary.main;return o().createElement(s.Typography,{style:{backgroundColor:y,color:c.P6Y.Colors.getColor(y)?"#FFFFFF":"#212121"},className:i()(l[`entityType-${a}`],n),component:"div"},(0,c.jFi)(d,t))}},57304:(e,t,n)=>{n.d(t,{Z:()=>x});var a=n(24328),o=n.n(a),r=n(13980),l=n.n(r),i=n(71153),s=n.n(i),c=n(52730),p=n(17440),u=n(94079),d=n(87918),m=n.n(d),f=n(58991),y=n(59431),b=n(53180),g=n(68439);const h=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),v=e=>{let{className:t,entity:n,children:r,classes:l}=e;const i=h({classes:l}),d=(0,c.useSelector)(y.ZP.selectors.getMetadata),v=(0,a.useCallback)((()=>{navigator.clipboard.writeText((0,f.BTI)(n))}),[n]);if((0,p.isNil)(n))return null;const x=(0,f.idV)(n.label),E=n.secondaryLabel,C=(0,f.ptG)(d,n),w=(0,f.Fn9)(n),S=n.uri,T=(0,f.BTI)(n);return o().createElement("div",{className:s()(i.profileBandWrapper,t)},o().createElement("div",{className:s()(i.profileBand,{[i.inactive]:!w}),"data-entity-uri":S},o().createElement(b.Z,{key:n.uri,entity:n,avatarClassName:i.profileIcon,imageClassName:i.imageProfileIcon}),o().createElement("div",{className:i.profileInfo},o().createElement("div",null,o().createElement(u.Typography,{variant:"h6",className:i.label},x),E&&o().createElement(u.Typography,{variant:"subtitle2",className:i.secondaryLabel},E),C&&o().createElement(u.Typography,{variant:"subtitle1",className:i.businessCard},C)),o().createElement("div",{className:i.specialInfo},o().createElement("div",{className:i.entityType},o().createElement(g.Z,{entity:n,size:"medium",className:i.badge}),!(0,f.ZiX)(S)&&o().createElement(u.Tooltip,{title:m().text("Copy to clipboard")},o().createElement(u.Typography,{display:"inline",variant:"body2",className:i.entityId,onClick:v},m().text("Entity ID"),": ",T))))),r&&o().createElement("div",null,r)))};v.propTypes={className:l().string,entity:l().object,children:l().node,classes:l().object};const x=v},30553:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(13980),o=n.n(a),r=n(24328),l=n.n(r);const i=e=>{let{height:t,margin:n}=e;return l().createElement("div",{style:{width:"1px",height:`${t}px`,borderLeft:"1px solid rgba(0,0,0,0.38)",margin:`0 ${n}px`,flexShrink:"0"}})};i.propTypes={height:o().number,margin:o().number};const s=i},86361:(e,t,n)=>{n.d(t,{o:()=>l});var a=n(24328),o=n(17440);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=e=>{let{actions:t,dispatch:n}=e;return(0,a.useMemo)((()=>Object.entries(t).reduce(((e,t)=>{let[a,l]=t;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){r(e,t,n[t])}))}return e}({},e,{[a]:(0,o.pipe)(l,n)})}),{})),[n,t])}},7718:(e,t,n)=>{n.d(t,{C:()=>d});var a=n(24328),o=n(52730),r=n(17440),l=n(58991),i=n(59431);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=[],u=e=>console.error("Collaboration error",e),d=e=>{let{objectIds:t=p,objectTypes:n,enabled:c=!0}=e;const d=(0,o.useSelector)(i.ZP.selectors.getEntity),m=(0,o.useSelector)(i.ZP.selectors.getTenant),f=(0,o.useSelector)(i.ZP.selectors.getCollaborationPath),y=(0,o.useSelector)(i.ZP.selectors.isCollaborationEnabled)&&c,[b,g]=(0,a.useState)(null),[h,v]=(0,a.useState)([]),[x,E]=(0,a.useState)(null),[C,w]=(0,a.useState)(null),[S,T]=(0,a.useState)(!1),[O,P]=(0,a.useState)(!1),k=(0,a.useCallback)((e=>{E((t=>s({},t,e)))}),[]),D=null==d?void 0:d.uri,R=(0,a.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(y&&D&&!(0,l.ZiX)(D)){const n=e=>{console.warn("Collaboration error",e),E(null)};(0,r.pipe)(l.$oF,(0,r.andThen)((0,r.map)((0,r.props)(["objectId","comments"]))),(0,r.andThen)(r.fromPairs),(0,r.andThen)(t?E:k),(0,r.otherwise)(n))({uris:e,tenant:m,collaborationPath:f})}else E(null)}),[k,f,D,y,m]);(0,a.useEffect)((()=>{R(t,!0)}),[t,R]);const N=(0,a.useCallback)(((e,t)=>{(0,l.liG)({collaborationPath:f,tenant:m,relatedObjectUri:e,pageToken:t}).then((e=>{let{items:n,nextPageToken:a}=e;v((e=>t?(0,r.uniqBy)((0,r.prop)("commentId"),[...e,...n]):n)),g(a)})).catch(u)}),[f,m]),j=(0,a.useCallback)((e=>{P(!0),(0,l.d7q)({collaborationPath:f,tenant:m,commentId:e}).then(w).catch(u).finally((()=>P(!1)))}),[f,m]),Z=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,objectType:a,uri:o,relatedObjectUris:r}=e;T(!0);const i={objectId:o,content:t,relatedObjectUris:r,objectType:a,visibility:"public",namedUsers:n,permanentLink:""};return(0,l.Yrx)({collaborationPath:f,tenant:m,data:i}).then((e=>{let[t]=e;return((e,t)=>{w(e),E((n=>s({},n,{[t]:[...n[t]||[],{commentId:e.commentId,replies:0,status:"open"}]}))),v((t=>[e,...t]))})(t,o)})).catch(u).finally((()=>T(!1)))}),[f,m]),M=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,objectType:a,uri:o,relatedObjectUris:i,commentId:c,replies:p}=e;T(!0);const d={objectId:o,content:t,relatedObjectUris:i,objectType:a,visibility:"public",namedUsers:n,permanentLink:"",commentId:c,replies:p};return(0,l.uAg)({collaborationPath:f,tenant:m,data:d}).then((e=>(e=>{w(e),v((0,r.map)((0,r.when)((0,r.propEq)("commentId",e.commentId),(0,r.always)(e))))})(s({},e,{replies:p})))).catch(u).finally((()=>T(!1)))}),[f,m]),I=(0,a.useCallback)((e=>{let{uri:t,commentId:n}=e;T(!0),(0,l.YFy)({collaborationPath:f,tenant:m,commentId:n}).then((()=>((e,t)=>{w(null),E((n=>{const a=n[t]||[];return s({},n,{[t]:a.filter((t=>t.commentId!==e))})})),v((t=>t.filter((t=>t.commentId!==e))))})(n,t))).catch(u).finally((()=>T(!1)))}),[f,m]),A=(0,a.useCallback)(((e,t,n)=>{const a="resolve"===e.action?"resolved":"open";w("resolved"===a?e=>{if(e)return null}:t=>{if(t)return s({},t,{replies:[...t.replies,e]})}),E((e=>s({},e,{[t]:(e[t]||[]).map((e=>e.commentId===n?s({},e,{status:a,replies:e.replies+1}):e))}))),v((t=>t.map((t=>t.commentId===n?s({},t,{status:a,replies:[...t.replies,e]}):t))))}),[]),F=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,commentId:a,action:o,uri:r}=e;T(!0);const i={content:t,action:o,namedUsers:n};return(0,l.PP2)({collaborationPath:f,tenant:m,commentId:a,data:i}).then((e=>{let[t]=e;return A(t,r,a)})).catch(u).finally((()=>T(!1)))}),[f,m,A]),L=(0,a.useCallback)((e=>{let{commentId:t,uri:n}=e;F({content:"",namedUsers:[],commentId:t,action:"resolve",uri:n})}),[F]),U=(0,a.useCallback)((e=>{let{commentId:t,uri:n}=e;F({content:"",namedUsers:[],commentId:t,action:"reopen",uri:n})}),[F]);return{clearCurrentComment:(0,a.useCallback)((()=>{w(null)}),[]),comments:h,commentsMap:x,createComment:Z,createReply:F,currentComment:C,deleteComment:I,editComment:M,getComment:j,getComments:N,getCommentsCount:R,loading:O,objectTypes:n,pageToken:b,reOpenThread:U,resolveThread:L,sending:S}}},37152:(e,t,n)=>{n.d(t,{a:()=>m});var a=n(24328),o=n(52730),r=n(17440),l=n(59431),i=n(58991),s=n(67218),c=n(30634);function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=(0,r.when)(r.identity,(0,r.pipe)(i.VGB,r.length,(0,r.times)((e=>e+1)))),m=e=>{let{sorting:t,filter:n,page:u,rowsPerPage:m,config:f,entity:y,relationActivityFilter:b,mode:g}=e;const[h,v]=(0,a.useState)(!1),x=(0,o.useDispatch)(),E=(0,o.useSelector)(l.ZP.selectors.getTenant),C=(0,o.useSelector)(l.ZP.selectors.getDtssPath),{activityFilter:w,globalFilter:S}=(0,o.useSelector)(l.ZP.selectors.getGlobalSearchRequestOptions)||{},T=(0,s._)(),O=f.suggested,P=(0,a.useCallback)((()=>{if(null!=y&&y.uri){const e=p({},f.content,{sortBy:null==t?void 0:t.field,order:null==t?void 0:t.order,returnDates:!0,returnObjects:!0,activeness:{relation:b||i.Ng6.ALL,entity:w},max:m,offset:u*m,filter:(0,i.vyX)(S,n)||void 0,suggested:d(O)}),a=[e].concat((0,r.ifElse)(r.identity,(0,r.pipe)(i.VGB,(t=>t.map(((t,n)=>p({},t,{id:e.suggested[n]}))))),(0,r.always)([]))(O)),o=(0,r.cond)([[(0,r.pipe)((0,r.prop)("uri"),i.ZiX),()=>Promise.resolve([{total:0}])],[i.biM,e=>(0,i.n_1)({entityUri:e.uri,configs:a,customerTenant:E,dataTenant:e.dataTenant,dtssPath:C})],[r.T,e=>(0,i.N6e)(e.uri,a)]]);v(!0),T(o(y)).then((e=>{let[{connections:t,total:n}]=e;x(l.N5.relations.actions.relationsLoaded({id:f.id,connections:t,total:n}))})).finally((()=>{v(!1)}))}}),[w,f,x,C,null==y?void 0:y.uri,null==y?void 0:y.dataTenant,n,S,u,b,m,T,t,E]),k=(0,a.useRef)(!1);k.current=!1,(0,a.useEffect)((()=>{k.current=!0,P()}),[P]);const D=(0,c.D)(g);return(0,a.useEffect)((()=>{g!==i.ARY.Viewing||k.current||D===g||(k.current=!0,P())}),[P,g,D]),{isLoading:h,reload:P}}},17554:(e,t,n)=>{n.d(t,{U:()=>i});var a=n(24328),o=n(52730),r=n(58991),l=n(59431);const i=()=>{const[e,t]=(0,a.useState)([]),n=(0,o.useSelector)(l.ZP.selectors.getTenant),i=(0,o.useSelector)(l.ZP.selectors.getServicesPath),s=e=>{console.warn("Users error",e),t([])};return(0,a.useEffect)((()=>{(0,r.kz_)({tenant:n,servicesPath:i}).then((e=>{let{array:n}=e;return t(n)})).catch(s)}),[n,i]),e}},55451:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Wt});var a=n(24328),o=n.n(a),r=n(52730),l=n(8598),i=n(36138),s=n(44443),c=n(22664),p=n(39450),u=n(585),d=n(17440),m=n(59431),f=n(58991),y=n(17554),b=n(20562),g=n(37152),h=n(7718),v=n(49759),x=n(3515),E=n(31274),C=n(57304),w=n(93873),S=n(99136),T=n(58662);function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){P(e,t,n[t])}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const k={relationsTable:{},attributesTable:{}};var D=n(26180),R=n(31276),N=n(86361),j=n(87918),Z=n.n(j);const M="relation.type",I="relation.attributes",A=[{id:"entity.label",get label(){return Z().text("Profile")},dataTypeDefinition:{type:f.oS0.TYPE_STRING},hideable:!1,filterable:!1,initialWidth:280,autoResize:!1},{id:M,get label(){return Z().text("Type")}},{id:"relation.label",get label(){return Z().text("Directional Label")},filterable:!1,dataTypeDefinition:{type:f.oS0.TYPE_STRING}},{id:"relation.activeness.startDate",get label(){return Z().text("Start Date")},dataTypeDefinition:{type:f.oS0.TYPE_ACTIVENESS_DATE}},{id:"relation.activeness.endDate",get label(){return Z().text("End Date")},dataTypeDefinition:{type:f.oS0.TYPE_ACTIVENESS_DATE}},{id:I,get label(){return Z().text("Attributes")},sortable:!1,filterable:!1,maxAttrsToShow:7}],F=(0,d.pluck)("id",A),L=[M,I],U=[20,50,100],z=(0,d.pipe)(f.Tde,(0,d.concat)("relation.")),B=(0,d.pipe)((0,d.map)((e=>({id:z(e.uri),label:e.label,dataTypeDefinition:(0,f.PFL)(e)}))),(0,d.uniqBy)((0,d.prop)("id")));function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){W(e,t,n[t])}))}return e}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const H="CHANGE_RELATION_TYPE",V="APPLY_SAVED_STATE",Y="SAVE_CURRENT_STATE",G=_({},D.ZP.actions,{changeRelationType:(0,R.zD)(H),applySavedState:(0,R.zD)(V),saveCurrentState:(0,R.zD)(Y)}),$=(0,d.assoc)("page",0),q=e=>(0,d.pipe)((0,d.prop)("visibleColumns"),(0,d.ifElse)((0,d.always)(e.currentRelationType),(0,d.without)(L),(0,d.concat)(L)),(0,d.intersection)(F))(e),X=e=>(0,d.path)(["visibleColumnsForRelationTypes",`${e.currentRelationType}`],e),K=e=>{const t=(0,d.either)(X,q)(e);return D.ZP.changeVisibleColumns(e,t)},J=e=>{const{currentRelationType:t,visibleColumns:n}=e;return(0,d.evolve)({visibleColumnsForRelationTypes:(0,d.assoc)(`${t}`,n)},e)},Q=(0,d.pipe)(J,(0,d.pick)(["currentRelationType","visibleColumnsForRelationTypes","filters","sorting"]));var ee=n(99341),te=n(94079),ne=n(92778),ae=n(30553),oe=n(51229),re=n(1876),le=n(60894),ie=n(79026),se=n(79692);const ce=(0,se.Z)({select:{fontSize:"13px",color:"rgba(0,0,0,.6)",paddingLeft:"15px","&&":{paddingRight:"35px"}},selectMenu:{"& li":{fontSize:"13px",height:"32px"}},textField:{maxWidth:"100%"}}),pe=e=>{let{value:t,onChange:n,relationTypes:r,className:l}=e;const i=ce(),s=(0,a.useMemo)((()=>(0,d.pipe)((0,d.map)((e=>{let{label:t,uri:n}=e;return{label:t,value:n}})),(0,d.concat)([{value:"",label:Z().text("All types")}]))(r)),[r]);return o().createElement("div",{className:l},o().createElement(ie.Z,{displayEmpty:!0,disableUnderline:!0,classes:{select:i.select},TextFieldProps:{classes:{root:i.textField}},MenuProps:{classes:{list:i.selectMenu}},value:t||"",entries:s,onChange:e=>n(e||null)}))},ue=(0,se.Z)((e=>({header:{height:"56px",boxSizing:"border-box",paddingRight:"10px"},title:{fontSize:"16px"},total:{fontSize:"14px",color:e.palette.text.secondary,flexShrink:0,marginRight:"5px"},relationTypeSelector:{margin:"0px 10px 0 30px",overflow:"hidden"}}))),de=(0,a.memo)((e=>{let{total:t,filteringEnabled:n,onToggleFilters:a,columnsData:r,selectedColumns:l,currentRelationType:i,onRelationTypeChange:s,relationTypes:c,onChangeColumns:p}=e;const u=ue();return o().createElement(ne.Z,{title:Z().text("Relationships"),classes:{root:u.header,title:u.title}},c.length>0&&o().createElement(pe,{className:u.relationTypeSelector,value:i,onChange:s,relationTypes:c}),o().createElement(ae.Z,{height:28,margin:20}),o().createElement(te.Typography,{variant:"caption",className:u.total},1===t?Z().text("${count} record",{count:t}):Z().text("${count} records",{count:t})),o().createElement(oe.Z,null),o().createElement(re.Z,{enabled:n,onClick:a}),o().createElement(ae.Z,{height:28,margin:8}),o().createElement(le.Z,{columnsData:r,selectedColumns:l,onChangeColumns:p}))}));var me=n(74402),fe=n(97946),ye=n(85709),be=n(25461),ge=n(92332),he=n(67353);const ve=(0,se.Z)((e=>({headCell:{display:"flex",alignItems:"center",height:"100%",width:"100%",fontSize:"12px",color:e.palette.text.secondary,background:"linear-gradient(0deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.06)), #FFFFFF"},rowCell:{fontSize:"13px",overflow:"hidden",overflowWrap:"break-word"},inactiveRowCell:{opacity:.6},defaultWrapper:{padding:"15px 25px 0 25px","&:last-child":{paddingBottom:"15px"}},entityCell:{display:"flex",alignItems:"flex-start",padding:"15px"},entityAvatar:{transform:"scale(0.5)",margin:"-10px 0 -10px -10px"},inactiveEntityAvatar:{overflow:"initial","&:after":{content:'""',position:"absolute",backgroundColor:"rgb(209, 206, 206)",border:"1px solid rgba(0, 0, 0, 1)",borderRadius:"2px",width:"12px",right:0,bottom:0,height:"12px"},"& > img":{borderRadius:"50%",overflow:"hidden"}},entityLabel:{color:e.palette.primary.main,textDecoration:"none",fontWeight:500},attributesWrapper:{padding:"15px 25px 10px 25px",color:"rgba(0,0,0,0.87)"},commentsContainer:{marginLeft:"auto"}}))),xe=(0,he.Z)((e=>{const t=ve();return o().createElement("div",{className:t.headCell},o().createElement(ge.default,e))}));var Ee=n(71153),Ce=n.n(Ee),we=n(19603),Se=n(31254),Te=n(31039),Oe=n(94646);const Pe=e=>{let{value:{entity:t,entityType:n,relation:a},isInactiveRelation:l}=e;const i=ve(),s=(0,r.useSelector)(m.ZP.selectors.getEntityUri);return o().createElement("div",{className:Ce()(i.entityCell,we.U)},o().createElement(Se.Z,{className:Ce()(i.entityAvatar,{[i.inactiveEntityAvatar]:l}),entityType:n}),o().createElement(Te.Z,{value:(0,f.wwR)({uri:t.entityUri,dataTenant:t.dataTenant}),className:i.entityLabel},(0,f.idV)(t.entityLabel)),o().createElement("div",{className:i.commentsContainer,onClick:e=>e.stopPropagation()},o().createElement(Oe.Z,{uri:a.relationUri,relatedObjectUris:(0,f.wp9)(f.q7e.RELATION,{entityUri:s,connection:{relation:a,entity:t}}),objectType:f.q7e.RELATION,allowOnlyOneComment:!0})))};var ke=n(80931);const De=e=>{let{columnData:t,value:{attributes:n,attributeTypes:a}}=e;const r=ve();return o().createElement("div",{className:r.attributesWrapper,onClick:e=>e.stopPropagation()},o().createElement(ke.Z,{max:t.maxAttrsToShow,entity:{attributes:n},attrTypes:a,drawLines:!1}))};var Re=n(72768);const Ne=e=>{let{value:t,columnData:{dataTypeDefinition:n}}=e;const a=ve();return o().createElement("div",{className:a.defaultWrapper},o().createElement(Re.Z,{value:t,dataTypeDefinition:n}))};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 Ze=(0,d.pipe)((0,d.split)("."),(0,d.slice)(2,1/0)),Me=e=>{if(e.startsWith("relation.attributes")){const t=Ze(e);return t.length>1?t.slice(0,-1):null}return null},Ie=e=>{switch(e){case"entity.label":return Pe;case"relation.attributes":return De;default:return Ne}},Ae=(0,d.map)((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){je(e,t,n[t])}))}return e}({sortable:!0,resizable:!0},e,{headCellRenderer:xe,nestedPath:Me(e.id),rowCellValueRenderer:Ie(e.id)}))),Fe=(0,d.cond)([[(0,d.pathEq)(["columnData","id"],"relation.attributes"),e=>{let{columnData:t,cell:n}=e;const a=(0,d.pipe)((0,d.path)(["values",0,"attributes"]),d.values,d.length)(n);return a>t.maxAttrsToShow?26*t.maxAttrsToShow+49:26*a+25}],[d.T,be.Z]]);function Le(){return Le=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Le.apply(this,arguments)}const Ue=e=>{let{cell:t,CellValueRenderer:n}=e,a=function(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["cell","CellValueRenderer"]);const r=ve();return o().createElement("div",{className:Ce()(r.rowCell,{[r.inactiveRowCell]:a.isInactiveRelation})},t.values.map(((e,t)=>o().createElement(n,Le({key:t,value:e},a)))))};var ze=n(22983),Be=n(43054),_e=n(55847),We=n(22385),He=n(81137),Ve=n(83348);const Ye=(0,se.Z)((e=>({menuItem:{minHeight:"32px",color:e.palette.text.secondary},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"16px"},buttons:{display:"flex",alignItems:"center",paddingRight:"5px"}}))),Ge=(0,Ve.Z)(te.MenuItem),$e=(0,a.forwardRef)(((e,t)=>{let{item:n,onMenuClose:a=R.ZT}=e;const r=Ye(),{icon:l,disabled:i,text:s,tooltip:c,onClick:p}=n;return o().createElement(Ge,{tooltipTitle:c,showForDisabled:!0,classes:{root:r.menuItem},onClick:e=>{a(),p(e)},disabled:i,ref:t},l,o().createElement(te.Typography,{classes:{root:r.menuText}},s))}));$e.displayName="MenuItemRenderer";const qe=$e,Xe=e=>{let{disableDelete:t,connection:{entity:n,relation:l},onMenuOpen:i=R.ZT,onMenuClose:s=R.ZT,onDelete:c}=e;const p=Ye(),u=(0,r.useSelector)(m.ZP.selectors.getMetadata),y=(0,d.pipe)((0,d.prop)("relationType"),(0,f.V3K)(u),(0,f.uGe)(f.BDP.DELETE))(l),b=!t&&y,[g,h]=(0,a.useState)(!1),v=()=>h(!1),x=[{disabled:!b,text:Z().text("Delete"),icon:o().createElement(ze.Z,null),tooltip:b?null:Z().text("You don't have permissions to delete"),onClick:()=>h(!0)}],E=(0,a.useCallback)((()=>{g||s()}),[g,s]);return o().createElement("div",{className:p.buttons},o().createElement(_e.Z,{MenuItemRenderer:qe,menuId:"relationships-table-actions",buttonComponent:We.Z,buttonProps:{icon:Be.Z,size:"S"},menuItems:x,onMenuOpen:i,onMenuClose:E}),o().createElement(He.Z,{open:g,title:Z().text('Do you want to delete relationship "${label}"?',{label:(C=(0,f.idV)(n.entityLabel),C.length>17?`${C.substring(0,17)}...`:C)}),content:Z().text("This relationship will be removed and all the values in the relationship will be permanently deleted. Are you sure you want to delete this relationship?"),onSave:(0,d.pipe)(v,s,c),onDiscard:(0,d.pipe)(v,s),saveCaption:Z().text("Delete"),discardCaption:Z().text("Cancel")}));var C},Ke=(0,se.Z)({tableContainer:{flex:1,overflow:"hidden",display:"flex",zIndex:0},hoveredRowRightContentWrapper:{width:"100%",pointerEvents:"none!important"},menuButtonContainer:{position:"absolute",top:"calc(50% - 12px)",right:0,pointerEvents:"all"},tooltipAnchor:{width:"100%",height:"1px"}});function Je(){return Je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Je.apply(this,arguments)}const Qe=(0,a.memo)((e=>{let{metadata:t,connections:n,columnsData:r,sorting:l,onSort:i,filters:s,onFilter:c,onRowClick:p,tableRef:u,onDelete:m,readOnly:y}=e;const b=Ke(),g=(0,a.useMemo)((()=>((e,t,n)=>(n||[]).map((n=>(0,d.pipe)((0,d.reduce)(((t,a)=>{let{id:o}=a;return(0,d.assoc)(o,((e,t,n)=>{let{entity:a,relation:o}=t;switch(n){case"entity.label":return{entity:a,entityType:(0,f.nt9)(e,a.entityType),relation:o};case"relation.type":return o.relationType;case"relation.label":return o.relationLabel;case"relation.activeness.startDate":return o.startDate;case"relation.activeness.endDate":return o.endDate;case"relation.attributes":return{attributes:o.object.attributes,attributeTypes:(0,f.V3K)(e,o.relationType).attributes};default:return((e,t)=>(0,d.pipe)((0,d.path)(["object","attributes"]),(0,f.tT_)(e))(t))(Ze(n),o)}})(e,n,o),t)}),{}),(0,d.assoc)("rawValue",n))(t))))(t,r,n)),[t,n,r]),h=(0,a.useMemo)((()=>Ae(r)),[r]),{getDynamicRowCellHeight:v,changeRowCellHeight:x}=(0,me.Z)(),E=(0,a.useCallback)((0,d.either)(v,Fe),[v,Fe]),[C,w]=(0,a.useState)(null),S=(0,a.useCallback)((e=>{const t=!(0,f.Fn9)(e.rowValue.rawValue.relation);return o().createElement(fe.Z,Je({onChangeHeight:x},e),o().createElement(Ue,Je({},e,{isInactiveRelation:t})))}),[x]),[T,O]=(0,a.useState)(!1),P=(0,a.useCallback)((()=>O(!0)),[]),k=(0,a.useCallback)((()=>{w(null),O(!1)}),[]),D=(0,a.useCallback)((e=>w((t=>T?t:e))),[T]),R=(0,a.useMemo)((()=>{const e=null!=C?g[C].rawValue:null,t=!(0,f.Fn9)(null==e?void 0:e.relation);return e&&o().createElement(o().Fragment,null,o().createElement(te.Tooltip,{key:e.relation.relationUri,open:t,title:Z().text("Inactive")},o().createElement("div",{className:b.tooltipAnchor})),o().createElement("div",{className:b.menuButtonContainer},o().createElement(Xe,{disableDelete:y,connection:e,onMenuOpen:P,onMenuClose:k,onDelete:()=>m(e.relation.relationUri)})))}),[m,g,C]);return o().createElement("div",{className:b.tableContainer},o().createElement(ye.Z,{fixFirstColumn:!0,columnsData:h,rowsData:g,sorting:l,onSort:i,filters:s,onFilter:c,defaultColumnWidth:250,defaultColumnMinWidth:200,headRowHeight:48,getRowCellHeight:E,renderRowCell:S,onRowClick:p,ref:u,hoverStateEnabled:!0,hoverRowIndex:C,onRowHover:D,hoveredRowRightContent:R,classes:{hoveredRowRightContentWrapper:b.hoveredRowRightContentWrapper}}))}));var et=n(67218),tt=n(85965),nt=n(39417),at=n(10237),ot=n(63149),rt=n(6521),lt=n(48017),it=n(96955),st=n(66095),ct=n(20982),pt=n(99144),ut=n(65549),dt=n(52017),mt=n(90186);const ft=(0,se.Z)((()=>({tableRow:{"& + &":{marginTop:"4px"},margin:"auto",maxWidth:"448px"}})));function yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const bt=(0,a.memo)((e=>{let{readOnly:t,relation:n,metadata:r,selectedAttributeTypes:l,onDeleteCrosswalk:i,onEditCrosswalk:s}=e;const c=ft(),p=(0,f.V3K)(r,n.type),u=(0,a.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,d.pipe)((0,d.propOr)([],"crosswalks"),(0,d.map)((0,d.assoc)("ownerType","entity")),(0,mt.o)(e.type,t))(e)}(n,l)),[n,l]),[m,y]=(0,a.useState)([]),b=(0,a.useCallback)((e=>{i({entityUri:n.uri,crosswalkId:e})}),[i,n.uri]),g=(0,a.useCallback)((e=>{s(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){yt(e,t,n[t])}))}return e}({entityUri:n.uri},e))}),[s,n.uri]);return o().createElement("div",null,u.map((e=>{let{source:n,crosswalksByTypes:a}=e;return o().createElement("div",{key:n,className:c.tableRow},o().createElement(dt.Z,{source:n,crosswalksByTypes:a,expanded:m.includes(n),disableEditCrosswalk:!(0,f.Zm0)(p)||t,disableDeleteCrosswalk:!(0,f.a14)(p)||t,onEdit:g,onDelete:b,onToggleExpanded:()=>{y((0,d.ifElse)((0,d.includes)(n),(0,d.without)([n]),(0,d.append)(n)))}}))})))}));var gt=n(79769);const ht=(0,se.Z)((e=>({header:{display:"flex",flexDirection:"row",alignItems:"center",padding:"20px 12px",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},title:{fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px",color:e.palette.text.primary,marginLeft:"12px"},hint:{color:e.palette.text.secondary,display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"flex-start",margin:"4px 14px 10px"},hintText:{marginLeft:"8px",fontSize:"12px",lineHeight:"16px"},buttons:{display:"flex",padding:"8px 6px 4px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},editor:{paddingLeft:25,margin:"auto",maxWidth:"448px",boxSizing:"border-box",marginBottom:"4px"},tableContainer:{overflowY:"auto",overflowX:"hidden",paddingLeft:"16px",paddingRight:"6px"}}))),vt=(0,Ve.Z)(te.Button),xt=(0,a.memo)((e=>{let{className:t,readOnly:n,relation:l,selectedAttributeTypes:i,onAddCrosswalk:s,onDeleteCrosswalk:c,onEditCrosswalk:p}=e;const u=ht(),d=(0,r.useSelector)(m.ZP.selectors.getMetadata),y=(0,f.V3K)(d,l.type),[b,g]=(0,a.useState)(!1),h=(0,f.mkC)(y)&&!n;return o().createElement("div",{className:t},o().createElement("div",{className:u.header},o().createElement("span",{className:u.title},Z().text("Legend"))),o().createElement("div",{className:u.buttons},o().createElement(vt,{color:"primary",showForDisabled:!0,disabled:!h,tooltipTitle:h?null:Z().text("You don't have permissions to add crosswalk"),onClick:()=>g(!0)},o().createElement(ut.Z,{className:u.icon}),o().createElement("div",{className:u.buttonLabel},Z().text("Crosswalk")))),o().createElement("div",{className:u.hint},o().createElement(pt.Z,{className:u.icon}),o().createElement("span",{className:u.hintText},Z().text("You can drag a crosswalk to add values to attributes swimlanes"))),o().createElement("div",{className:u.tableContainer},b&&o().createElement(gt.Z,{className:u.editor,onAdd:e=>s({entity:l,crosswalk:e}),onClose:()=>g(!1)}),o().createElement(bt,{readOnly:n,metadata:d,relation:l,selectedAttributeTypes:i,onDeleteCrosswalk:c,onEditCrosswalk:p})))}));var Et=n(88611),Ct=n(23147),wt=n(94111),St=n(68439);const Tt=(0,se.Z)((e=>({entityInfo:{flex:"0 1 auto",overflow:"hidden",minWidth:"100px"},entityLabelContainer:{display:"flex",alignItems:"center",overflow:"hidden"},entityLabel:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary},infoIcon:{fontSize:"16px",color:e.palette.text.secondary,marginLeft:"5px"},profileBand:{margin:"-10px",maxWidth:"500px"},entityTypeBadge:{marginTop:"7px"}}))),Ot=e=>{let{entity:t}=e;const n=Tt(),a=(0,f.idV)(t.label);return o().createElement("div",{className:n.entityInfo},o().createElement("div",{className:n.entityLabelContainer},o().createElement(Et.C,{value:a},o().createElement(te.Typography,{variant:"h6",className:n.entityLabel,noWrap:!0},a)),o().createElement(wt.Z,{title:o().createElement(C.Z,{className:n.profileBand,entity:t}),placement:"right"},o().createElement(pt.Z,{className:n.infoIcon}))),o().createElement(St.Z,{className:n.entityTypeBadge,entity:t,size:"medium"}))},Pt=(0,se.Z)((e=>({root:{flexShrink:0,overflow:"hidden",width:"110px"},label:{color:e.palette.text.secondary,fontSize:"13px"}}))),kt=e=>{let{relation:t}=e;const n=Pt(),{direction:a,relationLabel:r}=t;return o().createElement("div",{className:n.root},o().createElement(Et.C,{value:r},o().createElement(te.Typography,{variant:"subtitle2",className:n.label,align:"center",noWrap:!0},r)),o().createElement("svg",{width:"110",height:"12",fill:"black",fillOpacity:"0.3"},"out"===a&&o().createElement("polygon",{points:"94 0, 110 6, 94 12, 94 9, 0 9, 0 3, 94 3"}),"bidirectional"===a&&o().createElement("polygon",{points:"94 0, 110 6, 94 12, 94 9, 16 9, 16 12, 0 6, 16 0, 16 3, 94 3"}),"in"===a&&o().createElement("polygon",{points:"16 12, 0 6, 16 0, 16 3, 110 3, 110 9, 16 9"})))};var Dt=n(8459),Rt=n(27604);const Nt=(0,se.Z)((()=>({root:{"&:hover $editButton":{visibility:"visible"}},editButton:{visibility:"hidden",marginLeft:"4px",marginBottom:"4px"},paper:{width:"150px",border:"3px solid rgba(0, 0, 0, 0.3)",borderRadius:"4px",boxSizing:"border-box",overflow:"hidden"}}))),jt=e=>{let{value:t=null,onChange:n,readOnly:r}=e;const l=Nt(),i=(0,a.useRef)(),[s,c]=(0,a.useState)(!1),p=()=>c(!1),[u,d]=(0,a.useState)(t),m=()=>{u!==t&&n(u),p()};return o().createElement("span",{ref:i,className:l.root},t&&(0,f.p6d)(t),o().createElement(We.Z,{disabled:r,icon:Rt.Z,size:"XXS",className:l.editButton,onClick:()=>c(!0)}),o().createElement(te.Popover,{classes:{paper:l.paper},open:s,anchorEl:i.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:14,horizontal:20},onKeyUp:e=>{"Enter"===e.key?m():"Escape"===e.key&&p()},onBackdropClick:m},o().createElement(Dt.Z,{InputProps:{autoFocus:!0,disableUnderline:!0,fullWidth:!0},size:"small",hiddenLabel:!0,label:void 0,value:u&&new Date(u),onChange:e=>d(e&&e.valueOf())})))},Zt=(0,se.Z)((e=>({relationBand:{flexShrink:0,boxShadow:"inset 0px -1px 0px rgba(0,0,0,0.06)",padding:"16px 19px"},inactiveRelationBand:{opacity:.6,background:"rgba(185, 188, 197, 0.18)"},toolbar:{display:"flex",alignItems:"center",gap:"16px",marginBottom:"10px"},mainInfo:{display:"flex",gap:"16px",marginLeft:"40px"},detailsInfo:{display:"flex",gap:"34px",marginLeft:"40px",marginTop:"17px",color:e.palette.text.secondary,fontSize:"13px"},detailTitle:{color:e.palette.text.primary,flexShrink:0,marginRight:"4px"},directionalLabel:{display:"flex",overflow:"hidden","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},relationDate:{flexShrink:0},commentsContainer:{marginRight:"18px"}})));function Mt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){It(e,t,n[t])}))}return e}function It(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const At=(0,a.memo)((e=>{let{readOnly:t,entity:n,connection:a,onNavigateBack:r,onDelete:l,onChangeActivenessDate:i}=e;const s=!(0,f.Fn9)(a.relation),c=Zt();return o().createElement("div",{className:Ce()(c.relationBand,we.U,{[c.inactiveRelationBand]:s})},o().createElement("div",{className:c.toolbar},o().createElement(We.Z,{icon:Ct.Z,size:"S",onClick:()=>r()}),o().createElement(te.Typography,{variant:"subtitle2",display:"inline"},Z().text("Back to relationships")),o().createElement(oe.Z,null),o().createElement("div",{className:c.commentsContainer},o().createElement(Oe.Z,{uri:a.relation.relationUri,relatedObjectUris:(0,f.wp9)(f.q7e.RELATION,{entityUri:null==n?void 0:n.uri,connection:a}),objectType:f.q7e.RELATION,allowOnlyOneComment:!0})),o().createElement(Xe,{connection:a,onDelete:l,disableDelete:t})),o().createElement("div",{className:c.mainInfo},o().createElement(Ot,{entity:n}),o().createElement(kt,{relation:a.relation}),o().createElement(Ot,{entity:Mt({},a.entity.object,{dataTenant:a.entity.dataTenant})})),o().createElement("div",{className:c.detailsInfo},o().createElement("div",{className:c.directionalLabel},o().createElement("span",{className:c.detailTitle},Z().text("Directional label:")),o().createElement(Et.C,{value:a.relation.relationLabel},o().createElement("span",null,a.relation.relationLabel))),o().createElement("div",{className:c.relationDate},o().createElement("span",{className:c.detailTitle},Z().text("Start date:")),o().createElement(jt,{value:a.relation.startDate,onChange:e=>i("startDate",e),readOnly:t})),o().createElement("div",{className:c.relationDate},o().createElement("span",{className:c.detailTitle},Z().text("End date:")),o().createElement(jt,{value:a.relation.endDate,onChange:e=>i("endDate",e),readOnly:t}))))})),Ft=e=>{console.error(e),u.Z.addError({title:Z().text("Error"),message:(0,f.xU7)(e,Z().text("Something went wrong"))})},Lt=(0,se.Z)({detailsView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden"},locked:{pointerEvents:"none"},resizablePanesWrapper:{flexGrow:1},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"}}),Ut=(0,a.memo)((e=>{let{entity:t,connection:n,visibleColumns:r,onClose:l,onDeleteConnection:i,onChangeConnection:s,onChangeVisibleColumns:c,readOnly:p}=e;const u=Lt(),m=(()=>{const[e,t]=(0,a.useState)([]),n=(0,a.useRef)([]),o=(0,a.useCallback)((0,f.DsO)((()=>{t([...n.current])}),50),[]),r=(0,a.useCallback)((e=>{n.current=e,o(e)}),[o]),l=(0,a.useCallback)(((e,t)=>{e&&r(t?[e]:[])}),[r]),[i,s]=(0,a.useState)([]),c=(0,a.useCallback)((e=>{e&&s((t=>{return n=[e],a=t,(0,d.concat)(n.filter((e=>!(0,d.any)((0,f.aFF)(e),a))),a.filter((e=>!(0,d.any)((0,f.aFF)(e),n))));var n,a}))}),[]);return{highlightedCrosswalks:(0,a.useMemo)((()=>[...e,...i]),[e,i]),focusedCrosswalks:i,toggleCrosswalkFocus:c,setCrosswalkHighlighted:l}})(),[y,b]=(0,a.useState)(-480),g=(0,a.useCallback)((e=>{let{percentageSize:t}=e;return b(t)}),[]),[h,v]=(0,a.useState)(),[x,E]=(0,a.useState)(!1),C=n.relation.relationUri,w=(0,et._)(),S=(0,a.useCallback)((()=>E(!0)),[]),T=(0,a.useCallback)((()=>E(!1)),[]),O=(0,a.useCallback)((0,d.pipe)(i,S),[]),[P,k]=(0,a.useMemo)((()=>{const e=e=>{e.errorCode===f.Xt7.CROSSWALK_NOT_FOUND?(Ft(e),t()):e.errorCode===f.Xt7.OBJECT_NOT_FOUND?l(e):(Ft(e),T())},t=()=>{w((0,f._vs)(C)).then((e=>{s((0,d.assocPath)(["relation","object"],e,n)),T()})).catch(e)};return[e,t]}),[n,T,s,l]),{modifiedEntity:D,crosswalksMap:R,newlyCreatedAttributes:N,onPinAttribute:j,onIgnoreAttribute:Z,onAddAttribute:M,onEditAttribute:I,onDeleteAttribute:A}=(0,tt.Q)({entity:n.relation.object,onModify:k,onError:P,onLoad:S}),{addCrosswalk:F,deleteCrosswalk:L,editCrosswalk:U}=(0,nt.P)({onSuccess:k,onError:P,onLoad:S}),z=(0,a.useCallback)(((e,t)=>{S(),(t?(0,f.rj2)({entityUri:C,attributeName:e,value:t}).then((()=>s((0,d.assocPath)(["relation",e],t,n)))):(0,f.X78)({entityUri:C,attributeName:e}).then((()=>s((0,d.dissocPath)(["relation",e],n))))).then(T).catch(P)}),[n,S,T,P]);return o().createElement(at.Z,{className:u.detailsView},o().createElement(ot.hR,m,o().createElement(rt.l,null,o().createElement(lt.Z,null),o().createElement(it.Z,{className:Ce()(u.resizablePanesWrapper,{[u.locked]:x}),orientation:"vertical",size:y,minSize:600,maxSize:-480,allowResize:!0,onChange:g},o().createElement("div",{className:u.pane},o().createElement(At,{readOnly:p,entity:t,connection:n,onNavigateBack:l,onDelete:O,onChangeActivenessDate:z}),o().createElement(st.R,{attributeUris:N},o().createElement(ct.Z,{readOnly:p,entity:D,crosswalksMap:R,isLoading:x,onPin:j,onIgnore:Z,onEdit:I,onAdd:M,onDelete:A,selectedAttributeTypes:h,onSelectAttributeTypes:v,visibleColumns:r,onChangeVisibleColumns:c}))),o().createElement(xt,{readOnly:p,className:u.pane,relation:n.relation.object,selectedAttributeTypes:h,onAddCrosswalk:F,onDeleteCrosswalk:L,onEditCrosswalk:U})))))})),zt=(0,se.Z)({relationshipsView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowX:"hidden",overflowY:"auto",fontFamily:"Roboto, Helvetica, Arial, sans-serif",display:"flex",flexDirection:"column"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},pane:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",position:"relative"}}),Bt=(0,r.connect)(((e,t)=>{let{config:{id:n}}=t;return{entity:m.ZP.selectors.getEntity(e),metadata:m.ZP.selectors.getMetadata(e),connections:m.ZP.selectors.getConnectionsByViewId(e,n),total:m.ZP.selectors.getTotalByViewId(e,n)}}))((e=>{let{config:t,entity:n,metadata:r,connections:l,total:i,saveState:s,getSavedState:c,dispatch:p}=e;const u=zt(),P=(0,a.useRef)(),R=(0,y.U)(),j=(0,f.biM)(n),{type:Z}=n||{},[{visibleColumns:M,filters:I,page:z,rowsPerPage:W,sorting:q,currentRelationType:te,stateToSave:ne,entityTypeOfAppliedSavedState:ae},{changeColumns:oe,toggleFilters:re,changeFilter:le,changePage:ie,changeRowsPerPage:se,toggleSort:ce,changeRelationType:pe,saveCurrentState:ue,applySavedState:me}]=(e=>{let{defaultColumns:t,defaultSorting:n,defaultRowsPerPage:o}=e;const r={visibleColumns:t,filters:null,sorting:n,page:0,rowsPerPage:o,currentRelationType:null,stateToSave:null,visibleColumnsForRelationTypes:{},entityTypeOfAppliedSavedState:null},[l,i]=(0,a.useReducer)(((e,t)=>{switch(t.type){case H:{const n=t.payload;return(0,d.pipe)(J,(0,d.assoc)("currentRelationType",n),K,$)(e)}case V:{const{savedState:n,entityTypeUri:a}=t.payload;return _({},e,n,{visibleColumns:n?X(n):e.visibleColumns,entityTypeOfAppliedSavedState:a})}case Y:return _({},e,{stateToSave:Q(e)});default:return D.ZP.reducer(e,t)}}),r);return[l,(0,N.o)({actions:G,dispatch:i})]})({defaultColumns:F,defaultRowsPerPage:U[0],defaultSorting:{field:F[0],order:"asc"}}),fe=ae===Z,{isLoading:ye,relationsTableSavedState:be,attributesTableSavedState:ge,updateRelationsTableSavedState:he,updateAttributesTableSavedState:ve}=(e=>{var t;let{getSavedState:n,saveState:o,entityTypeUri:r}=e;const[l,i]=(0,a.useState)(k),[s,c]=(0,a.useState)(null);(0,b.D)((()=>{s&&(i(O({},l,{relationsTable:s})),c(null))}),[r]);const[p,u]=(0,a.useState)(!0);return(0,a.useEffect)((()=>{n().then((e=>{i(e||k)})).then((e=>u(!1))).catch((e=>u(!1)))}),[]),{isLoading:p,relationsTableSavedState:null===(t=l.relationsTable)||void 0===t?void 0:t[r],attributesTableSavedState:l.attributesTable,updateRelationsTableSavedState:e=>{const t=O({},l.relationsTable,{[r]:e});c(t),o(O({},l,{relationsTable:t}))},updateAttributesTableSavedState:e=>{o(O({},l,{attributesTable:e}))}}})({getSavedState:c,saveState:s,entityTypeUri:Z}),[xe,Ee]=(0,a.useState)();(0,a.useEffect)((()=>{ye||me({savedState:be,entityTypeUri:Z})}),[ye,Z]),(0,a.useEffect)((()=>{ye||Ee(null==ge?void 0:ge.visibleColumns)}),[ye]),(0,b.D)((()=>{fe&&he(ne)}),[ne]),(0,b.D)((()=>{ie(0)}),[n]);const[Ce,we]=(0,a.useState)(),Se=(0,a.useCallback)((()=>{we(null)}),[]),Te=(0,a.useMemo)((()=>{const e=(0,f.io3)(r,Z);return r.relationTypes.filter((0,d.both)((0,f.uGe)(f.BDP.READ),(t=>{let{startObject:n,endObject:a}=t;return e.some((0,d.either)((0,d.equals)(n.objectTypeURI),(0,d.equals)(a.objectTypeURI)))})))}),[r,Z]),Oe=(0,a.useMemo)((()=>((e,t)=>t?(0,d.pipe)((0,d.find)((e=>e.uri===t)),f.DK$,B,(0,d.concat)(A),(0,d.reject)((e=>{let{id:t}=e;return L.includes(t)})))(e):(e=>{return t=(0,d.assoc)("dataTypeDefinition",(e=>({type:f.oS0.TYPE_SELECT,options:e.map((e=>{let{uri:t,label:n}=e;return{value:t,label:n}}))}))(e)),e=>(0,d.adjust)(e.findIndex((0,d.propEq)("id","relation.type")),t,e);var t})(e)(A))(Te,te)),[Te,te]),Pe=(0,a.useMemo)((()=>M.map((e=>Oe.find((0,d.propEq)("id",e)))).filter(d.identity)),[M,Oe]),ke=(0,a.useMemo)((()=>{const e=(0,d.pipe)((0,d.when)((0,d.always)(te),(0,d.filter)((0,d.propEq)("uri",te))),(0,d.map)((0,d.prop)("uri")))(Te);return{id:t.id,content:{inRelations:e,outRelations:e}}}),[t.id,te,Te]),De=(0,a.useMemo)((()=>((e,t)=>{const n=(0,ee.Tz)(t,e);return(new f.MEy).addClause(n).build()})(I,Pe)),[I,Pe]),{isLoading:Re,reload:Ne}=(0,g.a)({page:z,rowsPerPage:W,config:ke,entity:fe?n:null,filter:De,mode:f.ARY.Viewing,sorting:q}),je=!fe||Re,Ze=(0,a.useCallback)((0,d.pipe)(ce,ue),[ce,ue]),Me=(0,a.useCallback)((0,d.pipe)(le,ue),[le,ue]),Ie=(0,a.useCallback)((0,d.pipe)(re,ue),[re,ue]),Ae=(0,a.useCallback)((0,d.pipe)(oe,ue),[oe,ue]),Fe=(0,a.useCallback)((0,d.pipe)(pe,ue),[pe,ue]),Le=(0,a.useCallback)((e=>{Ee(e),ve({visibleColumns:e})}),[ve]),Ue=null==l?void 0:l[Ce],ze=(0,a.useCallback)((e=>{p(m.N5.relations.actions.relationsLoaded({id:t.id,connections:(0,d.update)(Ce,e,l),total:i}))}),[Ue]),[Be,_e]=(0,a.useMemo)((()=>[(0,f.w3p)(l),[f.q7e.RELATION]]),[l]),We=(0,h.C)({objectIds:Be,objectTypes:_e,enabled:!j}),He=(0,a.useMemo)((()=>(0,f.Px$)(l)),[l]),Ve=(0,a.useCallback)((e=>{Ft(e),e.errorCode===f.Xt7.OBJECT_NOT_FOUND&&Ne()}),[Ne]),Ye=(0,a.useCallback)((e=>{(0,d.pipe)(f.VGk,(0,d.andThen)(Ne),(0,d.otherwise)(Ve))(e)}),[Ne,Ve]),Ge=(0,a.useCallback)((()=>{(0,d.pipe)(f.VGk,(0,d.andThen)((0,d.pipe)(Se,Ne)),(0,d.otherwise)((e=>{e.errorCode===f.Xt7.OBJECT_NOT_FOUND&&Se(),Ve(e)})))(Ue.relation.relationUri)}),[Ue,Ne,Se,Ve]),$e=(0,a.useCallback)((e=>{e&&Ve(e),Se()}),[Ve,Se]);return o().createElement(v.s.Provider,{value:R},o().createElement(x.h.Provider,{value:We},o().createElement(E.X.Provider,{value:He},o().createElement("div",{className:u.relationshipsView},o().createElement(C.Z,{entity:n},o().createElement(w.a,null)),o().createElement(de,{total:i,filteringEnabled:!!I,onToggleFilters:Ie,columnsData:Oe,selectedColumns:M,onChangeColumns:Ae,relationTypes:Te,currentRelationType:te,onRelationTypeChange:Fe}),o().createElement("div",{className:u.pane},je&&o().createElement(S.Z,null),o().createElement(Qe,{readOnly:j,metadata:r,connections:l,columnsData:Pe,sorting:q,onSort:Ze,filters:I,onFilter:Me,onRowClick:we,tableRef:P,onDelete:Ye}),o().createElement(T.Z,{count:i,rowsPerPageOptions:U,page:z,onChangePage:ie,rowsPerPage:W,onChangeRowsPerPage:se,basicTableRef:P})),Ue&&o().createElement(Ut,{readOnly:j,entity:n,visibleColumns:xe,onChangeVisibleColumns:Le,connection:Ue,onClose:$e,onDeleteConnection:Ge,onChangeConnection:ze})))))})),_t=(0,i.createGenerateClassName)({productionPrefix:"relationshipsPerspective",disableGlobal:!0}),Wt=e=>{let{config:t,store:n,onResize:d,saveState:m,getSavedState:y}=e;const b=(0,a.useCallback)((0,f.aYu)(y),[y]);return o().createElement(r.Provider,{store:n},o().createElement(p.m.Provider,{value:t.id},o().createElement(i.StylesProvider,{generateClassName:_t},o().createElement(c.MuiPickersUtilsProvider,{utils:l.Z},o().createElement(s.Z,{handleHeight:!0,onResize:(e,t)=>null==d?void 0:d(Math.floor(e),Math.floor(t))}),t&&o().createElement(Bt,{config:t,saveState:m,getSavedState:b}),o().createElement(u.Z,null)))))}},46847:(e,t,n)=>{function a(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function r(e,t){try{var n=this.props,a=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,a)}finally{this.props=n,this.state=a}}function l(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,l=null,i=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?l="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(l="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?i="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(i="UNSAFE_componentWillUpdate"),null!==n||null!==l||null!==i){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==l?"\n "+l:"")+(null!==i?"\n "+i:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=a,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=r;var p=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var a=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;p.call(this,e,t,a)}}return e}n.r(t),n.d(t,{polyfill:()=>l}),a.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6971],{8598:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(95038),o=n.n(a);const r=function(){function e(e){var t=void 0===e?{}:e,n=t.locale,a=t.instance,r=t.moment;this.yearFormat="YYYY",this.yearMonthFormat="MMMM YYYY",this.dateTime12hFormat="MMMM Do hh:mm a",this.dateTime24hFormat="MMMM Do HH:mm",this.time12hFormat="hh:mm A",this.time24hFormat="HH:mm",this.dateFormat="MMMM Do",this.moment=a||r||o(),this.locale=n}return e.prototype.parse=function(e,t){return""===e?null:this.moment(e,t,!0)},e.prototype.date=function(e){if(null===e)return null;var t=this.moment(e);return t.locale(this.locale),t},e.prototype.isValid=function(e){return this.moment(e).isValid()},e.prototype.isNull=function(e){return null===e},e.prototype.getDiff=function(e,t){return e.diff(t)},e.prototype.isAfter=function(e,t){return e.isAfter(t)},e.prototype.isBefore=function(e,t){return e.isBefore(t)},e.prototype.isAfterDay=function(e,t){return e.isAfter(t,"day")},e.prototype.isBeforeDay=function(e,t){return e.isBefore(t,"day")},e.prototype.isBeforeYear=function(e,t){return e.isBefore(t,"year")},e.prototype.isAfterYear=function(e,t){return e.isAfter(t,"year")},e.prototype.startOfDay=function(e){return e.clone().startOf("day")},e.prototype.endOfDay=function(e){return e.clone().endOf("day")},e.prototype.format=function(e,t){return e.locale(this.locale),e.format(t)},e.prototype.formatNumber=function(e){return e},e.prototype.getHours=function(e){return e.get("hours")},e.prototype.addDays=function(e,t){return t<0?e.clone().subtract(Math.abs(t),"days"):e.clone().add(t,"days")},e.prototype.setHours=function(e,t){return e.clone().hours(t)},e.prototype.getMinutes=function(e){return e.get("minutes")},e.prototype.setMinutes=function(e,t){return e.clone().minutes(t)},e.prototype.getSeconds=function(e){return e.get("seconds")},e.prototype.setSeconds=function(e,t){return e.clone().seconds(t)},e.prototype.getMonth=function(e){return e.get("month")},e.prototype.isSameDay=function(e,t){return e.isSame(t,"day")},e.prototype.isSameMonth=function(e,t){return e.isSame(t,"month")},e.prototype.isSameYear=function(e,t){return e.isSame(t,"year")},e.prototype.isSameHour=function(e,t){return e.isSame(t,"hour")},e.prototype.setMonth=function(e,t){return e.clone().month(t)},e.prototype.getMeridiemText=function(e){return"am"===e?"AM":"PM"},e.prototype.startOfMonth=function(e){return e.clone().startOf("month")},e.prototype.endOfMonth=function(e){return e.clone().endOf("month")},e.prototype.getNextMonth=function(e){return e.clone().add(1,"month")},e.prototype.getPreviousMonth=function(e){return e.clone().subtract(1,"month")},e.prototype.getMonthArray=function(e){for(var t=[e.clone().startOf("year")];t.length<12;){var n=t[t.length-1];t.push(this.getNextMonth(n))}return t},e.prototype.getYear=function(e){return e.get("year")},e.prototype.setYear=function(e,t){return e.clone().set("year",t)},e.prototype.mergeDateAndTime=function(e,t){return this.setMinutes(this.setHours(e,this.getHours(t)),this.getMinutes(t))},e.prototype.getWeekdays=function(){return this.moment.weekdaysShort(!0)},e.prototype.isEqual=function(e,t){return null===e&&null===t||this.moment(e).isSame(t)},e.prototype.getWeekArray=function(e){for(var t=e.clone().startOf("month").startOf("week"),n=e.clone().endOf("month").endOf("week"),a=0,o=t,r=[];o.isBefore(n);){var l=Math.floor(a/7);r[l]=r[l]||[],r[l].push(o),o=o.clone().add(1,"day"),a+=1}return r},e.prototype.getYearRange=function(e,t){for(var n=this.moment(e).startOf("year"),a=this.moment(t).endOf("year"),o=[],r=n;r.isBefore(a);)o.push(r),r=r.clone().add(1,"year");return o},e.prototype.getCalendarHeaderText=function(e){return this.format(e,this.yearMonthFormat)},e.prototype.getYearText=function(e){return this.format(e,"YYYY")},e.prototype.getDatePickerHeaderText=function(e){return this.format(e,"ddd, MMM D")},e.prototype.getDateTimePickerHeaderText=function(e){return this.format(e,"MMM D")},e.prototype.getMonthText=function(e){return this.format(e,"MMMM")},e.prototype.getDayText=function(e){return this.format(e,"D")},e.prototype.getHourText=function(e,t){return this.format(e,t?"hh":"HH")},e.prototype.getMinuteText=function(e){return this.format(e,"mm")},e.prototype.getSecondText=function(e){return this.format(e,"ss")},e}()},27604:(e,t,n)=>{var a=n(14859);t.Z=void 0;var o=a(n(24328)),r=(0,a(n(50175)).default)(o.default.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");t.Z=r},99144:(e,t,n)=>{var a=n(14859);t.Z=void 0;var o=a(n(24328)),r=(0,a(n(50175)).default)(o.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");t.Z=r},67766:(e,t,n)=>{var a=n(14859);t.Z=void 0;var o=a(n(24328)),r=(0,a(n(50175)).default)(o.default.createElement("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"KeyboardArrowLeft");t.Z=r},42767:(e,t,n)=>{var a=n(14859);t.Z=void 0;var o=a(n(24328)),r=(0,a(n(50175)).default)(o.default.createElement("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight");t.Z=r},72753:(e,t,n)=>{var a=n(14859);t.Z=void 0;var o=a(n(24328)),r=(0,a(n(50175)).default)(o.default.createElement("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");t.Z=r},32528:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(13688),o=n(48852);const r=e=>t=>(0,o.l)(a.X,e,t)},1876:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(24328),o=n.n(a),r=n(13980),l=n.n(r),i=n(87918),s=n.n(i),c=n(94079),p=n(87685);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}const d=e=>o().createElement("svg",u({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M18 2V0H0v2l7 8v8l4-2v-6z",fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:1})),m=(0,n(79692).Z)((e=>({"filterIcon--enabled":{color:e.palette.primary.main},closeIcon:{position:"absolute",right:"3px",bottom:"3px",transform:"scale(0.5)"},button:{padding:"11px"}}))),f=e=>{let{enabled:t,onClick:n}=e;const a=m();return o().createElement(c.Tooltip,{title:t?s().text("Clear all filters"):s().text("Filter")},o().createElement(c.IconButton,{onClick:n,classes:{root:a.button}},t?o().createElement(o().Fragment,null,o().createElement(d,{className:a["filterIcon--enabled"]}),o().createElement(p.default,{color:"primary",className:a.closeIcon})):o().createElement(d,null)))};f.propTypes={enabled:l().bool,onClick:l().func};const y=f},58662:(e,t,n)=>{n.d(t,{Z:()=>h});var a=n(13980),o=n.n(a),r=n(24328),l=n.n(r),i=n(71153),s=n.n(i),c=n(94079),p=n(87918),u=n.n(p),d=n(31276),m=n(17440);const f=(0,n(79692).Z)({pagination:{display:"flex",alignItems:"center",justifyContent:"flex-end",height:"56px",borderTop:"1px solid rgba(0,0,0,0.12)",boxShadow:"none"},caption:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px"},selectRoot:{marginLeft:"5px",marginRight:"36px"},select:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px",textAlign:"right"},actions:{marginLeft:"32px"}});function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){b(e,t,n[t])}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g=e=>{let{classes:t={},count:n,rowsPerPageOptions:a,page:o,onChangePage:i,rowsPerPage:p,onChangeRowsPerPage:b,basicTableRef:g,labelRowsPerPage:h}=e;const v=f(),x=(0,r.useCallback)((()=>{(0,m.pathOr)(m.identity,["current","resetScrollbarPosition"],g)()}),[g]),E=(0,r.useCallback)((e=>{i(e),x()}),[i,x]),C=(0,r.useCallback)((e=>{i(0),b(e),x()}),[i,b,x]);return l().createElement(c.TablePagination,{classes:y({},t,{root:s()(v.pagination,t.root),select:s()(v.select,t.select),caption:v.caption,selectRoot:v.selectRoot,actions:v.actions}),component:"div",labelRowsPerPage:h||u().text("Rows per page:"),labelDisplayedRows:e=>{let{from:t,to:n,count:a}=e;return u().text("${fromRow}-${toRow} of ${countRows}",{fromRow:u().number(t,"0,0"),toRow:u().number(n,"0,0"),countRows:u().number(a,"0,0")})},count:n,rowsPerPageOptions:a,page:o,onChangePage:(0,m.pipe)((0,m.nthArg)(1),E),rowsPerPage:p,onChangeRowsPerPage:(0,m.pipe)(d.NA,C)})};g.propTypes={classes:o().object,rowsPerPageOptions:o().arrayOf(o().number),count:o().number,page:o().number,onChangePage:o().func,rowsPerPage:o().number,onChangeRowsPerPage:o().func,basicTableRef:o().shape({current:o().object}),labelRowsPerPage:o().string};const h=l().memo(g)},26180:(e,t,n)=>{n.d(t,{ZP:()=>y});var a=n(17440),o=n(31276);function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){l(e,t,n[t])}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const i="CHANGE_COLUMNS",s="TOGGLE_FILTERS",c="CHANGE_FILTER",p="TOGGLE_SORT",u="CHANGE_PAGE",d="CHANGE_ROWS_PER_PAGE",m={changeColumns:(0,o.zD)(i),toggleFilters:(0,o.zD)(s),changeFilter:(0,o.zD)(c),toggleSort:(0,o.zD)(p),changePage:(0,o.zD)(u),changeRowsPerPage:(0,o.zD)(d)},f=(e,t)=>{const n=(0,a.difference)(e.visibleColumns,t),o=e=>n.includes(e);return(0,a.evolve)({visibleColumns:(0,a.always)(t),sorting:(0,a.when)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(e.field)}),(()=>{const[e]=t;return{field:e,order:"asc"}})),filters:e=>(0,a.keys)(e).reduce(((e,t)=>o(t)?(0,a.dissoc)(t,e):e),e)},e)},y={reducer:(e,t)=>{switch(t.type){case i:{const n=t.payload;return f(e,n)}case s:{const t=!e.filters;return r({},e,{filters:t?{}:null,page:t?e.page:0})}case c:{const{columnId:n,filter:o}=t.payload;return(0,a.evolve)({filters:o?(0,a.assoc)(n,o):(0,a.dissoc)(n),page:(0,a.always)(0)},e)}case p:{const n=t.payload,l=(0,a.path)(["sorting","field"],e),i=(0,a.path)(["sorting","order"],e);return r({},e,{sorting:{field:n,order:(0,o.Dh)(n===l?i:null)},page:0})}case u:return r({},e,{page:t.payload});case d:return r({},e,{rowsPerPage:t.payload});default:return e}},actions:m,changeVisibleColumns:f}},10237:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(27556),o=n(13980),r=n.n(o),l=n(24328),i=n.n(l);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=(0,n(79692).Z)((e=>({"basic-view__paper":s({display:"flex",flexDirection:"column"},e.basicView)})));function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}const d=(0,l.forwardRef)(((e,t)=>{let{children:n,className:o}=e,r=function(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","className"]);const l=p();return i().createElement(a.Z,u({ref:t,className:o,classes:{root:l["basic-view__paper"]}},r),n)}));d.displayName="BasicView",d.propTypes={children:r().node,className:r().string};const m=d},81137:(e,t,n)=>{n.d(t,{Z:()=>c});var a=n(24328),o=n.n(a),r=n(87918),l=n.n(r),i=n(94079);const s=(0,n(79692).Z)({paper:{minHeight:"180px"},title:{padding:"16px 16px 10px 16px",fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px"},content:{padding:"0 16px"},contentText:{marginBottom:0,fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px"},actionButtons:{display:"flex",paddingTop:"4px",fontSize:"14px",fontWeight:500,letterSpacing:0,lineHeight:"16px","& > div":{marginLeft:"auto"}},discardButton:{marginRight:"8px"}}),c=e=>{let{open:t,title:n,content:a,onCancel:r,cancelCaption:c=l().text("Cancel"),onDiscard:p,discardCaption:u="",onSave:d,saveCaption:m=l().text("Save"),disabledSave:f=!1}=e;const y=s();return o().createElement(i.Dialog,{open:t,onClose:r,classes:{paperScrollPaper:y.paper}},o().createElement(i.DialogTitle,{classes:{root:y.title}},n),o().createElement(i.DialogContent,{classes:{root:y.content}},o().createElement(i.DialogContentText,{classes:{root:y.contentText}},a)),o().createElement(i.DialogActions,{className:y.actionButtons,disableSpacing:!0},r&&o().createElement(i.Button,{onClick:r},c),o().createElement("div",null,p&&o().createElement(i.Button,{onClick:p,classes:{root:y.discardButton}},u),o().createElement(i.Button,{onClick:d,color:"primary",disabled:f,autoFocus:!0},m))))}},68439:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(24328),o=n.n(a),r=n(52730),l=n(71153),i=n.n(l),s=n(94079),c=n(58991),p=n(59431);const u=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),d=e=>{let{entity:t,className:n,size:a="small"}=e;const l=u(),d=(0,r.useSelector)(p.ZP.selectors.getMetadata),m=t.type,f=(0,c.nt9)(d,m)||{},y=(0,c.VD3)(d,f,"typeColor")||c.rSc.palette.primary.main;return o().createElement(s.Typography,{style:{backgroundColor:y,color:c.P6Y.Colors.getColor(y)?"#FFFFFF":"#212121"},className:i()(l[`entityType-${a}`],n),component:"div"},(0,c.jFi)(d,t))}},57304:(e,t,n)=>{n.d(t,{Z:()=>x});var a=n(24328),o=n.n(a),r=n(13980),l=n.n(r),i=n(71153),s=n.n(i),c=n(52730),p=n(17440),u=n(94079),d=n(87918),m=n.n(d),f=n(58991),y=n(59431),b=n(53180),g=n(68439);const h=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),v=e=>{let{className:t,entity:n,children:r,classes:l}=e;const i=h({classes:l}),d=(0,c.useSelector)(y.ZP.selectors.getMetadata),v=(0,a.useCallback)((()=>{navigator.clipboard.writeText((0,f.BTI)(n))}),[n]);if((0,p.isNil)(n))return null;const x=(0,f.idV)(n.label),E=n.secondaryLabel,C=(0,f.ptG)(d,n),w=(0,f.Fn9)(n),S=n.uri,T=(0,f.BTI)(n);return o().createElement("div",{className:s()(i.profileBandWrapper,t)},o().createElement("div",{className:s()(i.profileBand,{[i.inactive]:!w}),"data-entity-uri":S},o().createElement(b.Z,{key:n.uri,entity:n,avatarClassName:i.profileIcon,imageClassName:i.imageProfileIcon}),o().createElement("div",{className:i.profileInfo},o().createElement("div",null,o().createElement(u.Typography,{variant:"h6",className:i.label},x),E&&o().createElement(u.Typography,{variant:"subtitle2",className:i.secondaryLabel},E),C&&o().createElement(u.Typography,{variant:"subtitle1",className:i.businessCard},C)),o().createElement("div",{className:i.specialInfo},o().createElement("div",{className:i.entityType},o().createElement(g.Z,{entity:n,size:"medium",className:i.badge}),!(0,f.ZiX)(S)&&o().createElement(u.Tooltip,{title:m().text("Copy to clipboard")},o().createElement(u.Typography,{display:"inline",variant:"body2",className:i.entityId,onClick:v},m().text("Entity ID"),": ",T))))),r&&o().createElement("div",null,r)))};v.propTypes={className:l().string,entity:l().object,children:l().node,classes:l().object};const x=v},30553:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(13980),o=n.n(a),r=n(24328),l=n.n(r);const i=e=>{let{height:t,margin:n}=e;return l().createElement("div",{style:{width:"1px",height:`${t}px`,borderLeft:"1px solid rgba(0,0,0,0.38)",margin:`0 ${n}px`,flexShrink:"0"}})};i.propTypes={height:o().number,margin:o().number};const s=i},86361:(e,t,n)=>{n.d(t,{o:()=>l});var a=n(24328),o=n(17440);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=e=>{let{actions:t,dispatch:n}=e;return(0,a.useMemo)((()=>Object.entries(t).reduce(((e,t)=>{let[a,l]=t;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){r(e,t,n[t])}))}return e}({},e,{[a]:(0,o.pipe)(l,n)})}),{})),[n,t])}},7718:(e,t,n)=>{n.d(t,{C:()=>d});var a=n(24328),o=n(52730),r=n(17440),l=n(58991),i=n(59431);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=[],u=e=>console.error("Collaboration error",e),d=e=>{let{objectIds:t=p,objectTypes:n,enabled:c=!0}=e;const d=(0,o.useSelector)(i.ZP.selectors.getEntity),m=(0,o.useSelector)(i.ZP.selectors.getTenant),f=(0,o.useSelector)(i.ZP.selectors.getCollaborationPath),y=(0,o.useSelector)(i.ZP.selectors.isCollaborationEnabled)&&c,[b,g]=(0,a.useState)(null),[h,v]=(0,a.useState)([]),[x,E]=(0,a.useState)(null),[C,w]=(0,a.useState)(null),[S,T]=(0,a.useState)(!1),[O,P]=(0,a.useState)(!1),k=(0,a.useCallback)((e=>{E((t=>s({},t,e)))}),[]),D=null==d?void 0:d.uri,R=(0,a.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(y&&D&&!(0,l.ZiX)(D)){const n=e=>{console.warn("Collaboration error",e),E(null)};(0,r.pipe)(l.$oF,(0,r.andThen)((0,r.map)((0,r.props)(["objectId","comments"]))),(0,r.andThen)(r.fromPairs),(0,r.andThen)(t?E:k),(0,r.otherwise)(n))({uris:e,tenant:m,collaborationPath:f})}else E(null)}),[k,f,D,y,m]);(0,a.useEffect)((()=>{R(t,!0)}),[t,R]);const N=(0,a.useCallback)(((e,t)=>{(0,l.liG)({collaborationPath:f,tenant:m,relatedObjectUri:e,pageToken:t}).then((e=>{let{items:n,nextPageToken:a}=e;v((e=>t?(0,r.uniqBy)((0,r.prop)("commentId"),[...e,...n]):n)),g(a)})).catch(u)}),[f,m]),j=(0,a.useCallback)((e=>{P(!0),(0,l.d7q)({collaborationPath:f,tenant:m,commentId:e}).then(w).catch(u).finally((()=>P(!1)))}),[f,m]),Z=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,objectType:a,uri:o,relatedObjectUris:r}=e;T(!0);const i={objectId:o,content:t,relatedObjectUris:r,objectType:a,visibility:"public",namedUsers:n,permanentLink:""};return(0,l.Yrx)({collaborationPath:f,tenant:m,data:i}).then((e=>{let[t]=e;return((e,t)=>{w(e),E((n=>s({},n,{[t]:[...n[t]||[],{commentId:e.commentId,replies:0,status:"open"}]}))),v((t=>[e,...t]))})(t,o)})).catch(u).finally((()=>T(!1)))}),[f,m]),M=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,objectType:a,uri:o,relatedObjectUris:i,commentId:c,replies:p}=e;T(!0);const d={objectId:o,content:t,relatedObjectUris:i,objectType:a,visibility:"public",namedUsers:n,permanentLink:"",commentId:c,replies:p};return(0,l.uAg)({collaborationPath:f,tenant:m,data:d}).then((e=>(e=>{w(e),v((0,r.map)((0,r.when)((0,r.propEq)("commentId",e.commentId),(0,r.always)(e))))})(s({},e,{replies:p})))).catch(u).finally((()=>T(!1)))}),[f,m]),I=(0,a.useCallback)((e=>{let{uri:t,commentId:n}=e;T(!0),(0,l.YFy)({collaborationPath:f,tenant:m,commentId:n}).then((()=>((e,t)=>{w(null),E((n=>{const a=n[t]||[];return s({},n,{[t]:a.filter((t=>t.commentId!==e))})})),v((t=>t.filter((t=>t.commentId!==e))))})(n,t))).catch(u).finally((()=>T(!1)))}),[f,m]),A=(0,a.useCallback)(((e,t,n)=>{const a="resolve"===e.action?"resolved":"open";w("resolved"===a?e=>{if(e)return null}:t=>{if(t)return s({},t,{replies:[...t.replies,e]})}),E((e=>s({},e,{[t]:(e[t]||[]).map((e=>e.commentId===n?s({},e,{status:a,replies:e.replies+1}):e))}))),v((t=>t.map((t=>t.commentId===n?s({},t,{status:a,replies:[...t.replies,e]}):t))))}),[]),F=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,commentId:a,action:o,uri:r}=e;T(!0);const i={content:t,action:o,namedUsers:n};return(0,l.PP2)({collaborationPath:f,tenant:m,commentId:a,data:i}).then((e=>{let[t]=e;return A(t,r,a)})).catch(u).finally((()=>T(!1)))}),[f,m,A]),L=(0,a.useCallback)((e=>{let{commentId:t,uri:n}=e;F({content:"",namedUsers:[],commentId:t,action:"resolve",uri:n})}),[F]),U=(0,a.useCallback)((e=>{let{commentId:t,uri:n}=e;F({content:"",namedUsers:[],commentId:t,action:"reopen",uri:n})}),[F]);return{clearCurrentComment:(0,a.useCallback)((()=>{w(null)}),[]),comments:h,commentsMap:x,createComment:Z,createReply:F,currentComment:C,deleteComment:I,editComment:M,getComment:j,getComments:N,getCommentsCount:R,loading:O,objectTypes:n,pageToken:b,reOpenThread:U,resolveThread:L,sending:S}}},37152:(e,t,n)=>{n.d(t,{a:()=>m});var a=n(24328),o=n(52730),r=n(17440),l=n(59431),i=n(58991),s=n(67218),c=n(30634);function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=(0,r.when)(r.identity,(0,r.pipe)(i.VGB,r.length,(0,r.times)((e=>e+1)))),m=e=>{let{sorting:t,filter:n,page:u,rowsPerPage:m,config:f,entity:y,relationActivityFilter:b,mode:g}=e;const[h,v]=(0,a.useState)(!1),x=(0,o.useDispatch)(),E=(0,o.useSelector)(l.ZP.selectors.getTenant),C=(0,o.useSelector)(l.ZP.selectors.getDtssPath),{activityFilter:w,globalFilter:S}=(0,o.useSelector)(l.ZP.selectors.getGlobalSearchRequestOptions)||{},T=(0,s._)(),O=f.suggested,P=(0,a.useCallback)((()=>{if(null!=y&&y.uri){const e=p({},f.content,{sortBy:null==t?void 0:t.field,order:null==t?void 0:t.order,returnDates:!0,returnObjects:!0,activeness:{relation:b||i.Ng6.ALL,entity:w},max:m,offset:u*m,filter:(0,i.vyX)(S,n)||void 0,suggested:d(O)}),a=[e].concat((0,r.ifElse)(r.identity,(0,r.pipe)(i.VGB,(t=>t.map(((t,n)=>p({},t,{id:e.suggested[n]}))))),(0,r.always)([]))(O)),o=(0,r.cond)([[(0,r.pipe)((0,r.prop)("uri"),i.ZiX),()=>Promise.resolve([{total:0}])],[i.biM,e=>(0,i.n_1)({entityUri:e.uri,configs:a,customerTenant:E,dataTenant:e.dataTenant,dtssPath:C})],[r.T,e=>(0,i.N6e)(e.uri,a)]]);v(!0),T(o(y)).then((e=>{let[{connections:t,total:n}]=e;x(l.N5.relations.actions.relationsLoaded({id:f.id,connections:t,total:n}))})).finally((()=>{v(!1)}))}}),[w,f,x,C,null==y?void 0:y.uri,null==y?void 0:y.dataTenant,n,S,u,b,m,T,t,E]),k=(0,a.useRef)(!1);k.current=!1,(0,a.useEffect)((()=>{k.current=!0,P()}),[P]);const D=(0,c.D)(g);return(0,a.useEffect)((()=>{g!==i.ARY.Viewing||k.current||D===g||(k.current=!0,P())}),[P,g,D]),{isLoading:h,reload:P}}},17554:(e,t,n)=>{n.d(t,{U:()=>i});var a=n(24328),o=n(52730),r=n(58991),l=n(59431);const i=()=>{const[e,t]=(0,a.useState)([]),n=(0,o.useSelector)(l.ZP.selectors.getTenant),i=(0,o.useSelector)(l.ZP.selectors.getServicesPath),s=e=>{console.warn("Users error",e),t([])};return(0,a.useEffect)((()=>{(0,r.kz_)({tenant:n,servicesPath:i}).then((e=>{let{array:n}=e;return t(n)})).catch(s)}),[n,i]),e}},55451:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ht});var a=n(24328),o=n.n(a),r=n(52730),l=n(8598),i=n(36138),s=n(44443),c=n(22664),p=n(39450),u=n(585),d=n(17440),m=n(59431),f=n(58991),y=n(17554),b=n(20562),g=n(37152),h=n(7718),v=n(49759),x=n(3515),E=n(31274),C=n(57304),w=n(93873),S=n(99136),T=n(58662);function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){P(e,t,n[t])}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const k={relationsTable:{},attributesTable:{}};var D=n(26180),R=n(31276),N=n(86361),j=n(87918),Z=n.n(j);const M="relation.type",I="relation.attributes",A=[{id:"entity.label",get label(){return Z().text("Profile")},dataTypeDefinition:{type:f.oS0.TYPE_STRING},hideable:!1,filterable:!1,initialWidth:280,autoResize:!1},{id:M,get label(){return Z().text("Type")}},{id:"relation.label",get label(){return Z().text("Directional Label")},filterable:!1,dataTypeDefinition:{type:f.oS0.TYPE_STRING}},{id:"relation.activeness.startDate",get label(){return Z().text("Start Date")},dataTypeDefinition:{type:f.oS0.TYPE_ACTIVENESS_DATE}},{id:"relation.activeness.endDate",get label(){return Z().text("End Date")},dataTypeDefinition:{type:f.oS0.TYPE_ACTIVENESS_DATE}},{id:I,get label(){return Z().text("Attributes")},sortable:!1,filterable:!1,maxAttrsToShow:7}],F=(0,d.pluck)("id",A),L=[M,I],U=[20,50,100],z=(0,d.pipe)(f.Tde,(0,d.concat)("relation.")),B=(0,d.pipe)((0,d.map)((e=>({id:z(e.uri),label:e.label,dataTypeDefinition:(0,f.PFL)(e)}))),(0,d.uniqBy)((0,d.prop)("id")));function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){W(e,t,n[t])}))}return e}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const H="CHANGE_RELATION_TYPE",V="APPLY_SAVED_STATE",Y="SAVE_CURRENT_STATE",G=_({},D.ZP.actions,{changeRelationType:(0,R.zD)(H),applySavedState:(0,R.zD)(V),saveCurrentState:(0,R.zD)(Y)}),$=(0,d.assoc)("page",0),q=e=>(0,d.pipe)((0,d.prop)("visibleColumns"),(0,d.ifElse)((0,d.always)(e.currentRelationType),(0,d.without)(L),(0,d.concat)(L)),(0,d.intersection)(F))(e),X=e=>(0,d.path)(["visibleColumnsForRelationTypes",`${e.currentRelationType}`],e),K=e=>{const t=(0,d.either)(X,q)(e);return D.ZP.changeVisibleColumns(e,t)},J=e=>{const{currentRelationType:t,visibleColumns:n}=e;return(0,d.evolve)({visibleColumnsForRelationTypes:(0,d.assoc)(`${t}`,n)},e)},Q=(0,d.pipe)(J,(0,d.pick)(["currentRelationType","visibleColumnsForRelationTypes","filters","sorting"]));var ee=n(99341),te=n(94079),ne=n(92778),ae=n(30553),oe=n(51229),re=n(1876),le=n(60894),ie=n(79026),se=n(79692);const ce=(0,se.Z)({select:{fontSize:"13px",color:"rgba(0,0,0,.6)",paddingLeft:"15px","&&":{paddingRight:"35px"}},selectMenu:{"& li":{fontSize:"13px",height:"32px"}},textField:{maxWidth:"100%"}}),pe=e=>{let{value:t,onChange:n,relationTypes:r,className:l}=e;const i=ce(),s=(0,a.useMemo)((()=>(0,d.pipe)((0,d.map)((e=>{let{label:t,uri:n}=e;return{label:t,value:n}})),(0,d.concat)([{value:"",label:Z().text("All types")}]))(r)),[r]);return o().createElement("div",{className:l},o().createElement(ie.Z,{displayEmpty:!0,disableUnderline:!0,classes:{select:i.select},TextFieldProps:{classes:{root:i.textField}},MenuProps:{classes:{list:i.selectMenu}},value:t||"",entries:s,onChange:e=>n(e||null)}))},ue=(0,se.Z)((e=>({header:{height:"56px",boxSizing:"border-box",paddingRight:"10px"},title:{fontSize:"16px"},total:{fontSize:"14px",color:e.palette.text.secondary,flexShrink:0,marginRight:"5px"},relationTypeSelector:{margin:"0px 10px 0 30px",overflow:"hidden"}}))),de=(0,a.memo)((e=>{let{total:t,filteringEnabled:n,onToggleFilters:a,columnsData:r,selectedColumns:l,currentRelationType:i,onRelationTypeChange:s,relationTypes:c,onChangeColumns:p}=e;const u=ue();return o().createElement(ne.Z,{title:Z().text("Relationships"),classes:{root:u.header,title:u.title}},c.length>0&&o().createElement(pe,{className:u.relationTypeSelector,value:i,onChange:s,relationTypes:c}),o().createElement(ae.Z,{height:28,margin:20}),o().createElement(te.Typography,{variant:"caption",className:u.total},1===t?Z().text("${count} record",{count:t}):Z().text("${count} records",{count:t})),o().createElement(oe.Z,null),o().createElement(re.Z,{enabled:n,onClick:a}),o().createElement(ae.Z,{height:28,margin:8}),o().createElement(le.Z,{columnsData:r,selectedColumns:l,onChangeColumns:p}))}));var me=n(74402),fe=n(97946),ye=n(85709),be=n(25461),ge=n(92332),he=n(67353);const ve=(0,se.Z)((e=>({headCell:{display:"flex",alignItems:"center",height:"100%",width:"100%",fontSize:"12px",color:e.palette.text.secondary,background:"linear-gradient(0deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.06)), #FFFFFF"},rowCell:{fontSize:"13px",overflow:"hidden",overflowWrap:"break-word"},inactiveRowCell:{opacity:.6},defaultWrapper:{padding:"15px 25px 0 25px","&:last-child":{paddingBottom:"15px"}},entityCell:{display:"flex",alignItems:"flex-start",padding:"15px"},entityAvatar:{transform:"scale(0.5)",margin:"-10px 0 -10px -10px"},inactiveEntityAvatar:{overflow:"initial","&:after":{content:'""',position:"absolute",backgroundColor:"rgb(209, 206, 206)",border:"1px solid rgba(0, 0, 0, 1)",borderRadius:"2px",width:"12px",right:0,bottom:0,height:"12px"},"& > img":{borderRadius:"50%",overflow:"hidden"}},entityLabel:{color:e.palette.primary.main,textDecoration:"none",fontWeight:500},attributesWrapper:{padding:"15px 25px 10px 25px",color:"rgba(0,0,0,0.87)"},commentsContainer:{marginLeft:"auto"}}))),xe=(0,he.Z)((e=>{const t=ve();return o().createElement("div",{className:t.headCell},o().createElement(ge.default,e))}));var Ee=n(71153),Ce=n.n(Ee),we=n(19603),Se=n(31254),Te=n(31039),Oe=n(94646);const Pe=e=>{let{value:{entity:t,entityType:n,relation:a},isInactiveRelation:l}=e;const i=ve(),s=(0,r.useSelector)(m.ZP.selectors.getEntityUri);return o().createElement("div",{className:Ce()(i.entityCell,we.U)},o().createElement(Se.Z,{className:Ce()(i.entityAvatar,{[i.inactiveEntityAvatar]:l}),entityType:n}),o().createElement(Te.Z,{value:(0,f.wwR)({uri:t.entityUri,dataTenant:t.dataTenant}),className:i.entityLabel},(0,f.idV)(t.entityLabel)),o().createElement("div",{className:i.commentsContainer,onClick:e=>e.stopPropagation()},o().createElement(Oe.Z,{uri:a.relationUri,relatedObjectUris:(0,f.wp9)(f.q7e.RELATION,{entityUri:s,connection:{relation:a,entity:t}}),objectType:f.q7e.RELATION,allowOnlyOneComment:!0})))};var ke=n(80931);const De=e=>{let{columnData:t,value:{attributes:n,attributeTypes:a}}=e;const r=ve();return o().createElement("div",{className:r.attributesWrapper,onClick:e=>e.stopPropagation()},o().createElement(ke.Z,{max:t.maxAttrsToShow,entity:{attributes:n},attrTypes:a,drawLines:!1}))};var Re=n(72768);const Ne=e=>{let{value:t,columnData:{dataTypeDefinition:n}}=e;const a=ve();return o().createElement("div",{className:a.defaultWrapper},o().createElement(Re.Z,{value:t,dataTypeDefinition:n}))};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 Ze=(0,d.pipe)((0,d.split)("."),(0,d.slice)(2,1/0)),Me=e=>{if(e.startsWith("relation.attributes")){const t=Ze(e);return t.length>1?t.slice(0,-1):null}return null},Ie=e=>{switch(e){case"entity.label":return Pe;case"relation.attributes":return De;default:return Ne}},Ae=(0,d.map)((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){je(e,t,n[t])}))}return e}({sortable:!0,resizable:!0},e,{headCellRenderer:xe,nestedPath:Me(e.id),rowCellValueRenderer:Ie(e.id)}))),Fe=(0,d.cond)([[(0,d.pathEq)(["columnData","id"],"relation.attributes"),e=>{let{columnData:t,cell:n}=e;const a=(0,d.pipe)((0,d.path)(["values",0,"attributes"]),d.values,d.length)(n);return a>t.maxAttrsToShow?26*t.maxAttrsToShow+49:26*a+25}],[d.T,be.Z]]);function Le(){return Le=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Le.apply(this,arguments)}const Ue=e=>{let{cell:t,CellValueRenderer:n}=e,a=function(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["cell","CellValueRenderer"]);const r=ve();return o().createElement("div",{className:Ce()(r.rowCell,{[r.inactiveRowCell]:a.isInactiveRelation})},t.values.map(((e,t)=>o().createElement(n,Le({key:t,value:e},a)))))};var ze=n(22983),Be=n(43054),_e=n(55847),We=n(22385),He=n(81137),Ve=n(83348);const Ye=(0,se.Z)((e=>({menuItem:{minHeight:"32px",color:e.palette.text.secondary},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"16px"},buttons:{display:"flex",alignItems:"center",paddingRight:"5px"}}))),Ge=(0,Ve.Z)(te.MenuItem),$e=(0,a.forwardRef)(((e,t)=>{let{item:n,onMenuClose:a=R.ZT}=e;const r=Ye(),{icon:l,disabled:i,text:s,tooltip:c,onClick:p}=n;return o().createElement(Ge,{tooltipTitle:c,showForDisabled:!0,classes:{root:r.menuItem},onClick:e=>{a(),p(e)},disabled:i,ref:t},l,o().createElement(te.Typography,{classes:{root:r.menuText}},s))}));$e.displayName="MenuItemRenderer";const qe=$e,Xe=e=>{let{disableDelete:t,connection:{entity:n,relation:l},onMenuOpen:i=R.ZT,onMenuClose:s=R.ZT,onDelete:c}=e;const p=Ye(),u=(0,r.useSelector)(m.ZP.selectors.getMetadata),y=(0,d.pipe)((0,d.prop)("relationType"),(0,f.V3K)(u),(0,f.uGe)(f.BDP.DELETE))(l),b=!t&&y,[g,h]=(0,a.useState)(!1),v=()=>h(!1),x=[{disabled:!b,text:Z().text("Delete"),icon:o().createElement(ze.Z,null),tooltip:b?null:Z().text("You don't have permissions to delete"),onClick:()=>h(!0)}],E=(0,a.useCallback)((()=>{g||s()}),[g,s]);return o().createElement("div",{className:p.buttons},o().createElement(_e.Z,{MenuItemRenderer:qe,menuId:"relationships-table-actions",buttonComponent:We.Z,buttonProps:{icon:Be.Z,size:"S"},menuItems:x,onMenuOpen:i,onMenuClose:E}),o().createElement(He.Z,{open:g,title:Z().text('Do you want to delete relationship "${label}"?',{label:(C=(0,f.idV)(n.entityLabel),C.length>17?`${C.substring(0,17)}...`:C)}),content:Z().text("This relationship will be removed and all the values in the relationship will be permanently deleted. Are you sure you want to delete this relationship?"),onSave:(0,d.pipe)(v,s,c),onDiscard:(0,d.pipe)(v,s),saveCaption:Z().text("Delete"),discardCaption:Z().text("Cancel")}));var C},Ke=(0,se.Z)({tableContainer:{flex:1,overflow:"hidden",display:"flex",zIndex:0},hoveredRowRightContentWrapper:{width:"100%",pointerEvents:"none!important"},menuButtonContainer:{position:"absolute",top:"calc(50% - 12px)",right:0,pointerEvents:"all"},tooltipAnchor:{width:"100%",height:"1px"}});function Je(){return Je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Je.apply(this,arguments)}const Qe=(0,a.memo)((e=>{let{metadata:t,connections:n,columnsData:r,sorting:l,onSort:i,filters:s,onFilter:c,onRowClick:p,tableRef:u,onDelete:m,readOnly:y}=e;const b=Ke(),g=(0,a.useMemo)((()=>((e,t,n)=>(n||[]).map((n=>(0,d.pipe)((0,d.reduce)(((t,a)=>{let{id:o}=a;return(0,d.assoc)(o,((e,t,n)=>{let{entity:a,relation:o}=t;switch(n){case"entity.label":return{entity:a,entityType:(0,f.nt9)(e,a.entityType),relation:o};case"relation.type":return o.relationType;case"relation.label":return o.relationLabel;case"relation.activeness.startDate":return o.startDate;case"relation.activeness.endDate":return o.endDate;case"relation.attributes":return{attributes:o.object.attributes,attributeTypes:(0,f.V3K)(e,o.relationType).attributes};default:return((e,t)=>(0,d.pipe)((0,d.path)(["object","attributes"]),(0,f.tT_)(e))(t))(Ze(n),o)}})(e,n,o),t)}),{}),(0,d.assoc)("rawValue",n))(t))))(t,r,n)),[t,n,r]),h=(0,a.useMemo)((()=>Ae(r)),[r]),{getDynamicRowCellHeight:v,changeRowCellHeight:x}=(0,me.Z)(),E=(0,a.useCallback)((0,d.either)(v,Fe),[v,Fe]),[C,w]=(0,a.useState)(null),S=(0,a.useCallback)((e=>{const t=!(0,f.Fn9)(e.rowValue.rawValue.relation);return o().createElement(fe.Z,Je({onChangeHeight:x},e),o().createElement(Ue,Je({},e,{isInactiveRelation:t})))}),[x]),[T,O]=(0,a.useState)(!1),P=(0,a.useCallback)((()=>O(!0)),[]),k=(0,a.useCallback)((()=>{w(null),O(!1)}),[]),D=(0,a.useCallback)((e=>w((t=>T?t:e))),[T]),R=(0,a.useMemo)((()=>{const e=null!=C?g[C].rawValue:null,t=!(0,f.Fn9)(null==e?void 0:e.relation);return e&&o().createElement(o().Fragment,null,o().createElement(te.Tooltip,{key:e.relation.relationUri,open:t,title:Z().text("Inactive")},o().createElement("div",{className:b.tooltipAnchor})),o().createElement("div",{className:b.menuButtonContainer},o().createElement(Xe,{disableDelete:y,connection:e,onMenuOpen:P,onMenuClose:k,onDelete:()=>m(e.relation.relationUri)})))}),[m,g,C]);return o().createElement("div",{className:b.tableContainer},o().createElement(ye.Z,{fixFirstColumn:!0,columnsData:h,rowsData:g,sorting:l,onSort:i,filters:s,onFilter:c,defaultColumnWidth:250,defaultColumnMinWidth:200,headRowHeight:48,getRowCellHeight:E,renderRowCell:S,onRowClick:p,ref:u,hoverStateEnabled:!0,hoverRowIndex:C,onRowHover:D,hoveredRowRightContent:R,classes:{hoveredRowRightContentWrapper:b.hoveredRowRightContentWrapper}}))}));var et=n(67218),tt=n(85965),nt=n(39417),at=n(10237),ot=n(63149),rt=n(48017),lt=n(96955),it=n(66095),st=n(20982),ct=n(99144),pt=n(65549),ut=n(52017),dt=n(90186);const mt=(0,se.Z)((()=>({tableRow:{"& + &":{marginTop:"4px"},margin:"auto",maxWidth:"448px"}})));function ft(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const yt=(0,a.memo)((e=>{let{readOnly:t,relation:n,metadata:r,selectedAttributeTypes:l,onDeleteCrosswalk:i,onEditCrosswalk:s}=e;const c=mt(),p=(0,f.V3K)(r,n.type),u=(0,a.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,d.pipe)((0,d.propOr)([],"crosswalks"),(0,d.map)((0,d.assoc)("ownerType","entity")),(0,dt.o)(e.type,t))(e)}(n,l)),[n,l]),[m,y]=(0,a.useState)([]),b=(0,a.useCallback)((e=>{i({entityUri:n.uri,crosswalkId:e})}),[i,n.uri]),g=(0,a.useCallback)((e=>{s(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){ft(e,t,n[t])}))}return e}({entityUri:n.uri},e))}),[s,n.uri]);return o().createElement("div",null,u.map((e=>{let{source:n,crosswalksByTypes:a}=e;return o().createElement("div",{key:n,className:c.tableRow},o().createElement(ut.Z,{source:n,crosswalksByTypes:a,expanded:m.includes(n),disableEditCrosswalk:!(0,f.Zm0)(p)||t,disableDeleteCrosswalk:!(0,f.a14)(p)||t,onEdit:g,onDelete:b,onToggleExpanded:()=>{y((0,d.ifElse)((0,d.includes)(n),(0,d.without)([n]),(0,d.append)(n)))}}))})))}));var bt=n(79769);const gt=(0,se.Z)((e=>({header:{display:"flex",flexDirection:"row",alignItems:"center",padding:"20px 12px",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},title:{fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px",color:e.palette.text.primary,marginLeft:"12px"},hint:{color:e.palette.text.secondary,display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"flex-start",margin:"4px 14px 10px"},hintText:{marginLeft:"8px",fontSize:"12px",lineHeight:"16px"},buttons:{display:"flex",padding:"8px 6px 4px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},editor:{paddingLeft:25,margin:"auto",maxWidth:"448px",boxSizing:"border-box",marginBottom:"4px"},tableContainer:{overflowY:"auto",overflowX:"hidden",paddingLeft:"16px",paddingRight:"6px"}}))),ht=(0,Ve.Z)(te.Button),vt=(0,a.memo)((e=>{let{className:t,readOnly:n,relation:l,selectedAttributeTypes:i,onAddCrosswalk:s,onDeleteCrosswalk:c,onEditCrosswalk:p}=e;const u=gt(),d=(0,r.useSelector)(m.ZP.selectors.getMetadata),y=(0,f.V3K)(d,l.type),[b,g]=(0,a.useState)(!1),h=(0,f.mkC)(y)&&!n;return o().createElement("div",{className:t},o().createElement("div",{className:u.header},o().createElement("span",{className:u.title},Z().text("Legend"))),o().createElement("div",{className:u.buttons},o().createElement(ht,{color:"primary",showForDisabled:!0,disabled:!h,tooltipTitle:h?null:Z().text("You don't have permissions to add crosswalk"),onClick:()=>g(!0)},o().createElement(pt.Z,{className:u.icon}),o().createElement("div",{className:u.buttonLabel},Z().text("Crosswalk")))),o().createElement("div",{className:u.hint},o().createElement(ct.Z,{className:u.icon}),o().createElement("span",{className:u.hintText},Z().text("You can drag a crosswalk to add values to attributes swimlanes"))),o().createElement("div",{className:u.tableContainer},b&&o().createElement(bt.Z,{className:u.editor,onAdd:e=>s({entity:l,crosswalk:e}),onClose:()=>g(!1)}),o().createElement(yt,{readOnly:n,metadata:d,relation:l,selectedAttributeTypes:i,onDeleteCrosswalk:c,onEditCrosswalk:p})))}));var xt=n(88611),Et=n(23147),Ct=n(94111),wt=n(68439);const St=(0,se.Z)((e=>({entityInfo:{flex:"0 1 auto",overflow:"hidden",minWidth:"100px"},entityLabelContainer:{display:"flex",alignItems:"center",overflow:"hidden"},entityLabel:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary},infoIcon:{fontSize:"16px",color:e.palette.text.secondary,marginLeft:"5px"},profileBand:{margin:"-10px",maxWidth:"500px"},entityTypeBadge:{marginTop:"7px"}}))),Tt=e=>{let{entity:t}=e;const n=St(),a=(0,f.idV)(t.label);return o().createElement("div",{className:n.entityInfo},o().createElement("div",{className:n.entityLabelContainer},o().createElement(xt.C,{value:a},o().createElement(te.Typography,{variant:"h6",className:n.entityLabel,noWrap:!0},a)),o().createElement(Ct.Z,{title:o().createElement(C.Z,{className:n.profileBand,entity:t}),placement:"right"},o().createElement(ct.Z,{className:n.infoIcon}))),o().createElement(wt.Z,{className:n.entityTypeBadge,entity:t,size:"medium"}))},Ot=(0,se.Z)((e=>({root:{flexShrink:0,overflow:"hidden",width:"110px"},label:{color:e.palette.text.secondary,fontSize:"13px"}}))),Pt=e=>{let{relation:t}=e;const n=Ot(),{direction:a,relationLabel:r}=t;return o().createElement("div",{className:n.root},o().createElement(xt.C,{value:r},o().createElement(te.Typography,{variant:"subtitle2",className:n.label,align:"center",noWrap:!0},r)),o().createElement("svg",{width:"110",height:"12",fill:"black",fillOpacity:"0.3"},"out"===a&&o().createElement("polygon",{points:"94 0, 110 6, 94 12, 94 9, 0 9, 0 3, 94 3"}),"bidirectional"===a&&o().createElement("polygon",{points:"94 0, 110 6, 94 12, 94 9, 16 9, 16 12, 0 6, 16 0, 16 3, 94 3"}),"in"===a&&o().createElement("polygon",{points:"16 12, 0 6, 16 0, 16 3, 110 3, 110 9, 16 9"})))};var kt=n(8459),Dt=n(27604);const Rt=(0,se.Z)((()=>({root:{"&:hover $editButton":{visibility:"visible"}},editButton:{visibility:"hidden",marginLeft:"4px",marginBottom:"4px"},paper:{width:"150px",border:"3px solid rgba(0, 0, 0, 0.3)",borderRadius:"4px",boxSizing:"border-box",overflow:"hidden"}}))),Nt=e=>{let{value:t=null,onChange:n,readOnly:r}=e;const l=Rt(),i=(0,a.useRef)(),[s,c]=(0,a.useState)(!1),p=()=>c(!1),[u,d]=(0,a.useState)(t),m=()=>{u!==t&&n(u),p()};return o().createElement("span",{ref:i,className:l.root},t&&(0,f.p6d)(t),o().createElement(We.Z,{disabled:r,icon:Dt.Z,size:"XXS",className:l.editButton,onClick:()=>c(!0)}),o().createElement(te.Popover,{classes:{paper:l.paper},open:s,anchorEl:i.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:14,horizontal:20},onKeyUp:e=>{"Enter"===e.key?m():"Escape"===e.key&&p()},onBackdropClick:m},o().createElement(kt.Z,{InputProps:{autoFocus:!0,disableUnderline:!0,fullWidth:!0},size:"small",hiddenLabel:!0,label:void 0,value:u&&new Date(u),onChange:e=>d(e&&e.valueOf())})))},jt=(0,se.Z)((e=>({relationBand:{flexShrink:0,boxShadow:"inset 0px -1px 0px rgba(0,0,0,0.06)",padding:"16px 19px"},inactiveRelationBand:{opacity:.6,background:"rgba(185, 188, 197, 0.18)"},toolbar:{display:"flex",alignItems:"center",gap:"16px",marginBottom:"10px"},mainInfo:{display:"flex",gap:"16px",marginLeft:"40px"},detailsInfo:{display:"flex",gap:"34px",marginLeft:"40px",marginTop:"17px",color:e.palette.text.secondary,fontSize:"13px"},detailTitle:{color:e.palette.text.primary,flexShrink:0,marginRight:"4px"},directionalLabel:{display:"flex",overflow:"hidden","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},relationDate:{flexShrink:0},commentsContainer:{marginRight:"18px"}})));function Zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Mt(e,t,n[t])}))}return e}function Mt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const It=(0,a.memo)((e=>{let{readOnly:t,entity:n,connection:a,onNavigateBack:r,onDelete:l,onChangeActivenessDate:i}=e;const s=!(0,f.Fn9)(a.relation),c=jt();return o().createElement("div",{className:Ce()(c.relationBand,we.U,{[c.inactiveRelationBand]:s})},o().createElement("div",{className:c.toolbar},o().createElement(We.Z,{icon:Et.Z,size:"S",onClick:()=>r()}),o().createElement(te.Typography,{variant:"subtitle2",display:"inline"},Z().text("Back to relationships")),o().createElement(oe.Z,null),o().createElement("div",{className:c.commentsContainer},o().createElement(Oe.Z,{uri:a.relation.relationUri,relatedObjectUris:(0,f.wp9)(f.q7e.RELATION,{entityUri:null==n?void 0:n.uri,connection:a}),objectType:f.q7e.RELATION,allowOnlyOneComment:!0})),o().createElement(Xe,{connection:a,onDelete:l,disableDelete:t})),o().createElement("div",{className:c.mainInfo},o().createElement(Tt,{entity:n}),o().createElement(Pt,{relation:a.relation}),o().createElement(Tt,{entity:Zt({},a.entity.object,{dataTenant:a.entity.dataTenant})})),o().createElement("div",{className:c.detailsInfo},o().createElement("div",{className:c.directionalLabel},o().createElement("span",{className:c.detailTitle},Z().text("Directional label:")),o().createElement(xt.C,{value:a.relation.relationLabel},o().createElement("span",null,a.relation.relationLabel))),o().createElement("div",{className:c.relationDate},o().createElement("span",{className:c.detailTitle},Z().text("Start date:")),o().createElement(Nt,{value:a.relation.startDate,onChange:e=>i("startDate",e),readOnly:t})),o().createElement("div",{className:c.relationDate},o().createElement("span",{className:c.detailTitle},Z().text("End date:")),o().createElement(Nt,{value:a.relation.endDate,onChange:e=>i("endDate",e),readOnly:t}))))})),At=e=>{console.error(e),u.Z.addError({title:Z().text("Error"),message:(0,f.xU7)(e,Z().text("Something went wrong"))})};var Ft=n(58651),Lt=n(13896);const Ut=(0,se.Z)({detailsView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden"},locked:{pointerEvents:"none"},resizablePanesWrapper:{flexGrow:1},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"}}),zt=(0,a.memo)((e=>{let{entity:t,connection:n,visibleColumns:r,onClose:l,onDeleteConnection:i,onChangeConnection:s,onChangeVisibleColumns:c,readOnly:p}=e;const u=Ut(),m=(()=>{const[e,t]=(0,a.useState)([]),n=(0,a.useRef)([]),o=(0,a.useCallback)((0,f.DsO)((()=>{t([...n.current])}),50),[]),r=(0,a.useCallback)((e=>{n.current=e,o(e)}),[o]),l=(0,a.useCallback)(((e,t)=>{e&&r(t?[e]:[])}),[r]),[i,s]=(0,a.useState)([]),c=(0,a.useCallback)((e=>{e&&s((t=>{return n=[e],a=t,(0,d.concat)(n.filter((e=>!(0,d.any)((0,f.aFF)(e),a))),a.filter((e=>!(0,d.any)((0,f.aFF)(e),n))));var n,a}))}),[]);return{highlightedCrosswalks:(0,a.useMemo)((()=>[...e,...i]),[e,i]),focusedCrosswalks:i,toggleCrosswalkFocus:c,setCrosswalkHighlighted:l}})(),[y,b]=(0,a.useState)(-480),g=(0,a.useCallback)((e=>{let{percentageSize:t}=e;return b(t)}),[]),[h,v]=(0,a.useState)(),[x,E]=(0,a.useState)(!1),C=n.relation.relationUri,w=(0,et._)(),S=(0,a.useCallback)((()=>E(!0)),[]),T=(0,a.useCallback)((()=>E(!1)),[]),O=(0,a.useCallback)((0,d.pipe)(i,S),[]),[P,k]=(0,a.useMemo)((()=>{const e=e=>{e.errorCode===f.Xt7.CROSSWALK_NOT_FOUND?(At(e),t()):e.errorCode===f.Xt7.OBJECT_NOT_FOUND?l(e):(At(e),T())},t=()=>{w((0,f._vs)(C)).then((e=>{s((0,d.assocPath)(["relation","object"],e,n)),T()})).catch(e)};return[e,t]}),[n,T,s,l]),{modifiedEntity:D,crosswalksMap:R,newlyCreatedAttributes:N,onPinAttribute:j,onIgnoreAttribute:Z,onAddAttribute:M,onEditAttribute:I,onDeleteAttribute:A}=(0,tt.Q)({entity:n.relation.object,onModify:k,onError:P,onLoad:S}),{addCrosswalk:F,deleteCrosswalk:L,editCrosswalk:U}=(0,nt.P)({onSuccess:k,onError:P,onLoad:S}),z=(0,a.useCallback)(((e,t)=>{S(),(t?(0,f.rj2)({entityUri:C,attributeName:e,value:t}).then((()=>s((0,d.assocPath)(["relation",e],t,n)))):(0,f.X78)({entityUri:C,attributeName:e}).then((()=>s((0,d.dissocPath)(["relation",e],n))))).then(T).catch(P)}),[n,S,T,P]);return o().createElement(at.Z,{className:u.detailsView},o().createElement(ot.hR,m,o().createElement(Lt.DndProvider,{backend:Ft.default},o().createElement(rt.Z,null),o().createElement(lt.Z,{className:Ce()(u.resizablePanesWrapper,{[u.locked]:x}),orientation:"vertical",size:y,minSize:600,maxSize:-480,allowResize:!0,onChange:g},o().createElement("div",{className:u.pane},o().createElement(It,{readOnly:p,entity:t,connection:n,onNavigateBack:l,onDelete:O,onChangeActivenessDate:z}),o().createElement(it.R,{attributeUris:N},o().createElement(st.Z,{readOnly:p,entity:D,crosswalksMap:R,isLoading:x,onPin:j,onIgnore:Z,onEdit:I,onAdd:M,onDelete:A,selectedAttributeTypes:h,onSelectAttributeTypes:v,visibleColumns:r,onChangeVisibleColumns:c}))),o().createElement(vt,{readOnly:p,className:u.pane,relation:n.relation.object,selectedAttributeTypes:h,onAddCrosswalk:F,onDeleteCrosswalk:L,onEditCrosswalk:U})))))})),Bt=(0,se.Z)({relationshipsView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowX:"hidden",overflowY:"auto",fontFamily:"Roboto, Helvetica, Arial, sans-serif",display:"flex",flexDirection:"column"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},pane:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",position:"relative"}}),_t=(0,r.connect)(((e,t)=>{let{config:{id:n}}=t;return{entity:m.ZP.selectors.getEntity(e),metadata:m.ZP.selectors.getMetadata(e),connections:m.ZP.selectors.getConnectionsByViewId(e,n),total:m.ZP.selectors.getTotalByViewId(e,n)}}))((e=>{let{config:t,entity:n,metadata:r,connections:l,total:i,saveState:s,getSavedState:c,dispatch:p}=e;const u=Bt(),P=(0,a.useRef)(),R=(0,y.U)(),j=(0,f.biM)(n),{type:Z}=n||{},[{visibleColumns:M,filters:I,page:z,rowsPerPage:W,sorting:q,currentRelationType:te,stateToSave:ne,entityTypeOfAppliedSavedState:ae},{changeColumns:oe,toggleFilters:re,changeFilter:le,changePage:ie,changeRowsPerPage:se,toggleSort:ce,changeRelationType:pe,saveCurrentState:ue,applySavedState:me}]=(e=>{let{defaultColumns:t,defaultSorting:n,defaultRowsPerPage:o}=e;const r={visibleColumns:t,filters:null,sorting:n,page:0,rowsPerPage:o,currentRelationType:null,stateToSave:null,visibleColumnsForRelationTypes:{},entityTypeOfAppliedSavedState:null},[l,i]=(0,a.useReducer)(((e,t)=>{switch(t.type){case H:{const n=t.payload;return(0,d.pipe)(J,(0,d.assoc)("currentRelationType",n),K,$)(e)}case V:{const{savedState:n,entityTypeUri:a}=t.payload;return _({},e,n,{visibleColumns:n?X(n):e.visibleColumns,entityTypeOfAppliedSavedState:a})}case Y:return _({},e,{stateToSave:Q(e)});default:return D.ZP.reducer(e,t)}}),r);return[l,(0,N.o)({actions:G,dispatch:i})]})({defaultColumns:F,defaultRowsPerPage:U[0],defaultSorting:{field:F[0],order:"asc"}}),fe=ae===Z,{isLoading:ye,relationsTableSavedState:be,attributesTableSavedState:ge,updateRelationsTableSavedState:he,updateAttributesTableSavedState:ve}=(e=>{var t;let{getSavedState:n,saveState:o,entityTypeUri:r}=e;const[l,i]=(0,a.useState)(k),[s,c]=(0,a.useState)(null);(0,b.D)((()=>{s&&(i(O({},l,{relationsTable:s})),c(null))}),[r]);const[p,u]=(0,a.useState)(!0);return(0,a.useEffect)((()=>{n().then((e=>{i(e||k)})).then((e=>u(!1))).catch((e=>u(!1)))}),[]),{isLoading:p,relationsTableSavedState:null===(t=l.relationsTable)||void 0===t?void 0:t[r],attributesTableSavedState:l.attributesTable,updateRelationsTableSavedState:e=>{const t=O({},l.relationsTable,{[r]:e});c(t),o(O({},l,{relationsTable:t}))},updateAttributesTableSavedState:e=>{o(O({},l,{attributesTable:e}))}}})({getSavedState:c,saveState:s,entityTypeUri:Z}),[xe,Ee]=(0,a.useState)();(0,a.useEffect)((()=>{ye||me({savedState:be,entityTypeUri:Z})}),[ye,Z]),(0,a.useEffect)((()=>{ye||Ee(null==ge?void 0:ge.visibleColumns)}),[ye]),(0,b.D)((()=>{fe&&he(ne)}),[ne]),(0,b.D)((()=>{ie(0)}),[n]);const[Ce,we]=(0,a.useState)(),Se=(0,a.useCallback)((()=>{we(null)}),[]),Te=(0,a.useMemo)((()=>{const e=(0,f.io3)(r,Z);return r.relationTypes.filter((0,d.both)((0,f.uGe)(f.BDP.READ),(t=>{let{startObject:n,endObject:a}=t;return e.some((0,d.either)((0,d.equals)(n.objectTypeURI),(0,d.equals)(a.objectTypeURI)))})))}),[r,Z]),Oe=(0,a.useMemo)((()=>((e,t)=>t?(0,d.pipe)((0,d.find)((e=>e.uri===t)),f.DK$,B,(0,d.concat)(A),(0,d.reject)((e=>{let{id:t}=e;return L.includes(t)})))(e):(e=>{return t=(0,d.assoc)("dataTypeDefinition",(e=>({type:f.oS0.TYPE_SELECT,options:e.map((e=>{let{uri:t,label:n}=e;return{value:t,label:n}}))}))(e)),e=>(0,d.adjust)(e.findIndex((0,d.propEq)("id","relation.type")),t,e);var t})(e)(A))(Te,te)),[Te,te]),Pe=(0,a.useMemo)((()=>M.map((e=>Oe.find((0,d.propEq)("id",e)))).filter(d.identity)),[M,Oe]),ke=(0,a.useMemo)((()=>{const e=(0,d.pipe)((0,d.when)((0,d.always)(te),(0,d.filter)((0,d.propEq)("uri",te))),(0,d.map)((0,d.prop)("uri")))(Te);return{id:t.id,content:{inRelations:e,outRelations:e}}}),[t.id,te,Te]),De=(0,a.useMemo)((()=>((e,t)=>{const n=(0,ee.Tz)(t,e);return(new f.MEy).addClause(n).build()})(I,Pe)),[I,Pe]),{isLoading:Re,reload:Ne}=(0,g.a)({page:z,rowsPerPage:W,config:ke,entity:fe?n:null,filter:De,mode:f.ARY.Viewing,sorting:q}),je=!fe||Re,Ze=(0,a.useCallback)((0,d.pipe)(ce,ue),[ce,ue]),Me=(0,a.useCallback)((0,d.pipe)(le,ue),[le,ue]),Ie=(0,a.useCallback)((0,d.pipe)(re,ue),[re,ue]),Ae=(0,a.useCallback)((0,d.pipe)(oe,ue),[oe,ue]),Fe=(0,a.useCallback)((0,d.pipe)(pe,ue),[pe,ue]),Le=(0,a.useCallback)((e=>{Ee(e),ve({visibleColumns:e})}),[ve]),Ue=null==l?void 0:l[Ce],ze=(0,a.useCallback)((e=>{p(m.N5.relations.actions.relationsLoaded({id:t.id,connections:(0,d.update)(Ce,e,l),total:i}))}),[Ue]),[Be,_e]=(0,a.useMemo)((()=>[(0,f.w3p)(l),[f.q7e.RELATION]]),[l]),We=(0,h.C)({objectIds:Be,objectTypes:_e,enabled:!j}),He=(0,a.useMemo)((()=>(0,f.Px$)(l)),[l]),Ve=(0,a.useCallback)((e=>{At(e),e.errorCode===f.Xt7.OBJECT_NOT_FOUND&&Ne()}),[Ne]),Ye=(0,a.useCallback)((e=>{(0,d.pipe)(f.VGk,(0,d.andThen)(Ne),(0,d.otherwise)(Ve))(e)}),[Ne,Ve]),Ge=(0,a.useCallback)((()=>{(0,d.pipe)(f.VGk,(0,d.andThen)((0,d.pipe)(Se,Ne)),(0,d.otherwise)((e=>{e.errorCode===f.Xt7.OBJECT_NOT_FOUND&&Se(),Ve(e)})))(Ue.relation.relationUri)}),[Ue,Ne,Se,Ve]),$e=(0,a.useCallback)((e=>{e&&Ve(e),Se()}),[Ve,Se]);return o().createElement(v.s.Provider,{value:R},o().createElement(x.h.Provider,{value:We},o().createElement(E.X.Provider,{value:He},o().createElement("div",{className:u.relationshipsView},o().createElement(C.Z,{entity:n},o().createElement(w.a,null)),o().createElement(de,{total:i,filteringEnabled:!!I,onToggleFilters:Ie,columnsData:Oe,selectedColumns:M,onChangeColumns:Ae,relationTypes:Te,currentRelationType:te,onRelationTypeChange:Fe}),o().createElement("div",{className:u.pane},je&&o().createElement(S.Z,null),o().createElement(Qe,{readOnly:j,metadata:r,connections:l,columnsData:Pe,sorting:q,onSort:Ze,filters:I,onFilter:Me,onRowClick:we,tableRef:P,onDelete:Ye}),o().createElement(T.Z,{count:i,rowsPerPageOptions:U,page:z,onChangePage:ie,rowsPerPage:W,onChangeRowsPerPage:se,basicTableRef:P})),Ue&&o().createElement(zt,{readOnly:j,entity:n,visibleColumns:xe,onChangeVisibleColumns:Le,connection:Ue,onClose:$e,onDeleteConnection:Ge,onChangeConnection:ze})))))})),Wt=(0,i.createGenerateClassName)({productionPrefix:"relationshipsPerspective",disableGlobal:!0}),Ht=e=>{let{config:t,store:n,onResize:d,saveState:m,getSavedState:y}=e;const b=(0,a.useCallback)((0,f.aYu)(y),[y]);return o().createElement(r.Provider,{store:n},o().createElement(p.m.Provider,{value:t.id},o().createElement(i.StylesProvider,{generateClassName:Wt},o().createElement(c.MuiPickersUtilsProvider,{utils:l.Z},o().createElement(s.Z,{handleHeight:!0,onResize:(e,t)=>null==d?void 0:d(Math.floor(e),Math.floor(t))}),t&&o().createElement(_t,{config:t,saveState:m,getSavedState:b}),o().createElement(u.Z,null)))))}},46847:(e,t,n)=>{function a(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function r(e,t){try{var n=this.props,a=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,a)}finally{this.props=n,this.state=a}}function l(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,l=null,i=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?l="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(l="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?i="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(i="UNSAFE_componentWillUpdate"),null!==n||null!==l||null!==i){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==l?"\n "+l:"")+(null!==i?"\n "+i:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=a,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=r;var p=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var a=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;p.call(this,e,t,a)}}return e}n.r(t),n.d(t,{polyfill:()=>l}),a.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0}}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reltio/remotes",
3
- "version": "1.4.1157",
3
+ "version": "1.4.1158",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "main.js",
6
6
  "publishConfig": {