(globalThis.webpackChunkextract_css=globalThis.webpackChunkextract_css||[]).push([["7705"],{945613:function(D){"use strict";D.exports={loadingOverlay:"Q7Q29OauHksiFEKQ",loadingSpinner:"SBtHubFVWi8sQUqt fShPGbUwHGAw6OuB",accountFrame:"pI9pX0r94c8rhLa2",closing:"aQRQn2SojLcyw6Cs",accountFrameOpen:"LFeApafGQs3JaswU"}},881979:function(D,v){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.default=void 0;var a;(function(_){_.CUSTOMER_NOTIFICATION="customer_notification",_.MEMBER_AREA_ACCESS_PAGE="member_area_access_page",_.MEMBER_AREA_BLOCK="member_area_block",_.MEMBER_IMPORT_LINK="member_import_link",_.OTP_MEMBERSHIP_PURCHASE="otp_membership_purchase",_.ORDER_CONFIRMATION_PAGE="order_confirmation_page",_.ORDER_STATUS_PAGE="order_status_page",_.PAYWALL_PAGE="paywall_page",_.SIGNUP="signup"})(a||(a={}));var T=v.default=a;D.exports=v.default},970082:function(D,v){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.default=void 0;var a;(function(_){_.BEFORE_ENROLLMENT_DATES_PERIOD=1,_.AFTER_ENROLLMENT_DATES_PERIOD=2})(a||(a={}));var T=v.default=a;D.exports=v.default},825047:function(D){var v=function(a){"use strict";var T=Object.prototype,_=T.hasOwnProperty,L=Object.defineProperty||function(i,r,c){i[r]=c.value},S,E=typeof Symbol=="function"?Symbol:{},W=E.iterator||"@@iterator",f=E.asyncIterator||"@@asyncIterator",A=E.toStringTag||"@@toStringTag";function C(i,r,c){return Object.defineProperty(i,r,{value:c,enumerable:!0,configurable:!0,writable:!0}),i[r]}try{C({},"")}catch{C=function(r,c,g){return r[c]=g}}function O(i,r,c,g){var n=r&&r.prototype instanceof z?r:z,s=Object.create(n.prototype),m=new J(g||[]);return L(s,"_invoke",{value:V(i,c,m)}),s}a.wrap=O;function p(i,r,c){try{return{type:"normal",arg:i.call(r,c)}}catch(g){return{type:"throw",arg:g}}}var F="suspendedStart",b="suspendedYield",R="executing",w="completed",I={};function z(){}function M(){}function u(){}var y={};C(y,W,function(){return this});var l=Object.getPrototypeOf,o=l&&l(l(K([])));o&&o!==T&&_.call(o,W)&&(y=o);var B=u.prototype=z.prototype=Object.create(y);M.prototype=u,L(B,"constructor",{value:u,configurable:!0}),L(u,"constructor",{value:M,configurable:!0}),M.displayName=C(u,A,"GeneratorFunction");function Q(i){["next","throw","return"].forEach(function(r){C(i,r,function(c){return this._invoke(r,c)})})}a.isGeneratorFunction=function(i){var r=typeof i=="function"&&i.constructor;return r?r===M||(r.displayName||r.name)==="GeneratorFunction":!1},a.mark=function(i){return Object.setPrototypeOf?Object.setPrototypeOf(i,u):(i.__proto__=u,C(i,A,"GeneratorFunction")),i.prototype=Object.create(B),i},a.awrap=function(i){return{__await:i}};function G(i,r){function c(s,m,P,j){var N=p(i[s],i,m);if(N.type==="throw")j(N.arg);else{var nt=N.arg,x=nt.value;return x&&typeof x=="object"&&_.call(x,"__await")?r.resolve(x.__await).then(function(Z){c("next",Z,P,j)},function(Z){c("throw",Z,P,j)}):r.resolve(x).then(function(Z){nt.value=Z,P(nt)},function(Z){return c("throw",Z,P,j)})}}var g;function n(s,m){function P(){return new r(function(j,N){c(s,m,j,N)})}return g=g?g.then(P,P):P()}L(this,"_invoke",{value:n})}Q(G.prototype),C(G.prototype,f,function(){return this}),a.AsyncIterator=G,a.async=function(i,r,c,g,n){n===void 0&&(n=Promise);var s=new G(O(i,r,c,g),n);return a.isGeneratorFunction(r)?s:s.next().then(function(m){return m.done?m.value:s.next()})};function V(i,r,c){var g=F;return function(s,m){if(g===R)throw new Error("Generator is already running");if(g===w){if(s==="throw")throw m;return U()}for(c.method=s,c.arg=m;;){var P=c.delegate;if(P){var j=k(P,c);if(j){if(j===I)continue;return j}}if(c.method==="next")c.sent=c._sent=c.arg;else if(c.method==="throw"){if(g===F)throw g=w,c.arg;c.dispatchException(c.arg)}else c.method==="return"&&c.abrupt("return",c.arg);g=R;var N=p(i,r,c);if(N.type==="normal"){if(g=c.done?w:b,N.arg===I)continue;return{value:N.arg,done:c.done}}else N.type==="throw"&&(g=w,c.method="throw",c.arg=N.arg)}}}function k(i,r){var c=r.method,g=i.iterator[c];if(g===S)return r.delegate=null,c==="throw"&&i.iterator.return&&(r.method="return",r.arg=S,k(i,r),r.method==="throw")||c!=="return"&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+c+"' method")),I;var n=p(g,i.iterator,r.arg);if(n.type==="throw")return r.method="throw",r.arg=n.arg,r.delegate=null,I;var s=n.arg;if(!s)return r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,I;if(s.done)r[i.resultName]=s.value,r.next=i.nextLoc,r.method!=="return"&&(r.method="next",r.arg=S);else return s;return r.delegate=null,I}Q(B),C(B,A,"Generator"),C(B,W,function(){return this}),C(B,"toString",function(){return"[object Generator]"});function X(i){var r={tryLoc:i[0]};1 in i&&(r.catchLoc=i[1]),2 in i&&(r.finallyLoc=i[2],r.afterLoc=i[3]),this.tryEntries.push(r)}function H(i){var r=i.completion||{};r.type="normal",delete r.arg,i.completion=r}function J(i){this.tryEntries=[{tryLoc:"root"}],i.forEach(X,this),this.reset(!0)}a.keys=function(i){var r=Object(i),c=[];for(var g in r)c.push(g);return c.reverse(),function n(){for(;c.length;){var s=c.pop();if(s in r)return n.value=s,n.done=!1,n}return n.done=!0,n}};function K(i){if(i){var r=i[W];if(r)return r.call(i);if(typeof i.next=="function")return i;if(!isNaN(i.length)){var c=-1,g=function n(){for(;++c=0;--g){var n=this.tryEntries[g],s=n.completion;if(n.tryLoc==="root")return c("end");if(n.tryLoc<=this.prev){var m=_.call(n,"catchLoc"),P=_.call(n,"finallyLoc");if(m&&P){if(this.prev=0;--c){var g=this.tryEntries[c];if(g.tryLoc<=this.prev&&_.call(g,"finallyLoc")&&this.prev=0;--r){var c=this.tryEntries[r];if(c.finallyLoc===i)return this.complete(c.completion,c.afterLoc),H(c),I}},catch:function(i){for(var r=this.tryEntries.length-1;r>=0;--r){var c=this.tryEntries[r];if(c.tryLoc===i){var g=c.completion;if(g.type==="throw"){var n=g.arg;H(c)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(i,r,c){return this.delegate={iterator:K(i),resultName:r,nextLoc:c},this.method==="next"&&(this.arg=S),I}},a}(D.exports);try{regeneratorRuntime=v}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=v:Function("r","regeneratorRuntime = r")(v)}},114971:function(D,v,a){"use strict";a.d(v,{Z:()=>F});var T=a(221661),_=a(981491),L=a(994336),S=a.n(L),E=a(886346);const W="SiteUserInfo",f=()=>{const b=S().get(W);if(!b)return null;try{return JSON.parse(b)}catch(R){return console.error("Could not parse user info cookie value",R),null}},C={isAuthenticated(){const b=f();return!!(b!=null&&b.authenticated)},getSiteUserId(){const b=f();return b==null?void 0:b.siteUserId}};function O(){return{end_user_session_id:S().get(E.oV),ss_cvr:S().get(E.Y7),email_derived_user_id:C.getSiteUserId()}}class p{constructor(R,w){this.tracker=new T.SiteVisitorClient({customSchemaName:R,sourceEnvironment:_.isInternal()?T.SourceEnvironment.STAGING:T.SourceEnvironment.PROD},w)}track(R){const w=O();w.ss_cvr&&this.tracker.track({...w,...R})}}const F=p},776011:function(D,v,a){"use strict";a.d(v,{Z:()=>y});var T=a(569025),_=a(994336),L=a.n(_);const S="SiteUserInfo",E=()=>{const l=L().get(S);if(!l)return null;try{return JSON.parse(l)}catch(o){return console.error("Could not parse user info cookie value",o),null}},f={isUserAuthenticated(){const l=E();return!!(l&&l.authenticated)},getFirstName(){const l=E();return l&&l.firstName}};var A=a(970082),C=a.n(A),O=a(437823),p=a(714487);const F=()=>{new window.Y.Squarespace.Widgets.Alert({position:window.Y.Squarespace.Widgets.Confirmation.ANCHOR.CENTER,"strings.title":(0,p.t)("This product is unavailable",null,{project:"apps.UserAccount"}),"strings.message":(0,p.t)("Contact the site owner if you need access.",null,{project:"apps.UserAccount"}),"strings.confirm":(0,p.t)("Dismiss",null,{project:"apps.UserAccount"})})},b=()=>{new window.Y.Squarespace.Widgets.Alert({position:window.Y.Squarespace.Widgets.Confirmation.ANCHOR.CENTER,"strings.title":(0,p.t)("Internal Server Error",null,{project:"apps.UserAccount"}),"strings.message":(0,p.t)("Something went wrong. Please try again later.",null,{project:"apps.UserAccount"}),"strings.confirm":(0,p.t)("Dismiss",null,{project:"apps.UserAccount"})})},R=()=>{new window.Y.Squarespace.Widgets.Alert({position:window.Y.Squarespace.Widgets.Confirmation.ANCHOR.CENTER,"strings.title":(0,p.t)("Coming soon",null,{project:"apps.UserAccount"}),"strings.message":(0,p.t)("This product is not yet available for sign up.",null,{project:"apps.UserAccount"}),"strings.confirm":(0,p.t)("Close",null,{project:"apps.UserAccount"})})},w=()=>{new window.Y.Squarespace.Widgets.Alert({position:window.Y.Squarespace.Widgets.Confirmation.ANCHOR.CENTER,"strings.title":(0,p.t)("Sign up closed",null,{project:"apps.UserAccount"}),"strings.message":(0,p.t)("This product is no longer available.",null,{project:"apps.UserAccount"}),"strings.confirm":(0,p.t)("Close",null,{project:"apps.UserAccount"})})},I=()=>{new window.Y.Squarespace.Widgets.Alert({position:window.Y.Squarespace.Widgets.Confirmation.ANCHOR.CENTER,"strings.title":(0,p.t)("Connect a pricing plan",null,{project:"apps.UserAccount"}),"strings.message":(0,p.t)("This is an example of a digital product block. To set it up, edit the block and connect it to a pricing plan.",null,{project:"apps.UserAccount"}),"strings.confirm":(0,p.t)("Dismiss",null,{project:"apps.UserAccount"})})};var z=a(46612);const M="PRICING_PLAN",u={isUserAuthenticated(){return f.isUserAuthenticated()},renderPricingPlansEnrollmentDatesErrorModal(l){l===C().BEFORE_ENROLLMENT_DATES_PERIOD?R():l===C().AFTER_ENROLLMENT_DATES_PERIOD&&w()},outsideEnrollmentDates(l){return l===C().BEFORE_ENROLLMENT_DATES_PERIOD||l===C().AFTER_ENROLLMENT_DATES_PERIOD},getAccountScreenPath(l,o,B,Q,G,V){const k=`&pricingPlanId=${B}`;return(l?"/login":"/login/create")+`?accountLoginOrigin=${o}`+k+`&pricingOptionId=${Q||""}&originUrlPath=${G||""}`},async joinPricingPlan(l,o,B,Q,G,V){if(!l){I();return}let k=null;try{if(V){var X,H;const K=(X=V.pricingOptions)===null||X===void 0?void 0:X.find(U=>{let{id:i}=U;return i===o});z.kM({pricingPlan:{id:l,name:V.title,description:V.description,pricingType:V.pricingType,benefits:V.benefits,selectedPricingOption:K},websiteId:(H=window.Static.SQUARESPACE_CONTEXT.website)===null||H===void 0?void 0:H.id,loginOrigin:G})}}catch(K){k=K}try{const K=await(0,O.o)(l,{originUrlPath:B,pricingOptionId:o});window.top.location.assign(K.data.redirectUrlPath)}catch(K){let{response:U}=K;var J;if(U.status===403)F();else if(U.status===400&&u.outsideEnrollmentDates((J=U.data)===null||J===void 0?void 0:J.errorCode))if(Q){const i=u.getAccountScreenPath(Q,G,l,o,B,M);u.openAccountScreen(i)}else u.renderPricingPlansEnrollmentDatesErrorModal(U.data.errorCode);else if(U.status===401){const i=u.getAccountScreenPath(Q,G,l,o,B,M);u.openAccountScreen(i)}else b(),console.error(`The server returned an unexpected ${U.status} error upon attempting to hit the request-to-join pricing plan endpoint`)}if(k)throw k},signIn(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";var o,B;const Q=window.location.pathname,G=`/login?accountLoginOrigin=${l}&originUrlPath=${Q}`;if(!(!((B=window.Static.SQUARESPACE_CONTEXT.websiteSettings)===null||B===void 0||(o=B.userAccountsSettings)===null||o===void 0)&&o.loginAllowed)){F();return}u.openAccountScreen(G)},openAccountScreen(l){T.Z.openProfileScreen(l)}},y=u},569025:function(D,v,a){"use strict";a.d(v,{Z:()=>g});var T=a(131626),_=a.n(T);const L=window.history,f={init:n=>{const s=m=>{const P=m&&m.state&&m.state.title||null;P&&(document.title=P),n()};window.addEventListener("popstate",s,!1)},hideQueryParams:n=>{const s=Object.keys(n).map(P=>P+"="+encodeURIComponent(n[P])).join("&"),m=window.location.pathname+(s?"?"+s:"")+window.location.hash;L.replaceState({},document.title,m)},pushLocationChange:n=>{let{path:s,title:m}=n;s!==window.location.pathname&&(L.pushState({title:m},m,s),document.title=m)}};var A=a(258004),C=a(945613),O=a.n(C),p=a(449304),F=a(106064),b=a(419467);let R;const w={enable:()=>{},disable:()=>{}};function I(){return R||(R=(0,b.get)(window,"Y.Squarespace.EscManager",w)),R}const M={enable:()=>I().enable(),disable:()=>I().disable()};var u=a(999762);const y=n=>n[0]==="/"?n.substring(1):n,l=n=>n.split("#")[0].split("?")[0],o=n=>{const s=y(n);return l(s).split("/")},Q=(n,s)=>{if(!n||!s)return!1;if(n==="/")return!0;const m=o(n),P=o(s);return m.length>P.length?!1:m.every((j,N)=>P[N]===j)},G="accountFrame",V="accountLoadingOverlay",k=()=>!!document.getElementById(G),X=()=>{const n=document.getElementById(G);if(n)return document.body.classList.remove(O().accountFrameOpen),n.classList.add(O().closing),setTimeout(()=>n.parentElement.removeChild(n),100),n},H=n=>{const s=document.createElement("iframe");return s.id=G,s.className=O().accountFrame,s.src=n,s.dataset.iframeTranslate="",document.body.appendChild(s),document.body.classList.add(O().accountFrameOpen),s},J=()=>{const n=document.createElement("div");n.id=V,n.className=O().loadingOverlay;const s=document.createElement("div");s.className=O().loadingSpinner,n.appendChild(s),document.body.appendChild(n)},K=()=>{const n=document.getElementById(V);n&&n.parentElement.removeChild(n)},U=()=>location.pathname+(location.search?location.search:"")+(location.hash?location.hash:""),r={handleLocationChange(){const n=k(),s=window.location;if(!Q(p.Z.VISIBLE_ROOT,s.pathname)){this.templatePageTitle=document.title,this.templatePagePath=U(),n&&this.closeFrame(!1);return}const m=s.pathname.slice(p.Z.VISIBLE_ROOT.length);n?this.frameEventManager.notifyLocationChange(m):this.openFrame(p.Z.FRAME_ROOT_PATH+m)},openFrame(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;A.Z.then(()=>{const m=window.location;Q(p.Z.VISIBLE_ROOT,m.pathname)?(this.templatePageTitle=this.templatePageTitle||document.title,this.templatePagePath=this.templatePagePath||U()):(this.templatePageTitle=document.title,this.templatePagePath=U()),this.followUpAccountPath=s,this.frameEventManager=new F.Z;const P=this.frameEventManager.onFrameLoaded(()=>{K(),P()}),j=this.frameEventManager.onCloseFrame(()=>{this.closeFrame(!0),j()}),N=this.frameEventManager.onCloseFrameAndRedirect(Z=>{let{redirectUrlPath:rt}=Z;this.closeFrame(!0),this.redirect(rt),N()}),nt=this.frameEventManager.onReloadFrame(Z=>{let{useCurrentFramePath:rt}=Z;this.reloadFrame(rt),nt()});this.frameEventManager.onPushLocationChange(Z=>{let{path:rt,title:ot}=Z;f.pushLocationChange({path:p.Z.VISIBLE_ROOT+rt,title:ot})}),this.frameEventManager.onNotifyAuthStatusChange(()=>{this.reloadPage()}),X(),J();const x=H(n);M.disable(),this.revertFocusContainment=(0,u.containFocus)({container:x,root:x.ownerDocument})})},closeFrame(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;k()&&A.Z.then(()=>{this.revertFocusContainment&&(this.revertFocusContainment(),this.revertFocusContainment=null),K(),X(),M.enable(),this.frameEventManager=null,n&&f.pushLocationChange({path:this.templatePagePath,title:this.templatePageTitle})})},reloadFrame(n){A.Z.then(()=>{X(),M.enable(),J();let s=p.Z.VISIBLE_ROOT;n?s=window.location.pathname:this.followUpAccountPath&&(s=this.followUpAccountPath);const m=s+"?templatePath="+encodeURIComponent(this.templatePagePath);window.location.href=m})},reloadPage(){window.location.reload(!0)},redirect(n){window.top.location.assign(n)}},g={init(){f.init(()=>r.handleLocationChange()),this.checkDeepLinking()},checkDeepLinking(){let n=window.location.search;n[0]==="?"&&(n=n.slice(1));const s=_().parse(n),{userAccountPath:m,authenticationPath:P,noredirect:j,...N}=s;P?(f.hideQueryParams(N),this.openLoginScreen(P,m)):(m||m==="")&&(f.hideQueryParams(N),this.openProfileScreen(m))},openProfileScreen(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";r.openFrame(p.Z.FRAME_ROOT_PATH+n)},openLoginScreen(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"/login",s=arguments.length>1?arguments[1]:void 0,m;(s||s==="")&&(m="/account"+s),r.openFrame(p.Z.FRAME_ROOT_PATH+n,m)}}},569609:function(D,v,a){"use strict";var T=a(392338),_=a(825047),L=a(258004),S=a(776011),E=a(942703),W=a(569025);const f=()=>{setTimeout(()=>W.Z.init(),0)};window.UserAccountApi=S.Z,L.Z.then(()=>{(0,E.HN)(),(0,E.eH)(),(0,E.nE)()}),f()},449304:function(D,v,a){"use strict";a.d(v,{Z:()=>_});const _={VISIBLE_ROOT:"/account",FRAME_ROOT_PATH:"/account/frame",HOME:"/"}},106064:function(D,v,a){"use strict";a.d(v,{Z:()=>z});const T="accountFrame",_=()=>{const M=Array.prototype.slice.call(window.frames);return window!==window.parent&&M.push(window.parent),M},L=function(M){let{origin:u,data:y}=M;if(u!==this.origin||y.namespace!==T)return;const l=this.eventCallbacks[y.name];l&&l.forEach(o=>o(y.payload))};class S{subscribe(u,y){let l=this.eventCallbacks[u];l||(this.eventCallbacks[u]=[],l=this.eventCallbacks[u]),l.push(y)}unsubscribe(u,y){const l=this.eventCallbacks[u];if(!l)return;const o=l.indexOf(y);y!==-1&&l.splice(o,1)}emit(u,y){const l={namespace:T,name:u,payload:y};_().forEach(o=>{try{o.postMessage(l,this.target)}catch{}})}constructor({target:u,origin:y}){this.target=u,this.origin=y,this.eventCallbacks={},window.addEventListener("message",L.bind(this),!1)}}const E=window.location.origin,f=new S({target:E,origin:E}),A="frameLoaded",C="closeFrame",O="reloadPage",p="reloadFrame",F="pushLocationChange",b="notifyLocationChanged",R="notifyAuthStatusChanged",w="closeFrameAndRedirect";class I{notifyFrameLoaded(){f.emit(A)}closeFrame(){f.emit(C)}closeFrameAndRedirect(u){f.emit(w,{redirectUrlPath:u})}reloadCurrentFrame(){f.emit(p,{useCurrentFramePath:!0})}reloadFrame(){f.emit(p,{useCurrentFramePath:!1})}pushLocationChange(u,y){f.emit(F,{path:u,title:y})}notifyLocationChange(u){f.emit(b,{path:u})}notifyAuthStatusChange(){f.emit(R)}onFrameLoaded(u){return f.subscribe(A,u),()=>{f.unsubscribe(A,u)}}onCloseFrame(u){return f.subscribe(C,u),()=>{f.unsubscribe(C,u)}}onReloadPage(u){return f.subscribe(O,u),()=>{f.unsubscribe(O,u)}}onReloadFrame(u){return f.subscribe(p,u),()=>{f.unsubscribe(p,u)}}onCloseFrameAndRedirect(u){return f.subscribe(w,u),()=>{f.unsubscribe(w,u)}}onPushLocationChange(u){f.subscribe(F,u)}onNotifyLocationChange(u){f.subscribe(b,u)}onNotifyAuthStatusChange(u){f.subscribe(R,u)}}const z=I},437823:function(D,v,a){"use strict";a.d(v,{o:()=>E});var T=a(695344),_=a(994336),L=a.n(_);const S="/api/site-users/account/pricing-plans";function E(W,f){const A=`${S}/${W}/request-to-join`,C=L().get("siteUserCrumb");return C&&T.Z.setXsrfToken(C),T.Z.put(A,f).then(O=>O.data&&O.data.crumbFail?T.Z.put(A,f):O)}},46612:function(D,v,a){"use strict";a.d(v,{gH:()=>nt,rS:()=>dt,CY:()=>lt,nR:()=>gt,ct:()=>ht,w0:()=>_t,JY:()=>m,kM:()=>St,xd:()=>c,f$:()=>Et,Ij:()=>rt,AE:()=>Pt,NQ:()=>n,tz:()=>g,nI:()=>j,l5:()=>s,bR:()=>x,Nj:()=>ft,ep:()=>pt,f4:()=>mt,Au:()=>P,mt:()=>vt,JU:()=>N});var T=a(714011),_=a(283635),L=a(456903),S=a(461761),E=a.n(S),W=a(696049),f=a(39788),A=a.n(f),C=a(714487),O=function(t){return t.FREE="free",t.OTP="one_time",t.RECURRING="recurring",t.INSTALLMENTS="installments",t}({});function p(t){var e;return t?t.subscribable?((e=t.subscriptionPlan)===null||e===void 0?void 0:e.numBillingCycles)===0?"recurring":"installments":"one_time":"free"}function F(t){var e;return((e=t.pricingOptions)===null||e===void 0?void 0:e.length)||0}function b(t){return t.pricingType===A().FREE?"free":F(t)?t.pricingType===A().RECURRING?"recurring":t.pricingOptions[0].numBillingCycles>1?"installments":"one_time":null}function R(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.pricingType===A().RECURRING&&F(t)&&t.pricingOptions[e].billingPeriod?t.pricingOptions[e].billingPeriod.value:null}function w(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.pricingType!==A().FREE&&F(t)&&t.pricingOptions[e].billingPeriod?t.pricingOptions[e].billingPeriod.unit:null}function I(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(t.pricingType!==A().FREE&&F(t)&&t.pricingOptions[e].price){const d=t.pricingOptions[e].price,h=(0,C.Wj)(d.currency).digits;return W.default.fromJson(d).toSubunits(h)}return null}function z(t){return F(t)?t.pricingOptions.map((e,d)=>({membership_billing_frequency:R(t,d),membership_duration_timeframe:w(t,d),membership_fee:I(t,d)})):null}function M(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.pricingType!==A().FREE&&F(t)&&t.pricingOptions[e].price?W.default.fromJson(t.pricingOptions[e].price).currencyCode:null}function u(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return F(t)?t.pricingOptions[e].numBillingCycles:null}function y(t){return t.benefits.map(e=>e.description)}var l=a(228946),o=a(679085),B=a(114971),Q=a(881979),G=a.n(Q);const V=new _.Z("DigitalProductsPricing",{event_owner_team:"digital_products",event_source:"web",product_area:"pricing_plan",website_id:E()(window,"Static.SQUARESPACE_CONTEXT.website.id",null),member_account_id:E()(window,"Static.SQUARESPACE_CONTEXT.authenticatedAccount.id",null)}),k=new _.Z("MemberAreas",{event_owner_team:"digital_products",event_source:"web",product_area:"DigitalProducts",website_id:E()(window,"Static.SQUARESPACE_CONTEXT.website.id",null),member_account_id:E()(window,"Static.SQUARESPACE_CONTEXT.authenticatedAccount.id",null)}),X=new _.Z("MemberAreas",{event_owner_team:"member_areas",event_source:"web",product_area:"member_areas",website_id:E()(window,"Static.SQUARESPACE_CONTEXT.website.id",null),member_account_id:E()(window,"Static.SQUARESPACE_CONTEXT.authenticatedAccount.id",null)}),H=new B.Z("MemberAreasSiteVisitors",{event_owner_team:"member_areas",event_source:"web",product_area:"member_areas",website_id:E()(window,"Static.SQUARESPACE_CONTEXT.website.id",null),context_website_id:E()(window,"Static.SQUARESPACE_CONTEXT.website.id",null)}),J=t=>{var e;return((e=t.pricingOptions)===null||e===void 0?void 0:e.length)||0},K=t=>J(t)?t.pricingOptions.map((e,d)=>({payment_frequency_count:R(t,d),payment_frequency_unit:w(t,d),payment_value:I(t,d)})):(console.warn(`EventTracker was unable to determine pricing options for pricingPlanId: ${t.id}`),null);function U(t,e){var d,h,tt,et,$;const{pricingPlan:q,websiteId:it}=t,Y=q.selectedPricingOption,st=Y==null||(d=Y.price)===null||d===void 0?void 0:d.value;return{actor:o.Tc.USER,action:o.aO.VIEW,website_id:it,member_area_id:q.id,member_area_name:q.name,member_area_description:q.description,membership_fee_type:i(q.pricingType),membership_fee:st&&Math.round(Number(st)*100),currency_code:Y==null||(h=Y.price)===null||h===void 0?void 0:h.currency,membership_billing_frequency:Y==null||(tt=Y.billingPeriod)===null||tt===void 0?void 0:tt.value,membership_duration_timeframe:Y==null||(et=Y.billingPeriod)===null||et===void 0?void 0:et.unit,num_billing_cycles:Y==null?void 0:Y.numBillingCycles,total_ma_benefits:(($=q.benefits)===null||$===void 0?void 0:$.length)??0,event_name:e,object_type:o.g.MODAL}}function i(t){return t===A().FREE?O.FREE:t===A().FIXED_AMOUNT?O.OTP:t===A().RECURRING?O.RECURRING:O.FREE}var r=null,c=function(t){return t.COLLECTION_PANEL="CollectionPanel",t.MEMBER_SITE_SETTINGS="MemberSiteSettings",t.BANNER="banner",t.MODAL="modal",t}({}),g=function(t){return t.COURSE="course",t.VIDEO_COLLECTION="video-collection",t.MEMBER_SITE="member-site",t.BLOG="blog",t}({});function n(t){const e={actor:o.Tc.USER,action:o.aO.CLICK,event_name:"DigitalProducts_Click_AddDigitalProductsPage",object_type:o.g.BUTTON,object_value:t},{event_name:d,...h}=e;k.track(e),l.fireEvent(d,h)}function s(t){const e={actor:o.Tc.USER,action:o.aO.SELECT,event_name:"DigitalProducts_Remove_PricingPlan",object_type:o.g.BUTTON,object_value:o.Qo.ADD,...ct(t)},{event_name:d,...h}=e;V.track(e),l.fireEvent(d,h)}function m(t){const e={actor:o.Tc.USER,action:o.aO.SELECT,event_name:"DigitalProducts_Add_PricingPlan",object_type:o.g.BUTTON,object_value:o.Qo.ADD,...ct(t)},{event_name:d,...h}=e;V.track(e),l.fireEvent(d,h)}function P(){const t={actor:o.Tc.USER,action:o.aO.VIEW,event_name:"DigitalProducts_View_PricingPlan",object_type:o.g.PANEL},{event_name:e,...d}=t;V.track(t),l.fireEvent(e,d)}function j(){const t={actor:o.Tc.USER,action:o.aO.VIEW,event_name:"DigitalProducts_View_MaxPricingPlanReached",object_type:o.g.PANEL,object_value:o.Qo.MAX_PRICING_PLAN_REACHED},{event_name:e,...d}=t;V.track(t),l.fireEvent(e,d)}function N(){const t={actor:o.Tc.USER,action:o.aO.SELECT,event_name:"DigitalProducts_Click_AddExistingPricingPlan",object_type:o.g.BUTTON,object_value:o.Qo.EXISTING_PRICING_PLAN},{event_name:e,...d}=t;V.track(t),l.fireEvent(e,d)}function nt(){const t={event_name:"DigitalProducts_View_CustomerAccountsSSLModal",action:o.aO.VIEW,actor:o.Tc.USER,object_type:o.g.MODAL,object_value:o.Qo.DP_SUPPORT_MODAL,modal_version:"digital_products"},{event_name:e,...d}=t;k.track(t),l.fireEvent(e,d)}function x(){const t={event_name:"DigitalProducts_Click_DismissCustomerAccountsSSLModal",action:o.aO.CLICK,actor:o.Tc.USER,object_type:o.g.BUTTON,object_value:o.Qo.NOT_NOW_DP_SUPPORT_MODAL,modal_version:"digital_products"},{event_name:e,...d}=t;k.track(t),l.fireEvent(e,d)}function Z(t){const e={event_name:"DigitalProducts_Click_UpgradeSubscription",action:ACTIONS.CLICK,actor:ACTORS.USER,object_type:OBJECT_TYPES.BUTTON,object_value:OBJECT_VALUES.UPGRADE_SUBSCRIPTION,modal_type:t.modalType,modal_version:"digital_products"},{event_name:d,...h}=e;k.track(e),FullStory.fireEvent(d,h)}function rt(t){const e={event_name:"DigitalProducts_Click_UpgradeSubscriptionPlan",action:o.aO.CLICK,actor:o.Tc.USER,object_type:o.g.BUTTON,object_value:o.Qo.UPGRADE_SUBSCRIPTION,modal_type:t.modalType,modal_version:"digital_products",entrypoint:t.productPage,entrypoint_level2:t.collectionType},{event_name:d,...h}=e;k.track(e),l.fireEvent(d,h)}function ot(t){const e={event_name:"DigitalProducts_Click_DismissUpgradeSubscriptionPlan",action:ACTIONS.CLICK,actor:ACTORS.USER,object_type:OBJECT_TYPES.BUTTON,object_value:OBJECT_VALUES.DISMISS_UPGRADE_SUBSCRIPTION,modal_type:t.modalType,modal_version:"digital_products",entrypoint_level2:t.collectionType},{event_name:d,...h}=e;k.track(e),FullStory.fireEvent(d,h)}function lt(t){const e=U(t,"SiteVisitor_ViewSignUp");H.track({...e})}const ut=async t=>await L.default.get(`/api/content-monetization/pricing-plans/${t}?includeDigitalProducts=true&includePricingDetails=true`);async function dt(t){let e=null;try{if(t){const{data:et}=await ut(t);e=et}}catch{}const d={actor:o.Tc.USER,action:o.aO.CONNECT,event_name:"MemberAreas_ConnectBlock",object_type:o.g.BLOCK,member_area_id:t,...e&&{member_area_name:e.name,member_area_description:e.description,membership_fee_type:b(e),membership_fee:I(e),currency_code:M(e),membership_billing_frequency:R(e),membership_duration_timeframe:w(e),num_billing_cycles:u(e),num_pricing_options:J(e),pricing_options:z(e),total_ma_benefits:e.benefits.length??0,benefits_displayed_list:y(e)}},{event_name:h,...tt}=d;X.track(d),l.fireEvent(h,tt)}function mt(t){const e={event_name:"DigitalProducts_Click_EditPaywallSettings",action:o.aO.CLICK,actor:o.Tc.USER,object_type:o.g.BUTTON,object_value:o.Qo.EDIT_PAYWALL_SETTINGS,modal_type:t.modalType,modal_version:"digital_products",entry_point:t.entryPoint},{event_name:d,...h}=e;k.track(e),l.fireEvent(d,h)}function gt(t){const e={event_name:"DigitalProducts_Click_SavePaywallSettings",action:o.aO.CLICK,actor:o.Tc.USER,object_type:o.g.BUTTON,object_value:o.Qo.SAVE_PAYWALL_SETTINGS,modal_type:t.modalType,saved_content:t.savedContent,modal_version:"digital_products"},{event_name:d,...h}=e;k.track(e),l.fireEvent(d,h)}function ft(t){const e={actor:o.Tc.USER,action:o.aO.CLICK,event_name:"DigitalProducts_Click_PaywallContentIntoMemberSite",object_type:o.g.BUTTON,object_value:t.objectValue},{event_name:d,...h}=e;k.track(e),l.fireEvent(d,h)}function _t(t){const e={actor:o.Tc.USER,action:o.aO.CLICK,event_name:"DigitalProducts_Click_EyeIcon",object_type:o.g.BUTTON,object_value:t.hideShowValue},{event_name:d,...h}=e;V.track(e),l.fireEvent(d,h)}function pt(){const t={actor:o.Tc.USER,action:o.aO.CLICK,event_name:"DigitalProducts_Click_ReorderPricingPlan",object_type:o.g.BUTTON},{event_name:e,...d}=t;V.track(t),l.fireEvent(e,d)}function at(t){let e=t;return e&&(e=e.toLowerCase()===G().MEMBER_AREA_BLOCK?"block":"paywall"),e}function vt(t){const e=at(t.loginOrigin),d=U(t,"SiteVisitor_ViewLogin");H.track({...d,...e&&{entrypoint:e}})}function Et(t){const e=U(t,"SiteVisitor_CreateAccountToJoinMemberArea");H.track({...e,action:o.aO.SUBMIT})}function ht(t){const e=U(t,"SiteVisitor_LogInToJoinMemberArea");H.track({...e,action:o.aO.SUBMIT})}function Pt(t){const e=U(t,"SiteVisitor_JoinMemberArea");H.track({...e,action:o.aO.JOIN})}function St(t){const e=at(t.loginOrigin),d=U(t,"SiteVisitor_ClickCTADigitalProductsBlock");H.track({...d,action:o.aO.CLICK,object_type:o.g.BUTTON,...e&&{entrypoint:e}})}function ct(t){var e,d,h;const tt=t.digitalProducts.reduce(($,q)=>{const it=q.type;return $[it]||($[it]=[]),$[it].push(q.id),$},{}),et=[];for(const $ in tt)et.push({product_type:$,product_type_id_list:tt[$]});return{pricing_plan_id:t.id,pricing_plan_name:t.name,description:t.description,benefits_count:t.benefits.length,pricing_option:b(t),payment_count:u(t),payment_value:I(t),currency_code:M(t),payment_frequency_count:R(t),payment_frequency_unit:w(t),pricing_amounts:K(t),included_products_count:(e=t.digitalProducts)===null||e===void 0?void 0:e.length,included_products:et,sign_up_limits_enabled:!!(!((d=t.enrollmentDates)===null||d===void 0)&&d.startDate||!((h=t.enrollmentDates)===null||h===void 0)&&h.endDate)}}},258004:function(D,v,a){"use strict";a.d(v,{Z:()=>_});const _=new Promise(L=>{const{readyState:S}=document;if(S==="complete"||S==="interactive"){L();return}const E=()=>{document.removeEventListener("DOMContentLoaded",E,!1),L()};document.addEventListener("DOMContentLoaded",E,!1)})}},function(D){var v=function(T){return D(D.s=T)};D.O(0,["5826","8016","96135","98338"],function(){return v(569609)});var a=D.O()}]); //# sourceMappingURL=https://sourcemaps.squarespace.net/universal/scripts-compressed/sourcemaps/f99cd827dc9c570b/user-account-core-200a314a652ddddb-min.en-US.js.map