PageSourceSearch

https://cabinet.reporting.academy/student/assets/LibraryPage-DDBt-TL_.js

js reporting.academy collected 2026-10-05 09:39:03 UTC 57,652 bytes, 1 lines download raw bytes

1import{a9 as R,aa as Ae,ag as O,r as o,j as e,ak as Ie,S as r,e as j,O as Ee,ai as Oe,bS as Me}from"./index-CBLw_g9N.js";function F(s){return s===null||typeof s=="string"}function se(s){return Array.isArray(s)&&s.every(t=>typeof t=="string")}function $e(s){return Array.isArray(s)&&s.every(t=>typeof t=="number"&&Number.isFinite(t))}function Pe(s){return R(s)?typeof s.entry_id=="number"&&typeof s.company=="string"&&typeof s.country=="string"&&F(s.gri_sector_number)&&F(s.gri_sector_label)&&typeof s.report_year=="number"&&typeof s.report_title=="string"&&F(s.report_type)&&F(s.language)&&se(s.standards_detected)&&F(s.assurance_provider)&&(s.pdf_pages===null||typeof s.pdf_pages=="number")&&(s.hosting_mode==="hosted"||s.hosting_mode==="link_only")&&["verified","needs_manual_review","non_english_only","excluded"].includes(typeof s.ingest_status=="string"?s.ingest_status:"")&&["featured","standard","needs_review","hidden"].includes(typeof s.curation_status=="string"?s.curation_status:"")&&F(s.editorial_note)&&F(s.open_url)&&F(s.thumbnail_url)&&F(s.download_url)&&F(s.official_url):!1}function Ge(s){return R(s)&&typeof s.number=="string"&&F(s.label)}function Le(s){throw new Ae(s,"the response does not match the reports library contract")}function Be(s){return!R(s)||!Array.isArray(s.reports)||!s.reports.every(Pe)||typeof s.total!="number"||typeof s.limit!="number"||typeof s.offset!="number"?Le("Reports Library catalogue"):{reports:s.reports,total:s.total,limit:s.limit,offset:s.offset}}function We(s){return!R(s)||!se(s.countries)||!Array.isArray(s.sectors)||!s.sectors.every(Ge)||!se(s.standards)||!$e(s.years)?Le("Reports Library filters"):{countries:s.countries,sectors:s.sectors,standards:s.standards,years:s.years}}async function Ue(s,t=60,n=0){const a={limit:t,offset:n};return s.q&&(a.q=s.q),s.countries.length&&(a.country=s.countries.join(",")),s.griSectors.length&&(a.gri_sector=s.griSectors.join(",")),s.standards.length&&(a.standard=s.standards.join(","),a.standard_match=s.standardMatch),s.years.length&&(a.year=s.years.join(",")),await O("GET","/api/v2/student/library/reports",Be,{query:a})??{reports:[],total:0,limit:t,offset:n}}async function He(){return await O("GET","/api/v2/student/library/filters",We)??{countries:[],sectors:[],standards:[],years:[]}}function $({placeholder:s,options:t,selected:n,onChange:a}){var E;const[l,h]=o.useState(!1),[d,N]=o.useState(null),b=o.useRef(null),f=o.useRef(null),p=o.useCallback(()=>{var m;const c=(m=b.current)==null?void 0:m.getBoundingClientRect();c&&N({top:c.bottom+6,left:c.left,width:c.width})},[]),y=o.useCallback(c=>{var _,i;const m=c.target;return m instanceof Node?!!((_=b.current)!=null&&_.contains(m)||(i=f.current)!=null&&i.contains(m)):!1},[]);o.useEffect(()=>{if(!l)return;p();const c=i=>{var S,T;const v=i.target;(S=b.current)!=null&&S.contains(v)||(T=f.current)!=null&&T.contains(v)||h(!1)},m=i=>{i.key==="Escape"&&h(!1)},_=i=>{y(i)||h(!1)};return document.addEventListener("mousedown",c),document.addEventListener("keydown",m),window.addEventListener("scroll",_,!0),window.addEventListener("resize",_),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",m),window.removeEventListener("scroll",_,!0),window.removeEventListener("resize",_)}},[y,l,p]);const k=c=>{const m=c.currentTarget,_=m.scrollHeight-m.clientHeight;if(c.stopPropagation(),_<=0){c.preventDefault();return}const i=m.scrollTop+c.deltaY,v=i<0,S=i>_;(v||S)&&(c.preventDefault(),m.scrollTop=Math.max(0,Math.min(_,i)))},g=c=>{a(n.includes(c)?n.filter(m=>m!==c):[...n,c]),h(!1)},w=n.length,x=w===0?s:w===1?((E=t.find(c=>c.value===n[0]))==null?void 0:E.label)??s:s;return e.jsxs("div",{className:"lib-ms",children:[e.jsxs("button",{ref:b,type:"button",className:`lib-ms-btn${w?" has-sel":""}`,"aria-haspopup":"listbox","aria-expanded":l,onClick:()=>h(c=>!c),children:[e.jsx("span",{className:"lib-ms-label",children:x}),w>1&&e.jsx("span",{className:"lib-ms-count",children:w})]}),l&&d&&Ie.createPortal(e.jsxs("div",{ref:f,className:"lib-ms-pop",style:{position:"fixed",top:d.top,left:d.left,minWidth:d.width},children:[w>0&&e.jsx("button",{type:"button",className:"lib-ms-clear",onClick:()=>a([]),children:e.jsx(r,{source:"Clear selection"})}),e.jsx("div",{className:"lib-ms-list",role:"listbox","aria-label":`${s} options`,"aria-multiselectable":"true",onWheel:k,children:t.map(c=>{const m=n.includes(c.value);return e.jsxs("button",{type:"button",role:"option","aria-selected":m,className:`lib-ms-opt${m?" on":""}`,onClick:()=>
1g(c.value),children:[e.jsx("span",{className:"lib-ms-check","aria-hidden":"true",children:m?"✓":""}),e.jsx("span",{className:"lib-ms-opt-label",children:c.label})]},c.value)})})]}),document.body)]})}const ze=60,ve={q:"",countries:[],griSectors:[],standards:[],standardMatch:"any",years:[]};let U=null;function Qe(){return U||(U=He().finally(()=>{U=null})),U}function Je(){const s={domain:"student_cabinet",location:"report_catalogue",reason:"request_failed",intentional:!0,intent_ref:"§13"};console.warn("fallback.student_cabinet.report_catalogue_unavailable",s),console.warn("fallback_triggered_total",s)}function Ye({items:s}){const t=s.slice(0,6),n=s.length-t.length;return s.length===0?null:e.jsxs("div",{className:"lib-chips",children:[t.map(a=>e.jsx("span",{className:"lib-chip",children:a},a)),n>0&&e.jsxs("span",{className:"lib-chip lib-chip-more",children:["+",n]})]})}function Ve({report:s}){const t=s.curation_status==="featured",n=s.ingest_status==="needs_manual_review";return e.jsxs("article",{className:`lib-card${t?" featured":""}`,children:[e.jsxs("a",{className:`lib-card-cover${s.thumbnail_url?"":" no-cover"}`,href:s.open_url??s.official_url??"#",target:"_blank",rel:"noreferrer","aria-label":`Open ${s.company} report`,children:[s.thumbnail_url&&e.jsx("img",{src:s.thumbnail_url,alt:`${s.company} report cover`,loading:"lazy",onError:a=>{var h;const l=a.currentTarget;l.style.display="none",(h=l.parentElement)==null||h.classList.add("no-cover")}}),(t||n)&&e.jsxs("div",{className:"lib-card-tags",children:[t&&e.jsx("span",{className:"lib-ribbon",children:e.jsx(r,{source:"Featured"})}),n&&e.jsx("span",{className:"lib-ribbon review",children:e.jsx(r,{source:"Needs review"})})]})]}),e.jsxs("div",{className:"lib-card-body",children:[e.jsx("h3",{className:"lib-card-company",children:s.company}),e.jsxs("p",{className:"lib-card-meta",children:[s.country,s.gri_sector_label?j(" · {value1}",{value1:s.gri_sector_label}):""]}),e.jsxs("p",{className:"lib-card-sub",children:[s.report_year,s.report_type?j(" · {value1}",{value1:s.report_type}):"",s.pdf_pages?j(" · {value1} pp",{value1:s.pdf_pages}):""]}),s.editorial_note&&e.jsx("p",{className:"lib-card-note",children:s.editorial_note}),e.jsx(Ye,{items:s.standards_detected}),e.jsxs("div",{className:"lib-card-actions",children:[s.open_url&&e.jsx("a",{className:"lib-btn primary",href:s.open_url,target:"_blank",rel:"noreferrer",children:e.jsx(r,{source:"Open"})}),s.download_url&&e.jsx("a",{className:"lib-btn",href:s.download_url,download:!0,children:e.jsx(r,{source:"Download"})}),s.official_url&&e.jsx("a",{className:"lib-btn ghost",href:s.official_url,target:"_blank",rel:"noreferrer",children:e.jsx(r,{source:"Official source"})})]})]})]})}function Xe(){const[s,t]=o.useState(null),[n,a]=o.useState(ve),[l,h]=o.useState([]),[d,N]=o.useState(0),[b,f]=o.useState(!0),[p,y]=o.useState(!1);o.useEffect(()=>{let i=!1;return Qe().then(v=>{i||t(v)}).catch(()=>{}),()=>{i=!0}},[]);const k=o.useCallback(async(i,v,S)=>{f(!0),y(!1);try{const T=await Ue(i,ze,v);h(C=>S?[...C,...T.reports]:T.reports),N(T.total)}catch{S||h([]),Je(),y(!0)}finally{f(!1)}},[]);o.useEffect(()=>{const i=setTimeout(()=>void k(n,0,!1),200);return()=>clearTimeout(i)},[n,k]);const g=i=>a(v=>({...v,...i})),w=o.useMemo(()=>((s==null?void 0:s.countries)??[]).map(i=>({value:i,label:i})),[s]),x=o.useMemo(()=>((s==null?void 0:s.sectors)??[]).map(i=>({value:i.number,label:i.label??i.number})),[s]),E=o.useMemo(()=>((s==null?void 0:s.standards)??[]).map(i=>({value:i,label:i})),[s]),c=o.useMemo(()=>((s==null?void 0:s.years)??[]).map(i=>({value:String(i),label:String(i)})),[s]),m=n.countries.length+n.griSectors.length+n.standards.length+n.years.length+(n.q?1:0),_=p&&l.length===0;return e.jsxs("div",{className:"lib-catalogue",children:[e.jsxs("div",{className:"lib-filters",children:[e.jsx("input",{type:"search",className:"lib-search",placeholder:j("Search company…"),value:n.q,onChange:i=>g({q:i.target.value})}),e.jsx($,{placeholder:j("All countries"),options:w,selected:n.countries,onChange:i=>g({countries:i})}),e.jsx($,{placeholder:j("All GRI sectors"),options:x,selected:n.griSectors,onChange:i=>g({griSectors:i})}),e.jsx($,{placeholder:j("All standards"),options:E,selected:n.standards,onChange:i=>g({standards:i})}),e.jsx($,{placeholder:j("All years"),options:c,selected:n.years,onChange:i=>g({years:i})}),n.standards.length>1&&e.jsxs("div",{className:"lib-match",role:"group","aria-label":j("Standards match mode"),children:[e.jsx("span",{className:"lib-match-label",children:e.jsx(r,{source:"Standards"})}),e.jsx("button",{type:"button",className:`lib-match-btn${n.standardMatch==="any"?" on":""}`,onClick:()=>g({standardMatch:"any"}),children:e.jsx(r,{source:"Any"})}),e.jsx("button",{type:"button",className:`lib-match-btn${n.standardMatch==="all"?" on":""}`,onClick:()=>g({standardMatch:"all"}),children:e.jsx(r,{source:"All"})})]}),m>0&&e.jsx("button",{type:"button",className:"lib-clear-all",onClick:()=>a(ve),children:e.jsx(r,{source:"Clear all"})})]}),!_&&e.jsx("p",{className:"lib-count","data-testid":b&&l.length===0?"reports-loading":void 0,children:b&&l.length===0?j("Loading…"):j("{value1} report{value2}",{value1:d,value2:d===1?"":"s"})}),p&&e.jsxs("div",{className:"library-coming-soon","data-testid":"reports-error",children:[e.jsx("strong",{children:e.jsx(r,{source:"C
1ouldn’t load reports"})}),e.jsx("p",{children:e.jsx(r,{source:"Please try again in a moment."})}),e.jsx("button",{type:"button",className:"lib-btn",onClick:()=>void k(n,l.length,l.length>0),children:e.jsx(r,{source:"Retry"})})]}),!_&&e.jsx("div",{className:"lib-grid",children:l.map(i=>e.jsx(Ve,{report:i},i.entry_id))}),l.length<d&&!b&&e.jsx("div",{className:"lib-loadmore",children:e.jsxs("button",{type:"button",className:"lib-btn",onClick:()=>void k(n,l.length,!0),children:[e.jsx(r,{source:"Load more ("}),d-l.length," ",e.jsx(r,{source:"more)"})]})})]})}function P(s){return typeof s=="number"&&Number.isFinite(s)}function G(s){return Array.isArray(s)&&s.every(t=>typeof t=="string")}function W(s){return s===null||typeof s=="string"}function L(s){return s===void 0||typeof s=="string"}function re(s){return s===void 0||P(s)}function Ze(s){return R(s)&&typeof s.disclosure_key=="string"&&typeof s.disclosure_code=="string"&&typeof s.title=="string"&&typeof s.standard_code=="string"&&typeof s.standard_name=="string"&&typeof s.family=="string"&&W(s.series_group)&&typeof s.has_card=="boolean"&&W(s.card_key)}function Ke(s){return R(s)&&typeof s.standard_code=="string"&&typeof s.standard_name=="string"&&Array.isArray(s.items)&&s.items.every(Ze)}function es(s){return R(s)&&W(s.series_group)&&typeof s.family=="string"&&P(s.disclosures)&&Array.isArray(s.standards)&&s.standards.every(Ke)}function ss(s){return R(s)&&typeof s.family=="string"&&typeof s.slug=="string"&&P(s.disclosures)&&Array.isArray(s.groups)&&s.groups.every(es)}function rs(s){return R(s)&&typeof s.code=="string"&&typeof s.title=="string"&&W(s.card_key)}function ts(s){return!R(s)||!P(s.document_id)||typeof s.company!="string"||!P(s.score)||!Array.isArray(s.pages)||!L(s.report_title)||!re(s.year)||!L(s.sector)||!L(s.country)||!L(s.assurance)||!(s.thumbnail_url===null||L(s.thumbnail_url))||!(s.report_url===null||L(s.report_url))||!L(s.snippet_html)?!1:s.pages.every(t=>R(t)&&P(t.page)&&W(t.url))}function ns(s){return R(s)&&typeof s.c=="string"&&typeof s.t=="string"&&typeof s.has_card=="boolean"&&W(s.card_key)&&typeof s.framework=="string"}function as(s){return R(s)&&typeof s.company=="string"&&(s.year===void 0||typeof s.year=="string"||P(s.year))&&L(s.report_title)&&re(s.page_number)&&L(s.source_page_url)&&L(s.snippet)&&L(s.snippet_html)&&L(s.citation)}function I(s){throw new Ae(s,"the response does not match the disclosure library contract")}function is(s){return!R(s)||typeof s.enabled!="boolean"?I("Disclosure Library state"):{enabled:s.enabled}}function cs(s){return!R(s)||!G(s.frameworks)||!G(s.topics)||!G(s.sectors)||!G(s.countries)?I("Disclosure Library facets"):{frameworks:s.frameworks,topics:s.topics,sectors:s.sectors,countries:s.countries}}function os(s){return!R(s)||!Array.isArray(s.families)||!s.families.every(ss)||!Array.isArray(s.quick)||!s.quick.every(rs)?I("Disclosure Library cross-framework catalogue"):{families:s.families,quick:s.quick}}function ls(s){return!R(s)||!Array.isArray(s.results)||!s.results.every(ts)||typeof s.q!="string"||typeof s.match_label!="string"?I("Disclosure Library report search"):{results:s.results,q:s.q,match_label:s.match_label}}function ds(s){return!R(s)||!Array.isArray(s.indicators)||!s.indicators.every(ns)?I("Disclosure Library indicators"):{indicators:s.indicators}}function us(s){return!R(s)||!R(s.card)||typeof s.key!="string"||typeof s.status!="string"?I("Disclosure Library card"):{card:s.card,key:s.key,status:s.status}}function hs(s){return!R(s)||!Array.isArray(s.columns)||!s.columns.every(as)?I("Disclosure Library comparison"):{columns:s.columns}}function ps(s){return!R(s)||typeof s.ok!="boolean"||!L(s.answer)||!(s.citations===void 0||G(s.citations))||!(s.grounded===void 0||typeof s.grounded=="boolean")||!L(s.error)||s.report_sources!==void 0&&(!Array.isArray(s.report_sources)||!s.report_sources.every(t=>R(t)&&L(t.citation)&&L(t.company)&&re(t.page_number)&&L(t.deeplink)&&L(t.source_page_url)))?I("Disclosure Library grounded answer"):{ok:s.ok,...typeof s.answer=="string"?{answer:s.answer}:{},...G(s.citations)?{citations:s.citations}:{},...Array.isArray(s.report_sources)?{report_sources:s.report_sources.map(t=>
1R(t)?{...typeof t.citation=="string"?{citation:t.citation}:{},...typeof t.company=="string"?{company:t.company}:{},...P(t.page_number)?{page_number:t.page_number}:{},...typeof t.deeplink=="string"?{deeplink:t.deeplink}:{},...typeof t.source_page_url=="string"?{source_page_url:t.source_page_url}:{}}:I("Disclosure Library grounded answer"))}:{},...typeof s.grounded=="boolean"?{grounded:s.grounded}:{},...typeof s.error=="string"?{error:s.error}:{}}}async function ms(){try{const s=await O("GET","/api/v2/student/disclosure-library/state",is);return(s==null?void 0:s.enabled)===!0}catch(s){return s instanceof Ee,!1}}async function xs(){return await O("GET","/api/v2/student/disclosure-library/facets",cs)??{frameworks:[],topics:[],sectors:[],countries:[]}}async function js(){return await O("GET","/api/v2/student/disclosure-library/catalogue",os)??{families:[],quick:[]}}async function fs(s,t){var l,h,d,N;const n={q:s};return(l=t==null?void 0:t.frameworks)!=null&&l.length&&(n.framework=t.frameworks.join(",")),(h=t==null?void 0:t.topics)!=null&&h.length&&(n.topic=t.topics.join(",")),(d=t==null?void 0:t.sectors)!=null&&d.length&&(n.sector=t.sectors.join(",")),(N=t==null?void 0:t.countries)!=null&&N.length&&(n.country=t.countries.join(",")),await O("GET","/api/v2/student/disclosure-library/report-search",ls,{query:n})??{results:[],q:s,match_label:""}}async function gs(){const s=await O("GET","/api/v2/student/disclosure-library/indicators",ds);return(s==null?void 0:s.indicators)??[]}async function bs(s){try{return await O("GET",`/api/v2/student/disclosure-library/cards/${encodeURIComponent(s)}`,us)??null}catch(t){if(t instanceof Ee&&t.status===404)return null;throw t}}async function ys(s,t){const n={};return await O("GET",`/api/v2/student/disclosure-library/cards/${encodeURIComponent(s)}/compare`,hs,{query:n})??{columns:[]}}async function Ns(s){return await O("POST","/api/v2/student/disclosure-library/ask",ps,{body:s})??{ok:!1,error:"no_response"}}const ws=["What exactly does this disclosure require?","How do real companies report this?","What are the common preparation mistakes?","What evidence should I collect to back this up?"];function B(...s){for(const t of s)if(typeof t=="string"&&t.trim())return t.trim()}function _s(s){return B(s.deeplink,s.source_page_url)}function Se(s){const t=[],n=B(s.company);return n&&t.push(n),typeof s.page_number=="number"&&Number.isFinite(s.page_number)&&t.push(`p.${s.page_number}`),t.length?t.join(" · "):B(s.citation)??"Source"}function ks(s){switch(s){case"unavailable":return"The assistant is unavailable right now. Please try again in a moment.";case"no_response":return"No response from the assistant. Please try again.";default:return"Something went wrong answering that. Please try again."}}function vs({disclosureKey:s,disclosureCode:t}){const[n,a]=o.useState([]),[l,h]=o.useState(""),[d,N]=o.useState(!1),b=o.useRef(0),f=o.useRef(null),p=o.useRef(!0);o.useEffect(()=>(p.current=!0,()=>{p.current=!1}),[]),o.useEffect(()=>{a([]),h(""),N(!1),b.current=0},[s]),o.useEffect(()=>{const x=f.current;x&&(x.scrollTop=x.scrollHeight)},[n,d]);const y=o.useCallback(async x=>{const E=x.trim();if(!E||d)return;const c=[];for(let S=0;S<n.length-1;S+=1){const T=n[S],C=n[S+1];!T||!C||T.role==="user"&&C.role==="assistant"&&!C.error&&c.push({q:T.text,a:C.text})}const m=c.slice(-6),_={id:b.current++,role:"user",text:E};a(S=>[...S,_]),h(""),N(!0);let i;try{i=await Ns({disclosure_key:s,question:E,...m.length?{history:m}:{}})}catch{i={ok:!1,error:"unavailable"}}if(!p.current)return;const v=i.ok&&B(i.answer)?{id:b.current++,role:"assistant",text:i.answer,...i.citations?{citations:i.citations.filter(S=>B(S))}:{},...i.report_sources?{reportSources:i.report_sources.filter(S=>B(Se(S)))}:{},...i.grounded!==void 0?{grounded:i.grounded}:{}}:{id:b.current++,role:"assistant",text:ks(i.error),error:!0};a(S=>[...S,v]),N(!1)},[d,s,n]),k=x=>{x.preventDefault(),y(l)},g=x=>
1{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),y(l))},w=n.length===0;return e.jsxs("section",{className:"disc-ask","aria-label":j("Ask the disclosure assistant"),children:[e.jsxs("header",{className:"disc-ask-head",children:[e.jsx("span",{className:"disc-ask-title",children:e.jsx(r,{source:"Ask about this disclosure"})}),t?e.jsx("span",{className:"disc-ask-scope",children:t}):null]}),e.jsx("p",{className:"disc-ask-note",children:e.jsx(r,{source:"Grounded in published company reports. Answers cite their sources — always verify against the original report."})}),e.jsxs("div",{className:"disc-ask-thread",ref:f,children:[w?e.jsxs("div",{className:"disc-ask-starters",children:[e.jsx("span",{className:"disc-ask-starters-label",children:e.jsx(r,{source:"Try asking"})}),ws.map(x=>e.jsx("button",{type:"button",className:"disc-ask-chip","aria-label":x,onClick:()=>void y(x),disabled:d,children:x},x))]}):n.map(x=>x.role==="user"?e.jsx("div",{className:"disc-ask-turn disc-ask-turn-user",children:e.jsx("div",{className:"disc-ask-bubble disc-ask-bubble-user",children:x.text})},x.id):e.jsx("div",{className:"disc-ask-turn disc-ask-turn-bot",children:e.jsxs("div",{className:`disc-ask-bubble disc-ask-bubble-bot${x.error?" is-error":""}`,children:[x.error?e.jsx("p",{className:"disc-ask-error",children:x.text}):e.jsx(Oe,{text:x.text,className:"disc-ask-md"}),x.citations&&x.citations.length>0?e.jsxs("div",{className:"disc-ask-citations",children:[e.jsx("span",{className:"disc-ask-srclabel",children:e.jsx(r,{source:"Citations"})}),e.jsx("ul",{className:"disc-ask-citation-list",children:x.citations.map((E,c)=>e.jsx("li",{children:E},`${x.id}-cit-${c}`))})]}):null,x.reportSources&&x.reportSources.length>0?e.jsxs("div",{className:"disc-ask-sources",children:[e.jsx("span",{className:"disc-ask-srclabel",children:e.jsx(r,{source:"Report sources"})}),e.jsx("ul",{className:"disc-ask-source-list",children:x.reportSources.map((E,c)=>{const m=_s(E),_=Se(E);return e.jsx("li",{children:m?e.jsxs("a",{className:"disc-ask-source",href:m,target:"_blank",rel:"noopener noreferrer",children:[_," ↗"]}):e.jsx("span",{className:"disc-ask-source disc-ask-source-flat",children:_})},`${x.id}-src-${c}`)})})]}):null]})},x.id)),d?e.jsx("div",{className:"disc-ask-turn disc-ask-turn-bot",children:e.jsxs("div",{className:"disc-ask-bubble disc-ask-bubble-bot disc-ask-thinking","aria-live":"polite",children:[e.jsxs("span",{className:"disc-ask-dots","aria-hidden":"true",children:[e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{})]}),e.jsx("span",{className:"disc-ask-thinking-label",children:e.jsx(r,{source:"Thinking…"})})]})}):null]}),e.jsxs("form",{className:"disc-ask-form",onSubmit:k,children:[e.jsx("textarea",{className:"disc-ask-input",placeholder:j("Ask anything about this disclosure…"),value:l,rows:1,onChange:x=>h(x.target.value),onKeyDown:g,disabled:d}),e.jsx("button",{type:"submit",className:"disc-ask-send",disabled:d||!l.trim(),children:d?j("Asking…"):j("Send")})]})]})}const Ss=3,H=new Map;function Cs(s){const t=H.get(s);if(t)return t;const n=ys(s),a=()=>{H.get(s)===n&&H.delete(s)};return H.set(s,n),n.then(a,a),n}function Rs(s){const t=[];return s.year!==void 0&&s.year!==null&&`${s.year}`.trim()&&t.push(`${s.year}`),s.report_title&&t.push(s.report_title),t.join(" · ")}function As({col:s}){const t=Rs(s),n=s.page_number!==void 0&&s.page_number!==null;return e.jsxs("div",{className:"disc-compare-col",children:[e.jsx("div",{className:"disc-compare-co",children:s.company}),t?e.jsx("div",{className:"disc-compare-meta",children:t}):null,s.snippet_html?e.jsx("div",{className:"disc-compare-snip",dangerouslySetInnerHTML:{__html:s.snippet_html}}):s.snippet?e.jsx("div",{className:"disc-compare-snip",children:s.snippet}):e.jsx("div",{className:"disc-compare-snip disc-compare-snip-empty",children:e.jsx(r,{source:"No extract available."})}),e.jsx("div",{className:"disc-compare-page",children:n&&s.source_page_url?e.jsxs("a",{href:s.source_page_url,target:"_blank",rel:"noopener nofollow",children:[e.jsx(r,{source:"Read on p."})," ",s.page_number," ↗"]}):n?e.jsxs("span",{className:"disc-compare-page-none",children:[e.jsx(r,{source:"p."})," ",s.page_number]}):null})]})}function Es({cardKey:s,disclosureCode:t}
1){const[n,a]=o.useState([]),[l,h]=o.useState(!0),[d,N]=o.useState(!1);o.useEffect(()=>{let f=!0;return h(!0),N(!1),Cs(s).then(p=>{f&&a(p.columns.slice(0,Ss))}).catch(()=>{f&&N(!0)}).finally(()=>{f&&h(!1)}),()=>{f=!1}},[s]);const b=t??"this disclosure";return e.jsxs("div",{className:"disc-compare",children:[e.jsx("div",{className:"disc-compare-kicker",children:e.jsx(r,{source:"Analyse across real reports"})}),e.jsxs("h2",{className:"disc-compare-h",children:[e.jsx(r,{source:"How companies actually report"})," ",b]}),e.jsx("p",{className:"disc-compare-lead",children:e.jsx(r,{source:"Read how real companies wrote this disclosure, side by side — in their own published words, with the exact page. The goal isn’t to copy any one of them; it’s to see the range and judge what “good” looks like."})}),e.jsx("p",{className:"disc-compare-fine",children:e.jsx(r,{source:"These are short extracts from each company’s own report, shown for study with a link to the source page. They are real-report practice, not exact disclosure templates."})}),l?e.jsx("div",{className:"disc-compare-empty",children:e.jsx(r,{source:"Loading real-report extracts…"})}):d?e.jsx("div",{className:"disc-compare-empty",children:e.jsx(r,{source:"This view is temporarily unavailable. Please try again shortly."})}):n.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"disc-compare-grid",children:n.map((f,p)=>e.jsx(As,{col:f},f.citation??`${f.company}-${p}`))}),e.jsxs("div",{className:"disc-compare-reflect",children:[e.jsx("h3",{children:e.jsx(r,{source:"As you compare, ask yourself"})}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx(r,{source:"What is"}),e.jsx("strong",{children:e.jsx(r,{source:"common"})})," ",e.jsx(r,{source:"across all of them — the structure, the units, the framing?"})]}),e.jsxs("li",{children:[e.jsx(r,{source:"What is"}),e.jsx("strong",{children:e.jsx(r,{source:"unique"})})," ",e.jsx(r,{source:"to one company, and why might their context call for it?"})]}),e.jsxs("li",{children:[e.jsx(r,{source:"Who gives a"}),e.jsx("strong",{children:e.jsx(r,{source:"number"})})," "," ",e.jsx(r,{source:"and who stays"})," ",e.jsx("strong",{children:e.jsx(r,{source:"narrative"})})," ",e.jsx(r,{source:"— and which is more decision-useful here?"})]}),e.jsxs("li",{children:[e.jsx(r,{source:"Who names an"}),e.jsx("strong",{children:e.jsx(r,{source:"assurance provider"})})," ",e.jsx(r,{source:"or a clear boundary, and who leaves it implicit?"})]}),e.jsx("li",{children:e.jsx(r,{source:"If you had to write your organisation’s version, which elements would you borrow — and which would you do better?"})})]})]})]}):e.jsx("div",{className:"disc-compare-empty",children:e.jsx(r,{source:"We couldn’t find enough real-report extracts for this disclosure yet."})})]})}const Ls=new Set(["needs_review","draft","generated"]),z=new Map;function qs(s){const t=z.get(s);if(t)return t;const n=bs(s),a=()=>{z.get(s)===n&&z.delete(s)};return z.set(s,n),n.then(a,a),n}function q({title:s,subtitle:t,defaultOpen:n=!0,children:a}){const[l,h]=o.useState(n),d=o.useId();return e.jsxs("section",{className:"disc-cardview-section",children:[e.jsxs("button",{type:"button",className:"disc-cardview-sechead","aria-expanded":l,"aria-controls":d,onClick:()=>h(N=>!N),children:[e.jsx("span",{className:"disc-cardview-sectitle",children:s}),e.jsx("span",{className:"disc-cardview-secchev","aria-hidden":"true",children:l?"–":"+"})]}),l&&e.jsxs("div",{className:"disc-cardview-secbody",id:d,children:[t?e.jsx("p",{className:"disc-cardview-secsub",children:t}):null,a]})]})}function Ts({items:s}){return e.jsx("ul",{className:"disc-cardview-check",children:s.map((t,n)=>e.jsx("li",{children:e.jsxs("label",{className:"disc-cardview-check-item",children:[e.jsx("input",{type:"checkbox","aria-label":t}),e.jsx("span",{className:"disc-cardview-check-box","aria-hidden":"true"}),e.jsx("span",{className:"disc-cardview-check-txt",children:t})]})},n))})}function Ce({rows:s,variant:t}){return e.jsx("ul",{className:`disc-cardview-rowlist${t?` disc-cardview-rowlist--${t}`:""}`,children:s.map((n,a)=>e.jsxs("li",{children:[n.title?e.jsx("div",{className:"disc-cardview-rt",children:n.title}):null,n.detail?e.jsx("p",{children:n.detail}):null]},a))})}function Ds({table:s}){const t=s.columns??[],n=s.rows??[];return!t.length&&!n.length?null:e.jsx("div",{className:"disc-cardview-xtwrap",children:e.jsxs("table",{className:"disc-cardview-xt",children:[s.caption?e.jsxs("caption",{children:[s.caption,s.unit?e.jsxs("span",{className:"u",children:[" · ",s.unit]}):null]}):null,t.length?e.jsx("thead",{children:e.jsx("tr",{children:t.map((a,l)=>e.jsx("th",{children:a},l))})}):null,e.jsx("tbody",{children:n.map((a,l)=>e.jsx("tr",{children:a.map((h,d)=>e.jsx("td",{children:h},d))},l))})]})})}function Fs({ex:s}){const t=s.pages&&s.pages.length?s.pages:s.page_number!=null?[{page_number:s.page_number,deep_link:s.deep_link}]:[],n=s.match_confidence??"Related report practice";return e.jsxs("tr",{children:[e.jsx("td",{children:e.jsxs("div",{className:"disc-cardview-coco",children:[s.thumbnail_url?e.jsx("img",{className:"disc-cardview-cover",src:s.thumbnail_url,alt:"",loading:"lazy"}):null,e.jsx("span",{children:s.company??"—"})]})}),e.jsx("td",{className:"disc-cardview-mute",children:[s.gri_sector_label,s.country].filter(
1Boolean).join(" · ")||"—"}),e.jsx("td",{className:"disc-cardview-mute",children:s.report_year??"—"}),e.jsx("td",{children:e.jsx("span",{className:"disc-cardview-conf","data-conf":n,children:n})}),e.jsx("td",{children:t.length?e.jsx("span",{className:"disc-cardview-pglist",children:t.map((a,l)=>a.deep_link?e.jsxs("a",{className:"disc-cardview-pgref",href:a.deep_link,target:"_blank",rel:"noopener noreferrer nofollow",children:[e.jsx(r,{source:"p."})," ",a.page_number," →"]},l):e.jsxs("span",{className:"disc-cardview-pgref disc-cardview-pgref--plain",children:[e.jsx(r,{source:"p."})," ",a.page_number]},l))}):s.source_page_url?e.jsx("a",{className:"disc-cardview-pgref disc-cardview-pgref--plain",href:s.source_page_url,target:"_blank",rel:"noopener noreferrer nofollow",children:e.jsx(r,{source:"Report →"})}):"—"}),e.jsx("td",{children:s.source_page_url?e.jsxs("a",{href:s.source_page_url,target:"_blank",rel:"noopener noreferrer",children:[s.report_title??j("Report")," →"]}):s.report_title??"—"}),e.jsx("td",{className:"disc-cardview-mute",children:s.assurance_provider??"—"})]})}const K="https://reporting.academy/en/disclosure-library/";function Is({cardKey:s,onBack:t}){var he,pe,me,xe,je,fe,ge,be,ye,Ne,we,_e,ke;const n=Me(u=>u.impersonating??u.userRole),[a,l]=o.useState(null),[h,d]=o.useState(""),[N,b]=o.useState(!0),[f,p]=o.use
1State(!0),y=o.useCallback(async()=>{b(!0),p(!0);try{const u=await qs(s);if(!u){p(!1),l(null);return}l(u.card??null),d(u.status??"")}catch{p(null),l(null)}finally{b(!1)}},[s]);o.useEffect(()=>{let u=!0;return y().finally(()=>{}),()=>{u=!1}},[y]);const k=e.jsx("button",{type:"button",className:"disc-cardview-back",onClick:t,children:e.jsx(r,{source:"← Back to catalogue"})});if(N)return e.jsxs("div",{className:"disc-cardview",children:[k,e.jsx("p",{className:"lib-count",children:e.jsx(r,{source:"Loading…"})})]});if(f===null)return e.jsxs("div",{className:"disc-cardview",children:[k,e.jsxs("div",{className:"library-coming-soon",children:[e.jsx("strong",{children:e.jsx(r,{source:"Couldn’t load this disclosure"})}),e.jsx("p",{children:e.jsx(r,{source:"Please try again in a moment."})}),e.jsx("p",{children:e.jsx("button",{type:"button",className:"lib-btn",onClick:()=>void y(),children:e.jsx(r,{source:"Retry"})})})]})]});if(f===!1||!a)return e.jsxs("div",{className:"disc-cardview",children:[k,e.jsxs("div",{className:"library-coming-soon",children:[e.jsx("strong",{children:e.jsx(r,{source:"Disclosure not found"})}),e.jsx("p",{children:e.jsx(r,{source:"This card may have moved or is not yet published."})})]})]});const g=a.editorial??{},w=a.standard??{},x=a.disclosure??{},E=a.standard_code??w.code??"",c=String(x.disclosure_key??a.disclosure_key??""),m=c.includes(":")?(c.split(":").pop()??"").trim():c,_=Ls.has(h),i=((he=g.plain_language)==null?void 0:he.plain_language)??[],v=((pe=g.before_you_start)==null?void 0:pe.questions)??[],S=((me=g.datapoints_table)==null?void 0:me.datapoints)??[],T=((xe=g.how_to_prepare)==null?void 0:xe.how_to_prepare)??[],C=g.data_request??{},D=g.report_output??{},V=((je=g.claims_to_verify)==null?void 0:je.claims)??[],X=((fe=g.evidence_pack)==null?void 0:fe.evidence_pack)??[],te=((ge=g.common_gaps)==null?void 0:ge.common_gaps)??[],ne=((be=g.prep_mistakes)==null?void 0:be.prep_mistakes)??[],ae=((ye=g.edge_cases)==null?void 0:ye.edge_cases)??[],Z=((Ne=g.examples)==null?void 0:Ne.examples)??[],M=g.quality_ladder??{},ie=((we=g.self_check)==null?void 0:we.self_check)??[],ce=((_e=g.faq)==null?void 0:_e.faq)??[],oe=a.company_examples??[],Te=!!(D.methodology||D.context||D.fluctuations||D.content_index),le=!!C.internal_question,de=!!(M.basic||M.better||M.best),De=n==="COMMUNITY_MEMBER",Fe=(String(a.standard_code??w.code??"").trim().split(/[\s:-]/)[0]??"").toUpperCase(),ue={GRI:{href:"https://reporting.academy/en/pages/gritraining/",blurb:"Practise GRI disclosures live with Dr. Kurinko — GRI Standards Certified Training."}}[Fe]??{href:"https://reporting.academy/en/",blurb:"Go deeper with LRA — live, expert-led certified training with a human in the loop."};return e.jsxs("div",{className:"disc-cardview",children:[k,e.jsxs("header",{className:"disc-cardview-header",children:[e.jsxs("div",{className:"disc-cardview-parent",children:[E,w.name?j(": {value1}",{value1:w.name}):"",w.standard_version?j("{value1}",{value1:w.standard_version}):""]}),e.jsxs("div",{className:"disc-cardview-headrow",children:[m?e.jsx("span",{className:"disc-code",children:m}):null,_?e.jsx("span",{className:"disc-badge draft",children:e.jsx(r,{source:"Draft · under review"})}):null]}),e.jsx("h1",{className:"disc-cardview-title",children:x.title??m}),e.jsx("p",{className:"disc-cardview-purpose",children:e.jsx(r,{source:"Practical guidance for preparing this disclosure. For exact requirements, always refer to the official source."})}),a.official_url?e.jsx("a",{className:"disc-cardview-official",href:a.official_url,target:"_blank",rel:"noopener noreferrer",children:e.jsx(r,{source:"Open official source →"})}):null]}),i.length?e.jsxs(q,{title:j("Disclosure focus"),defaultOpen:!0,children:[i.map((u,A)=>e.jsx("p",{className:"disc-cardview-para",children:u},A)),e.jsx("p",{className:"disc-cardview-footnote",children:e.jsx(r,{source:"LRA educational guidance — for exact requirements refer to the official source."})})]}):null,v.length?e.jsx(q,{title:j("Before you start"),subtitle:"A quick mental checklist before you prepare this disclosure — tick each as you settle it.",children:e.jsx(Ts,{items:v})}):null,S.length?e.jsx(q,{title:j("Key datapoints"),subtitle:"Datapoints to prepare for this disclosure.",children:e.jsx("div",{className:"disc-cardview-tblwrap",children:e.jsxs("table",{className:"disc-cardview-tbl",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:e.jsx(r,{source:"Datapoint"})}),e.jsx("th",{children:e.jsx(r,{source:"What to capture"})}),e.jsx("th",{children:e.jsx(r,{source:"Evidence hint"})}),e.jsx("th",{children:e.jsx(r,{source:"Owner"})})]})}),e.jsx("tbody",{children:S.map((u,A)=>e.jsxs("tr",{children:[e.jsx("td",{children:u.practitioner_label||u.datapoint||"—"}),e.jsx("td",{children:u.what_to_capture??"—"}),e.jsx("td",{className:"disc-cardview-mute",children:u.evidence_hint??"—"}),e.jsx("td",{className:"disc-cardview-mute",children:u.owner??"—"})]},A))})]})})}):null,T.length?e.jsx(q,{title:j("How to prepare"),children:e.jsx("ol",{className:"disc-cardview-steps",children:T.map((u,A)=>e.jsx("li",{children:u.description??""},A))})}):null,le&&De?e.jsxs("a",{className:"disc-cardview-coursestrip",href:ue.href,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"ic","aria-hidden":"true",children:e.jsxs("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"none",stroke:"#fff",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M22 10 12 5 2 10l10 5 10-5Z"}),e.jsx("path",{d:"M6 12v5c0 1 2.7 2.5 6 2.5s6-1.5 6-2.5v-5"})]})}),e.jsxs("span",{className:"t",children:[e.jsx("b",{children:e.jsx(r,{source:"Want to do this on a real report?"})})," ",ue.blurb]}),e.jsx("span",{className:"go",children:e.jsx(r,{source:"Explore →"})})]}):null,le?e.jsxs(q,{title:C.request_title||"Request the data",subtitle:"Translate the disclosure into an internal business question, then adapt it to your organisation.",children:[e.jsx("div",{className:"disc-cardview-q",children:C.internal_question}),C.adapt_note?e.jsx("p",{className:"disc-cardview-note",children:C.adapt_note}):null,C.weak_request||C.better_request?e.jsxs("div",{className:"disc-cardview-ba",children:[C.weak_request?e.jsxs("div",{className:"disc-cardview-bad",children:[e.jsx("span",{className:"tag",children:e.jsx(r,{source:"Weak request"})}),e.jsx("p",{children:C.weak_request}),C.why_weak_fails?e.jsxs("div",{className:"why",children:[e.jsx(r,{source:"Why it fails:"})," ",C.why_weak_fails]}):null]}):null,C.better_request?e.jsxs("div",{className:"disc-cardview-good",children:[e.jsx("span",{className:"tag",children:e.jsx(r,{source:"Better request"})}),e.jsx("p",{children:C.better_request})]}):null]}):null,C.email_template?e.jsxs("details",{className:"disc-cardview-tmpl",children:[e.jsx("summary",{children:e.jsx(r,{source:"Formal email template"})}),e.jsx("pre",{children:C.email_template})]}):null,C.message_template?e.jsxs("details",{className:"disc-cardview-tmpl",children:[e.jsx("summary",{children:e.jsx(r,{source:"Short Teams / Slack ver
1sion"})}),e.jsx("pre",{children:C.message_template})]}):null,(ke=C.industry_examples)!=null&&ke.length?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"disc-cardview-subh",children:e.jsx(r,{source:"Industry examples"})}),C.industry_examples.map((u,A)=>e.jsxs("details",{className:"disc-cardview-tmpl",children:[e.jsx("summary",{children:u.sector??j("Example")}),u.context?e.jsxs("p",{children:[e.jsx("b",{children:e.jsx(r,{source:"Context."})})," ",u.context]}):null,u.adapted_request?e.jsxs("p",{children:[e.jsx("b",{children:e.jsx(r,{source:"Adapted request."})})," ",u.adapted_request]}):null,u.response?e.jsxs("p",{children:[e.jsx("b",{children:e.jsx(r,{source:"Example response."})})," ",u.response]}):null]},A))]}):null]}):null,Te?e.jsx(q,{title:j("Draft your disclosure"),subtitle:"LRA training templates — adapt them, and check the official source before sign-off.",children:e.jsxs("div",{className:"disc-cardview-draftcards",children:[D.methodology?e.jsxs("div",{className:"disc-cardview-draftcard",children:[e.jsx("div",{className:"t",children:e.jsx(r,{source:"Method note"})}),e.jsx("p",{children:D.methodology})]}):null,D.context?e.jsxs("div",{className:"disc-cardview-draftcard",children:[e.jsx("div",{className:"t",children:e.jsx(r,{source:"Context note"})}),e.jsx("p",{children:D.context})]}):null,D.fluctuations?e.jsxs("div",{className:"disc-cardview-draftcard",children:[e.jsx("div",{className:"t",children:e.jsx(r,{source:"Fluctuation statement"})}),e.jsx("p",{children:D.fluctuations})]}):null,D.content_index?e.jsxs("div",{className:"disc-cardview-draftcard",children:[e.jsx("div",{className:"t",children:e.jsx(r,{source:"Content index entry"})}),e.jsx("p",{children:D.content_index})]}):null]})}):null,V.length||X.length?e.jsxs(q,{title:j("Assurance readiness"),children:[V.length?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"disc-cardview-subh",children:e.jsx(r,{source:"For each claim, check the evidence"})}),e.jsx("div",{className:"disc-cardview-tblwrap",children:e.jsxs("table",{className:"disc-cardview-tbl",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:e.jsx(r,{source:"Claim"})}),e.jsx("th",{children:e.jsx(r,{source:"Risk"})}),e.jsx("th",{children:e.jsx(r,{source:"Evidence to check"})})]})}),e.jsx("tbody",{children:V.map((u,A)=>e.jsxs("tr",{children:[e.jsx("td",{children:u.claim??"—"}),e.jsx("td",{className:"disc-cardview-mute",children:u.risk??"—"}),e.jsx("td",{className:"disc-cardview-mute",children:u.evidence_to_check??"—"})]},A))})]})})]}):null,X.length?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"disc-cardview-subh",children:e.jsx(r,{source:"Evidence pack to prepare"})}),e.jsx("ul",{className:"disc-cardview-bullets",children:X.map((u,A)=>e.jsx("li",{children:u},A))})]}):null]}):null,ne.length?e.jsx(q,{title:j("Mistakes to avoid when collecting the data"),children:e.jsx(Ce,{rows:ne,variant:"mist"})}):null,ae.length?e.jsx(q,{title:j("Where judgement is often needed"),children:e.jsx(Ce,{rows:ae,variant:"edge"})}):null,Z.length||de?e.jsxs(q,{title:j("Examples"),children:[Z.length?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"disc-cardview-note disc-cardview-italic",children:e.jsx(r,{source:"Synthetic, written by LRA — not from a company report, not text from any standard."})}),Z.map((u,A)=>e.jsxs("div",{className:"disc-cardview-synth",children:[e.jsxs("span",{className:"lab",children:[u.sector||u.label||j("Example")," ",e.jsx(r,{source:"· synthetic · written by LRA"})]}),u.table?e.jsx(Ds,{table:u.table}):null,u.text?e.jsx("p",{className:"disc-cardview-para",children:u.text}):null,u.teaching_note?e.jsx("span",{className:"disc-cardview-teach",children:u.teaching_note}):null]},A))]}):null,de?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"disc-cardview-subh",children:e.jsx(r,{source:"From a number to a disclosure"})}),e.jsxs("div",{className:"disc-cardview-rungs",children:[M.basic?e.jsxs("div",{className:"rung r1",children:[e.jsx("span",{className:"lab",children:e.jsx(r,{source:"Basic"})}),e.jsx("p",{children:M.basic})]}):null,M.better?e.jsxs("div",{className:"rung r2",children:[e.jsx("span",{className:"lab",children:e.jsx(r,{source:"Better"})}),e.jsx("p",{children:M.better})]}):null,M.best?e.jsxs("div",{className:"rung r3",children:[e.jsx("span",{className:"lab",children:e.jsx(r,{source:"Best"})}),e.jsx("p",{children:M.best})]}):null]})]}):null]}):null,ie.length?e.jsx(q,{title:j("Check your understanding"),children:ie.map((u,A)=>e.jsxs("details",{className:"disc-cardview-quiz",children:[e.jsxs("summary",{children:[u.scenario?e.jsx("span",{className:"disc-cardview-scn",children:u.scenario}):null,e.jsx("span",{className:"disc-cardview-qq",children:u.question})]}),e.jsxs("div",{className:"disc-cardview-ans",children:[u.model_answer?e.jsxs(e.Fragment,{children:[e.jsx("b",{children:e.jsx(r,{source:"Model answer."})})," ",u.model_answer]}):null,u.teaching_point?e.jsxs("div",{className:"disc-cardview-why",children:[e.jsx("b",{children:e.jsx(r,{source:"Why this matters."})})," ",u.teaching_point]}):null]})]},A))}):null,a.disclosure_key?e.jsx(vs,{disclosureKey:a.disclosure_key,...m?{disclosureCode:m}:{}}):null,e.jsx(q,{title:j("Download Centre"),subtitle:"Professional preparation tools for this disclosure — each includes a short ‘how to use’ guide.",children:e.jsxs("div",{className:"disc-cardview-dl",children:[e.jsxs("a",{className:"disc-cardview-dlbtn",href:`${K}${s}/download/workbook/`,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"disc-cardview-dlic",children:e.jsx(r,{source:"XLS"})}),e.jsxs("span",{className:"disc-cardview-dltxt",children:[e.jsx("b",{children:e.jsx(r,{source:"Prep & Assurance workbook"})}),e.jsx("span",{children:e.jsx(r,{source:"Datapoints, per-datapoint risk, evidence & owner"})})]})]}),C.internal_question?e.jsxs("a",{className:"disc-cardview-dlbtn",href:`${K}${s}/download/requestpack/`,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"disc-cardview-dlic",children:e.jsx(r,{source:"XLS"})}),e.jsxs("span",{className:"disc-cardview-dltxt",children:[e.jsx("b",{children:e.jsx(r,{source:"Data-request pack"})}),e.jsx("span",{children:e.jsx(r,{source:"Email & message templates, response form, sign-off"})})]})]}):null,e.jsxs("a",{className:"disc-cardview-dlbtn",href:`${K}${s}/download/librarycard/`,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"disc-cardview-dlic",children:e.jsx(r,{source:"PDF"})}),e.jsxs("span",{className:"disc-cardview-dltxt",children:[e.jsx("b",{children:e.jsx(r,{source:"Library Card"})}),e.jsx("span",{children:e.jsx(r,{source:"Printable summary"})})]})]})]})}),te.length?e.jsx(q,{title:j("Common reporting gaps"),children:e.jsx("ul",{className:"disc-cardview-bullets",children:te.map((u,A)=>
1e.jsx("li",{children:typeof u=="string"?u:u.gap_description??""},A))})}):null,oe.length?e.jsx(q,{title:j("From company reports"),subtitle:"Real published reports where this topic is disclosed — report practice, not exact disclosure examples.",children:e.jsx("div",{className:"disc-cardview-tblwrap",children:e.jsxs("table",{className:"disc-cardview-tbl",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:e.jsx(r,{source:"Company"})}),e.jsx("th",{children:e.jsx(r,{source:"Sector · Country"})}),e.jsx("th",{children:e.jsx(r,{source:"Year"})}),e.jsx("th",{children:e.jsx(r,{source:"Match"})}),e.jsx("th",{children:e.jsx(r,{source:"Page"})}),e.jsx("th",{children:e.jsx(r,{source:"Report"})}),e.jsx("th",{children:e.jsx(r,{source:"Assurance"})})]})}),e.jsx("tbody",{children:oe.map((u,A)=>e.jsx(Fs,{ex:u},u.document_id??A))})]})})}):null,e.jsx(Es,{cardKey:s,...m?{disclosureCode:m}:{}}),ce.length?e.jsx(q,{title:j("Questions this page answers"),children:e.jsx("div",{className:"disc-cardview-faq",children:ce.map((u,A)=>e.jsxs("details",{className:"disc-cardview-faq-item",children:[e.jsx("summary",{children:u.q}),e.jsx("p",{children:u.a})]},A))})}):null,e.jsx("footer",{className:"disc-cardview-footer",children:k})]})}function Os({catalogue:s,onOpen:t,onReportSearch:n}){var f;const a=s.families??[],[l,h]=o.useState(((f=a[0])==null?void 0:f.slug)??""),d=o.useRef(null),N=o.useMemo(()=>a.find(p=>p.slug===l)??a[0],[a,l]);if(!a.length)return null;const b=p=>{h(p),requestAnimationFrame(()=>{var y;return(y=d.current)==null?void 0:y.scrollIntoView({behavior:"smooth",block:"start"})})};return e.jsxs("div",{className:"disc-cat",children:[e.jsx("div",{className:"disc-cat-h",children:e.jsx(r,{source:"Browse by standard"})}),e.jsx("div",{className:"disc-cat-tiles",children:a.map(p=>e.jsxs("button",{type:"button",className:`disc-cat-tile${p.family==="GRI"?" live":""}`,onClick:()=>b(p.slug),children:[p.family==="GRI"?e.jsx("span",{className:"disc-cat-tile-badge",children:e.jsx(r,{source:"● Guides live"})}):null,e.jsx("span",{className:"nm",children:p.family}),e.jsxs("span",{className:"ct",children:[p.disclosures," "," ",e.jsx(r,{source:"disclosures"})]})]},p.slug))}),e.jsx("div",{className:"disc-cat-h disc-cat-h--full",ref:d,children:e.jsx(r,{source:"Browse the full catalogue"})}),e.jsxs("p",{className:"disc-cat-sub",children:[e.jsx(r,{source:"Every disclosure across frameworks. A"}),e.jsx("b",{children:e.jsx(r,{source:"Guide"})})," ",e.jsx(r,{source:"badge marks the ones with a published card."})]}),e.jsx("div",{className:"disc-cat-tabs",role:"tablist",children:a.map(p=>e.jsxs("button",{type:"button",role:"tab","aria-label":`${p.family} disclosures`,"aria-selected":p.slug===l,className:`disc-cat-tab${p.slug===l?" active":""}`,onClick:()=>h(p.slug),children:[p.family," ",e.jsx("span",{className:"cnt",children:p.disclosures})]},p.slug))}),N?e.jsx(Ms,{family:N,onOpen:t,...n?{onReportSearch:n}:{}}):null]})}function Ms({family:s,onOpen:t,onReportSearch:n}){return e.jsx("div",{className:"disc-cat-panel",role:"tabpanel",children:s.groups.map((a,l)=>e.jsxs("div",{className:"disc-cat-group",children:[a.series_group?e.jsxs("div",{className:"disc-cat-group-h",children:[a.series_group,e.jsxs("span",{className:"n",children:[a.disclosures," "," ",e.jsx(r,{source:"disclosures"})]})]}):null,e.jsx("div",{className:"disc-cat-stds",children:a.standards.map(h=>e.jsxs("details",{className:"disc-cat-std",children:[e.jsxs("summary",{children:[e.jsx("span",{className:"code",children:h.standard_code}),h.standard_name&&h.standard_name!==h.standard_code?e.jsx("span",{className:"name",children:h.standard_name}):null,e.jsx("span",{className:"cnt",children:h.items.length})]}),e.jsx("ul",{className:"disc-cat-disc",children:h.items.map(d=>e.jsx($s,{item:d,onOpen:t,...n?{onReportSearch:n}:{}},d.disclosure_key))})]},h.standard_code))})]},l))})}function $s({item:s,onOpen:t,onReportSearch:n}){const a=s.title||s.standard_name||s.disclosure_code;if(s.has_card&&s.card_key){const l=s.card_key;return e.jsx("li",{children:e.jsxs("button",{type:"button",className:"disc-cat-row disc-cat-row--card",onClick:()=>t(l),children:[e.jsx("span",{className:"c",children:s.disclosure_code}),e.jsx("span",{className:"t",children:s.title||"—"}),e.jsx("span",{className:"g",children:e.jsx(r,{source:"Guide ✓"})})]})})}return n?e.jsx("li",{children:e.jsxs("button",{type:"button",className:"disc-cat-row disc-cat-row--rep",onClick:()=>n(a),title:j("See how companies report this in their published reports"),children:[e.jsx("span",{className:"c",children:s.disclosure_code}),e.jsx("span",{className:"t",children:s.title||"—"}
1),e.jsx("span",{className:"g-rep",children:e.jsx(r,{source:"in reports →"})})]})}):e.jsx("li",{children:e.jsxs("span",{className:"disc-cat-row disc-cat-row--plain",children:[e.jsx("span",{className:"c",children:s.disclosure_code}),e.jsx("span",{className:"t",children:s.title||"—"})]})})}function qe(s){return(s||"").toLowerCase().replace(/\s+/g,"")}function Ps(s,t,n){const a=qe(s.c);return a.indexOf(n)===0?0:a.indexOf(n)>=0?1:(s.t||"").toLowerCase().indexOf(t)>=0?2:-1}function Gs({onOpen:s,onReportSearch:t}){const[n,a]=o.useState(null),[l,h]=o.useState(!1),[d,N]=o.useState(""),[b,f]=o.useState(!1),[p,y]=o.useState(-1),k=o.useRef(null),g=()=>{n||l||(h(!0),gs().then(c=>a(c)).catch(()=>a([])).finally(()=>h(!1)))},w=o.useMemo(()=>{const c=d.trim();if(!c||!n)return[];const m=c.toLowerCase(),_=qe(c);return n.map(i=>({it:i,s:Ps(i,m,_)})).filter(i=>i.s>=0).sort((i,v)=>i.s-v.s).slice(0,12).map(i=>i.it)},[d,n]);o.useEffect(()=>{if(!b)return;const c=m=>{var _;(_=k.current)!=null&&_.contains(m.target)||f(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[b]);const x=c=>{f(!1),N(""),c.has_card&&c.card_key?s(c.card_key):t&&t(c.t||c.c)},E=c=>{!b||!w.length||(c.key==="ArrowDown"?(c.preventDefault(),y(m=>(m+1)%w.length)):c.key==="ArrowUp"?(c.preventDefault(),y(m=>(m-1+w.length)%w.length)):c.key==="Enter"?p>=0&&w[p]&&(c.preventDefault(),x(w[p])):c.key==="Escape"&&f(!1))};return e.jsxs("div",{className:"disc-pick",ref:k,children:[e.jsxs("div",{className:"disc-pick-field",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",children:[e.jsx("circle",{cx:"11",cy:"11",r:"7"}),e.jsx("line",{x1:"21",y1:"21",x2:"16.5",y2:"16.5"})]}),e.jsx("input",{type:"text",className:"disc-pick-input",placeholder:j("Jump to a disclosure — e.g. GRI 305-1, employees, water…"),autoComplete:"off",role:"combobox","aria-expanded":b,value:d,onFocus:()=>{g(),f(!0)},onChange:c=>{N(c.target.value),f(!0),y(-1)},onKeyDown:E})]}),b&&d.trim()?e.jsx("div",{className:"disc-pick-list",role:"listbox",children:l&&!n?e.jsx("div",{className:"disc-pick-empty",children:e.jsx(r,{source:"Loading…"})}):w.length?w.map((c,m)=>e.jsxs("button",{type:"button",className:`disc-pick-opt${m===p?" active":""}`,role:"option","aria-selected":m===p,onMouseEnter:()=>y(m),onClick:()=>x(c),children:[e.jsx("span",{className:"c",children:c.c}),e.jsx("span",{className:"t",children:c.t}),c.has_card?e.jsx("span",{className:"g",children:e.jsx(r,{source:"Guide"})}):e.jsx("span",{className:"g-rep",children:e.jsx(r,{source:"in reports"})})]},`${c.c}-${m}`)):e.jsxs("div",{className:"disc-pick-empty",children:[e.jsx(r,{source:"No disclosure matches “"}),d.trim(),"”."]})}):null]})}function Bs({q:s,frameworks:t,topics:n,sectors:a,countries:l}){const[h,d]=o.useState(null),[N,b]=o.useState(!1),f=[t.join("|"),n.join("|"),a.join("|"),l.join("|")].join("::");if(o.useEffect(()=>{const y=s.trim();if(!y){d(null);return}let k=!0;b(!0);const g=setTimeout(()=>{fs(y,{frameworks:t,topics:n,sectors:a,countries:l}).then(w=>k&&d(w)).catch(()=>k&&d({results:[],q:y,match_label:""})).finally(()=>k&&b(!1))},250);return()=>{k=!1,clearTimeout(g)}},[s,f]),!s.trim())return e.jsx("p",{className:"disc-rs-hint",children:e.jsx(r,{source:"Type a keyword to search across company reports — your Framework, Topic, Sector and Country filters will apply."})});const p=(h==null?void 0:h.results)??[];return e.jsxs("div",{className:"disc-rs",children:[e.jsxs("div",{className:"disc-rs-head",children:[e.jsx("span",{className:"disc-rs-count",children:N&&!h?j("Searching reports…"):j("{value1} report{value2} mention this",{value1:p.length,value2:p.length===1?"":"s"})}),h!=null&&h.match_label?e.jsx("span",{className:"disc-rs-label",children:h.match_label}):null]}),e.jsx("p",{className:"disc-rs-fine",children:e.jsx(r,{source:"Passages from published company reports — open the report at the exact page. Real-report practice, not exact disclosure templates."})}),!N&&p.length===0?e.jsxs("div",{className:"library-coming-soon",children:[e.jsx("strong",{children:e.jsx(r,{source:"No report passages found"})}),e.jsx("p",{children:e.jsx(r,{source:"Try a broader keyword or remove a filter."})})]}):e.jsx("div",{className:"disc-rs-grid",children:p.map(y=>e.jsx(Ws,{r:y},y.document_id))})]})}function Ws({r:s}
1){const t=[s.year,s.report_title].filter(Boolean).join(" · "),n=[s.sector,s.country].filter(Boolean).join(" · ");return e.jsxs("article",{className:"disc-rs-card",children:[e.jsxs("div",{className:"disc-rs-card-top",children:[s.thumbnail_url?e.jsx("img",{className:"disc-rs-cover",src:s.thumbnail_url,alt:"",loading:"lazy"}):null,e.jsxs("div",{className:"disc-rs-card-head",children:[e.jsx("div",{className:"disc-rs-co",children:s.company}),t?e.jsx("div",{className:"disc-rs-meta",children:t}):null,n?e.jsx("div",{className:"disc-rs-sub",children:n}):null]})]}),s.snippet_html?e.jsx("p",{className:"disc-rs-snip",dangerouslySetInnerHTML:{__html:s.snippet_html}}):null,e.jsxs("div",{className:"disc-rs-pages",children:[s.pages.map((a,l)=>a.url?e.jsxs("a",{className:"disc-rs-pg",href:a.url,target:"_blank",rel:"noopener noreferrer nofollow",children:[e.jsx(r,{source:"p."})," ",a.page," ↗"]},l):e.jsxs("span",{className:"disc-rs-pg disc-rs-pg--plain",children:[e.jsx(r,{source:"p."})," ",a.page]},l)),s.report_url?e.jsx("a",{className:"disc-rs-report",href:s.report_url,target:"_blank",rel:"noopener noreferrer",children:e.jsx(r,{source:"Open report →"})}):null]})]})}const Re={q:"",frameworks:[],topics:[],sectors:[],countries:[]};let Q=null,J=null,Y=null;function Us(){return Q||(Q=ms().finally(()=>{Q=null})),Q}function Hs(){return J||(J=xs().finally(()=>{J=null})),J}function zs(){return Y||(Y=js().finally(()=>{Y=null})),Y}function Qs(){const[s,t]=o.useState(null),[n,a]=o.useState(null),[l,h]=o.useState(null),[d,N]=o.useState(Re),[b,f]=o.useState(null);o.useEffect(()=>{let i=!0;return Us().then(v=>{i&&(t(v),v&&(Hs().then(S=>i&&a(S)).catch(()=>{}),zs().then(S=>i&&h(S)).catch(()=>{})))}),()=>{i=!1}},[]);const p=i=>N(v=>({...v,...i})),y=o.useCallback(i=>{N(v=>({...v,q:i})),f(null)},[]),k=i=>i.map(v=>({value:v,label:v})),g=o.useMemo(()=>k((n==null?void 0:n.frameworks)??[]),[n]),w=o.useMemo(()=>k((n==null?void 0:n.topics)??[]),[n]),x=o.useMemo(()=>k((n==null?void 0:n.sectors)??[]),[n]),E=o.useMemo(()=>k((n==null?void 0:n.countries)??[]),[n]),c=d.frameworks.length+d.topics.length+d.sectors.length+d.countries.length>0,m=!!d.q.trim()||c,_=d.q.trim()||d.topics.join(" ");return s===null?e.jsx("p",{className:"lib-count",children:e.jsx(r,{source:"Loading…"})}):s===!1?e.jsxs("div",{className:"library-coming-soon",children:[e.jsx("strong",{children:e.jsx(r,{source:"Disclosure Library is temporarily unavailable"})}),e.jsx("p",{children:e.jsx(r,{source:"Please try again later. Your student access already includes all LRA Community library features."})})]}):b?e.jsx(Is,{cardKey:b,onBack:()=>f(null)}):e.jsxs("div",{className:"lib-catalogue disc-home",children:[e.jsx("div",{className:"disc-hero",children:e.jsx("input",{type:"search",className:"disc-hero-search",placeholder:j("Search across company reports — e.g. Scope 1 emissions, board diversity, water…"),value:d.q,onChange:i=>p({q:i.target.value})})}),e.jsxs("div",{className:"lib-filters disc-facets",children:[e.jsx($,{placeholder:j("All frameworks"),options:g,selected:d.frameworks,onChange:i=>p({frameworks:i})}),e.jsx($,{placeholder:j("All topics"),options:w,selected:d.topics,onChange:i=>p({topics:i})}),e.jsx($,{placeholder:j("All sectors"),options:x,selected:d.sectors,onChange:i=>p({sectors:i})}),e.jsx($,{placeholder:j("All countries"),options:E,selected:d.countries,onChange:i=>p({countries:i})}),m&&e.jsx("button",{type:"button",className:"lib-clear-all",onClick:()=>N(Re),children:e.jsx(r,{source:"Clear all"})})]}),m?e.jsx(Bs,{q:_,frameworks:d.frameworks,topics:d.topics,sectors:d.sectors,countries:d.countries}):e.jsxs(e.Fragment,{children:[e.jsx(Gs,{onOpen:f,onReportSearch:y}),l?e.jsx(Os,{catalogue:l,onOpen:f,onReportSearch:y}):e.jsx("p",{className:"lib-count",children:e.jsx(r,{source:"Loading catalogue…"})})]})]})}const ee=[{key:"disclosure",label:"Disclosure Library",hint:"Practical guidance for individual disclosures — how to prepare them, what good looks like in real reports, and an AI assistant grounded in the corpus.",comingSoon:"The richer in-cabinet Disclosure Library — guide cards, indicator picker, side-by-side comparison and the scoped AI assistant — is being built natively here."},{key:"reports",label:"Company reports",hint:"Curated real-world examples of sustainability, ESG and integrated reports.",comingSoon:"The report catalogue — filter by country, GRI sector and standard, then open or download — is being prepared."},{key:"standards",label:"Sustainability Standards and Frameworks",hint:"Browse the standards and frameworks behind the disclosures.",comingSoon:"The standards and frameworks browser is being prepared."}];function Vs(){const[s,t]=o.useState("disclosure"),n=ee.find(a=>a.key===s)??ee[0];return e.jsxs("div",{className:"cab-root library-root",children:[e.jsxs("header",{className:"library-header",children:[e.jsx("h1",{children:e.jsx(r,{source:"Library"})}),e.jsx("p",{className:"library-subtitle",children:e.jsx(r,{source:"A c
1atalogue of strong, real-world examples of sustainability and ESG reporting — find reports by country, GRI sector and standard, then open or download them, alongside the standards and frameworks behind them."})})]}),e.jsx("div",{className:"library-tabs",role:"tablist","aria-label":j("Library categories"),children:ee.map(a=>e.jsx("button",{type:"button",role:"tab","aria-selected":a.key===s,className:`library-tab${a.key===s?" active":""}`,onClick:()=>t(a.key),children:a.label},a.key))}),n?e.jsxs("section",{className:"library-panel",role:"tabpanel",children:[e.jsx("p",{className:"library-panel-hint",children:n.hint}),s==="reports"?e.jsx(Xe,{}):s==="disclosure"?e.jsx(Qs,{}):e.jsxs("div",{className:"library-coming-soon",children:[e.jsx("strong",{children:e.jsx(r,{source:"Coming soon"})}),e.jsx("p",{children:n.comingSoon})]})]}):null]})}export{Vs as LibraryPage,Vs 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.