@reltio/remotes 1.4.1649 → 1.4.1650

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 (89) hide show
  1. package/1039.js +1 -1
  2. package/1088.js +1 -1
  3. package/1146.js +1 -1
  4. package/1148.js +1 -1
  5. package/1334.js +1 -1
  6. package/1425.js +1 -1
  7. package/1488.js +1 -1
  8. package/1572.js +1 -1
  9. package/1664.js +1 -1
  10. package/1707.js +1 -1
  11. package/1790.js +1 -1
  12. package/1840.js +1 -1
  13. package/1984.js +1 -1
  14. package/2066.js +1 -1
  15. package/2400.js +1 -1
  16. package/281.js +1 -1
  17. package/2966.js +1 -1
  18. package/3096.js +1 -1
  19. package/3348.js +1 -1
  20. package/3358.js +1 -1
  21. package/3373.js +1 -1
  22. package/3381.js +1 -1
  23. package/3383.js +1 -1
  24. package/3463.js +1 -1
  25. package/3469.js +1 -1
  26. package/3538.js +1 -1
  27. package/356.js +1 -1
  28. package/3854.js +1 -1
  29. package/3902.js +1 -1
  30. package/3912.js +1 -1
  31. package/3926.js +1 -1
  32. package/415.js +1 -1
  33. package/4212.js +1 -1
  34. package/4390.js +1 -1
  35. package/4481.js +1 -1
  36. package/4609.js +1 -1
  37. package/4610.js +1 -1
  38. package/4703.js +1 -1
  39. package/4780.js +1 -1
  40. package/4806.js +1 -1
  41. package/4838.js +1 -1
  42. package/50.js +1 -1
  43. package/5039.js +1 -1
  44. package/5053.js +1 -1
  45. package/5108.js +1 -1
  46. package/5163.js +1 -1
  47. package/5292.js +1 -1
  48. package/5383.js +1 -1
  49. package/5617.js +1 -1
  50. package/6020.js +1 -1
  51. package/6287.js +1 -1
  52. package/636.js +1 -1
  53. package/6606.js +1 -1
  54. package/6799.js +1 -1
  55. package/6844.js +1 -1
  56. package/6860.js +1 -1
  57. package/6903.js +1 -1
  58. package/7128.js +1 -1
  59. package/7340.js +1 -1
  60. package/735.js +1 -1
  61. package/7422.js +1 -1
  62. package/7605.js +1 -1
  63. package/7626.js +1 -1
  64. package/764.js +1 -1
  65. package/7744.js +1 -1
  66. package/7744.js.map +1 -1
  67. package/7896.js +1 -1
  68. package/820.js +1 -1
  69. package/8207.js +1 -1
  70. package/8565.js +1 -1
  71. package/870.js +1 -1
  72. package/8741.js +1 -1
  73. package/9016.js +1 -1
  74. package/9050.js +1 -1
  75. package/9283.js +1 -1
  76. package/9309.js +1 -1
  77. package/9328.js +1 -1
  78. package/9387.js +1 -1
  79. package/9464.js +1 -1
  80. package/9719.js +1 -1
  81. package/9736.js +1 -1
  82. package/9861.js +1 -1
  83. package/987.js +1 -1
  84. package/99.js +1 -1
  85. package/9952.js +1 -1
  86. package/9960.js +1 -1
  87. package/main.js +1 -1
  88. package/package.json +1 -1
  89. package/remoteEntry.js +1 -1
