1import{b as k,a as i,F as V}from"./vendor_emotion-D-Et4Ydi.js";import{i as Y,r as X}from"./vendor_react-DEPwpgj0.js";import{c as we,a as xe,d as de,R as te,b as fe}from"./vendor_react_router-PxJC74mx.js";import{h as Ee,L as Te,G as m,i as Pe,W as he,j as ve,k as Le,C as Ie,l as Ae,S as me,m as De,n as $e,o as We,B as He,A as O,p as Ge,q as ie,r as Me,s as le,t as z,v as Re,w as se,x as Be,y as Fe,z as ge,E as Ne,F as pe,H as Ue,J as je,e as qe}from"./index-Cd9XCBgo.js";import{m as ee,n as Qe,u as Ke}from"./bumastemra_libraries-C-I9k3a_.js";import"./vendor-CyA33Ik7.js";import{k as ze,C as _e}from"./bumastemra_ui-DpJjJV9L.js";import"./bumastemra_features-COU3yig4.js";import"./vendor_forms-BTDdo2HZ.js";import"./vendor_highcharts-CK0wRbF8.js";import{K as Oe}from"./vendor_mui_icons-eKQcBD5w.js";import{W as Ve}from"./WorksPublisherIPIPage-D19QWg4V.js";import"./vendor_babel-DruSmD6m.js";import"./vendor_mui-FF9-AymL.js";import"./vendor_popperjs-Cm1IS1EA.js";import"./vendor_mui_datepickers-DPqk68SP.js";import"./vendor_tanstack-BSd99h0P.js";import"./vendor_rxjs-DMxDNQbE.js";import"./vendor_sentry-CtW5_YMr.js";import"./vendor_sentry_internal-Kw-WJLqs.js";import"./vendor_apollo-DNYS-RlA.js";import"./vendor_wry-m8cYauQw.js";import"./vendor_libphonenumber-Vc72y4fG.js";import"./vendor_validation-DM_spPhj.js";import"./vendor_fusionauth-C2UYDI7F.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"57334"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="afdc4b1e-3fdf-4cf6-90eb-b62d70a1774f",e._sentryDebugIdIdentifier="sentry-dbid-afdc4b1e-3fdf-4cf6-90eb-b62d70a1774f")}catch(c){}})();const Xe=25,be=3,Ye="/public/catalog",Je=()=>{var ne,oe,ae,ce,ue;const e=Y.c(60),t=ee.useT(),{isMedium:c,isLarge:d}=ze(),[s,f]=X.useState(""),[g,v]=X.useState(""),[r,B]=X.useState(1),[p,a]=Ee(),{data:l,called:n,loading:o,error:b}=a;let _;e[0]!==g||e[1]!==s||e[2]!==p?(_=S=>{const Z=s.trim();Z.length<be||(B(S),p({variables:{query:Z,authorNames:Qe.stringToArray(g,",",!0),page:S,limit:Xe}}))},e[0]=g,e[1]=s,e[2]=p,e[3]=_):_=e[3];const C=_;let L;e[4]!==C?(L=S=>{S.key==="Enter"&&C(1)},e[4]=C,e[5]=L):L=e[5];const x=L,R=(ae=(oe=(ne=b==null?void 0:b.graphQLErrors)==null?void 0:ne[0])==null?void 0:oe.extensions)==null?void 0:ae.code;let I;e[6]!==b||e[7]!==R||e[8]!==t?(I=b?R==="PUBLIC_CATALOG_BUDGET_EXCEEDED"||b.message.includes("ThrottlerException")?t("message.throttler-error"):t("message.generic-error"):"",e[6]=b,e[7]=R,e[8]=t,e[9]=I):I=e[9];const w=I;let A;e[10]!==(l==null?void 0:l.publicCatalogSearch.entities)?(A=(ce=l==null?void 0:l.publicCatalogSearch.entities)!=null?ce:[],e[10]=l==null?void 0:l.publicCatalogSearch.entities,e[11]=A):A=e[11];const D=A,$=(ue=l==null?void 0:l.publicCatalogSearch.pagination.pageCount)!=null?ue:1;let E;e[12]!==t?(E=t("works.overview.search-title"),e[12]=t,e[13]=E):E=e[13];let T;e[14]!==E?(T=i(m,{item:!0,xs:12,children:i(De,{$noMargin:!0,children:E})}),e[14]=E,e[15]=T):T=e[15];let W,H;e[16]===Symbol.for("react.memo_cache_sentinel")?(W=S=>f(S.target.value),H=()=>f(""),e[16]=W,e[17]=H):(W=e[16],H=e[17]);let G;e[18]!==x||e[19]!==s?(G=i(m,{item:!0,xs:12,md:6,children:i($e,{name:"query",inputValue:s,defaultValue:s,onChange:W,onClear:H,onKeyDown:x})}),e[18]=x,e[19]=s,e[20]=G):G=e[20];let F,N;e[21]===Symbol.for("react.memo_cache_sentinel")?(F=S=>v(S.target.value),N=()=>v(""),e[21]=F,e[22]=N):(F=e[21],N=e[22]);let U;e[23]!==s?(U=s.trim(),e[23]=s,e[24]=U):U=e[24];const j=U.length<be;let u;e[25]!==x||e[26]!==j?(u=i(m,{item:!0,xs:12,md:6,children:i(We,{defaultValue:"",onChange:F,onClear:N,onKeyDown:x,disabled:j})}),e[25]=x,e[26]=j,e[27]=u):u=e[27];let h;e[28]!==u||e[29]!==T||e[30]!==G?(h=k(m,{container:!0,spacing:2,children:[T,G,u]}),e[28]=u,e[29]=T,e[30]=G,e[31]=h):h=e[31];let y;e[32]!==C?(y=()=>C(1),e[32]=C,e[33]=y):y=e[33];let P;e[34]!==t?(P=t("work.create.buttons.search"),e[34]=t,e[35]=P):P=e[35];let M;e[36]!==o||e[37]!==y||e[38]!==P?(M=i(m,{container:!0,spacing:2,paddingTop:2,justifyContent:"flex-start",flexDirection:"row-reverse",children:i(m,{item:!0,xs:12,md:"auto",children:i(He,{fullWidth:!0,variant:"contained",color:"primary",onClick:y,disabled:o,children:P})})}),e[36]=o,e[37]=y,e[38]=P,e[39]=M):M=e[39];let q;e[40]!==h||e[41]!==M?(q=k(me,{children:[h,M]}),e[40]=h,e[41]=M,e[42]=q):q=e[42];let Q;e[43]!==w?(Q=w&&i(O,{type:"error",children:w}),e[43]=w,e[44]=Q):Q=e[44];let K;e[45]!==n||e[46]!==D||e[47]!==w||e[48]!==d||e[49]!==c||e[50]!==o||e[51]!==r||e[52]!==$||e[53]!==C||e[54]!==t?(K=!w&&n&&k(me,{children:[k(Te,{children:[i(Pe,{children:k(m,{c
1ontainer:!0,alignItems:"center",children:[c&&i(m,{item:!0,xs:2,children:t("work-detail.header.workId")}),i(m,{item:!0,xs:!0,children:t("works.columns.title")}),d&&i(m,{item:!0,xs:5,children:t("works.columns.shareHolders")}),i(m,{item:!0,xs:1})]})}),!o&&D.length===0&&i(he,{$empty:!0,children:t("works.overview.no-items")}),D.map(S=>i(he,{children:i("div",{style:{width:"100%"},children:i(ve,{to:"".concat(Ye,"/").concat(S.id),children:k(m,{container:!0,alignItems:"center",children:[c&&i(m,{item:!0,xs:2,children:S.id}),i(m,{item:!0,xs:!0,children:i(Le,{title:S.title,bold:!0})}),d&&i(m,{item:!0,xs:5,pr:1,children:i(Ie,{title:S.shareholders.join(", ")})}),i(m,{container:!0,item:!0,xs:1,justifyContent:"flex-end",children:i(Oe,{})})]})})})},S.id))]}),$>1&&i(Ae,{count:$,page:r,onChange:(S,Z)=>C(Z)})]}),e[45]=n,e[46]=D,e[47]=w,e[48]=d,e[49]=c,e[50]=o,e[51]=r,e[52]=$,e[53]=C,e[54]=t,e[55]=K):K=e[55];let J;return e[56]!==q||e[57]!==Q||e[58]!==K?(J=k(V,{children:[q,Q,K]}),e[56]=q,e[57]=Q,e[58]=K,e[59]=J):J=e[59],J},ye="/public/catalog",Ce=_e("div",{target:"ehrqk1x1"})("color:",({theme:e})=>e.colors.stormGrey,";font-size:0.875em;margin-bottom:5px;"),ke=_e("div",{target:"ehrqk1x0"})("color:",({theme:e})=>e.colors.black,";font-family:",({theme:e})=>e.fonts.bold,";font-weight:600;font-size:1rem;"),Ze=()=>{var F,N,U,j;const e=Y.c(69),t=ee.useT(),{id:c}=we(),d=c===void 0?"":c;let s;e[0]!==d?(s={variables:{workId:d}},e[0]=d,e[1]=s):s=e[1];const{data:f,loading:g,error:v}=Ge(s);if(g){let u;return e[2]===Symbol.for("react.memo_cache_sentinel")?(u=i(le,{}),e[2]=u):u=e[2],u}if(v){const u=(U=(N=(F=v.graphQLErrors)==null?void 0:F[0])==null?void 0:N.extensions)==null?void 0:U.code;let h;e[3]!==u||e[4]!==t?(h=t(u==="PUBLIC_CATALOG_BUDGET_EXCEEDED"?"message.throttler-error":"message.generic-error"),e[3]=u,e[4]=t,e[5]=h):h=e[5];let y;return e[6]!==h?(y=i(z,{children:i(O,{type:"error",children:h})}),e[6]=h,e[7]=y):y=e[7],y}const r=f==null?void 0:f.publicCatalogWork;if(!r){let u;e[8]!==t?(u=t("button.backtooverview"),e[8]=t,e[9]=u):u=e[9];let h;e[10]!==u?(h=i(se,{children:i(z,{children:i(Re,{to:ye,children:u})})}),e[10]=u,e[11]=h):h=e[11];let y;e[12]!==t?(y=t("general.work.not-found"),e[12]=t,e[13]=y):y=e[13];let P;e[14]!==y?(P=i(z,{children:i(m,{children:y})}),e[14]=y,e[15]=P):P=e[15];let M;return e[16]!==h||e[17]!==P?(M=k(V,{children:[h,P]}),e[16]=h,e[17]=P,e[18]=M):M=e[18],M}const B="works.work.ice_status.".concat((j=r.iceStatus)!=null?j:0);let p;e[19]!==t||e[20]!==B?(p=t(B),e[19]=t,e[20]=B,e[21]=p):p=e[21];const a=String(p),l=r.title;let n;e[22]!==t?(n=t("button.backtooverview"),e[22]=t,e[23]=n):n=e[23];let o;e[24]!==t?(o=t("work-detail.header.workId"),e[24]=t,e[25]=o):o=e[25];let b;e[26]!==o?(b=i(Ce,{children:o}),e[26]=o,e[27]=b):b=e[27];let _;e[28]!==r.id?(_=i(ke,{children:r.id}),e[28]=r.id,e[29]=_):_=e[29];let C;e[30]!==b||e[31]!==_?(C=k(m,{item:!0,xs:6,md:8,children:[b,_]}),e[30]=b,e[31]=_,e[32]=C):C=e[32];let L;e[33]!==t?(L=t("work-detail.header.status"),e[33]=t,e[34]=L):L=e[34];let x;e[35]!==L?(x=i(Ce,{children:L}),e[35]=L,e[36]=x):x=e[36];let R;e[37]!==a?(R=i(ke,{children:a}),e[37]=a,e[38]=R):R=e[38];let I;e[39]!==x||e[40]!==R?(I=k(m,{item:!0,xs:6,md:4,children:[x,R]}),e[39]=x,e[40]=R,e[41]=I):I=e[41];let w;e[42]!==I||e[43]!==C?(w=i(z,{children:k(m,{container:!0,marginY:3,children:[C,I]})}),e[42]=I,e[43]=C,e[44]=w):w=e[44];let A;e[45]!==w||e[46]!==n||e[47]!==r.title?(A=i(se,{title:l,backlink:n,backUrl:ye,children:w}),e[45]=w,e[46]=n,e[47]=r.title,e[48]=A):A=e[48];let D;e[49]!==t||e[50]!==r.iceStatus||e[51]!==r.isConflicted?(D=r.isConflicted?i(O,{type:"info",icon:i(ie,{}),children:i("span",{dangerouslySetInnerHTML:{__html:t("work-detail.sharesplit.status.conflicted")}})}):k(V,{children:[r.iceStatus===1&&i(O,{type:"info",icon:i(ie,{}),children:i("span",{dangerouslySetInnerHTML:{__html:t("work-detail.sharesplit.status.final")}})}),r.iceStatus===2&&i(O,{type:"info",icon:i(ie,{}),children:i("span",{dangerouslySetInnerHTML:{__html:t("work-detail.sharesplit.status.temporary")}})})]}),e[49]=t,e[50]=r.iceStatus,e[51]=r.isConflicted,e[52]=D):D=e[52];let $;e[53]!==r.iceStatus?($={status:r.iceStatus},e[53]=r.iceStatus,e[54]=$):$=e[54];let E;e[55]!==$||e[56]!==r.shares?(E=i(Me,{data:{work:$,shares:r.shares},loading:!1}),e[55]=$,e[56]=r.shares,e[57]=E):E=e[57];let T;e[58]!==r.alternativeTitles?(T=r.alternativeTitles.map(et),e[58]=r.alternativeTitles,e[59]=T):T=e[59];let W;e[60]!==T?(W=i(Be,{alternativeTitles:T}),e[60]=T,e[61]=W):W=e[61];let H;e[62]!==D||e[63]!==E||e[64]!==W?(H=k(z,{children:[D,E,W]}),e[62]=D,e[63]=E,e[64]=W,e[65]=H):H=e[65];let G;return e[66]!==A||e[67]!==H?(G=k(V,{children:[A,H]}),e[66]=A,e[67]=H,e[68]=G):G=e[68],G};function et(e){return{title:e}}const tt=()=>{const e=Y.c(10),t=ee.useT();let c;e[0]!==t?(c=t("works.catalog.title"),e[0]=t,e[1]=c):c=e[1];let d;e[2]!==t?(d=t("works.catalog.description"),e[2]=t,e[3]=d):d=e[3];let s;e[4]!==c||e[5]!==d?(s=i(se,{title:c,description:d}),e[4]=c,e[5]=d,e[6]=s):s=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=i(z,{children:i(Je,{})}),e[7]=f):f=e[7];let g;return e[8]!==s?(g=k(V,{children:[s,f]}),e[8]=s,e[9]=g):g=e[9],g},it=e=>{const t=Y.c(11),{children:c}=e,d=ee.useT(),[s]=Fe();let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=ge(),t[0]=f):f=t[0];const[g,v]=X.useState(!!f),[r,B]=X.useState(!1);let p,a;if(t[1]!==s?(p=()=>{let n=!1;return pe(async()=>{const{data:b}=await s(),_=b==null?void 0:b.publicCatalogSession.token;if(!_)throw new Error("No public catalogue session received");return _}),ge()||Ne().then(()=>!n&&v(!0)).catch(()=>!n&&B(!0)),()=>{n=!0,pe(null)}},a=[s],t[1]=s,t[2]=p,t[3]=a):(p=t[2],a=t[3]),X.useEffect(p,a),r){let n;t[4]!==d?(n=d("message.generic-error"),t[4]=d,t[5]=n):n=t[5];let o;return t[6]!==n?(o=i(O,{type:"error",children:n}),t[6]=n,t[7]=o):o=t[7],o}if(!g){let n;return t[8]===Symbol.for("react.memo_cache_sentinel")?(n=i(le,{}),t[8]=n):n=t[8],n}let l;return t[9]!==c?(l=i(V,{children:c}),t[9]=c,t[10]=l):l=t[10],l},re="/public",Se="/catalog",vt=()=>{const e=Y.c(14),{isLoggedIn:t}=Ue(),{user:c,state:d}=je(),s=xe();if(t===null||t&&d==="loading"){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=i(le,{}),e[0]=a):a=e[0],a}let f;e[1]!==s.pathname?(f=s.pathname.startsWith(re)?s.pathname.slice(re.length):s.pathname,e[1]=s.pathname,e[2]=f):f=e[2];const g=f;let v;e[3]!==g?(v=g===Se||g.startsWith("".concat(Se,"/")),e[3]=g,e[4]=v):v=e[4];const r=v,B=!!c&&Ke.userMustBeMember(c);if(r&&t&&B){const a="/works".concat(g);let l;return e[5]!==a?(l=i(de,{to:a,replace:!0}),e[5]=a,e[6]=l):l=e[6],l}if(!r&&!t){const a="?returnPath=".concat(re).concat(g);let l;e[7]!==a?(l={pathname:"/login/check",search:a},e[7]=a,e[8]=l):l=e[8];let n;e[9]===Symbol.for("react.memo_cache_sentinel")?(n={status:401},e[9]=n):n=e[9];let o;return e[10]!==l?(o=i(de,{to:l,state:n}),e[10]=l,e[11]=o):o=e[11],o}let p;return e[12]!==r?(p=i(qe,{children:r?i(it,{children:k(fe,{children:[i(te,{path:"/catalog/:id",element:i(Ze,{})}),i(te,{path:"/catalog",element:i(tt,{})})]})}):i(fe,{children:i(te,{path:"/ipi-search",element:i(Ve,{})})})}),e[12]=r,e[13]=p):p=e[13],p};export{vt as PublicRoutes};
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.