1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{a as t}from"./vendor-html-parser-DOJ8foyv.js";import{n,t as r}from"./vendor-react-BREUBCH4.js";import{a as i,g as a}from"./vendor-react-router-D-KYiz2C.js";import{In as o,R as s,V as c,Vt as l,Y as u,zt as d}from"./errorBoundary-CheDi6wM.js";import{a as f,c as p,u as m}from"./src-kIyB8UZk.js";import{q as h,rt as g}from"./src-1wTTKcyD.js";import{t as _}from"./src-FD65B_Ks.js";import{c as v,d as y,o as b,p as x,r as S,u as C,v as w,x as T}from"./index.es-CZ6BWE4M.js";import{f as E}from"./src-BuAD0-ja2.js";var D=e(t());function O(){var e=(0,D.useRef)(!0);return e.current?(e.current=!1,!0):e.current}var k=function(e,t){return e===t};function A(e,t){t===void 0&&(t=k);var n=(0,D.useRef)(),r=(0,D.useRef)(e);return!O()&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var j=r();function M(e){let t=(0,j.c)(7),{user:n}=u.useAuth(),r=u.useExternalGatingPassed(e.uid),i=s(),a=!(e.isContentGatedWithSiteRegistration&&!n)&&r===`anonymous`,o=r===n?.id,l=r!==void 0&&(a||o),d;t[0]!==i||t[1]!==e.uid?(d=()=>{i(c(e.uid))},t[0]=i,t[1]=e.uid,t[2]=d):d=t[2];let f=d,p;return t[3]!==l||t[4]!==f||t[5]!==r?(p={recordedUserId:r,isExternalGatingPassedPreviously:l,recordPassedGatingForContent:f},t[3]=l,t[4]=f,t[5]=r,t[6]=p):p=t[6],p}var N=`Already have an account?`,P=`Already purchased?`,F=`Already Subscribed?`,I=`Subscribe Now`,ee={title:`Unlock All Access Premium Subscription`,description:`Get instant access to Trusts & Estates articles, exclusive webinars, digital editions, and optional print delivery. Choose your subscription and dive into expert insights today!`},te=`openform`,L=n(),R=e=>{let t=(0,j.c)(33),{contentUid:n,contentType:r,overrides:i,classNames:a,onSuccess:o,onSubmit:s,onSubmissionError:c,onLoadError:l,onFormLoad:d,onContentUnlock:f,leadGenCallbacks:p,gatingAction:m,isLeadGenPage:h,emailAddress:g,entryData:_}=e,{user:v,accessToken:y,clientIdForELN:b,platformServiceBaseUrl:x,iirisBrandConfigId:C}=u.useAuth(),w;t[0]!==p||t[1]!==o?(w=e=>{p?.completionCallback?.(e),o(e)},t[0]=p,t[1]=o,t[2]=w):w=t[2];let T=w,E;t[3]!==p||t[4]!==s?(E=()=>{p?.submissionCallback?.(),s?.()},t[3]=p,t[4]=s,t[5]=E):E=t[5];let D=E,O;t[6]!==p||t[7]!==c?(O=e=>{p?.submissionErrorCallback?.(e),c?.(e)},t[6]=p,t[7]=c,t[8]=O):O=t[8];let k=O,A;t[9]!==p||t[10]!==l?(A=e=>{p?.loadErrorCallback?.(e),l?.(e)},t[9]=p,t[10]=l,t[11]=A):A=t[11];let M=A,N=y||void 0,P=v,F=p?.formInteractionCallback,I;return t[12]!==a||t[13]!==b||t[14]!==r||t[15]!==n||t[16]!==g||t[17]!==_||t[18]!==m||t[19]!==C||t[20]!==h||t[21]!==f||t[22]!==d||t[23]!==i||t[24]!==x||t[25]!==N||t[26]!==P||t[27]!==F||t[28]!==T||t[29]!==M||t[30]!==D||t[31]!==k?(I=(0,L.jsx)(S,{contentType:r,contentId:n,platformServiceBaseUrl:x,authorization:N,emailAddress:g,clientId:b,iirisUserProfile:P,completionCallback:T,submissionCallback:D,submissionErrorCallback:k,loadErrorCallback:M,loadSuccessCallback:d,formInteractionCallback:F,classNames:a,productId:C,overrides:i,inContextValidationMessage:!0,gatingAction:m,isLeadGenPage:h,unlockedContentCallback:f,entryData:_}),t[12]=a,t[13]=b,t[14]=r,t[15]=n,t[16]=g,t[17]=_,t[18]=m,t[19]=C,t[20]=h,t[21]=f,t[22]=d,t[23]=i,t[24]=x,t[25]=N,t[26]=P,t[27]=F,t[28]=T,t[29]=M,t[30]=D,t[31]=k,t[32]=I):I=t[32],I},z=(0,d.cn)(`GatedForm`),ne=e=>{let t=(0,j.c)(19),{contentUid:n,onSuccess:r,onSubmit:i,onSubmissionError:a,onLoadError:s,onClose:c,onFormLoad:l,contentType:u,overrides:d,gatingAction:f,leadGenCallbacks:p,emailAddress:m,isLeadGenPage:g,formLayout:_,entryData:v}=e,y=g!==void 0&&g,b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=o(B,W),t[0]=b):b=t[0];let x=_===`two-column`?H:b,S;t[1]!==u||t[2]!==n||t[3]!==m||t[4]!==v||t[5]!==x||t[6]!==f||t[7]!==y||t[8]!==p||t[9]!==l||t[10]!==s||t[11]!==a||t[12]!==i||t[13]!==r||t[14]!==d?(S=(0,L.jsx)(R,{contentUid:n,contentType:u,overrides:d,classNames:x,onSuccess:r,onSubmit:i,onSubmissionError:a,onLoadError:s,onFormLoad:l,leadGenCallbacks:p,gatingAction:f,emailAddress:m,isLeadGenPage:y,entryData:v}),t[1]=u,t[2]=n,t[3]=m,t[4]=v,t[5]=x,t[6]=f,t[7]=y,t[8]=p,t[9]=l,t[10]=s,t[11]=a,t[12]=i,t[13]=r,t[14]=d,t[15]=S):S=t[15];let C;return t[16]!==c||t[17]!==S?(C=(0,L.jsx)(h,{onClose:c,children:S}),t[16]=c,t[17]=S,t[18]=C):C=t[18],C},B={base:{label:z(`BaseLabel`),input:z(`BaseInput`),radio:z(`BaseRadio`),span:z(`BaseSpan`),a:z(`BaseLink`)},formLayout:{container:z({},[`eln-newsletter-form-container`]),formContainer:z({},[`eln-newsletter-form-container`]),title:z(`Title`,[`eln-entitlement-formlayout-title`]),unlockedTitle:z(`UnlockedTitle`,[`eln-entitlement-formlayout-title`]),description:z(`Description`,[`eln-entitlement-formlayout-description`]),unlockedDescription:z(`UnlockedDescription`,[`eln-entitlement-formlayout-description`]),formContainerRow:`row`,formContainerRowWide:`row-wide`,validationErroredField:z(`ValidationError`,[`eln-form-errored-field`]),validationHeader:z(`ValidationHeader`,[`eln-form-validation-header`]),submit:z(`Submit`,[`eln-entitlement-formlayout-container`]),textInput:z(`TextInput`,[`eln-newsletter-form-text-input-fragment`]),label:z(`Label`,[`eln-newsletter-form-label-fragment`]),radioOptionElement:z(`RadioOptionElement`,[`eln-newsletter-form-radio-option-element`]),checkbox:z(`Checkbox`,[`eln-newsletter-form-checkbox-container`]),input:z(`Input`,[`eln-newsletter-form-select-input-fragment`]),select:z(`Select`,[`eln-newsletter-form-select-input-fragment`]),selectElement:z(`SelectElement`,[`eln-newsletter-form-select-element`]),inputElement:z(`InputElement`,[`eln-newsletter-form-input-element`]),selectOptionElement:z(`SelectOptionElement`,[`eln-newsletter-form-select-option-element`]),hubspotHelperTextWrapper:z(`HubspotHelperTextWrapper`,[`eln-entitlement-formlayour-helper-text-wrapper`]),hubspotHelperTextLinks:z(`HubspotHelperTextLinks`,[`eln-entitlement-formlayour-helper-text-wrapper`]),selectMultiple:z(`SelectMultiple`,[`eln-newsletter-form-select-multiple`]),captchaContainer:z(`CaptchaContainer`),captcha:z(`Captcha`)},consentLayout:{container:z(`ConsentContainer`,[`eln-newsletter-consent-container`]),thirdPartyContainer:z(`ConsentContainer`,[`eln-third-party-consent-container`]),a:z(`ConsentLink`,[`eln-third-party-consent-a`])},newsletterLayout:{inputContainer:z(`Newsletter`,[`eln-newsletter-newsletterlist-input-container`]),validationError:z(`NewsletterValidationError`,[`eln-newsletter-error`])}},V=o(B,e=>{e.formLayout.container=z({embedded:!0},[e.formLayout.container])}),H=o(B,e=>{e.formLayout.formContainer=z(`TwoColumnFormContainer`,[e.formLayout.formContainer]),e.formLayout.container=z(`TwoColumnContainer`,[e.formLayout.container]),e.formLayout.title=z(`Title`,{variant:`visible`}),e.formLayout.description=z(`Description`,{variant:`text-center`})}),U=o(H,e=>{e.formLayout.submit=`Button_variant_secondaryFilled`});function W(e){e.formLayout.container=z(`Layout`,e.formLayout.container)}var re=e=>{let t=(0,j.c)(3),{isContentGatedWithSiteRegistration:n,isContentGatedWithExternalForm:r,isGatedAsPaid:i,isUserEntitled:a,uid:o,skipExternalForm:s}=e,{user:c}=u.useAuth(),l;t[0]!==n||t[1]!==o?(l={uid:o,isContentGatedWithSiteRegistration:n},t[0]=n,t[1]=o,t[2]=l):l=t[2];let{isExternalGatingPassedPreviously:d}=M(l);return(n||i)&&!c?g.NEED_TO_AUTHENTICATE:i&&!a?g.NEED_TO_PAY:(n||r||i)&&!d&&!s?g.NEED_TO_PASS_EXTERNAL_FORM:g.UNBLOCKED},ie=e=>e?.paidProductTaxonomies?.some(e=>e.paidProductTaxonomyType===E.SiteSubscription)||!1,ae=(e,t)=>t?.length?e?.paidProductTaxonomies?.some(({paidProductId:e})=>t.includes(e))??!1:!1,G=(e,t)=>e===l.WEALTH_MANAGEMENT?ee:t,K={default:B,"two-column":H,embedded:V};function oe({sponsored:e,iirisAuthentication:t,isGatedAsPaid:n}){let r=t&&!!e?.gateWithSiteReg,i=e?.gateWithExternalForm.toLowerCase()===`url`?e.externalFormID:void 0,a=q(e);return{isContentGatedWithSiteRegistration:r,isContentGatedWithExternalForm:a,externalGatingUrl:i,isBodyGated:n||r||a}}function q(e){return!!(e?.gateWithExternalForm&&e.gateWithExternalForm!==`None`&&e.externalFormID.length>0)}function se(e){let t=oe(e);return{...t,isBodyGated:t.isBodyGated&&Number(e.additionalGatingSettings?.gatingCharacterLength)>0}}var ce=(e,t,n)=>{let r=(0,j.c)(8),{autoRunNextGatingStep:i}=u.useFeatureToggles(),{isLoaded:a}=u.useAuth(),o=i&&n,s;r[0]!==e||r[1]!==t||r[2]!==a||r[3]!==o?(s=()=>{o&&a&&e!==g.UNBLOCKED&&t()},r[0]=e,r[1]=t,r[2]=a,r[3]=o,r[4]=s):s=r[4];let c;r[5]!==a||r[6]!==o?(c=[a,o],r[5]=a,r[6]=o,r[7]=c):c=r[7],(0,D.useEffect)(s,c)},le=()=>{let e=(0,j.c)(4),[t]=i(),n;e[0]===t?n=e[1]:(n=new Map,t.forEach((e,t)=>{n.set(t.toLowerCase(),e.toLowerCase())}),e[0]=t,e[1]=n);let r;return e[2]===n?r=e[3]:(r={normalizedParams:n},e[2]=n,e[3]=r),r},ue={hubspot:w.Hubspot,eloqua:w.Eloqua},de=e=>e===`hubspot`||e===`eloqua`,J=e=>{if(typeof e!=`string`)return null;let t=e.trim().toLowerCase();return de(t)?t:null},fe=(e,t)=>
1ue[J(e)??J(t)??`eloqua`],Y={hubspot:`Hubspot`,eloqua:`Eloqua`},X=(e,t)=>{let n=J(e)??J(t);return n?Y[n]:typeof e==`string`?e:void 0},pe=e=>{let{clientIdForELN:t,environment:n,user:r}=u.useAuth(),i=x[t]??`N/A`,a=e.pageTitle||(typeof document<`u`?document.title:``),o={siteName:t,divisionId:i,environment:n,actionPoint:(0,D.useRef)(typeof window<`u`?window.location.href:``).current,pageTitle:a,accessedFileName:e.accessedFileName??null,userLoggedIn:r?`Logged In`:`Anonymous`,contentType:e.contentTypeLabel??e.contentType},s=C(T.LEAD_GEN,o),c=v(T.LEAD_GEN,o),l=(0,D.useRef)(s);l.current=s;let d=e.gatingState===g.UNBLOCKED||e.isGatedAsPaid,f=(0,D.useRef)({leadInitiated:!1,eventSent:!1,suppressLeave:!1}),p=()=>f.current.eventSent,m=()=>{f.current.eventSent=!0},h=(0,D.useRef)({...y(),formInstanceName:e.fallbackFormInstanceName??`Eloqua`,...e.fallbackFormHTMLName?{formHTMLName:e.fallbackFormHTMLName}:{}}),b=(0,D.useRef)(!1);r&&(b.current=!0);let S=t=>({...h.current,formInstanceName:X(h.current.formInstanceName,e.fallbackFormInstanceName),eventTriggered:fe(h.current.formInstanceName,e.fallbackFormInstanceName),userLoggedIn:b.current?`Logged In`:`Anonymous`,...t}),w=(0,D.useRef)(!1);(0,D.useEffect)(()=>{!e.fetchElnData||w.current||(w.current=!0,e.fetchElnData().then(e=>{h.current={...h.current,...e}}).catch(()=>{}))},[e.fetchElnData]);let E=()=>{let e=S({pageVisitStatus:`Success`});return f.current.leadInitiated?{...e,leadInitiationStatus:`Success`,leadSubmissionStatus:`Incomplete`,downstreamUpdateStatus:`Incomplete`}:{...e}},O=()=>{d||p()||f.current.suppressLeave||(c(E()),m())};return(0,D.useEffect)(()=>{let e=()=>O();return window.addEventListener(`pagehide`,e),()=>window.removeEventListener(`pagehide`,e)},[O]),_(O),{onGatingButtonClick:()=>{f.current.leadInitiated=!0},suppressLeaveEvent:()=>{f.current.suppressLeave=!0},loadErrorCallback:e=>{d||p()||(m(),l.current?.(S({pageVisitStatus:`Success`,leadInitiationStatus:`Failure`})))},formInteractionCallback:()=>{f.current.leadInitiated=!0},submissionCallback:()=>{f.current.leadInitiated=!0},completionCallback:e=>{p()||(m(),l.current?.(S({pageVisitStatus:`Success`,leadInitiationStatus:`Success`,leadSubmissionStatus:`Success`,downstreamUpdateStatus:`Success`})))},submissionErrorCallback:e=>{p()||(m(),l.current?.(S({pageVisitStatus:`Success`,leadInitiationStatus:`Success`,leadSubmissionStatus:`Failure`,downstreamUpdateStatus:`Failure`})))}}};function me(e){let t=(0,j.c)(23),{isExternalGatingPassedPreviously:n,onSuccess:r,uid:i,contentType:a,skipExternalForm:o,isBodyGated:s}=e,{eln:c}=f(),{user:l,accessToken:d}=u.useAuth(),[p,m]=(0,D.useState)(!1),h;t[0]!==d||t[1]!==a||t[2]!==c||t[3]!==s||t[4]!==n||t[5]!==p||t[6]!==r||t[7]!==o||t[8]!==i||t[9]!==l?.business_email||t[10]!==l?.email||t[11]!==l?.id?(h=()=>{l?.id&&l?.business_email&&o&&!n&&!p&&(m(!0),c?.postGatedContentFormData({userId:l?.id,userEmail:l?.email,contentType:a,contentUid:i,accessToken:d,isBodyGated:s}).then(e=>{e.ok&&r()}).catch(Z).finally(()=>{m(!1)}))},t[0]=d,t[1]=a,t[2]=c,t[3]=s,t[4]=n,t[5]=p,t[6]=r,t[7]=o,t[8]=i,t[9]=l?.business_email,t[10]=l?.email,t[11]=l?.id,t[12]=h):h=t[12];let g;t[13]!==d||t[14]!==a||t[15]!==c||t[16]!==n||t[17]!==p||t[18]!==r||t[19]!==o||t[20]!==i||t[21]!==l?(g=[p,m,o,n,l,r,a,i,d,c],t[13]=d,t[14]=a,t[15]=c,t[16]=n,t[17]=p,t[18]=r,t[19]=o,t[20]=i,t[21]=l,t[22]=g):g=t[22],(0,D.useEffect)(h,g)}function Z(e){console.log(e)}var he=(e,t,n,r)=>e===g.NEED_TO_PAY||e===g.NEED_TO_AUTHENTICATE&&t?r?I:n.buy:e===g.NEED_TO_AUTHENTICATE?n.register:n.access,ge=({gatingState:e,isGatedAsPaid:t,gatingSectionText:n,additionalGatingSettings:r,siteSettings:i,isContentGatedWithSiteRegistration:a})=>{let o=t?`paid`:`unpaid`,s=()=>r?.gatingTitle&&r?.gatingDescriptionMessage?{title:r?.gatingTitle,description:r?.gatingDescriptionMessage}:i?.defaultGatingTitle&&i?.defaultGatingDescriptionMessage?{title:i?.defaultGatingTitle,description:i?.defaultGatingDescriptionMessage}:null;if(e===g.NEED_TO_AUTHENTICATE||e===g.NEED_TO_PAY)return s()||{title:n?.[o].accessRequired.title||``,description:n?.[o].accessRequired.description||``};let c={title:n?.[o]?.consentRequired?.title??``,description:n?.[o]?.consentRequired?.description??``};return e===g.NEED_TO_PASS_EXTERNAL_FORM?!a&&o===`unpaid`&&s()||c:{title:n?.[o].unblocked?.title||``,de
1scription:n?.[o].unblocked?.description||``}},_e=(e,t)=>e?t?F:P:N,Q=e=>{let{gatingButtonText:t,gatingSectionText:n,onAddToCart:r,onUnblockedContentClick:i,onExternalFormSuccess:o,sponsored:s,onClick:c,errorOccurred:l,uid:d,isUserEntitled:h,isGatedAsPaid:_,additionalGatingSettings:v,siteSettings:y,contentType:x,contentTypeLabel:S,paidGating:C,onAuthStart:w,onExternalFormStart:T,isGatedFormShownInitially:E=!1,deriveGatingDataFn:O=oe,pageTitle:k,accessedFileName:j}=e,{excludedPaidProductIdsForConsent:N}=u.useConfig(),{user:P,authenticationPending:F,platformServiceBaseUrl:I,accessToken:ee,clientIdForELN:L,iirisBrandConfigId:R}=u.useAuth(),{iirisAuthentication:z,skip3rdPartyConsentForPaidGating:ne}=u.useFeatureToggles(),B=ie(C),V=C&&ae(C,N)||ne&&_&&B,{isContentGatedWithSiteRegistration:H,isContentGatedWithExternalForm:U,externalGatingUrl:W,isBodyGated:G}=O({sponsored:s,iirisAuthentication:z,isGatedAsPaid:_,additionalGatingSettings:v}),K=re({isContentGatedWithSiteRegistration:H,isContentGatedWithExternalForm:U,isGatedAsPaid:_,isUserEntitled:h,uid:d,skipExternalForm:V}),q=A(K),{register:se,login:ue}=f(),de=m({isGatedContent:!0,isGatedAsPaid:_,isExternalFormFlow:U,contentType:x}),J=()=>b({platformServiceBaseUrl:I,clientId:L,authorization:ee||void 0,contentType:x,iirisUserProfile:P,productId:R,formId:s?.externalFormID}),fe=K!==g.UNBLOCKED&&!V,Y=pe({contentType:x,contentTypeLabel:S,contentId:d,pageTitle:k??``,accessedFileName:j,fetchElnData:fe?J:void 0,gatingState:K,isGatedAsPaid:_,fallbackFormInstanceName:s?.gateWithExternalForm,fallbackFormHTMLName:s?.externalFormID}),X=a(),{normalizedParams:Z}=le(),Q=p(),{recordPassedGatingForContent:ve,recordedUserId:ye,isExternalGatingPassedPreviously:be}=M({uid:d,isContentGatedWithSiteRegistration:H});me({uid:d,contentType:x,isExternalGatingPassedPreviously:be,skipExternalForm:V,isBodyGated:G,onSuccess:()=>{ve(),Y.completionCallback({silent:!0})}});let xe=E&&!V||K===g.NEED_TO_PASS_EXTERNAL_FORM&&(Z.get(`successfulpurchase`)===`true`||Z.get(`withpromptforconsent`)===`true`),[Se,$]=(0,D.useState)(xe),[Ce,we]=(0,D.useState)(0),Te=()=>{we(e=>e+=1)},[Ee,De]=(0,D.useState)(`idle`);X.state===`loading`&&Ee===`requested`&&De(`loading`),X.state===`idle`&&Ee===`loading`&&K===g.NEED_TO_PASS_EXTERNAL_FORM&&(De(`idle`),$(!0));let Oe=()=>{Y.suppressLeaveEvent(),Q(`?redirectToPayment=true`)},ke=()=>{Oe(),De(`requested`)},Ae=({id:e})=>{e!==ye&&$(!0)},je={referrer:`content_cta`,withNewsletterPromo:!1,withPromptForConsent:!0,onRegisterComplete:de,isGatedContent:!0,isExternalFormFlow:U,contentType:x,..._?{onRegistrationSuccess:ke,onLoginSuccess:ke,onClose:()=>{P&&ke()},withPayment:!0}:{onRegistrationSuccess:Ae,onLoginSuccess:Ae}},Me=()=>{ue(je)},Ne=()=>{c?.(),Y.onGatingButtonClick(),l?Q():K===g.NEED_TO_AUTHENTICATE?(w?.(),_&&r?.(),Y.suppressLeaveEvent(),se(je)):K===g.NEED_TO_PAY?(r?.(),Oe()):W?(T?.(),window.open(W,`_blank`)):K===g.NEED_TO_PASS_EXTERNAL_FORM?$(!0):i?.()};return ce(K,Ne,Z.get(te)===`true`),{isGatedFormShown:Se,formKey:Ce,resetFormState:Te,gatingState:K,previousGatingState:q,isBodyGated:G,isContentGatedWithSiteRegistration:H,handleGatingButtonClick:Ne,handleLoginButtonClick:Me,handleExternalFormSuccess:async e=>{if(e)try{await o?.(e),ve()}catch(e){console.error(e)}finally{$(!1)}},handleExternalFormClose:()=>{$(!1)},handleExternalFormStart:()=>{K===g.NEED_TO_PASS_EXTERNAL_FORM&&T?.()},isButtonDisabled:F,displayedText:he(K,_,t,B),sectionText:ge({gatingState:K,isGatedAsPaid:_,gatingSectionText:n,additionalGatingSettings:v,siteSettings:y,isContentGatedWithSiteRegistration:H}),loginButtonDescription:_e(_,B),leadGenCallbacks:{loadErrorCallback:Y.loadErrorCallback,formInteractionCallback:Y.formInteractionCallback,submissionCallback:Y.submissionCallback,completionCallback:Y.completionCallback,submissionErrorCallback:Y.submissionErrorCallback},registerOptions:je}};export{se as a,G as c,U as d,R as f,le as i,ie as l,M as m,_e as n,q as o,te as p,Q as r,K as s,he as t,ne as u}; 2//# sourceMappingURL=src-BMIs6WOA.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.