PageSourceSearch

https://odi.strategyn.com/static/js/390.24baa14e.chunk.js

js strategyn.com collected 2026-10-02 04:26:20 UTC 16,187 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkcenterpiece_ui=globalThis.webpackChunkcenterpiece_ui||[]).push([[390],{8971(e,s,n){n.d(s,{A:()=>r});n(9950);var t=n(6951),l=n(5234),i=n(7028),a=n(4414);const r=e=>{let{selectedOption:s,handleSelectOption:n,disabled:r}=e;return(0,a.jsxs)("div",{className:"plan-pricing-wrapper "+(r?"disabled":""),children:[(0,a.jsx)("div",{onClick:()=>n("yearly"),className:"pricing "+("yearly"===s?"selected":""),children:(0,a.jsxs)("label",{children:[(0,a.jsx)(t.Ay,{disabled:r||!1,name:"pricing",checked:"yearly"===s}),(0,a.jsxs)(l.A,{direction:"vertical",size:4,children:[(0,a.jsxs)("span",{className:"uppercase",children:["Yearly ",(0,a.jsx)(i.A,{color:"info",children:"Best Value"})]}),(0,a.jsx)("span",{className:"info",children:"Billed annually at $1,188"})]}),(0,a.jsxs)("div",{className:"fee",children:[(0,a.jsx)("sup",{children:"$"}),"99",(0,a.jsx)("sub",{children:"/mo"})]})]})}),(0,a.jsx)("div",{onClick:()=>n("monthly"),className:"pricing "+("monthly"===s?"selected":""),children:(0,a.jsxs)("label",{children:[(0,a.jsx)(t.Ay,{disabled:r||!1,name:"pricing",checked:"monthly"===s}),(0,a.jsxs)(l.A,{direction:"vertical",size:2,children:[(0,a.jsx)("span",{className:"uppercase",children:"Monthly"}),(0,a.jsx)("span",{className:"info",children:"Billed monthly at $120"})]}),(0,a.jsxs)("div",{className:"fee",children:[(0,a.jsx)("sup",{children:"$"}),"120",(0,a.jsx)("sub",{children:"/mo"})]})]})})]})}},3390(e,s,n){n.r(s),n.d(s,{default:()=>k});var t=n(9950),l=n(601),i=n(7111),a=n(8182),r=n(4043),c=n(212),o=n(2203),d=n(5234),u=n(7788),h=n(7943),p=n(6419),y=n(4014),x=n(7797),m=n(2073),A=n(300),v=n(8971),f=n(2393),g=n(3671),j=n(4414);const b=e=>{let{children:s,user:n}=e;return(0,j.jsxs)(d.A,{size:24,direction:"vertical",className:"change-plan",style:{marginBottom:"24px"},children:[(0,j.jsx)("div",{children:s}),(0,j.jsx)(v.A,{selectedOption:n.planChangeRequest?n.planChangeRequest.newPlan===f.zU?"monthly":"yearly":void 0,handleSelectOption:()=>{},disabled:!0})]})};var E=function(e){return e[e.CHANGE_PLAN=0]="CHANGE_PLAN",e[e.ALREADY_REQUESTED=1]="ALREADY_REQUESTED",e[e.ALREADY_PROCESSED=2]="ALREADY_PROCESSED",e}(E||{});const C=e=>{let{user:s,subDetails:n,dismiss:l}=e;const[r,c]=(0,t.useState)(!1),[u,h]=(0,t.useState)("yearly"),[y,x]=(0,t.useState)(),[m,A]=(0,t.useState)();(0,t.useEffect)(()=>{if(n){let e;n.price===f.EH?e="yearly":n.price===f.zU&&(e="monthly"),x(e)}},[n]),(0,t.useEffect)(()=>{if(s)if(s.planChangeRequest){const e=(0,p.U9)(s.planChangeRequest.createdAt),n=(0,p.U9)(s.planChangeRequest.requestExpiresAt);if(!e||!n)return void A(E.CHANGE_PLAN);const t=new Date;if(t.getTime()-n.getTime()>0)return void A(E.CHANGE_PLAN);t.getTime()-e.getTime()<864e5?A(E.ALREADY_REQUESTED):A(E.ALREADY_PROCESSED)}else A(E.CHANGE_PLAN)},[s]);const C=()=>{const e="yearly"===y?"monthly":"yearly",n=(0,p.y)(s.subscriptionExpiresAt),t="yearly"===y?"120":"1,188",l="yearly"===y?"month":"year";return(0,j.jsxs)("ul",{className:"plan-benefits",children:[(0,j.jsxs)("li",{children:[(0,j.jsx)(o.A,{size:"18",type:"solid",icon:"fa-check-circle"}),(0,j.jsxs)("span",{children:["With the yearly membership plan, you ",(0,j.jsx)("strong",{children:"save $252/year"})," ","compared to the monthly plan."]})]}),(0,j.jsxs)("li",{children:[(0,j.jsx)(o.A,{size:"18",type:"solid",icon:"fa-check-circle"})," ",(0,j.jsxs)("span",{children:["After you switch to the ",e," plan, your new plan will start on your next billing date, ",n,", at $",t,"/",l,"."]})]})]})},N=async()=>{try{c(!0);const e=g.A.getInstance();if("monthly"===u)await e.requestPlanChange(f.zU);else{if("yearly"!==u)throw new Error("Invalid plan selected");await e.requestPlanChange(f.EH)}i.A.show({content:(0,j.jsx)("span",{children:"Your request to change membership plan has been submitted. You'll be contacted via email soon."}),type:"success",duration:5})}catch(e){console.log("fs: error switching plan",e),i.A.show({content:"An error occurred while switching your plan. Please try again or contact support.",type:"error",duration:5})}finally{c(!1),l()}};return u&&y?m===E.CHANGE_PLAN?(()=>{return(0,j.jsxs)(d.A,{size:24,direction:"vertical",className:"change-plan",style:{margin:"24px 0 12px 0"},children:[(0,j.jsx)(v.A,{selectedOption:u,handleSelectOption:e=>h(e)}),(0,j.jsxs)(d.A,{size:24,direction:"vertical",children:[C(),u===y?(s=u,(0,j.jsxs)(a.A,{onClick:l,block:!0,children:["Keep ","monthly"===s?"Monthly":"Yearly"," Plan"]})):(e=u,(0,j.jsxs)(a.A,{onClick:N,block:!0,loading:r,disabled:r,children:["Switch to ","monthly"===e?"Monthly":"Yearly"," Plan"]}))]})]});var e,s})():(()=>{const e=(0,j.jsx)("p",{children:"There seems to be an issue with your request. Please contact support."});if(!s||!s.planChangeRequest||!s.planChangeRequest.newPlan||!s.planChangeRequest.requestExpiresAt)return e;const{newPlan:n,requestExpiresAt:t}=s.planChangeRequest;let l,i;if(n===f.EH)l="yearly",i="monthly";else{if(n!==f.zU)return e;l="monthly",i="yearly"}const a=(0,p.y)(t);return a?(0,j.jsxs)(b,{user:s,children:[m===E.ALREADY_REQUESTED?(0,j.jsxs)("div",{className:"custom-note",children:[(0,j.jsx)(o.A,{size:"16",type:"solid",icon:"fa-exclamation-circle"}),(0,j.jsxs)("p",{children:["Your request to change membership plan from ",i," to"," ",l," has already been sent. You\u2019ll be contacted soon via email."]})]}):null,m===E.ALREADY_PROCESSED?(0,j.jsxs)("div",{className:"custom-note success",children:[(0,j.jsx)(o.A,{size:"16",type:"solid",icon:"fa-exclamation-circle"}),(0,j.jsxs)("p",{children:["Your request to change membership plan has been processed. Your new ",l," plan will start on your next billing date,"," ",a,"."]})]}):null]}):e})():null};var N=n(7270),w=n(5369),S=n(9307);const P=()=>{const[e,s]=(0,t.useState)(!1),[n,l]=(0,t.useState)(!1),i=new S.A;return(0,j.jsxs)(d.A,{direction:"vertical",size:24,style:{width:"100%",margin:"24px 0 0 0"},children:[(0,j.jsx)(d.A,{direction:"vertical",size:12,children:n?(0,j.jsx)("p",{children:(0,j.jsxs)(d.A,{align:"top",size:6,children:[(0,j.jsx)("span",{className:"success-color",children:(0,j.jsx)(o.A,{size:"14",type:"solid",icon:"fa-check-circle"})}),(0,j.jsxs)("span",{children:["Password reset instructions have been sent to"," ",(0,j.jsx)("strong",{style:{fontWeight:500},children:i.getCurrentUserEmail()||"you"}),"."]})]})}):(0,j.jsxs)("p",{children:["We will send an email to"," ",(0,j.jsx)("strong",{style:{fontWeight:500},children:i.getCurrentUserEmail()||"you"})," ","with password reset instructions."]})}),(0,j.jsx)(w.zW,{children:(0,j.jsx)(a.A,{loading:e,disabled:e||n,onClick:async n=>{if(!e)try{s(!0),await i.sendAuth0ChangePasswordEmail(),l(!0)}catch(t){x.A.handle(t)}finally{s(!1)}},type:"submit",block:!0,children:"Continue"})})]})};var R=function(e){return e[e.PROFILE=0]="PROFILE",e[e.CHANGE_PASSWORD=1]="CHANGE_PASSWORD",e[e.CHANGE_PLAN=2]="CHANGE_PLAN",e}(R||{});const k=e=>{let{visible:s,onClose:n}=e;const v=(0,A.wA)(),[f,g]=t.useState(R.PROFILE),[b,E]=t.useState(!1),[w,S]=(0,t.useState)(""),[k,z]=(0,t.useState)(""),[O,_]=(0,t.useState)(""),[L,D]=(0,t.useState)(""),{data:T,isLoading:M,refetch:q}=(0,l.xC)(),{data:G,isLoading:Y}=(0,l.Rw)();(0,t.useEffect)(()=>{T&&(S(T.firstName||""),z(T.lastName||""),_(T.title||""),D(T.organization||""))},[T]);const H=async()=>{try{const e=w.trim(),s=k.trim();if(!e||!s)return void i.A.show({content:"First and Last names are required",type:"info"});if(!O)return void i.A.show({content:"Title is required",type:"info"});if(!L)return void i.A.show({content:"Organization is required",type:"info"});E(!0);const n=new y.A;await n.updateProfile(e,s,O,L),i.A.show({content:"Account settings updated",type:"success"}),q()}catch(e){T&&(S(T.firstName||""),z(T.lastName||"")),x.A.handle(e)}finally{E(!1)}},U=async()=>{try{E(!0);const e=new c.A,s=await e.getSubscriptionPortalUrl();window.location.href=s}catch(e){console.log(e)}},F=async()=>{I(),v((0,m.rv)(!0))},I=()=>{g(R.PROFILE),E(!1),T&&(S(T.firstName||""),z(T.lastName||""),_(T.title||""),D(T.organization||"")),n()},B=()=>
1{if(!T)return null;const e=V&&K&&Q;return(0,p.Ke)(T)?(0,p.QM)(T)?e?(0,j.jsxs)("div",{className:"membership-details",children:[(0,j.jsx)("h4",{children:Q}),(0,j.jsxs)("p",{className:"renew",children:[V," ",K]})]}):null:(0,j.jsxs)("div",{className:"custom-note",style:{marginTop:0},children:[(0,j.jsx)(o.A,{size:"16",type:"solid",icon:"fa-exclamation-circle"}),(0,j.jsx)("p",{children:"Your access is managed through a Group Membership."})]}):"STANDARD"===T.accessType&&e?(0,j.jsxs)("div",{className:"membership-details",children:[(0,j.jsx)("h4",{children:Q}),(0,j.jsxs)("p",{className:"renew",children:[V," ",K]}),(0,j.jsxs)(d.A,{size:4,children:[(0,j.jsxs)(a.A,{size:"small",type:"link",onClick:U,children:[(0,j.jsx)(o.A,{type:"regular",size:"14",icon:"fa-id-badge"}),"Manage Membership"]}),(0,j.jsx)("span",{className:"v-divider",children:(0,j.jsx)(o.A,{type:"regular",size:"10",icon:"fa-pipe"})}),(0,j.jsxs)(a.A,{size:"small",type:"link",onClick:()=>g(R.CHANGE_PLAN),children:[(0,j.jsx)(o.A,{type:"regular",size:"14",icon:"fa-retweet"}),"Change Plan"]})]})]}):null},W=()=>(0,j.jsx)(d.A,{direction:"vertical",size:24,children:(0,j.jsx)(d.A,{direction:"vertical",size:4,children:(0,j.jsx)("h3",{children:(0,j.jsxs)(d.A,{size:12,children:[(0,j.jsx)(h.A,{size:36,style:{background:"#5E2569",fontSize:22,color:"#fff"},children:M?"...":(0,p.Vd)(T)}),"User Settings"]})})})}),$=()=>(0,j.jsxs)(a.A,{onClick:()=>g(R.PROFILE),block:!0,type:"link",color:"primary",disabled:b,children:[(0,j.jsx)(o.A,{type:"solid",size:"14",icon:"fa-angle-left"})," Back to Profile Settings"]});let Q="",K="",V="";if(!M&&T)if((0,p.Ke)(T))(0,p.QM)(T)&&(Q="Group Yearly Membership",K=(0,p.y)(T.trialExpiresAt),V="Expires on");else switch(T.accessType){case"STANDARD":(null===G||void 0===G?void 0:G.price)===N.EH?Q="Yearly Membership":(null===G||void 0===G?void 0:G.price)===N.zU&&(Q="Monthly Membership"),!1===(null===G||void 0===G?void 0:G.cancel_at_period_end)?V="Renews on":!0===(null===G||void 0===G?void 0:G.cancel_at_period_end)&&(V="Expires on"),K=(0,p.y)(T.subscriptionExpiresAt);break;case"NEVER_SUBSCRIBED":case"NONE":Q="",K="",V=""}return(0,j.jsxs)(r.A,{className:"user-settings-modal",closable:!b,maskClosable:!b,visible:s&&!M,onCancel:I,onClose:I,footer:null,width:420,destoryOnClose:!0,children:[(M||Y||b)&&(0,j.jsx)("div",{className:"loading",children:(0,j.jsx)(o.A,{type:"regular",size:"36",icon:"fa-spinner"})}),T&&G&&(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(d.A,{direction:"vertical",size:0,children:(()=>{if(!T||!G)return null;switch(f){case R.PROFILE:return(0,j.jsxs)(j.Fragment,{children:[W(),T?(0,j.jsxs)(d.A,{direction:"vertical",size:24,style:{width:"100%",marginTop:"24px"},children:[(0,j.jsxs)(d.A,{direction:"vertical",size:12,children:[(0,j.jsx)("p",{children:"Manage your account settings and membership."}),(0,j.jsx)(u.A,{value:w,placeholder:"First Name",onChange:e=>S(e.target.value)}),(0,j.jsx)(u.A,{value:k,placeholder:"Last Name",onChange:e=>z(e.target.value)}),(0,j.jsx)(u.A,{value:O,onChange:e=>_(e.target.value),placeholder:"Title"}),(0,j.jsx)(u.A,{value:L,onChange:e=>D(e.target.value),placeholder:"Organization"}),(0,j.jsx)(u.A,{disabled:!0,value:T.email,placeholder:"Email"})]}),B(),(0,j.jsxs)(d.A,{direction:"vertical",size:12,children:[(0,j.jsx)(a.A,{block:!0,disabled:b,onClick:H,children:"Save Change"}),(0,p.Ke)(T)||"STANDARD"===(null===T||void 0===T?void 0:T.accessType)?null:(0,j.jsx)(a.A,{disabled:b,onClick:F,type:"link",block:!0,children:"Activate your Membership"}),(0,j.jsx)(a.A,{onClick:()=>g(R.CHANGE_PASSWORD),block:!0,type:"link",color:"primary",disabled:b,children:"Change Password"})]})]}):null]});case R.CHANGE_PASSWORD:return(0,j.jsxs)(j.Fragment,{children:[W(),(0,j.jsxs)(d.A,{direction:"vertical",size:12,children:[(0,j.jsx)(P,{})," "]}),$()]});case R.CHANGE_PLAN:return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(d.A,{direction:"vertical",size:24,children:(0,j.jsxs)(d.A,{direction:"vertical",size:4,children:[(0,j.jsx)("h3",{children:"Change your Membership"}),(0,j.jsx)("p",{children:"Switch to the membership plan that suits you best."})]})}),(0,j.jsx)(C,{user:T,subDetails:G,dismiss:I}),$()]});default:return null}})()})})]})}},6951(e,s,n){n.d(s,{Ay:()=>c});var t=n(9950),l=n(9398),i=n(6697);n(7119);const{Group:a,Button:r}=i.A;class c extends t.Component{render(){const{children:e,className:s,alternate:n,...t}=this.props,a=`st-radio-wrapper ${n?"alternate":""} ${s||""}`;return(0,l.j)("span",{className:a,children:(0,l.j)(i.A,{...t,children:e})})}}c.Group=a,c.Button=r},6697(e,s,n){n.d(s,{A:()=>g});var t=n(6744),l=n(9950),i=n(4501),a=n(6042);var r=l.createContext(null),c=r.Provider;const o=r;var d=globalThis&&globalThis.__rest||function(e,s){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&s.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(t=Object.getOwnPropertySymbols(e);l<t.length;l++)s.indexOf(t[l])<0&&Object.prototype.propertyIsEnumerable.call(e,t[l])&&(n[t[l]]=e[t[l]])}return n},u=function(e,s){var n,a=l.useContext(o),r=l.useContext(t.k),c=r.getPrefixCls,u=r.direction,h=l.useRef(),p=(0,t.v)(s,h);l.useEffect(function(){(0,t.j)(!("optionType"in e),"Radio","`optionType` is only support in Radio.Group.")},[]);var y=e.prefixCls,x=e.className,m=e.children,A=e.style,v=d(e,["prefixCls","className","children","style"]),f=c("radio",y),g=(0,t.g)({},v);a&&(g.name=a.name,g.onChange=function(s){var n,t;null===(n=e.onChange)||void 0===n||n.call(e,s),null===(t=null==a?void 0:a.onChange)||void 0===t||t.call(a,s)},g.checked=e.value===a.value,g.disabled=e.disabled||a.disabled);var j=(0,t.c)("".concat(f,"-wrapper"),(n={},(0,t.a)(n,"".concat(f,"-wrapper-checked"),g.checked),(0,t.a)(n,"".concat(f,"-wrapper-disabled"),g.disabled),(0,t.a)(n,"".concat(f,"-wrapper-rtl"),"rtl"===u),n),x);return l.createElement("label",{className:j,style:A,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave},l.createElement(i.C,(0,t.g)({},g,{type:"radio",prefixCls:f,ref:p})),void 0!==m?l.createElement("span",null,m):null)},h=l.forwardRef(u);h.displayName="Radio";const p=h;var y=l.forwardRef(function(e,s){var n=l.useContext(t.k),i=n.getPrefixCls,r=n.direction,o=l.useContext(t.S),d=(0,a.u)(e.defaultValue,{value:e.value}),u=(0,t._)(d,2),h=u[0],y=u[1];return l.createElement(c,{value:{onChange:function(s){var n=h,t=s.target.value;"value"in e||y(t);var l=e.onChange;l&&t!==n&&l(s)},value:h,disabled:e.disabled,name:e.name}},function(){var n,a=e.prefixCls,c=e.className,d=void 0===c?"":c,u=e.options,y=e.optionType,x=e.buttonStyle,m=void 0===x?"outline":x,A=e.disabled,v=e.children,f=e.size,g=e.style,j=e.id,b=e.onMouseEnter,E=e.onMouseLeave,C=i("radio",a),N="".concat(C,"-group"),w=v;if(u&&u.length>0){var S="button"===y?"".concat(C,"-button"):C;w=u.map(function(e){return"string"==typeof e||"number"==typeof e?l.createElement(p,{key:e.toString(),prefixCls:S,disabled:A,value:e,checked:h===e},e):l.createElement(p,{key:"radio-group-value-options-".concat(e.value),prefixCls:S,disabled:e.disabled||A,value:e.value,checked:h===e.value,style:e.style},e.label)})}
1var P=f||o,R=(0,t.c)(N,"".concat(N,"-").concat(m),(n={},(0,t.a)(n,"".concat(N,"-").concat(P),P),(0,t.a)(n,"".concat(N,"-rtl"),"rtl"===r),n),d);return l.createElement("div",(0,t.g)({},function(e){return Object.keys(e).reduce(function(s,n){return("data-"===n.substr(0,5)||"aria-"===n.substr(0,5)||"role"===n)&&"data-__"!==n.substr(0,7)&&(s[n]=e[n]),s},{})}(e),{className:R,style:g,onMouseEnter:b,onMouseLeave:E,id:j,ref:s}),w)}())});const x=l.memo(y);var m=globalThis&&globalThis.__rest||function(e,s){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&s.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(t=Object.getOwnPropertySymbols(e);l<t.length;l++)s.indexOf(t[l])<0&&Object.prototype.propertyIsEnumerable.call(e,t[l])&&(n[t[l]]=e[t[l]])}return n},A=function(e,s){var n=l.useContext(o),i=l.useContext(t.k).getPrefixCls,a=e.prefixCls,r=m(e,["prefixCls"]),c=i("radio-button",a);return n&&(r.checked=e.value===n.value,r.disabled=e.disabled||n.disabled),l.createElement(p,(0,t.g)({prefixCls:c},r,{type:"radio",ref:s}))};const v=l.forwardRef(A);var f=p;f.Button=v,f.Group=x;const g=f}}]);

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