package/2066.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7c092ac7-cd94-4aa5-b2e1-795197ee86db",e._sentryDebugIdIdentifier="sentry-dbid-7c092ac7-cd94-4aa5-b2e1-795197ee86db")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1650"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2066],{48030:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r(50914),l=r(31421);function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){i(e,t,r[t])}))}return e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const s=e=>{let{rowIndex:t,columnData:r,cellIndex:n}=e;return`${r.id}[${t}][${n}]`},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;const[t,r]=(0,n.useState)({}),i=(0,n.useRef)({}),c=(0,n.useCallback)((0,l.DsO)((()=>r(o({},i.current)))),[]),u=(0,n.useCallback)((()=>{i.current={}}),[]),p=(0,n.useCallback)((r=>{const n=e(r);return t[n]}),[e,t]),d=(0,n.useCallback)((0,a.curry)(((t,r)=>{const n=e(t);i.current[n]!==r&&(i.current[n]=r,c())})),[c,e]);return{getDynamicRowCellHeight:p,changeRowCellHeight:d,clearHeightsCache:u}}},96253:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(24328),a=r.n(n),l=r(44443),o=r(55962);const i=e=>{let{onChangeHeight:t,children:r}=e,i=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["onChangeHeight","children"]);const s=(0,n.useRef)(),{rowValue:c,rowIndex:u,columnData:p,cellIndex:d}=i,m=t({rowIndex:u,cellIndex:d,columnData:p,rowValue:c}),b=()=>s.current&&m(s.current.clientHeight);return(0,o.D)(b,[c.rawValue]),a().createElement("div",{ref:s},a().createElement(l.Z,{handleHeight:!0,onResize:b}),r)}},94059:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(2507),o=r.n(l),i=r(38677),s=r(69089),c=r(79811),u=r(290),p=r(75779);const d=e=>{let{open:t,onClose:r,onConfirm:n}=e;return a().createElement(s.Z,{open:t},a().createElement(u.Z,null,a().createElement(p.Z,null,o().text("Are you sure you want to delete this?"))),a().createElement(c.Z,null,a().createElement(i.Z,{onClick:r,color:"primary"},o().text("No")),a().createElement(i.Z,{onClick:()=>{n(),r()},color:"primary"},o().text("Yes"))))}},90143:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(23883);const o=(0,r(72342).makeStyles)((e=>({tooltip:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,filter:"drop-shadow(0px 1px 5px #00000033) drop-shadow(0px 3px 1px #0000001F) drop-shadow(0px 2px 2px #00000024)",padding:"10px",maxWidth:"none"},arrow:{color:e.palette.background.paper}})));function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}const s=e=>{const t=o();return a().createElement(l.Z,i({},e,{classes:t,arrow:!0}))}},67275:(e,t,r)=>{r.d(t,{n:()=>f});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(31421),s=r(79386),c=r(76368),u=r(72316),p=r(1824),d=r(62901),m=r(36852),b=r(75647);const y=(0,r(72342).makeStyles)({profileBandNavigation:{marginBottom:"10px"},comments:{display:"flex",justifyContent:"flex-end"}}),f=(0,n.memo)((e=>{let{entity:t,className:r,historySlice:l}=e;const f=y(),g=(0,n.useMemo)((()=>(0,i.L5S)(t)),[t]),v=(0,m.C)({objectIds:g}),h=(0,i.wwR)(t);return a().createElement(p.e,{collaboration:v},a().createElement(s.Z,{className:o()(r,d.U),entity:(null==l?void 0:l.aEntity)||t},l?a().createElement(b.Z,null):a().createElement(a().Fragment,null,a().createElement(c.a,{className:f.profileBandNavigation}),a().createElement(u.Z,{className:f.comments,uri:h,relatedObjectUris:(0,i.wp9)(i.q7e.ENTITY,{entityUri:h}),objectType:i.q7e.ENTITY}))))}));f.displayName="ScreenProfileBand"},2002:(e,t,r)=>{r.d(t,{Z:()=>oe});var n=r(24328),a=r.n(n),l=r(31421),o=r(35039),i=r(31992),s=r(6163),c=r(29754),u=r(50985),p=r(71153),d=r.n(p),m=r(2507),b=r.n(m),y=r(67586),f=r(98538),g=r(47019),v=r(50914),h=r(51492),E=r(12980),w=r(72342);const x=(0,w.makeStyles)((()=>({textField:{margin:0},input:{borderRadius:0},inputMultiline:{"&$input":{paddingTop:0,paddingBottom:0}},booleanEditor:{paddingLeft:"10px"},timestampEditor:{"&$paper":{minWidth:"255px"}},paper:e=>{let{color:t,containerWidth:r}=e;return{border:`3px solid ${t}`,borderRadius:"4px",width:r,minWidth:"160px"}},popoverRoot:{zIndex:"10!important"}})));function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const k=[l.oS0.TYPE_TEXT,l.oS0.TYPE_BLOB],T=e=>{let{attributeType:t,attributeValue:r,color:o,containerRef:i,onClose:s,onEdit:c,isTemporary:u}=e;const p=x({color:o,containerWidth:i.current?i.current.getBoundingClientRect().width:0}),m=(0,l.PFL)(t),b=(0,E.AG)(r,m),[y,f]=(0,n.useState)(b),w=!(0,v.isNil)(t.defaultValue)&&u,T={className:p.textField,InputProps:{disableUnderline:!0,classes:{root:p.input,multiline:p.inputMultiline}},fullWidth:!0,autoFocus:!0},C=()=>{const e=!(0,v.isNil)(y)&&(0,E.Ho)(t,y);if(!(0,v.isNil)(y)&&!(0,v.equals)(y,b)||w){const n=(0,l.CwH)(t)?{value:e.value,lookupCode:e.lookupCode}:{value:""===y&&(0,l.FVt)(m.type)?null:e};c(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){O(e,t,r[t])}))}return e}({},r,n))}s()};return a().createElement(g.ZP,{open:!!i,anchorEl:i.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},classes:{paper:d()(p.paper,{[p.booleanEditor]:(0,l.T6Y)(m.type),[p.timestampEditor]:(0,l.j5n)(m.type)}),root:p.popoverRoot},onKeyUp:e=>{"Enter"!==e.key||k.includes(m.type)?"Escape"===e.key&&s():C()},onBackdropClick:C},a().createElement(h.Z,{dataTypeDefinition:m,fieldName:(0,l.Tde)(t.uri),onChange:f,TextFieldProps:T,value:y}))};var C=r(39475),S=r(20888),I=r(53203),A=r(95341),Z=r(79312),j=r(78223),N=r(10918);const D=(0,w.makeStyles)((e=>({menuItem:{minHeight:"32px",color:e.palette.text.secondary},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"16px"},sourceItem:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)",paddingBottom:"8px",paddingLeft:"16px",maxWidth:"200px"}}))),P=(0,j.Z)(A.Z),V=e=>{let{styles:t,icon:r,text:n}=e;return a().createElement(a().Fragment,null,r,a().createElement(Z.Z,{classes:{root:t.menuText}},n))},R=(0,n.forwardRef)(((e,t)=>{let{item:r,onMenuClose:n=(()=>{})}=e;const l=D(),{disabled:o,text:i,tooltip:s,onClick:c,id:u="",icon:p,crosswalk:d,color:m}=r;return d?a().createElement(N.Z,{className:l.sourceItem,color:m,crosswalk:d,focusable:!0}):a().createElement(P,{tooltipTitle:s,showForDisabled:!0,classes:{root:l.menuItem},onClick:e=>{n(e),c(e)},disabled:o,ref:t,"data-reltio-id":`crosswalk-menu-item${u}`},a().createElement(V,{icon:p,text:i,styles:l}))}));R.displayName="CrosswalkMenuItem";const U=R;var M=r(2996),W=r(23759);function H(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const L=(0,w.makeStyles)((()=>({root:e=>{let{fullyColored:t,opaque:r,color:n,variant:a}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){H(e,t,r[t])}))}return e}({minHeight:"28px",wordBreak:"break-word"},"filled"===a&&{borderRadius:"4px",background:t?n:`linear-gradient(to right, ${n} 8px, rgba(0,0,0,0.05) 8px)`},"outlined"===a&&{"&::after":{content:'""',position:"absolute",background:n,borderRadius:"4px 0px 0px 4px",width:"8px",height:"100%",pointerEvents:"none"},"&::before":{content:'""',position:"absolute",boxSizing:"border-box",borderRadius:"4px",border:t?`${n} solid 2px`:"rgba(0,0,0,0.12) solid 1px",width:"100%",height:"100%",pointerEvents:"none"}},{display:"flex",alignItems:"center",opacity:r?1:.38,transition:"opacity 0.3s",position:"relative"})},attributeValue:{marginLeft:"16px",padding:"6px 0",lineHeight:"14px",width:"calc(100% - 71px)"},actions:{display:"flex",width:"71px",justifyContent:"flex-end",marginRight:"4px"}}))),z=e=>{let{className:t,dataReltioId:r,attributeType:o=null,attributeValue:i,crosswalk:p,disableEdit:m,disableDelete:g,onIgnore:v,onEdit:h,onPin:E,onDelete:w,isEmpty:x}=e;const{isReadingMode:O,isEditingMode:k,isHovered:A,onMouseEnter:Z,onMouseLeave:j,setReadingMode:N,setEditingMode:D}=(0,M.p)(),P=(0,n.useRef)(),V=(0,l.nIW)(i.uri),R=(0,l.x_)(p),H=!o.system&&!R,z=H&&!m&&(0,l.Z5t)(l.fO_.EDITING,o),B=H&&!g&&(0,l.Edd)(l.fO_.EDITING,o),F=(0,l.ZiX)(i.uri),Y=(0,l.mqZ)(l.BDP.UPDATE,o)&&!m&&H,_=!F&&(!O&&Y||i.pin),G=!F&&(!O&&Y||i.ignored);(0,n.useEffect)((()=>{F&&!x&&D()}),[x]);const q=(0,W.nX)(p),{isHighlighted:X,isDimmed:$,highlightCrosswalk:Q,removeHighlight:J}=(0,W.pu)(p),K=L({variant:R?"outlined":"filled",opaque:!$,fullyColored:X,color:$?"rgba(0, 0, 0, 0.12)":q}),ee=[{crosswalk:p,color:q},{disabled:!z,text:b().text("Edit"),icon:a().createElement(c.Z,null),tooltip:z?null:b().text("You don't have permissions to edit"),onClick:()=>D(),id:"edit"},{disabled:!B,text:b().text("Delete"),icon:a().createElement(s.Z,null),tooltip:B?null:b().text("You don't have permissions to delete"),onClick:()=>w({attributeType:o,attributeValue:i,crosswalks:[p]}),id:"delete"}],te=()=>{J(),N()};return a().createElement("div",{ref:P,className:d()(t,K.root),onMouseEnter:()=>{Q(),Z()},onMouseLeave:()=>{J(),j()},"data-reltio-id":r},a().createElement("div",{className:K.attributeValue},a().createElement(y.Z,{value:(0,l.kDl)(i),dataTypeDefinition:(0,l.PFL)(o)})),a().createElement("div",{className:K.actions},_&&a().createElement(I.Z,{isPinned:i.pin,onClick:()=>E({attributeValue:i}),disabled:!Y}),G&&a().createElement(S.Z,{isIgnored:i.ignored,onClick:()=>v({attributeValue:i}),disabled:!Y}),A&&!(0,l.vr_)(o)&&a().createElement(f.Z,{MenuItemRenderer:U,menuId:`simple-attribute-additional-actions-${V}`,buttonComponent:C.k,buttonProps:{icon:u.Z,size:"XS",tooltipTitle:b().text("More actions")},onMenuClose:te,menuItems:ee})),k&&a().createElement(T,{attributeType:o,attributeValue:i,color:q,onClose:te,onEdit:e=>h({attributeType:o,attributeValue:e,crosswalk:p}),containerRef:P,isTemporary:F}))};var B=r(13896);const F=(0,w.makeStyles)((()=>({simpleAttributesWrapper:{display:"flex",flexWrap:"wrap",gap:"4px",width:"100%",minHeight:"28px"},dropIndicator:{height:"28px",color:"#828282",fontSize:"13px",lineHeight:"28px",background:"rgba(0, 0, 0, 0.04)",border:"1px dashed #828282",borderRadius:"4px",boxSizing:"border-box",padding:"0 12px"}})));function Y(){return Y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Y.apply(this,arguments)}const _=e=>{let{attributeValues:t,attributeType:r,parentUri:n,disableEdit:o,crosswalksMap:i,onAdd:s,emptyTempAttributeUris:c}=e,u=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues","attributeType","parentUri","disableEdit","crosswalksMap","onAdd","emptyTempAttributeUris"]);const p=F(),[{isDragItemOver:d},m]=(0,B.useDrop)({accept:"Crosswalk",canDrop:e=>{let{crosswalk:t}=e;const n=(0,l.bC9)(t.uri)||"relation"===t.ownerType,a=(0,l.WgC)(t.uri)&&"entity"===t.ownerType;return(0,l.d89)(l.fO_.EDITING,r)&&!o&&(n&&(0,l.$NE)(r.uri)||a&&(0,l.EdS)(r.uri))},collect:e=>({isDragItemOver:e.isOver()&&e.canDrop()}),drop:(e,a)=>{let{crosswalk:l}=e;s({attributeType:r,crosswalk:l,parentUri:n,index:t.length})}});let y=0;return a().createElement("div",{ref:m,className:p.simpleAttributesWrapper,"data-reltio-id":"simple-attributes-wrapper"},t.map((e=>{var t;return null===(t=i[e.uri])||void 0===t?void 0:t.map((t=>a().createElement(z,Y({key:e.uri+t.uri,attributeType:r,attributeValue:e,crosswalk:t,disableEdit:o,isEmpty:c.includes(e.uri),dataReltioId:"value-index-"+y++},u))))})),d&&a().createElement("div",{className:p.dropIndicator},b().text("Drop here")))};var G=r(73149),q=r(38677);function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},X.apply(this,arguments)}const $=e=>{let{className:t,attributeValues:r,attributeType:n,onAdd:o,parentUri:i,disableEdit:s}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues","attributeType","onAdd","parentUri","disableEdit"]);const u=!s&&(0,l.d89)(l.fO_.EDITING,n);return 0===r.length&&u?a().createElement(q.Z,{variant:"text",color:"primary",onClick:()=>o({parentUri:i,attributeType:n,index:0})},b().text("Create attribute")):a().createElement("div",{className:t},r.map((e=>a().createElement(G.Z,X({key:e.uri,attributeValue:e,attributeType:n,onAdd:o,disableEdit:s},c)))))};var Q=r(49402);function J(){return J=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},J.apply(this,arguments)}const K=e=>{let{className:t,attributeValues:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues"]);return a().createElement("div",{className:t},r.map((e=>a().createElement(Q.Z,J({key:e.uri,attributeValue:e},n)))))};var ee=r(51557);function te(){return te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},te.apply(this,arguments)}const re=e=>{let{className:t,attributeValues:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues"]);return a().createElement("div",{className:t},r.map((e=>a().createElement(ee.Z,te({key:e.uri,attributeValue:e},n)))))},ne=(0,w.makeStyles)((()=>({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start"},complexAttributesWrapper:{width:"100%"}})));function ae(){return ae=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ae.apply(this,arguments)}function le(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const oe=e=>{let{attributeType:t,attributeValues:r=[],paging:s={},max:c=1/0,requestNextPage:u}=e,p=le(e,["attributeType","attributeValues","paging","max","requestNextPage"]);const d=ne(),[m,b]=(0,n.useState)(c),y=(0,v.propOr)(r.length,"totalValues",s),f=c<y,g=f&&m<y,h=f&&m>=y,E=r.slice(0,m),w=y-m;return a().createElement("div",{className:d.wrapper},(e=>{switch(t.type){case l.oS0.TYPE_NESTED:return a().createElement($,ae({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));case l.oS0.TYPE_REFERENCE:{const{crosswalksMap:r}=p,n=le(p,["crosswalksMap"]);return a().createElement(K,ae({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t,crosswalksMap:r},n))}case l.oS0.TYPE_IMAGE:return a().createElement(re,ae({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));default:return a().createElement(_,ae({attributeValues:e,attributeType:t},p))}})(E),g&&a().createElement(o.Z,{moreNumber:Math.min(c,w),valueNumber:w,onClick:()=>{r.length<y&&u(),b(m+c)}}),h&&a().createElement(i.Z,{onClick:()=>{b(c)}}))}},86966:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(24328),a=r.n(n),l=r(31421),o=r(2996),i=r(79935),s=r(23759),c=r(10918),u=r(90143),p=r(71153),d=r.n(p),m=r(21934);const b=e=>{let{crosswalk:t,className:r}=e;const n=(0,s.nX)(t),o=(0,l.x_)(t),{isDimmed:i,highlightCrosswalk:p,removeHighlight:b}=(0,s.pu)(t),y=(0,m.y)({isOpaque:!i,color:i?"rgba(0, 0, 0, 0.12)":n,isDisabled:o});return a().createElement(u.Z,{title:a().createElement(c.Z,{crosswalk:t,color:n}),placement:"top"},a().createElement("div",{"data-reltio-id":"crosswalk-icon",className:d()(y.crosswalkIcon,r),onMouseEnter:()=>p(),onMouseLeave:()=>b()}))};var y=r(50914),f=r(85777),g=r(2002),v=r(14699),h=r(52239),E=r(72342);const w=(0,E.makeStyles)((e=>({title:{fontSize:"12px",lineHeight:"14px",paddingBottom:"4px",display:"inline-block",color:e.palette.text.secondary}})));function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x.apply(this,arguments)}const O=e=>{let{attributeTypes:t,attributes:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeTypes","attributes"]);const o=w();return a().createElement(a().Fragment,null,t.filter(l.Uty).map((e=>a().createElement(h.Z,{key:e.uri,enabled:!0},a().createElement(v.Z,{className:o.title,label:e.label}),a().createElement(g.Z,x({attributeType:e,attributeValues:r[e.name],paging:(0,y.path)(["paging",e.uri],r)},n))))))};var k=r(53203),T=r(20888),C=r(39475),S=r(6163),I=r(2507),A=r.n(I);const Z=e=>{let{onClick:t}=e;return a().createElement(C.k,{icon:S.Z,tooltipTitle:A().text("Delete"),onClick:t,size:"XS",disableRipple:!0})};var j=r(55962),N=r(38361);const D=(0,E.makeStyles)((()=>({root:{display:"flex",minHeight:"20px"},actions:{display:"flex",width:"65px",justifyContent:"flex-end",flexShrink:0,alignSelf:"center"},crosswalkIcon:{display:"inline-block",verticalAlign:"middle","& + &":{marginLeft:"4px"}}}))),P=e=>{let{attributeType:t,attributeValue:r,attributeTypesList:s,label:c,crosswalksMap:u,disableEdit:p,disableDelete:d,onPin:m,onIgnore:g,onDelete:v,onEdit:h,onAdd:E,emptyTempAttributeUris:w}=e;const x=D(),{isReadingMode:C,onMouseEnter:S,onMouseLeave:I}=(0,o.p)(),A=!p&&(0,l.Z5t)(l.fO_.EDITING,t),P=!d&&(0,l.Edd)(l.fO_.EDITING,t),V=(0,l.ZiX)(r.uri),R=!V&&(!C&&A||r.pin),U=!V&&(!C&&A||r.ignored),M=!C&&P,W=(0,N.Q)(r.uri),[H,L]=(0,n.useState)(W||V);(0,j.D)((()=>{W&&L(W)}),[W]);const z=(0,y.pipe)((0,y.pickBy)(((e,t)=>(0,l.sOy)(t,null==r?void 0:r.uri))),y.values,y.flatten,(0,y.uniqBy)((0,y.prop)("uri")))(u);return a().createElement(a().Fragment,null,a().createElement("div",{className:x.root,onMouseEnter:S,onMouseLeave:I},a().createElement(f.Z,{onClick:()=>L((e=>!e)),expanded:H}),a().createElement("span",null,c,z.map((e=>a().createElement(b,{key:(0,l.uKF)(e),crosswalk:e,className:x.crosswalkIcon})))),a().createElement(i.Z,null),a().createElement("div",{className:x.actions},R&&a().createElement(k.Z,{disabled:!A,isPinned:r.pin,onClick:()=>m({attributeValue:r})}),U&&a().createElement(T.Z,{disabled:!A,isIgnored:r.ignored,onClick:()=>g({attributeValue:r})}),M&&a().createElement(Z,{onClick:()=>v({attributeType:t,attributeValue:r,crosswalks:u[r.uri]})}))),H&&a().createElement(O,{attributeTypes:s,attributes:r.value,parentUri:r.uri,crosswalksMap:u,disableEdit:!A,disableDelete:!P,onPin:m,onIgnore:g,onDelete:v,onEdit:h,onAdd:E,emptyTempAttributeUris:w}))}},51557:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(31421),o=r(26729),i=r(86966);const s=(0,r(72342).makeStyles)((()=>({image:{borderRadius:"4px",background:"white",display:"inline-block",verticalAlign:"middle"},imageContainer:{display:"inline",lineHeight:"45px",paddingRight:"8px"}})));function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}const u={imageWidth:55,imageHeight:45},p=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const p=s();return a().createElement(i.Z,c({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:a().createElement(o.Z,{containerClassName:p.imageContainer,className:p.image,src:(0,l.Ysv)(t),size:u})},n))}},73149:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(31421),o=r(86966),i=r(35969);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const c=a().createElement(i.x,null,(0,l.idV)(null==t?void 0:t.label));return a().createElement(o.Z,s({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:c},n))}},49402:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(24328),a=r.n(n),l=r(50914),o=r(31421),i=r(86966),s=r(35969),c=r(30357),u=r(98074),p=r(14596);const d=(0,r(72342).makeStyles)((e=>({relationshipLabel:{marginLeft:"4px",color:e.palette.text.primary}})));function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}const b=e=>{let{attributeValue:t,attributeType:r}=e,b=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const y=d(),{generateEntityUrl:f}=(0,n.useContext)(u.v),g=(0,p.AH)(),v=(0,p.Qh)(),h=a().createElement(s.x,null,a().createElement(c.Z,{href:f({uiPath:v,uri:(0,o.bwT)(t)})},(0,o.idV)(t.label),t.relationshipLabel&&a().createElement("span",{className:y.relationshipLabel},t.relationshipLabel))),E=(0,l.pipe)(o.tF$,(0,l.map)((e=>(0,o.zeJ)(g,e))),(0,l.reject)(l.isNil))(r);return a().createElement(i.Z,m({attributeValue:t,attributeType:r,attributeTypesList:E,label:h},b))}},35969:(e,t,r)=>{r.d(t,{x:()=>i});var n=r(24328),a=r.n(n),l=r(79312),o=r(21934);const i=e=>{let{children:t}=e;const r=(0,o.q)();return a().createElement(l.Z,{component:"span",variant:"body2",classes:{body2:r.label}},t)}},20888:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(39475);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=e=>a().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3.5A8.503 8.503 0 003.5 12c0 4.692 3.808 8.5 8.5 8.5s8.5-3.808 8.5-8.5-3.808-8.5-8.5-8.5zM6.1 12c0-3.26 2.64-5.9 5.9-5.9 1.161 0 2.24.336 3.149.917L7.017 15.15A5.821 5.821 0 016.101 12zm5.9 5.9c-1.16 0-2.24-.336-3.148-.917l8.131-8.131c.581.908.917 1.987.917 3.148 0 3.26-2.64 5.9-5.9 5.9z",fill:"#000",fillOpacity:.54}));function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.847 9.402a6.34 6.34 0 00-.8-1.322L8.08 17.048A6.34 6.34 0 0012 18.4a6.398 6.398 0 005.847-8.998zm-7.283 7.283l6.121-6.121a4.898 4.898 0 01-6.121 6.121zm1.437-11.084a6.334 6.334 0 013.92 1.352L6.953 15.92A6.334 6.334 0 015.6 12c0-3.536 2.864-6.4 6.4-6.4zm0 1.5c.5 0 .982.075 1.436.215l-6.121 6.12A4.898 4.898 0 0112 7.1zM6.6 17.903A7.967 7.967 0 0012 20c4.417-.001 8.001-3.585 8.001-8.001a7.967 7.967 0 00-2.601-5.902A7.988 7.988 0 0012 4c-4.416 0-8 3.584-8 8a7.967 7.967 0 002.602 5.902zM12 2.5c-5.244 0-9.5 4.256-9.5 9.5s4.256 9.5 9.5 9.5 9.5-4.256 9.5-9.5-4.256-9.5-9.5-9.5z",fill:"#000",fillOpacity:.54}));var u=r(2507),p=r.n(u);const d=e=>{let{isIgnored:t,onClick:r,disabled:n}=e;return a().createElement(l.k,{disabled:n,showForDisabled:!0,icon:t?i:c,tooltipTitle:n?p().text("You don't have permissions to ignore"):p().text("Ignore"),onClick:r,size:"XS",disableRipple:!0})}},53203:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(39475);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=e=>a().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 4v6l2 2v2h-5v7l-.992 1L11 21v-7H6v-2l2-2V4H7V2h10v2h-1z",fill:"#000",fillOpacity:.54}));function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 10V4h1V2H7v2h1v6l-2 2v2h5v7l1.008 1L13 21v-7h5v-2l-2-2zm-6-6h4v7l1 1H9l1-1V4z",fill:"#000",fillOpacity:.54}));var u=r(2507),p=r.n(u);const d=e=>{let{isPinned:t,onClick:r,disabled:n}=e;return a().createElement(l.k,{disabled:n,showForDisabled:!0,onClick:r,icon:t?i:c,tooltipTitle:n?"You don't have permissions to pin":p().text("Pin"),size:"XS",disableRipple:!0})}},10918:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(24328),a=r.n(n),l=r(2507),o=r.n(l),i=r(71153),s=r.n(i),c=r(31421),u=r(26436),p=r(21210),d=r(23759),m=r(14596),b=r(39475),y=r(21934);const f=e=>{let{crosswalk:t,color:r,className:n,focusable:l=!1}=e;const{toggleCrosswalkFocus:i,isFocused:f}=(0,d.BF)(t),g=(0,y.y)({color:r,isFocused:f}),v=(0,m.AH)(),{label:h}=(0,c.PWK)(v,t.type);return a().createElement("div",{className:s()(g.sourceItem,n)},a().createElement(p.Z,{className:g.sourceIcon,sourceType:t.type}),a().createElement("div",{className:g.sourceInfo},a().createElement("div",null,a().createElement("span",{className:g.label},h),l&&a().createElement(b.k,{icon:u.Z,className:g.eyeIcon,size:"XXS",tooltipTitle:o().text("Focus"),onClick:()=>i()})),a().createElement("div",{className:g.crosswalkValue},t.value)))}},21934:(e,t,r)=>{r.d(t,{y:()=>a,q:()=>l});var n=r(72342);const a=(0,n.makeStyles)({sourceItem:{display:"flex",overflow:"hidden"},eyeIcon:e=>{let{isFocused:t}=e;return{marginLeft:"10px",color:t?"#000":"rgba(0, 0, 0, 0.54)"}},label:{color:"rgba(0, 0, 0, 0.87)",verticalAlign:"top",fontSize:"13px",lineHeight:"16px"},sourceInfo:{overflow:"hidden"},crosswalkValue:{color:"rgba(0, 0, 0, 0.54)",fontSize:"12px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},sourceIcon:e=>{let{color:t}=e;return{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px",backgroundColor:t}},crosswalkIcon:e=>{let{color:t,isOpaque:r,isDisabled:n}=e;return{backgroundColor:n?"#fff":t,border:n?`2px solid ${t}`:null,height:"12px",width:"12px",boxSizing:"border-box",borderRadius:"30px",opacity:r?1:.38,transition:"opacity 0.3s"}}}),l=(0,n.makeStyles)((()=>({label:{fontSize:"13px",lineHeight:"15px",letterSpacing:"normal",marginLeft:"2px",marginRight:"8px"}})))},2996:(e,t,r)=>{r.d(t,{p:()=>o});var n,a=r(31421),l=r(24328);!function(e){e.READING="READING",e.HOVERED="HOVERED",e.EDITING="EDITING"}(n||(n={}));const o=()=>{const[e,t]=(0,l.useState)(null),r=e===n.READING,o=e===n.EDITING,i=e===n.HOVERED;(0,l.useEffect)((()=>{t(n.READING)}),[]);const s=(0,l.useCallback)((0,a.DsO)(t,50),[]),c=(0,l.useCallback)((()=>{o||s(n.HOVERED)}),[s,o]),u=(0,l.useCallback)((()=>{o||s(n.READING)}),[s,o]);return{setReadingMode:(0,l.useCallback)((()=>t(n.READING)),[t]),setEditingMode:(0,l.useCallback)((()=>t(n.EDITING)),[t]),onMouseLeave:u,onMouseEnter:c,isReadingMode:r,isEditingMode:o,isHovered:i}}},45226:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(31421),a=r(24328),l=r.n(a),o=r(11013),i=r(61347);function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){c(e,t,r[t])}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function p(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const d=e=>{let{values:t,valueContainerClassName:r}=e,n=p(e,["values","valueContainerClassName"]);return l().createElement(l().Fragment,null,(t||[]).map((e=>l().createElement("div",{key:e.uri,className:r},l().createElement(o.Z,u({attributeValue:e},n))))))},m=(0,a.memo)((e=>{let{expanded:t,LabelRenderer:r,RightSlot:a}=e,o=p(e,["expanded","LabelRenderer","RightSlot"]);const{attributeType:c,values:u,valueContainerClassName:m}=o;switch(c.type){case n.oS0.TYPE_NESTED:case n.oS0.TYPE_REFERENCE:return d(s({expanded:t,LabelRenderer:r,RightSlot:a},o));case n.oS0.TYPE_IMAGE:return l().createElement("div",{className:m},l().createElement(i.Z,{attributeType:c,attributeValues:u,imageSize:{imageHeight:40,imageWidth:40,imageMargin:2}}));default:return d(s({},o))}}))},63309:(e,t,r)=>{r.d(t,{Z:()=>Ye});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(2507),s=r.n(i),c=r(31421),u=r(48030),p=r(87825),d=r(45108),m=r(17998),b=r(72342);const y=(0,b.makeStyles)((e=>({coloredCell:{"&::before":{content:'""',position:"absolute",right:0,top:0,width:"100%",height:"100%",background:"rgba(0,0,0,0.06)",pointerEvents:"none"}},headCell:{display:"flex",alignItems:"center",fontSize:"12px",height:"100%",color:e.palette.text.secondary},rowCell:{fontSize:"13px",overflow:"hidden"},cellValueWrapper:{position:"relative",padding:"15px 15px 0 15px","&:last-child":{paddingBottom:"15px"}},dragIndicator:{display:"none",position:"absolute",top:"15px",left:0,cursor:"grab"},dragIndicatorIcon:{fill:e.palette.text.secondary,width:"14px",height:"14px"},attributeTitle:{display:"block",marginLeft:"3px","&:not(:last-child)":{marginBottom:"5px"}},ovValue:{"& + &":{marginTop:"4px"}},count:{textAlign:"center"},ruleType:{display:"flex",alignItems:"center"},ruleTypeLabel:{marginRight:"5px"},rulePopup:{width:"270px",overflowY:"hidden"},popupItem:{paddingBottom:"5px",paddingTop:"5px"},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"},closeButton:{height:24,width:24},popupTitle:{fontWeight:500,marginLeft:"12px"},popupTitleWrapper:{display:"flex",paddingLeft:16,paddingTop:16},popupItemsWrapper:{overflowY:"auto",maxHeight:"280px"},winnerSourceItemWrapper:{paddingBottom:"2px",paddingTop:"2px"},winnerSourceItem:{display:"flex",alignItems:"center",width:"100%",paddingLeft:"8px"},winnerSourceItemLabel:{fontSize:13}})));function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}const g=e=>{let{cell:t,CellValueRenderer:r,columnIndex:n,columnData:l,someRowIsDragging:i}=e,s=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["cell","CellValueRenderer","columnIndex","columnData","someRowIsDragging"]);const c=y(),u=0===n,p=!i||u;return a().createElement("div",{className:o()(c.rowCell,u&&c.coloredCell),"data-reltio-id":`column-name-${l.id}`},p&&a().createElement(a().Fragment,null,t.values.map(((e,t)=>a().createElement(r,f({key:t,value:e,someRowIsDragging:i},s))))))};var v=r(96253);function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h.apply(this,arguments)}const E=e=>{let{changeRowCellHeight:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["changeRowCellHeight"]);return r.isDragLayer?a().createElement(g,h({},r,{someRowIsDragging:!1})):a().createElement(v.Z,h({onChangeHeight:t},r),a().createElement(g,r))};var w=r(50914),x=r(92332);const O=e=>{const t=y();return a().createElement("div",{className:o()(t.headCell,t.coloredCell)},a().createElement(x.default,e),e.children)};var k=r(67283),T=r(30488),C=r(14596);const S=(0,b.makeStyles)({root:{marginBottom:"-6px"}}),I=(0,T.Z)((0,w.pick)(["parentUri","parentTypeUri","onAdd","selectedAttributeTypes","onSelectAttributeTypes"]))((e=>{let{parentTypeUri:t,parentUri:r,selectedAttributeTypes:n,onSelectAttributeTypes:l,onAdd:o}=e;const i=S(),u=(0,C.AH)(),p=[...u.entityTypes,...u.relationTypes||[]].find((0,w.propEq)("uri",t)),d=e=>!(null!=n&&n.find((0,w.propEq)("uri",e.uri))),m=(0,w.pipe)((0,w.propOr)([],"attributes"),(0,w.reject)((0,w.either)(c.YkG,c.Or$)),(0,w.filter)((0,w.either)(c.QZu,d)),(0,w.filter)((0,w.both)(c.Uty,(e=>(0,c.Vg3)({attributeType:e,mode:c.fO_.EDITING})))))(p);return a().createElement("div",{className:i.root},a().createElement(k.Z,{label:s().text("Attribute"),popupTitle:s().text("Add attributes"),data:m,onApply:e=>{const t=e.filter(d);t.length>0&&l([...t,...n]),e.filter(c.QZu).forEach((e=>{o({attributeType:e,parentUri:r})}))}}))}));var A=r(79935);const Z=(0,T.Z)((0,w.pick)(["readOnly"]))((e=>{let{readOnly:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["readOnly"]);return t?a().createElement(O,r):a().createElement(O,r,a().createElement(A.Z,null),a().createElement(I,null))})),j=e=>{let{value:t}=e;const r=y();return a().createElement("div",{className:r.cellValueWrapper},t)};var N=r(2002);const D=(0,b.makeStyles)((()=>({simpleAttributeWrapper:{padding:"15px"},complexAttributeWrapper:{padding:"15px","& + &":{borderTop:"1px solid rgba(0,0,0,.1)"}}})));function P(){return P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},P.apply(this,arguments)}const V=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=D();return a().createElement("div",{className:n.simpleAttributeWrapper},a().createElement(N.Z,P({attributeValues:t},r)))};var R=r(73149);function U(){return U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},U.apply(this,arguments)}const M=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=D(),l=null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:n.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(R.Z,U({attributeValue:e},r)))));return a().createElement(a().Fragment,null,l)};var W=r(49402);function H(){return H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},H.apply(this,arguments)}const L=e=>{let{attributeValues:t,crosswalksMap:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues","crosswalksMap"]);const l=D(),o=null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:l.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(W.Z,H({attributeValue:e,crosswalksMap:r},n)))));return a().createElement(a().Fragment,null,o)};var z=r(51557);function B(){return B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B.apply(this,arguments)}const F=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=D();return a().createElement(a().Fragment,null,null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:n.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(z.Z,B({attributeValue:e},r))))))};function Y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const _=(0,T.Z)((0,w.pick)(["onDelete","onPin","onIgnore","onEdit","onAdd","parentUri","readOnly","emptyTempAttributeUris"]))((e=>{let{value:t,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,emptyTempAttributeUris:s,parentUri:u,readOnly:p}=e;return class{static build(e,t){switch(e){case c.oS0.TYPE_NESTED:return a().createElement(M,t);case c.oS0.TYPE_REFERENCE:return a().createElement(L,t);case c.oS0.TYPE_IMAGE:return a().createElement(F,t);default:return a().createElement(V,t)}}}.build(t.attributeType.type,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Y(e,t,r[t])}))}return e}({},t,{parentUri:u,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,emptyTempAttributeUris:s,disableEdit:p,disableDelete:p}))}));var G=r(89323),q=r(45226),X=r(14699);const $=e=>{let{value:{values:t,attributeType:r},someRowIsDragging:n,dragRef:l}=e;const o=y();return a().createElement("div",{className:o.cellValueWrapper},a().createElement("div",{ref:l,className:o.dragIndicator},a().createElement(G.Z,{className:o.dragIndicatorIcon})),a().createElement(X.Z,{className:o.attributeTitle,label:r.label}),!n&&a().createElement(q.Z,{values:t,attributeType:r,valueContainerClassName:o.ovValue}))},Q=e=>{let{value:t}=e;const r=y();return a().createElement("div",{className:o()(r.cellValueWrapper,r.count)},t)};var J=r(87037),K=r(81774),ee=r(35488),te=r(82056),re=r(47019),ne=r(79312),ae=r(92679),le=r(69208),oe=r(39475),ie=r(21210);const se=e=>{let{sourcesUriOrder:t,metadata:r}=e;const n=y();return a().createElement(a().Fragment,null,t.map((e=>a().createElement(ee.ZP,{key:e,className:n.popupItem},a().createElement(ie.Z,{className:n.sourceIcon,sourceType:e}),a().createElement(te.Z,{primary:(0,c.tH7)(r,e),primaryTypographyProps:{variant:"body2"}})))))},ce=e=>{let{attributeUri:t,metadata:r}=e;const n=y(),l=(0,c.zeJ)(r,t);return a().createElement(ee.ZP,{key:l.uri,className:n.popupItem},a().createElement(te.Z,{primary:(0,c.idV)(l.label),primaryTypographyProps:{variant:"body2"}}))},ue=(0,w.cond)([[(0,w.prop)("sourcesUriOrder"),()=>s().text("Source sequence")],[(0,w.prop)("primaryAttributeUri"),()=>s().text("Attribute winner")],[(0,w.prop)("comparisonAttributeUri"),()=>s().text("Comparison attribute")]]),pe=(0,w.cond)([[(0,w.prop)("sourcesUriOrder"),(e,t)=>{let{sourcesUriOrder:r}=e;return a().createElement(se,{metadata:t,sourcesUriOrder:r})}],[(0,w.prop)("primaryAttributeUri"),(e,t)=>{let{primaryAttributeUri:r}=e;return a().createElement(ce,{metadata:t,attributeUri:r})}],[(0,w.prop)("comparisonAttributeUri"),(e,t)=>{let{comparisonAttributeUri:r}=e;return a().createElement(ce,{metadata:t,attributeUri:r})}]]),de=e=>{let{info:t}=e;const r=y(),[l,o]=(0,n.useState)(null),i=(0,C.AH)(),c=()=>o(null);return a().createElement(a().Fragment,null,a().createElement(oe.k,{icon:le.Z,tooltipTitle:s().text("View details"),size:"XS",onClick:e=>o(e.currentTarget)}),a().createElement(re.ZP,{classes:{paper:r.rulePopup},open:!!l,anchorEl:l,onClose:c,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},a().createElement("div",{className:r.popupTitleWrapper},a().createElement(J.Z,{className:r.closeButton,onClick:c,size:"large"},a().createElement(ae.default,null)),a().createElement(ne.Z,{variant:"subtitle1",className:r.popupTitle},ue(t))),a().createElement(K.Z,{component:"div",className:r.popupItemsWrapper},pe(t,i))))},me=e=>{let{value:{ruleType:t,sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}=e;const i=y(),s=r||n||l;return a().createElement("div",{className:o()(i.cellValueWrapper,i.ruleType)},a().createElement("div",{className:i.ruleTypeLabel},t.label),s&&a().createElement(de,{info:{sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}))};var be=r(23759),ye=r(26752);const fe=e=>{let{crosswalk:t}=e;const r=y(),n=(0,C.AH)(),{isDimmed:l,highlightCrosswalk:o,removeHighlight:i}=(0,be.pu)(t);return a().createElement(ye.Z,{className:r.winnerSourceItem,color:l?"rgba(0, 0, 0, 0.12)":(0,c.CJp)((0,c.uKF)(t)),opacity:l?.38:1,onMouseEnter:()=>o(),onMouseLeave:()=>i()},a().createElement(ie.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(te.Z,{primary:(0,c.tH7)(n,t.type),primaryTypographyProps:{variant:"body2"},classes:{primary:r.winnerSourceItemLabel}}))},ge=e=>{let{value:{crosswalks:t}}=e;const r=y();return a().createElement(K.Z,{component:"div"},t.map((e=>a().createElement(ee.ZP,{key:e.uri,className:r.winnerSourceItemWrapper},a().createElement(fe,{crosswalk:e})))))},ve=[{id:"ovValues",get label(){return s().text("Attributes & OV")},hideable:!1,initialWidth:360,minWidth:250},{id:"winnerSources",get label(){return s().text("Winner source systems")},initialWidth:220},{id:"ruleType",get label(){return s().text("Rule type")},initialWidth:200},{id:"count",get label(){return s().text("Count")},initialWidth:80,minWidth:80},{id:"values",get label(){return s().text("Attribute values")},hideable:!1}],he=e=>(0,c.OXP)(e)&&!(0,c.ZiX)(e.uri),Ee=["ovValues","ruleType","values"],we=e=>{switch(e){case"ovValues":return $;case"values":return _;case"count":return Q;case"ruleType":return me;case"winnerSources":return ge;default:return j}},xe=(0,w.pipe)(c.cwx,(0,w.sortWith)([(0,w.descend)((0,w.propOr)(-1,"priority"))]),(0,w.map)((0,w.prop)("uri"))),Oe=(0,w.curry)(((e,t)=>(0,c.YkG)(e)&&t&&(0,w.pipe)(c.c31,(0,w.find)((r=>r.slice((0,c.u5q)(r).length)===t.slice(e.uri.length))))(e)||t)),ke=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return(0,w.pipe)((0,w.filter)(he),(0,w.chain)((e=>(0,w.pipe)((0,w.pickBy)(((t,r)=>{const n=(0,c.sOy)(r,e.uri),a=n?r.slice(e.uri.length+1):"",l=a&&(0,c.IM5)(e.value,a);return n&&(!l||he(l))})),w.values,w.flatten)(t))),(0,w.uniqBy)((0,w.prop)("uri")))(e)},Te=(0,w.map)((e=>{let{id:t,label:r,initialWidth:n,minWidth:a}=e;return{id:t,label:r,initialWidth:n,minWidth:a,autoResize:!n,resizable:!0,sortable:!1,headCellRenderer:"ovValues"===t?Z:O,rowCellValueRenderer:we(t)}})),Ce=(e,t,r,n,a,l,o)=>{switch(e){case"ovValues":return{attributeType:n,values:null==l?void 0:l.filter(he)};case"values":return{attributeType:n,attributeValues:l,crosswalksMap:a};case"count":return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;switch(e){case c.oS0.TYPE_REFERENCE:case c.oS0.TYPE_NESTED:case c.oS0.TYPE_IMAGE:return t.length;default:return t.reduce(((e,t)=>e+(0,w.pathOr)(0,[t.uri,"length"],r)),0)}}(n.type,l,a);case"ruleType":return((e,t,r,n)=>{var a,l;const o=[...e.entityTypes,...e.relationTypes||[]].find((0,w.propEq)("uri",r)),i=null!==(a=null==o?void 0:o.survivorshipGroups)&&void 0!==a?a:[],s=n&&i.find((0,w.propEq)("uri",n))||i.find((0,w.propEq)("default",!0)),u=null==s||null===(l=s.mapping)||void 0===l?void 0:l.find((0,w.propEq)("attribute",t.uri)),p=(0,c.o_J)(e,null==u?void 0:u.survivorshipStrategy)||(0,c.Xaq)(e),d=(e=>"configuration/survivorshipStrategies/SRC_SYS"===(null==e?void 0:e.uri))(p)?(0,w.uniq)([...(null==u?void 0:u.sourcesUriOrder)||[],...(null==s?void 0:s.sourcesUriOrder)||[],...xe(e)]):void 0,m=Oe(t),b=(e=>"configuration/survivorshipStrategies/OtherAttributeWinnerCrosswalk"===(null==e?void 0:e.uri))(p)?m(null==u?void 0:u.primaryAttributeUri):void 0,y=(0,c.YkM)(t)&&(e=>"configuration/survivorshipStrategies/MinValue"===(null==e?void 0:e.uri)||"configuration/survivorshipStrategies/MaxValue"===(null==e?void 0:e.uri))(p)?m(null==u?void 0:u.comparisonAttributeUri):void 0;return{ruleType:p,sourcesUriOrder:d,primaryAttributeUri:b,comparisonAttributeUri:y}})(t,n,r,o);case"winnerSources":return{crosswalks:ke(l,a)};default:return null}};var Se=r(87378),Ie=r(94059),Ae=r(38677),Ze=r(69089),je=r(79811),Ne=r(290),De=r(75779),Pe=r(63297),Ve=r(96758),Re=r(30721),Ue=r(73074),Me=r(50553),We=r(79573);const He=e=>{let{open:t,onClose:r,onConfirmEditWithoutIgnore:l,onConfirmEditWithIgnore:o}=e;const[i,c]=(0,n.useState)("without");return a().createElement(Ze.Z,{open:t,TransitionProps:{onEnter:()=>c("without")}},a().createElement(Ne.Z,null,a().createElement(De.Z,null,s().text("You are attempting to change a value that is presently ignored.")),a().createElement(Ue.Z,{variant:"standard",component:"fieldset"},a().createElement(Me.Z,{component:"legend"},s().text("Please choose an option:")),a().createElement(Ve.Z,{value:i,onChange:(0,w.pipe)(We.NA,c)},a().createElement(Re.Z,{value:"without",control:a().createElement(Pe.Z,null),label:s().text("Save without Ignore")}),a().createElement(Re.Z,{value:"with",control:a().createElement(Pe.Z,null),label:s().text("Save and apply Ignore to new value")})))),a().createElement(je.Z,null,a().createElement(Ae.Z,{onClick:r,color:"primary"},s().text("Cancel")),a().createElement(Ae.Z,{onClick:()=>{"with"===i?o():l(),r()},color:"primary"},s().text("Ok"))))},Le=(0,b.makeStyles)({tableContainer:{height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},tableHeader:{display:"flex",flexDirection:"row"},tableTitle:{marginRight:"auto"},tableContent:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",position:"relative"}});function ze(){return ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ze.apply(this,arguments)}const Be=e=>e.ovValues.attributeType.uri,Fe=e=>{let{columnData:{id:t},cellIndex:r,rowValue:n}=e;return`${t}[${Be(n)}][${r}]`},Ye=(0,n.memo)((e=>{let{entity:t,isLoading:r,crosswalksMap:l,visibleColumns:i=Ee,onChangeVisibleColumns:b,readOnly:y,onDelete:f=We.ZT,onPin:g=We.ZT,onIgnore:v=We.ZT,onEdit:h=We.ZT,onAdd:x=We.ZT,emptyTempAttributeUris:O,selectedAttributeTypes:k,onSelectAttributeTypes:T=We.ZT,additionalHeaderItems:S,className:I,activeSurvivorshipGroupUri:A}=e;const Z=Le(),j=(0,C.AH)(),N=(0,n.useMemo)((()=>(0,w.pipe)((0,w.filter)((e=>{let{id:t}=e;return i.includes(t)})),Te)(ve)),[i]),{type:D,uri:P,attributes:V={}}=t||{};(0,n.useEffect)((()=>{if(t&&(0,w.isNil)(k)){const e=(0,w.pipe)(w.keys,(0,w.without)(["paging"]),(0,w.map)((0,c.tCm)(D)),(0,w.map)((e=>(0,c.zeJ)(j,e,D))),(0,w.filter)((0,w.both)(w.identity,c.Uty)))(V);T(e)}}),[t,k]);const R=(0,n.useMemo)((()=>D?function(e,t){let r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,l=arguments.length>6?arguments[6]:void 0;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).map((o=>{const i=(0,c.nIW)(o.uri),s=a[i],u=(0,c.YkG)(o)?n.relation:n.entity;return(0,w.pipe)((0,w.reduce)(((r,n)=>(0,w.assoc)(n,Ce(n,e,t,o,u,s,l),r)),{}),(0,w.assoc)("rawValue",s))(r)}))}(j,D,k,i,l,V,A):[]),[j,D,k,i,V,l,A]),{getDynamicRowCellHeight:U,changeRowCellHeight:M}=(0,u.Z)(Fe),W=(0,n.useCallback)((e=>a().createElement(E,ze({changeRowCellHeight:M},e))),[M]),H=(0,n.useCallback)((0,w.either)(U,(0,w.always)(68)),[U]),[L,z]=(0,n.useState)(null),[B,F]=(0,n.useState)(null),Y=(0,n.useCallback)((e=>{e.attributeValue.ignored?F(e):h(e)}),[h,F]),_=(0,n.useCallback)(((e,t)=>{T((0,w.move)(e,t,k))}),[T,k]),G=(0,n.useCallback)(L?()=>f(L):We.ZT,[L,f]),q=(0,n.useMemo)((()=>({onDelete:z,onPin:g,onIgnore:v,onEdit:Y,onAdd:x,parentUri:P,parentTypeUri:D,selectedAttributeTypes:k,onSelectAttributeTypes:T,emptyTempAttributeUris:O,readOnly:y})),[z,g,v,Y,x,P,D,k,T,O,y]);return a().createElement("div",{className:o()(Z.tableContainer,I)},a().createElement(m.Z,{classes:{root:Z.tableHeader,title:Z.tableTitle},title:s().text("Sources")},S,a().createElement(p.Z,{columnsData:ve,selectedColumns:i,onChangeColumns:b})),a().createElement("div",{className:Z.tableContent},r&&a().createElement(Se.Z,null),a().createElement(d.Z,{fixFirstColumn:!0,headRowHeight:48,defaultColumnWidth:250,defaultColumnMinWidth:200,columnsData:N,dndRowReorderingEnabled:!1,dndRowReorderingHandler:_,getIdFromRowValue:Be,rowsData:R,renderRowCell:W,getRowCellHeight:H,context:q})),a().createElement(Ie.Z,{open:!!L,onClose:()=>z(null),onConfirm:G}),a().createElement(He,{open:!!B,onClose:()=>F(null),onConfirmEditWithIgnore:()=>h(B),onConfirmEditWithoutIgnore:()=>{v({attributeValue:B.attributeValue}),h(B)}}))}))},26752:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(24328),a=r.n(n),l=r(2507),o=r.n(l),i=r(71153),s=r.n(i),c=r(42503),u=r(23883);function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const d=(0,r(72342).makeStyles)({item:e=>{let{color:t,opacity:r,variant:n}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){p(e,t,r[t])}))}return e}({},"standart"===n&&{backgroundColor:t,paddingRight:"29px"},"disabled"===n&&{border:`${t} solid 2px`},{opacity:r,filter:r&&1!==r?"saturate(20%)":null,transition:"opacity 0.3s",boxSizing:"border-box"})},endDatedCrosswalkIcon:{margin:"0 4px",width:"20px",height:"20px",color:"#ff1744"}});function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}const b=(0,n.forwardRef)(((e,t)=>{let{color:r,opacity:n,variant:l="standart",children:i,className:p}=e,b=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["color","opacity","variant","children","className"]);const y=d({color:r,opacity:n,variant:l});return a().createElement("div",m({ref:t,"data-reltio-id":"cw-colored-block",className:s()(y.item,p)},b),i,"disabled"===l&&a().createElement(u.Z,{title:o().text("End-dated crosswalk")},a().createElement(c.Z,{className:y.endDatedCrosswalkIcon})))}))},60925:(e,t,r)=>{r.d(t,{Z:()=>N});var n=r(24328),a=r.n(n),l=r(50914),o=r(2507),i=r.n(o),s=r(95038),c=r.n(s),u=r(31421),p=r(79312),d=r(6163),m=r(94059),b=r(67283),y=r(90590),f=r(39475),g=r(21210),v=r(40154),h=r(40435);function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(this,arguments)}const w=e=>a().createElement("svg",E({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M20.222 6C21.21 6 22 6.8 22 7.778v12.444C22 21.2 21.209 22 20.222 22H7.778C6.79 22 6 21.2 6 20.222V7.778C6 6.8 6.791 6 7.778 6h12.444zM20 8H8v12h12V8zM4 18H2V4c0-1.1.9-2 2-2h14v2H4v14z",id:"Copy_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Copy_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Copy_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#Copy_svg__b)",d:"M0 0h24v24H0z"})));var x=r(72342);const O=(0,x.makeStyles)((()=>({root:{display:"flex",justifyContent:"space-between",alignItems:"center",overflowWrap:"anywhere"},text:{fontSize:13},button:{flexShrink:0,marginLeft:8,padding:0,textTransform:"none"}}))),k=e=>{let{value:t}=e;const r=O();return a().createElement("div",{className:r.root},a().createElement(p.Z,{className:r.text,variant:"body2"},t),a().createElement(h.Z,{size:"XXS",icon:w,color:"primary",className:r.button,onClick:()=>navigator.clipboard.writeText(t)}))};var T=r(71153),C=r.n(T),S=r(91785);const I=(0,x.makeStyles)((()=>({timestampEditorInput:{paddingTop:15,paddingBottom:15,fontSize:13},timestampEditor:{height:38}}))),A=e=>{let{value:t,classes:r={},disabled:l=!1,onChange:o}=e;const i=I(),[s,c]=(0,n.useState)(t);(0,n.useEffect)((()=>{c(t)}),[t]);const u=(0,n.useCallback)((()=>{const e=null==s?void 0:s.valueOf();t!==e&&o(e)}),[o,s,t]);return a().createElement(S.Z,{slotProps:{textField:{variant:"filled",InputProps:{disableUnderline:!0,classes:{input:i.timestampEditorInput,root:C()(i.timestampEditor,r.root)},onBlur:u}}},value:s||null,disabled:l,onChange:c,onClose:u})};var Z=r(14596);const j=(0,x.makeStyles)((e=>({text:{fontSize:13},attributeWrapper:{display:"flex",alignItems:"center",paddingTop:5,paddingBottom:5,marginLeft:12},attributeTitle:{fontSize:13,width:135,color:e.palette.text.secondary},attributeValue:{paddingLeft:10,display:"flex",alignItems:"center",flexGrow:1},input:{paddingTop:14,paddingBottom:14,fontSize:13},editor:{flexGrow:1},moreButton:{marginLeft:24},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"}}))),N=e=>{let{crosswalk:t,canEditAttribute:r=!0,onEditAttribute:o,onDeleteAttribute:s}=e;const h=j(),[E,w]=(0,n.useState)([]),[x,O]=(0,n.useState)(null),T=(0,Z.AH)(),C=!("uri"in t),S=(0,n.useMemo)((()=>[{label:u.G39.sourceSystems.label,uri:"type"},{label:u.G39.value.label,uri:"value"},{label:u.G39.sourceTable.label,uri:"sourceTable",canBeAdded:C,canBeDeleted:C},{label:u.G39.createDate.label,uri:"createDate"},{label:u.G39.updateDate.label,uri:"updateDate"},{label:u.G39.deleteDate.label,uri:"deleteDate",canBeAdded:!0,canBeDeleted:!0},{label:u.G39.reltioLoadDate.label,uri:"reltioLoadDate"},{label:u.G39.publishDate.label,uri:"sourcePublishDate"}]),[]),I=(0,l.pipe)((0,l.filter)((0,l.propEq)("canBeAdded",!0)),(0,l.filter)((e=>!(0,l.has)(e.uri,t))),(0,l.filter)((e=>!E.includes(e.uri))))(S);return a().createElement(a().Fragment,null,I.length>0&&r&&a().createElement(b.Z,{label:i().text("Add attributes"),onApply:e=>{e.length>0&&w((t=>t.concat((0,l.map)((0,l.prop)("uri"),e))))},data:I}),S.map((e=>e.uri in t||E.includes(e.uri)?a().createElement("div",{key:e.uri,className:h.attributeWrapper},a().createElement(p.Z,{variant:"body2",className:h.attributeTitle},`${e.label}:`),a().createElement("div",{className:h.attributeValue},((e,t)=>{switch(e){case"type":{const r=(0,u.tH7)(T,t);return C?a().createElement(y.Z,{label:"",placeholder:t,className:h.editor,value:{value:t,label:r},options:(0,u.cwx)(T).sort((0,l.ascend)((0,l.prop)("label"))).map((e=>{let{uri:t,label:r}=e;return{value:t,label:r}})),onChange:t=>{let{value:r}=t;return o(e,r)},TextFieldProps:{InputProps:{disableUnderline:!0}}}):a().createElement(a().Fragment,null,a().createElement(g.Z,{className:h.sourceIcon,sourceType:t}),a().createElement(p.Z,{className:h.text,variant:"body2"},r))}case"sourceTable":return C?a().createElement(v.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:h.editor},required:!0,variant:"filled",value:t,onInput:t=>o(e,t.target.value),size:"small",InputProps:{disableUnderline:!0,classes:{input:h.input}}}):a().createElement(p.Z,{className:h.text,variant:"body2"},t);case"value":return C?a().createElement(v.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:h.editor},required:!0,variant:"filled",value:t,onInput:t=>o(e,t.target.value),size:"small",InputProps:{disableUnderline:!0,classes:{input:h.input}}}):a().createElement(k,{value:t});case"deleteDate":return a().createElement(A,{value:t&&c().utc((0,u.ZBU)(t)).valueOf(),onChange:t=>o(e,null==t?void 0:t.toString()),classes:{root:h.editor},disabled:!r});case"sourcePublishDate":case"createDate":case"updateDate":case"reltioLoadDate":return a().createElement(p.Z,{className:h.text,variant:"body2"},(0,u.o0x)(t));default:return null}})(e.uri,t[e.uri]),e.canBeDeleted&&a().createElement(f.k,{icon:d.Z,disabled:!r,onClick:()=>O(e.uri),size:"XS",tooltipTitle:i().text("Delete attribute"),showForDisabled:!0}))):null)),a().createElement(m.Z,{open:!!x,onClose:()=>O(null),onConfirm:()=>{return e=x,w((t=>(0,l.without)([e],t))),void((0,l.isNil)(t[e])||s(e));var e}}))}},10938:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(24328),a=r.n(n),l=r(13896),o=r(31421),i=r(79312),s=r(26752),c=r(23759),u=r(21210),p=r(14596);const d=(0,r(72342).makeStyles)({dragLayer:{position:"fixed",top:0,left:0,width:"100%",height:"100%",overflow:"hidden",zIndex:1300,pointerEvents:"none"},crosswalkPreview:{height:"28px",maxWidth:"394px",display:"flex",overflow:"hidden",padding:"6px",alignItems:"center",boxSizing:"border-box"},sourceLabel:{fontSize:"13px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},sourceIcon:{width:"16px",height:"16px",marginRight:"9px"}}),m=e=>{let{crosswalk:t}=e;const r=d(),n=(0,p.AH)(),l=(0,c.nX)(t),m=(0,o.tH7)(n,t.type);return a().createElement(s.Z,{color:l,className:r.crosswalkPreview},a().createElement(u.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(i.Z,{className:r.sourceLabel,variant:"body2"},m))},b=(0,n.memo)((()=>{var e;const t=d(),{isDragging:r,clientOffset:o,item:i}=(0,l.useDragLayer)((e=>({isDragging:e.isDragging(),clientOffset:e.getClientOffset(),item:e.getItem()}))),s=(0,n.useRef)(),c=(null===(e=s.current)||void 0===e?void 0:e.getBoundingClientRect())||{x:0,y:0},u=`translate(${(null==o?void 0:o.x)-(null==c?void 0:c.x)}px, ${(null==o?void 0:o.y)-(null==c?void 0:c.y)}px`;return r&&a().createElement("div",{ref:s,className:t.dragLayer},a().createElement("div",{style:{display:"flex",transform:u,WebkitTransform:u}},"Crosswalk"===i.type&&a().createElement(m,{crosswalk:i.crosswalk})))}))},89468:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(2507),o=r.n(l),i=r(38677),s=r(79312),c=r(60925),u=r(50914);const p=(0,r(72342).makeStyles)({caption:{paddingLeft:15,paddingTop:16,paddingBottom:8},controlButtons:{display:"flex",justifyContent:"flex-end",paddingBottom:10,paddingTop:20},cancelButton:{marginRight:20}}),d=e=>{let{className:t,onAdd:r,onClose:l}=e;const d=p(),[m,b]=(0,n.useState)({type:"",value:""});return a().createElement("div",{className:t},a().createElement(s.Z,{variant:"body1",className:d.caption},o().text("Add crosswalk")),a().createElement(c.Z,{crosswalk:m,onDeleteAttribute:e=>{b((0,u.dissoc)(e))},onEditAttribute:(e,t)=>{b((0,u.assoc)(e,t))}}),a().createElement("div",{className:d.controlButtons},a().createElement(i.Z,{className:d.cancelButton,onClick:l},o().text("Cancel")),a().createElement(i.Z,{color:"primary",onClick:()=>{r(m),l()},disabled:!m.type||!m.value},o().text("Add"))))}},71285:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(24328),a=r.n(n),l=r(23759),o=r(34802),i=r(31421),s=r(79312),c=r(26436),u=r(21210),p=r(40435),d=r(14596),m=r(72342);const b=(0,m.makeStyles)((()=>({root:e=>{let{isOpaque:t}=e;return{display:"flex",opacity:t?1:.38,transition:"opacity 0.3s"}},wrapper:e=>{let{isOpaque:t}=e;return{width:"100%",display:"flex",alignItems:"center",height:28,filter:t?null:"saturate(0%)",backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDcvMjYvMTMEw7WpAAAAeElEQVQ4ja3VuwrAIBBE0aup0uX/v9ImCCGSdIL4WF136+EwxcC6+3k/hAsxSREArvPAW2LAGFzFhqAG64JarAnuYBW4ixWgBZZBKwzAW2Ig7HAVCzHJ4AoGQsNVbAhqsC6oxZrgDlaBu1gBWmAZtMIA3MwLmMUAfmyqQ9/LD+oDAAAAAElFTkSuQmCC)"}},focusedIcon:{width:28,height:28,backgroundColor:"rgba(0, 0, 0, 0.12)",borderRadius:0,borderRight:"1px solid #fff"},sourceIcon:{height:"16px",width:"16px",marginLeft:"16px",marginRight:"9px",fontSize:"14px"}}))),y=(0,n.memo)((e=>{let{crosswalkType:t,focusable:r=!0}=e;const{isDimmed:n}=(0,l.pu)(),o=b({isOpaque:!n}),m=(0,d.AH)(),y=(0,i.tH7)(m,t);return a().createElement("div",{className:o.root},a().createElement(p.Z,{size:"XXS",className:o.focusedIcon,icon:r&&c.Z,disabled:!0}),a().createElement("div",{className:o.wrapper},a().createElement(u.Z,{className:o.sourceIcon,sourceType:t}),a().createElement(s.Z,{variant:"body2"},y)))}));var f=r(2507),g=r.n(f),v=r(13896),h=r(42484),E=r(6163),w=r(85777),x=r(40007),O=r(26752),k=r(94059),T=r(39475),C=r(79935),S=r(19540),I=r(60925);const A=(0,m.makeStyles)({root:e=>{let{isOpaque:t}=e;return{display:"flex",opacity:t?1:.19,transition:"opacity 0.3s"}},header:{width:"100%",display:"flex",alignItems:"center",height:"28px"},focusedIcon:e=>{let{isFocused:t}=e;return{width:"26px","&:not([disabled])":{border:"1px solid rgba(0, 0, 0, 0.12)"},height:"28px",color:t?"#000":"rgba(0, 0, 0, 0.54)",borderRadius:0,margin:"0px 1px"}},crosswalkWrapper:{width:"100%",overflow:"hidden"},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"},attributesWrapper:e=>{let{color:t}=e;return{border:"1px solid",borderColor:t,position:"relative"}},deleteCrosswalkButton:{position:"absolute",top:5,right:5},labelValue:{marginLeft:5},dependentIcon:{width:"16px",height:"16px",fillOpacity:.38}}),Z=(0,n.memo)((e=>{let{crosswalk:t,isDependent:r,isEmpty:o=!1,isColored:p=!0,focusable:m=!0,disableEdit:b,disableDelete:y,onDelete:f,onEdit:Z}=e;const j=(0,n.useRef)(null),[N,D]=(0,n.useState)(!1),[P,V]=(0,n.useState)(!1),R=(0,d.AH)(),U=(0,l.nX)(t),{toggleCrosswalkFocus:M,isFocused:W}=(0,l.BF)(t),{isDimmed:H,highlightCrosswalk:L,removeHighlight:z}=(0,l.pu)(t),[B]=(0,l.RT)(),F=o?"#FFF":p?H?"rgba(0, 0, 0, 0.12)":U:"#CACCD1",Y=(0,i.tH7)(R,t.type),_=(0,i.nIW)(t.uri),G=(0,i.x_)(t),q=A({color:F,isOpaque:!H,isFocused:W}),[,X,$]=(0,v.useDrag)({item:{type:"Crosswalk",crosswalk:t},canDrag:!G}),Q=!G&&"relation"!==t.ownerType;return(0,n.useEffect)((()=>{$((0,h.r)(),{captureDraggingState:!0})}),[]),(0,n.useEffect)((()=>{var e;m&&B&&(0,i.aFF)(B,t)&&B!==t&&(null==j||null===(e=j.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}))}),[B]),a().createElement("div",{className:q.root,ref:j},a().createElement(T.k,{size:"XXS",className:q.focusedIcon,icon:m&&c.Z,onClick:()=>M(),disabled:!m,tooltipTitle:m&&g().text("Focus")}),a().createElement("div",{className:q.crosswalkWrapper},a().createElement(O.Z,{ref:X,className:q.header,color:F,variant:G?"disabled":"standart",onMouseEnter:()=>L(),onMouseLeave:()=>z()},r&&a().createElement(S.Z,{className:q.dependentIcon}),a().createElement(w.Z,{onClick:()=>D((e=>!e)),expanded:N}),a().createElement(u.Z,{className:q.sourceIcon,sourceType:t.type}),a().createElement(x.Z,{value:Y},a().createElement(s.Z,{variant:"body2",noWrap:!0},Y)),a().createElement(C.Z,null),a().createElement(x.Z,{value:t.value},a().createElement(s.Z,{variant:"body2",className:q.labelValue,noWrap:!0},t.value))),N&&a().createElement("div",{className:q.attributesWrapper},Q&&a().createElement("div",{className:q.deleteCrosswalkButton},a().createElement(T.k,{icon:E.Z,disabled:y,onClick:()=>V(!0),size:"XS",tooltipTitle:y?g().text("You don't have permissions to delete"):g().text("Delete crosswalk"),showForDisabled:!0}),a().createElement(k.Z,{open:P,onConfirm:()=>{W&&M(),f(_)},onClose:()=>V(!1)})),a().createElement(I.Z,{crosswalk:t,canEditAttribute:!b,onEditAttribute:(e,t)=>{Z({crosswalkId:_,attributeName:e,value:t})},onDeleteAttribute:e=>{Z({crosswalkId:_,attributeName:e})}}))))}));var j=r(55485);const N=(0,m.makeStyles)((()=>({root:{display:"flex",alignItems:"center",height:"28px",paddingLeft:"37px"}}))),D=e=>{let{showMore:t,onClick:r}=e;const n=N();return a().createElement(j.Z,{className:n.root,component:"button",variant:"caption",underline:"none",onClick:r},a().createElement("span",null,t?g().text("View dependent crosswalks"):g().text("Hide dependent crosswalks")))},P=e=>{let{source:t,crosswalksByTypes:r,showCrosswalkColors:s=!0,crosswalksFocusEnabled:c=!0,expanded:u,disableEditCrosswalk:p,disableDeleteCrosswalk:d,onEdit:m,onDelete:b,onToggleExpanded:f}=e;const g=(0,l.RT)();return(0,n.useEffect)((()=>{!u&&c&&r[o.Y.Dependent].some((e=>g.some((0,i.aFF)(e))))&&f()}),[g]),a().createElement(a().Fragment,null,0===r[o.Y.Simple].length&&0===r[o.Y.Empty].length&&a().createElement(y,{crosswalkType:t,focusable:c}),r[o.Y.Simple].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,focusable:c,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,isColored:s}))),r[o.Y.Empty].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,focusable:c,isEmpty:!0,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,isColored:s}))),u&&r[o.Y.Dependent].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,isDependent:!0,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,focusable:c,isColored:s}))),r[o.Y.Dependent].length>0&&a().createElement(D,{showMore:!u,onClick:()=>f()}))}},73972:(e,t,r)=>{r.d(t,{P:()=>i});var n=r(24328),a=r(50914),l=r(31421),o=r(79573);const i=e=>{let{onLoad:t=o.ZT,onSuccess:r=o.ZT,onError:i=o.ZT}=e;const s=(0,n.useCallback)((e=>{t(),e.then((e=>{let{errors:t}=e;if(t)throw t;r()})).catch(i)}),[t,i,r]);return{addCrosswalk:(0,n.useCallback)((e=>{let{entity:t,contributorCrosswalk:r,crosswalk:n}=e;const o=r?(0,l.psB)({entityTypeUri:t.type,contributorCrosswalkType:r.type,contributorCrosswalkValue:r.value,contributorCrosswalkSourceTable:r.sourceTable,crosswalkType:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,crosswalkDeleteDate:n.deleteDate}):(0,l.kRE)({entityUri:t.uri,crosswalk:n});(0,a.pipe)((0,a.andThen)((e=>{let[t]=e;return t})),s)(o)}),[s]),editCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:o}=e;(0,a.pipe)((0,a.ifElse)((e=>{let{value:t}=e;return(0,a.isNil)(t)}),l.K$w,l.WVU),(0,a.andThen)((e=>{let[t]=e;return t})),s)({entityUri:t,crosswalkId:r,attributeName:n,value:o})}),[s]),deleteCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r}=e;(0,a.pipe)(l.Gmt,s)({entityUri:t,crosswalkId:r})}),[s])}}},82658:(e,t,r)=>{r.d(t,{Q:()=>u});var n=r(24328),a=r(31421),l=r(50914),o=r(79573);function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){s(e,t,r[t])}))}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const c=[],u=e=>{let{entity:t,onLoad:r=o.ZT,onModify:s=o.ZT,onError:u=o.ZT}=e;const[p,d]=(0,n.useState)(null),[m,b]=(0,n.useState)([]),[y,f]=(0,n.useState)(null),g=(0,n.useRef)([]),v=(0,n.useRef)(null),h=(0,n.useCallback)((()=>{v.current=null}),[]),[E,w]=(0,n.useState)(c),x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce(((e,t)=>((0,a.sJj)(t).forEach((r=>{e[r]=[...e[r]||[],t]})),e)),{})};(0,n.useEffect)((()=>{const e={entity:x(null==t?void 0:t.crosswalks),relation:(0,l.pipe)(a.PUO,x)(t)};if((null==p?void 0:p.uri)===(null==t?void 0:t.uri)&&v.current){const{ownerType:t}=v.current,r=Object.keys(e[t]),n=Object.keys(y[t]);w((0,l.difference)(r,n)),b([])}else w(c);h(),d(t),f(e),g.current=[]}),[t]);const O=(0,n.useCallback)((0,l.pipe)(u,h),[u,h]),{deleteAttribute:k,ignoreAttribute:T,pinAttribute:C,createAttribute:S,updateAttribute:I}=(e=>{let{onSuccess:t=o.ZT,onError:r=o.ZT,onLoad:i=o.ZT}=e;const s=(0,n.useCallback)((e=>{i(),e.then((()=>{t()})).catch(r)}),[r,t,i]),c=(0,n.useCallback)((e=>e.then((e=>{if("error"in e)throw e.error;return e}))),[]);return{deleteAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,attributeType:r,crosswalks:n}=e;const o=(0,a.YkG)(r)?(0,l.pipe)(a.o96,(0,l.prop)("objectURI"),a.VGk,c)(t):Promise.all((n||[]).map((e=>{let{type:r,value:n,sourceTable:l}=e;return c((0,a.xZs)({attributeUri:t.uri,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:l}))})));s(o)}),[s,c]),pinAttribute:(0,n.useCallback)((e=>{let{attributeValue:t}=e;(0,l.pipe)(a.xkv,c,s)({attributeUri:t.uri,value:!t.pin})}),[s,c]),ignoreAttribute:(0,n.useCallback)((e=>{let{attributeValue:t}=e;(0,l.pipe)(a.P8_,c,s)({attributeUri:t.uri,value:!t.ignored})}),[s,c]),updateAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,attributeType:r,crosswalk:n}=e;(0,a.YkM)(r)||(0,a.Or$)(r)||(0,l.pipe)(a.tCj,c,s)({attributeUri:t.uri,sourceUri:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,value:(0,a.CwH)(r)?t.lookupCode:t.value})}),[s,c]),createAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,crosswalk:r}=e;(0,l.pipe)(a.JV_,(0,l.andThen)((e=>{let[{errors:t}]=e;if(t)throw t})),s)({attributeUri:t.uri,sourceUri:r.type,crosswalkValue:r.value,crosswalkSourceTable:r.sourceTable,value:t.value})}),[s])}})({onLoad:r,onSuccess:s,onError:O}),A=(0,n.useCallback)((e=>{let{attributeType:t,parentUri:r,crosswalk:n,index:o}=e;const s=(0,a.gjI)({parentUri:r,attributeType:t}),{uri:c}=s;if(n){const{ownerType:e}=n;f((t=>i({},t,{[e]:i({},t[e],{[c]:[n]})})))}d((e=>{var n;return(0,l.isNil)(o)&&(o=null===(n=(0,a.JQy)(e,r,t.name))||void 0===n?void 0:n.length),(0,a.wLZ)({entity:e,attributeType:t,newAttribute:s,index:o})})),g.current.some((e=>(0,a.sOy)(c,e)))||g.current.push(c),m.includes(s.uri)||b((e=>[...e,s.uri]))}),[]),Z=(0,n.useCallback)((e=>{const{attributeValue:{uri:t},attributeType:r}=e;(0,a.ZiX)(t)?(d((e=>(0,a.d$I)({entity:e,attributeType:r,uri:t}))),f((0,l.evolve)({entity:(0,l.dissoc)(t),relation:(0,l.dissoc)(t)})),g.current=(0,l.without)([t],g.current)):k(e)}),[k]),j=(0,n.useCallback)((e=>{if((0,a.ZiX)(e.attributeValue.uri)){const{attributeValue:t,attributeType:r,crosswalk:n}=e;if(!(0,l.isNil)(t.value)){const{uri:e}=t,l=g.current.find((t=>(0,a.sOy)(e,t))),o=(0,a.ww$)({entity:p,attributeType:r,uri:e,value:(0,a.kDl)(t)});S({attributeValue:(0,a.dLR)(o,l),crosswalk:n}),v.current=n}}else I(e)}),[S,I,p]);return{modifiedEntity:p,crosswalksMap:y,onAddAttribute:A,onDeleteAttribute:Z,onPinAttribute:C,onIgnoreAttribute:T,onEditAttribute:j,newlyCreatedAttributes:E,emptyTempAttributeUris:m}}},34802:(e,t,r)=>{let n;r.d(t,{Y:()=>n}),function(e){e.Simple="simple",e.Empty="empty",e.Dependent="dependent"}(n||(n={}))},10765:(e,t,r)=>{r.d(t,{o:()=>s});var n=r(31421),a=r(50914),l=r(34802);const o=e=>e[l.Y.Simple].length>0?1:e[l.Y.Dependent].length>0?e[l.Y.Empty].length>0?2:3:4,i=(0,a.evolve)({[l.Y.Dependent]:(0,a.sort)(((e,t)=>{const r=e.sourceTable||"",n=t.sourceTable||"";return r===n?0:r?n?r<n?-1:1:-1:1}))}),s=(0,a.curry)(((e,t,r)=>{const s=(r||[]).reduce(((r,o)=>(r[o.type]||(r[o.type]={[l.Y.Simple]:[],[l.Y.Empty]:[],[l.Y.Dependent]:[]}),"relation"===o.ownerType?r[o.type][l.Y.Dependent].push(o):((e,t,r)=>0===(0,n.sJj)(r).filter((r=>{const l=(0,n.AFK)(r,e);return t.some((0,a.propEq)("uri",l))})).length)(e,t,o)?r[o.type][l.Y.Empty].push(o):((e,t,r)=>!(0,n.sJj)(r).some((r=>{const l=(0,n.AFK)(r,e),o=t.find((0,a.propEq)("uri",l));return o&&!(0,n.YkM)(o)})))(e,t,o)?r[o.type][l.Y.Dependent].push(o):r[o.type][l.Y.Simple].push(o),r)),{});return Object.keys(s).sort(((e,t)=>o(s[e])-o(s[t])||(e<t?-1:1))).map((e=>({source:e,crosswalksByTypes:i(s[e])})))}))},38361:(e,t,r)=>{r.d(t,{R:()=>i,Q:()=>s});var n=r(24328),a=r.n(n),l=r(31421);const o=(0,n.createContext)(null),i=e=>{let{children:t,attributeUris:r}=e;return a().createElement(o.Provider,{value:r},t)},s=e=>((0,n.useContext)(o)||[]).some((t=>(0,l.sOy)(t,e)))}}]);
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7c092ac7-cd94-4aa5-b2e1-795197ee86db",e._sentryDebugIdIdentifier="sentry-dbid-7c092ac7-cd94-4aa5-b2e1-795197ee86db")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1651"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2066],{48030:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r(50914),l=r(31421);function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){i(e,t,r[t])}))}return e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const s=e=>{let{rowIndex:t,columnData:r,cellIndex:n}=e;return`${r.id}[${t}][${n}]`},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;const[t,r]=(0,n.useState)({}),i=(0,n.useRef)({}),c=(0,n.useCallback)((0,l.DsO)((()=>r(o({},i.current)))),[]),u=(0,n.useCallback)((()=>{i.current={}}),[]),p=(0,n.useCallback)((r=>{const n=e(r);return t[n]}),[e,t]),d=(0,n.useCallback)((0,a.curry)(((t,r)=>{const n=e(t);i.current[n]!==r&&(i.current[n]=r,c())})),[c,e]);return{getDynamicRowCellHeight:p,changeRowCellHeight:d,clearHeightsCache:u}}},96253:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(24328),a=r.n(n),l=r(44443),o=r(55962);const i=e=>{let{onChangeHeight:t,children:r}=e,i=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["onChangeHeight","children"]);const s=(0,n.useRef)(),{rowValue:c,rowIndex:u,columnData:p,cellIndex:d}=i,m=t({rowIndex:u,cellIndex:d,columnData:p,rowValue:c}),b=()=>s.current&&m(s.current.clientHeight);return(0,o.D)(b,[c.rawValue]),a().createElement("div",{ref:s},a().createElement(l.Z,{handleHeight:!0,onResize:b}),r)}},94059:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(2507),o=r.n(l),i=r(38677),s=r(69089),c=r(79811),u=r(290),p=r(75779);const d=e=>{let{open:t,onClose:r,onConfirm:n}=e;return a().createElement(s.Z,{open:t},a().createElement(u.Z,null,a().createElement(p.Z,null,o().text("Are you sure you want to delete this?"))),a().createElement(c.Z,null,a().createElement(i.Z,{onClick:r,color:"primary"},o().text("No")),a().createElement(i.Z,{onClick:()=>{n(),r()},color:"primary"},o().text("Yes"))))}},90143:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(23883);const o=(0,r(72342).makeStyles)((e=>({tooltip:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,filter:"drop-shadow(0px 1px 5px #00000033) drop-shadow(0px 3px 1px #0000001F) drop-shadow(0px 2px 2px #00000024)",padding:"10px",maxWidth:"none"},arrow:{color:e.palette.background.paper}})));function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}const s=e=>{const t=o();return a().createElement(l.Z,i({},e,{classes:t,arrow:!0}))}},67275:(e,t,r)=>{r.d(t,{n:()=>f});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(31421),s=r(79386),c=r(76368),u=r(72316),p=r(1824),d=r(62901),m=r(36852),b=r(75647);const y=(0,r(72342).makeStyles)({profileBandNavigation:{marginBottom:"10px"},comments:{display:"flex",justifyContent:"flex-end"}}),f=(0,n.memo)((e=>{let{entity:t,className:r,historySlice:l}=e;const f=y(),g=(0,n.useMemo)((()=>(0,i.L5S)(t)),[t]),v=(0,m.C)({objectIds:g}),h=(0,i.wwR)(t);return a().createElement(p.e,{collaboration:v},a().createElement(s.Z,{className:o()(r,d.U),entity:(null==l?void 0:l.aEntity)||t},l?a().createElement(b.Z,null):a().createElement(a().Fragment,null,a().createElement(c.a,{className:f.profileBandNavigation}),a().createElement(u.Z,{className:f.comments,uri:h,relatedObjectUris:(0,i.wp9)(i.q7e.ENTITY,{entityUri:h}),objectType:i.q7e.ENTITY}))))}));f.displayName="ScreenProfileBand"},2002:(e,t,r)=>{r.d(t,{Z:()=>oe});var n=r(24328),a=r.n(n),l=r(31421),o=r(35039),i=r(31992),s=r(6163),c=r(29754),u=r(50985),p=r(71153),d=r.n(p),m=r(2507),b=r.n(m),y=r(67586),f=r(98538),g=r(47019),v=r(50914),h=r(51492),E=r(12980),w=r(72342);const x=(0,w.makeStyles)((()=>({textField:{margin:0},input:{borderRadius:0},inputMultiline:{"&$input":{paddingTop:0,paddingBottom:0}},booleanEditor:{paddingLeft:"10px"},timestampEditor:{"&$paper":{minWidth:"255px"}},paper:e=>{let{color:t,containerWidth:r}=e;return{border:`3px solid ${t}`,borderRadius:"4px",width:r,minWidth:"160px"}},popoverRoot:{zIndex:"10!important"}})));function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const k=[l.oS0.TYPE_TEXT,l.oS0.TYPE_BLOB],T=e=>{let{attributeType:t,attributeValue:r,color:o,containerRef:i,onClose:s,onEdit:c,isTemporary:u}=e;const p=x({color:o,containerWidth:i.current?i.current.getBoundingClientRect().width:0}),m=(0,l.PFL)(t),b=(0,E.AG)(r,m),[y,f]=(0,n.useState)(b),w=!(0,v.isNil)(t.defaultValue)&&u,T={className:p.textField,InputProps:{disableUnderline:!0,classes:{root:p.input,multiline:p.inputMultiline}},fullWidth:!0,autoFocus:!0},C=()=>{const e=!(0,v.isNil)(y)&&(0,E.Ho)(t,y);if(!(0,v.isNil)(y)&&!(0,v.equals)(y,b)||w){const n=(0,l.CwH)(t)?{value:e.value,lookupCode:e.lookupCode}:{value:""===y&&(0,l.FVt)(m.type)?null:e};c(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){O(e,t,r[t])}))}return e}({},r,n))}s()};return a().createElement(g.ZP,{open:!!i,anchorEl:i.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},classes:{paper:d()(p.paper,{[p.booleanEditor]:(0,l.T6Y)(m.type),[p.timestampEditor]:(0,l.j5n)(m.type)}),root:p.popoverRoot},onKeyUp:e=>{"Enter"!==e.key||k.includes(m.type)?"Escape"===e.key&&s():C()},onBackdropClick:C},a().createElement(h.Z,{dataTypeDefinition:m,fieldName:(0,l.Tde)(t.uri),onChange:f,TextFieldProps:T,value:y}))};var C=r(39475),S=r(20888),I=r(53203),A=r(95341),Z=r(79312),j=r(78223),N=r(10918);const D=(0,w.makeStyles)((e=>({menuItem:{minHeight:"32px",color:e.palette.text.secondary},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"16px"},sourceItem:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)",paddingBottom:"8px",paddingLeft:"16px",maxWidth:"200px"}}))),P=(0,j.Z)(A.Z),V=e=>{let{styles:t,icon:r,text:n}=e;return a().createElement(a().Fragment,null,r,a().createElement(Z.Z,{classes:{root:t.menuText}},n))},R=(0,n.forwardRef)(((e,t)=>{let{item:r,onMenuClose:n=(()=>{})}=e;const l=D(),{disabled:o,text:i,tooltip:s,onClick:c,id:u="",icon:p,crosswalk:d,color:m}=r;return d?a().createElement(N.Z,{className:l.sourceItem,color:m,crosswalk:d,focusable:!0}):a().createElement(P,{tooltipTitle:s,showForDisabled:!0,classes:{root:l.menuItem},onClick:e=>{n(e),c(e)},disabled:o,ref:t,"data-reltio-id":`crosswalk-menu-item${u}`},a().createElement(V,{icon:p,text:i,styles:l}))}));R.displayName="CrosswalkMenuItem";const U=R;var M=r(2996),W=r(23759);function H(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const L=(0,w.makeStyles)((()=>({root:e=>{let{fullyColored:t,opaque:r,color:n,variant:a}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){H(e,t,r[t])}))}return e}({minHeight:"28px",wordBreak:"break-word"},"filled"===a&&{borderRadius:"4px",background:t?n:`linear-gradient(to right, ${n} 8px, rgba(0,0,0,0.05) 8px)`},"outlined"===a&&{"&::after":{content:'""',position:"absolute",background:n,borderRadius:"4px 0px 0px 4px",width:"8px",height:"100%",pointerEvents:"none"},"&::before":{content:'""',position:"absolute",boxSizing:"border-box",borderRadius:"4px",border:t?`${n} solid 2px`:"rgba(0,0,0,0.12) solid 1px",width:"100%",height:"100%",pointerEvents:"none"}},{display:"flex",alignItems:"center",opacity:r?1:.38,transition:"opacity 0.3s",position:"relative"})},attributeValue:{marginLeft:"16px",padding:"6px 0",lineHeight:"14px",width:"calc(100% - 71px)"},actions:{display:"flex",width:"71px",justifyContent:"flex-end",marginRight:"4px"}}))),z=e=>{let{className:t,dataReltioId:r,attributeType:o=null,attributeValue:i,crosswalk:p,disableEdit:m,disableDelete:g,onIgnore:v,onEdit:h,onPin:E,onDelete:w,isEmpty:x}=e;const{isReadingMode:O,isEditingMode:k,isHovered:A,onMouseEnter:Z,onMouseLeave:j,setReadingMode:N,setEditingMode:D}=(0,M.p)(),P=(0,n.useRef)(),V=(0,l.nIW)(i.uri),R=(0,l.x_)(p),H=!o.system&&!R,z=H&&!m&&(0,l.Z5t)(l.fO_.EDITING,o),B=H&&!g&&(0,l.Edd)(l.fO_.EDITING,o),F=(0,l.ZiX)(i.uri),Y=(0,l.mqZ)(l.BDP.UPDATE,o)&&!m&&H,_=!F&&(!O&&Y||i.pin),G=!F&&(!O&&Y||i.ignored);(0,n.useEffect)((()=>{F&&!x&&D()}),[x]);const q=(0,W.nX)(p),{isHighlighted:X,isDimmed:$,highlightCrosswalk:Q,removeHighlight:J}=(0,W.pu)(p),K=L({variant:R?"outlined":"filled",opaque:!$,fullyColored:X,color:$?"rgba(0, 0, 0, 0.12)":q}),ee=[{crosswalk:p,color:q},{disabled:!z,text:b().text("Edit"),icon:a().createElement(c.Z,null),tooltip:z?null:b().text("You don't have permissions to edit"),onClick:()=>D(),id:"edit"},{disabled:!B,text:b().text("Delete"),icon:a().createElement(s.Z,null),tooltip:B?null:b().text("You don't have permissions to delete"),onClick:()=>w({attributeType:o,attributeValue:i,crosswalks:[p]}),id:"delete"}],te=()=>{J(),N()};return a().createElement("div",{ref:P,className:d()(t,K.root),onMouseEnter:()=>{Q(),Z()},onMouseLeave:()=>{J(),j()},"data-reltio-id":r},a().createElement("div",{className:K.attributeValue},a().createElement(y.Z,{value:(0,l.kDl)(i),dataTypeDefinition:(0,l.PFL)(o)})),a().createElement("div",{className:K.actions},_&&a().createElement(I.Z,{isPinned:i.pin,onClick:()=>E({attributeValue:i}),disabled:!Y}),G&&a().createElement(S.Z,{isIgnored:i.ignored,onClick:()=>v({attributeValue:i}),disabled:!Y}),A&&!(0,l.vr_)(o)&&a().createElement(f.Z,{MenuItemRenderer:U,menuId:`simple-attribute-additional-actions-${V}`,buttonComponent:C.k,buttonProps:{icon:u.Z,size:"XS",tooltipTitle:b().text("More actions")},onMenuClose:te,menuItems:ee})),k&&a().createElement(T,{attributeType:o,attributeValue:i,color:q,onClose:te,onEdit:e=>h({attributeType:o,attributeValue:e,crosswalk:p}),containerRef:P,isTemporary:F}))};var B=r(13896);const F=(0,w.makeStyles)((()=>({simpleAttributesWrapper:{display:"flex",flexWrap:"wrap",gap:"4px",width:"100%",minHeight:"28px"},dropIndicator:{height:"28px",color:"#828282",fontSize:"13px",lineHeight:"28px",background:"rgba(0, 0, 0, 0.04)",border:"1px dashed #828282",borderRadius:"4px",boxSizing:"border-box",padding:"0 12px"}})));function Y(){return Y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Y.apply(this,arguments)}const _=e=>{let{attributeValues:t,attributeType:r,parentUri:n,disableEdit:o,crosswalksMap:i,onAdd:s,emptyTempAttributeUris:c}=e,u=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues","attributeType","parentUri","disableEdit","crosswalksMap","onAdd","emptyTempAttributeUris"]);const p=F(),[{isDragItemOver:d},m]=(0,B.useDrop)({accept:"Crosswalk",canDrop:e=>{let{crosswalk:t}=e;const n=(0,l.bC9)(t.uri)||"relation"===t.ownerType,a=(0,l.WgC)(t.uri)&&"entity"===t.ownerType;return(0,l.d89)(l.fO_.EDITING,r)&&!o&&(n&&(0,l.$NE)(r.uri)||a&&(0,l.EdS)(r.uri))},collect:e=>({isDragItemOver:e.isOver()&&e.canDrop()}),drop:(e,a)=>{let{crosswalk:l}=e;s({attributeType:r,crosswalk:l,parentUri:n,index:t.length})}});let y=0;return a().createElement("div",{ref:m,className:p.simpleAttributesWrapper,"data-reltio-id":"simple-attributes-wrapper"},t.map((e=>{var t;return null===(t=i[e.uri])||void 0===t?void 0:t.map((t=>a().createElement(z,Y({key:e.uri+t.uri,attributeType:r,attributeValue:e,crosswalk:t,disableEdit:o,isEmpty:c.includes(e.uri),dataReltioId:"value-index-"+y++},u))))})),d&&a().createElement("div",{className:p.dropIndicator},b().text("Drop here")))};var G=r(73149),q=r(38677);function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},X.apply(this,arguments)}const $=e=>{let{className:t,attributeValues:r,attributeType:n,onAdd:o,parentUri:i,disableEdit:s}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues","attributeType","onAdd","parentUri","disableEdit"]);const u=!s&&(0,l.d89)(l.fO_.EDITING,n);return 0===r.length&&u?a().createElement(q.Z,{variant:"text",color:"primary",onClick:()=>o({parentUri:i,attributeType:n,index:0})},b().text("Create attribute")):a().createElement("div",{className:t},r.map((e=>a().createElement(G.Z,X({key:e.uri,attributeValue:e,attributeType:n,onAdd:o,disableEdit:s},c)))))};var Q=r(49402);function J(){return J=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},J.apply(this,arguments)}const K=e=>{let{className:t,attributeValues:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues"]);return a().createElement("div",{className:t},r.map((e=>a().createElement(Q.Z,J({key:e.uri,attributeValue:e},n)))))};var ee=r(51557);function te(){return te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},te.apply(this,arguments)}const re=e=>{let{className:t,attributeValues:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues"]);return a().createElement("div",{className:t},r.map((e=>a().createElement(ee.Z,te({key:e.uri,attributeValue:e},n)))))},ne=(0,w.makeStyles)((()=>({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start"},complexAttributesWrapper:{width:"100%"}})));function ae(){return ae=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ae.apply(this,arguments)}function le(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const oe=e=>{let{attributeType:t,attributeValues:r=[],paging:s={},max:c=1/0,requestNextPage:u}=e,p=le(e,["attributeType","attributeValues","paging","max","requestNextPage"]);const d=ne(),[m,b]=(0,n.useState)(c),y=(0,v.propOr)(r.length,"totalValues",s),f=c<y,g=f&&m<y,h=f&&m>=y,E=r.slice(0,m),w=y-m;return a().createElement("div",{className:d.wrapper},(e=>{switch(t.type){case l.oS0.TYPE_NESTED:return a().createElement($,ae({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));case l.oS0.TYPE_REFERENCE:{const{crosswalksMap:r}=p,n=le(p,["crosswalksMap"]);return a().createElement(K,ae({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t,crosswalksMap:r},n))}case l.oS0.TYPE_IMAGE:return a().createElement(re,ae({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));default:return a().createElement(_,ae({attributeValues:e,attributeType:t},p))}})(E),g&&a().createElement(o.Z,{moreNumber:Math.min(c,w),valueNumber:w,onClick:()=>{r.length<y&&u(),b(m+c)}}),h&&a().createElement(i.Z,{onClick:()=>{b(c)}}))}},86966:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(24328),a=r.n(n),l=r(31421),o=r(2996),i=r(79935),s=r(23759),c=r(10918),u=r(90143),p=r(71153),d=r.n(p),m=r(21934);const b=e=>{let{crosswalk:t,className:r}=e;const n=(0,s.nX)(t),o=(0,l.x_)(t),{isDimmed:i,highlightCrosswalk:p,removeHighlight:b}=(0,s.pu)(t),y=(0,m.y)({isOpaque:!i,color:i?"rgba(0, 0, 0, 0.12)":n,isDisabled:o});return a().createElement(u.Z,{title:a().createElement(c.Z,{crosswalk:t,color:n}),placement:"top"},a().createElement("div",{"data-reltio-id":"crosswalk-icon",className:d()(y.crosswalkIcon,r),onMouseEnter:()=>p(),onMouseLeave:()=>b()}))};var y=r(50914),f=r(85777),g=r(2002),v=r(14699),h=r(52239),E=r(72342);const w=(0,E.makeStyles)((e=>({title:{fontSize:"12px",lineHeight:"14px",paddingBottom:"4px",display:"inline-block",color:e.palette.text.secondary}})));function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x.apply(this,arguments)}const O=e=>{let{attributeTypes:t,attributes:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeTypes","attributes"]);const o=w();return a().createElement(a().Fragment,null,t.filter(l.Uty).map((e=>a().createElement(h.Z,{key:e.uri,enabled:!0},a().createElement(v.Z,{className:o.title,label:e.label}),a().createElement(g.Z,x({attributeType:e,attributeValues:r[e.name],paging:(0,y.path)(["paging",e.uri],r)},n))))))};var k=r(53203),T=r(20888),C=r(39475),S=r(6163),I=r(2507),A=r.n(I);const Z=e=>{let{onClick:t}=e;return a().createElement(C.k,{icon:S.Z,tooltipTitle:A().text("Delete"),onClick:t,size:"XS",disableRipple:!0})};var j=r(55962),N=r(38361);const D=(0,E.makeStyles)((()=>({root:{display:"flex",minHeight:"20px"},actions:{display:"flex",width:"65px",justifyContent:"flex-end",flexShrink:0,alignSelf:"center"},crosswalkIcon:{display:"inline-block",verticalAlign:"middle","& + &":{marginLeft:"4px"}}}))),P=e=>{let{attributeType:t,attributeValue:r,attributeTypesList:s,label:c,crosswalksMap:u,disableEdit:p,disableDelete:d,onPin:m,onIgnore:g,onDelete:v,onEdit:h,onAdd:E,emptyTempAttributeUris:w}=e;const x=D(),{isReadingMode:C,onMouseEnter:S,onMouseLeave:I}=(0,o.p)(),A=!p&&(0,l.Z5t)(l.fO_.EDITING,t),P=!d&&(0,l.Edd)(l.fO_.EDITING,t),V=(0,l.ZiX)(r.uri),R=!V&&(!C&&A||r.pin),U=!V&&(!C&&A||r.ignored),M=!C&&P,W=(0,N.Q)(r.uri),[H,L]=(0,n.useState)(W||V);(0,j.D)((()=>{W&&L(W)}),[W]);const z=(0,y.pipe)((0,y.pickBy)(((e,t)=>(0,l.sOy)(t,null==r?void 0:r.uri))),y.values,y.flatten,(0,y.uniqBy)((0,y.prop)("uri")))(u);return a().createElement(a().Fragment,null,a().createElement("div",{className:x.root,onMouseEnter:S,onMouseLeave:I},a().createElement(f.Z,{onClick:()=>L((e=>!e)),expanded:H}),a().createElement("span",null,c,z.map((e=>a().createElement(b,{key:(0,l.uKF)(e),crosswalk:e,className:x.crosswalkIcon})))),a().createElement(i.Z,null),a().createElement("div",{className:x.actions},R&&a().createElement(k.Z,{disabled:!A,isPinned:r.pin,onClick:()=>m({attributeValue:r})}),U&&a().createElement(T.Z,{disabled:!A,isIgnored:r.ignored,onClick:()=>g({attributeValue:r})}),M&&a().createElement(Z,{onClick:()=>v({attributeType:t,attributeValue:r,crosswalks:u[r.uri]})}))),H&&a().createElement(O,{attributeTypes:s,attributes:r.value,parentUri:r.uri,crosswalksMap:u,disableEdit:!A,disableDelete:!P,onPin:m,onIgnore:g,onDelete:v,onEdit:h,onAdd:E,emptyTempAttributeUris:w}))}},51557:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(31421),o=r(26729),i=r(86966);const s=(0,r(72342).makeStyles)((()=>({image:{borderRadius:"4px",background:"white",display:"inline-block",verticalAlign:"middle"},imageContainer:{display:"inline",lineHeight:"45px",paddingRight:"8px"}})));function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}const u={imageWidth:55,imageHeight:45},p=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const p=s();return a().createElement(i.Z,c({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:a().createElement(o.Z,{containerClassName:p.imageContainer,className:p.image,src:(0,l.Ysv)(t),size:u})},n))}},73149:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(31421),o=r(86966),i=r(35969);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const c=a().createElement(i.x,null,(0,l.idV)(null==t?void 0:t.label));return a().createElement(o.Z,s({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:c},n))}},49402:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(24328),a=r.n(n),l=r(50914),o=r(31421),i=r(86966),s=r(35969),c=r(30357),u=r(98074),p=r(14596);const d=(0,r(72342).makeStyles)((e=>({relationshipLabel:{marginLeft:"4px",color:e.palette.text.primary}})));function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}const b=e=>{let{attributeValue:t,attributeType:r}=e,b=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const y=d(),{generateEntityUrl:f}=(0,n.useContext)(u.v),g=(0,p.AH)(),v=(0,p.Qh)(),h=a().createElement(s.x,null,a().createElement(c.Z,{href:f({uiPath:v,uri:(0,o.bwT)(t)})},(0,o.idV)(t.label),t.relationshipLabel&&a().createElement("span",{className:y.relationshipLabel},t.relationshipLabel))),E=(0,l.pipe)(o.tF$,(0,l.map)((e=>(0,o.zeJ)(g,e))),(0,l.reject)(l.isNil))(r);return a().createElement(i.Z,m({attributeValue:t,attributeType:r,attributeTypesList:E,label:h},b))}},35969:(e,t,r)=>{r.d(t,{x:()=>i});var n=r(24328),a=r.n(n),l=r(79312),o=r(21934);const i=e=>{let{children:t}=e;const r=(0,o.q)();return a().createElement(l.Z,{component:"span",variant:"body2",classes:{body2:r.label}},t)}},20888:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(39475);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=e=>a().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3.5A8.503 8.503 0 003.5 12c0 4.692 3.808 8.5 8.5 8.5s8.5-3.808 8.5-8.5-3.808-8.5-8.5-8.5zM6.1 12c0-3.26 2.64-5.9 5.9-5.9 1.161 0 2.24.336 3.149.917L7.017 15.15A5.821 5.821 0 016.101 12zm5.9 5.9c-1.16 0-2.24-.336-3.148-.917l8.131-8.131c.581.908.917 1.987.917 3.148 0 3.26-2.64 5.9-5.9 5.9z",fill:"#000",fillOpacity:.54}));function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.847 9.402a6.34 6.34 0 00-.8-1.322L8.08 17.048A6.34 6.34 0 0012 18.4a6.398 6.398 0 005.847-8.998zm-7.283 7.283l6.121-6.121a4.898 4.898 0 01-6.121 6.121zm1.437-11.084a6.334 6.334 0 013.92 1.352L6.953 15.92A6.334 6.334 0 015.6 12c0-3.536 2.864-6.4 6.4-6.4zm0 1.5c.5 0 .982.075 1.436.215l-6.121 6.12A4.898 4.898 0 0112 7.1zM6.6 17.903A7.967 7.967 0 0012 20c4.417-.001 8.001-3.585 8.001-8.001a7.967 7.967 0 00-2.601-5.902A7.988 7.988 0 0012 4c-4.416 0-8 3.584-8 8a7.967 7.967 0 002.602 5.902zM12 2.5c-5.244 0-9.5 4.256-9.5 9.5s4.256 9.5 9.5 9.5 9.5-4.256 9.5-9.5-4.256-9.5-9.5-9.5z",fill:"#000",fillOpacity:.54}));var u=r(2507),p=r.n(u);const d=e=>{let{isIgnored:t,onClick:r,disabled:n}=e;return a().createElement(l.k,{disabled:n,showForDisabled:!0,icon:t?i:c,tooltipTitle:n?p().text("You don't have permissions to ignore"):p().text("Ignore"),onClick:r,size:"XS",disableRipple:!0})}},53203:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(39475);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=e=>a().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 4v6l2 2v2h-5v7l-.992 1L11 21v-7H6v-2l2-2V4H7V2h10v2h-1z",fill:"#000",fillOpacity:.54}));function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 10V4h1V2H7v2h1v6l-2 2v2h5v7l1.008 1L13 21v-7h5v-2l-2-2zm-6-6h4v7l1 1H9l1-1V4z",fill:"#000",fillOpacity:.54}));var u=r(2507),p=r.n(u);const d=e=>{let{isPinned:t,onClick:r,disabled:n}=e;return a().createElement(l.k,{disabled:n,showForDisabled:!0,onClick:r,icon:t?i:c,tooltipTitle:n?"You don't have permissions to pin":p().text("Pin"),size:"XS",disableRipple:!0})}},10918:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(24328),a=r.n(n),l=r(2507),o=r.n(l),i=r(71153),s=r.n(i),c=r(31421),u=r(26436),p=r(21210),d=r(23759),m=r(14596),b=r(39475),y=r(21934);const f=e=>{let{crosswalk:t,color:r,className:n,focusable:l=!1}=e;const{toggleCrosswalkFocus:i,isFocused:f}=(0,d.BF)(t),g=(0,y.y)({color:r,isFocused:f}),v=(0,m.AH)(),{label:h}=(0,c.PWK)(v,t.type);return a().createElement("div",{className:s()(g.sourceItem,n)},a().createElement(p.Z,{className:g.sourceIcon,sourceType:t.type}),a().createElement("div",{className:g.sourceInfo},a().createElement("div",null,a().createElement("span",{className:g.label},h),l&&a().createElement(b.k,{icon:u.Z,className:g.eyeIcon,size:"XXS",tooltipTitle:o().text("Focus"),onClick:()=>i()})),a().createElement("div",{className:g.crosswalkValue},t.value)))}},21934:(e,t,r)=>{r.d(t,{y:()=>a,q:()=>l});var n=r(72342);const a=(0,n.makeStyles)({sourceItem:{display:"flex",overflow:"hidden"},eyeIcon:e=>{let{isFocused:t}=e;return{marginLeft:"10px",color:t?"#000":"rgba(0, 0, 0, 0.54)"}},label:{color:"rgba(0, 0, 0, 0.87)",verticalAlign:"top",fontSize:"13px",lineHeight:"16px"},sourceInfo:{overflow:"hidden"},crosswalkValue:{color:"rgba(0, 0, 0, 0.54)",fontSize:"12px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},sourceIcon:e=>{let{color:t}=e;return{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px",backgroundColor:t}},crosswalkIcon:e=>{let{color:t,isOpaque:r,isDisabled:n}=e;return{backgroundColor:n?"#fff":t,border:n?`2px solid ${t}`:null,height:"12px",width:"12px",boxSizing:"border-box",borderRadius:"30px",opacity:r?1:.38,transition:"opacity 0.3s"}}}),l=(0,n.makeStyles)((()=>({label:{fontSize:"13px",lineHeight:"15px",letterSpacing:"normal",marginLeft:"2px",marginRight:"8px"}})))},2996:(e,t,r)=>{r.d(t,{p:()=>o});var n,a=r(31421),l=r(24328);!function(e){e.READING="READING",e.HOVERED="HOVERED",e.EDITING="EDITING"}(n||(n={}));const o=()=>{const[e,t]=(0,l.useState)(null),r=e===n.READING,o=e===n.EDITING,i=e===n.HOVERED;(0,l.useEffect)((()=>{t(n.READING)}),[]);const s=(0,l.useCallback)((0,a.DsO)(t,50),[]),c=(0,l.useCallback)((()=>{o||s(n.HOVERED)}),[s,o]),u=(0,l.useCallback)((()=>{o||s(n.READING)}),[s,o]);return{setReadingMode:(0,l.useCallback)((()=>t(n.READING)),[t]),setEditingMode:(0,l.useCallback)((()=>t(n.EDITING)),[t]),onMouseLeave:u,onMouseEnter:c,isReadingMode:r,isEditingMode:o,isHovered:i}}},45226:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(31421),a=r(24328),l=r.n(a),o=r(11013),i=r(61347);function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){c(e,t,r[t])}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function p(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const d=e=>{let{values:t,valueContainerClassName:r}=e,n=p(e,["values","valueContainerClassName"]);return l().createElement(l().Fragment,null,(t||[]).map((e=>l().createElement("div",{key:e.uri,className:r},l().createElement(o.Z,u({attributeValue:e},n))))))},m=(0,a.memo)((e=>{let{expanded:t,LabelRenderer:r,RightSlot:a}=e,o=p(e,["expanded","LabelRenderer","RightSlot"]);const{attributeType:c,values:u,valueContainerClassName:m}=o;switch(c.type){case n.oS0.TYPE_NESTED:case n.oS0.TYPE_REFERENCE:return d(s({expanded:t,LabelRenderer:r,RightSlot:a},o));case n.oS0.TYPE_IMAGE:return l().createElement("div",{className:m},l().createElement(i.Z,{attributeType:c,attributeValues:u,imageSize:{imageHeight:40,imageWidth:40,imageMargin:2}}));default:return d(s({},o))}}))},63309:(e,t,r)=>{r.d(t,{Z:()=>Ye});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(2507),s=r.n(i),c=r(31421),u=r(48030),p=r(87825),d=r(45108),m=r(17998),b=r(72342);const y=(0,b.makeStyles)((e=>({coloredCell:{"&::before":{content:'""',position:"absolute",right:0,top:0,width:"100%",height:"100%",background:"rgba(0,0,0,0.06)",pointerEvents:"none"}},headCell:{display:"flex",alignItems:"center",fontSize:"12px",height:"100%",color:e.palette.text.secondary},rowCell:{fontSize:"13px",overflow:"hidden"},cellValueWrapper:{position:"relative",padding:"15px 15px 0 15px","&:last-child":{paddingBottom:"15px"}},dragIndicator:{display:"none",position:"absolute",top:"15px",left:0,cursor:"grab"},dragIndicatorIcon:{fill:e.palette.text.secondary,width:"14px",height:"14px"},attributeTitle:{display:"block",marginLeft:"3px","&:not(:last-child)":{marginBottom:"5px"}},ovValue:{"& + &":{marginTop:"4px"}},count:{textAlign:"center"},ruleType:{display:"flex",alignItems:"center"},ruleTypeLabel:{marginRight:"5px"},rulePopup:{width:"270px",overflowY:"hidden"},popupItem:{paddingBottom:"5px",paddingTop:"5px"},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"},closeButton:{height:24,width:24},popupTitle:{fontWeight:500,marginLeft:"12px"},popupTitleWrapper:{display:"flex",paddingLeft:16,paddingTop:16},popupItemsWrapper:{overflowY:"auto",maxHeight:"280px"},winnerSourceItemWrapper:{paddingBottom:"2px",paddingTop:"2px"},winnerSourceItem:{display:"flex",alignItems:"center",width:"100%",paddingLeft:"8px"},winnerSourceItemLabel:{fontSize:13}})));function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}const g=e=>{let{cell:t,CellValueRenderer:r,columnIndex:n,columnData:l,someRowIsDragging:i}=e,s=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["cell","CellValueRenderer","columnIndex","columnData","someRowIsDragging"]);const c=y(),u=0===n,p=!i||u;return a().createElement("div",{className:o()(c.rowCell,u&&c.coloredCell),"data-reltio-id":`column-name-${l.id}`},p&&a().createElement(a().Fragment,null,t.values.map(((e,t)=>a().createElement(r,f({key:t,value:e,someRowIsDragging:i},s))))))};var v=r(96253);function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h.apply(this,arguments)}const E=e=>{let{changeRowCellHeight:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["changeRowCellHeight"]);return r.isDragLayer?a().createElement(g,h({},r,{someRowIsDragging:!1})):a().createElement(v.Z,h({onChangeHeight:t},r),a().createElement(g,r))};var w=r(50914),x=r(92332);const O=e=>{const t=y();return a().createElement("div",{className:o()(t.headCell,t.coloredCell)},a().createElement(x.default,e),e.children)};var k=r(67283),T=r(30488),C=r(14596);const S=(0,b.makeStyles)({root:{marginBottom:"-6px"}}),I=(0,T.Z)((0,w.pick)(["parentUri","parentTypeUri","onAdd","selectedAttributeTypes","onSelectAttributeTypes"]))((e=>{let{parentTypeUri:t,parentUri:r,selectedAttributeTypes:n,onSelectAttributeTypes:l,onAdd:o}=e;const i=S(),u=(0,C.AH)(),p=[...u.entityTypes,...u.relationTypes||[]].find((0,w.propEq)("uri",t)),d=e=>!(null!=n&&n.find((0,w.propEq)("uri",e.uri))),m=(0,w.pipe)((0,w.propOr)([],"attributes"),(0,w.reject)((0,w.either)(c.YkG,c.Or$)),(0,w.filter)((0,w.either)(c.QZu,d)),(0,w.filter)((0,w.both)(c.Uty,(e=>(0,c.Vg3)({attributeType:e,mode:c.fO_.EDITING})))))(p);return a().createElement("div",{className:i.root},a().createElement(k.Z,{label:s().text("Attribute"),popupTitle:s().text("Add attributes"),data:m,onApply:e=>{const t=e.filter(d);t.length>0&&l([...t,...n]),e.filter(c.QZu).forEach((e=>{o({attributeType:e,parentUri:r})}))}}))}));var A=r(79935);const Z=(0,T.Z)((0,w.pick)(["readOnly"]))((e=>{let{readOnly:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["readOnly"]);return t?a().createElement(O,r):a().createElement(O,r,a().createElement(A.Z,null),a().createElement(I,null))})),j=e=>{let{value:t}=e;const r=y();return a().createElement("div",{className:r.cellValueWrapper},t)};var N=r(2002);const D=(0,b.makeStyles)((()=>({simpleAttributeWrapper:{padding:"15px"},complexAttributeWrapper:{padding:"15px","& + &":{borderTop:"1px solid rgba(0,0,0,.1)"}}})));function P(){return P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},P.apply(this,arguments)}const V=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=D();return a().createElement("div",{className:n.simpleAttributeWrapper},a().createElement(N.Z,P({attributeValues:t},r)))};var R=r(73149);function U(){return U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},U.apply(this,arguments)}const M=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=D(),l=null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:n.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(R.Z,U({attributeValue:e},r)))));return a().createElement(a().Fragment,null,l)};var W=r(49402);function H(){return H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},H.apply(this,arguments)}const L=e=>{let{attributeValues:t,crosswalksMap:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues","crosswalksMap"]);const l=D(),o=null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:l.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(W.Z,H({attributeValue:e,crosswalksMap:r},n)))));return a().createElement(a().Fragment,null,o)};var z=r(51557);function B(){return B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B.apply(this,arguments)}const F=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=D();return a().createElement(a().Fragment,null,null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:n.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(z.Z,B({attributeValue:e},r))))))};function Y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const _=(0,T.Z)((0,w.pick)(["onDelete","onPin","onIgnore","onEdit","onAdd","parentUri","readOnly","emptyTempAttributeUris"]))((e=>{let{value:t,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,emptyTempAttributeUris:s,parentUri:u,readOnly:p}=e;return class{static build(e,t){switch(e){case c.oS0.TYPE_NESTED:return a().createElement(M,t);case c.oS0.TYPE_REFERENCE:return a().createElement(L,t);case c.oS0.TYPE_IMAGE:return a().createElement(F,t);default:return a().createElement(V,t)}}}.build(t.attributeType.type,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Y(e,t,r[t])}))}return e}({},t,{parentUri:u,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,emptyTempAttributeUris:s,disableEdit:p,disableDelete:p}))}));var G=r(89323),q=r(45226),X=r(14699);const $=e=>{let{value:{values:t,attributeType:r},someRowIsDragging:n,dragRef:l}=e;const o=y();return a().createElement("div",{className:o.cellValueWrapper},a().createElement("div",{ref:l,className:o.dragIndicator},a().createElement(G.Z,{className:o.dragIndicatorIcon})),a().createElement(X.Z,{className:o.attributeTitle,label:r.label}),!n&&a().createElement(q.Z,{values:t,attributeType:r,valueContainerClassName:o.ovValue}))},Q=e=>{let{value:t}=e;const r=y();return a().createElement("div",{className:o()(r.cellValueWrapper,r.count)},t)};var J=r(87037),K=r(81774),ee=r(35488),te=r(82056),re=r(47019),ne=r(79312),ae=r(92679),le=r(69208),oe=r(39475),ie=r(21210);const se=e=>{let{sourcesUriOrder:t,metadata:r}=e;const n=y();return a().createElement(a().Fragment,null,t.map((e=>a().createElement(ee.ZP,{key:e,className:n.popupItem},a().createElement(ie.Z,{className:n.sourceIcon,sourceType:e}),a().createElement(te.Z,{primary:(0,c.tH7)(r,e),primaryTypographyProps:{variant:"body2"}})))))},ce=e=>{let{attributeUri:t,metadata:r}=e;const n=y(),l=(0,c.zeJ)(r,t);return a().createElement(ee.ZP,{key:l.uri,className:n.popupItem},a().createElement(te.Z,{primary:(0,c.idV)(l.label),primaryTypographyProps:{variant:"body2"}}))},ue=(0,w.cond)([[(0,w.prop)("sourcesUriOrder"),()=>s().text("Source sequence")],[(0,w.prop)("primaryAttributeUri"),()=>s().text("Attribute winner")],[(0,w.prop)("comparisonAttributeUri"),()=>s().text("Comparison attribute")]]),pe=(0,w.cond)([[(0,w.prop)("sourcesUriOrder"),(e,t)=>{let{sourcesUriOrder:r}=e;return a().createElement(se,{metadata:t,sourcesUriOrder:r})}],[(0,w.prop)("primaryAttributeUri"),(e,t)=>{let{primaryAttributeUri:r}=e;return a().createElement(ce,{metadata:t,attributeUri:r})}],[(0,w.prop)("comparisonAttributeUri"),(e,t)=>{let{comparisonAttributeUri:r}=e;return a().createElement(ce,{metadata:t,attributeUri:r})}]]),de=e=>{let{info:t}=e;const r=y(),[l,o]=(0,n.useState)(null),i=(0,C.AH)(),c=()=>o(null);return a().createElement(a().Fragment,null,a().createElement(oe.k,{icon:le.Z,tooltipTitle:s().text("View details"),size:"XS",onClick:e=>o(e.currentTarget)}),a().createElement(re.ZP,{classes:{paper:r.rulePopup},open:!!l,anchorEl:l,onClose:c,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},a().createElement("div",{className:r.popupTitleWrapper},a().createElement(J.Z,{className:r.closeButton,onClick:c,size:"large"},a().createElement(ae.default,null)),a().createElement(ne.Z,{variant:"subtitle1",className:r.popupTitle},ue(t))),a().createElement(K.Z,{component:"div",className:r.popupItemsWrapper},pe(t,i))))},me=e=>{let{value:{ruleType:t,sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}=e;const i=y(),s=r||n||l;return a().createElement("div",{className:o()(i.cellValueWrapper,i.ruleType)},a().createElement("div",{className:i.ruleTypeLabel},t.label),s&&a().createElement(de,{info:{sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}))};var be=r(23759),ye=r(26752);const fe=e=>{let{crosswalk:t}=e;const r=y(),n=(0,C.AH)(),{isDimmed:l,highlightCrosswalk:o,removeHighlight:i}=(0,be.pu)(t);return a().createElement(ye.Z,{className:r.winnerSourceItem,color:l?"rgba(0, 0, 0, 0.12)":(0,c.CJp)((0,c.uKF)(t)),opacity:l?.38:1,onMouseEnter:()=>o(),onMouseLeave:()=>i()},a().createElement(ie.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(te.Z,{primary:(0,c.tH7)(n,t.type),primaryTypographyProps:{variant:"body2"},classes:{primary:r.winnerSourceItemLabel}}))},ge=e=>{let{value:{crosswalks:t}}=e;const r=y();return a().createElement(K.Z,{component:"div"},t.map((e=>a().createElement(ee.ZP,{key:e.uri,className:r.winnerSourceItemWrapper},a().createElement(fe,{crosswalk:e})))))},ve=[{id:"ovValues",get label(){return s().text("Attributes & OV")},hideable:!1,initialWidth:360,minWidth:250},{id:"winnerSources",get label(){return s().text("Winner source systems")},initialWidth:220},{id:"ruleType",get label(){return s().text("Rule type")},initialWidth:200},{id:"count",get label(){return s().text("Count")},initialWidth:80,minWidth:80},{id:"values",get label(){return s().text("Attribute values")},hideable:!1}],he=e=>(0,c.OXP)(e)&&!(0,c.ZiX)(e.uri),Ee=["ovValues","ruleType","values"],we=e=>{switch(e){case"ovValues":return $;case"values":return _;case"count":return Q;case"ruleType":return me;case"winnerSources":return ge;default:return j}},xe=(0,w.pipe)(c.cwx,(0,w.sortWith)([(0,w.descend)((0,w.propOr)(-1,"priority"))]),(0,w.map)((0,w.prop)("uri"))),Oe=(0,w.curry)(((e,t)=>(0,c.YkG)(e)&&t&&(0,w.pipe)(c.c31,(0,w.find)((r=>r.slice((0,c.u5q)(r).length)===t.slice(e.uri.length))))(e)||t)),ke=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return(0,w.pipe)((0,w.filter)(he),(0,w.chain)((e=>(0,w.pipe)((0,w.pickBy)(((t,r)=>{const n=(0,c.sOy)(r,e.uri),a=n?r.slice(e.uri.length+1):"",l=a&&(0,c.IM5)(e.value,a);return n&&(!l||he(l))})),w.values,w.flatten)(t))),(0,w.uniqBy)((0,w.prop)("uri")))(e)},Te=(0,w.map)((e=>{let{id:t,label:r,initialWidth:n,minWidth:a}=e;return{id:t,label:r,initialWidth:n,minWidth:a,autoResize:!n,resizable:!0,sortable:!1,headCellRenderer:"ovValues"===t?Z:O,rowCellValueRenderer:we(t)}})),Ce=(e,t,r,n,a,l,o)=>{switch(e){case"ovValues":return{attributeType:n,values:null==l?void 0:l.filter(he)};case"values":return{attributeType:n,attributeValues:l,crosswalksMap:a};case"count":return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;switch(e){case c.oS0.TYPE_REFERENCE:case c.oS0.TYPE_NESTED:case c.oS0.TYPE_IMAGE:return t.length;default:return t.reduce(((e,t)=>e+(0,w.pathOr)(0,[t.uri,"length"],r)),0)}}(n.type,l,a);case"ruleType":return((e,t,r,n)=>{var a,l;const o=[...e.entityTypes,...e.relationTypes||[]].find((0,w.propEq)("uri",r)),i=null!==(a=null==o?void 0:o.survivorshipGroups)&&void 0!==a?a:[],s=n&&i.find((0,w.propEq)("uri",n))||i.find((0,w.propEq)("default",!0)),u=null==s||null===(l=s.mapping)||void 0===l?void 0:l.find((0,w.propEq)("attribute",t.uri)),p=(0,c.o_J)(e,null==u?void 0:u.survivorshipStrategy)||(0,c.Xaq)(e),d=(e=>"configuration/survivorshipStrategies/SRC_SYS"===(null==e?void 0:e.uri))(p)?(0,w.uniq)([...(null==u?void 0:u.sourcesUriOrder)||[],...(null==s?void 0:s.sourcesUriOrder)||[],...xe(e)]):void 0,m=Oe(t),b=(e=>"configuration/survivorshipStrategies/OtherAttributeWinnerCrosswalk"===(null==e?void 0:e.uri))(p)?m(null==u?void 0:u.primaryAttributeUri):void 0,y=(0,c.YkM)(t)&&(e=>"configuration/survivorshipStrategies/MinValue"===(null==e?void 0:e.uri)||"configuration/survivorshipStrategies/MaxValue"===(null==e?void 0:e.uri))(p)?m(null==u?void 0:u.comparisonAttributeUri):void 0;return{ruleType:p,sourcesUriOrder:d,primaryAttributeUri:b,comparisonAttributeUri:y}})(t,n,r,o);case"winnerSources":return{crosswalks:ke(l,a)};default:return null}};var Se=r(87378),Ie=r(94059),Ae=r(38677),Ze=r(69089),je=r(79811),Ne=r(290),De=r(75779),Pe=r(63297),Ve=r(96758),Re=r(30721),Ue=r(73074),Me=r(50553),We=r(79573);const He=e=>{let{open:t,onClose:r,onConfirmEditWithoutIgnore:l,onConfirmEditWithIgnore:o}=e;const[i,c]=(0,n.useState)("without");return a().createElement(Ze.Z,{open:t,TransitionProps:{onEnter:()=>c("without")}},a().createElement(Ne.Z,null,a().createElement(De.Z,null,s().text("You are attempting to change a value that is presently ignored.")),a().createElement(Ue.Z,{variant:"standard",component:"fieldset"},a().createElement(Me.Z,{component:"legend"},s().text("Please choose an option:")),a().createElement(Ve.Z,{value:i,onChange:(0,w.pipe)(We.NA,c)},a().createElement(Re.Z,{value:"without",control:a().createElement(Pe.Z,null),label:s().text("Save without Ignore")}),a().createElement(Re.Z,{value:"with",control:a().createElement(Pe.Z,null),label:s().text("Save and apply Ignore to new value")})))),a().createElement(je.Z,null,a().createElement(Ae.Z,{onClick:r,color:"primary"},s().text("Cancel")),a().createElement(Ae.Z,{onClick:()=>{"with"===i?o():l(),r()},color:"primary"},s().text("Ok"))))},Le=(0,b.makeStyles)({tableContainer:{height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},tableHeader:{display:"flex",flexDirection:"row"},tableTitle:{marginRight:"auto"},tableContent:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",position:"relative"}});function ze(){return ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ze.apply(this,arguments)}const Be=e=>e.ovValues.attributeType.uri,Fe=e=>{let{columnData:{id:t},cellIndex:r,rowValue:n}=e;return`${t}[${Be(n)}][${r}]`},Ye=(0,n.memo)((e=>{let{entity:t,isLoading:r,crosswalksMap:l,visibleColumns:i=Ee,onChangeVisibleColumns:b,readOnly:y,onDelete:f=We.ZT,onPin:g=We.ZT,onIgnore:v=We.ZT,onEdit:h=We.ZT,onAdd:x=We.ZT,emptyTempAttributeUris:O,selectedAttributeTypes:k,onSelectAttributeTypes:T=We.ZT,additionalHeaderItems:S,className:I,activeSurvivorshipGroupUri:A}=e;const Z=Le(),j=(0,C.AH)(),N=(0,n.useMemo)((()=>(0,w.pipe)((0,w.filter)((e=>{let{id:t}=e;return i.includes(t)})),Te)(ve)),[i]),{type:D,uri:P,attributes:V={}}=t||{};(0,n.useEffect)((()=>{if(t&&(0,w.isNil)(k)){const e=(0,w.pipe)(w.keys,(0,w.without)(["paging"]),(0,w.map)((0,c.tCm)(D)),(0,w.map)((e=>(0,c.zeJ)(j,e,D))),(0,w.filter)((0,w.both)(w.identity,c.Uty)))(V);T(e)}}),[t,k]);const R=(0,n.useMemo)((()=>D?function(e,t){let r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,l=arguments.length>6?arguments[6]:void 0;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).map((o=>{const i=(0,c.nIW)(o.uri),s=a[i],u=(0,c.YkG)(o)?n.relation:n.entity;return(0,w.pipe)((0,w.reduce)(((r,n)=>(0,w.assoc)(n,Ce(n,e,t,o,u,s,l),r)),{}),(0,w.assoc)("rawValue",s))(r)}))}(j,D,k,i,l,V,A):[]),[j,D,k,i,V,l,A]),{getDynamicRowCellHeight:U,changeRowCellHeight:M}=(0,u.Z)(Fe),W=(0,n.useCallback)((e=>a().createElement(E,ze({changeRowCellHeight:M},e))),[M]),H=(0,n.useCallback)((0,w.either)(U,(0,w.always)(68)),[U]),[L,z]=(0,n.useState)(null),[B,F]=(0,n.useState)(null),Y=(0,n.useCallback)((e=>{e.attributeValue.ignored?F(e):h(e)}),[h,F]),_=(0,n.useCallback)(((e,t)=>{T((0,w.move)(e,t,k))}),[T,k]),G=(0,n.useCallback)(L?()=>f(L):We.ZT,[L,f]),q=(0,n.useMemo)((()=>({onDelete:z,onPin:g,onIgnore:v,onEdit:Y,onAdd:x,parentUri:P,parentTypeUri:D,selectedAttributeTypes:k,onSelectAttributeTypes:T,emptyTempAttributeUris:O,readOnly:y})),[z,g,v,Y,x,P,D,k,T,O,y]);return a().createElement("div",{className:o()(Z.tableContainer,I)},a().createElement(m.Z,{classes:{root:Z.tableHeader,title:Z.tableTitle},title:s().text("Sources")},S,a().createElement(p.Z,{columnsData:ve,selectedColumns:i,onChangeColumns:b})),a().createElement("div",{className:Z.tableContent},r&&a().createElement(Se.Z,null),a().createElement(d.Z,{fixFirstColumn:!0,headRowHeight:48,defaultColumnWidth:250,defaultColumnMinWidth:200,columnsData:N,dndRowReorderingEnabled:!1,dndRowReorderingHandler:_,getIdFromRowValue:Be,rowsData:R,renderRowCell:W,getRowCellHeight:H,context:q})),a().createElement(Ie.Z,{open:!!L,onClose:()=>z(null),onConfirm:G}),a().createElement(He,{open:!!B,onClose:()=>F(null),onConfirmEditWithIgnore:()=>h(B),onConfirmEditWithoutIgnore:()=>{v({attributeValue:B.attributeValue}),h(B)}}))}))},26752:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(24328),a=r.n(n),l=r(2507),o=r.n(l),i=r(71153),s=r.n(i),c=r(42503),u=r(23883);function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const d=(0,r(72342).makeStyles)({item:e=>{let{color:t,opacity:r,variant:n}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){p(e,t,r[t])}))}return e}({},"standart"===n&&{backgroundColor:t,paddingRight:"29px"},"disabled"===n&&{border:`${t} solid 2px`},{opacity:r,filter:r&&1!==r?"saturate(20%)":null,transition:"opacity 0.3s",boxSizing:"border-box"})},endDatedCrosswalkIcon:{margin:"0 4px",width:"20px",height:"20px",color:"#ff1744"}});function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}const b=(0,n.forwardRef)(((e,t)=>{let{color:r,opacity:n,variant:l="standart",children:i,className:p}=e,b=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["color","opacity","variant","children","className"]);const y=d({color:r,opacity:n,variant:l});return a().createElement("div",m({ref:t,"data-reltio-id":"cw-colored-block",className:s()(y.item,p)},b),i,"disabled"===l&&a().createElement(u.Z,{title:o().text("End-dated crosswalk")},a().createElement(c.Z,{className:y.endDatedCrosswalkIcon})))}))},60925:(e,t,r)=>{r.d(t,{Z:()=>N});var n=r(24328),a=r.n(n),l=r(50914),o=r(2507),i=r.n(o),s=r(95038),c=r.n(s),u=r(31421),p=r(79312),d=r(6163),m=r(94059),b=r(67283),y=r(90590),f=r(39475),g=r(21210),v=r(40154),h=r(40435);function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(this,arguments)}const w=e=>a().createElement("svg",E({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M20.222 6C21.21 6 22 6.8 22 7.778v12.444C22 21.2 21.209 22 20.222 22H7.778C6.79 22 6 21.2 6 20.222V7.778C6 6.8 6.791 6 7.778 6h12.444zM20 8H8v12h12V8zM4 18H2V4c0-1.1.9-2 2-2h14v2H4v14z",id:"Copy_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Copy_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Copy_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#Copy_svg__b)",d:"M0 0h24v24H0z"})));var x=r(72342);const O=(0,x.makeStyles)((()=>({root:{display:"flex",justifyContent:"space-between",alignItems:"center",overflowWrap:"anywhere"},text:{fontSize:13},button:{flexShrink:0,marginLeft:8,padding:0,textTransform:"none"}}))),k=e=>{let{value:t}=e;const r=O();return a().createElement("div",{className:r.root},a().createElement(p.Z,{className:r.text,variant:"body2"},t),a().createElement(h.Z,{size:"XXS",icon:w,color:"primary",className:r.button,onClick:()=>navigator.clipboard.writeText(t)}))};var T=r(71153),C=r.n(T),S=r(91785);const I=(0,x.makeStyles)((()=>({timestampEditorInput:{paddingTop:15,paddingBottom:15,fontSize:13},timestampEditor:{height:38}}))),A=e=>{let{value:t,classes:r={},disabled:l=!1,onChange:o}=e;const i=I(),[s,c]=(0,n.useState)(t);(0,n.useEffect)((()=>{c(t)}),[t]);const u=(0,n.useCallback)((()=>{const e=null==s?void 0:s.valueOf();t!==e&&o(e)}),[o,s,t]);return a().createElement(S.Z,{slotProps:{textField:{variant:"filled",InputProps:{disableUnderline:!0,classes:{input:i.timestampEditorInput,root:C()(i.timestampEditor,r.root)},onBlur:u}}},value:s||null,disabled:l,onChange:c,onClose:u})};var Z=r(14596);const j=(0,x.makeStyles)((e=>({text:{fontSize:13},attributeWrapper:{display:"flex",alignItems:"center",paddingTop:5,paddingBottom:5,marginLeft:12},attributeTitle:{fontSize:13,width:135,color:e.palette.text.secondary},attributeValue:{paddingLeft:10,display:"flex",alignItems:"center",flexGrow:1},input:{paddingTop:14,paddingBottom:14,fontSize:13},editor:{flexGrow:1},moreButton:{marginLeft:24},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"}}))),N=e=>{let{crosswalk:t,canEditAttribute:r=!0,onEditAttribute:o,onDeleteAttribute:s}=e;const h=j(),[E,w]=(0,n.useState)([]),[x,O]=(0,n.useState)(null),T=(0,Z.AH)(),C=!("uri"in t),S=(0,n.useMemo)((()=>[{label:u.G39.sourceSystems.label,uri:"type"},{label:u.G39.value.label,uri:"value"},{label:u.G39.sourceTable.label,uri:"sourceTable",canBeAdded:C,canBeDeleted:C},{label:u.G39.createDate.label,uri:"createDate"},{label:u.G39.updateDate.label,uri:"updateDate"},{label:u.G39.deleteDate.label,uri:"deleteDate",canBeAdded:!0,canBeDeleted:!0},{label:u.G39.reltioLoadDate.label,uri:"reltioLoadDate"},{label:u.G39.publishDate.label,uri:"sourcePublishDate"}]),[]),I=(0,l.pipe)((0,l.filter)((0,l.propEq)("canBeAdded",!0)),(0,l.filter)((e=>!(0,l.has)(e.uri,t))),(0,l.filter)((e=>!E.includes(e.uri))))(S);return a().createElement(a().Fragment,null,I.length>0&&r&&a().createElement(b.Z,{label:i().text("Add attributes"),onApply:e=>{e.length>0&&w((t=>t.concat((0,l.map)((0,l.prop)("uri"),e))))},data:I}),S.map((e=>e.uri in t||E.includes(e.uri)?a().createElement("div",{key:e.uri,className:h.attributeWrapper},a().createElement(p.Z,{variant:"body2",className:h.attributeTitle},`${e.label}:`),a().createElement("div",{className:h.attributeValue},((e,t)=>{switch(e){case"type":{const r=(0,u.tH7)(T,t);return C?a().createElement(y.Z,{label:"",placeholder:t,className:h.editor,value:{value:t,label:r},options:(0,u.cwx)(T).sort((0,l.ascend)((0,l.prop)("label"))).map((e=>{let{uri:t,label:r}=e;return{value:t,label:r}})),onChange:t=>{let{value:r}=t;return o(e,r)},TextFieldProps:{InputProps:{disableUnderline:!0}}}):a().createElement(a().Fragment,null,a().createElement(g.Z,{className:h.sourceIcon,sourceType:t}),a().createElement(p.Z,{className:h.text,variant:"body2"},r))}case"sourceTable":return C?a().createElement(v.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:h.editor},required:!0,variant:"filled",value:t,onInput:t=>o(e,t.target.value),size:"small",InputProps:{disableUnderline:!0,classes:{input:h.input}}}):a().createElement(p.Z,{className:h.text,variant:"body2"},t);case"value":return C?a().createElement(v.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:h.editor},required:!0,variant:"filled",value:t,onInput:t=>o(e,t.target.value),size:"small",InputProps:{disableUnderline:!0,classes:{input:h.input}}}):a().createElement(k,{value:t});case"deleteDate":return a().createElement(A,{value:t&&c().utc((0,u.ZBU)(t)).valueOf(),onChange:t=>o(e,null==t?void 0:t.toString()),classes:{root:h.editor},disabled:!r});case"sourcePublishDate":case"createDate":case"updateDate":case"reltioLoadDate":return a().createElement(p.Z,{className:h.text,variant:"body2"},(0,u.o0x)(t));default:return null}})(e.uri,t[e.uri]),e.canBeDeleted&&a().createElement(f.k,{icon:d.Z,disabled:!r,onClick:()=>O(e.uri),size:"XS",tooltipTitle:i().text("Delete attribute"),showForDisabled:!0}))):null)),a().createElement(m.Z,{open:!!x,onClose:()=>O(null),onConfirm:()=>{return e=x,w((t=>(0,l.without)([e],t))),void((0,l.isNil)(t[e])||s(e));var e}}))}},10938:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(24328),a=r.n(n),l=r(13896),o=r(31421),i=r(79312),s=r(26752),c=r(23759),u=r(21210),p=r(14596);const d=(0,r(72342).makeStyles)({dragLayer:{position:"fixed",top:0,left:0,width:"100%",height:"100%",overflow:"hidden",zIndex:1300,pointerEvents:"none"},crosswalkPreview:{height:"28px",maxWidth:"394px",display:"flex",overflow:"hidden",padding:"6px",alignItems:"center",boxSizing:"border-box"},sourceLabel:{fontSize:"13px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},sourceIcon:{width:"16px",height:"16px",marginRight:"9px"}}),m=e=>{let{crosswalk:t}=e;const r=d(),n=(0,p.AH)(),l=(0,c.nX)(t),m=(0,o.tH7)(n,t.type);return a().createElement(s.Z,{color:l,className:r.crosswalkPreview},a().createElement(u.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(i.Z,{className:r.sourceLabel,variant:"body2"},m))},b=(0,n.memo)((()=>{var e;const t=d(),{isDragging:r,clientOffset:o,item:i}=(0,l.useDragLayer)((e=>({isDragging:e.isDragging(),clientOffset:e.getClientOffset(),item:e.getItem()}))),s=(0,n.useRef)(),c=(null===(e=s.current)||void 0===e?void 0:e.getBoundingClientRect())||{x:0,y:0},u=`translate(${(null==o?void 0:o.x)-(null==c?void 0:c.x)}px, ${(null==o?void 0:o.y)-(null==c?void 0:c.y)}px`;return r&&a().createElement("div",{ref:s,className:t.dragLayer},a().createElement("div",{style:{display:"flex",transform:u,WebkitTransform:u}},"Crosswalk"===i.type&&a().createElement(m,{crosswalk:i.crosswalk})))}))},89468:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(2507),o=r.n(l),i=r(38677),s=r(79312),c=r(60925),u=r(50914);const p=(0,r(72342).makeStyles)({caption:{paddingLeft:15,paddingTop:16,paddingBottom:8},controlButtons:{display:"flex",justifyContent:"flex-end",paddingBottom:10,paddingTop:20},cancelButton:{marginRight:20}}),d=e=>{let{className:t,onAdd:r,onClose:l}=e;const d=p(),[m,b]=(0,n.useState)({type:"",value:""});return a().createElement("div",{className:t},a().createElement(s.Z,{variant:"body1",className:d.caption},o().text("Add crosswalk")),a().createElement(c.Z,{crosswalk:m,onDeleteAttribute:e=>{b((0,u.dissoc)(e))},onEditAttribute:(e,t)=>{b((0,u.assoc)(e,t))}}),a().createElement("div",{className:d.controlButtons},a().createElement(i.Z,{className:d.cancelButton,onClick:l},o().text("Cancel")),a().createElement(i.Z,{color:"primary",onClick:()=>{r(m),l()},disabled:!m.type||!m.value},o().text("Add"))))}},71285:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(24328),a=r.n(n),l=r(23759),o=r(34802),i=r(31421),s=r(79312),c=r(26436),u=r(21210),p=r(40435),d=r(14596),m=r(72342);const b=(0,m.makeStyles)((()=>({root:e=>{let{isOpaque:t}=e;return{display:"flex",opacity:t?1:.38,transition:"opacity 0.3s"}},wrapper:e=>{let{isOpaque:t}=e;return{width:"100%",display:"flex",alignItems:"center",height:28,filter:t?null:"saturate(0%)",backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDcvMjYvMTMEw7WpAAAAeElEQVQ4ja3VuwrAIBBE0aup0uX/v9ImCCGSdIL4WF136+EwxcC6+3k/hAsxSREArvPAW2LAGFzFhqAG64JarAnuYBW4ixWgBZZBKwzAW2Ig7HAVCzHJ4AoGQsNVbAhqsC6oxZrgDlaBu1gBWmAZtMIA3MwLmMUAfmyqQ9/LD+oDAAAAAElFTkSuQmCC)"}},focusedIcon:{width:28,height:28,backgroundColor:"rgba(0, 0, 0, 0.12)",borderRadius:0,borderRight:"1px solid #fff"},sourceIcon:{height:"16px",width:"16px",marginLeft:"16px",marginRight:"9px",fontSize:"14px"}}))),y=(0,n.memo)((e=>{let{crosswalkType:t,focusable:r=!0}=e;const{isDimmed:n}=(0,l.pu)(),o=b({isOpaque:!n}),m=(0,d.AH)(),y=(0,i.tH7)(m,t);return a().createElement("div",{className:o.root},a().createElement(p.Z,{size:"XXS",className:o.focusedIcon,icon:r&&c.Z,disabled:!0}),a().createElement("div",{className:o.wrapper},a().createElement(u.Z,{className:o.sourceIcon,sourceType:t}),a().createElement(s.Z,{variant:"body2"},y)))}));var f=r(2507),g=r.n(f),v=r(13896),h=r(42484),E=r(6163),w=r(85777),x=r(40007),O=r(26752),k=r(94059),T=r(39475),C=r(79935),S=r(19540),I=r(60925);const A=(0,m.makeStyles)({root:e=>{let{isOpaque:t}=e;return{display:"flex",opacity:t?1:.19,transition:"opacity 0.3s"}},header:{width:"100%",display:"flex",alignItems:"center",height:"28px"},focusedIcon:e=>{let{isFocused:t}=e;return{width:"26px","&:not([disabled])":{border:"1px solid rgba(0, 0, 0, 0.12)"},height:"28px",color:t?"#000":"rgba(0, 0, 0, 0.54)",borderRadius:0,margin:"0px 1px"}},crosswalkWrapper:{width:"100%",overflow:"hidden"},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"},attributesWrapper:e=>{let{color:t}=e;return{border:"1px solid",borderColor:t,position:"relative"}},deleteCrosswalkButton:{position:"absolute",top:5,right:5},labelValue:{marginLeft:5},dependentIcon:{width:"16px",height:"16px",fillOpacity:.38}}),Z=(0,n.memo)((e=>{let{crosswalk:t,isDependent:r,isEmpty:o=!1,isColored:p=!0,focusable:m=!0,disableEdit:b,disableDelete:y,onDelete:f,onEdit:Z}=e;const j=(0,n.useRef)(null),[N,D]=(0,n.useState)(!1),[P,V]=(0,n.useState)(!1),R=(0,d.AH)(),U=(0,l.nX)(t),{toggleCrosswalkFocus:M,isFocused:W}=(0,l.BF)(t),{isDimmed:H,highlightCrosswalk:L,removeHighlight:z}=(0,l.pu)(t),[B]=(0,l.RT)(),F=o?"#FFF":p?H?"rgba(0, 0, 0, 0.12)":U:"#CACCD1",Y=(0,i.tH7)(R,t.type),_=(0,i.nIW)(t.uri),G=(0,i.x_)(t),q=A({color:F,isOpaque:!H,isFocused:W}),[,X,$]=(0,v.useDrag)({item:{type:"Crosswalk",crosswalk:t},canDrag:!G}),Q=!G&&"relation"!==t.ownerType;return(0,n.useEffect)((()=>{$((0,h.r)(),{captureDraggingState:!0})}),[]),(0,n.useEffect)((()=>{var e;m&&B&&(0,i.aFF)(B,t)&&B!==t&&(null==j||null===(e=j.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}))}),[B]),a().createElement("div",{className:q.root,ref:j},a().createElement(T.k,{size:"XXS",className:q.focusedIcon,icon:m&&c.Z,onClick:()=>M(),disabled:!m,tooltipTitle:m&&g().text("Focus")}),a().createElement("div",{className:q.crosswalkWrapper},a().createElement(O.Z,{ref:X,className:q.header,color:F,variant:G?"disabled":"standart",onMouseEnter:()=>L(),onMouseLeave:()=>z()},r&&a().createElement(S.Z,{className:q.dependentIcon}),a().createElement(w.Z,{onClick:()=>D((e=>!e)),expanded:N}),a().createElement(u.Z,{className:q.sourceIcon,sourceType:t.type}),a().createElement(x.Z,{value:Y},a().createElement(s.Z,{variant:"body2",noWrap:!0},Y)),a().createElement(C.Z,null),a().createElement(x.Z,{value:t.value},a().createElement(s.Z,{variant:"body2",className:q.labelValue,noWrap:!0},t.value))),N&&a().createElement("div",{className:q.attributesWrapper},Q&&a().createElement("div",{className:q.deleteCrosswalkButton},a().createElement(T.k,{icon:E.Z,disabled:y,onClick:()=>V(!0),size:"XS",tooltipTitle:y?g().text("You don't have permissions to delete"):g().text("Delete crosswalk"),showForDisabled:!0}),a().createElement(k.Z,{open:P,onConfirm:()=>{W&&M(),f(_)},onClose:()=>V(!1)})),a().createElement(I.Z,{crosswalk:t,canEditAttribute:!b,onEditAttribute:(e,t)=>{Z({crosswalkId:_,attributeName:e,value:t})},onDeleteAttribute:e=>{Z({crosswalkId:_,attributeName:e})}}))))}));var j=r(55485);const N=(0,m.makeStyles)((()=>({root:{display:"flex",alignItems:"center",height:"28px",paddingLeft:"37px"}}))),D=e=>{let{showMore:t,onClick:r}=e;const n=N();return a().createElement(j.Z,{className:n.root,component:"button",variant:"caption",underline:"none",onClick:r},a().createElement("span",null,t?g().text("View dependent crosswalks"):g().text("Hide dependent crosswalks")))},P=e=>{let{source:t,crosswalksByTypes:r,showCrosswalkColors:s=!0,crosswalksFocusEnabled:c=!0,expanded:u,disableEditCrosswalk:p,disableDeleteCrosswalk:d,onEdit:m,onDelete:b,onToggleExpanded:f}=e;const g=(0,l.RT)();return(0,n.useEffect)((()=>{!u&&c&&r[o.Y.Dependent].some((e=>g.some((0,i.aFF)(e))))&&f()}),[g]),a().createElement(a().Fragment,null,0===r[o.Y.Simple].length&&0===r[o.Y.Empty].length&&a().createElement(y,{crosswalkType:t,focusable:c}),r[o.Y.Simple].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,focusable:c,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,isColored:s}))),r[o.Y.Empty].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,focusable:c,isEmpty:!0,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,isColored:s}))),u&&r[o.Y.Dependent].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,isDependent:!0,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,focusable:c,isColored:s}))),r[o.Y.Dependent].length>0&&a().createElement(D,{showMore:!u,onClick:()=>f()}))}},73972:(e,t,r)=>{r.d(t,{P:()=>i});var n=r(24328),a=r(50914),l=r(31421),o=r(79573);const i=e=>{let{onLoad:t=o.ZT,onSuccess:r=o.ZT,onError:i=o.ZT}=e;const s=(0,n.useCallback)((e=>{t(),e.then((e=>{let{errors:t}=e;if(t)throw t;r()})).catch(i)}),[t,i,r]);return{addCrosswalk:(0,n.useCallback)((e=>{let{entity:t,contributorCrosswalk:r,crosswalk:n}=e;const o=r?(0,l.psB)({entityTypeUri:t.type,contributorCrosswalkType:r.type,contributorCrosswalkValue:r.value,contributorCrosswalkSourceTable:r.sourceTable,crosswalkType:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,crosswalkDeleteDate:n.deleteDate}):(0,l.kRE)({entityUri:t.uri,crosswalk:n});(0,a.pipe)((0,a.andThen)((e=>{let[t]=e;return t})),s)(o)}),[s]),editCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:o}=e;(0,a.pipe)((0,a.ifElse)((e=>{let{value:t}=e;return(0,a.isNil)(t)}),l.K$w,l.WVU),(0,a.andThen)((e=>{let[t]=e;return t})),s)({entityUri:t,crosswalkId:r,attributeName:n,value:o})}),[s]),deleteCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r}=e;(0,a.pipe)(l.Gmt,s)({entityUri:t,crosswalkId:r})}),[s])}}},82658:(e,t,r)=>{r.d(t,{Q:()=>u});var n=r(24328),a=r(31421),l=r(50914),o=r(79573);function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){s(e,t,r[t])}))}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const c=[],u=e=>{let{entity:t,onLoad:r=o.ZT,onModify:s=o.ZT,onError:u=o.ZT}=e;const[p,d]=(0,n.useState)(null),[m,b]=(0,n.useState)([]),[y,f]=(0,n.useState)(null),g=(0,n.useRef)([]),v=(0,n.useRef)(null),h=(0,n.useCallback)((()=>{v.current=null}),[]),[E,w]=(0,n.useState)(c),x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce(((e,t)=>((0,a.sJj)(t).forEach((r=>{e[r]=[...e[r]||[],t]})),e)),{})};(0,n.useEffect)((()=>{const e={entity:x(null==t?void 0:t.crosswalks),relation:(0,l.pipe)(a.PUO,x)(t)};if((null==p?void 0:p.uri)===(null==t?void 0:t.uri)&&v.current){const{ownerType:t}=v.current,r=Object.keys(e[t]),n=Object.keys(y[t]);w((0,l.difference)(r,n)),b([])}else w(c);h(),d(t),f(e),g.current=[]}),[t]);const O=(0,n.useCallback)((0,l.pipe)(u,h),[u,h]),{deleteAttribute:k,ignoreAttribute:T,pinAttribute:C,createAttribute:S,updateAttribute:I}=(e=>{let{onSuccess:t=o.ZT,onError:r=o.ZT,onLoad:i=o.ZT}=e;const s=(0,n.useCallback)((e=>{i(),e.then((()=>{t()})).catch(r)}),[r,t,i]),c=(0,n.useCallback)((e=>e.then((e=>{if("error"in e)throw e.error;return e}))),[]);return{deleteAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,attributeType:r,crosswalks:n}=e;const o=(0,a.YkG)(r)?(0,l.pipe)(a.o96,(0,l.prop)("objectURI"),a.VGk,c)(t):Promise.all((n||[]).map((e=>{let{type:r,value:n,sourceTable:l}=e;return c((0,a.xZs)({attributeUri:t.uri,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:l}))})));s(o)}),[s,c]),pinAttribute:(0,n.useCallback)((e=>{let{attributeValue:t}=e;(0,l.pipe)(a.xkv,c,s)({attributeUri:t.uri,value:!t.pin})}),[s,c]),ignoreAttribute:(0,n.useCallback)((e=>{let{attributeValue:t}=e;(0,l.pipe)(a.P8_,c,s)({attributeUri:t.uri,value:!t.ignored})}),[s,c]),updateAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,attributeType:r,crosswalk:n}=e;(0,a.YkM)(r)||(0,a.Or$)(r)||(0,l.pipe)(a.tCj,c,s)({attributeUri:t.uri,sourceUri:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,value:(0,a.CwH)(r)?t.lookupCode:t.value})}),[s,c]),createAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,crosswalk:r}=e;(0,l.pipe)(a.JV_,(0,l.andThen)((e=>{let[{errors:t}]=e;if(t)throw t})),s)({attributeUri:t.uri,sourceUri:r.type,crosswalkValue:r.value,crosswalkSourceTable:r.sourceTable,value:t.value})}),[s])}})({onLoad:r,onSuccess:s,onError:O}),A=(0,n.useCallback)((e=>{let{attributeType:t,parentUri:r,crosswalk:n,index:o}=e;const s=(0,a.gjI)({parentUri:r,attributeType:t}),{uri:c}=s;if(n){const{ownerType:e}=n;f((t=>i({},t,{[e]:i({},t[e],{[c]:[n]})})))}d((e=>{var n;return(0,l.isNil)(o)&&(o=null===(n=(0,a.JQy)(e,r,t.name))||void 0===n?void 0:n.length),(0,a.wLZ)({entity:e,attributeType:t,newAttribute:s,index:o})})),g.current.some((e=>(0,a.sOy)(c,e)))||g.current.push(c),m.includes(s.uri)||b((e=>[...e,s.uri]))}),[]),Z=(0,n.useCallback)((e=>{const{attributeValue:{uri:t},attributeType:r}=e;(0,a.ZiX)(t)?(d((e=>(0,a.d$I)({entity:e,attributeType:r,uri:t}))),f((0,l.evolve)({entity:(0,l.dissoc)(t),relation:(0,l.dissoc)(t)})),g.current=(0,l.without)([t],g.current)):k(e)}),[k]),j=(0,n.useCallback)((e=>{if((0,a.ZiX)(e.attributeValue.uri)){const{attributeValue:t,attributeType:r,crosswalk:n}=e;if(!(0,l.isNil)(t.value)){const{uri:e}=t,l=g.current.find((t=>(0,a.sOy)(e,t))),o=(0,a.ww$)({entity:p,attributeType:r,uri:e,value:(0,a.kDl)(t)});S({attributeValue:(0,a.dLR)(o,l),crosswalk:n}),v.current=n}}else I(e)}),[S,I,p]);return{modifiedEntity:p,crosswalksMap:y,onAddAttribute:A,onDeleteAttribute:Z,onPinAttribute:C,onIgnoreAttribute:T,onEditAttribute:j,newlyCreatedAttributes:E,emptyTempAttributeUris:m}}},34802:(e,t,r)=>{let n;r.d(t,{Y:()=>n}),function(e){e.Simple="simple",e.Empty="empty",e.Dependent="dependent"}(n||(n={}))},10765:(e,t,r)=>{r.d(t,{o:()=>s});var n=r(31421),a=r(50914),l=r(34802);const o=e=>e[l.Y.Simple].length>0?1:e[l.Y.Dependent].length>0?e[l.Y.Empty].length>0?2:3:4,i=(0,a.evolve)({[l.Y.Dependent]:(0,a.sort)(((e,t)=>{const r=e.sourceTable||"",n=t.sourceTable||"";return r===n?0:r?n?r<n?-1:1:-1:1}))}),s=(0,a.curry)(((e,t,r)=>{const s=(r||[]).reduce(((r,o)=>(r[o.type]||(r[o.type]={[l.Y.Simple]:[],[l.Y.Empty]:[],[l.Y.Dependent]:[]}),"relation"===o.ownerType?r[o.type][l.Y.Dependent].push(o):((e,t,r)=>0===(0,n.sJj)(r).filter((r=>{const l=(0,n.AFK)(r,e);return t.some((0,a.propEq)("uri",l))})).length)(e,t,o)?r[o.type][l.Y.Empty].push(o):((e,t,r)=>!(0,n.sJj)(r).some((r=>{const l=(0,n.AFK)(r,e),o=t.find((0,a.propEq)("uri",l));return o&&!(0,n.YkM)(o)})))(e,t,o)?r[o.type][l.Y.Dependent].push(o):r[o.type][l.Y.Simple].push(o),r)),{});return Object.keys(s).sort(((e,t)=>o(s[e])-o(s[t])||(e<t?-1:1))).map((e=>({source:e,crosswalksByTypes:i(s[e])})))}))},38361:(e,t,r)=>{r.d(t,{R:()=>i,Q:()=>s});var n=r(24328),a=r.n(n),l=r(31421);const o=(0,n.createContext)(null),i=e=>{let{children:t,attributeUris:r}=e;return a().createElement(o.Provider,{value:r},t)},s=e=>((0,n.useContext)(o)||[]).some((t=>(0,l.sOy)(t,e)))}}]);
2
2
  //# sourceMappingURL=2066.js.map
package/2400.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="da2557fe-15d1-4b36-b55c-62e9ec5c8c13",e._sentryDebugIdIdentifier="sentry-dbid-da2557fe-15d1-4b36-b55c-62e9ec5c8c13")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1650"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2400],{72400:(e,n,d)=>{d.r(n),d.d(n,{default:()=>a,dataTenants:()=>t.Yj,environment:()=>t.NZ,metadata:()=>t.Pu,profile:()=>t.N5,search:()=>t.yC,tenant:()=>t.cm,tenants:()=>t.ah,ui:()=>t.ui,useMdmModule:()=>t.vF,user:()=>t.EA});var t=d(59464);const a=t.ZP}}]);
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="da2557fe-15d1-4b36-b55c-62e9ec5c8c13",e._sentryDebugIdIdentifier="sentry-dbid-da2557fe-15d1-4b36-b55c-62e9ec5c8c13")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1651"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2400],{72400:(e,n,d)=>{d.r(n),d.d(n,{default:()=>a,dataTenants:()=>t.Yj,environment:()=>t.NZ,metadata:()=>t.Pu,profile:()=>t.N5,search:()=>t.yC,tenant:()=>t.cm,tenants:()=>t.ah,ui:()=>t.ui,useMdmModule:()=>t.vF,user:()=>t.EA});var t=d(59464);const a=t.ZP}}]);
2
2
  //# sourceMappingURL=2400.js.map
