1import{e as t,u as e,D as s}from"./p-CIRfv3ZI.js";import{h as n}from"./p-DtrYbS1Q.js";class o{constructor(){this.collectionStore=t({collection:[]})}get collection(){return this.collectionStore.state.collection}set collection(e){const s=e.map((e=>{const{state:s}=t({...e});return s}));this.collectionStore.state.collection=[...s]}reset(){this.collectionStore.reset()}push(e){const{state:s}=t(e);return this.collectionStore.state.collection=[...this.collectionStore.state.collection,s],s}pop(t){if(this.collection.length<1)return;const e=this.collection[void 0===t?this.collection.length-1:t];return void 0!==e&&(this.collection=this.collection.filter((t=>t!==e))),e}get(t){return this.collection.find(t)}update(t,e){const s=this.collection.find(t),n=!!s&&this.collection.indexOf(s);if(s&&!1!==n)return Object.keys(s).forEach((t=>{s[t]=e[t]})),s}onChange(t){this.collectionStore.onChange("collection",t)}}const r=new o,c=new o,i=new o;async function a(t,e){return new Promise(((s,n)=>{e?(r.update((e=>e.id===t),e),c.update((e=>e.id===t),e),s(e)):u(t,!0).then((t=>{s(t)})).catch((t=>n(t)))}))}async function u(t,s){return new Promise(((o,c)=>{const i=r.get((e=>e.id===t));i&&!s?o(i):e("/invoices/"+t).then((e=>{s?a(t,e).then((t=>{o(t)})):o(r.push(e))})).catch((t=>{n(t),c(t)}))}))}async function h(t){return new Promise(((s,o)=>{const c=r.get((e=>e.id===t));c?s(c):e("/accountnotice/"+t).then((t=>{s(r.push(t))})).catch((t=>{n(t),o(t)}))}))}async function m(t){return new Promise(((o,r)=>{e("/direct-debit-payment",{method:"POST",body:t}).then((t=>{t?o(t):(s(),r())})).catch((t=>{n(t),r(t)}))}))}async function p(t){return new Promise(((o,r)=>{e("/direct-debit-payment/account-statement",{method:"POST",body:t}).then((t=>{t?o(t):(s(),r())})).catch((t=>{n(t),r(t)}))}))}const y=async()=>(async()=>new Promise(((t,s)=>{e("/purchases",{method:"GET",authorize:!0}).then((t=>{if(t&&"number"==typeof t.length)return t;s({purchaseData:t})})).then((e=>{"object"==typeof e&&t(e)})).catch((t=>{s(t)}))})))().then((t=>{t&&"number"==typeof t.length&&(c.reset(),t.forEach((t=>c.push(t))))})),f=async()=>(async()=>new Promise(((t,s)=>{e("/purchases/consolidated-invoices",{method:"GET",authorize:!0}).then((t=>{if(t&&"number"==typeof t.length)return t;s({purchaseDataConsolidatedInvoices:t})})).then((e=>{"object"==typeof e&&t(e)})).catch((t=>{s(t)}))})))().then((t=>{t&&"number"==typeof t.length&&(i.reset(),t.forEach((t=>i.push(t))))})),d=async()=>{const t=[f(),y()];await Promise.all(t)};export{o as C,i as a,f as b,u as c,h as d,p as e,m as f,y as g,c as p,d as r,a as u}
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.