@reltio/remotes 1.4.1532 → 1.4.1533
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/3686.js +1 -1
- package/3686.js.map +1 -1
- package/4217.js +1 -1
- package/4217.js.map +1 -1
- package/package.json +1 -1
package/3686.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3686],{1876:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(24328),a=n.n(r),o=n(13980),i=n.n(o),s=n(87918),l=n.n(s),c=n(94079),p=n(87685);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const d=e=>a().createElement("svg",u({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M18 2V0H0v2l7 8v8l4-2v-6z",fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:1})),m=(0,n(79692).Z)((e=>({"filterIcon--enabled":{color:e.palette.primary.main},closeIcon:{position:"absolute",right:"3px",bottom:"3px",transform:"scale(0.5)"},button:{padding:"11px"}}))),g=e=>{let{enabled:t,onClick:n}=e;const r=m();return a().createElement(c.Tooltip,{title:t?l().text("Clear all filters"):l().text("Filter")},a().createElement(c.IconButton,{onClick:n,classes:{root:r.button}},t?a().createElement(a().Fragment,null,a().createElement(d,{className:r["filterIcon--enabled"]}),a().createElement(p.default,{color:"primary",className:r.closeIcon})):a().createElement(d,null)))};g.propTypes={enabled:i().bool,onClick:i().func};const f=g},2256:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(24328),a=n.n(r);class o extends a().Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){this.setState({error:e}),console.error(e)}render(){const{children:e,error:t}=this.props;return this.state.error?t:e}}},32152:(e,t,n)=>{"use strict";n.d(t,{i:()=>g});var r=n(24328),a=n.n(r),o=n(87918),i=n.n(o),s=n(17440),l=n(87685),c=n(94079),p=n(21853),u=n(22385),d=n(31276);const m=(0,n(79692).Z)({searchButton:{marginLeft:"auto !important",marginRight:"-4px",padding:"8px"},input:{flex:"1 0 200px",marginLeft:"70px",fontSize:"14px",background:"rgba(0,0,0,0.03) 2px",padding:"4px 0",marginRight:"4px"},startAdornment:{color:"rgba(0,0,0,0.54)",paddingLeft:"8px"}}),g=e=>{let{query:t,onChange:n}=e;const[o,g]=(0,r.useState)(t),[f,h]=(0,r.useState)(!!t);(0,r.useEffect)((()=>{g(t)}),[t]);const b=m(),y=o&&o.length;return f?a().createElement(c.Input,{className:b.input,value:o,autoFocus:!0,placeholder:i().text("Search"),disableUnderline:!0,onChange:(0,s.pipe)(d.NA,g),startAdornment:a().createElement(c.InputAdornment,{position:"start"},a().createElement(p.default,{className:b.startAdornment})),endAdornment:a().createElement(c.InputAdornment,{position:"end"},y&&a().createElement(u.Z,{size:"S",icon:l.default,onClick:(0,s.pipe)(s.F,h,(0,s.always)(""),(0,s.tap)(n),g)})),onKeyPress:(0,s.when)((0,s.propEq)("key","Enter"),(0,s.pipe)((0,s.always)(o),s.trim,n))}):a().createElement(c.IconButton,{className:b.searchButton,onClick:(0,s.pipe)(s.T,h)},a().createElement(p.default,null))}},75512:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(13980),a=n.n(r),o=n(24328),i=n.n(o),s=n(44443);const l=()=>i().createElement("div",{style:{display:"none"}}),c=e=>{let{widthToHide:t,children:n}=e;return i().createElement(s.Z,{handleWidth:!0,render:e=>{let{width:r}=e;return r>t?i().createElement(i().Fragment,null,n):i().createElement(l,null)}})};c.propTypes={children:a().node,widthToHide:a().number.isRequired};const p=c},49734:(e,t,n)=>{"use strict";n.d(t,{M:()=>p});var r=n(24328),a=n.n(r);const o=(0,n(79692).Z)({root:{display:"flex",flexDirection:"column",paddingRight:"12px",paddingTop:"8px",paddingBottom:"8px","& + &":{borderTop:"1px solid rgba(0,0,0, 0.12)"}},profileCardWrapper:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},profileCardContainer:{flexGrow:1,paddingBottom:"8px",paddingTop:"8px"},rulesContainer:{paddingLeft:"52px",marginBottom:"8px"}});var i=n(33310),s=n(22071),l=n(71153),c=n.n(l);const p=e=>{let{children:t,entitiesMap:n,entity:r,match:l,metadata:p,className:u}=e;const d=o();return a().createElement("div",{className:c()(d.root,u)},a().createElement("div",{className:d.profileCardWrapper},a().createElement(i.Z,{entity:l.object,classes:{container:d.profileCardContainer}}),t),a().createElement("div",{className:d.rulesContainer},l.matchRules&&a().createElement(s.Z,{match:l,metadata:p,entitiesMap:n,entity:r})))}},11013:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(24328),a=n.n(r),o=n(87918),i=n.n(o),s=n(13980),l=n.n(s),c=n(71153),p=n.n(c),u=n(17440),d=n(94079),m=n(50757),g=n(49885),f=n(7154),h=n(26579),b=n(81077),y=n(91262),v=n(48852),E=n(94773),w=n(11564);const x=(0,n(79692).Z)({editor:{display:"flex",flexDirection:"column",padding:"0 24px 5px",overflowX:"hidden"},title:{color:"rgba(0, 0, 0, 0.6)",fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px",margin:"17px 0 24px"},item:{marginBottom:"20px"},dense:{marginBottom:0},actionButtons:{display:"flex",justifyContent:"flex-end",margin:"0 8px 10px","& > button":{fontSize:"14px",lineHeight:"16px",marginLeft:"8px",padding:"10px 8px",backgroundColor:"rgba(98, 2, 238, 0)"}}});function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){O(e,t,n[t])}))}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const P=e=>{let{connection:t,modifiedEntity:n,initialConnection:o,initialModifiedEntity:s,allModifiedEntities:l,dispatch:c,config:v,mode:E,metadata:O,globalSearchRequestOptions:P,error:T,highlightedError:C}=e;const{relationUri:S,relationType:I,direction:R}=t.relation,N=t.isNew,L=x(),{ref:j,errorClassName:M}=(0,w.B)({highlightedError:C,isSimple:!0}),{inRelations:D=[],outRelations:A=[]}=(0,r.useMemo)((()=>(0,m.ocC)({content:t.parentEntityUri?v.contentSecondLevel:v.content,direction:R,relationType:I,mode:E,metadata:O})),[v,R,I,E,O,t.parentEntityUri]),V=(0,r.useMemo)((()=>(0,m.xF8)(O,I)),[I,O]),_=(0,r.useMemo)((()=>k({attributes:k({},g.N5.relations.selectors.getRelationAttributesFromConnection(t))},(0,m.p2l)(t.relation))),[t]),U=(0,r.useMemo)((()=>(0,m.SAs)(l,n)),[l,n]),Z=(0,r.useRef)([]),W=(0,r.useCallback)(((e,t)=>{c(g.N5.relations.actions.setInitialInfo(v.id,S,e,t))}),[c]);(0,r.useEffect)((()=>{o||W(n,t)}),[]),(0,r.useEffect)((()=>{Z.current=(0,u.pipe)((0,u.concat)(U.map((0,u.prop)("uri"))),u.uniq)(Z.current)}),[U]);const F=(0,r.useRef)(U),B=(0,m.z7d)(D,A),z=(0,u.pick)(["entity","relation"],o||{}),H=(0,u.pick)(["entity","relation"],t),$=!(0,m.O27)((0,u.path)(["entity"],t))&&(!(0,u.equals)(z,H)||!(0,u.equals)(s,n)||(q=F.current,G=U,q.length!==G.length||q.some(((e,t)=>q[t]!==G[t]))));var q,G;const Y=N?g.N5.relations.actions.addRelation:g.N5.relations.actions.editRelation,X=(0,r.useCallback)((0,u.pipe)(g.N5.relations.actions.setRelationType(v.id,S),c),[v,S,c]),Q=(0,r.useCallback)((()=>(0,u.pipe)(g.N5.relations.actions.closeRelationEditor,c)(v.id,S)),[v,S,c]),K=(0,r.useCallback)((e=>{if(n){const t=(0,m.nt9)(O,n.type);return(0,m.wx9)(t,n,e)}return e}),[n,O]),J=(0,r.useCallback)((e=>c(g.N5.modifiedEntities.actions.entityCreated(e))),[c]),ee=(0,r.useCallback)((e=>c(g.N5.modifiedEntities.actions.entityDeleted(e))),[c]),te=(0,r.useCallback)((e=>{n&&ee(n.uri),c(g.N5.relations.actions.setRelationEntity(v.id,S,e)),T&&c(g.N5.errors.actions.errorDeactivated((0,m.iFp)(T)))}),[v.id,S,c,n,ee,T]),ne=(0,r.useCallback)((()=>{const e=(0,m.Bd_)(O,l,t);return c(g.N5.errors.actions.errorsSet(e)),0===e.length}),[t,O,l,c]),re=(0,r.useCallback)((()=>c(g.N5.errors.actions.errorsSet([]))),[c]),ae=(0,r.useCallback)((0,u.pipe)((0,u.always)(t),(0,u.when)(ne,(0,u.pipe)(m.zhn,K,(0,u.omit)(["initial"]),Y(v.id),c,(0,u.always)((0,u.differenceWith)(u.equals,Z.current,U.map((0,u.prop)("uri")))),(0,u.forEach)(ee),Q))),[t,v,c,K,ne,U]),oe=(0,r.useCallback)((()=>{n!==s&&(s?(J(s),n&&n.uri!==s.uri&&ee(n.uri)):ee(n.uri));const e=F.current;(0,u.differenceWith)(u.equals,Z.current,e.map((0,u.prop)("uri"))).forEach(ee),e.forEach(J),re(),Q()}),[Q,J,ee,re,n,s]),ie=(0,r.useCallback)((e=>(0,u.pipe)(g.N5.actions.addAttributes,c)(e.map((e=>k({},e,{viewId:v.id}))))),[v.id,c]),se=(0,r.useCallback)((e=>(0,u.pipe)(g.N5.actions.modifyAttribute,c)(k({},e,{viewId:v.id}))),[v.id,c]),le=(0,r.useCallback)((e=>(0,u.pipe)(g.N5.actions.removeAttribute,c)(k({},e,{viewId:v.id}))),[v.id,c]),ce=(0,r.useCallback)(((e,t)=>{const n=(0,m.nt9)(O,e),r=(0,u.pipe)(m.wcJ,(0,m._kX)(E))(n),a=(0,m.pBq)({entityTypeUri:e,initValue:t,attributeTypes:r,metadata:O,mode:E});te(a),J(a)}),[J,te,E,O]),pe=(0,m.e$p)(T),ue=(0,r.useCallback)((()=>{const{content:e,contentSecondLevel:n}=v;return n&&t.parentEntityUri?n.entityTypes:e.entityTypes}),[v,t.parentEntityUri]);return a().createElement(a().Fragment,null,a().createElement("div",{className:L.editor},a().createElement(d.Typography,{className:L.title},N?i().text("Add new item"):i().text("Edit item")),null===B&&a().createElement(f.Z,{className:L.item,relation:t.relation,inRelationTypes:D,outRelationTypes:A,onChange:X}),Boolean(I)&&a().createElement(a().Fragment,null,a().createElement("div",{ref:j,className:M},a().createElement(h.Z,{errorMessage:pe},a().createElement(b.Z,{className:p()(L.item,{[L.dense]:pe||t.entity&&(0,m.ZiX)(t.entity.entityUri)}),entity:t.entity||{},entityTypesUris:ue()||[],max:v.max||20,globalSearchRequestOptions:P,mode:E,onChange:te,onCreate:(0,m.fnZ)(E)?void 0:ce,metadata:O,attributeTypesSelectionStrategy:m.wcJ}))),a().createElement(y.Z,{className:L.item,attrTypes:V,entity:_,showEmptyEditors:!0,crosswalks:t.crosswalks,mode:E,parentUri:S,onAddAttributes:ie,onChangeAttribute:se,onDeleteAttribute:le}))),a().createElement("div",{className:L.actionButtons},a().createElement(d.Button,{onClick:oe},i().text("Cancel")),a().createElement(d.Button,{color:"primary",disabled:!$,onClick:ae},i().text("Apply"))),a().createElement(d.Divider,null))};P.propTypes={connection:m.Rjq,modifiedEntity:m.pyR,initialConnection:m.Rjq,initialModifiedEntity:m.pyR,allModifiedEntities:l().object,dispatch:l().func,config:m.PiC,mode:l().string,metadata:m.pGS,globalSearchRequestOptions:l().object,error:m.wfT,parentEntityUri:l().string,highlightedError:l().object};const T=(0,v.l)(E.NY,((e,t)=>{let{connection:n}=t;const{element:r={},type:a}=e||{},{relationUri:o,relationType:i}=n.relation;return{highlightedError:(0,E.Ie)(a)&&(0,m.Wah)(r,o,i)?e:null}}),P);const C=(0,n(52730).connect)(((e,t)=>{const n=(r=t,g.N5.relations.selectors.getEntityUriFromConnection(r.connection));var r;const a=(e=>g.N5.relations.selectors.getRelationUriFromConnection(e.connection))(t),o=(0,m.ZiX)(n);return{initialConnection:g.ZP.selectors.getInitialConnection(e,t.config.id,a),initialModifiedEntity:g.ZP.selectors.getInitialConnectionTempEntity(e,t.config.id,a),modifiedEntity:o?g.ZP.selectors.getModifiedEntity(e,n):null,allModifiedEntities:o?g.ZP.selectors.getModifiedEntities(e):null,globalSearchRequestOptions:g.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]),error:(0,m.ATu)(t.connection,g.ZP.selectors.getProfileErrors(e))}}))(T)},67268:(e,t,n)=>{"use strict";n.d(t,{Z:()=>T});var r=n(13980),a=n.n(r),o=n(24328),i=n.n(o),s=n(66244),l=n.n(s),c=n(44443),p=n(17440),u=n(71153),d=n.n(u);function m(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const g=e=>{let{x:t,y:n,width:r,height:a,id:o,minWidth:i,minHeight:s,maxWidth:l,maxHeight:c,isStatic:p}=e;return{x:t,y:n,w:r,h:a,minW:i,minH:s,maxW:l,maxH:c,i:o,static:p}},f=e=>{let{x:t,y:n,w:r,h:a,maxW:o,minW:i,minH:s,maxH:l,i:c}=e;return{x:t,y:n,width:r,height:a,minWidth:i,minHeight:s,maxWidth:o,maxHeight:l,id:c,isStatic:m(e,["x","y","w","h","maxW","minW","minH","maxH","i"]).static}},h=e=>(e||[]).map(f),b=(0,p.curry)(((e,t)=>(e||[]).find((0,p.propEq)("id",t)))),y=(0,p.curry)(((e,t,n)=>(0,p.mergeAll)([n,(0,p.pick)(e,t)]))),v=(0,p.curry)(((e,t,n)=>(n||[]).map((n=>(0,p.pipe)((0,p.prop)("id"),b(t),(0,p.defaultTo)({}),y(e,p.__,n))(n)))));var E=n(79692),w=n(50757);const x=(0,E.Z)((e=>({gridLayout:{position:"relative",width:"100%","& .react-grid-item":{"&.react-grid-placeholder":{background:"rgba(0, 0, 0, 0.03)",border:"2px dashed rgba(0, 0, 0, 0.3)",borderRadius:"3px",transitionDuration:"100ms",zIndex:7,userSelect:"none","& .react-resizable-handle":{display:"none"}},"&.static .react-resizable-handle":{display:"none"},"&.cssTransforms":{transitionProperty:"transform"},"&.react-draggable-dragging":{transition:"none",zIndex:8,willChange:"transform","& .react-resizable-handle":{backgroundImage:"none"}},"& .react-resizable-handle":{position:"absolute",width:"17px",height:"17px",bottom:0,right:0,zIndex:20,backgroundImage:`url('${(0,w.m5F)('<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path stroke="#505050" stroke-opacity=".54" d="M9.5 0v10M0 9.5h9M7.5 4v4M4 7.5h3"/>\n</svg>')}')`,backgroundRepeat:"no-repeat",backgroundOrigin:"content-box",boxSizing:"border-box",cursor:"se-resize"},"&.fullscreen":{visibility:"visible",position:"unset",width:"100% !important",height:"100% !important",transform:"translate(0) !important"}}},gridFullscreen:{height:"100% !important",overflowY:"hidden","& .react-resizable-handle, & .react-grid-item":{visibility:"hidden"}},isResizing:{zIndex:9,willChange:"width, height",pointerEvents:"none"}})));function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k.apply(this,arguments)}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const P=e=>{let{views:t,layout:n,layoutOptions:r,onLayoutChanged:a,draggableHandle:s,LayoutItem:u,onRemove:m,onDrop:y,droppingItem:E,isDroppable:w,classes:P}=e;const T=(0,o.useRef)(),C=x(),[S,I]=(0,o.useState)(null),[R,N]=(0,o.useState)(null),[L,j]=(0,o.useState)(0),{cols:M,rowHeight:D,margin:A}=r,V=(0,o.useMemo)((()=>(e=>(e||[]).map(g))(n)),[n]),_=(0,p.pipe)(h,v(["autosizing"],n),a),U=(0,o.useCallback)((e=>N((t=>t?null:e))),[]),Z=null!==R,W=(0,o.useCallback)(((e,t)=>{let o=!1;const i=n.map((n=>{if(n.id===t&&e){const t=((e,t)=>{const{margin:n,rowHeight:r}=t;return Math.ceil((e+n[1])/(r+n[1]))})(e,r);if(n.height!==t)return o=!0,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){O(e,t,n[t])}))}return e}({},n,{minHeight:t,maxHeight:t,height:t})}return n}));o&&a(i)}),[n,r,a]);return i().createElement(i().Fragment,null,i().createElement(c.Z,{refreshMode:"debounce",refreshRate:50,handleWidth:!0,onResize:e=>j(e)}),!!L&&i().createElement(l(),{innerRef:T,layout:V,cols:M,draggableHandle:s,autoSize:!0,rowHeight:D,width:L,margin:A,onLayoutChange:_,isResizable:!Z,isDraggable:!Z,className:d()(P.root,C.gridLayout,{[C.gridFullscreen]:Z}),onDrop:(e,t,n)=>{y&&y(h(e),f(t),n)},droppingItem:E,isDroppable:w,onResizeStart:(e,t)=>I(t.i),onResizeStop:()=>I(null),"data-reltio-id":"reltio-grid-layout"},V.map((e=>{const r=R===e.i,a=S===e.i,o=(b(n,e.i)||{}).autosizing?{AutosizeComponent:(s=e.i,i().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>{W(t,s)}}))}:{};var s;return i().createElement(u,k({key:e.i,layoutItemConfig:e,views:t,onToggleFullscreen:U,onRemove:m,className:d()({fullscreen:r,[C.isResizing]:a},P.item),isFullscreen:r},o))}))))};P.defaultProps={layoutOptions:{cols:4,rowHeight:30,margin:[15,15]},onConfigChanged:p.identity,onLayoutChanged:p.identity,classes:{}},P.propTypes={views:a().array,layout:a().array,layoutOptions:a().object,onConfigChanged:a().func,onLayoutChanged:a().func,onDrop:a().func,onRemove:a().func,LayoutItem:a().elementType,draggableHandle:a().string,isDroppable:a().bool,droppingItem:a().object,classes:a().shape({root:a().string,item:a().string})};const T=(0,o.memo)(P)},95299:(e,t,n)=>{"use strict";n.d(t,{Z:()=>F});var r=n(24328),a=n.n(r),o=n(17440),i=n(17871),s=n(75047);const l=e=>{let{children:t,className:n,position:a,map:o}=e;const[i,l]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const e=document.createElement("div"),t=o.controls[a].length;return o.controls[a].push(e),l(e),()=>{o.controls[a].removeAt(t)}}),[o,a]),(0,r.useEffect)((()=>{i&&n&&i.classList.add(n)}),[n,i]),i?(0,s.createPortal)(t,i):null};var c=n(87918),p=n.n(c),u=n(94079),d=n(83348),m=n(41039),g=n(97090);function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}const h=e=>a().createElement("svg",f({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M10.61 8.568A1.666 1.666 0 119.432 7.39l3.656-3.657a6.668 6.668 0 101.179 1.179L10.61 8.568zm-7.503 6.325A8.333 8.333 0 1114.893 3.107 8.333 8.333 0 013.107 14.893z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd",opacity:.54}));function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}const y=e=>a().createElement("svg",b({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:"M18.29 11.44a1.49 1.49 0 012.12 0l1.15 1.15c.59.58.59 1.53 0 2.12L16.27 20H13v-3.27zM18.174 4c0 1.71-.26 3.285-.932 4.563-.946 1.798-2.609 2.724-4.906 2.46l-.855-.116c-4.382-.544-6.626.53-6.626 3.609 0 1.968 1.105 2.924 3.267 3.304.692.121 1.306.165 2.234.176L11 18v2l-.698-.003c-1.016-.013-1.71-.063-2.526-.206-3.018-.53-4.921-2.176-4.921-5.274 0-4.819 3.71-6.378 9.52-5.505 1.575.237 2.506-.255 3.098-1.38.451-.858.666-2.02.697-3.307L16.174 4h2zM18 13.97l-3.45 3.45v1.03h1.03L19.03 15 18 13.97z",id:"Draw_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Draw_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Draw_svg__a"})),a().createElement("g",{mask:"url(#Draw_svg__b)",fill:"#000",fillOpacity:.54},a().createElement("path",{d:"M0 0h24v24H0z"}))));var v=n(79692);const E=(0,v.Z)({container:{margin:"2px",display:"flex",alignItems:"center"},button:{color:"rgba(0,0,0,0.54)",padding:0,height:"24px",width:"24px",minWidth:0},icon:{width:"20px",height:"20px"}}),w=(0,d.Z)(u.Button),x=e=>{let{drawingMode:t,drawingModes:n=[],hasActiveOverlay:r,onDrawingModeChanged:o,onClearOverlay:i}=e;const s=E(),l=e=>()=>{o(e)};return a().createElement("div",{className:s.container},t||r?a().createElement(w,{tooltipTitle:p().text("Clear area"),className:s.button,onClick:r?i:l(null)},a().createElement(m.Z,{className:s.icon})):n.map((e=>{const t=(e=>{switch(e){case g.vl.CIRCLE:return h;case g.vl.POLYGON:return y;default:return null}})(e);return a().createElement(w,{tooltipTitle:p().text("Draw area"),key:e,className:s.button,onClick:l(e)},a().createElement(t,{className:s.icon}))})))},k=(0,v.Z)({container:{height:"28px",marginRight:"7px",marginLeft:0},label:{fontSize:"11px",alignSelf:"center",lineHeight:"13px",marginLeft:"2px",letterSpacing:0},checkbox:{width:"20px",height:"20px",padding:"5px","& svg":{width:"16px",height:"16px"}}}),O=e=>{let{isSearchOnMapMove:t,onChangeIsSearchOnMapMove:n}=e;const r=k();return a().createElement(u.FormControlLabel,{classes:{root:r.container,label:r.label},control:a().createElement(u.Checkbox,{checked:t,onChange:e=>{n(e.target.checked)},color:"primary",className:r.checkbox}),label:p().text("Search as I move the map")})},P=e=>{const t=e.getBounds(),n=t.getNorthEast(),r=t.getSouthWest(),a=n.lat(),o=n.lng(),i=r.lat(),s=r.lng(),l=[],c=[];if(!(180===o&&-180===s||-180===o&&180===s)){const e=t.getCenter();l.push([a,e.lng()]),c.push([i,e.lng()])}return[[a,o],...l,[a,s],[i,s],...c,[i,o]]},T=e=>{switch(e){case g.vl.CIRCLE:return window.google.maps.drawing.OverlayType.CIRCLE;case g.vl.POLYGON:return window.google.maps.drawing.OverlayType.POLYGON;default:return null}},C=(e,t,n)=>{if(t.path){const r=n||new window.google.maps.LatLngBounds;t.path.forEach((e=>{let{lat:t,lng:n}=e;return r.extend(new window.google.maps.LatLng(t,n))})),e.fitBounds(r)}};var S=n(33310),I=n(66130),R=n(50757),N=n(91676);const L=(0,v.Z)({popper:{maxWidth:"263px",minWidth:"150px",boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",backgroundColor:"white",borderRadius:"2px"}});function j(){return j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}const M=(0,R.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large (hover)</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large-(hover)" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.32" cx="11" cy="28.5" rx="6" ry="4.66666667"></ellipse>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n <path d="M20,2 L20,20 L14.755,20 L14.6905172,20.0815309 C14.3562717,20.5012516 14.0578656,20.8886742 13.7817711,21.2616986 L13.5786724,21.5390469 C11.92787,23.8181606 11.079024,25.6311217 11.0052669,27.2674145 L11.0052669,27.2674145 L11,27.5 L10.9968324,27.3203844 C10.9285422,25.3781621 9.75347502,23.1598866 7.22124201,20.0010865 L2,20 L2,2 L20,2 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" mask="url(#mask-3)"></path>\n </g>\n</svg>'),D=(0,R.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M20,1 C20.5522847,1 21,1.44771525 21,2 L21,20 C21,20.5522847 20.5522847,21 20,21 L15.2374606,21.0021908 C14.9306693,21.3935449 14.6510143,21.7632851 14.3885453,22.1256523 C12.8309725,24.2760522 12,26.0137017 12,27.5 C12,28.0522847 11.5522847,28.5 11,28.5 C10.4477153,28.5 10,28.0522847 10,27.5 C10,25.7886708 8.84033182,23.6810997 6.73798027,21.0014567 L2,21 C1.44771525,21 1,20.5522847 1,20 L1,2 C1,1.44771525 1.44771525,1 2,1 L20,1 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.12" cx="11" cy="28.5" rx="4.5" ry="3.5"></ellipse>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="Path-3" fill="#FFFFFF"></path>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" fill-rule="nonzero" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n </g>\n</svg>'),A=(0,r.memo)((e=>{let{marker:t,onClick:n}=e,s=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["marker","onClick"]);const l=L(),c=(0,r.useRef)(),[p,u]=(0,r.useState)(!1),{activeEntityUri:d}=(0,r.useContext)(N.P),m=(0,o.pathEq)(["entity","uri"],d,t),g={lat:t.point.lat,lng:t.point.lng},f=(0,r.useCallback)((0,R.DsO)(u,50),[]),h=(0,r.useCallback)((()=>f(!0)),[f]),b=(0,r.useCallback)((()=>f(!1)),[f]),y=(0,r.useCallback)((()=>n(t)),[n,t]);return a().createElement(a().Fragment,null,a().createElement(I.Z,{anchorEl:c.current,open:p,className:l.popper,modal:!1,placement:"top"},a().createElement(S.Z,{entity:t.entity,onMouseOver:h,onMouseOut:b})),a().createElement(i.Jx,j({icon:{url:p||m?M:D,scaledSize:new google.maps.Size(22,32)},position:g,onClick:y,visible:!1!==t.visible,onMouseOver:h,onMouseOut:b},s)),a().createElement(i.vD,{options:{alignBottom:!0,pane:"mapPane",pixelOffset:new google.maps.Size(0,-40),closeBoxURL:"",enableEventPropagation:!0,disableAutoPan:!0},position:g},a().createElement("span",{ref:c})))}));var V=n(30634);const _=(0,v.Z)({mapControlContainer:{borderRadius:"2px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.15)",margin:"10px"}});function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Z(e,t,n[t])}))}return e}function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const W=["drawing"],F=e=>{let{markers:t=[],mapKey:n,defaultZoom:s,defaultCenter:c,loadingElement:p,isSearchOnMapMove:u,isSearchEnabled:d,activeOverlay:m,overlayOptions:f={},drawingModes:h=[],markerClusterer:b,markerClustererOptions:y,mapOptions:v={},mapContainerClassName:E,onMapBoundsChanged:w,onOverlayUpdated:k,onMarkerClicked:S}=e;const I=_(),{isLoaded:R,loadError:N}=(0,i.Ji)({googleMapsApiKey:n,libraries:W}),L=(0,r.useRef)(null),[j,M]=(0,r.useState)(null),[D,Z]=(0,r.useState)(null),[F,B]=(0,r.useState)(null);(e=>{let{markers:t,activeOverlay:n,isSearchOnMapMove:a,map:o}=e;const i=Boolean(o&&window.google),s=(0,V.D)(t),l=(0,V.D)(n),c=(0,V.D)(i);(0,r.useEffect)((()=>{const e=s!==t,r=c!==i,p=i&&n&&(l!==n||r);i&&!a&&t.length&&(e||r)?((e,t,n)=>{const r=new window.google.maps.LatLngBounds;if(e.forEach((e=>r.extend(e.point))),1===e.length){const e=r.getCenter();r.extend(new window.google.maps.LatLng(e.lat()+g.Pi,e.lng()+g.Pi)),r.extend(new window.google.maps.LatLng(e.lat()-g.Pi,e.lng()-g.Pi))}t.fitBounds(r),n&&C(t,n,r)})(t,o,n):p&&C(o,n)}),[i,t,n])})({markers:t,activeOverlay:m,map:j,isSearchOnMapMove:u});const z=(0,r.useMemo)((()=>U({},g.r,f)),[f]),H=(0,r.useMemo)((()=>U({},g.Q3,v)),[v]),$=(0,r.useCallback)((e=>{w(e?P(j):null),B(null),clearTimeout(L.current)}),[j,w]),q=(0,r.useCallback)((()=>{clearTimeout(L.current)}),[]),G=(0,r.useCallback)((()=>{u&&w(P(j))}),[u,j,w]),Y=(0,r.useCallback)((()=>{u&&(clearTimeout(L.current),L.current=setTimeout(G,1e3))}),[G,u]),X=(0,r.useCallback)(((e,t)=>{var n;const r=D&&{type:g.vl.POLYGON,overlay:D},a=t||r;if((0,o.isEmpty)(a)||!k)return;const{overlay:i,type:s}=a,l={[g.vl.POLYGON]:()=>i.getPath().getArray().map((e=>[e.lat(),e.lng()])),[g.vl.CIRCLE]:()=>({radius:i.getRadius()/1e3,center:i.getCenter()})},c=null===(n=l[s])||void 0===n?void 0:n.call(l);c&&k({data:c,type:s})}),[k,D]),Q=(0,r.useCallback)((e=>t=>{X(null,{type:e,overlay:t}),t.setMap(null),B(null)}),[X]),K=(0,r.useCallback)((()=>{k(null)}),[k]),J=e=>t.filter((0,o.prop)("point")).map((t=>a().createElement(A,{key:t.id,marker:t,clusterer:e,onClick:S})));if(N)return null;if(!R)return p;const ee=d&&Boolean(h.length),te=j&&d&&Boolean(h.length),ne=j&&d,re=!T(F)&&m&&(0,o.propEq)("type",g.vl.POLYGON,m);return a().createElement(i.b6,{mapTypeId:window.google.maps.MapTypeId.ROADMAP,options:H,onLoad:M,zoom:s,center:c,onZoomChanged:q,onDragStart:q,onIdle:Y,mapContainerClassName:E},te&&a().createElement(l,{className:I.mapControlContainer,position:window.google.maps.ControlPosition.TOP_RIGHT,map:j},a().createElement(x,{hasActiveOverlay:!!m,drawingModes:h,drawingMode:F,onDrawingModeChanged:B,onClearOverlay:K})),ne&&a().createElement(l,{className:I.mapControlContainer,position:window.google.maps.ControlPosition.TOP_CENTER,map:j},a().createElement(O,{onChangeIsSearchOnMapMove:$,isSearchOnMapMove:u})),b?(ae=y,a().createElement(i.XL,{options:ae},J)):J(),re&&a().createElement(i.mg,{onLoad:Z,path:m.path,editable:!0,options:z,onMouseUp:X,onDragEnd:X}),ee&&a().createElement(i.j_,{onPolygonComplete:Q(g.vl.POLYGON),onCircleComplete:Q(g.vl.CIRCLE),drawingMode:T(F),options:{drawingControl:!1,circleOptions:z,polygonOptions:z}}));var ae}},30553:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(13980),a=n.n(r),o=n(24328),i=n.n(o);const s=e=>{let{height:t,margin:n}=e;return i().createElement("div",{style:{width:"1px",height:`${t}px`,borderLeft:"1px solid rgba(0,0,0,0.38)",margin:`0 ${n}px`,flexShrink:"0"}})};s.propTypes={height:a().number,margin:a().number};const l=s},76536:(e,t,n)=>{"use strict";n.d(t,{u:()=>u});var r=n(24328),a=n(52730),o=n(17440),i=n(50757),s=n(49885);const l={appearance:{},attributes:{},roles:[],tags:[]},c=(0,o.evolve)({refEntity:i.VGB,refRelation:i.VGB}),p=e=>e?(0,o.evolve)({attributes:(0,o.map)((0,o.map)(c))})(e):e,u=()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(s.ZP.selectors.getHistorySlice),n=(0,a.useSelector)(s.ZP.selectors.getHistoryDiff),o=(0,a.useSelector)(s.ZP.selectors.getHistoryMode),c=(0,a.useSelector)(s.ZP.selectors.getEntity);return(0,r.useEffect)((()=>{if(t){const{aEntity:n,bEntity:r}=t,a=i.nwO.HistoryManager.createHistoryManager(i.nwO.AttributesDiff).computeEntityHistoryDiff(p(o===s.Z9.Current?c:r),p(n));e(s.N5.history.actions.setHistoryDiff(a))}}),[t,o,e,c]),n||l}},46626:(e,t,n)=>{"use strict";n.d(t,{s:()=>Xe});var r=n(24328),a=n.n(r),o=n(50757),i=n(71153),s=n.n(i),l=n(73272),c=n(87918),p=n.n(c),u=n(94079),d=n(79692);const m=(0,d.Z)((e=>({card:{borderBottom:"1px solid rgba(0,0,0,0.06)"},withBackground:{backgroundColor:"rgba(0, 0, 0, 0.03)"},lineWrapper:{position:"relative"},icon:{position:"absolute",top:"8px",left:"16px",width:"32px",height:"32px",zIndex:1},line:e=>{let{color:t}=e;return{borderLeft:`3px solid ${t}`,position:"absolute",left:0,top:0,bottom:0}},info:{fontSize:"13px",color:e.palette.text.secondary,wordWrap:"break-word",lineHeight:"15px"},commentsInfo:{display:"flex",alignItems:"center",marginBottom:"-4px",marginTop:"7px"},commentsIcon:{width:"11px",height:"11px",marginLeft:"2px",marginRight:"6px",marginTop:"-2px"},infoValue:{color:e.palette.text.primary},infoBlock:{display:"flex",flexDirection:"row",marginBottom:"5px"},header:{display:"flex",flexDirection:"row",paddingBottom:"12px"},flex:{flex:1},caption:{fontSize:"16px",color:e.palette.text.primary},title:{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:"-4px"},flag:{height:"13px",width:"13px",marginTop:"-2px",stroke:"#000000",fill:"none",margin:"2px 5px 0 5px"},date:{fontSize:"13px",color:e.palette.text.primary},mainInfo:{display:"flex",flexDirection:"column",flex:1},controlsBox:{marginRight:"16px",marginBottom:"12px",marginTop:"13px"},controlsInRow:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"},priority:{width:"162px"},comments:{marginLeft:"11px"}})));var g=n(58241),f=n(30078),h=n(17440);const b=(0,d.Z)({dueDate:{marginTop:0,marginBottom:0},dueDateInput:{height:"40px"},inputLabel:{fontSize:"14px"}});var y=n(8459),v=n(52730),E=n(49885),w=n(85229),x=n(94150),k=n(75813),O=n(22994),P=n(21380);const T=e=>{let{taskId:t,dueDate:n,isTaskOpen:i,className:l}=e;const c=b(),{updateDueDate:u,updateRequestIsInProgress:d,readOnly:m}=(e=>{let{dueDate:t,taskId:n,isOpen:a}=e;const{updateTaskState:i}=(0,r.useContext)(x.O)||{},s=(0,v.useSelector)(E.ZP.selectors.getWorkflowPath),l=(0,v.useSelector)(E.ZP.selectors.getWorkflowEnvironmentUrl),c=(0,v.useSelector)(E.ZP.selectors.getTenant),p=(0,w._)(),[u,d]=(0,r.useState)(!1),m=(0,O.Z)()("UPDATE_TASK")&&(0,P.tg)(a);return{updateDueDate:(0,r.useCallback)((e=>{s&&m&&n&&e&&t!==e&&(d(!0),p((0,o.KF3)({taskId:n,workflowPath:s,environment:l,tenant:c,dueDate:e})).then((()=>{null==i||i(n,{dueDate:e})})).catch(k.R).finally((()=>{d(!1)})))}),[s,n,l,c,i,p,t,m]),updateRequestIsInProgress:u,readOnly:!m}})({dueDate:n,taskId:t,isOpen:i});return a().createElement(y.Z,{className:s()(c.dueDate,l),disabled:d||m,value:n,label:p().text("Due date"),onChange:(0,h.pipe)((e=>e&&e.getTime()),u),margin:"dense",InputProps:{className:c.dueDateInput},InputLabelProps:{classes:{root:c.inputLabel}}})};var C=n(24737);const S=e=>{let{taskId:t,priority:n,isTaskOpen:i,className:s}=e;const{priorities:l,updatePriority:c,updateRequestIsInProgress:u,readOnly:d}=(e=>{let{priority:t,taskId:n,isOpen:a}=e;const{updateTaskState:i}=(0,r.useContext)(x.O)||{},s=(0,v.useSelector)(E.ZP.selectors.getWorkflowPath),l=(0,v.useSelector)(E.ZP.selectors.getWorkflowEnvironmentUrl),c=(0,v.useSelector)(E.ZP.selectors.getTenant),u=(0,w._)(),[d,m]=(0,r.useState)(!1),g=(0,O.Z)()("UPDATE_TASK")&&(0,P.tg)(a),f=(0,r.useCallback)((e=>{const{value:r}=e;s&&g&&n&&t!==r&&(m(!0),u((0,o.ax9)({taskId:n,workflowPath:s,environment:l,tenant:c,priority:r})).then((()=>{null==i||i(n,{priority:r})})).catch(k.R).finally((()=>{m(!1)})))}),[s,n,l,c,i,u,t,g]);return{priorities:(0,r.useMemo)((()=>[{label:p().text("Low"),value:o.NVC.low},{label:p().text("Medium"),value:o.NVC.medium},{label:p().text("High"),value:o.NVC.high},{label:p().text("Urgent"),value:o.NVC.urgent}]),[]),updatePriority:f,updateRequestIsInProgress:d,readOnly:!g}})({taskId:t,priority:n,isOpen:i}),m=u||d;return a().createElement(C.Z,{className:s,isDisabled:m,options:l,onChange:c,hideSelectedOptions:!1,label:p().text("Priority"),value:l.find((0,h.propEq)("value",n)),TextFieldProps:{disabled:m},height:40})};var I=n(27194),R=n(46628);const N=(0,d.Z)({decorator:{display:"flex",alignItems:"stretch"},lineBlock:{width:"56px",flexShrink:0},withLinePadding:{"& $noLine":{height:"10px"},"& $line":{height:"calc(100% - 10px)"}},noLine:{height:"0"},line:{height:"100%",position:"relative",marginLeft:"31px",borderLeft:"2px solid rgba(0,0,0,0.06)","&:before":{position:"absolute",height:6,width:6,borderRadius:"50%",left:-5,top:"15px",background:"#d8d8d8",content:'""',display:"block",border:"1px solid white"},"&$plain":{"&:before":{width:0,border:"none"}},"&$last":{height:"15px"}},content:{flex:1,minWidth:0},plain:{},last:{},rowDivider:{marginLeft:0}}),L=e=>{let{className:t,children:n,plain:r,first:o,last:i,transparent:l,divider:c}=e;const p=N();return a().createElement("div",{className:s()(t,p.decorator)},a().createElement("div",{className:s()(p.lineBlock,{[p.withLinePadding]:o})},!l&&a().createElement(a().Fragment,null,a().createElement("div",{className:p.noLine}),a().createElement("div",{className:s()(p.line,{[p.plain]:r},{[p.last]:i})}))),a().createElement("div",{className:p.content},n,c&&a().createElement(u.Divider,{className:p.rowDivider,light:!0,variant:"inset"})))};let j={};const M=["#DC057B","#5DC003","#FEC92F","#F57F27","#B71137","#056B97","#4499AE","#BD81BE","#5F3577","#A68560","#555962"];let D=0;function A(){return A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A.apply(this,arguments)}const V=e=>a().createElement("svg",A({width:20,height:20,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M4 17.17L5.17 16H20V4H4v13.17zM20 2c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H6l-4 4V4c0-1.1.9-2 2-2h16zm-3 9H7v2h10v-2zm0-4H7v2h10V7z",id:"CollaborationIcon_svg__a"})),a().createElement("g",{transform:"translate(-2 -2)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"CollaborationIcon_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#CollaborationIcon_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#CollaborationIcon_svg__b)",d:"M0 0h24v24H0z"})));var _=n(10186);const U=e=>{let{task:t,children:n,actions:o,Icon:i}=e;const{taskId:c,dueDate:d,priority:h,assignee:b,createdBy:y,createTime:v,displayName:E,processDefinitionDisplayName:w,objectURIs:x,processInstanceComments:k,possibleActions:C,isOpen:N,preferredAction:A}=t,U=(0,P.Xs)(x),Z=(e=>{let{processDefinitionDisplayName:t}=e;const n=t;return j[n]||(j[n]=M[D],D++,D>M.length-1&&(D=0)),j[n]})({processDefinitionDisplayName:w}),W=m({color:Z}),[F,B]=(0,r.useState)(!1),z=(0,O.Z)()("VIEW_PROCESS_INSTANCE_COMMENTS"),{actions:H,actionRequestIsInProgress:$}=(0,_.t)({taskId:c,possibleActions:C,assignee:b,isOpen:N});return a().createElement("div",{className:W.card},a().createElement("div",{className:s()({[W.withBackground]:F})},a().createElement("div",{className:W.lineWrapper},a().createElement("div",{className:W.line}),i&&a().createElement(i,{className:W.icon}),a().createElement(L,{plain:!0,first:!0,transparent:!F},a().createElement("div",{className:W.mainInfo},a().createElement("div",{className:W.title},a().createElement("div",{className:s()(W.caption,W.flex)},p().text(w)),a().createElement(l.Z,{className:W.flag}),a().createElement(u.Tooltip,{title:p().text("Due date")},a().createElement("span",{className:W.date},p().date(d,"L"))),a().createElement(g.Z,{isOpen:F,size:"L",onClick:()=>{B(!F)}})),a().createElement("div",{className:W.infoBlock,"data-reltio-id":"info-block"},a().createElement("div",{className:W.flex},U&&a().createElement("div",{className:W.info},p().text("DCR ID"),": ",a().createElement("span",{className:W.infoValue},U)),a().createElement("div",{className:W.info},p().text("Created by"),": ",a().createElement("span",{className:W.infoValue},y)," ",p().text("on")," ",a().createElement("span",{className:W.infoValue},p().date(v,"L"))),a().createElement("div",{className:W.info},p().text("Step"),": ",a().createElement("span",{className:W.infoValue},E)),z&&(null==k?void 0:k.length)>0&&a().createElement("div",{className:W.commentsInfo},a().createElement(V,{className:W.commentsIcon}),a().createElement("div",{className:W.infoValue},k.length))),o||a().createElement(R.Z,{actions:H,isInProgress:$}))))),F&&a().createElement(L,{plain:!0},a().createElement("div",{className:W.controlsBox},a().createElement("div",{className:W.controlsInRow},a().createElement(T,{taskId:c,dueDate:d,isTaskOpen:N}),a().createElement(S,{taskId:c,priority:h,className:W.priority,isTaskOpen:N})),a().createElement(f.Z,{taskId:c,assignee:b,isTaskOpen:N})))),F&&a().createElement(a().Fragment,null,n,z&&a().createElement("div",{className:W.comments},a().createElement(I.V,{workflowActions:H,actionRequestIsInProgress:$,preferredAction:A,taskId:c,processInstanceComments:k,isTaskOpen:N}))))};function Z(){return Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Z.apply(this,arguments)}const W=e=>a().createElement("svg",Z({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#42A5F5",cx:14,cy:14,r:14}),a().createElement("path",{d:"M16.43 9.87c0 1.59 1.25 2.87 2.79 2.87 1.53 0 2.78-1.28 2.78-2.87C22 8.29 20.75 7 19.22 7c-1.54 0-2.79 1.29-2.79 2.87zm1.4 0c0-.79.62-1.43 1.39-1.43.77 0 1.39.64 1.39 1.43 0 .79-.62 1.44-1.39 1.44-.77 0-1.39-.65-1.39-1.44zm-6.26 8.26c0-1.59-1.25-2.87-2.79-2.87-1.53 0-2.78 1.28-2.78 2.87C6 19.71 7.25 21 8.78 21c1.54 0 2.79-1.29 2.79-2.87zM8.09 9.15v4.31h1.39v-2.87h2.78v2.15l2.78-2.87L12.26 7v2.15H8.09zm11.82 9.7v-4.31h-1.39v2.87h-2.78v-2.15l-2.78 2.87L15.74 21v-2.15h4.17z",fill:"#FFF",opacity:.87})));var F=n(8261);const B=(e,t)=>{switch(e){case o.VI$.CREATE_RELATIONSHIP:case o.VI$.INSERT_ATTRIBUTE:return o.ws7.ADDED;case o.VI$.UPDATE_TAGS:case o.VI$.UPDATE_ROLES:case o.VI$.UPDATE_ATTRIBUTE:return o.ws7.EDITED;case o.VI$.DELETE_ATTRIBUTE:case o.VI$.DELETE_RELATIONSHIP:return o.ws7.DELETED;case o.VI$.PIN_ATTRIBUTE:return null!=t&&t.pin?o.ws7.PIN_DELETED:o.ws7.PINNED;case o.VI$.IGNORE_ATTRIBUTE:return null!=t&&t.ignored?o.ws7.IGNORE_DELETED:o.ws7.IGNORED}},z=e=>({[o.ws7.ADDED]:p().text("added"),[o.ws7.EDITED]:p().text("edited"),[o.ws7.DELETED]:p().text("deleted"),[o.ws7.PINNED]:p().text("pinned"),[o.ws7.PIN_DELETED]:p().text("pin deleted"),[o.ws7.IGNORED]:p().text("ignored"),[o.ws7.IGNORE_DELETED]:p().text("ignore deleted")}[e]||""),H=(e,t)=>(0,h.when)((0,h.allPass)([(0,h.pipe)((0,h.prop)("type"),(0,h.equals)(o.oS0.TYPE_STRING)),()=>(0,o.CBv)(t)]),(0,h.evolve)({type:(0,h.always)(o.oS0.TYPE_URL)}))((0,o.PFL)(e));function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){q(e,t,n[t])}))}return e}function q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const G=(e,t)=>{if("newValue"in e||"oldValue"in e){const{newValue:n,oldValue:r,type:a}=e,o=(0,h.pathOr)([],["value",t.name])(n),i=(0,h.pathOr)([],["value",t.name])(r),s=Math.max(o.length,i.length);return(0,h.times)((e=>[{value:{newValue:o[e],oldValue:i[e],type:a}}]),s)}const n=e[t.name];return n?[n]:[]},Y=(0,h.curry)(((e,t,n)=>{const r=(0,F.U)(e,t.type,[],[]);return Q(e,r,n)})),X=(0,h.curry)(((e,t,n,r)=>{const a=(0,o.V3K)(e,t.type),i=(0,o.xF8)(e,t.type);return(0,h.flatten)([$({level:1,label:(0,h.propOr)("","label",a),attributeType:a,attributeValue:$({},t,n)},((e,t)=>{if(t===o.VI$.CREATE_RELATIONSHIP||(0,o.O27)(e)){const e=B(t);return e?{operation:e}:{}}return{}})(n,r)),Q(e,i,n,2)])})),Q=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return(0,h.flatten)(t.map((t=>G(n,t).map((n=>n.map((n=>K(e,t,n,r))))))).filter((0,h.complement)(h.isEmpty)))},K=(e,t,n,r)=>{switch(t.type){case o.oS0.TYPE_NESTED:case o.oS0.TYPE_IMAGE:return J(e,t,n,r);case o.oS0.TYPE_REFERENCE:return ee(e,t,n,r);default:{const e=((e,t)=>{const n=(0,o.kqr)(e)?t:t.value;return(0,h.is)(Object,n)?n:{newValue:t,type:o.VI$.INSERT_ATTRIBUTE}})(t,n);return te(t,e,r)}}},J=(e,t,n,r)=>{const a=(0,o.EUG)({},t);return[{level:r,label:(0,o.idV)((null==t?void 0:t.label)||(null==t?void 0:t.name)),attributeType:t,attributeValue:n},Q(e,a,n.value,r+1)]},ee=(e,t,n,r)=>{const a=(0,o.EUG)(e,t);return[{level:r,label:(null==t?void 0:t.label)||(null==t?void 0:t.name),attributeType:t,attributeValue:n},Q(e,a,n.value,r+1)]},te=(e,t,n)=>{const{newValue:r,oldValue:a,type:i}=(e=>{let{newValue:t,oldValue:n,type:r}=e;return r===o.VI$.UPDATE_ATTRIBUTE?{type:r,newValue:t,oldValue:n}:{type:r,newValue:n||t}})(t);return{attributeType:e,newValue:r,oldValue:a,operation:B(i,a),label:(null==e?void 0:e.label)||(null==e?void 0:e.name),level:n}};function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){re(e,t,n[t])}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ae=["defaultProfilePicValue",o.xPW.tags.name,o.xPW.roles.name,o.xPW.startDate.name,o.xPW.endDate.name],oe=e=>{let{newValue:t,oldValue:n}=e;const r=e=>isNaN(e)||(0,o.O27)(e)?e:parseInt(e),a=e=>(null==e?void 0:e.length)&&!(0,o.O27)(e)&&!(0,o.O27)(e[0]),i=a(t),s=a(n);return i&&s?[{type:o.VI$.UPDATE_ATTRIBUTE,oldValue:{value:r(n[0])},newValue:{value:r(t[0])}}]:i?[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:r(t[0])}}]:s?[{type:o.VI$.DELETE_ATTRIBUTE,oldValue:{value:r(n[0])}}]:void 0},ie=(e,t)=>{const{newValue:n=[],oldValue:r=[],type:a}=t,i=a===o.VI$.UPDATE_ROLES?(0,o.xqc)(e):h.identity,s=(0,h.difference)(n,r),l=(0,h.difference)(r,n),c=[];return s.length&&c.push({type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:s.map(i).join(", ")}}),l.length&&c.push({type:o.VI$.DELETE_ATTRIBUTE,oldValue:{value:l.map(i).join(", ")}}),c},se=(e,t)=>{const n=(e=>{const{type:t,attributePath:n,refObjectURI:r,refAttributeType:a}=e,i=t===o.VI$.INSERT_ATTRIBUTE?(0,o.Zmi)(n):n;if(r){const e=a.split("/attributes/"),t=r.split("/")[1];return[e[1],t,i].join("/")}return i})(t),r=n.split("/");let a=e;for(let e=0;e<r.length-1;e+=2){var i;const n=r[e],o=r[e+1],s=(a[n]||[]).find((0,h.propEq)("id",o)),l=r.length===e+2?t:{},c=s||{id:o,value:l},p=(null===(i=t.refObjectURI)||void 0===i?void 0:i.indexOf(o))>=0&&t.refObjectURI;p&&(c.refObjectURI=p),(0,h.isNil)(s)&&(a[n]=(a[n]||[]).concat(c)),a=c.value}return e},le=(e,t)=>{const{attributes:n={},startDate:r,endDate:a}=t,{roles:i,tags:s,defaultProfilePicValue:l}=t,c=ne({},n);return l&&(c.defaultProfilePicValue=[l]),i&&(c[o.xPW.roles.name]=[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:i.map((0,o.xqc)(e)).join(", ")}}]),s&&(c[o.xPW.tags.name]=[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:s.join(", ")}}]),r&&(c[o.xPW.startDate.name]=[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:r}}]),a&&(c[o.xPW.endDate.name]=[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:a}}]),c},ce=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{type:a}=n;switch(a){case o.VI$.UPDATE_PROFILE_PIC_BY_URL:r.defaultProfilePicValue=[n.newValue];break;case o.VI$.UPDATE_TAGS:r[o.xPW.tags.name]=ie(e,n);break;case o.VI$.UPDATE_ROLES:r[o.xPW.roles.name]=ie(e,n);break;case o.VI$.UPDATE_START_DATE:r[o.xPW.startDate.name]=oe(n);break;case o.VI$.UPDATE_END_DATE:r[o.xPW.endDate.name]=oe(n);break;case o.VI$.CREATE_RELATIONSHIP:case o.VI$.CREATE_ENTITY:return ne({},r,le(e,n.newValue));case o.VI$.INSERT_ATTRIBUTE:case o.VI$.UPDATE_ATTRIBUTE:case o.VI$.DELETE_ATTRIBUTE:case o.VI$.PIN_ATTRIBUTE:case o.VI$.IGNORE_ATTRIBUTE:se(r,n)}return r},pe=(0,d.Z)((e=>({linkLabel:{color:e.palette.primary.main,fontSize:"12px",letterSpacing:0,lineHeight:"16px"}}))),ue=e=>{let{suggestionsCount:t,isExpanded:n,onClick:r,className:o}=e;const i=pe();return a().createElement(u.Link,{component:"button",variant:"caption",underline:"none",onClick:r,className:o},a().createElement("span",{className:i.linkLabel},n?p().text("View less suggestions"):p().text("View ${suggestionsCount} more suggestions",{suggestionsCount:t})))};var de=n(43525);const me=(0,d.Z)((e=>({field:{fontSize:"12px",lineHeight:"20px",color:e.palette.text.primary,marginTop:"6px",overflow:"hidden",wordBreak:"break-word"},fieldName:{color:e.palette.text.secondary,marginRight:"8px"},difference:{marginRight:"8px"},arrow:{margin:"0 4px",fontSize:"12px",color:e.palette.text.primary},chip:{height:"20px",fontSize:"10px",fontWeight:500,lineHeight:"16px",letterSpacing:0,flexShrink:0,textTransform:"capitalize",color:e.palette.primary.main,borderColor:e.palette.primary.main,"&.edited":{color:"#CC7500",borderColor:"#CC7500"},"&.added":{color:"#599E0E",borderColor:"#599E0E"},"&.deleted":{color:"#CF0E26",borderColor:"#CF0E26"}}}))),ge=e=>{let{label:t,oldValue:n,newValue:r,operation:o,className:i}=e;const l=me(),c=n||r;return a().createElement("div",{className:s()(l.field,i)},a().createElement("span",{className:l.fieldName},t,":"),!(0,h.isNil)(c)&&a().createElement("span",{className:l.difference},c,r&&n&&a().createElement(a().Fragment,null,a().createElement(de.Z,{className:l.arrow}),r)),o&&a().createElement(u.Chip,{variant:"outlined",label:z(o),className:s()(l.chip,o)}))},fe=a().createContext(null);fe.displayName="AttributesChangesContext";var he=n(72768),be=n(31039);const ye=(0,d.Z)((e=>({linkContainer:{textDecoration:"none",cursor:"pointer",marginLeft:"4px"},linkLabel:{color:e.palette.primary.main,fontSize:"12px",letterSpacing:0,lineHeight:"16px"},disabledLink:{pointerEvents:"none",cursor:"default"},label:{color:e.palette.text.primary},change:e=>{let{level:t=0}=e;return{marginLeft:16*t+"px"}}}))),ve=e=>{let{label:t,level:n,attributeType:i,attributeValue:l,oldValue:c,newValue:p,operation:u}=e;const d=ye({level:n}),m=(0,v.useSelector)(E.ZP.selectors.getEntityUri),g=(0,r.useContext)(fe),f=(0,r.useCallback)((()=>{if((0,o.YkG)(i)){const e=(0,h.when)((0,h.anyPass)([(0,h.hasPath)(["value","newValue"]),(0,h.hasPath)(["value","oldValue"])]),(0,h.ifElse)((0,h.hasPath)(["value","newValue"]),(0,h.path)(["value","newValue"]),(0,h.path)(["value","oldValue"])))(l);return function(e,t,n){let r,a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=o[t.refObjectURI];return i?(a=n===i.startObjectUri?i.endObjectUri:i.startObjectUri,r=n===i.startObjectUri?i.endObjectLabel:i.startObjectLabel):t.refEntity&&(a=t.refEntity.objectURI,r=o[a].label),{objectUri:a,objectLabel:r}}(i,e,m,g)}if("endObject"in i){const{endObjectUri:e,endObjectLabel:t}=l;return{objectUri:e,objectLabel:t}}}),[i,l,m,g]),b=(0,r.useCallback)((()=>{const{objectUri:e,objectLabel:t}=f()||{};if(!(0,h.isNil)(e)&&!(0,h.isNil)(t)){var n;const r=!1===(null===(n=g[e])||void 0===n?void 0:n.isExist);return a().createElement(be.Z,{value:e,className:s()(d.linkContainer,{[d.disabledLink]:r})},a().createElement("span",{className:s()(d.linkLabel,{[d.label]:r})},(0,o.idV)(t)))}return null}),[f,g,d]),y=(0,r.useMemo)((()=>a().createElement("span",null,t,b())),[t,b]),w=(0,r.useCallback)((e=>{const t=(0,o.kDl)(e);return a().createElement(he.Z,{value:t,dataTypeDefinition:H(i,t)})}),[i]);return a().createElement(ge,{className:d.change,label:y,oldValue:c&&w(c),newValue:p&&w(p),operation:u})},Ee=(0,d.Z)({title:{fontSize:"12px",letterSpacing:0,lineHeight:"16px",fontWeight:500,marginTop:"8px"}});function we(){return we=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},we.apply(this,arguments)}const xe=e=>{let{changes:t}=e;const n=Ee();return a().createElement(a().Fragment,null,t.map(((e,t)=>(0,h.has)("level",e)?a().createElement(ve,we({},e,{key:t})):a().createElement("div",{className:n.title,key:t},e.label))))},ke=(0,h.pipe)((0,h.filter)((0,h.has)("operation")),h.length);function Oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Pe(e,t,n[t])}))}return e}function Pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Te=(0,h.filter)((0,h.pipe)((0,h.prop)("uri"),o.WgC)),Ce=(0,h.filter)((0,h.pipe)((0,h.prop)("uri"),o.bC9)),Se=(e,t)=>(0,h.filter)((0,h.allPass)([(0,h.pipe)((0,h.prop)("uri"),o.bC9),(0,h.pipe)((0,h.prop)("startObjectUri"),(0,h.equals)(t))]))(e),Ie=(0,h.curry)(((e,t)=>({entity:t,relations:Se(e,t.uri)}))),Re=(0,h.curry)(((e,t)=>{const n=e[t.startObjectUri],r=[t];return n?{entity:Oe({},n,{uri:t.startObjectUri}),relations:r}:{relations:r}})),Ne=(e,t)=>{const{entity:n,relations:r}=t,{uri:a}=n,o=(0,h.pipe)((0,h.pathOr)([],[a,"relations"]),(0,h.concat)(r),h.uniq)(e);return e[a]={entity:n,relations:o},e},Le=e=>e.type===o.VI$.CREATE_ENTITY,je=(0,d.Z)((e=>({container:{boxSizing:"border-box",border:"1px solid rgba(0,0,0,0.03)",borderRadius:"3px",backgroundColor:"rgba(0,0,0,0.03)",padding:"10px",margin:"12px 16px 12px 0"},uri:{color:e.palette.primary.main,textDecoration:"none",cursor:"pointer"},label:{fontSize:"12px",letterSpacing:0,lineHeight:"16px"},showMoreLink:{marginTop:"8px"}}))),Me=e=>{let{changes:t,dcrUri:n,objectsInfo:i,entityInfo:s,relationsInfo:l,max:c}=e;const u=je(),d=(0,v.useSelector)(E.ZP.selectors.getMetadata),[m,g]=(0,r.useMemo)((()=>((e,t,n,r)=>{const a=t=>(0,h.pipe)((0,h.pick)([t]),Y(e,n)),i=(0,h.curry)(((e,t)=>(0,h.reduce)(((e,n)=>(0,h.concat)(e,n(t))),[],e))),s=(0,h.propOr)([],n.uri)(t).reduce(((t,r)=>ce(e,n,r,t)),{}),l=r.map((n=>((e,t,n)=>(0,h.propOr)([],n.uri)(t).reduce(((t,r)=>ce(e,n,r,t)),{}))(e,t,n)));return[i([(0,h.pipe)((0,h.omit)(ae),Y(e,n)),a(o.xPW.roles.name),a(o.xPW.tags.name),a(o.xPW.startDate.name),a(o.xPW.endDate.name)],s),(0,h.flatten)(r.map(((n,r)=>{const a=(0,h.path)([n.uri,0,"type"],t);return X(e,n,l[r],a)})))]})(d,t,s,l)),[d,t,s,l]),f=(0,r.useMemo)((()=>{const e={label:p().text("Relationships")};return g.length>0?(0,h.flatten)([m,e,g]):m}),[m,g]),{isExpanded:b,onToggle:y,itemsToShow:w,collapsedSuggestionsCount:x}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const[n,a]=(0,r.useState)(!1),o=(0,r.useCallback)((()=>a((e=>!e))),[]),i=(0,r.useMemo)((()=>e.slice(0,t)),[e,t]),s=(0,r.useMemo)((()=>ke(e)),[e]),l=(0,r.useMemo)((()=>ke(i)),[i]);return{isExpanded:n,onToggle:o,itemsToShow:n?e:i,collapsedSuggestionsCount:s-l}}(f,c),k=(0,h.ifElse)((0,h.any)(Le),(0,h.always)(((e,t)=>`${e}/changes/${t}`)(n,s.uri)),(0,h.always)((0,o.wwR)(s)))((0,h.propOr)([],s.uri,t)),O=(0,h.ifElse)((0,h.any)(Le),(0,h.always)("dcrReview"),(0,h.always)("profile"))((0,h.propOr)([],s.uri,t));return a().createElement(fe.Provider,{value:i},a().createElement("div",{className:u.container},a().createElement(be.Z,{className:u.uri,value:k,screen:O},a().createElement("div",{className:u.label},(0,o.idV)(s.label))),a().createElement(xe,{changes:w}),x>0&&a().createElement(ue,{onClick:y,suggestionsCount:x,isExpanded:b,className:u.showMoreLink})))};function De(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ae=e=>{let{task:t}=e;const{objectURIs:n}=t,i=(0,P.rc)(n),{dcr:s,groupedObjects:l}=(e=>{const[t,n]=(0,r.useState)([]),[a,i]=(0,r.useState)(null),s=(0,w._)(),l=(0,r.useCallback)((e=>(0,h.isEmpty)(e)?Promise.resolve([]):s((0,o.DnY)(e,{searchOptions:"ovOnly",defaultMaxValues:1}))),[]);return(0,r.useEffect)((()=>{(0,o.E6I)(e).then((e=>{const{changes:t,objectsInfo:r}=e,a=((e,t)=>(0,h.pipe)(h.keys,(0,h.filter)((t=>(0,h.prop)([t],e))),(0,h.map)((e=>Oe({},t[e],{uri:e}))))(t))(t,r),o=(0,h.pipe)(Te,(0,h.map)(Ie(a)))(a),s=(0,h.pipe)(Ce,(0,h.map)(Re(r)))(a),[c,p]=(0,h.partition)((0,h.has)("entity"),s),u=p.map((0,h.path)(["relations",0,"startObjectUri"]));l(u).then((e=>{const t=p.map(((t,n)=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){De(e,t,n[t])}))}return e}({},t,{entity:e[n]})));(0,h.pipe)(h.flatten,(0,h.reduce)(Ne,{}),h.values,n)([o,c,t])})).catch(k.l),i(e)})).catch(k.l)}),[e,l]),{dcr:a,groupedObjects:t}})(i);return a().createElement(U,{task:t,Icon:W},s&&l.map(((e,t)=>a().createElement(L,{key:t,last:t===l.length-1,divider:!0},a().createElement(Me,{entityInfo:e.entity,relationsInfo:e.relations,changes:s.changes,objectsInfo:s.objectsInfo,dcrUri:i})))))},Ve=(0,d.Z)({pmCard:{marginLeft:"-15px"}});function _e(){return _e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_e.apply(this,arguments)}const Ue=e=>a().createElement("svg",_e({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#1976D2",cx:14,cy:14,r:14}),a().createElement("path",{d:"M22.5 14L18 9.5V13h-3.5L9 7.5 7.5 9l6.04 6H18v3.5l4.5-4.5zm-11.46 1.46L7.5 19 9 20.5l3.54-3.54-1.5-1.5z",fill:"#FFF",opacity:.87})));var Ze=n(28741),We=n(49734);const Fe={showTransitiveMatches:!0,showInactiveEntities:!1},Be=e=>{let{task:t}=e;const n=Ve(),{objectURIs:r}=t,o=(0,v.useSelector)(E.ZP.selectors.getEntity),i=(0,v.useSelector)(E.ZP.selectors.getMetadata),{matches:s,entitiesMap:l}=(0,Ze.s)({enabled:!!o.uri,entity:o,filter:"",rowsPerPage:Number.MAX_SAFE_INTEGER,page:0,options:Fe}),c=null==s?void 0:s.find((e=>{let{object:t}=e;return r.includes(t.uri)}));return a().createElement(U,{task:t,Icon:Ue},c&&a().createElement(L,{last:!0},a().createElement("div",{className:n.pmCard},a().createElement(We.M,{metadata:i,entity:o,match:c,entitiesMap:l}))))};function ze(){return ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ze.apply(this,arguments)}const He=e=>a().createElement("svg",ze({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#205191",cx:14,cy:14,r:14}),a().createElement("path",{d:"M9.667 20.622c-.92 0-1.667-.744-1.667-1.662V8.99c0-.916.747-1.66 1.667-1.66h2.446A1.993 1.993 0 0114 6l.162.006a1.992 1.992 0 011.725 1.323h2.446c.92 0 1.667.745 1.667 1.662v9.97c0 .917-.747 1.661-1.667 1.661zm9-1.33V8.66h-1.334v1.993h-6.666V8.66H9.333v10.634h9.334zM15.86 14.46v1.302h-5.206V14.46h5.206zm1.494-2v1.302h-6.7V12.46h6.7zM14 7.33c.367 0 .667.298.667.664a.668.668 0 01-1.334 0c0-.366.3-.665.667-.665z",fill:"#FFF",opacity:.87})));function $e(){return $e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$e.apply(this,arguments)}const qe=e=>a().createElement("svg",$e({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",opacity:.87},a().createElement("circle",{fill:"#0D47A1",cx:14,cy:14,r:14}),a().createElement("path",{d:"M8.17 9.824v8.995c0 .886.72 1.606 1.607 1.606h8.352c.192 0 .375-.035.546-.097l1.38 1.382.804-.804-1.32-1.32-1.09-1.089-8.993-8.994-1.092-1.092-1.317-1.317-.803.803L8.17 9.824zm9.316 9.316h-8.03v-8.03l8.03 8.03zM9.777 7.575c-.192 0-.376.033-.55.094L10.42 8.86h.32v.322l1.607 1.606h4.819V8.86h1.284v8.03l1.285 1.286V9.182c0-.887-.72-1.607-1.606-1.607h-2.358a1.931 1.931 0 00-1.818-1.285 1.93 1.93 0 00-1.818 1.285H9.777zm3.533.643c0-.353.29-.643.643-.643.353 0 .642.29.642.643a.644.644 0 01-.642.642.644.644 0 01-.643-.642z",fill:"#FFF"})));class Ge{}Ge.build=e=>{let{task:t}=e;const{processType:n}=t;switch(n){case o.Yj_.dataChangeRequestReview:return a().createElement(Ae,{task:t});case o.Yj_.potentialMatchReview:return a().createElement(Be,{task:t});case o.Yj_.recommendForDelete:return a().createElement(U,{task:t,Icon:qe});default:return a().createElement(U,{task:t,Icon:He})}};const Ye=Ge,Xe=e=>{let{task:t}=e;return Ye.build({task:t})}},26789:(e,t,n)=>{"use strict";n.d(t,{G:()=>E});var r=n(24328),a=n.n(r),o=n(87918),i=n.n(o),s=n(94079),l=n(65549),c=n(22994),p=n(31517),u=n(49885),d=n(50757),m=n(52730),g=n(94150),f=n(75813),h=n(79692);const b=(0,h.Z)((e=>({popoverPaper:{width:"464px"},title:{fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px",color:e.palette.text.primary,marginBottom:"17px"},content:{display:"flex",flexDirection:"column",padding:"23px 24px 14px 24px"},simpleDropDownSelector:{marginBottom:"20px"},inputRoot:{paddingTop:"0 !important",paddingBottom:"0 !important"},select:{fontSize:"14px"},footer:{display:"flex",justifyContent:"flex-end",padding:"5px 8px 8px",borderTop:"1px solid rgba(0,0,0,0.12)"},cancelButton:{marginRight:"8px"},input:{fontSize:"14px"}}))),y=e=>{let{anchorEl:t,onClose:n}=e;const o=b(),[l,c]=(0,r.useState)(""),[h,y]=(0,r.useState)(null),[v,E]=(0,r.useState)(!1),{definitions:w}=(()=>{const[e,t]=(0,r.useState)([]),n=(0,m.useSelector)(u.ZP.selectors.getWorkflowPath),a=(0,m.useSelector)(u.ZP.selectors.getWorkflowEnvironmentUrl),o=(0,m.useSelector)(u.ZP.selectors.getTenant),i=(0,m.useSelector)(u.ZP.selectors.getEntity).type;return(0,r.useEffect)((()=>{(0,d.IU6)({workflowPath:n,environment:a,tenant:o}).then((e=>{let{data:n}=e;return t(((e,t)=>e.filter((e=>{let{manualStart:n,objectTypes:r}=e;return n&&(!r||(null==r?void 0:r.some((e=>e===t))))})))(n,i))}))}),[i,n,a,o]),{definitions:e}})(),{processInstance:x,loading:k}=(()=>{const{loadTasks:e}=(0,r.useContext)(g.O),t=(0,m.useSelector)(u.ZP.selectors.getWorkflowPath),n=(0,m.useSelector)(u.ZP.selectors.getWorkflowEnvironmentUrl),a=(0,m.useSelector)(u.ZP.selectors.getTenant),o=(0,m.useSelector)(u.ZP.selectors.getEntity).uri,[i,s]=(0,r.useState)(!1);return{processInstance:(0,r.useCallback)(((r,i)=>(s(!0),(0,d.$ju)({workflowPath:t,tenant:a,environment:n,processType:i,comment:r,objectURIs:[o]}).then((()=>{e()})).catch((e=>{throw(0,f.R)(e),e})).finally((()=>{s(!1)})))),[o,n,e,a,t]),loading:i}})(),O=Boolean(t);return a().createElement(a().Fragment,null,a().createElement(s.Popover,{open:O,anchorEl:t,onClose:n,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},classes:{paper:o.popoverPaper}},a().createElement("div",{className:o.content},a().createElement(s.Typography,{className:o.title},i().text("Add new workflow")),a().createElement(p.Z,{className:o.simpleDropDownSelector,variant:"filled",height:40,TextFieldProps:{InputProps:{disableUnderline:!0}},placeholder:i().text("Select task type"),value:h,onChange:e=>{y(e)},label:"",options:w.map((e=>({value:e.type,label:e.displayName})))}),a().createElement(s.TextField,{variant:"filled",hiddenLabel:!0,size:"small",placeholder:"Type a comment",InputProps:{disableUnderline:!0,classes:{input:o.input,root:o.inputRoot}},value:l,onChange:e=>{c(e.target.value)},multiline:!0})),a().createElement("div",{className:o.footer},a().createElement(s.Button,{disabled:k,className:o.cancelButton,onClick:n},i().text("Cancel")),a().createElement(s.Button,{disabled:k,color:"primary",onClick:()=>{x(l,null==h?void 0:h.value).then((()=>{E(!0),c(""),y(null),n()})).catch((()=>{}))}},i().text("Start")))),a().createElement(s.Portal,{container:document.body},a().createElement(s.Snackbar,{open:v,autoHideDuration:5e3,onClose:()=>{E(!1)},message:i().text("A new workflow has started")})))},v=(0,h.Z)({button:{padding:"9px 16px 9px 12px",marginLeft:"auto",marginRight:"8px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"}}),E=()=>{const e=v(),[t,n]=(0,r.useState)(null),o=(0,c.Z)(),p=o("START_PROCESS_INSTANCE"),u=o("VIEW_PROCESS_DEFINITIONS");return p&&u?a().createElement(a().Fragment,null,a().createElement(s.Button,{color:"primary",className:e.button,onClick:e=>n(e.currentTarget)},a().createElement(l.Z,{className:e.icon}),a().createElement("div",{className:e.buttonLabel},i().text("Add"))),a().createElement(y,{anchorEl:t,onClose:()=>n(null)})):null}},65321:(e,t,n)=>{"use strict";n.d(t,{o:()=>l});var r=n(24328),a=n.n(r),o=n(17440),i=n(94079),s=n(10186);const l=e=>{let{task:t}=e;const{taskId:n,possibleActions:r,assignee:l,isOpen:c,preferredAction:p}=t,{actions:u,actionRequestIsInProgress:d}=(0,s.t)({taskId:n,possibleActions:r,assignee:l,isOpen:c}),[m,g]=(0,o.partition)((0,o.propEq)("text",p.label),u);return a().createElement(a().Fragment,null,g.map((e=>a().createElement(i.Button,{variant:"outlined",onClick:e.onClick,key:e.text,disabled:d},e.text))),m.map((e=>a().createElement(i.Button,{variant:"contained",color:"primary",onClick:e.onClick,key:e.text,disabled:d},e.text))))}},61756:(e,t,n)=>{"use strict";n.d(t,{v:()=>p});var r=n(24328),a=n(52730),o=n(17440),i=n(49885),s=n(50757),l=n(85229),c=n(22994);const p=e=>{const{processTypes:t,assignee:n,showClosedTasks:p}=e||{},d=(0,l._)(),m=(0,a.useSelector)(i.ZP.selectors.getWorkflowPath),g=(0,a.useSelector)(i.ZP.selectors.getWorkflowEnvironmentUrl),f=(0,a.useSelector)(i.ZP.selectors.isWorkflowEnabled),h=(0,a.useSelector)(i.ZP.selectors.getTenant),b=(0,a.useSelector)(i.ZP.selectors.getEntityUri),y=(0,a.useSelector)(i.ZP.selectors.getIsEditableMode),v=(0,a.useSelector)(i.ZP.selectors.getProfileLastLoadedTime),E=(0,c.Z)()("VIEW_TASKS"),w=!(!m||!g)&&f&&E,[x,k]=(0,r.useState)(null),[O,P]=(0,r.useState)(0),[T,C]=(0,r.useState)(!1),S=(0,r.useCallback)((()=>{C(!0);const e=!Array.isArray(t)||t.includes("*")?null:t,r=(e||[null]).map((e=>(0,s.uT0)({entityUri:(0,s.FP6)(b)?(0,s.$Rg)(b):b,workflowPath:m,environment:g,tenant:h,filter:{assignee:n,processType:e},includeClosed:!!p})));d(Promise.all(r)).then((t=>{const r=(0,o.pipe)((0,o.map)((0,o.prop)("data")),(0,o.reject)(o.isNil),o.flatten,(0,o.uniqBy)((0,o.prop)("taskId")),(0,o.filter)(u(e,n)))(t);k(r),P(r.length)})).catch((e=>{console.warn("Workflow error",e)})).finally((()=>{C(!1)}))}),[b,g,d,h,m,n,p,t,v]);return(0,r.useEffect)((()=>{b&&w&&!(0,s.ZiX)(b)?S():(k(null),P(0))}),[w,b,S,y]),{tasks:x,total:O,loading:T,updateTaskState:(0,r.useCallback)(((e,t)=>{k((0,o.map)((0,o.when)((0,o.propEq)("taskId",e),(0,o.mergeLeft)(t))))}),[]),loadTasks:S}},u=(e,t)=>n=>(!e||e.includes(n.processType))&&(!t||t===n.assignee)},97090:(e,t,n)=>{"use strict";n.d(t,{vl:()=>r,r:()=>a,Q3:()=>o,Pi:()=>i});const r={CIRCLE:"circle",POLYGON:"polygon"},a={fillColor:"rgb(242,82,82)",fillOpacity:.1,strokeWeight:2,strokeColor:"#F25252",clickable:!1,editable:!0,zIndex:1},o={mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1},i=.001},91676:(e,t,n)=>{"use strict";n.d(t,{P:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="EntityMarkerContext"},47872:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="InterceptHandlersContext"},60115:(e,t,n)=>{"use strict";n.d(t,{Y:()=>a});var r=n(24328);const a=n.n(r)().createContext({getCurrentPerspectiveId:()=>"",setEntityUri:()=>{},showPerspective:()=>{}})},53607:(e,t,n)=>{"use strict";n.d(t,{U:()=>c});var r=n(50757),a=n(26929);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const s=async(e,t)=>{const{accessToken:n}=await(null==t?void 0:t());return n?o({},e.headers,{Authorization:`Bearer ${n}`}):e.headers},l=(e,t)=>{const{validationUrl:n}=e;return n?(!(null==t?void 0:t.some((e=>{var t;const r=null===(t=n.match(/^(https?:\/\/[^:/?#]*).*$/))||void 0===t?void 0:t[1],a=new RegExp("^"+e+"$"),o=e.replace(/\/*$/,"");return o===n||r&&r===o||(null==o?void 0:o.startsWith("/"))&&(null==n?void 0:n.startsWith(o))||e&&a.test(n)})))||0===((null==t?void 0:t.length)||0))&&{errorMessage:"Not enough permissions"}:{errorMessage:"URL is empty"}},c=e=>{let{name:t,paramObject:n,permissions:i,worker:c,metadata:p,config:u,apiPath:d,servicesPath:m,user:g,workflowPath:f,entity:h,tenant:b,entityUri:y,query:v,openSearch:E,environment:w,getCurrentPerspectiveId:x,showPerspective:k,workflowCheckPermission:O,setEntityUri:P}=e;const T=e=>{e.then((e=>e.json?e.json():e)).then((e=>{c.postMessage(o({action:"response",result:{data:JSON.parse(JSON.stringify(e)),headers:n.params.headers,status:200}},n.params))})).catch((e=>{c.postMessage(o({action:"response",result:{data:e,headers:n.params.headers,status:0}},n.params))}))},C=(0,a.D)(m)?()=>(0,r.hPi)({servicesPath:m}):()=>Promise.resolve({accessToken:""});switch(t){case r.MVv.API:{const e=(async(e,t,n)=>{const a=l(e,t);if(a)return Promise.reject(a);const o=await s(e,n);return await(0,r.SL_)({url:e.url,method:e.method,data:e.data,headers:o,noRequestProcessor:!0})})(n.params,i,C);T(e);break}case r.MVv.WORKFLOW:{const e=(async(e,t,n,a,o)=>{const{url:i}=e,c=l(e,t);if(c)return c;const p=i.includes("http:")||i.includes("https:");if(!n&&!p)return{errorMessage:"Workflow path is not defined"};const u=await s(e,o);return await(0,r.oUH)({url:i,method:e.method||"GET",data:e.data,tenant:a,headers:u,workflowPath:n})})(n.params,i,f,b,C);T(e);break}case r.MVv.WORKFLOW_START_PROCESS_FROM_QUERY:{const e=((e,t,n,a,i)=>{if(!e.processDefinitionId)return new Promise((e=>e({errorMessage:"processDefinitionId is empty"})));if(!e.searchString)return new Promise((e=>e({errorMessage:"searchString is empty"})));if(!n)return new Promise((e=>e({errorMessage:"Workflow path is not defined"})));const s=l(o({validationUrl:"/processInstances/_generateFromQuery"},e),t);return s?new Promise((e=>e(s))):(0,r.FuV)({workflowPath:n,processType:e.processDefinitionId,searchString:e.searchString,tenant:a,environment:i})})(n.params,i,f,b,w);T(e);break}case r.MVv.GET_CONFIGURATION:c.postMessage(o({action:"response",result:p},n.params));break;case r.MVv.GET_UI_CONFIGURATION:{const e=o({},u,{action:o({},u.action)});e.action.permissions&&delete e.action.permissions,c.postMessage(o({action:"response",result:e},n.params));break}case r.MVv.SET_ENTITY_URI:{const e=e=>c.postMessage(o({action:"response",result:e},n.params));P(n.params.entityUri,e);break}case r.MVv.SET_PERSPECTIVE:k(n.params.perspective),c.postMessage(o({action:"response",result:x()},n.params));break;case r.MVv.GET_PERSPECTIVE:x&&c.postMessage(o({action:"response",result:x()},n.params));break;case r.MVv.WORKFLOW_CHECK_PERMISSION:c.postMessage(o({action:"response",result:O(n.params.permission)},n.params));break;case r.MVv.GET_SEARCH_QUERY:c.postMessage(o({action:"response",result:v},n.params));break;case r.MVv.OPEN_SEARCH:E({viewId:u.id,searchState:n.params.searchState||{}});break;case r.MVv.GET_ENTITY_URI:c.postMessage(o({action:"response",result:y},n.params));break;case r.MVv.GET_ENTITY:c.postMessage(o({action:"response",result:h},n.params));break;case r.MVv.GET_API_PATH:c.postMessage(o({action:"response",result:d},n.params));break;case r.MVv.WORKFLOW_GET_WORKFLOW_PATH:c.postMessage(o({action:"response",result:f},n.params));break;case r.MVv.GET_TENANT:c.postMessage(o({action:"response",result:b},n.params));break;case r.MVv.GET_USER:c.postMessage(o({action:"response",result:g},n.params));break;case r.MVv.ALERT:c.postMessage(o({action:"response",result:window.alert(n.params.text)},n.params));break;case r.MVv.CONFIRM:c.postMessage(o({action:"response",result:window.confirm(n.params.text)},n.params));break;case r.MVv.PROMPT:c.postMessage(o({action:"response",result:window.prompt(n.params.text,n.params.defaultText||"")},n.params));break;case r.MVv.OPEN_WINDOW:window.open(n.params.url,"_blank");break;case r.MVv.RELOAD_PAGE:location.reload()}}},26929:(e,t,n)=>{"use strict";n.d(t,{D:()=>i,jm:()=>s,aZ:()=>c,Fx:()=>u,dH:()=>d,R3:()=>m,Yo:()=>g});var r=n(37164);function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){o(e,t,n[t])}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const i=e=>null==e?void 0:e.includes("/nui"),s=(e,t)=>i(e)?`${e.replace(`${t}/`,"")}worker_api.js`:`${e}worker_api.js`,l=(e,t,n)=>{let r=[];const o=e.getAttribute("ui-actions"),i=e.getAttribute("ui-tooltip"),s=e.getAttribute("id")||e.getAttribute("name");return o&&(o.split(",").forEach((n=>{const o=e=>{var r;const o=e.target,i=r=>{t.postMessage({action:"event",type:"uiAction",data:{type:n,id:s,event:a({},e,{files:r})}})};null!==(r=o.files)&&void 0!==r&&r.length?(e=>{const t=Array.from(e).map((e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=n=>{const r=n.target.result,{lastModified:a,name:o,size:i,type:s}=e;t({lastModified:a,name:o,size:i,type:s,content:r})},r.onerror=e=>{n(e)},r.readAsArrayBuffer(e)}))));return Promise.all(t)})(o.files).then(i):i()};e.addEventListener(n,o),r.push((()=>{e.removeEventListener(n,o)}))})),e.removeAttribute("ui-actions")),i&&n(i),e.childNodes.forEach((e=>{1===e.nodeType&&(r=r.concat(l(e,t,n)))})),r},c=e=>{let{worker:t,setTooltip:n,innerText:r,html:a,setListenersToReset:o,setHtml:i}=e;const s=document.createElement("div");s.innerHTML=a||r,o(l(s,t,n)),i(s)},p=(e,t)=>(e||[]).some((e=>{const n=new RegExp(`^${e}$`);return e.replace(/\/*$/,"")===t||e&&n.test(t)})),u=e=>{let{workerRef:t,setRequestListeners:n}=e;return{processApiRequest:(e,a,o,i,s)=>{const l=(0,r.x0)();n({url:e,method:a,headers:o,noRequestProcessor:!0},s,l),t.current.postMessage({action:"apiRequest",id:l,url:e,method:a,headers:o,data:i})}}},d=e=>{let{workerRef:t,setResponseListeners:n}=e;return{processApiResponse:(e,a,o,i)=>{const s=(0,r.x0)();n(i,s),t.current.postMessage({action:"apiResponse",id:s,url:e,method:a,data:o})}}},m=e=>{let{apiPath:t,reltioPath:n,tenant:o,processApiRequest:i,workerRef:s,setRequestListeners:l}=e;return e=>{let{options:c={},url:u,next:d,resolve:m}=e;const g=u.startsWith("/")&&!u.startsWith(t)?`${n}/api/${o}${u}`:`${n}${u.replace(t,"")}`;if(p(i,g)){const e=(0,r.x0)();l(c,d,e,m),s.current.postMessage({action:"apiRequest",id:e,url:g,method:c.method,headers:a({},c.headers,{origin:"ui",requestId:e}),data:c.body})}else d(u,c)}},g=e=>{let{reltioPath:t,apiPath:n,processApiResponse:a,workerRef:o,setResponseListeners:i}=e;return e=>{var s;let{url:l,response:c,next:u,options:d,abort:m}=e;if("ui"===(null==d||null===(s=d.headers)||void 0===s?void 0:s.origin))c.json().then((e=>{var t,n;i(u,d.headers.requestId),o.current.postMessage({action:"response",result:{data:e,status:c.status},id:null==d?void 0:d.id,name:null==d||null===(t=d.task)||void 0===t||null===(n=t.params)||void 0===n?void 0:n.name})})).catch((e=>{m(e)}));else{const e=`${t}${l.replace(n,"")}`;if(p(a,e)){const t=(0,r.x0)();c.json().then((n=>{i(u,t),o.current.postMessage({action:"apiResponse",id:t,url:e,method:d.method,data:n})})).catch((e=>{m(e)}))}else u(c)}}}},9757:(e,t,n)=>{"use strict";n.d(t,{E:()=>x});var r=n(24328),a=n(52730),o=n(49885),i=n(50757),s=n(17440),l=n(22994),c=n(24330),p=n.n(c);const u={attributes:{"*":["accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","class","clip","clipPathUnits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","height","horiz-adv-x","horiz-origin-x","id","ideographic","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lang","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","marker-mid","marker-start","markerHeight","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","max","media","method","min","mode","name","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","panose-1","paint-order","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","style","surfaceScale","systemLanguage","tableValues","target","targetX","targetY","text-anchor","text-decoration","text-rendering","textLength","to","transform","type","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","values","version","vert-adv-y","vert-origin-x","vert-origin-y","viewBox","viewTarget","visibility","width","widths","word-spacing","writing-mode","x","x-height","x1","x2","xChannelSelector","y","y1","y2","yChannelSelector","z","zoomAndPan","ui-actions","ui-tooltip"],img:["src","srcset","alt","title","loading"],link:["href","rel"],iframe:["src"],a:["href"]},tags:["animate","animateColor","animateMotion","animateTransform","mpath","set","circle","ellipse","line","polygon","polyline","rect","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","hkern","vkern","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","feDistantLight","fePointLight","feSpotLight","circle","ellipse","line","path","polygon","polyline","rect","defs","g","svg","symbol","use","altGlyph","altGlyphDef","altGlyphItem","glyph","glyphRef","textPath","text","tref","tspan","altGlyph","textPath","tref","tspan","clipPath","color-profile","cursor","filter","foreignObject","script","style","view","a","link","input","button","iframe","img"]};function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){m(e,t,n[t])}))}return e}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g=()=>{const{allowedAttributes:e,allowedTags:t}=p().defaults,{attributes:n,tags:r}=u,a={allowedTags:t.concat(r),allowedAttributes:d({},e,n),allowVulnerableTags:!0};return e=>p()(e,a)};var f=n(97094),h=n(60115),b=n(47872),y=n(53607),v=n(26929);function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){w(e,t,n[t])}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const x=function(){var e,t,n,c;let p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[u,d]=(0,r.useState)(),[m,w]=(0,r.useState)([]),[x,k]=(0,r.useState)([]),[O,P]=(0,r.useState)(!0),[T,C]=(0,r.useState)(),[S,I]=(0,r.useState)(null),[R,N]=(0,r.useState)({}),L=(0,r.useRef)(),j=(0,r.useRef)({}),M=(0,r.useRef)({}),D=(0,a.useDispatch)(),A=g(),V=(0,a.useSelector)(o.ZP.selectors.getUIPath),_=(0,a.useSelector)(o.ZP.selectors.getTenant),U=(0,v.jm)(V,_),Z=(0,r.useContext)(f.S),W=(0,r.useContext)(h.Y),F=(0,r.useContext)(b.p),B=(0,l.Z)(),z=(0,a.useSelector)(o.ZP.selectors.getMetadata)||{},H=(0,a.useSelector)(o.ZP.selectors.getEntity)||{},$=(0,a.useSelector)(o.ZP.selectors.getApiPath),q=(0,a.useSelector)(o.ZP.selectors.getServicesPath),G=(0,a.useSelector)(o.ZP.selectors.getReltioPath),Y=(0,a.useSelector)(o.ZP.selectors.getWorkflowPath),X=(0,a.useSelector)(o.ZP.selectors.getUser),Q=(0,a.useSelector)(o.ZP.selectors.getEntityUri),K=(0,a.useSelector)(o.ZP.selectors.getIsEditableMode),J=(0,a.useSelector)(o.ZP.selectors.getWorkflowEnvironmentUrl),{type:ee,data:te}=(0,a.useSelector)(o.ZP.selectors.getSearchProviderData)||{},ne="search"===ee?null==te?void 0:te.query:null,re=!(0,v.D)(q),ae=re?W.interceptors:F,oe=e=>D(o.ui.actions.openSearch(e));let ie="",se="";const le=e=>{let{task:t,worker:n}=e;if(t)switch(t.action){case i.W0P.SET_HTML:{const e=A(t.params.html);if(t.params.id){const n=document.getElementById(t.params.id);n&&(n.innerHTML=e)}else ie!==e&&(ie=e,(0,v.aZ)({worker:n,setTooltip:I,html:e,innerText:ie,setListenersToReset:w,setHtml:d}));break}case i.W0P.SHOW_POPUP:{const e=A(t.params);se=e,(0,v.aZ)({worker:n,setTooltip:I,html:e,innerText:se,setListenersToReset:k,setHtml:C});break}case i.W0P.HIDE_POPUP:se="",C(null);break;case i.W0P.SET_VISIBILITY:"visible"===t.params?(P(!0),(0,v.aZ)({worker:n,setTooltip:I,innerText:ie,setListenersToReset:w,setHtml:d})):P(!1);break;case i.W0P.SET_TOOLTIP:I(t.params);break;case i.W0P.SET_HEIGHT:N((e=>E({},e,{height:t.params})));break;case i.W0P.SET_WIDTH:N((e=>E({},e,{width:t.params})));break;case i.W0P.SET_ENABLED:N((e=>t.params?(0,s.omit)(["pointer-events"],e):E({},e,{"pointer-events":"none"})));break;case i.W0P.LOG:console.log(t.params);break;case i.W0P.MESSAGE:Z(t.params);break;case i.W0P.REQUEST:{const e=re?G:$,r=(0,s.startsWith)("/",(0,s.pathOr)("",["params","url"],t))&&!(0,s.startsWith)($,(0,s.pathOr)("",["params","url"],t)),a=(0,s.pathEq)(["params","name"],i.MVv.API,t),o=(0,s.pipe)((0,s.evolve)({url:(0,s.ifElse)((0,s.both)((0,s.always)(r),(0,s.always)(a)),(0,s.concat)(`${e}/api/${_}`),(0,s.replace)(G,$))}),(0,s.when)((0,s.has)("url"),(0,s.assocPath)(["validationUrl"],t.params.url)))(t.params),l=E({},t,{params:o});(0,y.U)(E({name:l.params.name,paramObject:l,permissions:p.action.permissions,worker:n,metadata:z,config:p,user:X,servicesPath:q,apiPath:G,tenant:_,workflowPath:Y,entity:H,entityUri:Q,environment:J,query:ne,openSearch:oe,workflowCheckPermission:B},W));break}case i.W0P.RETURN_PROCESSED_API_RESPONSE:{const{id:e,data:n}=t.params;M.current[e]&&(M.current[e].next(n),M.current=(0,s.omit)([e],M.current));break}case i.W0P.RETURN_PROCESSED_API_REQUEST:{const{id:e,data:n}=t.params;j.current[e]&&(j.current[e].resolve(n),j.current=(0,s.omit)([e],j.current));break}}},ce=(e,t,n,r)=>{j.current=E({},j.current,{[n]:{options:e,next:t,id:n,resolve:r}})},pe=(e,t)=>{M.current=E({},M.current,{[t]:{next:e}})},ue=(0,v.Fx)({workerRef:L,setRequestListeners:ce}),de=(0,v.dH)({workerRef:L,setResponseListeners:pe}),me=(0,v.R3)({apiPath:$,reltioPath:G,tenant:_,processApiRequest:null==p||null===(e=p.action)||void 0===e?void 0:e.processApiRequest,workerRef:L,setRequestListeners:ce}),ge=(0,v.Yo)({reltioPath:G,apiPath:$,processApiResponse:null==p||null===(t=p.action)||void 0===t?void 0:t.processApiResponse,workerRef:L,setResponseListeners:pe}),fe=(e,t)=>{var n;null===(n=L.current)||void 0===n||n.postMessage({action:"event",type:e,data:t})},he=(0,r.useRef)(!1),be=!re&&F&&!(0,i.O27)(p.action)&&p.action.platform!==i.X1H.CLASSIC&&((null==p||null===(n=p.action)||void 0===n?void 0:n.processApiRequest)||(null==p||null===(c=p.action)||void 0===c?void 0:c.processApiResponse));be&&(he.current||L.current||(F.startInterceptorInit(),he.current=!0)),(0,r.useEffect)((()=>{(0,i.O27)(p.action)||p.action.platform===i.X1H.CLASSIC||(L.current=(0,i.QWZ)(U,le,p),he.current&&(F.finishInterceptorInit(),he.current=!1),fe("updateEntity",H))}),[H,p]),(0,r.useEffect)((()=>{fe("editMode",K)}),[K]),(0,r.useEffect)((()=>{fe("changeSearchQuery",ne)}),[ne]),(0,r.useEffect)((()=>{fe("changeVisibility",O)}),[O]),(0,r.useEffect)((()=>()=>{m.forEach((e=>e()))}),[m]),(0,r.useEffect)((()=>()=>{x.forEach((e=>e()))}),[x,m]);const ye=(0,r.useCallback)((()=>{fe("execute",null)}),[p]);return(0,r.useEffect)((()=>{var e,t;if(!(0,i.O27)(ae)&&(null!=p&&null!==(e=p.action)&&void 0!==e&&e.processApiRequest||null!=p&&null!==(t=p.action)&&void 0!==t&&t.processApiResponse)){const{addInternalRequestInterceptor:e,addInternalResponseInterceptor:t,removeInternalRequestInterceptor:a,removeInternalResponseInterceptor:o}=ae;var n,r;return re?(e(null==p||null===(n=p.action)||void 0===n?void 0:n.processApiRequest,ue),t(null==p||null===(r=p.action)||void 0===r?void 0:r.processApiResponse,de),()=>{a(ue),o(de)}):(e(me),t(ge),L.current.onerror=()=>{a(me),o(ge)},()=>{a(me),o(ge)})}}),[p]),{html:u,visible:O,tooltip:S,customStyles:R,onClick:ye,popup:T}}},26313:(e,t,n)=>{"use strict";n.d(t,{Q:()=>u});var r=n(24328),a=n(17440),o=n(52730),i=n(49885),s=n(50757),l=n(85229);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){p(e,t,n[t])}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=e=>{const t=(0,l._)(),n=(0,o.useSelector)(i.ZP.selectors.getEntityUriWithDataTenant),[p,u]=(0,r.useState)({}),d=(0,r.useCallback)((e=>{const n=[{filter:s.j5E.EQUALS,fieldName:"uri",values:e}],r={max:e.length,activeness:s.YJ7.ALL,select:"uri,label,type"};return t((0,s.ZOr)(n,r))}),[t]),m=e=>(0,s.HvW)(e,{options:"uri,label,type"}).then((t=>c({},t,{uri:e}))).catch((()=>({}))),g=(0,r.useCallback)(((e,n)=>t(Promise.all((e||[]).map(m))).then((e=>(0,a.pipe)((0,a.reject)(a.isEmpty),(0,a.concat)(n))(e)))),[t]);return(0,r.useEffect)((()=>{const t=(0,a.pipe)((0,a.reduce)(((e,t)=>{const{objectType:r,relatedObjectUris:a}=t;return"relation"!==r&&"potentialMatch"!==r||(a||[]).forEach((t=>{t!==n&&(0,s.WgC)(t)&&!p[t]&&e.push(t)})),e}),[]),a.uniq)(e||[]);t.length&&d(t).then((e=>{const n=(0,a.pipe)((0,a.map)((0,a.prop)("uri")),(0,a.difference)(t))(e);return g(n,e)})).then((e=>{u((t=>e.reduce(((e,t)=>(e[t.uri]=t,e)),c({},t))))})).catch((()=>{}))}),[d,g,e,n]),p}},52016:(e,t,n)=>{"use strict";n.d(t,{l:()=>l});var r=n(52730),a=n(49885),o=n(50757),i=n(24328);const s=[],l=()=>{const e=(0,r.useSelector)(a.ZP.selectors.getUserRoles)||s;return{canCreate:(0,i.useCallback)((0,o.ifj)(o.WVQ.CREATE,e),[e]),canRead:(0,i.useCallback)((0,o.ifj)(o.WVQ.READ,e),[e]),canUpdate:(0,i.useCallback)((0,o.ifj)(o.WVQ.UPDATE,e),[e]),canDelete:(0,i.useCallback)((0,o.ifj)(o.WVQ.DELETE,e),[e])}}},37152:(e,t,n)=>{"use strict";n.d(t,{a:()=>m});var r=n(24328),a=n(52730),o=n(17440),i=n(49885),s=n(50757),l=n(85229),c=n(30634);function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=(0,o.when)(o.identity,(0,o.pipe)(s.VGB,o.length,(0,o.times)((e=>e+1)))),m=e=>{let{sorting:t,filter:n,page:u,rowsPerPage:m,config:g,entity:f,relationActivityFilter:h,mode:b,searchByOv:y=!1}=e;const[v,E]=(0,r.useState)(!1),w=(0,a.useDispatch)(),x=(0,a.useSelector)(i.ZP.selectors.getTenant),k=(0,a.useSelector)(i.ZP.selectors.getMetadata),O=(0,a.useSelector)(i.ZP.selectors.getDtssPath),{activityFilter:P,globalFilter:T}=(0,a.useSelector)(i.ZP.selectors.getGlobalSearchRequestOptions)||{},C=(0,a.useSelector)(i.ZP.selectors.getProfileLastLoadedTime),S=(0,l._)(),I=e=>{const t=(0,o.when)(s.Kn2,(0,o.prop)("uri")),n=(0,o.pipe)(t,(0,s.pQZ)(k));return(0,o.evolve)({entityTypes:(0,o.filter)((0,s.kuw)(k)),inRelations:(0,o.filter)(n),outRelations:(0,o.filter)(n),nextEntry:I})(e)},R=g.suggested,N=(0,r.useMemo)((()=>({searchByOv:y})),[y]),L=(0,r.useCallback)((()=>{if(null!=f&&f.uri){const e=p({},I(g.content),{sortBy:null==t?void 0:t.field,order:null==t?void 0:t.order,returnDates:!0,returnObjects:!0,activeness:{relation:h||s.Ng6.ALL,entity:P},max:m,offset:u*m,filter:(0,s.vyX)(T,n)||void 0,suggested:d(R)}),r=[e].concat((0,o.ifElse)(o.identity,(0,o.pipe)(s.VGB,(t=>t.map(((t,n)=>p({},t,{id:e.suggested[n]}))))),(0,o.always)([]))(R)),a=(0,o.cond)([[(0,o.pipe)((0,o.prop)("uri"),s.ZiX),()=>Promise.resolve([{total:0}])],[s.biM,e=>(0,s.n_1)({entityUri:e.uri,configs:r,customerTenant:x,dataTenant:e.dataTenant,dtssPath:O,options:N})],[o.T,e=>(0,s.N6e)(e.uri,r,N)]]);E(!0),S(a(f)).then((e=>{let[{connections:t,total:n}]=e;w(i.N5.relations.actions.relationsLoaded({id:g.id,connections:t,total:n}))})).finally((()=>{E(!1)}))}}),[P,k,g,w,O,null==f?void 0:f.uri,null==f?void 0:f.dataTenant,n,T,u,h,m,S,t,x,N,C]),j=(0,r.useRef)(!1);j.current=!1,(0,r.useEffect)((()=>{j.current=!0,L()}),[L]);const M=(0,c.D)(b);return(0,r.useEffect)((()=>{b!==s.ARY.Viewing||j.current||M===b||(j.current=!0,L())}),[L,b,M]),{isLoading:v,reload:L}}},76527:()=>{},96969:()=>{},32232:()=>{},24195:()=>{},73443:()=>{}}]);
|
|
1
|
+
(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3686],{1876:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(24328),a=n.n(r),o=n(13980),i=n.n(o),s=n(87918),l=n.n(s),c=n(94079),p=n(87685);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const d=e=>a().createElement("svg",u({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M18 2V0H0v2l7 8v8l4-2v-6z",fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:1})),m=(0,n(79692).Z)((e=>({"filterIcon--enabled":{color:e.palette.primary.main},closeIcon:{position:"absolute",right:"3px",bottom:"3px",transform:"scale(0.5)"},button:{padding:"11px"}}))),g=e=>{let{enabled:t,onClick:n}=e;const r=m();return a().createElement(c.Tooltip,{title:t?l().text("Clear all filters"):l().text("Filter")},a().createElement(c.IconButton,{onClick:n,classes:{root:r.button}},t?a().createElement(a().Fragment,null,a().createElement(d,{className:r["filterIcon--enabled"]}),a().createElement(p.default,{color:"primary",className:r.closeIcon})):a().createElement(d,null)))};g.propTypes={enabled:i().bool,onClick:i().func};const f=g},2256:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(24328),a=n.n(r);class o extends a().Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){this.setState({error:e}),console.error(e)}render(){const{children:e,error:t}=this.props;return this.state.error?t:e}}},32152:(e,t,n)=>{"use strict";n.d(t,{i:()=>g});var r=n(24328),a=n.n(r),o=n(87918),i=n.n(o),s=n(17440),l=n(87685),c=n(94079),p=n(21853),u=n(22385),d=n(31276);const m=(0,n(79692).Z)({searchButton:{marginLeft:"auto !important",marginRight:"-4px",padding:"8px"},input:{flex:"1 0 200px",marginLeft:"70px",fontSize:"14px",background:"rgba(0,0,0,0.03) 2px",padding:"4px 0",marginRight:"4px"},startAdornment:{color:"rgba(0,0,0,0.54)",paddingLeft:"8px"}}),g=e=>{let{query:t,onChange:n}=e;const[o,g]=(0,r.useState)(t),[f,h]=(0,r.useState)(!!t);(0,r.useEffect)((()=>{g(t)}),[t]);const b=m(),y=o&&o.length;return f?a().createElement(c.Input,{className:b.input,value:o,autoFocus:!0,placeholder:i().text("Search"),disableUnderline:!0,onChange:(0,s.pipe)(d.NA,g),startAdornment:a().createElement(c.InputAdornment,{position:"start"},a().createElement(p.default,{className:b.startAdornment})),endAdornment:a().createElement(c.InputAdornment,{position:"end"},y&&a().createElement(u.Z,{size:"S",icon:l.default,onClick:(0,s.pipe)(s.F,h,(0,s.always)(""),(0,s.tap)(n),g)})),onKeyPress:(0,s.when)((0,s.propEq)("key","Enter"),(0,s.pipe)((0,s.always)(o),s.trim,n))}):a().createElement(c.IconButton,{className:b.searchButton,onClick:(0,s.pipe)(s.T,h)},a().createElement(p.default,null))}},75512:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(13980),a=n.n(r),o=n(24328),i=n.n(o),s=n(44443);const l=()=>i().createElement("div",{style:{display:"none"}}),c=e=>{let{widthToHide:t,children:n}=e;return i().createElement(s.Z,{handleWidth:!0,render:e=>{let{width:r}=e;return r>t?i().createElement(i().Fragment,null,n):i().createElement(l,null)}})};c.propTypes={children:a().node,widthToHide:a().number.isRequired};const p=c},49734:(e,t,n)=>{"use strict";n.d(t,{M:()=>p});var r=n(24328),a=n.n(r);const o=(0,n(79692).Z)({root:{display:"flex",flexDirection:"column",paddingRight:"12px",paddingTop:"8px",paddingBottom:"8px","& + &":{borderTop:"1px solid rgba(0,0,0, 0.12)"}},profileCardWrapper:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},profileCardContainer:{flexGrow:1,paddingBottom:"8px",paddingTop:"8px"},rulesContainer:{paddingLeft:"52px",marginBottom:"8px"}});var i=n(33310),s=n(22071),l=n(71153),c=n.n(l);const p=e=>{let{children:t,entitiesMap:n,entity:r,match:l,metadata:p,className:u}=e;const d=o();return a().createElement("div",{className:c()(d.root,u)},a().createElement("div",{className:d.profileCardWrapper},a().createElement(i.Z,{entity:l.object,classes:{container:d.profileCardContainer}}),t),a().createElement("div",{className:d.rulesContainer},l.matchRules&&a().createElement(s.Z,{match:l,metadata:p,entitiesMap:n,entity:r})))}},11013:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(24328),a=n.n(r),o=n(87918),i=n.n(o),s=n(13980),l=n.n(s),c=n(71153),p=n.n(c),u=n(17440),d=n(94079),m=n(50757),g=n(49885),f=n(7154),h=n(26579),b=n(81077),y=n(91262),v=n(48852),E=n(94773),w=n(11564);const x=(0,n(79692).Z)({editor:{display:"flex",flexDirection:"column",padding:"0 24px 5px",overflowX:"hidden"},title:{color:"rgba(0, 0, 0, 0.6)",fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px",margin:"17px 0 24px"},item:{marginBottom:"20px"},dense:{marginBottom:0},actionButtons:{display:"flex",justifyContent:"flex-end",margin:"0 8px 10px","& > button":{fontSize:"14px",lineHeight:"16px",marginLeft:"8px",padding:"10px 8px",backgroundColor:"rgba(98, 2, 238, 0)"}}});function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){O(e,t,n[t])}))}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const P=e=>{let{connection:t,modifiedEntity:n,initialConnection:o,initialModifiedEntity:s,allModifiedEntities:l,dispatch:c,config:v,mode:E,metadata:O,globalSearchRequestOptions:P,error:T,highlightedError:C}=e;const{relationUri:S,relationType:I,direction:R}=t.relation,N=t.isNew,L=x(),{ref:j,errorClassName:M}=(0,w.B)({highlightedError:C,isSimple:!0}),{inRelations:D=[],outRelations:A=[]}=(0,r.useMemo)((()=>(0,m.ocC)({content:t.parentEntityUri?v.contentSecondLevel:v.content,direction:R,relationType:I,mode:E,metadata:O})),[v,R,I,E,O,t.parentEntityUri]),V=(0,r.useMemo)((()=>(0,m.xF8)(O,I)),[I,O]),_=(0,r.useMemo)((()=>k({attributes:k({},g.N5.relations.selectors.getRelationAttributesFromConnection(t))},(0,m.p2l)(t.relation))),[t]),U=(0,r.useMemo)((()=>(0,m.SAs)(l,n)),[l,n]),Z=(0,r.useRef)([]),W=(0,r.useCallback)(((e,t)=>{c(g.N5.relations.actions.setInitialInfo(v.id,S,e,t))}),[c]);(0,r.useEffect)((()=>{o||W(n,t)}),[]),(0,r.useEffect)((()=>{Z.current=(0,u.pipe)((0,u.concat)(U.map((0,u.prop)("uri"))),u.uniq)(Z.current)}),[U]);const F=(0,r.useRef)(U),B=(0,m.z7d)(D,A),z=(0,u.pick)(["entity","relation"],o||{}),H=(0,u.pick)(["entity","relation"],t),$=!(0,m.O27)((0,u.path)(["entity"],t))&&(!(0,u.equals)(z,H)||!(0,u.equals)(s,n)||(q=F.current,G=U,q.length!==G.length||q.some(((e,t)=>q[t]!==G[t]))));var q,G;const Y=N?g.N5.relations.actions.addRelation:g.N5.relations.actions.editRelation,X=(0,r.useCallback)((0,u.pipe)(g.N5.relations.actions.setRelationType(v.id,S),c),[v,S,c]),Q=(0,r.useCallback)((()=>(0,u.pipe)(g.N5.relations.actions.closeRelationEditor,c)(v.id,S)),[v,S,c]),K=(0,r.useCallback)((e=>{if(n){const t=(0,m.nt9)(O,n.type);return(0,m.wx9)(t,n,e)}return e}),[n,O]),J=(0,r.useCallback)((e=>c(g.N5.modifiedEntities.actions.entityCreated(e))),[c]),ee=(0,r.useCallback)((e=>c(g.N5.modifiedEntities.actions.entityDeleted(e))),[c]),te=(0,r.useCallback)((e=>{n&&ee(n.uri),c(g.N5.relations.actions.setRelationEntity(v.id,S,e)),T&&c(g.N5.errors.actions.errorDeactivated((0,m.iFp)(T)))}),[v.id,S,c,n,ee,T]),ne=(0,r.useCallback)((()=>{const e=(0,m.Bd_)(O,l,t);return c(g.N5.errors.actions.errorsSet(e)),0===e.length}),[t,O,l,c]),re=(0,r.useCallback)((()=>c(g.N5.errors.actions.errorsSet([]))),[c]),ae=(0,r.useCallback)((0,u.pipe)((0,u.always)(t),(0,u.when)(ne,(0,u.pipe)(m.zhn,K,(0,u.omit)(["initial"]),Y(v.id),c,(0,u.always)((0,u.differenceWith)(u.equals,Z.current,U.map((0,u.prop)("uri")))),(0,u.forEach)(ee),Q))),[t,v,c,K,ne,U]),oe=(0,r.useCallback)((()=>{n!==s&&(s?(J(s),n&&n.uri!==s.uri&&ee(n.uri)):ee(n.uri));const e=F.current;(0,u.differenceWith)(u.equals,Z.current,e.map((0,u.prop)("uri"))).forEach(ee),e.forEach(J),re(),Q()}),[Q,J,ee,re,n,s]),ie=(0,r.useCallback)((e=>(0,u.pipe)(g.N5.actions.addAttributes,c)(e.map((e=>k({},e,{viewId:v.id}))))),[v.id,c]),se=(0,r.useCallback)((e=>(0,u.pipe)(g.N5.actions.modifyAttribute,c)(k({},e,{viewId:v.id}))),[v.id,c]),le=(0,r.useCallback)((e=>(0,u.pipe)(g.N5.actions.removeAttribute,c)(k({},e,{viewId:v.id}))),[v.id,c]),ce=(0,r.useCallback)(((e,t)=>{const n=(0,m.nt9)(O,e),r=(0,u.pipe)(m.wcJ,(0,m._kX)(E))(n),a=(0,m.pBq)({entityTypeUri:e,initValue:t,attributeTypes:r,metadata:O,mode:E});te(a),J(a)}),[J,te,E,O]),pe=(0,m.e$p)(T),ue=(0,r.useCallback)((()=>{const{content:e,contentSecondLevel:n}=v;return n&&t.parentEntityUri?n.entityTypes:e.entityTypes}),[v,t.parentEntityUri]);return a().createElement(a().Fragment,null,a().createElement("div",{className:L.editor},a().createElement(d.Typography,{className:L.title},N?i().text("Add new item"):i().text("Edit item")),null===B&&a().createElement(f.Z,{className:L.item,relation:t.relation,inRelationTypes:D,outRelationTypes:A,onChange:X}),Boolean(I)&&a().createElement(a().Fragment,null,a().createElement("div",{ref:j,className:M},a().createElement(h.Z,{errorMessage:pe},a().createElement(b.Z,{className:p()(L.item,{[L.dense]:pe||t.entity&&(0,m.ZiX)(t.entity.entityUri)}),entity:t.entity||{},entityTypesUris:ue()||[],max:v.max||20,globalSearchRequestOptions:P,mode:E,onChange:te,onCreate:(0,m.fnZ)(E)?void 0:ce,metadata:O,attributeTypesSelectionStrategy:m.wcJ}))),a().createElement(y.Z,{className:L.item,attrTypes:V,entity:_,showEmptyEditors:!0,crosswalks:t.crosswalks,mode:E,parentUri:S,onAddAttributes:ie,onChangeAttribute:se,onDeleteAttribute:le}))),a().createElement("div",{className:L.actionButtons},a().createElement(d.Button,{onClick:oe},i().text("Cancel")),a().createElement(d.Button,{color:"primary",disabled:!$,onClick:ae},i().text("Apply"))),a().createElement(d.Divider,null))};P.propTypes={connection:m.Rjq,modifiedEntity:m.pyR,initialConnection:m.Rjq,initialModifiedEntity:m.pyR,allModifiedEntities:l().object,dispatch:l().func,config:m.PiC,mode:l().string,metadata:m.pGS,globalSearchRequestOptions:l().object,error:m.wfT,parentEntityUri:l().string,highlightedError:l().object};const T=(0,v.l)(E.NY,((e,t)=>{let{connection:n}=t;const{element:r={},type:a}=e||{},{relationUri:o,relationType:i}=n.relation;return{highlightedError:(0,E.Ie)(a)&&(0,m.Wah)(r,o,i)?e:null}}),P);const C=(0,n(52730).connect)(((e,t)=>{const n=(r=t,g.N5.relations.selectors.getEntityUriFromConnection(r.connection));var r;const a=(e=>g.N5.relations.selectors.getRelationUriFromConnection(e.connection))(t),o=(0,m.ZiX)(n);return{initialConnection:g.ZP.selectors.getInitialConnection(e,t.config.id,a),initialModifiedEntity:g.ZP.selectors.getInitialConnectionTempEntity(e,t.config.id,a),modifiedEntity:o?g.ZP.selectors.getModifiedEntity(e,n):null,allModifiedEntities:o?g.ZP.selectors.getModifiedEntities(e):null,globalSearchRequestOptions:g.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]),error:(0,m.ATu)(t.connection,g.ZP.selectors.getProfileErrors(e))}}))(T)},67268:(e,t,n)=>{"use strict";n.d(t,{Z:()=>T});var r=n(13980),a=n.n(r),o=n(24328),i=n.n(o),s=n(66244),l=n.n(s),c=n(44443),p=n(17440),u=n(71153),d=n.n(u);function m(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const g=e=>{let{x:t,y:n,width:r,height:a,id:o,minWidth:i,minHeight:s,maxWidth:l,maxHeight:c,isStatic:p}=e;return{x:t,y:n,w:r,h:a,minW:i,minH:s,maxW:l,maxH:c,i:o,static:p}},f=e=>{let{x:t,y:n,w:r,h:a,maxW:o,minW:i,minH:s,maxH:l,i:c}=e;return{x:t,y:n,width:r,height:a,minWidth:i,minHeight:s,maxWidth:o,maxHeight:l,id:c,isStatic:m(e,["x","y","w","h","maxW","minW","minH","maxH","i"]).static}},h=e=>(e||[]).map(f),b=(0,p.curry)(((e,t)=>(e||[]).find((0,p.propEq)("id",t)))),y=(0,p.curry)(((e,t,n)=>(0,p.mergeAll)([n,(0,p.pick)(e,t)]))),v=(0,p.curry)(((e,t,n)=>(n||[]).map((n=>(0,p.pipe)((0,p.prop)("id"),b(t),(0,p.defaultTo)({}),y(e,p.__,n))(n)))));var E=n(79692),w=n(50757);const x=(0,E.Z)((e=>({gridLayout:{position:"relative",width:"100%","& .react-grid-item":{"&.react-grid-placeholder":{background:"rgba(0, 0, 0, 0.03)",border:"2px dashed rgba(0, 0, 0, 0.3)",borderRadius:"3px",transitionDuration:"100ms",zIndex:7,userSelect:"none","& .react-resizable-handle":{display:"none"}},"&.static .react-resizable-handle":{display:"none"},"&.cssTransforms":{transitionProperty:"transform"},"&.react-draggable-dragging":{transition:"none",zIndex:8,willChange:"transform","& .react-resizable-handle":{backgroundImage:"none"}},"& .react-resizable-handle":{position:"absolute",width:"17px",height:"17px",bottom:0,right:0,zIndex:20,backgroundImage:`url('${(0,w.m5F)('<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path stroke="#505050" stroke-opacity=".54" d="M9.5 0v10M0 9.5h9M7.5 4v4M4 7.5h3"/>\n</svg>')}')`,backgroundRepeat:"no-repeat",backgroundOrigin:"content-box",boxSizing:"border-box",cursor:"se-resize"},"&.fullscreen":{visibility:"visible",position:"unset",width:"100% !important",height:"100% !important",transform:"translate(0) !important"}}},gridFullscreen:{height:"100% !important",overflowY:"hidden","& .react-resizable-handle, & .react-grid-item":{visibility:"hidden"}},isResizing:{zIndex:9,willChange:"width, height",pointerEvents:"none"}})));function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k.apply(this,arguments)}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const P=e=>{let{views:t,layout:n,layoutOptions:r,onLayoutChanged:a,draggableHandle:s,LayoutItem:u,onRemove:m,onDrop:y,droppingItem:E,isDroppable:w,classes:P}=e;const T=(0,o.useRef)(),C=x(),[S,I]=(0,o.useState)(null),[R,N]=(0,o.useState)(null),[L,j]=(0,o.useState)(0),{cols:M,rowHeight:D,margin:A}=r,V=(0,o.useMemo)((()=>(e=>(e||[]).map(g))(n)),[n]),_=(0,p.pipe)(h,v(["autosizing"],n),a),U=(0,o.useCallback)((e=>N((t=>t?null:e))),[]),Z=null!==R,W=(0,o.useCallback)(((e,t)=>{let o=!1;const i=n.map((n=>{if(n.id===t&&e){const t=((e,t)=>{const{margin:n,rowHeight:r}=t;return Math.ceil((e+n[1])/(r+n[1]))})(e,r);if(n.height!==t)return o=!0,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){O(e,t,n[t])}))}return e}({},n,{minHeight:t,maxHeight:t,height:t})}return n}));o&&a(i)}),[n,r,a]);return i().createElement(i().Fragment,null,i().createElement(c.Z,{refreshMode:"debounce",refreshRate:50,handleWidth:!0,onResize:e=>j(e)}),!!L&&i().createElement(l(),{innerRef:T,layout:V,cols:M,draggableHandle:s,autoSize:!0,rowHeight:D,width:L,margin:A,onLayoutChange:_,isResizable:!Z,isDraggable:!Z,className:d()(P.root,C.gridLayout,{[C.gridFullscreen]:Z}),onDrop:(e,t,n)=>{y&&y(h(e),f(t),n)},droppingItem:E,isDroppable:w,onResizeStart:(e,t)=>I(t.i),onResizeStop:()=>I(null),"data-reltio-id":"reltio-grid-layout"},V.map((e=>{const r=R===e.i,a=S===e.i,o=(b(n,e.i)||{}).autosizing?{AutosizeComponent:(s=e.i,i().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>{W(t,s)}}))}:{};var s;return i().createElement(u,k({key:e.i,layoutItemConfig:e,views:t,onToggleFullscreen:U,onRemove:m,className:d()({fullscreen:r,[C.isResizing]:a},P.item),isFullscreen:r},o))}))))};P.defaultProps={layoutOptions:{cols:4,rowHeight:30,margin:[15,15]},onConfigChanged:p.identity,onLayoutChanged:p.identity,classes:{}},P.propTypes={views:a().array,layout:a().array,layoutOptions:a().object,onConfigChanged:a().func,onLayoutChanged:a().func,onDrop:a().func,onRemove:a().func,LayoutItem:a().elementType,draggableHandle:a().string,isDroppable:a().bool,droppingItem:a().object,classes:a().shape({root:a().string,item:a().string})};const T=(0,o.memo)(P)},95299:(e,t,n)=>{"use strict";n.d(t,{Z:()=>F});var r=n(24328),a=n.n(r),o=n(17440),i=n(17871),s=n(75047);const l=e=>{let{children:t,className:n,position:a,map:o}=e;const[i,l]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const e=document.createElement("div"),t=o.controls[a].length;return o.controls[a].push(e),l(e),()=>{o.controls[a].removeAt(t)}}),[o,a]),(0,r.useEffect)((()=>{i&&n&&i.classList.add(n)}),[n,i]),i?(0,s.createPortal)(t,i):null};var c=n(87918),p=n.n(c),u=n(94079),d=n(83348),m=n(41039),g=n(97090);function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}const h=e=>a().createElement("svg",f({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M10.61 8.568A1.666 1.666 0 119.432 7.39l3.656-3.657a6.668 6.668 0 101.179 1.179L10.61 8.568zm-7.503 6.325A8.333 8.333 0 1114.893 3.107 8.333 8.333 0 013.107 14.893z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd",opacity:.54}));function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}const y=e=>a().createElement("svg",b({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:"M18.29 11.44a1.49 1.49 0 012.12 0l1.15 1.15c.59.58.59 1.53 0 2.12L16.27 20H13v-3.27zM18.174 4c0 1.71-.26 3.285-.932 4.563-.946 1.798-2.609 2.724-4.906 2.46l-.855-.116c-4.382-.544-6.626.53-6.626 3.609 0 1.968 1.105 2.924 3.267 3.304.692.121 1.306.165 2.234.176L11 18v2l-.698-.003c-1.016-.013-1.71-.063-2.526-.206-3.018-.53-4.921-2.176-4.921-5.274 0-4.819 3.71-6.378 9.52-5.505 1.575.237 2.506-.255 3.098-1.38.451-.858.666-2.02.697-3.307L16.174 4h2zM18 13.97l-3.45 3.45v1.03h1.03L19.03 15 18 13.97z",id:"Draw_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Draw_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Draw_svg__a"})),a().createElement("g",{mask:"url(#Draw_svg__b)",fill:"#000",fillOpacity:.54},a().createElement("path",{d:"M0 0h24v24H0z"}))));var v=n(79692);const E=(0,v.Z)({container:{margin:"2px",display:"flex",alignItems:"center"},button:{color:"rgba(0,0,0,0.54)",padding:0,height:"24px",width:"24px",minWidth:0},icon:{width:"20px",height:"20px"}}),w=(0,d.Z)(u.Button),x=e=>{let{drawingMode:t,drawingModes:n=[],hasActiveOverlay:r,onDrawingModeChanged:o,onClearOverlay:i}=e;const s=E(),l=e=>()=>{o(e)};return a().createElement("div",{className:s.container},t||r?a().createElement(w,{tooltipTitle:p().text("Clear area"),className:s.button,onClick:r?i:l(null)},a().createElement(m.Z,{className:s.icon})):n.map((e=>{const t=(e=>{switch(e){case g.vl.CIRCLE:return h;case g.vl.POLYGON:return y;default:return null}})(e);return a().createElement(w,{tooltipTitle:p().text("Draw area"),key:e,className:s.button,onClick:l(e)},a().createElement(t,{className:s.icon}))})))},k=(0,v.Z)({container:{height:"28px",marginRight:"7px",marginLeft:0},label:{fontSize:"11px",alignSelf:"center",lineHeight:"13px",marginLeft:"2px",letterSpacing:0},checkbox:{width:"20px",height:"20px",padding:"5px","& svg":{width:"16px",height:"16px"}}}),O=e=>{let{isSearchOnMapMove:t,onChangeIsSearchOnMapMove:n}=e;const r=k();return a().createElement(u.FormControlLabel,{classes:{root:r.container,label:r.label},control:a().createElement(u.Checkbox,{checked:t,onChange:e=>{n(e.target.checked)},color:"primary",className:r.checkbox}),label:p().text("Search as I move the map")})},P=e=>{const t=e.getBounds(),n=t.getNorthEast(),r=t.getSouthWest(),a=n.lat(),o=n.lng(),i=r.lat(),s=r.lng(),l=[],c=[];if(!(180===o&&-180===s||-180===o&&180===s)){const e=t.getCenter();l.push([a,e.lng()]),c.push([i,e.lng()])}return[[a,o],...l,[a,s],[i,s],...c,[i,o]]},T=e=>{switch(e){case g.vl.CIRCLE:return window.google.maps.drawing.OverlayType.CIRCLE;case g.vl.POLYGON:return window.google.maps.drawing.OverlayType.POLYGON;default:return null}},C=(e,t,n)=>{if(t.path){const r=n||new window.google.maps.LatLngBounds;t.path.forEach((e=>{let{lat:t,lng:n}=e;return r.extend(new window.google.maps.LatLng(t,n))})),e.fitBounds(r)}};var S=n(33310),I=n(66130),R=n(50757),N=n(91676);const L=(0,v.Z)({popper:{maxWidth:"263px",minWidth:"150px",boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",backgroundColor:"white",borderRadius:"2px"}});function j(){return j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}const M=(0,R.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large (hover)</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large-(hover)" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.32" cx="11" cy="28.5" rx="6" ry="4.66666667"></ellipse>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n <path d="M20,2 L20,20 L14.755,20 L14.6905172,20.0815309 C14.3562717,20.5012516 14.0578656,20.8886742 13.7817711,21.2616986 L13.5786724,21.5390469 C11.92787,23.8181606 11.079024,25.6311217 11.0052669,27.2674145 L11.0052669,27.2674145 L11,27.5 L10.9968324,27.3203844 C10.9285422,25.3781621 9.75347502,23.1598866 7.22124201,20.0010865 L2,20 L2,2 L20,2 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" mask="url(#mask-3)"></path>\n </g>\n</svg>'),D=(0,R.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M20,1 C20.5522847,1 21,1.44771525 21,2 L21,20 C21,20.5522847 20.5522847,21 20,21 L15.2374606,21.0021908 C14.9306693,21.3935449 14.6510143,21.7632851 14.3885453,22.1256523 C12.8309725,24.2760522 12,26.0137017 12,27.5 C12,28.0522847 11.5522847,28.5 11,28.5 C10.4477153,28.5 10,28.0522847 10,27.5 C10,25.7886708 8.84033182,23.6810997 6.73798027,21.0014567 L2,21 C1.44771525,21 1,20.5522847 1,20 L1,2 C1,1.44771525 1.44771525,1 2,1 L20,1 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.12" cx="11" cy="28.5" rx="4.5" ry="3.5"></ellipse>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="Path-3" fill="#FFFFFF"></path>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" fill-rule="nonzero" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n </g>\n</svg>'),A=(0,r.memo)((e=>{let{marker:t,onClick:n}=e,s=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["marker","onClick"]);const l=L(),c=(0,r.useRef)(),[p,u]=(0,r.useState)(!1),{activeEntityUri:d}=(0,r.useContext)(N.P),m=(0,o.pathEq)(["entity","uri"],d,t),g={lat:t.point.lat,lng:t.point.lng},f=(0,r.useCallback)((0,R.DsO)(u,50),[]),h=(0,r.useCallback)((()=>f(!0)),[f]),b=(0,r.useCallback)((()=>f(!1)),[f]),y=(0,r.useCallback)((()=>n(t)),[n,t]);return a().createElement(a().Fragment,null,a().createElement(I.Z,{anchorEl:c.current,open:p,className:l.popper,modal:!1,placement:"top"},a().createElement(S.Z,{entity:t.entity,onMouseOver:h,onMouseOut:b})),a().createElement(i.Jx,j({icon:{url:p||m?M:D,scaledSize:new google.maps.Size(22,32)},position:g,onClick:y,visible:!1!==t.visible,onMouseOver:h,onMouseOut:b},s)),a().createElement(i.vD,{options:{alignBottom:!0,pane:"mapPane",pixelOffset:new google.maps.Size(0,-40),closeBoxURL:"",enableEventPropagation:!0,disableAutoPan:!0},position:g},a().createElement("span",{ref:c})))}));var V=n(30634);const _=(0,v.Z)({mapControlContainer:{borderRadius:"2px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.15)",margin:"10px"}});function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Z(e,t,n[t])}))}return e}function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const W=["drawing"],F=e=>{let{markers:t=[],mapKey:n,defaultZoom:s,defaultCenter:c,loadingElement:p,isSearchOnMapMove:u,isSearchEnabled:d,activeOverlay:m,overlayOptions:f={},drawingModes:h=[],markerClusterer:b,markerClustererOptions:y,mapOptions:v={},mapContainerClassName:E,onMapBoundsChanged:w,onOverlayUpdated:k,onMarkerClicked:S}=e;const I=_(),{isLoaded:R,loadError:N}=(0,i.Ji)({googleMapsApiKey:n,libraries:W}),L=(0,r.useRef)(null),[j,M]=(0,r.useState)(null),[D,Z]=(0,r.useState)(null),[F,B]=(0,r.useState)(null);(e=>{let{markers:t,activeOverlay:n,isSearchOnMapMove:a,map:o}=e;const i=Boolean(o&&window.google),s=(0,V.D)(t),l=(0,V.D)(n),c=(0,V.D)(i);(0,r.useEffect)((()=>{const e=s!==t,r=c!==i,p=i&&n&&(l!==n||r);i&&!a&&t.length&&(e||r)?((e,t,n)=>{const r=new window.google.maps.LatLngBounds;if(e.forEach((e=>r.extend(e.point))),1===e.length){const e=r.getCenter();r.extend(new window.google.maps.LatLng(e.lat()+g.Pi,e.lng()+g.Pi)),r.extend(new window.google.maps.LatLng(e.lat()-g.Pi,e.lng()-g.Pi))}t.fitBounds(r),n&&C(t,n,r)})(t,o,n):p&&C(o,n)}),[i,t,n])})({markers:t,activeOverlay:m,map:j,isSearchOnMapMove:u});const z=(0,r.useMemo)((()=>U({},g.r,f)),[f]),H=(0,r.useMemo)((()=>U({},g.Q3,v)),[v]),$=(0,r.useCallback)((e=>{w(e?P(j):null),B(null),clearTimeout(L.current)}),[j,w]),q=(0,r.useCallback)((()=>{clearTimeout(L.current)}),[]),G=(0,r.useCallback)((()=>{u&&w(P(j))}),[u,j,w]),Y=(0,r.useCallback)((()=>{u&&(clearTimeout(L.current),L.current=setTimeout(G,1e3))}),[G,u]),X=(0,r.useCallback)(((e,t)=>{var n;const r=D&&{type:g.vl.POLYGON,overlay:D},a=t||r;if((0,o.isEmpty)(a)||!k)return;const{overlay:i,type:s}=a,l={[g.vl.POLYGON]:()=>i.getPath().getArray().map((e=>[e.lat(),e.lng()])),[g.vl.CIRCLE]:()=>({radius:i.getRadius()/1e3,center:i.getCenter()})},c=null===(n=l[s])||void 0===n?void 0:n.call(l);c&&k({data:c,type:s})}),[k,D]),Q=(0,r.useCallback)((e=>t=>{X(null,{type:e,overlay:t}),t.setMap(null),B(null)}),[X]),K=(0,r.useCallback)((()=>{k(null)}),[k]),J=e=>t.filter((0,o.prop)("point")).map((t=>a().createElement(A,{key:t.id,marker:t,clusterer:e,onClick:S})));if(N)return null;if(!R)return p;const ee=d&&Boolean(h.length),te=j&&d&&Boolean(h.length),ne=j&&d,re=!T(F)&&m&&(0,o.propEq)("type",g.vl.POLYGON,m);return a().createElement(i.b6,{mapTypeId:window.google.maps.MapTypeId.ROADMAP,options:H,onLoad:M,zoom:s,center:c,onZoomChanged:q,onDragStart:q,onIdle:Y,mapContainerClassName:E},te&&a().createElement(l,{className:I.mapControlContainer,position:window.google.maps.ControlPosition.TOP_RIGHT,map:j},a().createElement(x,{hasActiveOverlay:!!m,drawingModes:h,drawingMode:F,onDrawingModeChanged:B,onClearOverlay:K})),ne&&a().createElement(l,{className:I.mapControlContainer,position:window.google.maps.ControlPosition.TOP_CENTER,map:j},a().createElement(O,{onChangeIsSearchOnMapMove:$,isSearchOnMapMove:u})),b?(ae=y,a().createElement(i.XL,{options:ae},J)):J(),re&&a().createElement(i.mg,{onLoad:Z,path:m.path,editable:!0,options:z,onMouseUp:X,onDragEnd:X}),ee&&a().createElement(i.j_,{onPolygonComplete:Q(g.vl.POLYGON),onCircleComplete:Q(g.vl.CIRCLE),drawingMode:T(F),options:{drawingControl:!1,circleOptions:z,polygonOptions:z}}));var ae}},30553:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(13980),a=n.n(r),o=n(24328),i=n.n(o);const s=e=>{let{height:t,margin:n}=e;return i().createElement("div",{style:{width:"1px",height:`${t}px`,borderLeft:"1px solid rgba(0,0,0,0.38)",margin:`0 ${n}px`,flexShrink:"0"}})};s.propTypes={height:a().number,margin:a().number};const l=s},76536:(e,t,n)=>{"use strict";n.d(t,{u:()=>u});var r=n(24328),a=n(52730),o=n(17440),i=n(50757),s=n(49885);const l={appearance:{},attributes:{},roles:[],tags:[]},c=(0,o.evolve)({refEntity:i.VGB,refRelation:i.VGB}),p=e=>e?(0,o.evolve)({attributes:(0,o.map)((0,o.map)(c))})(e):e,u=()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(s.ZP.selectors.getHistorySlice),n=(0,a.useSelector)(s.ZP.selectors.getHistoryDiff),o=(0,a.useSelector)(s.ZP.selectors.getHistoryMode),c=(0,a.useSelector)(s.ZP.selectors.getEntity);return(0,r.useEffect)((()=>{if(t){const{aEntity:n,bEntity:r}=t,a=i.nwO.HistoryManager.createHistoryManager(i.nwO.AttributesDiff).computeEntityHistoryDiff(p(o===s.Z9.Current?c:r),p(n));e(s.N5.history.actions.setHistoryDiff(a))}}),[t,o,e,c]),n||l}},46626:(e,t,n)=>{"use strict";n.d(t,{s:()=>Xe});var r=n(24328),a=n.n(r),o=n(50757),i=n(71153),s=n.n(i),l=n(73272),c=n(87918),p=n.n(c),u=n(94079),d=n(79692);const m=(0,d.Z)((e=>({card:{borderBottom:"1px solid rgba(0,0,0,0.06)"},withBackground:{backgroundColor:"rgba(0, 0, 0, 0.03)"},lineWrapper:{position:"relative"},icon:{position:"absolute",top:"8px",left:"16px",width:"32px",height:"32px",zIndex:1},line:e=>{let{color:t}=e;return{borderLeft:`3px solid ${t}`,position:"absolute",left:0,top:0,bottom:0}},info:{fontSize:"13px",color:e.palette.text.secondary,wordWrap:"break-word",lineHeight:"15px"},commentsInfo:{display:"flex",alignItems:"center",marginBottom:"-4px",marginTop:"7px"},commentsIcon:{width:"11px",height:"11px",marginLeft:"2px",marginRight:"6px",marginTop:"-2px"},infoValue:{color:e.palette.text.primary},infoBlock:{display:"flex",flexDirection:"row",marginBottom:"5px"},header:{display:"flex",flexDirection:"row",paddingBottom:"12px"},flex:{flex:1},caption:{fontSize:"16px",color:e.palette.text.primary},title:{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:"-4px"},flag:{height:"13px",width:"13px",marginTop:"-2px",stroke:"#000000",fill:"none",margin:"2px 5px 0 5px"},date:{fontSize:"13px",color:e.palette.text.primary},mainInfo:{display:"flex",flexDirection:"column",flex:1},controlsBox:{marginRight:"16px",marginBottom:"12px",marginTop:"13px"},controlsInRow:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"},priority:{width:"162px"},comments:{marginLeft:"11px"}})));var g=n(58241),f=n(30078),h=n(17440);const b=(0,d.Z)({dueDate:{marginTop:0,marginBottom:0},dueDateInput:{height:"40px"},inputLabel:{fontSize:"14px"}});var y=n(8459),v=n(52730),E=n(49885),w=n(85229),x=n(94150),k=n(75813),O=n(22994),P=n(21380);const T=e=>{let{taskId:t,dueDate:n,isTaskOpen:i,className:l}=e;const c=b(),{updateDueDate:u,updateRequestIsInProgress:d,readOnly:m}=(e=>{let{dueDate:t,taskId:n,isOpen:a}=e;const{updateTaskState:i}=(0,r.useContext)(x.O)||{},s=(0,v.useSelector)(E.ZP.selectors.getWorkflowPath),l=(0,v.useSelector)(E.ZP.selectors.getWorkflowEnvironmentUrl),c=(0,v.useSelector)(E.ZP.selectors.getTenant),p=(0,w._)(),[u,d]=(0,r.useState)(!1),m=(0,O.Z)()("UPDATE_TASK")&&(0,P.tg)(a);return{updateDueDate:(0,r.useCallback)((e=>{s&&m&&n&&e&&t!==e&&(d(!0),p((0,o.KF3)({taskId:n,workflowPath:s,environment:l,tenant:c,dueDate:e})).then((()=>{null==i||i(n,{dueDate:e})})).catch(k.R).finally((()=>{d(!1)})))}),[s,n,l,c,i,p,t,m]),updateRequestIsInProgress:u,readOnly:!m}})({dueDate:n,taskId:t,isOpen:i});return a().createElement(y.Z,{className:s()(c.dueDate,l),disabled:d||m,value:n,label:p().text("Due date"),onChange:(0,h.pipe)((e=>e&&e.getTime()),u),margin:"dense",InputProps:{className:c.dueDateInput},InputLabelProps:{classes:{root:c.inputLabel}}})};var C=n(24737);const S=e=>{let{taskId:t,priority:n,isTaskOpen:i,className:s}=e;const{priorities:l,updatePriority:c,updateRequestIsInProgress:u,readOnly:d}=(e=>{let{priority:t,taskId:n,isOpen:a}=e;const{updateTaskState:i}=(0,r.useContext)(x.O)||{},s=(0,v.useSelector)(E.ZP.selectors.getWorkflowPath),l=(0,v.useSelector)(E.ZP.selectors.getWorkflowEnvironmentUrl),c=(0,v.useSelector)(E.ZP.selectors.getTenant),u=(0,w._)(),[d,m]=(0,r.useState)(!1),g=(0,O.Z)()("UPDATE_TASK")&&(0,P.tg)(a),f=(0,r.useCallback)((e=>{const{value:r}=e;s&&g&&n&&t!==r&&(m(!0),u((0,o.ax9)({taskId:n,workflowPath:s,environment:l,tenant:c,priority:r})).then((()=>{null==i||i(n,{priority:r})})).catch(k.R).finally((()=>{m(!1)})))}),[s,n,l,c,i,u,t,g]);return{priorities:(0,r.useMemo)((()=>[{label:p().text("Low"),value:o.NVC.low},{label:p().text("Medium"),value:o.NVC.medium},{label:p().text("High"),value:o.NVC.high},{label:p().text("Urgent"),value:o.NVC.urgent}]),[]),updatePriority:f,updateRequestIsInProgress:d,readOnly:!g}})({taskId:t,priority:n,isOpen:i}),m=u||d;return a().createElement(C.Z,{className:s,isDisabled:m,options:l,onChange:c,hideSelectedOptions:!1,label:p().text("Priority"),value:l.find((0,h.propEq)("value",n)),TextFieldProps:{disabled:m},height:40})};var I=n(27194),R=n(46628);const N=(0,d.Z)({decorator:{display:"flex",alignItems:"stretch"},lineBlock:{width:"56px",flexShrink:0},withLinePadding:{"& $noLine":{height:"10px"},"& $line":{height:"calc(100% - 10px)"}},noLine:{height:"0"},line:{height:"100%",position:"relative",marginLeft:"31px",borderLeft:"2px solid rgba(0,0,0,0.06)","&:before":{position:"absolute",height:6,width:6,borderRadius:"50%",left:-5,top:"15px",background:"#d8d8d8",content:'""',display:"block",border:"1px solid white"},"&$plain":{"&:before":{width:0,border:"none"}},"&$last":{height:"15px"}},content:{flex:1,minWidth:0},plain:{},last:{},rowDivider:{marginLeft:0}}),L=e=>{let{className:t,children:n,plain:r,first:o,last:i,transparent:l,divider:c}=e;const p=N();return a().createElement("div",{className:s()(t,p.decorator)},a().createElement("div",{className:s()(p.lineBlock,{[p.withLinePadding]:o})},!l&&a().createElement(a().Fragment,null,a().createElement("div",{className:p.noLine}),a().createElement("div",{className:s()(p.line,{[p.plain]:r},{[p.last]:i})}))),a().createElement("div",{className:p.content},n,c&&a().createElement(u.Divider,{className:p.rowDivider,light:!0,variant:"inset"})))};let j={};const M=["#DC057B","#5DC003","#FEC92F","#F57F27","#B71137","#056B97","#4499AE","#BD81BE","#5F3577","#A68560","#555962"];let D=0;function A(){return A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A.apply(this,arguments)}const V=e=>a().createElement("svg",A({width:20,height:20,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M4 17.17L5.17 16H20V4H4v13.17zM20 2c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H6l-4 4V4c0-1.1.9-2 2-2h16zm-3 9H7v2h10v-2zm0-4H7v2h10V7z",id:"CollaborationIcon_svg__a"})),a().createElement("g",{transform:"translate(-2 -2)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"CollaborationIcon_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#CollaborationIcon_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#CollaborationIcon_svg__b)",d:"M0 0h24v24H0z"})));var _=n(10186);const U=e=>{let{task:t,children:n,actions:o,Icon:i}=e;const{taskId:c,dueDate:d,priority:h,assignee:b,createdBy:y,createTime:v,displayName:E,processDefinitionDisplayName:w,objectURIs:x,processInstanceComments:k,possibleActions:C,isOpen:N,preferredAction:A}=t,U=(0,P.Xs)(x),Z=(e=>{let{processDefinitionDisplayName:t}=e;const n=t;return j[n]||(j[n]=M[D],D++,D>M.length-1&&(D=0)),j[n]})({processDefinitionDisplayName:w}),W=m({color:Z}),[F,B]=(0,r.useState)(!1),z=(0,O.Z)()("VIEW_PROCESS_INSTANCE_COMMENTS"),{actions:H,actionRequestIsInProgress:$}=(0,_.t)({taskId:c,possibleActions:C,assignee:b,isOpen:N});return a().createElement("div",{className:W.card},a().createElement("div",{className:s()({[W.withBackground]:F})},a().createElement("div",{className:W.lineWrapper},a().createElement("div",{className:W.line}),i&&a().createElement(i,{className:W.icon}),a().createElement(L,{plain:!0,first:!0,transparent:!F},a().createElement("div",{className:W.mainInfo},a().createElement("div",{className:W.title},a().createElement("div",{className:s()(W.caption,W.flex)},p().text(w)),a().createElement(l.Z,{className:W.flag}),a().createElement(u.Tooltip,{title:p().text("Due date")},a().createElement("span",{className:W.date},p().date(d,"L"))),a().createElement(g.Z,{isOpen:F,size:"L",onClick:()=>{B(!F)}})),a().createElement("div",{className:W.infoBlock,"data-reltio-id":"info-block"},a().createElement("div",{className:W.flex},U&&a().createElement("div",{className:W.info},p().text("DCR ID"),": ",a().createElement("span",{className:W.infoValue},U)),a().createElement("div",{className:W.info},p().text("Created by"),": ",a().createElement("span",{className:W.infoValue},y)," ",p().text("on")," ",a().createElement("span",{className:W.infoValue},p().date(v,"L"))),a().createElement("div",{className:W.info},p().text("Step"),": ",a().createElement("span",{className:W.infoValue},E)),z&&(null==k?void 0:k.length)>0&&a().createElement("div",{className:W.commentsInfo},a().createElement(V,{className:W.commentsIcon}),a().createElement("div",{className:W.infoValue},k.length))),o||a().createElement(R.Z,{actions:H,isInProgress:$}))))),F&&a().createElement(L,{plain:!0},a().createElement("div",{className:W.controlsBox},a().createElement("div",{className:W.controlsInRow},a().createElement(T,{taskId:c,dueDate:d,isTaskOpen:N}),a().createElement(S,{taskId:c,priority:h,className:W.priority,isTaskOpen:N})),a().createElement(f.Z,{taskId:c,assignee:b,isTaskOpen:N})))),F&&a().createElement(a().Fragment,null,n,z&&a().createElement("div",{className:W.comments},a().createElement(I.V,{workflowActions:H,actionRequestIsInProgress:$,preferredAction:A,taskId:c,processInstanceComments:k,isTaskOpen:N}))))};function Z(){return Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Z.apply(this,arguments)}const W=e=>a().createElement("svg",Z({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#42A5F5",cx:14,cy:14,r:14}),a().createElement("path",{d:"M16.43 9.87c0 1.59 1.25 2.87 2.79 2.87 1.53 0 2.78-1.28 2.78-2.87C22 8.29 20.75 7 19.22 7c-1.54 0-2.79 1.29-2.79 2.87zm1.4 0c0-.79.62-1.43 1.39-1.43.77 0 1.39.64 1.39 1.43 0 .79-.62 1.44-1.39 1.44-.77 0-1.39-.65-1.39-1.44zm-6.26 8.26c0-1.59-1.25-2.87-2.79-2.87-1.53 0-2.78 1.28-2.78 2.87C6 19.71 7.25 21 8.78 21c1.54 0 2.79-1.29 2.79-2.87zM8.09 9.15v4.31h1.39v-2.87h2.78v2.15l2.78-2.87L12.26 7v2.15H8.09zm11.82 9.7v-4.31h-1.39v2.87h-2.78v-2.15l-2.78 2.87L15.74 21v-2.15h4.17z",fill:"#FFF",opacity:.87})));var F=n(8261);const B=(e,t)=>{switch(e){case o.VI$.CREATE_RELATIONSHIP:case o.VI$.INSERT_ATTRIBUTE:return o.ws7.ADDED;case o.VI$.UPDATE_TAGS:case o.VI$.UPDATE_ROLES:case o.VI$.UPDATE_ATTRIBUTE:return o.ws7.EDITED;case o.VI$.DELETE_ATTRIBUTE:case o.VI$.DELETE_RELATIONSHIP:return o.ws7.DELETED;case o.VI$.PIN_ATTRIBUTE:return null!=t&&t.pin?o.ws7.PIN_DELETED:o.ws7.PINNED;case o.VI$.IGNORE_ATTRIBUTE:return null!=t&&t.ignored?o.ws7.IGNORE_DELETED:o.ws7.IGNORED}},z=e=>({[o.ws7.ADDED]:p().text("added"),[o.ws7.EDITED]:p().text("edited"),[o.ws7.DELETED]:p().text("deleted"),[o.ws7.PINNED]:p().text("pinned"),[o.ws7.PIN_DELETED]:p().text("pin deleted"),[o.ws7.IGNORED]:p().text("ignored"),[o.ws7.IGNORE_DELETED]:p().text("ignore deleted")}[e]||""),H=(e,t)=>(0,h.when)((0,h.allPass)([(0,h.pipe)((0,h.prop)("type"),(0,h.equals)(o.oS0.TYPE_STRING)),()=>(0,o.CBv)(t)]),(0,h.evolve)({type:(0,h.always)(o.oS0.TYPE_URL)}))((0,o.PFL)(e));function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){q(e,t,n[t])}))}return e}function q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const G=(e,t)=>{if("newValue"in e||"oldValue"in e){const{newValue:n,oldValue:r,type:a}=e,o=(0,h.pathOr)([],["value",t.name])(n),i=(0,h.pathOr)([],["value",t.name])(r),s=Math.max(o.length,i.length);return(0,h.times)((e=>[{value:{newValue:o[e],oldValue:i[e],type:a}}]),s)}const n=e[t.name];return n?[n]:[]},Y=(0,h.curry)(((e,t,n)=>{const r=(0,F.U)(e,t.type,[],[]);return Q(e,r,n)})),X=(0,h.curry)(((e,t,n,r)=>{const a=(0,o.V3K)(e,t.type),i=(0,o.xF8)(e,t.type);return(0,h.flatten)([$({level:1,label:(0,h.propOr)("","label",a),attributeType:a,attributeValue:$({},t,n)},((e,t)=>{if(t===o.VI$.CREATE_RELATIONSHIP||(0,o.O27)(e)){const e=B(t);return e?{operation:e}:{}}return{}})(n,r)),Q(e,i,n,2)])})),Q=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return(0,h.flatten)(t.map((t=>G(n,t).map((n=>n.map((n=>K(e,t,n,r))))))).filter((0,h.complement)(h.isEmpty)))},K=(e,t,n,r)=>{switch(t.type){case o.oS0.TYPE_NESTED:case o.oS0.TYPE_IMAGE:return J(e,t,n,r);case o.oS0.TYPE_REFERENCE:return ee(e,t,n,r);default:{const e=((e,t)=>{const n=(0,o.kqr)(e)?t:t.value;return(0,h.is)(Object,n)?n:{newValue:t,type:o.VI$.INSERT_ATTRIBUTE}})(t,n);return te(t,e,r)}}},J=(e,t,n,r)=>{const a=(0,o.EUG)({},t);return[{level:r,label:(0,o.idV)((null==t?void 0:t.label)||(null==t?void 0:t.name)),attributeType:t,attributeValue:n},Q(e,a,n.value,r+1)]},ee=(e,t,n,r)=>{const a=(0,o.EUG)(e,t);return[{level:r,label:(null==t?void 0:t.label)||(null==t?void 0:t.name),attributeType:t,attributeValue:n},Q(e,a,n.value,r+1)]},te=(e,t,n)=>{const{newValue:r,oldValue:a,type:i}=(e=>{let{newValue:t,oldValue:n,type:r}=e;return r===o.VI$.UPDATE_ATTRIBUTE?{type:r,newValue:t,oldValue:n}:{type:r,newValue:n||t}})(t);return{attributeType:e,newValue:r,oldValue:a,operation:B(i,a),label:(null==e?void 0:e.label)||(null==e?void 0:e.name),level:n}};function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){re(e,t,n[t])}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ae=["defaultProfilePicValue",o.xPW.tags.name,o.xPW.roles.name,o.xPW.startDate.name,o.xPW.endDate.name],oe=e=>{let{newValue:t,oldValue:n}=e;const r=e=>isNaN(e)||(0,o.O27)(e)?e:parseInt(e),a=e=>(null==e?void 0:e.length)&&!(0,o.O27)(e)&&!(0,o.O27)(e[0]),i=a(t),s=a(n);return i&&s?[{type:o.VI$.UPDATE_ATTRIBUTE,oldValue:{value:r(n[0])},newValue:{value:r(t[0])}}]:i?[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:r(t[0])}}]:s?[{type:o.VI$.DELETE_ATTRIBUTE,oldValue:{value:r(n[0])}}]:void 0},ie=(e,t)=>{const{newValue:n=[],oldValue:r=[],type:a}=t,i=a===o.VI$.UPDATE_ROLES?(0,o.xqc)(e):h.identity,s=(0,h.difference)(n,r),l=(0,h.difference)(r,n),c=[];return s.length&&c.push({type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:s.map(i).join(", ")}}),l.length&&c.push({type:o.VI$.DELETE_ATTRIBUTE,oldValue:{value:l.map(i).join(", ")}}),c},se=(e,t)=>{const n=(e=>{const{type:t,attributePath:n,refObjectURI:r,refAttributeType:a}=e,i=t===o.VI$.INSERT_ATTRIBUTE?(0,o.Zmi)(n):n;if(r){const e=a.split("/attributes/"),t=r.split("/")[1];return[e[1],t,i].join("/")}return i})(t),r=n.split("/");let a=e;for(let e=0;e<r.length-1;e+=2){var i;const n=r[e],o=r[e+1],s=(a[n]||[]).find((0,h.propEq)("id",o)),l=r.length===e+2?t:{},c=s||{id:o,value:l},p=(null===(i=t.refObjectURI)||void 0===i?void 0:i.indexOf(o))>=0&&t.refObjectURI;p&&(c.refObjectURI=p),(0,h.isNil)(s)&&(a[n]=(a[n]||[]).concat(c)),a=c.value}return e},le=(e,t)=>{const{attributes:n={},startDate:r,endDate:a}=t,{roles:i,tags:s,defaultProfilePicValue:l}=t,c=ne({},n);return l&&(c.defaultProfilePicValue=[l]),i&&(c[o.xPW.roles.name]=[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:i.map((0,o.xqc)(e)).join(", ")}}]),s&&(c[o.xPW.tags.name]=[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:s.join(", ")}}]),r&&(c[o.xPW.startDate.name]=[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:r}}]),a&&(c[o.xPW.endDate.name]=[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:a}}]),c},ce=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{type:a}=n;switch(a){case o.VI$.UPDATE_PROFILE_PIC_BY_URL:r.defaultProfilePicValue=[n.newValue];break;case o.VI$.UPDATE_TAGS:r[o.xPW.tags.name]=ie(e,n);break;case o.VI$.UPDATE_ROLES:r[o.xPW.roles.name]=ie(e,n);break;case o.VI$.UPDATE_START_DATE:r[o.xPW.startDate.name]=oe(n);break;case o.VI$.UPDATE_END_DATE:r[o.xPW.endDate.name]=oe(n);break;case o.VI$.CREATE_RELATIONSHIP:case o.VI$.CREATE_ENTITY:return ne({},r,le(e,n.newValue));case o.VI$.INSERT_ATTRIBUTE:case o.VI$.UPDATE_ATTRIBUTE:case o.VI$.DELETE_ATTRIBUTE:case o.VI$.PIN_ATTRIBUTE:case o.VI$.IGNORE_ATTRIBUTE:se(r,n)}return r},pe=(0,d.Z)((e=>({linkLabel:{color:e.palette.primary.main,fontSize:"12px",letterSpacing:0,lineHeight:"16px"}}))),ue=e=>{let{suggestionsCount:t,isExpanded:n,onClick:r,className:o}=e;const i=pe();return a().createElement(u.Link,{component:"button",variant:"caption",underline:"none",onClick:r,className:o},a().createElement("span",{className:i.linkLabel},n?p().text("View less suggestions"):p().text("View ${suggestionsCount} more suggestions",{suggestionsCount:t})))};var de=n(43525);const me=(0,d.Z)((e=>({field:{fontSize:"12px",lineHeight:"20px",color:e.palette.text.primary,marginTop:"6px",overflow:"hidden",wordBreak:"break-word"},fieldName:{color:e.palette.text.secondary,marginRight:"8px"},difference:{marginRight:"8px"},arrow:{margin:"0 4px",fontSize:"12px",color:e.palette.text.primary},chip:{height:"20px",fontSize:"10px",fontWeight:500,lineHeight:"16px",letterSpacing:0,flexShrink:0,textTransform:"capitalize",color:e.palette.primary.main,borderColor:e.palette.primary.main,"&.edited":{color:"#CC7500",borderColor:"#CC7500"},"&.added":{color:"#599E0E",borderColor:"#599E0E"},"&.deleted":{color:"#CF0E26",borderColor:"#CF0E26"}}}))),ge=e=>{let{label:t,oldValue:n,newValue:r,operation:o,className:i}=e;const l=me(),c=n||r;return a().createElement("div",{className:s()(l.field,i)},a().createElement("span",{className:l.fieldName},t,":"),!(0,h.isNil)(c)&&a().createElement("span",{className:l.difference},c,r&&n&&a().createElement(a().Fragment,null,a().createElement(de.Z,{className:l.arrow}),r)),o&&a().createElement(u.Chip,{variant:"outlined",label:z(o),className:s()(l.chip,o)}))},fe=a().createContext(null);fe.displayName="AttributesChangesContext";var he=n(72768),be=n(31039);const ye=(0,d.Z)((e=>({linkContainer:{textDecoration:"none",cursor:"pointer",marginLeft:"4px"},linkLabel:{color:e.palette.primary.main,fontSize:"12px",letterSpacing:0,lineHeight:"16px"},disabledLink:{pointerEvents:"none",cursor:"default"},label:{color:e.palette.text.primary},change:e=>{let{level:t=0}=e;return{marginLeft:16*t+"px"}}}))),ve=e=>{let{label:t,level:n,attributeType:i,attributeValue:l,oldValue:c,newValue:p,operation:u}=e;const d=ye({level:n}),m=(0,v.useSelector)(E.ZP.selectors.getEntityUri),g=(0,r.useContext)(fe),f=(0,r.useCallback)((()=>{if((0,o.YkG)(i)){const e=(0,h.when)((0,h.anyPass)([(0,h.hasPath)(["value","newValue"]),(0,h.hasPath)(["value","oldValue"])]),(0,h.ifElse)((0,h.hasPath)(["value","newValue"]),(0,h.path)(["value","newValue"]),(0,h.path)(["value","oldValue"])))(l);return function(e,t,n){let r,a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=o[t.refObjectURI];return i?(a=n===i.startObjectUri?i.endObjectUri:i.startObjectUri,r=n===i.startObjectUri?i.endObjectLabel:i.startObjectLabel):t.refEntity&&(a=t.refEntity.objectURI,r=o[a].label),{objectUri:a,objectLabel:r}}(i,e,m,g)}if("endObject"in i){const{endObjectUri:e,endObjectLabel:t}=l;return{objectUri:e,objectLabel:t}}}),[i,l,m,g]),b=(0,r.useCallback)((()=>{const{objectUri:e,objectLabel:t}=f()||{};if(!(0,h.isNil)(e)&&!(0,h.isNil)(t)){var n;const r=!1===(null===(n=g[e])||void 0===n?void 0:n.isExist);return a().createElement(be.Z,{value:e,className:s()(d.linkContainer,{[d.disabledLink]:r})},a().createElement("span",{className:s()(d.linkLabel,{[d.label]:r})},(0,o.idV)(t)))}return null}),[f,g,d]),y=(0,r.useMemo)((()=>a().createElement("span",null,t,b())),[t,b]),w=(0,r.useCallback)((e=>{const t=(0,o.kDl)(e);return a().createElement(he.Z,{value:t,dataTypeDefinition:H(i,t)})}),[i]);return a().createElement(ge,{className:d.change,label:y,oldValue:c&&w(c),newValue:p&&w(p),operation:u})},Ee=(0,d.Z)({title:{fontSize:"12px",letterSpacing:0,lineHeight:"16px",fontWeight:500,marginTop:"8px"}});function we(){return we=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},we.apply(this,arguments)}const xe=e=>{let{changes:t}=e;const n=Ee();return a().createElement(a().Fragment,null,t.map(((e,t)=>(0,h.has)("level",e)?a().createElement(ve,we({},e,{key:t})):a().createElement("div",{className:n.title,key:t},e.label))))},ke=(0,h.pipe)((0,h.filter)((0,h.has)("operation")),h.length);function Oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Pe(e,t,n[t])}))}return e}function Pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Te=(0,h.filter)((0,h.pipe)((0,h.prop)("uri"),o.WgC)),Ce=(0,h.filter)((0,h.pipe)((0,h.prop)("uri"),o.bC9)),Se=(e,t)=>(0,h.filter)((0,h.allPass)([(0,h.pipe)((0,h.prop)("uri"),o.bC9),(0,h.pipe)((0,h.prop)("startObjectUri"),(0,h.equals)(t))]))(e),Ie=(0,h.curry)(((e,t)=>({entity:t,relations:Se(e,t.uri)}))),Re=(0,h.curry)(((e,t)=>{const n=e[t.startObjectUri],r=[t];return n?{entity:Oe({},n,{uri:t.startObjectUri}),relations:r}:{relations:r}})),Ne=(e,t)=>{const{entity:n,relations:r}=t,{uri:a}=n,o=(0,h.pipe)((0,h.pathOr)([],[a,"relations"]),(0,h.concat)(r),h.uniq)(e);return e[a]={entity:n,relations:o},e},Le=e=>e.type===o.VI$.CREATE_ENTITY,je=(0,d.Z)((e=>({container:{boxSizing:"border-box",border:"1px solid rgba(0,0,0,0.03)",borderRadius:"3px",backgroundColor:"rgba(0,0,0,0.03)",padding:"10px",margin:"12px 16px 12px 0"},uri:{color:e.palette.primary.main,textDecoration:"none",cursor:"pointer"},label:{fontSize:"12px",letterSpacing:0,lineHeight:"16px"},showMoreLink:{marginTop:"8px"}}))),Me=e=>{let{changes:t,dcrUri:n,objectsInfo:i,entityInfo:s,relationsInfo:l,max:c}=e;const u=je(),d=(0,v.useSelector)(E.ZP.selectors.getMetadata),[m,g]=(0,r.useMemo)((()=>((e,t,n,r)=>{const a=t=>(0,h.pipe)((0,h.pick)([t]),Y(e,n)),i=(0,h.curry)(((e,t)=>(0,h.reduce)(((e,n)=>(0,h.concat)(e,n(t))),[],e))),s=(0,h.propOr)([],n.uri)(t).reduce(((t,r)=>ce(e,n,r,t)),{}),l=r.map((n=>((e,t,n)=>(0,h.propOr)([],n.uri)(t).reduce(((t,r)=>ce(e,n,r,t)),{}))(e,t,n)));return[i([(0,h.pipe)((0,h.omit)(ae),Y(e,n)),a(o.xPW.roles.name),a(o.xPW.tags.name),a(o.xPW.startDate.name),a(o.xPW.endDate.name)],s),(0,h.flatten)(r.map(((n,r)=>{const a=(0,h.path)([n.uri,0,"type"],t);return X(e,n,l[r],a)})))]})(d,t,s,l)),[d,t,s,l]),f=(0,r.useMemo)((()=>{const e={label:p().text("Relationships")};return g.length>0?(0,h.flatten)([m,e,g]):m}),[m,g]),{isExpanded:b,onToggle:y,itemsToShow:w,collapsedSuggestionsCount:x}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const[n,a]=(0,r.useState)(!1),o=(0,r.useCallback)((()=>a((e=>!e))),[]),i=(0,r.useMemo)((()=>e.slice(0,t)),[e,t]),s=(0,r.useMemo)((()=>ke(e)),[e]),l=(0,r.useMemo)((()=>ke(i)),[i]);return{isExpanded:n,onToggle:o,itemsToShow:n?e:i,collapsedSuggestionsCount:s-l}}(f,c),k=(0,h.ifElse)((0,h.any)(Le),(0,h.always)(((e,t)=>`${e}/changes/${t}`)(n,s.uri)),(0,h.always)((0,o.wwR)(s)))((0,h.propOr)([],s.uri,t)),O=(0,h.ifElse)((0,h.any)(Le),(0,h.always)("dcrReview"),(0,h.always)("profile"))((0,h.propOr)([],s.uri,t));return a().createElement(fe.Provider,{value:i},a().createElement("div",{className:u.container},a().createElement(be.Z,{className:u.uri,value:k,screen:O},a().createElement("div",{className:u.label},(0,o.idV)(s.label))),a().createElement(xe,{changes:w}),x>0&&a().createElement(ue,{onClick:y,suggestionsCount:x,isExpanded:b,className:u.showMoreLink})))};function De(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ae=e=>{let{task:t}=e;const{objectURIs:n}=t,i=(0,P.rc)(n),{dcr:s,groupedObjects:l}=(e=>{const[t,n]=(0,r.useState)([]),[a,i]=(0,r.useState)(null),s=(0,w._)(),l=(0,r.useCallback)((e=>(0,h.isEmpty)(e)?Promise.resolve([]):s((0,o.DnY)(e,{searchOptions:"ovOnly",defaultMaxValues:1}))),[]);return(0,r.useEffect)((()=>{(0,o.E6I)(e).then((e=>{const{changes:t,objectsInfo:r}=e,a=((e,t)=>(0,h.pipe)(h.keys,(0,h.filter)((t=>(0,h.prop)([t],e))),(0,h.map)((e=>Oe({},t[e],{uri:e}))))(t))(t,r),o=(0,h.pipe)(Te,(0,h.map)(Ie(a)))(a),s=(0,h.pipe)(Ce,(0,h.map)(Re(r)))(a),[c,p]=(0,h.partition)((0,h.has)("entity"),s),u=p.map((0,h.path)(["relations",0,"startObjectUri"]));l(u).then((e=>{const t=p.map(((t,n)=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){De(e,t,n[t])}))}return e}({},t,{entity:e[n]})));(0,h.pipe)(h.flatten,(0,h.reduce)(Ne,{}),h.values,n)([o,c,t])})).catch(k.l),i(e)})).catch(k.l)}),[e,l]),{dcr:a,groupedObjects:t}})(i);return a().createElement(U,{task:t,Icon:W},s&&l.map(((e,t)=>a().createElement(L,{key:t,last:t===l.length-1,divider:!0},a().createElement(Me,{entityInfo:e.entity,relationsInfo:e.relations,changes:s.changes,objectsInfo:s.objectsInfo,dcrUri:i})))))},Ve=(0,d.Z)({pmCard:{marginLeft:"-15px"}});function _e(){return _e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_e.apply(this,arguments)}const Ue=e=>a().createElement("svg",_e({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#1976D2",cx:14,cy:14,r:14}),a().createElement("path",{d:"M22.5 14L18 9.5V13h-3.5L9 7.5 7.5 9l6.04 6H18v3.5l4.5-4.5zm-11.46 1.46L7.5 19 9 20.5l3.54-3.54-1.5-1.5z",fill:"#FFF",opacity:.87})));var Ze=n(28741),We=n(49734);const Fe={showTransitiveMatches:!0,showInactiveEntities:!1},Be=e=>{let{task:t}=e;const n=Ve(),{objectURIs:r}=t,o=(0,v.useSelector)(E.ZP.selectors.getEntity),i=(0,v.useSelector)(E.ZP.selectors.getMetadata),{matches:s,entitiesMap:l}=(0,Ze.s)({enabled:!!o.uri,entity:o,filter:"",rowsPerPage:Number.MAX_SAFE_INTEGER,page:0,options:Fe}),c=null==s?void 0:s.find((e=>{let{object:t}=e;return r.includes(t.uri)}));return a().createElement(U,{task:t,Icon:Ue},c&&a().createElement(L,{last:!0},a().createElement("div",{className:n.pmCard},a().createElement(We.M,{metadata:i,entity:o,match:c,entitiesMap:l}))))};function ze(){return ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ze.apply(this,arguments)}const He=e=>a().createElement("svg",ze({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#205191",cx:14,cy:14,r:14}),a().createElement("path",{d:"M9.667 20.622c-.92 0-1.667-.744-1.667-1.662V8.99c0-.916.747-1.66 1.667-1.66h2.446A1.993 1.993 0 0114 6l.162.006a1.992 1.992 0 011.725 1.323h2.446c.92 0 1.667.745 1.667 1.662v9.97c0 .917-.747 1.661-1.667 1.661zm9-1.33V8.66h-1.334v1.993h-6.666V8.66H9.333v10.634h9.334zM15.86 14.46v1.302h-5.206V14.46h5.206zm1.494-2v1.302h-6.7V12.46h6.7zM14 7.33c.367 0 .667.298.667.664a.668.668 0 01-1.334 0c0-.366.3-.665.667-.665z",fill:"#FFF",opacity:.87})));function $e(){return $e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$e.apply(this,arguments)}const qe=e=>a().createElement("svg",$e({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",opacity:.87},a().createElement("circle",{fill:"#0D47A1",cx:14,cy:14,r:14}),a().createElement("path",{d:"M8.17 9.824v8.995c0 .886.72 1.606 1.607 1.606h8.352c.192 0 .375-.035.546-.097l1.38 1.382.804-.804-1.32-1.32-1.09-1.089-8.993-8.994-1.092-1.092-1.317-1.317-.803.803L8.17 9.824zm9.316 9.316h-8.03v-8.03l8.03 8.03zM9.777 7.575c-.192 0-.376.033-.55.094L10.42 8.86h.32v.322l1.607 1.606h4.819V8.86h1.284v8.03l1.285 1.286V9.182c0-.887-.72-1.607-1.606-1.607h-2.358a1.931 1.931 0 00-1.818-1.285 1.93 1.93 0 00-1.818 1.285H9.777zm3.533.643c0-.353.29-.643.643-.643.353 0 .642.29.642.643a.644.644 0 01-.642.642.644.644 0 01-.643-.642z",fill:"#FFF"})));class Ge{}Ge.build=e=>{let{task:t}=e;const{processType:n}=t;switch(n){case o.Yj_.dataChangeRequestReview:return a().createElement(Ae,{task:t});case o.Yj_.potentialMatchReview:return a().createElement(Be,{task:t});case o.Yj_.recommendForDelete:return a().createElement(U,{task:t,Icon:qe});default:return a().createElement(U,{task:t,Icon:He})}};const Ye=Ge,Xe=e=>{let{task:t}=e;return Ye.build({task:t})}},26789:(e,t,n)=>{"use strict";n.d(t,{G:()=>E});var r=n(24328),a=n.n(r),o=n(87918),i=n.n(o),s=n(94079),l=n(65549),c=n(22994),p=n(31517),u=n(49885),d=n(50757),m=n(52730),g=n(94150),f=n(75813),h=n(79692);const b=(0,h.Z)((e=>({popoverPaper:{width:"464px"},title:{fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px",color:e.palette.text.primary,marginBottom:"17px"},content:{display:"flex",flexDirection:"column",padding:"23px 24px 14px 24px"},simpleDropDownSelector:{marginBottom:"20px"},inputRoot:{paddingTop:"0 !important",paddingBottom:"0 !important"},select:{fontSize:"14px"},footer:{display:"flex",justifyContent:"flex-end",padding:"5px 8px 8px",borderTop:"1px solid rgba(0,0,0,0.12)"},cancelButton:{marginRight:"8px"},input:{fontSize:"14px"}}))),y=e=>{let{anchorEl:t,onClose:n}=e;const o=b(),[l,c]=(0,r.useState)(""),[h,y]=(0,r.useState)(null),[v,E]=(0,r.useState)(!1),{definitions:w}=(()=>{const[e,t]=(0,r.useState)([]),n=(0,m.useSelector)(u.ZP.selectors.getWorkflowPath),a=(0,m.useSelector)(u.ZP.selectors.getWorkflowEnvironmentUrl),o=(0,m.useSelector)(u.ZP.selectors.getTenant),i=(0,m.useSelector)(u.ZP.selectors.getEntity).type;return(0,r.useEffect)((()=>{(0,d.IU6)({workflowPath:n,environment:a,tenant:o}).then((e=>{let{data:n}=e;return t(((e,t)=>e.filter((e=>{let{manualStart:n,objectTypes:r}=e;return n&&(!r||(null==r?void 0:r.some((e=>e===t))))})))(n,i))}))}),[i,n,a,o]),{definitions:e}})(),{processInstance:x,loading:k}=(()=>{const{loadTasks:e}=(0,r.useContext)(g.O),t=(0,m.useSelector)(u.ZP.selectors.getWorkflowPath),n=(0,m.useSelector)(u.ZP.selectors.getWorkflowEnvironmentUrl),a=(0,m.useSelector)(u.ZP.selectors.getTenant),o=(0,m.useSelector)(u.ZP.selectors.getEntity).uri,[i,s]=(0,r.useState)(!1);return{processInstance:(0,r.useCallback)(((r,i)=>(s(!0),(0,d.$ju)({workflowPath:t,tenant:a,environment:n,processType:i,comment:r,objectURIs:[o]}).then((()=>{e()})).catch((e=>{throw(0,f.R)(e),e})).finally((()=>{s(!1)})))),[o,n,e,a,t]),loading:i}})(),O=Boolean(t);return a().createElement(a().Fragment,null,a().createElement(s.Popover,{open:O,anchorEl:t,onClose:n,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},classes:{paper:o.popoverPaper}},a().createElement("div",{className:o.content},a().createElement(s.Typography,{className:o.title},i().text("Add new workflow")),a().createElement(p.Z,{className:o.simpleDropDownSelector,variant:"filled",height:40,TextFieldProps:{InputProps:{disableUnderline:!0}},placeholder:i().text("Select task type"),value:h,onChange:e=>{y(e)},label:"",options:w.map((e=>({value:e.type,label:e.displayName})))}),a().createElement(s.TextField,{variant:"filled",hiddenLabel:!0,size:"small",placeholder:"Type a comment",InputProps:{disableUnderline:!0,classes:{input:o.input,root:o.inputRoot}},value:l,onChange:e=>{c(e.target.value)},multiline:!0})),a().createElement("div",{className:o.footer},a().createElement(s.Button,{disabled:k,className:o.cancelButton,onClick:n},i().text("Cancel")),a().createElement(s.Button,{disabled:k,color:"primary",onClick:()=>{x(l,null==h?void 0:h.value).then((()=>{E(!0),c(""),y(null),n()})).catch((()=>{}))}},i().text("Start")))),a().createElement(s.Portal,{container:document.body},a().createElement(s.Snackbar,{open:v,autoHideDuration:5e3,onClose:()=>{E(!1)},message:i().text("A new workflow has started")})))},v=(0,h.Z)({button:{padding:"9px 16px 9px 12px",marginLeft:"auto",marginRight:"8px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"}}),E=()=>{const e=v(),[t,n]=(0,r.useState)(null),o=(0,c.Z)(),p=o("START_PROCESS_INSTANCE"),u=o("VIEW_PROCESS_DEFINITIONS");return p&&u?a().createElement(a().Fragment,null,a().createElement(s.Button,{color:"primary",className:e.button,onClick:e=>n(e.currentTarget)},a().createElement(l.Z,{className:e.icon}),a().createElement("div",{className:e.buttonLabel},i().text("Add"))),a().createElement(y,{anchorEl:t,onClose:()=>n(null)})):null}},65321:(e,t,n)=>{"use strict";n.d(t,{o:()=>l});var r=n(24328),a=n.n(r),o=n(17440),i=n(94079),s=n(10186);const l=e=>{let{task:t}=e;const{taskId:n,possibleActions:r,assignee:l,isOpen:c,preferredAction:p}=t,{actions:u,actionRequestIsInProgress:d}=(0,s.t)({taskId:n,possibleActions:r,assignee:l,isOpen:c}),[m,g]=(0,o.partition)((0,o.propEq)("text",p.label),u);return a().createElement(a().Fragment,null,g.map((e=>a().createElement(i.Button,{variant:"outlined",onClick:e.onClick,key:e.text,disabled:d},e.text))),m.map((e=>a().createElement(i.Button,{variant:"contained",color:"primary",onClick:e.onClick,key:e.text,disabled:d},e.text))))}},61756:(e,t,n)=>{"use strict";n.d(t,{v:()=>p});var r=n(24328),a=n(52730),o=n(17440),i=n(49885),s=n(50757),l=n(85229),c=n(22994);const p=e=>{const{processTypes:t,assignee:n,showClosedTasks:p}=e||{},d=(0,l._)(),m=(0,a.useSelector)(i.ZP.selectors.getWorkflowPath),g=(0,a.useSelector)(i.ZP.selectors.getWorkflowEnvironmentUrl),f=(0,a.useSelector)(i.ZP.selectors.isWorkflowEnabled),h=(0,a.useSelector)(i.ZP.selectors.getTenant),b=(0,a.useSelector)(i.ZP.selectors.getEntityUri),y=(0,a.useSelector)(i.ZP.selectors.getIsEditableMode),v=(0,a.useSelector)(i.ZP.selectors.getProfileLastLoadedTime),E=(0,c.Z)()("VIEW_TASKS"),w=!(!m||!g)&&f&&E,[x,k]=(0,r.useState)(null),[O,P]=(0,r.useState)(0),[T,C]=(0,r.useState)(!1),S=(0,r.useCallback)((()=>{C(!0);const e=!Array.isArray(t)||t.includes("*")?null:t,r=(e||[null]).map((e=>(0,s.uT0)({entityUri:(0,s.FP6)(b)?(0,s.$Rg)(b):b,workflowPath:m,environment:g,tenant:h,filter:{assignee:n,processType:e},includeClosed:!!p})));d(Promise.all(r)).then((t=>{const r=(0,o.pipe)((0,o.map)((0,o.prop)("data")),(0,o.reject)(o.isNil),o.flatten,(0,o.uniqBy)((0,o.prop)("taskId")),(0,o.filter)(u(e,n)))(t);k(r),P(r.length)})).catch((e=>{console.warn("Workflow error",e)})).finally((()=>{C(!1)}))}),[b,g,d,h,m,n,p,t,v]);return(0,r.useEffect)((()=>{b&&w&&!(0,s.ZiX)(b)?S():(k(null),P(0))}),[w,b,S,y]),{tasks:x,total:O,loading:T,updateTaskState:(0,r.useCallback)(((e,t)=>{k((0,o.map)((0,o.when)((0,o.propEq)("taskId",e),(0,o.mergeLeft)(t))))}),[]),loadTasks:S}},u=(e,t)=>n=>(!e||e.includes(n.processType))&&(!t||t===n.assignee)},97090:(e,t,n)=>{"use strict";n.d(t,{vl:()=>r,r:()=>a,Q3:()=>o,Pi:()=>i});const r={CIRCLE:"circle",POLYGON:"polygon"},a={fillColor:"rgb(242,82,82)",fillOpacity:.1,strokeWeight:2,strokeColor:"#F25252",clickable:!1,editable:!0,zIndex:1},o={mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1},i=.001},91676:(e,t,n)=>{"use strict";n.d(t,{P:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="EntityMarkerContext"},47872:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="InterceptHandlersContext"},60115:(e,t,n)=>{"use strict";n.d(t,{Y:()=>a});var r=n(24328);const a=n.n(r)().createContext({getCurrentPerspectiveId:()=>"",setEntityUri:()=>{},showPerspective:()=>{}})},53607:(e,t,n)=>{"use strict";n.d(t,{U:()=>c});var r=n(50757),a=n(26929);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const s=async(e,t)=>{const{accessToken:n}=await(null==t?void 0:t());return n?o({},e.headers,{Authorization:`Bearer ${n}`}):e.headers},l=(e,t)=>{const{validationUrl:n}=e;return n?(!(null==t?void 0:t.some((e=>{var t;const r=null===(t=n.match(/^(https?:\/\/[^:/?#]*).*$/))||void 0===t?void 0:t[1],a=new RegExp("^"+e+"$"),o=e.replace(/\/*$/,"");return o===n||r&&r===o||(null==o?void 0:o.startsWith("/"))&&(null==n?void 0:n.startsWith(o))||e&&a.test(n)})))||0===((null==t?void 0:t.length)||0))&&{errorMessage:"Not enough permissions"}:{errorMessage:"URL is empty"}},c=e=>{let{name:t,paramObject:n,permissions:i,worker:c,metadata:p,config:u,apiPath:d,servicesPath:m,user:g,workflowPath:f,entity:h,tenant:b,entityUri:y,query:v,openSearch:E,environment:w,getCurrentPerspectiveId:x,showPerspective:k,workflowCheckPermission:O,setEntityUri:P}=e;const T=e=>{e.then((e=>e.json?e.json():e)).then((e=>{c.postMessage(o({action:"response",result:{data:JSON.parse(JSON.stringify(e)),headers:n.params.headers,status:200}},n.params))})).catch((e=>{c.postMessage(o({action:"response",result:{data:JSON.parse(JSON.stringify(e)),headers:n.params.headers,status:0}},n.params))}))},C=(0,a.D)(m)?()=>(0,r.hPi)({servicesPath:m}):()=>Promise.resolve({accessToken:""});switch(t){case r.MVv.API:{const e=(async(e,t,n)=>{const a=l(e,t);if(a)return Promise.reject(a);const o=await s(e,n);return await(0,r.SL_)({url:e.url,method:e.method,data:e.data,headers:o,noRequestProcessor:!0})})(n.params,i,C);T(e);break}case r.MVv.WORKFLOW:{const e=(async(e,t,n,a,o)=>{const{url:i}=e,c=l(e,t);if(c)return c;const p=i.includes("http:")||i.includes("https:");if(!n&&!p)return{errorMessage:"Workflow path is not defined"};const u=await s(e,o);return await(0,r.oUH)({url:i,method:e.method||"GET",data:e.data,tenant:a,headers:u,workflowPath:n})})(n.params,i,f,b,C);T(e);break}case r.MVv.WORKFLOW_START_PROCESS_FROM_QUERY:{const e=((e,t,n,a,i)=>{if(!e.processDefinitionId)return new Promise((e=>e({errorMessage:"processDefinitionId is empty"})));if(!e.searchString)return new Promise((e=>e({errorMessage:"searchString is empty"})));if(!n)return new Promise((e=>e({errorMessage:"Workflow path is not defined"})));const s=l(o({validationUrl:"/processInstances/_generateFromQuery"},e),t);return s?new Promise((e=>e(s))):(0,r.FuV)({workflowPath:n,processType:e.processDefinitionId,searchString:e.searchString,tenant:a,environment:i})})(n.params,i,f,b,w);T(e);break}case r.MVv.GET_CONFIGURATION:c.postMessage(o({action:"response",result:p},n.params));break;case r.MVv.GET_UI_CONFIGURATION:{const e=o({},u,{action:o({},u.action)});e.action.permissions&&delete e.action.permissions,c.postMessage(o({action:"response",result:e},n.params));break}case r.MVv.SET_ENTITY_URI:{const e=e=>c.postMessage(o({action:"response",result:e},n.params));P(n.params.entityUri,e);break}case r.MVv.SET_PERSPECTIVE:k(n.params.perspective),c.postMessage(o({action:"response",result:x()},n.params));break;case r.MVv.GET_PERSPECTIVE:x&&c.postMessage(o({action:"response",result:x()},n.params));break;case r.MVv.WORKFLOW_CHECK_PERMISSION:c.postMessage(o({action:"response",result:O(n.params.permission)},n.params));break;case r.MVv.GET_SEARCH_QUERY:c.postMessage(o({action:"response",result:v},n.params));break;case r.MVv.OPEN_SEARCH:E({viewId:u.id,searchState:n.params.searchState||{}});break;case r.MVv.GET_ENTITY_URI:c.postMessage(o({action:"response",result:y},n.params));break;case r.MVv.GET_ENTITY:c.postMessage(o({action:"response",result:h},n.params));break;case r.MVv.GET_API_PATH:c.postMessage(o({action:"response",result:d},n.params));break;case r.MVv.WORKFLOW_GET_WORKFLOW_PATH:c.postMessage(o({action:"response",result:f},n.params));break;case r.MVv.GET_TENANT:c.postMessage(o({action:"response",result:b},n.params));break;case r.MVv.GET_USER:c.postMessage(o({action:"response",result:g},n.params));break;case r.MVv.ALERT:c.postMessage(o({action:"response",result:window.alert(n.params.text)},n.params));break;case r.MVv.CONFIRM:c.postMessage(o({action:"response",result:window.confirm(n.params.text)},n.params));break;case r.MVv.PROMPT:c.postMessage(o({action:"response",result:window.prompt(n.params.text,n.params.defaultText||"")},n.params));break;case r.MVv.OPEN_WINDOW:window.open(n.params.url,"_blank");break;case r.MVv.RELOAD_PAGE:location.reload()}}},26929:(e,t,n)=>{"use strict";n.d(t,{D:()=>i,jm:()=>s,aZ:()=>c,Fx:()=>u,dH:()=>d,R3:()=>m,Yo:()=>g});var r=n(37164);function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){o(e,t,n[t])}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const i=e=>null==e?void 0:e.includes("/nui"),s=(e,t)=>i(e)?`${e.replace(`${t}/`,"")}worker_api.js`:`${e}worker_api.js`,l=(e,t,n)=>{let r=[];const o=e.getAttribute("ui-actions"),i=e.getAttribute("ui-tooltip"),s=e.getAttribute("id")||e.getAttribute("name");return o&&(o.split(",").forEach((n=>{const o=e=>{var r;const o=e.target,i=r=>{t.postMessage({action:"event",type:"uiAction",data:{type:n,id:s,event:a({},e,{files:r})}})};null!==(r=o.files)&&void 0!==r&&r.length?(e=>{const t=Array.from(e).map((e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=n=>{const r=n.target.result,{lastModified:a,name:o,size:i,type:s}=e;t({lastModified:a,name:o,size:i,type:s,content:r})},r.onerror=e=>{n(e)},r.readAsArrayBuffer(e)}))));return Promise.all(t)})(o.files).then(i):i()};e.addEventListener(n,o),r.push((()=>{e.removeEventListener(n,o)}))})),e.removeAttribute("ui-actions")),i&&n(i),e.childNodes.forEach((e=>{1===e.nodeType&&(r=r.concat(l(e,t,n)))})),r},c=e=>{let{worker:t,setTooltip:n,innerText:r,html:a,setListenersToReset:o,setHtml:i}=e;const s=document.createElement("div");s.innerHTML=a||r,o(l(s,t,n)),i(s)},p=(e,t)=>(e||[]).some((e=>{const n=new RegExp(`^${e}$`);return e.replace(/\/*$/,"")===t||e&&n.test(t)})),u=e=>{let{workerRef:t,setRequestListeners:n}=e;return{processApiRequest:(e,a,o,i,s)=>{const l=(0,r.x0)();n({url:e,method:a,headers:o,noRequestProcessor:!0},s,l),t.current.postMessage({action:"apiRequest",id:l,url:e,method:a,headers:o,data:i})}}},d=e=>{let{workerRef:t,setResponseListeners:n}=e;return{processApiResponse:(e,a,o,i)=>{const s=(0,r.x0)();n(i,s),t.current.postMessage({action:"apiResponse",id:s,url:e,method:a,data:o})}}},m=e=>{let{apiPath:t,reltioPath:n,tenant:o,processApiRequest:i,workerRef:s,setRequestListeners:l}=e;return e=>{let{options:c={},url:u,next:d,resolve:m}=e;const g=u.startsWith("/")&&!u.startsWith(t)?`${n}/api/${o}${u}`:`${n}${u.replace(t,"")}`;if(p(i,g)){const e=(0,r.x0)();l(c,d,e,m),s.current.postMessage({action:"apiRequest",id:e,url:g,method:c.method,headers:a({},c.headers,{origin:"ui",requestId:e}),data:c.body})}else d(u,c)}},g=e=>{let{reltioPath:t,apiPath:n,processApiResponse:a,workerRef:o,setResponseListeners:i}=e;return e=>{var s;let{url:l,response:c,next:u,options:d,abort:m}=e;if("ui"===(null==d||null===(s=d.headers)||void 0===s?void 0:s.origin))c.json().then((e=>{var t,n;i(u,d.headers.requestId),o.current.postMessage({action:"response",result:{data:e,status:c.status},id:null==d?void 0:d.id,name:null==d||null===(t=d.task)||void 0===t||null===(n=t.params)||void 0===n?void 0:n.name})})).catch((e=>{m(e)}));else{const e=`${t}${l.replace(n,"")}`;if(p(a,e)){const t=(0,r.x0)();c.json().then((n=>{i(u,t),o.current.postMessage({action:"apiResponse",id:t,url:e,method:d.method,data:n})})).catch((e=>{m(e)}))}else u(c)}}}},9757:(e,t,n)=>{"use strict";n.d(t,{E:()=>x});var r=n(24328),a=n(52730),o=n(49885),i=n(50757),s=n(17440),l=n(22994),c=n(24330),p=n.n(c);const u={attributes:{"*":["accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","class","clip","clipPathUnits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","height","horiz-adv-x","horiz-origin-x","id","ideographic","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lang","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","marker-mid","marker-start","markerHeight","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","max","media","method","min","mode","name","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","panose-1","paint-order","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","style","surfaceScale","systemLanguage","tableValues","target","targetX","targetY","text-anchor","text-decoration","text-rendering","textLength","to","transform","type","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","values","version","vert-adv-y","vert-origin-x","vert-origin-y","viewBox","viewTarget","visibility","width","widths","word-spacing","writing-mode","x","x-height","x1","x2","xChannelSelector","y","y1","y2","yChannelSelector","z","zoomAndPan","ui-actions","ui-tooltip"],img:["src","srcset","alt","title","loading"],link:["href","rel"],iframe:["src"],a:["href"]},tags:["animate","animateColor","animateMotion","animateTransform","mpath","set","circle","ellipse","line","polygon","polyline","rect","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","hkern","vkern","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","feDistantLight","fePointLight","feSpotLight","circle","ellipse","line","path","polygon","polyline","rect","defs","g","svg","symbol","use","altGlyph","altGlyphDef","altGlyphItem","glyph","glyphRef","textPath","text","tref","tspan","altGlyph","textPath","tref","tspan","clipPath","color-profile","cursor","filter","foreignObject","script","style","view","a","link","input","button","iframe","img"]};function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){m(e,t,n[t])}))}return e}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g=()=>{const{allowedAttributes:e,allowedTags:t}=p().defaults,{attributes:n,tags:r}=u,a={allowedTags:t.concat(r),allowedAttributes:d({},e,n),allowVulnerableTags:!0};return e=>p()(e,a)};var f=n(97094),h=n(60115),b=n(47872),y=n(53607),v=n(26929);function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){w(e,t,n[t])}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const x=function(){var e,t,n,c;let p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[u,d]=(0,r.useState)(),[m,w]=(0,r.useState)([]),[x,k]=(0,r.useState)([]),[O,P]=(0,r.useState)(!0),[T,C]=(0,r.useState)(),[S,I]=(0,r.useState)(null),[R,N]=(0,r.useState)({}),L=(0,r.useRef)(),j=(0,r.useRef)({}),M=(0,r.useRef)({}),D=(0,a.useDispatch)(),A=g(),V=(0,a.useSelector)(o.ZP.selectors.getUIPath),_=(0,a.useSelector)(o.ZP.selectors.getTenant),U=(0,v.jm)(V,_),Z=(0,r.useContext)(f.S),W=(0,r.useContext)(h.Y),F=(0,r.useContext)(b.p),B=(0,l.Z)(),z=(0,a.useSelector)(o.ZP.selectors.getMetadata)||{},H=(0,a.useSelector)(o.ZP.selectors.getEntity)||{},$=(0,a.useSelector)(o.ZP.selectors.getApiPath),q=(0,a.useSelector)(o.ZP.selectors.getServicesPath),G=(0,a.useSelector)(o.ZP.selectors.getReltioPath),Y=(0,a.useSelector)(o.ZP.selectors.getWorkflowPath),X=(0,a.useSelector)(o.ZP.selectors.getUser),Q=(0,a.useSelector)(o.ZP.selectors.getEntityUri),K=(0,a.useSelector)(o.ZP.selectors.getIsEditableMode),J=(0,a.useSelector)(o.ZP.selectors.getWorkflowEnvironmentUrl),{type:ee,data:te}=(0,a.useSelector)(o.ZP.selectors.getSearchProviderData)||{},ne="search"===ee?null==te?void 0:te.query:null,re=!(0,v.D)(q),ae=re?W.interceptors:F,oe=e=>D(o.ui.actions.openSearch(e));let ie="",se="";const le=e=>{let{task:t,worker:n}=e;if(t)switch(t.action){case i.W0P.SET_HTML:{const e=A(t.params.html);if(t.params.id){const n=document.getElementById(t.params.id);n&&(n.innerHTML=e)}else ie!==e&&(ie=e,(0,v.aZ)({worker:n,setTooltip:I,html:e,innerText:ie,setListenersToReset:w,setHtml:d}));break}case i.W0P.SHOW_POPUP:{const e=A(t.params);se=e,(0,v.aZ)({worker:n,setTooltip:I,html:e,innerText:se,setListenersToReset:k,setHtml:C});break}case i.W0P.HIDE_POPUP:se="",C(null);break;case i.W0P.SET_VISIBILITY:"visible"===t.params?(P(!0),(0,v.aZ)({worker:n,setTooltip:I,innerText:ie,setListenersToReset:w,setHtml:d})):P(!1);break;case i.W0P.SET_TOOLTIP:I(t.params);break;case i.W0P.SET_HEIGHT:N((e=>E({},e,{height:t.params})));break;case i.W0P.SET_WIDTH:N((e=>E({},e,{width:t.params})));break;case i.W0P.SET_ENABLED:N((e=>t.params?(0,s.omit)(["pointer-events"],e):E({},e,{"pointer-events":"none"})));break;case i.W0P.LOG:console.log(t.params);break;case i.W0P.MESSAGE:Z(t.params);break;case i.W0P.REQUEST:{const e=re?G:$,r=(0,s.startsWith)("/",(0,s.pathOr)("",["params","url"],t))&&!(0,s.startsWith)($,(0,s.pathOr)("",["params","url"],t)),a=(0,s.pathEq)(["params","name"],i.MVv.API,t),o=(0,s.pipe)((0,s.evolve)({url:(0,s.ifElse)((0,s.both)((0,s.always)(r),(0,s.always)(a)),(0,s.concat)(`${e}/api/${_}`),(0,s.replace)(G,$))}),(0,s.when)((0,s.has)("url"),(0,s.assocPath)(["validationUrl"],t.params.url)))(t.params),l=E({},t,{params:o});(0,y.U)(E({name:l.params.name,paramObject:l,permissions:p.action.permissions,worker:n,metadata:z,config:p,user:X,servicesPath:q,apiPath:G,tenant:_,workflowPath:Y,entity:H,entityUri:Q,environment:J,query:ne,openSearch:oe,workflowCheckPermission:B},W));break}case i.W0P.RETURN_PROCESSED_API_RESPONSE:{const{id:e,data:n}=t.params;M.current[e]&&(M.current[e].next(n),M.current=(0,s.omit)([e],M.current));break}case i.W0P.RETURN_PROCESSED_API_REQUEST:{const{id:e,data:n}=t.params;j.current[e]&&(j.current[e].resolve(n),j.current=(0,s.omit)([e],j.current));break}}},ce=(e,t,n,r)=>{j.current=E({},j.current,{[n]:{options:e,next:t,id:n,resolve:r}})},pe=(e,t)=>{M.current=E({},M.current,{[t]:{next:e}})},ue=(0,v.Fx)({workerRef:L,setRequestListeners:ce}),de=(0,v.dH)({workerRef:L,setResponseListeners:pe}),me=(0,v.R3)({apiPath:$,reltioPath:G,tenant:_,processApiRequest:null==p||null===(e=p.action)||void 0===e?void 0:e.processApiRequest,workerRef:L,setRequestListeners:ce}),ge=(0,v.Yo)({reltioPath:G,apiPath:$,processApiResponse:null==p||null===(t=p.action)||void 0===t?void 0:t.processApiResponse,workerRef:L,setResponseListeners:pe}),fe=(e,t)=>{var n;null===(n=L.current)||void 0===n||n.postMessage({action:"event",type:e,data:t})},he=(0,r.useRef)(!1),be=!re&&F&&!(0,i.O27)(p.action)&&p.action.platform!==i.X1H.CLASSIC&&((null==p||null===(n=p.action)||void 0===n?void 0:n.processApiRequest)||(null==p||null===(c=p.action)||void 0===c?void 0:c.processApiResponse));be&&(he.current||L.current||(F.startInterceptorInit(),he.current=!0)),(0,r.useEffect)((()=>{(0,i.O27)(p.action)||p.action.platform===i.X1H.CLASSIC||(L.current=(0,i.QWZ)(U,le,p),he.current&&(F.finishInterceptorInit(),he.current=!1),fe("updateEntity",H))}),[H,p]),(0,r.useEffect)((()=>{fe("editMode",K)}),[K]),(0,r.useEffect)((()=>{fe("changeSearchQuery",ne)}),[ne]),(0,r.useEffect)((()=>{fe("changeVisibility",O)}),[O]),(0,r.useEffect)((()=>()=>{m.forEach((e=>e()))}),[m]),(0,r.useEffect)((()=>()=>{x.forEach((e=>e()))}),[x,m]);const ye=(0,r.useCallback)((()=>{fe("execute",null)}),[p]);return(0,r.useEffect)((()=>{var e,t;if(!(0,i.O27)(ae)&&(null!=p&&null!==(e=p.action)&&void 0!==e&&e.processApiRequest||null!=p&&null!==(t=p.action)&&void 0!==t&&t.processApiResponse)){const{addInternalRequestInterceptor:e,addInternalResponseInterceptor:t,removeInternalRequestInterceptor:a,removeInternalResponseInterceptor:o}=ae;var n,r;return re?(e(null==p||null===(n=p.action)||void 0===n?void 0:n.processApiRequest,ue),t(null==p||null===(r=p.action)||void 0===r?void 0:r.processApiResponse,de),()=>{a(ue),o(de)}):(e(me),t(ge),L.current.onerror=()=>{a(me),o(ge)},()=>{a(me),o(ge)})}}),[p]),{html:u,visible:O,tooltip:S,customStyles:R,onClick:ye,popup:T}}},26313:(e,t,n)=>{"use strict";n.d(t,{Q:()=>u});var r=n(24328),a=n(17440),o=n(52730),i=n(49885),s=n(50757),l=n(85229);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){p(e,t,n[t])}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=e=>{const t=(0,l._)(),n=(0,o.useSelector)(i.ZP.selectors.getEntityUriWithDataTenant),[p,u]=(0,r.useState)({}),d=(0,r.useCallback)((e=>{const n=[{filter:s.j5E.EQUALS,fieldName:"uri",values:e}],r={max:e.length,activeness:s.YJ7.ALL,select:"uri,label,type"};return t((0,s.ZOr)(n,r))}),[t]),m=e=>(0,s.HvW)(e,{options:"uri,label,type"}).then((t=>c({},t,{uri:e}))).catch((()=>({}))),g=(0,r.useCallback)(((e,n)=>t(Promise.all((e||[]).map(m))).then((e=>(0,a.pipe)((0,a.reject)(a.isEmpty),(0,a.concat)(n))(e)))),[t]);return(0,r.useEffect)((()=>{const t=(0,a.pipe)((0,a.reduce)(((e,t)=>{const{objectType:r,relatedObjectUris:a}=t;return"relation"!==r&&"potentialMatch"!==r||(a||[]).forEach((t=>{t!==n&&(0,s.WgC)(t)&&!p[t]&&e.push(t)})),e}),[]),a.uniq)(e||[]);t.length&&d(t).then((e=>{const n=(0,a.pipe)((0,a.map)((0,a.prop)("uri")),(0,a.difference)(t))(e);return g(n,e)})).then((e=>{u((t=>e.reduce(((e,t)=>(e[t.uri]=t,e)),c({},t))))})).catch((()=>{}))}),[d,g,e,n]),p}},52016:(e,t,n)=>{"use strict";n.d(t,{l:()=>l});var r=n(52730),a=n(49885),o=n(50757),i=n(24328);const s=[],l=()=>{const e=(0,r.useSelector)(a.ZP.selectors.getUserRoles)||s;return{canCreate:(0,i.useCallback)((0,o.ifj)(o.WVQ.CREATE,e),[e]),canRead:(0,i.useCallback)((0,o.ifj)(o.WVQ.READ,e),[e]),canUpdate:(0,i.useCallback)((0,o.ifj)(o.WVQ.UPDATE,e),[e]),canDelete:(0,i.useCallback)((0,o.ifj)(o.WVQ.DELETE,e),[e])}}},37152:(e,t,n)=>{"use strict";n.d(t,{a:()=>m});var r=n(24328),a=n(52730),o=n(17440),i=n(49885),s=n(50757),l=n(85229),c=n(30634);function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=(0,o.when)(o.identity,(0,o.pipe)(s.VGB,o.length,(0,o.times)((e=>e+1)))),m=e=>{let{sorting:t,filter:n,page:u,rowsPerPage:m,config:g,entity:f,relationActivityFilter:h,mode:b,searchByOv:y=!1}=e;const[v,E]=(0,r.useState)(!1),w=(0,a.useDispatch)(),x=(0,a.useSelector)(i.ZP.selectors.getTenant),k=(0,a.useSelector)(i.ZP.selectors.getMetadata),O=(0,a.useSelector)(i.ZP.selectors.getDtssPath),{activityFilter:P,globalFilter:T}=(0,a.useSelector)(i.ZP.selectors.getGlobalSearchRequestOptions)||{},C=(0,a.useSelector)(i.ZP.selectors.getProfileLastLoadedTime),S=(0,l._)(),I=e=>{const t=(0,o.when)(s.Kn2,(0,o.prop)("uri")),n=(0,o.pipe)(t,(0,s.pQZ)(k));return(0,o.evolve)({entityTypes:(0,o.filter)((0,s.kuw)(k)),inRelations:(0,o.filter)(n),outRelations:(0,o.filter)(n),nextEntry:I})(e)},R=g.suggested,N=(0,r.useMemo)((()=>({searchByOv:y})),[y]),L=(0,r.useCallback)((()=>{if(null!=f&&f.uri){const e=p({},I(g.content),{sortBy:null==t?void 0:t.field,order:null==t?void 0:t.order,returnDates:!0,returnObjects:!0,activeness:{relation:h||s.Ng6.ALL,entity:P},max:m,offset:u*m,filter:(0,s.vyX)(T,n)||void 0,suggested:d(R)}),r=[e].concat((0,o.ifElse)(o.identity,(0,o.pipe)(s.VGB,(t=>t.map(((t,n)=>p({},t,{id:e.suggested[n]}))))),(0,o.always)([]))(R)),a=(0,o.cond)([[(0,o.pipe)((0,o.prop)("uri"),s.ZiX),()=>Promise.resolve([{total:0}])],[s.biM,e=>(0,s.n_1)({entityUri:e.uri,configs:r,customerTenant:x,dataTenant:e.dataTenant,dtssPath:O,options:N})],[o.T,e=>(0,s.N6e)(e.uri,r,N)]]);E(!0),S(a(f)).then((e=>{let[{connections:t,total:n}]=e;w(i.N5.relations.actions.relationsLoaded({id:g.id,connections:t,total:n}))})).finally((()=>{E(!1)}))}}),[P,k,g,w,O,null==f?void 0:f.uri,null==f?void 0:f.dataTenant,n,T,u,h,m,S,t,x,N,C]),j=(0,r.useRef)(!1);j.current=!1,(0,r.useEffect)((()=>{j.current=!0,L()}),[L]);const M=(0,c.D)(b);return(0,r.useEffect)((()=>{b!==s.ARY.Viewing||j.current||M===b||(j.current=!0,L())}),[L,b,M]),{isLoading:v,reload:L}}},76527:()=>{},96969:()=>{},32232:()=>{},24195:()=>{},73443:()=>{}}]);
|
|
2
2
|
//# sourceMappingURL=3686.js.map
|