@embedpdf/engine-core 3.0.0-next.12 → 3.0.0-next.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/{AbortError-CRSooKsk.cjs → AbortError-Cq2igpZ6.cjs} +2 -2
  2. package/dist/{AbortError-CRSooKsk.cjs.map → AbortError-Cq2igpZ6.cjs.map} +1 -1
  3. package/dist/{AbortError-8-9JAX1Y.js → AbortError-DHqPBnYc.js} +2 -2
  4. package/dist/{AbortError-8-9JAX1Y.js.map → AbortError-DHqPBnYc.js.map} +1 -1
  5. package/dist/{AnnotationListSnapshot-x6tKulNV.d.cts → AnnotationListSnapshot-D3mFut1e.d.cts} +1155 -171
  6. package/dist/{AnnotationListSnapshot-x6tKulNV.d.ts → AnnotationListSnapshot-D3mFut1e.d.ts} +1155 -171
  7. package/dist/{DocumentSecurityService-CK0pejAK.d.cts → DocumentSecurityService-ClTZc0zO.d.cts} +2 -2
  8. package/dist/{DocumentSecurityService-9MawYxP-.d.ts → DocumentSecurityService-_JRjqvoI.d.ts} +2 -2
  9. package/dist/{Engine-Ds0ytbl6.d.ts → Engine-Bx0NOfmd.d.cts} +166 -11
  10. package/dist/{Engine--0XF0UAK.d.cts → Engine-DxtpCYcP.d.ts} +166 -11
  11. package/dist/{PageInsertBlankInput-CzShuSJI.cjs → PageInsertBlankInput-CqXBmFhN.cjs} +37 -2
  12. package/dist/PageInsertBlankInput-CqXBmFhN.cjs.map +1 -0
  13. package/dist/{PageInsertBlankInput-WKY0tr6S.js → PageInsertBlankInput-cHq9-i-z.js} +37 -2
  14. package/dist/PageInsertBlankInput-cHq9-i-z.js.map +1 -0
  15. package/dist/{builders-8Hl1AYNU.cjs → builders-Bqm8yTpi.cjs} +1470 -4
  16. package/dist/builders-Bqm8yTpi.cjs.map +1 -0
  17. package/dist/{builders-DOjcKDWQ.js → builders-Dqo2X-dt.js} +1351 -5
  18. package/dist/builders-Dqo2X-dt.js.map +1 -0
  19. package/dist/conformance.cjs +1079 -13
  20. package/dist/conformance.cjs.map +1 -1
  21. package/dist/conformance.d.cts +70 -3
  22. package/dist/conformance.d.ts +70 -3
  23. package/dist/conformance.js +1079 -14
  24. package/dist/conformance.js.map +1 -1
  25. package/dist/{fold-C7I5GpBz.cjs → fold-2V29cxCV.cjs} +2 -2
  26. package/dist/{fold-C7I5GpBz.cjs.map → fold-2V29cxCV.cjs.map} +1 -1
  27. package/dist/{fold-BfyxxwS6.js → fold-CdEJTBTn.js} +2 -2
  28. package/dist/{fold-BfyxxwS6.js.map → fold-CdEJTBTn.js.map} +1 -1
  29. package/dist/index.cjs +33 -4
  30. package/dist/index.d.cts +2 -2
  31. package/dist/index.d.ts +2 -2
  32. package/dist/index.js +5 -5
  33. package/dist/{resolver-D-jumvgM.cjs → resolver-CYVNV4hn.cjs} +216 -10
  34. package/dist/resolver-CYVNV4hn.cjs.map +1 -0
  35. package/dist/{resolver-CHG4waXL.js → resolver-inAVzsWt.js} +157 -11
  36. package/dist/resolver-inAVzsWt.js.map +1 -0
  37. package/dist/runtime.cjs +34 -5
  38. package/dist/runtime.d.cts +192 -5
  39. package/dist/runtime.d.ts +192 -5
  40. package/dist/runtime.js +6 -6
  41. package/dist/{schemas-DOyVEPk7.js → schemas-BLARNCgx.js} +420 -4
  42. package/dist/schemas-BLARNCgx.js.map +1 -0
  43. package/dist/{schemas-RChsAMWw.cjs → schemas-DIqFMmrC.cjs} +581 -3
  44. package/dist/schemas-DIqFMmrC.cjs.map +1 -0
  45. package/dist/wire.cjs +228 -12
  46. package/dist/wire.cjs.map +1 -1
  47. package/dist/wire.d.cts +415 -4
  48. package/dist/wire.d.ts +415 -4
  49. package/dist/wire.js +199 -13
  50. package/dist/wire.js.map +1 -1
  51. package/package.json +1 -1
  52. package/dist/PageInsertBlankInput-CzShuSJI.cjs.map +0 -1
  53. package/dist/PageInsertBlankInput-WKY0tr6S.js.map +0 -1
  54. package/dist/builders-8Hl1AYNU.cjs.map +0 -1
  55. package/dist/builders-DOjcKDWQ.js.map +0 -1
  56. package/dist/resolver-CHG4waXL.js.map +0 -1
  57. package/dist/resolver-D-jumvgM.cjs.map +0 -1
  58. package/dist/schemas-DOyVEPk7.js.map +0 -1
  59. package/dist/schemas-RChsAMWw.cjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolver-inAVzsWt.js","names":[],"sources":["../src/signature/protection.ts","../src/auth/scope/errors.ts","../src/auth/scope/parser.ts","../src/auth/scope/resolver.ts"],"sourcesContent":["import type { DocCapability } from '../auth/scope/types';\nimport type {\n DocMdpPermission,\n DocumentFieldLock,\n DocumentProtection,\n FieldLockSpec,\n ModificationLevel,\n SignatureDTO,\n} from './types';\n\n/**\n * Bumped whenever the derivation below (or a judgement rule) changes meaning.\n * Rides every protection and every analysis, and keys the cloud's immutable\n * analysis URLs. v4 (the `signature-compat` corpus, 91 Acrobat observations):\n * each signature is judged on the net state of the document against the\n * revision it sealed; an object written again with the sealed value is not\n * a modification; an approval signature permits commenting; field\n * properties are judged per level; a lock binds only the signature that\n * declares it; a changed shared resource must be allowed by every use.\n */\nexport const SIGNATURE_POLICY_VERSION = 4;\n\n/**\n * How a validator reads an approval signature. ISO 32000 defines permitted\n * changes only for certification signatures; Acrobat reads an approval\n * signature as \"Form Fill-in, Signing and Commenting are allowed\" (its own\n * permission text under every such signature) and keeps it valid through a\n * Square annotation added, deleted or recoloured afterwards (corpus\n * `signature-compat` v3 cases 88, 90, 91: \"Annotations Created/Deleted/\n * Modified\", signature valid). pyHanko judges stricter (fill only); Acrobat\n * is the validator recipients use, so the baseline is `annotate`.\n */\nexport const APPROVAL_BASELINE: ModificationLevel = 'annotate';\n\nconst LEVEL_RANK: Record<ModificationLevel, number> = { none: 0, lta: 1, fill: 2, annotate: 3 };\n\n/** DocMDP `/P` → the modification level it permits. */\nexport function levelFromPermission(permission: DocMdpPermission): ModificationLevel {\n return permission === 1 ? 'lta' : permission === 2 ? 'fill' : 'annotate';\n}\n\nexport function minLevel(a: ModificationLevel, b: ModificationLevel): ModificationLevel {\n return LEVEL_RANK[a] <= LEVEL_RANK[b] ? a : b;\n}\n\n/** Whether `level` (null = unsigned, everything allowed) permits changes of kind `needed`. */\nexport function levelAllows(level: ModificationLevel | null, needed: ModificationLevel): boolean {\n return level === null || LEVEL_RANK[level] >= LEVEL_RANK[needed];\n}\n\n/** Hierarchical name match: `group` covers `group.total`. */\nexport function lockNameCovers(lockedName: string, fieldName: string): boolean {\n return fieldName === lockedName || fieldName.startsWith(`${lockedName}.`);\n}\n\nexport function lockCovers(spec: FieldLockSpec, fieldName: string): boolean {\n switch (spec.action) {\n case 'all':\n return true;\n case 'include':\n return spec.fields.some((name) => lockNameCovers(name, fieldName));\n case 'exclude':\n return !spec.fields.some((name) => lockNameCovers(name, fieldName));\n }\n}\n\n/**\n * Derive what the signatures already in a document mean for what comes\n * after. Pure and versioned (`SIGNATURE_POLICY_VERSION`); the same function\n * runs in the browser worker, on the native server, and in the conformance\n * suite.\n *\n * enforced = min(certification P, every signed field's /Lock /P), or null\n * when nothing was declared. What the engine refuses.\n * judged = enforced, or the approval baseline when signatures exist\n * without a declaration, or null when nothing is signed. What\n * the revision analysis judges later changes against. A\n * declaration governs the judgement too: a P=3 certifier really\n * did allow annotations.\n * fieldLocks = every signed signature's FieldMDP and the /Lock of every\n * signed field. Unsigned fields' /Lock entries describe a\n * FUTURE signature and lock nothing yet.\n */\nexport function deriveProtection(signatures: ReadonlyArray<SignatureDTO>): DocumentProtection {\n let signed = false;\n let enforced: ModificationLevel | null = null;\n let certification: DocumentProtection['certification'] = null;\n const fieldLocks: DocumentFieldLock[] = [];\n\n for (const sig of signatures) {\n if (!sig.signed) continue;\n signed = true;\n if (sig.catalogCertification && sig.docMdp !== null && certification === null) {\n certification = { signatureIndex: sig.index, permission: sig.docMdp };\n enforced = minLevel(enforced ?? 'annotate', levelFromPermission(sig.docMdp));\n }\n if (sig.fieldMdp) {\n fieldLocks.push({ signatureIndex: sig.index, source: 'fieldmdp', spec: sig.fieldMdp });\n }\n if (sig.lock) {\n fieldLocks.push({ signatureIndex: sig.index, source: 'lock', spec: sig.lock });\n if (sig.lock.permission !== undefined) {\n enforced = minLevel(enforced ?? 'annotate', levelFromPermission(sig.lock.permission));\n }\n }\n }\n\n const judged = signed ? (enforced ?? APPROVAL_BASELINE) : null;\n return { enforced, judged, certification, fieldLocks, policyVersion: SIGNATURE_POLICY_VERSION };\n}\n\n/** The lock that freezes `fieldName`, if any. */\nexport function fieldLockFor(\n protection: DocumentProtection,\n fieldName: string,\n): DocumentFieldLock | null {\n for (const lock of protection.fieldLocks) {\n if (lockCovers(lock.spec, fieldName)) return lock;\n }\n return null;\n}\n\n/**\n * The capabilities a protection removes from every caller, admin scope\n * included — document-derived authority, exactly like encryption bits.\n *\n * Only what was DECLARED is refused: a refusal is a promise a signer made,\n * never a guess about a validator. A certification (or a lock with /P)\n * declares what may follow, and everything outside that — page edits,\n * redaction, field authoring, attachments, and below P=3 annotations, below\n * P=2 form fill — is refused. A plain approval signature declares nothing:\n * the same edits stay possible and are then JUDGED, the verdict saying the\n * signature no longer holds, exactly as Acrobat does. The one exception is a\n * rewrite: it does not invalidate signatures, it erases them, so any signed\n * document refuses it. Per-field locks are enforced by the form mutator.\n */\nexport function protectedCapabilities(protection: DocumentProtection | null): Set<DocCapability> {\n const out = new Set<DocCapability>();\n if (!protection || protection.judged === null) return out;\n out.add('doc.download.flattened');\n if (protection.enforced === null) return out; // nothing declared: judged, not refused\n out.add('doc.pages.modify');\n out.add('doc.pages.assemble');\n out.add('doc.redact');\n out.add('doc.attachments.modify');\n out.add('doc.forms.modify');\n if (!levelAllows(protection.enforced, 'annotate')) out.add('doc.annotate.modify');\n if (!levelAllows(protection.enforced, 'fill')) out.add('doc.forms.fill');\n return out;\n}\n","/**\n * Thrown by {@link parseScope} / {@link validateScopeArray} when a scope\n * string does not match any known grammar (capability, collab, virtual,\n * or wildcard).\n *\n * Carries the offending scope verbatim so route/JWT-layer error\n * handlers can echo it to the customer.\n */\nexport class InvalidScope extends Error {\n constructor(\n public readonly scope: string,\n reason: string,\n ) {\n super(`invalid scope \"${scope}\": ${reason}`);\n this.name = 'InvalidScope';\n }\n}\n\n/**\n * Thrown by route guards and engine-local enforcement when a capability\n * or collab action is denied for the current request/handle.\n *\n * `required` names what the caller needed (e.g., \"doc.render\" or\n * \"annotations:update\"). `context` is an optional label such as \"local\"\n * or \"/v1/docs/.../pages/2/render\".\n */\nexport class PermissionDenied extends Error {\n constructor(\n public readonly required: string,\n public readonly context?: string,\n ) {\n super(`permission denied${context ? ` (${context})` : ''}: ${required}`);\n this.name = 'PermissionDenied';\n }\n}\n\n/**\n * Thrown at engine-local open time when the supplied scope includes\n * collab filters (`:self`, `:group=...`) but the identity claims needed\n * to resolve them are missing. Fails loudly at open so the configuration\n * mistake is visible immediately instead of producing silent denies at\n * every annotation mutation.\n */\nexport class MissingIdentity extends Error {\n constructor(scope: string) {\n super(`scope \"${scope}\" requires identity claims (user_id and/or groups)`);\n this.name = 'MissingIdentity';\n }\n}\n","import { InvalidScope } from './errors';\nimport type { CollabAction, CollabFilter, DocCapability, ParsedScope } from './types';\n\n/**\n * Closed set of recognized capability strings. Membership is the\n * authoritative source of truth — adding a new capability requires\n * extending the `DocCapability` union AND adding it here. The parser\n * rejects anything outside this set.\n *\n * Removed legacy names (e.g., `doc.read`, `doc.edit-pages`, `doc.save`)\n * are deliberately absent so any JWT carrying them fails at verify\n * time with a clear error.\n */\nconst KNOWN_CAPABILITIES: ReadonlySet<DocCapability> = new Set([\n 'doc.open',\n 'doc.render',\n 'doc.text.select',\n 'doc.text.copy',\n 'doc.text.search',\n 'doc.content.copy',\n 'doc.download',\n 'doc.download.flattened',\n 'doc.print',\n 'doc.print.high',\n 'doc.pages.modify',\n 'doc.pages.assemble',\n 'doc.forms.read',\n 'doc.forms.fill',\n 'doc.forms.modify',\n 'doc.forms.submit',\n 'doc.annotate.read',\n 'doc.annotate.modify',\n 'doc.metadata.modify',\n 'doc.attachments.modify',\n 'doc.redact',\n 'doc.sign',\n 'doc.sign.certify',\n]);\n\n/**\n * Parse a single scope string into a structured `ParsedScope`.\n *\n * Recognised shapes:\n * - `\"*\"` → wildcard\n * - `\"pdf.permissions\"` → virtual (expands at resolve time)\n * - `\"a.b.c...\"` (dotted) → capability\n * - `\"entity:action:filter\"` (colons) → collab\n *\n * Throws {@link InvalidScope} for any string that fails to match one of\n * those shapes, or whose capability/entity/action/filter is not in the\n * closed enum.\n */\nexport function parseScope(raw: string): ParsedScope {\n if (raw === '*') return { kind: 'wildcard' };\n if (raw === 'pdf.permissions') return { kind: 'virtual', name: 'pdf.permissions' };\n if (raw.includes(':')) return parseCollab(raw);\n return parseCapability(raw);\n}\n\n/**\n * Validate every entry in a scope array by attempting to parse it.\n * Throws on the first invalid string. Discards the parse output —\n * callers re-parse at resolution time to keep the array as the\n * authoritative payload.\n */\nexport function validateScopeArray(raw: ReadonlyArray<string>): void {\n for (const s of raw) parseScope(s);\n}\n\nfunction parseCollab(raw: string): ParsedScope {\n // Split on the FIRST two colons only. Filter values may contain\n // colons (UUIDs with `urn:uuid:...`, subject ids like `auth0|user:1`).\n const idx1 = raw.indexOf(':');\n const idx2 = raw.indexOf(':', idx1 + 1);\n if (idx1 === -1 || idx2 === -1) {\n throw new InvalidScope(raw, 'collab scope requires entity:action:filter');\n }\n const entity = raw.slice(0, idx1);\n const action = raw.slice(idx1 + 1, idx2);\n const filterStr = raw.slice(idx2 + 1);\n\n if (entity !== 'annotations') {\n throw new InvalidScope(raw, `unknown collab entity: ${entity}`);\n }\n if (\n action !== 'create' &&\n action !== 'update' &&\n action !== 'delete' &&\n action !== 'set-group' &&\n action !== '*'\n ) {\n throw new InvalidScope(raw, `unknown collab action: ${action}`);\n }\n const filter = parseFilter(filterStr, raw);\n\n // `set-group` is a group-assignment authority, not a per-record collab\n // filter. The only meaningful filter values are `all` (assign to any\n // group) and `group=X` (assign to group X). `:self` and `:createdBy=Y`\n // can't be sensibly applied to \"what group is this annotation in\", so\n // we reject them at parse time rather than silently always-denying.\n if (action === 'set-group' && (filter.kind === 'self' || filter.kind === 'createdBy')) {\n throw new InvalidScope(\n raw,\n `set-group only supports :all or :group=<id> filters (got :${filter.kind})`,\n );\n }\n\n return {\n kind: 'collab',\n entity,\n action: action as CollabAction | '*',\n filter,\n };\n}\n\nfunction parseFilter(s: string, raw: string): CollabFilter {\n if (s === 'all') return { kind: 'all' };\n if (s === 'self') return { kind: 'self' };\n if (s.startsWith('createdBy=')) {\n const v = s.slice('createdBy='.length);\n if (!v) throw new InvalidScope(raw, 'createdBy= requires a value');\n return { kind: 'createdBy', userId: v };\n }\n if (s.startsWith('group=')) {\n const v = s.slice('group='.length);\n if (!v) throw new InvalidScope(raw, 'group= requires a value');\n return { kind: 'group', groupId: v };\n }\n throw new InvalidScope(raw, `unknown filter: ${s}`);\n}\n\n// Capability shape: lowercase dotted segments, e.g. \"doc.text.copy\".\n// Validates shape first, then membership in the closed set.\nconst CAPABILITY_SHAPE = /^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$/;\n\nfunction parseCapability(raw: string): ParsedScope {\n if (!CAPABILITY_SHAPE.test(raw)) {\n throw new InvalidScope(raw, 'invalid capability name shape');\n }\n if (!KNOWN_CAPABILITIES.has(raw as DocCapability)) {\n throw new InvalidScope(raw, `unknown capability: ${raw}`);\n }\n return { kind: 'capability', name: raw as DocCapability };\n}\n","import { parseScope } from './parser';\nimport type {\n CollabAction,\n CollabFilter,\n DocCapability,\n IdentityClaims,\n ParsedScope,\n PdfBits,\n} from './types';\nimport { protectedCapabilities } from '../../signature/protection';\nimport type { DocumentProtection } from '../../signature/types';\n\n/**\n * Resolved collab subject — the per-record identity bits used to test\n * collab filters against. Sourced from the target record's stored\n * `/EMBD_Metadata/UserID` and `/GroupID` at mutation time.\n */\nexport interface CollabTarget {\n userId?: string;\n groupId?: string;\n}\n\n/**\n * True iff the given capability is granted by the scope array plus the\n * PDF bits visible via `pdf.permissions` expansion.\n *\n * Wildcard `*` short-circuits to true. Anything not explicitly granted\n * (or expanded from `pdf.permissions`) is denied.\n */\nexport function checkCapability(\n capability: DocCapability,\n rawScope: ReadonlyArray<string>,\n pdfBits: PdfBits,\n protection: DocumentProtection | null = null,\n): boolean {\n // Document-derived authority comes first: what the signatures in the\n // file forbid, no scope grants — the wildcard included.\n if (protectedCapabilities(protection).has(capability)) return false;\n const parsed = rawScope.map(parseScope);\n if (parsed.some((s) => s.kind === 'wildcard')) return true;\n return expandedCapabilities(parsed, pdfBits, protection).has(capability);\n}\n\n/**\n * True iff the scope grants AT LEAST ONE of `capabilities`. Convenience\n * for routes like `/text` (`doc.text.copy` OR `doc.text.search`) and\n * `/geometry` (`doc.text.select` OR `doc.text.search`).\n */\nexport function checkAnyCapability(\n capabilities: ReadonlyArray<DocCapability>,\n rawScope: ReadonlyArray<string>,\n pdfBits: PdfBits,\n protection: DocumentProtection | null = null,\n): boolean {\n return capabilities.some((c) => checkCapability(c, rawScope, pdfBits, protection));\n}\n\n/**\n * True iff the scope grants the collab action against the target record.\n *\n * Narrowing model. For each action independently:\n * 1. wildcard `*` → allow (global escape hatch)\n * 2. if any collab scope applies to this action → NARROW: only those\n * collab filters decide. If none match the target, deny — even if\n * `doc.annotate.modify` is also present. This is what makes\n * `[modify, update:self]` correctly mean \"edit own only\" rather\n * than \"edit anyone via modify-bypass.\"\n * 3. otherwise, if `doc.annotate.modify` is present → allow. This is\n * the broad PDF-bit-derived default for create/update/delete when\n * no per-action collab filter has been written.\n * 4. otherwise → deny.\n *\n * For create: `target` should be built by the caller from JWT identity\n * (`{ userId: caller.user_id, groupId: caller.group_id }`). `:self` and\n * `:all` then trivially pass; `:group=X` is the meaningful filter (only\n * matches when the caller's default group is X).\n *\n * For update / delete: `target` is the existing row's owner.\n */\nexport function checkCollab(\n action: CollabAction,\n target: CollabTarget,\n rawScope: ReadonlyArray<string>,\n identity: IdentityClaims,\n pdfBits: PdfBits,\n): boolean {\n const parsed = rawScope.map(parseScope);\n if (parsed.some((s) => s.kind === 'wildcard')) return true;\n\n const applicableCollab = parsed.filter(\n (s): s is Extract<ParsedScope, { kind: 'collab' }> =>\n s.kind === 'collab' &&\n s.entity === 'annotations' &&\n (s.action === action || s.action === '*'),\n );\n\n if (applicableCollab.length > 0) {\n // Narrow: presence of any applicable collab scope shadows\n // `modify`-as-default for this action.\n return applicableCollab.some((s) => filterMatches(s.filter, target, identity));\n }\n\n // No collab scope for this action — fall back to the broad default.\n return expandedCapabilities(parsed, pdfBits).has('doc.annotate.modify');\n}\n\n/**\n * Compute the full set of granted capabilities after expanding\n * `pdf.permissions` and applying implication rules.\n *\n * Implications applied:\n * - `doc.annotate.modify` implies `doc.annotate.read` (you can't\n * sensibly modify what you can't see).\n * - `doc.forms.modify` implies `doc.forms.fill` and `doc.forms.read`.\n * - `doc.forms.fill` implies `doc.forms.read`.\n * - any annotation collab scope implies `doc.annotate.read`, because\n * mutation routes need to see the target row to evaluate the\n * collab filter against its current owner.\n *\n * Does NOT short-circuit on wildcard — callers do that themselves\n * before calling this. Returning the expanded set is useful for the\n * `/access` response's `effectiveScope` and for advisory UI surfacing.\n */\nexport function expandedCapabilities(\n parsed: ReadonlyArray<ParsedScope>,\n pdfBits: PdfBits,\n protection: DocumentProtection | null = null,\n): Set<DocCapability> {\n const out = new Set<DocCapability>();\n let hasAnnotationCollab = false;\n\n for (const s of parsed) {\n if (s.kind === 'capability') {\n out.add(s.name);\n } else if (s.kind === 'virtual' && s.name === 'pdf.permissions') {\n addPdfPermissions(out, pdfBits);\n } else if (s.kind === 'collab' && s.entity === 'annotations') {\n hasAnnotationCollab = true;\n }\n }\n\n // Implications (apply after the explicit additions above)\n if (out.has('doc.annotate.modify')) out.add('doc.annotate.read');\n if (out.has('doc.forms.modify')) {\n out.add('doc.forms.fill');\n out.add('doc.forms.read');\n }\n if (out.has('doc.forms.fill')) out.add('doc.forms.read');\n if (hasAnnotationCollab) out.add('doc.annotate.read');\n\n // Subtraction last: a signed document's own restrictions win over any\n // grant or implication.\n for (const removed of protectedCapabilities(protection)) out.delete(removed);\n\n return out;\n}\n\n/**\n * Convenience wrapper: takes the raw scope array, parses each entry,\n * returns the expanded capability set. Exposed for the `/access`\n * endpoint and for the SDK helper that surfaces `effectiveScope`.\n */\nexport function expandRawScope(\n rawScope: ReadonlyArray<string>,\n pdfBits: PdfBits,\n protection: DocumentProtection | null = null,\n): Set<DocCapability> {\n return expandedCapabilities(rawScope.map(parseScope), pdfBits, protection);\n}\n\n/**\n * Test a single collab filter against a target record + the caller's\n * identity. Pure function — no side effects, no implicit rules.\n *\n * all → always matches\n * self → matches if identity.user_id === target.userId\n * createdBy=<X> → matches if target.userId === X\n * group=<X> → matches if target.groupId === X\n * AND identity.groups includes X\n *\n * The group-membership check on `group=X` prevents a token from\n * matching annotations in a group it doesn't belong to, even if the\n * target row carries that groupId.\n */\n/**\n * Authority to assign a specific groupId to an annotation.\n *\n * Set-group is decoupled from `doc.annotate.modify`. The reasoning:\n * capabilities like `modify` describe row access — what kind of write\n * you can do to which existing rows — and map to PDF permission bits.\n * Set-group is a cloud-only *assignment authority*: which destination\n * group can you put an annotation into? There is no PDF-bit\n * counterpart, so it doesn't inherit from `modify`.\n *\n * Resolution order:\n * 1. newGroupId === callerDefaultGroupId → true (no real reassignment\n * is happening; the annotation gets the caller's default group)\n * 2. wildcard `*` → true (global escape hatch)\n * 3. `annotations:set-group:all` → true\n * 4. `annotations:set-group:group=<newGroupId>` → true\n * 5. `annotations:*:all` or `annotations:*:group=<newGroupId>` → true\n * (action wildcard includes set-group)\n * 6. otherwise → false\n *\n * Note: independent from membership. A user with\n * `set-group:group=legal` can assign annotations to the legal group\n * even if they're not a member — that's the whole point.\n */\nexport function checkSetGroup(\n newGroupId: string,\n callerDefaultGroupId: string | undefined,\n rawScope: ReadonlyArray<string>,\n _pdfBits: PdfBits,\n): boolean {\n // No authority needed when the caller is assigning their default group.\n if (newGroupId === callerDefaultGroupId) return true;\n\n const parsed = rawScope.map(parseScope);\n if (parsed.some((s) => s.kind === 'wildcard')) return true;\n\n for (const s of parsed) {\n if (s.kind !== 'collab') continue;\n if (s.entity !== 'annotations') continue;\n if (s.action !== 'set-group' && s.action !== '*') continue;\n if (s.filter.kind === 'all') return true;\n if (s.filter.kind === 'group' && s.filter.groupId === newGroupId) return true;\n // :self and :createdBy are rejected at parse time for set-group, so\n // they never appear here. The action-wildcard path could carry those\n // filters legitimately for other actions — silently skip those, they\n // can't satisfy a set-group check.\n }\n return false;\n}\n\nexport function filterMatches(\n filter: CollabFilter,\n target: CollabTarget,\n id: IdentityClaims,\n): boolean {\n switch (filter.kind) {\n case 'all':\n return true;\n case 'self':\n return !!id.user_id && target.userId === id.user_id;\n case 'createdBy':\n return target.userId === filter.userId;\n case 'group':\n return target.groupId === filter.groupId && (id.groups?.includes(filter.groupId) ?? false);\n }\n}\n\n/**\n * Translate `pdf.permissions` (virtual scope) into the concrete\n * capabilities it represents under the current PDF bit configuration.\n *\n * Always adds `doc.open` and `doc.render` — these are cloud-only\n * capabilities with no PDF bit, but `pdf.permissions` is meant to be\n * the \"give the user a working session\" shorthand. Without them, a\n * token with just `['pdf.permissions']` would be useless.\n *\n * Reads are unconditional: ISO 32000 / Acrobat let any reader see\n * existing annotations and form values regardless of permission bits.\n * Bit 6 governs *writing*, not visibility.\n *\n * Bit-derived expansions follow ISO 32000:\n * bit 5 → doc.text.{select, copy, search}, doc.content.copy\n * bit 3 → doc.print\n * bit 12 → doc.print.high (requires bit 3 also set)\n * bit 4 → doc.pages.modify, doc.redact, doc.metadata.modify, doc.attachments.modify\n * bit 11 → doc.pages.assemble\n * bit 6 → doc.annotate.modify\n * bit 6/9 → doc.forms.fill\n * bit 6+4 → doc.forms.modify\n *\n * Note: this same expansion lives in builders.ts as\n * `materializePdfPermissions` for SDK-side use. The two MUST stay in\n * sync; a test in resolver.test.ts pins them together.\n */\nfunction addPdfPermissions(out: Set<DocCapability>, b: PdfBits): void {\n // Always — pdf.permissions means \"give me a working session\"\n out.add('doc.open');\n out.add('doc.render');\n // Reading existing annotations and form values is unconditional —\n // PDF bit 6 governs writes, not visibility.\n out.add('doc.annotate.read');\n out.add('doc.forms.read');\n\n if (b.bit5) {\n out.add('doc.text.select');\n out.add('doc.text.copy');\n out.add('doc.text.search');\n out.add('doc.content.copy');\n }\n if (b.bit3) out.add('doc.print');\n if (b.bit12 && b.bit3) out.add('doc.print.high');\n if (b.bit4) {\n out.add('doc.pages.modify');\n out.add('doc.redact');\n out.add('doc.metadata.modify');\n out.add('doc.attachments.modify');\n }\n if (b.bit11) out.add('doc.pages.assemble');\n if (b.bit6) {\n out.add('doc.annotate.modify');\n }\n if (b.bit6 || b.bit9) {\n out.add('doc.forms.fill');\n out.add('doc.sign');\n }\n if (b.bit6 && b.bit4) out.add('doc.forms.modify');\n}\n"],"mappings":"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"}
package/dist/runtime.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_builders = require("./builders-8Hl1AYNU.cjs");
3
- const require_fold = require("./fold-C7I5GpBz.cjs");
4
- const require_PageInsertBlankInput = require("./PageInsertBlankInput-CzShuSJI.cjs");
5
- const require_resolver = require("./resolver-D-jumvgM.cjs");
6
- const require_AbortError = require("./AbortError-CRSooKsk.cjs");
2
+ const require_builders = require("./builders-Bqm8yTpi.cjs");
3
+ const require_fold = require("./fold-2V29cxCV.cjs");
4
+ const require_PageInsertBlankInput = require("./PageInsertBlankInput-CqXBmFhN.cjs");
5
+ const require_resolver = require("./resolver-CYVNV4hn.cjs");
6
+ const require_AbortError = require("./AbortError-Cq2igpZ6.cjs");
7
7
  //#region src/promise/AbortablePromise.ts
8
8
  let _Symbol$species;
9
9
  _Symbol$species = Symbol.species;
@@ -361,8 +361,10 @@ exports.ANNOTATION_SUBTYPES = require_PageInsertBlankInput.ANNOTATION_SUBTYPES;
361
361
  exports.AbortError = require_AbortError.AbortError;
362
362
  exports.AbortablePromise = AbortablePromise;
363
363
  exports.CONTINUOUS_RENDER_POLICY = CONTINUOUS_RENDER_POLICY;
364
+ exports.DEFAULT_EDGE_RESOLVER_BUDGET = require_builders.DEFAULT_EDGE_RESOLVER_BUDGET;
364
365
  exports.DEFAULT_PDF_SAVE_MODE = require_builders.DEFAULT_PDF_SAVE_MODE;
365
366
  exports.EMPTY_TRANSFER = EMPTY_TRANSFER;
367
+ exports.EdgeResolver = require_builders.EdgeResolver;
366
368
  exports.EngineError = require_fold.EngineError;
367
369
  exports.EngineErrorCode = require_PageInsertBlankInput.EngineErrorCode;
368
370
  exports.InvalidScope = require_resolver.InvalidScope;
@@ -377,9 +379,12 @@ exports.PermissionDenied = require_resolver.PermissionDenied;
377
379
  exports.SEARCH_FOLD_VERSION = require_fold.SEARCH_FOLD_VERSION;
378
380
  exports.SEARCH_REGEX_MAX_LENGTH = require_builders.SEARCH_REGEX_MAX_LENGTH;
379
381
  exports.SEARCH_SNIPPET_CONTEXT = require_builders.SEARCH_SNIPPET_CONTEXT;
382
+ exports.SIGNATURE_POLICY_VERSION = require_resolver.SIGNATURE_POLICY_VERSION;
380
383
  exports.UNKNOWN_WEAK_ANNOTATION_STATE = require_builders.UNKNOWN_WEAK_ANNOTATION_STATE;
384
+ exports.USAGE_INCOMPLETE = require_builders.USAGE_INCOMPLETE;
381
385
  exports.advisoryFromPdfBits = advisoryFromPdfBits;
382
386
  exports.appearanceImpactOf = require_builders.appearanceImpactOf;
387
+ exports.assessmentOf = require_builders.assessmentOf;
383
388
  exports.boundaryTextOffset = require_PageInsertBlankInput.boundaryTextOffset;
384
389
  exports.buildCommentThreads = require_builders.buildCommentThreads;
385
390
  exports.buildPageTextLayout = require_builders.buildPageTextLayout;
@@ -387,6 +392,7 @@ exports.buildSnippet = require_builders.buildSnippet;
387
392
  exports.buildThreads = require_builders.buildThreads;
388
393
  exports.canonicalSearchQuery = require_builders.canonicalSearchQuery;
389
394
  exports.caps = require_builders.caps;
395
+ exports.changedKeys = require_builders.changedKeys;
390
396
  exports.changesAnnotationList = require_builders.changesAnnotationList;
391
397
  exports.charBoundaryAtTextOffset = require_PageInsertBlankInput.charBoundaryAtTextOffset;
392
398
  exports.charMapViolation = require_PageInsertBlankInput.charMapViolation;
@@ -397,18 +403,24 @@ exports.checkCollab = require_resolver.checkCollab;
397
403
  exports.checkSetGroup = require_resolver.checkSetGroup;
398
404
  exports.classifyRelation = require_builders.classifyRelation;
399
405
  exports.collab = require_builders.collab;
406
+ exports.combine = require_builders.combine;
407
+ exports.conclude = require_builders.conclude;
400
408
  exports.createPageImageHandle = require_builders.createPageImageHandle;
401
409
  exports.decodeFieldRefKey = require_builders.decodeFieldRefKey;
402
410
  exports.decodePdfBits = require_builders.decodePdfBits;
403
411
  exports.decodeStableIdKey = require_builders.decodeStableIdKey;
404
412
  exports.decodeSubmitFormFlags = require_builders.decodeSubmitFormFlags;
413
+ exports.deriveProtection = require_resolver.deriveProtection;
405
414
  exports.deserializeError = require_fold.deserializeError;
415
+ exports.dictEntries = require_builders.dictEntries;
406
416
  exports.encodeFieldRefKey = require_builders.encodeFieldRefKey;
407
417
  exports.encodeStableIdKey = require_builders.encodeStableIdKey;
418
+ exports.evaluateStep = require_builders.evaluateStep;
408
419
  exports.expandRawScope = require_resolver.expandRawScope;
409
420
  exports.expandTextRangeToLine = require_builders.expandTextRangeToLine;
410
421
  exports.expandTextRangeToWord = require_builders.expandTextRangeToWord;
411
422
  exports.expandedCapabilities = require_resolver.expandedCapabilities;
423
+ exports.fieldLockFor = require_resolver.fieldLockFor;
412
424
  exports.filterMatches = require_resolver.filterMatches;
413
425
  exports.foldOptionsFor = require_builders.foldOptionsFor;
414
426
  exports.foldText = require_fold.foldText;
@@ -420,14 +432,20 @@ exports.isRotatedGeometryRun = require_fold.isRotatedGeometryRun;
420
432
  exports.isStateAnnotation = require_builders.isStateAnnotation;
421
433
  exports.isValidPageObjectNumber = require_builders.isValidPageObjectNumber;
422
434
  exports.knownWeakAnnotationState = require_builders.knownWeakAnnotationState;
435
+ exports.levelAllows = require_resolver.levelAllows;
436
+ exports.levelFromPermission = require_resolver.levelFromPermission;
437
+ exports.lockCovers = require_resolver.lockCovers;
438
+ exports.lockNameCovers = require_resolver.lockNameCovers;
423
439
  exports.matchLiteral = require_builders.matchLiteral;
424
440
  exports.matchPageText = require_builders.matchPageText;
425
441
  exports.matchRegex = require_builders.matchRegex;
426
442
  exports.materializePdfPermissions = require_builders.materializePdfPermissions;
443
+ exports.minLevel = require_resolver.minLevel;
427
444
  exports.normalizeAnnotationDraft = require_builders.normalizeAnnotationDraft;
428
445
  exports.normalizeAnnotationPatch = require_builders.normalizeAnnotationPatch;
429
446
  exports.normalizeAttachmentFileSource = require_builders.normalizeAttachmentFileSource;
430
447
  exports.normalizePdfRect = require_fold.normalizePdfRect;
448
+ exports.parsePdfValue = require_builders.parsePdfValue;
431
449
  exports.parseScope = require_resolver.parseScope;
432
450
  exports.passwordPromptFromState = passwordPromptFromState;
433
451
  exports.pdfPermissions = require_builders.pdfPermissions;
@@ -439,11 +457,20 @@ exports.pdfRectHeight = require_fold.pdfRectHeight;
439
457
  exports.pdfRectSize = require_fold.pdfRectSize;
440
458
  exports.pdfRectToOriginSize = require_fold.pdfRectToOriginSize;
441
459
  exports.pdfRectWidth = require_fold.pdfRectWidth;
460
+ exports.pdfValueEquals = require_builders.pdfValueEquals;
442
461
  exports.permissionInfoFromProbe = permissionInfoFromProbe;
443
462
  exports.permissionInfoWithAdvisory = permissionInfoWithAdvisory;
463
+ exports.primaryFinding = require_builders.primaryFinding;
464
+ exports.protectedCapabilities = require_resolver.protectedCapabilities;
444
465
  exports.refKey = require_builders.refKey;
466
+ exports.refsOf = require_builders.refsOf;
445
467
  exports.resolveBinarySource = require_builders.resolveBinarySource;
468
+ exports.restrictionsFor = require_builders.restrictionsFor;
469
+ exports.restrictionsOf = require_builders.restrictionsOf;
446
470
  exports.revisionTokensEqual = require_builders.revisionTokensEqual;
471
+ exports.richTextParagraphsFromPlainText = require_builders.richTextParagraphsFromPlainText;
472
+ exports.richTextPlainText = require_builders.richTextPlainText;
473
+ exports.sameEffectiveValue = require_builders.sameEffectiveValue;
447
474
  exports.searchContentEpoch = require_builders.searchContentEpoch;
448
475
  exports.searchRectsForRange = require_builders.searchRectsForRange;
449
476
  exports.searchSegmentsForRange = require_builders.searchSegmentsForRange;
@@ -457,6 +484,7 @@ exports.snapAppearanceScale = snapAppearanceScale;
457
484
  exports.snapFullPageViewport = snapFullPageViewport;
458
485
  exports.snapTileScale = snapTileScale;
459
486
  exports.sniffBinaryMetadata = require_builders.sniffBinaryMetadata;
487
+ exports.stableStringify = require_builders.stableStringify;
460
488
  exports.subtypeFromCode = require_PageInsertBlankInput.subtypeFromCode;
461
489
  exports.textGlyphAt = require_builders.textGlyphAt;
462
490
  exports.textGlyphQuad = require_builders.textGlyphQuad;
@@ -468,5 +496,6 @@ exports.validateSearchRegex = require_builders.validateSearchRegex;
468
496
  exports.wirePack = wirePack;
469
497
  exports.wordAt = require_builders.wordAt;
470
498
  exports.wordBefore = require_builders.wordBefore;
499
+ exports.worstVerdict = require_builders.worstVerdict;
471
500
 
472
501
  //# sourceMappingURL=runtime.cjs.map
@@ -1,6 +1,6 @@
1
- import { $a as FilledStyleFields, $c as Color, $i as FormFieldRef, $n as PageNameResult, $o as AnnotationAppearanceRaster, $r as FormImportResult, $s as PageLayout, Aa as buildCommentThreads, Ac as PDF_BITS, Ai as FormKind, Al as PdfActionWarning, An as HighlightDraft, Ao as AnnotationBase, Ar as toOriginalRange, As as glyphLooseQuad, At as LineDraft, B as StampAnnotationDTO, Ba as PatchOfKind, Bc as ParsedScope, Bi as FormFieldDTO, Bl as DocumentMetadata, Bn as PageDeleteResult, Bo as EngineErrorCode, Br as TextLayoutFrame, Bs as PdfOriginSize, Bt as PolygonPatch, C as RedactDraft, Ca as ManifestPage, Cc as expandedCapabilities, Ci as ComboBoxFieldDraft, Cl as ActionReadBudget, Cn as UnderlineAnnotationDTO, Co as ANNOTATION_SUBTYPES, Cr as wordAt, Cs as PageGeometryGlyph, Ct as LinkAnnotationDTO, Da as CommentThread, Dc as PermissionDenied, Di as RadioFieldDraft, Dl as PdfActionTargetRef, Do as PdfAnnotationSubtypeCode, Dr as SEARCH_FOLD_VERSION, Ds as RotatedGeometryRun, E as WidgetDraft, Ea as BuildCommentThreadsOptions, Ec as MissingIdentity, Ei as ListBoxFieldDraft, El as PdfActionNode, Eo as PDF_SUBTYPE_TO_CODE, Er as FoldedText, Es as RotatedGeometryGlyph, Fa as classifyRelation, Fc as CollabFilter, Fi as WidgetStyleFields, Fl as SubmitFormPayload, Fn as RedactionApplyScope, Fo as EngineError, Fr as SearchSlice, Fs as boundaryTextOffset, Ft as PolylineAnnotationDTO, Ga as FileAttachmentDraft, Gc as AnnotationRef, Gi as ListBoxFieldDTO, Gn as AnnotationFlattenInput, Go as PdfSaveMode, Gr as expandTextRangeToWord, Gs as pdfQuadFromCorners, Gt as VertexPatchFields, H as StampFit, Ha as AttachmentDeleteResult, Hc as ParsedWildcard, Hi as FormFieldFlags, Hn as PageRotateResult, Ho as FontKey, Hr as TextLayoutRun, Hs as normalizePdfRect, Ht as PolygonDraft, Ia as refKey, Ic as DocCapability, Ii as WidgetStylePatchFields, Il as decodeSubmitFormFlags, In as RedactionApplyStatus, Io as EngineErrorOptions, Ir as SearchSliceBudget, Is as charBoundaryAtTextOffset, It as PolylineDraft, J as TextPatch, Ja as WireAttachmentFile, Jc as AnnotationBorderStyle, Ji as SignatureFieldDTO, Jn as PageFlattenInput, Jo as AnnotationAppearanceImageOptions, Jr as textSegmentsForRange, Js as pdfRectSize, Ka as FileAttachmentIcon, Kc as RevisionToken, Ki as PushButtonFieldDTO, Kn as AnnotationFlattenItemResult, Ko as CachePins, Kr as textGlyphAt, Ks as pdfRectFromOriginSize, La as AnnotationKindModule, Lc as IdentityClaims, Li as CheckboxFieldDTO, Ll as PdfDestination, Ln as PAGE_INSERT_BLANK_MAX_COUNT, Lo as SerializedEngineError, Lr as SearchSnippet, Ls as charMapViolation, M as FileAttachmentPatch, Ma as AnnotationRelationKind, Mc as AnnotationActor, Mi as WidgetAppearance, Ml as PdfFieldActions, Mn as MetadataUpdateResult, Mo as AnnotationStableId, Mr as SearchMode, Ms as PageTextSnapshot, N as FileAttachmentAnnotationDTO, Na as AnnotationThread, Nc as CollabAction, Nl as PdfPageActions, Nn as RedactionApplyItemResult, No as decodeStableIdKey, Nr as SearchQuery, Ns as CharBoundaryBias, Oa as CommentThreadReview, Oc as parseScope, Oi as TextFieldDraft, Ol as PdfActionTree, On as HighlightPatch, Oo as subtypeFromCode, Or as SearchMatchRange, Os as UprightGeometryRun, Ot as LinePatch, Pa as buildThreads, Pc as CollabEntity, Pi as WidgetStyleDraftFields, Pl as SubmitFormFlags, Pn as RedactionApplyResult, Po as encodeStableIdKey, Pr as SearchRequest, Ps as CharMapAnchor, Pt as PolylinePatch, Qa as FilledStyleDraftFields, Qc as CaretIntent, Qi as FormValueEntry, Qn as PageFlattenUsage, Qo as AnnotationAppearanceMode, Qr as FormFieldUpdateResult, Qs as PageBoxes, R as StampPatch, Ra as DTOOfKind, Rc as ParsedCapability, Ri as ComboBoxFieldDTO, Rl as PageObjectNumber, Rn as PageInsertBlankSpec, Ro as deserializeError, Rr as PageTextLayout, Rs as charRangeForTextOffsets, S as RedactAnnotationDTO, Sa as DocumentManifest, Sc as expandRawScope, Si as CheckboxFieldDraft, Sl as PdfSize, Sn as UnderlinePatch, So as resolveBinarySource, Sr as matchLiteral, Ss as createPageImageHandle, St as LinkPatch, T as WidgetAnnotationDTO, Ta as LayerScopes, Tc as InvalidScope, Ti as FormFieldOptionInput, Tl as NamedJavaScriptAction, To as PDF_CODE_TO_SUBTYPE, Tr as FoldOptions, Ts as PageGeometrySnapshot, U as StampWireDraft, Ua as AttachmentsCache, Uc as PdfBits, Ui as FormFieldOption, Un as PageRotateInput, Uo as FontSpec, Ur as buildPageTextLayout, Us as pdfQuadBounds, Ut as VertexAnnotationFields, V as StampDraft, Va as AttachmentCreateResult, Vc as ParsedVirtual, Vi as FormFieldFamily, Vl as DocumentMetadataTrapped, Vn as PageDeleteInput, Vo as FontHandle, Vr as TextLayoutGlyph, Vs as PdfQuadCorners, Vt as PolygonAnnotationDTO, Wa as normalizeAttachmentFileSource, Wc as AnnotationDraftBase, Wi as FormFieldOrigin, Wn as AnnotationAppearanceExportInput, Wo as DEFAULT_PDF_SAVE_MODE, Wr as expandTextRangeToLine, Ws as pdfQuadCorners, Wt as VertexDraftFields, X as NoteIcon, Xa as ColorStyleFields, Xc as AnnotationReplyType, Xi as ToggleFieldWidget, Xn as PageFlattenResult, Xo as AnnotationAppearanceManifest, Xr as FormFieldCreateResult, Xs as pdfRectWidth, Xt as SquareAnnotationDTO, Y as TextAnnotationDTO, Ya as ColorStyleDraftFields, Yc as AnnotationFlags, Yi as TextFieldDTO, Yn as PageFlattenItemResult, Yo as AnnotationAppearanceImagesResult, Yr as FormDataExport, Ys as pdfRectToOriginSize, Yt as SquarePatch, Z as TextDraft, Za as ColorStylePatchFields, Zc as BlendMode, Zi as UnknownFieldDTO, Zn as PageFlattenStatus, Zo as AnnotationAppearanceManifestEntry, Zr as FormFieldDeleteResult, Zs as PageListSnapshot, Zt as SquareDraft, _a as RefetchReason, _c as CollabTarget, _i as ComboBoxFieldPatch, _l as LinePoints, _n as SquigglyAnnotationDTO, _o as BinaryPayload, _r as SearchRegexValidation, _s as PageRenderFormat, aa as AnnotationMoveResult, ac as OpenInputById, ai as FormEffectStatus, al as NO_ANNOTATION_FLAGS, an as ShapeDraftFields, ao as AttachmentFileBase, ar as PageMoveInput, as as WeakAnnotationState, b as UnsupportedAnnotationDTO, ba as PdfLinkTarget, bc as checkCollab, bi as RadioFieldPatch, bl as PdfRect, bo as WireResource, br as validateSearchRegex, bs as PageRenderTarget, c as AnnotationKind, ca as AppearanceImpact, cc as OpenInputLayerSource, ci as FormSubmissionEntry, cl as Rect, co as EmbeddedFileItem, cr as searchRectsForRange, cs as PageImageHandle, ct as FreeTextAnnotationDTO, d as AnnotationSubtypeOfKind, da as semanticEqual, dc as OpenOptions, dl as StandardFont, dn as StrikeoutAnnotationDTO, do as NormalizedPatch, dr as buildSnippet, ds as PageImageResult, ea as FormWidgetRef, ec as PageRotation, ei as FormRepairResult, el as FreeTextFont, eo as FilledStylePatchFields, er as PageNameInput, es as AnnotationAppearanceRenderOptions, fa as AnnotationMutationKind, fc as TokenSource, fi as FormSubmissionRequest, fl as StrikeoutIntent, fn as StrikeoutDraft, fo as normalizeAnnotationDraft, fr as matchPageText, fs as PageImageSource, ga as AnnotationListMutationMeta, gc as pdfPermissions, gi as CheckboxFieldPatch, gl as InkStroke, gn as SquigglyPatch, go as sniffBinaryMetadata, gr as SearchRegexIssue, gs as PageRenderEncodedFormat, ha as shiftsExistingAnnotationIndices, hc as materializePdfPermissions, hi as FormFieldValue, hl as InkList, ho as BinaryMimeType, hr as SearchQueryValidation, hs as PageRenderBackground, ht as InkDraft, i as AnnotationDTO, ia as AnnotationDeleteResult, ic as OpenInput, ii as FormEffectResult, il as LineEndings, in as ShapeAnnotationFields, io as AttachmentContent, ir as PageStructureCache, is as UNKNOWN_WEAK_ANNOTATION_STATE, ja as isStateAnnotation, jc as decodePdfBits, ji as FormSnapshot, jl as PdfAnnotationActions, jn as MetadataCache, jo as AnnotationIdentityQuality, jr as SearchMatch, js as isRotatedGeometryRun, ka as ReviewStatus, kc as validateScopeArray, ki as WidgetPlacement, kl as PdfActionType, kn as HighlightAnnotationDTO, ko as AnnotationPatchBase, kr as foldText, ks as glyphLooseBounds, kt as LineAnnotationDTO, l as AnnotationPatch, la as AppearanceOutcome, lc as OpenInputShare, ll as Rotation, lo as EmbeddedFileRef, lr as searchSegmentsForRange, ls as PageImageObjectUrl, lt as FreeTextDraft, m as WireAnnotationPatch, ma as invalidatesWeakIndexRefs, mc as collab, mi as FormDataFormat, ml as CalloutLine, mo as BinaryMetadata, mr as SearchQueryIssue, ms as PageRaster, mt as InkAnnotationDTO, n as AnnotationListSnapshotAllPages, na as encodeFieldRefKey, nc as NamedPageTarget, ni as FormWidgetLinkResult, nl as InkIntent, nn as CircleAnnotationDTO, no as GeometryStyleFields, nr as PageMoveCache, ns as AnnotationAppearancesResult, nt as CaretAnnotationDTO, o as AnnotationDraft, oa as AnnotationUpdateResult, oc as OpenInputBytes, oi as FormEffectsResult, ol as PdfRectDifferences, on as ShapePatchFields, oo as AttachmentFileInfo, or as canonicalSearchQuery, os as knownWeakAnnotationState, p as WireAnnotationDraft, pa as changesAnnotationList, pc as caps, pl as TextAlignment, po as normalizeAnnotationPatch, pr as SEARCH_REGEX_MAX_LENGTH, ps as PageNetworkRenderFormat, pt as InkPatch, qa as FileAttachmentWireDraft, qc as revisionTokensEqual, qi as RadioFieldDTO, qn as AnnotationFlattenResult, qo as AnnotationAppearanceImage, qr as textGlyphQuad, qs as pdfRectHeight, ra as AnnotationCreateResult, rc as MetadataPatch, ri as FormEffect, rl as LineEnding, rn as CircleDraft, ro as GeometryStylePatchFields, rr as PageMoveResult, rs as PageState, rt as CaretDraft, sa as AppearanceAction, sc as OpenInputLayerBytes, si as FormFieldDisplay, sl as Point, so as AttachmentFileSource, sr as searchContentEpoch, ss as PageImageBlobSource, st as FreeTextPatch, t as AnnotationListPageSnapshot, ta as decodeFieldRefKey, tc as NamedPageEntry, ti as FormSetValueResult, tl as FreeTextIntent, tn as CirclePatch, to as GeometryStyleDraftFields, tr as PageRemoveNameInput, ts as AnnotationAppearancesQuery, tt as CaretPatch, ua as appearanceImpactOf, uc as OpenInputToken, ui as FormSubmissionReceipt, ul as Size, un as StrikeoutPatch, uo as NormalizedDraft, ur as SEARCH_SNIPPET_CONTEXT, us as PageImageOptions, v as UnsupportedPatch, va as CacheDelta, vc as checkAnyCapability, vi as FormFieldPatch, vl as PdfPoint, vn as SquigglyDraft, vo as BinarySource, vr as matchRegex, vs as PageRenderOptions, w as WidgetPatch, wa as LayerScopePlane, wc as filterMatches, wi as FormFieldDraft, wl as DocumentActionsSnapshot, wn as UnderlineDraft, wo as AnnotationSubtype, wr as wordBefore, ws as PageGeometryRun, wt as LinkDraft, x as RedactPatch, xa as PdfLinkTargetWritable, xc as checkSetGroup, xi as TextFieldPatch, xl as PdfRotation, xo as WireResourceMap, xr as foldOptionsFor, xs as PageRenderViewport, y as UnsupportedDraft, ya as MutationMeta, yc as checkCapability, yi as ListBoxFieldPatch, yl as PdfQuad, yo as ResourceRef, yr as validateSearchQuery, ys as PageRenderQuery, z as StampWirePatch, za as DraftOfKind, zc as ParsedCollab, zi as FormFieldBase, zl as isValidPageObjectNumber, zn as PageInsertResult, zo as serializeError, zr as PdfTextSegment, zs as sliceTextByChars } from "./AnnotationListSnapshot-x6tKulNV.cjs";
2
- import { a as DocumentEncryptionState, c as DocumentSecurityState, d as PdfPermissionAdvisory, f as PdfPermissionInfo, g as AbortablePromise, h as AbortableExecutor, i as DocumentAccessReason, l as DocumentUnlockInput, m as passwordPromptFromState, n as CdnAdapter, o as DocumentOpenMode, p as PasswordPrompt, r as DocumentAccessInfo, s as DocumentSecurityService, t as CdnAccessInfo, u as DocumentUnlockResult } from "./DocumentSecurityService-CK0pejAK.cjs";
3
- import { A as DocumentPagesService, C as CONTINUOUS_RENDER_POLICY, D as snapFullPageViewport, E as snapAppearanceScale, F as WeakAnnotationEditSession, I as DocumentActionsService, M as FormRepairOptions, N as DocumentAttachmentsService, O as snapTileScale, P as DocumentAnnotationsService, S as DocumentSearchService, T as EngineRenderPolicy, _ as PageTextService, a as DocumentHandle, b as PageAnnotationsService, c as DocumentEventInit, d as PageHandle, f as PieceInfoService, g as PieceInfoSnapshot, h as PieceInfoPatchValue, i as DocumentCapabilities, j as DocumentFormsService, k as DocumentRedactionService, l as DocumentEventType, m as PieceInfoPatch, n as EngineFactory, o as DocumentEventStream, p as PieceInfoEntry, r as FontService, s as DocumentEvent, t as Engine, u as EventOrigin, v as PageRenderService, w as DocumentRenderService, x as MetadataService, y as PageGeometryService } from "./Engine--0XF0UAK.cjs";
1
+ import { $a as semanticEqual, $c as NamedPageEntry, $i as FormFieldDisplay, $l as CachePins, $n as PageNameResult, $o as normalizeAnnotationPatch, $r as FormImportResult, $s as AnnotationAppearanceManifestEntry, $u as PdfRect, Aa as ComboBoxFieldDTO, Ac as PageTextSnapshot, Ai as refsOf, Al as FieldLockSpec, An as HighlightDraft, Ao as normalizeAttachmentFileSource, Ar as toOriginalRange, As as RichTextDirection, At as LineDraft, Au as BlendMode, B as StampAnnotationDTO, Ba as SignatureFieldDTO, Bc as normalizePdfRect, Bi as ObjectReferrer, Bl as SignaturePrepareInput, Bn as PageDeleteResult, Bo as FilledStylePatchFields, Br as TextLayoutFrame, Bs as richTextPlainText, Bt as PolygonPatch, Bu as Point, C as RedactDraft, Ca as FormSnapshot, Cc as PageGeometrySnapshot, Ci as evaluateStep, Cl as BaseVersionInfo, Cn as UnderlineAnnotationDTO, Co as AnnotationKindModule, Cr as wordAt, Cs as SerializedEngineError, Ct as LinkAnnotationDTO, Cu as AnnotationDraftBase, Da as WidgetStyleFields, Dc as glyphLooseBounds, Di as dictEntries, Dl as DocumentProtection, Do as AttachmentCreateResult, Dr as SEARCH_FOLD_VERSION, Ds as RichTextAlign, Du as AnnotationBorderStyle, E as WidgetDraft, Ea as WidgetStyleDraftFields, Ec as UprightGeometryRun, Ei as changedKeys, El as DocumentFieldLock, Eo as PatchOfKind, Er as FoldedText, Es as EngineErrorCode, Eu as revisionTokensEqual, Fa as FormFieldOption, Fc as charMapViolation, Fi as ChangeFinding, Fl as SignatureCompleteInput, Fn as RedactionApplyScope, Fo as ColorStyleDraftFields, Fr as SearchSlice, Fs as RichTextParagraphProps, Ft as PolylineAnnotationDTO, Fu as InkIntent, Ga as AnnotationCreateResult, Gc as pdfRectHeight, Gi as RevisionHealth, Gl as SignatureSubFilter, Gn as AnnotationFlattenInput, Go as AttachmentFileBase, Gr as expandTextRangeToWord, Gs as FontSpec, Gt as VertexPatchFields, Gu as StrikeoutIntent, H as StampFit, Ha as ToggleFieldWidget, Hc as pdfQuadCorners, Hi as RestrictionAnchor, Hl as SignatureSeedValue, Hn as PageRotateResult, Ho as GeometryStyleFields, Hr as TextLayoutRun, Hs as FontHandle, Ht as PolygonDraft, Hu as Rotation, Ia as FormFieldOrigin, Ic as charRangeForTextOffsets, Ii as ObjectChange, Il as SignatureCompleteResult, In as RedactionApplyStatus, Io as ColorStyleFields, Ir as SearchSliceBudget, Is as RichTextRun, It as PolylineDraft, Iu as LineEnding, J as TextPatch, Ja as AnnotationUpdateResult, Jc as pdfRectWidth, Ji as StepVerdict, Jl as MutationMeta, Jn as PageFlattenInput, Jo as EmbeddedFileItem, Jr as textSegmentsForRange, Js as PdfSaveMode, Ju as InkList, Ka as AnnotationDeleteResult, Kc as pdfRectSize, Ki as RevisionStructure, Kl as SignedDocumentPolicy, Kn as AnnotationFlattenItemResult, Ko as AttachmentFileInfo, Kr as textGlyphAt, Ks as SessionKind, Ku as TextAlignment, La as ListBoxFieldDTO, Lc as sliceTextByChars, Li as ObjectChangeKind, Ll as SignatureCoverage, Ln as PAGE_INSERT_BLANK_MAX_COUNT, Lo as ColorStylePatchFields, Lr as SearchSnippet, Ls as RichTextRunStyle, Lu as LineEndings, M as FileAttachmentPatch, Ma as FormFieldDTO, Mc as CharMapAnchor, Mi as AnalyzeInput, Ml as PdfRevision, Mn as MetadataUpdateResult, Mo as FileAttachmentIcon, Mr as SearchMode, Ms as RichTextDocumentInput, Mu as Color, N as FileAttachmentAnnotationDTO, Na as FormFieldFamily, Nc as boundaryTextOffset, Ni as Assessment, Nl as SignatureAbortResult, Nn as RedactionApplyItemResult, No as FileAttachmentWireDraft, Nr as SearchQuery, Ns as RichTextMargins, Nu as FreeTextFont, Oa as WidgetStylePatchFields, Oc as glyphLooseQuad, Oi as parsePdfValue, Ol as DocumentVersionRef, On as HighlightPatch, Oo as AttachmentDeleteResult, Or as SearchMatchRange, Os as RichTextBody, Ot as LinePatch, Ou as AnnotationFlags, Pa as FormFieldFlags, Pc as charBoundaryAtTextOffset, Pi as ChangeAnalysis, Pl as SignatureAppearanceInput, Pn as RedactionApplyResult, Po as WireAttachmentFile, Pr as SearchRequest, Ps as RichTextParagraph, Pt as PolylinePatch, Pu as FreeTextIntent, Qa as appearanceImpactOf, Qc as PageRotation, Qi as FormEffectsResult, Ql as knownWeakAnnotationState, Qn as PageFlattenUsage, Qo as normalizeAnnotationDraft, Qr as FormFieldUpdateResult, Qs as AnnotationAppearanceManifest, Qu as PdfQuad, R as StampPatch, Ra as PushButtonFieldDTO, Rc as PdfOriginSize, Ri as ObjectChangeType, Rl as SignatureDTO, Rn as PageInsertBlankSpec, Ro as FilledStyleDraftFields, Rr as PageTextLayout, Rs as RichTextScript, Ru as NO_ANNOTATION_FLAGS, S as RedactAnnotationDTO, Sa as FormKind, Sc as PageGeometryRun, Si as restrictionsFor, Sl as filterMatches, Sn as UnderlinePatch, So as refKey, Sr as matchLiteral, Ss as EngineErrorOptions, St as LinkPatch, Su as PdfBits, T as WidgetAnnotationDTO, Tc as RotatedGeometryRun, Ti as sameEffectiveValue, Tl as DocMdpPermission, To as DraftOfKind, Tr as FoldOptions, Ts as serializeError, Tu as RevisionToken, U as StampWireDraft, Ua as UnknownFieldDTO, Uc as pdfQuadFromCorners, Ui as RevisionAnalysis, Ul as SignatureSigner, Un as PageRotateInput, Uo as GeometryStylePatchFields, Ur as buildPageTextLayout, Us as FontIdentityInfo, Ut as VertexAnnotationFields, Uu as Size, V as StampDraft, Va as TextFieldDTO, Vc as pdfQuadBounds, Vi as PdfValue, Vl as SignaturePrepared, Vn as PageDeleteInput, Vo as GeometryStyleDraftFields, Vr as TextLayoutGlyph, Vs as FontEmbeddingPermission, Vt as PolygonAnnotationDTO, Vu as Rect, Wa as FormValueEntry, Wc as pdfRectFromOriginSize, Wi as RevisionField, Wl as SignatureSnapshot, Wn as AnnotationAppearanceExportInput, Wo as AttachmentContent, Wr as expandTextRangeToLine, Ws as FontKey, Wt as VertexDraftFields, Wu as StandardFont, X as NoteIcon, Xa as AppearanceImpact, Xc as PageBoxes, Xi as FormEffectResult, Xl as UNKNOWN_WEAK_ANNOTATION_STATE, Xn as PageFlattenResult, Xo as NormalizedDraft, Xr as FormFieldCreateResult, Xs as AnnotationAppearanceImageOptions, Xt as SquareAnnotationDTO, Xu as LinePoints, Y as TextAnnotationDTO, Ya as AppearanceAction, Yc as PageListSnapshot, Yi as FormEffect, Yl as PageState, Yn as PageFlattenItemResult, Yo as EmbeddedFileRef, Yr as FormDataExport, Ys as AnnotationAppearanceImage, Yt as SquarePatch, Yu as InkStroke, Z as TextDraft, Za as AppearanceOutcome, Zc as PageLayout, Zi as FormEffectStatus, Zl as WeakAnnotationState, Zn as PageFlattenStatus, Zo as NormalizedPatch, Zr as FormFieldDeleteResult, Zs as AnnotationAppearanceImagesResult, Zt as SquareDraft, Zu as PdfPoint, _a as FormFieldOptionInput, _c as PageRenderQuery, _d as PageObjectNumber, _i as DEFAULT_EDGE_RESOLVER_BUDGET, _l as checkCapability, _n as SquigglyAnnotationDTO, _o as isStateAnnotation, _r as SearchRegexValidation, _s as AnnotationIdentityQuality, _u as ParsedCapability, ac as PageImageBlobSource, ad as PdfActionNode, ai as fieldLockFor, al as OpenInputLayerBytes, an as ShapeDraftFields, ao as RefetchReason, ar as PageMoveInput, as as ResourceRef, au as MissingIdentity, b as UnsupportedAnnotationDTO, ba as TextFieldDraft, bc as createPageImageHandle, bd as DocumentMetadataTrapped, bi as ResolvedUsage, bl as expandRawScope, bo as buildThreads, br as validateSearchRegex, bs as encodeStableIdKey, bu as ParsedVirtual, c as AnnotationKind, ca as CheckboxFieldPatch, cc as PageImageOptions, cd as PdfActionType, ci as lockCovers, cl as OpenInputToken, co as DocumentManifest, cr as searchRectsForRange, cs as resolveBinarySource, ct as FreeTextAnnotationDTO, cu as validateScopeArray, d as AnnotationSubtypeOfKind, da as ListBoxFieldPatch, dc as PageNetworkRenderFormat, dd as PdfFieldActions, di as protectedCapabilities, dl as caps, dn as StrikeoutAnnotationDTO, do as LayerScopes, dr as buildSnippet, ds as PDF_CODE_TO_SUBTYPE, du as AnnotationActor, ea as FormSubmissionEntry, ec as AnnotationAppearanceMode, ed as PdfRotation, ei as FormRepairResult, el as NamedPageTarget, eo as AnnotationMutationKind, er as PageNameInput, es as BinaryMetadata, eu as FormFieldRef, fa as RadioFieldPatch, fc as PageRaster, fd as PdfPageActions, fi as assessmentOf, fl as collab, fn as StrikeoutDraft, fo as BuildCommentThreadsOptions, fr as matchPageText, fs as PDF_SUBTYPE_TO_CODE, fu as CollabAction, ga as FormFieldDraft, gc as PageRenderOptions, gd as PdfDestination, gi as worstVerdict, gl as checkAnyCapability, gn as SquigglyPatch, go as buildCommentThreads, gr as SearchRegexIssue, gs as AnnotationBase, gu as IdentityClaims, ha as ComboBoxFieldDraft, hc as PageRenderFormat, hd as decodeSubmitFormFlags, hi as primaryFinding, hl as CollabTarget, ho as ReviewStatus, hr as SearchQueryValidation, hs as AnnotationPatchBase, ht as InkDraft, hu as DocCapability, i as AnnotationDTO, ia as FormSubmissionRequest, ic as AnnotationAppearancesResult, id as NamedJavaScriptAction, ii as deriveProtection, il as OpenInputBytes, in as ShapeAnnotationFields, io as AnnotationListMutationMeta, ir as PageStructureCache, is as BinarySource, iu as InvalidScope, ja as FormFieldBase, jc as CharBoundaryBias, ji as stableStringify, jl as ModificationLevel, jn as MetadataCache, jo as FileAttachmentDraft, jr as SearchMatch, js as RichTextDocument, ju as CaretIntent, ka as CheckboxFieldDTO, kc as isRotatedGeometryRun, ki as pdfValueEquals, kl as FieldLockAction, kn as HighlightAnnotationDTO, ko as AttachmentsCache, kr as foldText, ks as RichTextDecoration, kt as LineAnnotationDTO, ku as AnnotationReplyType, l as AnnotationPatch, la as ComboBoxFieldPatch, lc as PageImageResult, ld as PdfActionWarning, li as lockNameCovers, ll as OpenOptions, lo as ManifestPage, lr as searchSegmentsForRange, ls as ANNOTATION_SUBTYPES, lt as FreeTextDraft, lu as PDF_BITS, m as WireAnnotationPatch, ma as CheckboxFieldDraft, mc as PageRenderEncodedFormat, md as SubmitFormPayload, mi as conclude, ml as pdfPermissions, mo as CommentThreadReview, mr as SearchQueryIssue, ms as subtypeFromCode, mt as InkAnnotationDTO, mu as CollabFilter, n as AnnotationListSnapshotAllPages, na as FormSubmissionReceipt, nc as AnnotationAppearanceRenderOptions, nd as ActionReadBudget, ni as FormWidgetLinkResult, nl as OpenInput, nn as CircleAnnotationDTO, no as invalidatesWeakIndexRefs, nr as PageMoveCache, ns as sniffBinaryMetadata, nt as CaretAnnotationDTO, nu as decodeFieldRefKey, o as AnnotationDraft, oa as FormDataFormat, oc as PageImageHandle, od as PdfActionTargetRef, oi as levelAllows, ol as OpenInputLayerSource, on as ShapePatchFields, oo as PdfLinkTarget, or as canonicalSearchQuery, os as WireResource, ou as PermissionDenied, p as WireAnnotationDraft, pa as TextFieldPatch, pc as PageRenderBackground, pd as SubmitFormFlags, pi as combine, pl as materializePdfPermissions, po as CommentThread, pr as SEARCH_REGEX_MAX_LENGTH, ps as PdfAnnotationSubtypeCode, pt as InkPatch, pu as CollabEntity, qa as AnnotationMoveResult, qc as pdfRectToOriginSize, qi as StepInput, ql as CacheDelta, qn as AnnotationFlattenResult, qo as AttachmentFileSource, qr as textGlyphQuad, qs as DEFAULT_PDF_SAVE_MODE, qu as CalloutLine, rc as AnnotationAppearancesQuery, rd as DocumentActionsSnapshot, ri as SIGNATURE_POLICY_VERSION, rl as OpenInputById, rn as CircleDraft, ro as shiftsExistingAnnotationIndices, rr as PageMoveResult, rs as BinaryPayload, rt as CaretDraft, ru as encodeFieldRefKey, sa as FormFieldValue, sc as PageImageObjectUrl, sd as PdfActionTree, si as levelFromPermission, sl as OpenInputShare, so as PdfLinkTargetWritable, sr as searchContentEpoch, ss as WireResourceMap, st as FreeTextPatch, su as parseScope, t as AnnotationListPageSnapshot, tc as AnnotationAppearanceRaster, td as PdfSize, ti as FormSetValueResult, tl as MetadataPatch, tn as CirclePatch, to as changesAnnotationList, tr as PageRemoveNameInput, ts as BinaryMimeType, tt as CaretPatch, tu as FormWidgetRef, ua as FormFieldPatch, uc as PageImageSource, ud as PdfAnnotationActions, ui as minLevel, ul as TokenSource, un as StrikeoutPatch, uo as LayerScopePlane, ur as SEARCH_SNIPPET_CONTEXT, us as AnnotationSubtype, uu as decodePdfBits, v as UnsupportedPatch, va as ListBoxFieldDraft, vc as PageRenderTarget, vd as isValidPageObjectNumber, vi as EdgeResolver, vl as checkCollab, vn as SquigglyDraft, vo as AnnotationRelationKind, vr as matchRegex, vs as AnnotationStableId, vu as ParsedCollab, w as WidgetPatch, wa as WidgetAppearance, wc as RotatedGeometryGlyph, wi as restrictionsOf, wl as DigestAlgorithm, wn as UnderlineDraft, wo as DTOOfKind, wr as wordBefore, ws as deserializeError, wt as LinkDraft, wu as AnnotationRef, x as RedactPatch, xa as WidgetPlacement, xc as PageGeometryGlyph, xi as USAGE_INCOMPLETE, xl as expandedCapabilities, xo as classifyRelation, xr as foldOptionsFor, xs as EngineError, xu as ParsedWildcard, y as UnsupportedDraft, ya as RadioFieldDraft, yc as PageRenderViewport, yd as DocumentMetadata, yi as EdgeResolverBudget, yl as checkSetGroup, yo as AnnotationThread, yr as validateSearchQuery, ys as decodeStableIdKey, yu as ParsedScope, z as StampWirePatch, za as RadioFieldDTO, zc as PdfQuadCorners, zi as ObjectReadStatus, zl as SignatureKind, zn as PageInsertResult, zo as FilledStyleFields, zr as PdfTextSegment, zs as richTextParagraphsFromPlainText, zu as PdfRectDifferences } from "./AnnotationListSnapshot-D3mFut1e.cjs";
2
+ import { a as DocumentEncryptionState, c as DocumentSecurityState, d as PdfPermissionAdvisory, f as PdfPermissionInfo, g as AbortablePromise, h as AbortableExecutor, i as DocumentAccessReason, l as DocumentUnlockInput, m as passwordPromptFromState, n as CdnAdapter, o as DocumentOpenMode, p as PasswordPrompt, r as DocumentAccessInfo, s as DocumentSecurityService, t as CdnAccessInfo, u as DocumentUnlockResult } from "./DocumentSecurityService-ClTZc0zO.cjs";
3
+ import { A as DocumentRedactionService, C as DocumentSearchService, D as snapAppearanceScale, E as EngineRenderPolicy, F as FontEmbeddingPolicy, I as DocumentAttachmentsService, L as DocumentAnnotationsService, M as DocumentFormsService, N as FormRepairOptions, O as snapFullPageViewport, P as DocumentFontSettings, R as WeakAnnotationEditSession, S as DocumentSignaturesService, T as DocumentRenderService, _ as PageTextService, a as DocumentHandle, b as PageAnnotationsService, c as DocumentEventInit, d as PageHandle, f as PieceInfoService, g as PieceInfoSnapshot, h as PieceInfoPatchValue, i as DocumentCapabilities, j as DocumentPagesService, k as snapTileScale, l as DocumentEventType, m as PieceInfoPatch, n as EngineFactory, o as DocumentEventStream, p as PieceInfoEntry, r as FontService, s as DocumentEvent, t as Engine, u as EventOrigin, v as PageRenderService, w as CONTINUOUS_RENDER_POLICY, x as MetadataService, y as PageGeometryService, z as DocumentActionsService } from "./Engine-Bx0NOfmd.cjs";
4
4
  //#region src/promise/AbortError.d.ts
5
5
  declare class AbortError extends Error {
6
6
  readonly name = "AbortError";
@@ -26,6 +26,10 @@ interface OpenFatMemoryWorkerRequest {
26
26
  docId: string;
27
27
  bytes: ArrayBuffer;
28
28
  password: string | null;
29
+ /** Default `protect`. */
30
+ signedDocumentPolicy?: SignedDocumentPolicy;
31
+ /** Default `layer`: the bytes become an immutable base with a fresh layer on top. */
32
+ sessionKind?: SessionKind;
29
33
  }
30
34
  type LayerOpenSource = {
31
35
  kind: 'fresh';
@@ -53,6 +57,13 @@ interface OpenLayerMemoryBaseWorkerRequest {
53
57
  baseBytes: ArrayBuffer;
54
58
  layer: LayerOpenSource;
55
59
  password: string | null;
60
+ signedDocumentPolicy?: SignedDocumentPolicy;
61
+ /**
62
+ * SHA-256 (hex) of the base bytes, when the caller already holds a
63
+ * verified one. Saves the runtime a full pass over the file; an identity
64
+ * claim only (a wrong value breaks the caller's own layer artifacts).
65
+ */
66
+ baseSha256?: string;
56
67
  }
57
68
  interface OpenLayerFileBaseWorkerRequest {
58
69
  kind: 'open.layerFileBase';
@@ -67,8 +78,102 @@ interface OpenLayerFileBaseWorkerRequest {
67
78
  basePath: string;
68
79
  layer: LayerOpenSource;
69
80
  password: string | null;
81
+ signedDocumentPolicy?: SignedDocumentPolicy;
82
+ /** See `OpenLayerMemoryBaseWorkerRequest.baseSha256`. */
83
+ baseSha256?: string;
70
84
  }
71
85
  type OpenWorkerRequest = OpenFatMemoryWorkerRequest | OpenLayerMemoryBaseWorkerRequest | OpenLayerFileBaseWorkerRequest;
86
+ interface SignaturesListWorkerRequest {
87
+ kind: 'signatures.list';
88
+ jobId: WorkerJobId;
89
+ docId: string;
90
+ layerName?: string;
91
+ /**
92
+ * Read the session's WORKING COPY (its unsaved state as one more revision
93
+ * over the loaded bytes) instead of the loaded bytes. The cloud server
94
+ * sets it: its layer sessions keep every committed edit in memory, so the
95
+ * layer's durable state IS the working copy. No-op without unsaved edits.
96
+ */
97
+ workingCopy?: boolean;
98
+ }
99
+ interface SignaturesContentsWorkerRequest {
100
+ kind: 'signatures.contents';
101
+ jobId: WorkerJobId;
102
+ docId: string;
103
+ layerName?: string;
104
+ ref: FormFieldRef;
105
+ }
106
+ interface SignaturesDigestWorkerRequest {
107
+ kind: 'signatures.digest';
108
+ jobId: WorkerJobId;
109
+ docId: string;
110
+ layerName?: string;
111
+ ref: FormFieldRef;
112
+ algorithm: DigestAlgorithm;
113
+ }
114
+ interface SignaturesRevisionBytesWorkerRequest {
115
+ kind: 'signatures.revisionBytes';
116
+ jobId: WorkerJobId;
117
+ docId: string;
118
+ layerName?: string;
119
+ revisionIndex: number;
120
+ }
121
+ interface DocumentVersionWorkerRequest {
122
+ kind: 'document.version';
123
+ jobId: WorkerJobId;
124
+ docId: string;
125
+ layerName?: string;
126
+ }
127
+ interface SignaturesPrepareWorkerRequest {
128
+ kind: 'signatures.prepare';
129
+ jobId: WorkerJobId;
130
+ docId: string;
131
+ layerName?: string;
132
+ input: SignaturePrepareInput;
133
+ }
134
+ interface SignaturesCompleteWorkerRequest {
135
+ kind: 'signatures.complete';
136
+ jobId: WorkerJobId;
137
+ docId: string;
138
+ layerName?: string;
139
+ input: SignatureCompleteInput;
140
+ artifactPath?: string;
141
+ }
142
+ interface SignaturesAbortWorkerRequest {
143
+ kind: 'signatures.abort';
144
+ jobId: WorkerJobId;
145
+ docId: string;
146
+ layerName?: string;
147
+ signingId: string;
148
+ }
149
+ interface SignaturesAnalyzeWorkerRequest {
150
+ kind: 'signatures.analyze';
151
+ jobId: WorkerJobId;
152
+ docId: string;
153
+ layerName?: string;
154
+ input: AnalyzeInput;
155
+ }
156
+ /**
157
+ * Session-less: install a CMS into a signing candidate FILE and verify the
158
+ * result. The server rebuilds the candidate (base ⊕ durable tail) on
159
+ * whichever replica completes the signing, so this never addresses a
160
+ * session: the file is patched in place, opened into a transient session
161
+ * for the checks, and closed. The caller keeps the sealed file.
162
+ */
163
+ interface SignaturesFinalizeCandidateWorkerRequest {
164
+ kind: 'signatures.finalizeCandidate';
165
+ jobId: WorkerJobId;
166
+ /** The candidate on the worker's filesystem; its /Contents hole is patched in place. */
167
+ path: string;
168
+ /** The /ByteRange the prepare reported — the fence every check is made against. */
169
+ byteRange: [number, number, number, number];
170
+ /** The reserved /Contents size the prepare reported (the hole holds twice as many hex digits). */
171
+ contentsSize: number;
172
+ fieldObjectNumber: number;
173
+ /** The detached CMS over the prepared digest. */
174
+ cms: ArrayBuffer;
175
+ password?: string | null;
176
+ }
72
177
  interface MetadataReadWorkerRequest {
73
178
  kind: 'metadata.read';
74
179
  jobId: WorkerJobId;
@@ -290,6 +395,17 @@ interface FormsUpdateFieldWorkerRequest {
290
395
  patch: FormFieldPatch;
291
396
  artifactPath?: string;
292
397
  }
398
+ /** Draw a PDF page into every widget of an unsigned signature field (the visual fill). */
399
+ interface FormsSetSignatureAppearanceWorkerRequest {
400
+ kind: 'forms.setSignatureAppearance';
401
+ jobId: WorkerJobId;
402
+ docId: string;
403
+ layerName?: string;
404
+ ref: FormFieldRef;
405
+ pdf: ArrayBuffer;
406
+ pageIndex: number;
407
+ artifactPath?: string;
408
+ }
293
409
  interface FormsDeleteFieldWorkerRequest {
294
410
  kind: 'forms.deleteField';
295
411
  jobId: WorkerJobId;
@@ -730,6 +846,25 @@ interface FontsClearWorkerRequest {
730
846
  kind: 'fonts.clear';
731
847
  jobId: WorkerJobId;
732
848
  }
849
+ /** The application asserts a licence permitting editing with a font. */
850
+ interface FontsAuthorizeEditingWorkerRequest {
851
+ kind: 'fonts.authorizeEditing';
852
+ jobId: WorkerJobId;
853
+ fontKey: string;
854
+ }
855
+ /**
856
+ * Per-document font and text-layout settings (session state on the host's
857
+ * document, never written to the file). Every member is optional: only the
858
+ * ones given change.
859
+ */
860
+ interface DocumentSetFontSettingsWorkerRequest {
861
+ kind: 'document.setFontSettings';
862
+ jobId: WorkerJobId;
863
+ docId: string;
864
+ layerName?: string;
865
+ embeddingPolicy?: 'default' | 'subset' | 'full';
866
+ typographicFeatures?: boolean;
867
+ }
733
868
  interface CloseWorkerRequest {
734
869
  kind: 'close';
735
870
  jobId: WorkerJobId;
@@ -779,11 +914,51 @@ interface AttachmentFileWorkerPayload {
779
914
  interface LayerArtifactFileWorkerPayload {
780
915
  path: string;
781
916
  }
782
- type WorkerRequest = OpenWorkerRequest | MetadataReadWorkerRequest | MetadataUpdateWorkerRequest | ActionsReadWorkerRequest | AnnotationsListRawAllWorkerRequest | AnnotationsListRawPageWorkerRequest | AnnotationsListFullPageWorkerRequest | AnnotationsRenderAppearancesWorkerRequest | AnnotationsRenderAppearancesEncodedWorkerRequest | AnnotationsCreateWorkerRequest | AnnotationsUpdateWorkerRequest | AnnotationsDeleteWorkerRequest | AnnotationsMoveWorkerRequest | FormsListWorkerRequest | FormsSetValueWorkerRequest | FormsResetWorkerRequest | FormsApplyEffectsWorkerRequest | FormsExportWorkerRequest | FormsImportWorkerRequest | FormsRepairWorkerRequest | FormsCreateFieldWorkerRequest | FormsUpdateFieldWorkerRequest | FormsDeleteFieldWorkerRequest | FormsAttachWidgetWorkerRequest | FormsDetachWidgetWorkerRequest | PagesListWorkerRequest | PagesMoveWorkerRequest | PagesRotateWorkerRequest | PagesDeleteWorkerRequest | AnnotationsFlattenWorkerRequest | AnnotationsExportAppearanceWorkerRequest | PagesSetNameWorkerRequest | PagesRemoveNameWorkerRequest | PagesFlattenWorkerRequest | RedactionApplyWorkerRequest | PagesExtractWorkerRequest | PagesInsertWorkerRequest | PagesInsertBlankWorkerRequest | AttachmentsListWorkerRequest | AttachmentsReadFileWorkerRequest | AttachmentsCreateWorkerRequest | AttachmentsDeleteWorkerRequest | AnnotationsReadFileWorkerRequest | PieceInfoReadWorkerRequest | PieceInfoUpdateWorkerRequest | PieceInfoApplicationsWorkerRequest | PieceInfoClearWorkerRequest | PagesTextWorkerRequest | PagesGeometryWorkerRequest | PagesRenderWorkerRequest | PagesRenderEncodedWorkerRequest | SearchQueryWorkerRequest | DocumentSaveBufferWorkerRequest | DocumentSaveFileWorkerRequest | DocumentSaveLayerBufferWorkerRequest | DocumentProbeSecurityFileWorkerRequest | DocumentRenderPageFileWorkerRequest | DocumentRenderPageFileEncodedWorkerRequest | DocumentCheckPasswordPermissionsWorkerRequest | FontsRegisterWorkerRequest | FontsAddFallbackWorkerRequest | FontsClearFallbacksWorkerRequest | FontsClearWorkerRequest | CloseWorkerRequest | LayerCloseWorkerRequest | AbortWorkerRequest | ShutdownWorkerRequest;
917
+ type WorkerRequest = OpenWorkerRequest | MetadataReadWorkerRequest | MetadataUpdateWorkerRequest | ActionsReadWorkerRequest | AnnotationsListRawAllWorkerRequest | AnnotationsListRawPageWorkerRequest | AnnotationsListFullPageWorkerRequest | AnnotationsRenderAppearancesWorkerRequest | AnnotationsRenderAppearancesEncodedWorkerRequest | AnnotationsCreateWorkerRequest | AnnotationsUpdateWorkerRequest | AnnotationsDeleteWorkerRequest | AnnotationsMoveWorkerRequest | FormsListWorkerRequest | FormsSetValueWorkerRequest | FormsResetWorkerRequest | FormsApplyEffectsWorkerRequest | FormsExportWorkerRequest | FormsImportWorkerRequest | FormsRepairWorkerRequest | FormsCreateFieldWorkerRequest | FormsUpdateFieldWorkerRequest | FormsSetSignatureAppearanceWorkerRequest | FormsDeleteFieldWorkerRequest | FormsAttachWidgetWorkerRequest | FormsDetachWidgetWorkerRequest | PagesListWorkerRequest | PagesMoveWorkerRequest | PagesRotateWorkerRequest | PagesDeleteWorkerRequest | AnnotationsFlattenWorkerRequest | AnnotationsExportAppearanceWorkerRequest | PagesSetNameWorkerRequest | PagesRemoveNameWorkerRequest | PagesFlattenWorkerRequest | RedactionApplyWorkerRequest | PagesExtractWorkerRequest | PagesInsertWorkerRequest | PagesInsertBlankWorkerRequest | AttachmentsListWorkerRequest | AttachmentsReadFileWorkerRequest | AttachmentsCreateWorkerRequest | AttachmentsDeleteWorkerRequest | AnnotationsReadFileWorkerRequest | PieceInfoReadWorkerRequest | PieceInfoUpdateWorkerRequest | PieceInfoApplicationsWorkerRequest | PieceInfoClearWorkerRequest | PagesTextWorkerRequest | PagesGeometryWorkerRequest | PagesRenderWorkerRequest | PagesRenderEncodedWorkerRequest | SearchQueryWorkerRequest | DocumentSaveBufferWorkerRequest | DocumentSaveFileWorkerRequest | DocumentSaveLayerBufferWorkerRequest | DocumentProbeSecurityFileWorkerRequest | DocumentRenderPageFileWorkerRequest | DocumentRenderPageFileEncodedWorkerRequest | DocumentCheckPasswordPermissionsWorkerRequest | SignaturesListWorkerRequest | SignaturesContentsWorkerRequest | SignaturesDigestWorkerRequest | SignaturesRevisionBytesWorkerRequest | DocumentVersionWorkerRequest | SignaturesPrepareWorkerRequest | SignaturesCompleteWorkerRequest | SignaturesAbortWorkerRequest | SignaturesAnalyzeWorkerRequest | SignaturesFinalizeCandidateWorkerRequest | FontsRegisterWorkerRequest | FontsAddFallbackWorkerRequest | FontsClearFallbacksWorkerRequest | FontsClearWorkerRequest | FontsAuthorizeEditingWorkerRequest | DocumentSetFontSettingsWorkerRequest | CloseWorkerRequest | LayerCloseWorkerRequest | AbortWorkerRequest | ShutdownWorkerRequest;
783
918
  type WorkerResultPayload = {
784
919
  tag: 'open';
785
920
  docId: string;
786
921
  security: DocumentSecurityProbeInfo;
922
+ /** What the document's signatures forbid; `null` when unsigned or not probed (a locked open). */
923
+ protection?: DocumentProtection | null;
924
+ } | {
925
+ tag: 'signatures.list';
926
+ snapshot: SignatureSnapshot;
927
+ } | {
928
+ tag: 'signatures.contents';
929
+ bytes: ArrayBuffer;
930
+ } | {
931
+ tag: 'signatures.digest';
932
+ digest: ArrayBuffer;
933
+ } | {
934
+ tag: 'signatures.revisionBytes';
935
+ bytes: ArrayBuffer;
936
+ size: number;
937
+ } | {
938
+ tag: 'document.version';
939
+ version: BaseVersionInfo;
940
+ } | {
941
+ tag: 'signatures.prepare';
942
+ result: SignaturePrepared;
943
+ } | {
944
+ tag: 'signatures.complete';
945
+ result: SignatureCompleteResult;
946
+ artifact?: LayerArtifactWorkerPayload;
947
+ artifactFile?: LayerArtifactFileWorkerPayload;
948
+ } | {
949
+ tag: 'signatures.abort';
950
+ result: SignatureAbortResult;
951
+ } | {
952
+ tag: 'signatures.analyze';
953
+ analysis: ChangeAnalysis;
954
+ } | {
955
+ tag: 'signatures.finalizeCandidate';
956
+ /** The installed signature as the sealed file reports it. */
957
+ signature: SignatureDTO;
958
+ /** What the sealed file's signatures forbid from now on. */
959
+ protection: DocumentProtection;
960
+ /** The version the sealed file IS (hash and length of the whole file). */
961
+ version: BaseVersionInfo;
787
962
  } | {
788
963
  tag: 'metadata.read';
789
964
  metadata: DocumentMetadata;
@@ -881,6 +1056,11 @@ type WorkerResultPayload = {
881
1056
  result: FormFieldUpdateResult;
882
1057
  artifact?: LayerArtifactWorkerPayload;
883
1058
  artifactFile?: LayerArtifactFileWorkerPayload;
1059
+ } | {
1060
+ tag: 'forms.setSignatureAppearance';
1061
+ result: FormFieldUpdateResult;
1062
+ artifact?: LayerArtifactWorkerPayload;
1063
+ artifactFile?: LayerArtifactFileWorkerPayload;
884
1064
  } | {
885
1065
  tag: 'forms.deleteField';
886
1066
  result: FormFieldDeleteResult;
@@ -1025,15 +1205,22 @@ type WorkerResultPayload = {
1025
1205
  } | {
1026
1206
  tag: 'document.checkPasswordPermissions';
1027
1207
  security: DocumentSecurityProbeInfo;
1208
+ protection?: DocumentProtection | null;
1028
1209
  } | {
1029
1210
  tag: 'fonts.register';
1030
1211
  fontKey: string;
1212
+ identity: FontIdentityInfo;
1031
1213
  } | {
1032
1214
  tag: 'fonts.addFallback';
1033
1215
  } | {
1034
1216
  tag: 'fonts.clearFallbacks';
1035
1217
  } | {
1036
1218
  tag: 'fonts.clear';
1219
+ } | {
1220
+ tag: 'fonts.authorizeEditing';
1221
+ identity: FontIdentityInfo;
1222
+ } | {
1223
+ tag: 'document.setFontSettings';
1037
1224
  } | {
1038
1225
  tag: 'close';
1039
1226
  } | {
@@ -1157,5 +1344,5 @@ declare const EMPTY_TRANSFER: readonly Transferable[];
1157
1344
  */
1158
1345
  declare function wirePack<P>(payload: P, transfer?: readonly Transferable[]): WirePack<P>;
1159
1346
  //#endregion
1160
- export { ANNOTATION_SUBTYPES, AbortError, type AbortWorkerRequest, type AbortableExecutor, AbortablePromise, type ActionReadBudget, type ActionsReadWorkerRequest, type AnnotationActor, type AnnotationAppearanceExportInput, type AnnotationAppearanceImage, type AnnotationAppearanceImageOptions, type AnnotationAppearanceImagesResult, type AnnotationAppearanceManifest, type AnnotationAppearanceManifestEntry, type AnnotationAppearanceMode, type AnnotationAppearanceRaster, type AnnotationAppearanceRenderOptions, type AnnotationAppearancesEncodedResultWire, type AnnotationAppearancesQuery, type AnnotationAppearancesResult, type AnnotationBase, type AnnotationBorderStyle, type AnnotationCreateResult, type AnnotationDTO, type AnnotationDeleteResult, type AnnotationDraft, type AnnotationDraftBase, type AnnotationFlags, type AnnotationFlattenInput, type AnnotationFlattenItemResult, type AnnotationFlattenResult, type AnnotationIdentityQuality, type AnnotationKind, type AnnotationKindModule, type AnnotationListMutationMeta, type AnnotationListPageSnapshot, type AnnotationListSnapshotAllPages, type AnnotationMoveResult, type AnnotationMutationKind, type AnnotationPatch, type AnnotationPatchBase, type AnnotationRef, type AnnotationRelationKind, type AnnotationReplyType, type AnnotationStableId, type AnnotationSubtype, type AnnotationSubtypeOfKind, type AnnotationThread, type AnnotationUpdateResult, type AnnotationsCreateWorkerRequest, type AnnotationsDeleteWorkerRequest, type AnnotationsExportAppearanceWorkerRequest, type AnnotationsFlattenWorkerRequest, type AnnotationsListFullPageWorkerRequest, type AnnotationsListRawAllWorkerRequest, type AnnotationsListRawPageWorkerRequest, type AnnotationsMoveWorkerRequest, type AnnotationsReadFileWorkerRequest, type AnnotationsRenderAppearancesEncodedWorkerRequest, type AnnotationsRenderAppearancesWorkerRequest, type AnnotationsUpdateWorkerRequest, type AppearanceAction, type AppearanceImpact, type AppearanceOutcome, type AttachmentContent, type AttachmentCreateResult, type AttachmentDeleteResult, type AttachmentFileBase, type AttachmentFileInfo, type AttachmentFileSource, type AttachmentFileWorkerPayload, type AttachmentsCache, type AttachmentsCreateWorkerRequest, type AttachmentsDeleteWorkerRequest, type AttachmentsListWorkerRequest, type AttachmentsReadFileWorkerRequest, type BinaryMetadata, type BinaryMimeType, type BinaryPayload, type BinarySource, type BlendMode, type BuildCommentThreadsOptions, CONTINUOUS_RENDER_POLICY, type CacheDelta, type CachePins, type CalloutLine, type CaretAnnotationDTO, type CaretDraft, type CaretIntent, type CaretPatch, type CdnAccessInfo, type CdnAdapter, type CharBoundaryBias, type CharMapAnchor, type CheckboxFieldDTO, type CheckboxFieldDraft, type CheckboxFieldPatch, type CircleAnnotationDTO, type CircleDraft, type CirclePatch, type CloseWorkerRequest, type CollabAction, type CollabEntity, type CollabFilter, type CollabTarget, type Color, type ColorStyleDraftFields, type ColorStyleFields, type ColorStylePatchFields, type ComboBoxFieldDTO, type ComboBoxFieldDraft, type ComboBoxFieldPatch, type CommentThread, type CommentThreadReview, DEFAULT_PDF_SAVE_MODE, type DTOOfKind, type DocCapability, type DocumentAccessInfo, type DocumentAccessReason, type DocumentActionsService, type DocumentActionsSnapshot, type DocumentAnnotationsService, type DocumentAttachmentsService, type DocumentCapabilities, type DocumentCheckPasswordPermissionsWorkerRequest, type DocumentEncryptionState, type DocumentEvent, type DocumentEventInit, type DocumentEventStream, type DocumentEventType, type DocumentFormsService, type DocumentHandle, type IdentityClaims as DocumentIdentity, type IdentityClaims, type DocumentManifest, type DocumentMetadata, type DocumentMetadataTrapped, type DocumentOpenMode, type DocumentPagesService, type DocumentProbeSecurityFileWorkerRequest, type DocumentRedactionService, type DocumentRenderPageFileEncodedWorkerRequest, type DocumentRenderPageFileWorkerRequest, type DocumentRenderService, type DocumentSaveBufferWorkerRequest, type DocumentSaveFileWorkerRequest, type DocumentSaveLayerBufferWorkerRequest, type DocumentSearchService, type DocumentSecurityProbeInfo, type DocumentSecurityService, type DocumentSecurityState, type DocumentUnlockInput, type DocumentUnlockResult, type DraftOfKind, EMPTY_TRANSFER, type EmbeddedFileItem, type EmbeddedFileRef, type EncodedAppearanceWire, type EncodedImageWire, type Engine, EngineError, EngineErrorCode, type EngineErrorOptions, type EngineFactory, type EngineRenderPolicy, type EventOrigin, type FileAttachmentAnnotationDTO, type FileAttachmentDraft, type FileAttachmentIcon, type FileAttachmentPatch, type FileAttachmentWireDraft, type FilledStyleDraftFields, type FilledStyleFields, type FilledStylePatchFields, type FoldOptions, type FoldedText, type FontHandle, type FontKey, type FontService, type FontSpec, type FontsAddFallbackWorkerRequest, type FontsClearFallbacksWorkerRequest, type FontsClearWorkerRequest, type FontsRegisterWorkerRequest, type FormDataExport, type FormDataFormat, type FormEffect, type FormEffectResult, type FormEffectStatus, type FormEffectsResult, type FormFieldBase, type FormFieldCreateResult, type FormFieldDTO, type FormFieldDeleteResult, type FormFieldDisplay, type FormFieldDraft, type FormFieldFamily, type FormFieldFlags, type FormFieldOption, type FormFieldOptionInput, type FormFieldOrigin, type FormFieldPatch, type FormFieldRef, type FormFieldUpdateResult, type FormFieldValue, type FormImportResult, type FormKind, type FormRepairOptions, type FormRepairResult, type FormSetValueResult, type FormSnapshot, type FormSubmissionEntry, type FormSubmissionReceipt, type FormSubmissionRequest, type FormValueEntry, type FormWidgetLinkResult, type FormWidgetRef, type FormsApplyEffectsWorkerRequest, type FormsAttachWidgetWorkerRequest, type FormsCreateFieldWorkerRequest, type FormsDeleteFieldWorkerRequest, type FormsDetachWidgetWorkerRequest, type FormsExportWorkerRequest, type FormsImportWorkerRequest, type FormsListWorkerRequest, type FormsRepairWorkerRequest, type FormsResetWorkerRequest, type FormsSetValueWorkerRequest, type FormsUpdateFieldWorkerRequest, type FreeTextAnnotationDTO, type FreeTextDraft, type FreeTextFont, type FreeTextIntent, type FreeTextPatch, type GeometryStyleDraftFields, type GeometryStyleFields, type GeometryStylePatchFields, type HighlightAnnotationDTO, type HighlightDraft, type HighlightPatch, type InkAnnotationDTO, type InkDraft, type InkIntent, type InkList, type InkPatch, type InkStroke, InvalidScope, type LayerArtifactFileWorkerPayload, type LayerArtifactWorkerPayload, type LayerCloseWorkerRequest, type LayerOpenSource, type LayerScopePlane, type LayerScopes, type LineAnnotationDTO, type LineDraft, type LineEnding, type LineEndings, type LinePatch, type LinePoints, type LinkAnnotationDTO, type LinkDraft, type LinkPatch, type ListBoxFieldDTO, type ListBoxFieldDraft, type ListBoxFieldPatch, type ManifestPage, type MetadataCache, type MetadataPatch, type MetadataReadWorkerRequest, type MetadataService, type MetadataUpdateResult, type MetadataUpdateWorkerRequest, MissingIdentity, type MutationMeta, NO_ANNOTATION_FLAGS, type NamedJavaScriptAction, type NamedPageEntry, type NamedPageTarget, type NormalizedDraft, type NormalizedPatch, type NoteIcon, type OpenFatMemoryWorkerRequest, type OpenInput, type OpenInputById, type OpenInputBytes, type OpenInputLayerBytes, type OpenInputLayerSource, type OpenInputShare, type OpenInputToken, type OpenLayerFileBaseWorkerRequest, type OpenLayerMemoryBaseWorkerRequest, type OpenOptions, type OpenWorkerRequest, PAGE_INSERT_BLANK_MAX_COUNT, PDF_BITS, PDF_CODE_TO_SUBTYPE, PDF_SUBTYPE_TO_CODE, type PageAnnotationsService, type PageBoxes, type PageDeleteInput, type PageDeleteResult, type PageFlattenInput, type PageFlattenItemResult, type PageFlattenResult, type PageFlattenStatus, type PageFlattenUsage, type PageGeometryGlyph, type PageGeometryRun, type PageGeometryService, type PageGeometrySnapshot, type PageHandle, type PageImageBlobSource, type PageImageHandle, type PageImageObjectUrl, type PageImageOptions, type PageImageResult, type PageImageSource, type PageInsertBlankSpec, type PageInsertResult, type PageLayout, type PageListSnapshot, type PageMoveCache, type PageMoveInput, type PageMoveResult, type PageNameInput, type PageNameResult, type PageNetworkRenderFormat, type PageObjectNumber, type PageRaster, type PageRemoveNameInput, type PageRenderBackground, type PageRenderEncodedFormat, type PageRenderFormat, type PageRenderOptions, type PageRenderQuery, type PageRenderService, type PageRenderTarget, type PageRenderViewport, type PageRotateInput, type PageRotateResult, type PageRotation, type PageState, type PageStructureCache, type PageTextLayout, type PageTextService, type PageTextSnapshot, type PagesDeleteWorkerRequest, type PagesExtractWorkerRequest, type PagesFlattenWorkerRequest, type PagesGeometryWorkerRequest, type PagesInsertBlankWorkerRequest, type PagesInsertWorkerRequest, type PagesListWorkerRequest, type PagesMoveWorkerRequest, type PagesRemoveNameWorkerRequest, type PagesRenderEncodedWorkerRequest, type PagesRenderWorkerRequest, type PagesRotateWorkerRequest, type PagesSetNameWorkerRequest, type PagesTextWorkerRequest, type ParsedCapability, type ParsedCollab, type ParsedScope, type ParsedVirtual, type ParsedWildcard, type PasswordPrompt, type PatchOfKind, type PdfActionNode, type PdfActionTargetRef, type PdfActionTree, type PdfActionType, type PdfActionWarning, type PdfAnnotationActions, PdfAnnotationSubtypeCode, type PdfBits, type PdfDestination, type PdfFieldActions, type PdfLinkTarget, type PdfLinkTargetWritable, type PdfOriginSize, type PdfPageActions, type PdfPermissionAdvisory, type PdfPermissionInfo, type PdfPoint, type PdfQuad, type PdfQuadCorners, type PdfRect, type PdfRectDifferences, type PdfRotation, type PdfSaveMode, type PdfSize, type PdfTextSegment, PermissionDenied, type PieceInfoApplicationsWorkerRequest, type PieceInfoClearWorkerRequest, type PieceInfoEntry, type PieceInfoPatch, type PieceInfoPatchValue, type PieceInfoReadWorkerRequest, type PieceInfoService, type PieceInfoSnapshot, type PieceInfoUpdateWorkerRequest, type Point, type PolygonAnnotationDTO, type PolygonDraft, type PolygonPatch, type PolylineAnnotationDTO, type PolylineDraft, type PolylinePatch, type PushButtonFieldDTO, type RadioFieldDTO, type RadioFieldDraft, type RadioFieldPatch, type Rect, type RedactAnnotationDTO, type RedactDraft, type RedactPatch, type RedactionApplyItemResult, type RedactionApplyResult, type RedactionApplyScope, type RedactionApplyStatus, type RedactionApplyWorkerRequest, type RefetchReason, type RenderEncode, type ResourceRef, type ReviewStatus, type RevisionToken, type RotatedGeometryGlyph, type RotatedGeometryRun, type Rotation, SEARCH_FOLD_VERSION, SEARCH_REGEX_MAX_LENGTH, SEARCH_SNIPPET_CONTEXT, type SearchMatch, type SearchMatchRange, type SearchMode, type SearchQuery, type SearchQueryIssue, type SearchQueryValidation, type SearchQueryWorkerRequest, type SearchRegexIssue, type SearchRegexValidation, type SearchRequest, type SearchSlice, type SearchSliceBudget, type SearchSnippet, type SerializedEngineError, type ShapeAnnotationFields, type ShapeDraftFields, type ShapePatchFields, type ShutdownWorkerRequest, type SignatureFieldDTO, type Size, type SquareAnnotationDTO, type SquareDraft, type SquarePatch, type SquigglyAnnotationDTO, type SquigglyDraft, type SquigglyPatch, type StampAnnotationDTO, type StampDraft, type StampFit, type StampPatch, type StampWireDraft, type StampWirePatch, type StandardFont, type StrikeoutAnnotationDTO, type StrikeoutDraft, type StrikeoutIntent, type StrikeoutPatch, type SubmitFormFlags, type SubmitFormPayload, type TextAlignment, type TextAnnotationDTO, type TextDraft, type TextFieldDTO, type TextFieldDraft, type TextFieldPatch, type TextLayoutFrame, type TextLayoutGlyph, type TextLayoutRun, type TextPatch, type ToggleFieldWidget, type TokenSource, UNKNOWN_WEAK_ANNOTATION_STATE, type UnderlineAnnotationDTO, type UnderlineDraft, type UnderlinePatch, type UnknownFieldDTO, type UnsupportedAnnotationDTO, type UnsupportedDraft, type UnsupportedPatch, type UprightGeometryRun, type VertexAnnotationFields, type VertexDraftFields, type VertexPatchFields, type WeakAnnotationEditSession, type WeakAnnotationState, type WidgetAnnotationDTO, type WidgetAppearance, type WidgetDraft, type WidgetPatch, type WidgetPlacement, type WidgetStyleDraftFields, type WidgetStyleFields, type WidgetStylePatchFields, type WireAnnotationDraft, type WireAnnotationPatch, type WireAttachmentFile, type WirePack, type WireResource, type WireResourceMap, type WorkerJobId, type WorkerLifecycleMessage, type WorkerRequest, type WorkerResponse, type WorkerResultPayload, advisoryFromPdfBits, appearanceImpactOf, boundaryTextOffset, buildCommentThreads, buildPageTextLayout, buildSnippet, buildThreads, canonicalSearchQuery, caps, changesAnnotationList, charBoundaryAtTextOffset, charMapViolation, charRangeForTextOffsets, checkAnyCapability, checkCapability, checkCollab, checkSetGroup, classifyRelation, collab, createPageImageHandle, decodeFieldRefKey, decodePdfBits, decodeStableIdKey, decodeSubmitFormFlags, deserializeError, encodeFieldRefKey, encodeStableIdKey, expandRawScope, expandTextRangeToLine, expandTextRangeToWord, expandedCapabilities, filterMatches, foldOptionsFor, foldText, glyphLooseBounds, glyphLooseQuad, invalidatesWeakIndexRefs, isAbortError, isRotatedGeometryRun, isStateAnnotation, isValidPageObjectNumber, knownWeakAnnotationState, matchLiteral, matchPageText, matchRegex, materializePdfPermissions, normalizeAnnotationDraft, normalizeAnnotationPatch, normalizeAttachmentFileSource, normalizePdfRect, parseScope, passwordPromptFromState, pdfPermissions, pdfQuadBounds, pdfQuadCorners, pdfQuadFromCorners, pdfRectFromOriginSize, pdfRectHeight, pdfRectSize, pdfRectToOriginSize, pdfRectWidth, permissionInfoFromProbe, permissionInfoWithAdvisory, refKey, resolveBinarySource, revisionTokensEqual, searchContentEpoch, searchRectsForRange, searchSegmentsForRange, securityStateFromHead, securityStateFromProbe, semanticEqual, serializeError, shiftsExistingAnnotationIndices, sliceTextByChars, snapAppearanceScale, snapFullPageViewport, snapTileScale, sniffBinaryMetadata, subtypeFromCode, textGlyphAt, textGlyphQuad, textSegmentsForRange, toOriginalRange, validateScopeArray, validateSearchQuery, validateSearchRegex, wirePack, wordAt, wordBefore };
1347
+ export { ANNOTATION_SUBTYPES, AbortError, type AbortWorkerRequest, type AbortableExecutor, AbortablePromise, type ActionReadBudget, type ActionsReadWorkerRequest, type AnalyzeInput, type AnnotationActor, type AnnotationAppearanceExportInput, type AnnotationAppearanceImage, type AnnotationAppearanceImageOptions, type AnnotationAppearanceImagesResult, type AnnotationAppearanceManifest, type AnnotationAppearanceManifestEntry, type AnnotationAppearanceMode, type AnnotationAppearanceRaster, type AnnotationAppearanceRenderOptions, type AnnotationAppearancesEncodedResultWire, type AnnotationAppearancesQuery, type AnnotationAppearancesResult, type AnnotationBase, type AnnotationBorderStyle, type AnnotationCreateResult, type AnnotationDTO, type AnnotationDeleteResult, type AnnotationDraft, type AnnotationDraftBase, type AnnotationFlags, type AnnotationFlattenInput, type AnnotationFlattenItemResult, type AnnotationFlattenResult, type AnnotationIdentityQuality, type AnnotationKind, type AnnotationKindModule, type AnnotationListMutationMeta, type AnnotationListPageSnapshot, type AnnotationListSnapshotAllPages, type AnnotationMoveResult, type AnnotationMutationKind, type AnnotationPatch, type AnnotationPatchBase, type AnnotationRef, type AnnotationRelationKind, type AnnotationReplyType, type AnnotationStableId, type AnnotationSubtype, type AnnotationSubtypeOfKind, type AnnotationThread, type AnnotationUpdateResult, type AnnotationsCreateWorkerRequest, type AnnotationsDeleteWorkerRequest, type AnnotationsExportAppearanceWorkerRequest, type AnnotationsFlattenWorkerRequest, type AnnotationsListFullPageWorkerRequest, type AnnotationsListRawAllWorkerRequest, type AnnotationsListRawPageWorkerRequest, type AnnotationsMoveWorkerRequest, type AnnotationsReadFileWorkerRequest, type AnnotationsRenderAppearancesEncodedWorkerRequest, type AnnotationsRenderAppearancesWorkerRequest, type AnnotationsUpdateWorkerRequest, type AppearanceAction, type AppearanceImpact, type AppearanceOutcome, type Assessment, type AttachmentContent, type AttachmentCreateResult, type AttachmentDeleteResult, type AttachmentFileBase, type AttachmentFileInfo, type AttachmentFileSource, type AttachmentFileWorkerPayload, type AttachmentsCache, type AttachmentsCreateWorkerRequest, type AttachmentsDeleteWorkerRequest, type AttachmentsListWorkerRequest, type AttachmentsReadFileWorkerRequest, type BaseVersionInfo, type BinaryMetadata, type BinaryMimeType, type BinaryPayload, type BinarySource, type BlendMode, type BuildCommentThreadsOptions, CONTINUOUS_RENDER_POLICY, type CacheDelta, type CachePins, type CalloutLine, type CaretAnnotationDTO, type CaretDraft, type CaretIntent, type CaretPatch, type CdnAccessInfo, type CdnAdapter, type ChangeAnalysis, type ChangeFinding, type CharBoundaryBias, type CharMapAnchor, type CheckboxFieldDTO, type CheckboxFieldDraft, type CheckboxFieldPatch, type CircleAnnotationDTO, type CircleDraft, type CirclePatch, type CloseWorkerRequest, type CollabAction, type CollabEntity, type CollabFilter, type CollabTarget, type Color, type ColorStyleDraftFields, type ColorStyleFields, type ColorStylePatchFields, type ComboBoxFieldDTO, type ComboBoxFieldDraft, type ComboBoxFieldPatch, type CommentThread, type CommentThreadReview, DEFAULT_EDGE_RESOLVER_BUDGET, DEFAULT_PDF_SAVE_MODE, type DTOOfKind, type DigestAlgorithm, type DocCapability, type DocMdpPermission, type DocumentAccessInfo, type DocumentAccessReason, type DocumentActionsService, type DocumentActionsSnapshot, type DocumentAnnotationsService, type DocumentAttachmentsService, type DocumentCapabilities, type DocumentCheckPasswordPermissionsWorkerRequest, type DocumentEncryptionState, type DocumentEvent, type DocumentEventInit, type DocumentEventStream, type DocumentEventType, type DocumentFieldLock, type DocumentFontSettings, type DocumentFormsService, type DocumentHandle, type IdentityClaims as DocumentIdentity, type IdentityClaims, type DocumentManifest, type DocumentMetadata, type DocumentMetadataTrapped, type DocumentOpenMode, type DocumentPagesService, type DocumentProbeSecurityFileWorkerRequest, type DocumentProtection, type DocumentRedactionService, type DocumentRenderPageFileEncodedWorkerRequest, type DocumentRenderPageFileWorkerRequest, type DocumentRenderService, type DocumentSaveBufferWorkerRequest, type DocumentSaveFileWorkerRequest, type DocumentSaveLayerBufferWorkerRequest, type DocumentSearchService, type DocumentSecurityProbeInfo, type DocumentSecurityService, type DocumentSecurityState, type DocumentSetFontSettingsWorkerRequest, type DocumentSignaturesService, type DocumentUnlockInput, type DocumentUnlockResult, type DocumentVersionRef, type DocumentVersionWorkerRequest, type DraftOfKind, EMPTY_TRANSFER, EdgeResolver, type EdgeResolverBudget, type EmbeddedFileItem, type EmbeddedFileRef, type EncodedAppearanceWire, type EncodedImageWire, type Engine, EngineError, EngineErrorCode, type EngineErrorOptions, type EngineFactory, type EngineRenderPolicy, type EventOrigin, type FieldLockAction, type FieldLockSpec, type FileAttachmentAnnotationDTO, type FileAttachmentDraft, type FileAttachmentIcon, type FileAttachmentPatch, type FileAttachmentWireDraft, type FilledStyleDraftFields, type FilledStyleFields, type FilledStylePatchFields, type FoldOptions, type FoldedText, type FontEmbeddingPermission, type FontEmbeddingPolicy, type FontHandle, type FontIdentityInfo, type FontKey, type FontService, type FontSpec, type FontsAddFallbackWorkerRequest, type FontsAuthorizeEditingWorkerRequest, type FontsClearFallbacksWorkerRequest, type FontsClearWorkerRequest, type FontsRegisterWorkerRequest, type FormDataExport, type FormDataFormat, type FormEffect, type FormEffectResult, type FormEffectStatus, type FormEffectsResult, type FormFieldBase, type FormFieldCreateResult, type FormFieldDTO, type FormFieldDeleteResult, type FormFieldDisplay, type FormFieldDraft, type FormFieldFamily, type FormFieldFlags, type FormFieldOption, type FormFieldOptionInput, type FormFieldOrigin, type FormFieldPatch, type FormFieldRef, type FormFieldUpdateResult, type FormFieldValue, type FormImportResult, type FormKind, type FormRepairOptions, type FormRepairResult, type FormSetValueResult, type FormSnapshot, type FormSubmissionEntry, type FormSubmissionReceipt, type FormSubmissionRequest, type FormValueEntry, type FormWidgetLinkResult, type FormWidgetRef, type FormsApplyEffectsWorkerRequest, type FormsAttachWidgetWorkerRequest, type FormsCreateFieldWorkerRequest, type FormsDeleteFieldWorkerRequest, type FormsDetachWidgetWorkerRequest, type FormsExportWorkerRequest, type FormsImportWorkerRequest, type FormsListWorkerRequest, type FormsRepairWorkerRequest, type FormsResetWorkerRequest, type FormsSetSignatureAppearanceWorkerRequest, type FormsSetValueWorkerRequest, type FormsUpdateFieldWorkerRequest, type FreeTextAnnotationDTO, type FreeTextDraft, type FreeTextFont, type FreeTextIntent, type FreeTextPatch, type GeometryStyleDraftFields, type GeometryStyleFields, type GeometryStylePatchFields, type HighlightAnnotationDTO, type HighlightDraft, type HighlightPatch, type InkAnnotationDTO, type InkDraft, type InkIntent, type InkList, type InkPatch, type InkStroke, InvalidScope, type LayerArtifactFileWorkerPayload, type LayerArtifactWorkerPayload, type LayerCloseWorkerRequest, type LayerOpenSource, type LayerScopePlane, type LayerScopes, type LineAnnotationDTO, type LineDraft, type LineEnding, type LineEndings, type LinePatch, type LinePoints, type LinkAnnotationDTO, type LinkDraft, type LinkPatch, type ListBoxFieldDTO, type ListBoxFieldDraft, type ListBoxFieldPatch, type ManifestPage, type MetadataCache, type MetadataPatch, type MetadataReadWorkerRequest, type MetadataService, type MetadataUpdateResult, type MetadataUpdateWorkerRequest, MissingIdentity, type ModificationLevel, type MutationMeta, NO_ANNOTATION_FLAGS, type NamedJavaScriptAction, type NamedPageEntry, type NamedPageTarget, type NormalizedDraft, type NormalizedPatch, type NoteIcon, type ObjectChange, type ObjectChangeKind, type ObjectChangeType, type ObjectReadStatus, type ObjectReferrer, type OpenFatMemoryWorkerRequest, type OpenInput, type OpenInputById, type OpenInputBytes, type OpenInputLayerBytes, type OpenInputLayerSource, type OpenInputShare, type OpenInputToken, type OpenLayerFileBaseWorkerRequest, type OpenLayerMemoryBaseWorkerRequest, type OpenOptions, type OpenWorkerRequest, PAGE_INSERT_BLANK_MAX_COUNT, PDF_BITS, PDF_CODE_TO_SUBTYPE, PDF_SUBTYPE_TO_CODE, type PageAnnotationsService, type PageBoxes, type PageDeleteInput, type PageDeleteResult, type PageFlattenInput, type PageFlattenItemResult, type PageFlattenResult, type PageFlattenStatus, type PageFlattenUsage, type PageGeometryGlyph, type PageGeometryRun, type PageGeometryService, type PageGeometrySnapshot, type PageHandle, type PageImageBlobSource, type PageImageHandle, type PageImageObjectUrl, type PageImageOptions, type PageImageResult, type PageImageSource, type PageInsertBlankSpec, type PageInsertResult, type PageLayout, type PageListSnapshot, type PageMoveCache, type PageMoveInput, type PageMoveResult, type PageNameInput, type PageNameResult, type PageNetworkRenderFormat, type PageObjectNumber, type PageRaster, type PageRemoveNameInput, type PageRenderBackground, type PageRenderEncodedFormat, type PageRenderFormat, type PageRenderOptions, type PageRenderQuery, type PageRenderService, type PageRenderTarget, type PageRenderViewport, type PageRotateInput, type PageRotateResult, type PageRotation, type PageState, type PageStructureCache, type PageTextLayout, type PageTextService, type PageTextSnapshot, type PagesDeleteWorkerRequest, type PagesExtractWorkerRequest, type PagesFlattenWorkerRequest, type PagesGeometryWorkerRequest, type PagesInsertBlankWorkerRequest, type PagesInsertWorkerRequest, type PagesListWorkerRequest, type PagesMoveWorkerRequest, type PagesRemoveNameWorkerRequest, type PagesRenderEncodedWorkerRequest, type PagesRenderWorkerRequest, type PagesRotateWorkerRequest, type PagesSetNameWorkerRequest, type PagesTextWorkerRequest, type ParsedCapability, type ParsedCollab, type ParsedScope, type ParsedVirtual, type ParsedWildcard, type PasswordPrompt, type PatchOfKind, type PdfActionNode, type PdfActionTargetRef, type PdfActionTree, type PdfActionType, type PdfActionWarning, type PdfAnnotationActions, PdfAnnotationSubtypeCode, type PdfBits, type PdfDestination, type PdfFieldActions, type PdfLinkTarget, type PdfLinkTargetWritable, type PdfOriginSize, type PdfPageActions, type PdfPermissionAdvisory, type PdfPermissionInfo, type PdfPoint, type PdfQuad, type PdfQuadCorners, type PdfRect, type PdfRectDifferences, type PdfRevision, type PdfRotation, type PdfSaveMode, type PdfSize, type PdfTextSegment, type PdfValue, PermissionDenied, type PieceInfoApplicationsWorkerRequest, type PieceInfoClearWorkerRequest, type PieceInfoEntry, type PieceInfoPatch, type PieceInfoPatchValue, type PieceInfoReadWorkerRequest, type PieceInfoService, type PieceInfoSnapshot, type PieceInfoUpdateWorkerRequest, type Point, type PolygonAnnotationDTO, type PolygonDraft, type PolygonPatch, type PolylineAnnotationDTO, type PolylineDraft, type PolylinePatch, type PushButtonFieldDTO, type RadioFieldDTO, type RadioFieldDraft, type RadioFieldPatch, type Rect, type RedactAnnotationDTO, type RedactDraft, type RedactPatch, type RedactionApplyItemResult, type RedactionApplyResult, type RedactionApplyScope, type RedactionApplyStatus, type RedactionApplyWorkerRequest, type RefetchReason, type RenderEncode, type ResolvedUsage, type ResourceRef, type RestrictionAnchor, type ReviewStatus, type RevisionAnalysis, type RevisionField, type RevisionHealth, type RevisionStructure, type RevisionToken, type RichTextAlign, type RichTextBody, type RichTextDecoration, type RichTextDirection, type RichTextDocument, type RichTextDocumentInput, type RichTextMargins, type RichTextParagraph, type RichTextParagraphProps, type RichTextRun, type RichTextRunStyle, type RichTextScript, type RotatedGeometryGlyph, type RotatedGeometryRun, type Rotation, SEARCH_FOLD_VERSION, SEARCH_REGEX_MAX_LENGTH, SEARCH_SNIPPET_CONTEXT, SIGNATURE_POLICY_VERSION, type SearchMatch, type SearchMatchRange, type SearchMode, type SearchQuery, type SearchQueryIssue, type SearchQueryValidation, type SearchQueryWorkerRequest, type SearchRegexIssue, type SearchRegexValidation, type SearchRequest, type SearchSlice, type SearchSliceBudget, type SearchSnippet, type SerializedEngineError, type SessionKind, type ShapeAnnotationFields, type ShapeDraftFields, type ShapePatchFields, type ShutdownWorkerRequest, type SignatureAbortResult, type SignatureAppearanceInput, type SignatureCompleteInput, type SignatureCompleteResult, type SignatureCoverage, type SignatureDTO, type SignatureFieldDTO, type SignatureKind, type SignaturePrepareInput, type SignaturePrepared, type SignatureSeedValue, type SignatureSigner, type SignatureSnapshot, type SignatureSubFilter, type SignaturesAbortWorkerRequest, type SignaturesAnalyzeWorkerRequest, type SignaturesCompleteWorkerRequest, type SignaturesContentsWorkerRequest, type SignaturesDigestWorkerRequest, type SignaturesFinalizeCandidateWorkerRequest, type SignaturesListWorkerRequest, type SignaturesPrepareWorkerRequest, type SignaturesRevisionBytesWorkerRequest, type SignedDocumentPolicy, type Size, type SquareAnnotationDTO, type SquareDraft, type SquarePatch, type SquigglyAnnotationDTO, type SquigglyDraft, type SquigglyPatch, type StampAnnotationDTO, type StampDraft, type StampFit, type StampPatch, type StampWireDraft, type StampWirePatch, type StandardFont, type StepInput, type StepVerdict, type StrikeoutAnnotationDTO, type StrikeoutDraft, type StrikeoutIntent, type StrikeoutPatch, type SubmitFormFlags, type SubmitFormPayload, type TextAlignment, type TextAnnotationDTO, type TextDraft, type TextFieldDTO, type TextFieldDraft, type TextFieldPatch, type TextLayoutFrame, type TextLayoutGlyph, type TextLayoutRun, type TextPatch, type ToggleFieldWidget, type TokenSource, UNKNOWN_WEAK_ANNOTATION_STATE, USAGE_INCOMPLETE, type UnderlineAnnotationDTO, type UnderlineDraft, type UnderlinePatch, type UnknownFieldDTO, type UnsupportedAnnotationDTO, type UnsupportedDraft, type UnsupportedPatch, type UprightGeometryRun, type VertexAnnotationFields, type VertexDraftFields, type VertexPatchFields, type WeakAnnotationEditSession, type WeakAnnotationState, type WidgetAnnotationDTO, type WidgetAppearance, type WidgetDraft, type WidgetPatch, type WidgetPlacement, type WidgetStyleDraftFields, type WidgetStyleFields, type WidgetStylePatchFields, type WireAnnotationDraft, type WireAnnotationPatch, type WireAttachmentFile, type WirePack, type WireResource, type WireResourceMap, type WorkerJobId, type WorkerLifecycleMessage, type WorkerRequest, type WorkerResponse, type WorkerResultPayload, advisoryFromPdfBits, appearanceImpactOf, assessmentOf, boundaryTextOffset, buildCommentThreads, buildPageTextLayout, buildSnippet, buildThreads, canonicalSearchQuery, caps, changedKeys, changesAnnotationList, charBoundaryAtTextOffset, charMapViolation, charRangeForTextOffsets, checkAnyCapability, checkCapability, checkCollab, checkSetGroup, classifyRelation, collab, combine, conclude, createPageImageHandle, decodeFieldRefKey, decodePdfBits, decodeStableIdKey, decodeSubmitFormFlags, deriveProtection, deserializeError, dictEntries, encodeFieldRefKey, encodeStableIdKey, evaluateStep, expandRawScope, expandTextRangeToLine, expandTextRangeToWord, expandedCapabilities, fieldLockFor, filterMatches, foldOptionsFor, foldText, glyphLooseBounds, glyphLooseQuad, invalidatesWeakIndexRefs, isAbortError, isRotatedGeometryRun, isStateAnnotation, isValidPageObjectNumber, knownWeakAnnotationState, levelAllows, levelFromPermission, lockCovers, lockNameCovers, matchLiteral, matchPageText, matchRegex, materializePdfPermissions, minLevel, normalizeAnnotationDraft, normalizeAnnotationPatch, normalizeAttachmentFileSource, normalizePdfRect, parsePdfValue, parseScope, passwordPromptFromState, pdfPermissions, pdfQuadBounds, pdfQuadCorners, pdfQuadFromCorners, pdfRectFromOriginSize, pdfRectHeight, pdfRectSize, pdfRectToOriginSize, pdfRectWidth, pdfValueEquals, permissionInfoFromProbe, permissionInfoWithAdvisory, primaryFinding, protectedCapabilities, refKey, refsOf, resolveBinarySource, restrictionsFor, restrictionsOf, revisionTokensEqual, richTextParagraphsFromPlainText, richTextPlainText, sameEffectiveValue, searchContentEpoch, searchRectsForRange, searchSegmentsForRange, securityStateFromHead, securityStateFromProbe, semanticEqual, serializeError, shiftsExistingAnnotationIndices, sliceTextByChars, snapAppearanceScale, snapFullPageViewport, snapTileScale, sniffBinaryMetadata, stableStringify, subtypeFromCode, textGlyphAt, textGlyphQuad, textSegmentsForRange, toOriginalRange, validateScopeArray, validateSearchQuery, validateSearchRegex, wirePack, wordAt, wordBefore, worstVerdict };
1161
1348
  //# sourceMappingURL=runtime.d.cts.map