forked from sindresorhus/awesome
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
4602-b684875ccefdc6df.js.download
2 lines (2 loc) · 46.6 KB
/
4602-b684875ccefdc6df.js.download
1
2
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4602],{83766:function(e,n,t){var r=t(52903),i=t(55414);n.Z=function(e){var n=e.count,t=void 0===n?0:n,o=e.limit;return(0,r.tZ)(i.x,{type:"smallPrint1",children:(0,r.BX)("span",{"data-testid":"character-counter",children:[t,"/",o," characters"]})})}},24468:function(e,n,t){var r=t(52903),i=t(28165),o=t(55414),a=function(e){return(0,i.iv)("display:block;thead{display:none;th{display:none;}}tbody{display:flex;flex-direction:column;}tr{display:grid;td{text-align:left;display:flex;}}@media (min-width:",e,"px){width:100%;margin:0;display:table;thead{display:table-header-group;th{display:table-cell;}}tbody{display:table-row-group;flex-direction:column;}tr{display:table-row;td{display:table-cell;}}}","ResponsiveTable.tsx--tableStyle")};n.Z=function(e){var n=e.caption,t=e.collapseBreakpoint,i=e.emptySetMessage,l=e.header,s=e.rows;return(null===s||void 0===s?void 0:s.length)?(0,r.BX)("table",{css:a(t),children:[n&&(0,r.tZ)("caption",{children:n}),(0,r.tZ)("thead",{children:l}),(0,r.tZ)("tbody",{children:s})]}):(0,r.tZ)(o.x,{tag:"p",children:i})}},43975:function(e,n,t){var r=t(52903),i=t(28165),o=t(87593),a=t(32945),l=t(47043),s=t(53939),d=(0,i.iv)("display:flex;","ZapTableRowServices.tsx--servicesLoadingStyle"),c=(0,i.iv)("width:max-content;max-width:275px;display:flex;text-align:left;","ZapTableRowServices.tsx--tooltipStyle");n.Z=function(e){var n=e.services,t=e.serviceTooltipContent,i=e.id;return n.length?(0,r.tZ)(o.p,{allowMultilineTooltip:!0,content:t?(0,r.tZ)("span",{css:c,children:t}):null,isBlock:!0,position:"north",tooltipId:"tooltip-services-".concat(i),children:function(){return(0,r.tZ)(a.r,{maxServices:3,services:n,size:30,ariaLabel:t})}}):(0,r.BX)("div",{css:d,children:[(0,r.tZ)(l.q,{height:30,width:30}),(0,r.tZ)(s.L,{width:5}),(0,r.tZ)(l.q,{height:30,width:30})]})}},68075:function(e,n,t){t.d(n,{Z:function(){return Qt}});var r=t(92228),i=t(52903),o=t(28165),a=t(23094),l=t(25237),s=t.n(l),d=t(22211),c=t(87744),u=t(66383),p=t(2784),v=t(59400),f=t(16181),m="dismissInviteTeammatesBanner",h=function(){return!!localStorage.getItem(m)};var g=t(70776),b=t(61854),y=t(55414),x=t(20110),Z=t(90446),w=t(38716);function S(){var e=(0,r.Z)(["\n padding: 20px 80px 30px;\n "]);return S=function(){return e},e}function _(){var e=(0,r.Z)(["\n background-color: ",";\n position: relative;\n z-index: 2;\n "]);return _=function(){return e},e}function I(){var e=(0,r.Z)(["\n align-items: center;\n background-color: ",";\n border-radius: 2px;\n border: 1px solid ",";\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: space-between;\n min-width: 150px;\n padding: 24px 32px;\n position: relative;\n row-gap: 10px;\n "]);return I=function(){return e},e}var T=(0,c.uq)({tablet:(0,o.iv)(S()),desktop:(0,o.iv)(_(),g.w.neutral100)}),C=(0,c.uq)({mobile:(0,o.iv)(I(),g.w.bolt,g.w.neutral600)}),F=(0,o.iv)("align-items:center;background:transparent;border:none;display:flex;justify-content:center;margin:0;padding:0;position:absolute;right:10px;top:10px;","InviteTeammatesBanner.tsx--closeButton"),k=(0,o.iv)("flex-basis:480px;flex-grow:3;margin-right:10px;","InviteTeammatesBanner.tsx--textContainer"),B=(0,o.iv)("flex-grow:0;flex-shrink:1;flex-basis:250px;","InviteTeammatesBanner.tsx--buttonContainer"),P="user.management.NewMemberInviteEvent",E=function(e){var n=e.onClick,t=e.onDismiss,r=(0,w.X8)();(0,p.useEffect)((function(){(0,Z.Z)({interaction_goal:"invite_member_banner_view",interaction_name:"invite_member_banner",experiment_name:"editor_invite_from_my_zaps_by_account",option_selected:"invite_member_banner",account_id:r},P)}),[r]);return(0,i.tZ)("div",{css:T,children:(0,i.BX)("div",{css:C,children:[(0,i.tZ)("button",{css:F,"aria-label":"Dismiss",onClick:function(){t(),(0,Z.Z)({interaction_goal:"invite_member_banner_dismiss",interaction_name:"invite_member_banner",experiment_name:"editor_invite_from_my_zaps_by_account",option_selected:"invite_member_banner",account_id:r},P)},children:(0,i.tZ)(b.J,{name:"formX",size:24})}),(0,i.BX)("div",{css:k,children:[(0,i.tZ)(y.x,{tag:"h3",type:"paragraph3Bold",margin:"0 0 10px 0",children:"Make the most of your Team plan by inviting new members"}),(0,i.tZ)(y.x,{tag:"p",type:"paragraph3",children:"Your plan includes unlimited members. Invite as many teammates as you need to keep Zaps running smoothly."})]}),(0,i.tZ)("div",{css:B,children:(0,i.tZ)(x.z,{onClick:function(){n(),(0,Z.Z)({interaction_goal:"invite_member_banner_open",interaction_name:"invite_member_banner",experiment_name:"editor_invite_from_my_zaps_by_account",option_selected:"invite_member_banner",account_id:r},P)},children:"Add members"})})]})})},z=t(98788),A=t(70865),R=t(96670),X=t(5163),O=t(28952),q=t(66266),M=t(17688),L=t(42126),N=t(20271),$=t(88106),D=t(76635),H=t(19928),j=t.n(H),J=t(86692),U=t(60138),Q=t(33379),Y=t(53736);function V(){var e=(0,r.Z)(["\n mutation CreateInvitationsEmailInviter(\n $accountId: Int!\n $emails: [String!]!\n $role: MemberRole\n ) {\n createInvitations(accountId: $accountId, emails: $emails, role: $role) {\n error {\n email\n message\n }\n success {\n createdAt\n email\n emailHash\n id\n isAccessRequest\n role\n status\n }\n }\n }\n"]);return V=function(){return e},e}var W=(0,U.Ps)(V());var G=function(e){var n,t,r=e.accountId,i=(0,Y.l)().createNotification,o=(0,u.Z)((0,Q.D)(W,{onError:function(e){i({message:"Error sending invitations: ".concat((0,J.e$)(e)),type:"error"})},onCompleted:function(e){var n,t,r,o,a,l,s,d;(null===e||void 0===e||null===(n=e.createInvitations)||void 0===n||null===(t=n.success)||void 0===t?void 0:t.length)>0&&0===(null===e||void 0===e||null===(r=e.createInvitations)||void 0===r||null===(o=r.error)||void 0===o?void 0:o.length)&&i({message:"".concat(null===e||void 0===e||null===(a=e.createInvitations)||void 0===a||null===(l=a.success)||void 0===l?void 0:l.length," ").concat(j()("invitation",null===e||void 0===e||null===(s=e.createInvitations)||void 0===s||null===(d=s.success)||void 0===d?void 0:d.length)," sent successfully."),type:"success"})}}),2),a=o[0],l=o[1],s=l.called,d=l.data,c=l.loading;return{emailErrors:(null===d||void 0===d||null===(n=d.createInvitations)||void 0===n?void 0:n.error)||[],emailSuccess:(null===d||void 0===d||null===(t=d.createInvitations)||void 0===t?void 0:t.success)||[],loading:c,hasCalled:s,onCreateInvitations:function(e,n){e.length>0&&n&&a({variables:{accountId:r,emails:e,role:n}})}}},K="user.management.NewMemberInviteEvent",ee=(0,o.iv)("display:flex;justify-content:center;gap:20px;","InviteTeammatesModal.tsx--buttonContainerCss"),ne=(0,o.iv)("text-align:center;margin:-5px 0 20px 0;","InviteTeammatesModal.tsx--containerCss"),te=(0,o.iv)("display:flex;flex-direction:column;gap:30px;","InviteTeammatesModal.tsx--formContainerCss"),re=(0,o.iv)("padding:0;margin:0;list-style:none;","InviteTeammatesModal.tsx--errorListCss"),ie=function(e){return!e||/^\s*$/.test(e)},oe=function(e){return e.split(/[\s,;]+/).filter((0,D.negate)(ie))},ae=function(e){var n=e.onClose,t=(0,w.X8)(),r=G({accountId:t}),o=r.emailErrors,a=r.emailSuccess,l=r.loading,s=r.hasCalled,d=r.onCreateInvitations,c=(0,p.useState)(""),u=c[0],v=c[1],f=(0,p.useState)([""]),m=f[0],h=f[1],g=(0,p.useState)(""),b=g[0],S=g[1],_=(0,p.useState)(!1),I=_[0],T=_[1];(0,p.useEffect)((function(){(0,Z.Z)({interaction_goal:"invite_member_modal_view",interaction_name:"invite_member_modal",experiment_name:"editor_invite_from_my_zaps_by_account",option_selected:"invite_member_modal",account_id:t},K)}),[t]);var C=(0,p.useCallback)((function(){(0,Z.Z)({interaction_goal:"invite_member_modal_close",interaction_name:"invite_member_modal",experiment_name:"editor_invite_from_my_zaps_by_account",option_selected:"invite_member_modal",account_id:t},K),v(""),h([""]),S(""),n()}),[t,n]),F=(0,p.useCallback)(function(){var e=(0,z.Z)((function(e){var n;return(0,X.__generator)(this,(function(t){return e.preventDefault(),(n=oe(u)).length<=0||n.length>200?(B(u),[2]):(d(n,"member"),[2])}))}));return function(n){return e.apply(this,arguments)}}(),[u,d]);(0,p.useEffect)((function(){if(s&&!l)if(o.length>0){var e=["".concat(null===o||void 0===o?void 0:o.length," ").concat(j()("invitation",null===o||void 0===o?void 0:o.length)," could not be sent.")],t=!0,r=!1,i=void 0;try{for(var d,c=o[Symbol.iterator]();!(t=(d=c.next()).done);t=!0){var u=d.value;u&&e.push("".concat(u.email,": ").concat((0,J.e$)(u.message)||""))}}catch(p){r=!0,i=p}finally{try{t||null==c.return||c.return()}finally{if(r)throw i}}h(e),(null===a||void 0===a?void 0:a.length)>0&&S("".concat(null===a||void 0===a?void 0:a.length," ").concat(j()("invitation",null===a||void 0===a?void 0:a.length)," successfully sent."))}else n()}),[s,l,o,a,n]);var k=function(e){v(e.target.value),S(""),h([""]),B(e.target.value),I||(0,Z.Z)({interaction_goal:"invite_member_modal_enter_emails",interaction_name:"invite_member_modal",experiment_name:"editor_invite_from_my_zaps_by_account",option_selected:"invite_member_modal",account_id:t},K),T(!0)},B=function(e){0!==e.length?oe(e).length>200&&h(["Only 200 invitations are allowed at a time"]):h(["Please enter at least one email address"])},P=m.some((function(e){return e.length>0}));return(0,i.tZ)(O.u,{ariaLabel:"Invite teammates",onClosed:C,children:(0,i.BX)(q.hz,{maxWidth:"550px",children:[(0,i.tZ)(q.dE,{align:"center",children:"Invite your teammates"}),(0,i.BX)(q.nS,{children:[(0,i.tZ)("div",{css:ne,children:(0,i.tZ)(y.x,{color:"neutral700",type:"paragraph3",children:"Automation is more fun together! You can invite multiple members simultaneously by separating email addresses with a comma, semicolon, tab, or a new line."})}),(0,i.BX)("form",{css:te,"data-testid":"form",onSubmit:F,children:[(0,i.tZ)(M.g,{label:"Email(s)",error:P?"":void 0,renderInput:function(e){return(0,i.tZ)(L.o,(0,R.Z)((0,A.Z)({},e),{autoFocus:!0,placeholder:"Email(s)",rows:1,value:u,onChange:k}))}}),b.length>0&&(0,i.tZ)(N.b,{type:"success",children:b}),P&&(0,i.tZ)(N.b,{type:"error",children:(0,i.tZ)($.X,{maxLines:2,children:(0,i.tZ)("ul",{css:re,children:m.map((function(e){return(0,i.tZ)("li",{children:e},e)}))})})}),(0,i.BX)("div",{css:ee,children:[(0,i.tZ)(x.z,{color:"secondary",onClick:n,children:"Cancel"}),(0,i.tZ)(x.z,{type:"submit",children:"Invite"})]})]})]})]})})},le=function(){var e=(0,v.Z)().isInviteFromMyZapsEnabled,n=(0,f.gn)().isTeamOrCompany,t=(0,p.useState)(!1),r=t[0],o=t[1],a=(0,u.Z)(function(){var e=(0,p.useState)(h),n=e[0],t=e[1];return(0,p.useEffect)((function(){n?localStorage.setItem(m,"true"):localStorage.removeItem(m)}),[n]),[n,t]}(),2),l=a[0],s=a[1];return e&&(n&&!l)?(0,i.BX)(p.Fragment,{children:[(0,i.tZ)(E,{onClick:function(){return o(!0)},onDismiss:function(){return s(!0)}}),r&&(0,i.tZ)(ae,{onClose:function(){return o(!1)}})]}):null},se=t(816),de=t(97729),ce=t.n(de),ue=t(99603),pe=t(47497),ve=function(){var e=(0,p.useState)(""),n=e[0],t=e[1],r=(0,pe.Z)().folderId,i=(0,ue.Z)({folderId:r}).folder;return(0,p.useEffect)((function(){(null===i||void 0===i?void 0:i.title)&&t&&t("".concat(i.title," | My Zaps | Zapier"))}),[null===i||void 0===i?void 0:i.title,t]),{pageTitle:n}},fe=function(){var e=ve().pageTitle;return(0,i.tZ)(ce(),{children:(0,i.tZ)("title",{children:e||"My Zaps | Zapier"})})},me=t(14033),he=t(27459),ge=t(85150),be=function(e){var n=e.hasSharedFolders,t=(0,f.gn)(),r=t.isTeamOrCompany,i=t.isTrialing,o=n&&!i&&!r,a=!n||i&&!r,l=(0,me.Z)().canShareFolders&&!o;return r||(a=!n,l=!1),{canCreateSharedFolder:l,showEmptySharedFolders:a,showReadOnlySharedFolders:o}},ye=t(73223),xe=t(70882),Ze=t(18911),we=t(39097),Se=t.n(we),_e=t(3e3),Ie=t(87593),Te=t(7118);function Ce(){var e=(0,r.Z)(["\n flex: 1 1 auto;\n position: relative;\n top: 2px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n "]);return Ce=function(){return e},e}function Fe(){var e=(0,r.Z)(["\n top: 0;\n "]);return Fe=function(){return e},e}var ke=(0,o.iv)("> div{// this must have !important to set style for the descendant\n // flex elements to have correct positioning\n display:block !important;}a{text-decoration:none !important;}","FolderSectionItem.tsx--listItemStyle"),Be=(0,o.iv)(_e.ZT.paragraph3Semibold," align-items:center;border-radius:3px;box-sizing:border-box;color:",g.w.neutral700,";display:flex;gap:8px;height:48px;padding:8px 10px;text-decoration:none;&:hover,&:focus{background-color:",g.w.acidWash,";color:",g.w.blueJeans,";outline-color:",g.w.blueJeans,";// use CSS instead of Icon.props for color to enable hover styling\n svg{fill:",g.w.blueJeans,"!important;}}// use CSS instead of Icon.props for color to enable hover styling\n svg{fill:",g.w.neutral600," !important;}// styling for badge hover effects\n .badgeStyle{> span{padding-top:4px !important;}> span:first-of-type{display:none !important;}}&:hover .badgeStyle > span:first-of-type{display:block !important;}&:hover .badgeStyle > span:last-of-type{display:none !important;}","FolderSectionItem.tsx--itemStyle"),Pe=(0,o.iv)("background-color:",g.w.acidWash,";color:",g.w.blueJeans,";svg{fill:",g.w.blueJeans," !important;}// styling for badge hover effects\n .badgeStyle{> span:first-of-type{display:block !important;}}.badgeStyle > span:last-of-type{display:none !important;}","FolderSectionItem.tsx--activeItemStyle"),Ee=(0,c.uq)({mobile:(0,o.iv)(Ce()),tablet:(0,o.iv)(Fe())}),ze=function(e){var n=e.href,t=e.iconName,r=e.id,o=e.isActive,a=e.isOver,l=e.isShared,s=e.name,d=e.setNodeRef,c=(0,p.useState)(!1),u=c[0],v=c[1],f=(0,p.useRef)(null);(0,p.useEffect)((function(){v((0,Te.S)(f))}),[]);var m=(0,p.useMemo)((function(){return t||(l?"team":"navFolder")}),[t,l]),h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.tZ)(Se(),(0,R.Z)((0,A.Z)({},e),{href:n,"aria-describedby":u?"folder-".concat(r):void 0,legacyBehavior:!1,children:(0,i.BX)("span",{css:[Be,o&&Pe,a&&Pe],children:[(t||l)&&(0,i.tZ)(b.J,{name:m,size:"25px"}),(0,i.tZ)("span",{css:Ee,"data-testid":"FolderItem-name-folder-".concat(r),ref:f,children:s})]})}))};return(0,i.tZ)("li",{ref:d||null,css:ke,"data-testid":"FolderSectionItem",children:u?(0,i.tZ)(Ie.p,{allowMultilineTooltip:!0,content:s,position:"south",tooltipId:"FolderSectionItem-folder-".concat(r),children:h}):h()})},Ae=t(58410),Re=function(e){var n=e.href,t=e.isActive,r=e.name,o=e.zapCount,l=(0,a.Zj)({id:"Folder-trash--1-true",disabled:!1,data:{folderShared:!1,folderName:"Trash",folderId:-1}}),s=l.setNodeRef,d=l.isOver;return(0,i.tZ)(ze,{children:[],href:n,isActive:t,isOver:d,name:r,setNodeRef:s,zapCount:o})},Xe=t(23001),Oe=function(){var e=(0,v.Z)().isBulkUpdateOwnerEnabled,n=(0,Xe.Z)().isPublishApprovalEnabled,t=(0,pe.Z)(),r=t.folderId,o=t.memberId,a=t.search,l=(0,me.Z)().canSearchPersonalFoldersAndZaps,s=(0,xe.Z)(),d=s.heldFolder,c=s.pendingFolder,u=s.trashFolder,m=(0,Ae.Z)(),h=m.bulkActions,g=m.bulkActionsLoading,b=(0,f.gn)().isAdmin,y=n&&b,x=function(e){return l?(0,Ze.do)(e,o):(0,Ze.do)(e)},Z=function(e){return String(r)===String(e)&&!a},w=e&&!g&&!!(null===h||void 0===h?void 0:h.length);return(0,i.BX)(p.Fragment,{children:[y&&(0,p.createElement)(ze,{children:[],href:"/app/zaps/approvals",isActive:Z(ye.JN),key:ye.JN,name:"Pending approval",zapCount:0}),w&&(0,p.createElement)(ze,{children:[],href:"/app/queued",isActive:Z(ye._o),key:ye._o,name:"Queued actions",zapCount:0}),!!c&&(0,p.createElement)(ze,(0,R.Z)((0,A.Z)({},c),{children:[],href:x(c.id),isActive:Z(c.id),key:c.id})),!!d&&(0,p.createElement)(ze,(0,R.Z)((0,A.Z)({},d),{children:[],href:x(d.id),isActive:Z(d.id),key:d.id})),!!u&&(0,p.createElement)(Re,{children:[],href:x(u.id),isActive:Z(u.id),key:u.id,zapCount:u.zapCount,name:u.name})]})},qe=function(e){var n=e.canSearchPersonalFoldersAndZaps,t=e.isTeamOrCompany,r=(0,p.useState)(!1),i=r[0],o=r[1];return(0,p.useEffect)((function(){return o(Boolean(n&&t))}),[n,t]),{showMemberSearch:i}},Me=t(9882),Le=t(29476),Ne=t(53583),$e=(0,o.iv)("display:flex;gap:5px;align-items:center;padding:10px 20px;// this padding is necessary to make the DnD target larger\n position:relative;> div{transform:translateY(3px);}","FolderTabs.tsx--tabStyle"),De=(0,o.iv)('position:relative;&:after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:',g.w.blueJeans,";z-index:10;}","FolderTabs.tsx--activeTabStyle"),He=(0,o.iv)('a[href="#shared"]{',De,"}","FolderTabs.tsx--activeTabSharedStyle"),je=(0,o.iv)('a[href="#personal"]{',De,"}","FolderTabs.tsx--activeTabPersonalStyle"),Je=(0,o.iv)("position:relative;z-index:100;&:hover{z-index:20;// solves overflowing issue with icon in typeahead and makes sure tooltip renders on top of add button\n > div{display:block;}}","FolderTabs.tsx--tooltipStyle"),Ue=(0,o.iv)("display:none;> span{text-wrap:pretty !important;left:0 !important;right:auto !important;z-index:9999;border-radius:10px !important;text-align:left !important;}","FolderTabs.tsx--tooltipInnerStyle"),Qe=function(e){var n=e.tab,t=e.activeTab,r=e.isTeamOrCompany,o=e.tooltipContent,l=e.setTab,s=(0,a.Zj)({id:"FolderTab--".concat(n)}),d=s.setNodeRef,c=s.isOver,u=s.active;return(0,p.useEffect)((function(){"sidebar-drag"!==(null===u||void 0===u?void 0:u.id)&&c&&n!==t&&l(n)}),[n,c,l,t,u]),(0,i.BX)("span",{css:$e,ref:d,"data-testid":"FolderTab--".concat(n),id:"FolderTab--".concat(n),children:["personal"===n?"Personal ":"Shared ",r&&(0,i.BX)("div",{css:Je,children:[(0,i.tZ)(b.J,{name:"alertInfo",size:20}),(0,i.tZ)("div",{css:Ue,children:(0,i.tZ)(Le.u,{allowMultiline:!0,position:"northeast",id:"".concat(n,"-folders-tooltip"),children:o})})]})]})},Ye=function(e){var n=e.tab,t=e.setTab,r=e.isTeamOrCompany,o=e.isSuperAdminEnabled;return(0,i.tZ)("div",{css:["shared"===n&&He,"personal"===n&&je],children:(0,i.tZ)(Ne.m,{items:[{href:"#personal",text:(0,i.tZ)(Qe,{tab:"personal",activeTab:n,setTab:t,isTeamOrCompany:r,tooltipContent:"Personal folders are visible to the account owner".concat(o?" and super admins":"",".")})},{href:"#shared",text:(0,i.tZ)(Qe,{tab:"shared",activeTab:n,setTab:t,isTeamOrCompany:r,tooltipContent:"Shared folders are visible to the account owner".concat(o?", super admins":"",", admins, and people you invite.")})}],selectedItemHref:"shared"===n?"#shared":"#personal",onChooseItem:function(e){return t(e.href.slice(1))},isItemSelected:function(e){return e.href.slice(1)===n},size:"medium"})})},Ve=t(99570),We=t(81510),Ge=t(59712),Ke=t(25120),en=t(29282),nn=t(68516),tn=t(21805),rn=t(28316),on=t(1639);function an(){var e=(0,r.Z)(["\n display: grid;\n grid-gap: 10px;\n grid-template-columns: 1fr;\n "]);return an=function(){return e},e}function ln(){var e=(0,r.Z)(["\n display: flex;\n margin: auto;\n gap: 20px;\n "]);return ln=function(){return e},e}var sn=(0,o.iv)("display:grid;grid-gap:20px;max-width:470px;","TeamsTrialModal.tsx--rootStyles"),dn=(0,c.uq)({mobile:(0,o.iv)(an()),tablet:(0,o.iv)(ln())});function cn(e){var n=e.onClose,t=e.onCreateFolder,r=e.hasCreditCard,o=e.teamsPlanPrice,a=(0,Y.l)().createNotification,l=(0,f.gn)().refetch;(0,Ge.jj)("open TeamsTrialModal");var s=(0,w.X8)(),d=function(){var e=(0,z.Z)((function(e){var i,o,d,c,u,p;return(0,X.__generator)(this,(function(v){switch(v.label){case 0:return i=e.event,o="/api/v3/accounts/".concat(s),c=null!==(d=tn.Z.get("csrftoken"))&&void 0!==d?d:"",(u=new Headers({})).set("X-CSRFToken",c),[4,fetch(o,{credentials:"include",headers:u,body:JSON.stringify({is_trialing_teams:!0,teams_trial_auto_upgrade:r}),method:"PATCH"})];case 1:return p=v.sent(),n(),200===p.status?l().then((function(){t(i)})):a({message:"Error starting trial. Please try again.",type:"error"}),[2]}}))}));return function(n){return e.apply(this,arguments)}}(),c=new Date,u=c.setDate(c.getDate()+14),p=r?"Start a 14-day Zapier for Teams free trial to continue":"Start a Zapier for Teams free trial",v=r?(0,i.BX)(y.x,{textAlign:"center",color:"neutral700",type:"paragraph3",children:["If you don't disable auto-billing or modify your payment options before your trial ends on ",(0,i.tZ)(nn.ou,{date:u}),",",(0,i.BX)("strong",{children:[" you will be charged $",o]})," plus any applicable taxes. You can modify, downgrade or cancel your plan at any time"," ",(0,i.tZ)("a",{target:"_blank",href:"/teams-companies",children:"Learn more"})]}):(0,i.tZ)(y.x,{textAlign:"center",color:"neutral700",type:"paragraph3",children:"Unlock shared folders, unlimited users, advanced permissions and more with Zapier for Teams. Start your free 14 day trial to create your shared folder."});return(0,i.BX)("div",{css:sn,children:[(0,i.tZ)(y.x,{tag:"h1",textAlign:"center",type:"paragraph1ShortBold",children:p}),v,(0,i.tZ)("div",{css:dn,children:(0,i.tZ)(x.z,{color:"primary",onClick:function(e){(0,Ke.aX)({accountId:s}),d({event:e})},type:"button",children:"Confirm and create folder"})})]})}var un=function(e){var n=e.hasCreditCard,t=e.teamsPlanPrice,r=e.onClose,o=e.onCreateFolder,a=e.targetParentFolderName,l=(0,on.Z)("teams-trial-modal");return(0,rn.createPortal)((0,i.tZ)(O.u,{ariaLabel:"Add folder",onClosed:r,children:(0,i.tZ)(q.hz,{children:(0,i.tZ)(cn,{hasCreditCard:n,teamsPlanPrice:t,onCreateFolder:o,onClose:r,targetParentFolderName:a})})}),l)},pn=t(40794),vn=t(35591);function fn(){var e=(0,r.Z)(["\n query PaymentMethods($accountId: Int!) {\n account(id: $accountId) {\n hasPaymentSource\n id\n }\n }\n"]);return fn=function(){return e},e}var mn=(0,U.Ps)(fn());function hn(){var e=(0,r.Z)(["\n query PossiblePlans($accountId: Int!) {\n possiblePlans: pricingPlans(accountId: $accountId) {\n planType\n plans {\n id\n name\n interval\n amount\n type\n }\n }\n }\n"]);return hn=function(){return e},e}var gn=(0,U.Ps)(hn()),bn=function(e){var n,t=e.isTeamsTrialModalOpen,r=e.closeModal,o=e.showCreateFolder,a=function(){var e=(0,w.X8)(),n=(0,pn.a)(mn,{skip:!e,onError:function(e){(0,vn.Z)("PaymentMethodsQuery",e)},variables:{accountId:e}}).data;return{hasPaymentSource:((null===n||void 0===n?void 0:n.account)||{}).hasPaymentSource}}().hasPaymentSource,l=function(){var e=(0,w.X8)();return{possiblePlans:((0,pn.a)(gn,{skip:!e,onError:function(e){(0,vn.Z)("PossiblePlansQuery",e)},variables:{accountId:e}}).data||{}).possiblePlans}}().possiblePlans,s=null===(n=null===l||void 0===l?void 0:l.find((function(e){return"Team"===(null===e||void 0===e?void 0:e.planType)})))||void 0===n?void 0:n.plans.find((function(e){return"Team (50,000 Tasks)"===e.name&&"year"===e.interval})),d=((null===s||void 0===s?void 0:s.amount)||0)/100/12;return(0,i.tZ)("div",{children:t&&(0,i.tZ)(un,{teamsPlanPrice:d,hasCreditCard:!!a,onCreateFolder:function(e){o(e)},onClose:function(){r()}})})},yn=(0,o.iv)("margin:10px 20px 15px 0;","OnboardingTeamsUpsell.tsx--sharedFoldersCardStyle"),xn=(0,o.iv)("display:flex;flex-flow:column nowrap;padding:20px 20px 30px 20px;gap:20px;","OnboardingTeamsUpsell.tsx--rootStyle"),Zn=(0,o.iv)("display:flex;width:100%;gap:20px;justify-content:flex-start;","OnboardingTeamsUpsell.tsx--buttonsContainerStyle"),wn=(0,o.iv)("line-height:1.7rem;","OnboardingTeamsUpsell.tsx--textContainerStyle"),Sn=(0,o.iv)("height:49px;","OnboardingTeamsUpsell.tsx--imageContainerStyle"),_n=function(e){var n=e.isShared,t=e.hasTrialedTeams,r=(0,w.X8)(),o=(0,p.useState)(!1),a=o[0],l=o[1],s=(0,p.useState)(!1),d=s[0],c=s[1];return(0,Ge.jj)("open Shared Zaps Teams trial upsell"),(0,p.useEffect)((function(){(0,Ke.HZ)({accountId:r})}),[r]),(0,i.BX)(p.Fragment,{children:[(0,i.tZ)("div",{css:yn,children:(0,i.tZ)(Ve.T,{borderColor:"neutral300",children:(0,i.BX)("div",{css:xn,children:[(0,i.tZ)("div",{css:Sn,children:(0,i.tZ)(We.E,{src:"https://cdn.zapier.com/storage/photos/e2cccc4569ee5bc18edd85c3602c93e3.png",alt:"",loading:"eager",width:194})}),(0,i.tZ)("div",{css:wn,children:(0,i.BX)(y.x,{color:"neutral700",tag:"p",textAlign:"left",type:"paragraph3",children:[(0,i.tZ)("strong",{children:"Zapier for Teams"})," allows you to collaborate with your coworkers using shared folders."]})}),(0,i.BX)("div",{css:Zn,children:[(0,i.tZ)(x.z,{color:"secondary",target:"_blank",href:"/teams-companies/",onClick:function(){return(0,Ke.f7)({accountId:r})},size:"small",children:"Learn more"}),(0,i.tZ)(x.z,{color:"primary",onClick:function(){(0,Ke.ST)({accountId:r}),l(!0)},size:"small",children:t?"Upgrade":"Try free"})]})]})})}),(0,i.tZ)(bn,{isTeamsTrialModalOpen:a,closeModal:function(){return l(!1)},showCreateFolder:function(e){e.stopPropagation(),e.preventDefault(),(0,Ke.PZ)({accountId:r,isShared:n}),c(!0)}}),d&&(0,i.tZ)(en.Z,{isShared:n,onClose:function(){c(!1)}})]})},In=t(26215),Tn=(0,o.iv)("display:flex;flex-flow:column nowrap;align-items:center;padding:20px;gap:15px;","ReadOnlySharedFolders.tsx--rootStyle"),Cn=function(){return(0,i.tZ)(Ve.T,{borderColor:"neutral300",children:(0,i.BX)("div",{css:Tn,children:[(0,i.tZ)(y.x,{tag:"h3",textAlign:"center",type:"paragraph3Bold",children:"Heads up: shared folders are now read-only"}),(0,i.BX)(y.x,{color:"neutral700",tag:"p",textAlign:"center",type:"paragraph3",children:["You can move Zaps to your personal folders, but can no longer edit or turn them on."," ",(0,i.tZ)(In.r,{href:"/help/account/teams/cancel-your-zapier-for-teams-plan",children:"See what changed."})]})]})})},Fn=t(50930),kn=t(47043),Bn=function(){return(0,i.tZ)("div",{children:(0,Fn.Z)(Array(5)).map((function(e,n){return(0,i.tZ)(kn.q,{height:33,width:"100%"},n)}))})},Pn=function(e){var n=e.folderType,t=e.canCreateSharedFolders,r=e.isViewingOtherUser,o=(0,p.useState)(!1),a=o[0],l=o[1],s=r&&"personal"===n;return(0,i.BX)(i.HY,{children:[!s&&(0,i.BX)(x.z,{onClick:function(){return l(!0)},iconBefore:"formAdd",children:["Create a ","shared"===n?"shared":"personal"," folder"]}),s&&(0,i.tZ)(y.x,{textAlign:"center",color:"gray60",children:"This user has no personal folders."}),a&&!r&&(0,i.tZ)(en.Z,{onClose:function(){l(!1)},isShared:"shared"===n,isSharedSelectable:!1!==t&&!r})]})},En=t(87263);function zn(){var e=(0,r.Z)(["\n display: flex;\n flex-flow: column nowrap;\n flex: 1 1 auto;\n gap: 15px;\n width: 100%;\n position: relative;\n "]);return zn=function(){return e},e}function An(){var e=(0,r.Z)(["\n height: 280px;\n min-height: 200px;\n width: 100%;\n margin-left: -10px;\n "]);return An=function(){return e},e}function Rn(){var e=(0,r.Z)(["\n height: auto;\n "]);return Rn=function(){return e},e}function Xn(){var e=(0,r.Z)(["\n height: 200px;\n "]);return Xn=function(){return e},e}function On(){var e=(0,r.Z)(["\n height: auto;\n "]);return On=function(){return e},e}function qn(){var e=(0,r.Z)(["\n padding-top: ","px;\n position: relative;\n height: 470px;\n "]);return qn=function(){return e},e}function Mn(){var e=(0,r.Z)([""]);return Mn=function(){return e},e}function Ln(){var e=(0,r.Z)(["\n // hard code this value to match the height of the member search input\n // this is needed to prevent the folder tree from running off the page\n min-height: ","px;\n margin-top: -5px;\n padding: 0 0 5px 35px;\n & input {\n cursor: pointer !important;\n }\n "]);return Ln=function(){return e},e}function Nn(){var e=(0,r.Z)(["\n padding-right: 15px;\n "]);return Nn=function(){return e},e}var $n=s()((function(){return Promise.all([t.e(2496),t.e(8195),t.e(5943)]).then(t.bind(t,71139))}),{loadableGenerated:{webpack:function(){return[71139]}},ssr:!1}),Dn=s()((function(){return Promise.all([t.e(2413),t.e(3885),t.e(8091)]).then(t.bind(t,33885))}),{loadableGenerated:{webpack:function(){return[33885]}},ssr:!1}),Hn=(0,c.uq)({mobile:(0,o.iv)(zn())}),jn=(0,o.iv)("position:relative;padding-left:34px;// align with super admin input\n\n > div{padding-top:20px;display:flex;flex-flow:column nowrap;gap:15px;}","FolderSection.tsx--rootLoadingStyle"),Jn=(0,c.uq)({mobile:(0,o.iv)(An()),desktop:(0,o.iv)(Rn())}),Un=(0,c.uq)({mobile:(0,o.iv)(Xn()),desktop:(0,o.iv)(On())}),Qn=(0,c.uq)({mobile:(0,o.iv)(qn(),190),desktop:(0,o.iv)(Mn())}),Yn=(0,o.iv)("position:absolute;top:0;left:0;","FolderSection.tsx--sharedFoldersCardStyle"),Vn=(0,c.uq)({mobile:(0,o.iv)(Ln(),69),desktop:(0,o.iv)(Nn())}),Wn=(0,o.iv)("display:flex;justify-content:center;margin:50px 0 0;","FolderSection.tsx--emptyFolderStyle"),Gn=function(e){var n=e.isLoading,t=void 0!==n&&n,r=e.showMemberSearch,o=void 0!==r&&r,a=e.isTeamOrCompany,l=void 0!==a&&a,s=e.folderType,d=e.canSearchPersonalFoldersAndZaps,c=void 0!==d&&d,u=e.canCreateSharedFolders,v=void 0!==u&&u,f=e.showReadOnlySharedFolders,m=void 0!==f&&f,h=e.showEmpty,g=void 0!==h&&h,b=e.hasTrialedTeams,y=void 0!==b&&b,x=e.memberId,Z=(0,p.useRef)(null),w=(0,p.useRef)(null),S=(0,p.useState)("auto"),_=S[0],I=S[1],T=(0,p.useCallback)((function(){var e=document.getElementById("FolderSection--".concat(s)),n=Z.current,t=w.current;if(window.innerWidth>=ye.oh&&n&&e){n.style.height="100px";var r=((null===e||void 0===e?void 0:e.clientHeight)||500)-((null===t||void 0===t?void 0:t.clientHeight)||0)-10;I(r),n.style.height="".concat(r,"px")}else window.innerWidth<ye.oh&&n&&(n.style.height="auto",I("auto"))}),[s]),C=(0,p.useMemo)((function(){return(0,D.debounce)(T,50)}),[T]);return(0,p.useEffect)((function(){T()}),[o,t,s,x,T]),(0,p.useEffect)((function(){return window.addEventListener("resize",C),function(){return window.removeEventListener("resize",C)}}),[C]),(0,i.tZ)(i.HY,{children:(0,i.tZ)("section",{css:Hn,id:"FolderSection--".concat(s),"data-testid":"FolderSection".concat(s?"-".concat(s):void 0),children:(0,i.BX)("div",{children:[o&&(0,i.tZ)("div",{css:Vn,ref:w,children:(0,i.tZ)(Dn,{})}),t&&(0,i.tZ)("div",{css:jn,children:(0,i.tZ)(Bn,{})}),!t&&!g&&(0,i.BX)("div",{css:[Jn,o&&Un,m&&Qn],ref:Z,children:[m&&(0,i.tZ)("div",{css:Yn,children:(0,i.tZ)(Cn,{})}),(0,i.tZ)($n,{folderType:s,isSuperAdmin:c,folderTreeWrapperHeight:_})]}),g&&(0,i.BX)(i.HY,{children:[!l&&(0,i.tZ)(_n,{isShared:"shared"===s,hasTrialedTeams:y}),(l||s===En.wo.Personal)&&!t&&(0,i.tZ)("div",{css:Wn,children:(0,i.tZ)(Pn,{folderType:s,canCreateSharedFolders:v,isViewingOtherUser:!!x})})]})]})})})},Kn=(0,p.memo)(Gn),et=t(66830),nt=s()((function(){return t.e(3367).then(t.bind(t,23367))}),{loadableGenerated:{webpack:function(){return[23367]}},ssr:!1}),tt=(0,o.iv)("display:flex;flex-flow:row nowrap;gap:15px;align-items:center;","SidebarDefaultFolder.tsx--rootStyle"),rt=(0,o.iv)("flex:1 1 auto;","SidebarDefaultFolder.tsx--listStyle"),it=(0,o.iv)("SidebarDefaultFolder.tsx--createStyle"),ot=function(e){var n,t=e.activeTab,r=e.disableCreateFolder,o=e.canCreateSharedFolder,l=e.isViewingOtherUser,s=(0,p.useState)(!1),d=s[0],c=s[1],u=(0,w.X8)(),v=(0,a.Zj)({id:"Folder-my-zaps-0-true",disabled:!1,data:{folderShared:!1,folderName:"My Zaps",folderId:0}}),f=v.setNodeRef,m=v.isOver,h=(0,pe.Z)(),g=h.folderId,b=h.memberId,y=h.search,x=(0,me.Z)().canSearchPersonalFoldersAndZaps,Z=function(e){return x?(0,Ze.do)(e,b):(0,Ze.do)(e)}(0),S=(n=0,String(g)===String(n)&&!y);return(0,i.BX)("div",{css:tt,children:[(0,i.tZ)("ul",{css:rt,children:(0,i.tZ)(ze,{children:[],href:Z,isActive:S,isOver:m,name:"My Zaps",setNodeRef:f})}),(0,i.BX)("div",{css:it,"data-testid":"SidebarDefaultFolder--create-folder-button",children:[(0,i.tZ)(Ie.p,{allowMultilineTooltip:!0,content:r&&l?"You cannot create personal folders for other users.":"",position:"west",tooltipId:"SidebarFolderCreateButtons",children:function(){return(0,i.tZ)(et.h,{icon:"formAddSquare",label:r&&l?"":"Create folder",tooltipId:"add-folder-sidebar",tooltipPosition:"west",size:"small",disabled:r,onClick:function(e){!function(e){e.stopPropagation(),e.preventDefault(),(0,Ke.PZ)({accountId:u,isShared:void 0}),c(!0)}(e)}})}}),d&&(0,i.tZ)(nt,{onClose:function(){c(!1)},isShared:"shared"===t&&o,isSharedSelectable:!1!==o&&!l})]})]})};function at(){var e=(0,r.Z)(["\n display: grid;\n grid-template-rows: ","px ",'px 300px auto;\n grid-template-areas:\n "home"\n "tabs"\n "folders"\n "virtual";\n padding: 2px; // padding so that outline on input does not get cut off\n height: 100%;\n overflow-x: hidden;\n ']);return at=function(){return e},e}function lt(){var e=(0,r.Z)(["\n grid-template-rows: ","px ","px 1fr auto;\n overflow-x: visible;\n overflow: visible;\n max-height: calc(100vh - ","px);\n "]);return lt=function(){return e},e}function st(){var e=(0,r.Z)(["\n grid-template-rows: ","px ","px ","px auto;\n "]);return st=function(){return e},e}function dt(){var e=(0,r.Z)(["\n grid-template-rows: ","px ","px 1fr auto;\n "]);return dt=function(){return e},e}function ct(){var e=(0,r.Z)(["\n grid-area: home;\n border-bottom: 3px solid ",";\n padding-bottom: 15px;\n "]);return ct=function(){return e},e}function ut(){var e=(0,r.Z)(["\n margin-right: 15px;\n "]);return ut=function(){return e},e}function pt(){var e=(0,r.Z)(['\n grid-area: tabs;\n\n [class*="Tabs__primary"] {\n grid-template-columns: repeat(2, minmax(auto, 50%)) !important;\n }\n ']);return pt=function(){return e},e}function vt(){var e=(0,r.Z)(["\n margin-right: 15px;\n "]);return vt=function(){return e},e}function ft(){var e=(0,r.Z)(["\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n height: auto;\n margin-top: 1px;\n min-width: 0;\n grid-area: folders;\n padding: 20px 0;\n "]);return ft=function(){return e},e}function mt(){var e=(0,r.Z)(["\n background-color: ",";\n grid-area: virtual;\n border-top: 3px solid ",";\n border-bottom: 3px solid ",";\n\n > li {\n margin: 5px 0;\n }\n "]);return mt=function(){return e},e}function ht(){var e=(0,r.Z)(["\n border-bottom: none;\n padding-top: 15px;\n padding-right: 15px;\n // fix this min-height for the maximum number of possible virtual folders\n min-height: ","px;\n "]);return ht=function(){return e},e}var gt=(0,c.uq)({mobile:(0,o.iv)(at(),70,50),desktop:(0,o.iv)(lt(),70,50,160)}),bt=(0,c.uq)({mobile:(0,o.iv)(st(),70,50,490),desktop:(0,o.iv)(dt(),70,50)}),yt=(0,c.uq)({mobile:(0,o.iv)(ct(),g.w.neutral300),desktop:(0,o.iv)(ut())}),xt=(0,c.uq)({mobile:(0,o.iv)(pt()),desktop:(0,o.iv)(vt())}),Zt=(0,c.uq)({mobile:(0,o.iv)(ft())}),wt=(0,c.uq)({mobile:(0,o.iv)(mt(),g.w.neutral100,g.w.neutral300,g.w.neutral300),desktop:(0,o.iv)(ht(),180)}),St=function(){var e=(0,Me.D)(),n=e.activeTab,t=e.setTab,r=(0,f.gn)(),o=r.teamsTrialEndDate,a=r.userId,l=r.isTeamOrCompany,s=(0,pe.Z)().memberId,d=(0,me.Z)().canSearchPersonalFoldersAndZaps,c=(0,he.Z)(),u=c.hasSharedFolders,p=c.hasPersonalFolders,v=c.rootFoldersLoading,m=qe({canSearchPersonalFoldersAndZaps:d,isTeamOrCompany:l}).showMemberSearch,h=be({hasSharedFolders:u}),g=h.canCreateSharedFolder,b=h.showEmptySharedFolders,y=h.showReadOnlySharedFolders,x=!!s&&s!==a;return(0,i.BX)("nav",{css:[gt,y&&bt],"aria-label":"Folder list",children:[(0,i.tZ)("div",{css:yt,children:(0,i.tZ)(ot,{activeTab:n,isViewingOtherUser:x,disableCreateFolder:"personal"===n&&x,canCreateSharedFolder:!!g})}),(0,i.BX)(ge.P,{id:"sidebar",children:[(0,i.tZ)("div",{css:[xt],children:(0,i.tZ)(Ye,{isSuperAdminEnabled:d,isTeamOrCompany:!!l,setTab:t,tab:n})}),(0,i.BX)("div",{css:Zt,children:["shared"!==n&&(0,i.tZ)(Kn,{folderType:"personal",showMemberSearch:m,isTeamOrCompany:l,memberId:s,canCreateSharedFolders:!!g,canSearchPersonalFoldersAndZaps:d,isLoading:v,showEmpty:!p}),"shared"===n&&(0,i.tZ)(Kn,{folderType:"shared",isTeamOrCompany:l,memberId:s,canCreateSharedFolders:!!g,canSearchPersonalFoldersAndZaps:d,showReadOnlySharedFolders:y,showEmpty:b,hasTrialedTeams:!!o,isLoading:v})]})]}),(0,i.tZ)("ul",{css:wt,children:(0,i.tZ)(Oe,{})})]})},_t=(0,p.memo)(St),It=function(e){return e>ye.Iy?ye.Iy:e<ye.od?ye.od:e},Tt=function(){var e=(0,p.useState)(!1),n=e[0],t=e[1],r=(0,p.useRef)(0),i=(0,p.useState)(ye.kv),o=i[0],l=i[1],s=(0,a.O1)({id:"sidebar-drag"}),d=s.attributes,c=s.isDragging,u=s.listeners,v=s.setNodeRef,f=s.transform;(0,p.useEffect)((function(){var e=Number(localStorage[ye.yT])||ye.kv;e!==ye.kv&&l(e)}),[]),(0,p.useEffect)((function(){var e=It(o+(r.current||0));!n&&c&&t(!0),n&&!c&&(t(!1),l(e),localStorage[ye.yT]=e)}),[r,o,c,n]),(0,p.useEffect)((function(){c&&(null===f||void 0===f?void 0:f.x)!==r.current&&(r.current=(null===f||void 0===f?void 0:f.x)||0)}),[c,f,r]);var m=!c&&n?r.current||0:(null===f||void 0===f?void 0:f.x)||0,h=It(o+m);return{width:c||n?h:o,setNodeRef:v,listeners:u,attributes:d}};function Ct(){var e=(0,r.Z)(['\n grid-area: sidebar;\n display: grid;\n grid-gap: 20px 0;\n grid-template-areas:\n "header"\n "folders";\n grid-template-rows: 50px auto;\n grid-template-columns: auto;\n position: relative;\n padding: 20px 0;\n ']);return Ct=function(){return e},e}function Ft(){var e=(0,r.Z)(["\n width: ","px;\n box-shadow: ",";\n margin-right: 30px;\n padding-left: 20px;\n "]);return Ft=function(){return e},e}function kt(){var e=(0,r.Z)(["\n display: none;\n "]);return kt=function(){return e},e}function Bt(){var e=(0,r.Z)(['\n position: absolute;\n width: 25px;\n top: 0;\n bottom: 0;\n right: -12px;\n cursor: col-resize;\n z-index: 1;\n display: block;\n\n :after {\n content: "";\n position: absolute;\n width: 3px;\n background: ',";\n top: 0;\n bottom: 0;\n left: 50%;\n transition: background 0.1s 0.1s ease-in-out;\n }\n :hover:after {\n background: ",";\n }\n "]);return Bt=function(){return e},e}function Pt(){var e=(0,r.Z)(["\n grid-area: header;\n "]);return Pt=function(){return e},e}function Et(){var e=(0,r.Z)(["\n padding-right: 15px;\n "]);return Et=function(){return e},e}function zt(){var e=(0,r.Z)(["\n grid-area: folders;\n "]);return zt=function(){return e},e}function At(){var e=(0,r.Z)(["\n position: sticky;\n top: 25px;\n min-height: max(calc(100vh - ","px), 690px);\n z-index: 2; // make sidebar appear in front of main content\n "]);return At=function(){return e},e}var Rt=(0,c.uq)({mobile:(0,o.iv)(Ct()),desktop:(0,o.iv)(Ft(),ye.kv,ye.fB)}),Xt=(0,c.uq)({mobile:(0,o.iv)(kt()),desktop:(0,o.iv)(Bt(),g.w.neutral300,g.w.lava80)}),Ot=(0,c.uq)({mobile:(0,o.iv)(Pt()),desktop:(0,o.iv)(Et())}),qt=(0,c.uq)({mobile:(0,o.iv)(zt()),desktop:(0,o.iv)(At(),ye.Xf)}),Mt=function(){var e=Tt(),n=e.width,t=e.attributes,r=e.listeners,a=e.setNodeRef;return(0,i.BX)("div",{css:[Rt,(0,o.iv)("@media (min-width:",ye.oh,"px){width:",n,"px !important;}","MyZapsLayoutSidebar.tsx--MyZapsLayoutSidebar")],children:[(0,i.tZ)("div",{css:Ot,children:(0,i.tZ)(y.x,{tag:"h1",type:"pageHeader5",children:"Zaps"})}),(0,i.tZ)("div",{css:qt,children:(0,i.tZ)(_t,{})}),(0,i.tZ)("div",(0,A.Z)({id:"sidebar-drag",css:Xt,"aria-label":"Folder sidebar resize",ref:a},r,t))]})},Lt=(0,p.memo)(Mt);function Nt(){var e=(0,r.Z)(['\n display: grid;\n grid-template-areas:\n "sidebar"\n "main";\n ']);return Nt=function(){return e},e}function $t(){var e=(0,r.Z)(['\n grid-template-areas: "sidebar main";\n grid-template-columns: auto 1fr;\n ']);return $t=function(){return e},e}var Dt=s()((function(){return t.e(3594).then(t.bind(t,43594))}),{loadableGenerated:{webpack:function(){return[43594]}},ssr:!1}),Ht=(0,c.uq)({mobile:(0,o.iv)(Nt()),desktop:(0,o.iv)($t())}),jt=(0,o.iv)("display:flex;justify-content:center;min-height:50vh;align-items:center;","MyZapsLayout.tsx--rootLoadingStyle"),Jt=(0,o.iv)("min-width:0;grid-area:main;padding:27px 20px 20px 10px;","MyZapsLayout.tsx--contentStyle"),Ut=(0,o.iv)("max-width:",1600,"px;","MyZapsLayout.tsx--contentInnerStyle"),Qt=function(e){var n=e.children,t=(0,se.Z)().isExternalRouteLoading,r=(0,a.Dy)((0,a.VT)(a.MA,{activationConstraint:{distance:5}}),(0,a.VT)(a.LO,{activationConstraint:{delay:1e4,tolerance:0}}));return(0,i.BX)("div",{children:[(0,i.tZ)(fe,{}),(0,i.tZ)(le,{}),(0,i.tZ)(a.LB,{sensors:r,id:"dnd-context",children:(0,i.tZ)(Me.B,{children:t?(0,i.tZ)("div",{css:jt,children:(0,i.tZ)(d.$,{size:"medium"})}):(0,i.BX)("div",{css:Ht,children:[(0,i.tZ)(Lt,{}),(0,i.tZ)("section",{css:Jt,children:(0,i.tZ)("div",{css:Ut,children:n})})]})})}),(0,i.tZ)(Dt,{})]})}},816:function(e,n,t){var r=t(5632),i=t(2784),o=t(18911);n.Z=function(){var e=(0,r.useRouter)(),n=(0,i.useState)(!1),t=n[0],a=n[1],l=(0,i.useState)(!1),s=l[0],d=l[1];return(0,i.useEffect)((function(){var n=null,t=function(e){(0,o.wv)(e)?n=setTimeout((function(){a(!0)}),1e3):(d(!0),a(!1))},r=function(){n&&clearTimeout(n),a(!1),d(!1)};return e.events.on("routeChangeStart",t),e.events.on("routeChangeComplete",r),function(){n&&clearTimeout(n),e.events.off("routeChangeStart",t),e.events.off("routeChangeComplete",r)}})),{isFolderRouteLoading:t,isExternalRouteLoading:s}}},23001:function(e,n,t){t.d(n,{Z:function(){return d}});var r=t(40794),i=t(92228);function o(){var e=(0,i.Z)(["\n query AccountRestriction {\n accountRestriction {\n approval_required\n }\n }\n"]);return o=function(){return e},e}var a=(0,t(60138).Ps)(o()),l=t(35591),s=t(16181);var d=function(){var e=(0,s.gn)().isTeamOrCompany,n=(0,r.a)(a,{skip:!e,onError:function(e){(0,l.Z)("AccountRestrictionQuery",e)}}),t=n.data;return{isLoading:n.loading,isPublishApprovalEnabled:e&&((null===t||void 0===t?void 0:t.accountRestriction.approval_required)||!1)}}},58410:function(e,n,t){t.d(n,{Z:function(){return d}});var r=t(40794),i=t(35591),o=t(16181),a=t(92228);function l(){var e=(0,a.Z)(["\n query BulkActions($targetCustomuserId: ID!) {\n bulkActions(targetCustomuserId: $targetCustomuserId)\n }\n"]);return l=function(){return e},e}var s=(0,t(60138).Ps)(l()),d=function(){var e=(0,o.gn)().userId,n=(0,r.a)(s,{variables:{targetCustomuserId:e},skip:!e,onError:function(e){(0,i.Z)("BulkActionsQuery",e)}}),t=n.data,a=n.loading;return{bulkActions:null===t||void 0===t?void 0:t.bulkActions,bulkActionsLoading:a}}},47462:function(e,n,t){t.d(n,{H:function(){return d},O:function(){return s}});var r=t(92228),i=t(60138),o=t(21815);function a(){var e=(0,r.Z)(["\n ","\n ","\n\n query FoldersTree($ownerId: ID) {\n account {\n id\n foldersTree(ownerId: $ownerId) {\n ...LightBranchFolder\n ...LightBranchFolderChildren\n }\n }\n }\n"]);return a=function(){return e},e}function l(){var e=(0,r.Z)(["\n ","\n\n query VirtualFolders($ownerId: ID) {\n account {\n id\n virtualFolders(ownerId: $ownerId) {\n ...LightBranchFolder\n }\n }\n }\n"]);return l=function(){return e},e}var s=(0,i.Ps)(a(),o.ET,o.cW),d=(0,i.Ps)(l(),o.ET)},68217:function(e,n,t){t.d(n,{Z:function(){return I}});var r=t(50930),i=t(2784),o=t(73223),a=t(42051),l=t(70865),s=t(40794),d=t(35591),c=t(97523),u=t(47462),p=function(e){for(var n=e.length,t=0;t<e.length;t++){var r;n+=p((null===(r=e[t])||void 0===r?void 0:r.children)||[])}return n},v=p,f=function(e){var n=e.accountId,t=e.ownerId;return(0,s.a)(u.O,{onCompleted:function(e){if(n){var t,r=null===e||void 0===e||null===(t=e.account)||void 0===t?void 0:t.foldersTree;(0,c.dn)(Number(n),["total_root_folders","total_folders"])||(0,c.zq)(Number(n),{total_root_folders:(null===r||void 0===r?void 0:r.length)||0,total_folders:v(r)})}},onError:function(e){(0,d.Z)("FoldersTreeQuery",e)},skip:!n,variables:(0,l.Z)({},t?{ownerId:t}:{})})},m=function(e){var n=e.accountId,t=e.ownerId;return(0,s.a)(u.H,{onError:function(e){(0,d.Z)("VirtualFoldersQuery",e)},skip:!n,variables:(0,l.Z)({},t?{ownerId:t}:{})})},h=t(47497),g=t(5632),b=t(92228),y=t(60138),x=t(21815);function Z(){var e=(0,b.Z)(["\n ","\n\n query RootFolders($ownerId: ID, $swr: Boolean) {\n account(swr: $swr) {\n id\n rootFolders(ownerId: $ownerId) {\n ...RootBranchFolder\n }\n virtualFolders(ownerId: $ownerId) {\n ...RootBranchFolder\n }\n }\n }\n"]);return Z=function(){return e},e}var w=(0,y.Ps)(Z(),x.Qj),S=t(78493),_=function(){var e=(0,g.useRouter)().query.memberId||void 0,n=(0,S.Z)(w,{onError:function(e){(0,d.Z)("RootFoldersQuery",e)},variables:(0,l.Z)({},e?{ownerId:e}:{})}),t=n.data,r=n.loading;return{rootFolders:(null===t||void 0===t?void 0:t.account.rootFolders)||[],virtualFolders:(null===t||void 0===t?void 0:t.account.virtualFolders)||[],loading:r}},I=function(e){var n=e.accountId,t=e.includeDefaultFolder,l=(0,h.Z)().memberId||void 0,s=_(),d=s.rootFolders,c=s.loading,u=f({accountId:n,ownerId:l}),p=u.data,v=u.loading,g=m({accountId:n,ownerId:l}),b=g.data,y=g.loading,x=(0,i.useMemo)((function(){for(var e,i,l=(null===b||void 0===b||null===(e=b.account)||void 0===e?void 0:e.virtualFolders)||(0,a.K)(String(n||"")),s=(null===p||void 0===p||null===(i=p.account)||void 0===i?void 0:i.foldersTree)||[],c=(0,r.Z)(s.length?s:d),u=0;u<l.length;u++)String(l[u].id)!==String(o.ZJ)?c.push(l[u]):t&&c.unshift(l[u]);return c}),[p,b,n,d,t]);return{foldersTree:x,rootFoldersLoading:c,foldersTreeLoading:v,virtualFoldersLoading:y}}},42051:function(e,n,t){t.d(n,{K:function(){return r}});var r=function(e){return[{accountId:e,id:"0",isShared:!1,name:"My Zaps",ownerId:null,parentId:null,rootId:null,zapCount:1,__typename:"FolderTreeItem"},{accountId:e,id:"-1",isShared:!1,name:"Trash",ownerId:null,parentId:null,rootId:null,zapCount:1,__typename:"FolderTreeItem"}]}},47497:function(e,n,t){var r=t(70865),i=t(76635),o=t(5632),a=t(2784),l=t(52008);n.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.search,t=(0,o.useRouter)(),s=t||{},d=s.query,c=void 0===d?{}:d,u=s.pathname,p=s.push,v=(0,l.Z)(c.folderId),f=c.memberId,m=c.search||"",h=c.page?Number(c.page):void 0,g=c.searchType||"",b=c.folderType||"",y=c.ownedBy||"",x=c.details||"",Z=c.hl?(0,l.Z)(c.hl):void 0,w=c.app||"",S=c.trigger||"",_=c.connection||"",I=c.orderBy||"",T=!(m||!g||!(b||y||w||S||_||I)),C=(0,a.useCallback)((function(e,n,t){var o=(0,i.omit)((0,r.Z)({},c,e),n||[]);if(!(0,i.isEqual)(o,c)||t)return p({pathname:u,query:o,hash:t},void 0,{shallow:!0})}),[p,u,c]);return(0,a.useEffect)((function(){n&&n!==c.search&&C({search:n})}),[c,n,C]),{app:w,connection:_,details:x,emptyQuerySearch:T,folderId:v,folderType:b,highlightedFolderId:Z,memberId:f,orderBy:I,ownedBy:y,page:h,search:m,searchType:g,setParams:C,trigger:S}}},9466:function(e,n,t){var r=t(76635),i=t(73223),o=i.Ru.filter((function(e){return e!==i.ZJ}));n.Z=function(e){return!(0,r.isUndefined)(e)&&o.includes(Number(e))}},87744:function(e,n,t){t.d(n,{uq:function(){return l}});var r=t(47842),i=t(28165),o=t(73223),a={mobile:"@media (min-width: 0)",tablet:"@media (min-width: ".concat(o.rN,"px)"),desktop:"@media (min-width: ".concat(o.oh,"px)"),zapTable:"@media(min-width: ".concat(o.RI,"px)")},l=function(e){return[(0,r.Z)({},a.mobile,(0,i.iv)(e.mobile,"getResponsiveStyles.tsx--getResponsiveStyles")||{}),(0,r.Z)({},a.tablet,(0,i.iv)(e.tablet,"getResponsiveStyles.tsx--getResponsiveStyles")||{}),(0,r.Z)({},a.desktop,(0,i.iv)(e.desktop,"getResponsiveStyles.tsx--getResponsiveStyles")||{}),(0,r.Z)({},a.zapTable,(0,i.iv)(e.zapTable,"getResponsiveStyles.tsx--getResponsiveStyles")||{})]};l({mobile:{display:"inherit",visibility:"visible"},tablet:{display:"none",visibility:"hidden"},desktop:{display:"none",visibility:"hidden"}}),l({mobile:{display:"none",visibility:"hidden"},tablet:{display:"inherit",visibility:"visible"},desktop:{display:"none",visibility:"hidden"}}),l({mobile:{display:"none",visibility:"hidden"},tablet:{display:"none",visibility:"hidden"},desktop:{display:"inherit",visibility:"visible"}}),l({mobile:{display:"none",visibility:"hidden"},tablet:{display:"inherit",visibility:"visible"},desktop:{display:"inherit",visibility:"visible"}}),l({mobile:{display:"inherit",visibility:"visible"},tablet:{display:"inherit",visibility:"visible"},desktop:{display:"none",visibility:"hidden"}})}}]);
//# sourceMappingURL=4602-b684875ccefdc6df.js.map