1var tt=t=>{throw TypeError(t)};var je=(t,e,s)=>e.has(t)||tt("Cannot "+s);var a=(t,e,s)=>(je(t,e,"read from private field"),s?s.call(t):e.get(t)),b=(t,e,s)=>e.has(t)?tt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),u=(t,e,s,n)=>(je(t,e,"write to private field"),n?n.call(t,s):e.set(t,s),s),v=(t,e,s)=>(je(t,e,"access private method"),s);import{S as gt,p as st,r as A,s as Le,a as oe,n as Ee,e as Oe,i as nt,t as Ot,b as ye,f as St,c as It,d as it,g as ce,h as Mt,j as R,k as ft,u as mt,R as L,B as ne,l as Pt,m as W,A as Se,o as Tt,q as c,C as Ve,v as y,w as vt,D as At,x as Qt,y as Ft,z as Ht,E as Ut,F as Dt,T as Bt,G as zt}from"./index-BC7lhu2w.js";var S,g,le,O,G,V,U,B,he,Y,X,K,q,z,J,_,re,Ie,Me,Pe,Te,Ae,Qe,Fe,_t,dt,Ye=(dt=class extends gt{constructor(e,s){super();b(this,_);b(this,S);b(this,g);b(this,le);b(this,O);b(this,G);b(this,V);b(this,U);b(this,B);b(this,he);b(this,Y);b(this,X);b(this,K);b(this,q);b(this,z);b(this,J,new Set);this.options=s,u(this,S,e),u(this,B,null),u(this,U,st()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(a(this,g).addObserver(this),at(a(this,g),this.options)?v(this,_,re).call(this):this.updateResult(),v(this,_,Te).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return He(a(this,g),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return He(a(this,g),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,v(this,_,Ae).call(this),v(this,_,Qe).call(this),a(this,g).removeObserver(this)}setOptions(e){const s=this.options,n=a(this,g);if(this.options=a(this,S).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof A(this.options.enabled,a(this,g))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");v(this,_,Fe).call(this),a(this,g).setOptions(this.options),s._defaulted&&!Le(this.options,s)&&a(this,S).getQueryCache().notify({type:"observerOptionsUpdated",query:a(this,g),observer:this});const i=this.hasListeners();i&&rt(a(this,g),n,this.options,s)&&v(this,_,re).call(this),this.updateResult(),i&&(a(this,g)!==n||A(this.options.enabled,a(this,g))!==A(s.enabled,a(this,g))||oe(this.options.staleTime,a(this,g))!==oe(s.staleTime,a(this,g)))&&v(this,_,Ie).call(this);const r=v(this,_,Me).call(this);i&&(a(this,g)!==n||A(this.options.enabled,a(this,g))!==A(s.enabled,a(this,g))||r!==a(this,z))&&v(this,_,Pe).call(this,r)}getOptimisticResult(e){const s=a(this,S).getQueryCache().build(a(this,S),e),n=this.createResult(s,e);return Wt(this,n)&&(u(this,O,n),u(this,V,this.options),u(this,G,a(this,g).state)),n}getCurrentResult(){return a(this,O)}trackResult(e,s){return new Proxy(e,{get:(n,i)=>(this.trackProp(i),s==null||s(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&a(this,U).status==="pending"&&a(this,U).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(e){a(this,J).add(e)}getCurrentQuery(){return a(this,g)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const s=a(this,S).defaultQueryOptions(e),n=a(this,S).getQueryCache().build(a(this,S),s);return n.fetch().then(()=>this.createResult(n,s))}fetch(e){var s;return v(this,_,re).call(this,{...e,cancelRefetch:(s=e.cancelRefetch)!=null?s:!0}).then(()=>(this.updateResult(),a(this,O)))}createResult(e,s){var Je;const n=a(this,g),i=this.options,r=a(this,O),o=a(this,G),d=a(this,V),f=e!==n?e.state:a(this,le),{state:j}=e;let l={...j},C=!1,h;if(s._optimisticResults){const M=this.hasListeners(),ae=!M&&at(e,s),ve=M&&rt(e,n,s,i);(ae||ve)&&(l={...l,...It(j.data,e.options)}),s._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:N,errorUpdatedAt:E,status:m}=l;h=l.data;let w=!1;if(s.placeholderData!==void 0&&h===void 0&&m==="pending"){let M;r!=null&&r.isPlaceholderData&&s.placeholderData===(d==null?void 0:d.placeholderData)?(M=r.data,w=!0):M=typeof s.placeholderData=="function"?s.placeholderData((Je=a(this,X))==null?void 0:Je.state.data,a(this,X)):s.placeholderData,M!==void 0&&(m="success",h=it(r==null?void 0:r.data,M,s),C=!0)}if(s.select&&h!==void 0&&!w)if(r&&h===(o==null?void 0:o.data)&&s.select===a(this,he))h=a(this,Y);else try{u(this,he,s.select),h=s.select(h),h=it(r==null?void 0:r.data,h,s),u(this,Y,h),u(this,B,null)}catch(M){u(this,B,M)}a(this,B)&&(N=a(this,B),h=a(this,Y),E=Date.now(),m="error");const p=l.fetchStatus==="fetching",F=m==="pending",ie=m==="error",fe=F&&p,me=h!==void 0,Q={status:m,fetchStatus:l.fetchStatus,isPending:F,isSuccess:m==="success",isError:ie,isInitialLoading:fe,isLoading:fe,data:h,dataUpdatedAt:l.dataUpdatedAt,error:N,errorUpdatedAt:E,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdate
1Count:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>f.dataUpdateCount||l.errorUpdateCount>f.errorUpdateCount,isFetching:p,isRefetching:p&&!F,isLoadingError:ie&&!me,isPaused:l.fetchStatus==="paused",isPlaceholderData:C,isRefetchError:ie&&me,isStale:Xe(e,s),refetch:this.refetch,promise:a(this,U),isEnabled:A(s.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const M=Q.data!==void 0,ae=Q.status==="error"&&!M,ve=be=>{ae?be.reject(Q.error):M&&be.resolve(Q.data)},et=()=>{const be=u(this,U,Q.promise=st());ve(be)},_e=a(this,U);switch(_e.status){case"pending":e.queryHash===n.queryHash&&ve(_e);break;case"fulfilled":(ae||Q.data!==_e.value)&&et();break;case"rejected":(!ae||Q.error!==_e.reason)&&et();break}}return Q}updateResult(){const e=a(this,O),s=this.createResult(a(this,g),this.options);if(u(this,G,a(this,g).state),u(this,V,this.options),a(this,G).data!==void 0&&u(this,X,a(this,g)),Le(s,e))return;u(this,O,s);const n=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,r=typeof i=="function"?i():i;if(r==="all"||!r&&!a(this,J).size)return!0;const o=new Set(r!=null?r:a(this,J));return this.options.throwOnError&&o.add("error"),Object.keys(a(this,O)).some(d=>{const x=d;return a(this,O)[x]!==e[x]&&o.has(x)})};v(this,_,_t).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&v(this,_,Te).call(this)}},S=new WeakMap,g=new WeakMap,le=new WeakMap,O=new WeakMap,G=new WeakMap,V=new WeakMap,U=new WeakMap,B=new WeakMap,he=new WeakMap,Y=new WeakMap,X=new WeakMap,K=new WeakMap,q=new WeakMap,z=new WeakMap,J=new WeakMap,_=new WeakSet,re=function(e){v(this,_,Fe).call(this);let s=a(this,g).fetch(this.options,e);return e!=null&&e.throwOnError||(s=s.catch(Ee)),s},Ie=function(){v(this,_,Ae).call(this);const e=oe(this.options.staleTime,a(this,g));if(Oe.isServer()||a(this,O).isStale||!nt(e))return;const n=Ot(a(this,O).dataUpdatedAt,e)+1;u(this,K,ye.setTimeout(()=>{a(this,O).isStale||this.updateResult()},n))},Me=function(){var e;return(e=typeof this.options.refetchInterval=="function"?this.options.refetchInterval(a(this,g)):this.options.refetchInterval)!=null?e:!1},Pe=function(e){v(this,_,Qe).call(this),u(this,z,e),!(Oe.isServer()||A(this.options.enabled,a(this,g))===!1||!nt(a(this,z))||a(this,z)===0)&&u(this,q,ye.setInterval(()=>{(this.options.refetchIntervalInBackground||St.isFocused())&&v(this,_,re).call(this)},a(this,z)))},Te=function(){v(this,_,Ie).call(this),v(this,_,Pe).call(this,v(this,_,Me).call(this))},Ae=function(){a(this,K)!==void 0&&(ye.clearTimeout(a(this,K)),u(this,K,void 0))},Qe=function(){a(this,q)!==void 0&&(ye.clearInterval(a(this,q)),u(this,q,void 0))},Fe=function(){const e=a(this,S).getQueryCache().build(a(this,S),this.options);if(e===a(this,g))return;const s=a(this,g);u(this,g,e),u(this,le,e.state),this.hasListeners()&&(s==null||s.removeObserver(this),e.addObserver(this))},_t=function(e){ce.batch(()=>{e.listeners&&this.listeners.forEach(s=>{s(a(this,O))}),a(this,S).getQueryCache().notify({query:a(this,g),type:"observerResultsUpdated"})})},dt);function $t(t,e){return A(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function at(t,e){return $t(t,e)||t.state.data!==void 0&&He(t,e,e.refetchOnMount)}function He(t,e,s){if(A(e.enabled,t)!==!1&&oe(e.staleTime,t)!=="static"){const n=typeof s=="function"?s(t):s;return n==="always"||n!==!1&&Xe(t,e)}return!1}function rt(t,e,s,n){return(t!==e||A(n.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&Xe(t,s)}function Xe(t,e){return A(e.enabled,t)!==!1&&t.isStaleByTime(oe(e.staleTime,t))}function Wt(t,e){return!Le(t.getCurrentResult(),e)}function ot(t,e){const s=new Set(e);return t.filter(n=>!s.has(n))}function Gt(t,e,s){const n=t.slice(0);return n[e]=s,n}var ee,I,te,se,T,$,ue,de,pe,ge,k,Ue,De,Be,ze,$e,pt,Kt=(pt=class extends gt{constructor(e,s,n){super();b(this,k);b(this,ee);b(this,I);b(this,te);b(this,se);b(this,T);b(this,$);b(this,ue);b(this,de);b(this,pe);b(this,ge,[]);u(this,ee,e),u(this,se,n),u(this,te,[]),u(this,T,[]),u(this,I,[]),this.setQueries(s)}
1onSubscribe(){this.listeners.size===1&&a(this,T).forEach(e=>{e.subscribe(s=>{v(this,k,ze).call(this,e,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,a(this,T).forEach(e=>{e.destroy()})}setQueries(e,s){u(this,te,e),u(this,se,s),ce.batch(()=>{const n=a(this,T),i=v(this,k,Be).call(this,a(this,te));i.forEach(l=>l.observer.setOptions(l.defaultedQueryOptions));const r=i.map(l=>l.observer),o=r.map(l=>l.getCurrentResult()),d=n.length!==r.length,x=r.some((l,C)=>l!==n[C]),f=d||x,j=f?!0:o.some((l,C)=>{const h=a(this,I)[C];return!h||!Le(l,h)});!f&&!j||(f&&(u(this,ge,i),u(this,T,r)),u(this,I,o),this.hasListeners()&&(f&&(ot(n,r).forEach(l=>{l.destroy()}),ot(r,n).forEach(l=>{l.subscribe(C=>{v(this,k,ze).call(this,l,C)})})),v(this,k,$e).call(this)))})}getCurrentResult(){return a(this,I)}getQueries(){return a(this,T).map(e=>e.getCurrentQuery())}getObservers(){return a(this,T)}getOptimisticResult(e,s){const n=v(this,k,Be).call(this,e),i=n.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),r=n.map(o=>o.defaultedQueryOptions.queryHash);return[i,o=>v(this,k,De).call(this,o!=null?o:i,s,r),()=>v(this,k,Ue).call(this,i,n)]}},ee=new WeakMap,I=new WeakMap,te=new WeakMap,se=new WeakMap,T=new WeakMap,$=new WeakMap,ue=new WeakMap,de=new WeakMap,pe=new WeakMap,ge=new WeakMap,k=new WeakSet,Ue=function(e,s){return s.map((n,i)=>{const r=e[i];return n.defaultedQueryOptions.notifyOnChangeProps?r:n.observer.trackResult(r,o=>{s.forEach(d=>{d.observer.trackProp(o)})})})},De=function(e,s,n){if(s){const i=a(this,pe),r=n!==void 0&&i!==void 0&&(i.length!==n.length||n.some((o,d)=>o!==i[d]));return(!a(this,$)||a(this,I)!==a(this,de)||r||s!==a(this,ue))&&(u(this,ue,s),u(this,de,a(this,I)),n!==void 0&&u(this,pe,n),u(this,$,Mt(a(this,$),s(e)))),a(this,$)}return e},Be=function(e){const s=new Map;a(this,T).forEach(i=>{const r=i.options.queryHash;if(!r)return;const o=s.get(r);o?o.push(i):s.set(r,[i])});const n=[];return e.forEach(i=>{var x;const r=a(this,ee).defaultQueryOptions(i),o=(x=s.get(r.queryHash))==null?void 0:x.shift(),d=o!=null?o:new Ye(a(this,ee),r);n.push({defaultedQueryOptions:r,observer:d})}),n},ze=function(e,s){const n=a(this,T).indexOf(e);n!==-1&&(u(this,I,Gt(a(this,I),n,s)),v(this,k,$e).call(this))},$e=function(){var e;if(this.hasListeners()){const s=a(this,$),n=v(this,k,Ue).call(this,a(this,I),a(this,ge)),i=v(this,k,De).call(this,n,(e=a(this,se))==null?void 0:e.combine);s!==i&&ce.batch(()=>{this.listeners.forEach(r=>{r(a(this,I))})})}},pt),bt=R.createContext(!1),yt=()=>R.useContext(bt);bt.Provider;function qt(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Zt=R.createContext(qt()),xt=()=>R.useContext(Zt),Ct=(t,e,s)=>{const n=s!=null&&s.state.error&&typeof t.throwOnError=="function"?ft(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||n)&&(e.isReset()||(t.retryOnMount=!1))},Lt=t=>{R.useEffect(()=>{t.clearReset()},[t])},Et=({result:t,errorResetBoundary:e,throwOnError:s,query:n,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&n&&(i&&t.data===void 0||ft(s,[t.error,n])),jt=t=>{if(t.suspense){const s=i=>i==="static"?i:Math.max(i!=null?i:1e3,1e3),n=t.staleTime;t.staleTime=typeof n=="function"?(...i)=>s(n(...i)):s(n),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},Vt=(t,e)=>t.isLoading&&t.isFetching&&!e,We=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,Ge=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function Yt({queries:t,...e},s){const n=mt(),i=yt(),r=xt(),o=R.useMemo(()=>t.map(E=>{const m=n.defaultQueryOptions(E);return m._optimisticResults=i?"isRestoring":"optimistic",m}),[t,n,i]);o.forEach(E=>{jt(E);const m=n.getQueryCache().get(E.queryHash);Ct(E,r,m)}),Lt(r);const[d]=R.useState(()=>new Kt(n,o,e)),[x,f,j]=d.getOptimisticResult(o,e.combine),l=!i&&e.subscribed!==!1;R.useSyncExternalStore(R.useCallback(E=>l?d.subscribe(ce.batchCalls(E)):Ee,[d,l]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),R.useEffect(()=>{d.setQueries(o,e)},[o,e,d]);const h=x.some((E,m)=>We(o[m],E))?x.flatMap((E,m)=>{const w=o[m];if(w&&We(w,E)){const p=new Ye(n,w);return Ge(w,p,r)}return[]}):[];if(h.length>0)throw Promise.all(h);const N=x.find((E,m)=>{const w=o[m];return w&&Et({result:E,errorResetBoundary:r,throwOnError:w.throwOnError,query:n.getQueryCache().get(w.queryHash),suspense:w.suspense})});if(N!=null&&N.error)throw N.error;return f(j())}function Xt(t,e,s){var C,h,N,E;const n=yt(),i=xt(),r=mt(),o=r.defaultQueryOptions(t);(h=(C=r.getDefaultOptions().queries)==null?void 0:C._experimental_beforeQuery)==null||h.call(C,o);const d=r.getQueryCache().get(o.queryHash);o._optimisticResults=n?"isRestoring":"optimistic",jt(o),Ct(o,i,d),Lt(i);const x=!r.getQueryCache().get(o.queryHash),[f]=R.useState(()=>new e(r,o)),j=f.getOptimisticResult(o),l=!n&&t.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(m=>{const w=l?f.subscribe(ce.batchCalls(m)):Ee;return f.updateResult(),w},[f,l]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),R.useEffect(()=>{f.setOptions(o)},[o,f]),We(o,j))throw Ge(o,f,i);if(Et({result:j,errorResetBoundary:i,throwOnError:o.throwOnError,query:d,suspense:o.suspense}))throw j.error;if((E=(N=r.getDefaultOptions().queries)==null?void 0:N._experimental_afterQuery)==null||E.call(N,o,j),o.experimental_prefetchInRender&&!Oe.isServer()&&Vt(j,n)){const m=x?Ge(o,f,i):d==null?void 0:d.promise;m==null||m.catch(Ee).finally(()=>{f.updateResult()})}return o.notifyOnChangeProps?j:f.trackResult(j)}function wt(t,e){return Xt(t,Ye)}var ct=function(){return L.createElement("span",{className:"ds-c-pagination__overflow"},"â¦")};function we(t){var e=t.href,s=t.index,n=t.isActive,i=t.onPageChange;return L.createElement(L.Fragment,null,n?L.createElement("span",{className:"ds-c-button ds-c-button--ghost ds-c-pagination__current-page","aria-current":"page"},s):L.createElement(ne,{variation:"ghost",href:e,onClick:i,"aria-label":"page ".concat(s)},s))}var Jt=["ariaLabel","className","compact","currentPage","renderHref","onPageChange","headingLevel","isNavigationHidden","startLabelText","startAriaLabel","endLabelText","endAriaLabel","totalPages"];function Ke(){return Ke=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var s=arguments[e];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(t[n]=s[n])}return t},Ke.apply(this,arguments)}function es(t,e){if(t==null)return{};var s=ts(t,e),n,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)n=r[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}function ts(t,e){if(t==null)return{};var s={},n=Object.keys(t),i,r;for(r=0;r<n.length;r++)i=n[r],!(e.indexOf(i)>=0)&&(s[i]=t[i]);return s}var lt=1,qe=7;function ss(t,e){var s=[],n=t-lt,i=t+lt,r=qe-2;t<r&&(n=1,i=r),t===e-2&&(n-=1,i+=1),i===e-2&&(i+=1),i>=e&&(n=e-(r-1),i=e),e<=qe&&(n=1,i=e);for(var o=n;o<=i;o++)s.push(o);return s}function Nt(t){var e=t.ariaLabel,s=t.className,n=t.compact,i=t.currentPage,r=t.renderHref,o=t.onPageChange,d=t.headingLevel,x=t.isNavigationHidden,f=t.startLabelText,j=t.startAriaLabel,l=t.endLabelText,C=t.endAriaLabel,h=t.totalPages,N=es(t,Jt),E=Pt("ds-c-pagination",{"ds-c-pagination--compact":n},s),m=R.useCallback(function(D){return function(Q){return o(Q,D)}},[o]),w=[];if(!n){var p=ss(i,h);p[0]>=2&&(w.push(L.createElement(we,{href:r(1),key:"page-1",index:1,isActive:i===1,onPageChange:m(1)})),p[0]!==2&&w.push(L.createElement(ct,{key:"ellipses-1"}))),p.map(function(D){w.push(L.createElement(we,{href:r(D),key:"page-".concat(D),index:D,isActive:i===D,onPageChange:m(D)}))}),i<=h-3&&h>qe&&(i<h-3&&w.push(L.createElement(ct,{key:"ellipses-2"})),w.push(L.createElement(we,{href:r(h),key:"page-".concat(h),index:h,isActive:i===
1h,onPageChange:m(h)})))}var F=L.createElement(Se,{direction:"left",className:"ds-c-pagination__nav--image"}),ie=L.createElement(Se,{direction:"right",className:"ds-c-pagination__nav--image"}),fe="h".concat(d),me=L.createElement(fe,{id:"pagination-heading"},e!=null?e:W("pagination.ariaLabel")," -"," ",W("pagination.pageXOfY",{number:"".concat(i),total:"".concat(h)}));return L.createElement("nav",Ke({className:E,"aria-labelledby":"pagination-heading"},N),L.createElement("span",{"aria-live":"polite",role:"status",className:"ds-u-visibility--screen-reader"},me),L.createElement(ne,{variation:"ghost",href:r(i-1),onClick:m(i-1),"aria-label":j!=null?j:W("pagination.startAriaLabel"),className:"ds-c-pagination__nav",disabled:i===1,style:{visibility:i===1&&x?"hidden":"visible"},"aria-hidden":i===1?x:!1},L.createElement("span",{className:"ds-c-pagination__nav--img-container ds-c-pagination__nav--img-container-previous"},F),f!=null?f:W("pagination.startLabelText")),L.createElement("span",{className:"ds-c-pagination__page-count",dangerouslySetInnerHTML:{__html:W("pagination.pageXOfY",{number:"<strong>".concat(i,"</strong>"),total:"<strong>".concat(h,"</strong>")})}}),L.createElement("div",{className:"ds-c-pagination__pages"},w),L.createElement(ne,{variation:"ghost",href:r(i+1),onClick:m(i+1),"aria-label":C!=null?C:W("pagination.endAriaLabel"),className:"ds-c-pagination__nav",disabled:i===h,style:{visibility:i===h&&x?"hidden":"visible"},"aria-hidden":i===h?x:!1},l!=null?l:W("pagination.endLabelText"),L.createElement("span",{className:"ds-c-pagination__nav--img-container ds-c-pagination__nav--img-container-next"},ie)))}Nt.defaultProps={compact:!1,headingLevel:"2",isNavigationHidden:!1};function Ze(){return Ze=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var s=arguments[e];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(t[n]=s[n])}return t},Ze.apply(this,arguments)}var ns={className:"",title:"Information",viewBox:"0 0 18 18"};function is(t){var e="ds-c-icon--info-circle-outline ".concat(t.className||"");return L.createElement("span",{className:"icon-wrapper"},L.createElement(Tt,Ze({},ns,t,{className:e}),L.createElement("g",{fill:"currentColor",fillRule:"nonzero"},L.createElement("path",{d:"M9,0 C4.02978629,0 0,4.0312379 0,9 C0,13.9716653 4.02978629,18 9,18 C13.9702137,18 18,13.9716653 18,9 C18,4.0312379 13.9702137,0 9,0 Z M9,16.2580645 C4.98875806,16.2580645 1.74193548,13.0125847 1.74193548,9 C1.74193548,4.99010081 4.98890323,1.74193548 9,1.74193548 C13.009754,1.74193548 16.2580645,4.98886694 16.2580645,9 C16.2580645,13.0111694 13.0125847,16.2580645 9,16.2580645 Z M9,3.99193548 C9.84179032,3.99193548 10.5241935,4.67433871 10.5241935,5.51612903 C10.5241935,6.35791935 9.84179032,7.04032258 9,7.04032258 C8.15820968,7.04032258 7.47580645,6.35791935 7.47580645,5.51612903 C7.47580645,4.67433871 8.15820968,3.99193548 9,3.99193548 Z M11.0322581,13.2096774 C11.0322581,13.4501734 10.8372702,13.6451613 10.5967742,13.6451613 L7.40322581,13.6451613 C7.16272984,13.6451613 6.96774194,13.4501734 6.96774194,13.2096774 L6.96774194,12.3387097 C6.96774194,12.0982137 7.16272984,11.9032258 7.40322581,11.9032258 L7.83870968,11.9032258 L7.83870968,9.58064516 L7.40322581,9.58064516 C7.16272984,9.58064516 6.96774194,9.38565726 6.96774194,9.14516129 L6.96774194,8.27419355 C6.96774194,8.03369758 7.16272984,7.83870968 7.40322581,7.83870968 L9.72580645,7.83870968 C9.96630242,7.83870968 10.1612903,8.03369758 10.1612903,8.27419355 L10.1612903,11.9032258 L10.5967742,11.9032258 C10.8372702,11.9032258 11.0322581,12.0982137 11.0322581,12.3387097 L11.0322581,13.2096774 Z"}))))}const Rt=100,as=async()=>(await(await fetch("/account/api/proxy/relationship?my-position=user&page-start=0&page-size=".concat(Rt))).json()).relationships,rs=async()=>(await(await fetch("/account/api/proxy/invitation?my-position=recipient&page-start=0&page-size=".concat(Rt))).json()).invitations,os=()=>{const[t,e]=Yt({queries:[{queryKey:["proxy-relationships"],queryFn:as},{queryKey:["proxy-invitations"],queryFn:rs}]});return{relationships:t.data,invitations:e.data,isLoading:t.isLoading||e.isLoading,isSuccess:t.isSuccess&&e.isSuccess,isError:t.isError||e.isError}},cs="_card_d2fkj_1",ls="_name_d2fkj_5",hs="_settingsLink_d2fkj_12",Ne={card:cs,name:ls,settingsLink:hs}
1;function us({userName:t,onManageSettings:e}){return c.jsxs(Ve,{className:Ne.card,children:[c.jsx("h2",{className:Ne.name,children:t}),c.jsx("button",{type:"button",className:Ne.settingsLink,onClick:e,children:y("manage_your_account_settings")})]})}const ds="".replace(/\/$/,""),ps=new vt.Configuration({baseOptions:{withCredentials:!0}}),kt={bedapAccountApi:vt.BedapAccountApiFactory(ps,ds)},gs="listCspLinks";function fs(t){return wt({queryKey:[gs],queryFn:async()=>(await kt.bedapAccountApi.listCspLinks()).data,refetchOnWindowFocus:!1,staleTime:1e3*60*60,...t})}const ms="listEmails";function vs(t){return wt({queryKey:[ms],queryFn:async()=>(await kt.bedapAccountApi.listEmails()).data,refetchOnWindowFocus:!1,staleTime:1e3*60*60,...t})}const ht={LOGIN_GOV:"ldg",ID_ME:"idme"};function _s(){var f,j;const{data:t,isLoading:e,isError:s}=fs(),{data:n,isLoading:i,isError:r}=vs(),o=t==null?void 0:t.filter(l=>Object.hasOwn(ht,l.cspCode)).slice().sort((l,C)=>new Date(C.lastLoginAt).getTime()-new Date(l.lastLoginAt).getTime())[0],d=o?ht[o.cspCode]:void 0,x=(j=(f=n==null?void 0:n.filter(l=>l.archivedAt===null).slice().sort((l,C)=>new Date(C.updatedAt).getTime()-new Date(l.updatedAt).getTime())[0])==null?void 0:f.emailAddress)!=null?j:"";return{csp:d,email:x,isLoading:e||i,isError:s||r}}const bs="_dialog_1pzr3_1",ys="_section_1pzr3_5",xs="_sectionHeading_1pzr3_15",Cs="_loginCard_1pzr3_22",Ls="_providerLogo_1pzr3_33",Es="_loginCardText_1pzr3_40",js="_loginProvider_1pzr3_49",ws="_actionsWrapper_1pzr3_53",Ns="_closeButton_1pzr3_58",Rs="_externalLinkIcon_1pzr3_68",P={dialog:bs,section:ys,sectionHeading:xs,loginCard:Cs,providerLogo:Ls,loginCardText:Es,loginProvider:js,actionsWrapper:ws,closeButton:Ns,externalLinkIcon:Rs};function ks({onClose:t}){const e={ldg:{name:y("login_dot_gov"),logo:Ft,description:y("signed_in_with_login_gov"),settingsUrl:"https://www.login.gov/help/manage-your-account/overview/"},idme:{name:y("id_me"),logo:Qt,description:y("signed_in_with_idme"),settingsUrl:"https://account.id.me"}},{csp:s,email:n,isLoading:i,isError:r}=_s(),o=s&&Object.hasOwn(e,s)?e[s]:null;return c.jsxs(At,{heading:y("my_settings"),onExit:t,size:"wide",className:P.dialog,actions:c.jsx("div",{className:P.actionsWrapper,children:c.jsx(ne,{variation:"solid",className:P.closeButton,onClick:t,children:y("close")})}),children:[c.jsxs("div",{className:P.section,children:[c.jsx("h2",{className:P.sectionHeading,children:y("account_settings_heading")}),c.jsx("p",{className:"ds-u-margin-top--1",children:y("account_settings_description")}),i&&c.jsx(Ht,{"aria-valuetext":y("loading")}),r&&c.jsx("p",{role:"alert",children:y("error_loading_account_settings")}),!i&&!r&&o&&c.jsxs("div",{className:P.loginCard,children:[c.jsx("img",{src:o.logo,alt:o.name,className:P.providerLogo}),c.jsxs("div",{className:P.loginCardText,children:[c.jsx("span",{className:P.loginProvider,children:o.name}),c.jsx("span",{children:o.description})]}),c.jsx("a",{href:o.settingsUrl,target:"_blank",rel:"noopener noreferrer","aria-label":y("manage_provider_account_settings",{provider:o.name}),className:P.externalLinkIcon,children:c.jsx(Ut,{"aria-hidden":!0})})]})]}),c.jsxs("div",{className:P.section,children:[c.jsx("h2",{className:P.sectionHeading,children:y("communication_settings_heading")}),c.jsx("p",{className:"ds-u-margin-top--1",children:n})]})]})}const Os=({title:t,...e})=>c.jsx("svg",{width:"21px",height:"21px",viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",role:t?"img":void 0,"aria-hidden":t?void 0:!0,"aria-label":t,focusable:!1,...e,children:c.jsx("g",{fill:"currentColor",fillRule:"nonzero",children:c.jsx("path",{d:"M505.04 442.66l-99.71-99.69c-4.5-4.5-10.6-7-17-7h-16.3c27.6-35.3 44-79.69 44-127.99C416.03 93.09 322.92 0 208.02 0S0 93.09 0 207.98s93.11 207.98 208.02 207.98c48.3 0 92.71-16.4 128.01-44v16.3c0 6.4 2.5 12.5 7 17l99.71 99.69c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.59.1-33.99zm-297.02-90.7c-79.54 0-144-64.34-144-143.98 0-79.53 64.35-143.98 144-143.98 79.54 0 144 64.34 144 143.98 0 79.53-64.35 143.98-144 143.98zm27.11-152"})})}),Ss="_skeleton_1ptfo_11",Is={skeleton:Ss};function ut({className:t,width:e,height:s}
1){const n=[Is.skeleton,t].filter(Boolean).join(" ");return c.jsx("span",{"aria-hidden":!0,className:n,style:{width:e,height:s}})}const Ms="_card_1wiyb_1",Ps="_row_1wiyb_5",Ts="_name_1wiyb_13",As="_button_1wiyb_19",xe={card:Ms,row:Ps,name:Ts,button:As};function Qs(){return c.jsx(Ve,{className:xe.card,children:c.jsxs("div",{className:xe.row,children:[c.jsx(ut,{className:xe.name}),c.jsx(ut,{className:xe.button})]})})}const Fs="_card_j06er_1",Hs="_header_j06er_6",Us="_name_j06er_30",Ds="_removeLink_j06er_37",Ce={card:Fs,header:Hs,name:Us,removeLink:Ds};function Bs({name:t,onSelect:e,onRemove:s,compact:n=!1}){return c.jsxs(Ve,{className:Ce.card,children:[c.jsxs("div",{className:Ce.header,children:[c.jsx("h2",{className:Ce.name,children:t}),c.jsx(ne,{onClick:e,children:y("select_account_button")})]}),!n&&s&&c.jsx("button",{type:"button",className:Ce.removeLink,onClick:s,children:y("remove_access_to_this_account")})]})}const zs="_body_bk1yl_1",$s="_reviewLink_bk1yl_5",Ws="_linkIcon_bk1yl_23",Re={body:zs,reviewLink:$s,linkIcon:Ws};function Gs({inviterName:t,onReview:e}){return c.jsxs(Dt,{hideIcon:!0,heading:t,children:[c.jsx("p",{className:Re.body,children:y("pending_invite_body")}),c.jsxs("button",{type:"button",className:Re.reviewLink,onClick:e,children:[y("review_the_request"),c.jsx(Se,{direction:"right",className:Re.linkIcon})]})]})}const Ks="_right_7j3l0_1",qs="_toolbar_7j3l0_7",Zs="_searchGroup_7j3l0_15",Vs="_searchInputWrapper_7j3l0_20",Ys="_searchButton_7j3l0_34",Xs="_removeAccessLink_7j3l0_56",Js="_cardList_7j3l0_72",en="_pagination_7j3l0_78",H={right:Ks,toolbar:qs,searchGroup:Zs,searchInputWrapper:Vs,searchButton:Ys,removeAccessLink:Xs,cardList:Js,pagination:en},tn=10,ke=10,sn=3,nn=t=>"".concat(t.beneFirstName," ").concat(t.beneLastName).trim(),an=t=>"".concat(t.beneUserFirstName," ").concat(t.beneUserLastName).trim();function rn({relationships:t,invitations:e,isLoading:s=!1,showListControls:n=!1}){const[i,r]=R.useState(""),[o,d]=R.useState(1),x=t.filter(p=>p.status==="active"),f=e.filter(p=>p.status==="pending"),j=f.length+x.length,l=n&&j>=tn,C=[...f.map(p=>({kind:"pending",invitation:p,name:an(p),key:p.id})),...x.map(p=>({kind:"linked",relationship:p,name:nn(p),key:p.id}))],h=i?C.filter(p=>p.name.toLowerCase().includes(i.toLowerCase())):C,N=Math.max(1,Math.ceil(h.length/ke)),E=Math.min(o,N),m=(E-1)*ke,w=l?h.slice(m,m+ke):h;return c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx("h2",{className:"ds-text-heading--xl",children:y("trusted_advisor_accounts_heading")}),c.jsx("p",{children:y("trusted_advisor_accounts_description")})]}),c.jsx("div",{className:H.right,children:s?c.jsx("div",{className:H.cardList,role:"status","aria-live":"polite","aria-busy":"true","aria-label":y("trusted_advisor_accounts_heading"),children:Array.from({length:sn}).map((p,F)=>c.jsx(Qs,{},F))}):c.jsxs(c.Fragment,{children:[l&&c.jsxs("div",{className:H.toolbar,children:[c.jsxs("div",{className:H.searchGroup,children:[c.jsx("div",{className:H.searchInputWrapper,children:c.jsx(Bt,{label:y("search_for_a_name"),labelClassName:"ds-u-visibility--screen-reader",name:"trusted-advisor-search",value:i,onChange:p=>{r(p.target.value),d(1)}})}),c.jsx("button",{type:"button","aria-label":"Search",className:H.searchButton,onClick:()=>{},children:c.jsx(Os,{})})]}),c.jsx(ne,{variation:"ghost",onClick:()=>{r(""),d(1)},disabled:!i,children:y("clear_search")}),c.jsx("button",{type:"button",className:H.removeAccessLink,onClick:()=>{},children:y("select_to_remove_access")})]}),c.jsx("div",{className:H.cardList,children:w.map(p=>p.kind==="pending"?c.jsx(Gs,{inviterName:p.name,onReview:()=>{}},p.key):c.jsx(Bs,{name:p.name,compact:l,onSelect:()=>{},onRemove:l?void 0:()=>{}},p.key))}),l&&N>1&&c.jsx("div",{className:H.pagination,children:c.jsx(Nt,{currentPage:E,totalPages:N,onPageChange:(p,F)=>d(F),renderHref:p=>"?page=".concat(p)})})]})})]})}const on="_page_hu6k5_1",cn="_pageHeader_hu6k5_5",ln="_learnMoreLink_hu6k5_13",hn="_learnMoreIcon_hu6k5_30",un="_cardList_hu6k5_44",dn="_layout_hu6k5_50",Z={page:on,pageHeader:cn,learnMoreLink:ln,learnMoreIcon:hn,cardList:un,layout:dn};function fn(){zt(y("select_an_account"));const{relationships:t,invitations:e,isLoading:s}
1=os(),[n,i]=R.useState(!1);return c.jsxs("div",{className:"".concat(Z.page," ds-l-container ds-u-sm-padding-y--1 ds-u-md-padding-y--2 ds-u-lg-padding-y--3 ds-u-xl-padding-y--4"),children:[c.jsxs("div",{className:Z.pageHeader,children:[c.jsx("h1",{className:"ds-text-heading--2xl",children:y("select_an_account")}),c.jsxs("button",{type:"button",className:Z.learnMoreLink,onClick:()=>{},children:[y("learn_more_about_shared_access"),c.jsx(is,{className:Z.learnMoreIcon})]})]}),c.jsxs("div",{className:Z.layout,children:[c.jsx("div",{children:c.jsx("h2",{className:"ds-text-heading--xl",children:y("your_account_heading")})}),c.jsx("div",{className:Z.cardList,children:c.jsx(us,{userName:"[Your name]",onManageSettings:()=>i(!0)})}),c.jsx(rn,{relationships:t!=null?t:[],invitations:e!=null?e:[],isLoading:s})]}),n&&c.jsx(ks,{onClose:()=>i(!1)})]})}export{fn as default};
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.