import { _ as RequestState, c as Entities, f as NormalizedEntity, g as RefToNormalized, o as ActionFromType, p as PaginationState, r as BatchAction, s as AllActions, u as IIIFStore } from "./index-DvodliRQ.cjs"; import { n as VaultZustandStore } from "./index-Bg1pcj3n.cjs"; import { Collection, Manifest, Reference, SpecificResource } from "@iiif/presentation-3"; import { CollectionNormalized, ManifestNormalized } from "@iiif/presentation-3-normalized"; import { SerializeConfig } from "@iiif/parser"; //#region rolldown:runtime //#endregion //#region src/vault/utility/objects.d.ts type WrappedObject = { subscribe(subscription: (object: any, vault: Vault) => void, skipInitial?: boolean): () => void; reactive(): void; unreactive(): void; refresh(): void; unwrap(): OG; valueOf(): OG; toPresentation3(): any; toPresentation2(): any; is(refOrObject: any): boolean; toJSON(): any; }; type ReactiveWrapped = {} & WrappedObject & Omit & { items: Full extends { items: (infer A)[]; } ? (Full['items'][number] & ReactiveWrapped)[] : never; annotations: Full extends { annotations: (infer A)[]; } ? ReactiveWrapped[] : never; structures: Full extends { structures: (infer A)[]; } ? ReactiveWrapped[] : never; seeAlso: Full extends { seeAlso: (infer A)[]; } ? ReactiveWrapped[] : never; rendering: Full extends { rendering: (infer A)[]; } ? ReactiveWrapped[] : never; partOf: Full extends { partOf: (infer A)[]; } ? ReactiveWrapped[] : never; start: Full extends { start: (infer A)[]; } ? ReactiveWrapped[] : never; supplementary: Full extends { supplementary: (infer A)[]; } ? ReactiveWrapped[] : never; homepage: Full extends { homepage: (infer A)[]; } ? ReactiveWrapped[] : never; thumbnail: Full extends { thumbnail: (infer A)[]; } ? ReactiveWrapped[] : never; placeholderCanvas: Full extends { placeholderCanvas: (infer A)[]; } ? ReactiveWrapped[] : never; accompanyingCanvas: Full extends { accompanyingCanvas: (infer A)[]; } ? ReactiveWrapped[] : never; provider: Full extends { provider: (infer A)[]; } ? ReactiveWrapped[] : never; body: Full extends { body: (infer A)[]; } ? ReactiveWrapped[] : never; logo: Full extends { logo: (infer A)[]; } ? ReactiveWrapped[] : never; }; declare namespace vault_d_exports { export { EntityRef, GetObjectOptions, GetOptions, Vault, VaultOptions }; } type VaultOptions = { reducers: Record; defaultState?: IIIFStore; customFetcher: (url: string, options: T) => unknown | Promise; enableDevtools: boolean; }; type GetOptions = { skipSelfReturn?: boolean; parent?: Reference | string; preserveSpecificResources?: boolean; skipPartOfCheck?: boolean; }; type GetObjectOptions = GetOptions & { reactive?: boolean; }; type EntityRef = IIIFStore['iiif']['entities'][Ref][string]; declare class Vault { private readonly options; private readonly store; private readonly emitter; private isBatching; private batchQueue; remoteFetcher: (str: string, options?: any, mapper?: (resource: any) => any) => Promise; staticFetcher: (str: string, json: any, mapper?: (resource: any) => any) => Promise | NormalizedEntity | undefined; constructor(options?: Partial, store?: VaultZustandStore); defaultFetcher: (url: string) => Promise; batch(cb: (vault: this) => void): void; asyncBatch(cb: (vault: this) => Promise | void): Promise; modifyEntityField(entity: Reference, key: string, value: any): void; dispatch(action: AllActions | BatchAction): void; on(event: Type | `after:${Type}`, handler: (ctx: { action: ActionFromType; state: IIIFStore; }) => void): () => void; serialize(entity: Reference, config: SerializeConfig): Return; toPresentation2(entity: Reference): Return; toPresentation3(entity: Reference): Return; hydrate(reference: string | Partial, type?: string | GetOptions, options?: GetOptions): RefToNormalized; hydrate(reference: string[] | Partial[], type?: string | GetOptions, options?: GetOptions): RefToNormalized[]; get(reference: string | Partial | Reference | SpecificResource, type?: string | GetOptions, options?: GetOptions): RefToNormalized; get(reference: string[] | Partial[] | Reference[] | SpecificResource[], type?: string | GetOptions, options?: GetOptions): RefToNormalized[]; select(selector: (state: IIIFStore) => R): R; getStore(): VaultZustandStore; getState(): IIIFStore; deep(input?: any, prev?: any): any; loadManifest(id: string | Reference, json?: unknown, mapper?: (resource: any) => any): Promise; loadCollection(id: string | Reference, json?: unknown, mapper?: (resource: any) => any): Promise; load(id: string | Reference, json?: unknown, mapper?: (resource: any) => any): Promise; loadSync(id: string | Reference, json: unknown, mapper?: (resource: any) => any): T | undefined; loadManifestSync(id: string | Reference, json: unknown, mapper?: (resource: any) => any): ManifestNormalized | undefined; loadCollectionSync(id: string | Reference, json: unknown, mapper?: (resource: any) => any): CollectionNormalized | undefined; areInputsEqual(newInputs: readonly unknown[] | unknown, lastInputs: readonly unknown[] | unknown): boolean; subscribe(selector: (state: IIIFStore) => T, subscription: (state: T, vault: Vault) => void, skipInitial: boolean): () => void; subscribe(subscription: (state: T, vault: Vault) => void, skipInitial?: boolean): () => void; ensureLoaded(_id: string | Reference): Promise; requestStatus(id: string): RequestState[any] | undefined; getPaginationState(resource: string | Reference): PaginationState | null; loadNextPage(resource: string | Reference, json?: any): Promise<[PaginationState | null, CollectionNormalized | null]>; getResourceMeta(resource: string): Partial | undefined; getResourceMeta(resource: string, metaKey: Key): T[Key] | undefined; getObject(reference: string | Partial, type?: string | GetObjectOptions, options?: GetObjectOptions): RefToNormalized; loadObject(id: string | Reference, json?: any): Promise>; loadManifestObject(id: string | Reference, json?: any): Promise>; loadCollectionObject(id: string | Reference, json?: any): Promise>; wrapObject(objectType: Reference): ReactiveWrapped; isWrapped(object: any): boolean; setMetaValue([id, meta, key]: [string, string, string], newValueOrUpdate: Value | ((oldValue: Value | undefined) => Value)): void; } //#endregion export { VaultOptions as a, Vault as i, GetObjectOptions as n, vault_d_exports as o, GetOptions as r, EntityRef as t }; //# sourceMappingURL=vault-CyivjwVV.d.cts.map