1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="071aa0d3-4218-4f98-acc4-edb795bffd63",e._sentryDebugIdIdentifier="sentry-dbid-071aa0d3-4218-4f98-acc4-edb795bffd63")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2823],{2102:(e,t,n)=>{"use strict";n.d(t,{H:()=>m});var r=n(14232),a=n(96558),i=n(22073),o={Item:"Polaris-FormLayout__Item",grouped:"Polaris-FormLayout--grouped",condensed:"Polaris-FormLayout--condensed"};function l({children:e,condensed:t=!1}){let n=(0,i.xW)(o.Item,t?o.condensed:o.grouped);return e?r.createElement("div",{className:n},e):null}var s=n(51377),d=n(47677),c=n(68522),u=n(91930);function p({children:e,condensed:t,title:n,helpText:i}){let o,p,m=(0,r.useId)(),h=null,g=null;i&&(o=`${m}HelpText`,h=r.createElement(c.a,{id:o,color:"text-secondary"},i)),n&&(p=`${m}Title`,g=r.createElement(u.E,{id:p,as:"p"},n));let f=r.Children.map(e,e=>(0,a.ee)(e,l,{condensed:t}));return r.createElement(s.a,{role:"group",gap:"200","aria-labelledby":p,"aria-describedby":o},g,r.createElement(d.o,{gap:"300"},f),h)}let m=(0,r.memo)(function({children:e}){return r.createElement(s.a,{gap:"400"},r.Children.map(e,h))});function h(e,t){return(0,a.qL)(e,p)?e:(0,a.ee)(e,l,{key:t})}m.Group=p},12267:(e,t,n)=>{"use strict";n.d(t,{y:()=>o});var r=n(14232),a=n(53260),i=n(43272);let o=(0,r.memo)(function(e){let t=(0,r.useId)(),{showToast:n,hideToast:o}=(0,i.j)();return(0,a.h)(()=>(n({id:t,...e}),()=>{o({id:t})}),[e]),null})},18165:(e,t,n)=>{"use strict";n.d(t,{R:()=>i});var r=n(14232),a={Code:"Polaris-InlineCode__Code"};let i=({children:e})=>r.createElement("code",{className:a.Code},e)},18415:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>U});var r=n(37876),a=n(14232),i=n(52573),o=n(85101),l=n(79280),s=n(88158),d=n(35534),c=n(38937),u=n(26805),p=n(67307),m=n(55645),h=n(75773),g=n(2102),f=n(48110),v=n(47677),x=n(36013);let y=()=>{let{values:{newValue:e}}=(0,c.j7)();return(0,r.jsxs)(m.P.AnnotatedSection,{title:"Event Details",children:[(0,r.jsx)(h.u,{children:(0,r.jsx)(h.u.Section,{children:(0,r.jsxs)(g.H,{children:[(0,r.jsxs)(g.H.Group,{children:[(0,r.jsx)(s.A,{name:"newValue.title",label:"Title",component:f.A,disabled:!0,autoComplete:""}),(0,r.jsx)(s.A,{name:"newValue.memberInfo.firstName",label:"Creator",component:f.A,disabled:!0,autoComplete:""})]}),(0,r.jsx)(s.A,{name:"newValue.description",label:"Description",component:p.A,isRequired:!0,conversionRequired:!0})]})})}),(0,r.jsx)(h.u,{title:"Image",children:(0,r.jsx)(h.u.Section,{children:(0,r.jsxs)(g.H,{children:[(0,r.jsxs)(v.o,{align:"center",blockAlign:"center",gap:"100",wrap:!0,children:[(0,r.jsx)(s.A,{component:d.A,name:"newValue.imageUrl",mapProps:e=>{let{value:t,onChange:n}=e;return{...e,value:{url:t||"https://cdn-test.goodcompany.org/unknown/tset.png",source:""},onChange:e=>{n&&n(e.url)}}},enableSearch:!0,hideFadedPreview:!0}),(0,r.jsx)(u.A,{recHeight:"375",recWidth:"650"})]}),(0,r.jsx)("br",{})]})})}),(0,r.jsx)(h.u,{title:"Charities",subdued:!0,children:(0,r.jsxs)(h.u.Section,{children:[(0,r.jsx)("br",{}),(0,r.jsx)(v.o,{align:"center",gap:"400",wrap:!0,children:(0,r.jsx)(g.H,{children:e.charities.map((e,t)=>(0,r.jsx)(x.B,{type:"bullet",children:(0,r.jsx)(x.B.Item,{children:e.name})},"charity-".concat(t)))})}),(0,r.jsx)("br",{})]})}),(0,r.jsx)(h.u,{children:(0,r.jsx)(h.u.Section,{children:(0,r.jsxs)(g.H,{children:[(0,r.jsxs)(g.H.Group,{children:[(0,r.jsx)(s.A,{component:f.A,name:"newValue.target",label:"Target",disabled:!0,prefix:"$",autoComplete:""}),(0,r.jsx)(s.A,{component:f.A,name:"newValue.offlineDateTime",label:"Offline Date",disabled:!0,autoComplete:""})]}),(0,r.jsx)("br",{})]})})})]})};var b=n(91930),j=n(18165),w=n(80407);let _=e=>{let{status:t,name:n}=e;return(0,r.jsx)(m.P.AnnotatedSection,{title:"Event Status",children:(0,r.jsx)(h.u,{children:(0,r.jsx)(h.u.Section,{children:(0,r.jsxs)(v.o,{align:"space-between",gap:"400",children:[(0,r.jsxs)(b.E,{as:"span",fontWeight:"medium",children:["Event: ",(0,r.jsx)(j.R,{children:"".concat(n).substring(0,30)})]}),(0,r.jsx)(w.E,{tone:"info",children:t})]})})})})};
1var C=n(45161),S=n.n(C),A=n(82404);let E=e=>{var t,n;let{newValue:a,oldValue:i}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.u,{children:(0,r.jsx)(S(),{oldValue:"".concat(null==i?void 0:i.title),newValue:"".concat(a.title),compareMethod:C.DiffMethod.WORDS,hideLineNumbers:!0,showDiffOnly:!1,splitView:!0,leftTitle:"Old Title",rightTitle:"New Title"})}),(0,r.jsx)(h.u,{children:(0,r.jsx)(S(),{oldValue:"".concat(null==i||null==(t=i.memberInfo)?void 0:t.firstName),newValue:"".concat(null==a||null==(n=a.memberInfo)?void 0:n.firstName),compareMethod:C.DiffMethod.WORDS,hideLineNumbers:!0,showDiffOnly:!1,splitView:!0,leftTitle:"Old Creator",rightTitle:"New Creator"})}),(0,r.jsx)(h.u,{children:(null==i?void 0:i.description)!==a.description?(0,r.jsx)(S(),{oldValue:null==i?void 0:i.description,newValue:null==a?void 0:a.description,compareMethod:C.DiffMethod.WORDS,hideLineNumbers:!0,showDiffOnly:!1,splitView:!0,leftTitle:"Old Description",rightTitle:"New Description"}):(0,r.jsx)(h.u.Section,{children:(0,r.jsx)(v.o,{align:"center",children:(0,r.jsx)(b.E,{as:"span",children:"Description Unchanged"})})})}),(0,r.jsx)(h.u,{children:(0,r.jsx)(A.EW,{itemOne:(0,r.jsx)(A.D4,{src:"".concat(null==i?void 0:i.imageUrl)||"https://cdn-test.goodcompany.org/unknown/tset.png",alt:"Old Image"}),itemTwo:(0,r.jsx)(A.D4,{src:"".concat(a.imageUrl),alt:"New Image"})})}),(0,r.jsx)(h.u,{children:(0,r.jsx)(S(),{oldValue:"".concat(null==i?void 0:i.charities.map(e=>"".concat(e.name))),newValue:"".concat(a.charities.map(e=>"".concat(e.name))),compareMethod:C.DiffMethod.WORDS,hideLineNumbers:!0,showDiffOnly:!1,splitView:!0,leftTitle:"Old Charities",rightTitle:"New Charities"})}),(0,r.jsx)(h.u,{children:(0,r.jsx)(S(),{oldValue:"".concat(null==i?void 0:i.target),newValue:"".concat(a.target),compareMethod:C.DiffMethod.WORDS,hideLineNumbers:!0,showDiffOnly:!1,splitView:!0,leftTitle:"Old Target",rightTitle:"New Target"})}),(0,r.jsx)(h.u,{children:(0,r.jsx)(S(),{oldValue:"".concat(null==i?void 0:i.offlineDate),newValue:"".concat(a.offlineDate),compareMethod:C.DiffMethod.WORDS,hideLineNumbers:!0,showDiffOnly:!1,splitView:!0,leftTitle:"Old Offline Date",rightTitle:"New Offline Date"})})]})};var k=n(12267),L=n(77005),D=n(52387);let N=e=>{var t;let{onSaveError:n,saved:i,toggleSave:s,onApprove:d,onDeny:u,validate:p}=e,[m,h]=(0,a.useState)({approveModel:!1,denyModel:!1}),{values:g}=(0,c.j7)(),f=i?(0,r.jsx)(k.y,{content:n?"Error occurred":"Saved",onDismiss:s}):void 0,x=async e=>{await p()&&h(t=>({...t,[e]:!t[e]}))};return(0,r.jsx)(l.A.Slide,{id:"",fields:["oldValue","newValue"],submit:()=>!0,children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_,{name:g.newValue.title,status:g.approvalStatus}),"Update"===g.actionType&&g.oldValue&&g.newValue&&(0,r.jsx)(E,{newValue:g.newValue,oldValue:g.oldValue}),(0,r.jsx)(y,{}),f,n&&(0,r.jsx)(L.lZ,{tone:"critical",children:n}),("ApprovalFailed"===g.approvalStatus||"DenialFailed"===g.approvalStatus)&&(null==(t=g.resultMessages)?void 0:t.length)>0&&(0,r.jsx)(L.lZ,{tone:"critical",title:"This content request failed",children:g.resultMessages[g.resultMessages.length-1].value}),(0,r.jsx)("br",{}),("AwaitingResponse"===g.approvalStatus||"ApprovalFailed"===g.approvalStatus||"DenialFailed"===g.approvalStatus)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(v.o,{align:"end",blockAlign:"center",gap:"200",children:[(0,r.jsx)(D.$,{onClick:()=>x("denyModel"),children:"Deny"}),(0,r.jsx)(D.$,{onClick:()=>x("approveModel"),variant:"primary",children:"Update and Approve"})]}),(0,r.jsx)(o.A,{open:m.approveModel,onClose:()=>x("approveModel"),text:"Are you sure you want to approve this content?",onDelete:()=>{x("approveModel"),null==d||d()}},"approveModel"),(0,r.jsx)(o.A,{open:m.denyModel,onClose:()=>x("denyModel"),text:"Are you sure you want to deny this content?",onDelete:()=>{x("denyModel"),u()}},"denyModel")]})]})})};var V=n(89099),R=n(29516),T=n(13737);let M=T.Ik().shape({newValue:T.Ik().shape({description:T.Yj()})});var P=n(98473),O=n(99772),I=n(81199),W=n(55608),F=n(52454);let B=e=>{let{id:t}=e,[n,o]=(0,a.useState)({loading:!0,spinnerLoading:!1,errorMessage:void 0,data:void 0,saved:!1}),s=(0,V.useRouter)();(0,a.useEffect)(()=>{d()},[]);let d=async()=>{try{let e=await (0,i.J6)(t);o(t=>({...t,loading:!1,data:e}))}catch(e){o(t=>({...t,loading:!1,errorMessage:e.message}))}},c=()=>{o(e=>({...e,saved:!e.saved}))},u=async e=>{try{e.denied?(o(e=>({...e,spinnerLoading:!0})),await (0,i.s9)(t)):(o(e=>({...e,spinnerLoading:!0})),await (0,i.tK)(t,{contentDomain:e.contentDomain,fundraisingEvent:e.newValue,hasContentChangedByApprover:e.hasContentChangedByApprover})),o({...n,saved:!n.saved}),s.push("/".concat((0,F.JJ)(),"/admin/backoffice/content-approval"))}catch(e){o({...n,spinnerLoading:!1,onSaveError:e})}};return(0,r.jsx)(R.yB,{title:"Fundraising Event",adminArea:"backoffice",loading:n.loading,errorMessage:n.errorMessage,showSpinnerLoading:n.spinnerLoading,backAction:{content:"Content Approval",url:"/admin/backoffice/content-approval"},children:(0,r.jsx)(m.P,{sectioned:!0,children:(0,r.jsx)(l.A,{schema:M,defaultData:function(){var e,t,r,a,i;let{data:o}=n;return{...o,oldValue:o&&o.proposedContent&&o.proposedContent.oldValue&&{...o.proposedContent.oldValue,offlineDateTime:(0,W.ae)(o.proposedContent.oldValue.offlineDate,"dS mmmm, yyyy"),imageUrl:(null==(e=o.proposedContent.oldValue)?void 0:e.imageUrl)===null?"":null==(t=o.proposedContent.oldValue)?void 0:t.imageUrl},newValue:(null==o||null==(r=o.proposedContent)?void 0:r.newValue)&&{...o.proposedContent.newValue,offlineDateTime:(0,W.ae)(o.proposedContent.newValue.offlineDate,"dS mmmm, yyyy"),imageUrl:(null==(a=o.proposedContent.newValue)?void 0:a.imageUrl)===null?"":null==(i=o.proposedContent.newValue)?void 0:i.imageUrl}}}(),onAfterValidate:()=>{},onSubmit:u,children:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(P.A,{formikProps:e,headerOffset:200}),(0,r.jsx)(N,{...n,toggleSave:c,onApprove:()=>{e.setFieldValue("hasContentChangedByApprover",e.dirty),e.submitForm(
1)},onDeny:()=>{e.setFieldValue("denied",!0),e.submitForm()},validate:async()=>(await e.validateForm(),e.isValid)})]})})})})};B.getInitialProps=async e=>({id:e.query.id});let U=(0,O.Y)(I.x.BackOffice_ManageCharities)(B)},26805:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(37876),a=n(91930);n(14232);let i=e=>{let{recWidth:t,recHeight:n,pdfAccept:i}=e;return n&&t?(0,r.jsx)(a.E,{as:"span",variant:"headingSm",fontWeight:"medium",children:" accepts jpg/png/gif/bmp, recommended ratio minimum width and height of ".concat(t,"px\n * ").concat(n,"px, max 6mb ").concat(i?" - accepts PDF files":"")}):(0,r.jsx)(a.E,{as:"span",variant:"headingSm",fontWeight:"medium",children:" accepts jpg/png/gif/bmp, for optimal results, please use a landscape image ".concat(i?" - accepts PDF files":"")})}},29516:(e,t,n)=>{"use strict";n.d(t,{Lw:()=>x,yB:()=>r.A});var r=n(54182),a=n(37876),i=n(14232);n(20994),n(72248);var o=n(15039),l=n.n(o),s=n(91930),d=n(52387),c=n(20091),u=n(44264),p=n(79816);let m=u.Ay.div.withConfig({componentId:"sc-13b73589-0"})(["background-color:#ffffff;position:fixed;z-index:400;top:5.1428571rem;right:0;left:0;"]),h=e=>{let{titleList:t,selected:n,hidePreviousButton:r,onClickBack:i,onNavigate:o}=e,l=t.map(e=>{let{id:t,title:n}=e;return{id:String(t),label:n}}),s=null!=n?String(n):l.length>0?l[0].id:void 0;return(0,a.jsx)(m,{children:(0,a.jsx)(p.A,{onClickBack:i,onNavigate:o,stepList:l,currentStep:s,hideLeftButton:r})})};var g=n(88062),f=n(29530),v=n.n(f);let x=e=>{let{actions:t,onPrevious:n,onNext:r,children:o,showTopCard:u,titleList:p,pageIndex:m,topTitle:f,tipsOpen:x,onCloseTips:y,hidePreviousButton:b=!1}=e,j=(0,i.useContext)(g.f5);return(0,a.jsxs)(i.Fragment,{children:[(0,a.jsx)(c.TD,{}),(0,a.jsxs)("header",{className:v().header,children:[(0,a.jsx)("div",{className:v().logoContainer,children:(0,a.jsx)("a",{href:"/","aria-label":"Home",children:(0,a.jsx)("img",{className:v().logoImage,src:j.getLogoUrl(),height:60,alt:"Logo"})})}),(0,a.jsx)("div",{className:v().progressContainer,children:(0,a.jsx)(s.E,{as:"h1",fontWeight:"medium",children:f})}),(0,a.jsx)("div",{className:v().actionsContainer,children:null==t?void 0:t.map((e,t)=>(0,a.jsx)(d.$,{onClick:e.onAction,url:e.url,target:e.external?"_blank":void 0,tone:e.destructive?"critical":void 0,disabled:e.disabled,icon:e.icon,children:e.content},t))})]}),u&&0!=m&&(0,a.jsx)(h,{onClickBack:n,onNavigate:r,titleList:p,selected:m,hidePreviousButton:b}),(0,a.jsxs)("main",{className:l()(v().main,0===m&&v().extraPadding),children:[(0,a.jsx)("div",{className:v().pageControl,children:!1}),(0,a.jsx)("div",{className:v().pageContent,children:o}),(0,a.jsx)("div",{className:v().pageControl,children:!1})]})]})}},29530:e=>{e.exports={logoContainer:"CreateScreenLayout_logoContainer__2fp5V",progressContainer:"CreateScreenLayout_progressContainer__4DD_0",progressBar:"CreateScreenLayout_progressBar__xgvqz",actionsContainer:"CreateScreenLayout_actionsContainer__8_h8E",main:"CreateScreenLayout_main__p0uYF",pageControl:"CreateScreenLayout_pageControl__B_bMn",pageControlButton:"CreateScreenLayout_pageControlButton__f9iHq",pageContent:"CreateScreenLayout_pageContent__bnc4p",hide:"CreateScreenLayout_hide__Rxh8m",extraPadding:"CreateScreenLayout_extraPadding__yrr_a",logoImage:"CreateScreenLayout_logoImage__5b_HQ",header:"CreateScreenLayout_header__hAzxV",skeletonShimmerAnimation:"CreateScreenLayout_skeletonShimmerAnimation__R5i4z"}},36013:(e,t,n)=>{"use strict";n.d(t,{B:()=>o});var r=n(14232),a=n(22073),i={List:"Polaris-List",typeNumber:"Polaris-List--typeNumber",Item:"Polaris-List__Item",spacingLoose:"Polaris-List--spacingLoose"};let o=function({children:e,gap:t="loose",type:n="bullet"}){let o=(0,a.xW)(i.List,t&&i[(0,a.Ny)("spacing",t)],n&&i[(0,a.Ny)("type",n)]),l="bullet"===n?"ul":"ol";return r.createElement(l,{className:o},e)};o.Item=function({children:e}){return r.createElement("li",{className:i.Item},e)}},54095:(e,t,n)=>{"use strict";n.d(t,{T:()=>o});var r=n(14232),a=n(22073),i={TextContainer:"Polaris-TextContainer",spacingTight:"Polaris-TextContainer--spacingTight",spacingLoose:"Polaris-TextContainer--spacingLoose"};function o({spacing:e,children:t}){let n=(0,a.xW)(i.TextContainer,e&&i[(0,a.Ny)("spacing",e)]);return r.createElement("div",{className:n},t)}},55645:(e,t,n)=>{"use strict";n.d(t,{P:()=>c});var r=n(14232),a={Layout:"Polaris-Layout",Section:"Polaris-Layout__Section","Section-fullWidth":"Polaris-Layout__Section--fullWidth","Section-oneHalf":"Polaris-Layout__Section--oneHalf","Section-oneThird":"Polaris-Layout__Section--oneThird",AnnotatedSection:"Polaris-Layout__AnnotatedSection",AnnotationWrapper:"Polaris-Layout__AnnotationWrapper",AnnotationContent:"Polaris-Layout__AnnotationContent",Annotation:"Polaris-Layout__Annotation"},i=n(54095),o=n(91930),l=n(68522),s=n(22073);function d({children:e,variant:t}){let n=(0,s.xW)(a.Section,a[`Section-${t}`]);return r.createElement("div",{className:n},e)}let c=function({sectioned:e,children:t}){let n=e?r.createElement(d,null,t):t;return r.createElement("div",{className:a.Layout},n)};c.AnnotatedSection=function({children:e,title:t,description:n,id:s}){let d="string"==typeof n?r.createElement(o.E,{as:"p",variant:"bodyMd"},n):n;return r.createElement("div",{className:a.AnnotatedSection},r.createElement("div",{className:a.AnnotationWrapper},r.createElement("div",{className:a.Annotation},r.createElement(i.T,{spacing:"tight"},r.createElement(o.E,{id:s,variant:"headingMd",as:"h2"},t),d&&r.createElement(l.a,{color:"text-secondary"},d))),r.createElement("div",{className:a.AnnotationContent},e)))},c.Section=d},56817:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/backoffice/content-approval/[id]/fundraising/event",function(){return n(18415)}])},67307:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(37876),a=n(14232),i=n(18847),o=n.n(i),l=n(77344),s=n.n(l),d=n(9348),c=n.n(d),u=n(21013),p=n(51377),m=n(91930),h=n(44576),g=n(12267),f=n(41944);let v=e=>{let{value:t,id:i,error:l,placeholder:d,isRequired:v=!1,conversionRequired:x=!1,convertPermanent:y=!1,readonly:b,label:j,minHeight:w,contentWidth:_,mention:C,onChange:S,onFocus:A}=e,[E,k]=(0,a.useState)(t||""),[L,D]=(0,a.useState)(x),[N,V]=(0,a.useState)(!1),R=(0,a.useMemo)(()=>o()(async()=>n.e(764).then(n.bind(n,80764)).then(e=>
1e.Editor),{loadableGenerated:{webpack:()=>[80764]},ssr:!1}),[]);(0,a.useEffect)(()=>{if(!t)return void k("");if(t&&L||t&&y){D(!1);let e=C?t.replace(/@(?=\{\{)/g,""):t;k((0,u.AD)(e)&&c().toHTML(e)?c().toHTML(e):e)}},[t,L,y,C]);let T=C?"editor-with-mentions":"editor-basic";return(0,r.jsxs)(p.a,{gap:"100",children:[j&&(0,r.jsx)(m.E,{as:"span",children:j}),(0,r.jsx)("div",{className:v&&!t&&l?s().error:s().shrink,children:(0,r.jsx)(R,{tinymceScriptSrc:"/tinymce/tinymce.min.js",value:E,init:{license_key:"gpl",menubar:!1,convert_urls:!1,plugins:["link","lists","emoticons","autolink","autosave","wordcount","image"],automatic_uploads:!0,image_dimensions:!_,images_upload_handler:async e=>{try{let t=e.blob(),n=new File([t],e.filename(),{type:t.type}),r=await (0,f.imageUpload)(n,"backoffice");if(!(null==r?void 0:r.url))throw Error("Image upload failed");return r.url}catch(e){throw V(!0),Error("Image upload failed")}},toolbar:"undo redo | bold italic underline | bullist numlist | alignleft aligncenter alignright alignjustify | link image emoticons | removeformat",branding:!1,statusbar:!1,placeholder:d,min_height:w||160,readonly:!!b,content_style:"\n .email-template-token {\n color: #1f6feb;\n font-weight: 600;\n }\n ".concat(_?"body { max-width: ".concat(_,"px; margin: 0 auto; } img { max-width: 100%; height: auto; }"):"","\n "),setup:e=>{var t;if(_){let t=e=>{let t=parseInt(e.attr("width")||"",10);if(t&&t<=_)return;e.attr("width",String(_)),e.attr("height",void 0);let n=(e.attr("style")||"").replace(/(width|height)\s*:\s*[\d.]+px;?/gi,"").trim();e.attr("style","".concat(n).concat(n&&!n.endsWith(";")?";":""," height: auto;").trim())};e.on("init",()=>{e.parser.addNodeFilter("img",e=>e.forEach(t)),e.serializer.addNodeFilter("img",e=>e.forEach(t))})}e.on("keydown",t=>{if("Backspace"!==t.key&&8!==t.keyCode)return;let n=e.selection,r=e.dom;if(!n.isCollapsed())return;let a=n.getNode(),i=r.getParent(a,"span.email-template-token");if(i){t.preventDefault(),n.select(i),n.setContent("");return}let o=n.getRng().startContainer;if(o&&3===o.nodeType){let e=o.nodeValue||"";if(/^\s*\{\{[^}]+\}\}\s*$/.test(e)){t.preventDefault();let e=r.createRng();e.setStart(o,0),e.setEnd(o,o.length),n.setRng(e),n.setContent("")}}}),C&&(null==(t=C.suggestions)?void 0:t.length)&&e.ui.registry.addAutocompleter("emailTemplateTokens",{trigger:C.trigger||"@",minChars:0,onAction:(t,n,r)=>{e.selection.setRng(n),e.insertContent(r),t.hide()},fetch:e=>{let t=e.toLowerCase();return Promise.resolve(C.suggestions.filter(e=>!t||e.text.toLowerCase().includes(t)).map(e=>({type:"autocompleteitem",value:'<span class="email-template-token">'.concat(e.value,"</span>"),text:e.text})))}})}},onEditorChange:e=>{k(e),S(e.replace(/<[^>]+>/g,"").trim()?e:"",i)},onFocus:A},T)}),v&&!t&&(0,r.jsx)(h.W,{message:l,fieldID:""}),N&&(0,r.jsx)(g.y,{content:"Image upload failed. Please try again.",error:!0,onDismiss:()=>V(!1)})]})}},72248:e=>{e.exports={header:"minimal_header__XpFdq",main:"minimal_main__ZyzSJ",pageContent:"minimal_pageContent__Mj_hS",skeletonShimmerAnimation:"minimal_skeletonShimmerAnimation__EZC7x"}},77344:e=>{e.exports={shrink:"draftjs-editor_shrink__dVObq",error:"draftjs-editor_error__shi__",editor:"draftjs-editor_editor__yGsOg",skeletonShimmerAnimation:"draftjs-editor_skeletonShimmerAnimation__SQ4_X"}},79280:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(37876),a=n(14232),i=n(29016),o=n(6922);let l=a.createContext({validateStep:()=>Promise.resolve(!0)});class s extends a.Component{render(){let{defaultData:e,schema:t,onSubmit:n,children:a,historyManager:s,onAfterValidate:d}=this.props;return(0,r.jsx)(i.sQ,{start:"",historyManager:s,children:i=>{let{currentSlide:s}=i;return(0,r.jsx)(o.Si,{defaultData:e,schema:t,currentPage:s,onSubmit:n,onAfterValidate:d,children:e=>{let{validateStep:t,...n}=e;return(0,r.jsx)(l.Provider,{value:{validateStep:t},children:a(n)})}})}})}}s.Slide=function(e){let{fields:t,children:n,id:a,submit:s=!1}=e;return(0,r.jsx)(l.Consumer,{children:e=>{let{validateStep:l}=e;return(0,r.jsx)(o.Si.Page,{id:a,fields:t,submit:s,children:(0,r.jsx)(i.q7,{id:a,singleSlide:!0,onBeforeNavigate:l,children:n})})}})}}
1,82404:(e,t,n)=>{"use strict";n.d(t,{D4:()=>f,EW:()=>g});var r=n(14232),a=n(37876),i=(0,r.forwardRef)(({transition:e,...t},n)=>{let r={position:"absolute",top:0,left:0,width:"100%",height:"100%",transition:e?`clip-path ${e}`:void 0,userSelect:"none",willChange:"clip-path, transition",KhtmlUserSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none"};return(0,a.jsx)("div",{...t,style:r,"data-rcs":"clip-item",ref:n})});i.displayName="ContainerClip";var o=(0,r.forwardRef)(({children:e,disabled:t,portrait:n,position:r,transition:i},o)=>{let l={position:"absolute",top:0,width:n?"100%":void 0,height:n?void 0:"100%",background:"none",border:0,padding:0,pointerEvents:"all",appearance:"none",WebkitAppearance:"none",MozAppearance:"none",outline:0,transform:n?"translate3d(0, -50% ,0)":"translate3d(-50%, 0, 0)",transition:i?`${n?"top":"left"} ${i}`:void 0};return(0,a.jsx)("button",{ref:o,"aria-label":"Drag to move or focus and use arrow keys","aria-orientation":n?"vertical":"horizontal","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r,"data-rcs":"handle-container",disabled:t,role:"slider",style:l,children:e})});o.displayName="ThisHandleContainer";var l=({flip:e})=>(0,a.jsx)("div",{className:"__rcs-handle-arrow",style:{width:0,height:0,borderTop:"8px solid transparent",borderRight:"10px solid",borderBottom:"8px solid transparent",transform:e?"rotate(180deg)":void 0}}),s=({className:e="__rcs-handle-root",disabled:t,buttonStyle:n,linesStyle:r,portrait:i,style:o,...s})=>{let d={display:"flex",flexDirection:i?"row":"column",placeItems:"center",height:"100%",cursor:t?"not-allowed":i?"ns-resize":"ew-resize",pointerEvents:"none",color:"#fff",...o},c={flexGrow:1,height:i?2:"100%",width:i?"100%":2,backgroundColor:"currentColor",pointerEvents:"auto",boxShadow:"0 0 4px rgba(0,0,0,.5)",...r},u={display:"grid",gridAutoFlow:"column",gap:8,placeContent:"center",flexShrink:0,width:56,height:56,borderRadius:"50%",borderStyle:"solid",borderWidth:2,pointerEvents:"auto",backdropFilter:"blur(7px)",WebkitBackdropFilter:"blur(7px)",backgroundColor:"rgba(0, 0, 0, 0.125)",boxShadow:"0 0 4px rgba(0,0,0,.35)",transform:i?"rotate(90deg)":void 0,...n};return(0,a.jsxs)("div",{...s,className:e,style:d,children:[(0,a.jsx)("div",{className:"__rcs-handle-line",style:c}),(0,a.jsxs)("div",{className:"__rcs-handle-button",style:u,children:[(0,a.jsx)(l,{}),(0,a.jsx)(l,{flip:!0})]}),(0,a.jsx)("div",{className:"__rcs-handle-line",style:c})]})},d=(e=>(e.ARROW_LEFT="ArrowLeft",e.ARROW_RIGHT="ArrowRight",e.ARROW_UP="ArrowUp",e.ARROW_DOWN="ArrowDown",e))(d||{}),c=(e,t,n,a)=>{let i=(0,r.useRef)();(0,r.useEffect)(()=>{i.current=t},[t]),(0,r.useEffect)(()=>{if(!(n&&n.addEventListener))return;let t=e=>i.current&&i.current(e);return n.addEventListener(e,t,a),()=>{n.removeEventListener(e,t,a)}},[e,n,a])},u="u">typeof window&&"u">typeof window.document&&"u">typeof window.document.createElement?r.useLayoutEffect:r.useEffect,p={capture:!1,passive:!0},m={capture:!0,passive:!1},h=e=>{e.preventDefault(),e.currentTarget.focus()},g=(0,r.forwardRef)(({boundsPadding:e=0,browsingContext:t=globalThis,changePositionOnHover:n=!1,disabled:l=!1,handle:g,itemOne:f,itemTwo:v,keyboardIncrement:x="5%",onlyHandleDraggable:y=!1,onPositionChange:b,portrait:j=!1,position:w=50,style:_,transition:C,...S},A)=>{let E=(0,r.useRef)(null),k=(0,r.useRef)(null),L=(0,r.useRef)(null),D=(0,r.useRef)(w),[N,V]=(0,r.useState)(!1),[R,T]=(0,r.useState)(!0),M=(0,r.useRef)(!1),[P,O]=(0,r.useState)(),I=(e=>{let t=(0,r.useRef)(e);return(0,r.useEffect)(()=>{t.current=e}),t.current})(w),W=(0,r.useCallback)(function({x:n,y:r,isOffset:a}){let i=E.current,o=L.current,l=k.current,{width:s,height:d,left:c,top:u}=i.getBoundingClientRect();if(0===s||0===d)return;let p=Math.min(Math.max((j?a?r-u-t.scrollY:r:a?n-c-t.scrollX:n)/(j?d:s)*100,0),100),m=j?d/(i.offsetHeight||1):s/(i.offsetWidth||1),h=e*m/(j?d:s)*100,g=Math.min(Math.max(p,h*m),100-h*m);D.current=p,o.setAttribute("aria-valuenow",`${Math.round(D.current)}`),o.style.top=j?`${g}%`:"0",o.style.left=j?"0":`${g}%`,l.style.clipPath=j?`inset(${g}% 0 0 0)`:`inset(0 0 0 ${g}%)`,b&&b(D.current)},[e,b,j,t]);(0,r.useEffect)(()=>{let{width:e,height:t}=E.current.getBoundingClientRect(),n=w===I?D.current:w;W({x:e/100*n,y:t/100*n})},[e,w,j,I,W]);let F=(0,r.useCallback)(e=>{e.preventDefault(),l||0!==e.button||(W({isOffset:!0,x:e.pageX,y:e.pageY}),V(!0),T(!0))}
1,[l,W]),B=(0,r.useCallback)(function(e){W({isOffset:!0,x:e.pageX,y:e.pageY}),T(!1)},[W]),U=(0,r.useCallback)(()=>{V(!1),T(!0)},[]),H=(0,r.useCallback)(({width:e,height:t})=>{let{width:n,height:r}=E.current.getBoundingClientRect();W({x:e/100*D.current*n/e,y:t/100*D.current*r/t})},[W]),z=(0,r.useCallback)(e=>{if(!Object.values(d).includes(e.key))return;e.preventDefault(),T(!0);let{top:t,left:n}=L.current.getBoundingClientRect(),{width:r,height:a}=E.current.getBoundingClientRect(),i="string"==typeof x?parseFloat(x):x/r*100,o=Math.min(Math.max((j?"ArrowLeft"===e.key||"ArrowDown"===e.key:"ArrowRight"===e.key||"ArrowUp"===e.key)?D.current+i:D.current-i,0),100);W({x:j?n:r*o/100,y:j?a*o/100:t})},[x,j,W]);(0,r.useEffect)(()=>{O(y?L.current:E.current)},[y]),(0,r.useEffect)(()=>{let e=E.current,t=()=>{N||U()};return n&&(e.addEventListener("pointermove",B,p),e.addEventListener("pointerleave",t,p)),()=>{e.removeEventListener("pointermove",B),e.removeEventListener("pointerleave",t)}},[n,B,U,N]),(0,r.useEffect)(()=>(N&&!M.current&&(t.addEventListener("pointermove",B,p),t.addEventListener("pointerup",U,p),M.current=!0),()=>{M.current&&(t.removeEventListener("pointermove",B),t.removeEventListener("pointerup",U),M.current=!1)}),[B,U,N,t]),(0,r.useImperativeHandle)(A,()=>({rootContainer:E.current,handleContainer:L.current,setPosition(e){let{width:t,height:n}=E.current.getBoundingClientRect();W({x:t/100*e,y:n/100*e})}}),[W]),((e,t)=>{let n=(0,r.useRef)(),a=(0,r.useCallback)(()=>{e.current&&n.current&&n.current.observe(e.current)},[e]);u(()=>(n.current=new ResizeObserver(([e])=>t(e.contentRect)),a(),()=>{n.current&&n.current.disconnect()}),[t,a])})(E,H),c("keydown",z,L.current,m),c("click",h,L.current,m),c("pointerdown",F,P,m);let $=g||(0,a.jsx)(s,{disabled:l,portrait:j}),q=R?C:void 0,Y={position:"relative",display:"flex",overflow:"hidden",cursor:N?j?"ns-resize":"ew-resize":void 0,touchAction:"none",userSelect:"none",KhtmlUserSelect:"none",msUserSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",..._};return(0,a.jsxs)("div",{...S,ref:E,style:Y,"data-rcs":"root",children:[f,(0,a.jsx)(i,{ref:k,transition:q,children:v}),(0,a.jsx)(o,{disabled:l,portrait:j,position:Math.round(D.current),ref:L,transition:q,children:$})]})});g.displayName="ReactCompareSlider";var f=(0,r.forwardRef)(({style:e,...t},n)=>{let r=(({boxSizing:e="border-box",objectFit:t="cover",objectPosition:n="center center",...r}={})=>({display:"block",width:"100%",height:"100%",maxWidth:"100%",boxSizing:e,objectFit:t,objectPosition:n,...r}))(e);return(0,a.jsx)("img",{ref:n,...t,style:r,"data-rcs":"image"})});f.displayName="ReactCompareSliderImage"},85101:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(37876),a=n(62557),i=n(51377);let o=n(44264).Ay.p.withConfig({componentId:"sc-d7bb092a-0"})(["margin-right:10px;"]),l=e=>{let{title:t,text:n,open:l,primaryText:s,secondaryText:d,hideSecondaryAction:c,forceClose:u,onDelete:p,onClose:m}=e;return(0,r.jsx)(a.a,{open:l,onClose:u||m,title:t,primaryAction:{content:s||"Yes",onAction:p},secondaryActions:!c&&[{content:d||"No",onAction:m}],children:(0,r.jsx)(a.a.Section,{children:(0,r.jsx)(i.a,{children:(0,r.jsx)(o,{children:(0,r.jsx)("p",{children:n})})})})})}},99772:(e,t,n)=>{"use strict";n.d(t,{Y:()=>d});var r=n(52573),a=n(6849),i=n(67948),o=n(52454),l=n(53965);let s=async e=>{let t=await r.LN(e.req),n=(await (0,o.KU)(l.RootClient,e.req)).getRoot(),i=(await n).currentSite.features;return[...(0,a.bJ)(t)?[]:t.items,...i]},d=(0,i.Lu)(s)}},e=>{e.O(0,[2026,9879,6989,4751,8174,9830,3266,2402,6896,4905,909,2507,4182,9763,2573,6117,636,6593,8792],()=>e(e.s=56817)),_N_E=e.O()}]); 2//# sourceMappingURL=event-2ddf4d5a3a482b0d.js.map
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.