PageSourceSearch

https://cdn.stackby.com/build/table-bar.bb3b48684032d3f40451.bundle.js

js stackby.com collected 2026-09-24 09:37:38 UTC 108,145 bytes, 2 lines download raw bytes

1/*! For license information please see table-bar.bb3b48684032d3f40451.bundle.js.LICENSE.txt */
2"use strict";(self.webpackChunkStackby_webapp=self.webpackChunkStackby_webapp||[]).push([[7133],{4766:(e,t,n)=>{e.exports=n.p+"assets/5a76af2f8282fb8f5b3f.png"},5186:(e,t,n)=>{n.r(t),n.d(t,{default:()=>he});var i=n(71083),o=n(2543),a=n(95093),r=n.n(a),s=n(379),l=n.n(s),c=n(71468),d=n(77698),u=n(33365),p=n(35907),m=n(74303),h=n(67061),f=n(15180),g=n(1654),y=n(52201),v=n(17041),x=n(55764),S=n(73342),w=n(90532),b=n(85290),j=n(33384),A=n(55604),I=n(66248),C=n(62986),T=n(63129),_=n(73591),R=n(53070),k=n(56429),O=n(4766),N=n(73384),E=n(59896),L=n(86842),M=n(38274),D=n(3),F=n(89253),W=n(57683),P=n(59641),V=n(70510);n(96763);function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}var U=["groupId"];function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach(function(t){H(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function H(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=G(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=G(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==G(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e){return function(e){if(Array.isArray(e))return K(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,a,r,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=a.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(c)throw o}}return s}}(e,t)||Y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Y(e,t){if(e){if("string"==typeof e)return K(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var $={position:"bottom-left",autoClose:!0,closeButton:!1},q={storeLastActionId:h.F8,deleteAutomationAction:h.$8,updateTrigger:h.Yj,fetchTableViews:f.xQ},X=(0,c.Ng)(function(e){return{table:e.table,automation:e.automation,auth:e.auth}},q)(function(e){var t=e.tableName,n=e.setRightWidth,a=e.active,r=e.setActive,c=e.trigger,d=e.CreateActionFunction,h=e.triggerTypes,f=e.createNewAutomation,g=e.automation,y=e.lastSelectedAutomationId,x=e.storeLastActionId,S=e.stackId,w=e.lastActionIdState,b=e.setLastActionIdState,j=e.deleteAutomationAction,A=e.table,G=e.setTrigger,J=e.setCurrentActionType,H=e.triggeredTableColumnsAndRows,Y=e.updateTriggerChoosedRowId,K=e.triggerID,q=e.updateTrigger,X=e.watchingFiledValue,Q=e.formShareId,ee=e.selectedViewId,te=e.fetchTableViews,ne=e.buttonType,ie=e.setButtonType,oe=e.setResultData,ae=e.setShowResult,re=e.openTestStepModal,se=e.setOpenTestStepModal,le=e.setTestStep,ce=e.handleGeneratePreview,de=e.handleRunConfig,ue=e.isValidForAction,pe=e.selectedView,me=e.IntervalType,he=e.scheduleTimeStates,fe=e.selectedWeekDays,ge=e.selectedMonthDays,ye=e.actionPreviewObj,ve=e.lastId,xe=e.setLastId,Se=e.setShowFindRecordResult,we=e.viewsData,be=e.setViewsData,je=e.recordMatchConditionTriggerFilter,Ae=e.MaximumRowLimit,Ie=e.isReadOnly,Ce=e.setSelectedView,Te=e.handleActionNameLabel,_e=e.triggerTitle,Re=e.openPricingModel,ke=e.setOpenPricingModel,Oe=e.history,Ne=e.setCenterSelectedActionIndex,Ee=e.CreateTrigger,Le=e.centerSelectedActionIndex,Me=e.auth,De=e.conditionGroupFilter,Fe=e.setConditionGroupFilter,We=e.selectedConditionForFilter,Pe=e.setSelectedConditionForFilter,Ve=e.allAutomationSteps,Ge=e.setAllAutomationSteps,Ue=Z((0,s.use
2State)("Add trigger"),2),Je=Ue[0],Be=Ue[1],He=Z((0,s.useState)(!1),2),ze=He[0],Ze=He[1],Ye=Z((0,s.useState)(null),2),Ke=Ye[0],$e=Ye[1],qe=Z((0,s.useState)([{name:"Conditional logic",type:"COND_GRP",icon:(0,V.jsx)(F.A,{icon:"ios-git-network",fontSize:"16px",style:{marginBottom:"3px"}}),section:"advanced-logic",isEnable:(0,N.G)("conditionalLogicAction",{userId:null==Me?void 0:Me.id})},{name:"Create Row",type:"CR_ROW",icon:(0,V.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,V.jsx)("rect",{width:"16",height:"16",rx:"8",fill:"#FFEAB6"}),(0,V.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"#FCB400",d:"M9 7V3.5C9 3.224 8.776 3 8.5 3H7.5C7.224 3 7 3.224 7 3.5V7H3.5C3.224 7 3 7.224 3 7.5V8.5C3 8.776 3.224 9 3.5 9H7V12.5C7 12.776 7.224 13 7.5 13H8.5C8.776 13 9 12.776 9 12.5V9H12.5C12.776 9 13 8.776 13 8.5V7.5C13 7.224 12.776 7 12.5 7H9Z"})]}),section:"actions",isEnable:!0},{name:"Update Row",type:"UP_ROW",icon:(0,V.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,V.jsx)("rect",{width:"16",height:"16",rx:"8",fill:"#C2F5E9"}),(0,V.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"#02AAA4",d:"M4.47297 9.65214L8.40203 5.72309C8.5254 5.59971 8.72459 5.59967 8.84745 5.72249L10.2776 7.15211C10.3992 7.27371 10.4002 7.47433 10.277 7.59749L6.34797 11.5271C6.2246 11.6505 5.98638 11.7501 5.81538 11.7501H4.55962C4.38485 11.7501 4.25 11.6115 4.25 11.4405V10.1847C4.25 10.01 4.34983 9.77529 4.47297 9.65214ZM10.9444 4.06971L11.931 5.05601C12.1748 5.29971 12.1765 5.69915 11.9311 5.94436L11.3427 6.53211C11.223 6.6517 11.0253 6.65018 10.9024 6.52736L9.47233 5.09774C9.35068 4.97614 9.34736 4.77788 9.46761 4.65763L10.0557 4.06959C10.3046 3.82068 10.6989 3.8243 10.9444 4.06971Z"})]}),section:"actions",isEnable:!0},{name:"Send Email",type:"S_EMAIL",icon:(0,V.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,V.jsx)("rect",{width:"16",height:"16",rx:"8",fill:"#CFDFFF"}),(0,V.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"#2D7FF9",d:"M3.625 10.1878V8.17936C3.625 7.83795 3.87308 7.68944 4.1791 7.8515L7.4459 9.58156C7.75225 9.74379 8.24808 9.74362 8.5541 9.58156L11.8209 7.8515C12.1272 7.68927 12.375 7.83623 12.375 8.17938V10.1878C12.375 10.7018 11.9558 11.125 11.4386 11.125L4.5614 11.1249C4.04703 11.1249 3.625 10.7054 3.625 10.1878ZM3.625 6.4375V5.81097C3.625 5.29372 4.04424 4.875 4.5614 4.875H11.4386C11.953 4.875 12.375 5.29405 12.375 5.81097V6.4375L8.5541 8.34795C8.24775 8.50112 7.75192 8.50096 7.4459 8.34795L3.625 6.4375Z"})]}),section:"actions",isEnable:!0},{name:"Find Row",type:"FIND_ROW",icon:(0,V.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,V.jsx)("rect",{width:"16",height:"16",rx:"8",fill:"#FEE2D5"}),(0,V.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"#F7653B",d:"M6.8425 9.43562C5.58312 9.43562 4.5625 8.415 4.5625 7.15563C4.5625 5.89625 5.58312 4.875 6.8425 4.875C8.10187 4.875 9.1225 5.89625 9.1225 7.15563C9.1225 8.415 8.10187 9.43562 6.8425 9.43562ZM11.8794 10.9019L9.93687 9.06687C9.90937 9.03937 9.87437 9.02625 9.84375 9.005C10.1769 8.46625 10.3725 7.83375 10.3725 7.15563C10.3725 5.20875 8.78937 3.625 6.8425 3.625C4.89562 3.625 3.3125 5.20875 3.3125 7.15563C3.3125 9.10188 4.89562 10.6856 6.8425 10.6856C7.46812 10.6856 8.055 10.5206 8.565 10.2338C8.59062 10.2756 8.61 10.3206 8.64687 10.3569L10.5894 12.1919C10.8331 12.4362 11.2287 12.4362 11.4731 12.1919L11.8794 11.7856C12.1231 11.5419 12.1231 11.1463 11.8794 10.9019Z"})]}),section:"actions",isEnable:!0},{name:"Send WhatsApp Message",type:"WHATSAPP",icon:(0,V.jsx)("div",{style:{width:"20px",height:"20px",borderRadius:"50%",overflow:"hidden"},children:(0,V.jsxs)("svg",{height:"20",width:"20",viewBox:"0 0 360 360",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,V.jsx)("path",{fill:"#25D366",opacity:".8",d:"M173 361H1.03V1.092h359.815V361zm24.063-268.62c-1.652-.206-3.3-.442-4.956-.611-35.17-3.582-63.764 8.689-84.032 37.448-20.208 28.674-21.5 59.694-6.666 91.315 1.557 3.32 1.823 6.022.858 9.418-3.803 13.375-7.367 26.817-11.183 40.831 2.04-.43 3.465-.669 4.857-1.032 12.71-3.32 25.38-6.802 38.148-9.874 2.463-.592 5.638-.305 7.921.772 15.958 7.529 32.696 10.27 50.093 8.13 42.653-5.25 76.522-41.874 77.909-83.878 1.504-45.562-28.453-83.884-72.949-92.52"}),(0,V.jsx)("path",{fill:"#26D367",d:"M253.113 196.95c-12.687 49.351-65.261 71.895-109.49 47.456-1.925-1.064-4.8-1.315-6.989-.835-7.748 1.698-15.39 3.879-24.1 6.144 2.097-7.807 3.772-14.835 5.919-21.716 1.177-3.773.658-6.665-1.278-10.194-15.052-27.445-14.659-54.837 3.586-80.388 18.209-25.499 44.014-35.907 74.758-29.659 31.329 6.367 50.6 26.513 58.023 57.596 2.462 10.31 2.17 20.816-.429 31.597m-93.951-52.65c-1.565-1.735-2.872-4.54-4.747-4.993-4.657-1.122-8.95-.182-12.478 4.027-5.999 7.156-8.048 15.311-5.143 23.76 2.387 6.941 6.192 13.62 10.454 19.647 12.067 17.066 27.818 29.4 48.292 35.074 9.465 2.623 18.144 1.506 25.678-5.221 4.084-3.647 5.643-8.644 4.536-13.56-.499-2.216-4.36-3.828-6.896-5.39-2.539-1.564-5.273-2.844-8.014-4.038-8.71-3.793-6.98-3.857-12.478 3.007-.935 1.168-2.064 2.2-2.87 3.446-1.964 3.034-4.246 2.806-7.262 1.484-10.979-4.811-19.673-12.16-26.593-21.957-3.001-4.249-3.63-7.393.563-11.104 3.898-3.45 4.756-7.561 1.93-12.46-1.976-3.428-3.119-7.336-4.972-11.722"})]})}),section:"actions",isEnable:!0},{name:"Generate with AI",type:"AI_GEN",section:"actions",icon:(0,V.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20px",height:"20px",viewBox:"0 0 24 24",children:[(0,V.jsx)("path",{d:"M11.26,6.86l-3.39-2a.75.75,0,1,1,.78-1.28l3.36,2Z",style:{fill:"#aecbfa",fillRule:"evenodd"}}),(0,V.jsx)("path",{d:"M11.52,10.31,4.69,6.36a.75.75,0,0,1,.75-1.3l6.08,3.52Z",style:{fill:"#aecbfa",fillRule:"evenodd"}}),(0,V.jsx)("path",{d:"M19.6,5.33a.76.76,0,0,0-1-.27L12.75,8.4V6.85l3.39-2a.74.74,0,0,0,.25-1,.75.75,0,0,0-1-.25L11.65,5.78a.79.79,0,0,0-.39.68V21a.75.75,0,1,0,1.49,0V10.14l6.57-3.78A.76.76,0,0,0,19.6,5.33Z",style:{fill:"#669df6",fillRule:"evenodd"}}),(0,V.jsx)("circle",{cx:"12.01",cy:"3.09",r:"0.84",style:{fill:"#669df6"}}),(0,V.jsx)("path",{d:"M9.48,10.82a.73.73,0,0,1,.38.64v4.08a.74.74,0,0,1-.38.65.79.79,0,0,1-.37.1.86.86,0,0,1-.38-.1L4.41,13.7a.75.75,0,1,1,.75-1.3l3.2,1.84V11.9l-1.45-.83a.75.75,0,0,1-.27-1,.74.74,0,0,1,1-.27Z",style:{fill:"#aecbfa"}}),(0,V.jsx)("circle",{cx:"5.26",cy:"9.26",r:"0.84",style:{fill:"#aecbfa"}}),(0,V.jsx)("path",{d:"M16.34,9.77a.74.74,0,0,1,1,.27.75.75,0,0,1-.27,1l-1.45.83v2.34l3.2-1.84a.75.75,0,1,1,.75,1.3l-4.32,2.49a.86.86,0,0,1-.38.1.79.79,0,0,1-.37-.
21.74.74,0,0,1-.38-.65V11.46a.73.73,0,0,1,.38-.64Z",style:{fill:"#4285f4"}}),(0,V.jsx)("circle",{cx:"18.74",cy:"9.26",r:"0.84",style:{fill:"#4285f4"}})]}),isEnable:!0},{name:"Gmail: Send email",type:"GMAIL",icon:(0,V.jsx)("div",{style:{width:"20px",height:"20px",overflow:"hidden"},children:(0,V.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"52 42 88 66",children:[(0,V.jsx)("path",{fill:"#4285f4",d:"M58 108h14V74L52 59v43c0 3.32 2.69 6 6 6"}),(0,V.jsx)("path",{fill:"#34a853",d:"M120 108h14c3.32 0 6-2.69 6-6V59l-20 15"}),(0,V.jsx)("path",{fill:"#fbbc04",d:"M120 48v26l20-15v-8c0-7.42-8.47-11.65-14.4-7.2"}),(0,V.jsx)("path",{fill:"#ea4335",d:"M72 74V48l24 18 24-18v26L96 92"}),(0,V.jsx)("path",{fill:"#c5221f",d:"M52 51v8l20 15V48l-5.6-4.2c-5.94-4.45-14.4-.22-14.4 7.2"})]})}),section:"integrations",isEnable:(0,N.G)("sendGmailAction",{userId:null==Me?void 0:Me.id})},{name:"Outlook: Send email",type:"OUTLOOK",icon:(0,V.jsx)("div",{style:{width:"20px",height:"20px",overflow:"hidden"},children:(0,V.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:[(0,V.jsx)("path",{d:"M19.484,7.937v5.477L21.4,14.619a.489.489,0,0,0,.21,0l8.238-5.554a1.174,1.174,0,0,0-.959-1.128Z",fill:"#0072c6"}),(0,V.jsx)("path",{d:"M19.484,15.457l1.747,1.2a.522.522,0,0,0,.543,0c-.3.181,8.073-5.378,8.073-5.378V21.345a1.408,1.408,0,0,1-1.49,1.555H19.483V15.457Z",fill:"#0072c6"}),(0,V.jsx)("path",{d:"M10.44,12.932a1.609,1.609,0,0,0-1.42.838,4.131,4.131,0,0,0-.526,2.218A4.05,4.05,0,0,0,9.02,18.2a1.6,1.6,0,0,0,2.771.022,4.014,4.014,0,0,0,.515-2.2,4.369,4.369,0,0,0-.5-2.281A1.536,1.536,0,0,0,10.44,12.932Z",fill:"#0072c6"}),(0,V.jsx)("path",{d:"M2.153,5.155V26.582L18.453,30V2ZM13.061,19.491a3.231,3.231,0,0,1-2.7,1.361,3.19,3.19,0,0,1-2.64-1.318A5.459,5.459,0,0,1,6.706,16.1a5.868,5.868,0,0,1,1.036-3.616A3.267,3.267,0,0,1,10.486,11.1a3.116,3.116,0,0,1,2.61,1.321,5.639,5.639,0,0,1,1,3.484A5.763,5.763,0,0,1,13.061,19.491Z",fill:"#0072c6"})]})}),section:"integrations",isEnable:(0,N.G)("outlookAction",{userId:null==Me?void 0:Me.id})},{name:"Jira Cloud",type:"JIRA",icon:(0,V.jsx)("div",{style:{width:"20px",height:"20px",overflow:"hidden"},children:(0,V.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,V.jsx)("path",{d:"M14.8324 7.60824L8.60376 1.58395L8 1L3.31134 5.53485L1.16763 7.60824C0.944123 7.82468 0.944123 8.17532 1.16763 8.39176L5.45124 12.5348L8 15L12.6887 10.4652L12.7613 10.3949L14.8324 8.39176C15.0559 8.17532 15.0559 7.82468 14.8324 7.60824ZM8 10.0697L5.86011 8L8 5.93031L10.1399 8L8 10.0697Z",fill:"#2684FF"}),(0,V.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.99997 5.92939C6.59893 4.57415 6.5921 2.37909 7.98468 1.01572L3.30176 5.54317L5.85052 8.00832L7.99997 5.92939Z",fill:"url(#paint0_linear_5_1623)"}),(0,V.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.1456 7.99408L8 10.0693C8.67624 10.723 9.05618 11.6098 9.05618 12.5345C9.05618 13.4592 8.67624 14.346 8 14.9996L12.6944 10.4592L10.1456 7.99408Z",fill:"url(#paint1_linear_5_1623)"}),(0,V.jsxs)("defs",{children:[(0,V.jsxs)("linearGradient",{id:"paint0_linear_5_1623",x1:"7.61784",y1:"3.83567",x2:"4.04823",y2:"5.39423",gradientUnits:"userSpaceOnUse",children:[(0,V.jsx)("stop",{offset:"0.18","stop-color":"#0052CC"}),(0,V.jsx)("stop",{offset:"1","stop-color":"#2684FF"})]}),(0,V.jsxs)("linearGradient",{id:"paint1_linear_5_1623",x1:"8.40887",y1:"12.139",x2:"11.9721",y2:"10.5915",gradientUnits:"userSpaceOnUse",children:[(0,V.jsx)("stop",{offset:"0.18","stop-color":"#0052CC"}),(0,V.jsx)("stop",{offset:"1","stop-color":"#2684FF"})]})]})]})}),children:[{name:"Create Task",type:"JIRA_CREATE_ISSUE",icon:(0,V.jsx)("div",{style:{width:"20px",height:"20px",overflow:"hidden"},children:(0,V.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,V.jsx)("path",{d:"M14.8324 7.60824L8.60376 1.58395L8 1L3.31134 5.53485L1.16763 7.60824C0.944123 7.82468 0.944123 8.17532 1.16763 8.39176L5.45124 12.5348L8 15L12.6887 10.4652L12.7613 10.3949L14.8324 8.39176C15.0559 8.17532 15.0559 7.82468 14.8324 7.60824ZM8 10.0697L5.86011 8L8 5.93031L10.1399 8L8 10.0697Z",fill:"#2684FF"}),(0,V.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.99997 5.92939C6.59893 4.57415 6.5921 2.37909 7.98468 1.01572L3.30176 5.54317L5.85052 8.00832L7.99997 5.92939Z",fill:"url(#paint0_linear_5_1623)"}),(0,V.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.1456 7.99408L8 10.0693C8.67624 10.723 9.05618 11.6098 9.05618 12.5345C9.05618 13.4592 8.67624 14.346 8 14.9996L12.6944 10.4592L10.1456 7.99408Z",fill:"url(#paint1_linear_5_1623)"}),(0,V.jsxs)("defs",{children:[(0,V.jsxs)("linearGradient",{id:"paint0_linear_5_1623",x1:"7.61784",y1:"3.83567",x2:"4.04823",y2:"5.39423",gradientUnits:"userSpaceOnUse",children:[(0,V.jsx)("stop",{offset:"0.18","stop-color":"#0052CC"}),(0,V.jsx)("stop",{offset:"1","stop-color":"#2684FF"})]}),(0,V.jsxs)("linearGradient",{id:"paint1_linear_5_1623",x1:"8.40887",y1:"12.139",x2:"11.9721",y2:"10.5915",gradientUnits:"userSpaceOnUse",children:[(0,V.jsx)("stop",{offset:"0.18","stop-color":"#0052CC"}),(0,V.jsx)("stop",{offset:"1","stop-color":"#2684FF"})]})]})]})})},{name:"Update Task",type:"JIRA_UPDATE_ISSUE",icon:(0,V.jsx)("div",{style:{width:"20px",height:"20px",overflow:"hidden"},children:(0,V.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,V.jsx)("path",{d:"M14.8324 7.60824L8.60376 1.58395L8 1L3.31134 5.53485L1.16763 7.60824C0.944123 7.82468 0.944123 8.17532 1.16763 8.39176L5.45124 12.5348L8 15L12.6887 10.4652L12.7613 10.3949L14.8324 8.39176C15.0559 8.17532 15.0559 7.82468 14.8324 7.60824ZM8 10.0697L5.86011 8L8 5.93031L10.1399 8L8 10.0697Z",fill:"#2684FF"}),(0,V.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.99997 5.92939C6.59893 4.57415 6.5921 2.37909 7.98468 1.01572L3.30176 5.54317L5.85052 8.00832L7.99997 5.92939Z",fill:"url(#paint0_linear_5_1623)"}),(0,V.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.1456 7.99408L8 10.0693C8.67624 10.723 9.05618 11.6098 9.05618 12.5345C9.05618 13.4592 8.67624 14.346 8 14.9996L12.6944 10.4592L10.1456 7.99408Z",fill:"url(#paint1_linear_5_1623)"}),(0,V.jsxs)("defs",{children:[(0,V.jsxs)("linearGradient",{id:"paint0_linear_5_1623",x1:"7.61784",y1:"3.83567",x2:"4.04823",y2:"5.39423",gradientUnits:"userSpaceOnUse",children:[(0,V.jsx)("stop",{offset:"0.18","stop-color":"#0052CC"}),(0,V.jsx)("stop",{offset:"1","stop-color":"#2684FF"})]}),(0,V.jsxs)("linearGradient",{id:"paint1_linear_5_1623",x1:"8.40887",y1:"12.139",x2:"11.9721",y2:"10.5915",gradientUnits:"userSpaceOnUse",children:[(0,V.jsx)("stop",{offset:"0.18","stop-color":"#0052CC"}),(0,V.jsx)("stop",{offset:"1","stop-color":"#2684FF"})]})]})]})})}],section:"integrations",isEnable:(0,N.G)("jiraAction",{userId:null==Me?void 0:Me.id})},{name:"Sort list",type:"SORT_LIST",icon:(0,V.jsx)("div",{children:(0,V.jsx)("img",{style:{width:"20px",height:"20px",borderRadius:"50%"},src:O})}),section:"actions",isEnable:(0,N.G)("sortList",{userId:null==Me?void 0:Me.id})},{name:"Slack",type:"SLACK",icon:(0,V.jsx)("div",{children:(0,V.jsx)("img",{style:{width:"20px",height:"20px"},src:"https://stackbybucketprod.s3-ap-southeast-1.amazonaws.com/landingpage/slack.png"})}),children:[{name:"Send a message",type:"SLACK_SEND_MESSAGE",icon:(0,V.jsx)("div",{children:(0,V.jsx)("img",{style:{width:"20px",height:"20px"},src:"https://stackbybucketprod.s3-ap-southeast-1.amazonaws.com/landingpage/slack.png"})})}],section:"integrations",isEnable:(0,N.G)("slack",{userId:null==Me?void 0:Me.id})},{name:"MS Teams",type:"MS_TEAMS",icon:(0,V.jsx)("div",{children:(0,V.jsx)("img",{style:{width:"20px",height:"20px"},src:"https://stackbybucketprod.s3.ap-southeast-1.amazonaws.com/msTeams.png",alt:"MS Teams"})}),children:[{name:"Send a message",type:"MS_TEAMS",icon:(0,V.jsx)("div",{children:(0,V.jsx)("img",{style:{width:"20px",height:"20px"},src:"https://stackbybucketprod.s3.ap-southeast-1.amazonaws.com/msTeams.png",alt:"MS Teams"})})}],section:"integrations",isEnable:(0,N.G)("msTeamsAction",{userId:null==Me?void 0:Me.id})}
2]),2),Xe=qe[0],Qe=(qe[1],Z((0,s.useState)([]),2)),et=Qe[0],tt=Qe[1],nt=A&&A.tableList,it=Z((0,s.useState)(!1),2),ot=it[0],at=it[1],rt=Z((0,s.useState)(null),2),st=rt[0],lt=rt[1],ct=Z((0,s.useState)(!1),2),dt=ct[0],ut=ct[1],pt=Z((0,s.useState)(null),2),mt=pt[0],ht=pt[1],ft=Z((0,s.useState)(!1),2),gt=ft[0],yt=ft[1],vt=l().useRef(0),xt=Z((0,s.useState)(!1),2),St=xt[0],wt=xt[1],bt=Z((0,s.useState)(null),2),jt=bt[0],At=bt[1],It=Z((0,s.useState)(!1),2),Ct=It[0],Tt=It[1],_t=Z((0,s.useState)(null),2),Rt=_t[0],kt=_t[1];(0,s.useEffect)(function(){Ge(g&&g.automationSteps)},[g&&g.automationSteps]),(0,s.useEffect)(function(){if(mt&&null!=g&&g.automationSteps){var e=g.automationSteps.find(function(e){return e&&String(e.id)===String(mt)});e&&(Pe(e),ut(!0),ht(null),yt(!1))}},[mt,null==g?void 0:g.automationSteps]),(0,s.useEffect)(function(){if(gt&&null!=g&&g.automationSteps){var e=g.automationSteps,t=e.length;if(!(t<=vt.current)){var n=e[t-1];n&&"COND_GRP"===n.stepType&&(Pe(n),b(n.id),x(S,n.id,y),Fe(void 0),r(5),ut(!0)),yt(!1),vt.current=t}}},[gt,null==g?void 0:g.automationSteps,S,y]);var Ot=function(e){var t=Le>0?Le-1:0;j(S,e,y,t),(0,v.Io)(Me,"Automation Action",{action_type:"Action delete",stack_id:S,automation_id:y,action_id:e}),Ne(t)},Nt=function(e){var t={actionId:e};i.A.post("/api/v1/eventautomationaction/".concat(S,"/duplicate"),t).then(function(e){}).catch(function(e){u.oR.error("Error Duplicate Action",$)})},Et=(0,s.useRef)(null);(0,s.useEffect)(function(){var e=function(e){Et.current&&!Et.current.contains(e.target)&&(Ze(!1),Tt(!1),$e(null),kt(null),se(!1),ut(!1))};return document.body.addEventListener("click",e),function(){return document.body.removeEventListener("click",e)}},[]);var Lt=function(e){$e(function(t){return t===e?null:e})};(0,s.useEffect)(function(){var e=t&&t.tableId;"FR_ROW"!=c&&"When a Form is Submitted"!=c||te(S,e,"form").then(function(e){var t=JSON.parse(e);be(t)}),"VM_ROW"!=c&&"When a Row enters a View"!=c||te(S,e).then(function(e){var t=JSON.parse(e),n=t.find(function(e){return e.viewId==ee});Ce(n),be(t)})},[t,ee]);var Mt=function(e){var t=JSON.parse(e.actionParams),n=0;switch(e.actionType){case"CR_ROW":t&&!(0,o.isEmpty)(t.tableId)||n++,t&&!(0,o.isEmpty)(t.column)||n++;break;case"UP_ROW":t&&!(0,o.isEmpty)(t.tableId)||n++,t&&!(0,o.isEmpty)(t.column)||n++,t&&!(0,o.isEmpty)(t.rowId)||n++;break;case"S_EMAIL":t&&!(0,o.isEmpty)(t.to)||n++,t&&!(0,o.isEmpty)(t.subject)||n++,t&&!(0,o.isEmpty)(t.message)||n++;break;case"FIND_ROW":t&&!(0,o.isEmpty)(t.tableId)||n++,t&&((0,o.isEmpty)(t.findOn)||"Select search type"===t.findOn)&&n++,t&&"view"===t.findOn&&(0,o.isEmpty)(t.viewId)&&n++,t&&"condition"===t.findOn&&((0,o.isEmpty)(t.filterData)||t.filterData.filterSet.some(function(e){return(0,o.isEmpty)((0,o.isNumber)(e.value)||(0,o.isBoolean)(e.value)?e.value.toString():e.value)}))&&n++,(Ae<1||Ae>100)&&n++;break;case"WHATSAPP":t&&!(0,o.isEmpty)(t.apiName)||n++,t&&!(0,o.isEmpty)(t.templateName)||n++,t&&!(0,o.isEmpty)(t&&t.whatsappActionObj&&t.whatsappActionObj.mobileNoToShow)||n++}return n},Dt=((0,s.useMemo)(function(){return function(e,t,n,i,a,r,s){var l=0;switch(n){case"When Row is Created":((0,o.isEmpty)(e)||"Select table"===e.name)&&l++;break;case"When Row is Updated":((0,o.isEmpty)(e)||"Select table"===e.name)&&l++,(0,o.isEmpty)(t)&&l++;break;case"When a Form is Submitted":((0,o.isEmpty)(e)||"Select table"===e.name)&&l++,(0,o.isEmpty)(i)&&(0,o.isEmpty)(a&&r&&r.length>0&&r.find(function(e){return e.shareId==a})&&r.find(function(e){return e.shareId==a}).name)&&l++;break;case"When a Row enters a View":((0,o.isEmpty)(e)||"Select table"===e.name)&&l++,(0,o.isEmpty)(i)&&l++;break;case"When a Row Matches Conditions":((0,o.isEmpty)(e)||"Select table"===e.name)&&l++,((0,o.isEmpty)(s)||s.filterSet.some(function(e){return(0,o.isEmpty)(e.value)}))&&l++}return l}(t,X,c,pe,Q,we,je)},[t,X,c,pe,Q,we,je]),(0,s.useMemo)(function(){return function(e,t,n,i){var a=0;return(0,o.isEmpty)(e)&&a++,e&&"Minutes"===e.name&&(0,o.isEmpty)(t.every)&&a++,e&&"Hours"===e.name&&(0,o.isEmpty)(t.every)&&a++,e&&"Days"===e.name&&((0,o.isEmpty)(t.every)||(0,o.isEmpty)(t.startAtDate))&&a++,e&&"Weeks"===e.name&&((0,o.isEmpty)(t.every)||(0,o.isEmpty)(t.startAtDate)||(0,o.isEmpty)(n))&&a++,e&&"Months"===e.name&&((0,o.isEmpty)(t.every)||(0,o.isEmpty)(t.startAtDate)||(0,o.isEmpty)(i))&&a++,a}(me,he,fe,ge)},[me,he,fe,ge]),A&&A.plan&&A.plan.slug),Ft=g&&g.automationSteps?g.automationSteps.length-1:0,Wt=(0,s.useMemo)(function(){switch(Dt){case"free":case"free-india":case"free-forever":case"personal":case"personal-india":case"personal-trial":return Ft>=10;case"economy":case"economy-india":case"economy-trail":return Ft>=20;case"business":case"business-india":case"business-trial":case"business-trial-14-days":return Ft>=50;case"business-plus":case"enterprise":return Ft>=100;default:return!1}},[Dt,Ft]),Pt=function(e){return re!==e.id?null:(0,V.jsxs)("div",{ref:Et,className:"open_test_step_model",children:[(0,V.jsx)("h3",{style:{paddingBottom:".25rem",fontSize:"1.25rem"},children:"Test Create record"}),(0,V.jsx)("p",{style:{paddingBottom:".75rem",marginTop:".5rem",fontSize:"12px"},children:"Choose whether you would like this action to:"}),(0,V.jsx)("div",{children:(0,V.jsxs)(C.A,{children:[(0,V.jsx)(T.A,{style:{margin:"0em 0em 0.5em"},children:(0,V.jsx)(_.A,{label:"Generate Preview",name:"radioGroup",value:"Generate Preview",checked:1===ne,onChange:function(){ie(1)}})}),(0,V.jsx)(T.A,{children:(0,V.jsx)(_.A,{label:"Run as Configured",name:"radioGroup",value:"Run test",checked:2===ne,onChange:function(){ie(2)}})})]})}),(0,V.jsxs)("div",{style:{display:"flex",justifyContent:"end",marginTop:"10px"},children:[(0,V.jsx)("button",{className:"cancelButton",onClick:function(){se(!1)},children:"Cancel"}),1===ne&&(0,V.jsx)("button",{className:"runButton",onClick:function(){se(null),ce(),xe([].concat(z(ve),[e.id]))},children:"Generate Preview"}),1!==ne&&(0,V.jsx)("button",{className:"runButton",onClick:function(){se(null),de(),xe([].concat(z(ve),[e.id]))},children:"Run Test"})]})]})},Vt=function(e,t){return(0,V.jsx)("div",{className:"sidelabel_round",children:!(0,o.isEmpty)(ye)&&ve.includes(e.id)?(0,V.jsxs)("div",{className:"trigger_test_step_button ".concat(2===a&&w===e.id&&"trigger_test_step_button_hover"),onClick:function(){var t=g&&g.automationSteps.findIndex(function(t){return t.id===e.id});r("trigger"==e.type?1:2),n(380),x(S,e.id,y),b(e.id),Ne(t),ue&&(se(function(t){return t===e.id?null:e.id}),le(!0))},onMouseOver:function(){return lt(e.id)},onMouseLeave:function(){return lt(null)},children:[(0,V.jsx)(p.A,{className:"config_check",name:"check"}),(0,V.jsx)("div",{className:"review_test_result",children:"Review test results"})]}):{}?(0,V.jsxs)("div",{className:"trigger_test_step_button ".concat(2===a&&w===e.id&&"trigger_test_step_button_hover"),onClick:function(){r(function(e){return"trigger"==e.type?1:"COND_GRP"===e.stepType?5:2}
2(e)),n(380),x(S,e.id,y),b(e.id),"FIND_ROW"===e.actionType?(ce(),Se(!0),xe([].concat(z(ve),[e.id]))):(se(function(t){return t===e.id?null:e.id}),le(!0))},onMouseOver:function(){return lt(e.id)},onMouseLeave:function(){return lt(null)},children:[(0,V.jsx)(p.A,{className:"play_icon",name:"play"}),(0,V.jsx)("div",{className:"flex_center test_Step",children:"Test Step"})]}):(0,V.jsx)(m.A,{className:"custom-popup fix_config_model",trigger:(0,V.jsxs)("div",{className:"trigger_test_step_button ".concat(2===a&&w===e.id&&"trigger_test_step_button_hover"),onClick:function(){r("trigger"==e.type?1:2),n(380),x(S,e.id,y),b(e.id)},onMouseOver:function(){return lt(e.id)},onMouseLeave:function(){return lt(null)},children:[(0,V.jsx)("div",{className:"ColumnIconDiv",children:(0,V.jsx)(F.A,{icon:"ios-warning-outline",fontSize:"16px",color:"red",style:{marginBottom:"3px"}})}),(0,V.jsx)("div",{className:"fix_config",children:"Fix configuration"})]}),content:(0,V.jsx)("div",{style:{color:"white",backgroundColor:"black"},children:Mt(e)>1?"".concat(Mt(e)," columns are missing configuration"):"".concat(Mt(e)," column is missing configuration")}),size:"tiny",flowing:!0,hoverable:!0,position:"bottom right"})})},Gt=function(e,t){var i=e.outPutTableId,o=nt&&nt.find(function(e){return e.tableId===i});return(0,V.jsx)("div",{children:(0,V.jsxs)("div",{className:"111 center_action_box ".concat(g.lastActionId==e.id?"active_center":st===e.id?"hover_center_active":"hover_center"),children:[(0,V.jsxs)("div",{style:{display:"flex",width:"100%",alignItems:"center"},onClick:function(t){t.stopPropagation();var i=g&&g.automationSteps.findIndex(function(t){return t.id===e.id});r("trigger"==e.type?1:2),n(380),x(S,e.id,y),b(e.id),Ne(i)},children:[(0,V.jsx)("span",{style:{marginRight:"0.5rem",lineHeight:0},children:"trigger"==e.type?(0,W.SJ)(e.stepType):(0,W.q7)(e.stepType)}),(0,V.jsxs)("span",{children:[(0,V.jsx)("div",{className:"font_500 font_color",children:"trigger"==e.type?_e[e.stepType]:Te(e.stepType)}),e.description?(0,V.jsx)("div",{title:e.description,style:{opacity:".75",maxWidth:"200px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.description}):"S_EMAIL"!==e.actionType&&"WHATSAPP"!==e.actionType?(0,V.jsx)("div",{style:{opacity:".75"},children:o?"in ".concat(o.name):""}):null]})]}),"trigger"!=e.type&&(0,V.jsxs)("div",{style:{cursor:"pointer",position:"relative"},children:[(0,V.jsx)(p.A,{className:"elipsisIcon",name:"ellipsis horizontal",onClick:function(t){t.stopPropagation(),Lt(e.id)}}),Ke===e.id&&(0,V.jsx)("div",{ref:Et,className:"center_dots_dropdown dropdown_block",children:(0,V.jsxs)("div",{style:{padding:"0px"},children:[(0,V.jsxs)("div",{className:"p_11 dropdownlist",onClick:function(){Nt(e.id),$e(null)},children:[(0,V.jsx)("span",{children:(0,V.jsx)(p.A,{className:"center_Icons",name:"copy outline"})}),"Duplicate"]}),(0,V.jsxs)("div",{className:"p_11 dropdownlist",onClick:function(){Ot(e.id),$e(null)},children:[(0,V.jsx)("span",{children:(0,V.jsx)(p.A,{className:"center_Icons",name:"trash"})}),"Delete"]})]})})]})]})})},Ut=function(e,t){var i,o,a="COND_GRP"===e.stepType&&t===Ve.filter(function(e){return"COND_GRP"==e.stepType}).map(function(e){return e.stepType}).lastIndexOf("COND_GRP"),s=Ve.slice(1).filter(function(e){return"COND_GRP"!==e.stepType}),l=JSON.parse(e.config),c=l&&l.actionIdList;s=s.filter(function(e){return c&&c.includes(e.id)});var m,h,f=Ve.findIndex(function(t){return t.id===e.id}),g=(null==l?void 0:l.executionConditions)||{},j=g.filterSet||[],C=(g.conjunction||"and").toLowerCase(),T=(null==l?void 0:l.conditionType)||(0===t?"if":"otherwise if"),_=null!=l&&l.conditionName?String(l.conditionName).trim():"",R=null!=l&&l.conditionDescription?String(l.conditionDescription).trim():"",k=Ve[f],O=(null!=k&&null!==(i=k.columnSchema)&&void 0!==i&&i.length?k.columnSchema:null)||(null===(o=Ve[0])||void 0===o?void 0:o.columnSchema)||[],N="or"===C?" or ":" and ",E=j.map(function(e){var t=O.find(function(t){return t.columnId===e.columnId}),n=(null==t?void 0:t.name)||e.columnId,i=(0,P.X)(t,e.value,A),o=(0,v.If)(null==t?void 0:t.type,null==t?void 0:t.typeOptions),a=o&&o[e.operator]||e.operator,r="string"==typeof a&&a.endsWith("...")?a.slice(0,-3):a;return"".concat(n," ").concat(r," ").concat(i)}),L=E.length>0?"if "+E.join(N):"",M=Ke===e.id||Rt===e.id,F=null!=w&&String(w)===String(e.id);return(0,V.jsxs)("div",{className:"condition-block".concat(M?" condition-block--dropdown-open":"").concat(F?" condition-block--selected":""),onClick:function(t){t.stopPropagation(),r(5),Pe(e),x(S,e.id,y),b(e.id)},children:[(0,V.jsxs)("div",{className:"condition-section if-section",children:[(0,V.jsxs)("div",{className:"condition-header",children:[(0,V.jsx)("div",{className:"condition-header__title",children:(0,V.jsx)("span",{style:{color:"#0066cc",cursor:"pointer"},onClick:function(t){t.stopPropagation(),Pe(e),ut(!dt),x(S,e.id,y),b(e.id)},children:_||("otherwise"===T?"Otherwise":L||("if"===T?"If conditions are met":"Otherwise if conditions are met"))})}),(0,V.jsxs)("div",{className:"flex_end condition-block-actions",children:[(0,V.jsx)("div",{className:"condition-block-actions__btn",style:{cursor:"pointer",position:"relative"},onClick:function(t){t.stopPropagation(),Tt(!0),kt(e.id)},children:(0,V.jsx)(D.GGD,{className:"elipsisIcon"})}),(0,V.jsxs)("div",{className:"condition-block-actions__btn",style:{cursor:"pointer",position:"relative",paddingLeft:"4px"},children:[(0,V.jsx)(p.A,{className:"elipsisIcon",name:"ellipsis horizontal",onClick:function(t){t.stopPropagation(),Lt(e.id)}}),Ke===e.id&&(0,V.jsx)("div",{ref:Et,className:"center_dots_dropdown dropdown_block",style:{width:"150px"},children:(0,V.jsxs)("div",{style:{padding:"0px"},children:[(0,V.jsxs)("div",{className:"p_11 dropdownlist",onClick:function(t){t.stopPropagation(),Nt(e.id),$e(null)},children:[(0,V.jsx)("span",{children:(0,V.jsx)(p.A,{className:"center_Icons",name:"copy outline"})}),"Duplicate group"]}),(0,V.jsxs)("div",{className:"p_11 dropdownlist",onClick:function(t){t.stopPropagation(),Ot(e.id),$e(null)},children:[(0,V.jsx)("span",{children:(0,V.jsx)(p.A,{className:"center_Icons",name:"trash"})}),"Delete group"]})]})})]})]})]}),(0,V.jsx)("p",{className:"condition-subtitle",children:(h=(c||[]).map(function(e){var t=Ve.find(function(t){return t.id===e});return t?Te(t.stepType):null}
2).filter(Boolean),0===h.length?"":1===h.length?h[0]:2===h.length?"".concat(h[0]," and ").concat(h[1]):"".concat(h.slice(0,-1).join(", ")," and ").concat(h[h.length-1]))}),R&&(0,V.jsx)("div",{className:"condition-subtitle",children:R}),s&&0===s.length&&(0,V.jsxs)("div",{className:"condition-action-box",onClick:function(t){t.stopPropagation(),Tt(!0),kt(e.id)},children:[(0,V.jsx)(D.GGD,{fontSize:16,color:"#166ee1"}),(0,V.jsx)("span",{style:{marginLeft:"8px"},children:"Add action"})]}),s&&s.map(function(e,t){return(0,V.jsx)(I.sx,{draggableId:String(e.id),index:t,children:function(t){return(0,V.jsx)("div",B(B(B({ref:t.innerRef},t.draggableProps),t.dragHandleProps),{},{onClick:function(e){e.stopPropagation(),r(2)},children:(0,V.jsx)("div",{children:Gt(e)})}))}},e.id)})]}),Ct&&Rt===e.id&&(0,V.jsxs)("div",{ref:Et,className:"center_dropdown",style:{position:"absolute",width:"320px",zIndex:"1"},children:[(0,V.jsx)("div",{className:"actionListMenuSections",children:"Stackby"}),(0,V.jsx)("div",{children:(0,V.jsx)("div",{style:{padding:"0px",borderBottom:"1px solid #0000000d"},children:Xe&&Xe.map(function(t,i){return t.isEnable?"actions"==t.section?(0,V.jsxs)("div",{className:"p_4 dropdownlist center_dropdown_data }",onClick:function(o){o.stopPropagation(),Wt?(wt(!0),u.oR.error("Action Create Limit Reached",$)):(tt([].concat(z(et),[{name:t.name,id:i}])),d(t.type,null,e.id),J(t),r(2),n(380),Tt(!1))},children:[(0,V.jsx)("span",{className:"icon_bg",children:t.icon}),(0,V.jsx)("span",{style:{marginTop:"-3px"},children:t.name})]},i):void 0:null})})}),(0,V.jsx)("div",{className:"actionListMenuSections",children:"Integrations"}),(0,V.jsx)("div",{children:(0,V.jsx)("div",{style:{padding:"0px"},children:(0,V.jsx)("div",{children:Xe.map(function(t,i){if(!t.isEnable||"integrations"!=t.section)return null;var o=Array.isArray(t.children)&&t.children.length>0,a=jt===i;return(0,V.jsxs)("div",{style:{position:"relative"},children:[(0,V.jsxs)("div",{className:"dropdownlist",onClick:function(s){s.stopPropagation(),o?At(a?null:i):(tt([].concat(z(et),[{name:t.name,id:i}])),Ze(!1),d(t.type,null,e.id),J(t),r(2),n(380))},children:[(0,V.jsx)("span",{className:"icon_bg",children:t.icon}),(0,V.jsx)("span",{style:{marginLeft:6},children:t.name}),o&&(0,V.jsx)("div",{style:{position:"absolute",right:"0px"},children:(0,V.jsx)(p.A,{className:"actionIcons",name:"angle right"})})]}),o&&a&&(0,V.jsx)("div",{className:"submenu",children:t.children.map(function(e,t){return(0,V.jsxs)("div",{className:"dropdownlist",onClick:function(i){i.stopPropagation(),tt([].concat(z(et),[{name:e.name,id:t}])),Ze(!1),d(e.type),J(e),r(2),n(380),At(null)},children:[(0,V.jsx)("span",{className:"icon_bg",children:e.icon}),(0,V.jsx)("span",{children:e.name})]},t)})})]},i)})})})})]}),a&&(m=Ve.filter(function(e){return"COND_GRP"===e.stepType}).some(function(e){try{return"otherwise"===JSON.parse(e.config||"{}").conditionType}catch(e){return!1}}),(0,V.jsx)("div",{className:"add-condition",style:{opacity:m?.5:1,pointerEvents:m?"none":"auto",cursor:m?"not-allowed":"pointer"},onClick:function(t){t.stopPropagation(),m||d("COND_GRP",e.id,null)},children:(0,V.jsx)("button",{disabled:m,children:"+ Add condition"})}))]})};return(0,V.jsx)("div",{id:"center_automation_action_id",children:(0,V.jsxs)("div",{style:{width:"100%",maxWidth:"400px",margin:"auto"},children:[(0,V.jsx)("div",{style:{display:"flex",justifyContent:"center",marginTop:"38px"},children:(0==g.list.length||0==g.automationSteps.length)&&(0,V.jsx)(l().Fragment,{children:(0,V.jsxs)("div",{children:[(0,V.jsx)("div",{className:"hover_center center_nodata",children:(0,V.jsxs)("div",{className:"font_500 font_color",style:{padding:"Add trigger"!==Je?"0px":"18px",display:"flex",alignItems:"center",justifyContent:"Add trigger"!==Je?"start":"center",width:"100%"},children:[(0,V.jsx)("span",{className:"triggerIconName",children:(0,W.SJ)(Je)}),(0,V.jsx)("div",{children:Je})]})}),(0,V.jsx)("div",{className:"suggest_text",children:"Suggested triggers for you:"}),(0,V.jsx)("div",{style:{marginTop:"10px"},children:h&&h.map(function(e,t){return(0,V.jsxs)("div",{className:"in_div",onMouseOver:function(){Be(e.name)}
2,onMouseOut:function(){Be("Add trigger")},onClick:function(){Ee(e.type),0!=g.list.length||Ie||f(e.type),Ie||(r(1),G(e.name)),r(1)},children:[(0,V.jsx)("span",{className:"triggerIconName",children:(0,W.SJ)(e.name)}),(0,V.jsx)("div",{children:e.name})]},t)})})]})})}),"Select trigger"!==c&&g.automationSteps&&g.automationSteps.length>0&&(0,V.jsx)("div",{children:(0,V.jsx)("div",{children:g&&g.automationSteps&&g.automationSteps.slice(0,1).map(function(e,t){return(0,V.jsxs)("div",{className:"center_action_div",children:[(0,V.jsxs)("div",{style:{marginRight:"20px"},children:[(0,V.jsx)("div",{className:"flex_end font_15 opacity_75",children:"trigger"==e.type?"Trigger":"Action"}),(0,V.jsxs)("div",{className:"sidelabel",children:[Vt(e),Pt(e)]})]}),Gt(e)]},t)})})}),"Select trigger"!==c&&g.automationSteps&&g.automationSteps.length>0&&(0,V.jsxs)("div",{children:[(0,V.jsx)(I.JY,{onDragEnd:function(e){if(e.destination){var t=e.source,n=e.destination,o=e.draggableId;if("automation-actions"!==n.droppableId||0!==n.index){var a=z(Ve);if("automation-actions"===n.droppableId&&"automation-actions"===t.droppableId){var r={actionId:e.draggableId,sequence:e.destination.index+1};i.A.post("/api/v1/eventautomationaction/".concat(S,"/updateSequence"),r).then(function(e){}).catch(function(e){u.oR.error("Error Moving Action",$)})}if(n.droppableId.startsWith("automation-groups")&&t.droppableId.startsWith("automation-groups")){var s,l=t.droppableId.split("automation-groups-")[1],c=n.droppableId.split("automation-groups-")[1],d=Ve.find(function(e){return String(e.id)===l}),p=Ve.find(function(e){return String(e.id)===c}),m=Ve.find(function(e){return String(e.id)===o}),h=null!=d&&d.config?JSON.parse(d.config):null,f=null!=p&&p.config?JSON.parse(p.config):null,g=null!=m&&m.config?JSON.parse(m.config):null;if(null!==(s=h)&&void 0!==s&&s.actionIdList&&(h=B({},h)),f){var y,v=null!==(y=f)&&void 0!==y&&y.actionIdList?z(f.actionIdList):[];(v=v.filter(function(e){return e!==o})).splice(n.index,0,o),f=B(B({},f),{},{actionIdList:v})}g=B(B({},g),{},{groupId:c});var x={actionType:d&&d.stepType,actionId:d&&d.id,actionParams:JSON.stringify(h)},w={actionType:p&&p.stepType,actionId:p&&p.id,actionParams:JSON.stringify(f)},b={actionType:m&&m.stepType,actionId:m&&m.id,actionParams:JSON.stringify(g)};return i.A.post("/api/v1/eventautomationaction/".concat(S,"/update"),x).then(function(e){}).catch(function(e){u.oR.error("Error Moving Action",$)}),i.A.post("/api/v1/eventautomationaction/".concat(S,"/update"),w).then(function(e){}).catch(function(e){u.oR.error("Error Moving Action",$)}),void i.A.post("/api/v1/eventautomationaction/".concat(S,"/update"),b).then(function(e){}).catch(function(e){u.oR.error("Error Moving Action",$)})}if("automation-actions"===n.droppableId&&t.droppableId.startsWith("automation-groups")){var j=t.droppableId.split("automation-groups-")[1],A=Ve.find(function(e){return String(e.id)===o}),I=Ve.find(function(e){return String(e.id)===j}),C=null!=I&&I.config?JSON.parse(I.config):null,T=null!=A&&A.config?JSON.parse(A.config):null;if(C){var _,R=z((null===(_=C)||void 0===_?void 0:_.actionIdList)||[]);R=R.filter(function(e){return e!==o}),C=B(B({},C),{},{actionIdList:R})}if(T){var k=T;k.groupId;T=B({},function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(k,U))}var O={actionType:I&&I.stepType,actionId:I&&I.id,actionParams:JSON.stringify(C)},N={actionType:A&&A.stepType,actionId:A&&A.id,actionParams:JSON.stringify(T)};i.A.post("/api/v1/eventautomationaction/".concat(S,"/update"),O).then(function(e){}).catch(function(e){u.oR.error("Error Moving Action",$)}),i.A.post("/api/v1/eventautomationaction/".concat(S,"/update"),N).then(function(e){}).catch(function(e){u.oR.error("Error Moving Action",$)})}else if(n.droppableId.startsWith("automation-groups")&&"automation-actions"==t.droppableId){var E,L,M=n.droppableId.split("automation-groups-")[1],D=Ve.find(function(e){return String(e.id)===M}),F=Ve.find(function(e){return String(e.id)===o}),W=null!=D&&D.config?JSON.parse(D.config):null,P=null!=F&&F.config?JSON.parse(F.config):null;P=B(B({},P),{},{groupId:M});var V=null!==(E=W)&&void 0!==E&&E.actionIdList?z(W.actionIdList):[];V=V.filter(function(e){return e!==o}),null!==(L=W)&&void 0!==L&&L.actionIdList?V.splice(n.index,0,o):V=[o],W=B(B({},W),{},{actionIdList:V});var G={actionType:D&&D.stepType,actionId:D&&D.id,actionParams:JSON.stringify(W)},J={actionType:F&&F.stepType,actionId:F&&F.id,actionParams:JSON.stringify(P)};i.A.post("/api/v1/eventautomationaction/".concat(S,"/update"),G).then(function(e){}).catch(function(e){u.oR.error("Error Moving Action",$)}),i.A.post("/api/v1/eventautomationaction/".concat(S,"/update"),J).then(function(e){}).catch(function(e){u.oR.error("Error Moving Action",$)})}Ge(a)}}},children:(0,V.jsxs)("div",{children:[(0,V.jsx)(I.gL,{droppableId:"automation-actions",children:function(e){return(0,V.jsxs)("div",B(B({ref:e.innerRef},e.droppableProps),{},{children:[g&&g.automationSteps&&Ve.slice(1).filter(function(e){var t={};try{t=e.config?JSON.parse(e.config):{}}catch(e){t={}}return!t.hasOwnProperty("groupId")&&"COND_GRP"!==e.stepType}).map(function(e,t){return(0,V.jsx)(I.sx,{draggableId:String(e.id),index:t,children:function(t){return(0,V.jsx)("div",B(B(B({ref:t.innerRef},t.draggableProps),t.dragHandleProps),{},{children:(0,V.jsxs)("div",{className:"center_action_div",children:[(0,V.jsxs)("div",{style:{marginRight:"20px"},children:[(0,V.jsx)("div",{className:"flex_end font_15 opacity_75",children:"trigger"==e.type?"Trigger":"Action"}),(0,V.jsxs)("div",{className:"sidelabel",children:[Vt(e),Pt(e)]})]}),"COND_GRP"!=e.stepType&&Gt(e)]})}))}},e.id)}),e.placeholder]}))}}),dt&&(0,V.jsx)("div",{className:"conditionalgroup-filter-model-above",children:(0,V.jsx)("div",{ref:Et,className:"conditionalgroup-filter-model",children:(0,V.jsx)(M.A,{filters:De,columnSchema:g.automationSteps&&g.automationSteps[0]&&g.automationSteps[0].columnSchema,stackId:S,setOpenGroupConditionModel:function(){return ut(!1)},selectedConditionForFilter:We,allAutomationSteps:Ve,setConditionGroupFilter:Fe})})}),Ve.filter(function(e){return"COND_GRP"==e.stepType}).map(function(e,t,n){return(0,V.jsx)("div",{children:(0,V.jsx)(I.gL,{droppableId:"automation-groups-".concat(e.id),children:function(i){return(0,V.jsxs)("div",B(B({ref:i.innerRef},i.droppableProps),{},{children:[(0,V.jsxs)("div",{className:"center_action_div",children:[(0,V.jsx)("div",{className:"border-vertical ".concat(t===n.length-1?"border-last":""),style:{width:"120px",marginRight:"9px"},children:(0,V.jsx)("div",{className:"sidelabel",children:Vt(e)}
2)}),Ut(e,t)]}),i.placeholder]}))}})})})]})}),!Ie&&-1==Ve.findIndex(function(e){return"COND_GRP"==e.stepType})&&(0,V.jsxs)("div",{style:{display:"flex",justifyContent:"center",marginTop:"20px"},children:[(0,V.jsx)("div",{style:{width:"120px",marginRight:"9px"}}),(0,V.jsx)("div",{className:"hover_center center_nodata font_15",style:{width:"260px",cursor:"pointer",pointerEvents:!["When Webhook Received","At Scheduled Time"].includes(c)&&t&&"Select table"==t.name||"Select Trigger"===c?"none":"auto",opacity:!["When Webhook Received","At Scheduled Time"].includes(c)&&t&&"Select table"==t.name||"Select Trigger"===c?.5:1},onClick:function(e){e.stopPropagation(),(t&&"Select Table"!=t.name||["When Webhook Received"].includes(c))&&Ze(!ze)},children:(0,V.jsxs)("div",{className:"font_500 font_color flex_center full_width opacity_6",children:[(0,V.jsx)("span",{children:(0,V.jsx)(p.A,{className:"add_action_icon",name:"plus"})}),"Add Actions"]})})]}),ze&&(0,V.jsxs)("div",{ref:Et,className:"flex_center mt_10",children:[(0,V.jsx)("div",{style:{width:"120px",marginRight:"9px"}}),(0,V.jsxs)("div",{className:"center_dropdown",children:[(0,V.jsx)("div",{className:"actionListMenuSections",children:"Advanced Logic"}),(0,V.jsx)("div",{children:(0,V.jsx)("div",{style:{padding:"0px",borderBottom:"1px solid #0000000d"},children:Xe&&Xe.map(function(e,t){return e.isEnable?"advanced-logic"==e.section?(0,V.jsxs)("div",{className:"p_4 dropdownlist center_dropdown_data }",onClick:function(n){var i,o;Wt?(wt(!0),u.oR.error("Action Create Limit Reached",$)):(n.stopPropagation(),tt([].concat(z(et),[{name:e.name,id:t}])),Ze(!1),J(e),vt.current=null!==(i=null==g||null===(o=g.automationSteps)||void 0===o?void 0:o.length)&&void 0!==i?i:0,yt(!0),d(e.type,null,null,function(e){if(e){var t=Array.isArray(e)?e:e.automationStep||e.action||[],n=null!=e.lastActionId?e.lastActionId:null!=e.id?e.id:t.length>0&&t[t.length-1]?t[t.length-1].id:null;null!=n&&(ht(n),b(n),x(S,n,y),Fe(void 0))}}))},children:[(0,V.jsx)("span",{className:"icon_bg",children:e.icon}),(0,V.jsx)("span",{style:{marginTop:"-3px"},children:e.name})]},t):void 0:null})})}),(0,V.jsx)("div",{className:"actionListMenuSections",children:"Stackby"}),(0,V.jsx)("div",{children:(0,V.jsx)("div",{style:{padding:"0px",borderBottom:"1px solid #0000000d"},children:Xe&&Xe.map(function(e,t){return e.isEnable?"actions"==e.section?(0,V.jsxs)("div",{className:"p_4 dropdownlist center_dropdown_data }",onClick:function(i){i.stopPropagation(),Wt?(wt(!0),u.oR.error("Action Create Limit Reached",$)):(tt([].concat(z(et),[{name:e.name,id:t}])),Ze(!1),d(e.type),J(e),r(2),n(380))},children:[(0,V.jsx)("span",{className:"icon_bg",children:e.icon}),(0,V.jsx)("span",{style:{marginTop:"-3px"},children:e.name})]},t):void 0:null})})}),(0,V.jsx)("div",{className:"actionListMenuSections",children:"Integrations"}),(0,V.jsx)("div",{children:(0,V.jsx)("div",{style:{padding:"0px"},children:(0,V.jsx)("div",{children:Xe.map(function(e,t){if(!e.isEnable||"integrations"!=e.section)return null;var i=Array.isArray(e.children)&&e.children.length>0,o=jt===t;return(0,V.jsxs)("div",{style:{position:"relative"},children:[(0,V.jsxs)("div",{className:"dropdownlist",onClick:function(a){a.stopPropagation(),i?At(o?null:t):(tt([].concat(z(et),[{name:e.name,id:t}])),Ze(!1),d(e.type),J(e),r(2),n(380))},children:[(0,V.jsx)("span",{className:"icon_bg",children:e.icon}),(0,V.jsx)("span",{style:{marginLeft:6},children:e.name}),i&&(0,V.jsx)("div",{style:{position:"absolute",right:"0px"},children:(0,V.jsx)(p.A,{className:"actionIcons",name:"angle right"})})]}),i&&o&&(0,V.jsx)("div",{className:"submenu",children:e.children.map(function(e,t){return(0,V.jsxs)("div",{className:"dropdownlist",onClick:function(i){i.stopPropagation(),tt([].concat(z(et),[{name:e.name,id:t}])),Ze(!1),d(e.type),J(e),r(2),n(380),At(null)},children:[(0,V.jsx)("span",{className:"icon_bg",children:e.icon}),(0,V.jsx)("span",{children:e.name})]},t)})})]},t)})})})})]})]})]}),(0,V.jsx)(R.A,{open:ot,size:"small",onClose:function(){at(!1)},closeIcon:!0,children:(0,V.jsx)(R.A.Content,{style:{padding:"12px !important"},children:(0,V.jsx)("div",{className:"rowcardContainer",style:{height:"60vh",maxHeight:"60vh",overflow:"auto"},children:(0,V.jsx)(l().Fragment,{children:H.rowData&&H.rowData.map(function(e,t){return(0,V.jsx)("div",{id:"rowcardMain",onClick:function(){return function(e){at(!1),oe(e),ae(!0);var t=Y||e.rowId;t!=e.rowId&&(t=e.rowId);var n={testStepSelectedRow:t};if(X&&X.length>0){var i=X.map(function(e){return e.columnId});n.watchingColumns=i}"FR_ROW"!=c&&"When a Form is Submitted"!=c||(n.shareId=Q),"VM_ROW"!=c&&"When a Row enter
2s a View"!=c||(n.viewId=ee);var o={triggerId:K,triggerParams:JSON.stringify(n)};q(S,o)}(e)},children:(0,V.jsx)(E.A,{id:t,card:e,columnSchema:H.columnSchema,showColumnNamesInCards:!0,stackUsers:A.stackUsers})},t)})})})})}),Re&&(0,V.jsx)(L.A,{workspaceId:A&&A.workspaceId,close:function(){ke(!1)},history:Oe}),(0,V.jsxs)(R.A,{id:"powerup",size:"tiny",open:St,onClose:function(){return wt(!1)},closeIcon:!0,children:[(0,V.jsx)(R.A.Header,{children:"Enable Internal Automations"}),(0,V.jsxs)(R.A.Content,{className:"content",children:[(0,V.jsx)("p",{children:"With internal automations, you can automate your day to day and manual tasks for your workflows."}),(0,V.jsx)("hr",{}),(0,V.jsx)("div",{className:"action-btn",children:(0,V.jsxs)(k.A,{icon:!0,primary:!0,className:"plan-btn",onClick:function(){ke(!0)},children:[(0,V.jsx)(p.A,{name:"magic",color:"yellow"}),"   Enable Automations today"]})}),(0,V.jsx)("p",{className:"powerupfeature",style:{fontSize:"16px"},children:"With this upgrade, you will get:"}),(0,V.jsxs)("ul",{style:{marginLeft:25,marginTop:10},children:[(0,V.jsx)("li",{children:"More internal automation runs on your workspace"}),(0,V.jsx)("li",{children:"All triggers (including incoming web-hooks)"}),(0,V.jsx)("li",{children:"Multiple actions per automation"}),(0,V.jsx)("li",{children:"More automation run history on every automation"})]})]})]})]})})});const Q=X;var ee=n(96763);function te(e){return function(e){if(Array.isArray(e))return pe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ue(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ne(e){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ne(e)}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach(function(t){ae(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ae(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=ne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=ne(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ne(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function re(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,i,o,a){var l=i&&i.prototype instanceof s?i:s,c=Object.create(l.prototype);return se(c,"_invoke",function(n,i,o){var a,s,l,c=0,d=o||[],u=!1,p={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return a=t,s=0,l=e,p.n=n,r}};function m(n,i){for(s=n,l=i,t=0;!u&&c&&!o&&t<d.length;t++){var o,a=d[t],m=p.p,h=a[2];n>3?(o=h===i)&&(l=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=m&&((o=n<2&&m<a[1])?(s=0,p.v=i,p.n=a[1]):m<h&&(o=n<3||a[0]>i||i>h)&&(a[4]=n,a[5]=i,p.n=h,s=0))}if(o||n>1)return r;throw u=!0,i}return function(o,d,h){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&m(d,h),s=d,l=h;(t=s<2?e:l)||!u;){a||(s?s<3?(s>1&&(p.n=-1),m(s,l)):p.n=l:p.v=l);try{if(c=2,a){if(s||(o="next"),t=a[o]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);a=e}else if((t=(u=p.n<0)?l:n.call(i,p))!==r)break}catch(t){a=e,s=1,l=t}finally{c=1}}return{value:t,done:u}}}(n,o,a),!0),c}var r={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var d=[][i]?t(t([][i]())):(se(t={},i,function(){return this}),t),u=c.prototype=s.prototype=Object.create(d);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,se(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return l.prototype=c,se(u,"constructor",c),se(c,"constructor",l),l.displayName="GeneratorFunction",se(c,o,"GeneratorFunction"),se(u),se(u,o,"Generator"),se(u,i,function(){return this}),se(u,"toString",function(){return"[object Generator]"}),(re=function(){return{w:a,m:p}})()}function se(e,t,n,i){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}se=function(e,t,n,i){function a(t,n){se(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},se(e,t,n,i)}function le(e,t,n,i,o,a,r){try{var s=e[a](r),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(i,o)}function ce(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var a=e.apply(t,n);function r(e){le(a,i,o,r,s,"next",e)}function s(e){le(a,i,o,r,s,"throw",e)}r(void 0)})}}function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,a,r,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=a.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}
2finally{try{if(!l&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(c)throw o}}return s}}(e,t)||ue(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ue(e,t){if(e){if("string"==typeof e)return pe(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pe(e,t):void 0}}function pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var me={position:"bottom-center",autoClose:3e3,closeButton:!1,className:"custom-toast-automation-copy-url"};const he=(0,c.Ng)(function(e){return{table:e.table,automation:e.automation,auth:e.auth}},function(e){return{getAutomationList:function(){return e(h.Ss.apply(void 0,arguments))},getAutomationRunCount:function(){return e(h.Gc.apply(void 0,arguments))},adddRow:function(){return e(f.q7.apply(void 0,arguments))},getAutomationDetails:function(){return e(h.UE.apply(void 0,arguments))},createTrigger:function(){return e(h.ze.apply(void 0,arguments))},updateTrigger:function(){return e(h.Yj.apply(void 0,arguments))},createAction:function(t,n){return e((0,h.VP)(t,n))},getScheduleTimeExpectedTriggerTimes:function(){return e(h.f9.apply(void 0,arguments))},storeActionPreviewResponse:function(){return e(h.P_.apply(void 0,arguments))}}})(function(e){var t=e.table,n=e.getAutomationList,a=e.getAutomationRunCount,l=e.automation,c=(e.adddRow,e.getAutomationDetails),h=e.stackId,f=e.createTrigger,I=e.updateTrigger,C=e.createAction,T=e.getScheduleTimeExpectedTriggerTimes,_=e.history,R=e.accessType,k=e.storeActionPreviewResponse,O=e.auth,N=(0,s.useState)(!0),E=de(N,2),L=E[0],M=E[1],D=(0,s.useState)(320),F=de(D,2),W=F[0],P=F[1],G=(0,s.useState)(380),U=de(G,2),J=U[0],B=U[1],H=(0,s.useState)(0),z=de(H,2),Z=z[0],Y=z[1],K=(0,s.useState)(),$=de(K,2),q=$[0],X=$[1],ie=(0,s.useState)("Select Trigger"),se=de(ie,2),le=se[0],ue=se[1],pe=(0,s.useState)({name:"Select Action"}),he=de(pe,2),fe=he[0],ge=he[1],ye=(0,s.useState)([]),ve=de(ye,2),xe=ve[0],Se=ve[1],we=(0,s.useState)([]),be=de(we,2),je=be[0],Ae=be[1],Ie=(0,s.useState)(),Ce=de(Ie,2),Te=(Ce[0],Ce[1],(0,s.useState)()),_e=de(Te,2),Re=_e[0],ke=_e[1],Oe=(0,s.useState)(!1),Ne=de(Oe,2),Ee=Ne[0],Le=Ne[1],Me=(0,s.useState)(null),De=de(Me,2),Fe=De[0],We=De[1],Pe=(0,s.useState)(),Ve=de(Pe,2),Ge=Ve[0],Ue=Ve[1],Je=(0,s.useState)(),Be=de(Je,2),He=Be[0],ze=Be[1],Ze=(0,s.useState)(null),Ye=de(Ze,2),Ke=Ye[0],$e=Ye[1],qe=(0,s.useState)(null),Xe=de(qe,2),Qe=Xe[0],et=Xe[1],tt=(0,s.useState)(null),nt=de(tt,2),it=nt[0],ot=nt[1],at=(0,s.useState)(null),rt=de(at,2),st=rt[0],lt=rt[1],ct=(0,s.useState)({rowData:[],columnSchema:[]}),dt=de(ct,2),ut=dt[0],pt=dt[1],mt=(0,s.useState)(!1),ht=de(mt,2),ft=ht[0],gt=ht[1],yt=(0,s.useState)(),vt=de(yt,2),xt=vt[0],St=vt[1],wt=(0,s.useState)({name:"Select table"}),bt=de(wt,2),jt=bt[0],At=bt[1],It=(0,s.useState)(null),Ct=de(It,2),Tt=Ct[0],_t=Ct[1],Rt=(0,s.useState)(null),kt=de(Rt,2),Ot=kt[0],Nt=kt[1],Et=(0,s.useState)(null),Lt=de(Et,2),Mt=Lt[0],Dt=(Lt[1],(0,s.useState)(null)),Ft=de(Dt,2),Wt=Ft[0],Pt=Ft[1],Vt=(0,s.useState)({}),Gt=de(Vt,2),Ut=Gt[0],Jt=Gt[1],Bt=(0,s.useState)(null),Ht=de(Bt,2),zt=Ht[0],Zt=Ht[1],Yt=(0,s.useState)([]),Kt=de(Yt,2),$t=Kt[0],qt=Kt[1],Xt=(0,s.useState)(!1),Qt=de(Xt,2),en=Qt[0],tn=Qt[1],nn=(0,s.useState)({open:!1,value:""}),on=de(nn,2),an=on[0],rn=on[1],sn=(0,s.useState)({open:!1,value:""}),ln=de(sn,2),cn=ln[0],dn=ln[1],un=(0,s.useState)(null),pn=de(un,2),mn=pn[0],hn=pn[1],fn=(0,s.useState)({isError:!1,message:""}),gn=de(fn,2),yn=gn[0],vn=gn[1],xn=(0,s.useState)(null),Sn=de(xn,2),wn=Sn[0],bn=Sn[1],jn=(0,s.useState)({startAtDate:r()(),every:""}),An=de(jn,2),In=An[0],Cn=An[1],Tn=(0,s.useState)({to:"",subject:"",message:"",cc:"",bcc:"",fromName:"",replyTo:"",attachment:""}
2),_n=de(Tn,2),Rn=_n[0],kn=_n[1],On=(0,s.useState)({messageWithColumnId:"",toWithColumnId:"",subjectWithColumnId:"",ccWithColumnId:"",bccWithColumnId:"",fromNameWithColumnId:"",replyToWithColumnId:"",attechmentWithColumnId:""}),Nn=de(On,2),En=Nn[0],Ln=Nn[1],Mn=(0,s.useState)([]),Dn=de(Mn,2),Fn=Dn[0],Wn=Dn[1],Pn=(0,s.useState)({}),Vn=de(Pn,2),Gn=Vn[0],Un=Vn[1],Jn=(0,s.useState)(1),Bn=de(Jn,2),Hn=Bn[0],zn=Bn[1],Zn=(0,s.useState)(!!xt),Yn=de(Zn,2),Kn=Yn[0],$n=Yn[1],qn=de((0,s.useState)(!!xt),2),Xn=qn[0],Qn=qn[1],ei=de((0,s.useState)(null),2),ti=ei[0],ni=ei[1],ii=de((0,s.useState)(!1),2),oi=ii[0],ai=ii[1],ri=de((0,s.useState)(null),2),si=ri[0],li=ri[1],ci=de((0,s.useState)(null),2),di=ci[0],ui=ci[1],pi=de((0,s.useState)(null),2),mi=pi[0],hi=pi[1],fi=de((0,s.useState)(null),2),gi=fi[0],yi=fi[1],vi=de((0,s.useState)([]),2),xi=vi[0],Si=vi[1],wi=de((0,s.useState)(null),2),bi=wi[0],ji=wi[1],Ai=de((0,s.useState)(null),2),Ii=Ai[0],Ci=Ai[1],Ti=[{name:"When Row is Created",type:"T_CR_ROW"},{name:"When Row is Updated",type:"T_UP_ROW"},{name:"When a Form is Submitted",type:"FR_ROW"},{name:"When a Row enters a View",type:"VM_ROW"},{name:"At Scheduled Time",type:"SD_TIME"},{name:"When a Row Matches Conditions",type:"RW_COND"},{name:"When Webhook Received",type:"WH_RECV"}],_i=[{name:"Minutes",type:"MIN"},{name:"Hours",type:"HR"},{name:"Days",type:"DAY"},{name:"Weeks",type:"WK"},{name:"Months",type:"MON"},{name:"One time",type:"OT"}],Ri=[{key:1,value:"Sun",text:"Sunday"},{key:2,value:"Mon",text:"Monday"},{key:3,value:"Tue",text:"Tuesday"},{key:4,value:"Wed",text:"Wednesday"},{key:5,value:"Thu",text:"Thursday"},{key:6,value:"Fri",text:"Friday"},{key:7,value:"Sat",text:"Saturday"}],ki=[{key:1,value:"1st",text:"1st"},{key:2,value:"2nd",text:"2nd"},{key:3,value:"3rd",text:"3rd"},{key:4,value:"4th",text:"4th"},{key:5,value:"5th",text:"5th"},{key:6,value:"6th",text:"6th"},{key:7,value:"7th",text:"7th"},{key:8,value:"8th",text:"8th"},{key:9,value:"9th",text:"9th"},{key:10,value:"10th",text:"10th"},{key:11,value:"11th",text:"11th"},{key:12,value:"12th",text:"12th"},{key:13,value:"13th",text:"13th"},{key:14,value:"14th",text:"14th"},{key:15,value:"15th",text:"15th"},{key:16,value:"16th",text:"16th"},{key:17,value:"17th",text:"17th"},{key:18,value:"18th",text:"18th"},{key:19,value:"19th",text:"19th"},{key:20,value:"20th",text:"20th"},{key:21,value:"21st",text:"21st"},{key:22,value:"22nd",text:"22nd"},{key:23,value:"23rd",text:"23rd"},{key:24,value:"24th",text:"24th"},{key:25,value:"25th",text:"25th"},{key:26,value:"26th",text:"26th"},{key:27,value:"27th",text:"27th"},{key:28,value:"28th",text:"28th"},{key:29,value:"29th",text:"29th"},{key:30,value:"30th",text:"30th"},{key:31,value:"31st",text:"31st"},{key:"last",value:"Last Day",text:"Last Day"}],Oi={T_CR_ROW:"When Row is Created",T_UP_ROW:"When Row is Updated",FR_ROW:"When a Form is Submitted",VM_ROW:"When a Row enters a View",SD_TIME:"At Scheduled Time",RW_COND:"When a Row Matches Conditions",WH_RECV:"When Webhook Received"},Ni=de((0,s.useState)(!1),2),Ei=Ni[0],Li=Ni[1],Mi=de((0,s.useState)([]),2),Di=Mi[0],Fi=Mi[1],Wi=de((0,s.useState)([]),2),Pi=Wi[0],Vi=Wi[1],Gi=de((0,s.useState)(null),2),Ui=Gi[0],Ji=(Gi[1],de((0,s.useState)(),2)),Bi=Ji[0],Hi=Ji[1],zi=de((0,s.useState)(),2),Zi=zi[0],Yi=zi[1],Ki=de((0,s.useState)(),2),$i=Ki[0],qi=Ki[1],Xi=de((0,s.useState)(),2),Qi=Xi[0],eo=Xi[1],to=de((0,s.useState)([]),2),no=to[0],io=to[1],oo=de((0,s.useState)(!1),2),ao=oo[0],ro=oo[1],so=de((0,s.useState)(!1),2),lo=so[0],co=so[1],uo=de((0,s.useState)(),2),po=uo[0],mo=uo[1],ho=de((0,s.useState)(),2),fo=ho[0],go=ho[1],yo=de((0,s.useState)({}),2),vo=yo[0],xo=yo[1],So=de((0,s.useState)({}),2),wo=So[0],bo=So[1],jo=de((0,s.useState)({}),2),Ao=jo[0],Io=jo[1],Co=de((0,s.useState)([]),2),To=Co[0],_o=Co[1],Ro=de((0,s.useState)(null),2),ko=Ro[0],Oo=Ro[1],No=de((0,s.useState)(100),2),Eo=No[0],Lo=No[1],Mo=de((0,s.useState)(),2),Do=Mo[0],Fo=Mo[1],Wo=de((0,s.useState)(),2),Po=Wo[0],Vo=Wo[1],Go=de((0,s.useState)(),2),Uo=Go[0],Jo=Go[1],Bo=de((0,s.useState)(),2),Ho=Bo[0],zo=Bo[1],Zo=de((0,s.useState)(!1),2),Yo=Zo[0],Ko=Zo[1],$o=de((0,s.use
2State)(),2),qo=$o[0],Xo=$o[1],Qo=de((0,s.useState)({}),2),ea=Qo[0],ta=Qo[1],na=de((0,s.useState)(),2),ia=na[0],oa=na[1],aa=de((0,s.useState)({}),2),ra=aa[0],sa=aa[1],la=de((0,s.useState)(0),2),ca=la[0],da=la[1],ua=de((0,s.useState)(!1),2),pa=ua[0],ma=ua[1],ha=de((0,s.useState)(),2),fa=ha[0],ga=ha[1],ya=de((0,s.useState)({}),2),va=ya[0],xa=ya[1],Sa=de((0,s.useState)({agent:"",model:"",label:"",isWebSearch:!1,temperature:"",apiWorkspaceId:""}),2),wa=Sa[0],ba=Sa[1],ja=de((0,s.useState)({}),2),Aa=ja[0],Ia=ja[1],Ca=de((0,s.useState)({}),2),Ta=Ca[0],_a=Ca[1],Ra=de((0,s.useState)([]),2),ka=Ra[0],Oa=Ra[1],Na=de((0,s.useState)(0),2),Ea=Na[0],La=Na[1],Ma=de((0,s.useState)(null),2),Da=Ma[0],Fa=Ma[1],Wa=![1,2].includes(R);(0,s.useEffect)(function(){l.list&&l.list.length>0&&Fe&&(c(h,Fe),$n(!1))},[Fe]),(0,s.useEffect)(function(){X(t)},[t]),(0,s.useEffect)(function(){n(h).then(function(e){setTimeout(function(){(0,v.Io)(O,"Total Automations added",{$stackId:h,$totalAutomation:l.list.length})},1500)})},[]),(0,s.useEffect)(function(){a(h)},[]);var Pa=function(){var e=ce(re().m(function e(i){var o,a,r;return re().w(function(e){for(;;)switch(e.p=e.n){case 0:return o={},Y(1),o.name="Automation ".concat(xe?xe.length+1:"0"),i&&(o.triggerType=i),xe&&0==xe.length?o.isFirst=1:o.isFirst=0,e.p=1,e.n=2,fetch("/api/v1/eventautomation/".concat(t&&t.stackId,"/create"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});case 2:a=e.v,(0,v.Io)(O,"Automation Action",{action_type:"automation create",stack_id:t.stackId}),200==a.status&&(n(t&&t.stackId),ke({name:"Select table"})),e.n=4;break;case 3:e.p=3,r=e.v,ee.error("Error:",r);case 4:return e.a(2)}},e,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}}();(0,s.useEffect)(function(){if(l.automationSteps){var e=null!=mn?l.automationSteps.find(function(e){return e.id==mn}):l.automationSteps[1],t=null;try{e&&e.config&&(t=JSON.parse(e.config))}catch(e){ee.error("Failed to parse config:",e),t=null}if(t&&e&&"WHATSAPP"==e.actionType&&mn==e.actionId){Vo(t.whatsappActionObj),Fo(t.templateName);var n={templateName:t.templateName,apiConfigId:t.apiConfigId};t.templateName&&(i.A.post("/api/v1/whatsappAction/".concat(h,"/getTemplate"),n).then(function(e){}).catch(function(e){return ee.log(e)}),i.A.post("/api/v1/whatsappAction/".concat(h,"/getFullTemplate"),n).then(function(e){}).catch(function(e){return ee.log(e)}))}else Vo()}},[Fe,mn]),(0,s.useEffect)(function(){if(l.list){var e=l.list;if(e&&e.length>0){var t=e.find(function(e){return e.isSelectAutomation});t&&(Ae(t),We(t.triggeredAutomationId))}Se(e)}var n=l.automationSteps&&l.automationSteps[0];if(n){if(n&&q){var i=q.tableList.find(function(e){return e.tableId===l.automationSteps[0].outPutTableId});ke(i||{name:"Select table"});var o=l.automationSteps&&JSON.parse(l.automationSteps[0].config);if(Ue(n.id),pt({rowData:n.rowData,columnSchema:n.columnSchema}),o&&o.watchingColumns){var a=n.columnSchema&&n.columnSchema.filter(function(e){return o.watchingColumns.includes(e.columnId)});qt(a)}if("trigger"==n.type&&"T_UP_ROW"==n.stepType)ue("When Row is Updated"),o&&St(o.testStepSelectedRow);else if("trigger"==n.type&&"T_CR_ROW"==n.stepType)ue("When Row is Created"),o&&St(o.testStepSelectedRow);else if("FR_ROW"==n.stepType)$e(o&&o.shareId),ue("When a Form is Submitted"),St(o&&o.testStepSelectedRow);else if("VM_ROW"==n.stepType)et(o&&o.viewId),ue("When a Row enters a View"),St(o&&o.testStepSelectedRow);else if("SD_TIME"==n.stepType){var s=JSON.parse(l.automationSteps[0].config);if(ue("At Scheduled Time"),s){var c=_i.find(function(e){return e.name.toLocaleLowerCase()==s.interval});if(bn(c),Cn({startAtDate:r()(s[s.interval]&&s[s.interval].startAtDate),every:s[s.interval]&&s[s.interval].every}),"weeks"==s.interval){var d=Ri.filter(function(e){return s.weeks.weekOn.includes(e.key)});Fi(d)}else if("months"==s.interval){var u=ki.filter(function(e){return s.months.onThe.includes(e.key)});Vi(u)}}}else"RW_COND"==n.stepType?(ue("When a Row Matches Conditions"),o&&(go(o.filters),St(o&&o.testStepSelectedRow))):"WH_RECV"==n.stepType?ue("When Webhook Received"):ue("When Row 
2is Created")}else ue("Select Trigger"),ke({name:"Select table"});if(l&&l.automationSteps){var p=null!=l.lastActionId?l.automationSteps.find(function(e){return e.id==l.lastActionId}):l.automationSteps[1],m=null;try{p&&p.config&&(m=JSON.parse(p.config))}catch(e){ee.error("Failed to parse config:",e),m=null}if(p&&li(p.description),m){var h=m.columnConfiguration?Object.keys(m.columnConfiguration):[];Wn(h),Un(m.columnConfiguration?m.columnConfiguration:{})}if(p&&li(p.description),m){var f=m.columnConfiguration?Object.keys(m.columnConfiguration):[];Wn(f),Un(m.columnConfiguration?m.columnConfiguration:{})}if(m&&m.column){var g=p.columnSchema.find(function(e){return e.columnId==Object.keys(m.column)[0]});_t(g),Zt(m.rowId),Jt(m.column),sa(m.columnCellvalues?m.columnCellvalues:{}),ta(m.column)}else _t(null),Nt(null),Jt({}),sa({}),ta({}),ji(null);if(p&&"UP_ROW"==p.stepType)ge({name:"Update Row"}),ze({name:"Update Row",type:"UP_ROW"}),Pt(p.id);else if(p&&"CR_ROW"==p.stepType)ge({name:"Create Row"}),ze({name:"Create Row",type:"CR_ROW"}),Pt(p.id);else if(p&&"WHATSAPP"==p.stepType)ge({name:"Send WhatsApp Message"}),ze({name:"Send WhatsApp Message",type:"WHATSAPP"}),Pt(p.id),m&&Xo({name:m.apiName,apiConfigId:m.apiConfigId});else if(p&&"FIND_ROW"==p.stepType)ge({name:"Find Row"}),ze({name:"Find Row",type:"FIND_ROW"}),m&&"condition"==m.findOn?qi({name:"Condition",type:"condition"}):qi({name:"View",type:"view"}),Pt(p.id),mo(m&&m.filterData);else if(p&&"S_EMAIL"==p.stepType)ge({name:"Send Email"}),ze({name:"Send Email",type:"S_EMAIL"}),Pt(p.id);else if(p&&"GMAIL"==p.stepType)ge({name:"Gmail: Send email"}),ze({name:"Gmail: Send email",type:"GMAIL"}),Pt(p.id),m&&m.columnCellvalues&&m.columnCellvalues.fromEmailId&&ji({name:m.columnCellvalues.fromEmailId.str});else if(p&&"OUTLOOK"==p.stepType)ge({name:"Outlook: Send email"}),ze({name:"Outlook: Send email",type:"OUTLOOK"}),Pt(p.id),m&&m.columnCellvalues&&m.columnCellvalues.fromEmailId&&ji({name:m.columnCellvalues.fromEmailId.str});else if(p&&"AI_GEN"==p.stepType){var y;if(ge({name:"Generate with AI"}),ze({name:"Generate with AI",type:"AI_GEN"}),Pt(p.id),null!==(y=m)&&void 0!==y&&y.aiActionConfig){var v,x=(null===(v=m)||void 0===v?void 0:v.aiActionConfig)||{};ba(function(e){return oe(oe({},e),x)})}else ba({agent:"",model:"",label:"",isWebSearch:!1,temperature:"",apiWorkspaceId:""})}else if(p&&"JIRA_CREATE_ISSUE"==p.stepType){var S;ge({name:"Jira: Create a new issue"}),ze({name:"Jira: Create a new issue",type:"JIRA_CREATE_ISSUE"}),Pt(p.id),Ia(null===(S=m)||void 0===S?void 0:S.jiraActionConfig),m&&m.columnCellvalues&&m.columnCellvalues.fromEmailId&&(ji({name:m.columnCellvalues.fromEmailId.str}),Ci(m.columnCellvalues.thirdPartyAccountId.str))}else if(p&&"JIRA_UPDATE_ISSUE"==p.stepType){var w;ge({name:"Jira: Update an issue"}),ze({name:"Jira: Update an issue",type:"JIRA_UPDATE_ISSUE"}),Pt(p.id),Ia(null===(w=m)||void 0===w?void 0:w.jiraActionConfig),m&&m.columnCellvalues&&m.columnCellvalues.fromEmailId&&(ji({name:m.columnCellvalues.fromEmailId.str}),Ci(m.columnCellvalues.thirdPartyAccountId.str))}else if(p&&"SORT_LIST"==p.stepType)ge({name:"Sort list"}),ze({name:"Sort list",type:"SORT_LIST"}),m&&m.listOfRecords&&_a(m.listOfRecords),m&&m.sortFields&&Oa(m.sortFields),m&&m.selectedFIndRowAction&&La(m.selectedFIndRowAction),Pt(p.id);else if(p&&"SLACK_SEND_MESSAGE"==p.stepType){var b;ge({name:"Slack: Send a message"}),ze({name:"Slack: Send a message",type:"SLACK_SEND_MESSAGE"}),Pt(p.id),m&&null!==(b=m)&&void 0!==b&&b.channel&&ui(m.channel),m&&m.columnCellvalues&&m.columnCellvalues.slackaccountname&&(ji({name:m.columnCellvalues.slackaccountname.str}),Ci(m.columnCellvalues.thirdPartyAccountId.str))}else if(p&&"MS_TEAMS"==p.stepType){var j;ge({name:"MS Teams: Send a message"}),ze({name:"MS Teams: Send a message",type:"MS_TEAMS"}),Pt(p.id),m&&null!==(j=m)&&void 0!==j&&j.channel&&hi(m.channel),m&&m.columnCellvalues&&m.columnCellvalues.teamsaccountname&&(ji({name:m.columnCellvalues.teamsaccountname.str}),Ci(m.columnCellvalues.thirdPartyAccountId.str))}else if(p&&"COND_GRP"==p.stepType){var A,I;"otherwise"!==(null===(A=m)||void 0===A?void 0:A.conditionType)&&null!==(I=m)&&void 0!==I&&I.executionConditions&&"object"===ne(m.executionConditions)&&0!==Object.keys(m.executionConditions).length?ga(m.executionConditions):ga(null)}if(m&&m.tableId&&q){var C=q.tableList.find(function(e){return e.tableId==m.tableId});At(C)}else At({name:"Select table"})}else ge({name:"Select Action"})}},[l,Fe,Z,mn]);var Va=function(){var e=ce(re().m(function e(i){var o;return re().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,fetch("/api/v1/eventautomation/".concat(t&&t.stackId,"/duplicate"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({triggeredAutomationId:i})});case 1:200==e.v.status&&n(t&&t.stackId),e.n=3;break;case 2:e.p=2,o=e.v,ee.error("Error:",o);case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),Ga=function(){var e=ce(re().m(function e(i){var o,a;return re().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,fetch("/api/v1/eventautomation/".concat(t&&t.stackId,"/delete"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({triggeredAutomationId:i})});case 1:o=e.v,(0,v.Io)(O,"Automation Action",{action_type:"Automation deleted",stack_id:t.stackId,automation_id:i}),200==o.status&&n(t&&t.stackId),e.n=3;break;case 2:e.p=2,a=e.v,ee.error("Error:",a);case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),Ua=function(){var e=ce(re().m(function e(i,o,a,r,s,l){var c;return re().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,fetch("/api/v1/eventautomation/".concat(t&&t.stackId,"/update"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({triggeredAutomationId:o,name:a,description:r})});case 1:200==e.v.status&&n(t&&t.stackId),e.n=3;break;case 2:e.p=2,c=e.v,ee.error("Error:",c);case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t,n,i,o,a,r){return e.apply(this,arguments)}}(),Ja=function(){var e=ce(re().m(function e(i,o){var a;return re().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,fetch("/api/v1/eventautomation/".concat(t&&t.stackId,"/updateDescription"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({triggeredAutomationId:i,description:o})});case 1:200==e.v.status&&n(t&&t.stackId),e.n=3;break;case 2:e.p=2,a=e.v,ee.error("Error:",a);case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t,n){return e.apply(this,arguments)}}(),Ba=function(){var e=ce(re().m(function e(i,o){var a;return re().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,fetch("/api/v1/eventautomation/".concat(t&&t.stackId,"/update"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({triggeredAutomationId:o,isTurnedOn:!1===i?0:1})});case 1:200==e.v.status&&n(t&&t.stackId),e.n=3;break;case 2:e.p=2,a=e.v,ee.error("Error:",a);case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t,n){return e.apply(this,arguments)}}(),Ha=function(){var e=ce(re().m(function e(t){var n;return re().w(function(e){for(;;)switch(e.n){case 0:n={triggerType:t,triggerParams:null},go(),0==l.automationSteps.length?(n.triggeredAutomationId=je.triggeredAutomationId,f(h,n).then(function(e){(0,v.Io)(O,"Automation Action",{action_type:"Trigger create",stack_id:h,automation_id:je.triggeredAutomationId,trigger:Oi[t]})})):(n.triggerId=l.automationSteps[0].id,I(h,n));case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),za=function(){var e=ce(re().m(function e(t){var n,i,o,a,r,s,c,d=arguments;return re().w(function(e){for(;;)if(0===e.n)return i=d.length>2&&void 0!==d[2]?d[2]:null,o=d.length>3&&void 0!==d[3]?d[3]:null,a={},(n=d.length>1&&void 0!==d[1]?d[1]:null)&&(a.dependsOn=n),i&&(r=l.automationSteps.find(function(e){return e.id===i}),s=null!=r&&r.config?JSON.parse(r.config):null,null!=s&&s.actionIdList?te(s.actionIdList):[],a.groupId=i),c={triggeredAutomationId:je.triggeredAutomationId,actionType:t,actionParams:n||i?JSON.stringify(a):null},e.a(2,C(h,c).then(function(e){return(0,v.Io)(O,"Automation Action",{action_type:"Action create",stack_id:h,automation_id:je.triggeredAutomationId,action:Qa(t)}),o&&null!=e&&o(e),e}).catch(function(e){throw o&&o(null),e}))},e)}));return function(t){return e.apply(this,arguments)}}(),Za=function(){var e=null!=mn?l.automationSteps.find(function(e){return e.id==mn}):l.automationSteps[1],t={testType:"dry",triggeredAutomationId:Fe,actionId:e&&e.id,triggerId:Ge},n=[].includes(He&&He.type)?y.LU:i.A,o=[].includes(He&&He.type)?"/tapi/v1/testmultiautomation/":"/api/v1/testmultiautomation/";n.post("".concat(o).concat(h),t).then(function(t){var n="string"==typeof t.data.data?JSON.parse(t.data.data):t.data.data,i=n.actions||{};e&&"COND_GRP"===e.stepType?(lt(i),io(function(t){return t.includes(e.id)?t:[].concat(te(t),[e.id])}),Fa(i[e.id])):(lt(null),ot(i[e.id])),vn({isError:!1,message:n.result});var o={data:n.actions,actionId:e.id,lastSelectedAutomationId:Fe};k(o)}).catch(function(e){lt(null),vn({isError:!0,message:"Something went wrong, please try again"})}),Le(!0),gt(!0)},Ya=function(e){"scheduledTime"==e?Li(!0):ma(!0),T(h,{testType:"run",triggeredAutomationId:Fe,triggerId:Ge},e)},Ka=function(){var e=ce(re().m(function e(){var t,n,o,a;return re().w(function(e){for(;;)switch(e.n){case 0:t=null!=mn?l.automationSteps.find(function(e){return e.id==mn}):l.automationSteps[1],n={testType:"run",triggeredAutomationId:Fe,actionId:t.id,triggerId:Ge},o=[].includes(He&&He.type)?y.LU:i.A,a=[].includes(He&&He.type)?"/tapi/v1/testmultiautomation/":"/api/v1/testmultiautomation/",o.post("".concat(a).concat(h),n).then(function(e){var n="string"==typeof e.data.data?JSON.parse(e.data.data):e.data.data;ot(n.actions[t.id]),vn({isError:!1,message:n.result});var i={data:n.actions,actionId:t.id,lastSelectedAutomationId:Fe};k(i)}).catch(function(e){return ee.log(e)}),gt(!0);case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),$a=(0,s.useRef)(),qa=(0,s.useRef)();(0,s.useEffect)(function(){var e=function(e){$a.current&&!$a.current.contains(e.target)&&qa.current&&!qa.current.contains(e.target)&&(tn(!1),dn(oe(oe({},cn),{},{open:!1})))};return document.body.addEventListener("mousedown",e),function(){return document.body.removeEventListener("mousedown",e)}},[]);var Xa=(0,s.useRef)(null);(0,s.useEffect)(function(){var e=Xa.current;e&&(e.style.height="auto",e.style.height="".concat(e.scrollHeight,"px"),setTimeout(function(){e.focus(),e.selectionStart=e.selectionEnd=cn.value.length},0))},[cn.value]);var Qa=function(e){switch(e){case"CR_ROW":return"Create Row";case"UP_ROW":return"Update Row";case"S_EMAIL":return"Send Email";case"FIND_ROW":return"Find Row";case"WHATSAPP":return"Send WhatsApp Message";case"AI_GEN":return"Generate with AI";case"GMAIL":return"Gmail: Send email";case"OUTLOOK":return"Outlook: Send email";case"JIRA_CREATE_ISSUE":return"Jira: Create a new issue";case"JIRA_UPDATE_ISSUE":return"Jira: Update an issue";case"SORT_LIST":return"Sort list";case"SLACK_SEND_MESSAGE":return"Slack: Send a message";case"MS_TEAMS":return"MS Teams: Send a message";default:return e}},er=(0,s.useMemo)(function(){return!(!(0,o.isEmpty)(Re)&&"Select table"!==Re.name)||(!("When Row 
2is Updated"!==le||!(0,o.isEmpty)($t))||(!("When a Form is Submitted"!==le||!(0,o.isEmpty)(Bi)||!(0,o.isEmpty)(Ke&&To&&To.length>0&&To.find(function(e){return e.shareId==Ke})&&To.find(function(e){return e.shareId==Ke}).name))||(!("When a Row enters a View"!==le||!(0,o.isEmpty)(Bi))||!("When a Row Matches Conditions"!==le||!(0,o.isEmpty)(fo)&&!fo.filterSet.some(function(e){var t=ut.columnSchema.find(function(t){return t.columnId===e.columnId});if(t&&"checkbox"===t.type&&null===e.value||["isEmpty","isNotEmpty","future","past","oneMonthFromNow","oneMonthAgo","thisMonth","oneWeekFromNow","oneWeekAgo","thisWeek","yesterday","tomorrow","today"].includes(e.operator))return!1;var n=(0,o.isNumber)(e.value)||(0,o.isBoolean)(e.value)?e.value.toString():e.value;return(0,o.isEmpty)(n)})))))},[Re,$t,le,Bi,Ke,To,fo]),tr=(0,s.useMemo)(function(){return!!(0,o.isEmpty)(wn)||(!(!wn||"Minutes"!==wn.name||!(0,o.isEmpty)(In.every))||(!(!wn||"Hours"!==wn.name||!(0,o.isEmpty)(In.every))||(!(!wn||"Days"!==wn.name||!(0,o.isEmpty)(In.every)&&!(0,o.isEmpty)(In.startAtDate))||(!(!wn||"Weeks"!==wn.name||!((0,o.isEmpty)(In.every)||(0,o.isEmpty)(In.startAtDate)||(0,o.isEmpty)(Di)))||!(!wn||"Months"!==wn.name||!((0,o.isEmpty)(In.every)||(0,o.isEmpty)(In.startAtDate)||(0,o.isEmpty)(Pi)))))))},[wn,In,Di,Pi]),nr=Object.keys(Ut),ir=Zi&&zt&&Zi.find(function(e){return e.key==zt||zt.key});ir=ir?ir.value:"Select Row";var or=(0,s.useMemo)(function(){if("Create Row"===fe.name&&((0,o.isEmpty)(jt)||"Select table"===jt.name||(0,o.isEmpty)(nr)))return!0;if("Update Row"===fe.name&&((0,o.isEmpty)(jt)||"Select table"===jt.name||(0,o.isEmpty)(nr)||(0,o.isEmpty)(ir)||"Select Row"===ir))return!0;if("Send Email"===fe.name&&((0,o.isEmpty)(Rn.to)||(0,o.isEmpty)(Rn.subject)||(0,o.isEmpty)(Rn.message)))return!0;if("Find Row"===fe.name){if((0,o.isEmpty)(jt)||"Select table"===jt.name)return!0;if((0,o.isEmpty)($i)||"Select search type"===$i.name)return!0;if("View"===$i.name&&(0,o.isEmpty)(Qi))return!0;if("Condition"===$i.name&&(0,o.isEmpty)(po)||po&&po.filterSet.some(function(e){var t=ut.columnSchema.find(function(t){return t.columnId===e.columnId});if(t&&"checkbox"===t.type&&null===e.value||["isEmpty","isNotEmpty","future","past","oneMonthFromNow","oneMonthAgo","thisMonth","oneWeekFromNow","oneWeekAgo","thisWeek","yesterday","tomorrow","today"].includes(e.operator))return!1;var n=(0,o.isNumber)(e.value)||(0,o.isBoolean)(e.value)?e.value.toString():e.value;return(0,o.isEmpty)(n)}))return!0;if(Eo<1||Eo>100)return!0}if("Send WhatsApp Message"===fe.name){if(qo&&(0,o.isEmpty)(qo.name))return!0;if((0,o.isEmpty)(Do))return!0;if((0,o.isEmpty)(Po)||(0,o.isEmpty)(Po.mobileNoToShow))return!0}return!1},[jt,nr,fe,ir,$i,Qi,Eo,qo,Do,Po]),ar=(0,s.useMemo)(function(){var e=l&&l.details&&l.details[Fe]&&l.details[Fe].action&&l.details[Fe].action||[],t=l&&l.details&&l.details[Fe]&&l.details[Fe].action&&l.details[Fe].trigger;return!(e.length>0&&t)||("Select Trigger"===le||("At Scheduled Time"===le?or||tr:or||er))},[l,or,le,tr,er]),rr=!!(l&&l.automationSteps&&l.automationSteps.length>=2||1===je.isTurnedOn);return(0,V.jsxs)("div",{children:[(0,V.jsxs)("div",{id:"TitleBar xyz",className:"d_flex",style:{padding:"0px",height:"46px",borderBottom:"1px solid #cccccc",position:"relative"},children:[(0,V.jsx)("div",{className:"d_flex justify_center",style:{paddingLeft:"7px"},children:(0,V.jsx)("div",{className:"header_button",style:{width:W-7+"px",borderRight:L?"1px solid #ccc":"none",height:"46px"},children:(0,V.jsxs)("button",{className:"button_auto automationlist_button_header ".concat(L&&"button_select"),onClick:function(){M(!L)},children:[(0,V.jsx)(p.A,{style:{color:"black",fontSize:"15px"},name:"bars"}),(0,V.jsxs)("div",{children:["Automation List (",xe?xe.length:null,")"]})]})})}),je&&(0,V.jsxs)("div",{className:"d_flex justify_sb gap_10  align_center",style:{paddingRight:"5px",borderRight:"1px solid rgb(204, 204, 204)",width:"calc(100% - ".concat(0===Z?W-3:W+J-3,"px)"),minWidth:"411px",height:"46px"},children:[(0,V.jsxs)("div",{className:"d_flex align_center justify_sb gap_10",style:{pointerEvents:Wa?"none":""},children:[(0,V.jsx)(m.A,{className:"custom-popup",trigger:(0,V.jsx)("div",{className:"auto_header_toggle",children:(0,V.jsx)(g.A,{onChange:function(e){Ba(e,je.triggeredAutomationId)},checked:!(!je||1!==je.isTurnedOn),disabled:!rr})}),content:(0,V.jsx)("div",{style:{color:"white",backgroundColor:"black"},children:je&&1===je.isTurnedOn?"The automation is currently active":rr?"The automation is currently inactive":"Finish setting up this automation to switch it on"}),style:{borderRadius:"6px",background:"#000000",padding:"5px"},size:"tiny",flowing:!0,hoverable:!0,position:"bottom center"}),(0,V.jsxs)("div",{style:{display:"grid"}
2,children:[an&&1==an.open?(0,V.jsx)("input",{className:"automationRenameHeaderInput",type:"text",value:an.value,onChange:function(e){rn({open:!0,value:e.target.value})},onBlur:function(){Ua(je.viewId,je.triggeredAutomationId,an.value,je.description,je.tableId,je.isTurnedOn),rn({open:!1,value:""})},onKeyPress:function(e){"Enter"===e.key&&e.target.blur()},autoFocus:!0}):(0,V.jsx)(m.A,{className:"custom-popup",trigger:(0,V.jsx)("div",{style:{cursor:"pointer"},ref:$a,onClick:function(){tn(!en)},children:(0,V.jsxs)("div",{className:"d_flex justify_sb align_center",children:[(0,V.jsx)("div",{onDoubleClick:function(){rn({open:!0,value:je.name}),tn(!1)},style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block",maxWidth:"150px",fontWeight:"500"},children:je&&je.stackId==h&&je.name}),je&&je.stackId==h&&je.name&&(0,V.jsxs)("div",{style:{marginLeft:"5px"},children:[(0,V.jsx)(p.A,{style:{color:"black",fontSize:"15px",marginRight:"0px",opacity:"0.5",marginBottom:"3px"},name:"info circle"}),(0,V.jsx)(p.A,{style:{color:"black",fontSize:"15px",marginRight:"0px",opacity:"0.5",marginBottom:"3px"},className:"".concat(en&&0==an.open?"rotate_icon":"rotate_icon_first"),name:"angle down"})]})]})}),content:(0,V.jsxs)("div",{style:{color:"white",backgroundColor:"black",maxWidth:"200px",wordWrap:"break-word"},children:[(0,V.jsx)("div",{children:je&&je.stackId==h&&je.name}),(0,V.jsx)("div",{style:{marginTop:"8px"},children:je.description?je.description:"Add a description"})]}),style:{borderRadius:"6px",background:"#000000",padding:"5px"},size:"tiny",flowing:!0,hoverable:!0,position:"bottom center"}),(0,V.jsx)("div",{ref:qa,className:"header_drop_data ".concat(en&&0==an.open?"dropdown_block":"dropdown_none"),children:(0,V.jsxs)("div",{style:{padding:"0px"},children:[(0,V.jsxs)("div",{className:"p_11 dropdownlist",onClick:function(){tn(!1),rn({open:!0,value:je.name})},children:[(0,V.jsx)("span",{style:{marginRight:"0.5rem"},children:(0,V.jsx)(p.A,{style:{color:"black",fontSize:"15px"},name:"pencil"})}),"Rename automation"]}),(0,V.jsxs)("div",{className:"p_11 dropdownlist",onClick:function(){tn(!1),dn({open:!0,value:je.description})},children:[(0,V.jsx)("span",{style:{marginRight:"0.5rem"},children:(0,V.jsx)(p.A,{style:{color:"black",fontSize:"15px"},name:"info circle"})}),"Edit description"]}),(0,V.jsxs)("div",{className:"p_11 dropdownlist",onClick:function(){tn(!1),navigator.clipboard&&navigator.clipboard.writeText(window.location.href).then(function(){(0,u.oR)("Automation link copied",me)},function(e){ee.error("Failed to copy: ",e),u.oR.error("Failed to copy URL",me)})},children:[(0,V.jsx)("span",{style:{marginRight:"0.5rem"},children:(0,V.jsx)(p.A,{style:{color:"black",fontSize:"15px"},name:"clipboard"})}),"Copy automation URL"]}),(0,V.jsxs)("div",{className:"p_11 dropdownlist",onClick:function(){tn(!1),Va(je.triggeredAutomationId)},children:[(0,V.jsx)("span",{style:{marginRight:"0.5rem"},children:(0,V.jsx)(p.A,{style:{color:"black",fontSize:"15px"},name:"copy"})}),"Duplicate automation"]}),(0,V.jsxs)("div",{className:"p_11 dropdownlist",onClick:function(){1!==je.isTurnedOn&&(Ga(je.triggeredAutomationId),tn(!1),Y(0),B(380))},children:[(0,V.jsx)("span",{style:{marginRight:"0.5rem"},children:(0,V.jsx)(p.A,{style:{color:"black",fontSize:"15px",opacity:je.isTurnedOn?.5:1},name:"trash"})}),(0,V.jsx)("span",{style:{color:"red",opacity:je.isTurnedOn?.5:1},children:"Delete automation"})]})]})}),cn&&cn.open&&(0,V.jsxs)("div",{ref:qa,className:"addDescriptionModal",children:[(0,V.jsx)("div",{style:{width:"100%",position:"relative",marginBottom:"0.5rem"},children:(0,V.jsx)("textarea",{ref:Xa,className:"descriptionInput",rows:"1",autoFocus:!0,placeholder:"Add a description",value:cn.value,onChange:function(e){dn({open:!0,value:e.target.value})}})}),(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"},children:[(0,V.jsx)("button",{className:"addDescriptionCancelButton",onClick:function(){dn({open:!1,value:""})},children:"Cancel"}),(0,V.jsx)("button",{className:"addDescriptionSaveButton",onClick:function(){Ja(je.triggeredAutomationId,cn.value),dn({open:!1,value:""})},children:"Save Description"})]})]})]})]}),(0,V.jsxs)("div",{className:"d_flex",style:{marginRight:".5rem",gap:"8px"},children:[(0,V.jsxs)("div",{className:"header_button_run",onClick:function(){Y(3)},style:{color:3===Z?"rgb(13, 82, 172)":"#414141",backgroundColor:3===Z?"rgb(160, 198, 255)":"#fff",height:"31px"},children:[(0,V.jsx)("span",{children:(0,V.jsx)(p.A,{name:"list ul"})}),"Run History"]}),(0,V.jsxs)("div",{className:"header_button_run",onClick:function(){ar||Y(4)},style:{color:"".concat(4===Z?"rgb(13, 82, 172)":"#414141"),backgroundColor:"".concat(4===Z?"rgb(160, 198, 255)":"#fff"),height:"31px",opacity:ar?.5:void 0,pointerEvents:ar?"n
2one":void 0},children:[(0,V.jsx)("span",{children:(0,V.jsx)(p.A,{name:"flask"})}),"Test Automation"]})]})]}),1===Z&&(0,V.jsxs)("div",{style:{padding:"0px 7px",width:J+"px"},className:"d_flex justify_sb align_center",children:[(0,V.jsx)("div",{children:"Properties"}),(0,V.jsx)("div",{style:{cursor:"pointer"},onClick:function(){Y(0),B(380)},children:(0,V.jsx)(p.A,{style:{color:"black",fontSize:"19px",marginRight:"0px",opacity:"0.5"},name:"close"})})]}),2===Z&&(0,V.jsxs)("div",{style:{padding:"0px 7px",width:J+"px"},className:"d_flex justify_sb align_center",children:[(0,V.jsx)("div",{children:"Properties"}),(0,V.jsx)("div",{style:{cursor:"pointer"},onClick:function(){Y(0),B(380)},children:(0,V.jsx)(p.A,{style:{color:"black",fontSize:"19px",marginRight:"0px",opacity:"0.5"},name:"close"})})]}),3===Z&&(0,V.jsxs)("div",{style:{padding:"0px 7px",width:J+"px"},className:"d_flex justify_sb align_center",children:[(0,V.jsx)("div",{children:"Run History"}),(0,V.jsx)("div",{style:{cursor:"pointer"},onClick:function(){Y(0),B(380)},children:(0,V.jsx)(p.A,{style:{color:"black",fontSize:"19px",marginRight:"0px",opacity:"0.5"},name:"close"})})]}),4===Z&&(0,V.jsxs)("div",{style:{padding:"0px 7px",width:J+"px"},className:"d_flex justify_sb align_center",children:[(0,V.jsx)("div",{children:"Test Automation"}),(0,V.jsx)("div",{style:{cursor:"pointer"},onClick:function(){Y(0),B(380)},children:(0,V.jsx)(p.A,{style:{color:"black",fontSize:"19px",marginRight:"0px",opacity:"0.5"},name:"close"})})]}),5===Z&&(0,V.jsxs)("div",{style:{padding:"0px 7px",width:J+"px"},className:"d_flex justify_sb align_center",children:[(0,V.jsx)("div",{children:"Properties"}),(0,V.jsx)("div",{style:{cursor:"pointer"},onClick:function(){Y(0),B(380)},children:(0,V.jsx)(p.A,{style:{color:"black",fontSize:"19px",marginRight:"0px",opacity:"0.5"},name:"close"})})]})]}),(0,V.jsxs)("div",{style:{display:"flex",backgroundColor:"#f2f2f2"}
2,children:[(0,V.jsxs)("div",{className:"sidebar-container ".concat(L?"open":"closed"),style:{height:"calc(100% - 88px)",minWidth:W+"px",left:L?"0":"-".concat(W,"px")},children:[L&&(0,V.jsx)(w.A,{rndWidth:W,stackId:t&&t.stackId,triggerTypes:Ti,DeleteAutomation:Ga,UpdateAutomation:Ua,automationdata:xe&&xe,setAutomationData:Se,createNewAutomation:Pa,setAutomationActive:Ae,automationActive:je&&je,lastSelectedAutomationId:Fe,setActive:Y,setTrigger:ue,automationCreateLimit:ko,setAutomationCreateLimit:Oo,history:_,openPricingModel:Yo,setOpenPricingModel:Ko,handleDuplicateAutomation:Va,isReadOnly:Wa,accessType:R}),(0,V.jsx)(d.p,{minWidth:1,maxWidth:320,minHeight:"100%",size:{width:"1px"},style:{marginLeft:W+"px"},enableResizing:{right:!0},onResize:function(e,t,n,i,o){P(n.offsetWidth+320)}})]}),L?(0,V.jsx)("div",{style:{backgroundColor:"#f2f2f2",width:"calc(100% - ".concat(L?W:0,"px - ").concat(0===Z?0:J,"px)"),minWidth:"410px",marginLeft:L?"".concat(W,"px"):"0px",transition:"margin-left 0.4s ease-in-out"},children:(0,V.jsx)("div",{children:(0,V.jsx)(Q,{tableName:Re,active:Z,selectedAutomationTriggerActionData:Mt,lastSelectedAutomationId:Fe,setActive:Y,trigger:le,CreateActionFunction:za,triggerTypes:Ti,createNewAutomation:Pa,setRightWidth:B,stackId:h,lastActionIdState:mn,setLastActionIdState:hn,setTrigger:ue,currentActionType:He,setCurrentActionType:ze,triggeredTableColumnsAndRows:ut,updateTriggerChoosedRowId:xt,triggerID:Ge,watchingFiledValue:$t,formShareId:Ke,selectedViewId:Qe,buttonType:Hn,setButtonType:zn,setResultData:$n,setShowResult:Qn,openTestStepModal:ti,setOpenTestStepModal:ni,testStep:oi,setTestStep:ai,handleGeneratePreview:Za,handleRunConfig:Ka,isValidForAction:or,selectedView:Bi,IntervalType:wn,scheduleTimeStates:In,selectedWeekDays:Di,selectedMonthDays:Pi,actionPreviewObj:it,lastId:no,setLastId:io,setShowFindRecordResult:co,viewsData:To,setViewsData:_o,recordMatchConditionTriggerFilter:fo,MaximumRowLimit:Eo,isReadOnly:Wa,setSelectedView:Hi,handleActionNameLabel:Qa,triggerTitle:Oi,openPricingModel:Yo,setOpenPricingModel:Ko,history:_,setCenterSelectedActionIndex:da,CreateTrigger:Ha,centerSelectedActionIndex:ca,setColumnCellvalues:sa,conditionGroupFilter:fa,setConditionGroupFilter:ga,selectedConditionForFilter:gi,setSelectedConditionForFilter:yi,allAutomationSteps:xi,setAllAutomationSteps:Si,accessType:R})})}):(0,V.jsx)("div",{style:{backgroundColor:"#f2f2f2",width:"calc(100% - ".concat(0===Z?0:0+J,"px )"),minWidth:"410px"},children:(0,V.jsx)("div",{children:(0,V.jsx)(Q,{tableName:Re,active:Z,setRightWidth:B,selectedAutomationTriggerActionData:Mt,lastSelectedAutomationId:Fe,setActive:Y,trigger:le,CreateActionFunction:za,triggerTypes:Ti,createNewAutomation:Pa,stackId:h,lastActionIdState:mn,setLastActionIdState:hn,setTrigger:ue,currentActionType:He,setCurrentActionType:ze,triggeredTableColumnsAndRows:ut,updateTriggerChoosedRowId:xt,triggerID:Ge,watchingFiledValue:$t,formShareId:Ke,selectedViewId:Qe,buttonType:Hn,setButtonType:zn,setResultData:$n,setShowResult:Qn,openTestStepModal:ti,setOpenTestStepModal:ni,testStep:oi,setTestStep:ai,handleGeneratePreview:Za,handleRunConfig:Ka,isValidForAction:or,selectedView:Bi,IntervalType:wn,scheduleTimeStates:In,selectedWeekDays:Di,selectedMonthDays:Pi,actionPreviewObj:it,lastId:no,setLastId:io,setShowFindRecordResult:co,viewsData:To,setViewsData:_o,recordMatchConditionTriggerFilter:fo,MaximumRowLimit:Eo,isReadOnly:Wa,handleActionNameLabel:Qa,triggerTitle:Oi,openPricingModel:Yo,setOpenPricingModel:Ko,history:_,setCenterSelectedActionIndex:da,CreateTrigger:Ha,centerSelectedActionIndex:ca,setColumnCellvalues:sa,conditionGroupFilter:fa,setConditionGroupFilter:ga,selectedConditionForFilter:gi,setSelectedConditionForFilter:yi,allAutomationSteps:xi,setAllAutomationSteps:Si})})}),1===Z?(0,V.jsx)("div",{className:"right-sidebar",style:{height:"calc(100% - 88px)",width:J+"px","--rightWidth":J+"px"},children:(0,V.jsx)(A.A,{rightWidth:J,setRightWidth:B,setActive:Y,tableList:q&&q.tableList,trigger:le,setTrigger:ue,stackId:h,CreateTrigger:Ha,tableName:Re,setTableName:ke,triggerID:Ge,setTriggerID:Ue,triggeredTableColumnsAndRows:ut,formShareId:Ke,setFormShareId:$e,selectedViewId:Qe,setSelectedViewId:et,updateTriggerChoosedRowId:xt,setUpdateTriggerChoosedRowId:St,wat
2chingFiledValue:$t,setWatchingFiledValue:qt,isPreviewError:yn,triggerTypes:Ti,IntervalType:wn,IntervalTypesArr:_i,setIntervalType:bn,scheduleTimeStates:In,setScheduleTimeStates:Cn,handleTestTrigger:Ya,showScheduleTimeData:Ei,selectedWeekDays:Di,setSelectedWeekDays:Fi,selectedMonthDays:Pi,setSelectedMonthDays:Vi,IntervalTriggerWeekDaysOptions:Ri,IntervalTriggerDaysDateOptions:ki,IntervalTriggerMonthsOptions:[{key:1,value:"1",text:"1"},{key:2,value:"2",text:"2"},{key:3,value:"3",text:"3"},{key:4,value:"4",text:"4"},{key:5,value:"5",text:"5"},{key:6,value:"6",text:"6"},{key:7,value:"7",text:"7"},{key:8,value:"8",text:"8"},{key:9,value:"9",text:"9"},{key:10,value:"10",text:"10"},{key:11,value:"11",text:"11"},{key:12,value:"12",text:"12"}],scheduleTriggerPreviewObj:Ui,setShowScheduleTimeData:Li,resultData:Kn,setResultData:$n,showResult:Xn,setShowResult:Qn,selectedView:Bi,setSelectedView:Hi,isValid:er,isValidForTime:tr,setRecordMatchConditionTriggerFilter:go,recordMatchConditionTriggerFilter:fo,viewsData:To,setViewsData:_o,isReadOnly:Wa,showWebHookData:pa})}):"",2===Z?(0,V.jsx)("div",{className:"right-sidebar",style:{height:"calc(100% - 88px)",width:J+"px","--rightWidth":J+"px"},children:(0,V.jsx)(x.A,{selectedViewId:Qe,formShareId:Ke,watchingFiledValue:$t,tableName:Re,rightWidth:J,setRightWidth:B,setActive:Y,actionSet:fe,setActionSet:ge,tableList:q&&q.tableList,stackId:h,handleRunConfig:Ka,handleGeneratePreview:Za,showResultAction:Ee,CreateActionFunction:za,currentActionType:He,setCurrentActionType:ze,triggeredTable:Re,lastSelectedAutomationId:Fe,triggeredTableColumnsAndRows:ut,actionPreviewObj:it,showPreviewModal:ft,setShowPreviewModal:gt,actionTableName:jt,setActionTableName:At,selectFilled:Tt,setSelectFilled:_t,secondFilled:Ot,setSecondFilled:Nt,actionID:Wt,setActionID:Pt,newArrForMultipleColumn:Ut,setNewArrForMultipleColumn:Jt,selectRow:zt,setSelectRow:Zt,lastActionIdState:mn,isPreviewError:yn,updateTriggerChoosedRowId:xt,trigger:le,triggerID:Ge,emailObj:Rn,setEmailObj:kn,emailObjWithColumnId:En,setEmailObjWithColumnId:Ln,staticSelectedColumnIds:Fn,setStaticSelectedColumnIds:Wn,buttonType:Hn,setButtonType:zn,testStep:oi,setTestStep:ai,staticDynamicColumnType:Gn,setStaticDynamicColumnType:Un,rowIds:Zi,setRowIds:Yi,options:nr,selectedRowValue:ir,isValidForAction:or,findRowActionSearchType:$i,setFindRowActionSearchType:qi,FindRowBasedOnOptions:[{name:"Condition",type:"condition"},{name:"View",type:"view"}],findRowActionSelectedView:Qi,setFindRowActionSelectedView:eo,lastId:no,setLastId:io,resultForFindRecord:ao,setResultForFindRecord:ro,showFindRecordResult:lo,setShowFindRecordResult:co,updateFilters:po,setUpdateFilters:mo,createActionColumnsObj:vo,setCreateActionColumnsObj:xo,createActionColumnsObjWithColumnId:wo,setCreateActionColumnsObjWithColumnId:bo,currentEditableColumnForCreateAction:Ao,setCurrentEditableColumnForCreateAction:Io,handleColumnWithColumnIdForEmail:function(e,t){if(e){for(var n in t){var i=t[n].name.replace(/[.*+?^$()|[\]\\]/g,"\\$&");switch(t[n].type){case"select":case"multiSelect":e=e.replace(new RegExp("{".concat(i,"}"),"gi"),"{".concat(t[n].columnId,".label}"));break;case"collaborator":case"multiCollaborator":case"createdby":case"updatedby":e=e.replace(new RegExp("{".concat(i,"}"),"gi"),"{".concat(t[n].columnId,".name}"));break;case"multipleAttachment":e=e.replace(new RegExp("{".concat(i,"}"),"gi"),"{".concat(t[n].columnId,".fileUrl}"));break;case"progress":e=e.replace(new RegExp("{".concat(i,"}"),"gi"),"{".concat(t[n].columnId,".totalTask}"));break;case"location":e=e.replace(new RegExp("{".concat(i,"}"),"gi"),"{".concat(t[n].columnId,".lat}"));break;case"date":e=e.replace(new RegExp("{".concat(i,"}"),"gi"),"{".concat(t[n].columnId,".date}"));break;case"link":case"lookup":e=e.replace(new RegExp("{".concat(i,"}"),"gi"),"{".concat(t[n].columnId,".foreignRowDisplayName}"));break;default:e=e.replace(new RegExp("{".concat(i,"}"),"gi"),"{".concat(t[n].columnId,"}"))}}return e}},MaximumRowLimit:Eo,setMaximumRowLimit:Lo,whatsappSelectedTemplateName:Do,setWhatsappSelectedTemplateName:Fo,whatsappActionObj:Po,setWhatsappActionObj:Vo,wpValueSelectionModelOpenAt:Uo,setWpValueSelectionModelOpenAt:Jo,wpBodyOptionIndex:Ho,setWpBodyOptionIndex:zo,openPricingModel:Yo,setOpenPricingModel:Ko,history:_,isReadOnly:Wa,selectedWpIntegratedApi:qo,setSelectedWpIntegratedApi:Xo,actionDescription:si,setActionDescription:li,newArrForMultipleColumnToSendApi:ea,setNewArrForMultipleColumnToSendApi:ta,handleStrWithColumnId:function(e,t,n){var i=e.originalStr,o=e.originalStr,a=n?e.str:e.originalStr,r=i.match(/\d+\.\{List of rows\}/g),s=i.match(/\d+\.\{Grid of rows\}/g);for(var l in t){var c=t[l];for(var d in c){var u=i.match("{".concat(c[d].name,"}"));if(u){var p=new RegExp("".concat(l,".").concat(u[0]).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g");switch(c[d].type){case"select":case"multiSelect":a=a.replace(p,"##@@".concat(c[d].columnId,".").concat(l,".label.lowercase##@@"));break;case"collaborator":case"multiCollaborator":case"createdby":case"updatedby":a=a.replace(p,"##@@".concat(c[d].columnId,".").concat(l,".userid.lowercase##@@"));break;case"multipleAttachment":a=a.replace(p,"##@@".concat(c[d].columnId,".").concat(l,".fileUrl.lowercase##@@"));break;case"progress":a=a.replace(p,"##@@".concat(c[d].columnId,".").concat(l,".totalTask.lowercase##@@"));break;case"location":a=a.replace(p,"##@@".concat(c[d].columnId,".").concat(l,".lat.lowercase##@@"));break;case"date":a=a.replace(p,"##@@".concat(c[d].columnId,".").concat(l,".date.lowercase##@@"));break;case"link":case"lookup":a=a.replace(p,"##@@".concat(c[d].columnId,".").concat(l,".foreignRowDisplayName.lowercase##@@"));break;default:a=a.replace(p,"##@@".concat(c[d].columnId,".").concat(l,".lowercase##@@"))}
2o=o.replace("".concat(l,".{").concat(c[d].name,"}"),"{".concat(c[d].name,"}"))}}}if(r&&r.length>0){xa(oe(oe({},va),{},ae({},ia,{list:r})));for(var m=0;m<r.length;m++){var h=r[m].split(".")[0];a=a.replace(r[m],"##@@list[".concat(m,"].").concat(h,"##@@")),o=o.replace(r[m],"{List of rows}")}}if(s&&s.length>0){xa(oe(oe({},va),{},ae({},ia,{grid:s})));for(var f=0;f<s.length;f++){var g=s[f].split(".")[0];a=a.replace(s[f],"##@@grid[".concat(f,"].").concat(g,"##@@")),o=o.replace(s[f],"{Grid of rows}")}}return a=function(e){return e.replace(/(\d+)\.\{([^}]+)\}/g,function(e,t,n){return"AI_GENERATED_ACTION_DATA"===n.trim()?"##@@".concat(n,".").concat(t,".lowercase##@@"):e})}(a),oe(oe({},e),{},{str:a,strWithSteps:o,originalStr:i})},selectTriggerColumnDropdownOpenAt:ia,setSelectTriggerColumnDropdownOpenAt:oa,triggerTitle:Oi,columnCellvalues:ra,setColumnCellvalues:sa,centerSelectedActionIndex:ca,setCenterSelectedActionIndex:da,setLastActionIdState:hn,manageListAndGridRecordIndexes:va,setManageListAndGridRecordIndexes:xa,selectGmailAccountDropdownValue:bi,setSelectGmailAccountDropdownValue:ji,aiActionConfig:wa,setAiActionConfig:ba,selectconnectedAccountId:Ii,jiraActionConfig:Aa,setJiraActionConfig:Ia,listOfRecords:Ta,setListOfRecords:_a,sortingList:ka,setSortingList:Oa,selectedFIndRowAction:Ea,setSelectedFIndRowAction:La,selectedSlackChannel:di,setSelectedSlackChannel:ui,selectedTeamsChannel:mi,setSelectedTeamsChannel:hi},mn)}):"",3===Z?(0,V.jsx)("div",{style:{height:"calc(100% - 88px)",width:J+"px"},children:(0,V.jsx)(S.A,{rightWidth:J,setRightWidth:B,triggerTypes:Ti,currentActionType:He,tableName:Re,actionTableName:jt,lastSelectedAutomationId:Fe,stackId:h,isReadOnly:Wa,handleActionNameLabel:Qa,options:nr,actionPreviewObj:it})}):"",4===Z?(0,V.jsx)("div",{style:{height:"calc(100% - 88px)",width:J+"px"},children:(0,V.jsx)(b.A,{rightWidth:J,setRightWidth:B,triggeredTableColumnsAndRows:ut,updateTriggerChoosedRowId:xt,setUpdateTriggerChoosedRowId:St,watchingFiledValue:$t,trigger:le,triggerID:Ge,formShareId:Ke,selectedViewId:Qe,stackId:h,handleRunConfig:Ka,isReadOnly:Wa})}):"",5===Z?(0,V.jsx)("div",{style:{height:"calc(100% - 88px)",width:J+"px"},children:(0,V.jsx)(j.A,{rightWidth:J,setRightWidth:B,stackId:h,tableName:Re,triggerID:Ge,setTriggerID:Ue,triggeredTableColumnsAndRows:ut,formShareId:Ke,setFormShareId:$e,selectedViewId:Qe,setSelectedViewId:et,updateTriggerChoosedRowId:xt,setUpdateTriggerChoosedRowId:St,watchingFiledValue:$t,setWatchingFiledValue:qt,isPreviewError:yn,triggerTypes:Ti,IntervalType:wn,IntervalTypesArr:_i,setIntervalType:bn,scheduleTimeStates:In,setScheduleTimeStates:Cn,handleTestTrigger:Ya,showScheduleTimeData:Ei,scheduleTriggerPreviewObj:Ui,setShowScheduleTimeData:Li,resultData:Kn,setResultData:$n,showResult:Xn,setShowResult:Qn,selectedView:Bi,setSelectedView:Hi,isValid:er,isValidForTime:tr,setConditionGroupFilter:ga,conditionGroupFilter:fa,viewsData:To,setViewsData:_o,isReadOnly:Wa,showWebHookData:pa,selectedConditionForFilter:gi,setSelectedConditionForFilter:yi,allAutomationSteps:xi,setAllAutomationSteps:Si,handleGeneratePreview:Za,actionPreviewAllActions:st,showResultAction:Ee,setShowResultAction:Le,lastActionIdState:mn,handleActionNameLabel:Qa,conditionalPreviewObj:Da})}):""]})]})})},44153:(e,t,n)=>{e.exports=n.p+"assets/dbf8a9ce1243a566a0d0.jpg"},59641:(e,t,n)=>{n.d(t,{X:()=>r});var i=n(2543),o=n(95093),a=n.n(o);function r(e,t,n){if(null==e)return null!=t?String(t):"";var o=e.typeOptions,r=e.type,s=t;if(["progress"].includes(r))return"";if(o&&"string"==typeof o)try{o=JSON.parse(o)||{}}catch(e){o={}}o=o||{};try{s=s&&"string"==typeof s?JSON.parse(s):s}catch(e){}if("lookup"===r&&o.foreignColumnType){if(["email","url","text","multilineText","multipleAttachment","select","multiSelect","multiCollaborator","collaborator","createdby","updatedby"].includes(o.foreignColumnType)){r=o.foreignColumnType;try{s=s&&"string"==typeof s?JSON.parse(s):s}catch(e){}return s&&Array.isArray(s)?(s=s.filter(function(e){return""!==e.foreignRowDisplayName}).map(function(e){return e.foreignRowDisplayName}),s="multipleAttachment"===r||["select","multiSelect","multiCollaborator","collaborator"].includes(r)?s:s.join(", "),["multiCollaborator","collaborator"].includes(r),Array.isArray(s)?s.join(", "):null!=s?s:""):""}if("formula"===o.foreignColumnType){var l=o,c=l.formulaText,d=l.dateFormat,u=l.isDateTime,p=l.timeFormat;
2if("CREATED_TIME"===c||"UPDATED_TIME"===c){try{s=s&&"string"==typeof s?JSON.parse(s):s}catch(e){}s&&Array.isArray(s)&&(s=s.filter(function(e){return""!==e.foreignRowDisplayName}).map(function(e){return e.foreignRowDisplayName}).join(", "));var m=d+(u&&"12"===p?" hh:mm A":u&&"24"===p?" HH:mm":"");return(s&&String(s).split(",")||[]).map(function(e){return a()(e).format(m)}).join(", ")}}}switch(r){case"select":case"multiSelect":try{s=s&&"string"==typeof s?JSON.parse(s):s}catch(e){}var h=o.choices||[],f=(Array.isArray(s)?s:s?[s]:[]).map(function(e){var t=h.find(function(t){return t.id===e||t.value===e||t.label===e});return t?t.label:e}).filter(Boolean);return f.length?f.join(", "):null!=s?String(s):"";case"lookup":var g=(s&&Array.isArray(s)?s:[]).map(function(e){return e&&e.foreignRowDisplayName||e}).filter(Boolean);return(0,i.isEmpty)(g)?null!=s?String(s):"":g.join(", ");case"multiCollaborator":case"collaborator":if(s&&null!=o&&Array.isArray(s)){var y=(null==n?void 0:n.stackUsers)||[],v=(null==n?void 0:n.workspaceUsers)||[],x=s.map(function(e){var t=y.find(function(t){return t&&(t.id===e||t.id==e||t.name===e)});if(t)return t.name;var n=v.find(function(t){return t&&(t.id===e||t.id==e||t.name===e)});return n?n.name:e});return x.join(", ")}return null!=s?String(s):"";case"createdby":case"updatedby":var S=(null==n?void 0:n.stackUsers)||[],w=(null==n?void 0:n.workspaceUsers)||[],b=S.find(function(e){return e&&e.id==s});if(b)return b.name;var j=w.find(function(e){return e&&e.id==s});return j?j.name:null!=s?String(s):"";case"link":var A=(s&&Array.isArray(s)?s:[]).map(function(e){return e&&e.foreignRowDisplayName||e}).filter(Boolean);return(0,i.isEmpty)(A)?null!=s?String(s):"":A.join(", ");case"multipleAttachment":var I=(s&&Array.isArray(s)?s:[]).map(function(e){return e&&e.filename||e}).filter(Boolean);return(0,i.isEmpty)(I)?null!=s?String(s):"":I.join(", ");case"formula":switch(o.formulaText){case"CREATED_TIME":var C=o.dateFormat||"DD/MM/YYYY";return o.isDateTime&&"12"===o.timeFormat&&(C+=" hh:mm A"),o.isDateTime&&"24"===o.timeFormat&&(C+=" HH:mm"),s?a()(s).format(C):"";case"UPDATED_TIME":var T=o.dateFormat||"DD/MM/YYYY",_=o.isDateTime&&"12"===o.timeFormat?T+" hh:mm A":o.isDateTime&&"24"===o.timeFormat?T+" HH:mm":T;return s?(0,i.isString)(s)&&s.indexOf("T")>-1?a()(s).format(_):a()(s,_).format(_):"";case"ROW_ID()":return null!=s?String(s):"";default:var R,k=null==s||isNaN(s)?s:"boolean"==typeof s?Number(s):parseFloat(s).toFixed(null!==(R=o.precision)&&void 0!==R?R:2);switch("Invalid date"!==k&&void 0!==k||(k=""),o.format){case"decimal":default:return null!=k?String(k):"";case"percent":return null!=k?k+"%":"";case"currency":var O,N,E=o.symbol||"",L=k?parseFloat(k).toLocaleString(void 0,{minimumFractionDigits:null!==(O=o.precision)&&void 0!==O?O:2,maximumFractionDigits:null!==(N=o.precision)&&void 0!==N?N:2}):"",M=L?E+L:"";return M.includes("-")?"-"+M.replace(/-/g,""):M;case"date":var D=o,F=D.isDateTime,W=void 0===F||F,P=D.dateFormat;if(!s)return"";var V=(void 0===P?"DD/MM/YYYY":P)+(W?" hh:mm A":"");return(0,i.isString)(s)&&s.indexOf("T")>-1?a()(s).format(V):a().unix(s/1e3).format(V);case"string":case"time":return null!=s?String(s):""}}case"date":var G=o.dateFormat||"DD/MM/YYYY",U=(0,i.isString)(s)&&s.indexOf("T")>-1?s.split(".")[0]:s/1e3;return U?a()(U).format(G):null!=s?String(s):"";case"time":return null!=s?String(s):"";case"multilineText":if(s){var J=String(s).replace(/<p[^>]*>/gi,"").replace(/&lt;p&gt;/g,"<p>");return J=J.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim()}return"";default:return null!=s&&""!==s?String(s):""}}},73384:(e,t,n)=>{n.d(t,{G:()=>a});var i="production",o={jiraAction:["local","development","staging","production"],sendGmailAction:["local","development","staging","production"],outlookAction:["local","development","staging","production"],sortList:["local","development","staging","production"],slack:["local","development","staging","production"],conditionalLogicAction:["local","development","staging","production"],msTeamsAction:["local","development","staging"]};function a(e){var t=o[e];return!!t&&(t.includes(i),!0)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.