package/281.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3fdcd84c-314a-4471-9a49-8ddc95a53fad",e._sentryDebugIdIdentifier="sentry-dbid-3fdcd84c-314a-4471-9a49-8ddc95a53fad")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1650"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[281],{30488:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(38748),o=n(50548);const i=e=>t=>(0,o.l)(r.X,e,t)},82565:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),o=n.n(r),i=n(12115);function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const s=(0,n(72342).makeStyles)((e=>({basicViewPaper:a({display:"flex",flexDirection:"column"},e.basicView)})));function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}const u=(0,r.forwardRef)(((e,t)=>{let{children:n,className:r}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","className"]);const l=s();return o().createElement(i.Z,c({ref:t,className:r,classes:{root:l.basicViewPaper}},a),n)}));u.displayName="BasicView";const d=u},17998:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),o=n.n(r),i=n(2507),a=n.n(i),l=n(26482),s=n(79312);const c=(0,n(72342).makeStyles)({toolbar:{minHeight:"48px",padding:"8px 24px",lineHeight:"28px"},title:{fontSize:"18px",minWidth:"50px",fontWeight:"normal",lineHeight:"inherit",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}});function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const d=e=>{let{title:t="",children:n=null,classes:r={}}=e,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["title","children","classes"]);const d=c();return o().createElement(l.Z,u({className:r.root,classes:{root:d.toolbar}},i),o().createElement(s.Z,{className:r.title,classes:{root:d.title},variant:"h6"},a().text(t)),n)}},89902:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(24328),o=n.n(r),i=n(71153),a=n.n(i),l=n(50914);const s=(0,n(72342).makeStyles)((e=>({bar:{backgroundColor:e.palette.secondary.main,opacity:.12,position:"absolute",minHeight:"20px",minWidth:"5px",borderRadius:"2px",top:0,left:0,height:"100%"}}))),c=e=>(0,l.is)(Number,e),u=e=>{let{className:t,width:n=0,maxWidth:i}=e;const l=s(),u=(0,r.useCallback)((e=>(i?100*e/i:0)+"%"),[i]);return n?o().createElement("div",{className:a()(l.bar,t),style:{width:c(n)?u(n):n}}):null}},98538:(e,t,n)=>{n.d(t,{Z:()=>O});var r=n(24328),o=n.n(r),i=n(71153),a=n.n(i),l=n(50914),s=n(38677),c=n(18960),u=n(55962),d=n(80852),p=n(95341),m=n(79312),h=n(78223),g=n(47591);const b=(0,n(72342).makeStyles)((e=>({buttonRoot:{"&$selected":{color:e.palette.action.active,backgroundColor:(0,g.Fq)(e.palette.action.active,.12),"&:hover":{backgroundColor:(0,g.Fq)(e.palette.action.active,.15)}}},selected:{},paper:{minWidth:"112px"},menuItem:{minHeight:"32px"},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0}}))),f=(0,h.Z)(p.Z),y=(0,r.forwardRef)(((e,t)=>{let{item:n,onMenuClose:r=l.identity}=e;const i=b(),{disabled:a,text:s,tooltip:c,onClick:u,id:p="",selectable:h,selected:g}=n;return o().createElement(f,{tooltipTitle:c,showForDisabled:!0,classes:{root:i.menuItem},onClick:e=>{r(e),u(e)},disabled:a,ref:t,"data-modal":!0,"data-reltio-id":`reltio-search-menu-item${p}`},h&&o().createElement(d.Z,{checked:g,color:"primary"}),o().createElement(m.Z,{classes:{root:i.menuText}},s))}));y.displayName="MenuItemRenderer";const v=y;function w(){return w=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},w.apply(this,arguments)}function x(e){let{className:t,menuId:n,buttonComponent:i=s.Z,buttonContent:d,menuItems:p=[],buttonProps:m={},popoverProps:h={},onMenuOpen:g=l.identity,onMenuClose:f=l.identity,MenuItemRenderer:y=v}=e;const x=i,O=b(),k=(0,r.useRef)(),[E,S]=(0,r.useState)(!1);(0,u.D)((()=>{E?g():f()}),[E]);const z=(0,r.useCallback)((e=>{null==e||e.stopPropagation(),S((e=>!e))}),[]);return o().createElement(o().Fragment,null,o().createElement(x,w({"data-reltio-id":"drop-down-menu-button",ref:k,className:a()(O.buttonRoot,{[O.selected]:E},t),onClick:z,"aria-pressed":E,"aria-controls":E?n:void 0,"aria-haspopup":"true"},m),d),o().createElement(c.Z,w({id:n,variant:"menu",open:E,autoFocus:!1,classes:{paper:O.paper},anchorEl:k.current,onClose:z,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},elevation:2,MenuListProps:{autoFocusItem:E}},h),p.map(((e,t)=>o().createElement(y,{item:e,key:t,onMenuClose:z})))))}x.displayName="DropDownMenuButton";const O=x},7882:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(24328),o=n.n(r);class i extends o().Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){this.setState({error:e}),console.error(e)}render(){const{children:e,error:t}=this.props;return this.state.error?t:e}}},14593:(e,t,n)=>{n.d(t,{Z:()=>C});var r=n(24328),o=n.n(r),i=n(66244),a=n.n(i),l=n(44443),s=n(50914),c=n(71153),u=n.n(c);function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){p(e,t,n[t])}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const h=e=>{let{x:t,y:n,width:r,height:o,id:i,minWidth:a,minHeight:l,maxWidth:s,maxHeight:c,isStatic:u}=e;return{x:t,y:n,w:r,h:o,minW:a,minH:l,maxW:s,maxH:c,i,static:u}},g=e=>{let{x:t,y:n,w:r,h:o,maxW:i,minW:a,minH:l,maxH:s,i:c}=e;return{x:t,y:n,width:r,height:o,minWidth:a,minHeight:l,maxWidth:i,maxHeight:s,id:c,isStatic:m(e,["x","y","w","h","maxW","minW","minH","maxH","i"]).static}},b=e=>(e||[]).map(g),f=(0,s.curry)(((e,t)=>(e||[]).find((0,s.propEq)("id",t)))),y=(0,s.curry)(((e,t,n)=>(0,s.mergeAll)([n,(0,s.pick)(e,t)]))),v=(0,s.curry)(((e,t,n)=>(n||[]).map((n=>(0,s.pipe)((0,s.prop)("id"),f(t),(0,s.defaultTo)({}),y(e,s.__,n))(n))))),w=(0,s.curry)(((e,t)=>t.map((n=>{const r=t.filter((e=>e.y===n.y)).map((t=>e[t.id]||!t.autosizing&&t.minHeight||0)),o=Math.max(...r);if(n.height!==o&&o){const e=n.autosizing?{minHeight:o,maxHeight:o}:{};return d({},n,e,{height:o})}return n})))),x=(0,s.curry)(((e,t)=>t.map((t=>{const n=e[t.id];return n&&t.autosizing?d({},t,{minHeight:n,maxHeight:n,height:n}):t}))));var O=n(79573),k=n(72342),E=n(31421);const S=(0,k.makeStyles)((e=>({gridLayout:{position:"relative",width:"100%","& .react-grid-item":{"&.react-grid-placeholder":{background:"rgba(0, 0, 0, 0.03)",border:"2px dashed rgba(0, 0, 0, 0.3)",borderRadius:"3px",transitionDuration:"100ms",zIndex:7,userSelect:"none","& .react-resizable-handle":{display:"none"}},"&.static .react-resizable-handle":{display:"none"},"&.customView .react-resizable-handle":{width:"10px",height:"10px"},"&.cssTransforms":{transitionProperty:"transform"},"&.react-draggable-dragging":{transition:"none",zIndex:8,willChange:"transform","& .react-resizable-handle":{backgroundImage:"none"}},"& .react-resizable-handle":{position:"absolute",width:"14px",height:"14px",bottom:0,right:0,zIndex:20,backgroundImage:`url('${(0,E.m5F)('<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path stroke="#505050" stroke-opacity=".54" d="M9.5 0v10M0 9.5h9M7.5 4v4M4 7.5h3"/>\n</svg>')}')`,backgroundRepeat:"no-repeat",backgroundOrigin:"content-box",boxSizing:"border-box",cursor:"se-resize"},"&.fullscreen":{visibility:"visible",position:"unset",width:"100% !important",height:"100% !important",transform:"translate(0) !important"}}},gridFullscreen:{height:"100% !important",overflowY:"hidden","& .react-resizable-handle, & .react-grid-item":{visibility:"hidden"}},isResizing:{zIndex:9,willChange:"width, height",pointerEvents:"none"}})));function z(){return z=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},z.apply(this,arguments)}const j={cols:4,rowHeight:30,margin:[15,15]},H=e=>{let{views:t,layout:n,layoutOptions:i=j,onLayoutChanged:c=O.ZT,draggableHandle:d,LayoutItem:p,onRemove:m,onDrop:y,droppingItem:k,isDroppable:E,isStatic:H,classes:C}=e;const I=(0,r.useRef)(),Z=(0,r.useRef)({}),R=S(),[P,N]=(0,r.useState)(null),[D,M]=(0,r.useState)(null),[W,F]=(0,r.useState)(0),{cols:_,rowHeight:T,margin:L}=i,V=(0,r.useMemo)((()=>(e=>(e||[]).map(h))(n)),[n]),B=(0,s.pipe)(b,v(["autosizing"],n),(0,s.ifElse)((0,s.always)(H),w(Z.current),x(Z.current)),c),$=(0,r.useCallback)((e=>M((t=>t?null:e))),[]),q=null!==D;return o().createElement(o().Fragment,null,o().createElement(l.Z,{refreshMode:"debounce",refreshRate:50,handleWidth:!0,onResize:e=>F(e)}),!!W&&o().createElement(a(),{innerRef:I,layout:V,cols:_,draggableHandle:d,autoSize:!0,rowHeight:T,width:W,margin:L,onLayoutChange:H?void 0:B,isResizable:!H&&!q,isDraggable:!H&&!q,className:u()(null==C?void 0:C.root,R.gridLayout,{[R.gridFullscreen]:q}),onDrop:(e,t,n)=>{y&&y(b(e),g(t),n)},droppingItem:k,isDroppable:!H&&E,onResizeStart:(e,t)=>N(t.i),onResizeStop:()=>N(null),"data-reltio-id":"reltio-grid-layout"},V.map((e=>{const r=D===e.i,a=P===e.i,s=(f(n,e.i)||{}).autosizing?{AutosizeComponent:(c=e.i,o().createElement(l.Z,{handleHeight:!0,onResize:(e,t)=>{if(t){const e=((e,t)=>{const{margin:n,rowHeight:r}=t;return Math.ceil((e+n[1])/(r+n[1]))})(t,i);e!==Z.current[c]&&(Z.current[c]=e,B(V))}}}))}:{};var c;return o().createElement(p,z({key:e.i,layoutItemConfig:e,views:t,onToggleFullscreen:$,onRemove:m,className:u()(null==C?void 0:C.item,{static:H,fullscreen:r,[R.isResizing]:a}),isFullscreen:r},s))}))))};H.displayName="ReltioGridLayout";const C=(0,r.memo)(H)},43129:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(24328),o=n.n(r),i=n(30750);const a=(0,n(72342).makeStyles)({loader:{width:"100%",top:0,left:0,position:"absolute",borderRadius:"2px"}}),l=()=>{const e=a();return o().createElement(i.Z,{color:"primary",className:e.loader,"data-reltio-id":"dashboard-item-loader"})}},60355:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),o=n.n(r),i=n(18960),a=n(95341),l=n(83993),s=n(82056),c=n(87037),u=n(50985);const d=(0,n(72342).makeStyles)((()=>({menuItemTitle:{fontSize:"13px",lineHeight:"15px"},openIcon:{padding:"4px",borderRadius:"2px",marginRight:"-10px"}}))),p=e=>{let{items:t}=e;const[n,p]=(0,r.useState)(null),m=Boolean(n),h=d(),g=()=>p(null),b=e=>()=>{g(),e()};return o().createElement(o().Fragment,null,o().createElement(c.Z,{className:h.openIcon,"aria-controls":"menu","aria-haspopup":"true",onClick:e=>p(e.currentTarget),size:"large"},o().createElement(u.Z,null)),o().createElement(i.Z,{id:"facet-menu",anchorEl:n,open:m,onClose:g,elevation:2,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},t.filter((e=>e.active)).map((e=>{let{id:t,icon:n,title:r,action:i,disabled:c=!1}=e;return o().createElement(a.Z,{key:t,onClick:b(i),disabled:c},o().createElement(l.Z,null,n),o().createElement(s.Z,{classes:{primary:h.menuItemTitle}},r))}))))}},65298:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),o=n.n(r),i=n(82565),a=n(52388);const l=(0,n(72342).makeStyles)((()=>({view:{flex:1,width:"100%",height:"100%",overflow:"hidden",boxShadow:"none"}}))),s=e=>{let{id:t,children:n}=e;const r=l();return o().createElement(a.H.Provider,{value:t},o().createElement(i.Z,{className:r.view,"data-reltio-id":`layout-item-${t}`},n))}},52388:(e,t,n)=>{n.d(t,{H:()=>o});var r=n(24328);const o=n.n(r)().createContext(null);o.displayName="DashboardViewIdContext"}}]);
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3fdcd84c-314a-4471-9a49-8ddc95a53fad",e._sentryDebugIdIdentifier="sentry-dbid-3fdcd84c-314a-4471-9a49-8ddc95a53fad")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1651"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[281],{30488:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(38748),o=n(50548);const i=e=>t=>(0,o.l)(r.X,e,t)},82565:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),o=n.n(r),i=n(12115);function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const s=(0,n(72342).makeStyles)((e=>({basicViewPaper:a({display:"flex",flexDirection:"column"},e.basicView)})));function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}const u=(0,r.forwardRef)(((e,t)=>{let{children:n,className:r}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","className"]);const l=s();return o().createElement(i.Z,c({ref:t,className:r,classes:{root:l.basicViewPaper}},a),n)}));u.displayName="BasicView";const d=u},17998:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),o=n.n(r),i=n(2507),a=n.n(i),l=n(26482),s=n(79312);const c=(0,n(72342).makeStyles)({toolbar:{minHeight:"48px",padding:"8px 24px",lineHeight:"28px"},title:{fontSize:"18px",minWidth:"50px",fontWeight:"normal",lineHeight:"inherit",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}});function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const d=e=>{let{title:t="",children:n=null,classes:r={}}=e,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["title","children","classes"]);const d=c();return o().createElement(l.Z,u({className:r.root,classes:{root:d.toolbar}},i),o().createElement(s.Z,{className:r.title,classes:{root:d.title},variant:"h6"},a().text(t)),n)}},89902:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(24328),o=n.n(r),i=n(71153),a=n.n(i),l=n(50914);const s=(0,n(72342).makeStyles)((e=>({bar:{backgroundColor:e.palette.secondary.main,opacity:.12,position:"absolute",minHeight:"20px",minWidth:"5px",borderRadius:"2px",top:0,left:0,height:"100%"}}))),c=e=>(0,l.is)(Number,e),u=e=>{let{className:t,width:n=0,maxWidth:i}=e;const l=s(),u=(0,r.useCallback)((e=>(i?100*e/i:0)+"%"),[i]);return n?o().createElement("div",{className:a()(l.bar,t),style:{width:c(n)?u(n):n}}):null}},98538:(e,t,n)=>{n.d(t,{Z:()=>O});var r=n(24328),o=n.n(r),i=n(71153),a=n.n(i),l=n(50914),s=n(38677),c=n(18960),u=n(55962),d=n(80852),p=n(95341),m=n(79312),h=n(78223),g=n(47591);const b=(0,n(72342).makeStyles)((e=>({buttonRoot:{"&$selected":{color:e.palette.action.active,backgroundColor:(0,g.Fq)(e.palette.action.active,.12),"&:hover":{backgroundColor:(0,g.Fq)(e.palette.action.active,.15)}}},selected:{},paper:{minWidth:"112px"},menuItem:{minHeight:"32px"},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0}}))),f=(0,h.Z)(p.Z),y=(0,r.forwardRef)(((e,t)=>{let{item:n,onMenuClose:r=l.identity}=e;const i=b(),{disabled:a,text:s,tooltip:c,onClick:u,id:p="",selectable:h,selected:g}=n;return o().createElement(f,{tooltipTitle:c,showForDisabled:!0,classes:{root:i.menuItem},onClick:e=>{r(e),u(e)},disabled:a,ref:t,"data-modal":!0,"data-reltio-id":`reltio-search-menu-item${p}`},h&&o().createElement(d.Z,{checked:g,color:"primary"}),o().createElement(m.Z,{classes:{root:i.menuText}},s))}));y.displayName="MenuItemRenderer";const v=y;function w(){return w=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},w.apply(this,arguments)}function x(e){let{className:t,menuId:n,buttonComponent:i=s.Z,buttonContent:d,menuItems:p=[],buttonProps:m={},popoverProps:h={},onMenuOpen:g=l.identity,onMenuClose:f=l.identity,MenuItemRenderer:y=v}=e;const x=i,O=b(),k=(0,r.useRef)(),[E,S]=(0,r.useState)(!1);(0,u.D)((()=>{E?g():f()}),[E]);const z=(0,r.useCallback)((e=>{null==e||e.stopPropagation(),S((e=>!e))}),[]);return o().createElement(o().Fragment,null,o().createElement(x,w({"data-reltio-id":"drop-down-menu-button",ref:k,className:a()(O.buttonRoot,{[O.selected]:E},t),onClick:z,"aria-pressed":E,"aria-controls":E?n:void 0,"aria-haspopup":"true"},m),d),o().createElement(c.Z,w({id:n,variant:"menu",open:E,autoFocus:!1,classes:{paper:O.paper},anchorEl:k.current,onClose:z,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},elevation:2,MenuListProps:{autoFocusItem:E}},h),p.map(((e,t)=>o().createElement(y,{item:e,key:t,onMenuClose:z})))))}x.displayName="DropDownMenuButton";const O=x},7882:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(24328),o=n.n(r);class i extends o().Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){this.setState({error:e}),console.error(e)}render(){const{children:e,error:t}=this.props;return this.state.error?t:e}}},14593:(e,t,n)=>{n.d(t,{Z:()=>C});var r=n(24328),o=n.n(r),i=n(66244),a=n.n(i),l=n(44443),s=n(50914),c=n(71153),u=n.n(c);function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){p(e,t,n[t])}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const h=e=>{let{x:t,y:n,width:r,height:o,id:i,minWidth:a,minHeight:l,maxWidth:s,maxHeight:c,isStatic:u}=e;return{x:t,y:n,w:r,h:o,minW:a,minH:l,maxW:s,maxH:c,i,static:u}},g=e=>{let{x:t,y:n,w:r,h:o,maxW:i,minW:a,minH:l,maxH:s,i:c}=e;return{x:t,y:n,width:r,height:o,minWidth:a,minHeight:l,maxWidth:i,maxHeight:s,id:c,isStatic:m(e,["x","y","w","h","maxW","minW","minH","maxH","i"]).static}},b=e=>(e||[]).map(g),f=(0,s.curry)(((e,t)=>(e||[]).find((0,s.propEq)("id",t)))),y=(0,s.curry)(((e,t,n)=>(0,s.mergeAll)([n,(0,s.pick)(e,t)]))),v=(0,s.curry)(((e,t,n)=>(n||[]).map((n=>(0,s.pipe)((0,s.prop)("id"),f(t),(0,s.defaultTo)({}),y(e,s.__,n))(n))))),w=(0,s.curry)(((e,t)=>t.map((n=>{const r=t.filter((e=>e.y===n.y)).map((t=>e[t.id]||!t.autosizing&&t.minHeight||0)),o=Math.max(...r);if(n.height!==o&&o){const e=n.autosizing?{minHeight:o,maxHeight:o}:{};return d({},n,e,{height:o})}return n})))),x=(0,s.curry)(((e,t)=>t.map((t=>{const n=e[t.id];return n&&t.autosizing?d({},t,{minHeight:n,maxHeight:n,height:n}):t}))));var O=n(79573),k=n(72342),E=n(31421);const S=(0,k.makeStyles)((e=>({gridLayout:{position:"relative",width:"100%","& .react-grid-item":{"&.react-grid-placeholder":{background:"rgba(0, 0, 0, 0.03)",border:"2px dashed rgba(0, 0, 0, 0.3)",borderRadius:"3px",transitionDuration:"100ms",zIndex:7,userSelect:"none","& .react-resizable-handle":{display:"none"}},"&.static .react-resizable-handle":{display:"none"},"&.customView .react-resizable-handle":{width:"10px",height:"10px"},"&.cssTransforms":{transitionProperty:"transform"},"&.react-draggable-dragging":{transition:"none",zIndex:8,willChange:"transform","& .react-resizable-handle":{backgroundImage:"none"}},"& .react-resizable-handle":{position:"absolute",width:"14px",height:"14px",bottom:0,right:0,zIndex:20,backgroundImage:`url('${(0,E.m5F)('<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path stroke="#505050" stroke-opacity=".54" d="M9.5 0v10M0 9.5h9M7.5 4v4M4 7.5h3"/>\n</svg>')}')`,backgroundRepeat:"no-repeat",backgroundOrigin:"content-box",boxSizing:"border-box",cursor:"se-resize"},"&.fullscreen":{visibility:"visible",position:"unset",width:"100% !important",height:"100% !important",transform:"translate(0) !important"}}},gridFullscreen:{height:"100% !important",overflowY:"hidden","& .react-resizable-handle, & .react-grid-item":{visibility:"hidden"}},isResizing:{zIndex:9,willChange:"width, height",pointerEvents:"none"}})));function z(){return z=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},z.apply(this,arguments)}const j={cols:4,rowHeight:30,margin:[15,15]},H=e=>{let{views:t,layout:n,layoutOptions:i=j,onLayoutChanged:c=O.ZT,draggableHandle:d,LayoutItem:p,onRemove:m,onDrop:y,droppingItem:k,isDroppable:E,isStatic:H,classes:C}=e;const I=(0,r.useRef)(),Z=(0,r.useRef)({}),R=S(),[P,N]=(0,r.useState)(null),[D,M]=(0,r.useState)(null),[W,F]=(0,r.useState)(0),{cols:_,rowHeight:T,margin:L}=i,V=(0,r.useMemo)((()=>(e=>(e||[]).map(h))(n)),[n]),B=(0,s.pipe)(b,v(["autosizing"],n),(0,s.ifElse)((0,s.always)(H),w(Z.current),x(Z.current)),c),$=(0,r.useCallback)((e=>M((t=>t?null:e))),[]),q=null!==D;return o().createElement(o().Fragment,null,o().createElement(l.Z,{refreshMode:"debounce",refreshRate:50,handleWidth:!0,onResize:e=>F(e)}),!!W&&o().createElement(a(),{innerRef:I,layout:V,cols:_,draggableHandle:d,autoSize:!0,rowHeight:T,width:W,margin:L,onLayoutChange:H?void 0:B,isResizable:!H&&!q,isDraggable:!H&&!q,className:u()(null==C?void 0:C.root,R.gridLayout,{[R.gridFullscreen]:q}),onDrop:(e,t,n)=>{y&&y(b(e),g(t),n)},droppingItem:k,isDroppable:!H&&E,onResizeStart:(e,t)=>N(t.i),onResizeStop:()=>N(null),"data-reltio-id":"reltio-grid-layout"},V.map((e=>{const r=D===e.i,a=P===e.i,s=(f(n,e.i)||{}).autosizing?{AutosizeComponent:(c=e.i,o().createElement(l.Z,{handleHeight:!0,onResize:(e,t)=>{if(t){const e=((e,t)=>{const{margin:n,rowHeight:r}=t;return Math.ceil((e+n[1])/(r+n[1]))})(t,i);e!==Z.current[c]&&(Z.current[c]=e,B(V))}}}))}:{};var c;return o().createElement(p,z({key:e.i,layoutItemConfig:e,views:t,onToggleFullscreen:$,onRemove:m,className:u()(null==C?void 0:C.item,{static:H,fullscreen:r,[R.isResizing]:a}),isFullscreen:r},s))}))))};H.displayName="ReltioGridLayout";const C=(0,r.memo)(H)},43129:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(24328),o=n.n(r),i=n(30750);const a=(0,n(72342).makeStyles)({loader:{width:"100%",top:0,left:0,position:"absolute",borderRadius:"2px"}}),l=()=>{const e=a();return o().createElement(i.Z,{color:"primary",className:e.loader,"data-reltio-id":"dashboard-item-loader"})}},60355:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),o=n.n(r),i=n(18960),a=n(95341),l=n(83993),s=n(82056),c=n(87037),u=n(50985);const d=(0,n(72342).makeStyles)((()=>({menuItemTitle:{fontSize:"13px",lineHeight:"15px"},openIcon:{padding:"4px",borderRadius:"2px",marginRight:"-10px"}}))),p=e=>{let{items:t}=e;const[n,p]=(0,r.useState)(null),m=Boolean(n),h=d(),g=()=>p(null),b=e=>()=>{g(),e()};return o().createElement(o().Fragment,null,o().createElement(c.Z,{className:h.openIcon,"aria-controls":"menu","aria-haspopup":"true",onClick:e=>p(e.currentTarget),size:"large"},o().createElement(u.Z,null)),o().createElement(i.Z,{id:"facet-menu",anchorEl:n,open:m,onClose:g,elevation:2,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},t.filter((e=>e.active)).map((e=>{let{id:t,icon:n,title:r,action:i,disabled:c=!1}=e;return o().createElement(a.Z,{key:t,onClick:b(i),disabled:c},o().createElement(l.Z,null,n),o().createElement(s.Z,{classes:{primary:h.menuItemTitle}},r))}))))}},65298:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),o=n.n(r),i=n(82565),a=n(52388);const l=(0,n(72342).makeStyles)((()=>({view:{flex:1,width:"100%",height:"100%",overflow:"hidden",boxShadow:"none"}}))),s=e=>{let{id:t,children:n}=e;const r=l();return o().createElement(a.H.Provider,{value:t},o().createElement(i.Z,{className:r.view,"data-reltio-id":`layout-item-${t}`},n))}},52388:(e,t,n)=>{n.d(t,{H:()=>o});var r=n(24328);const o=n.n(r)().createContext(null);o.displayName="DashboardViewIdContext"}}]);
2
2
  //# sourceMappingURL=281.js.map