"use strict";(self.webpackChunkcircle=self.webpackChunkcircle||[]).push([[6106],{3985:(e,t,r)=>{r.d(t,{F:()=>i});var n=r(85893),i=function(e){var t=e.size,r=void 0===t?104:t;return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:r,viewBox:"0 0 72 72",fill:"none","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:"36",cy:"36",r:"36",fill:"#008A2F"}),(0,n.jsx)("path",{d:"M46.8078 25.4865C47.8595 24.4241 49.5707 24.4179 50.6299 25.4727C51.5929 26.4315 51.6855 27.9371 50.9043 29.0011L50.6437 29.306L33.6105 46.5134C32.6524 47.4812 31.1474 47.5722 30.0866 46.7842L29.7826 46.5215L21.364 38.0884C20.3079 37.0305 20.3069 35.3142 21.3617 34.255C22.3206 33.2921 23.822 33.2037 24.8805 33.9904L25.1838 34.2527L31.6851 40.7603L46.8078 25.4865Z",fill:"white"})]})}},85516:(e,t,r)=>{r.d(t,{u:()=>u});var n=r(3985),i=r(85893),o=function(){return(0,i.jsxs)("svg",{width:"104",height:"104",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("circle",{cx:"32",cy:"32",r:"32",fill:"#E02F2F"}),(0,i.jsx)("path",{d:"M25 39L39 25M25 25L39 39",stroke:"white",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})]})},a=r(94184),l=r.n(a),c=function(e){var t=e.animate,r=void 0===t||t;return(0,i.jsxs)("svg",{width:"104",height:"104",viewBox:"0 0 104 104",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:l()({"animate-spin":r}),children:[(0,i.jsx)("circle",{cx:"52",cy:"52",r:"48",className:"text-stroke-background stroke-current",strokeWidth:"5"}),(0,i.jsx)("path",{d:"M52 100C58.3034 100 64.5452 98.7584 70.3688 96.3462C76.1924 93.934 81.4839 90.3983 85.9411 85.9411C90.3983 81.4839 93.934 76.1924 96.3462 70.3688C98.7584 64.5452 100 58.3034 100 52",className:"text-stroke-foreground stroke-current",strokeWidth:"5",strokeLinecap:"round"})]})},s=r(12169),u=function(e){var t=e.animate,r=void 0===t||t,a=e.title,l=e.subtitle,u=e.variant,d=void 0===u?"loading":u;return(0,i.jsx)("div",{className:"bg-primary flex h-full w-full flex-col items-center justify-center",children:(0,i.jsxs)("div",{className:"flex h-full w-full max-w-xl flex-col items-center justify-center gap-4",children:[(0,i.jsxs)("div",{className:"pb-5",children:["loading"===d&&(0,i.jsx)(c,{animate:r}),"success"===d&&(0,i.jsx)(n.F,{}),"error"===d&&(0,i.jsx)(o,{})]}),a&&(0,i.jsx)("div",{className:"text-center",children:(0,i.jsx)(s.Z.TitleMd,{children:a})}),l&&(0,i.jsx)("div",{className:"text-center",children:(0,i.jsx)(s.Z.LabelMd,{color:"text-default",children:l})})]})})}},75257:(e,t,r)=>{r.d(t,{v:()=>c});var n=r(67294),i=r(79631),o=r(85893);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(c){i=!0,o=c}finally{try{n||null==l.return||l.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var c=function(e){var t=e.billingCurrency,r=e.onCurrencyChange,l=void 0===r?function(){}:r,c=a((0,n.useState)(null),2),s=c[0],u=c[1];(0,n.useEffect)((function(){t&&u(t.toUpperCase())}),[t]);var d=Object.entries(i.X).map((function(e){var t=a(e,2),r=t[0],n=t[1],i=n.code,l=n.flag;return(0,o.jsxs)("option",{value:i,children:[l," ",i]},r)}));return s?(0,o.jsx)("div",{className:"mt-3",children:(0,o.jsx)("div",{className:"mb-8 mt-2 md:mb-0 md:mr-2 md:pr-2",children:(0,o.jsxs)("div",{className:"relative block text-left",children:[(0,o.jsx)("select",{className:"border-primary block appearance-none rounded-md border bg-white py-2 pl-3 pr-8 text-base leading-6 transition duration-150 ease-in-out focus:border-blue-300 focus:outline-none",onChange:function(e){return t=e.target.value,u(t),void l(t);var t},value:s,children:d}),(0,o.jsx)("div",{className:"border-primary pointer-events-none absolute inset-y-0 right-0 flex items-center px-2"})]})})}):null}},76538:(e,t,r)=>{r.d(t,{G:()=>d});var n=r(94184),i=r.n(n),o=r(38776),a=r(30887),l=r(86013),c=r(85893),s=function(e){var t=e.selectedText,r=e.onClear,n=e.shouldShowClearButton;return t?void 0===n||n?(0,c.jsx)("button",{type:"button",className:"focus-visible:ring-secondary focus-visible:ring-1","aria-label":(0,l.t)("filters.clear"),onClick:r,children:(0,c.jsx)(a.JO,{type:"16-close",size:16,useWithStrokeCurrentColor:!0})}):(0,c.jsx)("div",{"aria-hidden":!0}):(0,c.jsx)(a.JO,{type:"16-add-sm",size:16,"aria-hidden":!0,useWithFillCurrentColor:!0})},u=function(e){var t=e.selectedText;return(0,c.jsx)("p",{className:"max-w-[32ch] truncate",title:Array.isArray(t)?t.join(", "):((0,o.Z)("object"!==typeof t,"use renderSelectedText when passing in object selected values"),null!==t&&void 0!==t?t:void 0),children:t})},d=function(e){var t=e.children,r=e.isFocused,n=void 0!==r&&r,o=e.selectedText,l=void 0===o?null:o,d=e.renderSelectedText,f=void 0===d?u:d,p=e.onClear,m=e.shouldShowClearButton,h=void 0===m||m;return(0,c.jsx)("button",{type:"button",className:i()("hover:border-secondary focus-visible:border-secondary disabled:hover:border-primary flex h-6 items-center rounded-3xl border px-2 text-xs transition-colors disabled:cursor-not-allowed disabled:opacity-50",n?"text-dark border-secondary":"text-default border-primary",{"text-dark":Boolean(l)}),children:(0,c.jsxs)("div",{className:"divide-selector-inactive flex divide-x-[1.25px]",children:[(0,c.jsxs)("div",{className:"flex items-center gap-x-1 pr-2",children:[(0,c.jsx)(s,{selectedText:l,shouldShowClearButton:h,onClear:function(e){e.stopPropagation(),null===p||void 0===p||p()}}),t]}),l&&(0,c.jsxs)("div",{className:"text-v2-info flex items-center gap-x-1 pl-2",children:[f({selectedText:l}),(0,c.jsx)(a.JO,{type:"16-chevron-down",size:12,className:"text-default mb-1"})]})]})})}},63969:(e,t,r)=>{r.d(t,{u:()=>c});var n=r(86013),i=r(55675),o=r(12169),a=r(86499),l=r(85893),c=function(e){var t=e.addEmbed,r=e.embedUrl,c=e.imageError,s=e.onChangeEmbedUrl;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.Y,{error:c}),(0,l.jsx)("input",{value:r,style:{borderWidth:1},className:"upload-input placeholder:text-light placeholder:opacity-100",placeholder:(0,n.t)("image_upload.paste_image_file"),onChange:s,type:"text"}),(0,l.jsx)("div",{className:"flex w-full flex-row justify-center",children:(0,l.jsx)(i.z,{large:!0,variant:"circle",disabled:!r,onClick:t,children:(0,n.t)("image_upload.embed_image")})}),(0,l.jsx)("div",{className:"mt-4",children:(0,l.jsx)(o.Z.BodySm,{textAlign:"text-center",children:(0,n.t)("image_upload.works_with_image_type")})})]})}},9842:(e,t,r)=>{r.d(t,{p:()=>c});var n=r(86013),i=r(26953),o=r(1149),a=r(86499),l=r(85893),c=function(e){var t=e.imageError,r=e.insertFiles,c=e.aspectRatioHelpText,s=(0,i.kK)();return(0,l.jsxs)("div",{className:"upload-form",children:[(0,l.jsx)(a.Y,{error:t}),(0,l.jsx)(o.r,{onFileDrop:r,dropTitle:s?(0,n.t)("image_upload.click_here_to_upload_image"):(0,n.t)("image_upload.drag_image"),helperText:(0,l.jsxs)(l.Fragment,{children:[(0,n.t)("image_upload.works_with_image_type"),c&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("br",{}),c]})]})})]})}},86499:(e,t,r)=>{r.d(t,{Y:()=>i});var n=r(85893),i=function(e){var t=e.error;return t?(0,n.jsx)("div",{className:"image-error",children:t}):(0,n.jsx)(n.Fragment,{})}},21855:(e,t,r)=>{r.d(t,{K:()=>V});var n,i=r(64687),o=r.n(i),a=r(67294),l=r(86013),c=r(59393),s=r(10178),u=r(25415),d=r(33275),f=r(62977),p=r(41120),m=r(8786),h=r(85893),b=(0,p.Z)((function(e){return{root:{},margin:{height:e.spacing(1)}}})),v=(0,m.Z)({root:{height:8},thumb:{height:20,width:20,backgroundColor:"#fff",border:"2px solid rgba(138, 148, 166, 0.3)",marginTop:-8,marginLeft:-10,"&:focus,&:hover,&$active":{boxShadow:"inherit"}},active:{},valueLabel:{left:"calc(-50% + 4px)"},track:{height:4,borderRadius:2,backgroundColor:"#506cf0"},rail:{height:4,borderRadius:2,backgroundColor:"#e5e7eb"}})(f.Z),_=function(e){var t=e.value,r=e.onChange,n=b();return(0,h.jsxs)("div",{className:n.root,children:[(0,h.jsx)("div",{className:n.margin}),(0,h.jsx)(v,{value:t,min:1,max:3,step:.1,"aria-labelledby":"Zoom",onChange:r})]})},y=r(86499),g=function(e){var t=e.imageError,r=e.file,n=e.crop,i=e.aspectRatio,o=e.zoom,a=e.setCrop,l=e.setZoom,c=e.onCropComplete;return(0,h.jsxs)("div",{className:"crop-content",children:[(0,h.jsx)(y.Y,{error:t}),(0,h.jsx)("div",{className:"crop-content__box",children:(0,h.jsx)(d.Z,{image:r,crop:n,aspect:i,zoom:o,onCropChange:a,onZoomChange:l,onCropComplete:c})}),(0,h.jsx)(_,{value:o,onChange:function(e,t){Array.isArray(t)&&"number"===typeof t[0]?l(t[0]):"number"===typeof t&&l(t)}})]})},x=r(72509),j=r(64629),O=r(41482),w=r(63969),C=r(9842),P=function(e){var t=e.addEmbed,r=e.addUnsplash,n=e.aspectRatioHelpText,i=e.embedUrl,o=e.hideEmbedUrl,a=e.hideUnsplash,c=e.imageError,s=e.insertFiles,u=e.onChangeEmbedUrl,d=e.searchUnsplash,f=e.unsplashResults;return(0,h.jsxs)(j.O.Group,{children:[(0,h.jsxs)(j.O.List,{className:"border-primary border-b",children:[(0,h.jsx)(j.O,{children:(0,l.t)("upload")}),!a&&(0,h.jsx)(j.O,{children:(0,h.jsx)(x.$,{})}),!o&&(0,h.jsx)(j.O,{children:(0,l.t)("image_upload.embed")})]}),(0,h.jsxs)(j.O.Panels,{className:"!h-[calc(100vh-57px-72px)] md:!h-full",children:[(0,h.jsx)(j.O.Panel,{children:(0,h.jsx)(C.p,{imageError:c,insertFiles:s,aspectRatioHelpText:n})}),!a&&(0,h.jsx)(j.O.Panel,{children:(0,h.jsx)(O.A,{unsplashResults:f,searchUnsplash:d,addUnsplash:r})}),!o&&(0,h.jsx)(j.O.Panel,{children:(0,h.jsx)(w.u,{imageError:c,embedUrl:i,onChangeEmbedUrl:u,addEmbed:t})})]})]})};function k(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var S=(k(n={},c.pI.THUMBNAIL,(0,l.t)("image_upload.recommended_size_thumbnail")),k(n,c.pI.OPEN_GRAPH,(0,l.t)("image_upload.recommended_size_opengraph")),k(n,c.pI.DEFAULT,(0,l.t)("image_upload.recommended_size_default")),k(n,c.pI.SPACE_COVER,(0,l.t)("image_upload.recommended_size_v2_cover")),k(n,c.pI.COVER_V3,(0,l.t)("image_upload.recommended_size_v3_cover")),n),E=r(24510);function A(e,t,r,n,i,o,a){try{var l=e[o](a),c=l.value}catch(s){return void r(s)}l.done?t(c):Promise.resolve(c).then(n,i)}function I(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){A(o,n,i,a,l,"next",e)}function l(e){A(o,n,i,a,l,"throw",e)}a(void 0)}))}}var N=function(e){return new Promise((function(t,r){var n=new FileReader;n.onload=function(e){return e.target&&e.target.result&&"string"===typeof e.target.result?t(e.target.result):t(void 0)},n.onerror=function(e){r(e)},n.readAsDataURL(e)}))},T=["image/gif","image/jpeg","image/png"],L=function(e){return!!e&&T.includes(e)},D=function(){var e=I(o().mark((function e(t){var r,n,i,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=t.trim(),e.next=4,E.q.search.getPhotos({query:n,page:1,perPage:30,orientation:"landscape"});case 4:if(i=e.sent,a=(null===(r=i.response)||void 0===r?void 0:r.results)||[],!(t.length>=1&&a.length>=1)){e.next=8;break}return e.abrupt("return",a);case 8:return e.abrupt("return",[]);case 11:return e.prev=11,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",[]);case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}(),R=function(){var e=I(o().mark((function e(t){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:if((r=e.sent).ok){e.next=6;break}throw new Error((0,l.t)("image_upload.embed_network_error"));case 6:if(n=r.headers.get("content-type"),L(n)){e.next=9;break}throw new Error((0,l.t)("image_upload.invalid_file_type_error"));case 9:e.next=14;break;case 11:throw e.prev=11,e.t0=e.catch(0),new Error((0,l.t)("image_upload.embed_error"));case 14:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}(),M=function(e){return new Promise((function(t,r){var n=new Image;n.addEventListener("load",(function(){t(n)})),n.addEventListener("error",(function(){r(new Error((0,l.t)("image_upload.embed_error")))})),n.setAttribute("crossOrigin","anonymous"),n.src=e}))},H=function(){var e=I(o().mark((function e(t,r,n,i){var a,c,s,u,d,f,p,m,h;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=document.createElement("canvas"),c=a.getContext("2d")){e.next=4;break}throw new Error((0,l.t)("image_upload.canvas_context_error"));case 4:return a.width=r.width,a.height=r.height,e.next=8,M(t);case 8:return s=e.sent,u=r.x,d=r.y,f=r.width,p=r.height,0,0,m=a.width,h=a.height,c.drawImage(s,u,d,f,p,0,0,m,h),e.abrupt("return",new Promise((function(e,t){a.toBlob((function(r){if(r)try{var o=new File([r],n,{type:i});e(o)}catch(a){t(a)}else t(null)}),i)})));case 19:case"end":return e.stop()}}),e)})));return function(t,r,n,i){return e.apply(this,arguments)}}();function F(e,t,r,n,i,o,a){try{var l=e[o](a),c=l.value}catch(s){return void r(s)}l.done?t(c):Promise.resolve(c).then(n,i)}function B(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){F(o,n,i,a,l,"next",e)}function l(e){F(o,n,i,a,l,"throw",e)}a(void 0)}))}}function Z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(c){i=!0,o=c}finally{try{n||null==l.return||l.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return U(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return U(e,t)}(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 U(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var V=function(e){var t=e.aspectRatio,r=void 0===t?c.pI.DEFAULT:t,n=e.attachImage,i=void 0===n?null:n,d=e.closeModal,f=e.customAspectRatioHelpText,p=void 0===f?"":f,m=e.formClass,b=void 0===m?"":m,v=e.hasFile,_=void 0!==v&&v,y=e.hideEmbedUrl,x=void 0!==y&&y,j=e.hideUnsplash,O=void 0!==j&&j,w=e.inputFieldName,C=void 0===w?"":w,k=e.isCropEnabled,A=void 0!==k&&k,I=e.saveImage,T=void 0===I?null:I,M=e.setHasFile,F=e.showModal,U=void 0!==F&&F,V=e.title,W=void 0===V?"":V,z=e.uploadProgress,q=Z((0,a.useState)(),2),G=q[0],K=q[1],X=Z((0,a.useState)(),2),Y=X[0],$=X[1],J=Z((0,a.useState)({x:0,y:0}),2),Q=J[0],ee=J[1],te=Z((0,a.useState)(null),2),re=te[0],ne=te[1],ie=Z((0,a.useState)(1),2),oe=ie[0],ae=ie[1],le=Z((0,a.useState)(""),2),ce=le[0],se=le[1],ue=Z((0,a.useState)([]),2),de=ue[0],fe=ue[1],pe=Z((0,a.useState)(""),2),me=pe[0],he=pe[1],be=_&&A,ve=p||(S[r]||""),_e=function(){var e=B(o().mark((function e(t){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D(t);case 2:r=e.sent,fe(r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,a.useEffect)((function(){_e("wallpapers")}),[]);var ye=function(){var e=B(o().mark((function e(t){var r,n,i,a,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:K(t),r=Array.from(t),n=0,i=r;case 5:if(!(n<i.length)){e.next=21;break}if(a=i[n],!L(a.type)){e.next=17;break}return he(""),e.next=12,N(a);case 12:c=e.sent,M(!0),$(c),e.next=18;break;case 17:he((0,l.t)("image_upload.invalid_file_type_error"));case 18:n++,e.next=5;break;case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ge=function(){var e=B(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,R(ce);case 3:$(ce),M(!0),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),e.t0 instanceof Error&&he(e.t0.message);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),xe=(0,a.useCallback)((function(e,t){ne(t)}),[]),je=(0,a.useCallback)(B(o().mark((function e(){var t,r,n,i,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,Y&&re){e.next=3;break}throw new Error((0,l.t)("image_upload.file_cropped_area_error"));case 3:return t=G?Array.from(G):[],r=t?t[0]:null,n=r?r.name:Math.random().toString(36).replace(/[^a-z]+/g,"").slice(0,5),i=r?r.type:"image/jpeg",e.next=9,H(Y,re,n,i);case 9:a=e.sent,d(),we(),new u.Q(a,Oe,b,C,z).start(),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),console.error(e.t0),e.t0 instanceof Error&&he(e.t0.message);case 20:case"end":return e.stop()}}),e,null,[[0,16]])}))),[re]),Oe=(0,a.useCallback)((function(e,t){i&&i(e,t),T&&T(t)}),[i,T]),we=function(){$(void 0),K(void 0),ee({x:0,y:0}),M(!1),se("")};return(0,a.useEffect)((function(){_&&!A&&G&&G[0]&&(d(),new u.Q(G[0],Oe,b,C,z).start())}),[_,A]),(0,h.jsx)("div",{className:"editor-modal",children:(0,h.jsxs)(s.AB,{onClose:d,footerActions:{onCancel:we,onSaveChanges:je},shouldShowActionsFooter:_&&A,title:W,isOpen:U,children:[be&&(0,h.jsx)(g,{file:Y,crop:Q,onCropComplete:xe,aspectRatio:r,zoom:oe,setZoom:ae,setCrop:ee,imageError:me}),!_&&(0,h.jsx)(P,{hideUnsplash:O,hideEmbedUrl:x,unsplashResults:de,searchUnsplash:_e,addUnsplash:function(e){$(e.urls.regular),M(!0),function(e){E.q.photos.trackDownload({downloadLocation:e.links.download_location})}(e)},imageError:me,insertFiles:ye,aspectRatioHelpText:ve,embedUrl:ce,onChangeEmbedUrl:function(e){he(""),se(e.target.value)},addEmbed:ge})]})})}},68e3:(e,t,r)=>{r.d(t,{d:()=>d,N:()=>f});var n=r(64687),i=r.n(n),o=r(88767),a=r(34128),l=r(77529),c=r(15916);function s(e,t,r,n,i,o,a){try{var l=e[o](a),c=l.value}catch(s){return void r(s)}l.done?t(c):Promise.resolve(c).then(n,i)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){s(o,n,i,a,l,"next",e)}function l(e){s(o,n,i,a,l,"throw",e)}a(void 0)}))}}var d="searchable-profile-fields",f=function(){var e=(0,c.aL)();return{getOptions:(0,o.useQuery)([d],u(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,a.UT)(l.av.profileFields.searchableList()));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!e})}}},71032:(e,t,r)=>{r.d(t,{c:()=>f});var n=r(94184),i=r.n(n),o=r(86013),a=r(23560),l=r.n(a),c=r(67732),s=r(55675),u=r(53448),d=r(85893),f=function(e){var t=e.cancelText,r=void 0===t?(0,o.t)("cancel"):t,n=e.children,a=e.confirmText,f=void 0===a?(0,o.t)("confirm"):a,p=e.confirmVariant,m=void 0===p?"primary":p,h=e.contentPortalId,b=void 0===h?"":h,v=e.disabled,_=void 0!==v&&v,y=e.formId,g=e.isOpen,x=void 0!==g&&g,j=e.onCancel,O=e.onClose,w=e.onConfirm,C=e.size,P=void 0===C?"lg":C,k=e.title,S=e.titleSize,E=void 0===S?"sm":S,A=e.dataTestId,I=e.headerClassName,N=void 0===I?"":I,T=e.footerClassName,L=void 0===T?"":T,D=(0,c.v)().isMobileWebNewSpaceCustomizationUIEnabled;return(0,d.jsxs)(u.u_,{isOpen:x,onClose:function(){l()(O)&&O()},contentPortalId:b,children:[(0,d.jsx)(u.u_.Overlay,{}),(0,d.jsxs)(u.u_.Content,{size:P,wrapperClassName:"!h-full",children:[(0,d.jsxs)(u.u_.Header,{className:N,children:[(0,d.jsx)(u.u_.Title,{size:E,children:k}),(0,d.jsx)(u.u_.HeaderActions,{children:l()(O)&&(0,d.jsx)(u.u_.CloseButton,{onClick:function(){O()}})})]}),(0,d.jsx)(u.u_.Body,{className:i()({"!px-5":D}),children:n}),(0,d.jsx)(u.u_.Footer,{className:L,children:(0,d.jsxs)("div",{className:"flex items-stretch justify-end space-x-4",children:[(l()(j)||l()(O))&&(0,d.jsx)(s.z,{type:"button",variant:"secondary",onClick:function(){return l()(j)?j():l()(O)?O():void 0},children:r}),(0,d.jsx)(s.z,{type:y?"submit":"button",form:y,variant:m,disabled:_,onClick:function(){l()(w)&&w()},"data-testid":A,children:f})]})})]})]})}},21138:(e,t,r)=>{r.d(t,{Ph:()=>M,$q:()=>g,bK:()=>h,kg:()=>A,Sg:()=>C});var n=r(94184),i=r.n(n),o=r(85893),a=["className"];function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var u=function(e){var t=e.className,r=s(e,a);return(0,o.jsx)("div",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({className:i()("bg-tertiary",t)},r))},d=["className"];function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var h=function(e){var t=e.className,r=m(e,d);return(0,o.jsx)(u,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){p(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({className:i()("h-2 rounded-sm",t)},r))};var b=["className"];function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var g=function(e){var t=e.className,r=y(e,b);return(0,o.jsx)(u,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({className:i()("h-3 rounded-[3px]",t)},r))},x=["className"];function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var C=function(e){var t=e.className,r=w(e,x);return(0,o.jsx)(u,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({className:i()("border-tertiary h-5 w-5 rounded border-2",t)},r))},P=["className"];function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function S(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var A=function(e){var t=e.className,r=E(e,P);return(0,o.jsx)(u,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){S(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({className:i()("border-tertiary h-4 w-4 rounded border-2",t)},r))},I=["size"];function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){L(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function L(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var R={sm:24,md:48,lg:88},M=function(e){var t=e.size,r=void 0===t?"sm":t,n=D(e,I),i=R[r]||R.sm;return(0,o.jsxs)("svg",T(T({width:i,height:i,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),{},{children:[(0,o.jsx)("rect",{width:"24",height:"24",rx:"4",fill:"var(--color-background-avatar-secondary)"}),(0,o.jsx)("ellipse",{cx:"12",cy:"9",rx:"5.25",ry:"6",fill:"var(--color-background-avatar-primary)"}),(0,o.jsx)("path",{d:"M22.5 23.9999H1.5C2.68942 19.8354 7.06933 17.0052 12 17.0052C16.9307 17.0052 21.3106 19.8354 22.5 23.9999Z",fill:"var(--color-background-avatar-primary)"})]}))}},73997:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(86013),i=r(97012),o=r(3085),a=r(67294),l=r(96486),c=r(61926),s=r(85893),u=function(){var e=(0,a.useMemo)((function(){return(0,l.uniqueId)("full-name-")}),[]);return(0,s.jsx)(c.l.Item,{id:e,name:"name",hideDescription:!0,hideBorder:!0,translationRoot:"profile_fields.form",fullWidth:!0,placeholder:" ",required:!0,children:(0,s.jsx)(c.l.Input,{})})},d=r(1114),f=function(e){var t=e.name,r=void 0===t?"time_zone":t,n=(0,a.useMemo)((function(){return(0,l.uniqueId)("timezone-")}),[]);return(0,s.jsx)(c.l.Item,{id:n,name:r,hideDescription:!0,hideBorder:!0,translationRoot:"profile_fields.form",fullWidth:!0,required:!0,children:(0,s.jsx)(c.l.SelectNative,{name:r,options:d.W})})},p=function(){var e=(0,a.useMemo)((function(){return(0,l.uniqueId)("headline-")}),[]);return(0,s.jsx)(c.l.Item,{id:e,name:"headline",hideDescription:!0,hideBorder:!0,translationRoot:"profile_fields.form",fullWidth:!0,placeholder:" ",children:(0,s.jsx)(c.l.Input,{})})},m=r(69853),h=function(e){var t=e.name,r=void 0===t?"locale":t,n=(0,a.useMemo)((function(){return(0,l.uniqueId)("locale-")}),[]);return(0,s.jsx)(c.l.Item,{id:n,name:r,hideDescription:!0,hideBorder:!0,translationRoot:"profile_fields.form",fullWidth:!0,required:!0,children:(0,s.jsx)(c.l.SelectNative,{name:r,options:m.h})})};function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(e,t)}(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 y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const g=function(){var e=(0,i.wh)().currentCommunity,t=(void 0===e?{}:e).community_member_locale_setting_enabled,r=function(e,t){return e?t:[]},a=[{id:"name",component:u},{id:"headline",component:p},{id:"time_zone",component:f}].concat(_(r(t,[{id:"locale",component:h}]))),l=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){v(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({name:{icon:o.D9[o.Z9.TEXT],getLabel:function(){return(0,n.t)("profile_fields.form.name")}},headline:{icon:o.D9[o.Z9.TEXT],getLabel:function(){return(0,n.t)("profile_fields.form.headline")}},timezone:{icon:o.D9.timezone,getLabel:function(){return(0,n.t)("profile_fields.form.time_zone")}},memberSince:{icon:o.D9.date,getLabel:function(){return(0,n.t)("profile_fields.form.member_join_date")}}},t?{locale:{icon:o.D9.timezone,getLabel:function(){return(0,n.t)("locale")}}}:{}),c=[{id:"name",show:function(){return!0},item:l.name},{id:"headline",show:function(){return!0},item:l.headline},{id:"time_zone",show:function(e){return e!==o.Nd.PROFILE_VIEW},item:l.timezone},{id:"memberSince",show:function(e){return e===o.Nd.PROFILE_VIEW},item:l.memberSince}].concat(_(r(t,[{id:"locale",show:function(){return!0},item:l.locale}]))),s=[{id:"memberSince",show:function(e){return e!==o.Nd.PROFILE_VIEW},item:l.memberSince},{id:"time_zone",show:function(e){return e===o.Nd.PROFILE_VIEW},item:l.timezone}].concat(_(r(t,[{id:"locale",show:function(e){return e!==o.Nd.PROFILE_VIEW},item:l.locale}])));return{STATIC_FORM_COMPONENTS:a,STATIC_FIELD_LIST:l,STATIC_SIDEBAR_LIST_VISIBLE:c,STATIC_SIDEBAR_LIST_NOT_VISIBLE:s}}},65193:(e,t,r)=>{r.d(t,{jl:()=>I,gj:()=>A,ki:()=>C,oj:()=>w,YU:()=>h,iI:()=>b});var n,i=r(86013),o=r(87561),a=r(66628),l=r(83364),c=r(3085);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var f="profile_fields.form";o.kM(o.IX,"tuple",(function(e){var t=this;return this.isType(e)||o.p8(),o.Ry(u({tuple:o.IX().min(e.length).max(e.length)},Object.fromEntries(Object.entries(e)))).transform((function(e,r){return t.isType(r)||o.p8(),u({tuple:r},Object.fromEntries(Object.entries(r)))}))}));var p=(d(n={},c.Z9.TEXT,(function(e){var t=e.label;return o.Z_().trim().max(255,(0,i.t)([f,"is_max_length"],{fieldName:t}))})),d(n,c.Z9.NUMBER,(function(e){var t=e.label,r=e.number_options,n=r.decimal,l=r.format;return o.Z_().trim().test((function(e,r){if(""===e)return!0;var n=Number(+e);return!Number.isNaN(n)||r.createError({message:(0,i.t)([f,"is_number"],{fieldName:t})})})).test((function(e,r){if(""===e)return!0;var o=Number(+e);return!!Number.isNaN(o)||(l===c.av.UNFORMATTED||(!((0,a.Ri)(o)>n)||r.createError({message:(0,i.t)([f,"is_number_decimal_length"],{count:n,fieldName:t})})))}))})),d(n,c.Z9.LINK,(function(e){var t=e.label;return o.Z_().trim().transform((function(e,t){return(0,l.R)(t)})).url((0,i.t)([f,"is_valid_url"],{fieldName:t}))})),d(n,c.Z9.TEXTAREA,(function(e){var t=e.label;return"bio"===e.key?o.Z_().trim().max(4096,(0,i.t)([f,"bio_is_max_length"],{fieldName:t})):o.Z_().trim().max(65535,(0,i.t)([f,"is_textarea_max_length"],{fieldName:t}))})),d(n,c.Z9.SELECT,(function(){return o.IX().ensure().nullable()})),d(n,c.Z9.CHECKBOX,(function(){return o.IX().nullable()})),n),m=function(e,t){var r=e.field_type,n=p[r](e);return t?n:function(e,t){var r=t.required,n=t.label,o=t.field_type;return c.KJ.includes(o)&&r?e.compact((function(e){return!e})).min(r?1:0,(0,i.t)([f,"is_atleast_one_selected"])).required((0,i.t)([f,"is_required"],{fieldName:n})):r?e.required((0,i.t)([f,"is_required"],{fieldName:n})):e}(n,e)},h=function(e){var t=e.fields,r=e.isAdmin,n=void 0!==r&&r,i=t.map((function(e){var t,r=e.field_type,i=m(e,n),a=c.TY[r];return o.Ry().shape((d(t={},a,i),d(t,"profile_field_id",o.Rx().required()),t))}));return o.IX().tuple(i)},b=function(e){return o.Ry().shape({name:o.Z_().required((0,i.t)([f,"is_required"],{fieldName:(0,i.t)([f,"name"])})).trim().max(255,(0,i.t)([f,"is_max_length"],{fieldName:(0,i.t)([f,"name"])})),headline:o.Z_().trim().max(255,(0,i.t)([f,"is_max_length"],{fieldName:(0,i.t)([f,"headline"])})).nullable(),time_zone:o.Z_().typeError((0,i.t)([f,"is_required"],{fieldName:(0,i.t)([f,"time_zone"])})).trim().required((0,i.t)([f,"is_required"],{fieldName:(0,i.t)([f,"time_zone"])})),community_member_profile_fields_attributes:h({fields:e})})},v=r(96486);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){g(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var x,j=function(e,t,r){var n,i,o,a,l,c=(l=a=t,Array.isArray(a)||(l=[a]),(0,v.compact)(l).map((function(e){return{profile_field_choice_id:+e}})));return function(e){var t=e.prevData,r=e.formData,n=e.param,i=void 0===n?"id":n,o=t.map((function(e){return{profile_field_choice_id:e.profile_field_choice.id}})),a=(0,v.differenceBy)(o,r,i).map((function(e){return{id:t.find((function(t){return t.profile_field_choice.id===e.profile_field_choice_id})).id,_destroy:!0}}));return(0,v.differenceBy)(r,o,i).concat(a)}({prevData:null!==(n=null===(i=r.find((function(t){return t.id===e})).community_member_profile_field)||void 0===i||null===(o=i.community_member_choices)||void 0===o?void 0:o.map((function(e){return y(y({},e),{},{profile_field_choice_id:e.profile_field_choice.id})})))&&void 0!==n?n:[],formData:c,param:"profile_field_choice_id"})},O=function(e){return y(y({},(0,v.pick)(e,["visible_in_member_directory","make_my_email_public"])),{},{messaging_enabled:!e.prevent_members_from_messaging})},w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return Object.values((0,v.omit)(e,["tuple"])).map((function(e){return"community_member_choices_attributes"in e?y(y({},e),{},{community_member_choices_attributes:j(e.profile_field_id,e.community_member_choices_attributes,t)}):e}))},C=function(e){var t,r=e.formData,n=e.data,i=r.community_member_profile_fields_attributes,o=r.preferences;return{community_member:y(y({},(0,v.pick)(r,["name","avatar","headline","time_zone","locale"])),{},{preferences:O(o),community_member_profile_fields_attributes:w(i,null===n||void 0===n||null===(t=n.profile_fields)||void 0===t?void 0:t.visible)})}};function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){S(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function S(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var E=(S(x={},c.Z9.TEXT,(function(e){var t=e.text;return void 0===t?"":t})),S(x,c.Z9.TEXTAREA,(function(e){var t=e.textarea;return void 0===t?"":t})),S(x,c.Z9.CHECKBOX,(function(e){var t=e.community_member_choices;return(void 0===t?[]:t).map((function(e){return e.profile_field_choice.id}))})),S(x,c.Z9.SELECT,(function(e){var t,r,n,i=e.community_member_choices;return null!==(t=null===(r=(void 0===i?[]:i)[0])||void 0===r||null===(n=r.profile_field_choice)||void 0===n?void 0:n.id)&&void 0!==t?t:""})),x),A=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(e){var t,r,n,i,o=e.id,a=e.field_type,l=e.community_member_profile_field,s=c.TY[a],u=null!==(t=null===l||void 0===l?void 0:l.id)&&void 0!==t?t:null;return S(r={},s,(null===(n=E[a])||void 0===n?void 0:n.call(E,null!==l&&void 0!==l?l:{}))||(null!==(i=null===l||void 0===l?void 0:l.text)&&void 0!==i?i:"")),S(r,"profile_field_id",o),S(r,"id",u),r}))},I=function(e){var t,r,n,i=e.profile_fields,o=null===i||void 0===i?void 0:i.visible;return k(k({},e),{},{preferences:(t=e.messaging_enabled_by_member,r=e.visible_in_member_directory,n=e.make_my_email_public,{prevent_members_from_messaging:!t,visible_in_member_directory:r,make_my_email_public:Boolean(n)}),community_member_profile_fields_attributes:A(o)})}},15916:(e,t,r)=>{r.d(t,{Aw:()=>qe,uc:()=>M,L3:()=>Ke,Pl:()=>$,r8:()=>Oe,WS:()=>Se,IA:()=>Ve,so:()=>me,aL:()=>i,R1:()=>o});var n=r(97012),i=function(){var e=(0,n.wh)(),t=e.currentCommunity;return!(e.isLoading||null===t||void 0===t||!t.profile_fields_feature_flag_enabled)};function o(){var e=(0,n.wh)(),t=e.currentCommunitySettings,r=e.currentCommunityMember,o=null===t||void 0===t?void 0:t.upgrade_flows_for_profile_fields_enabled,a=i(),l=null===r||void 0===r?void 0:r.is_admin;return Boolean(o&!a&&l)}var a=r(67294),l=r(94184),c=r.n(l),s=r(96486),u=r(87536),d=r(616),f=r(61926),p=r(3085),m=r(85893),h=r(86013),b=function(e){var t=e.text,r=e.className;return(0,m.jsx)("span",{className:r,children:t})},v=["number_options"];function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){g(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var j,O=function(e){var t=e.numberOptions,r=t.format,n=t.decimal;if(r===p.av.UNFORMATTED)return 0;var i="0";if(n&&n>0){var o="0".padEnd(n,"0");i+=".".concat(o)}return i},w=["fieldType","label","description","placeholder","hidden","index","dataTestId"];function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){S(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function k(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function S(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var E="community_member_profile_fields_attributes",A=(S(j={},p.Z9.TEXT,f.l.Input),S(j,p.Z9.LINK,d.R),S(j,p.Z9.NUMBER,(function(e){var t,r,n,i,o,a=e.number_options,l=x(e,v),c=O({numberOptions:a}),s=(t={numberOptions:a}.numberOptions,r=t.format,n=t.position,i=t.text,o=void 0===i?"":i,r===p.av.PERCENT?{suffix:(0,m.jsx)(b,{text:"%"})}:r!==p.av.CUSTOM?{}:"left"===n?{prefix:(0,m.jsx)(b,{className:"px-4 py-3",text:o})}:{suffix:(0,m.jsx)(b,{text:o})});return(0,m.jsx)(f.l.Input,y(y({},l),{},{placeholder:c,inputmode:"decimal",type:"text",onInput:function(e){var t=a.format,r=a.decimal;if(t===p.av.UNFORMATTED)return!0;var n=e.target,i=n.value;if(!Number.isNaN(i)){var o=i.indexOf(".");if(-1===o)return!0;void 0!==r&&0===r?n.value=i.substring(0,o):void 0!==r&&i.length-o>r+1&&(n.value=i.substring(0,o+r+1))}}},s))})),S(j,p.Z9.TEXTAREA,f.l.TextArea),S(j,p.Z9.SELECT,(function(e){var t=e.name,r=e.choices,n=e.required,i=e.disabled,o=(0,a.useMemo)((function(){return[{label:(0,h.t)("profile_fields.form.default_select_option"),value:""}].concat(r.map((function(e){var t=e.id;return{label:e.value,value:t.toString()}})))}),[r]);return(0,m.jsx)(f.l.SelectNative,{name:t,options:o,required:n,disabled:i})})),S(j,p.Z9.CHECKBOX,(function(e){var t=e.name,r=e.rules,n=e.choices;return(0,m.jsx)(f.l.CheckboxGroup,{options:n.map((function(e){var t=e.id;return{label:e.value,value:t}})),name:t,rules:r})})),j),I=function(e){var t=e.fieldType,r=e.label,n=e.description,i=e.placeholder,o=e.hidden,l=void 0!==o&&o,d=e.index,h=e.dataTestId,b=k(e,w),v=A[t]||function(){return null},_=(0,u.Gc)().register,y=(0,a.useMemo)((function(){return(0,s.uniqueId)("custom-".concat(t,"-field-"))}),[t]),g={};return i?g.placeholder=i:g.hidePlaceholder=!0,(0,m.jsxs)("div",{className:c()({hidden:l}),"data-testid":h,children:[(0,m.jsx)("input",P({type:"hidden"},_("".concat(E,".").concat(d,".profile_field_id")))),(0,m.jsx)("input",P({type:"hidden"},_("".concat(E,".").concat(d,".id")))),(0,m.jsx)(f.l.Item,P(P(P({id:y,name:(0,p.hG)({fieldType:t,index:d}),hideDescription:!0,hideBorder:!0,translationRoot:"profile_fields.form",label:r,tooltipText:n},g),b),{},{children:(0,m.jsx)(v,P({},b))}))]})},N=["id","field_type"];function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function D(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var M=function(e){var t=e.fields,r=e.indexUpdate,n=void 0===r?0:r;return(0,m.jsx)(m.Fragment,{children:t.map((function(e,t){var r=e.id,i=e.field_type,o=R(e,N);return(0,m.jsx)(I,L(L({index:n+t,fieldType:i},o),{},{dataTestId:"profile-custom-field"}),r)}))})},H=r(88634),F=r(7985),B=r(12169),Z=["name","isDisabled"];function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function V(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach((function(t){W(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function W(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var q=function(e){var t=e.name,r=e.isDisabled,n=z(e,Z);return(0,m.jsx)(f.l.Item,V(V({hiddenField:!0,hideDescription:!0,hideBorder:!0,className:"flex flex-row-reverse justify-end py-0",labelClassName:"ml-4 mb-0 !font-normal",labelWrapperClassName:"flex items-center",shouldToggleValueOnLabelClick:!0,translationRoot:"profile_fields.form",name:t,isDisabled:r},n),{},{children:(0,m.jsx)(f.l.ToggleSwitch,{variant:"small",name:t,disabled:r})}))};function G(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function K(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G(Object(r),!0).forEach((function(t){X(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function X(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Y,$=function(){var e=(0,F.V)(),t=(0,H.wh)(),r=t.currentCommunity,n=t.currentCommunitySettings,i=null===r||void 0===r?void 0:r.messaging_enabled,o=null===n||void 0===n?void 0:n.gamification_enabled,a=i?(0,h.t)("profile_fields.form.preferences.prevent_members_from_messaging_tooltip"):(0,h.t)("account.member_edit_profile_form.direct_messaging_turned_off");return(0,m.jsxs)("div",{className:"mt-6 flex flex-col gap-2",children:[(0,m.jsx)(B.Z.LabelMd,{weight:"medium",children:(0,h.t)("profile_fields.form.preferences.title")}),!e&&(0,m.jsx)(q,{name:"preferences.make_my_email_public",tooltipText:(0,h.t)("profile_fields.form.preferences.make_my_email_public_tooltip")}),(0,m.jsx)(q,{name:"preferences.prevent_members_from_messaging",isDisabled:!i,tooltipText:a}),(0,m.jsx)(q,K({name:"preferences.visible_in_member_directory"},o&&{tooltipText:(0,h.t)("profile_fields.form.preferences.visible_in_member_directory_tooltip")}))]})},J=r(31889),Q=r(30887),ee=r(87958),te=function(e){var t=e.title,r=e.icon,n=e.text,i=e.isHidden,o=e.dataTestId;return(0,m.jsxs)("div",{className:"grid gap-2","data-testid":o,children:[t&&(0,m.jsxs)("div",{className:"flex items-center gap-x-1",children:[(0,m.jsx)(B.Z.LabelSm,{weight:"semibold",children:t}),i&&(0,m.jsx)(ee.T,{className:"text-light inline-flex",content:(0,h.t)("profile_fields.hidden"),"aria-label":(0,h.t)("profile_fields.hidden"),children:(0,m.jsx)(Q.JO,{type:"16-eye-closed",size:14,"aria-hidden":!0,useWithFillCurrentColor:!0})})]}),(0,m.jsxs)("div",{className:"text-dark flex items-center gap-3 whitespace-pre-line break-words",style:{wordBreak:"break-word"},children:[r&&(0,m.jsx)(Q.JO,{type:r,size:16}),n&&(0,m.jsx)(B.Z.LabelSm,{children:n})]})]})},re=r(45697),ne=r.n(re),ie=r(44130);function oe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ae=function(e){var t=e.community_member_profile_field,r=(null!==t&&void 0!==t?t:{}).text;return""===(null===r||void 0===r?void 0:r.trim())?null:r},le=function(e){var t=e.community_member_profile_field,r=e.number_options.format,n=(null!==t&&void 0!==t?t:{}).text;return null!==n&&void 0!==n&&n.trim()?r===p.av.PERCENT?"".concat(n,"%"):n:null},ce=function(e){var t=e.community_member_profile_field;if(null===t)return null;var r=t.community_member_choices,n=void 0===r?[]:r;return n.length?n.map((function(e){return e.profile_field_choice.value})).join(", "):null},se=(oe(Y={},p.Z9.TEXT,ae),oe(Y,p.Z9.LINK,(function(e){var t=e.community_member_profile_field,r=(null!==t&&void 0!==t?t:{}).text;return r&&""!==(null===r||void 0===r?void 0:r.trim)?(0,m.jsx)("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:r}):null})),oe(Y,p.Z9.TEXTAREA,(function(e){var t=e.community_member_profile_field,r=(null!==t&&void 0!==t?t:{}).textarea,n=ae({community_member_profile_field:{text:r}});return n?(0,m.jsx)(ie.X,{lines:8,seeMoreClassName:"text-sm",children:n}):null})),oe(Y,p.Z9.NUMBER,le),oe(Y,p.Z9.SELECT,ce),oe(Y,p.Z9.CHECKBOX,ce),Y);ce.propTypes={community_member_profile_field:ne().shape({community_member_choices:ne().arrayOf(ne().shape({profile_field_choice:ne().shape({value:ne().string})}))})},ae.propTypes={community_member_profile_field:ne().shape({text:ne().string})},le.propTypes={community_member_profile_field:ne().shape({text:ne().string}),number_options:ne().shape({format:ne().string})};var ue,de=r(78241);function fe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var pe=(fe(ue={},de.Z9.TEXT,(function(){return"-"})),fe(ue,de.Z9.LINK,(function(){return(0,h.t)("profile_fields.form.default_link")})),fe(ue,de.Z9.SELECT,(function(){return(0,h.t)("profile_fields.form.default_select_option")})),fe(ue,de.Z9.NUMBER,(function(e){var t=e.number_options,r=O({numberOptions:t}),n=t.format===de.av.PERCENT?"%":"",i=function(e){var t=e.format,r=e.position,n=e.text;return t!==de.av.CUSTOM?{prefix:"",suffix:""}:{prefix:"left"===r?"".concat(n," "):"",suffix:"right"===r?" ".concat(n):""}}(t),o=i.prefix,a=i.suffix;return"".concat(o).concat(r).concat(n).concat(a)})),fe(ue,de.Z9.CHECKBOX,(function(e){var t=e.choices;return(0,m.jsx)("span",{className:"flex flex-col gap-y-2",children:t.map((function(e){return(0,m.jsx)("span",{children:e.value},e.id)}))})})),fe(ue,de.Z9.TEXTAREA,(function(){return"-"})),ue),me=function(e){var t=e.fields,r=e.isPreview,i=e.isHidden,o=(0,n.wh)().currentCommunityMember,a=(0,J.vb)(o);return(0,m.jsx)("div",{className:"grid gap-6",children:t.map((function(e){var t=e.id,n=e.label,o=e.field_type,l=pe[o](e);return r||(l=se[o](e),a&&null==l&&(l=(0,m.jsx)("span",{className:"opacity-60",children:(0,h.t)("profile_fields.empty")}))),a||null!=l?(0,m.jsx)(te,{title:n,text:l,isHidden:i,dataTestId:"user-profile-field"},t):null}))})},he=r(2789),be=r(64375),ve=r(21138),_e=r(7381),ye=r(73997),ge=r(65193),xe=(0,s.uniqueId)(),je={preferences:{visible_in_member_directory:!0}},Oe=function(e){var t=e.fields,r=void 0===t?{}:t,n=e.onSubmit,i=void 0===n?s.noop:n,o=e.isPreview,a=void 0===o||o,l=e.defaultValues,c=void 0===l?je:l,u=r.visibleFields,d=void 0===u?[]:u,p=(0,be.g)().handleClose,b=(0,ye.Z)().STATIC_FORM_COMPONENTS;return(0,m.jsxs)(f.l,{defaultValues:c,onSubmit:i,validationSchema:(0,ge.iI)(d),id:xe,noValidate:!0,children:[(0,m.jsx)("div",{className:"pb-4",children:a?(0,m.jsx)(ve.Ph,{size:"lg"}):(0,m.jsx)(he.C,{title:(0,h.t)("upload_a_profile_photo")})}),b.map((function(e){var t=e.id,r=e.component;return(0,m.jsx)(r,{},t)})),(0,m.jsx)(M,{fields:d}),(0,m.jsx)($,{}),!a&&(0,m.jsx)(_e.$k,{formId:xe,onClose:p})]})},we=r(50308),Ce=r.n(we),Pe=r(55675),ke={preferences:{visible_in_member_directory:!0}},Se=function(e){var t=e.fields,r=void 0===t?{}:t,n=e.defaultValues,i=void 0===n?ke:n,o=e.onSubmit,a=void 0===o?Ce():o,l=e.isPreview,c=void 0===l||l,s=e.isLoading,u=e.dataTestId,d=r.visibleFields,p=void 0===d?[]:d,b=!p.some((function(e){return e.required})),v=(0,ye.Z)().STATIC_FORM_COMPONENTS;return(0,m.jsx)(f.l,{onSubmit:a,defaultValues:i,noValidate:!0,validationSchema:(0,ge.iI)(p),children:(0,m.jsxs)("div",{className:"flex flex-col gap-y-8","data-testid":u,children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("div",{className:"mb-4",children:c?(0,m.jsx)(ve.Ph,{size:"lg"}):(0,m.jsx)(he.C,{title:(0,h.t)("upload_a_profile_photo")})}),v.map((function(e){var t=e.id,r=e.component;return(0,m.jsx)(r,{},t)})),(0,m.jsx)(M,{fields:p}),(0,m.jsx)($,{})]}),!c&&(0,m.jsxs)("div",{className:"flex justify-end gap-x-3",children:[b&&(0,m.jsx)(Pe.z,{type:"submit",disabled:s,variant:"secondary-light",children:s?(0,h.t)("saving"):(0,h.t)("skip")}),(0,m.jsx)(Pe.z,{type:"submit",disabled:s,children:s?(0,h.t)("saving"):(0,h.t)("continue")})]})]})})},Ee=r(64687),Ae=r.n(Ee),Ie=r(24185),Ne=r(95295),Te=r(77529),Le=r(65771),De=r(76538),Re=r(71861),Me=r(49498),He=r(80360),Fe=r(5295);function Be(e,t,r,n,i,o,a){try{var l=e[o](a),c=l.value}catch(s){return void r(s)}l.done?t(c):Promise.resolve(c).then(n,i)}function Ze(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){Be(o,n,i,a,l,"next",e)}function l(e){Be(o,n,i,a,l,"throw",e)}a(void 0)}))}}var Ue=["profile_fields.upgrade_flow.button_labels.add_birthday","profile_fields.upgrade_flow.button_labels.add_profession","profile_fields.upgrade_flow.button_labels.add_skills"],Ve=function(e){var t=e.source,r=(0,Re.w)(),i=(0,Ie.k6)(),o=(0,Le.E)().changePlanModalParams,a=function(e){return e===Me.f.PROFILE_FIELDS_ANALYTICS_FILTER_CHIP?Ne.Gb.enterprise:Ne.Gb.business}(t),l=o(a),c=l.planTier,s=l.planId,u=(0,n.wh)(),d=u.refetch,f=u.currentCommunity.current_plan_tier,p=(0,Ne.FZ)(f)||void 0,b=(0,He.R)({planTier:c,planId:s}),v=b.plan,_=b.isPlanLoading,y=function(e,t){return e!==Ne.Gb.enterprise&&t===Me.f.PROFILE_FIELDS_ANALYTICS_FILTER_CHIP?"pricing_plans.upgrade_modal.subheadings.analytics_filters_from_profile_fields_below_business":"pricing_plans.upgrade_modal.subheadings.analytics_filters"}(p,t),g=function(e){return e===Me.f.PROFILE_FIELDS_ANALYTICS_FILTER_CHIP?"pricing_plans.upgrade_modal.actions.go_to_analytics":"profile_fields.upgrade_flow.button_labels.go_to_profile_fields"}(t),x=function(){var e=Ze(Ae().mark((function e(){return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!=Me.f.PROFILE_FIELDS_ANALYTICS_FILTER_CHIP){e.next=5;break}return e.next=3,d();case 3:e.next=6;break;case 5:i.push(Te.Gp.profileFieldList());case 6:return e.next=8,r.hide();case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=function(){var e=Ze(Ae().mark((function e(){return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.show({planId:v.id,subheading:(0,h.t)(y),onSuccess:x,successButtonLabel:(0,h.t)(g),source:t,showPlanDetails:!0});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return _?(0,m.jsx)(Fe.a,{}):(0,m.jsx)("div",{className:"grid grid-cols-1 gap-y-4 py-1",children:Ue.map((function(e){return(0,m.jsx)("button",{type:"button",className:"cursor-pointer",onClick:j,children:(0,m.jsx)(De.G,{children:(0,h.t)(e)})},e)}))})},We=r(75937),ze=r(71032),qe=function(e){var t=e.fieldRow,r=e.isVisible,n=e.onClose,i=(0,We.l)().archiveFieldMutations.mutate,o=t.id,a=t.label;return(0,m.jsx)(ze.c,{isOpen:r,onClose:n,title:(0,h.t)("profile_fields.archive_confirm.title",{fieldLabel:a}),onConfirm:function(){i({id:o},{onSuccess:function(){n()}})},confirmVariant:"danger",cancelText:(0,h.t)("cancel"),children:(0,m.jsx)("p",{children:(0,h.t)("profile_fields.archive_confirm.description")})})},Ge=r(82166),Ke=function(e){var t=e.fieldRow,r=e.isVisible,n=e.onClose,i=(0,Ge.V)().mutate,o=t.id,a=t.label;return(0,m.jsx)(ze.c,{isOpen:r,onClose:n,title:(0,h.t)("profile_fields.delete_confirm.title",{fieldLabel:a}),onConfirm:function(){i({id:o},{onSuccess:n})},confirmVariant:"danger",cancelText:(0,h.t)("cancel"),children:(0,m.jsx)("p",{children:(0,h.t)("profile_fields.delete_confirm.description")})})}},61842:(e,t,r)=>{r.d(t,{d:()=>l});var n=r(94184),i=r.n(n),o=r(86013),a=r(85893),l=function(e){var t=e.wrapperClassName;return(0,a.jsxs)("div",{className:i()("flex flex-1 flex-col items-center justify-center p-4 text-center",t),children:[(0,a.jsx)("h2",{className:"text-xl font-bold",children:(0,o.t)("profile_deleted_message")}),(0,a.jsx)("p",{className:"text-sm",children:(0,o.t)("profile_deleted_description")})]})}},85545:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(94184),i=r.n(n),o=r(26953),a=r(12169),l=r(85893),c=function(e){var t=e.children,r=e.hideFooter,n=e.className,o=void 0===n?"absolute":n,a=e.containerClassName;return r?null:(0,l.jsx)("div",{className:i()("bg-primary border-primary bottom-0 left-0 w-full justify-center border-t",o),children:(0,l.jsx)("div",{className:i()("mx-auto max-w-screen-md px-6 py-4",a),children:t})})},s=r(55675);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=Object.assign({},{Root:function(e){var t=e.title,r=e.children,n=e.rightSideContent,o=e.titleClassName,c=void 0===o?"":o;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:i()("px-5 pt-6 md:p-6 lg:py-8",c,{"flex justify-between":n}),children:[(0,l.jsx)(a.Z.TitleMd,{weight:"font-bold",color:"text-very-dark",children:t}),n&&(0,l.jsx)("div",{children:n})]}),r]})},Body:function(e){var t=e.title,r=e.children,n=e.className,c=(0,o.kK)()?a.Z.TitleSm:a.Z.TitleMd;return(0,l.jsxs)("div",{className:i()("flex flex-col gap-y-3 px-5 pb-10 pt-0 md:px-6 md:pt-2",n),children:[t&&(0,l.jsx)(c,{weight:"font-bold",children:t}),r]})},Footer:c,FooterForm:function(e){var t=e.showFooter,r=void 0!==t&&t,n=e.description,o=void 0===n?"":n,u=e.primaryButtonProps,f=e.secondaryButtonProps,p=e.buttonsWrapperClassName,m=void 0===p?"justify-end":p,h=e.className,b=void 0===h?"absolute":h,v=e.containerClassName;return(0,l.jsx)(c,{hideFooter:!r,className:b,containerClassName:v,children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[o&&(0,l.jsx)("div",{className:"w-full",children:(0,l.jsx)(a.Z.LabelSm,{weight:"semibold",children:o})}),(0,l.jsxs)("div",{className:i()("flex w-full flex-row gap-x-4",m),children:[f&&(0,l.jsx)(s.z,d({},f)),(0,l.jsx)(s.z,d({},u))]})]})})}})},7381:(e,t,r)=>{r.d(t,{d8:()=>d.d,$k:()=>u,Z2:()=>n.Z});var n=r(85545),i=r(86013),o=r(87536),a=r(85893);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var u=function(e){var t=e.formId,r=e.footerContainerClassName,l=e.onClose,s=(0,o.Gc)().formState;return(0,a.jsx)(n.Z.FooterForm,c(c({},s.isDirty&&{description:(0,i.t)("unsaved_changes")}),{},{containerClassName:r,showFooter:!0,primaryButtonProps:{type:"submit",variant:"circle",form:t,children:(0,i.t)("save_changes"),disabled:s.isSubmitting},secondaryButtonProps:{type:"button",variant:"secondary",onClick:l,children:(0,i.t)("cancel")}}))},d=r(61842)},88959:(e,t,r)=>{r.d(t,{d:()=>m});var n=r(64687),i=r.n(n),o=r(67294),a=r(1149),l=r(66154),c=r(47736),s=r(85893);function u(e,t,r,n,i,o,a){try{var l=e[o](a),c=l.value}catch(s){return void r(s)}l.done?t(c):Promise.resolve(c).then(n,i)}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(c){i=!0,o=c}finally{try{n||null==l.return||l.return()}finally{if(i)throw o}}return r}(e,t)||f(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 f(e,t){if(e){if("string"===typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var m=function(e){var t=e.onClose,r=e.accept,n=e.dropTitle,p=e.helperText,m=e.children,h=(0,c.DM)().insertFile,b=d((0,o.useState)(0),2),v=b[0],_=b[1],y=(0,o.useRef)(null),g=function(e){t&&t();var r,n=function(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=f(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw o}}}}(e);try{for(n.s();!(r=n.n()).done;){var i=r.value;h(i)}}catch(o){n.e(o)}finally{n.f()}_(v+1)},x=function(){var e,t=(e=i().mark((function e(t){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),r=t.target.files,g(r);case 3:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){u(o,n,i,a,l,"next",e)}function l(e){u(o,n,i,a,l,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}();return m&&(m=(0,o.cloneElement)(m,{onClick:function(e){0!==(null===e||void 0===e?void 0:e.detail)&&(e.preventDefault(),y.current.click())}})),(0,s.jsxs)("div",{className:"file-upload",children:[(0,s.jsx)("input",{ref:y,onChange:x,type:"file",style:{display:"none"},accept:r}),(0,s.jsx)(l.If,{condition:!!m,children:m||""}),(0,s.jsx)(l.If,{condition:!m,children:(0,s.jsx)(a.r,{onFileDrop:g,dropTitle:n,helperText:p})})]},v)}},10178:(e,t,r)=>{r.d(t,{QE:()=>K,AB:()=>z});var n=r(64687),i=r.n(n),o=r(47736),a=r(97553),l=r(86013),c=r(90846),s=r(67294),u=r(18009),d=r(21439),f=r(85893);function p(e,t,r,n,i,o,a){try{var l=e[o](a),c=l.value}catch(s){return void r(s)}l.done?t(c):Promise.resolve(c).then(n,i)}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(c){i=!0,o=c}finally{try{n||null==l.return||l.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(e,t)}(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 h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=(0,l.t)("trix_editor.modal_copy.embed_helper_text"),v=function(e){var t=e.onClose,r=e.embedPlaceholder,n=e.embedDesc,a=e.helperText,c=e.embedBtn,h=(0,o.DM)().trixApiWrapper,v=m((0,s.useState)(""),2),_=v[0],y=v[1],g=(0,u.k)(),x=function(){var e,r=(e=i().mark((function e(r){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.preventDefault(),e.next=3,t&&t(),void(0,d.Q)({content:_,trixApiWrapper:h});case 3:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){p(o,n,i,a,l,"next",e)}function l(e){p(o,n,i,a,l,"throw",e)}a(void 0)}))});return function(e){return r.apply(this,arguments)}}(),j=Boolean(n),O=a!==b,w=!j&&O;return(0,f.jsxs)("form",{onSubmit:x,children:[(0,f.jsx)("input",{ref:g,value:_,style:{borderWidth:1},className:"upload-input placeholder:text-light placeholder:opacity-100",placeholder:r,onChange:function(e){y(e.target.value)},type:"text"}),(0,f.jsx)("button",{type:"submit",className:"btn btn-primary upload-btn",onClick:x,children:c}),(0,f.jsxs)("div",{className:"upload-embed__description",children:[j&&n,w&&a,!O&&(0,f.jsxs)("span",{children:[(0,l.t)("trix_editor.embed_form.works_with")," ",(0,f.jsx)("a",{href:"https://embed.ly/providers#service-search",target:"_blank",rel:"noreferrer",children:(0,l.t)("trix_editor.embed_form.content_providers")}),(0,l.t)("trix_editor.embed_form.including")]})]})]})};function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){g(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var x=function(e){for(var t=e.embedPlaceholder,r=e.helperText,n=e.embedBtn,i=e.onClose,o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return(0,f.jsxs)(c.m,{defaultValue:"Embed link",children:[(0,f.jsx)("div",{label:(0,l.t)("trix_editor.modal_copy.embed_link"),children:(0,f.jsx)(v,y(y({},a),{},{onClose:i,embedPlaceholder:t,helperText:r,embedBtn:n}))}),(0,f.jsx)("div",{label:""})]})},j=r(88959);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){C(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var P=function(e){for(var t=e.embedPlaceholder,r=e.dropTitle,n=e.helperText,i=e.embedDesc,o=e.embedBtn,a=e.onClose,s=arguments.length,u=new Array(s>1?s-1:0),d=1;d<s;d++)u[d-1]=arguments[d];return(0,f.jsxs)(c.m,{defaultValue:"Upload",children:[(0,f.jsx)("div",{label:(0,l.t)("upload"),children:(0,f.jsx)("div",{className:"pt-3",children:(0,f.jsx)(j.d,w({onClose:a,dropTitle:r,helperText:n},u))})}),(0,f.jsx)("div",{label:(0,l.t)("trix_editor.modal_copy.embed_link"),children:(0,f.jsx)(v,w(w({},u),{},{onClose:a,embedPlaceholder:t,helperText:n,embedDesc:i,embedBtn:o}))})]})},k=r(72509),S=r(41482),E=r(24510);function A(e,t,r,n,i,o,a){try{var l=e[o](a),c=l.value}catch(s){return void r(s)}l.done?t(c):Promise.resolve(c).then(n,i)}function I(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){A(o,n,i,a,l,"next",e)}function l(e){A(o,n,i,a,l,"throw",e)}a(void 0)}))}}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(c){i=!0,o=c}finally{try{n||null==l.return||l.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return T(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return T(e,t)}(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 T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var L=function(e){var t=e.onClose,r=(0,o.DM)().insertFile,n=N((0,s.useState)([]),2),a=n[0],l=n[1],c=function(e){E.q.photos.trackDownload({downloadLocation:e.links.download_location})};function u(){return(u=I(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d(t.trim());case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e){return p.apply(this,arguments)}function p(){return(p=I(i().mark((function e(t){var r,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E.q.search.getPhotos({query:t,page:1,perPage:30});case 2:r=e.sent,n=r.response.results,t.length>=1&&n.length>=1&&l(n);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,s.useEffect)((function(){d("wallpapers")}),[]),(0,f.jsx)(S.A,{unsplashResults:a,searchUnsplash:function(e){return u.apply(this,arguments)},addUnsplash:function(e){c(e),fetch(e.urls.regular).then((function(e){return e.blob()})).then((function(t){var n=new File([t],e.id,{type:"image/jpeg"});r(n)})).catch((function(e){console.error(e)})),t()}})};function D(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?D(Object(r),!0).forEach((function(t){M(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function M(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var H=function(e){for(var t=e.embedPlaceholder,r=e.embedDesc,n=e.dropTitle,i=e.helperText,o=e.embedBtn,a=e.onClose,s=arguments.length,u=new Array(s>1?s-1:0),d=1;d<s;d++)u[d-1]=arguments[d];return(0,f.jsxs)(c.m,{defaultValue:"Upload",variant:"underline",children:[(0,f.jsx)("div",{label:(0,l.t)("upload"),children:(0,f.jsx)("div",{className:"pt-3",children:(0,f.jsx)(j.d,R(R({onClose:a,dropTitle:n,helperText:i},u),{},{accept:"image/*"}))})}),(0,f.jsx)("div",{label:(0,l.t)("trix_editor.modal_copy.embed_link"),children:(0,f.jsx)(v,R(R({},u),{},{onClose:a,embedPlaceholder:t,embedDesc:r,helperText:i,embedBtn:o}))}),(0,f.jsx)("div",{label:(0,f.jsx)(k.$,{}),children:(0,f.jsx)(L,R({onClose:a},u))})]})},F=(0,l.t)("trix_editor.modal_copy.embed_link"),B=(0,l.t)("trix_editor.modal_copy.paste_https"),Z=r(94184),U=r.n(Z),V=r(55675),W=r(53448),z=function(e){var t=e.onClose,r=e.title,n=e.children,i=e.footerActions,o=e.shouldShowActionsFooter,a=void 0!==o&&o,c=e.isOpen,s=void 0===c||c;return(0,f.jsxs)(W.u_,{isOpen:s,onClose:t,className:"modal__box trix-modal__upload editor-modal fullpage-modal__attachment",children:[(0,f.jsx)(W.u_.Overlay,{}),(0,f.jsxs)(W.u_.Content,{size:"lg",children:[(0,f.jsxs)(W.u_.Header,{className:U()({"justify-between":!!r,"!justify-end":!r}),children:[r&&(0,f.jsx)(W.u_.Title,{size:"sm",children:r}),(0,f.jsx)(W.u_.HeaderActions,{children:(0,f.jsx)(W.u_.CloseButton,{onClick:t})})]}),(0,f.jsx)(W.u_.Body,{className:"!pt-0 md:pb-6",children:n}),a&&(0,f.jsxs)(W.u_.Footer,{className:"flex justify-end space-x-4",children:[(0,f.jsx)(V.z,{type:"button",variant:"secondary",onClick:i.onCancel,children:(0,l.t)("cancel")}),(0,f.jsx)(V.z,{type:"submit",variant:"circle",onClick:i.onSaveChanges,children:(0,l.t)("save_changes")})]})]})]})},q=function(e){var t=e.attribute,r=e.subtype,n=e.onClose,i=function(e){var t="",r="",n="",i="",o="",a="";switch(e){case"image":t=(0,l.t)("trix_editor.modal_copy.paste_image_file_link"),n=(0,l.t)("trix_editor.modal_copy.drop_images_upload"),i=(0,l.t)("trix_editor.modal_copy.works_any_image"),o=(0,l.t)("trix_editor.modal_copy.embed_image"),a=(0,l.t)("trix_editor.modal_copy.image");break;case"pdf":t=(0,l.t)("trix_editor.modal_copy.https_placeholder"),n=(0,l.t)("trix_editor.modal_copy.drop_pdf"),i=(0,l.t)("trix_editor.modal_copy.works_pdf"),o=(0,l.t)("trix_editor.modal_copy.embed_pdf"),a=(0,l.t)("trix_editor.modal_copy.pdf");break;case"video":t=(0,l.t)("trix_editor.modal_copy.paste_video_link"),r=(0,l.t)("trix_editor.modal_copy.works_youtube"),n=(0,l.t)("trix_editor.modal_copy.drop_video"),i=(0,l.t)("trix_editor.modal_copy.upload_mp4"),o=(0,l.t)("trix_editor.modal_copy.embed_video"),a=(0,l.t)("trix_editor.modal_copy.video");break;case"audio":t=(0,l.t)("trix_editor.modal_copy.https_placeholder"),n=(0,l.t)("trix_editor.modal_copy.drop_audio"),i=(0,l.t)("trix_editor.modal_copy.works_audio"),o=(0,l.t)("trix_editor.modal_copy.embed_audio"),a=(0,l.t)("trix_editor.modal_copy.audio");break;case"file":t=(0,l.t)("trix_editor.modal_copy.paste_file_link"),n=(0,l.t)("trix_editor.modal_copy.drop_file"),i=(0,l.t)("trix_editor.modal_copy.works_links"),o=F,a=(0,l.t)("trix_editor.modal_copy.file");break;case"embed":t=B,n=(0,l.t)("trix_editor.modal_copy.drop_file"),i=(0,l.t)("trix_editor.modal_copy.embed_helper_text"),o=F,a=(0,l.t)("trix_editor.modal_copy.link");break;case"youtube":t=B,i=(0,l.t)("trix_editor.modal_copy.works_sharable_youtube"),o=(0,l.t)("trix_editor.modal_copy.embed_video"),a=(0,l.t)("trix_editor.modal_copy.youtube");break;case"wistia":t=B,i=(0,l.t)("trix_editor.modal_copy.works_wistia"),o=(0,l.t)("trix_editor.modal_copy.embed_video"),a=(0,l.t)("trix_editor.modal_copy.wistia");break;case"vimeo":t=B,i=(0,l.t)("trix_editor.modal_copy.works_vimeo"),o=(0,l.t)("trix_editor.modal_copy.embed_video"),a=(0,l.t)("trix_editor.modal_copy.vimeo");break;case"loom":t=B,i=(0,l.t)("trix_editor.modal_copy.works_loom"),o=F,a=(0,l.t)("trix_editor.modal_copy.loom");break;case"soundcloud":t=B,i=(0,l.t)("trix_editor.modal_copy.works_soundcloud"),o=F,a=(0,l.t)("trix_editor.modal_copy.soundcloud");break;case"spotify":t=B,i=(0,l.t)("trix_editor.modal_copy.works_spotify"),o=F,a=(0,l.t)("trix_editor.modal_copy.spotify");break;case"simplecast":t=B,i=(0,l.t)("trix_editor.modal_copy.works_simplecast"),o=F,a=(0,l.t)("trix_editor.modal_copy.simplecast");break;case"instagram":t=B,i=(0,l.t)("trix_editor.modal_copy.works_instagram"),o=F,a=(0,l.t)("trix_editor.modal_copy.instagram");break;case"facebook":t=B,i=(0,l.t)("trix_editor.modal_copy.works_facebook"),o=F,a=(0,l.t)("trix_editor.modal_copy.facebook");break;case"twitter":t=(0,l.t)("trix_editor.modal_copy.twitter_link_placeholder"),i=(0,l.t)("trix_editor.modal_copy.works_twitter"),o=(0,l.t)("trix_editor.modal_copy.embed_twitter"),a=(0,l.t)("trix_editor.modal_copy.twitter");break;case"typeform":t=(0,l.t)("trix_editor.modal_copy.paste_typeform"),i=(0,l.t)("trix_editor.modal_copy.works_typeform"),o=F,a=(0,l.t)("trix_editor.modal_copy.typeform");break;case"airtable":t=(0,l.t)("trix_editor.modal_copy.paste_airtable"),i=(0,l.t)("trix_editor.modal_copy.works_airtable"),o=F,a=(0,l.t)("trix_editor.modal_copy.airtable");break;case"videoask":t=(0,l.t)("trix_editor.modal_copy.paste_videoask"),i=(0,l.t)("trix_editor.modal_copy.works_videoask"),o=(0,l.t)("trix_editor.modal_copy.embed_videoask"),a=(0,l.t)("trix_editor.modal_copy.videoask");break;case"github":t=B,i=(0,l.t)("trix_editor.modal_copy.works_gist"),o=(0,l.t)("trix_editor.modal_copy.embed_gist"),a=(0,l.t)("trix_editor.modal_copy.github");break;case"googlemaps":t=(0,l.t)("trix_editor.modal_copy.maps_placeholder"),i=(0,l.t)("trix_editor.modal_copy.works_maps"),o=(0,l.t)("trix_editor.modal_copy.embed_map"),a=(0,l.t)("trix_editor.modal_copy.google_maps");break;case"codepen":t=B,i=(0,l.t)("trix_editor.modal_copy.works_codepen"),o=F,a=(0,l.t)("trix_editor.modal_copy.codepen");break;default:t=(0,l.t)("trix_editor.modal_copy.https_placeholder"),n=(0,l.t)("trix_editor.modal_copy.drop_file"),o=(0,l.t)("trix_editor.modal_copy.embed"),a=(0,l.t)("trix_editor.modal_copy.file")}return{embedPlaceholder:t,embedDesc:r,dropTitle:n,helperText:i,embedBtn:o,itemName:a}}(r),o=i.embedPlaceholder,a=i.embedDesc||"",c=i.dropTitle,s=i.helperText,u=i.embedBtn,d=i.itemName;return"attachment_image"===t?(0,f.jsx)(z,{onClose:n,title:d,children:(0,f.jsx)(H,{onClose:n,embedPlaceholder:o,dropTitle:c,helperText:s,embedBtn:u,embedDesc:a})}):"attachment_file"===t||"attachment_pdf"===t||"attachment_audio"===t||"attachment_video"===t?(0,f.jsx)(z,{onClose:n,title:d,children:(0,f.jsx)(P,{onClose:n,embedPlaceholder:o,dropTitle:c,helperText:s,embedDesc:a,embedBtn:u})}):"embed"===t?(0,f.jsx)(z,{onClose:n,title:d,children:(0,f.jsx)(x,{onClose:n,embedPlaceholder:o,dropTitle:c,helperText:s,embedBtn:u})}):null};function G(e,t,r,n,i,o,a){try{var l=e[o](a),c=l.value}catch(s){return void r(s)}l.done?t(c):Promise.resolve(c).then(n,i)}var K=function(){var e=(0,a.Xz)(),t=e.subMode,r=e.subType,n=e.showInlineModalSelector,l=e.resetEditorMode,c=e.restoreToLastKnownPosition,s=(0,o.DM)().editorElement;if(!n())return null;var u=function(){var e,t=(e=i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l();case 2:return e.next=4,c();case 4:s.focus();case 5:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){G(o,n,i,a,l,"next",e)}function l(e){G(o,n,i,a,l,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return(0,f.jsx)("div",{className:"inline-modal-selector",style:{height:0},children:(0,f.jsx)(q,{attribute:t,subtype:r,onClose:u})})}},14052:(e,t,r)=>{r.d(t,{io:()=>v,v:()=>b});var n=r(85893),i=function(e){var t=e.width,r=e.height,i=e.viewBox,o=e.children,a=e.fill,l=e.stroke,c=e.strokeWidth,s=e.strokeLinecap,u=e.strokeLinejoin,d=[e.dOne,e.dTwo,e.dThree,e.dFour,e.dFive,e.dSix];return(0,n.jsxs)("svg",{width:t,height:r,viewBox:i,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.map((function(e,t){if(e)return(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:e,fill:""===a?"":"#8D9CAE",stroke:l,strokeWidth:c,strokeLinecap:s,strokeLinejoin:u},t)})),o]})},o=function(){return(0,n.jsx)(i,{width:"10",height:"13",viewBox:"0 0 10 13",dOne:"M5.48583 0H1.11336C1.07493 0 1.03695 0.00195996 0.999526 0.00578599C0.438107 0.0631765 0 0.540434 0 1.12069V6.01097V11.8793C0 12.4983 0.498468 13 1.11336 13H5.97166C8.19659 13 10 11.1847 10 8.94514C10 7.59944 9.34889 6.40694 8.34645 5.66939C8.7752 5.07967 9.02834 4.35247 9.02834 3.56583C9.02834 1.59668 7.4421 0 5.48583 0ZM2.22604 7.13166H5.48583L5.48839 7.1316L5.97166 7.13166C6.96681 7.13166 7.77328 7.94344 7.77328 8.94514C7.77328 9.94684 6.96681 10.7586 5.97166 10.7586H2.22604V7.13166ZM5.48583 4.89028C6.21231 4.89028 6.80162 4.2971 6.80162 3.56583C6.80162 2.87758 6.27961 2.31164 5.61252 2.24744L5.48583 2.24138H2.22672V4.89028H5.48583Z"})},a=function(){return(0,n.jsx)(i,{width:"16",height:"12",viewBox:"0 0 16 12",dOne:"M3.8 3.30005L1 6.10005L3.8 8.90005",dTwo:"M12.2002 3.30005L15.0002 6.10005L12.2002 8.90005",dThree:"M6.76562 11.039L9.27293 1.00977L6.76562 11.039Z",fill:"",stroke:"#8D9CAE",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})},l=function(){return(0,n.jsx)(i,{width:"8",height:"13",viewBox:"0 0 8 13",dOne:"M4 1.50251H4.60125L1.79606 11.4975H0.773109L0.668203 11.5043C0.290848 11.5541 0 11.8684 0 12.2487C0 12.6637 0.346133 13 0.773109 13H2.36978C2.3813 13.0003 2.39279 13.0002 2.40424 13H4L4.10491 12.9931C4.48226 12.9434 4.77311 12.6291 4.77311 12.2487C4.77311 11.8338 4.42698 11.4975 4 11.4975H3.39875L6.20394 1.50251H7.22689L7.3318 1.49565C7.70915 1.44591 8 1.13159 8 0.751256C8 0.336349 7.65387 0 7.22689 0H5.63024C5.61871 -0.000252011 5.6072 -0.000250653 5.59574 0H4L3.89509 0.00685808C3.51774 0.0566037 3.22689 0.370925 3.22689 0.751256C3.22689 1.16616 3.57302 1.50251 4 1.50251Z"})},c=function(){return(0,n.jsx)(i,{width:"15",height:"15",viewBox:"0 0 15 15",dOne:"M8.41 6.58997V6.58997C9.71 7.88997 9.71 9.90497 8.41 11.205L6.59 13.025C5.29 14.325 3.275 14.325 1.975 13.025C0.675 11.725 0.675 9.70997 1.975 8.40997L3.6 6.84997",dTwo:"M6.59023 8.41V8.41C5.29023 7.11 5.29023 5.095 6.59023 3.795L8.41023 1.975C9.71023 0.675 11.7252 0.675 13.0252 1.975C14.3252 3.275 14.3252 5.29 13.0252 6.59L11.4002 8.15",fill:"",stroke:"#8D9CAE",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})},s=function(){return(0,n.jsxs)(i,{width:"14",height:"12",viewBox:"0 0 14 12",dOne:"M1.85714 0.928571C1.85714 1.44161 1.44161 1.85714 0.928571 1.85714C0.415536 1.85714 0 1.44161 0 0.928571C0 0.415536 0.415536 0 0.928571 0C1.44161 0 1.85714 0.415536 1.85714 0.928571Z",children:[(0,n.jsx)("path",{d:"M4.33301 0.928589H12.9997",stroke:"#8D9CAE",strokeWidth:"1.5",strokeLinecap:"round"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.85714 5.88096C1.85714 6.394 1.44161 6.80954 0.928571 6.80954C0.415536 6.80954 0 6.394 0 5.88096C0 5.36793 0.415536 4.95239 0.928571 4.95239C1.44161 4.95239 1.85714 5.36793 1.85714 5.88096Z",fill:"#8D9CAE"}),(0,n.jsx)("path",{d:"M4.33301 5.88098H12.9997",stroke:"#8D9CAE",strokeWidth:"1.5",strokeLinecap:"round"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.85714 10.8334C1.85714 11.3464 1.44161 11.7619 0.928571 11.7619C0.415536 11.7619 0 11.3464 0 10.8334C0 10.3203 0.415536 9.90479 0.928571 9.90479C1.44161 9.90479 1.85714 10.3203 1.85714 10.8334Z",fill:"#8D9CAE"}),(0,n.jsx)("path",{d:"M4.33301 10.8334H12.9997",stroke:"#8D9CAE",strokeWidth:"1.5",strokeLinecap:"round"})]})},u=function(){return(0,n.jsxs)(i,{width:"15",height:"14",viewBox:"0 0 15 14",dOne:"M0.364258 3.1567V2.72391L0.835388 2.68557C0.912084 2.68009 0.92304 2.65817 0.92304 2.576V0.663478C0.92304 0.597739 0.907214 0.56487 0.851823 0.548435L0.375214 0.449826L0.435475 0H1.75087V2.576C1.75087 2.66365 1.75634 2.68009 1.83852 2.68557L2.28774 2.72391V3.1567H0.364258Z",dTwo:"M0.0793635 8.06736V7.55788L0.814059 6.83962C1.36736 6.30275 1.60293 6.08362 1.60293 5.77136C1.60293 5.56867 1.50432 5.42075 1.21397 5.42075C0.912059 5.42075 0.786059 5.51936 0.786059 5.90832L0.0410156 5.84258C0.0464939 4.97153 0.709363 4.82849 1.28458 4.82849C2.13432 4.82849 2.43562 5.19006 2.43562 5.70562C2.43562 6.22058 2.07954 6.56023 1.67962 6.94371L1.05997 7.53597H1.86589C1.92067 7.53597 1.94258 7.52501 1.95354 7.47023L2.03023 7.03745H2.61093V8.06736H0.0793635Z",dThree:"M1.92896 11.2573C2.39522 11.3286 2.65209 11.608 2.65209 12.101C2.65209 12.8247 2.10974 13.1644 1.32635 13.1644C0.773043 13.1644 0.28 12.9672 0 12.6604L0.438261 12.1783C0.647043 12.381 0.876522 12.5393 1.26061 12.5393C1.56739 12.5393 1.83035 12.4303 1.83035 12.0462C1.83035 11.712 1.62217 11.5751 1.28252 11.5751C1.14557 11.5751 1.04148 11.586 0.876522 11.6134V11.0656L1.14557 11.0327C1.54 10.9834 1.75365 10.7917 1.75365 10.4411C1.75365 10.2323 1.66052 10.0631 1.35374 10.0631C1.05791 10.0631 0.915478 10.1617 0.915478 10.5507L0.164957 10.4843C0.164957 9.61874 0.81687 9.47083 1.39209 9.47083C2.23574 9.47083 2.55957 9.79404 2.55957 10.3808C2.55957 10.841 2.27409 11.1313 1.92896 11.2354V11.2573Z",children:[(0,n.jsx)("path",{d:"M4.28516 1.57849H13.4156",stroke:"#8D9CAE",strokeWidth:"1.5",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M4.28516 6.448H13.4156",stroke:"#8D9CAE",strokeWidth:"1.5",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M4.28516 11.3176H13.4156",stroke:"#8D9CAE",strokeWidth:"1.5",strokeLinecap:"round"})]})},d=function(){return(0,n.jsx)(i,{width:"15",height:"12",viewBox:"0 0 15 12",dOne:"M1.59082 1H13.9999",dTwo:"M1.59139 11.2267L1.66358 5.31824",dThree:"M5.72754 5.61369H14.0003",dFour:"M5.72754 10.9318H11.6366",stroke:"#8D9CAE",strokeWidth:"1.5",strokeLinecap:"round"})},f=function(){return(0,n.jsx)(i,{width:"15",height:"14",viewBox:"0 0 15 14",dOne:"M11.5323 3.15165C11.27 1.2493 9.78733 0 7.76961 0H6.53884L6.35102 0.0045072C4.35973 0.100288 2.76961 1.7107 2.76961 3.69231C2.76961 5.89758 3.92624 6.61807 6.99027 7.36492L7.67827 7.53689C7.91526 7.59864 8.10006 7.65096 8.26984 7.7049L8.56725 7.80612C8.92672 7.93641 9.32374 7.75063 9.45404 7.39116C9.58433 7.03169 9.39855 6.63467 9.03908 6.50437C8.69397 6.37928 8.39144 6.28935 7.89205 6.16208L6.84676 5.90107C4.75487 5.35544 4.15422 4.90072 4.15422 3.69231C4.15422 2.42144 5.21763 1.38462 6.53884 1.38462H7.76961L7.94128 1.38884C9.18131 1.45061 10.0015 2.18604 10.1607 3.34079C10.2129 3.71956 10.5623 3.98427 10.9411 3.93204C11.3199 3.87981 11.5846 3.53042 11.5323 3.15165ZM11.5388 9.69231C11.5388 9.30996 11.2289 9 10.8465 9C10.4642 9 10.1542 9.30996 10.1542 9.69231L10.1492 9.84364C10.0687 11.0445 9.03797 12 7.76961 12H6.53884L6.37338 11.9951C5.17453 11.9235 4.30011 11.0747 4.14863 9.89036C4.10011 9.5111 3.75334 9.24298 3.37407 9.29149C2.99481 9.34 2.72669 9.68678 2.7752 10.066C3.02042 11.9831 4.54576 13.3846 6.53884 13.3846H7.76961L7.95743 13.3801C9.94872 13.2843 11.5388 11.6739 11.5388 9.69231Z",dTwo:"M13.6154 6.46155C13.9977 6.46155 14.3077 6.7715 14.3077 7.15386C14.3077 7.50434 14.0472 7.794 13.7093 7.83984L13.6154 7.84616H0.692308C0.309957 7.84616 0 7.53621 0 7.15386C0 6.80337 0.26045 6.51371 0.598366 6.46787L0.692308 6.46155H13.6154Z"})},p=function(){return(0,n.jsx)(i,{width:"20",height:"15",viewBox:"0 0 20 15",dOne:"M0 0H6.41485V1.06838H5.42198C4.805 1.06838 4.30484 1.56854 4.30484 2.18551V6.42305H10.7187V2.18551C10.7187 1.56854 10.2185 1.06838 9.60157 1.06838H8.58509V0H15V1.06838H13.9945C13.3775 1.06838 12.8774 1.56854 12.8774 2.18551V12.8037C12.8774 13.4206 13.3775 13.9208 13.9945 13.9208H15V15H8.58509V13.9208H9.60157C10.2185 13.9208 10.7187 13.4206 10.7187 12.8037V7.5H4.30484V12.8037C4.30484 13.4206 4.805 13.9208 5.42198 13.9208H6.41485V15H0V13.9208H1.031C1.64798 13.9208 2.14814 13.4206 2.14814 12.8037V2.18552C2.14814 1.56854 1.64798 1.06838 1.031 1.06838H0V0ZM19.1 19.5C19.5971 19.5 20 19.9029 20 20.4C20 20.8971 19.5971 21.3 19.1 21.3H0.899999C0.402943 21.3 0 20.8971 0 20.4C0 19.9029 0.402944 19.5 0.9 19.5H19.1ZM17 24.9C17 24.4029 16.5971 24 16.1 24H0.9C0.402944 24 0 24.4029 0 24.9C0 25.3971 0.402943 25.8 0.899999 25.8H16.1C16.5971 25.8 17 25.3971 17 24.9Z",dTwo:"M16.0597 14.2135L17.2032 13.1047C18.0644 12.2759 18.4311 11.9376 18.4311 11.4556C18.4311 11.1426 18.2776 10.9143 17.8257 10.9143C17.3558 10.9143 17.1596 11.0665 17.1596 11.667L16 11.5655C16.0085 10.2208 17.0403 10 17.9356 10C19.2582 10 19.7271 10.5582 19.7271 11.3541C19.7271 12.149 19.1729 12.6734 18.5505 13.2654L17.7035 14.0797H18.6962C18.9171 14.0797 19.0962 13.9006 19.0962 13.6797V13.4101H20V15H16.0597V14.2135Z"})},m=function(){return(0,n.jsx)(i,{width:"20",height:"15",viewBox:"0 0 20 15",dOne:"M0 0H6.41485V1.06838H5.42198C4.805 1.06838 4.30484 1.56854 4.30484 2.18551V6.42305H10.7187V2.18551C10.7187 1.56854 10.2185 1.06838 9.60157 1.06838H8.58509V0H15V1.06838H13.9945C13.3775 1.06838 12.8774 1.56854 12.8774 2.18551V12.8037C12.8774 13.4206 13.3775 13.9208 13.9945 13.9208H15V15H8.58509V13.9208H9.60157C10.2185 13.9208 10.7187 13.4206 10.7187 12.8037V7.5H4.30484V12.8037C4.30484 13.4206 4.805 13.9208 5.42198 13.9208H6.41485V15H0V13.9208H1.031C1.64798 13.9208 2.14814 13.4206 2.14814 12.8037V2.18552C2.14814 1.56854 1.64798 1.06838 1.031 1.06838H0V0ZM19.1 19.5C19.5971 19.5 20 19.9029 20 20.4C20 20.8971 19.5971 21.3 19.1 21.3H0.899999C0.402943 21.3 0 20.8971 0 20.4C0 19.9029 0.402944 19.5 0.9 19.5H19.1ZM17 24.9C17 24.4029 16.5971 24 16.1 24H0.9C0.402944 24 0 24.4029 0 24.9C0 25.3971 0.402943 25.8 0.899999 25.8H16.1C16.5971 25.8 17 25.3971 17 24.9Z",dTwo:"M18.9093 12.1603C19.6126 12.2663 20 12.6824 20 13.4165C20 14.4942 19.182 15 18.0005 15C17.1659 15 16.4223 14.7063 16 14.2495L16.661 13.5316C16.9759 13.8335 17.322 14.0691 17.9013 14.0691C18.364 14.0691 18.7606 13.9069 18.7606 13.335C18.7606 12.8373 18.4466 12.6334 17.9344 12.6334C17.7278 12.6334 17.5708 12.6497 17.322 12.6905V11.8748L17.7278 11.8258C18.3227 11.7524 18.6449 11.4669 18.6449 10.9448C18.6449 10.6339 18.5045 10.3819 18.0418 10.3819C17.5956 10.3819 17.3808 10.5288 17.3808 11.1079L16.2488 11.0091C16.2488 9.72025 17.232 9.5 18.0996 9.5C19.372 9.5 19.8605 9.9813 19.8605 10.8551C19.8605 11.5403 19.4299 11.9726 18.9093 12.1276V12.1603Z"})},h=[{label:(0,n.jsx)(o,{}),showInInlineToolbar:!0,attribute:"bold"},{label:(0,n.jsx)(l,{}),showInInlineToolbar:!0,attribute:"italic"},{label:(0,n.jsx)(p,{}),attribute:"heading2",showInInlineToolbar:!0,shortcutPatten:"# "},{label:(0,n.jsx)(m,{}),attribute:"heading3",showInInlineToolbar:!0,shortcutPatten:"## "},{label:(0,n.jsx)(d,{}),showInInlineToolbar:!0,attribute:"quote"},{label:(0,n.jsx)(a,{}),attribute:"code"},{label:(0,n.jsx)(f,{}),showInInlineToolbar:!0,attribute:"strike"},{label:(0,n.jsx)(c,{}),showInInlineToolbar:!0,attribute:"href"},{label:(0,n.jsx)(s,{}),attribute:"bullet",showInInlineToolbar:!0,shortcutPatten:"- "},{label:(0,n.jsx)(u,{}),attribute:"number",showInInlineToolbar:!0,shortcutPatten:"1."},{attribute:"divider",showInInlineToolbar:!1,shortcutPatten:"---"}],b=h.filter((function(e){return e.shortcutPatten})),v=h.filter((function(e){return e.showInInlineToolbar}))},41431:(e,t,r)=>{r.d(t,{f:()=>a});var n=r(22837);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(c){i=!0,o=c}finally{try{n||null==l.return||l.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var a=function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.insertAttachment=function(e){var t=new n.default.Attachment(e);return r.editor.insertAttachment(t),t},this.insertLineBreak=function(){return r.editor.insertLineBreak()},this.insertFile=function(e){return r.editor.insertFile(e)},this.recordUndoEntry=function(e){return r.editor.recordUndoEntry(e)},this.activateAttribute=function(e,t){return r.editor.activateAttribute(e,t)},this.deactivateAttribute=function(e){return r.editor.deactivateAttribute(e)},this.attributeIsActive=function(e){return r.editor.attributeIsActive(e)},this.insertString=function(e){return r.editor.insertString(e)},this.getSelectedRange=function(){return r.editor.getSelectedRange()},this.setSelectedRange=function(e){var t=i(e,2),n=t[0],o=t[1];return r.editor.setSelectedRange([n,o])},this.getStringInRange=function(e){var t=i(e,2),n=t[0],o=t[1];return r.editor.getDocument().toString().substring(n,o)},this.getClientRectAtPosition=function(e){return r.editor.getClientRectAtPosition(e)},this.getPosition=function(){return r.editor.getPosition()},this.getDocument=function(){return r.editor.getDocument()},this.insertHr=function(){r.insertAttachment({content:"<hr />",contentType:"vnd.rubyonrails.horizontal-rule.html"})},this.getPieceAtPosition=function(e){return r.editor.getDocument().getPieceAtPosition(e)},this.getHrefAtPosition=function(e){var t=r.getPieceAtPosition(e);if(t)return t.attributes.values.href},this.getHrefAtCurrentPosition=function(){return r.getHrefAtPosition(r.getPosition())},this.getRangeOfHrefAtPosition=function(e){return r.getRangeOfCommonAttributeAtPosition("href",e)},this.getRangeOfCommonAttributeAtPosition=function(e,t){return r.editor.getDocument().getRangeOfCommonAttributeAtPosition(e,t)},this.getRangeOfHrefAtCurrentPosition=function(){return r.getRangeOfHrefAtPosition(r.getPosition())},this.getClosestAttachment=function(e){var t=e.closest("[data-trix-attachment]");return r.getAttachmentById(parseInt(t.dataset.trixId,10))},this.getAttachmentById=function(e){return r.editor.composition.attachments.find((function(t){return t.id===e}))},this.removeAttachmentById=function(e){r.editor.composition.removeAttachment(r.getAttachmentById(e))},this.editAttachment=function(e){r.editor.composition.editAttachment(e)},this.stopEditingAttachment=function(e){r.editor.composition.stopEditingAttachment(e)},this.addAttributeAtRange=function(e,t,n){return r.getDocument().addAttributeAtRange(e,t,n)},this.insertTextAtRange=function(e,t){return r.getDocument().insertTextAtRange(e,t)},this.getRangeOfAttachment=function(e){return r.getDocument().getRangeOfAttachment(e)},this.editor=t}},47736:(e,t,r)=>{r.d(t,{DE:()=>c,DM:()=>u});var n=r(67294),i=r(22837),o=r(41431);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(c){i=!0,o=c}finally{try{n||null==l.return||l.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var c=(0,n.createContext)();c.displayName="TrixEditorContext";var s=function(){return(0,n.useContext)(c)},u=function(){var e=s(),t=e.editor,r=new o.f(t);return{editorElement:e,trixApiWrapper:r,insertString:function(e){return t.insertString(e)},setSelectedRange:function(e){var r=a(e,2),n=r[0],i=r[1];return t.setSelectedRange([n,i])},insertAttachment:function(e){var r=new i.default.Attachment(e);return t.insertAttachment(r),r},insertFile:function(e){return t.insertFile(e)},insertLineBreak:function(){return t.insertLineBreak()},insertHr:r.insertHr,recordUndoEntry:function(e){return t.recordUndoEntry(e)},activateAttribute:function(e,r){return t.activateAttribute(e,r)},deactivateAttribute:function(e){return t.deactivateAttribute(e)},attributeIsActive:function(e){return t.attributeIsActive(e)},getStringInRange:function(e){var r=a(e,2),n=r[0],i=r[1];return t.getDocument().toString().substring(n,i)},getClientRectAtPosition:function(e){return t.getClientRectAtPosition(e)},getPosition:function(){return t.getPosition()},deleteInDirection:function(e){return t.deleteInDirection(e)},getPieceAtPosition:r.getPieceAtPosition,getHrefAtPosition:r.getHrefAtPosition}}},21439:(e,t,r)=>{r.d(t,{Q:()=>c});var n=r(64687),i=r.n(n),o=r(77529);function a(e,t,r,n,i,o,a){try{var l=e[o](a),c=l.value}catch(s){return void r(s)}l.done?t(c):Promise.resolve(c).then(n,i)}var l=function(e){var t=e.content;return fetch((0,o.wY)(),{body:JSON.stringify({embed:{content:t}}),method:"POST",dataType:"script",credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json"}})},c=function(){var e,t=(e=i().mark((function e(t){var r,n,o,a,c,s,u,d,f,p,m,h,b;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.content,n=t.trixApiWrapper,o=t.skipRecordUndoEntry,a=void 0!==o&&o,c=t.skipLineBreak,s=void 0!==c&&c,a||n.recordUndoEntry(),u=n.insertAttachment({content:'<div class="trix-preloader" />',contentType:"embed"}),s||n.insertLineBreak(),e.next=6,l({content:r});case 6:if(!(d=e.sent).ok){e.next=16;break}return e.next=10,d.json();case 10:f=e.sent,p=f.content,m=f.sgid,u.setAttributes({content:p,contentType:"embed",sgid:m}),e.next=23;break;case 16:h=n.getSelectedRange(),b=n.getRangeOfAttachment(u),n.setSelectedRange(b),n.insertString(r),n.setSelectedRange([b[0],b[0]+r.length]),n.activateAttribute("href",r),n.setSelectedRange(h.map((function(e){return e+r.length})));case 23:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function l(e){a(o,n,i,l,c,"next",e)}function c(e){a(o,n,i,l,c,"throw",e)}l(void 0)}))});return function(e){return t.apply(this,arguments)}}()},97553:(e,t,r)=>{r.d(t,{P6:()=>m,Xz:()=>h,w2:()=>b});var n=r(67294),i=r(96486),o=r(95071),a=r(77672),l=r(26953),c=r(14052),s=r(41431);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(c){i=!0,o=c}finally{try{n||null==l.return||l.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}(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 d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var f=String.fromCharCode(65532),p="inline-toolbar",m=(0,n.createContext)();m.displayName="TrixEditorModeContext";var h=function(){return(0,n.useContext)(m)},b=function(e){var t=u((0,n.useState)(null),2),r=t[0],d=t[1],m=u((0,n.useState)(null),2),h=m[0],b=m[1],v=u((0,n.useState)(null),2),_=v[0],y=v[1],g=u((0,n.useState)(null),2),x=g[0],j=g[1],O=u((0,n.useState)({}),2),w=O[0],C=O[1],P=u((0,n.useState)(null),2),k=P[0],S=P[1],E=u((0,n.useState)(null),2),A=E[0],I=E[1],N=u((0,n.useState)(!1),2),T=N[0],L=N[1],D=(0,l.Be)(),R=function(){d(null),b(null),y(null),j(null),S(null)};(0,n.useEffect)((function(){var t=function(){r&&null!==x&&e&&C(Z())};return window.addEventListener("scroll",t),function(){return window.removeEventListener("scroll",t)}}),[x,C,r,e]),(0,n.useEffect)((function(){C(null!==x?Z():{})}),[x,e]),(0,n.useEffect)((function(){if(e){var t=e.editor;if(t){var n=function(e){if(t){var n,i,o=t.getDocument().toString(),a=t.getPosition(),l=new s.f(t),u=function(t){var r=t.length,n=a-(r+1),i=a===r,l="\n"===o[n],c=o[n]===f,s=i||l||c;return t[r-1]===e.key&&o.substr(a-r,r)===t&&s};if(c.v.forEach((function(e){u(e.shortcutPatten)&&(n=e)})),n)if(t.recordUndoEntry("Applying shortcurt pattern ".concat(n.attribute)),t.setSelectedRange([a-n.shortcutPatten.length,a]),t.deleteInDirection("backward"),"divider"===n.attribute)l.insertHr();else l.activateAttribute(n.attribute);else"inline-emoji-selector"!==r||":"===o[x]&&(i=o.substring(x+1,a),!/\s/g.test(i))?":"===e.key&&D?(d("inline-emoji-selector"),j(a-1)):u("/")&&D?M():"inline-block-selector"===r&&"withPrefix"===h&&"/"!==o[x]&&R():R()}};return e.addEventListener("keyup",n),function(){e&&e.removeEventListener("keyup",n)}}}}),[r,d,e,x,j]);var M=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).withPrefix,r=void 0===t||t,n=e.editor;if(n){var i=n.getPosition();d("inline-block-selector"),r&&b("withPrefix");var o=i;r&&(o=i-1),j(o),C(B.getClientRectAtPosition(o))}},H=function(){if(!(0,o.s2)()){var t=e.editor.getDocument().toString(),r=u(e.editor.getSelectedRange(),2),n=r[0],i=r[1];if(n!==i){if(t.substr(n,i-n).includes(f))return;d(p),j(n),S(i)}}};(0,n.useEffect)((function(){if(e&&!(0,o.s2)()){var t=function(){return L(!0)},n=function(){L(!1);var t=u(e.editor.getSelectedRange(),2),n=t[0],i=t[1];r!==p&&n!==i&&setTimeout(H,100)};return n=(0,i.debounce)(n),document.addEventListener("mouseup",n),document.addEventListener("mousedown",t),function(){document.removeEventListener("mouseup",n),document.removeEventListener("mousedown",t)}}}),[e,L,r,H]),(0,a.h)(R);var F=function(e){(0,o.s2)()||"k"===e.key&&V()&&(e.preventDefault(),W())};(0,n.useEffect)((function(){if(e){var t=function(e){e.metaKey&&F(e)};return e.addEventListener("keydown",t),function(){e.removeEventListener("keydown",t)}}}),[F,e]),(0,n.useEffect)((function(){if(e){var t=function(){I(e.editor.getPosition());var t=u(e.editor.getSelectedRange(),2);t[0]===t[1]?(r===p&&R(),(0,o.s2)()||(B.attributeIsActive("href")?(d("hyperlink-tooltip"),j(B.getPosition())):"hyperlink-tooltip"===r&&R())):("hyperlink-tooltip"===r&&R(),T||H())};return e.addEventListener("trix-selection-change",t),function(){e.removeEventListener("trix-selection-change",t)}}}),[r,d,e,x,j,T,I,A,H]);var B=new s.f(null===e||void 0===e?void 0:e.editor),Z=function(){if(e){var t=B.getClientRectAtPosition(x);return t||((t=e.getBoundingClientRect().toJSON()).right=t.left,t.bottom=t.top,t)}},U=function(){return![null,void 0].includes(x)},V=function(){return r===p&&U()&&![null,void 0].includes(k)},W=function(){d(p),b("href")};return{mode:r,subMode:h,subType:_,startPosition:x,endPosition:k,resetEditorMode:R,showInlineEmojiSelector:function(){return"inline-emoji-selector"===r&&U()},triggerInlineEmojiSelector:function(){B.insertString(":"),d("inline-emoji-selector"),j(B.getPosition()-1)},showInlineToolbar:V,showHyperlinkTooltip:function(){return"hyperlink-tooltip"===r&&U()},showInlineBlockSelector:function(){return"inline-block-selector"===r&&U()},showInlineModalSelector:function(){return"inline-modal-selector"===r&&h},startPositionRect:function(){return w},endPositionRect:function(){return B.getClientRectAtPosition(k)},setModeInlineModalSelector:function(e){d("inline-modal-selector"),b(e)},setSubTypeInlineModalSelector:function(e){d("inline-modal-selector"),y(e)},setModeInlineBlockSelector:M,showEmojiPicker:function(){return"toolbar-emoji-picker"===r},setModeEmojiPicker:function(){d("toolbar-emoji-picker")},showGiphyPicker:function(){return"toolbar-giphy-picker"===r},setModeGiphyPicker:function(){d("toolbar-giphy-picker")},restoreToLastKnownPosition:function(){var e=A||0;return B.setSelectedRange([e,e])},toggleOnInlineLinkForm:W,toggleOffInlineLinkForm:function(){b(null)},showInlineLinkForm:function(){return r===p&&"href"===h},setModeModalBlockSelector:function(){j(B.getPosition()),d("modal-block-selector")},showModalBlockSelector:function(){return"modal-block-selector"===r}}}},72509:(e,t,r)=>{r.d(t,{$:()=>o});var n=r(86013),i=r(85893),o=function(){return(0,i.jsxs)("span",{className:"unsplash-label text-dark",children:[(0,i.jsx)("svg",{className:"unsplash-label__icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 0H5V4.5H11V0ZM5.0145 7H0V16H16V7H11.0277V11.54H5.0145V7Z",fill:"currentColor"})})," ",(0,n.t)("trix_editor.toolbar.unsplash")]})}},41482:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(86013),i=r(85893),o=function(e){var t=e.unsplashResults,r=e.searchUnsplash,o=e.addUnsplash;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("input",{type:"text",style:{borderWidth:1},className:"upload-input placeholder:text-light placeholder:opacity-100",placeholder:(0,n.t)("image_upload.search_unsplash"),onChange:function(e){return r(e.target.value)}}),(0,i.jsx)("div",{className:"unsplash-tab__result-grid",children:t.length>=1&&t.map((function(e){return(0,i.jsxs)("button",{type:"button",className:"unsplash-tab__result text-left",onClick:function(){return o(e)},children:[(0,i.jsx)("img",{loading:"lazy",className:"unsplash-tab__result--image",src:e.urls.regular,alt:e.alt_description||""}),(0,i.jsx)("div",{className:"unsplash-tab__result--info",children:(0,i.jsxs)("div",{className:"unsplash-tab__result--author",children:[(0,n.t)("image_upload.by")," ",(0,i.jsxs)("a",{href:"".concat(e.links.html),target:"_blank",rel:"noreferrer",children:[e.user.first_name," ",e.user.last_name]})]})})]},e.id)}))})]})}},24510:(e,t,r)=>{r.d(t,{q:()=>n});var n=(0,r(90199).LC)({accessKey:"p0q6Nj3ZsO9QR5Isvl-5go1PlNq8nhJfCFJ3mxmw1cQ"})},49498:(e,t,r)=>{r.d(t,{O:()=>n,f:()=>i});var n=Object.freeze({PLAN_DETAILS:"/plan_details",UPGRADE_SUCCESSFUL:"/upgrade_successful",BLOCKED_UPGRADE:"/blocked_upgrade",LOADING:"/loading",WORKFLOW_APP_SYNCING:"/workflow_app_syncing",ERROR:"/error",PRORATION:"/proration",TAX_ID_FORM:"/tax_id_form",CAN_DOWNGRADE:"/can_downgrade",MARKETING_HUB_SUBSCRIPTION_CHECK:"/marketing_hub_subscription_check"}),i=Object.freeze({COMMUNITY_AI_SPLASH_SCREEN:"community_ai_splash_screen",ACTIVITY_LOGS:"activity_logs",ACTIVITY_SCORES_FILTER_CHIP:"activity_scores_filter_chip",ACTIVITY_SCORES_SCORE_CHIP:"activity_scores_score_chip",PROFILE_FIELDS_FILTER_CHIP:"profile_fields_filter_chip",PROFILE_FIELDS_SPLASH_SCREEN:"profile_fields_splash_screen",PROFILE_FIELDS_ANALYTICS_FILTER_CHIP:"profile_fields_analytics_filter_chip",COPILOT_UPGRADE_MODAL:"copilot_upgrade_modal",WORKFLOWS_UPGRADE_MODAL:"workflows_upgrade_modal",SPACE_LIMIT_UPGRADE_MODAL:"space_limit_upgrade_modal",ANALYTICS_FILTERS:"ANALYTICS_FILTERS",API_KEY_SPLASH_SCREEN:"api_key_splash_screen",API_KEY_CREATION_SCREEN:"api_key_creation_screen",CODE_SNIPPETS_SPLASH_SCREEN:"code_snipets_splash_screen",MODERATION_SETTINGS_SPLASH_SCREEN:"moderation_settings_splash_screen",INVITE_MEMBERS_MODAL:"invite_members_modal",ONBOARDING_WORKFLOWS_MODAL:"onboarding_workflows_modal",PAYWALLS_WORKFLOWS_MODAL:"paywalls_workflows_modal",SPACE_WORKFLOWS_MODAL:"space_workflows_modal",MARKETING_HUB_LANDING_PAGE:"marketing_hub_landing_page"})},80360:(e,t,r)=>{r.d(t,{R:()=>o});var n=r(88767),i=r(31491),o=function(e){var t=e.planTier,r=void 0===t?"":t,o=e.planId,a=void 0===o?"":o,l=e.billingCurrency,c=void 0===l?"":l,s=e.locale,u=void 0===s?"":s,d=e.planType,f=void 0===d?"":d,p=e.isMarketingHubRequired,m=void 0!==p&&p,h=Boolean(r||a),b=m,v=(0,n.useQuery)(["plan","fetch",r,a,c,u,f],(function(){return i.Q2.fetch({tier:r,id:a,billing_currency:c,locale:u})}),{enabled:h}),_=v.data,y=v.isLoading,g=v.error,x=(0,n.useQuery)(["plan","fetch","marketing_hub",c,u],(function(){return i.Q2.fetch({billing_currency:c,locale:u,plan_type:"marketing_hub"})}),{enabled:b});return{plan:_,isPlanLoading:y,errorFetchingPlan:g,marketingHubPlan:x.data,isMarketingHubPlanLoading:x.isLoading,errorFetchingMarketingHubPlan:x.error}}},71861:(e,t,r)=>{r.d(t,{w:()=>Ee});var n=r(64687),i=r.n(n),o=r(86013),a=r(24185),l=r(72675),c=r(97012),s=r(77529),u=r(53448),d=r(1951),f=r(93826),p=r(30887),m=r(55675),h=r(12169),b=r(85893),v=function(e){var t=e.title,r=e.errorMessage,n=e.buttonLabel,i=e.onClick,o=e.iconColor,a=void 0===o?"red":o;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(u.u_.Body,{children:(0,b.jsxs)("div",{className:"mt-16 text-center",children:[(0,b.jsx)("div",{className:"mb-10",children:(0,b.jsx)(p.JO,{type:"68-error-".concat(a),size:68,className:"!w-16"})}),t&&(0,b.jsx)("div",{className:"mb-3",children:(0,b.jsx)(h.Z.TitleMd,{children:t})}),r&&(0,b.jsx)("div",{className:"mb-14",children:(0,b.jsx)(h.Z.LabelMd,{color:"text-default",children:(0,b.jsx)(f.w,{content:r})})})]})}),(0,b.jsx)(u.u_.Footer,{children:(0,b.jsx)(m.z,{variant:"circle",large:!0,full:!0,onClick:i,children:n})})]})},_=function(e){var t=e.title,r=e.errorMessage,n=e.iconColor,i=void 0===n?"red":n,a=e.supportType,l=void 0===a?"email":a,c=e.hideModal,s=(0,d.J1)().toggleWidget;return(0,b.jsx)(v,{title:t,errorMessage:r,buttonLabel:(0,o.t)("pricing_plans.upgrade_modal.actions.contact_support"),onClick:function(){"chat"===l?(c(),s()):window.open("mailto:support@circle.so","emailWindow")},iconColor:i})},y=r(85516),g=function(e){var t=e.title,r=void 0===t?"":t,n=e.subtitle,i=void 0===n?"":n;return(0,b.jsx)("div",{className:"my-28",children:(0,b.jsx)(y.u,{subtitle:i,title:r})})},x=r(67294),j=r(65771),O=r(80246),w=r(49498),C=r(88767),P=r(31491);function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function S(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,C.useQuery)(["workflows-community-current-usage-stats"],(function(){return P.nH.fetchCommunityCurrentUsageStats()}),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){S(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))},A=r(80360);function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(c){i=!0,o=c}finally{try{n||null==l.return||l.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return N(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N(e,t)}(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 N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var T=(0,x.createContext)(null);T.displayName="UpgradePlanContext";var L=function(){var e=(0,x.useContext)(T);if(!e)throw new Error("useUpgradePlanContext must be used within an UpgradePlanContext.Provider");return e},D=function(e){var t=e.children,r=e.planId,n=e.planTier,i=e.couponId,o=e.source,a=e.usedForWorkflows,l=e.showPlanDetails,c=void 0!==l&&l,s=e.isMarketingHubRequired,u=I((0,x.useState)(),2),d=u[0],f=u[1],p=I((0,x.useState)(),2),m=p[0],h=p[1],v=I((0,x.useState)(),2),_=v[0],y=v[1];(0,x.useEffect)((function(){var e=new URLSearchParams(window.location.search).get("locale");e&&h(e)}),[]);var g=(0,j.E)(),O=g.canChooseCurrency,w=g.defaultCurrency;(0,x.useEffect)((function(){w&&f(w)}),[w]);var C=(0,A.R)({planTier:n,planId:r,billingCurrency:d,locale:m,isMarketingHubRequired:s}),P=C.plan,k=C.isPlanLoading,S=C.errorFetchingPlan,E=C.marketingHubPlan,N=C.isMarketingHubPlanLoading,L=C.errorFetchingMarketingHubPlan,D=(0,j.E)().shouldShowProration;(0,x.useEffect)((function(){if(!k&&P){var e=Boolean(D(P)),t=!c&&!e;t||f(P.currency),y(t)}}),[P,k,c,D]);var R=(0,x.useMemo)((function(){return Boolean(s&&!P&&!!E&&!N)}),[s,P,E,N]);return(0,b.jsx)(T.Provider,{value:{billingCurrency:d,canCheckoutInstantly:_,couponId:i,errorFetchingPlan:S,isPlanLoading:k,plan:P,setBillingCurrency:f,shouldShowCurrencySelection:O,showPlanDetails:c,source:o,usedForWorkflows:a,isMarketingHubRequired:s,marketingHubPlan:E,isMarketingHubPlanLoading:N,errorFetchingMarketingHubPlan:L,isMarketingHubOnlyUpgrade:R},children:t})},R=function(e){var t=e.planTier,r=(0,a.k6)(),n=L().isMarketingHubRequired;return E({refetchInterval:5e3,onSuccess:function(e){return function(e){var i=e.plan_tier,o=e.marketing_hub_enabled;(!t&&n&&o||i===t&&(!n||o))&&r.push(w.O.UPGRADE_SUCCESSFUL)}(e)}}),(0,b.jsx)(u.u_.Body,{children:(0,b.jsxs)("div",{className:"mt-28 text-center",children:[(0,b.jsx)("div",{className:"m-auto mb-9 w-28",children:(0,b.jsx)(p.JO,{className:"text-dark !h-full !w-full",type:"loader"})}),(0,b.jsx)("div",{className:"mb-28",children:(0,b.jsx)(h.Z.TitleLg,{color:"text-darkest !font-bold",children:(0,o.t)(["pricing_plans.upgrade_modal","loading.workflow_app_syncing"])})})]})})},M=function(e){var t=e.hideModal;return(0,b.jsx)(_,{title:(0,o.t)("pricing_plans.upgrade_modal.errors.block_interval_change_marketing_hub.title"),errorMessage:(0,o.t)("pricing_plans.upgrade_modal.errors.block_interval_change_marketing_hub.message"),iconColor:"grey",supportType:"chat",hideModal:t})},H=r(95295),F=r(42373),B=function(e){var t=e.features;return(0,b.jsx)("ul",{className:"list-none",children:null===t||void 0===t?void 0:t.map((function(e){return(0,b.jsx)("li",{children:(0,b.jsxs)(h.Z.BodyMd,{children:[(0,b.jsx)(p.JO,{size:6,type:"middot"})," ",e]})},e)}))})},Z=function(e){var t=e.plan,r=e.changePlan,n=e.hideModal,i=(0,j.E)().currentPlanTier,a=(0,H._D)(i,t.tier),l=(0,c.wh)().currentCommunity.subscription_cancelled,s=function(e){var t=(0,C.useQuery)(["canDowngrade",e],(function(){return F.b.canDowngrade(e)})),r=t.data,n=t.error;return{data:r,isLoading:t.isLoading,error:n}}(t.id),d=s.data,f=s.error,p=s.isLoading;if((0,x.useEffect)((function(){!p&&d&&null!==d&&void 0!==d&&d.can_downgrade&&r(t)}),[d,p,t,r]),p)return(0,b.jsx)(g,{title:(0,o.t)(["pricing_plans.upgrade_modal","loading.validating_limits"])});if(f)return(0,b.jsx)(_,{title:(0,o.t)("pricing_plans.upgrade_modal.errors.limits_validation_error.title"),errorMessage:(0,o.t)("pricing_plans.upgrade_modal.errors.limits_validation_error.message")});var m=a?"downgrade":"upgrade";return(0,b.jsx)(b.Fragment,{children:d&&!d.can_downgrade&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(u.u_.Header,{children:[(0,b.jsx)(u.u_.Title,{children:(0,o.t)(l?"plan_change.restrictions.plain_text.title_for_canceled_sub":"plan_change.restrictions.plain_text.title",{change_type:m})}),(0,b.jsx)(u.u_.HeaderActions,{children:(0,b.jsx)(u.u_.CloseButton,{onClick:n})})]}),(0,b.jsx)(u.u_.Body,{className:"mb-10 flex flex-col gap-y-2",children:d.blocking_features&&0===d.blocking_features.length?(0,b.jsx)(h.Z.BodyMd,{children:(0,o.t)("pricing_plans.upgrade_modal.errors.downgrade_check_error.message")}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(h.Z.BodyMd,{children:(0,o.t)("plan_change.restrictions.plain_text.features_not_allowed",{plan:null===t||void 0===t?void 0:t.display_name})}),!l&&(0,b.jsx)(h.Z.BodyMd,{children:(0,o.t)("plan_change.restrictions.plain_text.make_adjustments",{change_type:m})}),(0,b.jsx)(B,{features:d.blocking_features}),!l&&(0,b.jsx)(h.Z.BodyMd,{children:(0,o.t)("plan_change.restrictions.plain_text.do_not_care")})]})})]})})},U=r(84503),V=function(){var e,t=(0,U.D)(),r=t.currentPlan,n=t.refetchCurrentPlan,i=(0,a.k6)(),l=null===r||void 0===r||null===(e=r.marketing_hub_billing)||void 0===e?void 0:e.marketing_hub_billing_active;return(0,x.useEffect)((function(){var e=setInterval(n,1e3);return function(){return clearInterval(e)}}),[n]),(0,x.useEffect)((function(){l&&i.push(w.O.UPGRADE_SUCCESSFUL)}),[l,i]),(0,b.jsx)(g,{title:(0,o.t)(["pricing_plans.upgrade_modal","loading.creating_marketing_hub_subscription"]),subtitle:(0,o.t)("pricing_plans.upgrade_modal.updating_plan_description")})},W=r(40160),z=r(75257),q=function(e){var t=e.displayName,r=e.amountWithoutCurrency,n=e.displayIntervalText,i=e.shouldShowCurrencySelection,o=e.billingCurrency,a=e.setBillingCurrency,l=e.description;return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"mt-3.5",children:(0,b.jsx)(h.Z.LabelSm,{weight:"semibold",color:"text-default",children:t})}),(0,b.jsxs)("div",{className:"mt-1 flex items-baseline gap-1",children:[(0,b.jsx)(h.Z.TitleXl,{children:r}),(0,b.jsx)(h.Z.LabelSm,{weight:"medium",color:"text-default",children:n})]}),(0,b.jsx)("div",{className:"mt-2.5",children:(0,b.jsx)(h.Z.LabelSm,{children:l})})]}),i&&(0,b.jsx)(z.v,{billingCurrency:o,onCurrencyChange:function(e){return a(e)}})]}),(0,b.jsx)("div",{className:"border-primary mt-5 border-b"})]})},G="pricing_plans.upgrade_modal",K=function(e){var t,r=e.subheading,n=void 0===r?"":r,i=e.hideModal,a=e.onSubmitHandler,l=L(),d=l.billingCurrency,f=l.setBillingCurrency,v=l.plan,_=l.marketingHubPlan,y=l.shouldShowCurrencySelection,g=l.isMarketingHubRequired,x=l.isMarketingHubOnlyUpgrade,j=(0,c.wh)().currentCommunity.current_plan_tier,O=function(e){return"/ ".concat(e.display_interval.toLowerCase())},w=(0,H.FZ)(j);t=x?"marketing_hub_features_title":w===(null===v||void 0===v?void 0:v.tier)?"everything_in_".concat(v.tier):"everything_in_your_plan_plus";var C=(null===v||void 0===v?void 0:v.main_features)||(null===_||void 0===_?void 0:_.main_features)||[];return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(u.u_.Header,{children:[(0,b.jsx)(u.u_.Title,{children:(0,o.t)([G,"title"],{plan:(null===v||void 0===v?void 0:v.display_name)||(null===_||void 0===_?void 0:_.display_name)})}),(0,b.jsx)(u.u_.HeaderActions,{children:(0,b.jsx)(u.u_.CloseButton,{onClick:i})})]}),(0,b.jsxs)(u.u_.Body,{children:[n&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(h.Z.LabelSm,{weight:"semibold",color:"text-default",children:x?(0,o.t)("pricing_plans.upgrade_modal.marketing_hub_value_prop_title"):n}),(0,b.jsx)("div",{className:"border-primary mt-5 border-b"})]}),v&&(0,b.jsx)(q,{displayName:(0,o.t)([G,"plan_name"],{plan:v.display_name}),amountWithoutCurrency:v.amount_without_currency,displayIntervalText:O(v),shouldShowCurrencySelection:y,billingCurrency:d,setBillingCurrency:f,description:(0,o.t)([G,"".concat(v.tier,"_description")])}),g&&_&&(0,b.jsx)(q,{displayName:(0,o.t)([G,"marketing_hub_plan_name"],{plan:_.display_name}),amountWithoutCurrency:_.amount_without_currency,displayIntervalText:O(_),shouldShowCurrencySelection:!1,description:(0,o.t)([G,"marketing_hub_description"])}),(0,b.jsx)("div",{className:"mt-6",children:(0,b.jsx)(h.Z.LabelLg,{weight:"semibold",children:(0,o.t)([G,t])})}),C.length>0&&(0,b.jsx)("ul",{className:"mt-6 flex list-none flex-col gap-5",children:C.map((function(e,t){var r="feature-item-".concat(t);return(0,b.jsxs)("li",{className:"flex items-center gap-3",children:[(0,b.jsx)(p.JO,{type:"20-checkmark-blue",size:20,className:"!h-5 !w-5"}),(0,b.jsx)(h.Z.LabelMd,{weight:"medium",children:e})]},r)}))}),!x&&(0,b.jsx)("div",{className:"mt-5",children:(0,b.jsx)(W.rU,{onClick:function(){return window.location.href=(0,s.xn)()},children:(0,b.jsx)(h.Z.LabelMd,{weight:"medium",color:"text-default",children:(0,o.t)([G,"learn_more"])})})})]}),(0,b.jsx)(u.u_.Footer,{className:"mt-5",children:(0,b.jsx)(m.z,{variant:"circle",large:!0,full:!0,onClick:function(){a()},children:(0,o.t)([G,"actions.upgrade"],{plan:(null===v||void 0===v?void 0:v.display_name)||(null===_||void 0===_?void 0:_.display_name)})})})]})},X=r(46770),Y=function(){return(0,b.jsx)("hr",{className:"my-4 h-px border-0 bg-gray-200 dark:bg-gray-700"})},$=r(94184),J=r.n($);function Q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(c){i=!0,o=c}finally{try{n||null==l.return||l.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return ee(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ee(e,t)}(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 ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var te=function(e){var t=e.title,r=e.description,n=e.amount,i=e.color,o=void 0===i?"default":i,a=e.semibold,l=void 0!==a&&a,c=e.amountWeight,s=void 0===c?"normal":c,u=e.isExpandable,d=void 0!==u&&u,f=e.expandedContent,m=void 0===f?null:f,v=Q((0,x.useState)(!1),2),_=v[0],y=v[1];return(0,b.jsxs)("div",{className:"mb-4 last:mb-0",children:[(0,b.jsxs)("button",{type:"button",className:J()("flex w-full items-start justify-between",{"cursor-default":!d}),onClick:function(){y((function(e){return!e}))},children:[(0,b.jsxs)("div",{className:"text-left",children:[(0,b.jsx)(h.Z.LabelMd,{weight:l?"semibold":"normal",children:t}),d&&(0,b.jsx)(p.JO,{size:16,type:"caret-down-solid",className:"text-dark ml-2 ".concat(_?"":"-rotate-90")}),(0,b.jsx)(h.Z.BodyXs,{color:"text-light",children:r})]}),(0,b.jsx)("div",{className:"whitespace-nowrap",children:(0,b.jsx)(h.Z.LabelMd,{weight:s,color:o,children:n})})]}),_&&(0,b.jsx)("div",{className:"mt-2",children:m})]})},re=function(e){var t=e.title,r=e.amount,n=e.color,i=void 0===n?"text-default":n;return(0,b.jsxs)("div",{className:"mb-2 flex items-start justify-between",children:[(0,b.jsx)(h.Z.BodySm,{color:"text-light",children:t}),(0,b.jsx)(h.Z.BodySm,{color:i,children:r})]})},ne=function(e){var t=e.prorationData;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(te,{title:t.plan_preview_name,amount:t.plan_display_amount}),(0,b.jsx)(Y,{}),t.display_recurring_plan_charges_description&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(te,{title:(0,o.t)("pricing_plans.change_plan.prorated_charges_debit"),description:t.display_recurring_plan_charges_description,amount:t.display_recurring_plan_charges_amount,semibold:!0}),(0,b.jsx)(Y,{})]}),t.display_prorated_charges_debit_description&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(te,{title:(0,o.t)("pricing_plans.change_plan.prorated_charges_debit"),description:t.display_prorated_charges_debit_description,amount:t.display_prorated_charges_debit_amount,semibold:!0}),(0,b.jsx)(Y,{})]}),t.display_prorated_charges_credit_description&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(te,{title:(0,o.t)("pricing_plans.change_plan.prorated_charges_credit"),description:t.display_prorated_charges_credit_description,amount:t.display_prorated_charges_credit_amount,semibold:!0}),(0,b.jsx)(Y,{})]}),(0,b.jsx)(re,{title:(0,o.t)("pricing_plans.change_plan.subtotal"),amount:t.display_subtotal}),t.display_tax&&(0,b.jsx)(re,{title:(0,o.t)("pricing_plans.change_plan.tax"),amount:t.display_tax}),t.display_total_discount&&(0,b.jsx)(re,{title:(0,o.t)("pricing_plans.change_plan.total_discount"),amount:t.display_total_discount}),t.display_applied_balance&&(0,b.jsx)(re,{title:(0,o.t)("pricing_plans.change_plan.applied_balance"),amount:t.display_applied_balance}),(0,b.jsx)(Y,{})]})},ie=function(e){var t=e.totalDue;return(0,b.jsx)(te,{title:(0,o.t)("pricing_plans.change_plan.total_due"),amount:t,semibold:!0,amountWeight:"semibold"})},oe="pricing_plans.upgrade_modal",ae=function(e){var t=e.hideModal,r=e.onSubmitHandler,n=L(),i=n.plan,a=n.couponId,l=function(e){var t=e.new_plan_id,r=e.plan_coupon_id,n=void 0===r?"":r,i=["proration",t,n],o=(0,C.useQuery)(i,(function(){return P.Q2.proration({new_plan_id:t,plan_coupon_id:n})})),a=o.data;return{prorationData:null!==a&&void 0!==a?a:{},isProrationLoading:o.isLoading,errorFetchingProration:o.error}}({new_plan_id:i.id,plan_coupon_id:a}),c=l.prorationData,s=l.isProrationLoading,d=l.errorFetchingProration;return s?(0,b.jsx)(g,{title:(0,o.t)([oe,"loading.proration"])}):d?(0,b.jsx)(_,{title:(0,o.t)([oe,"errors.calculating_proration.title"]),errorMessage:(0,o.t)([oe,"errors.calculating_proration.message"])}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(u.u_.Header,{children:[(0,b.jsx)(u.u_.Title,{children:(0,o.t)("pricing_plans.change_plan.title")}),(0,b.jsx)(u.u_.HeaderActions,{children:(0,b.jsx)(u.u_.CloseButton,{onClick:t})})]}),(0,b.jsxs)(u.u_.Body,{children:[(0,b.jsx)(ne,{prorationData:c}),(0,b.jsx)(ie,{totalDue:null===c||void 0===c?void 0:c.display_total_due_today})]}),(0,b.jsx)(u.u_.Footer,{className:"mt-5",children:(0,b.jsx)(m.z,{variant:"circle",large:!0,full:!0,onClick:r,children:(0,o.t)("pricing_plans.actions.".concat(X.$v.change_plan))})})]})},le=r(63367),ce=r(61926),se=r(49729),ue=r(25597);function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(c){i=!0,o=c}finally{try{n||null==l.return||l.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return fe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fe(e,t)}(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 fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var pe="pricing_plans.upgrade_modal",me=function(e){var t=e.hideModal,r=e.onSubmitHandler,n=ue.A0.filter((function(e){return"BR"===e.countryCode})),i=de((0,x.useState)(""),2),o=i[0],a=i[1],l=de((0,x.useState)(n[0].example),2),s=l[0],d=l[1];(0,x.useEffect)((function(){var e=n.find((function(e){return e.enum===o}));e&&d(e.example)}),[o,n]);var f=(0,c.xJ)();return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(u.u_.Header,{children:[(0,b.jsx)(u.u_.Title,{children:(0,b.jsx)("div",{className:"text-center text-xl",children:(0,le.t)([pe,"tax_id.title"])})}),(0,b.jsx)(u.u_.HeaderActions,{children:(0,b.jsx)(u.u_.CloseButton,{onClick:t})})]}),(0,b.jsx)(u.u_.Body,{children:(0,b.jsxs)(ce.l,{onSubmit:function(e){r(e)},children:[(0,b.jsx)("p",{className:"",children:(0,le.t)([pe,"tax_id.email_description"])}),(0,b.jsx)("p",{className:"text-dark mb-2 mt-5 flex font-semibold",children:(0,le.t)([pe,"tax_id.form.email.label"])}),(0,b.jsx)(se.I,{className:"form-control",name:"input",prefix:"",suffix:"",value:f.email,variant:"text",disabled:!0}),(0,b.jsx)("p",{className:"my-2 text-sm",children:(0,le.t)([pe,"tax_id.form.email.description"])}),(0,b.jsx)("p",{className:"my-2 font-semibold",children:(0,le.t)([pe,"tax_id.form.type.label"])}),(0,b.jsx)(ce.l.SelectNative,{name:"tax_id_type",defaultValue:"",onChange:function(e){return a(e.target.value)},options:n.map((function(e){return{value:e.enum,label:e.label}})),prompt:(0,le.t)([pe,"tax_id.form.type.prompt"]),isPromptDisabled:!1,rules:{required:(0,le.t)("".concat(pe,".form.errors.type_required"))}}),(0,b.jsx)(ce.l.Item,{name:"tax_id_value",hideDescription:!0,hideLabel:!0,hideBorder:!0,placeholder:s,rules:{required:(0,le.t)("".concat(pe,".tax_id.form.errors.number_required"))},children:(0,b.jsx)(ce.l.Input,{placeholder:(0,le.t)([pe,"tax_id.number_placeholder"])})}),(0,b.jsx)(ce.l.Item,{name:"ccm",label:(0,le.t)([pe,"tax_id.form.ccm.label"]),hideDescription:!0,hideBorder:!0,className:"my-4",rules:{},children:(0,b.jsx)(ce.l.Input,{placeholder:(0,le.t)([pe,"tax_id.form.ccm.placeholder"])})}),(0,b.jsx)(ce.l.Item,{hideDescription:!0,hideBorder:!0,children:(0,b.jsx)(m.z,{variant:"primary",type:"submit",className:"w-full",children:(0,le.t)([pe,"actions.submit_and_go_to_checkout"])})})]})})]})},he=function(e){var t=e.buttonLabel,r=e.onSuccess,n=e.unlockedFeatures;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(u.u_.Body,{children:(0,b.jsxs)("div",{className:"mt-16 text-center",children:[(0,b.jsx)(p.JO,{type:"spaceship-blue",size:56,className:"mb-10 !w-14"}),(0,b.jsx)(h.Z.TitleLg,{color:"text-darkest",children:(0,o.t)(["pricing_plans.upgrade_modal","update_successful"])}),n&&(0,b.jsx)("div",{className:"mt-3",children:(0,b.jsx)(h.Z.LabelMd,{color:"text-default",children:n})})]})}),(0,b.jsx)(u.u_.Footer,{className:"mt-5",children:(0,b.jsx)(m.z,{variant:"circle",large:!0,full:!0,onClick:r,children:t})})]})},be=r(34128),ve=r(83486),_e=r(21809);function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(c){i=!0,o=c}finally{try{n||null==l.return||l.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return ge(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ge(e,t)}(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 ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var xe="pricing_plans.upgrade_modal",je=function(e){var t=e.usedForWorkflows,r=e.showProration,n=e.canCollectTaxId,i=void 0!==n&&n,l=e.source,c=L(),s=c.couponId,u=c.plan,d=function(){var e=(0,a.k6)(),t=(0,_e.p)();return{createCheckoutSession:(0,C.useMutation)((function(e){var t=e.plan_id,r=e.coupon_id,n=e.source,i=e.tax_id_data;return(0,be.Cu)(ve.f.checkoutSession.create(),{plan_id:t,coupon_id:r,source:n,tax_id_data:i})}),{onSuccess:function(e){window.location.href=e.url},onError:function(r){!function(e){return e.errorDetails&&"INVALID_CUSTOMER_DETAILS"===e.errorDetails.error_code}(r)?e.push(w.O.ERROR):(t.error(r.message),e.push({pathname:w.O.TAX_ID_FORM}))}}).mutate}}(),f=d.createCheckoutSession,p=(0,a.k6)(),m=ye((0,x.useState)({title:"",subtitle:""}),2),h=m[0],b=m[1],v=(0,j.E)(),_=v.isCommunityOnTrial,y=v.currentPlanTier,g=v.isExpiredTrial,O=v.isCommunitySubscriptionIncompleteExpired,P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.usedForWorkflows,r=void 0!==t&&t,n=e.source,i=(0,a.k6)(),o=L().isMarketingHubRequired,l=function(){i.push(w.O.ERROR)},c=(0,C.useMutation)((function(e){var t=e.planId,r=e.planCouponId;return F.b.update(t,r,n)}),{onSuccess:function(){o?s():r?i.push(w.O.WORKFLOW_APP_SYNCING):i.push(w.O.UPGRADE_SUCCESSFUL)},onError:l}).mutate,s=(0,C.useMutation)((function(){return F.b.createMarketingHubSubscription()}),{onSuccess:function(){r?i.push(w.O.WORKFLOW_APP_SYNCING):i.push(w.O.MARKETING_HUB_SUBSCRIPTION_CHECK)},onError:l}).mutate;return{updateSubscription:c,createMarketingHubSubscription:s}}({usedForWorkflows:t,source:l}),k=P.updateSubscription,S=P.createMarketingHubSubscription,E=function(e,t,r){!_||g?(0,H._D)(y,e.tier)?p.push(w.O.CAN_DOWNGRADE):A(e,t,r):A(e,t,r)},A=function(e,t,r){_||g||O?(b({subtitle:"",title:(0,o.t)([xe,"stripe_checkout_title"])}),f({plan_id:e.id,coupon_id:t,source:l,tax_id_data:r})):(b({subtitle:(0,o.t)([xe,"updating_plan_description"]),title:(0,o.t)([xe,"updating_plan"])}),k({planId:e.id,planCouponId:t})),p.push(w.O.LOADING)};return{onSubmitHandler:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=p.location.pathname,n=t===w.O.PLAN_DETAILS,o=t===w.O.TAX_ID;n&&i?p.push(w.O.TAX_ID_FORM):(o||n)&&r?p.push(w.O.PRORATION):E(u,s,e)},changePlan:A,loadingMessage:h,marketingHubOnlySubmitHandler:function(){b({title:(0,o.t)("pricing_plans.upgrade_modal.loading.preparing_hub_subscription"),subtitle:(0,o.t)("pricing_plans.upgrade_modal.updating_plan_description")}),p.push(w.O.LOADING),S()}}},Oe=function(e){var t=e.handleOnSuccess,r=e.modal,n=e.subheading,i=e.successButtonLabel,l=L(),c=l.plan,s=l.usedForWorkflows,u=l.showPlanDetails,d=l.source,f=l.canCheckoutInstantly,p=l.isMarketingHubOnlyUpgrade,m=(0,O.G)().isActive,h=(0,j.E)(),v=h.shouldShowProration,y=h.shouldBlockUpgrade,C=Boolean(v(c)),P=Boolean(y(c,m)),k=je({usedForWorkflows:s,showProration:C,canCollectTaxId:!1,source:d}),S=k.onSubmitHandler,E=k.marketingHubOnlySubmitHandler,A=k.changePlan,I=k.loadingMessage;(0,x.useEffect)((function(){f&&S()}),[f]);return(0,b.jsxs)(a.rs,{children:[(0,b.jsx)(a.AW,{path:w.O.BLOCKED_UPGRADE,children:(0,b.jsx)(M,{hideModal:r.hide})}),(0,b.jsx)(a.AW,{exact:!0,path:w.O.PLAN_DETAILS,children:(0,b.jsx)(K,{subheading:n,hideModal:r.hide,onSubmitHandler:function(){return p?E():S()}})}),(0,b.jsx)(a.AW,{path:w.O.MARKETING_HUB_SUBSCRIPTION_CHECK,children:(0,b.jsx)(V,{})}),(0,b.jsx)(a.AW,{path:w.O.PRORATION,children:(0,b.jsx)(ae,{hideModal:r.hide,onSubmitHandler:function(){return S()}})}),(0,b.jsx)(a.AW,{path:w.O.TAX_ID_FORM,children:(0,b.jsx)(me,{hideModal:r.hide,onSubmitHandler:S})}),(0,b.jsx)(a.AW,{path:w.O.CAN_DOWNGRADE,children:(0,b.jsx)(Z,{plan:c,changePlan:A,hideModal:r.hide})}),(0,b.jsx)(a.AW,{exact:!0,path:w.O.LOADING,children:(0,b.jsx)(g,{title:I.title,subtitle:I.subtitle})}),(0,b.jsx)(a.AW,{exact:!0,path:w.O.WORKFLOW_APP_SYNCING,children:(0,b.jsx)(R,{planTier:null===c||void 0===c?void 0:c.tier})}),(0,b.jsx)(a.AW,{exact:!0,path:w.O.ERROR,children:(0,b.jsx)(_,{title:(0,o.t)(["pricing_plans.upgrade_modal","errors.general_error.title"])})}),(0,b.jsx)(a.AW,{exact:!0,path:w.O.UPGRADE_SUCCESSFUL,children:(0,b.jsx)(he,{buttonLabel:i,onSuccess:t,unlockedFeatures:null===c||void 0===c?void 0:c.main_features_summarized})}),(0,b.jsx)(a.l_,{to:function(){switch(!0){case P:return w.O.BLOCKED_UPGRADE;case u:return w.O.PLAN_DETAILS;case C:return w.O.PRORATION;default:return w.O.LOADING}}()})]})};function we(e,t,r,n,i,o,a){try{var l=e[o](a),c=l.value}catch(s){return void r(s)}l.done?t(c):Promise.resolve(c).then(n,i)}function Ce(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){we(o,n,i,a,l,"next",e)}function l(e){we(o,n,i,a,l,"throw",e)}a(void 0)}))}}var Pe="pricing_plans.upgrade_modal",ke=function(e){var t=e.subheading,r=e.onSuccess,n=e.successButtonLabel,a=e.onCloseModal,d=L(),f=d.isPlanLoading,p=d.isMarketingHubPlanLoading,m=d.errorFetchingMarketingHubPlan,h=d.errorFetchingPlan,v=d.isMarketingHubRequired,y=(0,l.dd)(),x=function(){var e=Ce(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(y.hide(),y.remove(),!v){e.next=5;break}return window.location.reload(),e.abrupt("return");case 5:if(!r){e.next=8;break}return e.next=8,r();case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=function(){var e=Ce(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y.hide();case 2:if(y.remove(),!a){e.next=6;break}return e.next=6,a();case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=window.location.pathname.includes((0,s.xn)()),w=(0,c.wh)().currentCommunity;return null!==w&&void 0!==w&&w.has_active_offer&&!O?(window.location.href=(0,s.xn)(),null):(0,b.jsxs)(u.u_,{isOpen:y.visible,onClose:j,children:[(0,b.jsx)(u.u_.Overlay,{}),(0,b.jsx)(u.u_.Content,{size:"md",className:"!max-h-[85vh] !w-[35.25rem]",children:f||p?(0,b.jsx)(g,{title:(0,o.t)([Pe,"loading.plan"])}):h||m?(0,b.jsx)(_,{title:(0,o.t)([Pe,"errors.plan_not_found.title"]),errorMessage:(0,o.t)([Pe,"errors.plan_not_found.message"])}):(0,b.jsx)(Oe,{subheading:t,successButtonLabel:n,handleOnSuccess:x,modal:y})})]})},Se=l.gk.create((function(e){var t=e.planTier,r=e.subheading,n=e.source,i=e.onSuccess,o=e.successButtonLabel,l=e.usedForWorkflows,c=e.isMarketingHubRequired,s=e.showPlanDetails,u=void 0!==s&&s,d=e.couponId,f=e.planId,p=e.onCloseModal;return(0,b.jsx)(a.VA,{children:(0,b.jsx)(D,{planTier:t,planId:f,couponId:d,source:n,usedForWorkflows:l,isMarketingHubRequired:c,showPlanDetails:u,children:(0,b.jsx)(ke,{subheading:r,onSuccess:i,successButtonLabel:o,onCloseModal:p})})})})),Ee=function(){return(0,l.dd)(Se)}},25415:(e,t,r)=>{r.d(t,{Q:()=>d});var n=r(64687),i=r.n(n),o=r(79292),a=r(77529);function l(e,t,r,n,i,o,a){try{var l=e[o](a),c=l.value}catch(s){return void r(s)}l.done?t(c):Promise.resolve(c).then(n,i)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,c,"next",e)}function c(e){l(o,n,i,a,c,"throw",e)}a(void 0)}))}}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(e){return"attachable_sgid"in e},d=function(){function e(t,r,n,i,l){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.file=void 0,this.afterCompleteCallback=void 0,this.uploadProgress=void 0,this.formClass=void 0,this.inputFieldName=void 0,this.upload=void 0,this.file=t,this.afterCompleteCallback=r,this.uploadProgress=l,this.formClass=n,this.inputFieldName=i,this.upload=new o.DirectUpload(this.file,(0,a.hq)(),this)}var t,r,n,l,d;return t=e,r=[{key:"start",value:function(){var e=this.directUploadDidComplete.bind(this);this.upload.create((function(t,r){e(t,r)}))}},{key:"directUploadDidComplete",value:(d=c(i().mark((function e(t,r){var n,o,a,l,c,s,d;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.signed_id,o=r.filename,a=r.content_type,!t){e.next=9;break}if(!(t instanceof Error)){e.next=8;break}throw new Error("Direct upload failed: ".concat(t.message));case 8:throw t;case 9:if(!u(r)){e.next=12;break}return e.next=12,this.getAttachmentContent(r.attachable_sgid);case 12:""!==this.formClass&&""!==this.inputFieldName&&(c=document.createElement("input"),s=this.inputFieldName,c.setAttribute("type","hidden"),c.setAttribute("value",n),c.name=s,null===(l=document.querySelector(".".concat(this.formClass)))||void 0===l||l.appendChild(c)),d=this.createBlobUrl(n,o),this.afterCompleteCallback&&this.afterCompleteCallback(d,n,a,this.inputFieldName);case 15:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getAttachmentContent",value:(l=c(i().mark((function e(t){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch((0,a.mb)(t));case 2:return r=e.sent,e.next=5,r.text();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)}))),function(e){return l.apply(this,arguments)})},{key:"createBlobUrl",value:function(e,t){return(0,a.Gd)({signed_id:e,filename:t})}},{key:"directUploadWillStoreFileWithXHR",value:function(e){var t=this;e.upload.addEventListener("progress",(function(e){var r=Math.floor(e.loaded/e.total*100);t.uploadProgress(r,t.file.name)}))}}],r&&s(t.prototype,r),n&&s(t,n),e}()}}]);
//# sourceMappingURL=/packs/js/6106-53b02aedd63744f74e3f.js.map