@reltio/remotes 1.4.1737 → 1.4.1739
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/1088.js +1 -1
- package/1088.js.map +1 -1
- package/1148.js +1 -1
- package/1215.js +1 -1
- package/1334.js +1 -1
- package/1425.js +1 -1
- package/1664.js +1 -1
- package/1707.js +1 -1
- package/1840.js +1 -1
- package/2066.js +1 -1
- package/2400.js +1 -1
- package/2617.js +1 -1
- package/2825.js +1 -1
- package/2857.js +1 -1
- package/3004.js +1 -1
- package/3042.js +1 -1
- package/3044.js +1 -1
- package/3096.js +1 -1
- package/3104.js +1 -1
- package/3144.js +1 -1
- package/3191.js +1 -1
- package/3292.js +1 -1
- package/3348.js +1 -1
- package/3381.js +1 -1
- package/3383.js +1 -1
- package/3463.js +1 -1
- package/3469.js +1 -1
- package/3538.js +1 -1
- package/3639.js +1 -1
- package/393.js +1 -1
- package/4038.js +1 -1
- package/415.js +1 -1
- package/4212.js +1 -1
- package/4265.js +1 -1
- package/4390.js +1 -1
- package/4444.js +1 -1
- package/4481.js +1 -1
- package/4780.js +1 -1
- package/4780.js.map +1 -1
- package/4787.js +1 -1
- package/4838.js +1 -1
- package/4969.js +1 -1
- package/50.js +1 -1
- package/5177.js +1 -1
- package/5201.js +1 -1
- package/5201.js.map +1 -1
- package/5292.js +1 -1
- package/5368.js +1 -1
- package/5368.js.map +1 -1
- package/5383.js +1 -1
- package/5738.js +1 -1
- package/5738.js.map +1 -1
- package/5769.js +1 -1
- package/6012.js +1 -1
- package/62.js +2 -0
- package/62.js.map +1 -0
- package/6287.js +1 -1
- package/6422.js +1 -1
- package/6506.js +1 -1
- package/6578.js +1 -1
- package/6578.js.map +1 -1
- package/658.js +1 -1
- package/6799.js +1 -1
- package/6807.js +1 -1
- package/6844.js +1 -1
- package/6903.js +1 -1
- package/7074.js +1 -1
- package/7074.js.map +1 -1
- package/7119.js +1 -1
- package/7237.js +1 -1
- package/7340.js +1 -1
- package/735.js +1 -1
- package/7401.js +1 -1
- package/7401.js.map +1 -1
- package/7407.js +1 -1
- package/7422.js +1 -1
- package/7468.js +1 -1
- package/7626.js +2 -2
- package/7744.js +1 -1
- package/7744.js.map +1 -1
- package/7896.js +1 -1
- package/8118.js +1 -1
- package/820.js +1 -1
- package/8207.js +1 -1
- package/8216.js +1 -1
- package/8741.js +1 -1
- package/8786.js +1 -1
- package/9016.js +1 -1
- package/9032.js +1 -1
- package/9050.js +1 -1
- package/913.js +1 -1
- package/9283.js +1 -1
- package/9328.js +1 -1
- package/9387.js +1 -1
- package/9719.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/remoteEntry.js.map +1 -1
- package/1550.js +0 -2
- package/1550.js.map +0 -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]="79bab7d9-0bb9-437a-b109-a44ed73d610b",e._sentryDebugIdIdentifier="sentry-dbid-79bab7d9-0bb9-437a-b109-a44ed73d610b")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"8092e028fb6b3ede67d3d5f8b1b656d20999d287"},(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(98952);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){o(e,t,r[t])}))}return e}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 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)({}),o=(0,n.useRef)({}),c=(0,n.useCallback)((0,l.DsO)((()=>r(i({},o.current)))),[]),u=(0,n.useCallback)((()=>{o.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);o.current[n]!==r&&(o.current[n]=r,c())})),[c,e]);return{getDynamicRowCellHeight:p,changeRowCellHeight:d,clearHeightsCache:u}}},96253:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(24328),a=r.n(n),l=r(88267),i=r(55962);const o=e=>{let{onChangeHeight:t,children:r}=e,o=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}=o,m=t({rowIndex:u,cellIndex:d,columnData:p,rowValue:c}),b=()=>s.current&&m(s.current.clientHeight);return(0,i.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),i=r.n(l),o=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,i().text("Are you sure you want to delete this?"))),a().createElement(c.Z,null,a().createElement(o.Z,{onClick:r,color:"primary"},i().text("No")),a().createElement(o.Z,{onClick:()=>{n(),r()},color:"primary"},i().text("Yes"))))}},90143:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(23883);const i=(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 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 s=e=>{const t=i();return a().createElement(l.Z,o({},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),i=r.n(l),o=r(98952),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,o.L5S)(t)),[t]),v=(0,m.C)({objectIds:g}),h=(0,o.wwR)(t);return a().createElement(p.e,{collaboration:v},a().createElement(s.Z,{className:i()(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,o.wp9)(o.q7e.ENTITY,{entityUri:h}),objectType:o.q7e.ENTITY}))))}));f.displayName="ScreenProfileBand"},2002:(e,t,r)=>{r.d(t,{Z:()=>ie});var n=r(24328),a=r.n(n),l=r(98952),i=r(35039),o=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],C=e=>{let{attributeType:t,attributeValue:r,color:i,containerRef:o,onClose:s,onEdit:c,isTemporary:u}=e;const p=x({color:i,containerWidth:o.current?o.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,C={className:p.textField,InputProps:{disableUnderline:!0,classes:{root:p.input,multiline:p.inputMultiline}},fullWidth:!0,autoFocus:!0},T=()=>{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:!!o,anchorEl:o.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():T()},onBackdropClick:T},a().createElement(h.Z,{dataTypeDefinition:m,fieldName:(0,l.Tde)(t.uri),onChange:f,TextFieldProps:C,value:y}))};var T=r(39475),S=r(20888),A=r(53203),j=r(95341),Z=r(79312),I=r(78223),N=r(10918);const P=(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"}}))),D=(0,I.Z)(j.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=P(),{disabled:i,text:o,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(D,{tooltipTitle:s,showForDisabled:!0,classes:{root:l.menuItem},onClick:e=>{n(e),c(e)},disabled:i,ref:t,"data-reltio-id":`crosswalk-menu-item${u}`},a().createElement(V,{icon:p,text:o,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:i=null,attributeValue:o,crosswalk:p,disableEdit:m,disableDelete:g,onIgnore:v,onEdit:h,onPin:E,onDelete:w,isEmpty:x}=e;const{isReadingMode:O,isEditingMode:k,isHovered:j,onMouseEnter:Z,onMouseLeave:I,setReadingMode:N,setEditingMode:P}=(0,M.p)(),D=(0,n.useRef)(),V=(0,l.nIW)(o.uri),R=(0,l.x_)(p),H=!i.system&&!R,z=H&&!m&&(0,l.Z5t)(l.ARY.Editing,i),F=H&&!g&&(0,l.Edd)(l.ARY.Editing,i),B=(0,l.ZiX)(o.uri),Y=(0,l.mqZ)(l.BDP.UPDATE,i)&&!m&&H,_=!B&&(!O&&Y||o.pin),G=!B&&(!O&&Y||o.ignored);(0,n.useEffect)((()=>{B&&!x&&P()}),[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:()=>P(),id:"edit"},{disabled:!F,text:b().text("Delete"),icon:a().createElement(s.Z,null),tooltip:F?null:b().text("You don't have permissions to delete"),onClick:()=>w({attributeType:i,attributeValue:o,crosswalks:[p]}),id:"delete"}],te=()=>{J(),N()};return a().createElement("div",{ref:D,className:d()(t,K.root),onMouseEnter:()=>{Q(),Z()},onMouseLeave:()=>{J(),I()},"data-reltio-id":r},a().createElement("div",{className:K.attributeValue},a().createElement(y.Z,{value:(0,l.kDl)(o),dataTypeDefinition:(0,l.PFL)(i)})),a().createElement("div",{className:K.actions},_&&a().createElement(A.Z,{isPinned:o.pin,onClick:()=>E({attributeValue:o}),disabled:!Y}),G&&a().createElement(S.Z,{isIgnored:o.ignored,onClick:()=>v({attributeValue:o}),disabled:!Y}),j&&!(0,l.vr_)(i)&&a().createElement(f.Z,{MenuItemRenderer:U,menuId:`simple-attribute-additional-actions-${V}`,buttonComponent:T.k,buttonProps:{icon:u.Z,size:"XS",tooltipTitle:b().text("More actions")},onMenuClose:te,menuItems:ee})),k&&a().createElement(C,{attributeType:i,attributeValue:o,color:q,onClose:te,onEdit:e=>h({attributeType:i,attributeValue:e,crosswalk:p}),containerRef:D,isTemporary:B}))};var F=r(13896);const B=(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:i,crosswalksMap:o,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=B(),[{isDragItemOver:d},m]=(0,F.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.ARY.Editing,r)&&!i&&(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=o[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:i,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:i,parentUri:o,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.ARY.Editing,n);return 0===r.length&&u?a().createElement(q.Z,{variant:"text",color:"primary",onClick:()=>i({parentUri:o,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:i,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 ie=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(i.Z,{moreNumber:Math.min(c,w),valueNumber:w,onClick:()=>{r.length<y&&u(),b(m+c)}}),h&&a().createElement(o.Z,{onClick:()=>{b(c)}}))}},86966:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(98952),i=r(2996),o=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),i=(0,l.x_)(t),{isDimmed:o,highlightCrosswalk:p,removeHighlight:b}=(0,s.pu)(t),y=(0,m.y)({isOpaque:!o,color:o?"rgba(0, 0, 0, 0.12)":n,isDisabled:i});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 i=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:i.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),C=r(20888),T=r(39475),S=r(6163),A=r(2507),j=r.n(A);const Z=e=>{let{onClick:t}=e;return a().createElement(T.k,{icon:S.Z,tooltipTitle:j().text("Delete"),onClick:t,size:"XS",disableRipple:!0})};var I=r(55962),N=r(38361);const P=(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"}}}))),D=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=P(),{isReadingMode:T,onMouseEnter:S,onMouseLeave:A}=(0,i.p)(),j=!p&&(0,l.Z5t)(l.ARY.Editing,t),D=!d&&(0,l.Edd)(l.ARY.Editing,t),V=(0,l.ZiX)(r.uri),R=!V&&(!T&&j||r.pin),U=!V&&(!T&&j||r.ignored),M=!T&&D,W=(0,N.Q)(r.uri),[H,L]=(0,n.useState)(W||V);(0,I.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:A},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(o.Z,null),a().createElement("div",{className:x.actions},R&&a().createElement(k.Z,{disabled:!j,isPinned:r.pin,onClick:()=>m({attributeValue:r})}),U&&a().createElement(C.Z,{disabled:!j,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:!j,disableDelete:!D,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(98952),i=r(26729),o=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(o.Z,c({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:a().createElement(i.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(98952),i=r(86966),o=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(o.x,null,(0,l.idV)(null==t?void 0:t.label));return a().createElement(i.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),i=r(98952),o=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,i.bwT)(t)})},(0,i.idV)(t.label),t.relationshipLabel&&a().createElement("span",{className:y.relationshipLabel},t.relationshipLabel))),E=(0,l.pipe)(i.tF$,(0,l.map)((e=>(0,i.zeJ)(g,e))),(0,l.reject)(l.isNil))(r);return a().createElement(o.Z,m({attributeValue:t,attributeType:r,attributeTypesList:E,label:h},b))}},35969:(e,t,r)=>{r.d(t,{x:()=>o});var n=r(24328),a=r.n(n),l=r(79312),i=r(21934);const o=e=>{let{children:t}=e;const r=(0,i.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 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 o=e=>a().createElement("svg",i({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?o: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 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 o=e=>a().createElement("svg",i({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?o: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),i=r.n(l),o=r(71153),s=r.n(o),c=r(98952),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:o,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:i().text("Focus"),onClick:()=>o()})),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:()=>i});var n=r(98952),a=r(24328),l=function(e){return e.READING="READING",e.HOVERED="HOVERED",e.EDITING="EDITING",e}(l||{});const i=()=>{const[e,t]=(0,a.useState)(null),r=e===l.READING,i=e===l.EDITING,o=e===l.HOVERED;(0,a.useEffect)((()=>{t(l.READING)}),[]);const s=(0,a.useCallback)((0,n.DsO)(t,50),[]),c=(0,a.useCallback)((()=>{i||s(l.HOVERED)}),[s,i]),u=(0,a.useCallback)((()=>{i||s(l.READING)}),[s,i]);return{setReadingMode:(0,a.useCallback)((()=>t(l.READING)),[t]),setEditingMode:(0,a.useCallback)((()=>t(l.EDITING)),[t]),onMouseLeave:u,onMouseEnter:c,isReadingMode:r,isEditingMode:i,isHovered:o}}},45226:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(98952),a=r(24328),l=r.n(a),i=r(11013),o=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(i.Z,u({attributeValue:e},n))))))},m=(0,a.memo)((e=>{let{expanded:t,LabelRenderer:r,RightSlot:a}=e,i=p(e,["expanded","LabelRenderer","RightSlot"]);const{attributeType:c,values:u,valueContainerClassName:m}=i;switch(c.type){case n.oS0.TYPE_NESTED:case n.oS0.TYPE_REFERENCE:return d(s({expanded:t,LabelRenderer:r,RightSlot:a},i));case n.oS0.TYPE_IMAGE:return l().createElement("div",{className:m},l().createElement(o.Z,{attributeType:c,attributeValues:u,imageSize:{imageHeight:40,imageWidth:40,imageMargin:2}}));default:return d(s({},i))}}))},63309:(e,t,r)=>{r.d(t,{Z:()=>_e});var n=r(24328),a=r.n(n),l=r(71153),i=r.n(l),o=r(2507),s=r.n(o),c=r(98952),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:o}=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=!o||u;return a().createElement("div",{className:i()(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:o},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:i()(t.headCell,t.coloredCell)},a().createElement(x.default,e),e.children)};var k=r(67283),C=r(30488),T=r(14596);const S=(0,b.makeStyles)({root:{marginBottom:"-6px"}}),A=(0,C.Z)((0,w.pick)(["parentUri","parentTypeUri","onAdd","selectedAttributeTypes","onSelectAttributeTypes"]))((e=>{let{parentTypeUri:t,parentUri:r,selectedAttributeTypes:n,onSelectAttributeTypes:l,onAdd:i}=e;const o=S(),u=(0,T.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.ARY.Editing})))))(p);return a().createElement("div",{className:o.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=>{i({attributeType:e,parentUri:r})}))}}))}));var j=r(79935);const Z=(0,C.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(j.Z,null),a().createElement(A,null))})),I=e=>{let{value:t}=e;const r=y();return a().createElement("div",{className:r.cellValueWrapper},t)};var N=r(2002);const P=(0,b.makeStyles)((()=>({simpleAttributeWrapper:{padding:"15px"},complexAttributeWrapper:{padding:"15px","& + &":{borderTop:"1px solid rgba(0,0,0,.1)"}}})));function D(){return D=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},D.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=P();return a().createElement("div",{className:n.simpleAttributeWrapper},a().createElement(N.Z,D({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=P(),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=P(),i=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,i)};var z=r(51557);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 B=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=P();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,F({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,C.Z)((0,w.pick)(["onDelete","onPin","onIgnore","onEdit","onAdd","parentUri","readOnly","emptyTempAttributeUris"]))((e=>{let{value:t,onDelete:r,onEdit:n,onPin:l,onIgnore:i,onAdd:o,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(B,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:i,onAdd:o,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 i=y();return a().createElement("div",{className:i.cellValueWrapper},a().createElement("div",{ref:l,className:i.dragIndicator},a().createElement(G.Z,{className:i.dragIndicatorIcon})),a().createElement(X.Z,{className:i.attributeTitle,label:r.label}),!n&&a().createElement(q.Z,{values:t,attributeType:r,valueContainerClassName:i.ovValue}))},Q=e=>{let{value:t}=e;const r=y();return a().createElement("div",{className:i()(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),ie=r(39475),oe=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(oe.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,i]=(0,n.useState)(null),o=(0,T.AH)(),c=()=>i(null);return a().createElement(a().Fragment,null,a().createElement(ie.k,{icon:le.Z,tooltipTitle:s().text("View details"),size:"XS",onClick:e=>i(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,o))))},me=e=>{let{value:{ruleType:t,sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}=e;const o=y(),s=r||n||l;return a().createElement("div",{className:i()(o.cellValueWrapper,o.ruleType)},a().createElement("div",{className:o.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,T.AH)(),{isDimmed:l,highlightCrosswalk:i,removeHighlight:o}=(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:()=>i(),onMouseLeave:()=>o()},a().createElement(oe.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 I}},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)},Ce=(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)}})),Te=(e,t,r,n,a,l,i)=>{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 i=[...e.entityTypes,...e.relationTypes||[]].find((0,w.propEq)("uri",r)),o=null!==(a=null==i?void 0:i.survivorshipGroups)&&void 0!==a?a:[],s=n&&o.find((0,w.propEq)("uri",n))||o.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,i);case"winnerSources":return{crosswalks:ke(l,a)};default:return null}};var Se=r(87378),Ae=r(94059),je=r(38677),Ze=r(69089),Ie=r(79811),Ne=r(290),Pe=r(75779),De=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:i}=e;const[o,c]=(0,n.useState)("without");return a().createElement(Ze.Z,{open:t,TransitionProps:{onEnter:()=>c("without")}},a().createElement(Ne.Z,null,a().createElement(Pe.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:o,onChange:(0,w.pipe)(We.NA,c)},a().createElement(Re.Z,{value:"without",control:a().createElement(De.Z,null),label:s().text("Save without Ignore")}),a().createElement(Re.Z,{value:"with",control:a().createElement(De.Z,null),label:s().text("Save and apply Ignore to new value")})))),a().createElement(Ie.Z,null,a().createElement(je.Z,{onClick:r,color:"primary"},s().text("Cancel")),a().createElement(je.Z,{onClick:()=>{"with"===o?i():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(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fe(){return Fe=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},Fe.apply(this,arguments)}const Be=e=>e.ovValues.attributeType.uri,Ye=e=>{let{columnData:{id:t},cellIndex:r,rowValue:n}=e;return`${t}[${Be(n)}][${r}]`},_e=(0,n.memo)((e=>{let{entity:t,isLoading:r,crosswalksMap:l,visibleColumns:o=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:C=We.ZT,additionalHeaderItems:S,className:A,activeSurvivorshipGroupUri:j}=e;const Z=Le(),I=(0,T.AH)(),N=(0,n.useMemo)((()=>(0,w.pipe)((0,w.filter)((e=>{let{id:t}=e;return o.includes(t)})),Ce)(ve)),[o]),{type:P,uri:D,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)(P)),(0,w.map)((e=>(0,c.zeJ)(I,e,P))),(0,w.filter)((0,w.both)(w.identity,c.Uty)))(V);C(e)}}),[t,k]);const R=(0,n.useMemo)((()=>P?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((i=>{const o=(0,c.nIW)(i.uri),s=a[o],u=(0,c.YkG)(i)?n.relation:n.entity;return(0,w.pipe)((0,w.reduce)(((r,n)=>(0,w.assoc)(n,Te(n,e,t,i,u,s,l),r)),{}),(0,w.assoc)("rawValue",s))(r)}))}(I,P,k,o,l,V,j):[]),[I,P,k,o,V,l,j]),{getDynamicRowCellHeight:U,changeRowCellHeight:M}=(0,u.Z)(Ye),W=(0,n.useCallback)((e=>a().createElement(E,Fe({changeRowCellHeight:M},e))),[M]),H=(0,n.useCallback)((0,w.either)(U,(0,w.always)(68)),[U]),[L,z]=(0,n.useState)(null),[F,B]=(0,n.useState)(null),Y=(0,n.useCallback)((e=>{e.attributeValue.ignored?B(e):h(e)}),[h,B]),_=(0,n.useCallback)(((e,t)=>{C((0,w.move)(e,t,k))}),[C,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:D,parentTypeUri:P,selectedAttributeTypes:k,onSelectAttributeTypes:C,emptyTempAttributeUris:O,readOnly:y})),[z,g,v,Y,x,D,P,k,C,O,y]);return a().createElement("div",{className:i()(Z.tableContainer,A)},a().createElement(m.Z,{classes:{root:Z.tableHeader,title:Z.tableTitle},title:s().text("Sources")},S,a().createElement(p.Z,{columnsData:ve,selectedColumns:o,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(Ae.Z,{open:!!L,onClose:()=>z(null),onConfirm:G}),a().createElement(He,{open:!!F,onClose:()=>B(null),onConfirmEditWithIgnore:()=>h(F),onConfirmEditWithoutIgnore:()=>{h(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){ze(e,t,r[t])}))}return e}({},F,{clearAttributeFlags:!0}))}}))}))},26752:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(24328),a=r.n(n),l=r(2507),i=r.n(l),o=r(71153),s=r.n(o),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:o,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),o,"disabled"===l&&a().createElement(u.Z,{title:i().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),i=r(2507),o=r.n(i),s=r(95038),c=r.n(s),u=r(98952),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 C=r(71153),T=r.n(C),S=r(91785);const A=(0,x.makeStyles)((()=>({timestampEditorInput:{paddingTop:15,paddingBottom:15,fontSize:13},timestampEditor:{height:38}}))),j=e=>{let{value:t,classes:r={},disabled:l=!1,onChange:i}=e;const o=A(),[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&&i(e)}),[i,s,t]);return a().createElement(S.Z,{slotProps:{textField:{variant:"filled",InputProps:{disableUnderline:!0,classes:{input:o.timestampEditorInput,root:T()(o.timestampEditor,r.root)},onBlur:u}}},value:s||null,disabled:l,onChange:c,onClose:u})};var Z=r(14596);const I=(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:i,onDeleteAttribute:s}=e;const h=I(),[E,w]=(0,n.useState)([]),[x,O]=(0,n.useState)(null),C=(0,Z.AH)(),T=!("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:T,canBeDeleted:T},{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"}]),[]),A=(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,A.length>0&&r&&a().createElement(b.Z,{label:o().text("Add attributes"),onApply:e=>{e.length>0&&w((t=>t.concat((0,l.map)((0,l.prop)("uri"),e))))},data:A}),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)(C,t);return T?a().createElement(y.Z,{label:"",placeholder:t,className:h.editor,value:{value:t,label:r},options:(0,u.cwx)(C).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 i(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 T?a().createElement(v.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:h.editor},required:!0,variant:"filled",value:t,onInput:t=>i(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 T?a().createElement(v.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:h.editor},required:!0,variant:"filled",value:t,onInput:t=>i(e,t.target.value),size:"small",InputProps:{disableUnderline:!0,classes:{input:h.input}}}):a().createElement(k,{value:t});case"deleteDate":return a().createElement(j,{value:t&&c().utc((0,u.ZBU)(t)).valueOf(),onChange:t=>i(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:o().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),i=r(98952),o=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,i.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(o.Z,{className:r.sourceLabel,variant:"body2"},m))},b=(0,n.memo)((()=>{var e;const t=d(),{isDragging:r,clientOffset:i,item:o}=(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==i?void 0:i.x)-(null==c?void 0:c.x)}px, ${(null==i?void 0:i.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"===o.type&&a().createElement(m,{crosswalk:o.crosswalk})))}))},89468:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(2507),i=r.n(l),o=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},i().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(o.Z,{className:d.cancelButton,onClick:l},i().text("Cancel")),a().createElement(o.Z,{color:"primary",onClick:()=>{r(m),l()},disabled:!m.type||!m.value},i().text("Add"))))}},71285:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(23759),i=r(34802),o=r(98952),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)(),i=b({isOpaque:!n}),m=(0,d.AH)(),y=(0,o.tH7)(m,t);return a().createElement("div",{className:i.root},a().createElement(p.Z,{size:"XXS",className:i.focusedIcon,icon:r&&c.Z,disabled:!0}),a().createElement("div",{className:i.wrapper},a().createElement(u.Z,{className:i.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),C=r(39475),T=r(79935),S=r(19540),A=r(60925);const j=(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:i=!1,isColored:p=!0,focusable:m=!0,disableEdit:b,disableDelete:y,onDelete:f,onEdit:Z}=e;const I=(0,n.useRef)(null),[N,P]=(0,n.useState)(!1),[D,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),[F]=(0,l.RT)(),B=i?"#FFF":p?H?"rgba(0, 0, 0, 0.12)":U:"#CACCD1",Y=(0,o.tH7)(R,t.type),_=(0,o.nIW)(t.uri),G=(0,o.x_)(t),q=j({color:B,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&&F&&(0,o.aFF)(F,t)&&F!==t&&(null==I||null===(e=I.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}))}),[F]),a().createElement("div",{className:q.root,ref:I},a().createElement(C.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:B,variant:G?"disabled":"standart",onMouseEnter:()=>L(),onMouseLeave:()=>z()},r&&a().createElement(S.Z,{className:q.dependentIcon}),a().createElement(w.Z,{onClick:()=>P((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(T.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(C.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:D,onConfirm:()=>{W&&M(),f(_)},onClose:()=>V(!1)})),a().createElement(A.Z,{crosswalk:t,canEditAttribute:!b,onEditAttribute:(e,t)=>{Z({crosswalkId:_,attributeName:e,value:t})},onDeleteAttribute:e=>{Z({crosswalkId:_,attributeName:e})}}))))}));var I=r(55485);const N=(0,m.makeStyles)((()=>({root:{display:"flex",alignItems:"center",height:"28px",paddingLeft:"37px"}}))),P=e=>{let{showMore:t,onClick:r}=e;const n=N();return a().createElement(I.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")))},D=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[i.Y.Dependent].some((e=>g.some((0,o.aFF)(e))))&&f()}),[g]),a().createElement(a().Fragment,null,0===r[i.Y.Simple].length&&0===r[i.Y.Empty].length&&a().createElement(y,{crosswalkType:t,focusable:c}),r[i.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[i.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[i.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[i.Y.Dependent].length>0&&a().createElement(P,{showMore:!u,onClick:()=>f()}))}},73972:(e,t,r)=>{r.d(t,{P:()=>o});var n=r(24328),a=r(50914),l=r(98952),i=r(79573);const o=e=>{let{onLoad:t=i.ZT,onSuccess:r=i.ZT,onError:o=i.ZT}=e;const s=(0,n.useCallback)((e=>{t(),e.then((e=>{let{errors:t}=e;if(t)throw t;r()})).catch(o)}),[t,o,r]);return{addCrosswalk:(0,n.useCallback)((e=>{let{entity:t,contributorCrosswalk:r,crosswalk:n}=e;const i=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)(i)}),[s]),editCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:i}=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:i})}),[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(98952),l=r(50914),i=r(79573);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){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=i.ZT,onModify:s=i.ZT,onError:u=i.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:C,pinAttribute:T,createAttribute:S,updateAttribute:A}=(e=>{let{onSuccess:t=i.ZT,onError:r=i.ZT,onLoad:o=i.ZT}=e;const s=(0,n.useCallback)((e=>{o(),e.then((()=>{t()})).catch(r)}),[r,t,o]),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 i=(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(i)}),[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,clearAttributeFlags:l}=e;(0,a.YkM)(r)||(0,a.Or$)(r)||s((async()=>{await c((0,a.tCj)({attributeUri:t.uri,sourceUri:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,value:(0,a.CwH)(r)?t.lookupCode:t.value})),l||(t.ignored?await c((0,a.P8_)({attributeUri:t.uri,value:!0})):t.pin&&await c((0,a.xkv)({attributeUri:t.uri,value:!0})))})())}),[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}),j=(0,n.useCallback)((e=>{let{attributeType:t,parentUri:r,crosswalk:n,index:i}=e;const s=(0,a.gjI)({parentUri:r,attributeType:t}),{uri:c}=s;if(n){const{ownerType:e}=n;f((t=>o({},t,{[e]:o({},t[e],{[c]:[n]})})))}d((e=>{var n;return(0,l.isNil)(i)&&(i=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:i})})),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]),I=(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))),i=(0,a.ww$)({entity:p,attributeType:r,uri:e,value:(0,a.kDl)(t)});S({attributeValue:(0,a.dLR)(i,l),crosswalk:n}),v.current=n}}else A(e)}),[S,A,p]);return{modifiedEntity:p,crosswalksMap:y,onAddAttribute:j,onDeleteAttribute:Z,onPinAttribute:T,onIgnoreAttribute:C,onEditAttribute:I,newlyCreatedAttributes:E,emptyTempAttributeUris:m}}},34802:(e,t,r)=>{r.d(t,{Y:()=>n});let n=function(e){return e.Simple="simple",e.Empty="empty",e.Dependent="dependent",e}({})},10765:(e,t,r)=>{r.d(t,{o:()=>s});var n=r(98952),a=r(50914),l=r(34802);const i=e=>e[l.Y.Simple].length>0?1:e[l.Y.Dependent].length>0?e[l.Y.Empty].length>0?2:3:4,o=(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,i)=>(r[i.type]||(r[i.type]={[l.Y.Simple]:[],[l.Y.Empty]:[],[l.Y.Dependent]:[]}),"relation"===i.ownerType?r[i.type][l.Y.Dependent].push(i):((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,i)?r[i.type][l.Y.Empty].push(i):((e,t,r)=>!(0,n.sJj)(r).some((r=>{const l=(0,n.AFK)(r,e),i=t.find((0,a.propEq)("uri",l));return i&&!(0,n.YkM)(i)})))(e,t,i)?r[i.type][l.Y.Dependent].push(i):r[i.type][l.Y.Simple].push(i),r)),{});return Object.keys(s).sort(((e,t)=>i(s[e])-i(s[t])||(e<t?-1:1))).map((e=>({source:e,crosswalksByTypes:o(s[e])})))}))},38361:(e,t,r)=>{r.d(t,{R:()=>o,Q:()=>s});var n=r(24328),a=r.n(n),l=r(98952);const i=(0,n.createContext)(null),o=e=>{let{children:t,attributeUris:r}=e;return a().createElement(i.Provider,{value:r},t)},s=e=>((0,n.useContext)(i)||[]).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]="55240616-ff7f-4f80-adb0-45b8aaf29893",e._sentryDebugIdIdentifier="sentry-dbid-55240616-ff7f-4f80-adb0-45b8aaf29893")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"756a7513a42a2e35d42e606647a4e60f455dcf69"},(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(98952);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){o(e,t,r[t])}))}return e}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 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)({}),o=(0,n.useRef)({}),c=(0,n.useCallback)((0,l.DsO)((()=>r(i({},o.current)))),[]),u=(0,n.useCallback)((()=>{o.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);o.current[n]!==r&&(o.current[n]=r,c())})),[c,e]);return{getDynamicRowCellHeight:p,changeRowCellHeight:d,clearHeightsCache:u}}},96253:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(24328),a=r.n(n),l=r(88267),i=r(55962);const o=e=>{let{onChangeHeight:t,children:r}=e,o=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}=o,m=t({rowIndex:u,cellIndex:d,columnData:p,rowValue:c}),b=()=>s.current&&m(s.current.clientHeight);return(0,i.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),i=r.n(l),o=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,i().text("Are you sure you want to delete this?"))),a().createElement(c.Z,null,a().createElement(o.Z,{onClick:r,color:"primary"},i().text("No")),a().createElement(o.Z,{onClick:()=>{n(),r()},color:"primary"},i().text("Yes"))))}},90143:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(23883);const i=(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 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 s=e=>{const t=i();return a().createElement(l.Z,o({},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),i=r.n(l),o=r(98952),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,o.L5S)(t)),[t]),v=(0,m.C)({objectIds:g}),h=(0,o.wwR)(t);return a().createElement(p.e,{collaboration:v},a().createElement(s.Z,{className:i()(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,o.wp9)(o.q7e.ENTITY,{entityUri:h}),objectType:o.q7e.ENTITY}))))}));f.displayName="ScreenProfileBand"},2002:(e,t,r)=>{r.d(t,{Z:()=>ie});var n=r(24328),a=r.n(n),l=r(98952),i=r(35039),o=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],C=e=>{let{attributeType:t,attributeValue:r,color:i,containerRef:o,onClose:s,onEdit:c,isTemporary:u}=e;const p=x({color:i,containerWidth:o.current?o.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,C={className:p.textField,InputProps:{disableUnderline:!0,classes:{root:p.input,multiline:p.inputMultiline}},fullWidth:!0,autoFocus:!0},T=()=>{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:!!o,anchorEl:o.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():T()},onBackdropClick:T},a().createElement(h.Z,{dataTypeDefinition:m,fieldName:(0,l.Tde)(t.uri),onChange:f,TextFieldProps:C,value:y}))};var T=r(39475),S=r(20888),A=r(53203),j=r(95341),Z=r(79312),I=r(78223),N=r(10918);const P=(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"}}))),D=(0,I.Z)(j.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=P(),{disabled:i,text:o,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(D,{tooltipTitle:s,showForDisabled:!0,classes:{root:l.menuItem},onClick:e=>{n(e),c(e)},disabled:i,ref:t,"data-reltio-id":`crosswalk-menu-item${u}`},a().createElement(V,{icon:p,text:o,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:i=null,attributeValue:o,crosswalk:p,disableEdit:m,disableDelete:g,onIgnore:v,onEdit:h,onPin:E,onDelete:w,isEmpty:x}=e;const{isReadingMode:O,isEditingMode:k,isHovered:j,onMouseEnter:Z,onMouseLeave:I,setReadingMode:N,setEditingMode:P}=(0,M.p)(),D=(0,n.useRef)(),V=(0,l.nIW)(o.uri),R=(0,l.x_)(p),H=!i.system&&!R,z=H&&!m&&(0,l.Z5t)(l.ARY.Editing,i),F=H&&!g&&(0,l.Edd)(l.ARY.Editing,i),B=(0,l.ZiX)(o.uri),Y=(0,l.mqZ)(l.BDP.UPDATE,i)&&!m&&H,_=!B&&(!O&&Y||o.pin),G=!B&&(!O&&Y||o.ignored);(0,n.useEffect)((()=>{B&&!x&&P()}),[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:()=>P(),id:"edit"},{disabled:!F,text:b().text("Delete"),icon:a().createElement(s.Z,null),tooltip:F?null:b().text("You don't have permissions to delete"),onClick:()=>w({attributeType:i,attributeValue:o,crosswalks:[p]}),id:"delete"}],te=()=>{J(),N()};return a().createElement("div",{ref:D,className:d()(t,K.root),onMouseEnter:()=>{Q(),Z()},onMouseLeave:()=>{J(),I()},"data-reltio-id":r},a().createElement("div",{className:K.attributeValue},a().createElement(y.Z,{value:(0,l.kDl)(o),dataTypeDefinition:(0,l.PFL)(i)})),a().createElement("div",{className:K.actions},_&&a().createElement(A.Z,{isPinned:o.pin,onClick:()=>E({attributeValue:o}),disabled:!Y}),G&&a().createElement(S.Z,{isIgnored:o.ignored,onClick:()=>v({attributeValue:o}),disabled:!Y}),j&&!(0,l.vr_)(i)&&a().createElement(f.Z,{MenuItemRenderer:U,menuId:`simple-attribute-additional-actions-${V}`,buttonComponent:T.k,buttonProps:{icon:u.Z,size:"XS",tooltipTitle:b().text("More actions")},onMenuClose:te,menuItems:ee})),k&&a().createElement(C,{attributeType:i,attributeValue:o,color:q,onClose:te,onEdit:e=>h({attributeType:i,attributeValue:e,crosswalk:p}),containerRef:D,isTemporary:B}))};var F=r(13896);const B=(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:i,crosswalksMap:o,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=B(),[{isDragItemOver:d},m]=(0,F.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.ARY.Editing,r)&&!i&&(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=o[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:i,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:i,parentUri:o,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.ARY.Editing,n);return 0===r.length&&u?a().createElement(q.Z,{variant:"text",color:"primary",onClick:()=>i({parentUri:o,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:i,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 ie=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(i.Z,{moreNumber:Math.min(c,w),valueNumber:w,onClick:()=>{r.length<y&&u(),b(m+c)}}),h&&a().createElement(o.Z,{onClick:()=>{b(c)}}))}},86966:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(98952),i=r(2996),o=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),i=(0,l.x_)(t),{isDimmed:o,highlightCrosswalk:p,removeHighlight:b}=(0,s.pu)(t),y=(0,m.y)({isOpaque:!o,color:o?"rgba(0, 0, 0, 0.12)":n,isDisabled:i});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 i=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:i.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),C=r(20888),T=r(39475),S=r(6163),A=r(2507),j=r.n(A);const Z=e=>{let{onClick:t}=e;return a().createElement(T.k,{icon:S.Z,tooltipTitle:j().text("Delete"),onClick:t,size:"XS",disableRipple:!0})};var I=r(55962),N=r(38361);const P=(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"}}}))),D=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=P(),{isReadingMode:T,onMouseEnter:S,onMouseLeave:A}=(0,i.p)(),j=!p&&(0,l.Z5t)(l.ARY.Editing,t),D=!d&&(0,l.Edd)(l.ARY.Editing,t),V=(0,l.ZiX)(r.uri),R=!V&&(!T&&j||r.pin),U=!V&&(!T&&j||r.ignored),M=!T&&D,W=(0,N.Q)(r.uri),[H,L]=(0,n.useState)(W||V);(0,I.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:A},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(o.Z,null),a().createElement("div",{className:x.actions},R&&a().createElement(k.Z,{disabled:!j,isPinned:r.pin,onClick:()=>m({attributeValue:r})}),U&&a().createElement(C.Z,{disabled:!j,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:!j,disableDelete:!D,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(98952),i=r(26729),o=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(o.Z,c({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:a().createElement(i.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(98952),i=r(86966),o=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(o.x,null,(0,l.idV)(null==t?void 0:t.label));return a().createElement(i.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),i=r(98952),o=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,i.bwT)(t)})},(0,i.idV)(t.label),t.relationshipLabel&&a().createElement("span",{className:y.relationshipLabel},t.relationshipLabel))),E=(0,l.pipe)(i.tF$,(0,l.map)((e=>(0,i.zeJ)(g,e))),(0,l.reject)(l.isNil))(r);return a().createElement(o.Z,m({attributeValue:t,attributeType:r,attributeTypesList:E,label:h},b))}},35969:(e,t,r)=>{r.d(t,{x:()=>o});var n=r(24328),a=r.n(n),l=r(79312),i=r(21934);const o=e=>{let{children:t}=e;const r=(0,i.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 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 o=e=>a().createElement("svg",i({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?o: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 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 o=e=>a().createElement("svg",i({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?o: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),i=r.n(l),o=r(71153),s=r.n(o),c=r(98952),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:o,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:i().text("Focus"),onClick:()=>o()})),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:()=>i});var n=r(98952),a=r(24328),l=function(e){return e.READING="READING",e.HOVERED="HOVERED",e.EDITING="EDITING",e}(l||{});const i=()=>{const[e,t]=(0,a.useState)(null),r=e===l.READING,i=e===l.EDITING,o=e===l.HOVERED;(0,a.useEffect)((()=>{t(l.READING)}),[]);const s=(0,a.useCallback)((0,n.DsO)(t,50),[]),c=(0,a.useCallback)((()=>{i||s(l.HOVERED)}),[s,i]),u=(0,a.useCallback)((()=>{i||s(l.READING)}),[s,i]);return{setReadingMode:(0,a.useCallback)((()=>t(l.READING)),[t]),setEditingMode:(0,a.useCallback)((()=>t(l.EDITING)),[t]),onMouseLeave:u,onMouseEnter:c,isReadingMode:r,isEditingMode:i,isHovered:o}}},45226:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(98952),a=r(24328),l=r.n(a),i=r(11013),o=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(i.Z,u({attributeValue:e},n))))))},m=(0,a.memo)((e=>{let{expanded:t,LabelRenderer:r,RightSlot:a}=e,i=p(e,["expanded","LabelRenderer","RightSlot"]);const{attributeType:c,values:u,valueContainerClassName:m}=i;switch(c.type){case n.oS0.TYPE_NESTED:case n.oS0.TYPE_REFERENCE:return d(s({expanded:t,LabelRenderer:r,RightSlot:a},i));case n.oS0.TYPE_IMAGE:return l().createElement("div",{className:m},l().createElement(o.Z,{attributeType:c,attributeValues:u,imageSize:{imageHeight:40,imageWidth:40,imageMargin:2}}));default:return d(s({},i))}}))},63309:(e,t,r)=>{r.d(t,{Z:()=>_e});var n=r(24328),a=r.n(n),l=r(71153),i=r.n(l),o=r(2507),s=r.n(o),c=r(98952),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:o}=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=!o||u;return a().createElement("div",{className:i()(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:o},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:i()(t.headCell,t.coloredCell)},a().createElement(x.default,e),e.children)};var k=r(67283),C=r(30488),T=r(14596);const S=(0,b.makeStyles)({root:{marginBottom:"-6px"}}),A=(0,C.Z)((0,w.pick)(["parentUri","parentTypeUri","onAdd","selectedAttributeTypes","onSelectAttributeTypes"]))((e=>{let{parentTypeUri:t,parentUri:r,selectedAttributeTypes:n,onSelectAttributeTypes:l,onAdd:i}=e;const o=S(),u=(0,T.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.ARY.Editing})))))(p);return a().createElement("div",{className:o.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=>{i({attributeType:e,parentUri:r})}))}}))}));var j=r(79935);const Z=(0,C.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(j.Z,null),a().createElement(A,null))})),I=e=>{let{value:t}=e;const r=y();return a().createElement("div",{className:r.cellValueWrapper},t)};var N=r(2002);const P=(0,b.makeStyles)((()=>({simpleAttributeWrapper:{padding:"15px"},complexAttributeWrapper:{padding:"15px","& + &":{borderTop:"1px solid rgba(0,0,0,.1)"}}})));function D(){return D=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},D.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=P();return a().createElement("div",{className:n.simpleAttributeWrapper},a().createElement(N.Z,D({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=P(),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=P(),i=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,i)};var z=r(51557);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 B=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=P();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,F({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,C.Z)((0,w.pick)(["onDelete","onPin","onIgnore","onEdit","onAdd","parentUri","readOnly","emptyTempAttributeUris"]))((e=>{let{value:t,onDelete:r,onEdit:n,onPin:l,onIgnore:i,onAdd:o,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(B,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:i,onAdd:o,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 i=y();return a().createElement("div",{className:i.cellValueWrapper},a().createElement("div",{ref:l,className:i.dragIndicator},a().createElement(G.Z,{className:i.dragIndicatorIcon})),a().createElement(X.Z,{className:i.attributeTitle,label:r.label}),!n&&a().createElement(q.Z,{values:t,attributeType:r,valueContainerClassName:i.ovValue}))},Q=e=>{let{value:t}=e;const r=y();return a().createElement("div",{className:i()(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),ie=r(39475),oe=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(oe.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,i]=(0,n.useState)(null),o=(0,T.AH)(),c=()=>i(null);return a().createElement(a().Fragment,null,a().createElement(ie.k,{icon:le.Z,tooltipTitle:s().text("View details"),size:"XS",onClick:e=>i(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,o))))},me=e=>{let{value:{ruleType:t,sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}=e;const o=y(),s=r||n||l;return a().createElement("div",{className:i()(o.cellValueWrapper,o.ruleType)},a().createElement("div",{className:o.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,T.AH)(),{isDimmed:l,highlightCrosswalk:i,removeHighlight:o}=(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:()=>i(),onMouseLeave:()=>o()},a().createElement(oe.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 I}},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)},Ce=(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)}})),Te=(e,t,r,n,a,l,i)=>{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 i=[...e.entityTypes,...e.relationTypes||[]].find((0,w.propEq)("uri",r)),o=null!==(a=null==i?void 0:i.survivorshipGroups)&&void 0!==a?a:[],s=n&&o.find((0,w.propEq)("uri",n))||o.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,i);case"winnerSources":return{crosswalks:ke(l,a)};default:return null}};var Se=r(87378),Ae=r(94059),je=r(38677),Ze=r(69089),Ie=r(79811),Ne=r(290),Pe=r(75779),De=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:i}=e;const[o,c]=(0,n.useState)("without");return a().createElement(Ze.Z,{open:t,TransitionProps:{onEnter:()=>c("without")}},a().createElement(Ne.Z,null,a().createElement(Pe.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:o,onChange:(0,w.pipe)(We.NA,c)},a().createElement(Re.Z,{value:"without",control:a().createElement(De.Z,null),label:s().text("Save without Ignore")}),a().createElement(Re.Z,{value:"with",control:a().createElement(De.Z,null),label:s().text("Save and apply Ignore to new value")})))),a().createElement(Ie.Z,null,a().createElement(je.Z,{onClick:r,color:"primary"},s().text("Cancel")),a().createElement(je.Z,{onClick:()=>{"with"===o?i():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(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fe(){return Fe=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},Fe.apply(this,arguments)}const Be=e=>e.ovValues.attributeType.uri,Ye=e=>{let{columnData:{id:t},cellIndex:r,rowValue:n}=e;return`${t}[${Be(n)}][${r}]`},_e=(0,n.memo)((e=>{let{entity:t,isLoading:r,crosswalksMap:l,visibleColumns:o=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:C=We.ZT,additionalHeaderItems:S,className:A,activeSurvivorshipGroupUri:j}=e;const Z=Le(),I=(0,T.AH)(),N=(0,n.useMemo)((()=>(0,w.pipe)((0,w.filter)((e=>{let{id:t}=e;return o.includes(t)})),Ce)(ve)),[o]),{type:P,uri:D,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)(P)),(0,w.map)((e=>(0,c.zeJ)(I,e,P))),(0,w.filter)((0,w.both)(w.identity,c.Uty)))(V);C(e)}}),[t,k]);const R=(0,n.useMemo)((()=>P?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((i=>{const o=(0,c.nIW)(i.uri),s=a[o],u=(0,c.YkG)(i)?n.relation:n.entity;return(0,w.pipe)((0,w.reduce)(((r,n)=>(0,w.assoc)(n,Te(n,e,t,i,u,s,l),r)),{}),(0,w.assoc)("rawValue",s))(r)}))}(I,P,k,o,l,V,j):[]),[I,P,k,o,V,l,j]),{getDynamicRowCellHeight:U,changeRowCellHeight:M}=(0,u.Z)(Ye),W=(0,n.useCallback)((e=>a().createElement(E,Fe({changeRowCellHeight:M},e))),[M]),H=(0,n.useCallback)((0,w.either)(U,(0,w.always)(68)),[U]),[L,z]=(0,n.useState)(null),[F,B]=(0,n.useState)(null),Y=(0,n.useCallback)((e=>{e.attributeValue.ignored?B(e):h(e)}),[h,B]),_=(0,n.useCallback)(((e,t)=>{C((0,w.move)(e,t,k))}),[C,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:D,parentTypeUri:P,selectedAttributeTypes:k,onSelectAttributeTypes:C,emptyTempAttributeUris:O,readOnly:y})),[z,g,v,Y,x,D,P,k,C,O,y]);return a().createElement("div",{className:i()(Z.tableContainer,A)},a().createElement(m.Z,{classes:{root:Z.tableHeader,title:Z.tableTitle},title:s().text("Sources")},S,a().createElement(p.Z,{columnsData:ve,selectedColumns:o,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(Ae.Z,{open:!!L,onClose:()=>z(null),onConfirm:G}),a().createElement(He,{open:!!F,onClose:()=>B(null),onConfirmEditWithIgnore:()=>h(F),onConfirmEditWithoutIgnore:()=>{h(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){ze(e,t,r[t])}))}return e}({},F,{clearAttributeFlags:!0}))}}))}))},26752:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(24328),a=r.n(n),l=r(2507),i=r.n(l),o=r(71153),s=r.n(o),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:o,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),o,"disabled"===l&&a().createElement(u.Z,{title:i().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),i=r(2507),o=r.n(i),s=r(95038),c=r.n(s),u=r(98952),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 C=r(71153),T=r.n(C),S=r(91785);const A=(0,x.makeStyles)((()=>({timestampEditorInput:{paddingTop:15,paddingBottom:15,fontSize:13},timestampEditor:{height:38}}))),j=e=>{let{value:t,classes:r={},disabled:l=!1,onChange:i}=e;const o=A(),[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&&i(e)}),[i,s,t]);return a().createElement(S.Z,{slotProps:{textField:{variant:"filled",InputProps:{disableUnderline:!0,classes:{input:o.timestampEditorInput,root:T()(o.timestampEditor,r.root)},onBlur:u}}},value:s||null,disabled:l,onChange:c,onClose:u})};var Z=r(14596);const I=(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:i,onDeleteAttribute:s}=e;const h=I(),[E,w]=(0,n.useState)([]),[x,O]=(0,n.useState)(null),C=(0,Z.AH)(),T=!("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:T,canBeDeleted:T},{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"}]),[]),A=(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,A.length>0&&r&&a().createElement(b.Z,{label:o().text("Add attributes"),onApply:e=>{e.length>0&&w((t=>t.concat((0,l.map)((0,l.prop)("uri"),e))))},data:A}),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)(C,t);return T?a().createElement(y.Z,{label:"",placeholder:t,className:h.editor,value:{value:t,label:r},options:(0,u.cwx)(C).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 i(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 T?a().createElement(v.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:h.editor},required:!0,variant:"filled",value:t,onInput:t=>i(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 T?a().createElement(v.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:h.editor},required:!0,variant:"filled",value:t,onInput:t=>i(e,t.target.value),size:"small",InputProps:{disableUnderline:!0,classes:{input:h.input}}}):a().createElement(k,{value:t});case"deleteDate":return a().createElement(j,{value:t&&c().utc((0,u.ZBU)(t)).valueOf(),onChange:t=>i(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:o().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),i=r(98952),o=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,i.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(o.Z,{className:r.sourceLabel,variant:"body2"},m))},b=(0,n.memo)((()=>{var e;const t=d(),{isDragging:r,clientOffset:i,item:o}=(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==i?void 0:i.x)-(null==c?void 0:c.x)}px, ${(null==i?void 0:i.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"===o.type&&a().createElement(m,{crosswalk:o.crosswalk})))}))},89468:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(2507),i=r.n(l),o=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},i().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(o.Z,{className:d.cancelButton,onClick:l},i().text("Cancel")),a().createElement(o.Z,{color:"primary",onClick:()=>{r(m),l()},disabled:!m.type||!m.value},i().text("Add"))))}},71285:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(23759),i=r(34802),o=r(98952),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)(),i=b({isOpaque:!n}),m=(0,d.AH)(),y=(0,o.tH7)(m,t);return a().createElement("div",{className:i.root},a().createElement(p.Z,{size:"XXS",className:i.focusedIcon,icon:r&&c.Z,disabled:!0}),a().createElement("div",{className:i.wrapper},a().createElement(u.Z,{className:i.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),C=r(39475),T=r(79935),S=r(19540),A=r(60925);const j=(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:i=!1,isColored:p=!0,focusable:m=!0,disableEdit:b,disableDelete:y,onDelete:f,onEdit:Z}=e;const I=(0,n.useRef)(null),[N,P]=(0,n.useState)(!1),[D,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),[F]=(0,l.RT)(),B=i?"#FFF":p?H?"rgba(0, 0, 0, 0.12)":U:"#CACCD1",Y=(0,o.tH7)(R,t.type),_=(0,o.nIW)(t.uri),G=(0,o.x_)(t),q=j({color:B,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&&F&&(0,o.aFF)(F,t)&&F!==t&&(null==I||null===(e=I.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}))}),[F]),a().createElement("div",{className:q.root,ref:I},a().createElement(C.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:B,variant:G?"disabled":"standart",onMouseEnter:()=>L(),onMouseLeave:()=>z()},r&&a().createElement(S.Z,{className:q.dependentIcon}),a().createElement(w.Z,{onClick:()=>P((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(T.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(C.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:D,onConfirm:()=>{W&&M(),f(_)},onClose:()=>V(!1)})),a().createElement(A.Z,{crosswalk:t,canEditAttribute:!b,onEditAttribute:(e,t)=>{Z({crosswalkId:_,attributeName:e,value:t})},onDeleteAttribute:e=>{Z({crosswalkId:_,attributeName:e})}}))))}));var I=r(55485);const N=(0,m.makeStyles)((()=>({root:{display:"flex",alignItems:"center",height:"28px",paddingLeft:"37px"}}))),P=e=>{let{showMore:t,onClick:r}=e;const n=N();return a().createElement(I.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")))},D=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[i.Y.Dependent].some((e=>g.some((0,o.aFF)(e))))&&f()}),[g]),a().createElement(a().Fragment,null,0===r[i.Y.Simple].length&&0===r[i.Y.Empty].length&&a().createElement(y,{crosswalkType:t,focusable:c}),r[i.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[i.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[i.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[i.Y.Dependent].length>0&&a().createElement(P,{showMore:!u,onClick:()=>f()}))}},73972:(e,t,r)=>{r.d(t,{P:()=>o});var n=r(24328),a=r(50914),l=r(98952),i=r(79573);const o=e=>{let{onLoad:t=i.ZT,onSuccess:r=i.ZT,onError:o=i.ZT}=e;const s=(0,n.useCallback)((e=>{t(),e.then((e=>{let{errors:t}=e;if(t)throw t;r()})).catch(o)}),[t,o,r]);return{addCrosswalk:(0,n.useCallback)((e=>{let{entity:t,contributorCrosswalk:r,crosswalk:n}=e;const i=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)(i)}),[s]),editCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:i}=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:i})}),[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(98952),l=r(50914),i=r(79573);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){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=i.ZT,onModify:s=i.ZT,onError:u=i.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:C,pinAttribute:T,createAttribute:S,updateAttribute:A}=(e=>{let{onSuccess:t=i.ZT,onError:r=i.ZT,onLoad:o=i.ZT}=e;const s=(0,n.useCallback)((e=>{o(),e.then((()=>{t()})).catch(r)}),[r,t,o]),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 i=(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(i)}),[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,clearAttributeFlags:l}=e;(0,a.YkM)(r)||(0,a.Or$)(r)||s((async()=>{await c((0,a.tCj)({attributeUri:t.uri,sourceUri:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,value:(0,a.CwH)(r)?t.lookupCode:t.value})),l||(t.ignored?await c((0,a.P8_)({attributeUri:t.uri,value:!0})):t.pin&&await c((0,a.xkv)({attributeUri:t.uri,value:!0})))})())}),[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}),j=(0,n.useCallback)((e=>{let{attributeType:t,parentUri:r,crosswalk:n,index:i}=e;const s=(0,a.gjI)({parentUri:r,attributeType:t}),{uri:c}=s;if(n){const{ownerType:e}=n;f((t=>o({},t,{[e]:o({},t[e],{[c]:[n]})})))}d((e=>{var n;return(0,l.isNil)(i)&&(i=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:i})})),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]),I=(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))),i=(0,a.ww$)({entity:p,attributeType:r,uri:e,value:(0,a.kDl)(t)});S({attributeValue:(0,a.dLR)(i,l),crosswalk:n}),v.current=n}}else A(e)}),[S,A,p]);return{modifiedEntity:p,crosswalksMap:y,onAddAttribute:j,onDeleteAttribute:Z,onPinAttribute:T,onIgnoreAttribute:C,onEditAttribute:I,newlyCreatedAttributes:E,emptyTempAttributeUris:m}}},34802:(e,t,r)=>{r.d(t,{Y:()=>n});let n=function(e){return e.Simple="simple",e.Empty="empty",e.Dependent="dependent",e}({})},10765:(e,t,r)=>{r.d(t,{o:()=>s});var n=r(98952),a=r(50914),l=r(34802);const i=e=>e[l.Y.Simple].length>0?1:e[l.Y.Dependent].length>0?e[l.Y.Empty].length>0?2:3:4,o=(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,i)=>(r[i.type]||(r[i.type]={[l.Y.Simple]:[],[l.Y.Empty]:[],[l.Y.Dependent]:[]}),"relation"===i.ownerType?r[i.type][l.Y.Dependent].push(i):((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,i)?r[i.type][l.Y.Empty].push(i):((e,t,r)=>!(0,n.sJj)(r).some((r=>{const l=(0,n.AFK)(r,e),i=t.find((0,a.propEq)("uri",l));return i&&!(0,n.YkM)(i)})))(e,t,i)?r[i.type][l.Y.Dependent].push(i):r[i.type][l.Y.Simple].push(i),r)),{});return Object.keys(s).sort(((e,t)=>i(s[e])-i(s[t])||(e<t?-1:1))).map((e=>({source:e,crosswalksByTypes:o(s[e])})))}))},38361:(e,t,r)=>{r.d(t,{R:()=>o,Q:()=>s});var n=r(24328),a=r.n(n),l=r(98952);const i=(0,n.createContext)(null),o=e=>{let{children:t,attributeUris:r}=e;return a().createElement(i.Provider,{value:r},t)},s=e=>((0,n.useContext)(i)||[]).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:{},
|
|
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]="32da0740-2e28-4438-9e89-bc895054f4b6",e._sentryDebugIdIdentifier="sentry-dbid-32da0740-2e28-4438-9e89-bc895054f4b6")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"756a7513a42a2e35d42e606647a4e60f455dcf69"},(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(45738);const a=t.ZP}}]);
|
|
2
2
|
//# sourceMappingURL=2400.js.map
|
package/2617.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]="d0ca9622-9ecc-4ebe-b0d5-76140053fd54",e._sentryDebugIdIdentifier="sentry-dbid-d0ca9622-9ecc-4ebe-b0d5-76140053fd54")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"8092e028fb6b3ede67d3d5f8b1b656d20999d287"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2617],{42639:(e,t,n)=>{n.d(t,{Z:()=>u});var a=n(65439),r=n(71153),i=n.n(r),l=n(24328),o=n.n(l);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},s.apply(this,arguments)}var c=function(e){return e[e.ICON_MODE=0]="ICON_MODE",e[e.TEXT_MODE=1]="TEXT_MODE",e[e.ERROR_MODE=2]="ERROR_MODE",e}(c||{});const u=e=>{let{className:t,icon:n,avatarText:r,rootClasses:u}=e,d=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["className","icon","avatarText","rootClasses"]);const[p,h]=(0,l.useState)(null);(0,l.useEffect)((()=>{h(n?c.ICON_MODE:c.TEXT_MODE)}),[n,r]);const m=()=>{h(c.ERROR_MODE)};switch(p){case c.ICON_MODE:return o().createElement(a.Z,s({className:i()(t,null==u?void 0:u.iconRoot),src:n,onError:m},d));case c.TEXT_MODE:case c.ERROR_MODE:return o().createElement(a.Z,s({className:i()(t,null==u?void 0:u.textRoot)},d),r);default:return null}}},30488:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(38748),r=n(50548);const i=e=>t=>(0,r.l)(a.X,e,t)},87825:(e,t,n)=>{n.d(t,{Z:()=>f});var a=n(24328),r=n.n(a),i=n(13980),l=n.n(i),o=n(53862);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},s.apply(this,arguments)}const c=e=>r().createElement("svg",s({width:20,height:18,viewBox:"0 0 20 18",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("path",{d:"M16 7.24V6h-4v1.24a8.417 8.417 0 00-2 .768V6H6v6h.29a8.497 8.497 0 00-.15.358l-.29.733.29.733.07.176H2c-1.1 0-2-.9-2-2V2C0 .9.9 0 2 0h14c1.1 0 2 .9 2 2v6.008a8.417 8.417 0 00-2-.768zM4 12V6H2v6h2zm0-8V2H2v2h2zm6 0V2H6v2h4zm6 0V2h-4v2h4zm-2 5a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091A6.451 6.451 0 0014 9zm0 6.818a2.728 2.728 0 010-5.454 2.728 2.728 0 010 5.454zm0-4.363c-.905 0-1.636.73-1.636 1.636 0 .905.73 1.636 1.636 1.636.905 0 1.636-.73 1.636-1.636 0-.906-.73-1.636-1.636-1.636z",fill:"#000",fillRule:"nonzero",stroke:"none",strokeWidth:1,opacity:.54}));var u=n(39475),d=n(50914),p=n(45013),h=n(2507),m=n.n(h),b=n(15954);const g=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:i,title:l,tooltipTitle:o}=e;const[s,h]=(0,a.useState)(null),g=(0,a.useCallback)((e=>{const t=(0,d.pipe)(b.JJ,(0,d.pluck)("id"))(e),a=(0,b.u)(n,e);i(a?(0,d.difference)(n,t):(0,d.uniq)((0,d.concat)(n,t)))}),[n,i]);return r().createElement(r().Fragment,null,r().createElement(u.k,{tooltipTitle:o||m().text("Show/hide columns"),size:"L",icon:c,onClick:e=>h(e.currentTarget)}),r().createElement(p.G,{onColumnClick:g,anchorEl:s,columnsData:t,onClose:()=>h(null),title:l,selectedColumns:n}))};g.propTypes={columnsData:o.uz,selectedColumns:l().arrayOf(l().string),onChangeColumns:l().func,title:l().string,tooltipTitle:l().string};const f=g},45013:(e,t,n)=>{n.d(t,{G:()=>E});var a=n(24328),r=n.n(a),i=n(2507),l=n.n(i),o=n(50914),s=n(98952),c=n(63485),u=n(22311),d=n(15954),p=n(41008),h=n(26638),m=n(13980),b=n.n(m),g=n(33117),f=n(94792),y=n(71153),v=n.n(y);const x=(0,n(72342).makeStyles)({popup:{minWidth:"200px"},groupItem:{backgroundColor:"rgba(0,0,0,0.04)"}}),C=e=>{let{item:t,onClick:n,checked:a,level:i,style:l,isFocused:o,isGroupItem:s,hideCheckBox:c}=e;const u=x();return r().createElement(g.Z,{hideCheckBox:c,key:t.id,onClick:n,checked:a,level:i,data:t,label:r().createElement(f.Z,{text:t.label,highlight:t.filterText}),labelInText:t.label,style:l,isFocused:o,hideIcon:s,className:v()({[u.groupItem]:s})})};C.propTypes={item:b().shape({label:b().string,filterText:b().string}),level:b().number,onClick:b().func,checked:b().bool,style:b().object,isGroupItem:b().bool,isFocused:b().bool,hideCheckBox:b().bool};const k=C,E=e=>{let{anchorEl:t,onClose:n,title:i,columnsData:m,onColumnClick:b,selectedColumns:g,hideCheckBox:f}=e;const y=x(),[v,C]=(0,a.useState)(""),E=(0,a.useMemo)((()=>(0,d.eX)(m,v)),[m,v]),O=(0,a.useMemo)((()=>(0,p.LG)(E)),[E]),S=(0,s.fW1)("label")(E)||308,w=(0,a.useCallback)((e=>{let{item:t}=e;return b(t)}),[b]),{focusIndex:I,handleKeyDown:T}=(0,h.t)({items:O,open:!0,onSelectFocusedItem:w,selectedItems:g,onClose:n}),P=(0,a.useCallback)((0,o.pipe)(n,(()=>C(""))),[n]),R=Math.min(300,32*O.length),j=Math.max(140,R+108);return r().createElement(u.Z,{className:y.popup,open:!!t,anchorEl:t,onClose:P,onSearch:C,title:i||l().text("Show/hide columns"),containerWidth:S,containerHeight:j,searchInputOnKeyDown:T},r().createElement(c.Z,{fixedTitle:!1,height:R,renderItem:(e,t,n)=>{let{item:a,level:i=0}=t;return r().createElement(k,{hideCheckBox:f,style:e,item:a,level:i,isFocused:I===n,checked:(0,d.u)(g,a),isGroupItem:(0,d.yf)(a),onClick:f?(0,o.pipe)(b,P):b})},items:O,getItemSize:()=>32,focusIndex:I}))}},15954:(e,t,n)=>{n.d(t,{eX:()=>f,JJ:()=>y,yf:()=>o,u:()=>v});var a=n(50914),r=n(98952);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){l(e,t,n[t])}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const o=e=>e.id===e.groupId,s=(0,a.curry)(((e,t)=>{let{id:n,groupId:a}=e;return t.groupId===a&&(n===t.id||n.startsWith(`${t.id}.`))})),c=(0,a.curry)(((e,t)=>{let{groupId:n}=e;return n===t.id})),u=(0,a.propOr)(!0,"hideable"),d=(e,t)=>{const n=((e,t)=>e.find((0,a.either)(c(t),s(t))))(e,t);return n?(n.children=d(n.children||[],t),e):e.concat(t)},p=(0,a.curry)(((e,t)=>r.P6Y.strings.search(t.label,e)||(t.children||[]).some(p(e)))),h=(0,a.reduce)(((e,t)=>d(e,{id:t.id,groupId:t.groupId,label:t.label,attrType:t.dataTypeDefinition})),[]),m=(0,a.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,a.pipe)((0,a.filter)(p(e)),(0,a.chain)((t=>[{item:i({},t,{filterText:e}),level:n},...t.children?m(e,t.children,n+1):[]])))(t)})),b=(0,a.has)("columns"),g=e=>{let{id:t,label:n,columns:r}=e;return[{id:t,groupId:t,label:n},...r.map((0,a.assoc)("groupId",t))]},f=(e,t)=>(0,a.pipe)((0,a.chain)((0,a.when)(b,g)),(0,a.filter)((0,a.either)(o,u)),h,m(t))(e),y=e=>e.children?(0,a.chain)(y,e.children):[e],v=(e,t)=>{const n=y(t),a=t=>e.includes(t.id);return o(t)?n.every(a):n.some(a)}},20146:(e,t,n)=>{n.d(t,{Z:()=>p});var a=n(24328),r=n.n(a),i=n(71153),l=n.n(i),o=n(98952),s=n(79312),c=n(40007),u=n(14596);const d=(0,n(72342).makeStyles)({"entityType-overflow":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",marginRight:"12px",borderRadius:"2px",flexShrink:0},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",marginRight:"16px",flexShrink:0}}),p=e=>{let{entity:t,className:n,size:a="small"}=e;const i=d(),p=(0,u.AH)(),h=(0,o.nt9)(p,t.type),m=(h?(0,o.VD3)(p,h,"typeColor"):null)||o.rSc.palette.primary.main,b=(0,o.jFi)(p,t);return r().createElement(c.Z,{value:b,placement:"top"},r().createElement(s.Z,{style:{backgroundColor:m,color:o.P6Y.Colors.getColor(m)?"#FFFFFF":"#212121"},className:l()(i[`entityType-${a}`],i["entityType-overflow"],n),component:"div"},b))}},79386:(e,t,n)=>{n.d(t,{Z:()=>f});var a=n(24328),r=n.n(a),i=n(71153),l=n.n(i),o=n(50914),s=n(79312),c=n(23883),u=n(2507),d=n.n(u),p=n(98952),h=n(37573),m=n(20146),b=n(14596);const g=(0,n(72342).makeStyles)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"0px 1px 0px rgba(0, 0, 0, 0.12)",marginBottom:"1px","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),f=e=>{let{className:t,entity:n,children:i,classes:u,renderLabel:f=o.identity}=e;const y=g({classes:u}),v=(0,b.AH)(),x=(0,b.QQ)(),C=(0,a.useCallback)((()=>{navigator.clipboard.writeText((0,p.BTI)(n))}),[n]);if((0,o.isNil)(n))return null;const k=(0,p.idV)(n.label),E=n.secondaryLabel,O=(0,p.ptG)(v,n),S=(0,p.Fn9)(n),w=n.uri,I=(0,p.BTI)(n);return r().createElement("div",{className:l()(y.profileBandWrapper,t)},r().createElement("div",{className:l()(y.profileBand,{[y.inactive]:!S}),"data-entity-uri":w},r().createElement(h.Z,{key:n.uri,entity:n,avatarClassName:y.profileIcon,imageClassName:y.imageProfileIcon}),r().createElement("div",{className:y.profileInfo},r().createElement("div",null,r().createElement(s.Z,{variant:"h6",className:y.label},f(k)),E&&r().createElement(s.Z,{variant:"subtitle2",className:y.secondaryLabel},E),O&&r().createElement(s.Z,{variant:"subtitle1",className:y.businessCard},O)),r().createElement("div",{className:y.specialInfo},r().createElement("div",{className:y.entityType},r().createElement(m.Z,{entity:n,size:"medium",className:y.badge}),!(0,p.ZiX)(w)&&x&&r().createElement(c.Z,{title:d().text("Copy to clipboard")},r().createElement(s.Z,{display:"inline",variant:"body2",className:y.entityId,onClick:C},d().text("Entity ID"),": ",I))))),i&&r().createElement("div",null,i)))}},76368:(e,t,n)=>{n.d(t,{a:()=>N});var a=n(24328),r=n.n(a),i=n(55485),l=n(23468),o=n(31373),s=n(98952),c=n(71153),u=n.n(c),d=n(50914),p=n(2507),h=n.n(p),m=n(49753),b=n(78223),g=n(39475);const f=(0,n(72342).makeStyles)({container:{display:"flex",alignItems:"center"},link:{whiteSpace:"nowrap",marginRight:"9px"}}),y=(0,b.Z)(i.Z),v=e=>{var t;let{className:n,total:i=0,onPrev:c,onNext:p,onSearchResultsClick:b,isPrevDisabled:v,isNextDisabled:x}=e;const C=f(),k=(0,a.useContext)(m.T),{OPEN_RESULTS:E,SEARCH_RESULT:O,SEARCH_RESULTS:S,NEXT_PROFILE:w,PREVIOUS_PROFILE:I}=(0,d.mergeRight)({OPEN_RESULTS:h().text("Go to search results"),SEARCH_RESULT:h().text("Search result"),SEARCH_RESULTS:h().text("Search results"),PREVIOUS_PROFILE:h().text("Go to previous profile"),NEXT_PROFILE:h().text("Go to next profile")},null!==(t=null==k?void 0:k.profileBand)&&void 0!==t?t:{});return r().createElement("div",{className:u()(C.container,n)},r().createElement(y,{className:C.link,component:"button",variant:"caption",onClick:b,underline:"none",tooltipTitle:E},(0,s.k7L)(i,1e6)," ",1===i?O:S),r().createElement(g.k,{size:"L",icon:l.Z,"data-reltio-id":"reltio-previous-profile-button",tooltipTitle:I,onClick:c,disabled:v,showForDisabled:!0}),r().createElement(g.k,{size:"L",icon:o.Z,"data-reltio-id":"reltio-next-profile-button",tooltipTitle:w,onClick:p,disabled:x,showForDisabled:!0}))};var x=n(63532),C=n(14596),k=n(96697),E=n(98001),O=n(19701);function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){w(e,t,n[t])}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class I{constructor(e){var t=this;let{data:{query:n,sortField:a,sortOrder:r},tenant:i,searchTenant:l,apiPath:o,dtssPath:c,globalSearchRequestOptions:u}=e;this.query=void 0,this.sortField=void 0,this.sortOrder=void 0,this.tenant=void 0,this.searchTenant=void 0,this.apiPath=void 0,this.dtssPath=void 0,this.globalSearchRequestOptions=void 0,this.isDT=()=>this.tenant!==this.searchTenant,this.getQueryFilter=()=>({rawFilter:this.query}),this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=[t.getQueryFilter(),...e],r=S({},t.globalSearchRequestOptions,{sort:t.sortField,order:t.sortOrder,select:"uri,label,type",scoreEnabled:!1},n);return t.isDT()?(0,s.uqV)({filters:a,options:r,customerTenant:t.tenant,dataTenant:t.searchTenant,dtssPath:t.dtssPath}):(0,s.ZOr)(a,r)},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"uri",values:[e]}],{offset:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{offset:t,max:e}),this.requestTotal=()=>{const e=[this.getQueryFilter()],t=this.globalSearchRequestOptions;return(this.isDT()?(0,s.J$m)({filters:e,options:t,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,s.j_Q)(e,t)).then((e=>e.total))},this.query=n,this.sortField=a,this.sortOrder=r,this.tenant=i,this.searchTenant=l,this.apiPath=o,this.dtssPath=c,this.globalSearchRequestOptions=u}}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){P(e,t,n[t])}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class R{constructor(e){var t=this;let{data:n,tenant:a,apiPath:r}=e;this.searchBody=void 0,this.tenant=void 0,this.apiPath=void 0,this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=[{rawFilter:t.searchBody.filter},...e];return(0,s.P2h)({apiPath:t.apiPath,tenant:t.tenant,searchBody:T({},t.searchBody,{filter:e.length?(0,s.Uqd)()(a):t.searchBody.filter}),options:n})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"id",values:[(0,s.BTI)({uri:e})]}],{from:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{from:t,max:e}),this.requestTotal=()=>(0,s.dED)({apiPath:this.apiPath,tenant:this.tenant,searchBody:this.searchBody}).then((e=>e.count)),this.searchBody=n,this.tenant=a,this.apiPath=r}}const j=(e,t)=>(0,d.pipe)((0,d.map)((0,d.prop)("uri")),(0,d.reject)((e=>t.includes(e))))(e),N=e=>{let{className:t}=e;const{total:n,onPrev:i,onNext:l,onSearchResultsClick:o,isPrevDisabled:c,isNextDisabled:u}=(()=>{const e=(0,O._)(),t=(0,O._)(),n=(0,O._)(),r=(0,a.useContext)(x.m),i=(0,C.qq)("searchNavigationListener"),l=(0,C.ax)("updateSearchNavigationDataFields"),o=(0,C.ax)("openEntity"),c=(0,C.ax)("openPerspective"),{uri:u,index:d,total:p,tenant:h,cache:m}=(0,C.M3)()||{},{type:b,data:g}=(0,C.XS)()||{},f=(0,C.Uv)(),y=(0,C.id)(),v=(0,C.rg)(),S=(0,C.mU)(["ovOnly"]),{updateEntitiesNavigationLoadingState:w}=(0,k.M)(),[T,P]=(0,a.useState)(!1),N=(0,a.useMemo)((()=>((e,t)=>{switch(e){case"search":return new I(t);case"graphsearch":return new R(t)}})(b,{data:g,tenant:f,searchTenant:h,apiPath:y,dtssPath:v,globalSearchRequestOptions:S})),[b,g,f,h,y,v,S]),D=(0,a.useCallback)((e=>{l(e)}),[l]),z=(0,a.useCallback)((e=>{const t=f!==h?(0,s.wwR)({uri:e,dataTenant:h}):e;o({uri:t,viewId:r,source:"navigation"})}),[o,r,f,h]),Z=(0,a.useCallback)((()=>{c({perspectiveId:b,viewId:r})}),[c,b,r]);(0,a.useEffect)((()=>{0!==p&&d>=p?D({index:p-1}):d<0&&D({index:0})}),[p,d,D]);const F=(0,E.u)();(0,a.useEffect)((()=>{const e=F(i);return()=>e()}),[F,D,i]);const L=(0,a.useCallback)(((e,a,r)=>{P(!0),t(N.requestTotal()).then((e=>D({total:e})));const i=r+1;return n(N.requestEntities(15,i)).then((t=>{if(t){if(t.length){const n=j(t,e);if(n.length>0)return D({cache:e.concat(n),uri:n[0],index:i+t.length-n.length}),void z(n[0]);if(r+t.length<a-1)return L(e,a-t.length,r+t.length)}D({index:i})}})).finally((()=>{P(!1)}))}),[N,D,z]),_=(0,a.useCallback)(((e,a)=>{P(!0),t(N.requestTotal()).then((e=>D({total:e})));const r=a-1,i=Math.max(0,a-15),l=15+Math.min(0,a-15);return n(N.requestEntities(l,i)).then((t=>{if(t){if(t.length){const n=j(t,e);if(n.length>0)return D({cache:n.concat(e),uri:n[n.length-1],index:r-(t.length-n.length)}),void z(n[n.length-1]);if(a-t.length>0)return _(e,a-t.length)}D({index:0})}})).finally((()=>{P(!1)}))}),[N,D,z]),B=(0,a.useCallback)(((t,n,a,r)=>{if(n<t.length){const i=t[n];return P(!0),e(N.checkEntity(i)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),B(e,n,a-1,r)}D({index:r+1,uri:i,cache:t,total:a}),z(i)})).finally((()=>{P(!1)}))}if(!(r>=a-1))return L(t,a,r);D({cache:t,total:a,index:a-1})}),[N,D,z,L]),q=(0,a.useCallback)(((t,n,a,r)=>{if(n>-1){const i=t[n];return P(!0),e(N.checkEntity(i)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),q(e,n-1,a-1,r-1)}D({index:r-1,uri:i,cache:t,total:a}),z(i)})).finally((()=>{P(!1)}))}if(!(r<=0))return _(t,r);D({index:0,cache:t,total:a})}),[N,D,z,_]),M=(0,a.useCallback)((()=>{if(m&&u){const e=m.indexOf(u)-1;q(m,e,p,d)}}),[q,m,u,p,d]),H=(0,a.useCallback)((()=>{if(m&&u){const e=m.indexOf(u)+1;B(m,e,p,d)}}),[B,m,u,p,d]);return(0,a.useEffect)((()=>{w(T)}),[w,T]),(0,a.useEffect)((()=>()=>w(!1)),[]),{total:p,onPrev:M,onNext:H,onSearchResultsClick:Z,isPrevDisabled:T||d<=0,isNextDisabled:T||d>=p-1}})();return(()=>{const{cache:e}=(0,C.M3)()||{},t=(0,C.YA)(),n=(0,C.eh)();return(0,s.uzs)(t)&&(null==e?void 0:e.includes(null==n?void 0:n.uri))})()?r().createElement(v,{className:t,total:n,onPrev:i,onNext:l,onSearchResultsClick:o,isPrevDisabled:c,isNextDisabled:u}):null}},11802:(e,t,n)=>{n.d(t,{u:()=>h});var a=n(24328),r=n.n(a),i=n(71153),l=n.n(i),o=n(31396),s=n(47746),c=n(98952);const u=(0,n(72342).makeStyles)((()=>({container:{position:"relative","& .Resizer":{zIndex:1,boxSizing:"border-box",backgroundClip:"padding-box","&.disabled":{cursor:"initial",height:0,margin:0},"&.horizontal":{height:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"100% 1px",backgroundPosition:"top",width:"100%",marginBottom:"-10px","&:not(.disabled):hover":{cursor:"row-resize",backgroundImage:"linear-gradient(rgba(0, 114, 206, 0), rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1))",backgroundSize:"100% 3px"}},"&.vertical":{width:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"1px 100%",backgroundPosition:"left",height:"100%",marginRight:"-10px","&:not(.disabled):hover":{cursor:"col-resize",backgroundImage:"linear-gradient(to left, rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1), rgba(0, 114, 206, 0.35))",backgroundSize:"3px 100%"}}}}}))),d=250,p=e=>"horizontal"===e,h=e=>{let{className:t,children:n,orientation:i,primary:h,defaultSize:m,size:b,minSize:g,maxSize:f,allowResize:y,debounceInterval:v=d,onChange:x}=e;const C=u(),k=(0,s.Z)(),[E,O]=(0,a.useState)(null),[S,w]=(0,a.useState)(!0),I=(0,a.useCallback)((()=>w(!0)),[]),T=(0,a.useCallback)((()=>w(!1)),[]),P=()=>p(i)?null==E?void 0:E.clientHeight:null==E?void 0:E.clientWidth,R=(0,a.useCallback)((0,c.DsO)((e=>{const t=P();x({percentageSize:e/t*100+"%",isMaxSize:+f>0?e===f:e===t+f,isMinSize:e===g,size:e})}),v),[x,i,f,E]),j=(0,a.useMemo)((()=>({transition:k.transitions.create(p(i)?"height":"width",{easing:k.transitions.easing.sharp,duration:k.transitions.duration.leavingScreen})})),[i,k]);return"number"==typeof b&&b<0&&(b=(P()||0)+b),r().createElement("div",{ref:O,className:l()(C.container,t)},r().createElement(o.Z,{split:i,size:b,primary:h,allowResize:y,onChange:R,defaultSize:m,minSize:g,maxSize:f,onDragStarted:T,onDragFinished:I,pane1Style:S?j:void 0},n))};h.displayName="ResizablePanes"},21210:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(24328),r=n.n(a),i=n(98952),l=n(42639),o=n(14596);const s=e=>{let{sourceType:t,className:n,classes:a}=e;const s=(0,o.AH)(),{uri:c,icon:u}=(0,i.PWK)(s,t)||{},d=c?(0,i.tH7)(s,c)[0]:"",p=u?(0,i.vPL)("https://s3.amazonaws.com/reltio.images/api",u):null;return r().createElement(l.Z,{className:n,avatarText:d,icon:p,variant:"square",rootClasses:a})}},79935:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(24328),r=n.n(a);const i=()=>r().createElement("div",{style:{flex:1}})},75647:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(24328),r=n.n(a),i=n(2507),l=n.n(i),o=n(38677),s=n(79312),c=n(14596);const u=(0,n(72342).makeStyles)({root:{display:"flex",alignItems:"flex-start"},slice:{fontWeight:500},cancelButton:{width:"88px",flexShrink:0,marginLeft:"15px"}}),d=()=>{const e=u(),t=(0,c.ax)("clearHistoryEvent"),n=(0,c.OK)();return n?r().createElement("div",{className:e.root},r().createElement(s.Z,{component:"div"},l().text("You are viewing a historic slice:")," ",r().createElement("span",{className:e.slice},l().date(n.aStamp,"llll"))),r().createElement(o.Z,{className:e.cancelButton,variant:"contained",color:"primary",onClick:t},l().text("Cancel"))):null}},98001:(e,t,n)=>{n.d(t,{G:()=>l,u:()=>o});var a=n(24328),r=n.n(a);const i=(0,a.createContext)(null);i.displayName="ActionsHookContext";const l=e=>{let{children:t,hook:n}=e;return r().createElement(i.Provider,{value:n},t)},o=()=>{const e=(0,a.useContext)(i);if(!e)throw new Error("ActionsHookContext must be provided");return e}},23759:(e,t,n)=>{n.d(t,{hR:()=>c,nX:()=>u,RT:()=>d,pu:()=>p,BF:()=>h});var a=n(24328),r=n.n(a),i=n(98952),l=n(50914),o=n(79573);const s=(0,a.createContext)(null),c=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["children"]);return r().createElement(s.Provider,{value:n},t)},u=e=>{const{getCrosswalkColor:t=(0,l.pipe)(i.uKF,i.CJp)}=(0,a.useContext)(s)||{};return e?t(e):""},d=()=>{const{highlightedCrosswalks:e=[]}=(0,a.useContext)(s)||{};return e},p=e=>{const{highlightedCrosswalks:t=[],setCrosswalkHighlighted:n=o.ZT}=(0,a.useContext)(s)||{},r=!!e&&!!t.find((0,l.eqBy)(i.uKF,e));return{isHighlighted:r,isDimmed:t.length>0&&!r,highlightCrosswalk:(0,a.useCallback)((()=>n(e,!0)),[e,n]),removeHighlight:(0,a.useCallback)((()=>n(e,!1)),[e,n])}},h=e=>{const{toggleCrosswalkFocus:t=o.ZT,focusedCrosswalks:n=[]}=(0,a.useContext)(s)||{};return{isFocused:!!e&&n.some((0,l.eqBy)(i.uKF,e)),toggleCrosswalkFocus:(0,a.useCallback)((()=>t(e)),[e,t])}}},96697:(e,t,n)=>{n.d(t,{f:()=>h,M:()=>m});var a=n(24328),r=n.n(a),i=n(50914),l=n(79573),o=n(98001),s=n(14596);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=r().createContext({isLoading:!1,isEmptyState:!1,updateEntityLoadingState:l.ZT,updateEntitiesNavigationLoadingState:l.ZT,resetLoadingState:l.ZT}),p={entitiesNavigation:!1,entity:!1,entityCleansing:!1},h=e=>{let{children:t}=e;const n=(()=>{const[e,t]=(0,a.useState)(p),n=(0,a.useCallback)((e=>{t((t=>c({},t,{entity:e})))}),[]),r=(0,a.useCallback)((e=>{t((t=>c({},t,{entitiesNavigation:e})))}),[]),l=(0,a.useCallback)((e=>{t((t=>c({},t,{entityCleansing:e})))}),[]),u=(0,a.useCallback)((()=>{t(p)}),[]),d=(0,o.u)(),h=(0,s.qq)("cleanseLoadingListener"),m=(0,a.useMemo)((()=>h(l)),[h,l]);return(0,a.useEffect)((()=>{const e=d(m);return()=>e()}),[m,d]),{isLoading:Object.values(e).includes(!0),isEmptyState:(0,i.pipe)((0,i.omit)(["entityCleansing"]),i.values,(0,i.includes)(!0))(e),updateEntityLoadingState:n,updateEntitiesNavigationLoadingState:r,updateEntityCleansingLoadingState:l,resetLoadingState:u}})();return r().createElement(d.Provider,{value:n},t)},m=()=>(0,a.useContext)(d)},49753:(e,t,n)=>{n.d(t,{T:()=>r});var a=n(24328);const r=n.n(a)().createContext({profileBand:{}});r.displayName="LabelsContext"},36852:(e,t,n)=>{n.d(t,{C:()=>h});var a=n(24328),r=n(50914),i=n(98952),l=n(14596);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){s(e,t,n[t])}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c=(e,t)=>t.filter((t=>t.replyId!==e)),u=(e,t)=>{const n=e.replies.findIndex((e=>{let{replyId:n}=e;return n===t.replyId})),a=[...e.replies];return a[n]=t,a},d=[],p=e=>console.warn("Collaboration error",e),h=e=>{let{objectIds:t=d,objectTypes:n,enabled:s=!0}=e;const h=(0,l.eh)(),m=(0,l.Uv)(),b=(0,l.f5)(),g=(0,l.Bv)()&&s,[f,y]=(0,a.useState)(null),[v,x]=(0,a.useState)([]),[C,k]=(0,a.useState)(null),[E,O]=(0,a.useState)(null),[S,w]=(0,a.useState)(!1),[I,T]=(0,a.useState)(!1),[P,R]=(0,a.useState)({}),j=(0,a.useCallback)((e=>{k((t=>o({},t,e)))}),[]),N=null==h?void 0:h.uri,D=(0,a.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(g&&N&&!(0,i.ZiX)(N)){const n=e=>{console.warn("Collaboration error",e),k(null)};(0,r.pipe)(i.$oF,(0,r.andThen)((0,r.map)((0,r.props)(["objectId","comments"]))),(0,r.andThen)(r.fromPairs),(0,r.andThen)(t?k:j),(0,r.otherwise)(n))({uris:e,tenant:m,collaborationPath:b})}else k(null)}),[j,b,N,g,m]);(0,a.useEffect)((()=>{D(t,!0)}),[t,D]);const z=(0,a.useCallback)(((e,t)=>{(0,i.liG)({collaborationPath:b,tenant:m,relatedObjectUri:e,pageToken:t}).then((e=>{let{items:n,nextPageToken:a}=e;x((e=>t?(0,r.uniqBy)((0,r.prop)("commentId"),[...e,...n]):n)),y(a)})).catch(p)}),[b,m]),Z=(0,a.useCallback)((e=>{T(!0),(0,i.d7q)({collaborationPath:b,tenant:m,commentId:e}).then(O).catch(p).finally((()=>T(!1)))}),[b,m]),F=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,objectType:a,uri:r,relatedObjectUris:l}=e;w(!0);const s={objectId:r,content:t,relatedObjectUris:l,objectType:a,visibility:"public",namedUsers:n,permanentLink:`${window.location.href}&commentId=${encodeURIComponent("{commentId}")}`};return(0,i.Yrx)({collaborationPath:b,tenant:m,data:s}).then((e=>{let[t]=e;return((e,t)=>{O(e),k((n=>o({},n,{[t]:[...n[t]||[],{commentId:e.commentId,replies:0,status:"open"}]}))),x((t=>[e,...t]))})(t,r)})).catch(p).finally((()=>w(!1)))}),[b,m]),L=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,objectType:a,uri:l,relatedObjectUris:s,commentId:c,replies:u}=e;w(!0);const d={objectId:l,content:t,relatedObjectUris:s,objectType:a,visibility:"public",namedUsers:n,commentId:c,replies:u};return(0,i.uAg)({collaborationPath:b,tenant:m,data:d}).then((e=>(e=>{O(e),x((0,r.map)((0,r.when)((0,r.propEq)("commentId",e.commentId),(0,r.always)(e))))})(o({},e,{replies:u})))).catch(p).finally((()=>w(!1)))}),[b,m]),_=(0,a.useCallback)((e=>{let{uri:t,commentId:n}=e;w(!0),(0,i.YFy)({collaborationPath:b,tenant:m,commentId:n}).then((()=>((e,t)=>{O(null),k((n=>{const a=n[t]||[];return o({},n,{[t]:a.filter((t=>t.commentId!==e))})})),x((t=>t.filter((t=>t.commentId!==e))))})(n,t))).catch(p).finally((()=>w(!1)))}),[b,m]),B=(0,a.useCallback)(((e,t,n,a)=>{const r="resolve"===e.action?"resolved":"open",{replyId:i}=e;O("resolved"===r?e=>{if(e)return null}:t=>{if(t)return o({},t,{replies:a?c(i,t.replies):[...t.replies,e]})}),k((e=>o({},e,{[t]:(e[t]||[]).map((e=>e.commentId===n?o({},e,{status:r,replies:a?e.replies-1:e.replies+1}):e))}))),x((t=>t.map((t=>t.commentId===n?o({},t,{status:r,replies:a?c(e.replyId,t.replies):[...t.replies,e]}):t))))}),[]),q=(0,a.useCallback)((e=>{let{uri:t,commentId:n,reply:a}=e;w(!0),(0,i.Mfr)({collaborationPath:b,tenant:m,commentId:n,replyId:a.replyId}).then((()=>B(a,t,n,!0))).catch(p).finally((()=>w(!1)))}),[b,B,m]),M=(0,a.useCallback)(((e,t)=>{O((t=>{if(t)return o({},t,{replies:u(t,e)})})),x((n=>n.map((n=>n.commentId===t?o({},n,{replies:u(n,e)}):n))))}),[]),H=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,commentId:a,replyId:r}=e;w(!0);const l={content:t,namedUsers:n};return(0,i.ufV)({collaborationPath:b,tenant:m,commentId:a,replyId:r,data:l}).then((e=>M(e,a))).catch(p).finally((()=>w(!1)))}),[b,m,M]),U=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,commentId:a,action:r,uri:l}=e;w(!0);const o={content:t,action:r,namedUsers:n};return(0,i.PP2)({collaborationPath:b,tenant:m,commentId:a,data:o}).then((e=>{let[t]=e;return B(t,l,a)})).catch(p).finally((()=>w(!1)))}),[b,m,B]),W=(0,a.useCallback)((e=>{let{commentId:t,uri:n}=e;U({content:"",namedUsers:[],commentId:t,action:"resolve",uri:n})}),[U]),A=(0,a.useCallback)((e=>{let{commentId:t,uri:n}=e;U({content:"",namedUsers:[],commentId:t,action:"reopen",uri:n})}),[U]);return{clearCurrentComment:(0,a.useCallback)((()=>{O(null)}),[]),comments:v,commentsMap:C,getCommentState:(e,t)=>(0,r.pathOr)({},[e,t],P),updateCommentState:(e,t,n)=>{R((a=>{const i=[e,t],l=(0,r.path)(i,a);return(0,r.assocPath)(i,(0,r.mergeRight)(l,n),a)}))},clearCommentState:(e,t)=>R((0,r.dissocPath)([e,t])),createComment:F,createReply:U,currentComment:E,deleteComment:_,editComment:L,getComment:Z,getComments:z,getCommentsCount:D,loading:I,objectTypes:n,pageToken:f,reOpenThread:A,resolveThread:W,sending:S,deleteReply:q,editReply:H}}},18408:(e,t,n)=>{n.d(t,{D:()=>h});var a=n(24328),r=n.n(a),i=n(2507),l=n.n(i),o=n(50914),s=n(83820),c=n(38677),u=n(10050),d=n(79573);const p=3e5,h=function(){let{anchorOrigin:e={vertical:"bottom",horizontal:"center"},showDismiss:t,dismissTitle:n=l().text("Dismiss"),autoHideDuration:i=p,onDismissClick:h=d.ZT}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[m,b]=(0,a.useState)(!1),[g,f]=(0,a.useState)(""),y=(0,a.useCallback)((()=>{b(!1),f("")}),[]),v=(0,a.useCallback)(((e,t)=>{"clickaway"!==t&&y()}),[y]),x=(0,a.useCallback)((e=>{b(!0),f(e)}),[]),C=(0,a.useCallback)((()=>r().createElement(s.Z,{container:document.body},r().createElement(u.Z,{open:m,anchorOrigin:e,autoHideDuration:i,onClose:v,message:g,style:{maxWidth:500},action:t?r().createElement(c.Z,{color:"primary",onClick:(0,o.pipe)(y,h)},n):void 0}))),[m,y,g]);return{SnackbarRenderer:C,showSnackbarMessage:x}}}}]);
|
|
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]="8b5378ef-b9a5-4e9f-867c-acefcc2f3bf3",e._sentryDebugIdIdentifier="sentry-dbid-8b5378ef-b9a5-4e9f-867c-acefcc2f3bf3")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"756a7513a42a2e35d42e606647a4e60f455dcf69"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2617],{42639:(e,t,n)=>{n.d(t,{Z:()=>u});var a=n(65439),r=n(71153),i=n.n(r),l=n(24328),o=n.n(l);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},s.apply(this,arguments)}var c=function(e){return e[e.ICON_MODE=0]="ICON_MODE",e[e.TEXT_MODE=1]="TEXT_MODE",e[e.ERROR_MODE=2]="ERROR_MODE",e}(c||{});const u=e=>{let{className:t,icon:n,avatarText:r,rootClasses:u}=e,d=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["className","icon","avatarText","rootClasses"]);const[p,h]=(0,l.useState)(null);(0,l.useEffect)((()=>{h(n?c.ICON_MODE:c.TEXT_MODE)}),[n,r]);const m=()=>{h(c.ERROR_MODE)};switch(p){case c.ICON_MODE:return o().createElement(a.Z,s({className:i()(t,null==u?void 0:u.iconRoot),src:n,onError:m},d));case c.TEXT_MODE:case c.ERROR_MODE:return o().createElement(a.Z,s({className:i()(t,null==u?void 0:u.textRoot)},d),r);default:return null}}},30488:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(38748),r=n(50548);const i=e=>t=>(0,r.l)(a.X,e,t)},87825:(e,t,n)=>{n.d(t,{Z:()=>g});var a=n(24328),r=n.n(a),i=n(13980),l=n.n(i),o=n(53862);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},s.apply(this,arguments)}const c=e=>r().createElement("svg",s({width:20,height:18,viewBox:"0 0 20 18",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("path",{d:"M16 7.24V6h-4v1.24a8.417 8.417 0 00-2 .768V6H6v6h.29a8.497 8.497 0 00-.15.358l-.29.733.29.733.07.176H2c-1.1 0-2-.9-2-2V2C0 .9.9 0 2 0h14c1.1 0 2 .9 2 2v6.008a8.417 8.417 0 00-2-.768zM4 12V6H2v6h2zm0-8V2H2v2h2zm6 0V2H6v2h4zm6 0V2h-4v2h4zm-2 5a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091A6.451 6.451 0 0014 9zm0 6.818a2.728 2.728 0 010-5.454 2.728 2.728 0 010 5.454zm0-4.363c-.905 0-1.636.73-1.636 1.636 0 .905.73 1.636 1.636 1.636.905 0 1.636-.73 1.636-1.636 0-.906-.73-1.636-1.636-1.636z",fill:"#000",fillRule:"nonzero",stroke:"none",strokeWidth:1,opacity:.54}));var u=n(39475),d=n(50914),p=n(45013),h=n(2507),m=n.n(h),f=n(15954);const b=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:i,title:l,tooltipTitle:o}=e;const[s,h]=(0,a.useState)(null),b=(0,a.useCallback)((e=>{const t=(0,d.pipe)(f.JJ,(0,d.pluck)("id"))(e),a=(0,f.u)(n,e);i(a?(0,d.difference)(n,t):(0,d.uniq)((0,d.concat)(n,t)))}),[n,i]);return r().createElement(r().Fragment,null,r().createElement(u.k,{tooltipTitle:o||m().text("Show/hide columns"),size:"L",icon:c,onClick:e=>h(e.currentTarget)}),r().createElement(p.G,{onColumnClick:b,anchorEl:s,columnsData:t,onClose:()=>h(null),title:l,selectedColumns:n}))};b.propTypes={columnsData:o.uz,selectedColumns:l().arrayOf(l().string),onChangeColumns:l().func,title:l().string,tooltipTitle:l().string};const g=b},45013:(e,t,n)=>{n.d(t,{G:()=>E});var a=n(24328),r=n.n(a),i=n(2507),l=n.n(i),o=n(50914),s=n(98952),c=n(63485),u=n(22311),d=n(15954),p=n(41008),h=n(26638),m=n(13980),f=n.n(m),b=n(33117),g=n(94792),y=n(71153),v=n.n(y);const x=(0,n(72342).makeStyles)({popup:{minWidth:"200px"},groupItem:{backgroundColor:"rgba(0,0,0,0.04)"}}),C=e=>{let{item:t,onClick:n,checked:a,level:i,style:l,isFocused:o,isGroupItem:s,hideCheckBox:c}=e;const u=x();return r().createElement(b.Z,{hideCheckBox:c,key:t.id,onClick:n,checked:a,level:i,data:t,label:r().createElement(g.Z,{text:t.label,highlight:t.filterText}),labelInText:t.label,style:l,isFocused:o,hideIcon:s,className:v()({[u.groupItem]:s})})};C.propTypes={item:f().shape({label:f().string,filterText:f().string}),level:f().number,onClick:f().func,checked:f().bool,style:f().object,isGroupItem:f().bool,isFocused:f().bool,hideCheckBox:f().bool};const k=C,E=e=>{let{anchorEl:t,onClose:n,title:i,columnsData:m,onColumnClick:f,selectedColumns:b,hideCheckBox:g}=e;const y=x(),[v,C]=(0,a.useState)(""),E=(0,a.useMemo)((()=>(0,d.eX)(m,v)),[m,v]),O=(0,a.useMemo)((()=>(0,p.LG)(E)),[E]),S=(0,s.fW1)("label")(E)||308,w=(0,a.useCallback)((e=>{let{item:t}=e;return f(t)}),[f]),{focusIndex:I,handleKeyDown:T}=(0,h.t)({items:O,open:!0,onSelectFocusedItem:w,selectedItems:b,onClose:n}),P=(0,a.useCallback)((0,o.pipe)(n,(()=>C(""))),[n]),R=Math.min(300,32*O.length),j=Math.max(140,R+108);return r().createElement(u.Z,{className:y.popup,open:!!t,anchorEl:t,onClose:P,onSearch:C,title:i||l().text("Show/hide columns"),containerWidth:S,containerHeight:j,searchInputOnKeyDown:T},r().createElement(c.Z,{fixedTitle:!1,height:R,renderItem:(e,t,n)=>{let{item:a,level:i=0}=t;return r().createElement(k,{hideCheckBox:g,style:e,item:a,level:i,isFocused:I===n,checked:(0,d.u)(b,a),isGroupItem:(0,d.yf)(a),onClick:g?(0,o.pipe)(f,P):f})},items:O,getItemSize:()=>32,focusIndex:I}))}},15954:(e,t,n)=>{n.d(t,{eX:()=>g,JJ:()=>y,yf:()=>o,u:()=>v});var a=n(50914),r=n(98952);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){l(e,t,n[t])}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const o=e=>e.id===e.groupId,s=(0,a.curry)(((e,t)=>{let{id:n,groupId:a}=e;return t.groupId===a&&(n===t.id||n.startsWith(`${t.id}.`))})),c=(0,a.curry)(((e,t)=>{let{groupId:n}=e;return n===t.id})),u=(0,a.propOr)(!0,"hideable"),d=(e,t)=>{const n=((e,t)=>e.find((0,a.either)(c(t),s(t))))(e,t);return n?(n.children=d(n.children||[],t),e):e.concat(t)},p=(0,a.curry)(((e,t)=>r.P6Y.strings.search(t.label,e)||(t.children||[]).some(p(e)))),h=(0,a.reduce)(((e,t)=>d(e,{id:t.id,groupId:t.groupId,label:t.label,attrType:t.dataTypeDefinition})),[]),m=(0,a.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,a.pipe)((0,a.filter)(p(e)),(0,a.chain)((t=>[{item:i({},t,{filterText:e}),level:n},...t.children?m(e,t.children,n+1):[]])))(t)})),f=(0,a.has)("columns"),b=e=>{let{id:t,label:n,columns:r}=e;return[{id:t,groupId:t,label:n},...r.map((0,a.assoc)("groupId",t))]},g=(e,t)=>(0,a.pipe)((0,a.chain)((0,a.when)(f,b)),(0,a.filter)((0,a.either)(o,u)),h,m(t))(e),y=e=>e.children?(0,a.chain)(y,e.children):[e],v=(e,t)=>{const n=y(t),a=t=>e.includes(t.id);return o(t)?n.every(a):n.some(a)}},20146:(e,t,n)=>{n.d(t,{Z:()=>p});var a=n(24328),r=n.n(a),i=n(71153),l=n.n(i),o=n(98952),s=n(79312),c=n(40007),u=n(14596);const d=(0,n(72342).makeStyles)({"entityType-overflow":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",marginRight:"12px",borderRadius:"2px",flexShrink:0},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",marginRight:"16px",flexShrink:0}}),p=e=>{let{entity:t,className:n,size:a="small"}=e;const i=d(),p=(0,u.AH)(),h=(0,o.nt9)(p,t.type),m=(h?(0,o.VD3)(p,h,"typeColor"):null)||o.rSc.palette.primary.main,f=(0,o.jFi)(p,t);return r().createElement(c.Z,{value:f,placement:"top"},r().createElement(s.Z,{style:{backgroundColor:m,color:o.P6Y.Colors.getColor(m)?"#FFFFFF":"#212121"},className:l()(i[`entityType-${a}`],i["entityType-overflow"],n),component:"div"},f))}},79386:(e,t,n)=>{n.d(t,{Z:()=>g});var a=n(24328),r=n.n(a),i=n(71153),l=n.n(i),o=n(50914),s=n(79312),c=n(23883),u=n(2507),d=n.n(u),p=n(98952),h=n(37573),m=n(20146),f=n(14596);const b=(0,n(72342).makeStyles)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"0px 1px 0px rgba(0, 0, 0, 0.12)",marginBottom:"1px","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),g=e=>{let{className:t,entity:n,children:i,classes:u,renderLabel:g=o.identity}=e;const y=b({classes:u}),v=(0,f.AH)(),x=(0,f.QQ)(),C=(0,a.useCallback)((()=>{navigator.clipboard.writeText((0,p.BTI)(n))}),[n]);if((0,o.isNil)(n))return null;const k=(0,p.idV)(n.label),E=n.secondaryLabel,O=(0,p.ptG)(v,n),S=(0,p.Fn9)(n),w=n.uri,I=(0,p.BTI)(n);return r().createElement("div",{className:l()(y.profileBandWrapper,t)},r().createElement("div",{className:l()(y.profileBand,{[y.inactive]:!S}),"data-entity-uri":w},r().createElement(h.Z,{key:n.uri,entity:n,avatarClassName:y.profileIcon,imageClassName:y.imageProfileIcon}),r().createElement("div",{className:y.profileInfo},r().createElement("div",null,r().createElement(s.Z,{variant:"h6",className:y.label},g(k)),E&&r().createElement(s.Z,{variant:"subtitle2",className:y.secondaryLabel},E),O&&r().createElement(s.Z,{variant:"subtitle1",className:y.businessCard},O)),r().createElement("div",{className:y.specialInfo},r().createElement("div",{className:y.entityType},r().createElement(m.Z,{entity:n,size:"medium",className:y.badge}),!(0,p.ZiX)(w)&&x&&r().createElement(c.Z,{title:d().text("Copy to clipboard")},r().createElement(s.Z,{display:"inline",variant:"body2",className:y.entityId,onClick:C},d().text("Entity ID"),": ",I))))),i&&r().createElement("div",null,i)))}},76368:(e,t,n)=>{n.d(t,{a:()=>N});var a=n(24328),r=n.n(a),i=n(55485),l=n(23468),o=n(31373),s=n(98952),c=n(71153),u=n.n(c),d=n(50914),p=n(2507),h=n.n(p),m=n(49753),f=n(78223),b=n(39475);const g=(0,n(72342).makeStyles)({container:{display:"flex",alignItems:"center"},link:{whiteSpace:"nowrap",marginRight:"9px"}}),y=(0,f.Z)(i.Z),v=e=>{var t;let{className:n,total:i=0,onPrev:c,onNext:p,onSearchResultsClick:f,isPrevDisabled:v,isNextDisabled:x}=e;const C=g(),k=(0,a.useContext)(m.T),{OPEN_RESULTS:E,SEARCH_RESULT:O,SEARCH_RESULTS:S,NEXT_PROFILE:w,PREVIOUS_PROFILE:I}=(0,d.mergeRight)({OPEN_RESULTS:h().text("Go to search results"),SEARCH_RESULT:h().text("Search result"),SEARCH_RESULTS:h().text("Search results"),PREVIOUS_PROFILE:h().text("Go to previous profile"),NEXT_PROFILE:h().text("Go to next profile")},null!==(t=null==k?void 0:k.profileBand)&&void 0!==t?t:{});return r().createElement("div",{className:u()(C.container,n)},r().createElement(y,{className:C.link,component:"button",variant:"caption",onClick:f,underline:"none",tooltipTitle:E},(0,s.k7L)(i,1e6)," ",1===i?O:S),r().createElement(b.k,{size:"L",icon:l.Z,"data-reltio-id":"reltio-previous-profile-button",tooltipTitle:I,onClick:c,disabled:v,showForDisabled:!0}),r().createElement(b.k,{size:"L",icon:o.Z,"data-reltio-id":"reltio-next-profile-button",tooltipTitle:w,onClick:p,disabled:x,showForDisabled:!0}))};var x=n(63532),C=n(14596),k=n(96697),E=n(98001),O=n(19701);function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){w(e,t,n[t])}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class I{constructor(e){var t=this;let{data:{query:n,sortField:a,sortOrder:r},tenant:i,searchTenant:l,apiPath:o,dtssPath:c,globalSearchRequestOptions:u}=e;this.query=void 0,this.sortField=void 0,this.sortOrder=void 0,this.tenant=void 0,this.searchTenant=void 0,this.apiPath=void 0,this.dtssPath=void 0,this.globalSearchRequestOptions=void 0,this.isDT=()=>this.tenant!==this.searchTenant,this.getQueryFilter=()=>({rawFilter:this.query}),this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=[t.getQueryFilter(),...e],r=S({},t.globalSearchRequestOptions,{sort:t.sortField,order:t.sortOrder,select:"uri,label,type",scoreEnabled:!1},n);return t.isDT()?(0,s.uqV)({filters:a,options:r,customerTenant:t.tenant,dataTenant:t.searchTenant,dtssPath:t.dtssPath}):(0,s.ZOr)(a,r)},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"uri",values:[e]}],{offset:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{offset:t,max:e}),this.requestTotal=()=>{const e=[this.getQueryFilter()],t=this.globalSearchRequestOptions;return(this.isDT()?(0,s.J$m)({filters:e,options:t,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,s.j_Q)(e,t)).then((e=>e.total))},this.query=n,this.sortField=a,this.sortOrder=r,this.tenant=i,this.searchTenant=l,this.apiPath=o,this.dtssPath=c,this.globalSearchRequestOptions=u}}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){P(e,t,n[t])}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class R{constructor(e){var t=this;let{data:n,tenant:a,apiPath:r}=e;this.searchBody=void 0,this.tenant=void 0,this.apiPath=void 0,this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=[{rawFilter:t.searchBody.filter},...e];return(0,s.P2h)({apiPath:t.apiPath,tenant:t.tenant,searchBody:T({},t.searchBody,{filter:e.length?(0,s.Uqd)()(a):t.searchBody.filter}),options:n})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"id",values:[(0,s.BTI)({uri:e})]}],{from:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{from:t,max:e}),this.requestTotal=()=>(0,s.dED)({apiPath:this.apiPath,tenant:this.tenant,searchBody:this.searchBody}).then((e=>e.count)),this.searchBody=n,this.tenant=a,this.apiPath=r}}const j=(e,t)=>(0,d.pipe)((0,d.map)((0,d.prop)("uri")),(0,d.reject)((e=>t.includes(e))))(e),N=e=>{let{className:t}=e;const{total:n,onPrev:i,onNext:l,onSearchResultsClick:o,isPrevDisabled:c,isNextDisabled:u}=(()=>{const e=(0,O._)(),t=(0,O._)(),n=(0,O._)(),r=(0,a.useContext)(x.m),i=(0,C.qq)("searchNavigationListener"),l=(0,C.ax)("updateSearchNavigationDataFields"),o=(0,C.ax)("openEntity"),c=(0,C.ax)("openPerspective"),{uri:u,index:d,total:p,tenant:h,cache:m}=(0,C.M3)()||{},{type:f,data:b}=(0,C.XS)()||{},g=(0,C.Uv)(),y=(0,C.id)(),v=(0,C.rg)(),S=(0,C.mU)(["ovOnly"]),{updateEntitiesNavigationLoadingState:w}=(0,k.M)(),[T,P]=(0,a.useState)(!1),N=(0,a.useMemo)((()=>((e,t)=>{switch(e){case"search":return new I(t);case"graphsearch":return new R(t)}})(f,{data:b,tenant:g,searchTenant:h,apiPath:y,dtssPath:v,globalSearchRequestOptions:S})),[f,b,g,h,y,v,S]),D=(0,a.useCallback)((e=>{l(e)}),[l]),z=(0,a.useCallback)((e=>{const t=g!==h?(0,s.wwR)({uri:e,dataTenant:h}):e;o({uri:t,viewId:r,source:"navigation"})}),[o,r,g,h]),Z=(0,a.useCallback)((()=>{c({perspectiveId:f,viewId:r})}),[c,f,r]);(0,a.useEffect)((()=>{0!==p&&d>=p?D({index:p-1}):d<0&&D({index:0})}),[p,d,D]);const F=(0,E.u)();(0,a.useEffect)((()=>{const e=F(i);return()=>e()}),[F,D,i]);const L=(0,a.useCallback)(((e,a,r)=>{P(!0),t(N.requestTotal()).then((e=>D({total:e})));const i=r+1;return n(N.requestEntities(15,i)).then((t=>{if(t){if(t.length){const n=j(t,e);if(n.length>0)return D({cache:e.concat(n),uri:n[0],index:i+t.length-n.length}),void z(n[0]);if(r+t.length<a-1)return L(e,a-t.length,r+t.length)}D({index:i})}})).finally((()=>{P(!1)}))}),[N,D,z]),_=(0,a.useCallback)(((e,a)=>{P(!0),t(N.requestTotal()).then((e=>D({total:e})));const r=a-1,i=Math.max(0,a-15),l=15+Math.min(0,a-15);return n(N.requestEntities(l,i)).then((t=>{if(t){if(t.length){const n=j(t,e);if(n.length>0)return D({cache:n.concat(e),uri:n[n.length-1],index:r-(t.length-n.length)}),void z(n[n.length-1]);if(a-t.length>0)return _(e,a-t.length)}D({index:0})}})).finally((()=>{P(!1)}))}),[N,D,z]),B=(0,a.useCallback)(((t,n,a,r)=>{if(n<t.length){const i=t[n];return P(!0),e(N.checkEntity(i)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),B(e,n,a-1,r)}D({index:r+1,uri:i,cache:t,total:a}),z(i)})).finally((()=>{P(!1)}))}if(!(r>=a-1))return L(t,a,r);D({cache:t,total:a,index:a-1})}),[N,D,z,L]),q=(0,a.useCallback)(((t,n,a,r)=>{if(n>-1){const i=t[n];return P(!0),e(N.checkEntity(i)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),q(e,n-1,a-1,r-1)}D({index:r-1,uri:i,cache:t,total:a}),z(i)})).finally((()=>{P(!1)}))}if(!(r<=0))return _(t,r);D({index:0,cache:t,total:a})}),[N,D,z,_]),M=(0,a.useCallback)((()=>{if(m&&u){const e=m.indexOf(u)-1;q(m,e,p,d)}}),[q,m,u,p,d]),H=(0,a.useCallback)((()=>{if(m&&u){const e=m.indexOf(u)+1;B(m,e,p,d)}}),[B,m,u,p,d]);return(0,a.useEffect)((()=>{w(T)}),[w,T]),(0,a.useEffect)((()=>()=>w(!1)),[]),{total:p,onPrev:M,onNext:H,onSearchResultsClick:Z,isPrevDisabled:T||d<=0,isNextDisabled:T||d>=p-1}})();return(()=>{const{cache:e}=(0,C.M3)()||{},t=(0,C.YA)(),n=(0,C.eh)();return(0,s.uzs)(t)&&(null==e?void 0:e.includes(null==n?void 0:n.uri))})()?r().createElement(v,{className:t,total:n,onPrev:i,onNext:l,onSearchResultsClick:o,isPrevDisabled:c,isNextDisabled:u}):null}},11802:(e,t,n)=>{n.d(t,{u:()=>h});var a=n(24328),r=n.n(a),i=n(71153),l=n.n(i),o=n(31396),s=n(47746),c=n(98952);const u=(0,n(72342).makeStyles)((()=>({container:{position:"relative","& .Resizer":{zIndex:1,boxSizing:"border-box",backgroundClip:"padding-box","&.disabled":{cursor:"initial",height:0,margin:0},"&.horizontal":{height:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"100% 1px",backgroundPosition:"top",width:"100%",marginBottom:"-10px","&:not(.disabled):hover":{cursor:"row-resize",backgroundImage:"linear-gradient(rgba(0, 114, 206, 0), rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1))",backgroundSize:"100% 3px"}},"&.vertical":{width:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"1px 100%",backgroundPosition:"left",height:"100%",marginRight:"-10px","&:not(.disabled):hover":{cursor:"col-resize",backgroundImage:"linear-gradient(to left, rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1), rgba(0, 114, 206, 0.35))",backgroundSize:"3px 100%"}}}}}))),d=250,p=e=>"horizontal"===e,h=e=>{let{className:t,children:n,orientation:i,primary:h,defaultSize:m,size:f,minSize:b,maxSize:g,allowResize:y,debounceInterval:v=d,onChange:x}=e;const C=u(),k=(0,s.Z)(),[E,O]=(0,a.useState)(null),[S,w]=(0,a.useState)(!0),I=(0,a.useCallback)((()=>w(!0)),[]),T=(0,a.useCallback)((()=>w(!1)),[]),P=()=>p(i)?null==E?void 0:E.clientHeight:null==E?void 0:E.clientWidth,R=(0,a.useCallback)((0,c.DsO)((e=>{const t=P();x({percentageSize:e/t*100+"%",isMaxSize:+g>0?e===g:e===t+g,isMinSize:e===b,size:e})}),v),[x,i,g,E]),j=(0,a.useMemo)((()=>({transition:k.transitions.create(p(i)?"height":"width",{easing:k.transitions.easing.sharp,duration:k.transitions.duration.leavingScreen})})),[i,k]);return"number"==typeof f&&f<0&&(f=(P()||0)+f),r().createElement("div",{ref:O,className:l()(C.container,t)},r().createElement(o.Z,{split:i,size:f,primary:h,allowResize:y,onChange:R,defaultSize:m,minSize:b,maxSize:g,onDragStarted:T,onDragFinished:I,pane1Style:S?j:void 0},n))};h.displayName="ResizablePanes"},21210:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(24328),r=n.n(a),i=n(98952),l=n(42639),o=n(14596);const s=e=>{let{sourceType:t,className:n,classes:a}=e;const s=(0,o.AH)(),{uri:c,icon:u}=(0,i.PWK)(s,t)||{},d=c?(0,i.tH7)(s,c)[0]:"",p=u?(0,i.vPL)("https://s3.amazonaws.com/reltio.images/api",u):null;return r().createElement(l.Z,{className:n,avatarText:d,icon:p,variant:"square",rootClasses:a})}},79935:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(24328),r=n.n(a);const i=()=>r().createElement("div",{style:{flex:1}})},75647:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(24328),r=n.n(a),i=n(2507),l=n.n(i),o=n(38677),s=n(79312),c=n(14596);const u=(0,n(72342).makeStyles)({root:{display:"flex",alignItems:"flex-start"},slice:{fontWeight:500},cancelButton:{width:"88px",flexShrink:0,marginLeft:"15px"}}),d=()=>{const e=u(),t=(0,c.ax)("clearHistoryEvent"),n=(0,c.OK)();return n?r().createElement("div",{className:e.root},r().createElement(s.Z,{component:"div"},l().text("You are viewing a historic slice:")," ",r().createElement("span",{className:e.slice},l().date(n.aStamp,"llll"))),r().createElement(o.Z,{className:e.cancelButton,variant:"contained",color:"primary",onClick:t},l().text("Cancel"))):null}},98001:(e,t,n)=>{n.d(t,{G:()=>l,u:()=>o});var a=n(24328),r=n.n(a);const i=(0,a.createContext)(null);i.displayName="ActionsHookContext";const l=e=>{let{children:t,hook:n}=e;return r().createElement(i.Provider,{value:n},t)},o=()=>{const e=(0,a.useContext)(i);if(!e)throw new Error("ActionsHookContext must be provided");return e}},23759:(e,t,n)=>{n.d(t,{hR:()=>c,nX:()=>u,RT:()=>d,pu:()=>p,BF:()=>h});var a=n(24328),r=n.n(a),i=n(98952),l=n(50914),o=n(79573);const s=(0,a.createContext)(null),c=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["children"]);return r().createElement(s.Provider,{value:n},t)},u=e=>{const{getCrosswalkColor:t=(0,l.pipe)(i.uKF,i.CJp)}=(0,a.useContext)(s)||{};return e?t(e):""},d=()=>{const{highlightedCrosswalks:e=[]}=(0,a.useContext)(s)||{};return e},p=e=>{const{highlightedCrosswalks:t=[],setCrosswalkHighlighted:n=o.ZT}=(0,a.useContext)(s)||{},r=!!e&&!!t.find((0,l.eqBy)(i.uKF,e));return{isHighlighted:r,isDimmed:t.length>0&&!r,highlightCrosswalk:(0,a.useCallback)((()=>n(e,!0)),[e,n]),removeHighlight:(0,a.useCallback)((()=>n(e,!1)),[e,n])}},h=e=>{const{toggleCrosswalkFocus:t=o.ZT,focusedCrosswalks:n=[]}=(0,a.useContext)(s)||{};return{isFocused:!!e&&n.some((0,l.eqBy)(i.uKF,e)),toggleCrosswalkFocus:(0,a.useCallback)((()=>t(e)),[e,t])}}},96697:(e,t,n)=>{n.d(t,{f:()=>h,M:()=>m});var a=n(24328),r=n.n(a),i=n(50914),l=n(79573),o=n(98001),s=n(14596);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=r().createContext({isLoading:!1,isEmptyState:!1,updateEntityLoadingState:l.ZT,updateEntitiesNavigationLoadingState:l.ZT,resetLoadingState:l.ZT}),p={entitiesNavigation:!1,entity:!1,entityCleansing:!1},h=e=>{let{children:t}=e;const n=(()=>{const[e,t]=(0,a.useState)(p),n=(0,a.useCallback)((e=>{t((t=>c({},t,{entity:e})))}),[]),r=(0,a.useCallback)((e=>{t((t=>c({},t,{entitiesNavigation:e})))}),[]),l=(0,a.useCallback)((e=>{t((t=>c({},t,{entityCleansing:e})))}),[]),u=(0,a.useCallback)((()=>{t(p)}),[]),d=(0,o.u)(),h=(0,s.qq)("cleanseLoadingListener"),m=(0,a.useMemo)((()=>h(l)),[h,l]);return(0,a.useEffect)((()=>{const e=d(m);return()=>e()}),[m,d]),{isLoading:Object.values(e).includes(!0),isEmptyState:(0,i.pipe)((0,i.omit)(["entityCleansing"]),i.values,(0,i.includes)(!0))(e),updateEntityLoadingState:n,updateEntitiesNavigationLoadingState:r,updateEntityCleansingLoadingState:l,resetLoadingState:u}})();return r().createElement(d.Provider,{value:n},t)},m=()=>(0,a.useContext)(d)},49753:(e,t,n)=>{n.d(t,{T:()=>r});var a=n(24328);const r=n.n(a)().createContext({profileBand:{}});r.displayName="LabelsContext"},36852:(e,t,n)=>{n.d(t,{C:()=>h});var a=n(24328),r=n(50914),i=n(98952),l=n(14596);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){s(e,t,n[t])}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c=(e,t)=>t.filter((t=>t.replyId!==e)),u=(e,t)=>{const n=e.replies.findIndex((e=>{let{replyId:n}=e;return n===t.replyId})),a=[...e.replies];return a[n]=t,a},d=[],p=e=>console.warn("Collaboration error",e),h=e=>{let{objectIds:t=d,objectTypes:n,enabled:s=!0}=e;const h=(0,l.eh)(),m=(0,l.Uv)(),f=(0,l.f5)(),b=(0,l.Bv)()&&s,[g,y]=(0,a.useState)(null),[v,x]=(0,a.useState)([]),[C,k]=(0,a.useState)(null),[E,O]=(0,a.useState)(null),[S,w]=(0,a.useState)(!1),[I,T]=(0,a.useState)(!1),[P,R]=(0,a.useState)({}),j=(0,a.useCallback)((e=>{k((t=>o({},t,e)))}),[]),N=null==h?void 0:h.uri,D=(0,a.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(b&&N&&!(0,i.ZiX)(N)){const n=e=>{console.warn("Collaboration error",e),k(null)};(0,r.pipe)(i.$oF,(0,r.andThen)((0,r.map)((0,r.props)(["objectId","comments"]))),(0,r.andThen)(r.fromPairs),(0,r.andThen)(t?k:j),(0,r.otherwise)(n))({uris:e,tenant:m,collaborationPath:f})}else k(null)}),[j,f,N,b,m]);(0,a.useEffect)((()=>{D(t,!0)}),[t,D]);const z=(0,a.useCallback)(((e,t)=>{(0,i.liG)({collaborationPath:f,tenant:m,relatedObjectUri:e,pageToken:t}).then((e=>{let{items:n,nextPageToken:a}=e;x((e=>t?(0,r.uniqBy)((0,r.prop)("commentId"),[...e,...n]):n)),y(a)})).catch(p)}),[f,m]),Z=(0,a.useCallback)((e=>{T(!0),(0,i.d7q)({collaborationPath:f,tenant:m,commentId:e}).then(O).catch(p).finally((()=>T(!1)))}),[f,m]),F=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,objectType:a,uri:r,relatedObjectUris:l}=e;w(!0);const s={objectId:r,content:t,relatedObjectUris:l,objectType:a,visibility:"public",namedUsers:n,permanentLink:`${window.location.href}&commentId=${encodeURIComponent("{commentId}")}`};return(0,i.Yrx)({collaborationPath:f,tenant:m,data:s}).then((e=>{let[t]=e;return((e,t)=>{O(e),k((n=>o({},n,{[t]:[...n[t]||[],{commentId:e.commentId,replies:0,status:"open"}]}))),x((t=>[e,...t]))})(t,r)})).catch(p).finally((()=>w(!1)))}),[f,m]),L=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,objectType:a,uri:l,relatedObjectUris:s,commentId:c,replies:u}=e;w(!0);const d={objectId:l,content:t,relatedObjectUris:s,objectType:a,visibility:"public",namedUsers:n,commentId:c,replies:u};return(0,i.uAg)({collaborationPath:f,tenant:m,data:d}).then((e=>(e=>{O(e),x((0,r.map)((0,r.when)((0,r.propEq)("commentId",e.commentId),(0,r.always)(e))))})(o({},e,{replies:u})))).catch(p).finally((()=>w(!1)))}),[f,m]),_=(0,a.useCallback)((e=>{let{uri:t,commentId:n}=e;w(!0),(0,i.YFy)({collaborationPath:f,tenant:m,commentId:n}).then((()=>((e,t)=>{O(null),k((n=>{const a=n[t]||[];return o({},n,{[t]:a.filter((t=>t.commentId!==e))})})),x((t=>t.filter((t=>t.commentId!==e))))})(n,t))).catch(p).finally((()=>w(!1)))}),[f,m]),B=(0,a.useCallback)(((e,t,n,a)=>{const r="resolve"===e.action?"resolved":"open",{replyId:i}=e;O("resolved"===r?e=>{if(e)return null}:t=>{if(t)return o({},t,{replies:a?c(i,t.replies):[...t.replies,e]})}),k((e=>o({},e,{[t]:(e[t]||[]).map((e=>e.commentId===n?o({},e,{status:r,replies:a?e.replies-1:e.replies+1}):e))}))),x((t=>t.map((t=>t.commentId===n?o({},t,{status:r,replies:a?c(e.replyId,t.replies):[...t.replies,e]}):t))))}),[]),q=(0,a.useCallback)((e=>{let{uri:t,commentId:n,reply:a}=e;w(!0),(0,i.Mfr)({collaborationPath:f,tenant:m,commentId:n,replyId:a.replyId}).then((()=>B(a,t,n,!0))).catch(p).finally((()=>w(!1)))}),[f,B,m]),M=(0,a.useCallback)(((e,t)=>{O((t=>{if(t)return o({},t,{replies:u(t,e)})})),x((n=>n.map((n=>n.commentId===t?o({},n,{replies:u(n,e)}):n))))}),[]),H=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,commentId:a,replyId:r}=e;w(!0);const l={content:t,namedUsers:n};return(0,i.ufV)({collaborationPath:f,tenant:m,commentId:a,replyId:r,data:l}).then((e=>M(e,a))).catch(p).finally((()=>w(!1)))}),[f,m,M]),U=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,commentId:a,action:r,uri:l}=e;w(!0);const o={content:t,action:r,namedUsers:n};return(0,i.PP2)({collaborationPath:f,tenant:m,commentId:a,data:o}).then((e=>{let[t]=e;return B(t,l,a)})).catch(p).finally((()=>w(!1)))}),[f,m,B]),W=(0,a.useCallback)((e=>{let{commentId:t,uri:n}=e;U({content:"",namedUsers:[],commentId:t,action:"resolve",uri:n})}),[U]),A=(0,a.useCallback)((e=>{let{commentId:t,uri:n}=e;U({content:"",namedUsers:[],commentId:t,action:"reopen",uri:n})}),[U]);return{clearCurrentComment:(0,a.useCallback)((()=>{O(null)}),[]),comments:v,commentsMap:C,getCommentState:(e,t)=>(0,r.pathOr)({},[e,t],P),updateCommentState:(e,t,n)=>{R((a=>{const i=[e,t],l=(0,r.path)(i,a);return(0,r.assocPath)(i,(0,r.mergeRight)(l,n),a)}))},clearCommentState:(e,t)=>R((0,r.dissocPath)([e,t])),createComment:F,createReply:U,currentComment:E,deleteComment:_,editComment:L,getComment:Z,getComments:z,getCommentsCount:D,loading:I,objectTypes:n,pageToken:g,reOpenThread:A,resolveThread:W,sending:S,deleteReply:q,editReply:H}}},18408:(e,t,n)=>{n.d(t,{D:()=>h});var a=n(24328),r=n.n(a),i=n(2507),l=n.n(i),o=n(50914),s=n(83820),c=n(38677),u=n(10050),d=n(79573);const p=3e5,h=function(){let{anchorOrigin:e={vertical:"bottom",horizontal:"center"},showDismiss:t,dismissTitle:n=l().text("Dismiss"),autoHideDuration:i=p,onDismissClick:h=d.ZT}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[m,f]=(0,a.useState)(!1),[b,g]=(0,a.useState)(""),y=(0,a.useCallback)((()=>{f(!1),g("")}),[]),v=(0,a.useCallback)(((e,t)=>{"clickaway"!==t&&y()}),[y]),x=(0,a.useCallback)((e=>{f(!0),g(e)}),[]),C=(0,a.useCallback)((()=>r().createElement(s.Z,{container:document.body},r().createElement(u.Z,{open:m,anchorOrigin:e,autoHideDuration:i,onClose:v,message:b,style:{maxWidth:500},action:t?r().createElement(c.Z,{color:"primary",onClick:(0,o.pipe)(y,h)},n):void 0}))),[m,y,b]);return{SnackbarRenderer:C,showSnackbarMessage:x}}}}]);
|
|
2
2
|
//# sourceMappingURL=2617.js.map
|