PDF.js version: 3.5.141

These two properties should be marked as not mandatory as they are initialized if not present
document.createElement("div"));
          element.id = "hiddenCopyElement";
          this.viewer.before(element);
        }
        if (annotationEditorMode !== AnnotationEditorType.DISABLE) {
          const mode = annotationEditorMode;
          if (pdfDocument.isPureXfa) {
            console.warn("Warning: XFA-editing is not implemented.");
          } else if (isValidAnnotationEditorMode(mode)) {
            this.#annotationEditorUIManager = new AnnotationEditorUIManager(
              this.container,
              this.eventBus,
              pdfDocument?.annotationStorage
            );
            if (mode !== AnnotationEditorType.NONE) {
              this.#annotationEditorUIManager.updateMode(mode);
            }
          } else {
            console.error(`Invalid AnnotationEditor mode: ${mode}`);
          }
        }
        const layerProperties = this.#layerProperties.bind(this);
        const viewerElement =
          this._scrollMode === ScrollMode.PAGE ? null : this.viewer;
        const scale = this.currentScale;
        const viewport = firstPdfPage.getViewport({
          scale: scale * PixelsPerInch.PDF_TO_CSS_UNITS,
        });