@embedpdf/engine-core 3.0.0-next.1 → 3.0.0-next.11

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 (62) hide show
  1. package/dist/{AbortError-CjSasIlL.js → AbortError-8-9JAX1Y.js} +2 -2
  2. package/dist/{AbortError-CjSasIlL.js.map → AbortError-8-9JAX1Y.js.map} +1 -1
  3. package/dist/{AbortError-ByBflvEl.cjs → AbortError-CRSooKsk.cjs} +2 -2
  4. package/dist/{AbortError-ByBflvEl.cjs.map → AbortError-CRSooKsk.cjs.map} +1 -1
  5. package/dist/{AnnotationListSnapshot-W0RCsyDE.d.cts → AnnotationListSnapshot-C1U3XUxP.d.cts} +846 -127
  6. package/dist/{AnnotationListSnapshot-W0RCsyDE.d.ts → AnnotationListSnapshot-C1U3XUxP.d.ts} +846 -127
  7. package/dist/{DocumentSecurityService-Df79fgpe.d.cts → DocumentSecurityService-6rhztZlz.d.cts} +33 -2
  8. package/dist/{DocumentSecurityService-B-tULKNY.d.ts → DocumentSecurityService-7nL9aY75.d.ts} +33 -2
  9. package/dist/{Engine-B7Oe7f5i.d.ts → Engine-CWnAKccD.d.ts} +62 -19
  10. package/dist/{Engine-D9loFZc1.d.cts → Engine-D3868xIU.d.cts} +62 -19
  11. package/dist/{subtype-qejjVr6h.cjs → PageInsertBlankInput-CzShuSJI.cjs} +184 -1
  12. package/dist/PageInsertBlankInput-CzShuSJI.cjs.map +1 -0
  13. package/dist/{subtype-BvAzLCGC.js → PageInsertBlankInput-WKY0tr6S.js} +149 -2
  14. package/dist/PageInsertBlankInput-WKY0tr6S.js.map +1 -0
  15. package/dist/{builders-C548U47M.js → builders-Cdz34nbF.js} +566 -164
  16. package/dist/builders-Cdz34nbF.js.map +1 -0
  17. package/dist/{builders-BvikWRuO.cjs → builders-Do6_4KnS.cjs} +628 -220
  18. package/dist/builders-Do6_4KnS.cjs.map +1 -0
  19. package/dist/conformance.cjs +1039 -204
  20. package/dist/conformance.cjs.map +1 -1
  21. package/dist/conformance.d.cts +130 -6
  22. package/dist/conformance.d.ts +130 -6
  23. package/dist/conformance.js +994 -163
  24. package/dist/conformance.js.map +1 -1
  25. package/dist/{fold-CB4fAOOy.js → fold-BfyxxwS6.js} +162 -3
  26. package/dist/fold-BfyxxwS6.js.map +1 -0
  27. package/dist/{fold-IaMph3CO.cjs → fold-C7I5GpBz.cjs} +235 -4
  28. package/dist/fold-C7I5GpBz.cjs.map +1 -0
  29. package/dist/index.cjs +38 -19
  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-DiPMTfcy.js → resolver-CHG4waXL.js} +2 -1
  34. package/dist/resolver-CHG4waXL.js.map +1 -0
  35. package/dist/{resolver-DAZWVoJL.cjs → resolver-D-jumvgM.cjs} +2 -1
  36. package/dist/resolver-D-jumvgM.cjs.map +1 -0
  37. package/dist/runtime.cjs +43 -24
  38. package/dist/runtime.cjs.map +1 -1
  39. package/dist/runtime.d.cts +103 -5
  40. package/dist/runtime.d.ts +103 -5
  41. package/dist/runtime.js +6 -6
  42. package/dist/{schemas-B_1VyFsm.cjs → schemas-CS5iPpX5.cjs} +305 -111
  43. package/dist/schemas-CS5iPpX5.cjs.map +1 -0
  44. package/dist/{schemas-9OpSSeM6.js → schemas-XGrNVMDd.js} +250 -92
  45. package/dist/schemas-XGrNVMDd.js.map +1 -0
  46. package/dist/wire.cjs +131 -4
  47. package/dist/wire.cjs.map +1 -1
  48. package/dist/wire.d.cts +277 -20
  49. package/dist/wire.d.ts +277 -20
  50. package/dist/wire.js +120 -5
  51. package/dist/wire.js.map +1 -1
  52. package/package.json +1 -1
  53. package/dist/builders-BvikWRuO.cjs.map +0 -1
  54. package/dist/builders-C548U47M.js.map +0 -1
  55. package/dist/fold-CB4fAOOy.js.map +0 -1
  56. package/dist/fold-IaMph3CO.cjs.map +0 -1
  57. package/dist/resolver-DAZWVoJL.cjs.map +0 -1
  58. package/dist/resolver-DiPMTfcy.js.map +0 -1
  59. package/dist/schemas-9OpSSeM6.js.map +0 -1
  60. package/dist/schemas-B_1VyFsm.cjs.map +0 -1
  61. package/dist/subtype-BvAzLCGC.js.map +0 -1
  62. package/dist/subtype-qejjVr6h.cjs.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- import { $a as AnnotationIdentityQuality, $i as LayerScopes, $n as searchRectsForRange, $o as pdfQuadCorners, $r as ListBoxFieldDraft, $s as revisionTokensEqual, Aa as EmbeddedFileItem, Ac as PdfSize, Ai as AnnotationCreateResult, An as HighlightDraft, Ao as PageImageHandle, Ar as FormFieldDeleteResult, As as filterMatches, At as LineDraft, B as StampAnnotationDTO, Ba as BinarySource, Bc as PdfPageActions, Bi as changesAnnotationList, Bn as PageFlattenStatus, Bo as PageRenderOptions, Br as FormFieldDisplay, Bs as CollabEntity, Bt as PolygonPatch, C as RedactDraft, Ca as GeometryStyleDraftFields, Cc as InkList, Ci as ToggleFieldWidget, Cn as UnderlineAnnotationDTO, Co as AnnotationAppearancesQuery, Cr as SearchQuery, Cs as CollabTarget, Ct as LinkAnnotationDTO, Da as AttachmentFileBase, Dc as PdfQuad, Di as FormWidgetRef, Do as WeakAnnotationState, Dr as SearchSnippet, Ds as checkSetGroup, E as WidgetDraft, Ea as AttachmentContent, Ec as PdfPoint, Ei as FormFieldRef, Eo as UNKNOWN_WEAK_ANNOTATION_STATE, Er as SearchSliceBudget, Es as checkCollab, Fa as normalizeAnnotationPatch, Fc as PdfActionTree, Fi as AppearanceImpact, Fn as RedactionApplyScope, Fo as PageNetworkRenderFormat, Fr as FormWidgetLinkResult, Fs as validateScopeArray, Ft as PolylineAnnotationDTO, Ga as ANNOTATION_SUBTYPES, Gi as CacheDelta, Gn as PageRotateResult, Go as PageGeometryGlyph, Gr as FormFieldPatch, Gs as ParsedCollab, Gt as VertexPatchFields, H as StampFit, Ha as WireResource, Hc as DocumentMetadataTrapped, Hi as shiftsExistingAnnotationIndices, Hn as PageInsertResult, Ho as PageRenderTarget, Hr as FormFieldValue, Hs as DocCapability, Ht as PolygonDraft, Ia as BinaryMetadata, Ic as PdfActionType, Ii as AppearanceOutcome, In as RedactionApplyStatus, Io as PageRaster, Ir as FormEffect, Is as PDF_BITS, It as PolylineDraft, J as TextPatch, Ja as PDF_SUBTYPE_TO_CODE, Ji as PdfLinkTargetWritable, Jn as PageMoveResult, Jo as PageTextSnapshot, Jr as TextFieldPatch, Js as ParsedWildcard, Ka as AnnotationSubtype, Ki as MutationMeta, Kn as PageRotateInput, Ko as PageGeometryRun, Kr as ListBoxFieldPatch, Ks as ParsedScope, La as BinaryMimeType, Lc as PdfActionWarning, Li as appearanceImpactOf, Ln as PageFlattenInput, Lo as PageRenderBackground, Lr as FormEffectResult, Ls as decodePdfBits, M as FileAttachmentPatch, Ma as NormalizedDraft, Mc as DocumentActionsSnapshot, Mi as AnnotationMoveResult, Mn as MetadataUpdateResult, Mo as PageImageOptions, Mr as FormImportResult, Ms as MissingIdentity, N as FileAttachmentAnnotationDTO, Na as NormalizedPatch, Nc as NamedJavaScriptAction, Ni as AnnotationUpdateResult, Nn as RedactionApplyItemResult, No as PageImageResult, Nr as FormRepairResult, Ns as PermissionDenied, Oa as AttachmentFileInfo, Oc as PdfRect, Oi as decodeFieldRefKey, On as HighlightPatch, Oo as knownWeakAnnotationState, Or as FormDataExport, Os as expandRawScope, Ot as LinePatch, Pa as normalizeAnnotationDraft, Pc as PdfActionNode, Pi as AppearanceAction, Pn as RedactionApplyResult, Po as PageImageSource, Pr as FormSetValueResult, Ps as parseScope, Pt as PolylinePatch, Qa as AnnotationBase, Qi as LayerScopePlane, Qn as searchContentEpoch, Qo as pdfQuadBounds, Qr as FormFieldOptionInput, Qs as RevisionToken, R as StampPatch, Ra as sniffBinaryMetadata, Rc as PdfAnnotationActions, Ri as semanticEqual, Rn as PageFlattenItemResult, Ro as PageRenderEncodedFormat, Rr as FormEffectStatus, Rs as AnnotationActor, S as RedactAnnotationDTO, Sa as FilledStylePatchFields, Sc as CalloutLine, Si as TextFieldDTO, Sn as UnderlinePatch, So as AnnotationAppearanceRenderOptions, Sr as SearchMode, Ss as pdfPermissions, St as LinkPatch, T as WidgetAnnotationDTO, Ta as GeometryStylePatchFields, Tc as LinePoints, Ti as FormValueEntry, To as PageState, Tr as SearchSlice, Ts as checkCapability, U as StampWireDraft, Ua as WireResourceMap, Ui as AnnotationListMutationMeta, Un as PageDeleteResult, Uo as PageRenderViewport, Ur as CheckboxFieldPatch, Us as IdentityClaims, Ut as VertexAnnotationFields, V as StampDraft, Va as ResourceRef, Vc as DocumentMetadata, Vi as invalidatesWeakIndexRefs, Vn as PageFlattenUsage, Vo as PageRenderQuery, Vr as FormDataFormat, Vs as CollabFilter, Vt as PolygonAnnotationDTO, Wa as resolveBinarySource, Wi as RefetchReason, Wn as PageDeleteInput, Wo as createPageImageHandle, Wr as ComboBoxFieldPatch, Ws as ParsedCapability, Wt as VertexDraftFields, X as NoteIcon, Xa as subtypeFromCode, Xi as DocumentManifest, Xn as PageMoveInput, Xo as PdfQuadCorners, Xr as ComboBoxFieldDraft, Xs as AnnotationDraftBase, Xt as SquareAnnotationDTO, Y as TextAnnotationDTO, Ya as PdfAnnotationSubtypeCode, Yi as PdfDestination, Yn as PageStructureCache, Yo as PdfOriginSize, Yr as CheckboxFieldDraft, Ys as PdfBits, Yt as SquarePatch, Z as TextDraft, Za as AnnotationPatchBase, Zi as ManifestPage, Zn as canonicalSearchQuery, Zo as normalizePdfRect, Zr as FormFieldDraft, Zs as AnnotationRef, Zt as SquareDraft, _a as ColorStyleDraftFields, _c as Rotation, _i as FormFieldOrigin, _n as SquigglyAnnotationDTO, _o as AnnotationAppearanceImagesResult, _r as SEARCH_FOLD_VERSION, _s as OpenOptions, aa as AnnotationKindModule, ac as BlendMode, ai as WidgetAppearance, an as ShapeDraftFields, ao as SerializedEngineError, ar as SearchQueryValidation, as as pdfRectWidth, b as UnsupportedAnnotationDTO, ba as FilledStyleDraftFields, bc as StrikeoutIntent, bi as RadioFieldDTO, bo as AnnotationAppearanceMode, br as toOriginalRange, bs as collab, c as AnnotationKind, ca as PatchOfKind, cc as FreeTextFont, ci as WidgetStyleFields, co as EngineErrorCode, cr as matchRegex, cs as PageLayout, ct as FreeTextAnnotationDTO, d as AnnotationSubtypeOfKind, da as AttachmentsCache, dc as LineEnding, di as ComboBoxFieldDTO, dn as StrikeoutAnnotationDTO, do as FontSpec, dr as foldOptionsFor, ds as OpenInput, ea as AnnotationRelationKind, ec as PageObjectNumber, ei as RadioFieldDraft, eo as AnnotationStableId, er as SEARCH_SNIPPET_CONTEXT, es as pdfQuadFromCorners, fa as normalizeAttachmentFileSource, fc as LineEndings, fi as FormFieldBase, fn as StrikeoutDraft, fo as DEFAULT_PDF_SAVE_MODE, fr as matchLiteral, fs as OpenInputById, ga as WireAttachmentFile, gc as Rect, gi as FormFieldOption, gn as SquigglyPatch, go as AnnotationAppearanceImageOptions, gr as FoldedText, gs as OpenInputToken, ha as FileAttachmentWireDraft, hc as Point, hi as FormFieldFlags, ho as AnnotationAppearanceImage, hr as FoldOptions, hs as OpenInputLayerSource, ht as InkDraft, i as AnnotationDTO, ia as refKey, ic as AnnotationReplyType, ii as FormSnapshot, in as ShapeAnnotationFields, io as EngineErrorOptions, ir as SearchQueryIssue, is as pdfRectToOriginSize, ja as EmbeddedFileRef, jc as ActionReadBudget, ji as AnnotationDeleteResult, jn as MetadataCache, jo as PageImageObjectUrl, jr as FormFieldUpdateResult, js as InvalidScope, ka as AttachmentFileSource, kc as PdfRotation, ki as encodeFieldRefKey, kn as HighlightAnnotationDTO, ko as PageImageBlobSource, kr as FormFieldCreateResult, ks as expandedCapabilities, kt as LineAnnotationDTO, l as AnnotationPatch, la as AttachmentCreateResult, lc as FreeTextIntent, li as WidgetStylePatchFields, lo as FontHandle, lr as validateSearchQuery, ls as PageRotation, lt as FreeTextDraft, m as WireAnnotationPatch, ma as FileAttachmentIcon, mc as PdfRectDifferences, mi as FormFieldFamily, mo as CachePins, mr as wordBefore, ms as OpenInputLayerBytes, mt as InkAnnotationDTO, n as AnnotationListSnapshotAllPages, na as buildThreads, nc as AnnotationBorderStyle, ni as WidgetPlacement, nn as CircleAnnotationDTO, no as encodeStableIdKey, nr as matchPageText, ns as pdfRectHeight, nt as CaretAnnotationDTO, o as AnnotationDraft, oa as DTOOfKind, oc as CaretIntent, on as ShapePatchFields, oo as deserializeError, or as SearchRegexIssue, os as PageListSnapshot, p as WireAnnotationDraft, pa as FileAttachmentDraft, pc as NO_ANNOTATION_FLAGS, pi as FormFieldDTO, po as PdfSaveMode, pr as wordAt, ps as OpenInputBytes, pt as InkPatch, qa as PDF_CODE_TO_SUBTYPE, qi as PdfLinkTarget, qn as PageMoveCache, qo as PageGeometrySnapshot, qr as RadioFieldPatch, qs as ParsedVirtual, ra as classifyRelation, rc as AnnotationFlags, ri as FormKind, rn as CircleDraft, ro as EngineError, rr as SEARCH_REGEX_MAX_LENGTH, rs as pdfRectSize, rt as CaretDraft, sa as DraftOfKind, sc as Color, si as WidgetStyleDraftFields, so as serializeError, sr as SearchRegexValidation, ss as PageBoxes, st as FreeTextPatch, t as AnnotationListPageSnapshot, ta as AnnotationThread, tc as isValidPageObjectNumber, ti as TextFieldDraft, tn as CirclePatch, to as decodeStableIdKey, tr as buildSnippet, ts as pdfRectFromOriginSize, tt as CaretPatch, ua as AttachmentDeleteResult, uc as InkIntent, ui as CheckboxFieldDTO, un as StrikeoutPatch, uo as FontKey, ur as validateSearchRegex, us as MetadataPatch, v as UnsupportedPatch, va as ColorStyleFields, vc as Size, vi as ListBoxFieldDTO, vn as SquigglyDraft, vo as AnnotationAppearanceManifest, vr as SearchMatchRange, vs as TokenSource, w as WidgetPatch, wa as GeometryStyleFields, wc as InkStroke, wi as UnknownFieldDTO, wn as UnderlineDraft, wo as AnnotationAppearancesResult, wr as SearchRequest, ws as checkAnyCapability, wt as LinkDraft, x as RedactPatch, xa as FilledStyleFields, xc as TextAlignment, xi as SignatureFieldDTO, xo as AnnotationAppearanceRaster, xr as SearchMatch, xs as materializePdfPermissions, y as UnsupportedDraft, ya as ColorStylePatchFields, yc as StandardFont, yi as PushButtonFieldDTO, yo as AnnotationAppearanceManifestEntry, yr as foldText, ys as caps, z as StampWirePatch, za as BinaryPayload, zc as PdfFieldActions, zi as AnnotationMutationKind, zn as PageFlattenResult, zo as PageRenderFormat, zr as FormEffectsResult, zs as CollabAction } from "./AnnotationListSnapshot-W0RCsyDE.cjs";
