1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[676],{14882:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user/agreements",function(){return n(82132)}])},92929:function(e,t,n){"use strict";n.d(t,{J:function(){return m}});var i=n(15767),o=n(29071),r=n(23293),l=n(90678),s=n(75271),a=n(37531),d=n(41231),c=n(42814);class u extends s.Component{get commissionAccounts(){return this.props.dataStore.findAll(d._)}handleAccountChange(e){e.id&&this.props.onAccountChange(e)}render(){let{t:e,defaultCommissionAccount:t}=this.props;return(0,o.tZ)(c.a,{name:"commissionAccounts",options:this.commissionAccounts,label:e("common/field.commissionAccount.label"),placeholder:e("common/field.commissionAccount.placeholder"),onChange:this.handleAccountChange,defaultValue:t})}}(0,i.gn)([r.Fl,(0,i.w6)("design:type",Function),(0,i.w6)("design:paramtypes",[]),(0,i.w6)("design:returntype",Array)],u.prototype,"commissionAccounts",null),(0,i.gn)([r.aD.bound,(0,i.w6)("design:type",Function),(0,i.w6)("design:paramtypes",[void 0===d._?Object:d._]),(0,i.w6)("design:returntype",void 0)],u.prototype,"handleAccountChange",null);let m=(0,a.Zh)()((0,l.f3)("dataStore")((0,l.Pi)(u)))},42814:function(e,t,n){"use strict";n.d(t,{a:function(){return u}});var i=n(29071),o=n(89120),r=n.n(o),l=n(63469),s=n.n(l),a=n(75271),d=n(79518),c=n(19192);class u extends a.Component{getOptionLabel(e){return e.option.label}getOptionValue(e){return e.option.value}async load(e,t){let n;let{loadOptions:i}=this.props;i&&(n=await i(e)),this.lastQuery===e&&n&&t(n)}loadOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;this.lastQuery=e,e.length<5?this.loadThrottled(e,t):this.loadDebounced(e,t)}render(){let e;let{options:t,defaultOptions:n,async:o,onChange:r,loadOptions:l,...s}=this.props;return e=o?{component:d.Z,defaultOptions:n,loadOptions:this.loadOptions}:{options:t},(0,i.tZ)(c.xc,{getOptionLabel:this.getOptionLabel,getOptionValue:this.getOptionValue,onChange:r,...e,...s})}constructor(e){super(e),this.loadThrottled=s()(this.load.bind(this),500,{leading:!1}),this.loadDebounced=r()(this.load.bind(this),500,{leading:!1}),this.loadOptions=this.loadOptions.bind(this)}}},82132:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return D},default:function(){return G}});var i=n(29071),o=n(7670),r=n(3538),l=n(92929),s=n(76120),a=n(77554),d=n(96426),c=n(44450),u=n(37531),m=n(70520),h=n(32261),p=n(75271),g=n(4263),b=n(36760),Z=n(
154189),f=n(82917);let A=e=>{var t,n;let{commissionAccount:o,emptyState:r,renderAcceptedAgreement:l,renderPendingAgreement:s}=e,{data:a,isLoading:d,mutate:u}=(0,b.S6)((0,Z.l)(o.id)),m=null==a?void 0:null===(t=a.data)||void 0===t?void 0:t[0],{data:h,isLoading:p}=(0,b.S6)(o?(0,Z.h)(o.id):null),g=null==h?void 0:null===(n=h.data)||void 0===n?void 0:n[0];return d||p?(0,i.tZ)(c.kC,{justifyContent:"center",alignItems:"center",h:"100%",minH:"300px",children:(0,i.tZ)(f.a,{center:!0})}):m||g?g?l(g):m?s(m,u):void 0:(0,i.tZ)(i.HY,{children:r})},v=()=>{let{t:e}=(0,u.$G)();return(0,i.BX)(c.xu,{shadow:"lg",p:"4",_dark:{bg:"gray.60"},borderRadius:"sm",children:[(0,i.tZ)(o.X,{size:"sm",fontWeight:"bold",pb:"4",children:e("agreements/downloadSection.documentLoading.title")}),(0,i.tZ)(r.x,{color:"gray.80",children:e("agreements/downloadSection.documentLoading.description")})]})};var y=n(29087),w=n(71439),x=n(29336);let C=(0,n(43177).Z)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),_=e=>{let{commissionAccountAgreement:t}=e,{t:n}=(0,u.$G)();return(0,i.tZ)(c.xu,{borderRadius:"xl",borderWidth:"1px",borderColor:"gray.80",p:"4",_dark:{bg:"gray.60",color:"white",borderColor:"gray.60"},children:(0,i.BX)(c.kC,{gap:"4",alignItems:"center",justifyContent:"space-between",children:[(0,i.BX)(c.kC,{alignItems:"center",children:[(0,i.tZ)(x.Z,{className:"size-12"}),(0,i.tZ)(o.X,{size:"sm",textAlign:"center",fontWeight:"bold",children:t.title})]}),(0,i.tZ)(y.hU,{asChild:!0,disabled:!t.pdfDocumentUrl,className:"h-12 min-w-12",variant:y.gZ.Ghost,"aria-label":n("agreements/downloadSection.downloadLabel"),children:t.pdfDocumentUrl?(0,i.tZ)(w.Z,{href:t.pdfDocumentUrl,target:"_blank",rel:"noopener noreferrer",download:"".concat(t.title||"Agreement",".pdf"),children:(0,i.tZ)(C,{})}):(0,i.tZ)("span",{children:(0,i.tZ)(C,{})})})]})})},X=e=>{let{acceptedAgreement:t}=e,{t:n}=(0,u.$G)();return(0,i.BX)(c.xu,{mb:"12",position:"relative",children:[(0,i.BX)(c.xu,{textAlign:"left",mb:"9",children:[(0,i.tZ)(o.X,{size:"lg",mb:"2",children:n("agreements/downloadSection.title")}),(0,i.tZ)(r.x,{children:n("agreements/downloadSection.description")})]}),(null==t?void 0:t.pdfDocumentUrl)?(0,i.tZ)(_,{commissionAccountAgreement:t}):(0,i.tZ)(v,{})]})};var k=n(3515),O=n(92355),S=n(42994);let B=()=>{let{t:e}=(0,u.$G)(),{store:t}=(0,d.o)(),n=(0,h.useRouter)(),b=n.query["commission-account"],Z=(0,p.useMemo)(()=>t.data.currentUser.commissionAccounts,[t.data.currentUser.commissionAccounts]),f=(0,p.useMemo)(()=>b?Z.find(e=>e.id===b):null==Z?void 0:Z[0],[Z,b]),v=()=>{(0,O.o)(S.Z)};return(0,i.BX)(i.HY,{children:[(0,i.tZ)(m.PB,{title:e("agreements/seo.title"),description:e("agreements/seo.description"),openGraph:{title:e("agreements/seo.openGraph.title"),description:e("agreements/seo.openGraph.description")}}),(0,i.BX)(s.i,{activeId:a.T.Agreements,children:[t.data.currentUser.managesMultipleCommissionAccounts?(0,i.tZ)(c.xu,{mb:"12",maxW:"300px",children:(0,i.tZ)(l.J,{onAccountChange:e=>{n.push({query:{"commission-account":e.id}},void 0,{shallow:!0})},defaultCommissionAccount:f})}):null,f?(0,i.tZ)(i.HY,{children:(0,i.tZ)(A,{commissionAccount:f,emptyState:(0,i.BX)(k.F,{as:c.kC,flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center",minH:"300px",children:[(0,i.tZ)(o.X,{size:"lg",mb:"2",children:e("agreements/emptyState.title")}),(0,i.tZ)(r.x,{children:e("agreements/emptyState.subtitle")})]}),renderPendingAgreement:(t,n)=>(0,i.BX)(i.HY,{children:[(0,i.BX)(c.xu,{textAlign:"center",mb:"9",children:[(0,i.tZ)(o.X,{size:"lg",mb:"2",children:e("agreements/reviewCard.title")}),(0,i.tZ)(r.x,{children:e("agreements/reviewCard.subtitle")})]}),(0,i.tZ)(g.o,{buttonText:e("agreements/acceptCard.signButton"),commissionAccountAgreement:t,onAgreementAccepted:()=>{v(),n()},onInquirySent:n})]}),renderAcceptedAgreement:e=>(0,i.tZ)(X,{acceptedAgreement:e})})}):null]})]})};var D=!0;function G(e){let{fallback:t}=e;return(0,i.tZ)(b.pO,{fallback:t,children:(0,i.tZ)(B,{})})}}},function(e){e.O(0,[8135,6120,2888,9774,179],function(){return e(e.s=14882)}),_N_E=e.O()}]);
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.