work-workflow-test 0.0.2 → 0.0.3

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.
@@ -10467,7 +10467,7 @@ const yI = /* @__PURE__ */ Zt(gI), vI = (e) => e.map((t, n) => ({
10467
10467
  }));
10468
10468
  function EI(e) {
10469
10469
  const t = {};
10470
- return e.forEach(({ source: n, target: r, data: o }) => {
10470
+ return e?.forEach(({ source: n, target: r, data: o }) => {
10471
10471
  t[n] || (t[n] = { next: [], transitions: [] }), t[n].next.push(r), t[n].transitions.push({
10472
10472
  to: r,
10473
10473
  permission: o?.permission || "All users",
@@ -20106,7 +20106,7 @@ var x2 = /* @__PURE__ */ E2();
20106
20106
  const w2 = /* @__PURE__ */ Zt(x2), b2 = ({ defaultValue: e, setValue: t }) => {
20107
20107
  const [n, r] = Oe(e), [o, i] = Oe(!1), { acceptedUser: s, col: a, exampleData: c } = jt(or), l = a?.map((d) => d.field), u = Yt(() => {
20108
20108
  const d = /* @__PURE__ */ new Map();
20109
- return l.forEach((f) => {
20109
+ return l?.forEach((f) => {
20110
20110
  if (f.dataType === "user") {
20111
20111
  const m = c[f.internalName], h = s.find(
20112
20112
  (p) => p.id === m
@@ -20115,7 +20115,7 @@ const w2 = /* @__PURE__ */ Zt(x2), b2 = ({ defaultValue: e, setValue: t }) => {
20115
20115
  } else if (f.dataType === "collaborators") {
20116
20116
  const m = c[f.internalName]?.split(",");
20117
20117
  let h = [];
20118
- m.forEach((p) => {
20118
+ m?.forEach((p) => {
20119
20119
  const g = s.find(
20120
20120
  (y) => y.id === p
20121
20121
  );
@@ -142,7 +142,7 @@ const theme2 = createTheme({ palette: {
142
142
  } });`:vt(12,k?` (${k})`:"",JSON.stringify(f.main)));return tp(f,"light",c,d),tp(f,"dark",E,d),f.contrastText||(f.contrastText=s(f.main)),f},m={dark:Uw,light:dp};return process.env.NODE_ENV!=="production"&&(m[o]||console.error(`MUI: The palette mode \`${o}\` is not supported.`)),re(Ar({common:Ar({},Mt),mode:o,primary:p({color:l,name:"primary"}),secondary:p({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:a,name:"error"}),warning:p({color:n,name:"warning"}),info:p({color:w,name:"info"}),success:p({color:b,name:"success"}),grey:o5,contrastThreshold:e,getContrastText:s,augmentColor:p,tonalOffset:d},m[o]),t)}const n5=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function s5(r){return Math.round(r*1e5)/1e5}const lp={textTransform:"uppercase"},ip='"Roboto", "Helvetica", "Arial", sans-serif';function p5(r,o){const e=typeof o=="function"?o(r):o,{fontFamily:d=ip,fontSize:t=14,fontWeightLight:l=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:w=700,htmlFontSize:b=16,allVariants:n,pxToRem:s}=e,p=Ue(e,n5);process.env.NODE_ENV!=="production"&&(typeof t!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof b!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const m=t/14,h=s||(x=>`${x/b*m}rem`),f=(x,c,E,y,F)=>Ar({fontFamily:d,fontWeight:x,fontSize:h(c),lineHeight:E},d===ip?{letterSpacing:`${s5(y/c)}em`}:{},F,n),k={h1:f(l,96,1.167,-1.5),h2:f(l,60,1.2,-.5),h3:f(i,48,1.167,0),h4:f(i,34,1.235,.25),h5:f(i,24,1.334,0),h6:f(a,20,1.6,.15),subtitle1:f(i,16,1.75,.15),subtitle2:f(a,14,1.57,.1),body1:f(i,16,1.5,.15),body2:f(i,14,1.43,.15),button:f(a,14,1.75,.4,lp),caption:f(i,12,1.66,.4),overline:f(i,12,2.66,1,lp),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return re(Ar({htmlFontSize:b,pxToRem:h,fontFamily:d,fontSize:t,fontWeightLight:l,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:w},k),p,{clone:!1})}const f5=.2,h5=.14,m5=.12;function Pr(...r){return[`${r[0]}px ${r[1]}px ${r[2]}px ${r[3]}px rgba(0,0,0,${f5})`,`${r[4]}px ${r[5]}px ${r[6]}px ${r[7]}px rgba(0,0,0,${h5})`,`${r[8]}px ${r[9]}px ${r[10]}px ${r[11]}px rgba(0,0,0,${m5})`].join(",")}const k5=["none",Pr(0,2,1,-1,0,1,1,0,0,1,3,0),Pr(0,3,1,-2,0,2,2,0,0,1,5,0),Pr(0,3,3,-2,0,3,4,0,0,1,8,0),Pr(0,2,4,-1,0,4,5,0,0,1,10,0),Pr(0,3,5,-1,0,5,8,0,0,1,14,0),Pr(0,3,5,-1,0,6,10,0,0,1,18,0),Pr(0,4,5,-2,0,7,10,1,0,2,16,1),Pr(0,5,5,-3,0,8,10,1,0,3,14,2),Pr(0,5,6,-3,0,9,12,1,0,3,16,2),Pr(0,6,6,-3,0,10,14,1,0,4,18,3),Pr(0,6,7,-4,0,11,15,1,0,4,20,3),Pr(0,7,8,-4,0,12,17,2,0,5,22,4),Pr(0,7,8,-4,0,13,19,2,0,5,24,4),Pr(0,7,9,-4,0,14,21,2,0,5,26,4),Pr(0,8,9,-5,0,15,22,2,0,6,28,5),Pr(0,8,10,-5,0,16,24,2,0,6,30,5),Pr(0,8,11,-5,0,17,26,2,0,6,32,5),Pr(0,9,11,-5,0,18,28,2,0,7,34,6),Pr(0,9,12,-6,0,19,29,2,0,7,36,6),Pr(0,10,13,-6,0,20,31,3,0,8,38,7),Pr(0,10,13,-6,0,21,33,3,0,8,40,7),Pr(0,10,14,-6,0,22,35,3,0,8,42,7),Pr(0,11,14,-7,0,23,36,3,0,9,44,8),Pr(0,11,15,-7,0,24,38,3,0,9,46,8)],x5=["duration","easing","delay"],g5={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},c5={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ap(r){return`${Math.round(r)}ms`}function u5(r){if(!r)return 0;const o=r/36;return Math.round((4+15*o**.25+o/5)*10)}function F5(r){const o=Ar({},g5,r.easing),e=Ar({},c5,r.duration);return Ar({getAutoHeightDuration:u5,create:(t=["all"],l={})=>{const{duration:i=e.standard,easing:a=o.easeInOut,delay:w=0}=l,b=Ue(l,x5);if(process.env.NODE_ENV!=="production"){const n=p=>typeof p=="string",s=p=>!isNaN(parseFloat(p));!n(t)&&!Array.isArray(t)&&console.error('MUI: Argument "props" must be a string or Array.'),!s(i)&&!n(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),n(a)||console.error('MUI: Argument "easing" must be a string.'),!s(w)&&!n(w)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof l!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
143
143
  `)),Object.keys(b).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(b).join(",")}].`)}return(Array.isArray(t)?t:[t]).map(n=>`${n} ${typeof i=="string"?i:ap(i)} ${a} ${typeof w=="string"?w:ap(w)}`).join(",")}},r,{easing:o,duration:e})}const A5={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},y5=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function E5(r={},...o){const{mixins:e={},palette:d={},transitions:t={},typography:l={}}=r,i=Ue(r,y5);if(r.vars&&r.generateCssVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":vt(18));const a=b5(d),w=rp(r);let b=re(w,{mixins:Z6(w.breakpoints,e),palette:a,shadows:k5.slice(),typography:p5(a,l),transitions:F5(t),zIndex:Ar({},A5)});if(b=re(b,i),b=o.reduce((n,s)=>re(n,s),b),process.env.NODE_ENV!=="production"){const n=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],s=(p,m)=>{let h;for(h in p){const f=p[h];if(n.indexOf(h)!==-1&&Object.keys(f).length>0){if(process.env.NODE_ENV!=="production"){const k=uw("",h);console.error([`MUI: The \`${m}\` component increases the CSS specificity of the \`${h}\` internal state.`,"You can not override it like this: ",JSON.stringify(p,null,2),"",`Instead, you need to use the '&.${k}' syntax:`,JSON.stringify({root:{[`&.${k}`]:f}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
144
144
  `))}p[h]={}}}};Object.keys(b.components).forEach(p=>{const m=b.components[p].styleOverrides;m&&p.indexOf("Mui")===0&&s(m,p)})}return b.unstable_sxConfig=Ar({},Rt,i?.unstable_sxConfig),b.unstable_sx=function(s){return ci({sx:s,theme:this})},b}const D5=E5(),v5="$$material";function S5(r){return r!=="ownerState"&&r!=="theme"&&r!=="sx"&&r!=="as"}const _5=X6({themeId:v5,defaultTheme:D5,rootShouldForwardProp:r=>S5(r)&&r!=="classes"});function C5(r){return uw("MuiSvgIcon",r)}Pc("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const B5=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],I5=r=>{const{color:o,fontSize:e,classes:d}=r,t={root:["root",o!=="inherit"&&`color${$e(o)}`,`fontSize${$e(e)}`]};return Tc(t,C5,d)},T5=_5("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(r,o)=>{const{ownerState:e}=r;return[o.root,e.color!=="inherit"&&o[`color${$e(e.color)}`],o[`fontSize${$e(e.fontSize)}`]]}})(({theme:r,ownerState:o})=>{var e,d,t,l,i,a,w,b,n,s,p,m,h;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:o.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(e=r.transitions)==null||(d=e.create)==null?void 0:d.call(e,"fill",{duration:(t=r.transitions)==null||(t=t.duration)==null?void 0:t.shorter}),fontSize:{inherit:"inherit",small:((l=r.typography)==null||(i=l.pxToRem)==null?void 0:i.call(l,20))||"1.25rem",medium:((a=r.typography)==null||(w=a.pxToRem)==null?void 0:w.call(a,24))||"1.5rem",large:((b=r.typography)==null||(n=b.pxToRem)==null?void 0:n.call(b,35))||"2.1875rem"}[o.fontSize],color:(s=(p=(r.vars||r).palette)==null||(p=p[o.color])==null?void 0:p.main)!=null?s:{action:(m=(r.vars||r).palette)==null||(m=m.action)==null?void 0:m.active,disabled:(h=(r.vars||r).palette)==null||(h=h.action)==null?void 0:h.disabled,inherit:void 0}[o.color]}}),Fi=ir.forwardRef(function(o,e){const d=jc({props:o,name:"MuiSvgIcon"}),{children:t,className:l,color:i="inherit",component:a="svg",fontSize:w="medium",htmlColor:b,inheritViewBox:n=!1,titleAccess:s,viewBox:p="0 0 24 24"}=d,m=Ue(d,B5),h=ir.isValidElement(t)&&t.type==="svg",f=Ar({},d,{color:i,component:a,fontSize:w,instanceFontSize:o.fontSize,inheritViewBox:n,viewBox:p,hasSvgAsChild:h}),k={};n||(k.viewBox=p);const x=I5(f);return u.jsxs(T5,Ar({as:a,className:Mc(x.root,l),focusable:"false",color:b,"aria-hidden":s?void 0:!0,role:s?"img":void 0,ref:e},k,m,h&&t.props,{ownerState:f,children:[h?t.props.children:t,s?u.jsx("title",{children:s}):null]}))});process.env.NODE_ENV!=="production"&&(Fi.propTypes={children:nr.node,classes:nr.object,className:nr.string,color:nr.oneOfType([nr.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),nr.string]),component:nr.elementType,fontSize:nr.oneOfType([nr.oneOf(["inherit","large","medium","small"]),nr.string]),htmlColor:nr.string,inheritViewBox:nr.bool,shapeRendering:nr.string,sx:nr.oneOfType([nr.arrayOf(nr.oneOfType([nr.func,nr.object,nr.bool])),nr.func,nr.object]),titleAccess:nr.string,viewBox:nr.string}),Fi.muiName="SvgIcon";function N5(r,o){function e(d,t){return u.jsx(Fi,Ar({"data-testid":`${o}Icon`,ref:t},d,{children:r}))}return process.env.NODE_ENV!=="production"&&(e.displayName=`${o}Icon`),e.muiName=Fi.muiName,ir.memo(ir.forwardRef(e))}const P5=fe(Object.freeze(Object.defineProperty({__proto__:null,capitalize:$e,createChainedFunction:pc,createSvgIcon:N5,debounce:fc,deprecatedPropType:hc,isMuiElement:mc,ownerDocument:t3,ownerWindow:kc,requirePropFactory:xc,setRef:l3,unstable_ClassNameGenerator:{configure:r=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
145
- `)),n3.configure(r)}},unstable_useEnhancedEffect:i3,unstable_useId:cc,unsupportedProp:uc,useControlled:Fc,useEventCallback:Ac,useForkRef:yc,useIsFocusVisible:Ic},Symbol.toStringTag,{value:"Module"})));var wp;function je(){return wp||(wp=1,function(r){"use client";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o.createSvgIcon}});var o=P5}(ww)),ww}var bp;function O5(){if(bp)return Dt;bp=1;var r=Qo();Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.default=void 0;var o=r(je()),e=he();return Dt.default=(0,o.default)((0,e.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),Dt}var R5=O5();const M5=zo(R5),$5=r=>r.map((o,e)=>({id:o.id,data:{label:o.value,color:o.statusColor},position:{x:100,y:100+e*100},type:"customHandle"}));function U5(r){const o={};return r.forEach(({source:e,target:d,data:t})=>{o[e]||(o[e]={next:[],transitions:[]}),o[e].next.push(d),o[e].transitions.push({to:d,permission:t?.permission||"All users",requiredColumns:t?.requiredColumns||[],condition:t?.condition||""})}),Object.entries(o).map(([e,{next:d,transitions:t}])=>({stage:e,next:d,transitions:t}))}function np(r,o){return function(){return r.apply(o,arguments)}}const{toString:L5}=Object.prototype,{getPrototypeOf:Lw}=Object,{iterator:Ai,toStringTag:sp}=Symbol,yi=(r=>o=>{const e=L5.call(o);return r[e]||(r[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Yo=r=>(r=r.toLowerCase(),o=>yi(o)===r),Ei=r=>o=>typeof o===r,{isArray:$d}=Array,Ud=Ei("undefined");function Ut(r){return r!==null&&!Ud(r)&&r.constructor!==null&&!Ud(r.constructor)&&ho(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const pp=Yo("ArrayBuffer");function j5(r){let o;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?o=ArrayBuffer.isView(r):o=r&&r.buffer&&pp(r.buffer),o}const z5=Ei("string"),ho=Ei("function"),fp=Ei("number"),Lt=r=>r!==null&&typeof r=="object",V5=r=>r===!0||r===!1,Di=r=>{if(yi(r)!=="object")return!1;const o=Lw(r);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(sp in r)&&!(Ai in r)},H5=r=>{if(!Lt(r)||Ut(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},q5=Yo("Date"),W5=Yo("File"),K5=Yo("Blob"),Y5=Yo("FileList"),G5=r=>Lt(r)&&ho(r.pipe),X5=r=>{let o;return r&&(typeof FormData=="function"&&r instanceof FormData||ho(r.append)&&((o=yi(r))==="formdata"||o==="object"&&ho(r.toString)&&r.toString()==="[object FormData]"))},Z5=Yo("URLSearchParams"),[J5,Q5,rF,oF]=["ReadableStream","Request","Response","Headers"].map(Yo),eF=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jt(r,o,{allOwnKeys:e=!1}={}){if(r===null||typeof r>"u")return;let d,t;if(typeof r!="object"&&(r=[r]),$d(r))for(d=0,t=r.length;d<t;d++)o.call(null,r[d],d,r);else{if(Ut(r))return;const l=e?Object.getOwnPropertyNames(r):Object.keys(r),i=l.length;let a;for(d=0;d<i;d++)a=l[d],o.call(null,r[a],a,r)}}function hp(r,o){if(Ut(r))return null;o=o.toLowerCase();const e=Object.keys(r);let d=e.length,t;for(;d-- >0;)if(t=e[d],o===t.toLowerCase())return t;return null}const wd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,mp=r=>!Ud(r)&&r!==wd;function jw(){const{caseless:r,skipUndefined:o}=mp(this)&&this||{},e={},d=(t,l)=>{const i=r&&hp(e,l)||l;Di(e[i])&&Di(t)?e[i]=jw(e[i],t):Di(t)?e[i]=jw({},t):$d(t)?e[i]=t.slice():(!o||!Ud(t))&&(e[i]=t)};for(let t=0,l=arguments.length;t<l;t++)arguments[t]&&jt(arguments[t],d);return e}const dF=(r,o,e,{allOwnKeys:d}={})=>(jt(o,(t,l)=>{e&&ho(t)?r[l]=np(t,e):r[l]=t},{allOwnKeys:d}),r),tF=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),lF=(r,o,e,d)=>{r.prototype=Object.create(o.prototype,d),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:o.prototype}),e&&Object.assign(r.prototype,e)},iF=(r,o,e,d)=>{let t,l,i;const a={};if(o=o||{},r==null)return o;do{for(t=Object.getOwnPropertyNames(r),l=t.length;l-- >0;)i=t[l],(!d||d(i,r,o))&&!a[i]&&(o[i]=r[i],a[i]=!0);r=e!==!1&&Lw(r)}while(r&&(!e||e(r,o))&&r!==Object.prototype);return o},aF=(r,o,e)=>{r=String(r),(e===void 0||e>r.length)&&(e=r.length),e-=o.length;const d=r.indexOf(o,e);return d!==-1&&d===e},wF=r=>{if(!r)return null;if($d(r))return r;let o=r.length;if(!fp(o))return null;const e=new Array(o);for(;o-- >0;)e[o]=r[o];return e},bF=(r=>o=>r&&o instanceof r)(typeof Uint8Array<"u"&&Lw(Uint8Array)),nF=(r,o)=>{const d=(r&&r[Ai]).call(r);let t;for(;(t=d.next())&&!t.done;){const l=t.value;o.call(r,l[0],l[1])}},sF=(r,o)=>{let e;const d=[];for(;(e=r.exec(o))!==null;)d.push(e);return d},pF=Yo("HTMLFormElement"),fF=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,d,t){return d.toUpperCase()+t}),kp=(({hasOwnProperty:r})=>(o,e)=>r.call(o,e))(Object.prototype),hF=Yo("RegExp"),xp=(r,o)=>{const e=Object.getOwnPropertyDescriptors(r),d={};jt(e,(t,l)=>{let i;(i=o(t,l,r))!==!1&&(d[l]=i||t)}),Object.defineProperties(r,d)},mF=r=>{xp(r,(o,e)=>{if(ho(r)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const d=r[e];if(ho(d)){if(o.enumerable=!1,"writable"in o){o.writable=!1;return}o.set||(o.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},kF=(r,o)=>{const e={},d=t=>{t.forEach(l=>{e[l]=!0})};return $d(r)?d(r):d(String(r).split(o)),e},xF=()=>{},gF=(r,o)=>r!=null&&Number.isFinite(r=+r)?r:o;function cF(r){return!!(r&&ho(r.append)&&r[sp]==="FormData"&&r[Ai])}const uF=r=>{const o=new Array(10),e=(d,t)=>{if(Lt(d)){if(o.indexOf(d)>=0)return;if(Ut(d))return d;if(!("toJSON"in d)){o[t]=d;const l=$d(d)?[]:{};return jt(d,(i,a)=>{const w=e(i,t+1);!Ud(w)&&(l[a]=w)}),o[t]=void 0,l}}return d};return e(r,0)},FF=Yo("AsyncFunction"),AF=r=>r&&(Lt(r)||ho(r))&&ho(r.then)&&ho(r.catch),gp=((r,o)=>r?setImmediate:o?((e,d)=>(wd.addEventListener("message",({source:t,data:l})=>{t===wd&&l===e&&d.length&&d.shift()()},!1),t=>{d.push(t),wd.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",ho(wd.postMessage)),yF=typeof queueMicrotask<"u"?queueMicrotask.bind(wd):typeof process<"u"&&process.nextTick||gp,U={isArray:$d,isArrayBuffer:pp,isBuffer:Ut,isFormData:X5,isArrayBufferView:j5,isString:z5,isNumber:fp,isBoolean:V5,isObject:Lt,isPlainObject:Di,isEmptyObject:H5,isReadableStream:J5,isRequest:Q5,isResponse:rF,isHeaders:oF,isUndefined:Ud,isDate:q5,isFile:W5,isBlob:K5,isRegExp:hF,isFunction:ho,isStream:G5,isURLSearchParams:Z5,isTypedArray:bF,isFileList:Y5,forEach:jt,merge:jw,extend:dF,trim:eF,stripBOM:tF,inherits:lF,toFlatObject:iF,kindOf:yi,kindOfTest:Yo,endsWith:aF,toArray:wF,forEachEntry:nF,matchAll:sF,isHTMLForm:pF,hasOwnProperty:kp,hasOwnProp:kp,reduceDescriptors:xp,freezeMethods:mF,toObjectSet:kF,toCamelCase:fF,noop:xF,toFiniteNumber:gF,findKey:hp,global:wd,isContextDefined:mp,isSpecCompliantForm:cF,toJSONObject:uF,isAsyncFn:FF,isThenable:AF,setImmediate:gp,asap:yF,isIterable:r=>r!=null&&ho(r[Ai])};function br(r,o,e,d,t){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",o&&(this.code=o),e&&(this.config=e),d&&(this.request=d),t&&(this.response=t,this.status=t.status?t.status:null)}U.inherits(br,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:U.toJSONObject(this.config),code:this.code,status:this.status}}});const cp=br.prototype,up={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{up[r]={value:r}}),Object.defineProperties(br,up),Object.defineProperty(cp,"isAxiosError",{value:!0}),br.from=(r,o,e,d,t,l)=>{const i=Object.create(cp);U.toFlatObject(r,i,function(n){return n!==Error.prototype},b=>b!=="isAxiosError");const a=r&&r.message?r.message:"Error",w=o==null&&r?r.code:o;return br.call(i,a,w,e,d,t),r&&i.cause==null&&Object.defineProperty(i,"cause",{value:r,configurable:!0}),i.name=r&&r.name||"Error",l&&Object.assign(i,l),i};const EF=null;function zw(r){return U.isPlainObject(r)||U.isArray(r)}function Fp(r){return U.endsWith(r,"[]")?r.slice(0,-2):r}function Ap(r,o,e){return r?r.concat(o).map(function(t,l){return t=Fp(t),!e&&l?"["+t+"]":t}).join(e?".":""):o}function DF(r){return U.isArray(r)&&!r.some(zw)}const vF=U.toFlatObject(U,{},null,function(o){return/^is[A-Z]/.test(o)});function vi(r,o,e){if(!U.isObject(r))throw new TypeError("target must be an object");o=o||new FormData,e=U.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,k){return!U.isUndefined(k[f])});const d=e.metaTokens,t=e.visitor||n,l=e.dots,i=e.indexes,w=(e.Blob||typeof Blob<"u"&&Blob)&&U.isSpecCompliantForm(o);if(!U.isFunction(t))throw new TypeError("visitor must be a function");function b(h){if(h===null)return"";if(U.isDate(h))return h.toISOString();if(U.isBoolean(h))return h.toString();if(!w&&U.isBlob(h))throw new br("Blob is not supported. Use a Buffer instead.");return U.isArrayBuffer(h)||U.isTypedArray(h)?w&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function n(h,f,k){let x=h;if(h&&!k&&typeof h=="object"){if(U.endsWith(f,"{}"))f=d?f:f.slice(0,-2),h=JSON.stringify(h);else if(U.isArray(h)&&DF(h)||(U.isFileList(h)||U.endsWith(f,"[]"))&&(x=U.toArray(h)))return f=Fp(f),x.forEach(function(E,y){!(U.isUndefined(E)||E===null)&&o.append(i===!0?Ap([f],y,l):i===null?f:f+"[]",b(E))}),!1}return zw(h)?!0:(o.append(Ap(k,f,l),b(h)),!1)}const s=[],p=Object.assign(vF,{defaultVisitor:n,convertValue:b,isVisitable:zw});function m(h,f){if(!U.isUndefined(h)){if(s.indexOf(h)!==-1)throw Error("Circular reference detected in "+f.join("."));s.push(h),U.forEach(h,function(x,c){(!(U.isUndefined(x)||x===null)&&t.call(o,x,U.isString(c)?c.trim():c,f,p))===!0&&m(x,f?f.concat(c):[c])}),s.pop()}}if(!U.isObject(r))throw new TypeError("data must be an object");return m(r),o}function yp(r){const o={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(d){return o[d]})}function Vw(r,o){this._pairs=[],r&&vi(r,this,o)}const Ep=Vw.prototype;Ep.append=function(o,e){this._pairs.push([o,e])},Ep.toString=function(o){const e=o?function(d){return o.call(this,d,yp)}:yp;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function SF(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Dp(r,o,e){if(!o)return r;const d=e&&e.encode||SF;U.isFunction(e)&&(e={serialize:e});const t=e&&e.serialize;let l;if(t?l=t(o,e):l=U.isURLSearchParams(o)?o.toString():new Vw(o,e).toString(d),l){const i=r.indexOf("#");i!==-1&&(r=r.slice(0,i)),r+=(r.indexOf("?")===-1?"?":"&")+l}return r}class vp{constructor(){this.handlers=[]}use(o,e,d){return this.handlers.push({fulfilled:o,rejected:e,synchronous:d?d.synchronous:!1,runWhen:d?d.runWhen:null}),this.handlers.length-1}eject(o){this.handlers[o]&&(this.handlers[o]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(o){U.forEach(this.handlers,function(d){d!==null&&o(d)})}}const Sp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_F={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Vw,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Hw=typeof window<"u"&&typeof document<"u",qw=typeof navigator=="object"&&navigator||void 0,CF=Hw&&(!qw||["ReactNative","NativeScript","NS"].indexOf(qw.product)<0),BF=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",IF=Hw&&window.location.href||"http://localhost",io={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hw,hasStandardBrowserEnv:CF,hasStandardBrowserWebWorkerEnv:BF,navigator:qw,origin:IF},Symbol.toStringTag,{value:"Module"})),..._F};function TF(r,o){return vi(r,new io.classes.URLSearchParams,{visitor:function(e,d,t,l){return io.isNode&&U.isBuffer(e)?(this.append(d,e.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...o})}function NF(r){return U.matchAll(/\w+|\[(\w*)]/g,r).map(o=>o[0]==="[]"?"":o[1]||o[0])}function PF(r){const o={},e=Object.keys(r);let d;const t=e.length;let l;for(d=0;d<t;d++)l=e[d],o[l]=r[l];return o}function _p(r){function o(e,d,t,l){let i=e[l++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),w=l>=e.length;return i=!i&&U.isArray(t)?t.length:i,w?(U.hasOwnProp(t,i)?t[i]=[t[i],d]:t[i]=d,!a):((!t[i]||!U.isObject(t[i]))&&(t[i]=[]),o(e,d,t[i],l)&&U.isArray(t[i])&&(t[i]=PF(t[i])),!a)}if(U.isFormData(r)&&U.isFunction(r.entries)){const e={};return U.forEachEntry(r,(d,t)=>{o(NF(d),t,e,0)}),e}return null}function OF(r,o,e){if(U.isString(r))try{return(o||JSON.parse)(r),U.trim(r)}catch(d){if(d.name!=="SyntaxError")throw d}return(e||JSON.stringify)(r)}const zt={transitional:Sp,adapter:["xhr","http","fetch"],transformRequest:[function(o,e){const d=e.getContentType()||"",t=d.indexOf("application/json")>-1,l=U.isObject(o);if(l&&U.isHTMLForm(o)&&(o=new FormData(o)),U.isFormData(o))return t?JSON.stringify(_p(o)):o;if(U.isArrayBuffer(o)||U.isBuffer(o)||U.isStream(o)||U.isFile(o)||U.isBlob(o)||U.isReadableStream(o))return o;if(U.isArrayBufferView(o))return o.buffer;if(U.isURLSearchParams(o))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),o.toString();let a;if(l){if(d.indexOf("application/x-www-form-urlencoded")>-1)return TF(o,this.formSerializer).toString();if((a=U.isFileList(o))||d.indexOf("multipart/form-data")>-1){const w=this.env&&this.env.FormData;return vi(a?{"files[]":o}:o,w&&new w,this.formSerializer)}}return l||t?(e.setContentType("application/json",!1),OF(o)):o}],transformResponse:[function(o){const e=this.transitional||zt.transitional,d=e&&e.forcedJSONParsing,t=this.responseType==="json";if(U.isResponse(o)||U.isReadableStream(o))return o;if(o&&U.isString(o)&&(d&&!this.responseType||t)){const i=!(e&&e.silentJSONParsing)&&t;try{return JSON.parse(o,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?br.from(a,br.ERR_BAD_RESPONSE,this,null,this.response):a}}return o}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:io.classes.FormData,Blob:io.classes.Blob},validateStatus:function(o){return o>=200&&o<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};U.forEach(["delete","get","head","post","put","patch"],r=>{zt.headers[r]={}});const RF=U.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),MF=r=>{const o={};let e,d,t;return r&&r.split(`
145
+ `)),n3.configure(r)}},unstable_useEnhancedEffect:i3,unstable_useId:cc,unsupportedProp:uc,useControlled:Fc,useEventCallback:Ac,useForkRef:yc,useIsFocusVisible:Ic},Symbol.toStringTag,{value:"Module"})));var wp;function je(){return wp||(wp=1,function(r){"use client";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o.createSvgIcon}});var o=P5}(ww)),ww}var bp;function O5(){if(bp)return Dt;bp=1;var r=Qo();Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.default=void 0;var o=r(je()),e=he();return Dt.default=(0,o.default)((0,e.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),Dt}var R5=O5();const M5=zo(R5),$5=r=>r.map((o,e)=>({id:o.id,data:{label:o.value,color:o.statusColor},position:{x:100,y:100+e*100},type:"customHandle"}));function U5(r){const o={};return r?.forEach(({source:e,target:d,data:t})=>{o[e]||(o[e]={next:[],transitions:[]}),o[e].next.push(d),o[e].transitions.push({to:d,permission:t?.permission||"All users",requiredColumns:t?.requiredColumns||[],condition:t?.condition||""})}),Object.entries(o).map(([e,{next:d,transitions:t}])=>({stage:e,next:d,transitions:t}))}function np(r,o){return function(){return r.apply(o,arguments)}}const{toString:L5}=Object.prototype,{getPrototypeOf:Lw}=Object,{iterator:Ai,toStringTag:sp}=Symbol,yi=(r=>o=>{const e=L5.call(o);return r[e]||(r[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Yo=r=>(r=r.toLowerCase(),o=>yi(o)===r),Ei=r=>o=>typeof o===r,{isArray:$d}=Array,Ud=Ei("undefined");function Ut(r){return r!==null&&!Ud(r)&&r.constructor!==null&&!Ud(r.constructor)&&ho(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const pp=Yo("ArrayBuffer");function j5(r){let o;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?o=ArrayBuffer.isView(r):o=r&&r.buffer&&pp(r.buffer),o}const z5=Ei("string"),ho=Ei("function"),fp=Ei("number"),Lt=r=>r!==null&&typeof r=="object",V5=r=>r===!0||r===!1,Di=r=>{if(yi(r)!=="object")return!1;const o=Lw(r);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(sp in r)&&!(Ai in r)},H5=r=>{if(!Lt(r)||Ut(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},q5=Yo("Date"),W5=Yo("File"),K5=Yo("Blob"),Y5=Yo("FileList"),G5=r=>Lt(r)&&ho(r.pipe),X5=r=>{let o;return r&&(typeof FormData=="function"&&r instanceof FormData||ho(r.append)&&((o=yi(r))==="formdata"||o==="object"&&ho(r.toString)&&r.toString()==="[object FormData]"))},Z5=Yo("URLSearchParams"),[J5,Q5,rF,oF]=["ReadableStream","Request","Response","Headers"].map(Yo),eF=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jt(r,o,{allOwnKeys:e=!1}={}){if(r===null||typeof r>"u")return;let d,t;if(typeof r!="object"&&(r=[r]),$d(r))for(d=0,t=r.length;d<t;d++)o.call(null,r[d],d,r);else{if(Ut(r))return;const l=e?Object.getOwnPropertyNames(r):Object.keys(r),i=l.length;let a;for(d=0;d<i;d++)a=l[d],o.call(null,r[a],a,r)}}function hp(r,o){if(Ut(r))return null;o=o.toLowerCase();const e=Object.keys(r);let d=e.length,t;for(;d-- >0;)if(t=e[d],o===t.toLowerCase())return t;return null}const wd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,mp=r=>!Ud(r)&&r!==wd;function jw(){const{caseless:r,skipUndefined:o}=mp(this)&&this||{},e={},d=(t,l)=>{const i=r&&hp(e,l)||l;Di(e[i])&&Di(t)?e[i]=jw(e[i],t):Di(t)?e[i]=jw({},t):$d(t)?e[i]=t.slice():(!o||!Ud(t))&&(e[i]=t)};for(let t=0,l=arguments.length;t<l;t++)arguments[t]&&jt(arguments[t],d);return e}const dF=(r,o,e,{allOwnKeys:d}={})=>(jt(o,(t,l)=>{e&&ho(t)?r[l]=np(t,e):r[l]=t},{allOwnKeys:d}),r),tF=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),lF=(r,o,e,d)=>{r.prototype=Object.create(o.prototype,d),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:o.prototype}),e&&Object.assign(r.prototype,e)},iF=(r,o,e,d)=>{let t,l,i;const a={};if(o=o||{},r==null)return o;do{for(t=Object.getOwnPropertyNames(r),l=t.length;l-- >0;)i=t[l],(!d||d(i,r,o))&&!a[i]&&(o[i]=r[i],a[i]=!0);r=e!==!1&&Lw(r)}while(r&&(!e||e(r,o))&&r!==Object.prototype);return o},aF=(r,o,e)=>{r=String(r),(e===void 0||e>r.length)&&(e=r.length),e-=o.length;const d=r.indexOf(o,e);return d!==-1&&d===e},wF=r=>{if(!r)return null;if($d(r))return r;let o=r.length;if(!fp(o))return null;const e=new Array(o);for(;o-- >0;)e[o]=r[o];return e},bF=(r=>o=>r&&o instanceof r)(typeof Uint8Array<"u"&&Lw(Uint8Array)),nF=(r,o)=>{const d=(r&&r[Ai]).call(r);let t;for(;(t=d.next())&&!t.done;){const l=t.value;o.call(r,l[0],l[1])}},sF=(r,o)=>{let e;const d=[];for(;(e=r.exec(o))!==null;)d.push(e);return d},pF=Yo("HTMLFormElement"),fF=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,d,t){return d.toUpperCase()+t}),kp=(({hasOwnProperty:r})=>(o,e)=>r.call(o,e))(Object.prototype),hF=Yo("RegExp"),xp=(r,o)=>{const e=Object.getOwnPropertyDescriptors(r),d={};jt(e,(t,l)=>{let i;(i=o(t,l,r))!==!1&&(d[l]=i||t)}),Object.defineProperties(r,d)},mF=r=>{xp(r,(o,e)=>{if(ho(r)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const d=r[e];if(ho(d)){if(o.enumerable=!1,"writable"in o){o.writable=!1;return}o.set||(o.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},kF=(r,o)=>{const e={},d=t=>{t.forEach(l=>{e[l]=!0})};return $d(r)?d(r):d(String(r).split(o)),e},xF=()=>{},gF=(r,o)=>r!=null&&Number.isFinite(r=+r)?r:o;function cF(r){return!!(r&&ho(r.append)&&r[sp]==="FormData"&&r[Ai])}const uF=r=>{const o=new Array(10),e=(d,t)=>{if(Lt(d)){if(o.indexOf(d)>=0)return;if(Ut(d))return d;if(!("toJSON"in d)){o[t]=d;const l=$d(d)?[]:{};return jt(d,(i,a)=>{const w=e(i,t+1);!Ud(w)&&(l[a]=w)}),o[t]=void 0,l}}return d};return e(r,0)},FF=Yo("AsyncFunction"),AF=r=>r&&(Lt(r)||ho(r))&&ho(r.then)&&ho(r.catch),gp=((r,o)=>r?setImmediate:o?((e,d)=>(wd.addEventListener("message",({source:t,data:l})=>{t===wd&&l===e&&d.length&&d.shift()()},!1),t=>{d.push(t),wd.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",ho(wd.postMessage)),yF=typeof queueMicrotask<"u"?queueMicrotask.bind(wd):typeof process<"u"&&process.nextTick||gp,U={isArray:$d,isArrayBuffer:pp,isBuffer:Ut,isFormData:X5,isArrayBufferView:j5,isString:z5,isNumber:fp,isBoolean:V5,isObject:Lt,isPlainObject:Di,isEmptyObject:H5,isReadableStream:J5,isRequest:Q5,isResponse:rF,isHeaders:oF,isUndefined:Ud,isDate:q5,isFile:W5,isBlob:K5,isRegExp:hF,isFunction:ho,isStream:G5,isURLSearchParams:Z5,isTypedArray:bF,isFileList:Y5,forEach:jt,merge:jw,extend:dF,trim:eF,stripBOM:tF,inherits:lF,toFlatObject:iF,kindOf:yi,kindOfTest:Yo,endsWith:aF,toArray:wF,forEachEntry:nF,matchAll:sF,isHTMLForm:pF,hasOwnProperty:kp,hasOwnProp:kp,reduceDescriptors:xp,freezeMethods:mF,toObjectSet:kF,toCamelCase:fF,noop:xF,toFiniteNumber:gF,findKey:hp,global:wd,isContextDefined:mp,isSpecCompliantForm:cF,toJSONObject:uF,isAsyncFn:FF,isThenable:AF,setImmediate:gp,asap:yF,isIterable:r=>r!=null&&ho(r[Ai])};function br(r,o,e,d,t){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",o&&(this.code=o),e&&(this.config=e),d&&(this.request=d),t&&(this.response=t,this.status=t.status?t.status:null)}U.inherits(br,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:U.toJSONObject(this.config),code:this.code,status:this.status}}});const cp=br.prototype,up={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{up[r]={value:r}}),Object.defineProperties(br,up),Object.defineProperty(cp,"isAxiosError",{value:!0}),br.from=(r,o,e,d,t,l)=>{const i=Object.create(cp);U.toFlatObject(r,i,function(n){return n!==Error.prototype},b=>b!=="isAxiosError");const a=r&&r.message?r.message:"Error",w=o==null&&r?r.code:o;return br.call(i,a,w,e,d,t),r&&i.cause==null&&Object.defineProperty(i,"cause",{value:r,configurable:!0}),i.name=r&&r.name||"Error",l&&Object.assign(i,l),i};const EF=null;function zw(r){return U.isPlainObject(r)||U.isArray(r)}function Fp(r){return U.endsWith(r,"[]")?r.slice(0,-2):r}function Ap(r,o,e){return r?r.concat(o).map(function(t,l){return t=Fp(t),!e&&l?"["+t+"]":t}).join(e?".":""):o}function DF(r){return U.isArray(r)&&!r.some(zw)}const vF=U.toFlatObject(U,{},null,function(o){return/^is[A-Z]/.test(o)});function vi(r,o,e){if(!U.isObject(r))throw new TypeError("target must be an object");o=o||new FormData,e=U.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,k){return!U.isUndefined(k[f])});const d=e.metaTokens,t=e.visitor||n,l=e.dots,i=e.indexes,w=(e.Blob||typeof Blob<"u"&&Blob)&&U.isSpecCompliantForm(o);if(!U.isFunction(t))throw new TypeError("visitor must be a function");function b(h){if(h===null)return"";if(U.isDate(h))return h.toISOString();if(U.isBoolean(h))return h.toString();if(!w&&U.isBlob(h))throw new br("Blob is not supported. Use a Buffer instead.");return U.isArrayBuffer(h)||U.isTypedArray(h)?w&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function n(h,f,k){let x=h;if(h&&!k&&typeof h=="object"){if(U.endsWith(f,"{}"))f=d?f:f.slice(0,-2),h=JSON.stringify(h);else if(U.isArray(h)&&DF(h)||(U.isFileList(h)||U.endsWith(f,"[]"))&&(x=U.toArray(h)))return f=Fp(f),x.forEach(function(E,y){!(U.isUndefined(E)||E===null)&&o.append(i===!0?Ap([f],y,l):i===null?f:f+"[]",b(E))}),!1}return zw(h)?!0:(o.append(Ap(k,f,l),b(h)),!1)}const s=[],p=Object.assign(vF,{defaultVisitor:n,convertValue:b,isVisitable:zw});function m(h,f){if(!U.isUndefined(h)){if(s.indexOf(h)!==-1)throw Error("Circular reference detected in "+f.join("."));s.push(h),U.forEach(h,function(x,c){(!(U.isUndefined(x)||x===null)&&t.call(o,x,U.isString(c)?c.trim():c,f,p))===!0&&m(x,f?f.concat(c):[c])}),s.pop()}}if(!U.isObject(r))throw new TypeError("data must be an object");return m(r),o}function yp(r){const o={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(d){return o[d]})}function Vw(r,o){this._pairs=[],r&&vi(r,this,o)}const Ep=Vw.prototype;Ep.append=function(o,e){this._pairs.push([o,e])},Ep.toString=function(o){const e=o?function(d){return o.call(this,d,yp)}:yp;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function SF(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Dp(r,o,e){if(!o)return r;const d=e&&e.encode||SF;U.isFunction(e)&&(e={serialize:e});const t=e&&e.serialize;let l;if(t?l=t(o,e):l=U.isURLSearchParams(o)?o.toString():new Vw(o,e).toString(d),l){const i=r.indexOf("#");i!==-1&&(r=r.slice(0,i)),r+=(r.indexOf("?")===-1?"?":"&")+l}return r}class vp{constructor(){this.handlers=[]}use(o,e,d){return this.handlers.push({fulfilled:o,rejected:e,synchronous:d?d.synchronous:!1,runWhen:d?d.runWhen:null}),this.handlers.length-1}eject(o){this.handlers[o]&&(this.handlers[o]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(o){U.forEach(this.handlers,function(d){d!==null&&o(d)})}}const Sp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_F={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Vw,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Hw=typeof window<"u"&&typeof document<"u",qw=typeof navigator=="object"&&navigator||void 0,CF=Hw&&(!qw||["ReactNative","NativeScript","NS"].indexOf(qw.product)<0),BF=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",IF=Hw&&window.location.href||"http://localhost",io={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hw,hasStandardBrowserEnv:CF,hasStandardBrowserWebWorkerEnv:BF,navigator:qw,origin:IF},Symbol.toStringTag,{value:"Module"})),..._F};function TF(r,o){return vi(r,new io.classes.URLSearchParams,{visitor:function(e,d,t,l){return io.isNode&&U.isBuffer(e)?(this.append(d,e.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...o})}function NF(r){return U.matchAll(/\w+|\[(\w*)]/g,r).map(o=>o[0]==="[]"?"":o[1]||o[0])}function PF(r){const o={},e=Object.keys(r);let d;const t=e.length;let l;for(d=0;d<t;d++)l=e[d],o[l]=r[l];return o}function _p(r){function o(e,d,t,l){let i=e[l++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),w=l>=e.length;return i=!i&&U.isArray(t)?t.length:i,w?(U.hasOwnProp(t,i)?t[i]=[t[i],d]:t[i]=d,!a):((!t[i]||!U.isObject(t[i]))&&(t[i]=[]),o(e,d,t[i],l)&&U.isArray(t[i])&&(t[i]=PF(t[i])),!a)}if(U.isFormData(r)&&U.isFunction(r.entries)){const e={};return U.forEachEntry(r,(d,t)=>{o(NF(d),t,e,0)}),e}return null}function OF(r,o,e){if(U.isString(r))try{return(o||JSON.parse)(r),U.trim(r)}catch(d){if(d.name!=="SyntaxError")throw d}return(e||JSON.stringify)(r)}const zt={transitional:Sp,adapter:["xhr","http","fetch"],transformRequest:[function(o,e){const d=e.getContentType()||"",t=d.indexOf("application/json")>-1,l=U.isObject(o);if(l&&U.isHTMLForm(o)&&(o=new FormData(o)),U.isFormData(o))return t?JSON.stringify(_p(o)):o;if(U.isArrayBuffer(o)||U.isBuffer(o)||U.isStream(o)||U.isFile(o)||U.isBlob(o)||U.isReadableStream(o))return o;if(U.isArrayBufferView(o))return o.buffer;if(U.isURLSearchParams(o))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),o.toString();let a;if(l){if(d.indexOf("application/x-www-form-urlencoded")>-1)return TF(o,this.formSerializer).toString();if((a=U.isFileList(o))||d.indexOf("multipart/form-data")>-1){const w=this.env&&this.env.FormData;return vi(a?{"files[]":o}:o,w&&new w,this.formSerializer)}}return l||t?(e.setContentType("application/json",!1),OF(o)):o}],transformResponse:[function(o){const e=this.transitional||zt.transitional,d=e&&e.forcedJSONParsing,t=this.responseType==="json";if(U.isResponse(o)||U.isReadableStream(o))return o;if(o&&U.isString(o)&&(d&&!this.responseType||t)){const i=!(e&&e.silentJSONParsing)&&t;try{return JSON.parse(o,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?br.from(a,br.ERR_BAD_RESPONSE,this,null,this.response):a}}return o}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:io.classes.FormData,Blob:io.classes.Blob},validateStatus:function(o){return o>=200&&o<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};U.forEach(["delete","get","head","post","put","patch"],r=>{zt.headers[r]={}});const RF=U.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),MF=r=>{const o={};let e,d,t;return r&&r.split(`
146
146
  `).forEach(function(i){t=i.indexOf(":"),e=i.substring(0,t).trim().toLowerCase(),d=i.substring(t+1).trim(),!(!e||o[e]&&RF[e])&&(e==="set-cookie"?o[e]?o[e].push(d):o[e]=[d]:o[e]=o[e]?o[e]+", "+d:d)}),o},Cp=Symbol("internals");function Vt(r){return r&&String(r).trim().toLowerCase()}function Si(r){return r===!1||r==null?r:U.isArray(r)?r.map(Si):String(r)}function $F(r){const o=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let d;for(;d=e.exec(r);)o[d[1]]=d[2];return o}const UF=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function Ww(r,o,e,d,t){if(U.isFunction(d))return d.call(this,o,e);if(t&&(o=e),!!U.isString(o)){if(U.isString(d))return o.indexOf(d)!==-1;if(U.isRegExp(d))return d.test(o)}}function LF(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(o,e,d)=>e.toUpperCase()+d)}function jF(r,o){const e=U.toCamelCase(" "+o);["get","set","has"].forEach(d=>{Object.defineProperty(r,d+e,{value:function(t,l,i){return this[d].call(this,o,t,l,i)},configurable:!0})})}let mo=class{constructor(o){o&&this.set(o)}set(o,e,d){const t=this;function l(a,w,b){const n=Vt(w);if(!n)throw new Error("header name must be a non-empty string");const s=U.findKey(t,n);(!s||t[s]===void 0||b===!0||b===void 0&&t[s]!==!1)&&(t[s||w]=Si(a))}const i=(a,w)=>U.forEach(a,(b,n)=>l(b,n,w));if(U.isPlainObject(o)||o instanceof this.constructor)i(o,e);else if(U.isString(o)&&(o=o.trim())&&!UF(o))i(MF(o),e);else if(U.isObject(o)&&U.isIterable(o)){let a={},w,b;for(const n of o){if(!U.isArray(n))throw TypeError("Object iterator must return a key-value pair");a[b=n[0]]=(w=a[b])?U.isArray(w)?[...w,n[1]]:[w,n[1]]:n[1]}i(a,e)}else o!=null&&l(e,o,d);return this}get(o,e){if(o=Vt(o),o){const d=U.findKey(this,o);if(d){const t=this[d];if(!e)return t;if(e===!0)return $F(t);if(U.isFunction(e))return e.call(this,t,d);if(U.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(o,e){if(o=Vt(o),o){const d=U.findKey(this,o);return!!(d&&this[d]!==void 0&&(!e||Ww(this,this[d],d,e)))}return!1}delete(o,e){const d=this;let t=!1;function l(i){if(i=Vt(i),i){const a=U.findKey(d,i);a&&(!e||Ww(d,d[a],a,e))&&(delete d[a],t=!0)}}return U.isArray(o)?o.forEach(l):l(o),t}clear(o){const e=Object.keys(this);let d=e.length,t=!1;for(;d--;){const l=e[d];(!o||Ww(this,this[l],l,o,!0))&&(delete this[l],t=!0)}return t}normalize(o){const e=this,d={};return U.forEach(this,(t,l)=>{const i=U.findKey(d,l);if(i){e[i]=Si(t),delete e[l];return}const a=o?LF(l):String(l).trim();a!==l&&delete e[l],e[a]=Si(t),d[a]=!0}),this}concat(...o){return this.constructor.concat(this,...o)}toJSON(o){const e=Object.create(null);return U.forEach(this,(d,t)=>{d!=null&&d!==!1&&(e[t]=o&&U.isArray(d)?d.join(", "):d)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([o,e])=>o+": "+e).join(`
147
147
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(o){return o instanceof this?o:new this(o)}static concat(o,...e){const d=new this(o);return e.forEach(t=>d.set(t)),d}static accessor(o){const d=(this[Cp]=this[Cp]={accessors:{}}).accessors,t=this.prototype;function l(i){const a=Vt(i);d[a]||(jF(t,i),d[a]=!0)}return U.isArray(o)?o.forEach(l):l(o),this}};mo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),U.reduceDescriptors(mo.prototype,({value:r},o)=>{let e=o[0].toUpperCase()+o.slice(1);return{get:()=>r,set(d){this[e]=d}}}),U.freezeMethods(mo);function Kw(r,o){const e=this||zt,d=o||e,t=mo.from(d.headers);let l=d.data;return U.forEach(r,function(a){l=a.call(e,l,t.normalize(),o?o.status:void 0)}),t.normalize(),l}function Bp(r){return!!(r&&r.__CANCEL__)}function Ld(r,o,e){br.call(this,r??"canceled",br.ERR_CANCELED,o,e),this.name="CanceledError"}U.inherits(Ld,br,{__CANCEL__:!0});function Ip(r,o,e){const d=e.config.validateStatus;!e.status||!d||d(e.status)?r(e):o(new br("Request failed with status code "+e.status,[br.ERR_BAD_REQUEST,br.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function zF(r){const o=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return o&&o[1]||""}function VF(r,o){r=r||10;const e=new Array(r),d=new Array(r);let t=0,l=0,i;return o=o!==void 0?o:1e3,function(w){const b=Date.now(),n=d[l];i||(i=b),e[t]=w,d[t]=b;let s=l,p=0;for(;s!==t;)p+=e[s++],s=s%r;if(t=(t+1)%r,t===l&&(l=(l+1)%r),b-i<o)return;const m=n&&b-n;return m?Math.round(p*1e3/m):void 0}}function HF(r,o){let e=0,d=1e3/o,t,l;const i=(b,n=Date.now())=>{e=n,t=null,l&&(clearTimeout(l),l=null),r(...b)};return[(...b)=>{const n=Date.now(),s=n-e;s>=d?i(b,n):(t=b,l||(l=setTimeout(()=>{l=null,i(t)},d-s)))},()=>t&&i(t)]}const _i=(r,o,e=3)=>{let d=0;const t=VF(50,250);return HF(l=>{const i=l.loaded,a=l.lengthComputable?l.total:void 0,w=i-d,b=t(w),n=i<=a;d=i;const s={loaded:i,total:a,progress:a?i/a:void 0,bytes:w,rate:b||void 0,estimated:b&&a&&n?(a-i)/b:void 0,event:l,lengthComputable:a!=null,[o?"download":"upload"]:!0};r(s)},e)},Tp=(r,o)=>{const e=r!=null;return[d=>o[0]({lengthComputable:e,total:r,loaded:d}),o[1]]},Np=r=>(...o)=>U.asap(()=>r(...o)),qF=io.hasStandardBrowserEnv?((r,o)=>e=>(e=new URL(e,io.origin),r.protocol===e.protocol&&r.host===e.host&&(o||r.port===e.port)))(new URL(io.origin),io.navigator&&/(msie|trident)/i.test(io.navigator.userAgent)):()=>!0,WF=io.hasStandardBrowserEnv?{write(r,o,e,d,t,l){const i=[r+"="+encodeURIComponent(o)];U.isNumber(e)&&i.push("expires="+new Date(e).toGMTString()),U.isString(d)&&i.push("path="+d),U.isString(t)&&i.push("domain="+t),l===!0&&i.push("secure"),document.cookie=i.join("; ")},read(r){const o=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function KF(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function YF(r,o){return o?r.replace(/\/?\/$/,"")+"/"+o.replace(/^\/+/,""):r}function Pp(r,o,e){let d=!KF(o);return r&&(d||e==!1)?YF(r,o):o}const Op=r=>r instanceof mo?{...r}:r;function bd(r,o){o=o||{};const e={};function d(b,n,s,p){return U.isPlainObject(b)&&U.isPlainObject(n)?U.merge.call({caseless:p},b,n):U.isPlainObject(n)?U.merge({},n):U.isArray(n)?n.slice():n}function t(b,n,s,p){if(U.isUndefined(n)){if(!U.isUndefined(b))return d(void 0,b,s,p)}else return d(b,n,s,p)}function l(b,n){if(!U.isUndefined(n))return d(void 0,n)}function i(b,n){if(U.isUndefined(n)){if(!U.isUndefined(b))return d(void 0,b)}else return d(void 0,n)}function a(b,n,s){if(s in o)return d(b,n);if(s in r)return d(void 0,b)}const w={url:l,method:l,data:l,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(b,n,s)=>t(Op(b),Op(n),s,!0)};return U.forEach(Object.keys({...r,...o}),function(n){const s=w[n]||t,p=s(r[n],o[n],n);U.isUndefined(p)&&s!==a||(e[n]=p)}),e}const Rp=r=>{const o=bd({},r);let{data:e,withXSRFToken:d,xsrfHeaderName:t,xsrfCookieName:l,headers:i,auth:a}=o;if(o.headers=i=mo.from(i),o.url=Dp(Pp(o.baseURL,o.url,o.allowAbsoluteUrls),r.params,r.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),U.isFormData(e)){if(io.hasStandardBrowserEnv||io.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(U.isFunction(e.getHeaders)){const w=e.getHeaders(),b=["content-type","content-length"];Object.entries(w).forEach(([n,s])=>{b.includes(n.toLowerCase())&&i.set(n,s)})}}if(io.hasStandardBrowserEnv&&(d&&U.isFunction(d)&&(d=d(o)),d||d!==!1&&qF(o.url))){const w=t&&l&&WF.read(l);w&&i.set(t,w)}return o},GF=typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(e,d){const t=Rp(r);let l=t.data;const i=mo.from(t.headers).normalize();let{responseType:a,onUploadProgress:w,onDownloadProgress:b}=t,n,s,p,m,h;function f(){m&&m(),h&&h(),t.cancelToken&&t.cancelToken.unsubscribe(n),t.signal&&t.signal.removeEventListener("abort",n)}let k=new XMLHttpRequest;k.open(t.method.toUpperCase(),t.url,!0),k.timeout=t.timeout;function x(){if(!k)return;const E=mo.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),F={data:!a||a==="text"||a==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:E,config:r,request:k};Ip(function(D){e(D),f()},function(D){d(D),f()},F),k=null}"onloadend"in k?k.onloadend=x:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(x)},k.onabort=function(){k&&(d(new br("Request aborted",br.ECONNABORTED,r,k)),k=null)},k.onerror=function(y){const F=y&&y.message?y.message:"Network Error",I=new br(F,br.ERR_NETWORK,r,k);I.event=y||null,d(I),k=null},k.ontimeout=function(){let y=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const F=t.transitional||Sp;t.timeoutErrorMessage&&(y=t.timeoutErrorMessage),d(new br(y,F.clarifyTimeoutError?br.ETIMEDOUT:br.ECONNABORTED,r,k)),k=null},l===void 0&&i.setContentType(null),"setRequestHeader"in k&&U.forEach(i.toJSON(),function(y,F){k.setRequestHeader(F,y)}),U.isUndefined(t.withCredentials)||(k.withCredentials=!!t.withCredentials),a&&a!=="json"&&(k.responseType=t.responseType),b&&([p,h]=_i(b,!0),k.addEventListener("progress",p)),w&&k.upload&&([s,m]=_i(w),k.upload.addEventListener("progress",s),k.upload.addEventListener("loadend",m)),(t.cancelToken||t.signal)&&(n=E=>{k&&(d(!E||E.type?new Ld(null,r,k):E),k.abort(),k=null)},t.cancelToken&&t.cancelToken.subscribe(n),t.signal&&(t.signal.aborted?n():t.signal.addEventListener("abort",n)));const c=zF(t.url);if(c&&io.protocols.indexOf(c)===-1){d(new br("Unsupported protocol "+c+":",br.ERR_BAD_REQUEST,r));return}k.send(l||null)})},XF=(r,o)=>{const{length:e}=r=r?r.filter(Boolean):[];if(o||e){let d=new AbortController,t;const l=function(b){if(!t){t=!0,a();const n=b instanceof Error?b:this.reason;d.abort(n instanceof br?n:new Ld(n instanceof Error?n.message:n))}};let i=o&&setTimeout(()=>{i=null,l(new br(`timeout ${o} of ms exceeded`,br.ETIMEDOUT))},o);const a=()=>{r&&(i&&clearTimeout(i),i=null,r.forEach(b=>{b.unsubscribe?b.unsubscribe(l):b.removeEventListener("abort",l)}),r=null)};r.forEach(b=>b.addEventListener("abort",l));const{signal:w}=d;return w.unsubscribe=()=>U.asap(a),w}},ZF=function*(r,o){let e=r.byteLength;if(e<o){yield r;return}let d=0,t;for(;d<e;)t=d+o,yield r.slice(d,t),d=t},JF=async function*(r,o){for await(const e of QF(r))yield*ZF(e,o)},QF=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const o=r.getReader();try{for(;;){const{done:e,value:d}=await o.read();if(e)break;yield d}}finally{await o.cancel()}},Mp=(r,o,e,d)=>{const t=JF(r,o);let l=0,i,a=w=>{i||(i=!0,d&&d(w))};return new ReadableStream({async pull(w){try{const{done:b,value:n}=await t.next();if(b){a(),w.close();return}let s=n.byteLength;if(e){let p=l+=s;e(p)}w.enqueue(new Uint8Array(n))}catch(b){throw a(b),b}},cancel(w){return a(w),t.return()}},{highWaterMark:2})},$p=64*1024,{isFunction:Ci}=U,rA=(({Request:r,Response:o})=>({Request:r,Response:o}))(U.global),{ReadableStream:Up,TextEncoder:Lp}=U.global,jp=(r,...o)=>{try{return!!r(...o)}catch{return!1}},oA=r=>{r=U.merge.call({skipUndefined:!0},rA,r);const{fetch:o,Request:e,Response:d}=r,t=o?Ci(o):typeof fetch=="function",l=Ci(e),i=Ci(d);if(!t)return!1;const a=t&&Ci(Up),w=t&&(typeof Lp=="function"?(h=>f=>h.encode(f))(new Lp):async h=>new Uint8Array(await new e(h).arrayBuffer())),b=l&&a&&jp(()=>{let h=!1;const f=new e(io.origin,{body:new Up,method:"POST",get duplex(){return h=!0,"half"}}).headers.has("Content-Type");return h&&!f}),n=i&&a&&jp(()=>U.isReadableStream(new d("").body)),s={stream:n&&(h=>h.body)};t&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!s[h]&&(s[h]=(f,k)=>{let x=f&&f[h];if(x)return x.call(f);throw new br(`Response type '${h}' is not supported`,br.ERR_NOT_SUPPORT,k)})});const p=async h=>{if(h==null)return 0;if(U.isBlob(h))return h.size;if(U.isSpecCompliantForm(h))return(await new e(io.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(U.isArrayBufferView(h)||U.isArrayBuffer(h))return h.byteLength;if(U.isURLSearchParams(h)&&(h=h+""),U.isString(h))return(await w(h)).byteLength},m=async(h,f)=>{const k=U.toFiniteNumber(h.getContentLength());return k??p(f)};return async h=>{let{url:f,method:k,data:x,signal:c,cancelToken:E,timeout:y,onDownloadProgress:F,onUploadProgress:I,responseType:D,headers:v,withCredentials:_="same-origin",fetchOptions:T}=Rp(h),L=o||fetch;D=D?(D+"").toLowerCase():"text";let q=XF([c,E&&E.toAbortSignal()],y),M=null;const A=q&&q.unsubscribe&&(()=>{q.unsubscribe()});let O;try{if(I&&b&&k!=="get"&&k!=="head"&&(O=await m(v,x))!==0){let N=new e(f,{method:"POST",body:x,duplex:"half"}),z;if(U.isFormData(x)&&(z=N.headers.get("content-type"))&&v.setContentType(z),N.body){const[H,j]=Tp(O,_i(Np(I)));x=Mp(N.body,$p,H,j)}}U.isString(_)||(_=_?"include":"omit");const C=l&&"credentials"in e.prototype,$={...T,signal:q,method:k.toUpperCase(),headers:v.normalize().toJSON(),body:x,duplex:"half",credentials:C?_:void 0};M=l&&new e(f,$);let V=await(l?L(M,T):L(f,$));const P=n&&(D==="stream"||D==="response");if(n&&(F||P&&A)){const N={};["status","statusText","headers"].forEach(W=>{N[W]=V[W]});const z=U.toFiniteNumber(V.headers.get("content-length")),[H,j]=F&&Tp(z,_i(Np(F),!0))||[];V=new d(Mp(V.body,$p,H,()=>{j&&j(),A&&A()}),N)}D=D||"text";let B=await s[U.findKey(s,D)||"text"](V,h);return!P&&A&&A(),await new Promise((N,z)=>{Ip(N,z,{data:B,headers:mo.from(V.headers),status:V.status,statusText:V.statusText,config:h,request:M})})}catch(C){throw A&&A(),C&&C.name==="TypeError"&&/Load failed|fetch/i.test(C.message)?Object.assign(new br("Network Error",br.ERR_NETWORK,h,M),{cause:C.cause||C}):br.from(C,C&&C.code,h,M)}}},eA=new Map,zp=r=>{let o=r?r.env:{};const{fetch:e,Request:d,Response:t}=o,l=[d,t,e];let i=l.length,a=i,w,b,n=eA;for(;a--;)w=l[a],b=n.get(w),b===void 0&&n.set(w,b=a?new Map:oA(o)),n=b;return b};zp();const Yw={http:EF,xhr:GF,fetch:{get:zp}};U.forEach(Yw,(r,o)=>{if(r){try{Object.defineProperty(r,"name",{value:o})}catch{}Object.defineProperty(r,"adapterName",{value:o})}});const Vp=r=>`- ${r}`,dA=r=>U.isFunction(r)||r===null||r===!1,Hp={getAdapter:(r,o)=>{r=U.isArray(r)?r:[r];const{length:e}=r;let d,t;const l={};for(let i=0;i<e;i++){d=r[i];let a;if(t=d,!dA(d)&&(t=Yw[(a=String(d)).toLowerCase()],t===void 0))throw new br(`Unknown adapter '${a}'`);if(t&&(U.isFunction(t)||(t=t.get(o))))break;l[a||"#"+i]=t}if(!t){const i=Object.entries(l).map(([w,b])=>`adapter ${w} `+(b===!1?"is not supported by the environment":"is not available in the build"));let a=e?i.length>1?`since :
148
148
  `+i.map(Vp).join(`
@@ -184,4 +184,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
184
184
  name
185
185
  }
186
186
  }
187
- `,d9=(r,o,e=void 0)=>{const d=o?.split(".");let t=r;for(const l of d)if(t&&typeof t=="object"&&l in t)t=t[l];else return e;return t},Pm=r=>r==null?!0:typeof r=="string"||Array.isArray(r)?r.length===0:typeof r=="object"?Object.keys(r).length===0:!1,t9=r=>{const o=typeof r=="string"?r:d9(r,"props.children","");let e=RegExp(/\b\w/g).exec(o);return Pm(e)||(e=((e.shift()||"")+(e.pop()||"")).toUpperCase()),e},l9=r=>r?.toLowerCase()?.split(/[\s\-_]+/).map(o=>o.charAt(0).toUpperCase()+o.slice(1)).join(" "),i9=({data:r,value:o})=>u.jsxs("div",{className:"d-flex align-center justify-between flex-1 text-truncate",id:"selection-ownerList",children:[u.jsx("div",{className:"user-oval-32 rounded-circle mr-2 bg-blue-lighten1",children:r.picture?u.jsx(tr.Avatar,{className:"w-100 h-100 rounded-circle",sx:{width:32,height:32},src:r.picture,alt:"profile"}):u.jsx("div",{className:"user-oval-32 rounded-circle align-center d-flex justify-around",children:u.jsx("p",{className:"f-11 f-w-500 txt-secondary-color font-600 align-center d-flex",children:t9(r.name)})})}),u.jsxs("div",{className:"flex-1 text-truncate ml-4 l-h-18",children:[u.jsx("p",{className:"f-14 f-w-400 text-truncate m-0",children:l9(r.name)}),u.jsx("p",{className:"f-12 f-w-400 txt-darken1 text-truncate m-0",children:r.roleName||"--"})]}),o===r.id?u.jsx("div",{className:"f-20 txt-bllue-darken8",children:u.jsx(wb.CheckOutlined,{className:"f-20 txt-bllue-darken8"})}):u.jsx(u.Fragment,{})]}),Ge=g.createContext(null),Om=({selectedAssignees:r,setValue:o,datasetId:e,isForNotification:d=!1})=>{const[t,l]=g.useState([]),[i,a]=g.useState(""),[w,b]=g.useState(!1),{acceptedUser:n,workspaceId:s,validateUser:p}=g.useContext(Ge),m={data:[{id:"b324369714a1420bbbc73d94c2178931",firstName:"guna",lastName:"lan",name:"guna lan",email:"guna@mailsac.com",teamId:null,privilege:[],teamName:null,roleName:"Super Admin",picture:"",timeZone:"",language:"en",dateFormat:null,timeFormat:null,weekStartsOn:"sunday"}]},{data:h}=Jr.useQuery(r9,{variables:{input:{datasetId:e,searchKey:i,workspaceId:Number(s),userId:p.id}},fetchPolicy:"network-only",client:Tm});console.log("filteredOptions",h);const f=x=>{let c;t.some(E=>E.id===x.id)?c=t.filter(E=>E.id!==x.id):c=[...t,x],l(c),o(c.map(E=>E.id))},k=x=>{const c=t.filter(E=>E.id!==x);l(c),o(c.map(E=>E.id))};return w?u.jsx(tr.ClickAwayListener,{onClickAway:()=>b(!1),children:u.jsxs("div",{className:"h-34px w-380px position-relative bg-white",children:[t.length?u.jsx("div",{className:"d-flex align-center flex-wrap bg-white z-index-100",children:t?.map(x=>u.jsxs("div",{className:"h-34px d-flex align-center justify-between px-8 cursor-pointer radius-4 hover-show-container border-solid-popper-border ml-4 mt-4",onClick:()=>{k(x.id)},children:[u.jsx("div",{className:"f-14 f-w-500 txt-blue-darken10 ",children:x.name}),u.jsx(NA,{className:"f-20 ml-6"})]},x.id))}):u.jsx("div",{className:"h-34px w-380px d-flex align-center justify-between px-8 cursor-pointer radius-4 hover-show-container",onClick:()=>{},children:"--"}),u.jsx("div",{className:"position-relative",children:u.jsx("div",{className:`position-absolute ${t.length?"top-10px":"top--25px"} radius-8 search-mapdataset z-index-1000 bg-white`,children:u.jsxs("div",{className:"w-380px minh-46px radius-8 popper-border-solid-popper-border",children:[u.jsx("div",{className:"h-46px bg-grey-lighten4 boder-b-solid-popper-border tl-radius-8 tr-radius-8 p-10 d-flex align-center",children:u.jsx(tr.TextField,{sx:{input:{"&::placeholder":{color:Ni["success-disabled"],opacity:100}}},fullWidth:!0,className:"mapdataset-dropdown",id:"single-line",variant:"standard",placeholder:"Search",value:i,onChange:x=>a(x.target.value),autoComplete:"off",autoFocus:!0})}),!h?.getAccessUserList?.length&&i?u.jsx("div",{className:"p-10",children:u.jsx("div",{className:"d-flex align-center multi-select",children:u.jsxs("div",{className:"h-36px d-flex align-center f-w-400 f-14 txt-brown-dark1 pl-8 cursor-pointer",children:[u.jsx("p",{className:" f-w-600 txt-text-grey-primary mr-4",children:"user not found"})," ",` "${i}"`]})},"new-associate")}):u.jsx("div",{className:"bg-white maxh-202px overflow-auto p-8 px-6 bl-radius-8 br-radius-8",children:h?.getAccessUserList?.map((x,c)=>u.jsx("div",{className:` radius-4 px-10 py-8 ${h?.getAccessUserList?.length!==c+1?"mb-4":""} bg-hover-grey-lighten4 cursor-pointer d-flex align-center justify-between hover-show-container ${t?.some(E=>E.id===x.id)?"bg-blue-lighten9":""}`,onClick:()=>{f(x)},children:u.jsxs("div",{className:"d-flex align-center",children:[u.jsx(tr.Checkbox,{checked:t?.some(E=>E.id===x.id),size:"small"},x.id),u.jsx(i9,{data:x,value:""})]})},x.id))})]})})})]})}):u.jsx(u.Fragment,{children:d?u.jsx("div",{style:{textDecoration:"underline",textUnderlineOffset:"2px"},className:"pl-4",onClick:()=>b(!0),children:r.length?r?.map((x,c)=>{const E=n.find(y=>y.id===x);return u.jsx("span",{children:E?.name+`${r.length-1===c?"":","}`})}):u.jsx("div",{className:"",children:" select user"})}):u.jsxs("div",{className:"d-flex h-40px maxh-40px radius-8 border-solid-border px-12 align-center justify-between",onClick:()=>b(!0),children:[u.jsx(a9,{assignTo:r,acceptedUserData:m.data}),u.jsx(rf,{})]})})},a9=({assignTo:r,acceptedUserData:o})=>{const e=r?.map(t=>o?.find(l=>l.id===t)),d=e?.length>4?e.slice(0,4):e;return d?.length?u.jsxs("div",{className:"d-flex align-center",id:"dataCollab-view",children:[d?.map(t=>t?.picture?u.jsx(tr.Avatar,{className:"w-100 h-100 rounded-circle mr-4",sx:{width:32,height:32},src:t.picture,alt:"profile"},t?.id):u.jsx("div",{className:"w-32px h-32px radius-360 bg-orange-lighten5 d-flex align-center justify-center f-10 f-w-500 txt-primary mr-4",children:`${t?.firstName?Xp(t?.firstName[0]):""}${t?.lastName?Xp(t?.lastName[0]):""}`},t?.id)),e?.length>4&&u.jsxs("div",{className:"w-24px h-24px p-2 radius-360 bg-avatarColor txt-blue-darken10 d-flex align-center justify-center avatar",children:["+",e.length-4]})]}):"--"},w9=({options:r,defaultValue:o=[],setValue:e})=>{const[d,t]=g.useState(""),[l,i]=g.useState(o),[a,w]=g.useState(0),b=g.useRef(null),[n,s]=g.useState(!1);g.useEffect(()=>{b.current&&w(b.current.offsetHeight)},[l]);const p=m=>{let h;l.some(f=>f.id===m.id)?h=l.filter(f=>f.id!==m.id):h=[...l,m],i(h),e(h)};return n?u.jsx("div",{className:" bg-white w-380px h-46px border-solid-input-border radius-8 ",children:u.jsx(tr.ClickAwayListener,{onClickAway:()=>{s(!1)},children:u.jsxs("div",{className:"position-relative",children:[u.jsx("div",{ref:b,className:" w-100 res-chip-min-height h-100 radius-4 bg-white d-flex align-center d-flex flex-wrap py-4 gap-8 px-12",children:l.length?u.jsx(u.Fragment,{children:l?.map((m,h)=>u.jsx(tr.Chip,{label:m.displayName,onDelete:()=>p(m),sx:{bgcolor:Ni["popper-border"],border:0,borderRadius:2,margin:"0 !important",padding:"6px 8px 6px 8px",gap:1,".MuiChip-label":{fontSize:14,fontFamily:"Inter, sans-serif !important"}},deleteIcon:u.jsx(wb.CloseOutlined,{sx:{fontSize:"16px",color:m.statusColor?"#fff":"grey"},className:"cursor-pointer icon-close"}),variant:"outlined"},h))}):u.jsx("div",{className:"ml-10 d-flex align-center f-14 txt-text-grey-hint",children:"No fields"})}),u.jsx("div",{className:"position-absolute radius-8 search-mapdataset z-index-1000",style:{top:`${a+4}px`},children:u.jsxs("div",{className:"w-380px minh-46px radius-8 popper-border-solid-popper-border",children:[u.jsx("div",{className:"h-46px bg-grey-lighten4 boder-b-solid-popper-border tl-radius-4 tr-radius-8 p-10",children:u.jsx(tr.TextField,{sx:{input:{"&::placeholder":{color:Ni["success-disabled"],opacity:100}}},fullWidth:!0,className:"mapdataset-dropdown",variant:"standard",placeholder:"Search",value:d,onChange:m=>t(m.target.value),autoFocus:!0})}),u.jsx("div",{className:"bg-white maxh-200px overflow-auto w-100 py-8 px-6 bl-radius-8 br-radius-8",children:u.jsx(u.Fragment,{children:r?.filter(m=>m.displayName.toLowerCase().includes(d.toLowerCase()))?.map(m=>u.jsxs("div",{className:` h-36px radius-4 px-10 py-8 mb-2 bg-hover-grey-lighten4 cursor-pointer d-flex justify-start hover-show-container align-center ${l.some(h=>h.id===m.id)?"bg-blue-lighten9 txt-blue-darken10 radius-4 p-4":""}`,onClick:()=>{p(m)},children:[u.jsx(tr.Checkbox,{className:"mx-10 p-0",size:"small",color:"primary",checked:l.some(h=>h.id===m.id)}),u.jsx("div",{className:"f-14 f-w-400 txt-text-grey-primary",children:m.displayName})]},m.id))})})]})})]})})}):u.jsx(u.Fragment,{children:u.jsxs("div",{className:"d-flex align-center h-46px border-solid-input-border radius-8 p-12 justify-between",onClick:()=>s(!0),children:[u.jsxs("div",{className:"d-flex",children:[Array.isArray(o)&&o?.length?(o?.length>3?o.slice(0,3):o)?.map((m,h)=>u.jsx(tr.Chip,{label:m.displayName,sx:{bgcolor:Ni["popper-border"],border:0,borderRadius:2,margin:"0 !important",padding:"6px 8px 6px 8px",gap:1,".MuiChip-label":{fontSize:14,fontFamily:"Inter, sans-serif !important"}},variant:"outlined"},h)):u.jsx(u.Fragment,{children:"-"}),o?.length>3&&u.jsxs("div",{className:"w-24px h-24px p-2 radius-360 bg-avatarColor txt-blue-darken10 d-flex align-center justify-center avatar h-26px px-6 py-8 bg-lightblue1 radius-4 border-solid-popper-border ml-4",children:["+",o.length-3]})]}),u.jsx(rf,{})]})})},b9=[{field:{id:"256f35efc157446dba47e0922057ff61",isActive:!0,isDeleted:!1,createdAt:"2025-08-21T08:44:05.608Z",updatedAt:"2025-08-21T08:44:05.608Z",fieldDisplayName:"Name",fieldInternalName:"work_4_name",datasetName:"work_4",sensitive:!1,hidden:!1,isHideField:!1,dataType:"single-line",isRequired:!0,isUnique:!1,isAssociatedField:!1,isSystemDefined:!1,isImmutable:!1,isPrimaryField:!0,isSelected:!0,isSortable:!0,sortOrder:"1",createdBy:"7fda40cd83dc4391a7b751a67c0dfaa6",updatedBy:null,deletedBy:null,CreatedById:"7fda40cd83dc4391a7b751a67c0dfaa6",deletedAt:null,prefix:"",postfix:"",value:[],columnWidth:null,toggleState:null,workflow:null,name:"Name",internalName:"work_4_name",isAssociated:!1,type:"work_4"},group:{id:"fc4a57aec9094c47bbdf55a4f028072c",datasetName:"work_4",groupName:"Work 4 Information"},position:1,isSelected:!0,isPrimaryField:!0,isDeleted:!1,isAssociated:!1,datasetName:"work_4",datasetId:"557465b7fd9244849f00076491369c84",isRequired:!0,isImmutable:!1},{field:{id:"d397ae5f3e2f48a280dc6f7644325b00",isActive:!0,isDeleted:!1,createdAt:"2025-08-21T08:44:05.608Z",updatedAt:"2025-08-21T08:44:05.608Z",fieldDisplayName:"Status",fieldInternalName:"stage",datasetName:"work_4",sensitive:!1,hidden:!1,isHideField:!1,dataType:"drop-down",isRequired:!0,isUnique:!1,isAssociatedField:!1,isSystemDefined:!1,isImmutable:!1,isPrimaryField:!1,isSelected:!0,isSortable:!1,sortOrder:"2",createdBy:"7fda40cd83dc4391a7b751a67c0dfaa6",updatedBy:null,deletedBy:null,CreatedById:"7fda40cd83dc4391a7b751a67c0dfaa6",deletedAt:null,prefix:"",postfix:"",value:[{key:"New",value:"New"},{key:"Open",value:"Open"},{key:"In Progress",value:"In Progress"},{key:"Qualified",value:"Qualified"},{key:"Unqualified",value:"Unqualified"},{key:"Attempted To Contact",value:"Attempted To Contact"},{key:"Connected",value:"Connected"},{key:"Bad Timing",value:"Bad Timing"},{key:"Hot Lead",value:"Hot Lead"}],columnWidth:null,toggleState:null,workflow:null,name:"Status",internalName:"stage",isAssociated:!1,type:"work_4"},group:{id:"fc4a57aec9094c47bbdf55a4f028072c",datasetName:"work_4",groupName:"Work 4 Information"},position:2,isSelected:!0,isPrimaryField:!1,isDeleted:!1,isAssociated:!1,datasetName:"work_4",datasetId:"557465b7fd9244849f00076491369c84",isRequired:!0,isImmutable:!1},{field:{id:"bfb6fa887f67486d93ab3c5516f93f4c",isActive:!0,isDeleted:!1,createdAt:"2025-08-21T08:44:05.608Z",updatedAt:"2025-08-21T08:44:05.608Z",fieldDisplayName:"Owner",fieldInternalName:"owner",datasetName:"work_4",sensitive:!1,hidden:!1,isHideField:!1,dataType:"user",isRequired:!0,isUnique:!1,isAssociatedField:!1,isSystemDefined:!1,isImmutable:!1,isPrimaryField:!1,isSelected:!0,isSortable:!0,sortOrder:"3",createdBy:"7fda40cd83dc4391a7b751a67c0dfaa6",updatedBy:null,deletedBy:null,CreatedById:"7fda40cd83dc4391a7b751a67c0dfaa6",deletedAt:null,prefix:"",postfix:"",value:[],columnWidth:null,toggleState:null,workflow:null,name:"Owner",internalName:"owner",isAssociated:!1,type:"work_4"},group:{id:"fc4a57aec9094c47bbdf55a4f028072c",datasetName:"work_4",groupName:"Work 4 Information"},position:3,isSelected:!0,isPrimaryField:!1,isDeleted:!1,isAssociated:!1,datasetName:"work_4",datasetId:"557465b7fd9244849f00076491369c84",isRequired:!0,isImmutable:!1},{field:{id:"643e3725963e47fb96fc192ddd8680f4",isActive:!0,isDeleted:!1,createdAt:"2025-08-21T08:44:05.608Z",updatedAt:"2025-08-21T08:44:05.608Z",fieldDisplayName:"Priority",fieldInternalName:"priority",datasetName:"work_4",sensitive:!1,hidden:!1,isHideField:!1,dataType:"priority",isRequired:!0,isUnique:!1,isAssociatedField:!1,isSystemDefined:!1,isImmutable:!1,isPrimaryField:!1,isSelected:!0,isSortable:!1,sortOrder:"4",createdBy:"7fda40cd83dc4391a7b751a67c0dfaa6",updatedBy:null,deletedBy:null,CreatedById:"7fda40cd83dc4391a7b751a67c0dfaa6",deletedAt:null,prefix:"",postfix:"",value:[{key:"Low",value:"Low",statusColor:null},{key:"Moderate",value:"Moderate",statusColor:null},{key:"High",value:"High",statusColor:null}],columnWidth:null,toggleState:null,workflow:null,name:"Priority",internalName:"priority",isAssociated:!1,type:"work_4"},group:{id:"fc4a57aec9094c47bbdf55a4f028072c",datasetName:"work_4",groupName:"Work 4 Information"},position:4,isSelected:!0,isPrimaryField:!1,isDeleted:!1,isAssociated:!1,datasetName:"work_4",datasetId:"557465b7fd9244849f00076491369c84",isRequired:!0,isImmutable:!1},{field:{id:"e6077294af434793aa036c73337f0163",isActive:!0,isDeleted:!1,createdAt:"2025-08-21T09:33:51.860Z",updatedAt:"2025-08-21T09:33:52.122Z",fieldDisplayName:"interview",fieldInternalName:"interview",datasetName:"work_4",sensitive:!1,hidden:!1,isHideField:!1,dataType:"drop-down",isRequired:!1,isUnique:!1,isAssociatedField:!1,isSystemDefined:!1,isImmutable:!1,isPrimaryField:!1,isSelected:!0,isSortable:!1,sortOrder:"5",createdBy:"7fda40cd83dc4391a7b751a67c0dfaa6",updatedBy:null,deletedBy:null,CreatedById:"7fda40cd83dc4391a7b751a67c0dfaa6",deletedAt:null,prefix:null,postfix:null,value:[{key:"stage 1",value:"stage 1",statusColor:"#397E4E"},{key:"stage 2",value:"stage 2",statusColor:"#5DC975"},{key:"stage 3",value:"stage 3",statusColor:"#9DD32D"},{key:"stage 4",value:"stage 4",statusColor:"#CAB642"},{key:"stage 5",value:"stage 5",statusColor:"#E0CC33"}],columnWidth:null,toggleState:!0,workflow:null,name:"interview",internalName:"interview",isAssociated:!1,type:"work_4"},group:{id:"fc4a57aec9094c47bbdf55a4f028072c",datasetName:"work_4",groupName:"Work 4 Information"},position:6,isSelected:!0,isPrimaryField:!1,isDeleted:!1,isAssociated:!1,datasetName:"work_4",datasetId:"557465b7fd9244849f00076491369c84",isRequired:!1,isImmutable:!1},{field:{id:"c6104a0ccd7e4636a72bf13380c6491e",isActive:!0,isDeleted:!1,createdAt:"2025-08-22T09:26:10.456Z",updatedAt:"2025-08-22T09:26:10.733Z",fieldDisplayName:"coll",fieldInternalName:"coll",datasetName:"work_4",sensitive:!1,hidden:!1,isHideField:!1,dataType:"collaborators",isRequired:!1,isUnique:!1,isAssociatedField:!1,isSystemDefined:!1,isImmutable:!1,isPrimaryField:!1,isSelected:!0,isSortable:!1,sortOrder:"6",createdBy:"7fda40cd83dc4391a7b751a67c0dfaa6",updatedBy:null,deletedBy:null,CreatedById:"7fda40cd83dc4391a7b751a67c0dfaa6",deletedAt:null,prefix:null,postfix:null,value:[],columnWidth:null,toggleState:null,workflow:null,name:"coll",internalName:"coll",isAssociated:!1,type:"work_4"},group:{id:"fc4a57aec9094c47bbdf55a4f028072c",datasetName:"work_4",groupName:"Work 4 Information"},position:7,isSelected:!0,isPrimaryField:!1,isDeleted:!1,isAssociated:!1,datasetName:"work_4",datasetId:"557465b7fd9244849f00076491369c84",isRequired:!1,isImmutable:!1}],G4={status_changes:{type:"condition",segments:[{segmentsId:0,type:"dropdown",valueType:"field",optionType:["priority","drop-down"],value:"",childSegments:[2]},{segmentsId:1,type:"text",value:"is value of"},{segmentsId:2,type:"dropdown",valueType:"field-options",mapSegmentsId:0,value:""}]},number_lessthan:{type:"condition",segments:[{segmentsId:0,type:"dropdown",valueType:"field",optionType:["number","currency"],value:"",childSegments:[2]},{segmentsId:1,type:"text",value:"is less than"},{segmentsId:2,type:"input",valueType:"number",value:"",mapSegmentsId:0}]},number_greaterthan:{type:"condition",segments:[{segmentsId:0,type:"dropdown",valueType:"field",optionType:["number","currency"],value:"",childSegments:[2]},{segmentsId:1,type:"text",value:"is greater than"},{segmentsId:2,type:"input",valueType:"number",value:"",mapSegmentsId:0}]}},n9=[{key:"status_changes",displayContent:"status is value of",conditionAuto:G4.status_changes},{key:"number_lessthan",displayContent:"Number is less than",conditionAuto:G4.number_lessthan},{key:"number_greaterthan",displayContent:"Number is greater than",conditionAuto:G4.number_greaterthan}],sl={changes_field_value:{key:"changes_field_value",segments:[{segmentsId:0,type:"text",value:"set"},{segmentsId:1,type:"dropdown",valueType:"field",optionType:"",fieldType:"",value:"",childSegments:[3]},{segmentsId:2,type:"text",value:"to"},{segmentsId:3,type:"input",valueType:"number",value:"",mapSegmentsId:1}]},send_notification:{key:"send_notification",segments:[{segmentsId:0,type:"text",value:"Notify the"},{segmentsId:1,type:"user",valueType:"user-notification",optionType:"",fieldType:"",value:[],childSegments:[3]},{segmentsId:2,type:"text",value:"as"},{segmentsId:3,type:"notification",valueType:"",value:"",mapSegmentsId:1}]},move_to_other_work:{key:"move_to_other_work",segments:[{segmentsId:0,type:"text",value:"Move to"},{segmentsId:1,type:"moveRecordToOtherWork",valueType:"moveRecordToOtherWork",optionType:"",fieldType:"",value:[]}]},copy_to_other_workspace_work:{key:"copy_to_other_workspace_work",segments:[{segmentsId:0,type:"text",value:"Move to"},{segmentsId:1,type:"workspace",valueType:"workspace",optionType:"",fieldType:"",value:[],childSegments:[2]},{segmentsId:2,type:"moveRecordToOtherWork",valueType:"moveRecordToOtherWork",optionType:"",fieldType:"",value:[],mapSegmentsId:1}]},send_notification_to_field:{key:"send_notification_to_field",segments:[{segmentsId:0,type:"text",value:"Notify the"},{segmentsId:1,type:"dropdown",valueType:"users",optionType:"",fieldType:"",value:[],childSegments:[3]},{segmentsId:2,type:"text",value:"as"},{segmentsId:3,type:"notification",valueType:"",value:"",mapSegmentsId:1}]}},s9=[{key:"changes_field_value",displayAutomation:"change Field Value",automation:sl.changes_field_value},{key:"send_notification",displayAutomation:"send Notification",automation:sl.send_notification},{key:"move_to_other_work",displayAutomation:"move to other work",automation:sl.move_to_other_work},{key:"copy_to_other_workspace_work",displayAutomation:"move to other workspace work",automation:sl.copy_to_other_workspace_work},{key:"send_notification_to_field",displayAutomation:"send Notification by field",automation:sl.send_notification_to_field}];var pl={},Rm;function p9(){if(Rm)return pl;Rm=1;var r=Qo();Object.defineProperty(pl,"__esModule",{value:!0}),pl.default=void 0;var o=r(je()),e=he();return pl.default=(0,o.default)((0,e.jsx)("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1"}),"AddRounded"),pl}var f9=p9();const Mm=zo(f9),X4=({defaultValue:r,setValue:o,isDisable:e=!1})=>{const[d,t]=g.useState(r),{col:l}=g.useContext(Ge),[i,a]=g.useState(!0);g.useEffect(()=>{t(r)},[r]);const w=(p,m,h)=>{const f=d.blocks.map((k,x)=>x!==p?k:{...k,segments:k.segments.map((c,E)=>E!==m?c:{...c,value:h})});t(k=>({...k,blocks:f})),o({...d,blocks:f})},b=(p,m)=>{const h={...d};h.blocks=[...h.blocks,{...p,key:m}],t(h),a(!1)},n=({optionType:p,valueType:m,fieldId:h})=>{const f=l?.map(k=>k.field);if(m==="field")return f.filter(k=>p?.includes(k.dataType)&&!k.isAssociated).map(k=>({id:k.id,displayName:k.name,internalName:k.internalName}));if(m==="field-options")return f.find(x=>x.id===h)?.value?.map(x=>({id:x.key,displayName:x.value}))},s=p=>{let m={...d,blocks:d.blocks.filter((h,f)=>f!==p)};t(m),o(m)};return u.jsxs(u.Fragment,{children:[u.jsx("div",{children:d?.blocks?.map((p,m)=>u.jsxs("div",{className:"d-flex hide-icon",children:[u.jsxs("div",{className:"f-w-400 f-14 txt-black2 d-flex flex-wrap flex-1 align-center",children:[m?u.jsx("span",{children:"And only if"}):u.jsx("span",{children:"When a"}),p.segments.map((h,f)=>h.type==="text"?u.jsxs("span",{children:[" ",h.value," "]},f):h.type==="input"?u.jsx(tr.TextField,{id:"standard-basic",variant:"standard",className:"mx-8",disabled:e,defaultValue:h.value,type:h.valueType,onChange:k=>w(m,f,k.target.value),sx:{margin:0,maxWidth:100,padding:0,"& .MuiInputBase-input":{padding:"0 !important",paddingRight:"0 !important"},"& .MuiInputBase-root":{margin:0}}}):h.type==="dropdown"?u.jsx(tr.FormControl,{variant:"standard",sx:{width:"auto"},className:"mx-8",children:u.jsx(tr.Select,{IconComponent:()=>null,value:h.value,disabled:e,sx:{minWidth:30,padding:0,"& .MuiSelect-select":{padding:"0 !important",paddingRight:"0 !important"},"& .MuiInputBase-input":{padding:"0 !important",paddingRight:"0 !important"}},onChange:k=>w(m,f,k.target.value),children:n({optionType:h.optionType,valueType:h.valueType,fieldId:p?.segments?.[h.mapSegmentsId]?.value})?.map(k=>u.jsx(tr.MenuItem,{value:k.id,children:k.displayName},k.id))},`${m}_${f}`)}):null)]}),d.blocks.length>1?u.jsx("img",{src:"/delete.svg",className:"hide cursor-pointer",onClick:()=>{s(m)}}):u.jsx(u.Fragment,{}),u.jsx("div",{children:!e&&d.blocks.length-1===m?u.jsx(u.Fragment,{children:u.jsx(Mm,{className:"f-w-400 f-14 txt-black2 cursor-pointer",onClick:()=>{a(!0)}})}):u.jsx(u.Fragment,{})})]},m))}),!e&&i?u.jsx(u.Fragment,{children:u.jsx(tr.FormControl,{variant:"standard",sx:{width:"auto"},className:"mx-8",children:u.jsx(tr.Select,{labelId:"demo-simple-select-standard-label",id:"demo-simple-select-standard",IconComponent:()=>null,sx:{minWidth:30,padding:0,"& .MuiSelect-select":{padding:"0 !important",paddingRight:"0 !important"},"& .MuiInputBase-input":{padding:"0 !important",paddingRight:"0 !important"}},children:n9?.map(p=>u.jsx(tr.MenuItem,{onClick:()=>b(p.conditionAuto,p.key),children:p.displayContent},p.key))})})}):u.jsx(u.Fragment,{})]})},h9=({edgeData:r,updateEdgeData:o,setSelectedId:e})=>{console.log("==>edgeData",r);const{setValue:d,watch:t}=bb.useForm({defaultValues:{permission:r?.data?.permission||[],requiredColumns:r?.data?.requiredColumns||[],condition:r?.data?.condition||{id:"",blocks:[]}}}),l=b9?.map(i=>({id:i.field.id,displayName:i?.field?.name,internalName:i?.field?.internalName}));return u.jsx("div",{style:{position:"absolute",top:0,right:0,height:"100%",width:"420px",background:"#fff",borderLeft:"1px solid #ccc",zIndex:1e3},children:u.jsxs("div",{className:"px-16 py-12 d-flex flex-column edge-container",children:[u.jsxs("div",{children:[u.jsx("div",{className:"h-36px d-flex align-center f-w-600 f-14 txt-darkblue px-8",children:"Configuration"}),u.jsx("div",{className:"border-solid-border1 my-12"})]}),u.jsx("div",{className:"flex-1",children:u.jsxs("div",{className:"p-10",children:[u.jsxs("div",{className:"h-44px flex-1 radius-8 px-12 py-6 d-flex justify-between align-center cursor-pointer",style:{backgroundColor:r4(r?.data?.sourceColor),border:`1px solid ${Ve(r?.data?.sourceColor)}`},children:[u.jsx("div",{className:"f-w-600 f-14 txt-black mr-20 ",style:{color:Ve(r?.data?.sourceColor)},children:r?.data?.sourceLabel}),u.jsx("img",{src:"/arrow.svg",alt:"arrow",className:"mr-20"}),u.jsx("div",{className:"f-w-600 f-14 txt-black mr-20 ",style:{color:Ve(r.data?.targetColor)},children:r?.data?.targetLabel})]}),u.jsx("div",{className:"border-solid-border1 my-16"}),u.jsxs("div",{className:"mb-16",children:[u.jsx("p",{className:"f-w-600 f-14 txt-black2 mb-6",children:"Permissions"}),u.jsx(Om,{selectedAssignees:t("permission"),datasetId:"460e5046a84043f7b8193feb2ece19d0",setValue:i=>{d("permission",i)}})]}),u.jsxs("div",{className:"mb-16",children:[u.jsx("p",{className:"f-w-600 f-14 txt-black2 mb-6",children:"Required Columns"}),u.jsx(w9,{defaultValue:t("requiredColumns"),options:l,setValue:i=>{d("requiredColumns",i)}})]}),u.jsxs("div",{children:[u.jsx("div",{className:"d-flex align-center justify-between",children:u.jsx("p",{className:"f-w-600 f-14 txt-black2",children:"Condition"})}),u.jsx(X4,{defaultValue:t("condition"),setValue:i=>{d("condition",i)}})]})]})}),u.jsxs("div",{className:"d-flex justify-end",children:[u.jsx(tr.Button,{variant:"outlined",color:"inherit",className:"mr-10",onClick:()=>e({id:"",type:"config"}),children:"Cancel"}),u.jsx(tr.Button,{variant:"outlined",color:"primary",onClick:()=>{o({id:r.id,data:{...r.data,...t()}}),e({id:"",type:"config"})},children:"Update"})]})]})})};var fl={},$m;function m9(){if($m)return fl;$m=1;var r=Qo();Object.defineProperty(fl,"__esModule",{value:!0}),fl.default=void 0;var o=r(je()),e=he();return fl.default=(0,o.default)((0,e.jsx)("path",{d:"m19 15-1.41-1.41L13 18.17V2h-2v16.17l-4.59-4.59L5 15l7 7z"}),"South"),fl}var k9=m9();const Um=zo(k9);var hl={},Lm;function x9(){if(Lm)return hl;Lm=1;var r=Qo();Object.defineProperty(hl,"__esModule",{value:!0}),hl.default=void 0;var o=r(je()),e=he();return hl.default=(0,o.default)((0,e.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),hl}var g9=x9();const c9=zo(g9);var ml={},jm;function u9(){if(jm)return ml;jm=1;var r=Qo();Object.defineProperty(ml,"__esModule",{value:!0}),ml.default=void 0;var o=r(je()),e=he();return ml.default=(0,o.default)((0,e.jsx)("path",{d:"M17.77 3.77 16 2 6 12l10 10 1.77-1.77L9.54 12z"}),"ArrowBackIosNew"),ml}var F9=u9();const A9=zo(F9);var kl={},zm;function y9(){if(zm)return kl;zm=1;var r=Qo();Object.defineProperty(kl,"__esModule",{value:!0}),kl.default=void 0;var o=r(je()),e=he();return kl.default=(0,o.default)((0,e.jsx)("path",{d:"M12 6c3.79 0 7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 5c1.38 0 2.5 1.12 2.5 2.5S13.38 14 12 14s-2.5-1.12-2.5-2.5S10.62 9 12 9m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7"}),"VisibilityOutlined"),kl}var E9=y9();const D9=zo(E9),v9=({defaultValue:r,setValue:o})=>{const[e,d]=g.useState(r),[t,l]=g.useState(!1),{acceptedUser:i,col:a,exampleData:w}=g.useContext(Ge),b=a?.map(s=>s.field),n=g.useMemo(()=>{const s=new Map;return b.forEach(p=>{if(p.dataType==="user"){const m=w[p.internalName],h=i.find(f=>f.id===m);s.set(p.internalName,h?.name??"")}else if(p.dataType==="collaborators"){const m=w[p.internalName]?.split(",");let h=[];m.forEach(f=>{const k=i.find(x=>x.id===f);h=[...h,k?.name||""]}),s.set(p.internalName,h.join(","))}else s.set(p.internalName,w[p.internalName])}),s},[b,i]);return u.jsxs("div",{children:[u.jsx("div",{style:{textDecoration:"underline",textUnderlineOffset:"2px"},onClick:()=>{l(!0)},children:"Template"}),t?u.jsx(tr.ClickAwayListener,{onClickAway:()=>l(!1),children:u.jsx("div",{className:"w-100 d-flex align-center txt-black2 f-12 mb-8",children:u.jsxs("div",{className:"w-358px border-solid-lightblue1 radius-12 bg-white",children:[u.jsx("div",{className:"h-46px border-b-solid-popper-border tl-radius-10 tr-radius-10 px-10 d-flex align-center f-14 f-w-400",children:"Send Notification"}),u.jsxs("div",{className:"my-8 h-31px d-flex align-center px-6 f-12",children:[u.jsx("div",{className:"w-82px d-flex align-center justify-center ",children:"Templates :"}),u.jsx("div",{className:"radius-100 p-8 maxh-28px h-28px w-auto border-solid-popper-border ml-4",children:"Reminder"}),u.jsx("div",{className:"radius-100 p-8 maxh-28px h-28px w-auto border-solid-popper-border ml-4",children:"Status Update"}),u.jsx("div",{className:"radius-100 p-8 maxh-28px h-28px w-auto border-solid-popper-border ml-4",children:"Deadline Alert"})]}),u.jsxs("div",{className:"h-151px px-12 mb-8",children:[u.jsx("div",{className:"h-31px f-w-600 f-12 d-flex align-center",children:"Message"}),u.jsx(tr.TextField,{placeholder:"Type your message here...",className:"f-12",multiline:!0,rows:4,fullWidth:!0,variant:"outlined",value:e,onChange:s=>{d(s.target.value)}})]}),u.jsx("div",{style:{gap:"4px"},className:"px-12 py-8 d-flex flex-wrap mb-8",children:b?.map(s=>u.jsx("div",{className:"radius-100 p-8 maxh-28px h-28px w-auto border-solid-popper-border ml-4 f-12",onClick:()=>{d(p=>p+`{${s.internalName}}`)},children:s.name}))}),u.jsx("div",{className:"p-12 mb-8",children:u.jsxs("div",{className:"h-160px radius-8 border-solid-lightblue1 bg-lightblue3 px-8 d-flex flex-column pb-8",children:[u.jsxs("div",{className:"h-31px d-flex align-center",children:[u.jsx(D9,{className:"f-12"}),u.jsx("p",{className:"ml-4 f-12 ",children:"Preview"})]}),u.jsx("div",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},className:"border-solid-lightblue1 h-100 flex-1 bg-white radius-4 p-8",children:e?.replace(/\{(\w+)\}/g,(s,p)=>n.get(p))})]})}),u.jsxs("div",{className:"bl-radius-10 br-radius-10 h-56px border-t-solid-popper-border d-flex justify-end px-12 align-center",children:[u.jsx(tr.Button,{variant:"outlined",color:"inherit",className:"mr-10 h-31px radius-8",onClick:()=>{l(!1)},children:"Cancel"}),u.jsx(tr.Button,{variant:"outlined",color:"primary",className:"h-31px radius-8",onClick:()=>{o(e),l(!1)},children:"Done"})]})]})})}):u.jsx(u.Fragment,{})]})},S9={};function _9(r,o){switch(o.type){case"ADD_OR_UPDATE":return{...r,[o.key]:o.value};case"DELETE":const e={...r};return delete e[o.key],e;default:return r}}const C9=({datasetId:r,workspaceId:o,targetWorkspaceId:e,autoIndex:d,segmentIndex:t,setValue:l,defaultValue:i})=>{const{mappingField:a,targetWork:w}=i,[b,n]=g.useState(null),[s,p]=g.useReducer(_9,a??S9),[m,h]=g.useState(!1);g.useEffect(()=>{n(w)},[a,w]);const{data:f}=Jr.useQuery(o9,{variables:{input:{workspaceId:Number(e)}},fetchPolicy:"network-only",client:Y4}),{data:k}=Jr.useQuery(Nm,{variables:{input:{workspaceId:Number(o),datasetId:r}},fetchPolicy:"network-only",client:Y4}),{data:x}=Jr.useQuery(Nm,{variables:{input:{workspaceId:Number(e),datasetId:b}},fetchPolicy:"network-only",client:Y4,skip:!b}),c=f?.getDataset?.filter(E=>E.id!==r)??[];return u.jsxs("div",{children:[u.jsx(tr.FormControl,{variant:"standard",sx:{width:"auto"},className:"mx-8",children:u.jsx(tr.Select,{value:b,IconComponent:()=>null,sx:{minWidth:30,padding:0,"& .MuiSelect-select":{padding:"0 !important",paddingRight:"0 !important"},"& .MuiInputBase-input":{padding:"0 !important",paddingRight:"0 !important"}},children:c?.map(E=>u.jsx(tr.MenuItem,{value:E.id,onClick:()=>{n(E.id),h(!0)},children:E.name},E.id))},`${d}_${t}`)}),m?u.jsx(u.Fragment,{children:u.jsx(tr.ClickAwayListener,{onClickAway:()=>{},children:u.jsx("div",{className:"w-100 d-flex align-center mt-8",children:u.jsxs("div",{className:"w-358px border-solid-lightblue1 radius-8 bg-white h-367px",children:[u.jsx("div",{className:"border-b-solid-lightblue1 d-flex align-center px-10 txt-black2 h-46px",children:"Map Source to Destination"}),u.jsx("div",{className:"overflow-auto flex-1 h-264px",children:k?.getField?.filter(E=>!E.isAssociatedField&&!["created_on","updated_on"].includes(E.fieldInternalName))?.map(E=>{const y=x?.getField?.filter(D=>E.dataType===D.dataType&&!Object.values(s).includes(D.fieldInternalName)&&!["created_on","updated_on"].includes(E.fieldInternalName))||[],F=x?.getField?.find(D=>D.fieldInternalName===s[E.fieldInternalName]),I=F?[...y,F]:y;return u.jsxs("div",{className:"d-flex align-center h-52px",children:[u.jsx("div",{className:"txt-brown-dark1 f-12 f-w-600 text-truncate pl-16 w-200px",children:E.fieldDisplayName}),u.jsx("div",{className:"flex-1 d-flex align-center",children:I?.length||E.fieldInternalName in s?u.jsx(tr.Select,{className:"w-115px h-40px radius-8 f-10 p-0",defaultValue:s[E?.fieldInternalName]??null,children:I?.map(D=>u.jsx(tr.MenuItem,{value:D.fieldInternalName,onClick:()=>{p({type:"ADD_OR_UPDATE",key:E.fieldInternalName,value:D.fieldInternalName})},children:D.fieldDisplayName},D.id))}):u.jsx("div",{className:"w-115px h-40px radius-8 border-solid-red1 bg-lightred txt-red1 d-flex align-center justify-center f-10 f-w-400",children:"No field to show"})})]})})}),u.jsxs("div",{className:"bl-radius-10 br-radius-10 h-56px border-t-solid-popper-border d-flex justify-end px-12 align-center",children:[u.jsx(tr.Button,{variant:"outlined",color:"inherit",className:"mr-10 h-31px radius-8",onClick:()=>{h(!1)},children:"Cancel"}),u.jsx(tr.Button,{variant:"outlined",color:"primary",className:"h-31px radius-8",onClick:()=>{l({sourceWork:r,targetWork:b,mappingField:s}),h(!1)},children:"Done"})]})]})})})}):u.jsx(u.Fragment,{})]})},B9=({defaultValue:r,setValue:o})=>{const{validateUser:e}=g.useContext(Ge),{data:d}=Jr.useQuery(e9,{variables:{input:{userId:e.id,orgId:e?.organisation?.id}},fetchPolicy:"network-only",client:Tm}),t=d?.getWorkspaceList;return u.jsx("div",{children:u.jsx(tr.Select,{className:"w-115px h-40px radius-8 f-10 p-0",defaultValue:r,children:t?.map(l=>u.jsx(tr.MenuItem,{value:l.id,onClick:()=>{o(l.id)},children:l.name},l.id))})})},Vm=({defaultValue:r,setValue:o,isDisable:e=!1})=>{const[d,t]=g.useState([]),[l,i]=g.useState(!0),{col:a,datasetId:w,workspaceId:b}=g.useContext(Ge);g.useEffect(()=>{t(r)},[r]);const n=(h,f)=>{i(!1),t(k=>[...k,h])},s=h=>{const f=d.filter((k,x)=>x!==h);t(f),o(f)},p=(h,f,k)=>{const x=d.map((c,E)=>{if(E!==h)return c;const y=c.segments[f],F=y.valueType==="field",I=F?y.childSegments||[]:[],D=c.segments.map(v=>{if(v.segmentsId===y.segmentsId)if(F){const _=a.find(T=>T.field.id===k);return{...v,datasetId:_?.datasetId,datasetName:_?.datasetName,fieldType:_?.field.dataType,property:_?.field?.internalName,isAssociate:_?.field?.isAssociated,value:k}}else return{...v,value:k};if(F&&I.includes(v.segmentsId)){const _=a.find(T=>T.field.id===k);return{...v,type:["drop-down"].includes(_?.field?.dataType)?"dropdown":"input",value:"",valueType:"field-options"}}return v});return{...c,segments:D}});o(x),t(x)},m=({optionType:h,valueType:f,fieldId:k})=>{const x=a?.map(c=>c.field);if(f==="field")return x.map(c=>({id:c.id,displayName:c.name,internalName:c.internalName}));if(f==="field-options")return x.find(E=>E.id===k)?.value?.map(E=>({id:E.key,displayName:E.value}));if(f==="users")return x.filter(c=>["user","collaborators"].includes(c.dataType)).map(c=>({id:c.internalName,displayName:c.name,internalName:c.internalName}))};return u.jsxs(u.Fragment,{children:[u.jsx("div",{children:d?.map((h,f)=>u.jsxs("div",{className:"d-flex hide-icon",children:[u.jsxs("div",{className:"f-w-400 f-14 txt-black2 d-flex flex-wrap flex-1 align-center",children:[f?u.jsx("span",{children:"And "}):u.jsx("span",{children:"Then "}),h.segments.map((k,x)=>{if(k.type==="text")return u.jsxs("span",{className:"ml-2",children:[" ",k.value," "]},x);if(k.type==="input")return u.jsx(tr.TextField,{id:"standard-basic",variant:"standard",className:"mx-8",disabled:e,defaultValue:k.value,type:k.valueType,onChange:c=>p(f,x,c.target.value),sx:{margin:0,maxWidth:100,padding:0,"& .MuiInputBase-input":{padding:"0 !important",paddingRight:"0 !important"},"& .MuiInputBase-root":{margin:0}}});if(k.type==="dropdown")return u.jsx(tr.FormControl,{variant:"standard",sx:{width:"auto"},className:"mx-8",children:u.jsx(tr.Select,{IconComponent:()=>null,value:k.value,disabled:e,sx:{minWidth:30,padding:0,"& .MuiSelect-select":{padding:"0 !important",paddingRight:"0 !important"},"& .MuiInputBase-input":{padding:"0 !important",paddingRight:"0 !important"}},onChange:c=>p(f,x,c.target.value),children:m({optionType:k.optionType,valueType:k.valueType,fieldId:h?.segments?.[k.mapSegmentsId]?.value})?.map(c=>u.jsx(tr.MenuItem,{value:c.id,children:c.displayName},c.id))},`${f}_${x}`)});if(k.type==="user")return u.jsx(Om,{selectedAssignees:k.value,setValue:c=>{p(f,x,c)},datasetId:w,isForNotification:!0});if(k.type==="notification")return u.jsx(v9,{defaultValue:k.value,setValue:c=>{p(f,x,c)}});if(k.type==="workspace")return u.jsx("div",{children:u.jsx(B9,{defaultValue:k.value,setValue:c=>{p(f,x,c)}})});if(k.type==="moveRecordToOtherWork"){let c=d[f]?.segments[k.mapSegmentsId]?.value;return u.jsx(C9,{defaultValue:k.value,datasetId:w,workspaceId:b,targetWorkspaceId:c??b,autoIndex:f,segmentIndex:x,setValue:E=>{p(f,x,E)}})}return null})]}),d.length>1?u.jsx("img",{src:"/delete.svg",className:"hide cursor-pointer",onClick:()=>{s(f)}}):u.jsx(u.Fragment,{}),u.jsx("div",{children:!e&&d.length-1===f?u.jsx(u.Fragment,{children:u.jsx(Mm,{className:"f-w-400 f-14 txt-black2 cursor-pointer",onClick:()=>{i(!0)}})}):u.jsx(u.Fragment,{})})]},f))}),!e&&l?u.jsx(u.Fragment,{children:u.jsx(tr.FormControl,{variant:"standard",sx:{width:"auto"},className:"mx-8",children:u.jsx(tr.Select,{labelId:"demo-simple-select-standard-label",id:"demo-simple-select-standard",IconComponent:()=>null,sx:{minWidth:30,padding:0,"& .MuiSelect-select":{padding:"0 !important",paddingRight:"0 !important"},"& .MuiInputBase-input":{padding:"0 !important",paddingRight:"0 !important"}},children:s9?.map(h=>u.jsx(tr.MenuItem,{onClick:()=>n(h.automation,h.key),children:h.displayAutomation},h.key))})})}):u.jsx(u.Fragment,{})]})},I9=({selectedId:r,setSelectedId:o,setSelectAutomation:e,setisCreateNewAutomation:d})=>{const[t,l]=g.useState([]),{workspaceId:i}=g.useContext(Ge);g.useEffect(()=>{const n=async s=>{try{const p=await xA(s,i);l(p)}catch(p){console.error("Error fetching automation:",p)}};r?.id&&n(r?.id)},[r?.id]);const a=async({id:n,isActive:s})=>{await gA({id:n,isActive:s,workspaceId:i})},w=async({id:n})=>{await cA({id:n,workspaceId:i})},b={inputProps:{"aria-label":"Size switch demo"}};return u.jsx("div",{style:{top:0,right:0,height:"100%",width:"422px",background:"#fff",borderLeft:"1px solid #ccc"},children:u.jsxs("div",{className:"px-16 py-12 d-flex flex-column edge-container",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"h-36px d-flex align-center f-w-600 f-14 txt-darkblue px-8",children:[u.jsx(A9,{className:"mr-8 f-14 cursor-pointer",onClick:()=>o({id:"",type:"auto"})}),"Automation"]}),u.jsx("div",{className:"border-solid-border1 my-12"})]}),u.jsxs("div",{className:"p-10 flex-1 overflow-auto",children:[u.jsx("div",{className:"mb-12 border-dashed-newborder h-48px radius-8 bg-blue-lighten9 d-flex align-center txt-darkblue cursor-pointer",onClick:()=>{d(!0)},children:u.jsxs("div",{className:"p-14 d-flex align-center",children:[u.jsx(c9,{}),u.jsx("p",{className:"f-w-600 f-14 ml-8",children:"New"})]})}),t?.data?.map(n=>u.jsxs("div",{className:"border-solid-input-border radius-12 px-12 py-10 d-flex mb-12 align-start",children:[u.jsxs("div",{className:"flex-1",onClick:()=>{e(n)},children:[u.jsx(X4,{defaultValue:n.condition,setValue:s=>{},isDisable:!0}),u.jsx("div",{children:u.jsx(Um,{className:"my-8"})}),u.jsx(Vm,{defaultValue:n.automation,setValue:s=>{},isDisable:!0})]}),u.jsx(tr.Switch,{...b,defaultChecked:n.isActive,onChange:s=>{a({id:n.id,isActive:s.target.checked})}}),u.jsx("img",{src:"/delete.svg",onClick:()=>{w({id:n.id})}})]}))]})]})})},T9=({editEdgeData:r,setSelectedId:o,selectAutomation:e,isCreateNewAutomation:d})=>{const{setValue:t,watch:l}=bb.useForm({defaultValues:{condition:{id:"",blocks:[]},automation:[]}}),{acceptedUser:i,selectFieldId:a,validateUser:w,workspaceId:b}=g.useContext(Ge);g.useEffect(()=>{t("automation",e.automation??[]),t("condition",e.condition??{id:"",blocks:[]})},[e.id]);const n=async()=>{const s=l(),p=s.automation?.map(m=>{switch(m.key){case"changes_field_value":const h=m.segments?.find(v=>v.valueType==="field"),f=m.segments[h?.childSegments?.[0]];return{targetWorkspaceId:b,targetFieldId:h.value,actionType:Xt.UPDATE_FIELD,content:{propertyData:[{datasetId:h.datasetId,datasetName:h.datasetName,isAssociate:h.isAssociate,property:h.property,fieldType:h.fieldType,value:f.value,setValue:f.value}],datasetId:h.datasetId,datasetName:h.datasetName}};case"send_notification":const k=m.segments?.find(v=>v.valueType==="user-notification"),x=m.segments[k?.childSegments?.[0]],c=v=>v.map(T=>{const L=i.find(q=>q.id===T);return{id:L?.id,email:L?.email}});return{targetWorkspaceId:b,targetFieldId:"",actionType:Xt.NOTIFY,content:{isDeleted:!1,isActive:!0,workspaceId:b,senderEmail:w.email,senderId:w.id,notificationType:"push",notificationTitle:"Automation",notificationDescription:x.value,notificationMetadata:{},isRead:!1,receiverDetails:c(k.value)}};case"move_to_other_work":let E=m.segments?.find(v=>v.valueType==="moveRecordToOtherWork");return{targetWorkspaceId:b,targetFieldId:"",actionType:Xt.MOVE_RECORD,content:{...E?.value}};case"copy_to_other_workspace_work":let y=m.segments?.find(v=>v.valueType==="workspace"),F=m.segments?.find(v=>v.valueType==="moveRecordToOtherWork");return{targetWorkspaceId:y?.value??b,targetFieldId:"",actionType:Xt.COPY_RECORD_TO_OTHER_WORKSPACE,content:{...F?.value}};case"send_notification_to_field":const I=m.segments?.find(v=>v.valueType==="users"),D=m.segments[I?.childSegments?.[0]];return{targetWorkspaceId:b,targetFieldId:"",actionType:Xt.NOTIFY,content:{isDeleted:!1,isActive:!0,workspaceId:b,senderEmail:w.email,senderId:w.id,notificationType:"push",notificationTitle:"Automation",notificationDescription:D.value,notificationMetadata:{},isRead:!1,receiverDetails:[],selectField:I.value}}}});d?await mA({workspaceId:b+"",fieldId:a,from:r?.source,to:r?.target,workflowSegId:r?.id,condition:s.condition,automation:s.automation,automationAction:p}):await kA({id:e.id,condition:s.condition,automation:s.automation,automationAction:p,workspaceId:b+""})};return u.jsx("div",{style:{position:"absolute",top:0,right:0,height:"100%",maxHeight:"704px",width:"420px",background:"#fff",borderLeft:"1px solid #ccc",zIndex:1e3},children:u.jsxs("div",{className:"px-16 py-12 d-flex flex-column edge-container maxh-703px",children:[u.jsxs("div",{children:[u.jsx("div",{className:"h-36px d-flex align-center f-w-600 f-14 txt-darkblue px-8",children:"Properties"}),u.jsx("div",{className:"border-solid-border1 my-12"})]}),u.jsxs("div",{className:"flex-1 overflow-auto hide-scroll",children:[u.jsx(X4,{defaultValue:l("condition"),setValue:s=>{t("condition",s)}}),u.jsx("div",{children:u.jsx(Um,{className:"my-8"})}),u.jsx(Vm,{defaultValue:l("automation"),setValue:s=>{t("automation",s)}})]}),u.jsxs("div",{className:"d-flex justify-end",children:[u.jsx(tr.Button,{variant:"outlined",color:"inherit",className:"mr-10",onClick:()=>o({id:"",type:"auto"}),children:"Cancel"}),u.jsx(tr.Button,{variant:"outlined",color:"primary",onClick:()=>{o({id:"",type:"auto"}),n()},children:"Update"})]})]})})},N9=({editEdgeData:r,selectedId:o,setSelectedId:e})=>{const[d,t]=g.useState({}),[l,i]=g.useState(!1);return Pm(d)&&!l?u.jsx(I9,{selectedId:o,setSelectedId:e,setSelectAutomation:t,setisCreateNewAutomation:i}):u.jsx(T9,{editEdgeData:r,selectAutomation:d,setSelectedId:e,isCreateNewAutomation:l})},P9=({selectedId:r,editEdgeData:o,updateEdgeData:e,setSelectedId:d})=>r.type===yf.Auto?u.jsx(N9,{editEdgeData:o,selectedId:r,setSelectedId:d}):u.jsx(h9,{edgeData:o,updateEdgeData:e,setSelectedId:d}),O9=({edges:r,updateEdgeData:o,saveToBackend:e})=>{const[d,t]=g.useState({id:"",type:yf.Config});return u.jsx("div",{children:d.id?u.jsx(P9,{selectedId:d,updateEdgeData:o,editEdgeData:r?.find(l=>l.id===d.id),setSelectedId:t}):u.jsx(_A,{edges:r,setSelectedId:t,saveToBackend:e})})},R9=({children:r,col:o,selectFieldId:e,validateUser:d,workspaceId:t,exampleData:l,acceptedUser:i,datasetId:a})=>u.jsx(Ge.Provider,{value:{col:o,selectFieldId:e,validateUser:d,workspaceId:t,exampleData:l,acceptedUser:i,datasetId:a},children:r}),M9={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",borderRadius:2,boxShadow:"24",p:4,background:"linear-gradient(101.49deg, #F8FDFF 11.98%, #FBF2FB 119.18%)",border:"1px solid #EAEFF4",outline:"none"},$9=({fieldId:r,col:o,validateUser:e,workspaceId:d,exampleData:t,acceptedUser:l,datasetId:i,onClose:a})=>{const w=o?.find(c=>c.field.id===r),b=$5(w.field.value),[n,s,p]=Eg(b),[m,h,f]=Dg([]);g.useEffect(()=>{(async E=>{try{const y=await uA({fieldId:E,workspaceId:d});s(y.data.workflowDefinition.nodes),h(y.data.workflowDefinition.edges)}catch(y){console.error("Error fetching automation:",y)}})(r)},[r]);const k=({id:c,data:E})=>{h(y=>y?.map(F=>(F.id===c&&(F.data=E),F)))},x=async()=>{const c=U5(m);await hA({workspaceId:d,workflow:{nodes:n,edges:m,workflow:c},fieldId:r})};return u.jsx(tr.Modal,{open:!0,onClose:()=>a,children:u.jsx(R9,{col:o,selectFieldId:r,validateUser:e,workspaceId:d,exampleData:t,acceptedUser:l,datasetId:i,children:u.jsx("div",{className:"workflow-we3434",children:u.jsxs("div",{className:"w-1225px h-703px border-solid-lightblue1 d-flex flex-column",style:M9,children:[u.jsxs("div",{className:"h-56px border-b-solid-border d-flex align-center justify-between px-20",children:[u.jsx("div",{className:"f-w-600 f-18 px-12",children:"Workflow"}),u.jsxs("div",{className:"d-flex align-center px-12",children:[u.jsx("div",{className:"border-solid-ligntbrown h-14px mr-8"}),u.jsx(M5,{className:"h-24px w-24px txt-lightblack3",onClick:()=>a()})]})]}),u.jsxs("div",{className:"flex-1 d-flex",children:[u.jsx(lw,{children:u.jsx(vA,{nodes:n,edges:m,setEdges:h,onNodesChange:p,onEdgesChange:f})}),u.jsx(O9,{edges:m,updateEdgeData:k,saveToBackend:x})]})]})})})})};Bo.ReactFlowModal=$9,Object.defineProperty(Bo,Symbol.toStringTag,{value:"Module"})});
187
+ `,d9=(r,o,e=void 0)=>{const d=o?.split(".");let t=r;for(const l of d)if(t&&typeof t=="object"&&l in t)t=t[l];else return e;return t},Pm=r=>r==null?!0:typeof r=="string"||Array.isArray(r)?r.length===0:typeof r=="object"?Object.keys(r).length===0:!1,t9=r=>{const o=typeof r=="string"?r:d9(r,"props.children","");let e=RegExp(/\b\w/g).exec(o);return Pm(e)||(e=((e.shift()||"")+(e.pop()||"")).toUpperCase()),e},l9=r=>r?.toLowerCase()?.split(/[\s\-_]+/).map(o=>o.charAt(0).toUpperCase()+o.slice(1)).join(" "),i9=({data:r,value:o})=>u.jsxs("div",{className:"d-flex align-center justify-between flex-1 text-truncate",id:"selection-ownerList",children:[u.jsx("div",{className:"user-oval-32 rounded-circle mr-2 bg-blue-lighten1",children:r.picture?u.jsx(tr.Avatar,{className:"w-100 h-100 rounded-circle",sx:{width:32,height:32},src:r.picture,alt:"profile"}):u.jsx("div",{className:"user-oval-32 rounded-circle align-center d-flex justify-around",children:u.jsx("p",{className:"f-11 f-w-500 txt-secondary-color font-600 align-center d-flex",children:t9(r.name)})})}),u.jsxs("div",{className:"flex-1 text-truncate ml-4 l-h-18",children:[u.jsx("p",{className:"f-14 f-w-400 text-truncate m-0",children:l9(r.name)}),u.jsx("p",{className:"f-12 f-w-400 txt-darken1 text-truncate m-0",children:r.roleName||"--"})]}),o===r.id?u.jsx("div",{className:"f-20 txt-bllue-darken8",children:u.jsx(wb.CheckOutlined,{className:"f-20 txt-bllue-darken8"})}):u.jsx(u.Fragment,{})]}),Ge=g.createContext(null),Om=({selectedAssignees:r,setValue:o,datasetId:e,isForNotification:d=!1})=>{const[t,l]=g.useState([]),[i,a]=g.useState(""),[w,b]=g.useState(!1),{acceptedUser:n,workspaceId:s,validateUser:p}=g.useContext(Ge),m={data:[{id:"b324369714a1420bbbc73d94c2178931",firstName:"guna",lastName:"lan",name:"guna lan",email:"guna@mailsac.com",teamId:null,privilege:[],teamName:null,roleName:"Super Admin",picture:"",timeZone:"",language:"en",dateFormat:null,timeFormat:null,weekStartsOn:"sunday"}]},{data:h}=Jr.useQuery(r9,{variables:{input:{datasetId:e,searchKey:i,workspaceId:Number(s),userId:p.id}},fetchPolicy:"network-only",client:Tm});console.log("filteredOptions",h);const f=x=>{let c;t.some(E=>E.id===x.id)?c=t.filter(E=>E.id!==x.id):c=[...t,x],l(c),o(c.map(E=>E.id))},k=x=>{const c=t.filter(E=>E.id!==x);l(c),o(c.map(E=>E.id))};return w?u.jsx(tr.ClickAwayListener,{onClickAway:()=>b(!1),children:u.jsxs("div",{className:"h-34px w-380px position-relative bg-white",children:[t.length?u.jsx("div",{className:"d-flex align-center flex-wrap bg-white z-index-100",children:t?.map(x=>u.jsxs("div",{className:"h-34px d-flex align-center justify-between px-8 cursor-pointer radius-4 hover-show-container border-solid-popper-border ml-4 mt-4",onClick:()=>{k(x.id)},children:[u.jsx("div",{className:"f-14 f-w-500 txt-blue-darken10 ",children:x.name}),u.jsx(NA,{className:"f-20 ml-6"})]},x.id))}):u.jsx("div",{className:"h-34px w-380px d-flex align-center justify-between px-8 cursor-pointer radius-4 hover-show-container",onClick:()=>{},children:"--"}),u.jsx("div",{className:"position-relative",children:u.jsx("div",{className:`position-absolute ${t.length?"top-10px":"top--25px"} radius-8 search-mapdataset z-index-1000 bg-white`,children:u.jsxs("div",{className:"w-380px minh-46px radius-8 popper-border-solid-popper-border",children:[u.jsx("div",{className:"h-46px bg-grey-lighten4 boder-b-solid-popper-border tl-radius-8 tr-radius-8 p-10 d-flex align-center",children:u.jsx(tr.TextField,{sx:{input:{"&::placeholder":{color:Ni["success-disabled"],opacity:100}}},fullWidth:!0,className:"mapdataset-dropdown",id:"single-line",variant:"standard",placeholder:"Search",value:i,onChange:x=>a(x.target.value),autoComplete:"off",autoFocus:!0})}),!h?.getAccessUserList?.length&&i?u.jsx("div",{className:"p-10",children:u.jsx("div",{className:"d-flex align-center multi-select",children:u.jsxs("div",{className:"h-36px d-flex align-center f-w-400 f-14 txt-brown-dark1 pl-8 cursor-pointer",children:[u.jsx("p",{className:" f-w-600 txt-text-grey-primary mr-4",children:"user not found"})," ",` "${i}"`]})},"new-associate")}):u.jsx("div",{className:"bg-white maxh-202px overflow-auto p-8 px-6 bl-radius-8 br-radius-8",children:h?.getAccessUserList?.map((x,c)=>u.jsx("div",{className:` radius-4 px-10 py-8 ${h?.getAccessUserList?.length!==c+1?"mb-4":""} bg-hover-grey-lighten4 cursor-pointer d-flex align-center justify-between hover-show-container ${t?.some(E=>E.id===x.id)?"bg-blue-lighten9":""}`,onClick:()=>{f(x)},children:u.jsxs("div",{className:"d-flex align-center",children:[u.jsx(tr.Checkbox,{checked:t?.some(E=>E.id===x.id),size:"small"},x.id),u.jsx(i9,{data:x,value:""})]})},x.id))})]})})})]})}):u.jsx(u.Fragment,{children:d?u.jsx("div",{style:{textDecoration:"underline",textUnderlineOffset:"2px"},className:"pl-4",onClick:()=>b(!0),children:r.length?r?.map((x,c)=>{const E=n.find(y=>y.id===x);return u.jsx("span",{children:E?.name+`${r.length-1===c?"":","}`})}):u.jsx("div",{className:"",children:" select user"})}):u.jsxs("div",{className:"d-flex h-40px maxh-40px radius-8 border-solid-border px-12 align-center justify-between",onClick:()=>b(!0),children:[u.jsx(a9,{assignTo:r,acceptedUserData:m.data}),u.jsx(rf,{})]})})},a9=({assignTo:r,acceptedUserData:o})=>{const e=r?.map(t=>o?.find(l=>l.id===t)),d=e?.length>4?e.slice(0,4):e;return d?.length?u.jsxs("div",{className:"d-flex align-center",id:"dataCollab-view",children:[d?.map(t=>t?.picture?u.jsx(tr.Avatar,{className:"w-100 h-100 rounded-circle mr-4",sx:{width:32,height:32},src:t.picture,alt:"profile"},t?.id):u.jsx("div",{className:"w-32px h-32px radius-360 bg-orange-lighten5 d-flex align-center justify-center f-10 f-w-500 txt-primary mr-4",children:`${t?.firstName?Xp(t?.firstName[0]):""}${t?.lastName?Xp(t?.lastName[0]):""}`},t?.id)),e?.length>4&&u.jsxs("div",{className:"w-24px h-24px p-2 radius-360 bg-avatarColor txt-blue-darken10 d-flex align-center justify-center avatar",children:["+",e.length-4]})]}):"--"},w9=({options:r,defaultValue:o=[],setValue:e})=>{const[d,t]=g.useState(""),[l,i]=g.useState(o),[a,w]=g.useState(0),b=g.useRef(null),[n,s]=g.useState(!1);g.useEffect(()=>{b.current&&w(b.current.offsetHeight)},[l]);const p=m=>{let h;l.some(f=>f.id===m.id)?h=l.filter(f=>f.id!==m.id):h=[...l,m],i(h),e(h)};return n?u.jsx("div",{className:" bg-white w-380px h-46px border-solid-input-border radius-8 ",children:u.jsx(tr.ClickAwayListener,{onClickAway:()=>{s(!1)},children:u.jsxs("div",{className:"position-relative",children:[u.jsx("div",{ref:b,className:" w-100 res-chip-min-height h-100 radius-4 bg-white d-flex align-center d-flex flex-wrap py-4 gap-8 px-12",children:l.length?u.jsx(u.Fragment,{children:l?.map((m,h)=>u.jsx(tr.Chip,{label:m.displayName,onDelete:()=>p(m),sx:{bgcolor:Ni["popper-border"],border:0,borderRadius:2,margin:"0 !important",padding:"6px 8px 6px 8px",gap:1,".MuiChip-label":{fontSize:14,fontFamily:"Inter, sans-serif !important"}},deleteIcon:u.jsx(wb.CloseOutlined,{sx:{fontSize:"16px",color:m.statusColor?"#fff":"grey"},className:"cursor-pointer icon-close"}),variant:"outlined"},h))}):u.jsx("div",{className:"ml-10 d-flex align-center f-14 txt-text-grey-hint",children:"No fields"})}),u.jsx("div",{className:"position-absolute radius-8 search-mapdataset z-index-1000",style:{top:`${a+4}px`},children:u.jsxs("div",{className:"w-380px minh-46px radius-8 popper-border-solid-popper-border",children:[u.jsx("div",{className:"h-46px bg-grey-lighten4 boder-b-solid-popper-border tl-radius-4 tr-radius-8 p-10",children:u.jsx(tr.TextField,{sx:{input:{"&::placeholder":{color:Ni["success-disabled"],opacity:100}}},fullWidth:!0,className:"mapdataset-dropdown",variant:"standard",placeholder:"Search",value:d,onChange:m=>t(m.target.value),autoFocus:!0})}),u.jsx("div",{className:"bg-white maxh-200px overflow-auto w-100 py-8 px-6 bl-radius-8 br-radius-8",children:u.jsx(u.Fragment,{children:r?.filter(m=>m.displayName.toLowerCase().includes(d.toLowerCase()))?.map(m=>u.jsxs("div",{className:` h-36px radius-4 px-10 py-8 mb-2 bg-hover-grey-lighten4 cursor-pointer d-flex justify-start hover-show-container align-center ${l.some(h=>h.id===m.id)?"bg-blue-lighten9 txt-blue-darken10 radius-4 p-4":""}`,onClick:()=>{p(m)},children:[u.jsx(tr.Checkbox,{className:"mx-10 p-0",size:"small",color:"primary",checked:l.some(h=>h.id===m.id)}),u.jsx("div",{className:"f-14 f-w-400 txt-text-grey-primary",children:m.displayName})]},m.id))})})]})})]})})}):u.jsx(u.Fragment,{children:u.jsxs("div",{className:"d-flex align-center h-46px border-solid-input-border radius-8 p-12 justify-between",onClick:()=>s(!0),children:[u.jsxs("div",{className:"d-flex",children:[Array.isArray(o)&&o?.length?(o?.length>3?o.slice(0,3):o)?.map((m,h)=>u.jsx(tr.Chip,{label:m.displayName,sx:{bgcolor:Ni["popper-border"],border:0,borderRadius:2,margin:"0 !important",padding:"6px 8px 6px 8px",gap:1,".MuiChip-label":{fontSize:14,fontFamily:"Inter, sans-serif !important"}},variant:"outlined"},h)):u.jsx(u.Fragment,{children:"-"}),o?.length>3&&u.jsxs("div",{className:"w-24px h-24px p-2 radius-360 bg-avatarColor txt-blue-darken10 d-flex align-center justify-center avatar h-26px px-6 py-8 bg-lightblue1 radius-4 border-solid-popper-border ml-4",children:["+",o.length-3]})]}),u.jsx(rf,{})]})})},b9=[{field:{id:"256f35efc157446dba47e0922057ff61",isActive:!0,isDeleted:!1,createdAt:"2025-08-21T08:44:05.608Z",updatedAt:"2025-08-21T08:44:05.608Z",fieldDisplayName:"Name",fieldInternalName:"work_4_name",datasetName:"work_4",sensitive:!1,hidden:!1,isHideField:!1,dataType:"single-line",isRequired:!0,isUnique:!1,isAssociatedField:!1,isSystemDefined:!1,isImmutable:!1,isPrimaryField:!0,isSelected:!0,isSortable:!0,sortOrder:"1",createdBy:"7fda40cd83dc4391a7b751a67c0dfaa6",updatedBy:null,deletedBy:null,CreatedById:"7fda40cd83dc4391a7b751a67c0dfaa6",deletedAt:null,prefix:"",postfix:"",value:[],columnWidth:null,toggleState:null,workflow:null,name:"Name",internalName:"work_4_name",isAssociated:!1,type:"work_4"},group:{id:"fc4a57aec9094c47bbdf55a4f028072c",datasetName:"work_4",groupName:"Work 4 Information"},position:1,isSelected:!0,isPrimaryField:!0,isDeleted:!1,isAssociated:!1,datasetName:"work_4",datasetId:"557465b7fd9244849f00076491369c84",isRequired:!0,isImmutable:!1},{field:{id:"d397ae5f3e2f48a280dc6f7644325b00",isActive:!0,isDeleted:!1,createdAt:"2025-08-21T08:44:05.608Z",updatedAt:"2025-08-21T08:44:05.608Z",fieldDisplayName:"Status",fieldInternalName:"stage",datasetName:"work_4",sensitive:!1,hidden:!1,isHideField:!1,dataType:"drop-down",isRequired:!0,isUnique:!1,isAssociatedField:!1,isSystemDefined:!1,isImmutable:!1,isPrimaryField:!1,isSelected:!0,isSortable:!1,sortOrder:"2",createdBy:"7fda40cd83dc4391a7b751a67c0dfaa6",updatedBy:null,deletedBy:null,CreatedById:"7fda40cd83dc4391a7b751a67c0dfaa6",deletedAt:null,prefix:"",postfix:"",value:[{key:"New",value:"New"},{key:"Open",value:"Open"},{key:"In Progress",value:"In Progress"},{key:"Qualified",value:"Qualified"},{key:"Unqualified",value:"Unqualified"},{key:"Attempted To Contact",value:"Attempted To Contact"},{key:"Connected",value:"Connected"},{key:"Bad Timing",value:"Bad Timing"},{key:"Hot Lead",value:"Hot Lead"}],columnWidth:null,toggleState:null,workflow:null,name:"Status",internalName:"stage",isAssociated:!1,type:"work_4"},group:{id:"fc4a57aec9094c47bbdf55a4f028072c",datasetName:"work_4",groupName:"Work 4 Information"},position:2,isSelected:!0,isPrimaryField:!1,isDeleted:!1,isAssociated:!1,datasetName:"work_4",datasetId:"557465b7fd9244849f00076491369c84",isRequired:!0,isImmutable:!1},{field:{id:"bfb6fa887f67486d93ab3c5516f93f4c",isActive:!0,isDeleted:!1,createdAt:"2025-08-21T08:44:05.608Z",updatedAt:"2025-08-21T08:44:05.608Z",fieldDisplayName:"Owner",fieldInternalName:"owner",datasetName:"work_4",sensitive:!1,hidden:!1,isHideField:!1,dataType:"user",isRequired:!0,isUnique:!1,isAssociatedField:!1,isSystemDefined:!1,isImmutable:!1,isPrimaryField:!1,isSelected:!0,isSortable:!0,sortOrder:"3",createdBy:"7fda40cd83dc4391a7b751a67c0dfaa6",updatedBy:null,deletedBy:null,CreatedById:"7fda40cd83dc4391a7b751a67c0dfaa6",deletedAt:null,prefix:"",postfix:"",value:[],columnWidth:null,toggleState:null,workflow:null,name:"Owner",internalName:"owner",isAssociated:!1,type:"work_4"},group:{id:"fc4a57aec9094c47bbdf55a4f028072c",datasetName:"work_4",groupName:"Work 4 Information"},position:3,isSelected:!0,isPrimaryField:!1,isDeleted:!1,isAssociated:!1,datasetName:"work_4",datasetId:"557465b7fd9244849f00076491369c84",isRequired:!0,isImmutable:!1},{field:{id:"643e3725963e47fb96fc192ddd8680f4",isActive:!0,isDeleted:!1,createdAt:"2025-08-21T08:44:05.608Z",updatedAt:"2025-08-21T08:44:05.608Z",fieldDisplayName:"Priority",fieldInternalName:"priority",datasetName:"work_4",sensitive:!1,hidden:!1,isHideField:!1,dataType:"priority",isRequired:!0,isUnique:!1,isAssociatedField:!1,isSystemDefined:!1,isImmutable:!1,isPrimaryField:!1,isSelected:!0,isSortable:!1,sortOrder:"4",createdBy:"7fda40cd83dc4391a7b751a67c0dfaa6",updatedBy:null,deletedBy:null,CreatedById:"7fda40cd83dc4391a7b751a67c0dfaa6",deletedAt:null,prefix:"",postfix:"",value:[{key:"Low",value:"Low",statusColor:null},{key:"Moderate",value:"Moderate",statusColor:null},{key:"High",value:"High",statusColor:null}],columnWidth:null,toggleState:null,workflow:null,name:"Priority",internalName:"priority",isAssociated:!1,type:"work_4"},group:{id:"fc4a57aec9094c47bbdf55a4f028072c",datasetName:"work_4",groupName:"Work 4 Information"},position:4,isSelected:!0,isPrimaryField:!1,isDeleted:!1,isAssociated:!1,datasetName:"work_4",datasetId:"557465b7fd9244849f00076491369c84",isRequired:!0,isImmutable:!1},{field:{id:"e6077294af434793aa036c73337f0163",isActive:!0,isDeleted:!1,createdAt:"2025-08-21T09:33:51.860Z",updatedAt:"2025-08-21T09:33:52.122Z",fieldDisplayName:"interview",fieldInternalName:"interview",datasetName:"work_4",sensitive:!1,hidden:!1,isHideField:!1,dataType:"drop-down",isRequired:!1,isUnique:!1,isAssociatedField:!1,isSystemDefined:!1,isImmutable:!1,isPrimaryField:!1,isSelected:!0,isSortable:!1,sortOrder:"5",createdBy:"7fda40cd83dc4391a7b751a67c0dfaa6",updatedBy:null,deletedBy:null,CreatedById:"7fda40cd83dc4391a7b751a67c0dfaa6",deletedAt:null,prefix:null,postfix:null,value:[{key:"stage 1",value:"stage 1",statusColor:"#397E4E"},{key:"stage 2",value:"stage 2",statusColor:"#5DC975"},{key:"stage 3",value:"stage 3",statusColor:"#9DD32D"},{key:"stage 4",value:"stage 4",statusColor:"#CAB642"},{key:"stage 5",value:"stage 5",statusColor:"#E0CC33"}],columnWidth:null,toggleState:!0,workflow:null,name:"interview",internalName:"interview",isAssociated:!1,type:"work_4"},group:{id:"fc4a57aec9094c47bbdf55a4f028072c",datasetName:"work_4",groupName:"Work 4 Information"},position:6,isSelected:!0,isPrimaryField:!1,isDeleted:!1,isAssociated:!1,datasetName:"work_4",datasetId:"557465b7fd9244849f00076491369c84",isRequired:!1,isImmutable:!1},{field:{id:"c6104a0ccd7e4636a72bf13380c6491e",isActive:!0,isDeleted:!1,createdAt:"2025-08-22T09:26:10.456Z",updatedAt:"2025-08-22T09:26:10.733Z",fieldDisplayName:"coll",fieldInternalName:"coll",datasetName:"work_4",sensitive:!1,hidden:!1,isHideField:!1,dataType:"collaborators",isRequired:!1,isUnique:!1,isAssociatedField:!1,isSystemDefined:!1,isImmutable:!1,isPrimaryField:!1,isSelected:!0,isSortable:!1,sortOrder:"6",createdBy:"7fda40cd83dc4391a7b751a67c0dfaa6",updatedBy:null,deletedBy:null,CreatedById:"7fda40cd83dc4391a7b751a67c0dfaa6",deletedAt:null,prefix:null,postfix:null,value:[],columnWidth:null,toggleState:null,workflow:null,name:"coll",internalName:"coll",isAssociated:!1,type:"work_4"},group:{id:"fc4a57aec9094c47bbdf55a4f028072c",datasetName:"work_4",groupName:"Work 4 Information"},position:7,isSelected:!0,isPrimaryField:!1,isDeleted:!1,isAssociated:!1,datasetName:"work_4",datasetId:"557465b7fd9244849f00076491369c84",isRequired:!1,isImmutable:!1}],G4={status_changes:{type:"condition",segments:[{segmentsId:0,type:"dropdown",valueType:"field",optionType:["priority","drop-down"],value:"",childSegments:[2]},{segmentsId:1,type:"text",value:"is value of"},{segmentsId:2,type:"dropdown",valueType:"field-options",mapSegmentsId:0,value:""}]},number_lessthan:{type:"condition",segments:[{segmentsId:0,type:"dropdown",valueType:"field",optionType:["number","currency"],value:"",childSegments:[2]},{segmentsId:1,type:"text",value:"is less than"},{segmentsId:2,type:"input",valueType:"number",value:"",mapSegmentsId:0}]},number_greaterthan:{type:"condition",segments:[{segmentsId:0,type:"dropdown",valueType:"field",optionType:["number","currency"],value:"",childSegments:[2]},{segmentsId:1,type:"text",value:"is greater than"},{segmentsId:2,type:"input",valueType:"number",value:"",mapSegmentsId:0}]}},n9=[{key:"status_changes",displayContent:"status is value of",conditionAuto:G4.status_changes},{key:"number_lessthan",displayContent:"Number is less than",conditionAuto:G4.number_lessthan},{key:"number_greaterthan",displayContent:"Number is greater than",conditionAuto:G4.number_greaterthan}],sl={changes_field_value:{key:"changes_field_value",segments:[{segmentsId:0,type:"text",value:"set"},{segmentsId:1,type:"dropdown",valueType:"field",optionType:"",fieldType:"",value:"",childSegments:[3]},{segmentsId:2,type:"text",value:"to"},{segmentsId:3,type:"input",valueType:"number",value:"",mapSegmentsId:1}]},send_notification:{key:"send_notification",segments:[{segmentsId:0,type:"text",value:"Notify the"},{segmentsId:1,type:"user",valueType:"user-notification",optionType:"",fieldType:"",value:[],childSegments:[3]},{segmentsId:2,type:"text",value:"as"},{segmentsId:3,type:"notification",valueType:"",value:"",mapSegmentsId:1}]},move_to_other_work:{key:"move_to_other_work",segments:[{segmentsId:0,type:"text",value:"Move to"},{segmentsId:1,type:"moveRecordToOtherWork",valueType:"moveRecordToOtherWork",optionType:"",fieldType:"",value:[]}]},copy_to_other_workspace_work:{key:"copy_to_other_workspace_work",segments:[{segmentsId:0,type:"text",value:"Move to"},{segmentsId:1,type:"workspace",valueType:"workspace",optionType:"",fieldType:"",value:[],childSegments:[2]},{segmentsId:2,type:"moveRecordToOtherWork",valueType:"moveRecordToOtherWork",optionType:"",fieldType:"",value:[],mapSegmentsId:1}]},send_notification_to_field:{key:"send_notification_to_field",segments:[{segmentsId:0,type:"text",value:"Notify the"},{segmentsId:1,type:"dropdown",valueType:"users",optionType:"",fieldType:"",value:[],childSegments:[3]},{segmentsId:2,type:"text",value:"as"},{segmentsId:3,type:"notification",valueType:"",value:"",mapSegmentsId:1}]}},s9=[{key:"changes_field_value",displayAutomation:"change Field Value",automation:sl.changes_field_value},{key:"send_notification",displayAutomation:"send Notification",automation:sl.send_notification},{key:"move_to_other_work",displayAutomation:"move to other work",automation:sl.move_to_other_work},{key:"copy_to_other_workspace_work",displayAutomation:"move to other workspace work",automation:sl.copy_to_other_workspace_work},{key:"send_notification_to_field",displayAutomation:"send Notification by field",automation:sl.send_notification_to_field}];var pl={},Rm;function p9(){if(Rm)return pl;Rm=1;var r=Qo();Object.defineProperty(pl,"__esModule",{value:!0}),pl.default=void 0;var o=r(je()),e=he();return pl.default=(0,o.default)((0,e.jsx)("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1"}),"AddRounded"),pl}var f9=p9();const Mm=zo(f9),X4=({defaultValue:r,setValue:o,isDisable:e=!1})=>{const[d,t]=g.useState(r),{col:l}=g.useContext(Ge),[i,a]=g.useState(!0);g.useEffect(()=>{t(r)},[r]);const w=(p,m,h)=>{const f=d.blocks.map((k,x)=>x!==p?k:{...k,segments:k.segments.map((c,E)=>E!==m?c:{...c,value:h})});t(k=>({...k,blocks:f})),o({...d,blocks:f})},b=(p,m)=>{const h={...d};h.blocks=[...h.blocks,{...p,key:m}],t(h),a(!1)},n=({optionType:p,valueType:m,fieldId:h})=>{const f=l?.map(k=>k.field);if(m==="field")return f.filter(k=>p?.includes(k.dataType)&&!k.isAssociated).map(k=>({id:k.id,displayName:k.name,internalName:k.internalName}));if(m==="field-options")return f.find(x=>x.id===h)?.value?.map(x=>({id:x.key,displayName:x.value}))},s=p=>{let m={...d,blocks:d.blocks.filter((h,f)=>f!==p)};t(m),o(m)};return u.jsxs(u.Fragment,{children:[u.jsx("div",{children:d?.blocks?.map((p,m)=>u.jsxs("div",{className:"d-flex hide-icon",children:[u.jsxs("div",{className:"f-w-400 f-14 txt-black2 d-flex flex-wrap flex-1 align-center",children:[m?u.jsx("span",{children:"And only if"}):u.jsx("span",{children:"When a"}),p.segments.map((h,f)=>h.type==="text"?u.jsxs("span",{children:[" ",h.value," "]},f):h.type==="input"?u.jsx(tr.TextField,{id:"standard-basic",variant:"standard",className:"mx-8",disabled:e,defaultValue:h.value,type:h.valueType,onChange:k=>w(m,f,k.target.value),sx:{margin:0,maxWidth:100,padding:0,"& .MuiInputBase-input":{padding:"0 !important",paddingRight:"0 !important"},"& .MuiInputBase-root":{margin:0}}}):h.type==="dropdown"?u.jsx(tr.FormControl,{variant:"standard",sx:{width:"auto"},className:"mx-8",children:u.jsx(tr.Select,{IconComponent:()=>null,value:h.value,disabled:e,sx:{minWidth:30,padding:0,"& .MuiSelect-select":{padding:"0 !important",paddingRight:"0 !important"},"& .MuiInputBase-input":{padding:"0 !important",paddingRight:"0 !important"}},onChange:k=>w(m,f,k.target.value),children:n({optionType:h.optionType,valueType:h.valueType,fieldId:p?.segments?.[h.mapSegmentsId]?.value})?.map(k=>u.jsx(tr.MenuItem,{value:k.id,children:k.displayName},k.id))},`${m}_${f}`)}):null)]}),d.blocks.length>1?u.jsx("img",{src:"/delete.svg",className:"hide cursor-pointer",onClick:()=>{s(m)}}):u.jsx(u.Fragment,{}),u.jsx("div",{children:!e&&d.blocks.length-1===m?u.jsx(u.Fragment,{children:u.jsx(Mm,{className:"f-w-400 f-14 txt-black2 cursor-pointer",onClick:()=>{a(!0)}})}):u.jsx(u.Fragment,{})})]},m))}),!e&&i?u.jsx(u.Fragment,{children:u.jsx(tr.FormControl,{variant:"standard",sx:{width:"auto"},className:"mx-8",children:u.jsx(tr.Select,{labelId:"demo-simple-select-standard-label",id:"demo-simple-select-standard",IconComponent:()=>null,sx:{minWidth:30,padding:0,"& .MuiSelect-select":{padding:"0 !important",paddingRight:"0 !important"},"& .MuiInputBase-input":{padding:"0 !important",paddingRight:"0 !important"}},children:n9?.map(p=>u.jsx(tr.MenuItem,{onClick:()=>b(p.conditionAuto,p.key),children:p.displayContent},p.key))})})}):u.jsx(u.Fragment,{})]})},h9=({edgeData:r,updateEdgeData:o,setSelectedId:e})=>{console.log("==>edgeData",r);const{setValue:d,watch:t}=bb.useForm({defaultValues:{permission:r?.data?.permission||[],requiredColumns:r?.data?.requiredColumns||[],condition:r?.data?.condition||{id:"",blocks:[]}}}),l=b9?.map(i=>({id:i.field.id,displayName:i?.field?.name,internalName:i?.field?.internalName}));return u.jsx("div",{style:{position:"absolute",top:0,right:0,height:"100%",width:"420px",background:"#fff",borderLeft:"1px solid #ccc",zIndex:1e3},children:u.jsxs("div",{className:"px-16 py-12 d-flex flex-column edge-container",children:[u.jsxs("div",{children:[u.jsx("div",{className:"h-36px d-flex align-center f-w-600 f-14 txt-darkblue px-8",children:"Configuration"}),u.jsx("div",{className:"border-solid-border1 my-12"})]}),u.jsx("div",{className:"flex-1",children:u.jsxs("div",{className:"p-10",children:[u.jsxs("div",{className:"h-44px flex-1 radius-8 px-12 py-6 d-flex justify-between align-center cursor-pointer",style:{backgroundColor:r4(r?.data?.sourceColor),border:`1px solid ${Ve(r?.data?.sourceColor)}`},children:[u.jsx("div",{className:"f-w-600 f-14 txt-black mr-20 ",style:{color:Ve(r?.data?.sourceColor)},children:r?.data?.sourceLabel}),u.jsx("img",{src:"/arrow.svg",alt:"arrow",className:"mr-20"}),u.jsx("div",{className:"f-w-600 f-14 txt-black mr-20 ",style:{color:Ve(r.data?.targetColor)},children:r?.data?.targetLabel})]}),u.jsx("div",{className:"border-solid-border1 my-16"}),u.jsxs("div",{className:"mb-16",children:[u.jsx("p",{className:"f-w-600 f-14 txt-black2 mb-6",children:"Permissions"}),u.jsx(Om,{selectedAssignees:t("permission"),datasetId:"460e5046a84043f7b8193feb2ece19d0",setValue:i=>{d("permission",i)}})]}),u.jsxs("div",{className:"mb-16",children:[u.jsx("p",{className:"f-w-600 f-14 txt-black2 mb-6",children:"Required Columns"}),u.jsx(w9,{defaultValue:t("requiredColumns"),options:l,setValue:i=>{d("requiredColumns",i)}})]}),u.jsxs("div",{children:[u.jsx("div",{className:"d-flex align-center justify-between",children:u.jsx("p",{className:"f-w-600 f-14 txt-black2",children:"Condition"})}),u.jsx(X4,{defaultValue:t("condition"),setValue:i=>{d("condition",i)}})]})]})}),u.jsxs("div",{className:"d-flex justify-end",children:[u.jsx(tr.Button,{variant:"outlined",color:"inherit",className:"mr-10",onClick:()=>e({id:"",type:"config"}),children:"Cancel"}),u.jsx(tr.Button,{variant:"outlined",color:"primary",onClick:()=>{o({id:r.id,data:{...r.data,...t()}}),e({id:"",type:"config"})},children:"Update"})]})]})})};var fl={},$m;function m9(){if($m)return fl;$m=1;var r=Qo();Object.defineProperty(fl,"__esModule",{value:!0}),fl.default=void 0;var o=r(je()),e=he();return fl.default=(0,o.default)((0,e.jsx)("path",{d:"m19 15-1.41-1.41L13 18.17V2h-2v16.17l-4.59-4.59L5 15l7 7z"}),"South"),fl}var k9=m9();const Um=zo(k9);var hl={},Lm;function x9(){if(Lm)return hl;Lm=1;var r=Qo();Object.defineProperty(hl,"__esModule",{value:!0}),hl.default=void 0;var o=r(je()),e=he();return hl.default=(0,o.default)((0,e.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),hl}var g9=x9();const c9=zo(g9);var ml={},jm;function u9(){if(jm)return ml;jm=1;var r=Qo();Object.defineProperty(ml,"__esModule",{value:!0}),ml.default=void 0;var o=r(je()),e=he();return ml.default=(0,o.default)((0,e.jsx)("path",{d:"M17.77 3.77 16 2 6 12l10 10 1.77-1.77L9.54 12z"}),"ArrowBackIosNew"),ml}var F9=u9();const A9=zo(F9);var kl={},zm;function y9(){if(zm)return kl;zm=1;var r=Qo();Object.defineProperty(kl,"__esModule",{value:!0}),kl.default=void 0;var o=r(je()),e=he();return kl.default=(0,o.default)((0,e.jsx)("path",{d:"M12 6c3.79 0 7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 5c1.38 0 2.5 1.12 2.5 2.5S13.38 14 12 14s-2.5-1.12-2.5-2.5S10.62 9 12 9m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7"}),"VisibilityOutlined"),kl}var E9=y9();const D9=zo(E9),v9=({defaultValue:r,setValue:o})=>{const[e,d]=g.useState(r),[t,l]=g.useState(!1),{acceptedUser:i,col:a,exampleData:w}=g.useContext(Ge),b=a?.map(s=>s.field),n=g.useMemo(()=>{const s=new Map;return b?.forEach(p=>{if(p.dataType==="user"){const m=w[p.internalName],h=i.find(f=>f.id===m);s.set(p.internalName,h?.name??"")}else if(p.dataType==="collaborators"){const m=w[p.internalName]?.split(",");let h=[];m?.forEach(f=>{const k=i.find(x=>x.id===f);h=[...h,k?.name||""]}),s.set(p.internalName,h.join(","))}else s.set(p.internalName,w[p.internalName])}),s},[b,i]);return u.jsxs("div",{children:[u.jsx("div",{style:{textDecoration:"underline",textUnderlineOffset:"2px"},onClick:()=>{l(!0)},children:"Template"}),t?u.jsx(tr.ClickAwayListener,{onClickAway:()=>l(!1),children:u.jsx("div",{className:"w-100 d-flex align-center txt-black2 f-12 mb-8",children:u.jsxs("div",{className:"w-358px border-solid-lightblue1 radius-12 bg-white",children:[u.jsx("div",{className:"h-46px border-b-solid-popper-border tl-radius-10 tr-radius-10 px-10 d-flex align-center f-14 f-w-400",children:"Send Notification"}),u.jsxs("div",{className:"my-8 h-31px d-flex align-center px-6 f-12",children:[u.jsx("div",{className:"w-82px d-flex align-center justify-center ",children:"Templates :"}),u.jsx("div",{className:"radius-100 p-8 maxh-28px h-28px w-auto border-solid-popper-border ml-4",children:"Reminder"}),u.jsx("div",{className:"radius-100 p-8 maxh-28px h-28px w-auto border-solid-popper-border ml-4",children:"Status Update"}),u.jsx("div",{className:"radius-100 p-8 maxh-28px h-28px w-auto border-solid-popper-border ml-4",children:"Deadline Alert"})]}),u.jsxs("div",{className:"h-151px px-12 mb-8",children:[u.jsx("div",{className:"h-31px f-w-600 f-12 d-flex align-center",children:"Message"}),u.jsx(tr.TextField,{placeholder:"Type your message here...",className:"f-12",multiline:!0,rows:4,fullWidth:!0,variant:"outlined",value:e,onChange:s=>{d(s.target.value)}})]}),u.jsx("div",{style:{gap:"4px"},className:"px-12 py-8 d-flex flex-wrap mb-8",children:b?.map(s=>u.jsx("div",{className:"radius-100 p-8 maxh-28px h-28px w-auto border-solid-popper-border ml-4 f-12",onClick:()=>{d(p=>p+`{${s.internalName}}`)},children:s.name}))}),u.jsx("div",{className:"p-12 mb-8",children:u.jsxs("div",{className:"h-160px radius-8 border-solid-lightblue1 bg-lightblue3 px-8 d-flex flex-column pb-8",children:[u.jsxs("div",{className:"h-31px d-flex align-center",children:[u.jsx(D9,{className:"f-12"}),u.jsx("p",{className:"ml-4 f-12 ",children:"Preview"})]}),u.jsx("div",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},className:"border-solid-lightblue1 h-100 flex-1 bg-white radius-4 p-8",children:e?.replace(/\{(\w+)\}/g,(s,p)=>n.get(p))})]})}),u.jsxs("div",{className:"bl-radius-10 br-radius-10 h-56px border-t-solid-popper-border d-flex justify-end px-12 align-center",children:[u.jsx(tr.Button,{variant:"outlined",color:"inherit",className:"mr-10 h-31px radius-8",onClick:()=>{l(!1)},children:"Cancel"}),u.jsx(tr.Button,{variant:"outlined",color:"primary",className:"h-31px radius-8",onClick:()=>{o(e),l(!1)},children:"Done"})]})]})})}):u.jsx(u.Fragment,{})]})},S9={};function _9(r,o){switch(o.type){case"ADD_OR_UPDATE":return{...r,[o.key]:o.value};case"DELETE":const e={...r};return delete e[o.key],e;default:return r}}const C9=({datasetId:r,workspaceId:o,targetWorkspaceId:e,autoIndex:d,segmentIndex:t,setValue:l,defaultValue:i})=>{const{mappingField:a,targetWork:w}=i,[b,n]=g.useState(null),[s,p]=g.useReducer(_9,a??S9),[m,h]=g.useState(!1);g.useEffect(()=>{n(w)},[a,w]);const{data:f}=Jr.useQuery(o9,{variables:{input:{workspaceId:Number(e)}},fetchPolicy:"network-only",client:Y4}),{data:k}=Jr.useQuery(Nm,{variables:{input:{workspaceId:Number(o),datasetId:r}},fetchPolicy:"network-only",client:Y4}),{data:x}=Jr.useQuery(Nm,{variables:{input:{workspaceId:Number(e),datasetId:b}},fetchPolicy:"network-only",client:Y4,skip:!b}),c=f?.getDataset?.filter(E=>E.id!==r)??[];return u.jsxs("div",{children:[u.jsx(tr.FormControl,{variant:"standard",sx:{width:"auto"},className:"mx-8",children:u.jsx(tr.Select,{value:b,IconComponent:()=>null,sx:{minWidth:30,padding:0,"& .MuiSelect-select":{padding:"0 !important",paddingRight:"0 !important"},"& .MuiInputBase-input":{padding:"0 !important",paddingRight:"0 !important"}},children:c?.map(E=>u.jsx(tr.MenuItem,{value:E.id,onClick:()=>{n(E.id),h(!0)},children:E.name},E.id))},`${d}_${t}`)}),m?u.jsx(u.Fragment,{children:u.jsx(tr.ClickAwayListener,{onClickAway:()=>{},children:u.jsx("div",{className:"w-100 d-flex align-center mt-8",children:u.jsxs("div",{className:"w-358px border-solid-lightblue1 radius-8 bg-white h-367px",children:[u.jsx("div",{className:"border-b-solid-lightblue1 d-flex align-center px-10 txt-black2 h-46px",children:"Map Source to Destination"}),u.jsx("div",{className:"overflow-auto flex-1 h-264px",children:k?.getField?.filter(E=>!E.isAssociatedField&&!["created_on","updated_on"].includes(E.fieldInternalName))?.map(E=>{const y=x?.getField?.filter(D=>E.dataType===D.dataType&&!Object.values(s).includes(D.fieldInternalName)&&!["created_on","updated_on"].includes(E.fieldInternalName))||[],F=x?.getField?.find(D=>D.fieldInternalName===s[E.fieldInternalName]),I=F?[...y,F]:y;return u.jsxs("div",{className:"d-flex align-center h-52px",children:[u.jsx("div",{className:"txt-brown-dark1 f-12 f-w-600 text-truncate pl-16 w-200px",children:E.fieldDisplayName}),u.jsx("div",{className:"flex-1 d-flex align-center",children:I?.length||E.fieldInternalName in s?u.jsx(tr.Select,{className:"w-115px h-40px radius-8 f-10 p-0",defaultValue:s[E?.fieldInternalName]??null,children:I?.map(D=>u.jsx(tr.MenuItem,{value:D.fieldInternalName,onClick:()=>{p({type:"ADD_OR_UPDATE",key:E.fieldInternalName,value:D.fieldInternalName})},children:D.fieldDisplayName},D.id))}):u.jsx("div",{className:"w-115px h-40px radius-8 border-solid-red1 bg-lightred txt-red1 d-flex align-center justify-center f-10 f-w-400",children:"No field to show"})})]})})}),u.jsxs("div",{className:"bl-radius-10 br-radius-10 h-56px border-t-solid-popper-border d-flex justify-end px-12 align-center",children:[u.jsx(tr.Button,{variant:"outlined",color:"inherit",className:"mr-10 h-31px radius-8",onClick:()=>{h(!1)},children:"Cancel"}),u.jsx(tr.Button,{variant:"outlined",color:"primary",className:"h-31px radius-8",onClick:()=>{l({sourceWork:r,targetWork:b,mappingField:s}),h(!1)},children:"Done"})]})]})})})}):u.jsx(u.Fragment,{})]})},B9=({defaultValue:r,setValue:o})=>{const{validateUser:e}=g.useContext(Ge),{data:d}=Jr.useQuery(e9,{variables:{input:{userId:e.id,orgId:e?.organisation?.id}},fetchPolicy:"network-only",client:Tm}),t=d?.getWorkspaceList;return u.jsx("div",{children:u.jsx(tr.Select,{className:"w-115px h-40px radius-8 f-10 p-0",defaultValue:r,children:t?.map(l=>u.jsx(tr.MenuItem,{value:l.id,onClick:()=>{o(l.id)},children:l.name},l.id))})})},Vm=({defaultValue:r,setValue:o,isDisable:e=!1})=>{const[d,t]=g.useState([]),[l,i]=g.useState(!0),{col:a,datasetId:w,workspaceId:b}=g.useContext(Ge);g.useEffect(()=>{t(r)},[r]);const n=(h,f)=>{i(!1),t(k=>[...k,h])},s=h=>{const f=d.filter((k,x)=>x!==h);t(f),o(f)},p=(h,f,k)=>{const x=d.map((c,E)=>{if(E!==h)return c;const y=c.segments[f],F=y.valueType==="field",I=F?y.childSegments||[]:[],D=c.segments.map(v=>{if(v.segmentsId===y.segmentsId)if(F){const _=a.find(T=>T.field.id===k);return{...v,datasetId:_?.datasetId,datasetName:_?.datasetName,fieldType:_?.field.dataType,property:_?.field?.internalName,isAssociate:_?.field?.isAssociated,value:k}}else return{...v,value:k};if(F&&I.includes(v.segmentsId)){const _=a.find(T=>T.field.id===k);return{...v,type:["drop-down"].includes(_?.field?.dataType)?"dropdown":"input",value:"",valueType:"field-options"}}return v});return{...c,segments:D}});o(x),t(x)},m=({optionType:h,valueType:f,fieldId:k})=>{const x=a?.map(c=>c.field);if(f==="field")return x.map(c=>({id:c.id,displayName:c.name,internalName:c.internalName}));if(f==="field-options")return x.find(E=>E.id===k)?.value?.map(E=>({id:E.key,displayName:E.value}));if(f==="users")return x.filter(c=>["user","collaborators"].includes(c.dataType)).map(c=>({id:c.internalName,displayName:c.name,internalName:c.internalName}))};return u.jsxs(u.Fragment,{children:[u.jsx("div",{children:d?.map((h,f)=>u.jsxs("div",{className:"d-flex hide-icon",children:[u.jsxs("div",{className:"f-w-400 f-14 txt-black2 d-flex flex-wrap flex-1 align-center",children:[f?u.jsx("span",{children:"And "}):u.jsx("span",{children:"Then "}),h.segments.map((k,x)=>{if(k.type==="text")return u.jsxs("span",{className:"ml-2",children:[" ",k.value," "]},x);if(k.type==="input")return u.jsx(tr.TextField,{id:"standard-basic",variant:"standard",className:"mx-8",disabled:e,defaultValue:k.value,type:k.valueType,onChange:c=>p(f,x,c.target.value),sx:{margin:0,maxWidth:100,padding:0,"& .MuiInputBase-input":{padding:"0 !important",paddingRight:"0 !important"},"& .MuiInputBase-root":{margin:0}}});if(k.type==="dropdown")return u.jsx(tr.FormControl,{variant:"standard",sx:{width:"auto"},className:"mx-8",children:u.jsx(tr.Select,{IconComponent:()=>null,value:k.value,disabled:e,sx:{minWidth:30,padding:0,"& .MuiSelect-select":{padding:"0 !important",paddingRight:"0 !important"},"& .MuiInputBase-input":{padding:"0 !important",paddingRight:"0 !important"}},onChange:c=>p(f,x,c.target.value),children:m({optionType:k.optionType,valueType:k.valueType,fieldId:h?.segments?.[k.mapSegmentsId]?.value})?.map(c=>u.jsx(tr.MenuItem,{value:c.id,children:c.displayName},c.id))},`${f}_${x}`)});if(k.type==="user")return u.jsx(Om,{selectedAssignees:k.value,setValue:c=>{p(f,x,c)},datasetId:w,isForNotification:!0});if(k.type==="notification")return u.jsx(v9,{defaultValue:k.value,setValue:c=>{p(f,x,c)}});if(k.type==="workspace")return u.jsx("div",{children:u.jsx(B9,{defaultValue:k.value,setValue:c=>{p(f,x,c)}})});if(k.type==="moveRecordToOtherWork"){let c=d[f]?.segments[k.mapSegmentsId]?.value;return u.jsx(C9,{defaultValue:k.value,datasetId:w,workspaceId:b,targetWorkspaceId:c??b,autoIndex:f,segmentIndex:x,setValue:E=>{p(f,x,E)}})}return null})]}),d.length>1?u.jsx("img",{src:"/delete.svg",className:"hide cursor-pointer",onClick:()=>{s(f)}}):u.jsx(u.Fragment,{}),u.jsx("div",{children:!e&&d.length-1===f?u.jsx(u.Fragment,{children:u.jsx(Mm,{className:"f-w-400 f-14 txt-black2 cursor-pointer",onClick:()=>{i(!0)}})}):u.jsx(u.Fragment,{})})]},f))}),!e&&l?u.jsx(u.Fragment,{children:u.jsx(tr.FormControl,{variant:"standard",sx:{width:"auto"},className:"mx-8",children:u.jsx(tr.Select,{labelId:"demo-simple-select-standard-label",id:"demo-simple-select-standard",IconComponent:()=>null,sx:{minWidth:30,padding:0,"& .MuiSelect-select":{padding:"0 !important",paddingRight:"0 !important"},"& .MuiInputBase-input":{padding:"0 !important",paddingRight:"0 !important"}},children:s9?.map(h=>u.jsx(tr.MenuItem,{onClick:()=>n(h.automation,h.key),children:h.displayAutomation},h.key))})})}):u.jsx(u.Fragment,{})]})},I9=({selectedId:r,setSelectedId:o,setSelectAutomation:e,setisCreateNewAutomation:d})=>{const[t,l]=g.useState([]),{workspaceId:i}=g.useContext(Ge);g.useEffect(()=>{const n=async s=>{try{const p=await xA(s,i);l(p)}catch(p){console.error("Error fetching automation:",p)}};r?.id&&n(r?.id)},[r?.id]);const a=async({id:n,isActive:s})=>{await gA({id:n,isActive:s,workspaceId:i})},w=async({id:n})=>{await cA({id:n,workspaceId:i})},b={inputProps:{"aria-label":"Size switch demo"}};return u.jsx("div",{style:{top:0,right:0,height:"100%",width:"422px",background:"#fff",borderLeft:"1px solid #ccc"},children:u.jsxs("div",{className:"px-16 py-12 d-flex flex-column edge-container",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"h-36px d-flex align-center f-w-600 f-14 txt-darkblue px-8",children:[u.jsx(A9,{className:"mr-8 f-14 cursor-pointer",onClick:()=>o({id:"",type:"auto"})}),"Automation"]}),u.jsx("div",{className:"border-solid-border1 my-12"})]}),u.jsxs("div",{className:"p-10 flex-1 overflow-auto",children:[u.jsx("div",{className:"mb-12 border-dashed-newborder h-48px radius-8 bg-blue-lighten9 d-flex align-center txt-darkblue cursor-pointer",onClick:()=>{d(!0)},children:u.jsxs("div",{className:"p-14 d-flex align-center",children:[u.jsx(c9,{}),u.jsx("p",{className:"f-w-600 f-14 ml-8",children:"New"})]})}),t?.data?.map(n=>u.jsxs("div",{className:"border-solid-input-border radius-12 px-12 py-10 d-flex mb-12 align-start",children:[u.jsxs("div",{className:"flex-1",onClick:()=>{e(n)},children:[u.jsx(X4,{defaultValue:n.condition,setValue:s=>{},isDisable:!0}),u.jsx("div",{children:u.jsx(Um,{className:"my-8"})}),u.jsx(Vm,{defaultValue:n.automation,setValue:s=>{},isDisable:!0})]}),u.jsx(tr.Switch,{...b,defaultChecked:n.isActive,onChange:s=>{a({id:n.id,isActive:s.target.checked})}}),u.jsx("img",{src:"/delete.svg",onClick:()=>{w({id:n.id})}})]}))]})]})})},T9=({editEdgeData:r,setSelectedId:o,selectAutomation:e,isCreateNewAutomation:d})=>{const{setValue:t,watch:l}=bb.useForm({defaultValues:{condition:{id:"",blocks:[]},automation:[]}}),{acceptedUser:i,selectFieldId:a,validateUser:w,workspaceId:b}=g.useContext(Ge);g.useEffect(()=>{t("automation",e.automation??[]),t("condition",e.condition??{id:"",blocks:[]})},[e.id]);const n=async()=>{const s=l(),p=s.automation?.map(m=>{switch(m.key){case"changes_field_value":const h=m.segments?.find(v=>v.valueType==="field"),f=m.segments[h?.childSegments?.[0]];return{targetWorkspaceId:b,targetFieldId:h.value,actionType:Xt.UPDATE_FIELD,content:{propertyData:[{datasetId:h.datasetId,datasetName:h.datasetName,isAssociate:h.isAssociate,property:h.property,fieldType:h.fieldType,value:f.value,setValue:f.value}],datasetId:h.datasetId,datasetName:h.datasetName}};case"send_notification":const k=m.segments?.find(v=>v.valueType==="user-notification"),x=m.segments[k?.childSegments?.[0]],c=v=>v.map(T=>{const L=i.find(q=>q.id===T);return{id:L?.id,email:L?.email}});return{targetWorkspaceId:b,targetFieldId:"",actionType:Xt.NOTIFY,content:{isDeleted:!1,isActive:!0,workspaceId:b,senderEmail:w.email,senderId:w.id,notificationType:"push",notificationTitle:"Automation",notificationDescription:x.value,notificationMetadata:{},isRead:!1,receiverDetails:c(k.value)}};case"move_to_other_work":let E=m.segments?.find(v=>v.valueType==="moveRecordToOtherWork");return{targetWorkspaceId:b,targetFieldId:"",actionType:Xt.MOVE_RECORD,content:{...E?.value}};case"copy_to_other_workspace_work":let y=m.segments?.find(v=>v.valueType==="workspace"),F=m.segments?.find(v=>v.valueType==="moveRecordToOtherWork");return{targetWorkspaceId:y?.value??b,targetFieldId:"",actionType:Xt.COPY_RECORD_TO_OTHER_WORKSPACE,content:{...F?.value}};case"send_notification_to_field":const I=m.segments?.find(v=>v.valueType==="users"),D=m.segments[I?.childSegments?.[0]];return{targetWorkspaceId:b,targetFieldId:"",actionType:Xt.NOTIFY,content:{isDeleted:!1,isActive:!0,workspaceId:b,senderEmail:w.email,senderId:w.id,notificationType:"push",notificationTitle:"Automation",notificationDescription:D.value,notificationMetadata:{},isRead:!1,receiverDetails:[],selectField:I.value}}}});d?await mA({workspaceId:b+"",fieldId:a,from:r?.source,to:r?.target,workflowSegId:r?.id,condition:s.condition,automation:s.automation,automationAction:p}):await kA({id:e.id,condition:s.condition,automation:s.automation,automationAction:p,workspaceId:b+""})};return u.jsx("div",{style:{position:"absolute",top:0,right:0,height:"100%",maxHeight:"704px",width:"420px",background:"#fff",borderLeft:"1px solid #ccc",zIndex:1e3},children:u.jsxs("div",{className:"px-16 py-12 d-flex flex-column edge-container maxh-703px",children:[u.jsxs("div",{children:[u.jsx("div",{className:"h-36px d-flex align-center f-w-600 f-14 txt-darkblue px-8",children:"Properties"}),u.jsx("div",{className:"border-solid-border1 my-12"})]}),u.jsxs("div",{className:"flex-1 overflow-auto hide-scroll",children:[u.jsx(X4,{defaultValue:l("condition"),setValue:s=>{t("condition",s)}}),u.jsx("div",{children:u.jsx(Um,{className:"my-8"})}),u.jsx(Vm,{defaultValue:l("automation"),setValue:s=>{t("automation",s)}})]}),u.jsxs("div",{className:"d-flex justify-end",children:[u.jsx(tr.Button,{variant:"outlined",color:"inherit",className:"mr-10",onClick:()=>o({id:"",type:"auto"}),children:"Cancel"}),u.jsx(tr.Button,{variant:"outlined",color:"primary",onClick:()=>{o({id:"",type:"auto"}),n()},children:"Update"})]})]})})},N9=({editEdgeData:r,selectedId:o,setSelectedId:e})=>{const[d,t]=g.useState({}),[l,i]=g.useState(!1);return Pm(d)&&!l?u.jsx(I9,{selectedId:o,setSelectedId:e,setSelectAutomation:t,setisCreateNewAutomation:i}):u.jsx(T9,{editEdgeData:r,selectAutomation:d,setSelectedId:e,isCreateNewAutomation:l})},P9=({selectedId:r,editEdgeData:o,updateEdgeData:e,setSelectedId:d})=>r.type===yf.Auto?u.jsx(N9,{editEdgeData:o,selectedId:r,setSelectedId:d}):u.jsx(h9,{edgeData:o,updateEdgeData:e,setSelectedId:d}),O9=({edges:r,updateEdgeData:o,saveToBackend:e})=>{const[d,t]=g.useState({id:"",type:yf.Config});return u.jsx("div",{children:d.id?u.jsx(P9,{selectedId:d,updateEdgeData:o,editEdgeData:r?.find(l=>l.id===d.id),setSelectedId:t}):u.jsx(_A,{edges:r,setSelectedId:t,saveToBackend:e})})},R9=({children:r,col:o,selectFieldId:e,validateUser:d,workspaceId:t,exampleData:l,acceptedUser:i,datasetId:a})=>u.jsx(Ge.Provider,{value:{col:o,selectFieldId:e,validateUser:d,workspaceId:t,exampleData:l,acceptedUser:i,datasetId:a},children:r}),M9={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",borderRadius:2,boxShadow:"24",p:4,background:"linear-gradient(101.49deg, #F8FDFF 11.98%, #FBF2FB 119.18%)",border:"1px solid #EAEFF4",outline:"none"},$9=({fieldId:r,col:o,validateUser:e,workspaceId:d,exampleData:t,acceptedUser:l,datasetId:i,onClose:a})=>{const w=o?.find(c=>c.field.id===r),b=$5(w.field.value),[n,s,p]=Eg(b),[m,h,f]=Dg([]);g.useEffect(()=>{(async E=>{try{const y=await uA({fieldId:E,workspaceId:d});s(y.data.workflowDefinition.nodes),h(y.data.workflowDefinition.edges)}catch(y){console.error("Error fetching automation:",y)}})(r)},[r]);const k=({id:c,data:E})=>{h(y=>y?.map(F=>(F.id===c&&(F.data=E),F)))},x=async()=>{const c=U5(m);await hA({workspaceId:d,workflow:{nodes:n,edges:m,workflow:c},fieldId:r})};return u.jsx(tr.Modal,{open:!0,onClose:()=>a,children:u.jsx(R9,{col:o,selectFieldId:r,validateUser:e,workspaceId:d,exampleData:t,acceptedUser:l,datasetId:i,children:u.jsx("div",{className:"workflow-we3434",children:u.jsxs("div",{className:"w-1225px h-703px border-solid-lightblue1 d-flex flex-column",style:M9,children:[u.jsxs("div",{className:"h-56px border-b-solid-border d-flex align-center justify-between px-20",children:[u.jsx("div",{className:"f-w-600 f-18 px-12",children:"Workflow"}),u.jsxs("div",{className:"d-flex align-center px-12",children:[u.jsx("div",{className:"border-solid-ligntbrown h-14px mr-8"}),u.jsx(M5,{className:"h-24px w-24px txt-lightblack3",onClick:()=>a()})]})]}),u.jsxs("div",{className:"flex-1 d-flex",children:[u.jsx(lw,{children:u.jsx(vA,{nodes:n,edges:m,setEdges:h,onNodesChange:p,onEdgesChange:f})}),u.jsx(O9,{edges:m,updateEdgeData:k,saveToBackend:x})]})]})})})})};Bo.ReactFlowModal=$9,Object.defineProperty(Bo,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "work-workflow-test",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "main": "./dist/workflow.cjs.js",
6
6
  "module": "./dist/workflow.es.js",