2
- export { ANNOTATION_SUBTYPES, type ActionReadBudget, type AnnotationActor, type AnnotationAppearanceImage, type AnnotationAppearanceImageOptions, type AnnotationAppearanceImagesResult, type AnnotationAppearanceManifest, type AnnotationAppearanceManifestEntry, type AnnotationAppearanceMode, type AnnotationAppearanceRaster, type AnnotationAppearanceRenderOptions, type AnnotationAppearancesQuery, type AnnotationAppearancesResult, type AnnotationBase, type AnnotationBorderStyle, type AnnotationCreateResult, type AnnotationDTO, type AnnotationDeleteResult, type AnnotationDraft, type AnnotationDraftBase, type AnnotationFlags, 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 AppearanceAction, type AppearanceImpact, type AppearanceOutcome, type AttachmentContent, type AttachmentCreateResult, type AttachmentDeleteResult, type AttachmentFileBase, type AttachmentFileInfo, type AttachmentFileSource, type AttachmentsCache, type BinaryMetadata, type BinaryMimeType, type BinaryPayload, type BinarySource, type BlendMode, type CacheDelta, type CachePins, type CalloutLine, type CaretAnnotationDTO, type CaretDraft, type CaretIntent, type CaretPatch, type CheckboxFieldDTO, type CheckboxFieldDraft, type CheckboxFieldPatch, type CircleAnnotationDTO, type CircleDraft, type CirclePatch, type CollabAction, type CollabEntity, type CollabFilter, type CollabTarget, type Color, type ColorStyleDraftFields, type ColorStyleFields, type ColorStylePatchFields, type ComboBoxFieldDTO, type ComboBoxFieldDraft, type ComboBoxFieldPatch, DEFAULT_PDF_SAVE_MODE, type DTOOfKind, type DocCapability, type DocumentActionsSnapshot, type DocumentManifest, type DocumentMetadata, type DocumentMetadataTrapped, type DraftOfKind, type EmbeddedFileItem, type EmbeddedFileRef, EngineError, EngineErrorCode, type EngineErrorOptions, 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 FontSpec, 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 FormRepairResult, type FormSetValueResult, type FormSnapshot, type FormValueEntry, type FormWidgetLinkResult, type FormWidgetRef, type FreeTextAnnotationDTO, type FreeTextDraft, type FreeTextFont, type FreeTextIntent, type FreeTextPatch, type GeometryStyleDraftFields, type GeometryStyleFields, type GeometryStylePatchFields, type HighlightAnnotationDTO, type HighlightDraft, type HighlightPatch, type IdentityClaims, type InkAnnotationDTO, type InkDraft, type InkIntent, type InkList, type InkPatch, type InkStroke, InvalidScope, 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 MetadataUpdateResult, MissingIdentity, type MutationMeta, NO_ANNOTATION_FLAGS, type NamedJavaScriptAction, type NormalizedDraft, type NormalizedPatch, type NoteIcon, type OpenInput, type OpenInputById, type OpenInputBytes, type OpenInputLayerBytes, type OpenInputLayerSource, type OpenInputToken, type OpenOptions, PDF_BITS, PDF_CODE_TO_SUBTYPE, PDF_SUBTYPE_TO_CODE, type PageBoxes, type PageDeleteInput, type PageDeleteResult, type PageFlattenInput, type PageFlattenItemResult, type PageFlattenResult, type PageFlattenStatus, type PageFlattenUsage, type PageGeometryGlyph, type PageGeometryRun, type PageGeometrySnapshot, type PageImageBlobSource, type PageImageHandle, type PageImageObjectUrl, type PageImageOptions, type PageImageResult, type PageImageSource, type PageInsertResult, type PageLayout, type PageListSnapshot, type PageMoveCache, type PageMoveInput, type PageMoveResult, type PageNetworkRenderFormat, type PageObjectNumber, type PageRaster, type PageRenderBackground, type PageRenderEncodedFormat, type PageRenderFormat, type PageRenderOptions, type PageRenderQuery, type PageRenderTarget, type PageRenderViewport, type PageRotateInput, type PageRotateResult, type PageRotation, type PageState, type PageStructureCache, type PageTextSnapshot, type ParsedCapability, type ParsedCollab, type ParsedScope, type ParsedVirtual, type ParsedWildcard, type PatchOfKind, type PdfActionNode, type PdfActionTree, type PdfActionType, type PdfActionWarning, type PdfAnnotationActions, PdfAnnotationSubtypeCode, type PdfBits, type PdfDestination, type PdfFieldActions, type PdfLinkTarget, type PdfLinkTargetWritable, type PdfOriginSize, type PdfPageActions, type PdfPoint, type PdfQuad, type PdfQuadCorners, type PdfRect, type PdfRectDifferences, type PdfRotation, type PdfSaveMode, type PdfSize, PermissionDenied, 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 RefetchReason, type ResourceRef, type RevisionToken, 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 SearchRegexIssue, type SearchRegexValidation, type SearchRequest, type SearchSlice, type SearchSliceBudget, type SearchSnippet, type SerializedEngineError, type ShapeAnnotationFields, type ShapeDraftFields, type ShapePatchFields, 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 TextAlignment, type TextAnnotationDTO, type TextDraft, type TextFieldDTO, type TextFieldDraft, type TextFieldPatch, 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 VertexAnnotationFields, type VertexDraftFields, type VertexPatchFields, 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 WireResource, type WireResourceMap, appearanceImpactOf, buildSnippet, buildThreads, canonicalSearchQuery, caps, changesAnnotationList, checkAnyCapability, checkCapability, checkCollab, checkSetGroup, classifyRelation, collab, createPageImageHandle, decodeFieldRefKey, decodePdfBits, decodeStableIdKey, deserializeError, encodeFieldRefKey, encodeStableIdKey, expandRawScope, expandedCapabilities, filterMatches, foldOptionsFor, foldText, invalidatesWeakIndexRefs, isValidPageObjectNumber, knownWeakAnnotationState, matchLiteral, matchPageText, matchRegex, materializePdfPermissions, normalizeAnnotationDraft, normalizeAnnotationPatch, normalizeAttachmentFileSource, normalizePdfRect, parseScope, pdfPermissions, pdfQuadBounds, pdfQuadCorners, pdfQuadFromCorners, pdfRectFromOriginSize, pdfRectHeight, pdfRectSize, pdfRectToOriginSize, pdfRectWidth, refKey, resolveBinarySource, revisionTokensEqual, searchContentEpoch, searchRectsForRange, semanticEqual, serializeError, shiftsExistingAnnotationIndices, sniffBinaryMetadata, subtypeFromCode, toOriginalRange, validateScopeArray, validateSearchQuery, validateSearchRegex, wordAt, wordBefore };
1
+ import { $a as AttachmentFileInfo, $c as Rect, $i as AnnotationUpdateResult, $n as canonicalSearchQuery, $o as knownWeakAnnotationState, $r as FormEffectsResult, $s as OpenInputLayerSource, Aa as AnnotationKindModule, Ac as ParsedCollab, Ai as CheckboxFieldDTO, Al as isValidPageObjectNumber, An as HighlightDraft, Ao as SerializedEngineError, Ar as SearchSnippet, As as charMapViolation, At as LineDraft, B as StampAnnotationDTO, Ba as FileAttachmentWireDraft, Bc as AnnotationFlags, Bi as RadioFieldDTO, Bn as PageFlattenStatus, Bo as AnnotationAppearanceImage, Br as textGlyphQuad, Bs as pdfRectHeight, Bt as PolygonPatch, C as RedactDraft, Ca as buildCommentThreads, Cc as AnnotationActor, Ci as FormKind, Cl as PdfFieldActions, Cn as UnderlineAnnotationDTO, Co as AnnotationBase, Cr as toOriginalRange, Cs as glyphLooseQuad, Ct as LinkAnnotationDTO, Da as buildThreads, Dc as DocCapability, Di as WidgetStyleDraftFields, Dl as decodeSubmitFormFlags, Do as encodeStableIdKey, Dr as SearchRequest, Ds as CharMapAnchor, E as WidgetDraft, Ea as AnnotationThread, Ec as CollabFilter, El as SubmitFormPayload, Eo as decodeStableIdKey, Er as SearchQuery, Es as CharBoundaryBias, Fa as AttachmentDeleteResult, Fc as AnnotationDraftBase, Fi as FormFieldFlags, Fn as RedactionApplyScope, Fo as FontKey, Fr as TextLayoutRun, Fs as normalizePdfRect, Ft as PolylineAnnotationDTO, Ga as FilledStyleDraftFields, Gc as FreeTextFont, Gi as FormValueEntry, Gn as PageDeleteResult, Go as AnnotationAppearanceMode, Gr as FormFieldUpdateResult, Gs as PageBoxes, Gt as VertexPatchFields, H as StampFit, Ha as ColorStyleDraftFields, Hc as BlendMode, Hi as TextFieldDTO, Hn as PAGE_INSERT_BLANK_MAX_COUNT, Ho as AnnotationAppearanceImagesResult, Hr as FormDataExport, Hs as pdfRectToOriginSize, Ht as PolygonDraft, Ia as AttachmentsCache, Ic as AnnotationRef, Ii as FormFieldOption, In as RedactionApplyStatus, Io as FontSpec, Ir as buildPageTextLayout, Is as pdfQuadBounds, It as PolylineDraft, J as TextPatch, Ja as GeometryStyleDraftFields, Jc as LineEnding, Ji as decodeFieldRefKey, Jn as PageRotateInput, Jo as AnnotationAppearancesQuery, Jr as FormSetValueResult, Js as MetadataPatch, Ka as FilledStyleFields, Kc as FreeTextIntent, Ki as FormFieldRef, Kn as PageDeleteInput, Ko as AnnotationAppearanceRaster, Kr as FormImportResult, Ks as PageLayout, La as normalizeAttachmentFileSource, Lc as RevisionToken, Li as FormFieldOrigin, Ln as PageFlattenInput, Lo as DEFAULT_PDF_SAVE_MODE, Lr as expandTextRangeToLine, Ls as pdfQuadCorners, M as FileAttachmentPatch, Ma as DraftOfKind, Mc as ParsedVirtual, Mi as FormFieldBase, Ml as DocumentMetadataTrapped, Mn as MetadataUpdateResult, Mo as serializeError, Mr as PdfTextSegment, Ms as sliceTextByChars, N as FileAttachmentAnnotationDTO, Na as PatchOfKind, Nc as ParsedWildcard, Ni as FormFieldDTO, Nn as RedactionApplyItemResult, No as EngineErrorCode, Nr as TextLayoutFrame, Ns as PdfOriginSize, Oa as classifyRelation, Oc as IdentityClaims, Oi as WidgetStyleFields, Ol as PdfDestination, On as HighlightPatch, Oo as EngineError, Or as SearchSlice, Os as boundaryTextOffset, Ot as LinePatch, Pa as AttachmentCreateResult, Pc as PdfBits, Pi as FormFieldFamily, Pn as RedactionApplyResult, Po as FontHandle, Pr as TextLayoutGlyph, Ps as PdfQuadCorners, Pt as PolylinePatch, Qa as AttachmentFileBase, Qc as Point, Qi as AnnotationMoveResult, Qn as PageMoveInput, Qo as WeakAnnotationState, Qr as FormEffectStatus, Qs as OpenInputLayerBytes, R as StampPatch, Ra as FileAttachmentDraft, Rc as revisionTokensEqual, Ri as ListBoxFieldDTO, Rn as PageFlattenItemResult, Ro as PdfSaveMode, Rr as expandTextRangeToWord, Rs as pdfQuadFromCorners, S as RedactAnnotationDTO, Sa as ReviewStatus, Sc as decodePdfBits, Si as WidgetPlacement, Sl as PdfAnnotationActions, Sn as UnderlinePatch, So as AnnotationPatchBase, Sr as foldText, Ss as glyphLooseBounds, St as LinkPatch, T as WidgetAnnotationDTO, Ta as AnnotationRelationKind, Tc as CollabEntity, Ti as WidgetAppearance, Tl as SubmitFormFlags, To as AnnotationStableId, Tr as SearchMode, Ts as PageTextSnapshot, U as StampWireDraft, Ua as ColorStyleFields, Uc as CaretIntent, Ui as ToggleFieldWidget, Un as PageInsertBlankSpec, Uo as AnnotationAppearanceManifest, Ur as FormFieldCreateResult, Us as pdfRectWidth, Ut as VertexAnnotationFields, V as StampDraft, Va as WireAttachmentFile, Vc as AnnotationReplyType, Vi as SignatureFieldDTO, Vn as PageFlattenUsage, Vo as AnnotationAppearanceImageOptions, Vr as textSegmentsForRange, Vs as pdfRectSize, Vt as PolygonAnnotationDTO, Wa as ColorStylePatchFields, Wc as Color, Wi as UnknownFieldDTO, Wn as PageInsertResult, Wo as AnnotationAppearanceManifestEntry, Wr as FormFieldDeleteResult, Ws as PageListSnapshot, Wt as VertexDraftFields, X as NoteIcon, Xa as GeometryStylePatchFields, Xc as NO_ANNOTATION_FLAGS, Xi as AnnotationCreateResult, Xn as PageMoveResult, Xo as PageState, Xr as FormEffect, Xs as OpenInputById, Xt as SquareAnnotationDTO, Y as TextAnnotationDTO, Ya as GeometryStyleFields, Yc as LineEndings, Yi as encodeFieldRefKey, Yn as PageMoveCache, Yo as AnnotationAppearancesResult, Yr as FormWidgetLinkResult, Ys as OpenInput, Yt as SquarePatch, Z as TextDraft, Za as AttachmentContent, Zc as PdfRectDifferences, Zi as AnnotationDeleteResult, Zn as PageStructureCache, Zo as UNKNOWN_WEAK_ANNOTATION_STATE, Zr as FormEffectResult, Zs as OpenInputBytes, Zt as SquareDraft, _a as LayerScopePlane, _c as MissingIdentity, _i as FormFieldDraft, _l as PdfActionNode, _n as SquigglyAnnotationDTO, _o as AnnotationSubtype, _r as wordBefore, _s as PageGeometryRun, aa as AnnotationMutationKind, ac as collab, ai as FormSubmissionRequest, al as CalloutLine, an as ShapeDraftFields, ao as normalizeAnnotationDraft, ar as matchPageText, as as PageImageSource, b as UnsupportedAnnotationDTO, ba as CommentThread, bc as validateScopeArray, bi as RadioFieldDraft, bl as PdfActionType, bo as PdfAnnotationSubtypeCode, br as SEARCH_FOLD_VERSION, bs as RotatedGeometryRun, c as AnnotationKind, ca as shiftsExistingAnnotationIndices, cc as CollabTarget, ci as FormFieldValue, cl as LinePoints, co as BinaryMimeType, cr as SearchQueryValidation, cs as PageRenderBackground, ct as FreeTextAnnotationDTO, d as AnnotationSubtypeOfKind, da as CacheDelta, dc as checkCollab, di as FormFieldPatch, dl as PdfRect, dn as StrikeoutAnnotationDTO, do as BinarySource, dr as matchRegex, ds as PageRenderOptions, ea as AppearanceAction, ec as OpenInputShare, ei as FormFieldDisplay, el as Rotation, eo as AttachmentFileSource, er as searchContentEpoch, es as PageImageBlobSource, fa as MutationMeta, fc as checkSetGroup, fi as ListBoxFieldPatch, fl as PdfRotation, fn as StrikeoutDraft, fo as ResourceRef, fr as validateSearchQuery, fs as PageRenderQuery, ga as ManifestPage, gc as InvalidScope, gi as ComboBoxFieldDraft, gl as NamedJavaScriptAction, gn as SquigglyPatch, go as ANNOTATION_SUBTYPES, gr as wordAt, gs as PageGeometryGlyph, ha as DocumentManifest, hc as filterMatches, hi as CheckboxFieldDraft, hl as DocumentActionsSnapshot, ho as resolveBinarySource, hr as matchLiteral, hs as createPageImageHandle, ht as InkDraft, i as AnnotationDTO, ia as semanticEqual, ic as caps, il as TextAlignment, in as ShapeAnnotationFields, io as NormalizedPatch, ir as buildSnippet, is as PageImageResult, ja as DTOOfKind, jc as ParsedScope, ji as ComboBoxFieldDTO, jl as DocumentMetadata, jn as MetadataCache, jo as deserializeError, jr as PageTextLayout, js as charRangeForTextOffsets, ka as refKey, kc as ParsedCapability, ki as WidgetStylePatchFields, kl as PageObjectNumber, kn as HighlightAnnotationDTO, ko as EngineErrorOptions, kr as SearchSliceBudget, ks as charBoundaryAtTextOffset, kt as LineAnnotationDTO, l as AnnotationPatch, la as AnnotationListMutationMeta, lc as checkAnyCapability, li as CheckboxFieldPatch, ll as PdfPoint, lo as sniffBinaryMetadata, lr as SearchRegexIssue, ls as PageRenderEncodedFormat, lt as FreeTextDraft, m as WireAnnotationPatch, ma as PdfLinkTargetWritable, mc as expandedCapabilities, mi as TextFieldPatch, ml as ActionReadBudget, mo as WireResourceMap, mr as foldOptionsFor, ms as PageRenderViewport, mt as InkAnnotationDTO, n as AnnotationListSnapshotAllPages, na as AppearanceOutcome, nc as OpenOptions, nl as StandardFont, nn as CircleAnnotationDTO, no as EmbeddedFileRef, nr as searchSegmentsForRange, ns as PageImageObjectUrl, nt as CaretAnnotationDTO, o as AnnotationDraft, oa as changesAnnotationList, oc as materializePdfPermissions, ol as InkList, on as ShapePatchFields, oo as normalizeAnnotationPatch, or as SEARCH_REGEX_MAX_LENGTH, os as PageNetworkRenderFormat, p as WireAnnotationDraft, pa as PdfLinkTarget, pc as expandRawScope, pi as RadioFieldPatch, pl as PdfSize, po as WireResource, pr as validateSearchRegex, ps as PageRenderTarget, pt as InkPatch, qa as FilledStylePatchFields, qc as InkIntent, qi as FormWidgetRef, qn as PageRotateResult, qo as AnnotationAppearanceRenderOptions, qr as FormRepairResult, qs as PageRotation, ra as appearanceImpactOf, rc as TokenSource, ri as FormSubmissionReceipt, rl as StrikeoutIntent, rn as CircleDraft, ro as NormalizedDraft, rr as SEARCH_SNIPPET_CONTEXT, rs as PageImageOptions, rt as CaretDraft, sa as invalidatesWeakIndexRefs, sc as pdfPermissions, si as FormDataFormat, sl as InkStroke, so as BinaryMetadata, sr as SearchQueryIssue, ss as PageRaster, st as FreeTextPatch, t as AnnotationListPageSnapshot, ta as AppearanceImpact, tc as OpenInputToken, ti as FormSubmissionEntry, tl as Size, tn as CirclePatch, to as EmbeddedFileItem, tr as searchRectsForRange, ts as PageImageHandle, tt as CaretPatch, ua as RefetchReason, uc as checkCapability, ui as ComboBoxFieldPatch, ul as PdfQuad, un as StrikeoutPatch, uo as BinaryPayload, ur as SearchRegexValidation, us as PageRenderFormat, v as UnsupportedPatch, va as LayerScopes, vc as PermissionDenied, vi as FormFieldOptionInput, vl as PdfActionTargetRef, vn as SquigglyDraft, vo as PDF_CODE_TO_SUBTYPE, vr as FoldOptions, vs as PageGeometrySnapshot, w as WidgetPatch, wa as isStateAnnotation, wc as CollabAction, wi as FormSnapshot, wl as PdfPageActions, wn as UnderlineDraft, wo as AnnotationIdentityQuality, wr as SearchMatch, ws as isRotatedGeometryRun, wt as LinkDraft, x as RedactPatch, xa as CommentThreadReview, xc as PDF_BITS, xi as TextFieldDraft, xl as PdfActionWarning, xo as subtypeFromCode, xr as SearchMatchRange, xs as UprightGeometryRun, y as UnsupportedDraft, ya as BuildCommentThreadsOptions, yc as parseScope, yi as ListBoxFieldDraft, yl as PdfActionTree, yo as PDF_SUBTYPE_TO_CODE, yr as FoldedText, ys as RotatedGeometryGlyph, z as StampWirePatch, za as FileAttachmentIcon, zc as AnnotationBorderStyle, zi as PushButtonFieldDTO, zn as PageFlattenResult, zo as CachePins, zr as textGlyphAt, zs as pdfRectFromOriginSize } from "./AnnotationListSnapshot-C1U3XUxP.cjs";
2
+ export { ANNOTATION_SUBTYPES, type ActionReadBudget, type AnnotationActor, type AnnotationAppearanceImage, type AnnotationAppearanceImageOptions, type AnnotationAppearanceImagesResult, type AnnotationAppearanceManifest, type AnnotationAppearanceManifestEntry, type AnnotationAppearanceMode, type AnnotationAppearanceRaster, type AnnotationAppearanceRenderOptions, type AnnotationAppearancesQuery, type AnnotationAppearancesResult, type AnnotationBase, type AnnotationBorderStyle, type AnnotationCreateResult, type AnnotationDTO, type AnnotationDeleteResult, type AnnotationDraft, type AnnotationDraftBase, type AnnotationFlags, 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 AppearanceAction, type AppearanceImpact, type AppearanceOutcome, type AttachmentContent, type AttachmentCreateResult, type AttachmentDeleteResult, type AttachmentFileBase, type AttachmentFileInfo, type AttachmentFileSource, type AttachmentsCache, type BinaryMetadata, type BinaryMimeType, type BinaryPayload, type BinarySource, type BlendMode, type BuildCommentThreadsOptions, type CacheDelta, type CachePins, type CalloutLine, type CaretAnnotationDTO, type CaretDraft, type CaretIntent, type CaretPatch, type CharBoundaryBias, type CharMapAnchor, type CheckboxFieldDTO, type CheckboxFieldDraft, type CheckboxFieldPatch, type CircleAnnotationDTO, type CircleDraft, type CirclePatch, 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 DocumentActionsSnapshot, type DocumentManifest, type DocumentMetadata, type DocumentMetadataTrapped, type DraftOfKind, type EmbeddedFileItem, type EmbeddedFileRef, EngineError, EngineErrorCode, type EngineErrorOptions, 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 FontSpec, 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 FormRepairResult, type FormSetValueResult, type FormSnapshot, type FormSubmissionEntry, type FormSubmissionReceipt, type FormSubmissionRequest, type FormValueEntry, type FormWidgetLinkResult, type FormWidgetRef, type FreeTextAnnotationDTO, type FreeTextDraft, type FreeTextFont, type FreeTextIntent, type FreeTextPatch, type GeometryStyleDraftFields, type GeometryStyleFields, type GeometryStylePatchFields, type HighlightAnnotationDTO, type HighlightDraft, type HighlightPatch, type IdentityClaims, type InkAnnotationDTO, type InkDraft, type InkIntent, type InkList, type InkPatch, type InkStroke, InvalidScope, 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 MetadataUpdateResult, MissingIdentity, type MutationMeta, NO_ANNOTATION_FLAGS, type NamedJavaScriptAction, type NormalizedDraft, type NormalizedPatch, type NoteIcon, type OpenInput, type OpenInputById, type OpenInputBytes, type OpenInputLayerBytes, type OpenInputLayerSource, type OpenInputShare, type OpenInputToken, type OpenOptions, PAGE_INSERT_BLANK_MAX_COUNT, PDF_BITS, PDF_CODE_TO_SUBTYPE, PDF_SUBTYPE_TO_CODE, type PageBoxes, type PageDeleteInput, type PageDeleteResult, type PageFlattenInput, type PageFlattenItemResult, type PageFlattenResult, type PageFlattenStatus, type PageFlattenUsage, type PageGeometryGlyph, type PageGeometryRun, type PageGeometrySnapshot, 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 PageNetworkRenderFormat, type PageObjectNumber, type PageRaster, type PageRenderBackground, type PageRenderEncodedFormat, type PageRenderFormat, type PageRenderOptions, type PageRenderQuery, type PageRenderTarget, type PageRenderViewport, type PageRotateInput, type PageRotateResult, type PageRotation, type PageState, type PageStructureCache, type PageTextLayout, type PageTextSnapshot, type ParsedCapability, type ParsedCollab, type ParsedScope, type ParsedVirtual, type ParsedWildcard, 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 PdfPoint, type PdfQuad, type PdfQuadCorners, type PdfRect, type PdfRectDifferences, type PdfRotation, type PdfSaveMode, type PdfSize, type PdfTextSegment, PermissionDenied, 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 RefetchReason, 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 SearchRegexIssue, type SearchRegexValidation, type SearchRequest, type SearchSlice, type SearchSliceBudget, type SearchSnippet, type SerializedEngineError, type ShapeAnnotationFields, type ShapeDraftFields, type ShapePatchFields, 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 WeakAnnotationState, type WidgetAnnotationDTO, type WidgetAppearance, type WidgetDraft, type WidgetPatch, type WidgetPlacement, type WidgetStyleDraftFields, type WidgetStyleFields, type WidgetStylePatchFields, type WireAnnotationDraft, type WireAnnotationPatch, type WireAttachmentFile, type WireResource, type WireResourceMap, 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, isRotatedGeometryRun, isStateAnnotation, isValidPageObjectNumber, knownWeakAnnotationState, matchLiteral, matchPageText, matchRegex, materializePdfPermissions, normalizeAnnotationDraft, normalizeAnnotationPatch, normalizeAttachmentFileSource, normalizePdfRect, parseScope, pdfPermissions, pdfQuadBounds, pdfQuadCorners, pdfQuadFromCorners, pdfRectFromOriginSize, pdfRectHeight, pdfRectSize, pdfRectToOriginSize, pdfRectWidth, refKey, resolveBinarySource, revisionTokensEqual, searchContentEpoch, searchRectsForRange, searchSegmentsForRange, semanticEqual, serializeError, shiftsExistingAnnotationIndices, sliceTextByChars, sniffBinaryMetadata, subtypeFromCode, textGlyphAt, textGlyphQuad, textSegmentsForRange, toOriginalRange, validateScopeArray, validateSearchQuery, validateSearchRegex, wordAt, wordBefore };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $a as AnnotationIdentityQuality, $i as LayerScopes, $n as searchRectsForRange, $o as pdfQuadCorners, $r as ListBoxFieldDraft, $s as revisionTokensEqual, Aa as EmbeddedFileItem, Ac as PdfSize, Ai as AnnotationCreateResult, An as HighlightDraft, Ao as PageImageHandle, Ar as FormFieldDeleteResult, As as filterMatches, At as LineDraft, B as StampAnnotationDTO, Ba as BinarySource, Bc as PdfPageActions, Bi as changesAnnotationList, Bn as PageFlattenStatus, Bo as PageRenderOptions, Br as FormFieldDisplay, Bs as CollabEntity, Bt as PolygonPatch, C as RedactDraft, Ca as GeometryStyleDraftFields, Cc as InkList, Ci as ToggleFieldWidget, Cn as UnderlineAnnotationDTO, Co as AnnotationAppearancesQuery, Cr as SearchQuery, Cs as CollabTarget, Ct as LinkAnnotationDTO, Da as AttachmentFileBase, Dc as PdfQuad, Di as FormWidgetRef, Do as WeakAnnotationState, Dr as SearchSnippet, Ds as checkSetGroup, E as WidgetDraft, Ea as AttachmentContent, Ec as PdfPoint, Ei as FormFieldRef, Eo as UNKNOWN_WEAK_ANNOTATION_STATE, Er as SearchSliceBudget, Es as checkCollab, Fa as normalizeAnnotationPatch, Fc as PdfActionTree, Fi as AppearanceImpact, Fn as RedactionApplyScope, Fo as PageNetworkRenderFormat, Fr as FormWidgetLinkResult, Fs as validateScopeArray, Ft as PolylineAnnotationDTO, Ga as ANNOTATION_SUBTYPES, Gi as CacheDelta, Gn as PageRotateResult, Go as PageGeometryGlyph, Gr as FormFieldPatch, Gs as ParsedCollab, Gt as VertexPatchFields, H as StampFit, Ha as WireResource, Hc as DocumentMetadataTrapped, Hi as shiftsExistingAnnotationIndices, Hn as PageInsertResult, Ho as PageRenderTarget, Hr as FormFieldValue, Hs as DocCapability, Ht as PolygonDraft, Ia as BinaryMetadata, Ic as PdfActionType, Ii as AppearanceOutcome, In as RedactionApplyStatus, Io as PageRaster, Ir as FormEffect, Is as PDF_BITS, It as PolylineDraft, J as TextPatch, Ja as PDF_SUBTYPE_TO_CODE, Ji as PdfLinkTargetWritable, Jn as PageMoveResult, Jo as PageTextSnapshot, Jr as TextFieldPatch, Js as ParsedWildcard, Ka as AnnotationSubtype, Ki as MutationMeta, Kn as PageRotateInput, Ko as PageGeometryRun, Kr as ListBoxFieldPatch, Ks as ParsedScope, La as BinaryMimeType, Lc as PdfActionWarning, Li as appearanceImpactOf, Ln as PageFlattenInput, Lo as PageRenderBackground, Lr as FormEffectResult, Ls as decodePdfBits, M as FileAttachmentPatch, Ma as NormalizedDraft, Mc as DocumentActionsSnapshot, Mi as AnnotationMoveResult, Mn as MetadataUpdateResult, Mo as PageImageOptions, Mr as FormImportResult, Ms as MissingIdentity, N as FileAttachmentAnnotationDTO, Na as NormalizedPatch, Nc as NamedJavaScriptAction, Ni as AnnotationUpdateResult, Nn as RedactionApplyItemResult, No as PageImageResult, Nr as FormRepairResult, Ns as PermissionDenied, Oa as AttachmentFileInfo, Oc as PdfRect, Oi as decodeFieldRefKey, On as HighlightPatch, Oo as knownWeakAnnotationState, Or as FormDataExport, Os as expandRawScope, Ot as LinePatch, Pa as normalizeAnnotationDraft, Pc as PdfActionNode, Pi as AppearanceAction, Pn as RedactionApplyResult, Po as PageImageSource, Pr as FormSetValueResult, Ps as parseScope, Pt as PolylinePatch, Qa as AnnotationBase, Qi as LayerScopePlane, Qn as searchContentEpoch, Qo as pdfQuadBounds, Qr as FormFieldOptionInput, Qs as RevisionToken, R as StampPatch, Ra as sniffBinaryMetadata, Rc as PdfAnnotationActions, Ri as semanticEqual, Rn as PageFlattenItemResult, Ro as PageRenderEncodedFormat, Rr as FormEffectStatus, Rs as AnnotationActor, S as RedactAnnotationDTO, Sa as FilledStylePatchFields, Sc as CalloutLine, Si as TextFieldDTO, Sn as UnderlinePatch, So as AnnotationAppearanceRenderOptions, Sr as SearchMode, Ss as pdfPermissions, St as LinkPatch, T as WidgetAnnotationDTO, Ta as GeometryStylePatchFields, Tc as LinePoints, Ti as FormValueEntry, To as PageState, Tr as SearchSlice, Ts as checkCapability, U as StampWireDraft, Ua as WireResourceMap, Ui as AnnotationListMutationMeta, Un as PageDeleteResult, Uo as PageRenderViewport, Ur as CheckboxFieldPatch, Us as IdentityClaims, Ut as VertexAnnotationFields, V as StampDraft, Va as ResourceRef, Vc as DocumentMetadata, Vi as invalidatesWeakIndexRefs, Vn as PageFlattenUsage, Vo as PageRenderQuery, Vr as FormDataFormat, Vs as CollabFilter, Vt as PolygonAnnotationDTO, Wa as resolveBinarySource, Wi as RefetchReason, Wn as PageDeleteInput, Wo as createPageImageHandle, Wr as ComboBoxFieldPatch, Ws as ParsedCapability, Wt as VertexDraftFields, X as NoteIcon, Xa as subtypeFromCode, Xi as DocumentManifest, Xn as PageMoveInput, Xo as PdfQuadCorners, Xr as ComboBoxFieldDraft, Xs as AnnotationDraftBase, Xt as SquareAnnotationDTO, Y as TextAnnotationDTO, Ya as PdfAnnotationSubtypeCode, Yi as PdfDestination, Yn as PageStructureCache, Yo as PdfOriginSize, Yr as CheckboxFieldDraft, Ys as PdfBits, Yt as SquarePatch, Z as TextDraft, Za as AnnotationPatchBase, Zi as ManifestPage, Zn as canonicalSearchQuery, Zo as normalizePdfRect, Zr as FormFieldDraft, Zs as AnnotationRef, Zt as SquareDraft, _a as ColorStyleDraftFields, _c as Rotation, _i as FormFieldOrigin, _n as SquigglyAnnotationDTO, _o as AnnotationAppearanceImagesResult, _r as SEARCH_FOLD_VERSION, _s as OpenOptions, aa as AnnotationKindModule, ac as BlendMode, ai as WidgetAppearance, an as ShapeDraftFields, ao as SerializedEngineError, ar as SearchQueryValidation, as as pdfRectWidth, b as UnsupportedAnnotationDTO, ba as FilledStyleDraftFields, bc as StrikeoutIntent, bi as RadioFieldDTO, bo as AnnotationAppearanceMode, br as toOriginalRange, bs as collab, c as AnnotationKind, ca as PatchOfKind, cc as FreeTextFont, ci as WidgetStyleFields, co as EngineErrorCode, cr as matchRegex, cs as PageLayout, ct as FreeTextAnnotationDTO, d as AnnotationSubtypeOfKind, da as AttachmentsCache, dc as LineEnding, di as ComboBoxFieldDTO, dn as StrikeoutAnnotationDTO, do as FontSpec, dr as foldOptionsFor, ds as OpenInput, ea as AnnotationRelationKind, ec as PageObjectNumber, ei as RadioFieldDraft, eo as AnnotationStableId, er as SEARCH_SNIPPET_CONTEXT, es as pdfQuadFromCorners, fa as normalizeAttachmentFileSource, fc as LineEndings, fi as FormFieldBase, fn as StrikeoutDraft, fo as DEFAULT_PDF_SAVE_MODE, fr as matchLiteral, fs as OpenInputById, ga as WireAttachmentFile, gc as Rect, gi as FormFieldOption, gn as SquigglyPatch, go as AnnotationAppearanceImageOptions, gr as FoldedText, gs as OpenInputToken, ha as FileAttachmentWireDraft, hc as Point, hi as FormFieldFlags, ho as AnnotationAppearanceImage, hr as FoldOptions, hs as OpenInputLayerSource, ht as InkDraft, i as AnnotationDTO, ia as refKey, ic as AnnotationReplyType, ii as FormSnapshot, in as ShapeAnnotationFields, io as EngineErrorOptions, ir as SearchQueryIssue, is as pdfRectToOriginSize, ja as EmbeddedFileRef, jc as ActionReadBudget, ji as AnnotationDeleteResult, jn as MetadataCache, jo as PageImageObjectUrl, jr as FormFieldUpdateResult, js as InvalidScope, ka as AttachmentFileSource, kc as PdfRotation, ki as encodeFieldRefKey, kn as HighlightAnnotationDTO, ko as PageImageBlobSource, kr as FormFieldCreateResult, ks as expandedCapabilities, kt as LineAnnotationDTO, l as AnnotationPatch, la as AttachmentCreateResult, lc as FreeTextIntent, li as WidgetStylePatchFields, lo as FontHandle, lr as validateSearchQuery, ls as PageRotation, lt as FreeTextDraft, m as WireAnnotationPatch, ma as FileAttachmentIcon, mc as PdfRectDifferences, mi as FormFieldFamily, mo as CachePins, mr as wordBefore, ms as OpenInputLayerBytes, mt as InkAnnotationDTO, n as AnnotationListSnapshotAllPages, na as buildThreads, nc as AnnotationBorderStyle, ni as WidgetPlacement, nn as CircleAnnotationDTO, no as encodeStableIdKey, nr as matchPageText, ns as pdfRectHeight, nt as CaretAnnotationDTO, o as AnnotationDraft, oa as DTOOfKind, oc as CaretIntent, on as ShapePatchFields, oo as deserializeError, or as SearchRegexIssue, os as PageListSnapshot, p as WireAnnotationDraft, pa as FileAttachmentDraft, pc as NO_ANNOTATION_FLAGS, pi as FormFieldDTO, po as PdfSaveMode, pr as wordAt, ps as OpenInputBytes, pt as InkPatch, qa as PDF_CODE_TO_SUBTYPE, qi as PdfLinkTarget, qn as PageMoveCache, qo as PageGeometrySnapshot, qr as RadioFieldPatch, qs as ParsedVirtual, ra as classifyRelation, rc as AnnotationFlags, ri as FormKind, rn as CircleDraft, ro as EngineError, rr as SEARCH_REGEX_MAX_LENGTH, rs as pdfRectSize, rt as CaretDraft, sa as DraftOfKind, sc as Color, si as WidgetStyleDraftFields, so as serializeError, sr as SearchRegexValidation, ss as PageBoxes, st as FreeTextPatch, t as AnnotationListPageSnapshot, ta as AnnotationThread, tc as isValidPageObjectNumber, ti as TextFieldDraft, tn as CirclePatch, to as decodeStableIdKey, tr as buildSnippet, ts as pdfRectFromOriginSize, tt as CaretPatch, ua as AttachmentDeleteResult, uc as InkIntent, ui as CheckboxFieldDTO, un as StrikeoutPatch, uo as FontKey, ur as validateSearchRegex, us as MetadataPatch, v as UnsupportedPatch, va as ColorStyleFields, vc as Size, vi as ListBoxFieldDTO, vn as SquigglyDraft, vo as AnnotationAppearanceManifest, vr as SearchMatchRange, vs as TokenSource, w as WidgetPatch, wa as GeometryStyleFields, wc as InkStroke, wi as UnknownFieldDTO, wn as UnderlineDraft, wo as AnnotationAppearancesResult, wr as SearchRequest, ws as checkAnyCapability, wt as LinkDraft, x as RedactPatch, xa as FilledStyleFields, xc as TextAlignment, xi as SignatureFieldDTO, xo as AnnotationAppearanceRaster, xr as SearchMatch, xs as materializePdfPermissions, y as UnsupportedDraft, ya as ColorStylePatchFields, yc as StandardFont, yi as PushButtonFieldDTO, yo as AnnotationAppearanceManifestEntry, yr as foldText, ys as caps, z as StampWirePatch, za as BinaryPayload, zc as PdfFieldActions, zi as AnnotationMutationKind, zn as PageFlattenResult, zo as PageRenderFormat, zr as FormEffectsResult, zs as CollabAction } from "./AnnotationListSnapshot-W0RCsyDE.js";
2
- export { ANNOTATION_SUBTYPES, type ActionReadBudget, type AnnotationActor, type AnnotationAppearanceImage, type AnnotationAppearanceImageOptions, type AnnotationAppearanceImagesResult, type AnnotationAppearanceManifest, type AnnotationAppearanceManifestEntry, type AnnotationAppearanceMode, type AnnotationAppearanceRaster, type AnnotationAppearanceRenderOptions, type AnnotationAppearancesQuery, type AnnotationAppearancesResult, type AnnotationBase, type AnnotationBorderStyle, type AnnotationCreateResult, type AnnotationDTO, type AnnotationDeleteResult, type AnnotationDraft, type AnnotationDraftBase, type AnnotationFlags, 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 AppearanceAction, type AppearanceImpact, type AppearanceOutcome, type AttachmentContent, type AttachmentCreateResult, type AttachmentDeleteResult, type AttachmentFileBase, type AttachmentFileInfo, type AttachmentFileSource, type AttachmentsCache, type BinaryMetadata, type BinaryMimeType, type BinaryPayload, type BinarySource, type BlendMode, type CacheDelta, type CachePins, type CalloutLine, type CaretAnnotationDTO, type CaretDraft, type CaretIntent, type CaretPatch, type CheckboxFieldDTO, type CheckboxFieldDraft, type CheckboxFieldPatch, type CircleAnnotationDTO, type CircleDraft, type CirclePatch, type CollabAction, type CollabEntity, type CollabFilter, type CollabTarget, type Color, type ColorStyleDraftFields, type ColorStyleFields, type ColorStylePatchFields, type ComboBoxFieldDTO, type ComboBoxFieldDraft, type ComboBoxFieldPatch, DEFAULT_PDF_SAVE_MODE, type DTOOfKind, type DocCapability, type DocumentActionsSnapshot, type DocumentManifest, type DocumentMetadata, type DocumentMetadataTrapped, type DraftOfKind, type EmbeddedFileItem, type EmbeddedFileRef, EngineError, EngineErrorCode, type EngineErrorOptions, 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 FontSpec, 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 FormRepairResult, type FormSetValueResult, type FormSnapshot, type FormValueEntry, type FormWidgetLinkResult, type FormWidgetRef, type FreeTextAnnotationDTO, type FreeTextDraft, type FreeTextFont, type FreeTextIntent, type FreeTextPatch, type GeometryStyleDraftFields, type GeometryStyleFields, type GeometryStylePatchFields, type HighlightAnnotationDTO, type HighlightDraft, type HighlightPatch, type IdentityClaims, type InkAnnotationDTO, type InkDraft, type InkIntent, type InkList, type InkPatch, type InkStroke, InvalidScope, 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 MetadataUpdateResult, MissingIdentity, type MutationMeta, NO_ANNOTATION_FLAGS, type NamedJavaScriptAction, type NormalizedDraft, type NormalizedPatch, type NoteIcon, type OpenInput, type OpenInputById, type OpenInputBytes, type OpenInputLayerBytes, type OpenInputLayerSource, type OpenInputToken, type OpenOptions, PDF_BITS, PDF_CODE_TO_SUBTYPE, PDF_SUBTYPE_TO_CODE, type PageBoxes, type PageDeleteInput, type PageDeleteResult, type PageFlattenInput, type PageFlattenItemResult, type PageFlattenResult, type PageFlattenStatus, type PageFlattenUsage, type PageGeometryGlyph, type PageGeometryRun, type PageGeometrySnapshot, type PageImageBlobSource, type PageImageHandle, type PageImageObjectUrl, type PageImageOptions, type PageImageResult, type PageImageSource, type PageInsertResult, type PageLayout, type PageListSnapshot, type PageMoveCache, type PageMoveInput, type PageMoveResult, type PageNetworkRenderFormat, type PageObjectNumber, type PageRaster, type PageRenderBackground, type PageRenderEncodedFormat, type PageRenderFormat, type PageRenderOptions, type PageRenderQuery, type PageRenderTarget, type PageRenderViewport, type PageRotateInput, type PageRotateResult, type PageRotation, type PageState, type PageStructureCache, type PageTextSnapshot, type ParsedCapability, type ParsedCollab, type ParsedScope, type ParsedVirtual, type ParsedWildcard, type PatchOfKind, type PdfActionNode, type PdfActionTree, type PdfActionType, type PdfActionWarning, type PdfAnnotationActions, PdfAnnotationSubtypeCode, type PdfBits, type PdfDestination, type PdfFieldActions, type PdfLinkTarget, type PdfLinkTargetWritable, type PdfOriginSize, type PdfPageActions, type PdfPoint, type PdfQuad, type PdfQuadCorners, type PdfRect, type PdfRectDifferences, type PdfRotation, type PdfSaveMode, type PdfSize, PermissionDenied, 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 RefetchReason, type ResourceRef, type RevisionToken, 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 SearchRegexIssue, type SearchRegexValidation, type SearchRequest, type SearchSlice, type SearchSliceBudget, type SearchSnippet, type SerializedEngineError, type ShapeAnnotationFields, type ShapeDraftFields, type ShapePatchFields, 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 TextAlignment, type TextAnnotationDTO, type TextDraft, type TextFieldDTO, type TextFieldDraft, type TextFieldPatch, 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 VertexAnnotationFields, type VertexDraftFields, type VertexPatchFields, 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 WireResource, type WireResourceMap, appearanceImpactOf, buildSnippet, buildThreads, canonicalSearchQuery, caps, changesAnnotationList, checkAnyCapability, checkCapability, checkCollab, checkSetGroup, classifyRelation, collab, createPageImageHandle, decodeFieldRefKey, decodePdfBits, decodeStableIdKey, deserializeError, encodeFieldRefKey, encodeStableIdKey, expandRawScope, expandedCapabilities, filterMatches, foldOptionsFor, foldText, invalidatesWeakIndexRefs, isValidPageObjectNumber, knownWeakAnnotationState, matchLiteral, matchPageText, matchRegex, materializePdfPermissions, normalizeAnnotationDraft, normalizeAnnotationPatch, normalizeAttachmentFileSource, normalizePdfRect, parseScope, pdfPermissions, pdfQuadBounds, pdfQuadCorners, pdfQuadFromCorners, pdfRectFromOriginSize, pdfRectHeight, pdfRectSize, pdfRectToOriginSize, pdfRectWidth, refKey, resolveBinarySource, revisionTokensEqual, searchContentEpoch, searchRectsForRange, semanticEqual, serializeError, shiftsExistingAnnotationIndices, sniffBinaryMetadata, subtypeFromCode, toOriginalRange, validateScopeArray, validateSearchQuery, validateSearchRegex, wordAt, wordBefore };
1
+ import { $a as AttachmentFileInfo, $c as Rect, $i as AnnotationUpdateResult, $n as canonicalSearchQuery, $o as knownWeakAnnotationState, $r as FormEffectsResult, $s as OpenInputLayerSource, Aa as AnnotationKindModule, Ac as ParsedCollab, Ai as CheckboxFieldDTO, Al as isValidPageObjectNumber, An as HighlightDraft, Ao as SerializedEngineError, Ar as SearchSnippet, As as charMapViolation, At as LineDraft, B as StampAnnotationDTO, Ba as FileAttachmentWireDraft, Bc as AnnotationFlags, Bi as RadioFieldDTO, Bn as PageFlattenStatus, Bo as AnnotationAppearanceImage, Br as textGlyphQuad, Bs as pdfRectHeight, Bt as PolygonPatch, C as RedactDraft, Ca as buildCommentThreads, Cc as AnnotationActor, Ci as FormKind, Cl as PdfFieldActions, Cn as UnderlineAnnotationDTO, Co as AnnotationBase, Cr as toOriginalRange, Cs as glyphLooseQuad, Ct as LinkAnnotationDTO, Da as buildThreads, Dc as DocCapability, Di as WidgetStyleDraftFields, Dl as decodeSubmitFormFlags, Do as encodeStableIdKey, Dr as SearchRequest, Ds as CharMapAnchor, E as WidgetDraft, Ea as AnnotationThread, Ec as CollabFilter, El as SubmitFormPayload, Eo as decodeStableIdKey, Er as SearchQuery, Es as CharBoundaryBias, Fa as AttachmentDeleteResult, Fc as AnnotationDraftBase, Fi as FormFieldFlags, Fn as RedactionApplyScope, Fo as FontKey, Fr as TextLayoutRun, Fs as normalizePdfRect, Ft as PolylineAnnotationDTO, Ga as FilledStyleDraftFields, Gc as FreeTextFont, Gi as FormValueEntry, Gn as PageDeleteResult, Go as AnnotationAppearanceMode, Gr as FormFieldUpdateResult, Gs as PageBoxes, Gt as VertexPatchFields, H as StampFit, Ha as ColorStyleDraftFields, Hc as BlendMode, Hi as TextFieldDTO, Hn as PAGE_INSERT_BLANK_MAX_COUNT, Ho as AnnotationAppearanceImagesResult, Hr as FormDataExport, Hs as pdfRectToOriginSize, Ht as PolygonDraft, Ia as AttachmentsCache, Ic as AnnotationRef, Ii as FormFieldOption, In as RedactionApplyStatus, Io as FontSpec, Ir as buildPageTextLayout, Is as pdfQuadBounds, It as PolylineDraft, J as TextPatch, Ja as GeometryStyleDraftFields, Jc as LineEnding, Ji as decodeFieldRefKey, Jn as PageRotateInput, Jo as AnnotationAppearancesQuery, Jr as FormSetValueResult, Js as MetadataPatch, Ka as FilledStyleFields, Kc as FreeTextIntent, Ki as FormFieldRef, Kn as PageDeleteInput, Ko as AnnotationAppearanceRaster, Kr as FormImportResult, Ks as PageLayout, La as normalizeAttachmentFileSource, Lc as RevisionToken, Li as FormFieldOrigin, Ln as PageFlattenInput, Lo as DEFAULT_PDF_SAVE_MODE, Lr as expandTextRangeToLine, Ls as pdfQuadCorners, M as FileAttachmentPatch, Ma as DraftOfKind, Mc as ParsedVirtual, Mi as FormFieldBase, Ml as DocumentMetadataTrapped, Mn as MetadataUpdateResult, Mo as serializeError, Mr as PdfTextSegment, Ms as sliceTextByChars, N as FileAttachmentAnnotationDTO, Na as PatchOfKind, Nc as ParsedWildcard, Ni as FormFieldDTO, Nn as RedactionApplyItemResult, No as EngineErrorCode, Nr as TextLayoutFrame, Ns as PdfOriginSize, Oa as classifyRelation, Oc as IdentityClaims, Oi as WidgetStyleFields, Ol as PdfDestination, On as HighlightPatch, Oo as EngineError, Or as SearchSlice, Os as boundaryTextOffset, Ot as LinePatch, Pa as AttachmentCreateResult, Pc as PdfBits, Pi as FormFieldFamily, Pn as RedactionApplyResult, Po as FontHandle, Pr as TextLayoutGlyph, Ps as PdfQuadCorners, Pt as PolylinePatch, Qa as AttachmentFileBase, Qc as Point, Qi as AnnotationMoveResult, Qn as PageMoveInput, Qo as WeakAnnotationState, Qr as FormEffectStatus, Qs as OpenInputLayerBytes, R as StampPatch, Ra as FileAttachmentDraft, Rc as revisionTokensEqual, Ri as ListBoxFieldDTO, Rn as PageFlattenItemResult, Ro as PdfSaveMode, Rr as expandTextRangeToWord, Rs as pdfQuadFromCorners, S as RedactAnnotationDTO, Sa as ReviewStatus, Sc as decodePdfBits, Si as WidgetPlacement, Sl as PdfAnnotationActions, Sn as UnderlinePatch, So as AnnotationPatchBase, Sr as foldText, Ss as glyphLooseBounds, St as LinkPatch, T as WidgetAnnotationDTO, Ta as AnnotationRelationKind, Tc as CollabEntity, Ti as WidgetAppearance, Tl as SubmitFormFlags, To as AnnotationStableId, Tr as SearchMode, Ts as PageTextSnapshot, U as StampWireDraft, Ua as ColorStyleFields, Uc as CaretIntent, Ui as ToggleFieldWidget, Un as PageInsertBlankSpec, Uo as AnnotationAppearanceManifest, Ur as FormFieldCreateResult, Us as pdfRectWidth, Ut as VertexAnnotationFields, V as StampDraft, Va as WireAttachmentFile, Vc as AnnotationReplyType, Vi as SignatureFieldDTO, Vn as PageFlattenUsage, Vo as AnnotationAppearanceImageOptions, Vr as textSegmentsForRange, Vs as pdfRectSize, Vt as PolygonAnnotationDTO, Wa as ColorStylePatchFields, Wc as Color, Wi as UnknownFieldDTO, Wn as PageInsertResult, Wo as AnnotationAppearanceManifestEntry, Wr as FormFieldDeleteResult, Ws as PageListSnapshot, Wt as VertexDraftFields, X as NoteIcon, Xa as GeometryStylePatchFields, Xc as NO_ANNOTATION_FLAGS, Xi as AnnotationCreateResult, Xn as PageMoveResult, Xo as PageState, Xr as FormEffect, Xs as OpenInputById, Xt as SquareAnnotationDTO, Y as TextAnnotationDTO, Ya as GeometryStyleFields, Yc as LineEndings, Yi as encodeFieldRefKey, Yn as PageMoveCache, Yo as AnnotationAppearancesResult, Yr as FormWidgetLinkResult, Ys as OpenInput, Yt as SquarePatch, Z as TextDraft, Za as AttachmentContent, Zc as PdfRectDifferences, Zi as AnnotationDeleteResult, Zn as PageStructureCache, Zo as UNKNOWN_WEAK_ANNOTATION_STATE, Zr as FormEffectResult, Zs as OpenInputBytes, Zt as SquareDraft, _a as LayerScopePlane, _c as MissingIdentity, _i as FormFieldDraft, _l as PdfActionNode, _n as SquigglyAnnotationDTO, _o as AnnotationSubtype, _r as wordBefore, _s as PageGeometryRun, aa as AnnotationMutationKind, ac as collab, ai as FormSubmissionRequest, al as CalloutLine, an as ShapeDraftFields, ao as normalizeAnnotationDraft, ar as matchPageText, as as PageImageSource, b as UnsupportedAnnotationDTO, ba as CommentThread, bc as validateScopeArray, bi as RadioFieldDraft, bl as PdfActionType, bo as PdfAnnotationSubtypeCode, br as SEARCH_FOLD_VERSION, bs as RotatedGeometryRun, c as AnnotationKind, ca as shiftsExistingAnnotationIndices, cc as CollabTarget, ci as FormFieldValue, cl as LinePoints, co as BinaryMimeType, cr as SearchQueryValidation, cs as PageRenderBackground, ct as FreeTextAnnotationDTO, d as AnnotationSubtypeOfKind, da as CacheDelta, dc as checkCollab, di as FormFieldPatch, dl as PdfRect, dn as StrikeoutAnnotationDTO, do as BinarySource, dr as matchRegex, ds as PageRenderOptions, ea as AppearanceAction, ec as OpenInputShare, ei as FormFieldDisplay, el as Rotation, eo as AttachmentFileSource, er as searchContentEpoch, es as PageImageBlobSource, fa as MutationMeta, fc as checkSetGroup, fi as ListBoxFieldPatch, fl as PdfRotation, fn as StrikeoutDraft, fo as ResourceRef, fr as validateSearchQuery, fs as PageRenderQuery, ga as ManifestPage, gc as InvalidScope, gi as ComboBoxFieldDraft, gl as NamedJavaScriptAction, gn as SquigglyPatch, go as ANNOTATION_SUBTYPES, gr as wordAt, gs as PageGeometryGlyph, ha as DocumentManifest, hc as filterMatches, hi as CheckboxFieldDraft, hl as DocumentActionsSnapshot, ho as resolveBinarySource, hr as matchLiteral, hs as createPageImageHandle, ht as InkDraft, i as AnnotationDTO, ia as semanticEqual, ic as caps, il as TextAlignment, in as ShapeAnnotationFields, io as NormalizedPatch, ir as buildSnippet, is as PageImageResult, ja as DTOOfKind, jc as ParsedScope, ji as ComboBoxFieldDTO, jl as DocumentMetadata, jn as MetadataCache, jo as deserializeError, jr as PageTextLayout, js as charRangeForTextOffsets, ka as refKey, kc as ParsedCapability, ki as WidgetStylePatchFields, kl as PageObjectNumber, kn as HighlightAnnotationDTO, ko as EngineErrorOptions, kr as SearchSliceBudget, ks as charBoundaryAtTextOffset, kt as LineAnnotationDTO, l as AnnotationPatch, la as AnnotationListMutationMeta, lc as checkAnyCapability, li as CheckboxFieldPatch, ll as PdfPoint, lo as sniffBinaryMetadata, lr as SearchRegexIssue, ls as PageRenderEncodedFormat, lt as FreeTextDraft, m as WireAnnotationPatch, ma as PdfLinkTargetWritable, mc as expandedCapabilities, mi as TextFieldPatch, ml as ActionReadBudget, mo as WireResourceMap, mr as foldOptionsFor, ms as PageRenderViewport, mt as InkAnnotationDTO, n as AnnotationListSnapshotAllPages, na as AppearanceOutcome, nc as OpenOptions, nl as StandardFont, nn as CircleAnnotationDTO, no as EmbeddedFileRef, nr as searchSegmentsForRange, ns as PageImageObjectUrl, nt as CaretAnnotationDTO, o as AnnotationDraft, oa as changesAnnotationList, oc as materializePdfPermissions, ol as InkList, on as ShapePatchFields, oo as normalizeAnnotationPatch, or as SEARCH_REGEX_MAX_LENGTH, os as PageNetworkRenderFormat, p as WireAnnotationDraft, pa as PdfLinkTarget, pc as expandRawScope, pi as RadioFieldPatch, pl as PdfSize, po as WireResource, pr as validateSearchRegex, ps as PageRenderTarget, pt as InkPatch, qa as FilledStylePatchFields, qc as InkIntent, qi as FormWidgetRef, qn as PageRotateResult, qo as AnnotationAppearanceRenderOptions, qr as FormRepairResult, qs as PageRotation, ra as appearanceImpactOf, rc as TokenSource, ri as FormSubmissionReceipt, rl as StrikeoutIntent, rn as CircleDraft, ro as NormalizedDraft, rr as SEARCH_SNIPPET_CONTEXT, rs as PageImageOptions, rt as CaretDraft, sa as invalidatesWeakIndexRefs, sc as pdfPermissions, si as FormDataFormat, sl as InkStroke, so as BinaryMetadata, sr as SearchQueryIssue, ss as PageRaster, st as FreeTextPatch, t as AnnotationListPageSnapshot, ta as AppearanceImpact, tc as OpenInputToken, ti as FormSubmissionEntry, tl as Size, tn as CirclePatch, to as EmbeddedFileItem, tr as searchRectsForRange, ts as PageImageHandle, tt as CaretPatch, ua as RefetchReason, uc as checkCapability, ui as ComboBoxFieldPatch, ul as PdfQuad, un as StrikeoutPatch, uo as BinaryPayload, ur as SearchRegexValidation, us as PageRenderFormat, v as UnsupportedPatch, va as LayerScopes, vc as PermissionDenied, vi as FormFieldOptionInput, vl as PdfActionTargetRef, vn as SquigglyDraft, vo as PDF_CODE_TO_SUBTYPE, vr as FoldOptions, vs as PageGeometrySnapshot, w as WidgetPatch, wa as isStateAnnotation, wc as CollabAction, wi as FormSnapshot, wl as PdfPageActions, wn as UnderlineDraft, wo as AnnotationIdentityQuality, wr as SearchMatch, ws as isRotatedGeometryRun, wt as LinkDraft, x as RedactPatch, xa as CommentThreadReview, xc as PDF_BITS, xi as TextFieldDraft, xl as PdfActionWarning, xo as subtypeFromCode, xr as SearchMatchRange, xs as UprightGeometryRun, y as UnsupportedDraft, ya as BuildCommentThreadsOptions, yc as parseScope, yi as ListBoxFieldDraft, yl as PdfActionTree, yo as PDF_SUBTYPE_TO_CODE, yr as FoldedText, ys as RotatedGeometryGlyph, z as StampWirePatch, za as FileAttachmentIcon, zc as AnnotationBorderStyle, zi as PushButtonFieldDTO, zn as PageFlattenResult, zo as CachePins, zr as textGlyphAt, zs as pdfRectFromOriginSize } from "./AnnotationListSnapshot-C1U3XUxP.js";
2
+ export { ANNOTATION_SUBTYPES, type ActionReadBudget, type AnnotationActor, type AnnotationAppearanceImage, type AnnotationAppearanceImageOptions, type AnnotationAppearanceImagesResult, type AnnotationAppearanceManifest, type AnnotationAppearanceManifestEntry, type AnnotationAppearanceMode, type AnnotationAppearanceRaster, type AnnotationAppearanceRenderOptions, type AnnotationAppearancesQuery, type AnnotationAppearancesResult, type AnnotationBase, type AnnotationBorderStyle, type AnnotationCreateResult, type AnnotationDTO, type AnnotationDeleteResult, type AnnotationDraft, type AnnotationDraftBase, type AnnotationFlags, 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 AppearanceAction, type AppearanceImpact, type AppearanceOutcome, type AttachmentContent, type AttachmentCreateResult, type AttachmentDeleteResult, type AttachmentFileBase, type AttachmentFileInfo, type AttachmentFileSource, type AttachmentsCache, type BinaryMetadata, type BinaryMimeType, type BinaryPayload, type BinarySource, type BlendMode, type BuildCommentThreadsOptions, type CacheDelta, type CachePins, type CalloutLine, type CaretAnnotationDTO, type CaretDraft, type CaretIntent, type CaretPatch, type CharBoundaryBias, type CharMapAnchor, type CheckboxFieldDTO, type CheckboxFieldDraft, type CheckboxFieldPatch, type CircleAnnotationDTO, type CircleDraft, type CirclePatch, 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 DocumentActionsSnapshot, type DocumentManifest, type DocumentMetadata, type DocumentMetadataTrapped, type DraftOfKind, type EmbeddedFileItem, type EmbeddedFileRef, EngineError, EngineErrorCode, type EngineErrorOptions, 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 FontSpec, 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 FormRepairResult, type FormSetValueResult, type FormSnapshot, type FormSubmissionEntry, type FormSubmissionReceipt, type FormSubmissionRequest, type FormValueEntry, type FormWidgetLinkResult, type FormWidgetRef, type FreeTextAnnotationDTO, type FreeTextDraft, type FreeTextFont, type FreeTextIntent, type FreeTextPatch, type GeometryStyleDraftFields, type GeometryStyleFields, type GeometryStylePatchFields, type HighlightAnnotationDTO, type HighlightDraft, type HighlightPatch, type IdentityClaims, type InkAnnotationDTO, type InkDraft, type InkIntent, type InkList, type InkPatch, type InkStroke, InvalidScope, 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 MetadataUpdateResult, MissingIdentity, type MutationMeta, NO_ANNOTATION_FLAGS, type NamedJavaScriptAction, type NormalizedDraft, type NormalizedPatch, type NoteIcon, type OpenInput, type OpenInputById, type OpenInputBytes, type OpenInputLayerBytes, type OpenInputLayerSource, type OpenInputShare, type OpenInputToken, type OpenOptions, PAGE_INSERT_BLANK_MAX_COUNT, PDF_BITS, PDF_CODE_TO_SUBTYPE, PDF_SUBTYPE_TO_CODE, type PageBoxes, type PageDeleteInput, type PageDeleteResult, type PageFlattenInput, type PageFlattenItemResult, type PageFlattenResult, type PageFlattenStatus, type PageFlattenUsage, type PageGeometryGlyph, type PageGeometryRun, type PageGeometrySnapshot, 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 PageNetworkRenderFormat, type PageObjectNumber, type PageRaster, type PageRenderBackground, type PageRenderEncodedFormat, type PageRenderFormat, type PageRenderOptions, type PageRenderQuery, type PageRenderTarget, type PageRenderViewport, type PageRotateInput, type PageRotateResult, type PageRotation, type PageState, type PageStructureCache, type PageTextLayout, type PageTextSnapshot, type ParsedCapability, type ParsedCollab, type ParsedScope, type ParsedVirtual, type ParsedWildcard, 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 PdfPoint, type PdfQuad, type PdfQuadCorners, type PdfRect, type PdfRectDifferences, type PdfRotation, type PdfSaveMode, type PdfSize, type PdfTextSegment, PermissionDenied, 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 RefetchReason, 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 SearchRegexIssue, type SearchRegexValidation, type SearchRequest, type SearchSlice, type SearchSliceBudget, type SearchSnippet, type SerializedEngineError, type ShapeAnnotationFields, type ShapeDraftFields, type ShapePatchFields, 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 WeakAnnotationState, type WidgetAnnotationDTO, type WidgetAppearance, type WidgetDraft, type WidgetPatch, type WidgetPlacement, type WidgetStyleDraftFields, type WidgetStyleFields, type WidgetStylePatchFields, type WireAnnotationDraft, type WireAnnotationPatch, type WireAttachmentFile, type WireResource, type WireResourceMap, 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, isRotatedGeometryRun, isStateAnnotation, isValidPageObjectNumber, knownWeakAnnotationState, matchLiteral, matchPageText, matchRegex, materializePdfPermissions, normalizeAnnotationDraft, normalizeAnnotationPatch, normalizeAttachmentFileSource, normalizePdfRect, parseScope, pdfPermissions, pdfQuadBounds, pdfQuadCorners, pdfQuadFromCorners, pdfRectFromOriginSize, pdfRectHeight, pdfRectSize, pdfRectToOriginSize, pdfRectWidth, refKey, resolveBinarySource, revisionTokensEqual, searchContentEpoch, searchRectsForRange, searchSegmentsForRange, semanticEqual, serializeError, shiftsExistingAnnotationIndices, sliceTextByChars, sniffBinaryMetadata, subtypeFromCode, textGlyphAt, textGlyphQuad, textSegmentsForRange, toOriginalRange, validateScopeArray, validateSearchQuery, validateSearchRegex, wordAt, wordBefore };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as pdfRectWidth, A as refKey, B as decodeStableIdKey, C as appearanceImpactOf, D as shiftsExistingAnnotationIndices, E as invalidatesWeakIndexRefs, F as resolveBinarySource, G as normalizePdfRect, H as isValidPageObjectNumber, I as NO_ANNOTATION_FLAGS, J as pdfQuadFromCorners, K as pdfQuadBounds, L as UNKNOWN_WEAK_ANNOTATION_STATE, M as normalizeAnnotationPatch, N as normalizeAttachmentFileSource, O as buildThreads, P as sniffBinaryMetadata, Q as pdfRectToOriginSize, R as knownWeakAnnotationState, S as encodeFieldRefKey, T as changesAnnotationList, U as DEFAULT_PDF_SAVE_MODE, V as encodeStableIdKey, W as createPageImageHandle, X as pdfRectHeight, Y as pdfRectFromOriginSize, Z as pdfRectSize, _ as foldOptionsFor, a as PDF_BITS, b as wordBefore, c as searchContentEpoch, d as buildSnippet, f as matchPageText, g as validateSearchRegex, h as validateSearchQuery, i as pdfPermissions, j as normalizeAnnotationDraft, k as classifyRelation, l as searchRectsForRange, m as matchRegex, n as collab, o as decodePdfBits, p as SEARCH_REGEX_MAX_LENGTH, q as pdfQuadCorners, r as materializePdfPermissions, s as canonicalSearchQuery, t as caps, u as SEARCH_SNIPPET_CONTEXT, v as matchLiteral, w as semanticEqual, x as decodeFieldRefKey, y as wordAt, z as revisionTokensEqual } from "./builders-C548U47M.js";
2
- import { a as subtypeFromCode, i as PdfAnnotationSubtypeCode, n as PDF_CODE_TO_SUBTYPE, o as EngineErrorCode, r as PDF_SUBTYPE_TO_CODE, t as ANNOTATION_SUBTYPES } from "./subtype-BvAzLCGC.js";
3
- import { a as deserializeError, i as EngineError, n as foldText, o as serializeError, r as toOriginalRange, t as SEARCH_FOLD_VERSION } from "./fold-CB4fAOOy.js";
4
- import { a as expandRawScope, c as parseScope, d as MissingIdentity, f as PermissionDenied, i as checkSetGroup, l as validateScopeArray, n as checkCapability, o as expandedCapabilities, r as checkCollab, s as filterMatches, t as checkAnyCapability, u as InvalidScope } from "./resolver-DiPMTfcy.js";
5
- export { ANNOTATION_SUBTYPES, DEFAULT_PDF_SAVE_MODE, EngineError, EngineErrorCode, InvalidScope, MissingIdentity, NO_ANNOTATION_FLAGS, PDF_BITS, PDF_CODE_TO_SUBTYPE, PDF_SUBTYPE_TO_CODE, PdfAnnotationSubtypeCode, PermissionDenied, SEARCH_FOLD_VERSION, SEARCH_REGEX_MAX_LENGTH, SEARCH_SNIPPET_CONTEXT, UNKNOWN_WEAK_ANNOTATION_STATE, appearanceImpactOf, buildSnippet, buildThreads, canonicalSearchQuery, caps, changesAnnotationList, checkAnyCapability, checkCapability, checkCollab, checkSetGroup, classifyRelation, collab, createPageImageHandle, decodeFieldRefKey, decodePdfBits, decodeStableIdKey, deserializeError, encodeFieldRefKey, encodeStableIdKey, expandRawScope, expandedCapabilities, filterMatches, foldOptionsFor, foldText, invalidatesWeakIndexRefs, isValidPageObjectNumber, knownWeakAnnotationState, matchLiteral, matchPageText, matchRegex, materializePdfPermissions, normalizeAnnotationDraft, normalizeAnnotationPatch, normalizeAttachmentFileSource, normalizePdfRect, parseScope, pdfPermissions, pdfQuadBounds, pdfQuadCorners, pdfQuadFromCorners, pdfRectFromOriginSize, pdfRectHeight, pdfRectSize, pdfRectToOriginSize, pdfRectWidth, refKey, resolveBinarySource, revisionTokensEqual, searchContentEpoch, searchRectsForRange, semanticEqual, serializeError, shiftsExistingAnnotationIndices, sniffBinaryMetadata, subtypeFromCode, toOriginalRange, validateScopeArray, validateSearchQuery, validateSearchRegex, wordAt, wordBefore };
1
+ import { $ as createPageImageHandle, A as appearanceImpactOf, B as normalizeAnnotationDraft, C as validateSearchRegex, D as wordBefore, E as wordAt, F as buildCommentThreads, G as NO_ANNOTATION_FLAGS, H as normalizeAttachmentFileSource, I as isStateAnnotation, J as revisionTokensEqual, K as UNKNOWN_WEAK_ANNOTATION_STATE, L as buildThreads, M as changesAnnotationList, N as invalidatesWeakIndexRefs, O as decodeFieldRefKey, P as shiftsExistingAnnotationIndices, Q as DEFAULT_PDF_SAVE_MODE, R as classifyRelation, S as validateSearchQuery, T as matchLiteral, U as sniffBinaryMetadata, V as normalizeAnnotationPatch, W as resolveBinarySource, X as encodeStableIdKey, Y as decodeStableIdKey, Z as isValidPageObjectNumber, _ as SEARCH_SNIPPET_CONTEXT, a as PDF_BITS, b as SEARCH_REGEX_MAX_LENGTH, c as searchContentEpoch, d as buildPageTextLayout, et as decodeSubmitFormFlags, f as expandTextRangeToLine, g as textSegmentsForRange, h as textGlyphQuad, i as pdfPermissions, j as semanticEqual, k as encodeFieldRefKey, l as searchRectsForRange, m as textGlyphAt, n as collab, o as decodePdfBits, p as expandTextRangeToWord, q as knownWeakAnnotationState, r as materializePdfPermissions, s as canonicalSearchQuery, t as caps, u as searchSegmentsForRange, v as buildSnippet, w as foldOptionsFor, x as matchRegex, y as matchPageText, z as refKey } from "./builders-Cdz34nbF.js";
2
+ import { _ as pdfRectSize, a as deserializeError, c as glyphLooseBounds, d as normalizePdfRect, f as pdfQuadBounds, g as pdfRectHeight, h as pdfRectFromOriginSize, i as EngineError, l as glyphLooseQuad, m as pdfQuadFromCorners, n as foldText, o as serializeError, p as pdfQuadCorners, r as toOriginalRange, t as SEARCH_FOLD_VERSION, u as isRotatedGeometryRun, v as pdfRectToOriginSize, y as pdfRectWidth } from "./fold-BfyxxwS6.js";
3
+ import { a as charRangeForTextOffsets, c as PDF_CODE_TO_SUBTYPE, d as subtypeFromCode, f as EngineErrorCode, i as charMapViolation, l as PDF_SUBTYPE_TO_CODE, n as boundaryTextOffset, o as sliceTextByChars, r as charBoundaryAtTextOffset, s as ANNOTATION_SUBTYPES, t as PAGE_INSERT_BLANK_MAX_COUNT, u as PdfAnnotationSubtypeCode } from "./PageInsertBlankInput-WKY0tr6S.js";
4
+ import { a as expandRawScope, c as parseScope, d as MissingIdentity, f as PermissionDenied, i as checkSetGroup, l as validateScopeArray, n as checkCapability, o as expandedCapabilities, r as checkCollab, s as filterMatches, t as checkAnyCapability, u as InvalidScope } from "./resolver-CHG4waXL.js";
5
+ export { ANNOTATION_SUBTYPES, DEFAULT_PDF_SAVE_MODE, EngineError, EngineErrorCode, InvalidScope, MissingIdentity, NO_ANNOTATION_FLAGS, PAGE_INSERT_BLANK_MAX_COUNT, PDF_BITS, PDF_CODE_TO_SUBTYPE, PDF_SUBTYPE_TO_CODE, PdfAnnotationSubtypeCode, PermissionDenied, SEARCH_FOLD_VERSION, SEARCH_REGEX_MAX_LENGTH, SEARCH_SNIPPET_CONTEXT, UNKNOWN_WEAK_ANNOTATION_STATE, 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, isRotatedGeometryRun, isStateAnnotation, isValidPageObjectNumber, knownWeakAnnotationState, matchLiteral, matchPageText, matchRegex, materializePdfPermissions, normalizeAnnotationDraft, normalizeAnnotationPatch, normalizeAttachmentFileSource, normalizePdfRect, parseScope, pdfPermissions, pdfQuadBounds, pdfQuadCorners, pdfQuadFromCorners, pdfRectFromOriginSize, pdfRectHeight, pdfRectSize, pdfRectToOriginSize, pdfRectWidth, refKey, resolveBinarySource, revisionTokensEqual, searchContentEpoch, searchRectsForRange, searchSegmentsForRange, semanticEqual, serializeError, shiftsExistingAnnotationIndices, sliceTextByChars, sniffBinaryMetadata, subtypeFromCode, textGlyphAt, textGlyphQuad, textSegmentsForRange, toOriginalRange, validateScopeArray, validateSearchQuery, validateSearchRegex, wordAt, wordBefore };
@@ -71,6 +71,7 @@ const KNOWN_CAPABILITIES = /* @__PURE__ */ new Set([
71
71
  "doc.forms.read",
72
72
  "doc.forms.fill",
73
73
  "doc.forms.modify",
74
+ "doc.forms.submit",
74
75
  "doc.annotate.read",
75
76
  "doc.annotate.modify",
76
77
  "doc.metadata.modify",
@@ -360,4 +361,4 @@ function addPdfPermissions(out, b) {
360
361
  //#endregion
361
362
  export { expandRawScope as a, parseScope as c, MissingIdentity as d, PermissionDenied as f, checkSetGroup as i, validateScopeArray as l, checkCapability as n, expandedCapabilities as o, checkCollab as r, filterMatches as s, checkAnyCapability as t, InvalidScope as u };
362
363
 
363
- //# sourceMappingURL=resolver-DiPMTfcy.js.map
364
+ //# sourceMappingURL=resolver-CHG4waXL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolver-CHG4waXL.js","names":[],"sources":["../src/auth/scope/errors.ts","../src/auth/scope/parser.ts","../src/auth/scope/resolver.ts"],"sourcesContent":["/**\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]);\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';\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): boolean {\n const parsed = rawScope.map(parseScope);\n if (parsed.some((s) => s.kind === 'wildcard')) return true;\n return expandedCapabilities(parsed, pdfBits).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): boolean {\n return capabilities.some((c) => checkCapability(c, rawScope, pdfBits));\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): 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 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): Set<DocCapability> {\n return expandedCapabilities(rawScope.map(parseScope), pdfBits);\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) out.add('doc.forms.fill');\n if (b.bit6 && b.bit4) out.add('doc.forms.modify');\n}\n"],"mappings":"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"}
@@ -71,6 +71,7 @@ const KNOWN_CAPABILITIES = /* @__PURE__ */ new Set([
71
71
  "doc.forms.read",
72
72
  "doc.forms.fill",
73
73
  "doc.forms.modify",
74
+ "doc.forms.submit",
74
75
  "doc.annotate.read",
75
76
  "doc.annotate.modify",
76
77
  "doc.metadata.modify",
@@ -431,4 +432,4 @@ Object.defineProperty(exports, "validateScopeArray", {
431
432
  }
432
433
  });
433
434
 
434
- //# sourceMappingURL=resolver-DAZWVoJL.cjs.map
435
+ //# sourceMappingURL=resolver-D-jumvgM.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolver-D-jumvgM.cjs","names":[],"sources":["../src/auth/scope/errors.ts","../src/auth/scope/parser.ts","../src/auth/scope/resolver.ts"],"sourcesContent":["/**\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]);\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';\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): boolean {\n const parsed = rawScope.map(parseScope);\n if (parsed.some((s) => s.kind === 'wildcard')) return true;\n return expandedCapabilities(parsed, pdfBits).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): boolean {\n return capabilities.some((c) => checkCapability(c, rawScope, pdfBits));\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): 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 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): Set<DocCapability> {\n return expandedCapabilities(rawScope.map(parseScope), pdfBits);\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) out.add('doc.forms.fill');\n if (b.bit6 && b.bit4) out.add('doc.forms.modify');\n}\n"],"mappings":";;;;;;;;;AAQA,IAAa,eAAb,cAAkC,MAAM;CACtC,YACE,OACA,QACA;EACA,MAAM,kBAAkB,MAAM,KAAK,QAAQ;EAH3B,KAAA,QAAA;EAIhB,KAAK,OAAO;CACd;AACF;;;;;;;;;AAUA,IAAa,mBAAb,cAAsC,MAAM;CAC1C,YACE,UACA,SACA;EACA,MAAM,oBAAoB,UAAU,KAAK,QAAQ,KAAK,GAAG,IAAI,UAAU;EAHvD,KAAA,WAAA;EACA,KAAA,UAAA;EAGhB,KAAK,OAAO;CACd;AACF;;;;;;;;AASA,IAAa,kBAAb,cAAqC,MAAM;CACzC,YAAY,OAAe;EACzB,MAAM,UAAU,MAAM,mDAAmD;EACzE,KAAK,OAAO;CACd;AACF;;;;;;;;;;;;;ACnCA,MAAM,qCAAiD,IAAI,IAAI;CAC7D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;;;;;;;;;AAeD,SAAgB,WAAW,KAA0B;CACnD,IAAI,QAAQ,KAAK,OAAO,EAAE,MAAM,WAAW;CAC3C,IAAI,QAAQ,mBAAmB,OAAO;EAAE,MAAM;EAAW,MAAM;CAAkB;CACjF,IAAI,IAAI,SAAS,GAAG,GAAG,OAAO,YAAY,GAAG;CAC7C,OAAO,gBAAgB,GAAG;AAC5B;;;;;;;AAQA,SAAgB,mBAAmB,KAAkC;CACnE,KAAK,MAAM,KAAK,KAAK,WAAW,CAAC;AACnC;AAEA,SAAS,YAAY,KAA0B;CAG7C,MAAM,OAAO,IAAI,QAAQ,GAAG;CAC5B,MAAM,OAAO,IAAI,QAAQ,KAAK,OAAO,CAAC;CACtC,IAAI,SAAS,MAAM,SAAS,IAC1B,MAAM,IAAI,aAAa,KAAK,4CAA4C;CAE1E,MAAM,SAAS,IAAI,MAAM,GAAG,IAAI;CAChC,MAAM,SAAS,IAAI,MAAM,OAAO,GAAG,IAAI;CACvC,MAAM,YAAY,IAAI,MAAM,OAAO,CAAC;CAEpC,IAAI,WAAW,eACb,MAAM,IAAI,aAAa,KAAK,0BAA0B,QAAQ;CAEhE,IACE,WAAW,YACX,WAAW,YACX,WAAW,YACX,WAAW,eACX,WAAW,KAEX,MAAM,IAAI,aAAa,KAAK,0BAA0B,QAAQ;CAEhE,MAAM,SAAS,YAAY,WAAW,GAAG;CAOzC,IAAI,WAAW,gBAAgB,OAAO,SAAS,UAAU,OAAO,SAAS,cACvE,MAAM,IAAI,aACR,KACA,6DAA6D,OAAO,KAAK,EAC3E;CAGF,OAAO;EACL,MAAM;EACN;EACQ;EACR;CACF;AACF;AAEA,SAAS,YAAY,GAAW,KAA2B;CACzD,IAAI,MAAM,OAAO,OAAO,EAAE,MAAM,MAAM;CACtC,IAAI,MAAM,QAAQ,OAAO,EAAE,MAAM,OAAO;CACxC,IAAI,EAAE,WAAW,YAAY,GAAG;EAC9B,MAAM,IAAI,EAAE,MAAM,EAAmB;EACrC,IAAI,CAAC,GAAG,MAAM,IAAI,aAAa,KAAK,6BAA6B;EACjE,OAAO;GAAE,MAAM;GAAa,QAAQ;EAAE;CACxC;CACA,IAAI,EAAE,WAAW,QAAQ,GAAG;EAC1B,MAAM,IAAI,EAAE,MAAM,CAAe;EACjC,IAAI,CAAC,GAAG,MAAM,IAAI,aAAa,KAAK,yBAAyB;EAC7D,OAAO;GAAE,MAAM;GAAS,SAAS;EAAE;CACrC;CACA,MAAM,IAAI,aAAa,KAAK,mBAAmB,GAAG;AACpD;AAIA,MAAM,mBAAmB;AAEzB,SAAS,gBAAgB,KAA0B;CACjD,IAAI,CAAC,iBAAiB,KAAK,GAAG,GAC5B,MAAM,IAAI,aAAa,KAAK,+BAA+B;CAE7D,IAAI,CAAC,mBAAmB,IAAI,GAAoB,GAC9C,MAAM,IAAI,aAAa,KAAK,uBAAuB,KAAK;CAE1D,OAAO;EAAE,MAAM;EAAc,MAAM;CAAqB;AAC1D;;;;;;;;;;AClHA,SAAgB,gBACd,YACA,UACA,SACS;CACT,MAAM,SAAS,SAAS,IAAI,UAAU;CACtC,IAAI,OAAO,MAAM,MAAM,EAAE,SAAS,UAAU,GAAG,OAAO;CACtD,OAAO,qBAAqB,QAAQ,OAAO,CAAC,CAAC,IAAI,UAAU;AAC7D;;;;;;AAOA,SAAgB,mBACd,cACA,UACA,SACS;CACT,OAAO,aAAa,MAAM,MAAM,gBAAgB,GAAG,UAAU,OAAO,CAAC;AACvE;;;;;;;;;;;;;;;;;;;;;;;AAwBA,SAAgB,YACd,QACA,QACA,UACA,UACA,SACS;CACT,MAAM,SAAS,SAAS,IAAI,UAAU;CACtC,IAAI,OAAO,MAAM,MAAM,EAAE,SAAS,UAAU,GAAG,OAAO;CAEtD,MAAM,mBAAmB,OAAO,QAC7B,MACC,EAAE,SAAS,YACX,EAAE,WAAW,kBACZ,EAAE,WAAW,UAAU,EAAE,WAAW,IACzC;CAEA,IAAI,iBAAiB,SAAS,GAG5B,OAAO,iBAAiB,MAAM,MAAM,cAAc,EAAE,QAAQ,QAAQ,QAAQ,CAAC;CAI/E,OAAO,qBAAqB,QAAQ,OAAO,CAAC,CAAC,IAAI,qBAAqB;AACxE;;;;;;;;;;;;;;;;;;AAmBA,SAAgB,qBACd,QACA,SACoB;CACpB,MAAM,sBAAM,IAAI,IAAmB;CACnC,IAAI,sBAAsB;CAE1B,KAAK,MAAM,KAAK,QACd,IAAI,EAAE,SAAS,cACb,IAAI,IAAI,EAAE,IAAI;MACT,IAAI,EAAE,SAAS,aAAa,EAAE,SAAS,mBAC5C,kBAAkB,KAAK,OAAO;MACzB,IAAI,EAAE,SAAS,YAAY,EAAE,WAAW,eAC7C,sBAAsB;CAK1B,IAAI,IAAI,IAAI,qBAAqB,GAAG,IAAI,IAAI,mBAAmB;CAC/D,IAAI,IAAI,IAAI,kBAAkB,GAAG;EAC/B,IAAI,IAAI,gBAAgB;EACxB,IAAI,IAAI,gBAAgB;CAC1B;CACA,IAAI,IAAI,IAAI,gBAAgB,GAAG,IAAI,IAAI,gBAAgB;CACvD,IAAI,qBAAqB,IAAI,IAAI,mBAAmB;CAEpD,OAAO;AACT;;;;;;AAOA,SAAgB,eACd,UACA,SACoB;CACpB,OAAO,qBAAqB,SAAS,IAAI,UAAU,GAAG,OAAO;AAC/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,SAAgB,cACd,YACA,sBACA,UACA,UACS;CAET,IAAI,eAAe,sBAAsB,OAAO;CAEhD,MAAM,SAAS,SAAS,IAAI,UAAU;CACtC,IAAI,OAAO,MAAM,MAAM,EAAE,SAAS,UAAU,GAAG,OAAO;CAEtD,KAAK,MAAM,KAAK,QAAQ;EACtB,IAAI,EAAE,SAAS,UAAU;EACzB,IAAI,EAAE,WAAW,eAAe;EAChC,IAAI,EAAE,WAAW,eAAe,EAAE,WAAW,KAAK;EAClD,IAAI,EAAE,OAAO,SAAS,OAAO,OAAO;EACpC,IAAI,EAAE,OAAO,SAAS,WAAW,EAAE,OAAO,YAAY,YAAY,OAAO;CAK3E;CACA,OAAO;AACT;AAEA,SAAgB,cACd,QACA,QACA,IACS;CACT,QAAQ,OAAO,MAAf;EACE,KAAK,OACH,OAAO;EACT,KAAK,QACH,OAAO,CAAC,CAAC,GAAG,WAAW,OAAO,WAAW,GAAG;EAC9C,KAAK,aACH,OAAO,OAAO,WAAW,OAAO;EAClC,KAAK,SACH,OAAO,OAAO,YAAY,OAAO,YAAY,GAAG,QAAQ,SAAS,OAAO,OAAO,KAAK;CACxF;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAS,kBAAkB,KAAyB,GAAkB;CAEpE,IAAI,IAAI,UAAU;CAClB,IAAI,IAAI,YAAY;CAGpB,IAAI,IAAI,mBAAmB;CAC3B,IAAI,IAAI,gBAAgB;CAExB,IAAI,EAAE,MAAM;EACV,IAAI,IAAI,iBAAiB;EACzB,IAAI,IAAI,eAAe;EACvB,IAAI,IAAI,iBAAiB;EACzB,IAAI,IAAI,kBAAkB;CAC5B;CACA,IAAI,EAAE,MAAM,IAAI,IAAI,WAAW;CAC/B,IAAI,EAAE,SAAS,EAAE,MAAM,IAAI,IAAI,gBAAgB;CAC/C,IAAI,EAAE,MAAM;EACV,IAAI,IAAI,kBAAkB;EAC1B,IAAI,IAAI,YAAY;EACpB,IAAI,IAAI,qBAAqB;EAC7B,IAAI,IAAI,wBAAwB;CAClC;CACA,IAAI,EAAE,OAAO,IAAI,IAAI,oBAAoB;CACzC,IAAI,EAAE,MACJ,IAAI,IAAI,qBAAqB;CAE/B,IAAI,EAAE,QAAQ,EAAE,MAAM,IAAI,IAAI,gBAAgB;CAC9C,IAAI,EAAE,QAAQ,EAAE,MAAM,IAAI,IAAI,kBAAkB;AAClD"}
package/dist/runtime.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_builders = require("./builders-BvikWRuO.cjs");
3
- const require_subtype = require("./subtype-qejjVr6h.cjs");
4
- const require_fold = require("./fold-IaMph3CO.cjs");
5
- const require_resolver = require("./resolver-DAZWVoJL.cjs");
6
- const require_AbortError = require("./AbortError-ByBflvEl.cjs");
2
+ const require_builders = require("./builders-Do6_4KnS.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");
7
7
  //#region src/promise/AbortablePromise.ts
8
8
  let _Symbol$species;
9
9
  _Symbol$species = Symbol.species;
@@ -231,13 +231,13 @@ const CONTINUOUS_RENDER_POLICY = { kind: "continuous" };
231
231
  */
232
232
  function snapFullPageViewport(policy, viewport, opts) {
233
233
  if (policy.kind === "continuous") return viewport;
234
- if (policy.fullPage.widths.length === 0) throw new require_fold.EngineError(require_subtype.EngineErrorCode.InvalidArg, "render policy has an empty width ladder");
234
+ if (policy.fullPage.widths.length === 0) throw new require_fold.EngineError(require_PageInsertBlankInput.EngineErrorCode.InvalidArg, "render policy has an empty width ladder");
235
235
  const widths = [...policy.fullPage.widths].sort((a, b) => a - b);
236
236
  let requested;
237
237
  if (viewport.kind === "width") requested = viewport.width;
238
238
  else {
239
239
  const pageWidth = opts?.pageWidth;
240
- if (pageWidth === void 0 || pageWidth <= 0) throw new require_fold.EngineError(require_subtype.EngineErrorCode.InvalidArg, "snapping a scale viewport to a width lattice requires opts.pageWidth");
240
+ if (pageWidth === void 0 || pageWidth <= 0) throw new require_fold.EngineError(require_PageInsertBlankInput.EngineErrorCode.InvalidArg, "snapping a scale viewport to a width lattice requires opts.pageWidth");
241
241
  requested = (viewport.scale ?? 1) * pageWidth;
242
242
  }
243
243
  return {
@@ -255,7 +255,7 @@ function snapFullPageViewport(policy, viewport, opts) {
255
255
  */
256
256
  function snapAppearanceScale(policy, scale) {
257
257
  if (policy.kind === "continuous" || policy.appearances === void 0) return scale;
258
- if (policy.appearances.scales.length === 0) throw new require_fold.EngineError(require_subtype.EngineErrorCode.InvalidArg, "render policy has an empty appearance-scale lattice");
258
+ if (policy.appearances.scales.length === 0) throw new require_fold.EngineError(require_PageInsertBlankInput.EngineErrorCode.InvalidArg, "render policy has an empty appearance-scale lattice");
259
259
  const scales = [...policy.appearances.scales].sort((a, b) => a - b);
260
260
  return scales.find((s) => s >= scale) ?? scales[scales.length - 1];
261
261
  }
@@ -271,7 +271,7 @@ function snapAppearanceScale(policy, scale) {
271
271
  */
272
272
  function snapTileScale(policy, scale) {
273
273
  if (policy.kind === "continuous" || policy.tiles === void 0) return scale;
274
- if (policy.tiles.scales.length === 0) throw new require_fold.EngineError(require_subtype.EngineErrorCode.InvalidArg, "render policy has an empty tile-scale lattice");
274
+ if (policy.tiles.scales.length === 0) throw new require_fold.EngineError(require_PageInsertBlankInput.EngineErrorCode.InvalidArg, "render policy has an empty tile-scale lattice");
275
275
  const scales = [...policy.tiles.scales].sort((a, b) => a - b);
276
276
  return scales.find((s) => s >= scale) ?? scales[scales.length - 1];
277
277
  }
@@ -357,21 +357,22 @@ function wirePack(payload, transfer = EMPTY_TRANSFER) {
357
357
  };
358
358
  }
359
359
  //#endregion
360
- exports.ANNOTATION_SUBTYPES = require_subtype.ANNOTATION_SUBTYPES;
360
+ 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
364
  exports.DEFAULT_PDF_SAVE_MODE = require_builders.DEFAULT_PDF_SAVE_MODE;
365
365
  exports.EMPTY_TRANSFER = EMPTY_TRANSFER;
366
366
  exports.EngineError = require_fold.EngineError;
367
- exports.EngineErrorCode = require_subtype.EngineErrorCode;
367
+ exports.EngineErrorCode = require_PageInsertBlankInput.EngineErrorCode;
368
368
  exports.InvalidScope = require_resolver.InvalidScope;
369
369
  exports.MissingIdentity = require_resolver.MissingIdentity;
370
370
  exports.NO_ANNOTATION_FLAGS = require_builders.NO_ANNOTATION_FLAGS;
371
+ exports.PAGE_INSERT_BLANK_MAX_COUNT = require_PageInsertBlankInput.PAGE_INSERT_BLANK_MAX_COUNT;
371
372
  exports.PDF_BITS = require_builders.PDF_BITS;
372
- exports.PDF_CODE_TO_SUBTYPE = require_subtype.PDF_CODE_TO_SUBTYPE;
373
- exports.PDF_SUBTYPE_TO_CODE = require_subtype.PDF_SUBTYPE_TO_CODE;
374
- exports.PdfAnnotationSubtypeCode = require_subtype.PdfAnnotationSubtypeCode;
373
+ exports.PDF_CODE_TO_SUBTYPE = require_PageInsertBlankInput.PDF_CODE_TO_SUBTYPE;
374
+ exports.PDF_SUBTYPE_TO_CODE = require_PageInsertBlankInput.PDF_SUBTYPE_TO_CODE;
375
+ exports.PdfAnnotationSubtypeCode = require_PageInsertBlankInput.PdfAnnotationSubtypeCode;
375
376
  exports.PermissionDenied = require_resolver.PermissionDenied;
376
377
  exports.SEARCH_FOLD_VERSION = require_fold.SEARCH_FOLD_VERSION;
377
378
  exports.SEARCH_REGEX_MAX_LENGTH = require_builders.SEARCH_REGEX_MAX_LENGTH;
@@ -379,11 +380,17 @@ exports.SEARCH_SNIPPET_CONTEXT = require_builders.SEARCH_SNIPPET_CONTEXT;
379
380
  exports.UNKNOWN_WEAK_ANNOTATION_STATE = require_builders.UNKNOWN_WEAK_ANNOTATION_STATE;
380
381
  exports.advisoryFromPdfBits = advisoryFromPdfBits;
381
382
  exports.appearanceImpactOf = require_builders.appearanceImpactOf;
383
+ exports.boundaryTextOffset = require_PageInsertBlankInput.boundaryTextOffset;
384
+ exports.buildCommentThreads = require_builders.buildCommentThreads;
385
+ exports.buildPageTextLayout = require_builders.buildPageTextLayout;
382
386
  exports.buildSnippet = require_builders.buildSnippet;
383
387
  exports.buildThreads = require_builders.buildThreads;
384
388
  exports.canonicalSearchQuery = require_builders.canonicalSearchQuery;
385
389
  exports.caps = require_builders.caps;
386
390
  exports.changesAnnotationList = require_builders.changesAnnotationList;
391
+ exports.charBoundaryAtTextOffset = require_PageInsertBlankInput.charBoundaryAtTextOffset;
392
+ exports.charMapViolation = require_PageInsertBlankInput.charMapViolation;
393
+ exports.charRangeForTextOffsets = require_PageInsertBlankInput.charRangeForTextOffsets;
387
394
  exports.checkAnyCapability = require_resolver.checkAnyCapability;
388
395
  exports.checkCapability = require_resolver.checkCapability;
389
396
  exports.checkCollab = require_resolver.checkCollab;
@@ -394,16 +401,23 @@ exports.createPageImageHandle = require_builders.createPageImageHandle;
394
401
  exports.decodeFieldRefKey = require_builders.decodeFieldRefKey;
395
402
  exports.decodePdfBits = require_builders.decodePdfBits;
396
403
  exports.decodeStableIdKey = require_builders.decodeStableIdKey;
404
+ exports.decodeSubmitFormFlags = require_builders.decodeSubmitFormFlags;
397
405
  exports.deserializeError = require_fold.deserializeError;
398
406
  exports.encodeFieldRefKey = require_builders.encodeFieldRefKey;
399
407
  exports.encodeStableIdKey = require_builders.encodeStableIdKey;
400
408
  exports.expandRawScope = require_resolver.expandRawScope;
409
+ exports.expandTextRangeToLine = require_builders.expandTextRangeToLine;
410
+ exports.expandTextRangeToWord = require_builders.expandTextRangeToWord;
401
411
  exports.expandedCapabilities = require_resolver.expandedCapabilities;
402
412
  exports.filterMatches = require_resolver.filterMatches;
403
413
  exports.foldOptionsFor = require_builders.foldOptionsFor;
404
414
  exports.foldText = require_fold.foldText;
415
+ exports.glyphLooseBounds = require_fold.glyphLooseBounds;
416
+ exports.glyphLooseQuad = require_fold.glyphLooseQuad;
405
417
  exports.invalidatesWeakIndexRefs = require_builders.invalidatesWeakIndexRefs;
406
418
  exports.isAbortError = require_AbortError.isAbortError;
419
+ exports.isRotatedGeometryRun = require_fold.isRotatedGeometryRun;
420
+ exports.isStateAnnotation = require_builders.isStateAnnotation;
407
421
  exports.isValidPageObjectNumber = require_builders.isValidPageObjectNumber;
408
422
  exports.knownWeakAnnotationState = require_builders.knownWeakAnnotationState;
409
423
  exports.matchLiteral = require_builders.matchLiteral;
@@ -413,18 +427,18 @@ exports.materializePdfPermissions = require_builders.materializePdfPermissions;
413
427
  exports.normalizeAnnotationDraft = require_builders.normalizeAnnotationDraft;
414
428
  exports.normalizeAnnotationPatch = require_builders.normalizeAnnotationPatch;
415
429
  exports.normalizeAttachmentFileSource = require_builders.normalizeAttachmentFileSource;
416
- exports.normalizePdfRect = require_builders.normalizePdfRect;
430
+ exports.normalizePdfRect = require_fold.normalizePdfRect;
417
431
  exports.parseScope = require_resolver.parseScope;
418
432
  exports.passwordPromptFromState = passwordPromptFromState;
419
433
  exports.pdfPermissions = require_builders.pdfPermissions;
420
- exports.pdfQuadBounds = require_builders.pdfQuadBounds;
421
- exports.pdfQuadCorners = require_builders.pdfQuadCorners;
422
- exports.pdfQuadFromCorners = require_builders.pdfQuadFromCorners;
423
- exports.pdfRectFromOriginSize = require_builders.pdfRectFromOriginSize;
424
- exports.pdfRectHeight = require_builders.pdfRectHeight;
425
- exports.pdfRectSize = require_builders.pdfRectSize;
426
- exports.pdfRectToOriginSize = require_builders.pdfRectToOriginSize;
427
- exports.pdfRectWidth = require_builders.pdfRectWidth;
434
+ exports.pdfQuadBounds = require_fold.pdfQuadBounds;
435
+ exports.pdfQuadCorners = require_fold.pdfQuadCorners;
436
+ exports.pdfQuadFromCorners = require_fold.pdfQuadFromCorners;
437
+ exports.pdfRectFromOriginSize = require_fold.pdfRectFromOriginSize;
438
+ exports.pdfRectHeight = require_fold.pdfRectHeight;
439
+ exports.pdfRectSize = require_fold.pdfRectSize;
440
+ exports.pdfRectToOriginSize = require_fold.pdfRectToOriginSize;
441
+ exports.pdfRectWidth = require_fold.pdfRectWidth;
428
442
  exports.permissionInfoFromProbe = permissionInfoFromProbe;
429
443
  exports.permissionInfoWithAdvisory = permissionInfoWithAdvisory;
430
444
  exports.refKey = require_builders.refKey;
@@ -432,16 +446,21 @@ exports.resolveBinarySource = require_builders.resolveBinarySource;
432
446
  exports.revisionTokensEqual = require_builders.revisionTokensEqual;
433
447
  exports.searchContentEpoch = require_builders.searchContentEpoch;
434
448
  exports.searchRectsForRange = require_builders.searchRectsForRange;
449
+ exports.searchSegmentsForRange = require_builders.searchSegmentsForRange;
435
450
  exports.securityStateFromHead = securityStateFromHead;
436
451
  exports.securityStateFromProbe = securityStateFromProbe;
437
452
  exports.semanticEqual = require_builders.semanticEqual;
438
453
  exports.serializeError = require_fold.serializeError;
439
454
  exports.shiftsExistingAnnotationIndices = require_builders.shiftsExistingAnnotationIndices;
455
+ exports.sliceTextByChars = require_PageInsertBlankInput.sliceTextByChars;
440
456
  exports.snapAppearanceScale = snapAppearanceScale;
441
457
  exports.snapFullPageViewport = snapFullPageViewport;
442
458
  exports.snapTileScale = snapTileScale;
443
459
  exports.sniffBinaryMetadata = require_builders.sniffBinaryMetadata;
444
- exports.subtypeFromCode = require_subtype.subtypeFromCode;
460
+ exports.subtypeFromCode = require_PageInsertBlankInput.subtypeFromCode;
461
+ exports.textGlyphAt = require_builders.textGlyphAt;
462
+ exports.textGlyphQuad = require_builders.textGlyphQuad;
463
+ exports.textSegmentsForRange = require_builders.textSegmentsForRange;
445
464
  exports.toOriginalRange = require_fold.toOriginalRange;
446
465
  exports.validateScopeArray = require_resolver.validateScopeArray;
447
466
  exports.validateSearchQuery = require_builders.validateSearchQuery;