Skip to main content

f_office/
lib.rs

1//! Public API of F-Office.
2//!
3//! F-Office renders Office Open XML documents the way Microsoft Office does, starting with
4//! Word's DOCX format. This crate opens a file and lays it out into a display list, which
5//! `f-office-raster` draws as pixels, or writes it as a PDF file. The other `f-office-*` crates
6//! are internal and have no stability promise before 1.0.
7
8use std::fmt;
9
10pub mod edit;
11mod pictures;
12#[cfg(any(test, feature = "development"))]
13pub mod suite;
14
15#[cfg(any(test, feature = "development"))]
16use f_office_docx::PlacedLine;
17use f_office_docx::TextMap;
18use f_office_fonts::FontDb;
19use f_office_opc::Package;
20
21/// The configuration: the setup of Word's machine and the user's choice of fonts, and the types
22/// of its keys.
23pub use f_office_docx::configuration;
24/// Why a target's ID names no target, or the configuration or the target's profile does not
25/// read: the error of `Target::from_str` and of [`Error::Configuration`].
26pub use f_office_docx::configuration::Error as ConfigurationError;
27pub use f_office_docx::{
28    ART_PICTURES_BYTE_LIMIT, ART_PICTURES_CLIP_DEPTH_LIMIT, ART_PICTURES_COMMAND_LIMIT,
29    ART_PICTURES_REACH_LIMIT, ART_PICTURES_SHAPE_LIMIT, ART_PICTURES_SIZE_LIMIT, Address,
30    AddressError, AddressStep, ArtPictures, ArtPicturesError, ArtPicturesFault, CellPlace,
31    Configuration, DateTime, EndHyphen, LineTextEnd, LineTurn, LinkTarget, NumberSeparators,
32    NumberSeparatorsError, StoryBookmark, StoryLink, StoryParagraph, Target, TextBlock,
33    TextBlockKind, TextCluster, TextLine, TextStory,
34};
35pub use f_office_fonts::FontDb as FontDatabase;
36pub use f_office_opc::{Limits, RandomAccessRead, XmlLimits};
37pub use f_office_paint::{DisplayList, ImageFault, ImageFormat, Page};
38pub use f_office_units::Length;
39pub use f_office_warnings::Name;
40
41/// The warnings of the DOCX layout, which [`Warning::Docx`] holds, and the types of their
42/// fields.
43pub mod docx {
44    pub use f_office_docx::{
45        ChartReason, Drawing, DrawingMlFeature, DrawingMlWarning, Feature, GroupTransform, Limit,
46        MetafileRecordType, MetafileWarning, NoteKind, ReadAs, Reason, SubstituteLayout,
47        ValuePlace, Warning,
48    };
49    pub use f_office_fonts::ShapeFailure;
50}
51
52/// The warnings of the PDF writer, which [`Warning::Pdf`] holds.
53pub mod pdf {
54    pub use f_office_pdf::Warning;
55}
56
57// A finished display list, and the document that holds
58// it, stay `Send + Sync`.
59const _: () = {
60    const fn shared<T: Send + Sync>() {}
61    shared::<DisplayList>();
62    shared::<Document>();
63};
64
65/// Timing spans of the rendering stages: `open` (the package),
66/// `docx` (reading the parts and the layout), `layout` (the layout passes inside `docx`) and
67/// `pdf` (writing the PDF file), recorded on a thread that called [`timing::arm`].
68#[cfg(feature = "timing")]
69pub mod timing {
70    pub use f_office_docx::timing::{arm, take};
71}
72
73/// Why a document could not be rendered.
74#[derive(Clone, Debug, PartialEq, Eq)]
75#[non_exhaustive]
76pub enum Error {
77    /// The package could not be read.
78    Package(f_office_opc::Error),
79    /// The DOCX content could not be laid out.
80    Docx(f_office_docx::Error),
81    /// The pages could not be written as PDF.
82    Pdf(f_office_pdf::Error),
83    /// The configuration or the target's profile does not read.
84    Configuration(ConfigurationError),
85}
86
87impl fmt::Display for Error {
88    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
89        f.write_str(match self {
90            Self::Package(_) => "the package could not be read",
91            Self::Docx(_) => "the DOCX content could not be laid out",
92            Self::Pdf(_) => "the pages could not be written as PDF",
93            Self::Configuration(_) => "the configuration or the target's profile does not read",
94        })
95    }
96}
97
98impl std::error::Error for Error {
99    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
100        Some(match self {
101            Self::Package(error) => error,
102            Self::Docx(error) => error,
103            Self::Pdf(error) => error,
104            Self::Configuration(error) => error,
105        })
106    }
107}
108
109/// What a rendering left out of the file, or drew in another way than the file asks, while it
110/// went on with the rest. A warning holds no content of the document, only the names that the
111/// file uses to point at a part or a font, cut and with printable characters only ([`Name`]).
112#[derive(Clone, Debug, PartialEq, Eq, Hash)]
113#[non_exhaustive]
114pub enum Warning {
115    /// A warning of the DOCX layout.
116    Docx(docx::Warning),
117    /// A warning of the PDF writer.
118    Pdf(pdf::Warning),
119    /// A picture whose file the target's PDF writer writes again, such as each JPEG file at
120    /// its quality, and that keeps its own file because its data does not decode.
121    PictureNotWrittenAgain {
122        /// The picture's format.
123        format: ImageFormat,
124    },
125    /// An edit changed a package that holds a digital signature, which no longer matches the
126    /// changed parts ([`edit::apply`]).
127    SignatureBroken,
128    /// A deleted block held the reference of a footnote or an endnote, whose note stays in its
129    /// part ([`edit::apply`]).
130    NoteKept,
131}
132
133impl Warning {
134    /// The warning's kind, a short name that stays the same across versions and holds no name
135    /// of the file, such as `font-substituted`, for a caller that counts warnings or writes them
136    /// where the names of the file may not go.
137    #[must_use]
138    pub fn kind(&self) -> &'static str {
139        match self {
140            Self::Docx(warning) => warning.kind(),
141            Self::Pdf(warning) => warning.kind(),
142            Self::PictureNotWrittenAgain { .. } => "picture-not-written-again",
143            Self::SignatureBroken => "signature-broken",
144            Self::NoteKept => "note-kept",
145        }
146    }
147}
148
149impl fmt::Display for Warning {
150    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
151        match self {
152            Self::Docx(warning) => warning.fmt(f),
153            Self::Pdf(warning) => warning.fmt(f),
154            Self::PictureNotWrittenAgain { format } => write!(
155                f,
156                "a picture in {format} format keeps its own file, which the target's PDF writer \
157                 writes again: its data does not decode"
158            ),
159            Self::SignatureBroken => f.write_str(
160                "the package holds a digital signature, which the edits break: sign the new file again",
161            ),
162            Self::NoteKept => f.write_str(
163                "a deleted block held the reference of a footnote or an endnote, and the note stays in its part: delete it with a raw edit if it must go",
164            ),
165        }
166    }
167}
168
169/// The warnings of a call, each distinct warning once with the number of times it came.
170pub type Warnings = f_office_warnings::Warnings<Warning>;
171
172/// The value of a call with its warnings.
173pub type Warned<T> = f_office_warnings::Warned<T, Warning>;
174
175/// The error chain of `error`: its own text, then the text of each cause that
176/// [`source`](std::error::Error::source) gives, joined by `: `. Each error of F-Office writes only
177/// its own text and gives its cause through `source`, so a place that shows an error to a person
178/// writes this, so that the cause stays visible.
179#[must_use]
180pub fn error_chain(error: &dyn std::error::Error) -> String {
181    let mut text = error.to_string();
182    let mut cause = error.source();
183    while let Some(next) = cause {
184        text.push_str(": ");
185        text.push_str(&next.to_string());
186        cause = next.source();
187    }
188    text
189}
190
191/// Choices for opening a document that the document itself does not make. Start from
192/// [`Options::default`] and set the fields that differ, so that a new field breaks no caller.
193/// The default lays out for the default target with its defaults.
194#[derive(Clone, Debug, PartialEq, Eq)]
195#[non_exhaustive]
196pub struct Options {
197    /// The local date and time that `DATE` and `TIME` fields show, as Word shows the time of
198    /// printing. Without it, they show the results stored in the file, so that the same file
199    /// always gives the same pages.
200    pub now: Option<DateTime>,
201    /// The configuration of the pages: the target and the setup of Word's machine, such as the
202    /// resolution of the printer that Word lays out for ([`Configuration::of`]).
203    pub configuration: Configuration,
204    /// The development override of the target profile's values, such as quirk variants,
205    /// after the configuration.
206    #[cfg(any(test, feature = "development"))]
207    pub overrides: f_office_docx::profile::Overrides,
208    /// The limits that protect the readers against a hostile file: those of the ZIP file and
209    /// those of each XML part. A limit of the ZIP file that the file breaks stops the document
210    /// ([`Error::Package`]), with an error that names the limit. An XML part that breaks a limit
211    /// does not read, and the part policy decides: the main document part and the package's
212    /// relationships stop the document ([`Error::Docx`]), and another part is skipped with a
213    /// warning.
214    pub limits: Limits,
215}
216
217impl Default for Options {
218    fn default() -> Self {
219        Self {
220            now: None,
221            configuration: Configuration::of(Target::default()),
222            #[cfg(any(test, feature = "development"))]
223            overrides: f_office_docx::profile::Overrides::default(),
224            limits: Limits::default(),
225        }
226    }
227}
228
229impl Options {
230    /// Options for the base target, used by internal layout unit tests written against the base
231    /// profile.
232    #[cfg(test)]
233    pub(crate) fn base() -> Self {
234        Self {
235            configuration: Configuration::of(Target::base()),
236            ..Self::default()
237        }
238    }
239
240    /// The options of the layout: the same choices without the limits, which the package
241    /// carries to every reader of its parts.
242    fn layout(&self) -> f_office_docx::Options {
243        let mut layout = f_office_docx::Options::default();
244        layout.now = self.now;
245        layout.configuration = self.configuration.clone();
246        #[cfg(any(test, feature = "development"))]
247        {
248            layout.overrides = self.overrides.clone();
249        }
250        layout
251    }
252}
253
254/// A DOCX file opened and laid out once for a target: its display list, which an output draws or
255/// writes, the places of its lines, and the text blocks of its body. It holds no state of the
256/// parse or the layout: what the layout left out or drew in another way comes out of
257/// [`Document::open`] beside it.
258#[derive(Clone, Debug)]
259pub struct Document {
260    list: DisplayList,
261    #[cfg(any(test, feature = "development"))]
262    lines: Vec<PlacedLine>,
263    #[cfg(any(test, feature = "development"))]
264    tables: Vec<f_office_docx::TableColumns>,
265    text_blocks: Vec<TextBlock>,
266    text_map: TextMap,
267}
268
269impl Document {
270    /// Opens a DOCX file and lays it out into pages for the target of `options`, with the
271    /// warnings of what it left out or drew in another way. The layout runs once, here.
272    ///
273    /// # Errors
274    ///
275    /// Returns an error when the file is not a readable DOCX package or its content cannot be
276    /// laid out, or when the configuration or the target's profile does not read.
277    pub fn open(docx: &[u8], fonts: &FontDb, options: &Options) -> Result<Warned<Self>, Error> {
278        Self::open_with_art(docx, fonts, &ArtPictures::new(), options)
279    }
280
281    /// Opens a DOCX file as [`Document::open`] does, with the pictures of the art page borders
282    /// `art`, which the caller adds beside the fonts ([`ArtPictures::add`]). A page border's side
283    /// of an art style whose picture `art` lacks is not drawn, with a warning.
284    ///
285    /// # Errors
286    ///
287    /// As [`Document::open`].
288    pub fn open_with_art(
289        docx: &[u8],
290        fonts: &FontDb,
291        art: &ArtPictures,
292        options: &Options,
293    ) -> Result<Warned<Self>, Error> {
294        Self::open_with((docx, fonts, art), &options.limits, &options.layout())
295    }
296
297    /// Opens a DOCX file from disk and lays it out into pages for the target of `options`,
298    /// reading only the ZIP central directory and the parts needed for layout without loading
299    /// the entire file into memory.
300    ///
301    /// # Errors
302    ///
303    /// Returns an error when the file cannot be opened as a DOCX package, its content cannot be
304    /// laid out, or the configuration or target profile does not read.
305    #[cfg(not(target_arch = "wasm32"))]
306    pub fn open_file(
307        path: &std::path::Path,
308        fonts: &FontDb,
309        options: &Options,
310    ) -> Result<Warned<Self>, Error> {
311        Self::open_file_with_art(path, fonts, &ArtPictures::new(), options)
312    }
313
314    /// Opens a DOCX file from disk as [`Document::open_file`] does, with art page-border
315    /// pictures `art`.
316    ///
317    /// # Errors
318    ///
319    /// As [`Document::open_file`].
320    #[cfg(not(target_arch = "wasm32"))]
321    pub fn open_file_with_art(
322        path: &std::path::Path,
323        fonts: &FontDb,
324        art: &ArtPictures,
325        options: &Options,
326    ) -> Result<Warned<Self>, Error> {
327        let package =
328            f_office_docx::timing::span("open", || Package::open_file(path, &options.limits))
329                .map_err(Error::Package)?;
330        Self::open_package((&package, fonts, art), &options.layout())
331    }
332
333    /// Opens a DOCX package from a caller-provided random-access byte source (such as a browser
334    /// `File.slice()` or OPFS sync handle) without copying the whole archive into memory.
335    ///
336    /// # Errors
337    ///
338    /// As [`Document::open`].
339    pub fn open_source(
340        source: std::sync::Arc<dyn RandomAccessRead>,
341        fonts: &FontDb,
342        options: &Options,
343    ) -> Result<Warned<Self>, Error> {
344        Self::open_source_with_art(source, fonts, &ArtPictures::new(), options)
345    }
346
347    /// Opens a DOCX package from a random-access byte source as [`Document::open_source`] does,
348    /// with art page-border pictures `art`.
349    ///
350    /// # Errors
351    ///
352    /// As [`Document::open`].
353    pub fn open_source_with_art(
354        source: std::sync::Arc<dyn RandomAccessRead>,
355        fonts: &FontDb,
356        art: &ArtPictures,
357        options: &Options,
358    ) -> Result<Warned<Self>, Error> {
359        let package =
360            f_office_docx::timing::span("open", || Package::open_source(source, &options.limits))
361                .map_err(Error::Package)?;
362        Self::open_package((&package, fonts, art), &options.layout())
363    }
364
365    /// Opens a DOCX file within `limits` with its fonts and art pictures, and lays it out with
366    /// the layout's own options, as [`Document::open_with_art`] does.
367    fn open_with(
368        (docx, fonts, art): (&[u8], &FontDb, &ArtPictures),
369        limits: &Limits,
370        layout: &f_office_docx::Options,
371    ) -> Result<Warned<Self>, Error> {
372        let package = f_office_docx::timing::span("open", || Package::open(docx, limits))
373            .map_err(Error::Package)?;
374        Self::open_package((&package, fonts, art), layout)
375    }
376
377    /// Lays out an already-indexed OPC `package` with `fonts`, `art`, and `layout`.
378    fn open_package(
379        (package, fonts, art): (&Package, &FontDb, &ArtPictures),
380        layout: &f_office_docx::Options,
381    ) -> Result<Warned<Self>, Error> {
382        let laid_out = f_office_docx::timing::span("docx", || {
383            f_office_docx::layout_lines(package, (fonts, art), layout)
384        })
385        .map_err(|error| match error {
386            f_office_docx::Error::Configuration(error) => Error::Configuration(error),
387            error => Error::Docx(error),
388        })?;
389        let mut warnings = laid_out.warnings.map(Warning::Docx);
390        #[cfg(not(any(test, feature = "development")))]
391        let f_office_docx::LaidOut {
392            mut list,
393            lines: _,
394            text_blocks,
395            text_map,
396            tables: _,
397            writer,
398        } = laid_out.value;
399        #[cfg(any(test, feature = "development"))]
400        let f_office_docx::LaidOut {
401            mut list,
402            lines,
403            text_blocks,
404            text_map,
405            tables,
406            writer,
407        } = laid_out.value;
408        // The target's PDF writer decides how the page size is written, and which picture files
409        // it writes again.
410        writer.finish(&mut list);
411        list = pictures::write_pictures_again(
412            list,
413            pictures::Rewriting {
414                quality: writer.jpeg_quality(),
415                jpeg_share: writer.jpeg_share(),
416                jpeg_sample: writer.jpeg_sample(),
417                crop: writer.picture_crop(),
418                alpha_mix: writer.alpha_mix(),
419                resampling: &|pixels, palette, image| {
420                    writer.resampled_size(pixels, (image.width, image.height), palette)
421                },
422            },
423            &mut warnings,
424        );
425        // It then writes each picture's matrix with its own digits, at the place where the
426        // picture is drawn after a crop.
427        writer.place_pictures(&mut list);
428        Ok(Warned::new(
429            Self {
430                list,
431                #[cfg(any(test, feature = "development"))]
432                lines,
433                #[cfg(any(test, feature = "development"))]
434                tables,
435                text_blocks,
436                text_map,
437            },
438            warnings,
439        ))
440    }
441
442    /// The display list of the pages, the only border between the layout and an output.
443    #[must_use]
444    pub fn display_list(&self) -> &DisplayList {
445        &self.list
446    }
447
448    /// The pages in order: the pages of the display list ([`Document::display_list`]).
449    #[must_use]
450    pub fn pages(&self) -> &[Page] {
451        self.list.pages()
452    }
453
454    /// The number of pages.
455    #[must_use]
456    pub fn page_count(&self) -> usize {
457        self.pages().len()
458    }
459
460    /// The page at `index`, counted from 0, or none past the last page.
461    #[must_use]
462    pub fn page(&self, index: usize) -> Option<&Page> {
463        self.pages().get(index)
464    }
465
466    /// The width and the height of the page at `index`, counted from 0, without drawing it, or
467    /// none past the last page.
468    #[must_use]
469    pub fn page_size(&self, index: usize) -> Option<(Length, Length)> {
470        self.page(index).map(|page| (page.width(), page.height()))
471    }
472
473    /// The paragraphs and tables of the body in the order of the document, each with its
474    /// address, which counts from 1, its kind with its style and text, and the indices of the
475    /// pages that its lines lie on, which count from 0 as [`Document::page`] does. The pages are
476    /// those of this document's layout, so of the configuration that it was opened with
477    /// ([`Options::configuration`]): the same file can give other pages for another target.
478    /// The paragraphs of a table's cells follow the table. Headers, footers, notes and text
479    /// boxes are not text blocks.
480    #[must_use]
481    pub fn text_blocks(&self) -> &[TextBlock] {
482        &self.text_blocks
483    }
484
485    /// The text map of the page at `index`, counted from 0 (**Text map**): its lines in reading
486    /// order, the header first, then the body, the endnotes, the frames, the text boxes, the
487    /// footnotes and the footer.
488    /// Each line names its story and its paragraph in [`Document::story_text`], with its range
489    /// of the paragraph's text, its line box and its clusters in visual order with their edges
490    /// on the page. It is empty past the last page.
491    #[must_use]
492    pub fn text_map(&self, index: usize) -> Vec<TextLine> {
493        self.text_map.page(index)
494    }
495
496    /// The text maps of the pages at `indices`, each as [`Document::text_map`] gives it, from
497    /// one read of each story on them: a viewer that needs many pages, such as for a search,
498    /// reads the body once and not once for each page.
499    #[must_use]
500    pub fn text_maps(&self, indices: &[usize]) -> Vec<Vec<TextLine>> {
501        self.text_map.pages(indices)
502    }
503
504    /// The text of `story` by paragraph (**Story text**): the texts of the paragraph's laid out
505    /// lines joined, so that a field gives its shown result, a list label is given as drawn,
506    /// hidden text is left out, and an automatic hyphen at a wrap is not in it.
507    #[must_use]
508    pub fn story_text(&self, story: TextStory) -> Vec<StoryParagraph> {
509        self.text_map.story(story)
510    }
511
512    /// Writes the pages as a PDF file, with the fonts subset and embedded, and with the warnings
513    /// of the PDF writer.
514    ///
515    /// Each page becomes one PDF page of the same size, with every glyph at its laid out position
516    /// and with its text, so that a viewer can search and copy it. The same document and fonts
517    /// always give the same bytes.
518    ///
519    /// # Errors
520    ///
521    /// Returns an error when the pages cannot be written as PDF.
522    pub fn write_pdf(&self, fonts: &FontDb) -> Result<Warned<Vec<u8>>, Error> {
523        let pdf = f_office_docx::timing::span("pdf", || f_office_pdf::write_pdf(&self.list, fonts))
524            .map_err(Error::Pdf)?;
525        Ok(Warned::new(pdf.value, pdf.warnings.map(Warning::Pdf)))
526    }
527
528    /// Streams the pages directly as a PDF 1.7 document into `writer` without buffering the
529    /// complete PDF bytes in memory.
530    ///
531    /// # Errors
532    ///
533    /// Returns an error when the pages cannot be written as PDF or when writing to `writer` fails.
534    pub fn write_pdf_to<W: std::io::Write>(
535        &self,
536        fonts: &FontDb,
537        writer: &mut W,
538    ) -> Result<Warned<()>, Error> {
539        let pdf = f_office_docx::timing::span("pdf", || {
540            f_office_pdf::write_pdf_to(&self.list, fonts, writer)
541        })
542        .map_err(Error::Pdf)?;
543        Ok(Warned::new((), pdf.warnings.map(Warning::Pdf)))
544    }
545}
546
547#[cfg(test)]
548mod tests {
549    use super::{Document, Error, FontDb, Options, error_chain};
550
551    #[test]
552    fn says_the_warnings_of_the_output_with_their_kinds() {
553        use super::{ImageFault, ImageFormat, Warning, pdf};
554        let skipped = Warning::Pdf(pdf::Warning::ImageSkipped {
555            format: ImageFormat::Wmf,
556            fault: ImageFault::Format,
557        });
558        assert_eq!(skipped.kind(), "pdf-image-skipped");
559        assert_eq!(
560            skipped.to_string(),
561            "an image in WMF format is left out of the PDF: the output draws no image of this \
562             format"
563        );
564        let kept = Warning::PictureNotWrittenAgain {
565            format: ImageFormat::Jpeg,
566        };
567        assert_eq!(kept.kind(), "picture-not-written-again");
568        assert_eq!(
569            kept.to_string(),
570            "a picture in JPEG format keeps its own file, which the target's PDF writer writes \
571             again: its data does not decode"
572        );
573    }
574
575    #[test]
576    fn rejects_a_file_that_is_not_a_package_for_every_target() {
577        let error = Document::open(b"not a zip", &FontDb::new(), &Options::default()).unwrap_err();
578        assert!(matches!(error, Error::Package(_)));
579        assert_ne!(error.to_string(), "");
580        // The same error, with the same text and cause, for every target.
581        for target in super::Target::all() {
582            let options = Options {
583                configuration: super::Configuration::of(target),
584                ..Options::default()
585            };
586            let with = Document::open(b"not a zip", &FontDb::new(), &options).unwrap_err();
587            assert!(matches!(with, Error::Package(_)));
588            assert_eq!(error_chain(&with), error_chain(&error));
589        }
590    }
591
592    #[test]
593    fn gives_the_pdf_error_as_its_cause() {
594        let error = Error::Pdf(f_office_pdf::Error::NoPages);
595        assert_eq!(error.to_string(), "the pages could not be written as PDF");
596        let cause = std::error::Error::source(&error).map(ToString::to_string);
597        assert_eq!(cause.as_deref(), Some("the display list has no page"));
598    }
599
600    #[test]
601    fn writes_the_error_chain_down_to_the_first_cause() {
602        let error = Document::open(b"not a zip", &FontDb::new(), &Options::default()).unwrap_err();
603        let chain = error_chain(&error);
604        assert!(
605            chain.starts_with("the package could not be read: unreadable ZIP package: "),
606            "{chain}"
607        );
608        let docx = Error::Docx(f_office_docx::Error::Package(
609            f_office_opc::Error::NoMainDocument,
610        ));
611        assert_eq!(
612            error_chain(&docx),
613            "the DOCX content could not be laid out: the package could not be read: package has \
614             no main document"
615        );
616        let leaf = f_office_pdf::Error::NoPages;
617        assert_eq!(error_chain(&leaf), "the display list has no page");
618    }
619}
620
621#[cfg(test)]
622mod comment_tests;
623#[cfg(test)]
624mod layout_tests;
625#[cfg(test)]
626mod pdf_tests;
627#[cfg(test)]
628mod picture_tests;
629#[cfg(test)]
630mod test_fonts;
631#[cfg(test)]
632mod text_block_tests;