@pptx-editor.dev/editor-api 0.2.0 → 0.3.0-canary.20261109032918.sha-39dc46e
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.
- package/dist/browser.js +1 -1
- package/dist/chunk-CSSS47FS.js +6 -0
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-K2KXZPMF.js +0 -6
package/dist/browser.js
CHANGED
|
@@ -3,4 +3,4 @@ Copyright (c) 2026 Eigenpal, Inc. All rights reserved.
|
|
|
3
3
|
Licensed under the EigenPal Pro Evaluation License 1.0. See LICENSE.md in this package.
|
|
4
4
|
Production use requires a commercial agreement: licensing@eigenpal.com
|
|
5
5
|
*/
|
|
6
|
-
import{$ as it,A as l,Aa as lt,B as z,Ba as zt,C as H,Ca as Ht,D as U,Da as Ut,E as g,Ea as gt,F as k,Fa as kt,G as q,Ga as qt,H as D,Ha as t,I as F,Ia as e,J as G,K as J,L as K,M as L,N as M,O as Q,P as T,Q as V,R as W,S as X,T as Y,U as Z,V as _,W as $,X as tt,Y as et,Z as rt,_ as ot,a as p,aa as pt,b as n,ba as nt,c as m,ca as mt,d as s,da as st,e as a,ea as at,f as c,fa as ct,g as x,ga as xt,h as d,ha as dt,i as P,ia as Pt,j as E,ja as Et,k as u,ka as ut,l as f,la as ft,m as v,ma as vt,n as y,na as yt,o as R,oa as Rt,p as w,pa as wt,q as B,qa as Bt,r as S,ra as St,s as I,sa as It,t as O,ta as Ot,u as b,ua as bt,v as A,va as At,w as C,wa as Ct,x as N,xa as Nt,y as h,ya as ht,z as j,za as jt}from"./chunk-
|
|
6
|
+
import{$ as it,A as l,Aa as lt,B as z,Ba as zt,C as H,Ca as Ht,D as U,Da as Ut,E as g,Ea as gt,F as k,Fa as kt,G as q,Ga as qt,H as D,Ha as t,I as F,Ia as e,J as G,K as J,L as K,M as L,N as M,O as Q,P as T,Q as V,R as W,S as X,T as Y,U as Z,V as _,W as $,X as tt,Y as et,Z as rt,_ as ot,a as p,aa as pt,b as n,ba as nt,c as m,ca as mt,d as s,da as st,e as a,ea as at,f as c,fa as ct,g as x,ga as xt,h as d,ha as dt,i as P,ia as Pt,j as E,ja as Et,k as u,ka as ut,l as f,la as ft,m as v,ma as vt,n as y,na as yt,o as R,oa as Rt,p as w,pa as wt,q as B,qa as Bt,r as S,ra as St,s as I,sa as It,t as O,ta as Ot,u as b,ua as bt,v as A,va as At,w as C,wa as Ct,x as N,xa as Nt,y as h,ya as ht,z as j,za as jt}from"./chunk-CSSS47FS.js";import{createBrowserAutomationHost as i}from"@pptx-editor.dev/core/editor";function r(o){return t({host:i(o),save:!1})}var Lt=Object.freeze({createBrowser:r,createServer:e});export{U as Adjustments,s as Application,ht as Binding,jt as BindingCollection,x as BindingType,Pt as Border,Et as Borders,K as BulletFormat,b as BulletStyle,O as BulletType,m as ClientObject,a as ClientResult,d as ConnectorType,lt as CustomProperty,zt as CustomPropertyCollection,tt as CustomXmlPart,et as CustomXmlPartCollection,rt as CustomXmlPartScopedCollection,Ut as DocumentProperties,H as DocumentPropertyType,q as GeometricShapeType,L as Hyperlink,M as HyperlinkCollection,Q as HyperlinkScopedCollection,P as HyperlinkType,l as InsertSlideFormatting,ut as Margins,gt as PageSetup,J as ParagraphFormat,w as ParagraphHorizontalAlignment,Nt as PlaceholderFormat,S as PlaceholderType,Lt as PptxEditor,p as PptxEditorError,Ht as Presentation,qt as RequestContext,Ot as Shape,y as ShapeAutoSize,bt as ShapeCollection,g as ShapeFill,u as ShapeFillType,G as ShapeFont,B as ShapeFontUnderlineStyle,z as ShapeGetImageFormatType,Ct as ShapeGroup,f as ShapeLineDashStyle,k as ShapeLineFormat,v as ShapeLineStyle,At as ShapeScopedCollection,c as ShapeType,E as ShapeZOrder,nt as Slide,Z as SlideBackground,Y as SlideBackgroundFill,A as SlideBackgroundFillType,V as SlideBackgroundGradientFill,C as SlideBackgroundGradientFillType,W as SlideBackgroundPatternFill,N as SlideBackgroundPatternFillType,X as SlideBackgroundPictureOrTextureFill,T as SlideBackgroundSolidFill,mt as SlideCollection,at as SlideLayout,_ as SlideLayoutBackground,ct as SlideLayoutCollection,I as SlideLayoutType,xt as SlideMaster,$ as SlideMasterBackground,dt as SlideMasterCollection,st as SlideScopedCollection,yt as Table,vt as TableCell,It as TableCellCollection,wt as TableColumn,St as TableColumnCollection,Rt as TableRow,Bt as TableRowCollection,j as TableStyle,ft as TableStyleSettings,ot as Tag,it as TagCollection,D as TextFrame,F as TextRange,R as TextVerticalAlignment,h as ThemeColor,pt as ThemeColorScheme,kt as TrackedObjects,n as isPptxEditorError};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
Copyright (c) 2026 Eigenpal, Inc. All rights reserved.
|
|
3
|
+
Licensed under the EigenPal Pro Evaluation License 1.0. See LICENSE.md in this package.
|
|
4
|
+
Production use requires a commercial agreement: licensing@eigenpal.com
|
|
5
|
+
*/
|
|
6
|
+
var ur="Use a whole number of 0 or more that is less than the number of items.",E="Use true or false.",W="Use text of at most 4096 characters, with no control characters.",pr="Use a number of points from 0 to 4032.",gt="Use a margin of 0 to 4032 points.",mr=[["color","Use '#RRGGBB' (for example '#1F4E79') or a named color such as 'red'."],["foregroundColor","Use '#RRGGBB' (for example '#1F4E79') or a named color such as 'red'."],["backgroundColor","Use '#RRGGBB' (for example '#1F4E79') or a named color such as 'red'."],["transparency","Use a fraction from 0 (opaque) to 1 (clear)."],["fill","Use a fill object: a solid color, a gradient, a pattern, a picture, or no fill."],["gradientType","Use a value of SlideBackgroundGradientFillType."],["pattern","Use a value of SlideBackgroundPatternFillType."],["imageBase64","Use the Base64 bytes of a PNG, JPEG, GIF, or BMP picture."],["base64","Use the Base64 bytes of a PNG, JPEG, GIF, or BMP picture."],["image-size","Use a width and a height greater than 0, at most 8192 pixels."],["background","Use a fill write that this slide can take; a layout or master cannot inherit."],["areBackgroundGraphicsHidden",E],["line","Use a line object with color, weight, dashStyle, style, transparency, or visible."],["weight","Use a line weight from 0 to 1584 points."],["dashStyle","Use a value of ShapeLineDashStyle."],["style","Use a value of ShapeLineStyle, or a table style the presentation defines."],["visible",E],["side","Use a border side: left, right, top, bottom, diagonalDown, or diagonalUp."],["shape","Use a shape kind that this collection can add, with its options."],["shapes","Use an array of shapes of one slide or one group, at most 10 000."],["geometry","Use a value of GeometricShapeType."],["connector","Use a value of ConnectorType."],["left","Use a number of points from -169 093 to 169 093."],["top","Use a number of points from -169 093 to 169 093."],["width","Use a number of points from 0 to 169 093."],["height","Use a number of points from 0 to 169 093."],["rotation","Use a rotation in degrees, a finite number."],["position","Use a value of ShapeZOrder."],["props","Use an object of the properties to write."],["isDecorative",E],["title",W],["descr",W],["altTextTitle",W],["altTextDescription",W],["name","Use a name of 1 to 255 characters, with no control characters."],["value","Use a value of the type this property takes, in its range."],["index",ur],["group","Use a shape that is a group."],["group-count","Use two or more different shapes."],["group-parent","Use shapes of one slide, or of one group."],["text","Use text of at most 1 000 000 characters, with no control characters."],["span","Use a start and a length inside the text, around some text."],["start","Use a start of 0 or more, at most the length of the text."],["length","Use a length of 0 or more that ends inside the text."],["font","Use an object of font properties."],["size","Use a font size from 1 to 4000 points."],["underline","Use a value of ShapeFontUnderlineStyle."],["bold",E],["italic",E],["allCaps",E],["smallCaps",E],["strikethrough",E],["doubleStrikethrough",E],["subscript",E],["superscript",E],["paragraph","Use an object of paragraph format properties."],["alignment","Use a value of ParagraphHorizontalAlignment."],["indentLevel","Use a whole number from 1 to 9."],["bulletStyle","Use a value of ShapeBulletStyle."],["verticalAlignment","Use a value of TextVerticalAlignment."],["wordWrap",E],["autoSize","Use a value of ShapeAutoSize."],["leftMargin",gt],["rightMargin",gt],["topMargin",gt],["bottomMargin",gt],["address","Use an 'http', 'https', 'mailto', 'tel', or 'ftp' address of at most 2048 characters."],["screenTip","Use a screen tip of at most 1024 characters, with no control characters."],["values","Use an array of rows of strings, at most one per row and one per column."],["cell","Use a row and a column inside the table."],["row","Use a row index of 0 or more, less than the number of rows."],["column","Use a column index of 0 or more, less than the number of columns."],["rows","Use a whole number of rows from 1 to 75."],["columns","Use a whole number of columns from 1 to 75."],["rowCount","Use a whole number of rows of 1 or more that ends inside the table."],["columnCount","Use a whole number of columns of 1 or more that ends inside the table."],["count","Use a whole number of 1 or more that fits the table."],["lineSize",pr],["anchor","Use a value of TableCellVerticalAlignment."],["anchorCenter",E],["margins","Use an object of margins, each from 0 to 4032 points, or null."],["options","Use true or false for text and for format."],["styleName","Use the name of a table style as a string, or null."],["firstRow",E],["lastRow",E],["firstColumn",E],["lastColumn",E],["bandedRows",E],["bandedColumns",E],["properties","Use an object of document properties."],["revisionNumber","Use a whole number from 0 to 2147483647."],["subject",W],["author",W],["keywords",W],["comments",W],["category",W],["lastAuthor",W],["company",W],["manager",W],["slideWidth","Use a slide width from 72 to 4032 points (1 to 56 inches)."],["slideHeight","Use a slide height from 72 to 4032 points (1 to 56 inches)."],["key","Use a key of 1 to 255 characters, with no control characters, on a presentation with fewer than 2 147 483 647 properties."],["type","Use a value of DocumentPropertyType."],["id","Use an id of 1 to 255 characters."],["binding-limit","Delete bindings first: a runtime keeps at most 10 000."],["binding-selection","Select exactly one shape first."],["custom-xml","Use well-formed XML text with no DTD and one root element."],["custom-xml-id","Use an id that no other custom XML part has."],["xml","Delete custom XML parts first: the presentation has no free part name left."],["namespaceUri","Use a namespace URI as a string."],["slides","Use a non-empty array of slides of this presentation."],["layoutId","Use the id of a slide layout of this presentation as a string."],["slideMasterId","Use the id of a slide master of this presentation as a string."],["formatting","Use a value of InsertSlideFormatting."],["import-base64","Use the Base64 bytes of a PPTX file."],["sourceSlideIds","Use an array of different slide ids of the source file."],["operations","Make fewer calls in one sync."]],gr=Object.freeze(Object.assign(Object.create(null),Object.fromEntries(mr)));function Rn(r){return r===void 0?void 0:gr[r]}var Sn=[["disabled.cropFillMode","edit.picture-not-stretched","The picture is tiled or inset in its frame, so it cannot be cropped. Use a stretched picture."],["disabled.cropLocked","edit.picture-locked","The picture is locked against this change in the file. Remove the lock in the file first."],["disabled.rotationLocked","edit.picture-locked","The picture is locked against rotation in the file. Remove the lock in the file first."],["disabled.sizeLocked","edit.picture-locked","The picture is locked against resizing in the file. Remove the lock in the file first."],["disabled.shapeLocked","edit.picture-locked","The picture is locked against a change of shape in the file. Remove the lock in the file first."],["disabled.decorative","edit.decorative","The shape is decorative, so it has no alternative text. Set isDecorative to false first."],["disabled.distributeNeedsThree","edit.needs-three-shapes","Distributing needs three or more shapes. Pass more shapes."],["disabled.groupNeedsTwo","edit.group-count","A group needs two or more different shapes. Remove repeated shapes or add more."],["disabled.groupScope","edit.group-parent","The shapes are not in the same parent. Use shapes of one slide, or of one group."],["disabled.imageSizeUnknown","edit.picture-size-unknown","The size of the picture cannot be read from its bytes. Use a PNG, JPEG, or GIF picture."],["disabled.mergeOneCell","edit.merge-one-cell","A merge needs two or more cells. Pass a row count or a column count above 1."],["disabled.mixedSize","edit.mixed-size","The text has more than one size, so it cannot be stepped as one. Set font.size instead."],["disabled.noArrangeChange","edit.no-change","The shapes are already in that position. Read zOrderPosition before you move a shape."],["disabled.noEffectChange","edit.no-change","The shapes do not have that effect, so nothing changes."],["disabled.noLockChange","edit.no-change","The setting already has that value, so nothing changes."],["disabled.noNameChange","edit.no-change","The shape already has that name, so nothing changes."],["disabled.noAdjustChange","edit.no-change","The shape already has those adjust values, so nothing changes."],["disabled.noAnimationChange","edit.no-change","The effect or the transition already has those settings, so nothing changes."],["disabled.animationsReadOnly","edit.animations-read-only","The slide keeps its effects in markup that the editor does not change. Edit them in the file."],["disabled.noAnimation","edit.no-animation","The slide has no main sequence effect with that id. Read the effect ids of the slide first."],["disabled.instantAnimation","edit.instant-animation","The effect is instant, so it has no duration. Change its delay instead."],["disabled.noAdjustHandles","edit.unsupported-element","Only a preset shape with adjust handles has adjust values. Select such a shape."],["disabled.noSizeChange","edit.no-change","The slides already have that size, so nothing changes."],["disabled.noVisibilityChange","edit.no-change","The shapes already have that visibility, so nothing changes."],["disabled.noEditor","host.no-document","The editor has no presentation open yet. Wait until it has loaded one."],["disabled.noList","edit.no-list","The paragraphs have no bullets or numbers. Set bulletFormat.visible to true first."],["disabled.noMatch","edit.no-match","The text was not found. Read the text again."],["disabled.noNotes","edit.no-notes","The slide has no speaker notes. Add notes first."],["disabled.noPicture","edit.not-a-picture","The shape is not a picture. Use a picture shape."],["disabled.onePicture","edit.not-a-picture","This change takes exactly one picture. Pass one picture shape."],["disabled.pictureEffects","edit.picture-effects","The picture has effects this API cannot change. Change another property, or remove the effects in the file."],["disabled.noSections","edit.no-sections","The presentation has no sections. Add a section first."],["disabled.sectionEdge","edit.section-edge","The section is already at that edge of the presentation, so it cannot move further."],["disabled.noSelection","edit.no-target","The call has no shape to act on. Pass a shape, or select one in the editor first."],["disabled.selectOne","edit.no-target","This change takes exactly one shape. Pass one shape."],["disabled.selectText","edit.no-target","The call needs a text range. Pass a text range with text in it."],["disabled.selectWord","edit.no-target","The call needs text. Pass a text range that is not empty."],["disabled.selectNotesText","edit.no-target","The call needs the text of the notes. Address the text of the notes placeholder."],["disabled.noShapeEffects","edit.no-effects","The shape cannot take effects. Use a shape, a line, or a picture."],["disabled.noShapeFill","edit.no-fill","The shape cannot have a fill, for example a line or a connector. Use a shape with an area."],["disabled.noShapeStyle","edit.no-style","The shape cannot take a shape style. Use a geometric shape."],["disabled.noSlideNumberPlaceholder","edit.no-slide-number-placeholder","The layouts have no slide number placeholder. Add one to the layout first."],["disabled.noFooterPlaceholder","edit.no-footer-placeholder","The layouts and the master have no footer placeholder. Add one to the layout first."],["disabled.noDatePlaceholder","edit.no-date-placeholder","The layouts and the master have no date placeholder. Add one to the layout first."],["disabled.noFooterText","edit.no-footer-text","No slide shows a footer, so there is no text to keep. Pass text."],["disabled.noTable","edit.not-a-table","The shape is not a table. Use a table shape."],["disabled.notAGroup","edit.not-a-group","The shape is not a group. Check shape.type first, and use a group shape."],["disabled.notALine","edit.not-a-line","The shape is not a line or a connector. Use a line."],["disabled.noText","edit.no-text-frame","The shape has no text frame. Check shape.type first, and read text only of a shape that holds text."],["disabled.slideNotCopyable","import.slide-not-copyable","A slide to import has threaded comments or an embedded control. Leave it out with sourceSlideIds."],["disabled.slideMaster","host.slide-master","The editor shows the slide master view, which takes no slide edits. Close the slide master first."],["disabled.noSlideMaster","host.no-slide-master","The presentation has no slide master, so the slide master view cannot open. Stay in the normal view."],["disabled.slideSorter","host.slide-sorter","The editor shows the slide sorter, which takes no shape edits. Switch the editor to the normal view."],["disabled.splitOneCell","edit.split-one-cell","A split takes one cell. Use getCellOrNullObject for one cell, then split it."],["disabled.splitUneven","edit.split-uneven","A merged cell splits only into parts that divide it evenly. Use a row and column count that divides its span."],["disabled.tableText","edit.table-text","A table cell does not take this text body setting. Set it on a text box or a shape."],["disabled.tableTooLarge","edit.table-too-large","A table has at most 75 columns and 1,000 rows. Use fewer rows or columns."],["disabled.unsupportedElement","edit.unsupported-element","The object is of a kind this API cannot edit, for example a chart or an embedded object. Read it, or edit another object."],["disabled.noCommentAuthor","edit.no-comment-author","A comment needs an author. Pass author, or set the author option of the editor."],["disabled.commentNoStatus","edit.comment-no-status","Legacy comments have no resolved state. Reply to the thread instead."],["disabled.commentNotEditable","edit.comment-not-editable","The comment holds content other than text, such as a mention. Reply instead of editing it."],["disabled.noCommentTarget","edit.no-comment-target","A comment can point only at an element on the top level of the current slide. Pass its id, or none."],["errors.commentText","edit.comment-text","Comment text has 1 to 10000 characters. Pass shorter text that is not empty."],["errors.commentAuthor","edit.comment-author","An author name has up to 255 characters. Pass a shorter name."],["errors.commentDate","edit.comment-date","A comment date is an ISO 8601 date and time, such as 2026-11-07T10:00:00Z. Pass one, or none."],["errors.noComment","edit.comment-not-found","The slide has no comment with this id. Read the comments of the slide again."],["errors.commentChanged","edit.comment-changed","The comment at this id no longer matches expect. Read the comments of the slide again."],["errors.commentAmbiguous","edit.comment-ambiguous","Another comment of the slide has the same author, date, and text. Pass the comment identity in expect to name one of them."],["errors.altTextLength","edit.alt-text-length","Alternative text can have up to 4000 characters. Shorten it."],["errors.clipboard","edit.clipboard","The content is not shapes this API can insert. Insert shapes from a presentation instead."],["errors.coordinateRange","edit.coordinate-range","The position or size is outside the range a slide can hold. Use values within the slide size limits."],["errors.slideSizeRange","edit.coordinate-range","A slide side is from 1 to 56 inches (914400 to 51206400 EMU). Pass a size in that range."],["errors.chartData.noChart","edit.chart-data","Select one chart frame, or pass the node id of a chart on the current slide."],["errors.chartData.noData","edit.chart-data","The chart has no data series to edit. Edit a chart that plots at least one series."],["errors.chartData.combination","edit.chart-data-unsupported","The chart combines chart types, and its data is read-only. Edit a chart with one chart type."],["errors.chartData.unsupportedType","edit.chart-data-unsupported","Only bar, column, line, area, pie, doughnut, radar, and scatter chart data is editable."],["errors.chartData.filtered","edit.chart-data-unsupported","The chart hides some of its series, and its data is read-only."],["errors.chartData.multiLevel","edit.chart-data-unsupported","The chart has multi-level categories, and its data is read-only."],["errors.chartData.mixedCategories","edit.chart-data-unsupported","The series of the chart use different categories, and its data is read-only."],["errors.chartData.tooLarge","edit.chart-data-range","A chart edits up to 255 series and 4000 categories. Pass less data."],["errors.chartData.empty","edit.chart-data-range","A chart needs at least one series and one category. Keep one of each."],["errors.chartData.invalidText","edit.chart-data-text","A name or label holds characters that XML cannot keep, or is longer than 255 characters. Remove them."],["errors.chartData.notNumber","edit.chart-data-value","Each value must be a finite number or null. Pass numbers, and finite X values for a scatter chart."],["errors.chartData.workbook","edit.chart-data-layout","The embedded workbook cannot take the new table. Give each series a different name, and keep the cells beside the data empty."],["errors.chartFormat.noAxes","edit.chart-format-axes","A pie or doughnut chart has no axes. Leave out gridlines, axes, and axis titles, or change the chart type first."],["errors.chartFormat.sameType","edit.chart-type-same","The chart already has this type. Read chartFormat().type and send setChartType only for another type."],["errors.chartData.layout","edit.chart-data-layout","The cell references of the chart do not form one table. Change only names and values."],["errors.diagram.noDiagram","edit.diagram","Select one diagram frame, or pass the node id of a diagram on the current slide."],["errors.diagram.noNode","edit.diagram","Put the caret in a diagram shape, or pass the model id of a content node as `node`."],["errors.diagram.noText","edit.diagram-text","No single diagram shape with a paragraph shows this node. Edit the text of each node instead."],["errors.diagram.textTooLong","edit.diagram-range","Pass up to 10,000 characters and 1,000 paragraphs as `text` of `setDiagramText`."],["errors.diagram.lastShape","edit.diagram-range","A diagram keeps at least one top-level node. Add a node before you delete this one."],["errors.diagram.layoutUnsupported","edit.diagram-unsupported","Only a diagram whose saved drawing is a line of blocks lays out again. Edit the text of its nodes instead."],["errors.diagram.noChildren","edit.diagram-unsupported","The diagram draws no level below this node. Add a node at the same level instead."],["errors.diagram.tooLarge","edit.diagram-range","A diagram data model holds up to 4096 points. Delete nodes before you add more."],["errors.exportFailed","image.failed","The picture could not be made. Read the shape, then try again."],["errors.exportSize","image.invalid-size","A picture is from 16 to 8192 pixels on a side. Pass a size in that range."],["errors.findStale","edit.stale-target","An edit removed the object. Read the presentation again."],["errors.findTooLong","edit.text-too-long","The text is too long for this call. Use shorter text."],["errors.invalidName","edit.invalid-name","A name has 1 to 255 characters. Use a shorter name that is not empty."],["errors.invalidText","edit.invalid-text","The text has no characters that a slide can hold, such as control characters only. Remove them."],["errors.customShowNotFound","edit.custom-show-not-found","The presentation has no custom show with this id. Read the custom shows of the deck again."],["errors.layoutNotFound","edit.layout-not-found","The presentation has no such slide layout. Read the layouts of the master again."],["errors.malformed","edit.malformed-part","A part of the presentation is damaged, so the change cannot apply. Repair the file, then try again."],["errors.sectionName","edit.section-name","A section name has 1 to 255 characters. Use a shorter name that is not empty."],["errors.sectionNotFound","edit.section-not-found","The presentation has no such section. Read the sections again."],["errors.slideNotFound","edit.slide-not-found","The presentation has no such slide. Read the slides again."],["errors.tooLarge","edit.too-large","The content is larger than the presentation accepts. Use smaller content."],["errors.unsafeLink","argument.not-accepted","Use an http, https, mailto, tel, or ftp address of up to 2048 characters."],["errors.unsafeFileLink","argument.not-accepted","Use a relative path that starts with ./ or ../, with at most two ../ steps, to a document, picture, sound, or video file."],["errors.unsupported","edit.unsupported","The presentation cannot take this change. Change another property."],["partly-applied","edit.partly-applied","A read in this sync needed the result of the writes before it, so those writes applied first. The call in errorLocation and the calls after it did not apply."],["document","host.no-document","The host holds no presentation. Open one before you run."],["damaged","host.damaged-document","A slide of the presentation did not open, so the editor holds it read-only. Repair the file and open it again."],["internal","host.internal","The engine could not complete the request, and nothing changed. Report the call that failed."],["no-theme","edit.no-theme-color","The master has no theme, or the theme has no such color. Use a theme color of the master."],["part","edit.not-xml-part","That part of the presentation is not XML. Use an XML part."],["picture","edit.picture-not-in-package","The background picture is a theme fill or a link outside the file. Pass imageBase64 to set a picture."],["rotation","edit.no-rotation","A table or another graphic frame does not rotate. Rotate another shape."],["transparency","edit.fill-not-solid","Only a solid fill has a transparency. Call setSolidColor first."],["result","edit.stale-target","The object is not available in this batch. Read the presentation again."],["parentGroup","edit.not-in-group","The shape is not in a group. Check shape.level first: 0 is the top level of the slide."],["group","edit.not-a-group","The shape is not a group. Check shape.type first, and use a group shape."]],Xt=Object.freeze({"invalid-argument":["argument.not-accepted","An argument is out of range or of the wrong form. errorLocation names the call; its reference lists the values it takes."],"item-not-found":["edit.item-not-found","The collection has no item with that id, key, or index. Read the items again."],"stale-revision":["edit.stale-document","Another writer changed the presentation after this context read it. Read again before you write."],"transaction-refused":["edit.refused","The presentation refused the change as a whole, and nothing applied. Change one property at a time to find the cause."],disposed:["host.disposed","The host was disposed. Create a new runtime."],"document-unavailable":["host.no-document","The editor holds no presentation right now. Wait until it has loaded one."],"unknown-operation":["host.unknown-operation","The host does not know this call. Use a host of the same package version."]});var _t=Object.freeze({PropertyNotLoaded:"the property has not been loaded. Call load(...) and await context.sync() before reading it.",ValueNotLoaded:"the result has not been filled in yet. Await context.sync() before reading it.",InvalidObjectPath:"the object cannot be addressed. Keep proxies within their run, or use context.trackedObjects.add(...) before the run ends.",ObjectInUse:"the object still belongs to a run that has not finished. Await that run before passing the object to another one.",InvalidArgument:"the argument is not one this API accepts.",ResourceLimitExceeded:"the presentation exceeds a supported resource limit.",ItemNotFound:"the collection has no such item.",NotSupported:"the operation or argument is outside the supported subset for this host or content.",NotImplemented:"this API does not implement that operation for this target.",InvalidRequestContext:"the request context has finished. Start another run to continue.",RuntimeDisposed:"the runtime has been disposed.",StaleDocument:"the presentation changed after this context read it, so nothing was applied. Read again before you decide.",DocumentUnavailable:"the presentation is not available right now.",GeneralException:"the presentation could not complete the request."}),ft="argument.not-accepted",kn=new Map([["gone","edit.stale-target","An edit removed the object. Read the presentation again."],["null-object","edit.null-object","The object is a null object: its lookup found nothing. Check isNullObject first."],["refused-sync","sync.object-from-refused-sync","This object came from a sync that was refused, so it was never created. Create it again."],["disabled.viewing","edit.read-only","The editor is open for viewing. Switch to editing."],["selection","host.no-selection","Only a runtime over a live editor has a selection."],["no-text","edit.no-text-frame","The shape has no text frame. Check shape.type first, and read text only of a shape that holds text."],["not-group","edit.not-a-group","The shape is not a group. Check shape.type first, and use a group shape."],["group-count","edit.group-count","A group needs two or more different shapes. Remove repeated shapes or add more."],["disabled.groupPlaceholder","edit.group-placeholder","A placeholder cannot be in a group. Group shapes that are not placeholders."],["group-parent","edit.group-parent","The shapes are not in the same parent. Use shapes of one slide, or of one group."],["group-owner","edit.group-off-slide","Only shapes on a slide can be grouped or ungrouped. Use a slide, not a layout or master."],["group-line","edit.group-line","A group has no outline of its own. Set the line format of each shape in the group."],["disabled.lastSlide","edit.last-slide","A presentation keeps at least one slide. Add a slide before you delete this one."],["not-table","edit.not-a-table","The shape is not a table. Use a table shape."],["table-style-undefined","edit.table-style-undefined","The presentation does not define that table style. Choose a style that the presentation defines, or MediumStyle2Accent1, which is built in."],["table-style-unknown","read.table-style-unknown","The table uses a style that has no TableStyle value. Read the other settings, or set a style first."],["no-preset-geometry","edit.no-preset-geometry","The shape has no preset geometry, so it has no adjustments. Use a shape with a preset geometry, not a freeform, a group, or a table."],["merge-overlap","edit.merge-overlap","The new span cuts another merged cell. Resize or split that cell first."],["duplicate-id","edit.duplicate-shape-id","Another shape on the slide has the same id. A write could reach the wrong shape."],["custom-xml","edit.invalid-custom-xml","The text is not one well-formed XML element, declares a DTD or an entity, declares an encoding other than UTF-8, or is longer than 8 MiB. Write plain XML with one root."],["custom-xml-id","edit.custom-xml-id-taken","Another custom XML part of the presentation has that id. Use a new GUID."],["custom-properties-root","read.custom-properties-invalid","The custom properties part of the file is not a custom properties part. Remove it first."],["import-base64","import.invalid-base64","The file is not Base64 text, or it is larger than 100 MiB. Send the PPTX bytes as Base64."],["import-package","import.not-a-presentation","The file is not a presentation, or it exceeds a limit of the bounded reader."],["import-slide","import.slide-not-found","The source presentation has no slide with that id. Use the ids of its Slide objects."],["import-target","import.target-not-found","The presentation has no slide with the targetSlideId. Read the slide ids again."],["save","host.no-save","This runtime borrows an editor, which saves its own document."],["images","host.no-images","This runtime draws no pictures. Use a runtime over a live editor in a browser, or create the server runtime with a rasterize option."],["image-owner","image.not-on-slide","Only a slide or a shape on a slide has a picture. Use a shape of a slide, not of a layout or a master."],["image-size","image.invalid-size","The width and the height of a picture must be positive numbers of pixels."],["image-failed","image.failed","The editor could not draw the picture: the shape is not drawn (for example, it is hidden), the browser has no canvas, or the rasterizer failed or answered something other than a PNG of the asked size. Read the shape, then try again."],["address",ft,"Use an http, https, mailto, tel, or ftp address of up to 2048 characters."],["binding-shape","binding.shape-deleted","An edit deleted the shape of the binding. Delete the binding, or bind another shape with the same id."],["binding-selection","binding.selection","The selection is not one shape. Select exactly one shape on a slide, then add the binding."],["binding-limit","binding.limit","The runtime holds 10000 bindings. Delete a binding before you add another."],["read-after-commit","edit.read-after-commit","The writes of this sync were applied, but a read after them failed. Read again, and do not apply the same edit again."]].map(([r,e,t])=>[r,Object.freeze({code:e,hint:t})]).concat(Sn.map(([r,e,t])=>[r,Object.freeze({code:e,hint:t})])));function Ln(r,e){let t=I(e);if(t)return t;let n=r==="invalid-argument"?Rn(e):void 0;if(n)return Object.freeze({code:ft,hint:n});let o=Object.prototype.hasOwnProperty.call(Xt,r)?Xt[r]:void 0;return o?Object.freeze({code:o[0],hint:o[1]}):void 0}var fr=/^disabled\.slideNotCopyable:import-(comments|control)(?::(\d{1,10}(?:,\d{1,10}){0,19}))?$/;function br(r){let e=fr.exec(r);if(!e)return;let t=e[2]?.split(",")??[],n=t.length<=1,o=t.length===0?"A slide to import":`${n?"Slide":"Slides"} ${t.join(", ")} of the source`,i=e[1]==="comments"?"threaded comments, which an import cannot copy yet":"an embedded control (p:control)";return Object.freeze({code:e[1]==="comments"?"import.slide-has-comments":"import.slide-has-controls",hint:`${o} ${n?"has":"have"} ${i}. Leave ${n?"it":"them"} out with sourceSlideIds.`})}function I(r){if(r!==void 0)return kn.get(r)??br(r)??kn.get(r.split(":")[0])}var yr="the object no longer exists in the presentation. An edit removed it. Read the presentation again to get a fresh object.",xr="the object is a null object, so it cannot be written or called. Check isNullObject after a sync before you use an object from a get...OrNullObject method.";function Ar(r,e){return r==="InvalidArgument"&&e?.code===ft?`${_t[r]} ${e.hint}`:r!=="InvalidObjectPath"?_t[r]:e?.code==="edit.stale-target"?yr:e?.code==="edit.null-object"?xr:_t[r]}var L=class extends Error{code;target;expectedRevision;actualRevision;debugInfo;traceMessages;constructor(e){let t=Ar(e.code,e.diagnostic),n=e.target?`${t} (${e.target})`:t;super(n),this.name="PptxEditorError",this.code=e.code,this.traceMessages=Object.freeze([...e.traceMessages??[]]),this.debugInfo=Object.freeze({code:e.code,message:n,...e.target===void 0?{}:{errorLocation:e.target},...e.diagnostic===void 0?{}:{innerError:Object.freeze({code:e.diagnostic.code,message:e.diagnostic.hint})}}),e.target!==void 0&&(this.target=e.target),e.expectedRevision!==void 0&&(this.expectedRevision=e.expectedRevision),e.actualRevision!==void 0&&(this.actualRevision=e.actualRevision)}};function xe(r){return r instanceof L?!0:typeof r=="object"&&r!==null&&r.name==="PptxEditorError"&&typeof r.code=="string"}function A(r){throw new L(r)}function jn(r,e){if(!(r instanceof L)||e.length===0)return r;let t=r.debugInfo.innerError;return new L({code:r.code,...r.target===void 0?{}:{target:r.target},...r.expectedRevision===void 0?{}:{expectedRevision:r.expectedRevision},...r.actualRevision===void 0?{}:{actualRevision:r.actualRevision},...t===void 0?{}:{diagnostic:{code:t.code,hint:t.message}},traceMessages:e})}function h(r,e,t){let n=t===void 0?`Use ${e}.`:`Did you mean '${t}'? Use ${e}.`;throw new L({code:"InvalidArgument",...r===void 0?{}:{target:r},diagnostic:Object.freeze({code:ft,hint:n})})}var wr=64;function Vt(r,e){let t=r.toLowerCase(),n=e.toLowerCase(),o=[],i=Array.from({length:n.length+1},(a,s)=>s);for(let a=1;a<=t.length;a+=1){let s=[a];for(let l=1;l<=n.length;l+=1){let c=Math.min(i[l]+1,s[l-1]+1,i[l-1]+(t[a-1]===n[l-1]?0:1));a>1&&l>1&&t[a-1]===n[l-2]&&t[a-2]===n[l-1]&&(c=Math.min(c,o[l-2]+1)),s[l]=c}o=i,i=s}return i[n.length]}function Tn(r){return r.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(e=>e.length>0)}function Cr(r,e){return r===e||r.length>=3&&e.startsWith(r)||e.length>=3&&r.startsWith(e)?!0:Math.min(r.length,e.length)>=4&&Vt(r,e)<=1}function S(r,e){if(typeof r!="string"||r.length===0||r.length>wr)return;let t,n=1/0;for(let s of e){let l=Vt(r,s);l<n&&(t=s,n=l)}if(t===void 0)return;let o=Math.min(3,Math.max(1,Math.floor(t.length/3)));if(n<=o)return t;let i=Tn(r);if(i.length===0)return;let a;for(let s of e){let l=Tn(s),c=new Set,p=0;for(let b of i){let w=l.findIndex((P,T)=>!c.has(T)&&Cr(b,P));w<0?p+=1:c.add(w)}if(p>(i.length>=3?1:0))continue;let C={candidate:s,missing:p,extra:l.length-c.size,d:Vt(r,s)};(!a||C.missing<a.missing||C.missing===a.missing&&(C.extra<a.extra||C.extra===a.extra&&C.d<a.d))&&(a=C)}return a?.candidate}var Pr=12;function z(r){let e=r.map(t=>`'${t}'`);return e.length===1?e[0]:e.length>Pr?`one of the ${e.length} values of the enum, such as ${e.slice(0,3).join(", ")}`:`one of ${e.slice(0,-1).join(", ")}${e.length>2?",":""} or ${e.at(-1)}`}var Ae=Symbol("pptx-editor.runtime.internals"),bt=Symbol("pptx-editor.runtime.release"),yt=Symbol("pptx-editor.runtime.rebind"),le=Symbol("pptx-editor.runtime.path"),te=Symbol("pptx-editor.runtime.load-request"),xt=Symbol("pptx-editor.runtime.defer-refusal"),At=Symbol("pptx-editor.runtime.loaded-values");var Or=new Set(["InvalidArgument","NotImplemented","NotSupported","ItemNotFound"]),vr=new Set(["constructor","load","toJSON","track","untrack","at","command","deleteLines","enqueue","find","groupOf","handlesOf","hasLoadedProperty","indexArg","itemOf","keyArg","listing","loadBackground","loadCellFormat","loadedProperty","loadScalars","lookup","make","markSkipped","memberPath","navigation","onLoad","requireUsable","selection","setLoadedProperty","takeNestedPaths","writeBackground","writeSize"]),Kt=0;function Rr(){let r=new Proxy(function(){},{get:(e,t)=>t==="then"||typeof t=="symbol"?void 0:r,set:()=>!0,apply:()=>r});return r}function Dn(r,e){return function(...t){Kt+=1;try{return r.apply(this,t)}catch(n){if(Kt>1||!xe(n)||!Or.has(n.code))throw n;return this[xt](n),e?Rr():void 0}finally{Kt-=1}}}var $n=new WeakSet,In=new Set;function Nn(r,e){for(;r&&r!==e&&!$n.has(r);){$n.add(r);for(let t of Object.getOwnPropertyNames(r)){if(vr.has(t))continue;let n=Object.getOwnPropertyDescriptor(r,t);typeof n.value=="function"?(Object.defineProperty(r,t,{...n,value:Dn(n.value,!0)}),In.add(t)):n.set&&(Object.defineProperty(r,t,{...n,set:Dn(n.set,!1)}),In.add(t))}r=Object.getPrototypeOf(r)}}function Rt(r){return r.select.length===0&&r.nested.size===0&&r.items===void 0}function wt(r){return r.all||Rt(r)}var Jt=Object.freeze({select:[],all:!1,nested:new Map,itemSelect:[]}),Qt=new Set(["select","expand","top","skip"]),En=/^[A-Za-z][A-Za-z0-9]*$/,Gt="$all",Ct="items",Pt=8,st=256,Bn=64;function Fn(){return{select:[],all:!1,nested:new Map}}var Ot=class{constructor(e){this.target=e}target;#e=st;spend(){this.#e-=1,this.#e<0&&h(this.target,`at most ${st} property names in one load`)}};function Mn(r,e){let t=r.nested.get(e);return t||(t=Fn(),r.nested.set(e,t)),t}function Sr(r,e){typeof r!="string"&&h(e,"a property path as a string");let t=r.split("/",Pt+1);return t.length<=Pt&&t.every((o,i)=>o.length<=Bn&&(En.test(o)||o===Gt&&i===t.length-1))||h(e,"property names separated by '/', such as 'items/name'"),t}function kr(r,e,t,n){let o=r,i=t?e.length-1:e.length;for(let s=0;s<i;s+=1)n.spend(),o=Mn(o,e[s]);if(!t)return;n.spend();let a=e[i];a===Gt?o.all=!0:o.select.includes(a)||o.select.push(a)}function Tr(r,e){return typeof r=="string"?r.split(",",st+1).map(t=>t.trim()):Array.isArray(r)?(r.length>st&&h(e,`at most ${st} paths`),r.map(t=>typeof t=="string"?t.trim():t)):h(e,"a path string, an array of path strings, or an options object")}function Yt(r,e,t,n){let o=new Ot(n),i=Tr(e,n);i.length===0&&h(n,"at least one property name");for(let a of i)kr(r,Sr(a,n),t,o)}function vt(r,e){return(typeof r!="number"||!Number.isInteger(r)||r<0)&&h(e,"a whole number of 0 or more"),r}function Un(r){if(typeof r!="object"||r===null||Array.isArray(r))return!1;let e=Object.getPrototypeOf(r);return e===Object.prototype||e===null}function Hn(r,e,t,n,o){n>Pt&&h(o.target,`a property tree at most ${Pt} levels deep`);for(let i of Object.keys(e)){o.spend();let a=e[i];if(i===Gt)typeof a!="boolean"&&h(`${t}.${i}`,"true or false"),a&&(r.all=!0);else if(i==="$top")r.top=vt(a,`${t}.${i}`);else if(i==="$skip")r.skip=vt(a,`${t}.${i}`);else if(i.length>Bn||!En.test(i))h(t,"property names of letters and digits");else if(a===!0)r.select.includes(i)||r.select.push(i);else{if(a===!1||a===void 0)continue;Un(a)?Hn(Mn(r,i),a,`${t}.${i}`,n+1,o):h(`${t}.${i}`,"true, false, or a nested property tree")}}}function lt(r){let e=r.nested.get(Ct),t=new Map;for(let[i,a]of r.nested)i!==Ct&&(r.select.includes(i)&&(a.all=!0),t.set(i,lt(a)));let n=r.select.filter(i=>!t.has(i)),o=e?lt(e):void 0;return{select:n,all:r.all,nested:t,...o?{items:o}:{},itemSelect:o?o.select:[],...r.top===void 0?{}:{top:r.top},...r.skip===void 0?{}:{skip:r.skip}}}function St(r,e){if(r===void 0)return Jt;let t=Fn();if(typeof r=="string"||Array.isArray(r))return Yt(t,r,!0,e),lt(t);Un(r)||h(e,"a path string, an array of path strings, or an options object");let n=Object.keys(r);if(!n.some(i=>Qt.has(i)))return Hn(t,r,e,1,new Ot(e)),lt(t);for(let i of n)Qt.has(i)||h(`${e}.${i}`,"the options select, expand, top, or skip",S(i,[...Qt]));let o=r;return o.select!==void 0&&Yt(t,o.select,!0,`${e}.select`),o.expand!==void 0&&Yt(t,o.expand,!1,`${e}.expand`),o.top!==void 0&&(t.top=vt(o.top,`${e}.top`)),o.skip!==void 0&&(t.skip=vt(o.skip,`${e}.skip`)),lt(t)}function Zt(r,e){let t=[...r.select];for(let i of e.select)t.includes(i)||t.push(i);let n=new Map(r.nested);for(let[i,a]of e.nested){let s=n.get(i);n.set(i,s?Zt(s,a):a)}let o=r.items&&e.items?Zt(r.items,e.items):r.items??e.items;return{select:t,all:wt(r)||wt(e),nested:n,...o?{items:o}:{},itemSelect:o?o.select:[]}}function zn(r){let e=Rt(r)||r.select.includes(Ct),t={select:r.select.filter(a=>a!==Ct),all:r.all||e,nested:r.nested,itemSelect:[]},n=r.items,o=t.select.length>0||t.nested.size>0||t.all,i=n?o?Zt(t,n):n:o?t:void 0;return i?{...i,orNull:!0}:void 0}function qn(r){return r instanceof M?r.toJSON():r}var M=class r{#e;#t;#n;#o;#r=new Map;#i=!1;#a=!1;#s;constructor(e,t,n={}){this.#e=e,this.#t=e[Ae],this.#n=t,this.#o=n.nullable===!0,this.#t.register(this),Nn(Object.getPrototypeOf(this),r.prototype)}get context(){return this.#e}get isNullObject(){return this.#n.isReleased&&A({code:"InvalidObjectPath",target:this.#n.label}),this.#o?(this.#n.isPending&&A({code:"PropertyNotLoaded",target:`${this.#n.label}.isNullObject`}),this.#n.isNull):!1}load(e){return this.#n.isReleased&&A({code:"InvalidObjectPath",target:this.#n.label}),this.#t.assertUsable(this.#n.label),this[te](St(e,this.#n.label))}[te](e){if(this.#n.isReleased&&A({code:"InvalidObjectPath",target:this.#n.label}),this.#t.assertUsable(this.#n.label),e.items!==void 0&&!this.loadsItemPaths&&h(`${this.#n.label}.items`,"'items/' paths on a collection only"),this.#n.isNull)return this;let t=this.#t.queue.checkpoint();this.#i=!1;let n=this.#a;this.#a=e.orNull===!0;try{if(this.onLoad(e),!this.#i){let o=e.nested.keys().next().value??e.items?.nested.keys().next().value;o!==void 0&&h(`${this.#n.label}.${o}`,"a path through the navigation properties of this object")}}catch(o){throw t(),o}finally{this.#a=n}return this}get loadingOrNull(){return this.#a}takeNestedPaths(){this.#i=!0}toJSON(){let e={};for(let[t,n]of this.#r)t==="__proto__"||t==="constructor"||t==="prototype"||(e[t]=Array.isArray(n)?n.map(qn):qn(n));return e}get loadsItemPaths(){return!1}get path(){return this.#n}get internals(){return this.#t}requireUsable(){if(this.#n.isReleased&&A({code:"InvalidObjectPath",target:this.#n.label}),this.#n.isNull){let e=I("null-object");A({code:"InvalidObjectPath",target:this.#n.label,...e?{diagnostic:e}:{}})}this.#t.assertUsable(this.#n.label)}enqueue(e,t,n,o=()=>{},i,a=!0,s=!1){this.requireUsable();let l=t?`${this.#n.label}.${t}`:this.#n.label,c={sort:e,label:l,target:this.#n,...s?{continues:s}:{},plan:p=>n(C=>C.ref(p)),settle:o};i?.producedBy(c,a),this.#t.queue.push(c)}loadedProperty(e){return this.#r.has(e)||(this.#n.isReleased&&A({code:"InvalidObjectPath",target:this.#n.label}),A({code:"PropertyNotLoaded",target:`${this.#n.label}.${e}`,...this.#s?{diagnostic:this.#s}:{}})),this.#r.get(e)}markSkipped(e){this.#s=e}hasLoadedProperty(e){return this.#r.has(e)}setLoadedProperty(e,t){this.#r.set(e,t)}[At](){return[...this.#r.values()]}get[le](){return this.#n}[xt](e){this.requireUsable(),this.#t.queue.push({sort:"write",label:e.debugInfo.errorLocation??this.#n.label,target:this.#n,refusal:e,plan:()=>{throw e},settle:()=>{}})}[bt](){this.#n.release()}[yt](e){this.#e=e,this.#t=e[Ae]}};function en(r,e,t=!1){let n=r.status==="null"?I("null-object"):t?I("refused-sync"):void 0;A({code:"InvalidObjectPath",target:e,...n?{diagnostic:n}:{}})}var He=class{constructor(e){this.producer=e}producer},Wn=new WeakSet;function Xn(r){Wn.add(r)}var _n=new WeakSet;function Vn(r){_n.add(r)}var dt=class{constructor(e){this.producer=e}producer},u=class r{label;#e;#t;#n=null;#o=!0;constructor(e,t,n=null){this.label=e,this.#e=t,this.#t=n}static of(e,t){return new r(e,{status:"resolved",handle:t})}static pending(e){return new r(e,{status:"pending"})}sibling(e){let t=new r(e,{status:"pending"}),n=this.origin;return n.#n&&(t.#n=n.#n,t.#o=!1),t}static derived(e,t){return new r(e,{status:"pending"},t)}get state(){return this.#t?this.#t.state:this.#e}get origin(){return this.#t?this.#t.origin:this}get isAddressable(){return this.state.status==="resolved"}get isPending(){return this.state.status==="pending"}get isNull(){return this.state.status==="null"}get isReleased(){return this.state.status==="released"}producedBy(e,t=!0){this.origin.#n=e,this.origin.#o=t}ref(e){let t=this.state;if(t.status==="resolved")return t.handle;if(t.status==="pending"){let n=this.origin.#n,o=n?e(n):void 0;if(o!==void 0){if(this.origin.#o)return{result:o};throw new He(n)}if(n&&Wn.has(n))throw new dt(n);n&&_n.has(n)&&en(t,this.label,!0)}en(t,this.label)}handle(){let e=this.state;return e.status!=="resolved"&&en(e,this.label),e.handle}resolveTo(e){this.#t||this.#e.status==="released"||(this.#e={status:"resolved",handle:e},this.#n=null)}resolveNull(){this.#t||this.#e.status==="released"||(this.#e={status:"null"},this.#n=null)}release(){this.#t||(this.#e={status:"released"},this.#n=null)}};function g(r,e,t){if(r.kind!==e)throw new L({code:"GeneralException",target:t});return r}function Kn(r,e){return r.kind==="null"?null:g(r,"handle",e).handle}function U(r){return r instanceof M||h(void 0,"an object of this API"),r[le]}var f=class extends M{selection(e,t,n={}){let o=c=>Object.prototype.hasOwnProperty.call(n,c),i=[...t,...Object.keys(n)],a=(c,p)=>h(`${this.path.label}.${c}`,`a property of this object: ${Lr(p)}`,S(c,p));for(let c of e.select)!t.includes(c)&&!o(c)&&a(c,i);for(let c of e.nested.keys())o(c)||a(c,Object.keys(n));this.takeNestedPaths();let s=wt(e)?[...t]:[],l=c=>e.orNull?{...c,orNull:!0}:c;for(let c of e.select)t.includes(c)?s.includes(c)||s.push(c):this.setLoadedProperty(c,n[c]()[te](l(Jt)));for(let[c,p]of e.nested)this.setLoadedProperty(c,n[c]()[te](l(p)));return s}loadScalars(e,t,n,o){if(e.length===0)return;let i=`${this.path.label}.load`,a=this.loadingOrNull,s,l=c=>s=tn(n(c));this.enqueue("read","load",a?l:n,c=>{if(c.kind==="null"){this.markSkipped(a&&s?jr(s):void 0);return}let p=o(g(c,t,i));for(let C of e)this.setLoadedProperty(C,p[C])})}at(e){return`${this.path.label}.${e}`}command(e,t){let n=`${this.path.label}.${e}`;this.enqueue("write",e,t,o=>{g(o,"applied",n)})}navigation(e,t,n,o=!1){let i=u.pending(`${this.path.label}.${e}`),a=t(i),s=i.label;return this.enqueue("read",e,n,l=>{if(l.kind==="null"&&o)return i.resolveNull();i.resolveTo(g(l,"handle",s).handle)},i),a}onLoad(e){this.selection(e,[])}};function Lr(r){let e=r.map(t=>`'${t}'`);return e.length<=2?e.join(" or "):`${e.slice(0,-1).join(", ")}, or ${e.at(-1)}`}var Qn=new Set(["readTextFrame","readText","readFont","readParagraph"]);function Yn(r){return Qn.has(r.op)?!("cell"in r&&r.cell!==void 0):r.op==="readShape"&&r.group===!0||r.op==="listShapes"}function tn(r){return Yn(r)?{...r,orNull:!0}:r}function jr(r){if(Yn(r))return Qn.has(r.op)?I("no-text"):r.op==="readShape"||r.op==="listShapes"?I("not-group"):void 0}function R(r,e){return(typeof r!="number"||!Number.isFinite(r))&&h(e,"a finite number"),r}function x(r,e){return typeof r!="string"&&h(e,"a string"),r}function $(r,e){return typeof r!="boolean"&&h(e,"true or false"),r}var we=class r extends f{constructor(e,t){super(e,t)}static open(e){return new r(e,u.pending("application"))}onLoad(e){this.selection(e,[])}};var k=class r{#e=!1;#t;#n;constructor(e){this.#n=e}get value(){return this.#e||A({code:"ValueNotLoaded",target:this.#n}),this.#t}get isLoaded(){return this.#e}static create(e){let t=new r(e);return{result:t,fill(n){t.#e=!0,t.#t=n}}}};var Zn=(D=>(D.unsupported="Unsupported",D.image="Image",D.geometricShape="GeometricShape",D.group="Group",D.line="Line",D.table="Table",D.callout="Callout",D.chart="Chart",D.contentApp="ContentApp",D.diagram="Diagram",D.freeform="Freeform",D.graphic="Graphic",D.ink="Ink",D.media="Media",D.model3D="Model3D",D.ole="Ole",D.placeholder="Placeholder",D.textBox="TextBox",D))(Zn||{}),Jn=(e=>(e.shape="Shape",e))(Jn||{}),Gn=(n=>(n.straight="Straight",n.elbow="Elbow",n.curve="Curve",n))(Gn||{}),eo=(t=>(t.textRange="TextRange",t.shape="Shape",t))(eo||{}),to=(o=>(o.bringForward="BringForward",o.bringToFront="BringToFront",o.sendBackward="SendBackward",o.sendToBack="SendToBack",o))(to||{}),no=(a=>(a.noFill="NoFill",a.solid="Solid",a.gradient="Gradient",a.pattern="Pattern",a.pictureAndTexture="PictureAndTexture",a.slideBackground="SlideBackground",a))(no||{}),oo=(b=>(b.dash="Dash",b.dashDot="DashDot",b.dashDotDot="DashDotDot",b.longDash="LongDash",b.longDashDot="LongDashDot",b.roundDot="RoundDot",b.solid="Solid",b.squareDot="SquareDot",b.longDashDotDot="LongDashDotDot",b.systemDash="SystemDash",b.systemDot="SystemDot",b.systemDashDot="SystemDashDot",b))(oo||{}),ro=(i=>(i.single="Single",i.thickBetweenThin="ThickBetweenThin",i.thickThin="ThickThin",i.thinThick="ThinThick",i.thinThin="ThinThin",i))(ro||{}),io=(o=>(o.autoSizeNone="AutoSizeNone",o.autoSizeTextToFitShape="AutoSizeTextToFitShape",o.autoSizeShapeToFitText="AutoSizeShapeToFitText",o.autoSizeMixed="AutoSizeMixed",o))(io||{}),ao=(a=>(a.top="Top",a.middle="Middle",a.bottom="Bottom",a.topCentered="TopCentered",a.middleCentered="MiddleCentered",a.bottomCentered="BottomCentered",a))(ao||{}),so=(s=>(s.left="Left",s.center="Center",s.right="Right",s.justify="Justify",s.justifyLow="JustifyLow",s.distributed="Distributed",s.thaiDistributed="ThaiDistributed",s))(so||{}),lo=(j=>(j.none="None",j.single="Single",j.double="Double",j.heavy="Heavy",j.dotted="Dotted",j.dottedHeavy="DottedHeavy",j.dash="Dash",j.dashHeavy="DashHeavy",j.dashLong="DashLong",j.dashLongHeavy="DashLongHeavy",j.dotDash="DotDash",j.dotDashHeavy="DotDashHeavy",j.dotDotDash="DotDotDash",j.dotDotDashHeavy="DotDotDashHeavy",j.wavy="Wavy",j.wavyHeavy="WavyHeavy",j.wavyDouble="WavyDouble",j))(lo||{}),ho=(N=>(N.unsupported="Unsupported",N.date="Date",N.slideNumber="SlideNumber",N.footer="Footer",N.header="Header",N.title="Title",N.body="Body",N.centerTitle="CenterTitle",N.subtitle="Subtitle",N.verticalTitle="VerticalTitle",N.verticalBody="VerticalBody",N.content="Content",N.chart="Chart",N.table="Table",N.onlinePicture="OnlinePicture",N.media="Media",N.verticalContent="VerticalContent",N.picture="Picture",N.cameo="Cameo",N))(ho||{}),co=(v=>(v.blank="Blank",v.chart="Chart",v.chartAndText="ChartAndText",v.clipArtAndText="ClipArtAndText",v.clipArtAndVerticalText="ClipArtAndVerticalText",v.comparison="Comparison",v.contentWithCaption="ContentWithCaption",v.custom="Custom",v.fourObjects="FourObjects",v.largeObject="LargeObject",v.mediaClipAndText="MediaClipAndText",v.mixed="Mixed",v.object="Object",v.objectAndText="ObjectAndText",v.objectAndTwoObjects="ObjectAndTwoObjects",v.objectOverText="ObjectOverText",v.organizationChart="OrganizationChart",v.pictureWithCaption="PictureWithCaption",v.sectionHeader="SectionHeader",v.table="Table",v.text="Text",v.textAndChart="TextAndChart",v.textAndClipArt="TextAndClipArt",v.textAndMediaClip="TextAndMediaClip",v.textAndObject="TextAndObject",v.textAndTwoObjects="TextAndTwoObjects",v.textOverObject="TextOverObject",v.title="Title",v.titleOnly="TitleOnly",v.twoColumnText="TwoColumnText",v.twoObjects="TwoObjects",v.twoObjectsAndObject="TwoObjectsAndObject",v.twoObjectsAndText="TwoObjectsAndText",v.twoObjectsOverText="TwoObjectsOverText",v.verticalText="VerticalText",v.verticalTitleAndText="VerticalTitleAndText",v.verticalTitleAndTextOverChart="VerticalTitleAndTextOverChart",v))(co||{}),uo=(o=>(o.unsupported="Unsupported",o.none="None",o.numbered="Numbered",o.unnumbered="Unnumbered",o))(uo||{}),po=(O=>(O.unsupported="Unsupported",O.alphabetLowercaseParenthesesBoth="AlphabetLowercaseParenthesesBoth",O.alphabetUppercaseParenthesesBoth="AlphabetUppercaseParenthesesBoth",O.alphabetLowercaseParenthesisRight="AlphabetLowercaseParenthesisRight",O.alphabetUppercaseParenthesisRight="AlphabetUppercaseParenthesisRight",O.alphabetLowercasePeriod="AlphabetLowercasePeriod",O.alphabetUppercasePeriod="AlphabetUppercasePeriod",O.arabicNumeralParenthesesBoth="ArabicNumeralParenthesesBoth",O.arabicNumeralParenthesisRight="ArabicNumeralParenthesisRight",O.arabicNumeralPeriod="ArabicNumeralPeriod",O.arabicNumeralPlain="ArabicNumeralPlain",O.romanLowercaseParenthesesBoth="RomanLowercaseParenthesesBoth",O.romanUppercaseParenthesesBoth="RomanUppercaseParenthesesBoth",O.romanLowercaseParenthesisRight="RomanLowercaseParenthesisRight",O.romanUppercaseParenthesisRight="RomanUppercaseParenthesisRight",O.romanLowercasePeriod="RomanLowercasePeriod",O.romanUppercasePeriod="RomanUppercasePeriod",O.circleNumberDoubleBytePlain="CircleNumberDoubleBytePlain",O.circleNumberWideDoubleByteBlackPlain="CircleNumberWideDoubleByteBlackPlain",O.circleNumberWideDoubleByteWhitePlain="CircleNumberWideDoubleByteWhitePlain",O.arabicDoubleBytePeriod="ArabicDoubleBytePeriod",O.arabicDoubleBytePlain="ArabicDoubleBytePlain",O.simplifiedChinesePeriod="SimplifiedChinesePeriod",O.simplifiedChinesePlain="SimplifiedChinesePlain",O.traditionalChinesePeriod="TraditionalChinesePeriod",O.traditionalChinesePlain="TraditionalChinesePlain",O.kanjiSimplifiedChineseDoubleBytePeriod="KanjiSimplifiedChineseDoubleBytePeriod",O.kanjiKoreanPlain="KanjiKoreanPlain",O.kanjiKoreanPeriod="KanjiKoreanPeriod",O.arabicAlphabetDash="ArabicAlphabetDash",O.arabicAbjadDash="ArabicAbjadDash",O.hebrewAlphabetDash="HebrewAlphabetDash",O.thaiAlphabetPeriod="ThaiAlphabetPeriod",O.thaiAlphabetParenthesisRight="ThaiAlphabetParenthesisRight",O.thaiAlphabetParenthesesBoth="ThaiAlphabetParenthesesBoth",O.thaiNumeralPeriod="ThaiNumeralPeriod",O.thaiNumeralParenthesisRight="ThaiNumeralParenthesisRight",O.thaiNumeralParenthesesBoth="ThaiNumeralParenthesesBoth",O.hindiAlphabetPeriod="HindiAlphabetPeriod",O.hindiNumeralPeriod="HindiNumeralPeriod",O.hindiNumeralParenthesisRight="HindiNumeralParenthesisRight",O.hindiAlphabet1Period="HindiAlphabet1Period",O))(po||{}),mo=(i=>(i.gradient="Gradient",i.pattern="Pattern",i.pictureOrTexture="PictureOrTexture",i.solid="Solid",i.unsupported="Unsupported",i))(mo||{}),go=(a=>(a.linear="Linear",a.path="Path",a.radial="Radial",a.rectangular="Rectangular",a.shadeFromTitle="ShadeFromTitle",a.unsupported="Unsupported",a))(go||{}),fo=(y=>(y.cross="Cross",y.darkDownwardDiagonal="DarkDownwardDiagonal",y.darkHorizontal="DarkHorizontal",y.darkUpwardDiagonal="DarkUpwardDiagonal",y.darkVertical="DarkVertical",y.dashedDownwardDiagonal="DashedDownwardDiagonal",y.dashedHorizontal="DashedHorizontal",y.dashedUpwardDiagonal="DashedUpwardDiagonal",y.dashedVertical="DashedVertical",y.diagonalBrick="DiagonalBrick",y.diagonalCross="DiagonalCross",y.divot="Divot",y.dottedDiamond="DottedDiamond",y.dottedGrid="DottedGrid",y.downwardDiagonal="DownwardDiagonal",y.horizontal="Horizontal",y.horizontalBrick="HorizontalBrick",y.largeCheckerBoard="LargeCheckerBoard",y.largeConfetti="LargeConfetti",y.largeGrid="LargeGrid",y.lightDownwardDiagonal="LightDownwardDiagonal",y.lightHorizontal="LightHorizontal",y.lightUpwardDiagonal="LightUpwardDiagonal",y.lightVertical="LightVertical",y.narrowHorizontal="NarrowHorizontal",y.narrowVertical="NarrowVertical",y.outlinedDiamond="OutlinedDiamond",y.percent10="Percent10",y.percent20="Percent20",y.percent25="Percent25",y.percent30="Percent30",y.percent40="Percent40",y.percent5="Percent5",y.percent50="Percent50",y.percent60="Percent60",y.percent70="Percent70",y.percent75="Percent75",y.percent80="Percent80",y.percent90="Percent90",y.plaid="Plaid",y.shingle="Shingle",y.smallCheckerBoard="SmallCheckerBoard",y.smallConfetti="SmallConfetti",y.smallGrid="SmallGrid",y.solidDiamond="SolidDiamond",y.sphere="Sphere",y.trellis="Trellis",y.unsupported="Unsupported",y.upwardDiagonal="UpwardDiagonal",y.vertical="Vertical",y.wave="Wave",y.weave="Weave",y.wideDownwardDiagonal="WideDownwardDiagonal",y.wideUpwardDiagonal="WideUpwardDiagonal",y.zigZag="ZigZag",y))(fo||{}),bo=(P=>(P.accent1="Accent1",P.accent2="Accent2",P.accent3="Accent3",P.accent4="Accent4",P.accent5="Accent5",P.accent6="Accent6",P.dark1="Dark1",P.dark2="Dark2",P.followedHyperlink="FollowedHyperlink",P.hyperlink="Hyperlink",P.light1="Light1",P.light2="Light2",P.mixed="Mixed",P.none="None",P))(bo||{}),on=(m=>(m.darkStyle1="DarkStyle1",m.darkStyle1Accent1="DarkStyle1Accent1",m.darkStyle1Accent2="DarkStyle1Accent2",m.darkStyle1Accent3="DarkStyle1Accent3",m.darkStyle1Accent4="DarkStyle1Accent4",m.darkStyle1Accent5="DarkStyle1Accent5",m.darkStyle1Accent6="DarkStyle1Accent6",m.darkStyle2="DarkStyle2",m.darkStyle2Accent1="DarkStyle2Accent1",m.darkStyle2Accent2="DarkStyle2Accent2",m.darkStyle2Accent3="DarkStyle2Accent3",m.lightStyle1="LightStyle1",m.lightStyle1Accent1="LightStyle1Accent1",m.lightStyle1Accent2="LightStyle1Accent2",m.lightStyle1Accent3="LightStyle1Accent3",m.lightStyle1Accent4="LightStyle1Accent4",m.lightStyle1Accent5="LightStyle1Accent5",m.lightStyle1Accent6="LightStyle1Accent6",m.lightStyle2="LightStyle2",m.lightStyle2Accent1="LightStyle2Accent1",m.lightStyle2Accent2="LightStyle2Accent2",m.lightStyle2Accent3="LightStyle2Accent3",m.lightStyle2Accent4="LightStyle2Accent4",m.lightStyle2Accent5="LightStyle2Accent5",m.lightStyle2Accent6="LightStyle2Accent6",m.lightStyle3="LightStyle3",m.lightStyle3Accent1="LightStyle3Accent1",m.lightStyle3Accent2="LightStyle3Accent2",m.lightStyle3Accent3="LightStyle3Accent3",m.lightStyle3Accent4="LightStyle3Accent4",m.lightStyle3Accent5="LightStyle3Accent5",m.lightStyle3Accent6="LightStyle3Accent6",m.mediumStyle1="MediumStyle1",m.mediumStyle1Accent1="MediumStyle1Accent1",m.mediumStyle1Accent2="MediumStyle1Accent2",m.mediumStyle1Accent3="MediumStyle1Accent3",m.mediumStyle1Accent4="MediumStyle1Accent4",m.mediumStyle1Accent5="MediumStyle1Accent5",m.mediumStyle1Accent6="MediumStyle1Accent6",m.mediumStyle2="MediumStyle2",m.mediumStyle2Accent1="MediumStyle2Accent1",m.mediumStyle2Accent2="MediumStyle2Accent2",m.mediumStyle2Accent3="MediumStyle2Accent3",m.mediumStyle2Accent4="MediumStyle2Accent4",m.mediumStyle2Accent5="MediumStyle2Accent5",m.mediumStyle2Accent6="MediumStyle2Accent6",m.mediumStyle3="MediumStyle3",m.mediumStyle3Accent1="MediumStyle3Accent1",m.mediumStyle3Accent2="MediumStyle3Accent2",m.mediumStyle3Accent3="MediumStyle3Accent3",m.mediumStyle3Accent4="MediumStyle3Accent4",m.mediumStyle3Accent5="MediumStyle3Accent5",m.mediumStyle3Accent6="MediumStyle3Accent6",m.mediumStyle4="MediumStyle4",m.mediumStyle4Accent1="MediumStyle4Accent1",m.mediumStyle4Accent2="MediumStyle4Accent2",m.mediumStyle4Accent3="MediumStyle4Accent3",m.mediumStyle4Accent4="MediumStyle4Accent4",m.mediumStyle4Accent5="MediumStyle4Accent5",m.mediumStyle4Accent6="MediumStyle4Accent6",m.noStyleNoGrid="NoStyleNoGrid",m.noStyleTableGrid="NoStyleTableGrid",m.themedStyle1Accent1="ThemedStyle1Accent1",m.themedStyle1Accent2="ThemedStyle1Accent2",m.themedStyle1Accent3="ThemedStyle1Accent3",m.themedStyle1Accent4="ThemedStyle1Accent4",m.themedStyle1Accent5="ThemedStyle1Accent5",m.themedStyle1Accent6="ThemedStyle1Accent6",m.themedStyle2Accent1="ThemedStyle2Accent1",m.themedStyle2Accent2="ThemedStyle2Accent2",m.themedStyle2Accent3="ThemedStyle2Accent3",m.themedStyle2Accent4="ThemedStyle2Accent4",m.themedStyle2Accent5="ThemedStyle2Accent5",m.themedStyle2Accent6="ThemedStyle2Accent6",m))(on||{}),ht=(t=>(t.keepSourceFormatting="KeepSourceFormatting",t.useDestinationTheme="UseDestinationTheme",t))(ht||{}),yo=(e=>(e.png="Png",e))(yo||{}),xo=(o=>(o.boolean="Boolean",o.date="Date",o.number="Number",o.string="String",o))(xo||{});function F(r,e={}){let t=Object.create(null),n=Object.create(null);for(let[o,i]of r)t[o]=i,n[i]??=o;for(let[o,i]of e.writeOnly??[])t[o]=i;for(let[o,i]of e.readOnly??[])n[i]??=o;return{toFile(o,i){return(typeof o!="string"||!(o in t))&&h(i,z(Object.keys(t)),S(o,Object.keys(t))),t[o]},fromFile(o){return o==null?null:n[o]??e.fallback??null}}}var de=F([["Top","t"],["Middle","ctr"],["Bottom","b"],["TopCentered","tCentered"],["MiddleCentered","ctrCentered"],["BottomCentered","bCentered"]]),Ce=F([["Left","l"],["Center","ctr"],["Right","r"],["Justify","just"],["JustifyLow","justLow"],["Distributed","dist"],["ThaiDistributed","thaiDist"]]),rn=F([["AutoSizeNone","none"],["AutoSizeTextToFitShape","normal"],["AutoSizeShapeToFitText","shape"]]),he=F([["None","none"],["Single","sng"],["Single","words"],["Double","dbl"],["Heavy","heavy"],["Dotted","dotted"],["DottedHeavy","dottedHeavy"],["Dash","dash"],["DashHeavy","dashHeavy"],["DashLong","dashLong"],["DashLongHeavy","dashLongHeavy"],["DotDash","dotDash"],["DotDashHeavy","dotDashHeavy"],["DotDotDash","dotDotDash"],["DotDotDashHeavy","dotDotDashHeavy"],["Wavy","wavy"],["WavyHeavy","wavyHeavy"],["WavyDouble","wavyDbl"]]),ce=F([["Solid","solid"],["RoundDot","dot"],["Dash","dash"],["LongDash","lgDash"],["DashDot","dashDot"],["LongDashDot","lgDashDot"],["LongDashDotDot","lgDashDotDot"],["SystemDash","sysDash"],["SystemDot","sysDot"],["SystemDashDot","sysDashDot"],["DashDotDot","sysDashDotDot"]],{writeOnly:[["SquareDot","sysDot"]]}),an=F([["Single","sng"],["ThinThin","dbl"],["ThickThin","thickThin"],["ThinThick","thinThick"],["ThickBetweenThin","tri"]]),Ao=F([["Title","title"],["Body","body"],["CenterTitle","ctrTitle"],["Subtitle","subTitle"],["Date","dt"],["SlideNumber","sldNum"],["Footer","ftr"],["Header","hdr"],["Content","obj"],["Chart","chart"],["Table","tbl"],["OnlinePicture","clipArt"],["Media","media"],["Picture","pic"]],{fallback:"Unsupported"}),wo=F([["Title","title"],["Text","tx"],["TwoColumnText","twoColTx"],["Table","tbl"],["TextAndChart","txAndChart"],["ChartAndText","chartAndTx"],["OrganizationChart","dgm"],["Chart","chart"],["TextAndClipArt","txAndClipArt"],["ClipArtAndText","clipArtAndTx"],["TitleOnly","titleOnly"],["Blank","blank"],["TextAndObject","txAndObj"],["ObjectAndText","objAndTx"],["LargeObject","objOnly"],["Object","obj"],["TextAndMediaClip","txAndMedia"],["MediaClipAndText","mediaAndTx"],["ObjectOverText","objOverTx"],["TextOverObject","txOverObj"],["TextAndTwoObjects","txAndTwoObj"],["TwoObjectsAndText","twoObjAndTx"],["TwoObjectsOverText","twoObjOverTx"],["FourObjects","fourObj"],["VerticalText","vertTx"],["ClipArtAndVerticalText","clipArtAndVertTx"],["VerticalTitleAndText","vertTitleAndTx"],["VerticalTitleAndTextOverChart","vertTitleAndTxOverChart"],["TwoObjects","twoObj"],["ObjectAndTwoObjects","objAndTwoObj"],["TwoObjectsAndObject","twoObjAndObj"],["Custom","cust"],["SectionHeader","secHead"],["Comparison","twoTxTwoObj"],["ContentWithCaption","objTx"],["PictureWithCaption","picTx"]],{fallback:"Custom"}),Co=F([["NoFill","noFill"],["Solid","solid"],["Gradient","gradient"],["Pattern","pattern"],["PictureAndTexture","pictureAndTexture"]]),Po=F([["Straight","straight"],["Elbow","elbow"],["Curve","curve"]]),Oo=F([["BringForward","bringForward"],["BringToFront","bringToFront"],["SendBackward","sendBackward"],["SendToBack","sendToBack"]]),sn=F([["AlphabetLowercaseParenthesesBoth","alphaLcParenBoth"],["AlphabetUppercaseParenthesesBoth","alphaUcParenBoth"],["AlphabetLowercaseParenthesisRight","alphaLcParenR"],["AlphabetUppercaseParenthesisRight","alphaUcParenR"],["AlphabetLowercasePeriod","alphaLcPeriod"],["AlphabetUppercasePeriod","alphaUcPeriod"],["ArabicNumeralParenthesesBoth","arabicParenBoth"],["ArabicNumeralParenthesisRight","arabicParenR"],["ArabicNumeralPeriod","arabicPeriod"],["ArabicNumeralPlain","arabicPlain"],["RomanLowercaseParenthesesBoth","romanLcParenBoth"],["RomanUppercaseParenthesesBoth","romanUcParenBoth"],["RomanLowercaseParenthesisRight","romanLcParenR"],["RomanUppercaseParenthesisRight","romanUcParenR"],["RomanLowercasePeriod","romanLcPeriod"],["RomanUppercasePeriod","romanUcPeriod"],["CircleNumberDoubleBytePlain","circleNumDbPlain"],["CircleNumberWideDoubleByteBlackPlain","circleNumWdBlackPlain"],["CircleNumberWideDoubleByteWhitePlain","circleNumWdWhitePlain"],["ArabicDoubleBytePeriod","arabicDbPeriod"],["ArabicDoubleBytePlain","arabicDbPlain"],["SimplifiedChinesePeriod","ea1ChsPeriod"],["SimplifiedChinesePlain","ea1ChsPlain"],["TraditionalChinesePeriod","ea1ChtPeriod"],["TraditionalChinesePlain","ea1ChtPlain"],["KanjiSimplifiedChineseDoubleBytePeriod","ea1JpnChsDbPeriod"],["KanjiKoreanPlain","ea1JpnKorPlain"],["KanjiKoreanPeriod","ea1JpnKorPeriod"],["ArabicAlphabetDash","arabic1Minus"],["ArabicAbjadDash","arabic2Minus"],["HebrewAlphabetDash","hebrew2Minus"],["ThaiAlphabetPeriod","thaiAlphaPeriod"],["ThaiAlphabetParenthesisRight","thaiAlphaParenR"],["ThaiAlphabetParenthesesBoth","thaiAlphaParenBoth"],["ThaiNumeralPeriod","thaiNumPeriod"],["ThaiNumeralParenthesisRight","thaiNumParenR"],["ThaiNumeralParenthesesBoth","thaiNumParenBoth"],["HindiAlphabetPeriod","hindiAlphaPeriod"],["HindiNumeralPeriod","hindiNumPeriod"],["HindiNumeralParenthesisRight","hindiNumParenR"],["HindiAlphabet1Period","hindiAlpha1Period"]],{fallback:"Unsupported"}),ln=F([["None","none"],["Numbered","autonum"],["Unnumbered","char"]],{readOnly:[["Unnumbered","picture"]],fallback:"Unsupported"});function dn(r){let e=["Image","GeometricShape","Group","Line","Table","Chart","Diagram","Freeform","Media","Ole","Placeholder","TextBox"],t=r.charAt(0).toUpperCase()+r.slice(1);return e.includes(t)?t:"Unsupported"}var vo=F([["Solid","solid"],["Gradient","gradient"],["Pattern","pattern"],["PictureOrTexture","picture"]],{fallback:"Unsupported"}),hn=F([["Linear","linear"],["Radial","circle"],["Rectangular","rect"],["Path","shape"]],{fallback:"Unsupported"}),kt=F([["Cross","cross"],["DarkDownwardDiagonal","dkDnDiag"],["DarkHorizontal","dkHorz"],["DarkUpwardDiagonal","dkUpDiag"],["DarkVertical","dkVert"],["DashedDownwardDiagonal","dashDnDiag"],["DashedHorizontal","dashHorz"],["DashedUpwardDiagonal","dashUpDiag"],["DashedVertical","dashVert"],["DiagonalBrick","diagBrick"],["DiagonalCross","diagCross"],["Divot","divot"],["DottedDiamond","dotDmnd"],["DottedGrid","dotGrid"],["DownwardDiagonal","dnDiag"],["Horizontal","horz"],["HorizontalBrick","horzBrick"],["LargeCheckerBoard","lgCheck"],["LargeConfetti","lgConfetti"],["LargeGrid","lgGrid"],["LightDownwardDiagonal","ltDnDiag"],["LightHorizontal","ltHorz"],["LightUpwardDiagonal","ltUpDiag"],["LightVertical","ltVert"],["NarrowHorizontal","narHorz"],["NarrowVertical","narVert"],["OutlinedDiamond","openDmnd"],["Percent10","pct10"],["Percent20","pct20"],["Percent25","pct25"],["Percent30","pct30"],["Percent40","pct40"],["Percent5","pct5"],["Percent50","pct50"],["Percent60","pct60"],["Percent70","pct70"],["Percent75","pct75"],["Percent80","pct80"],["Percent90","pct90"],["Plaid","plaid"],["Shingle","shingle"],["SmallCheckerBoard","smCheck"],["SmallConfetti","smConfetti"],["SmallGrid","smGrid"],["SolidDiamond","solidDmnd"],["Sphere","sphere"],["Trellis","trellis"],["UpwardDiagonal","upDiag"],["Vertical","vert"],["Wave","wave"],["Weave","weave"],["WideDownwardDiagonal","wdDnDiag"],["WideUpwardDiagonal","wdUpDiag"],["ZigZag","zigZag"]],{fallback:"Unsupported"}),cn=F([["Dark1","dk1"],["Light1","lt1"],["Dark2","dk2"],["Light2","lt2"],["Accent1","accent1"],["Accent2","accent2"],["Accent3","accent3"],["Accent4","accent4"],["Accent5","accent5"],["Accent6","accent6"],["Hyperlink","hlink"],["FollowedHyperlink","folHlink"]]);function Tt(r,e){if((typeof r!="string"||!nn.has(r))&&h(e,z([...nn])),r==="NoStyleNoGrid")return null;if(r==="NoStyleTableGrid")return"No Style, Table Grid";let t=/^(Dark|Light|Medium|Themed)Style(\d)(?:Accent(\d))?$/.exec(r);return`${t[1]} Style ${t[2]}${t[3]?` - Accent ${t[3]}`:""}`}function Ro(r){if(r==="No Style, No Grid")return"NoStyleNoGrid";if(r==="No Style, Table Grid")return"NoStyleTableGrid";let e=/^(Dark|Light|Medium|Themed) Style (\d)(?: - Accent (\d))?$/.exec(r),t=e?`${e[1]}Style${e[2]}${e[3]?`Accent${e[3]}`:""}`:"";return nn.has(t)?t:null}var nn=new Set(Object.values(on));function So(r,e){return(typeof r!="number"||!Number.isInteger(r)||r<0)&&h(e,"a whole number of 0 or more"),r}var Pe=class extends f{#e;constructor(e,t,n){super(e,t),this.#e=n}get count(){return this.loadedProperty("count")}get(e){let t=So(e,`${this.path.label}.get`),n=`${this.path.label}.get(${t})`,{result:o,fill:i}=k.create(n),a=this.#e;return this.enqueue("read",`get(${t})`,s=>({op:"readAdjustments",shape:s(a)}),s=>{let l=g(s,"adjustments",n).adjustments.values;t>=l.length&&A({code:"ItemNotFound",target:n}),i(l[t])}),o}set(e,t){let n=So(e,`${this.path.label}.set`),o=R(t,`${this.path.label}.set`),i=this.#e;this.command("set",a=>({op:"setAdjustment",shape:a(i),index:n,value:o}))}onLoad(e){let t=this.#e;this.loadScalars(this.selection(e,["count"]),"adjustments",n=>({op:"readAdjustments",shape:n(t)}),n=>({count:n.adjustments.values.length}))}};function X(r,e){let t=R(r,e);return(t<0||t>1)&&h(e,"a fraction from 0 (opaque) to 1 (clear)"),t}var ne=class extends f{#e;constructor(e,t,n){super(e,t),this.#e=n}get foregroundColor(){return this.loadedProperty("foregroundColor")}set foregroundColor(e){this.#t("foregroundColor",{kind:"solid",color:x(e,this.at("foregroundColor"))})}get transparency(){return this.loadedProperty("transparency")}set transparency(e){this.#t("transparency",{kind:"transparency",transparency:X(e,"transparency")})}get type(){return this.loadedProperty("type")}clear(){this.#t("clear",{kind:"clear"})}setSolidColor(e){this.#t("setSolidColor",{kind:"solid",color:x(e,this.at("color"))})}setImage(e){let t=x(e,`${this.path.label}.setImage`);this.#t("setImage",{kind:"image",base64:t})}#t(e,t){let n=this.#e.shape,o=this.#n();this.command(e,i=>({op:"setFill",shape:i(n),fill:t,...o}))}#n(){return this.#e.kind==="cell"?{cell:this.#e.cell}:{}}onLoad(e){let t=this.selection(e,["foregroundColor","transparency","type"]),n=this.#e.shape;this.loadScalars(t,"fill",o=>({op:"readFill",shape:o(n),...this.#n()}),o=>({foregroundColor:o.fill.foregroundColor??"",transparency:o.fill.transparency??0,type:Co.fromFile(o.fill.type)??"NoFill"}))}},Dr=["color","dashStyle","style","transparency","visible","weight"],Oe=class extends f{#e;constructor(e,t,n){super(e,t),this.#e=n}get color(){return this.loadedProperty("color")}set color(e){this.#t("color",{color:x(e,this.at("color"))})}get dashStyle(){return this.loadedProperty("dashStyle")}set dashStyle(e){this.#t("dashStyle",{dashStyle:ce.toFile(e,"dashStyle")})}get style(){return this.loadedProperty("style")}set style(e){this.#t("style",{style:an.toFile(e,"style")})}get transparency(){return this.loadedProperty("transparency")}set transparency(e){this.#t("transparency",{transparency:X(e,"transparency")})}get visible(){return this.loadedProperty("visible")}set visible(e){this.#t("visible",{visible:$(e,this.at("visible"))})}get weight(){return this.loadedProperty("weight")}set weight(e){this.#t("weight",{weight:R(e,this.at("weight"))})}#t(e,t){let n=this.#e;this.command(e,o=>({op:"setLine",shape:o(n),line:t}))}onLoad(e){let t=this.selection(e,Dr),n=this.#e;this.loadScalars(t,"line",o=>({op:"readLine",shape:o(n)}),o=>({color:o.line.color??"",dashStyle:ce.fromFile(o.line.dashStyle)??"Solid",style:an.fromFile(o.line.style)??"Single",transparency:o.line.transparency??0,visible:o.line.visible,weight:o.line.weight??0}))}};var ko=(d=>(d.lineInverse="LineInverse",d.triangle="Triangle",d.rightTriangle="RightTriangle",d.rectangle="Rectangle",d.diamond="Diamond",d.parallelogram="Parallelogram",d.trapezoid="Trapezoid",d.nonIsoscelesTrapezoid="NonIsoscelesTrapezoid",d.pentagon="Pentagon",d.hexagon="Hexagon",d.heptagon="Heptagon",d.octagon="Octagon",d.decagon="Decagon",d.dodecagon="Dodecagon",d.star4="Star4",d.star5="Star5",d.star6="Star6",d.star7="Star7",d.star8="Star8",d.star10="Star10",d.star12="Star12",d.star16="Star16",d.star24="Star24",d.star32="Star32",d.roundRectangle="RoundRectangle",d.round1Rectangle="Round1Rectangle",d.round2SameRectangle="Round2SameRectangle",d.round2DiagonalRectangle="Round2DiagonalRectangle",d.snipRoundRectangle="SnipRoundRectangle",d.snip1Rectangle="Snip1Rectangle",d.snip2SameRectangle="Snip2SameRectangle",d.snip2DiagonalRectangle="Snip2DiagonalRectangle",d.plaque="Plaque",d.ellipse="Ellipse",d.teardrop="Teardrop",d.homePlate="HomePlate",d.chevron="Chevron",d.pieWedge="PieWedge",d.pie="Pie",d.blockArc="BlockArc",d.donut="Donut",d.noSmoking="NoSmoking",d.rightArrow="RightArrow",d.leftArrow="LeftArrow",d.upArrow="UpArrow",d.downArrow="DownArrow",d.stripedRightArrow="StripedRightArrow",d.notchedRightArrow="NotchedRightArrow",d.bentUpArrow="BentUpArrow",d.leftRightArrow="LeftRightArrow",d.upDownArrow="UpDownArrow",d.leftUpArrow="LeftUpArrow",d.leftRightUpArrow="LeftRightUpArrow",d.quadArrow="QuadArrow",d.leftArrowCallout="LeftArrowCallout",d.rightArrowCallout="RightArrowCallout",d.upArrowCallout="UpArrowCallout",d.downArrowCallout="DownArrowCallout",d.leftRightArrowCallout="LeftRightArrowCallout",d.upDownArrowCallout="UpDownArrowCallout",d.quadArrowCallout="QuadArrowCallout",d.bentArrow="BentArrow",d.uturnArrow="UturnArrow",d.circularArrow="CircularArrow",d.leftCircularArrow="LeftCircularArrow",d.leftRightCircularArrow="LeftRightCircularArrow",d.curvedRightArrow="CurvedRightArrow",d.curvedLeftArrow="CurvedLeftArrow",d.curvedUpArrow="CurvedUpArrow",d.curvedDownArrow="CurvedDownArrow",d.swooshArrow="SwooshArrow",d.cube="Cube",d.can="Can",d.lightningBolt="LightningBolt",d.heart="Heart",d.sun="Sun",d.moon="Moon",d.smileyFace="SmileyFace",d.irregularSeal1="IrregularSeal1",d.irregularSeal2="IrregularSeal2",d.foldedCorner="FoldedCorner",d.bevel="Bevel",d.frame="Frame",d.halfFrame="HalfFrame",d.corner="Corner",d.diagonalStripe="DiagonalStripe",d.chord="Chord",d.arc="Arc",d.leftBracket="LeftBracket",d.rightBracket="RightBracket",d.leftBrace="LeftBrace",d.rightBrace="RightBrace",d.bracketPair="BracketPair",d.bracePair="BracePair",d.callout1="Callout1",d.callout2="Callout2",d.callout3="Callout3",d.accentCallout1="AccentCallout1",d.accentCallout2="AccentCallout2",d.accentCallout3="AccentCallout3",d.borderCallout1="BorderCallout1",d.borderCallout2="BorderCallout2",d.borderCallout3="BorderCallout3",d.accentBorderCallout1="AccentBorderCallout1",d.accentBorderCallout2="AccentBorderCallout2",d.accentBorderCallout3="AccentBorderCallout3",d.wedgeRectCallout="WedgeRectCallout",d.wedgeRRectCallout="WedgeRRectCallout",d.wedgeEllipseCallout="WedgeEllipseCallout",d.cloudCallout="CloudCallout",d.cloud="Cloud",d.ribbon="Ribbon",d.ribbon2="Ribbon2",d.ellipseRibbon="EllipseRibbon",d.ellipseRibbon2="EllipseRibbon2",d.leftRightRibbon="LeftRightRibbon",d.verticalScroll="VerticalScroll",d.horizontalScroll="HorizontalScroll",d.wave="Wave",d.doubleWave="DoubleWave",d.plus="Plus",d.flowChartProcess="FlowChartProcess",d.flowChartDecision="FlowChartDecision",d.flowChartInputOutput="FlowChartInputOutput",d.flowChartPredefinedProcess="FlowChartPredefinedProcess",d.flowChartInternalStorage="FlowChartInternalStorage",d.flowChartDocument="FlowChartDocument",d.flowChartMultidocument="FlowChartMultidocument",d.flowChartTerminator="FlowChartTerminator",d.flowChartPreparation="FlowChartPreparation",d.flowChartManualInput="FlowChartManualInput",d.flowChartManualOperation="FlowChartManualOperation",d.flowChartConnector="FlowChartConnector",d.flowChartPunchedCard="FlowChartPunchedCard",d.flowChartPunchedTape="FlowChartPunchedTape",d.flowChartSummingJunction="FlowChartSummingJunction",d.flowChartOr="FlowChartOr",d.flowChartCollate="FlowChartCollate",d.flowChartSort="FlowChartSort",d.flowChartExtract="FlowChartExtract",d.flowChartMerge="FlowChartMerge",d.flowChartOfflineStorage="FlowChartOfflineStorage",d.flowChartOnlineStorage="FlowChartOnlineStorage",d.flowChartMagneticTape="FlowChartMagneticTape",d.flowChartMagneticDisk="FlowChartMagneticDisk",d.flowChartMagneticDrum="FlowChartMagneticDrum",d.flowChartDisplay="FlowChartDisplay",d.flowChartDelay="FlowChartDelay",d.flowChartAlternateProcess="FlowChartAlternateProcess",d.flowChartOffpageConnector="FlowChartOffpageConnector",d.actionButtonBlank="ActionButtonBlank",d.actionButtonHome="ActionButtonHome",d.actionButtonHelp="ActionButtonHelp",d.actionButtonInformation="ActionButtonInformation",d.actionButtonForwardNext="ActionButtonForwardNext",d.actionButtonBackPrevious="ActionButtonBackPrevious",d.actionButtonEnd="ActionButtonEnd",d.actionButtonBeginning="ActionButtonBeginning",d.actionButtonReturn="ActionButtonReturn",d.actionButtonDocument="ActionButtonDocument",d.actionButtonSound="ActionButtonSound",d.actionButtonMovie="ActionButtonMovie",d.gear6="Gear6",d.gear9="Gear9",d.funnel="Funnel",d.mathPlus="MathPlus",d.mathMinus="MathMinus",d.mathMultiply="MathMultiply",d.mathDivide="MathDivide",d.mathEqual="MathEqual",d.mathNotEqual="MathNotEqual",d.cornerTabs="CornerTabs",d.squareTabs="SquareTabs",d.plaqueTabs="PlaqueTabs",d.chartX="ChartX",d.chartStar="ChartStar",d.chartPlus="ChartPlus",d))(ko||{}),un=new Set(["LineInverse","Triangle","RightTriangle","Rectangle","Diamond","Parallelogram","Trapezoid","NonIsoscelesTrapezoid","Pentagon","Hexagon","Heptagon","Octagon","Decagon","Dodecagon","Star4","Star5","Star6","Star7","Star8","Star10","Star12","Star16","Star24","Star32","RoundRectangle","Round1Rectangle","Round2SameRectangle","Round2DiagonalRectangle","SnipRoundRectangle","Snip1Rectangle","Snip2SameRectangle","Snip2DiagonalRectangle","Plaque","Ellipse","Teardrop","HomePlate","Chevron","PieWedge","Pie","BlockArc","Donut","NoSmoking","RightArrow","LeftArrow","UpArrow","DownArrow","StripedRightArrow","NotchedRightArrow","BentUpArrow","LeftRightArrow","UpDownArrow","LeftUpArrow","LeftRightUpArrow","QuadArrow","LeftArrowCallout","RightArrowCallout","UpArrowCallout","DownArrowCallout","LeftRightArrowCallout","UpDownArrowCallout","QuadArrowCallout","BentArrow","UturnArrow","CircularArrow","LeftCircularArrow","LeftRightCircularArrow","CurvedRightArrow","CurvedLeftArrow","CurvedUpArrow","CurvedDownArrow","SwooshArrow","Cube","Can","LightningBolt","Heart","Sun","Moon","SmileyFace","IrregularSeal1","IrregularSeal2","FoldedCorner","Bevel","Frame","HalfFrame","Corner","DiagonalStripe","Chord","Arc","LeftBracket","RightBracket","LeftBrace","RightBrace","BracketPair","BracePair","Callout1","Callout2","Callout3","AccentCallout1","AccentCallout2","AccentCallout3","BorderCallout1","BorderCallout2","BorderCallout3","AccentBorderCallout1","AccentBorderCallout2","AccentBorderCallout3","WedgeRectCallout","WedgeRRectCallout","WedgeEllipseCallout","CloudCallout","Cloud","Ribbon","Ribbon2","EllipseRibbon","EllipseRibbon2","LeftRightRibbon","VerticalScroll","HorizontalScroll","Wave","DoubleWave","Plus","FlowChartProcess","FlowChartDecision","FlowChartInputOutput","FlowChartPredefinedProcess","FlowChartInternalStorage","FlowChartDocument","FlowChartMultidocument","FlowChartTerminator","FlowChartPreparation","FlowChartManualInput","FlowChartManualOperation","FlowChartConnector","FlowChartPunchedCard","FlowChartPunchedTape","FlowChartSummingJunction","FlowChartOr","FlowChartCollate","FlowChartSort","FlowChartExtract","FlowChartMerge","FlowChartOfflineStorage","FlowChartOnlineStorage","FlowChartMagneticTape","FlowChartMagneticDisk","FlowChartMagneticDrum","FlowChartDisplay","FlowChartDelay","FlowChartAlternateProcess","FlowChartOffpageConnector","ActionButtonBlank","ActionButtonHome","ActionButtonHelp","ActionButtonInformation","ActionButtonForwardNext","ActionButtonBackPrevious","ActionButtonEnd","ActionButtonBeginning","ActionButtonReturn","ActionButtonDocument","ActionButtonSound","ActionButtonMovie","Gear6","Gear9","Funnel","MathPlus","MathMinus","MathMultiply","MathDivide","MathEqual","MathNotEqual","CornerTabs","SquareTabs","PlaqueTabs","ChartX","ChartStar","ChartPlus"]),$r=Object.assign(Object.create(null),{LineInverse:"lineInv",RightTriangle:"rtTriangle",Rectangle:"rect",RoundRectangle:"roundRect",Round1Rectangle:"round1Rect",Round2SameRectangle:"round2SameRect",Round2DiagonalRectangle:"round2DiagRect",SnipRoundRectangle:"snipRoundRect",Snip1Rectangle:"snip1Rect",Snip2SameRectangle:"snip2SameRect",Snip2DiagonalRectangle:"snip2DiagRect",DiagonalStripe:"diagStripe",WedgeRRectCallout:"wedgeRoundRectCallout"});function To(r,e){return(typeof r!="string"||!un.has(r))&&h(e,z([...un]),S(r,[...un])),$r[r]??r.charAt(0).toLowerCase()+r.slice(1)}var oe=class extends f{handlesOf(e,t){return g(e,"handles",t).handles}get items(){return this.loadedProperty("items")}get loadsItemPaths(){return!0}onLoad(e){let t=zn(e);this.takeNestedPaths(),t&&this.#e(e,t);let n=e.skip??0,o=e.top,i=`${this.path.label}.items`,a=this.loadingOrNull;this.enqueue("read","items",s=>a?tn(this.listing(s)):this.listing(s),s=>{if(s.kind==="null"){this.markSkipped(I("not-group"));return}let l=this.handlesOf(s,i),c=o===void 0?l.length:Math.min(l.length,n+o),p=l.slice(n,c).map((C,b)=>this.itemOf(this.memberPath(C,n+b),!1));this.setLoadedProperty("items",p),t&&this.internals.queue.continuing(()=>{for(let C of p)C[te](t)})},void 0,!0,t!==void 0)}#e(e,t){let n=this.internals.queue.checkpoint();try{this.itemOf(u.pending(`${this.path.label}.items`),!1)[te](t)}catch(o){if(!xe(o)||o.code!=="InvalidArgument")throw o;for(let i of[...e.select,...e.nested.keys()])S(i,["items"])==="items"&&h(`${this.path.label}.${i}`,"'items/<property>', or a property of the items","items");throw o}finally{n()}}memberPath(e,t){return u.of(`${this.path.label}.items[${t}]`,e)}getCount(){let{result:e,fill:t}=k.create(`${this.path.label}.getCount`),n=`${this.path.label}.getCount`;return this.enqueue("read","getCount",o=>this.listing(o),o=>t(this.handlesOf(o,n).length)),e}find(e,t,n){let o=u.pending(`${this.path.label}.${t}`),i=this.itemOf(o,n),a=o.label;return this.hasLookup?(this.enqueue("read",t,s=>this.lookup(s,e,n),s=>{let l=Kn(s,a);l?o.resolveTo(l):o.resolveNull()},o),i):("index"in e||A({code:"NotImplemented",target:a}),this.enqueue("read",t,s=>this.listing(s),s=>{let l=this.handlesOf(s,a)[e.index];l?o.resolveTo(l):n?o.resolveNull():A({code:"ItemNotFound",target:a})},o,!1),i)}get hasLookup(){return!0}indexArg(e){return(typeof e!="number"||!Number.isInteger(e)||e<0)&&h(`${this.path.label}.getItemAt`,"a whole number of 0 or more"),e}keyArg(e,t){return(typeof e!="string"||e.length===0)&&h(`${this.path.label}.${t}`,"a non-empty string"),e}};function Lo(r){let e=new Map;r.forEach((i,a)=>e.set(i,a));let t=[],n=!1,o=!1;for(let i of r)t.push(i.plan(a=>e.get(a))),i.sort==="write"?o=!0:n=!0;return{operations:t,hasRead:n,hasWrite:o}}function jo(r){let e=[...r];for(let t=0;t<=r.length+1e4;t+=1){let n=new Map;e.forEach((a,s)=>n.set(a,s));let o,i=0;for(let[a,s]of e.entries())try{s.plan(l=>n.get(l))}catch(l){if(l instanceof dt){o=l.producer,i=a;break}}if(!o)return e;e=[...e.slice(0,i),o,...e.slice(i)]}return e}function Do(r){let e=new Map;r.forEach((o,i)=>e.set(o,i));let t=r.findIndex(o=>o.sort==="write");if(t<0)return-1;let n=-1;for(let o of r)try{o.plan(i=>e.get(i))}catch(i){if(!(i instanceof He))continue;let a=e.get(i.producer);a!==void 0&&a>t&&(n<0||a<n)&&(n=a)}return n}function pn(r){let e=new Map;r.forEach((s,l)=>e.set(s,l));let t=[],n=new Set,o=new Map;for(let s of r){let l=[];o.set(s,l);try{s.plan(c=>{let p=e.get(c);return p!==void 0&&l.push(r[p]),p})}catch(c){if(!(c instanceof He))throw c;t.push(c.producer),n.add(s)}}if(t.length===0)return[];let i=new Set,a=s=>{let l=new Set,c=[s];for(;c.length>0;){let p=c.pop();if(!(l.has(p)||i.has(p))){if(n.has(p))return null;if(p.sort==="write")throw new L({code:"InvalidObjectPath",target:s.label});l.add(p);for(let C of o.get(p)??[])c.push(C)}}return l};for(let s of t)for(let l of a(s)??[])i.add(l);if(i.size===0)throw new L({code:"InvalidObjectPath",target:[...n][0]?.label});return r.filter(s=>i.has(s))}var Ir=Object.freeze({"stale-revision":"StaleDocument","invalid-handle":"InvalidObjectPath","invalid-argument":"InvalidArgument","unsupported-capability":"NotSupported",disposed:"RuntimeDisposed","transaction-refused":"GeneralException","unknown-operation":"NotSupported","unsupported-content":"NotSupported","item-not-found":"ItemNotFound","document-unavailable":"DocumentUnavailable"});function ct(r,e={}){let t=Ir[r.code]??"GeneralException",n=t==="StaleDocument",o=Ln(r.code,r.detail);return new L({code:t,...o===void 0?{}:{diagnostic:o},...e.target===void 0?{}:{target:e.target},...n&&e.expectedRevision!==void 0?{expectedRevision:e.expectedRevision}:{},...n&&e.actualRevision!==void 0?{actualRevision:e.actualRevision}:{}})}function $o(r,e,t,n){for(let o=0;o<r.results.length;o+=1){let i=r.results[o];if(i?.status!=="error")continue;let a=e[o]?.label;return e[o]&&n?.(e[o]),ct(i.error,{...a===void 0?{}:{target:a},...t===void 0?{}:{expectedRevision:t},actualRevision:r.revision})}return new L({code:"GeneralException"})}function Io(r,e,t){if(e.results.length!==r.length)throw new L({code:"GeneralException"});for(let n=0;n<r.length;n+=1){let o=e.results[n],i=r[n];if(t?.(i),o.status!=="ok")throw new L({code:"GeneralException",target:i.label});i.settle(o.value)}}function No(r,e){if(r!=null)return(typeof r!="number"||!Number.isFinite(r)||r<=0)&&h(e,"a number of pixels greater than 0"),r}function Lt(r,e,t){if(r==null)return{};(typeof r!="object"||Array.isArray(r))&&h(e,"an options object with width and height");let n=r;t&&n.format!==void 0&&n.format!==null&&n.format!=="Png"&&h(e,"the format 'Png'");let o=No(n.width,e),i=No(n.height,e);return{...o===void 0?{}:{width:o},...i===void 0?{}:{height:i}}}async function Nr(r,e,t,n){let o=r.host;if(typeof o.renderImage!="function"){let a=I("images");throw new L({code:"NotSupported",target:n,...a===void 0?{}:{diagnostic:a}})}let i=await o.renderImage({target:e,...t});if(!i.ok)throw ct(i.error,{target:n});return i.base64}function jt(r,e,t,n){return o=>{let i=g(o,"handle",t).handle;r.defer(Nr(r,i,e,t).then(n))}}function Dt(r,e,t){if(r===void 0)return{};(typeof r!="object"||r===null||Array.isArray(r))&&h(t,"an options object");for(let n of Object.keys(r))e.includes(n)||h(`${t}.${n}`,`an option name: ${z(e)}`,S(n,e));return r}function Eo(r,e){return r==="ShadeFromTitle"&&A({code:"NotImplemented",target:e}),hn.toFile(r,e)}var Z=class extends f{owner;constructor(e,t,n,o=!1){super(e,t,{nullable:o}),this.owner=n}writeBackground(e,t){let n=this.owner;this.command(e,o=>({op:"setBackground",owner:o(n),background:t}))}loadBackground(e,t){let n=this.owner;this.loadScalars(e,"background",o=>({op:"readBackground",owner:o(n)}),o=>t(o.background))}},ze=class extends Z{get color(){return this.loadedProperty("color")}set color(e){this.writeBackground("color",{kind:"solid",color:x(e,this.at("color"))})}get transparency(){return this.loadedProperty("transparency")}set transparency(e){let t=X(e,this.at("transparency"));this.writeBackground("transparency",{kind:"solid",transparency:t})}onLoad(e){this.loadBackground(this.selection(e,["color","transparency"]),t=>({color:t.fill.color??"",transparency:t.fill.transparency??0}))}},qe=class extends Z{get type(){return this.loadedProperty("type")}set type(e){let t=Eo(e,this.at("type"));this.writeBackground("type",{kind:"gradient",gradientType:t})}onLoad(e){this.loadBackground(this.selection(e,["type"]),t=>({type:t.fill.gradientType==="shadeToTitle"?"ShadeFromTitle":hn.fromFile(t.fill.gradientType)??"Unsupported"}))}},We=class extends Z{get backgroundColor(){return this.loadedProperty("backgroundColor")}set backgroundColor(e){let t=x(e,this.at("backgroundColor"));this.writeBackground("backgroundColor",{kind:"pattern",backgroundColor:t})}get foregroundColor(){return this.loadedProperty("foregroundColor")}set foregroundColor(e){let t=x(e,this.at("foregroundColor"));this.writeBackground("foregroundColor",{kind:"pattern",foregroundColor:t})}get pattern(){return this.loadedProperty("pattern")}set pattern(e){let t=kt.toFile(e,this.at("pattern"));this.writeBackground("pattern",{kind:"pattern",pattern:t})}onLoad(e){let t=["backgroundColor","foregroundColor","pattern"];this.loadBackground(this.selection(e,t),n=>({backgroundColor:n.fill.backgroundColor??"",foregroundColor:n.fill.foregroundColor??"",pattern:kt.fromFile(n.fill.pattern)??"Unsupported"}))}},Xe=class extends Z{get transparency(){return this.loadedProperty("transparency")}set transparency(e){let t=X(e,this.at("transparency"));this.writeBackground("transparency",{kind:"picture",transparency:t})}setImage(e){let t=x(e,this.at("setImage"));this.writeBackground("setImage",{kind:"picture",base64:t})}onLoad(e){this.loadBackground(this.selection(e,["transparency"]),t=>({transparency:t.fill.transparency??0}))}},_e=class extends Z{get type(){return this.loadedProperty("type")}getGradientFillOrNullObject(){return this.#e("getGradientFillOrNullObject","gradient",e=>new qe(this.context,e,e,!0))}getPatternFillOrNullObject(){return this.#e("getPatternFillOrNullObject","pattern",e=>new We(this.context,e,e,!0))}getPictureOrTextureFillOrNullObject(){return this.#e("getPictureOrTextureFillOrNullObject","picture",e=>new Xe(this.context,e,e,!0))}getSolidFillOrNullObject(){return this.#e("getSolidFillOrNullObject","solid",e=>new ze(this.context,e,e,!0))}setGradientFill(e){let t=this.at("setGradientFill"),n=Dt(e,["type"],t);this.writeBackground("setGradientFill",{kind:"gradient",...n.type===void 0?{}:{gradientType:Eo(n.type,`${t}.type`)}})}setPatternFill(e){let t=this.at("setPatternFill"),n=Dt(e,["backgroundColor","foregroundColor","pattern"],t);this.writeBackground("setPatternFill",{kind:"pattern",...n.pattern===void 0?{}:{pattern:kt.toFile(n.pattern,`${t}.pattern`)},...n.foregroundColor===void 0?{}:{foregroundColor:x(n.foregroundColor,`${t}.foregroundColor`)},...n.backgroundColor===void 0?{}:{backgroundColor:x(n.backgroundColor,`${t}.backgroundColor`)}})}setPictureOrTextureFill(e){let t=this.at("setPictureOrTextureFill"),n=Dt(e,["imageBase64","transparency"],t);this.writeBackground("setPictureOrTextureFill",{kind:"picture",...n.imageBase64===void 0?{}:{base64:x(n.imageBase64,`${t}.imageBase64`)},...n.transparency===void 0?{}:{transparency:X(n.transparency,`${t}.transparency`)}})}setSolidFill(e){let t=this.at("setSolidFill"),n=Dt(e,["color","transparency"],t);this.writeBackground("setSolidFill",{kind:"solid",...n.color===void 0?{}:{color:x(n.color,`${t}.color`)},...n.transparency===void 0?{}:{transparency:X(n.transparency,`${t}.transparency`)}})}#e(e,t,n){let o=u.pending(`${this.path.label}.${e}()`),i=n(o),a=this.owner,s=o.label;return this.enqueue("read",`${e}()`,l=>({op:"readBackground",owner:l(a)}),l=>{(l.kind==="null"?null:g(l,"background",s).background)?.fill.type===t&&a.isAddressable?o.resolveTo(a.handle()):o.resolveNull()},o,!1),i}onLoad(e){this.loadBackground(this.selection(e,["type"]),t=>({type:vo.fromFile(t.fill.type)??"Unsupported"}))}};function mn(r,e,t){return new _e(r,u.derived(`${e.label}.fill`,e),t)}var ve=class extends Z{#e;get areBackgroundGraphicsHidden(){return this.loadedProperty("areBackgroundGraphicsHidden")}set areBackgroundGraphicsHidden(e){let t=$(e,this.at("areBackgroundGraphicsHidden"));this.writeBackground("areBackgroundGraphicsHidden",{kind:"graphicsHidden",hidden:t})}get isMasterBackgroundFollowed(){return this.loadedProperty("isMasterBackgroundFollowed")}set isMasterBackgroundFollowed(e){let t=$(e,this.at("isMasterBackgroundFollowed"));this.writeBackground("isMasterBackgroundFollowed",{kind:t?"follow":"own"})}get fill(){return this.#e??=mn(this.context,this.path,this.owner)}reset(){this.writeBackground("reset",{kind:"follow"})}onLoad(e){let t=["areBackgroundGraphicsHidden","isMasterBackgroundFollowed"];this.loadBackground(this.selection(e,t,{fill:()=>this.fill}),n=>({areBackgroundGraphicsHidden:n.graphicsHidden,isMasterBackgroundFollowed:n.followsMaster}))}},Re=class extends Z{#e;get areBackgroundGraphicsHidden(){return this.loadedProperty("areBackgroundGraphicsHidden")}set areBackgroundGraphicsHidden(e){let t=$(e,this.at("areBackgroundGraphicsHidden"));this.writeBackground("areBackgroundGraphicsHidden",{kind:"graphicsHidden",hidden:t})}get isMasterBackgroundFollowed(){return this.loadedProperty("isMasterBackgroundFollowed")}set isMasterBackgroundFollowed(e){let t=$(e,this.at("isMasterBackgroundFollowed"));this.writeBackground("isMasterBackgroundFollowed",{kind:t?"follow":"own"})}get fill(){return this.#e??=mn(this.context,this.path,this.owner)}reset(){this.writeBackground("reset",{kind:"follow"})}onLoad(e){let t=["areBackgroundGraphicsHidden","isMasterBackgroundFollowed"];this.loadBackground(this.selection(e,t,{fill:()=>this.fill}),n=>({areBackgroundGraphicsHidden:n.graphicsHidden,isMasterBackgroundFollowed:n.followsMaster}))}},Se=class extends Z{#e;get fill(){return this.#e??=mn(this.context,this.path,this.owner)}onLoad(e){this.selection(e,[],{fill:()=>this.fill})}};var Fo=new WeakMap;function gn(r,e){Fo.get(r)?.(e)}function Bo(r,e){let t=typeof r=="string"?/^\{?([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12})\}?$/.exec(r.trim()):null;return t||h(e,"a GUID such as '{01234567-89AB-CDEF-0123-456789ABCDEF}'"),`{${t[1].toUpperCase()}}`}function Mo(r,e){return(typeof r!="string"||r.length===0)&&h(e,"non-empty XML text"),r}function Er(){return`{${globalThis.crypto.randomUUID().toUpperCase()}}`}var ue=class extends f{#e;#t;constructor(e,t,n,o,i=!1){super(e,t,{nullable:i}),this.#e=n,this.#t=o,o&&this.setLoadedProperty("id",o),Fo.set(this,a=>{this.#t=a.id,this.setLoadedProperty("id",a.id),this.setLoadedProperty("namespaceUri",a.namespaceUri)})}get id(){return this.loadedProperty("id")}get namespaceUri(){return this.loadedProperty("namespaceUri")}getXml(){let e=`${this.path.label}.getXml`,{result:t,fill:n}=k.create(e);return this.enqueue("read","getXml",o=>({op:"readCustomXml",owner:o(this.path),id:this.#t}),o=>n(g(o,"text",e).text)),t}setXml(e){let t=Mo(e,this.at("setXml"));this.command("setXml",n=>({op:"setCustomXml",owner:n(this.path),id:this.#t,xml:t}))}delete(){this.command("delete",e=>({op:"deleteCustomXmlPart",owner:e(this.path),id:this.#t}))}onLoad(e){if(!this.selection(e,["id","namespaceUri"]).includes("namespaceUri"))return;let n=`${this.path.label}.load`;this.enqueue("read","load",o=>({op:"listCustomXmlParts",owner:o(this.#e)}),o=>{if(o.kind==="null")return;let i=g(o,"customXmlParts",n).parts.find(a=>a.id===this.#t);i&&gn(this,i)})}},$t=class extends f{#e;constructor(e,t,n){super(e,t),this.#e=n}get items(){return this.loadedProperty("items")}getCount(){let e=`${this.path.label}.getCount`,{result:t,fill:n}=k.create(e);return this.enqueue("read","getCount",o=>this.#t(o),o=>n(g(o,"customXmlParts",e).parts.length)),t}getItem(e){let t=Bo(e,`${this.path.label}.getItem`);return this.find("getItem()",n=>n.find(o=>o.id===t),t,!1)}getItemAt(e){return(typeof e!="number"||!Number.isInteger(e)||e<0)&&h(`${this.path.label}.getItemAt`,"a whole number of 0 or more"),this.find(`getItemAt(${e})`,t=>t[e],void 0,!1)}getItemOrNullObject(e){let t=Bo(e,`${this.path.label}.getItemOrNullObject`);return this.find("getItemOrNullObject()",n=>n.find(o=>o.id===t),t,!0)}#t(e){return{op:"listCustomXmlParts",owner:e(this.path),...this.#e===void 0?{}:{namespaceUri:this.#e}}}find(e,t,n,o){let i=u.pending(`${this.path.label}.${e}`),a=new ue(this.context,i,this.path,n??"",o),s=i.label;return this.enqueue("read",e,l=>this.#t(l),l=>{let c=t(g(l,"customXmlParts",s).parts);if(!c){if(o)return i.resolveNull();A({code:"ItemNotFound",target:s})}gn(a,c),i.resolveTo(this.path.handle())},i,!1),a}get loadsItemPaths(){return!0}onLoad(e){for(let n of[...e.select,...e.itemSelect])["items","id","namespaceUri"].includes(n)||h(`${this.path.label}.${n}`,"a property of custom XML parts: items, id, or namespaceUri",S(n,["items","id","namespaceUri"]));let t=`${this.path.label}.items`;this.enqueue("read","items",n=>this.#t(n),n=>{let o=g(n,"customXmlParts",t).parts,i=e.top===void 0?o.length:(e.skip??0)+e.top;this.setLoadedProperty("items",o.slice(e.skip??0,i).map((a,s)=>{let l=u.of(`${t}[${s}]`,this.path.handle()),c=new ue(this.context,l,this.path,a.id);return gn(c,a),c}))})}},q=class extends $t{constructor(e,t){super(e,t)}add(e){let t=Mo(e,`${this.path.label}.add`),n=Er(),o=`${this.path.label}.add`;return this.enqueue("write","add",i=>({op:"addCustomXmlPart",owner:i(this.path),xml:t,id:n}),i=>{g(i,"customXmlParts",o)}),new ue(this.context,u.derived(`${this.path.label}.add()`,this.path),this.path,n)}getByNamespace(e){return typeof e!="string"&&h(`${this.path.label}.getByNamespace`,"a namespace URI string"),new Ve(this.context,u.derived(`${this.path.label}.getByNamespace()`,this.path),e)}},Ve=class extends $t{constructor(e,t,n){super(e,t,n)}getOnlyItem(){return this.find("getOnlyItem()",e=>e.length===1?e[0]:void 0,void 0,!1)}getOnlyItemOrNullObject(){return this.find("getOnlyItemOrNullObject()",e=>e.length===1?e[0]:void 0,void 0,!0)}};var Ho=new WeakMap;function Uo(r,e,t){Ho.get(r)?.(e,t)}var ke=class extends f{#e;#t;constructor(e,t,n,o,i=!1){super(e,t,{nullable:i}),this.#e=n,this.#t=o,o&&this.setLoadedProperty("key",o),Ho.set(this,(a,s)=>{this.#t=a,this.setLoadedProperty("key",a),this.setLoadedProperty("value",s)})}get key(){return this.loadedProperty("key")}get value(){return this.loadedProperty("value")}set value(e){let t=x(e,this.at("value"));this.command("value",n=>({op:"setTag",owner:n(this.path),key:this.#t,value:t}))}onLoad(e){let t=this.selection(e,["key","value"]),n=`${this.path.label}.load`;t.includes("value")&&this.enqueue("read","load",o=>({op:"readTags",owner:o(this.#e)}),o=>{if(o.kind==="null")return;let i=g(o,"tags",n).tags.find(a=>a.key===this.#t);i&&this.setLoadedProperty("value",i.value)})}};function It(r,e){return(typeof r!="string"||r.length===0||r.length>255)&&h(e,"a key of 1 to 255 characters"),r.toUpperCase()}var V=class extends f{constructor(e,t){super(e,t)}get items(){return this.loadedProperty("items")}add(e,t){let n=It(e,`${this.path.label}.add`),o=x(t,this.at("value"));this.command("add",i=>({op:"setTag",owner:i(this.path),key:n,value:o}))}delete(e){let t=It(e,`${this.path.label}.delete`);this.command("delete",n=>({op:"deleteTag",owner:n(this.path),key:t}))}getCount(){let e=`${this.path.label}.getCount`,{result:t,fill:n}=k.create(e);return this.enqueue("read","getCount",o=>({op:"readTags",owner:o(this.path)}),o=>n(g(o,"tags",e).tags.length)),t}getItem(e){let t=It(e,`${this.path.label}.getItem`);return this.#e("getItem()",n=>n.find(o=>o.key===t),t,!1)}getItemAt(e){return(typeof e!="number"||!Number.isInteger(e)||e<0)&&h(`${this.path.label}.getItemAt`,"a whole number of 0 or more"),this.#e(`getItemAt(${e})`,t=>t[e],void 0,!1)}getItemOrNullObject(e){let t=It(e,`${this.path.label}.getItemOrNullObject`);return this.#e("getItemOrNullObject()",n=>n.find(o=>o.key===t),t,!0)}#e(e,t,n,o){let i=u.pending(`${this.path.label}.${e}`),a=new ke(this.context,i,this.path,n??"",o),s=i.label;return this.enqueue("read",e,l=>({op:"readTags",owner:l(this.path)}),l=>{let c=t(g(l,"tags",s).tags);if(!c){if(o)return i.resolveNull();A({code:"ItemNotFound",target:s})}Uo(a,c.key,c.value),i.resolveTo(this.path.handle())},i,!1),a}get loadsItemPaths(){return!0}onLoad(e){for(let n of[...e.select,...e.itemSelect])["items","key","value"].includes(n)||h(`${this.path.label}.${n}`,"a property of tags: items, key, or value",S(n,["items","key","value"]));let t=`${this.path.label}.items`;this.enqueue("read","items",n=>({op:"readTags",owner:n(this.path)}),n=>{let o=g(n,"tags",t).tags,i=e.top===void 0?o.length:(e.skip??0)+e.top;this.setLoadedProperty("items",o.slice(e.skip??0,i).map((a,s)=>{let l=u.of(`${t}[${s}]`,this.path.handle()),c=new ke(this.context,l,this.path,a.key);return Uo(c,a.key,a.value),c}))})}};var re=class extends f{#e;constructor(e,t,n){super(e,t),this.#e=n}getThemeColor(e){let t=this.at("getThemeColor"),n=cn.toFile(e,t),{result:o,fill:i}=k.create(t),a=this.#e;return this.enqueue("read","getThemeColor",s=>({op:"readThemeColor",owner:s(a),slot:n}),s=>i(g(s,"text",t).text)),o}setThemeColor(e,t){let n=cn.toFile(e,this.at("setThemeColor")),o=x(t,this.at("rgbColor")),i=this.#e;this.command("setThemeColor",a=>({op:"setThemeColor",owner:a(i),slot:n,color:o}))}};var J=class extends f{#e;#t;#n;#o;#r;#i;#a;#s;constructor(e,t,n=!1){super(e,t,{nullable:n})}get id(){return this.loadedProperty("id")}get index(){return this.loadedProperty("index")}get shapes(){return this.#e??=new ie(this.context,u.derived(`${this.path.label}.shapes`,this.path),this.path)}get tags(){return this.#t??=new V(this.context,u.derived(`${this.path.label}.tags`,this.path))}get customXmlParts(){return this.#n??=new q(this.context,u.derived(`${this.path.label}.customXmlParts`,this.path))}get hyperlinks(){return this.#o??=new De(this.context,u.derived(`${this.path.label}.hyperlinks`,this.path),this.path)}get background(){return this.#a??=new ve(this.context,u.derived(`${this.path.label}.background`,this.path),this.path)}get themeColorScheme(){return this.#s??=new re(this.context,u.derived(`${this.path.label}.themeColorScheme`,this.path),this.path)}get layout(){return this.#r??=this.navigation("layout",e=>new G(this.context,e),e=>({op:"getSlideLayout",slide:e(this.path)}))}get slideMaster(){return this.#i??=this.navigation("slideMaster",e=>new ee(this.context,e),e=>({op:"getSlideMaster",owner:e(this.path)}))}applyLayout(e){let t=U(e);this.command("applyLayout",n=>({op:"applyLayout",slide:n(this.path),layout:n(t)}))}delete(){this.command("delete",e=>({op:"deleteSlide",slide:e(this.path)}))}moveTo(e){(typeof e!="number"||!Number.isInteger(e)||e<0)&&h(`${this.path.label}.moveTo`,"a whole number of 0 or more"),this.command("moveTo",t=>({op:"moveSlide",slide:t(this.path),index:e}))}getImageAsBase64(e){let t=this.at("getImageAsBase64"),n=Lt(e,t,!1),{result:o,fill:i}=k.create(t);return this.enqueue("read","getImageAsBase64",a=>({op:"prepareImage",target:a(this.path),...n}),jt(this.internals,n,t,i)),o}exportAsBase64(){let e=`${this.path.label}.exportAsBase64`,{result:t,fill:n}=k.create(e);return this.enqueue("read","exportAsBase64",o=>({op:"exportSlides",slides:[o(this.path)]}),o=>n(g(o,"base64",e).base64)),t}setSelectedShapes(e){Array.isArray(e)||h("setSelectedShapes","an array of shape ids");let t=e.map(n=>this.shapes.getItem(x(n,this.at("setSelectedShapes"))));this.command("setSelectedShapes",n=>({op:"selectShapes",shapes:t.map(o=>n(U(o)))}))}onLoad(e){let t=this.selection(e,["id","index"],{shapes:()=>this.shapes,tags:()=>this.tags,hyperlinks:()=>this.hyperlinks,layout:()=>this.layout,slideMaster:()=>this.slideMaster,background:()=>this.background,themeColorScheme:()=>this.themeColorScheme,customXmlParts:()=>this.customXmlParts});this.loadScalars(t,"slide",n=>({op:"readSlide",slide:n(this.path)}),n=>({id:n.slide.id,index:n.slide.index}))}},Te=class extends oe{constructor(e,t){super(e,t)}add(e){let t=e?.layoutId,n=e?.slideMasterId;e!==void 0&&(typeof e!="object"||e===null)&&h("presentation.slides.add","an AddSlideOptions object");for(let o of Object.keys(e??{}))o!=="layoutId"&&o!=="slideMasterId"&&A({code:"NotImplemented",target:`presentation.slides.add.${o}`});this.enqueue("write","add",()=>({op:"addSlide",...t===void 0?{}:{layoutId:x(t,this.at("layoutId"))},...n===void 0?{}:{masterId:x(n,this.at("slideMasterId"))}}))}exportAsBase64Presentation(e){(!Array.isArray(e)||e.length===0)&&h("presentation.slides.exportAsBase64Presentation","a non-empty array of slides or slide ids");let n=e.map(s=>typeof s=="string"?this.getItem(s):s).map(s=>U(s)),o=`${this.path.label}.exportAsBase64Presentation`,{result:i,fill:a}=k.create(o);return this.enqueue("read","exportAsBase64Presentation",s=>({op:"exportSlides",slides:n.map(l=>s(l))}),s=>a(g(s,"base64",o).base64)),i}getItem(e){return this.find({id:this.keyArg(e,"getItem")},"getItem()",!1)}getItemAt(e){let t=this.indexArg(e);return this.find({index:t},`getItemAt(${t})`,!1)}getItemOrNullObject(e){return this.find({id:this.keyArg(e,"getItemOrNullObject")},"getItemOrNullObject()",!0)}listing(){return{op:"listSlides"}}itemOf(e,t){return new J(this.context,e,t)}lookup(e,t,n){return{op:"getSlide",key:t,...n?{orNull:!0}:{}}}},Le=class extends oe{constructor(e,t,n){super(e,t)}exportAsBase64Presentation(){let e=`${this.path.label}.exportAsBase64Presentation`,{result:t,fill:n}=k.create(e),o=u.pending(`${this.path.label}.items`),i=[];return this.enqueue("read","items",()=>this.listing(),a=>{i=this.handlesOf(a,e),i[0]?o.resolveTo(i[0]):o.resolveNull()},o,!1),this.enqueue("read","exportAsBase64Presentation",a=>(o.isNull&&A({code:"ItemNotFound",target:e}),a(o),{op:"exportSlides",slides:i}),a=>n(g(a,"base64",e).base64)),t}getItem(e){return this.find({id:this.keyArg(e,"getItem")},"getItem()",!1)}getItemAt(e){let t=this.indexArg(e);return this.find({index:t},`getItemAt(${t})`,!1)}getItemOrNullObject(e){return this.find({id:this.keyArg(e,"getItemOrNullObject")},"getItemOrNullObject()",!0)}listing(){return{op:"readSelection"}}handlesOf(e,t){return g(e,"selection",t).selection.slides}get hasLookup(){return!1}itemOf(e,t){return new J(this.context,e,t)}lookup(){}},Br=["id","name","type"],G=class extends f{#e;#t;#n;#o;constructor(e,t,n=!1){super(e,t,{nullable:n})}get id(){return this.loadedProperty("id")}get name(){return this.loadedProperty("name")}get type(){return this.loadedProperty("type")}get shapes(){return this.#e??=new ie(this.context,u.derived(`${this.path.label}.shapes`,this.path),this.path)}get background(){return this.#t??=new Re(this.context,u.derived(`${this.path.label}.background`,this.path),this.path)}get customXmlParts(){return this.#o??=new q(this.context,u.derived(`${this.path.label}.customXmlParts`,this.path))}get themeColorScheme(){return this.#n??=new re(this.context,u.derived(`${this.path.label}.themeColorScheme`,this.path),this.path)}onLoad(e){let t=this.selection(e,Br,{shapes:()=>this.shapes,background:()=>this.background,themeColorScheme:()=>this.themeColorScheme,customXmlParts:()=>this.customXmlParts});this.loadScalars(t,"layout",n=>({op:"readLayout",layout:n(this.path)}),n=>({id:n.layout.id,name:n.layout.name,type:wo.fromFile(n.layout.type)??"Custom"}))}},Ke=class extends oe{#e;constructor(e,t,n){super(e,t),this.#e=n}getItem(e){return this.find({id:this.keyArg(e,"getItem")},"getItem()",!1)}getItemAt(e){let t=this.indexArg(e);return this.find({index:t},`getItemAt(${t})`,!1)}getItemOrNullObject(e){return this.find({id:this.keyArg(e,"getItemOrNullObject")},"getItemOrNullObject()",!0)}listing(e){return{op:"listLayouts",master:e(this.#e)}}itemOf(e,t){return new G(this.context,e,t)}lookup(e,t,n){return{op:"getLayout",master:e(this.#e),key:t,...n?{orNull:!0}:{}}}},ee=class extends f{#e;#t;#n;#o;#r;constructor(e,t,n=!1){super(e,t,{nullable:n})}get id(){return this.loadedProperty("id")}get name(){return this.loadedProperty("name")}get layouts(){return this.#e??=new Ke(this.context,u.derived(`${this.path.label}.layouts`,this.path),this.path)}get shapes(){return this.#t??=new ie(this.context,u.derived(`${this.path.label}.shapes`,this.path),this.path)}get background(){return this.#n??=new Se(this.context,u.derived(`${this.path.label}.background`,this.path),this.path)}get customXmlParts(){return this.#r??=new q(this.context,u.derived(`${this.path.label}.customXmlParts`,this.path))}get themeColorScheme(){return this.#o??=new re(this.context,u.derived(`${this.path.label}.themeColorScheme`,this.path),this.path)}onLoad(e){let t=this.selection(e,["id","name"],{layouts:()=>this.layouts,shapes:()=>this.shapes,background:()=>this.background,themeColorScheme:()=>this.themeColorScheme,customXmlParts:()=>this.customXmlParts});this.loadScalars(t,"layout",n=>({op:"readMaster",master:n(this.path)}),n=>({id:n.layout.id,name:n.layout.name}))}},je=class extends oe{constructor(e,t){super(e,t)}getItem(e){return this.find({id:this.keyArg(e,"getItem")},"getItem()",!1)}getItemAt(e){let t=this.indexArg(e);return this.find({index:t},`getItemAt(${t})`,!1)}getItemOrNullObject(e){return this.find({id:this.keyArg(e,"getItemOrNullObject")},"getItemOrNullObject()",!0)}listing(){return{op:"listMasters"}}itemOf(e,t){return new ee(this.context,e,t)}lookup(e,t,n){return{op:"getMaster",key:t,...n?{orNull:!0}:{}}}};var ut=class extends f{target;constructor(e,t,n){super(e,t),this.target=n}loadCellFormat(e,t){let{shape:n,cell:o}=this.target;this.loadScalars(e,"tableCellFormat",i=>({op:"readTableCellFormat",shape:i(n),cell:o}),i=>t(i.format))}};function Fr(r){return r.visible?{color:r.color??void 0,dashStyle:ce.fromFile(r.dashStyle)??"Solid",transparency:r.transparency??0,weight:r.weight??void 0}:{color:void 0,dashStyle:void 0,transparency:void 0,weight:void 0}}var Mr=["color","dashStyle","transparency","weight"],Qe=class extends ut{#e;constructor(e,t,n,o){super(e,t,n),this.#e=o}get color(){return this.loadedProperty("color")}set color(e){this.#t("color",{color:x(e,this.at("color"))})}get dashStyle(){return this.loadedProperty("dashStyle")}set dashStyle(e){this.#t("dashStyle",{dashStyle:ce.toFile(e,this.at("dashStyle"))})}get transparency(){return this.loadedProperty("transparency")}set transparency(e){this.#t("transparency",{transparency:X(e,this.at("transparency"))})}get weight(){return this.loadedProperty("weight")}set weight(e){let t=R(e,this.at("weight"));t<0&&h(this.at("weight"),"a weight of 0 or more points"),this.#t("weight",{weight:t})}#t(e,t){let{shape:n,cell:o}=this.target,i=this.#e;this.command(e,a=>({op:"setTableCellBorder",shape:a(n),cell:o,side:i,line:t}))}onLoad(e){let t=this.#e;this.loadCellFormat(this.selection(e,Mr),n=>Fr(n.borders[t]))}},zo=["left","right","top","bottom","diagonalDown","diagonalUp"],$e=class extends ut{#e=new Map;get bottom(){return this.#t("bottom")}get diagonalDown(){return this.#t("diagonalDown")}get diagonalUp(){return this.#t("diagonalUp")}get left(){return this.#t("left")}get right(){return this.#t("right")}get top(){return this.#t("top")}#t(e){let t=this.#e.get(e);return t||(t=new Qe(this.context,u.derived(`${this.path.label}.${e}`,this.path),this.target,e),this.#e.set(e,t)),t}onLoad(e){let t=Object.fromEntries(zo.map(o=>[o,()=>this.#t(o)])),n=Rt(e)?[...zo]:e.select;this.selection({...e,select:n},[],t)}},Ur=["bottom","left","right","top"],Ie=class extends ut{get bottom(){return this.loadedProperty("bottom")}set bottom(e){this.#e("bottom",e)}get left(){return this.loadedProperty("left")}set left(e){this.#e("left",e)}get right(){return this.loadedProperty("right")}set right(e){this.#e("right",e)}get top(){return this.loadedProperty("top")}set top(e){this.#e("top",e)}#e(e,t){let n=t===void 0?null:R(t,this.at(e));n!==null&&n<0&&h(this.at(e),"a margin of 0 or more points");let{shape:o,cell:i}=this.target;this.command(e,a=>({op:"setTableCellMargins",shape:a(o),cell:i,margins:{[e]:n}}))}onLoad(e){this.loadCellFormat(this.selection(e,Ur),t=>({...t.margins}))}},qo=[["areColumnsBanded","bandedColumns"],["areRowsBanded","bandedRows"],["isFirstColumnHighlighted","firstColumn"],["isFirstRowHighlighted","firstRow"],["isLastColumnHighlighted","lastColumn"],["isLastRowHighlighted","lastRow"]],Wo=Symbol("unknown table style"),Ne=class extends f{#e;constructor(e,t,n){super(e,t),this.#e=n}get areColumnsBanded(){return this.loadedProperty("areColumnsBanded")}set areColumnsBanded(e){this.#t("areColumnsBanded","bandedColumns",e)}get areRowsBanded(){return this.loadedProperty("areRowsBanded")}set areRowsBanded(e){this.#t("areRowsBanded","bandedRows",e)}get isFirstColumnHighlighted(){return this.loadedProperty("isFirstColumnHighlighted")}set isFirstColumnHighlighted(e){this.#t("isFirstColumnHighlighted","firstColumn",e)}get isFirstRowHighlighted(){return this.loadedProperty("isFirstRowHighlighted")}set isFirstRowHighlighted(e){this.#t("isFirstRowHighlighted","firstRow",e)}get isLastColumnHighlighted(){return this.loadedProperty("isLastColumnHighlighted")}set isLastColumnHighlighted(e){this.#t("isLastColumnHighlighted","lastColumn",e)}get isLastRowHighlighted(){return this.loadedProperty("isLastRowHighlighted")}set isLastRowHighlighted(e){this.#t("isLastRowHighlighted","lastRow",e)}get style(){let e=this.loadedProperty("style");return e===Wo&&A({code:"NotImplemented",target:this.at("style"),diagnostic:I("table-style-unknown")}),e}set style(e){this.#n("style",{styleName:Tt(e,this.at("style"))})}#t(e,t,n){this.#n(e,{[t]:$(n,this.at(e))})}#n(e,t){let n=this.#e;this.command(e,o=>({op:"setTableStyle",shape:o(n),style:t}))}onLoad(e){let t=this.selection(e,[...qo.map(([o])=>o),"style"]),n=this.#e;this.loadScalars(t,"table",o=>({op:"readTable",shape:o(n)}),({table:{style:o}})=>{let i={};for(let[a,s]of qo)i[a]=o[s];return i.style=o.styleId===null&&o.styleName===null?"NoStyleNoGrid":(o.styleName===null?null:Ro(o.styleName))??Wo,i})}};var fn=new Set(["allCaps","bold","color","doubleStrikethrough","italic","name","size","smallCaps","strikethrough","subscript","superscript","underline"]);function Hr(r,e){if(r===void 0)return;(typeof r!="object"||r===null)&&h(e,"an object of font properties");let t={};for(let[n,o]of Object.entries(r))fn.has(n)||h(`${e}.${n}`,`a font property: ${z([...fn])}`,S(n,[...fn])),o!==void 0&&(t[n]=n==="underline"?he.toFile(o,`${e}.underline`):o);return Object.keys(t).length===0?void 0:t}function Nt(r,e){return(typeof r!="number"||!Number.isInteger(r)||r<1)&&h(e,"a whole number of 1 or more"),r}var Et=new WeakMap,K=class extends f{#e;#t;#n;#o;#r;#i;constructor(e,t,n,o){super(e,t,{nullable:!0}),this.#e=Object.freeze({row:n,column:o}),Et.set(this,i=>{for(let[a,s]of Object.entries(i))this.setLoadedProperty(a,s)})}get text(){return this.loadedProperty("text")}set text(e){let t=x(e,this.at("text"));this.#s("text",{op:"setTableCell",...this.#e,text:t})}get rowIndex(){return this.loadedProperty("rowIndex")}get columnIndex(){return this.loadedProperty("columnIndex")}get rowCount(){return this.loadedProperty("rowCount")}get columnCount(){return this.loadedProperty("columnCount")}get font(){return this.#t??=new pe(this.context,u.derived(`${this.path.label}.font`,this.path),this.path,()=>{},this.#e)}get borders(){return this.#r??=new $e(this.context,u.derived(`${this.path.label}.borders`,this.path),{shape:this.path,cell:this.#e})}get margins(){return this.#i??=new Ie(this.context,u.derived(`${this.path.label}.margins`,this.path),{shape:this.path,cell:this.#e})}get fill(){return this.#n??=new ne(this.context,u.derived(`${this.path.label}.fill`,this.path),{kind:"cell",shape:this.path,cell:this.#e})}get horizontalAlignment(){return this.loadedProperty("horizontalAlignment")}set horizontalAlignment(e){this.#a().horizontalAlignment=e}get indentLevel(){return this.loadedProperty("indentLevel")}set indentLevel(e){this.#a().indentLevel=R(e,this.at("indentLevel"))}get verticalAlignment(){return this.loadedProperty("verticalAlignment")}set verticalAlignment(e){let t=de.toFile(e,`${this.path.label}.verticalAlignment`),n=t.endsWith("Centered"),o=n?t.slice(0,-8):t;this.#s("verticalAlignment",{op:"setTableCellAnchor",...this.#e,anchor:o,anchorCenter:n})}get textRuns(){return this.loadedProperty("textRuns")}set textRuns(e){let t=`${this.path.label}.textRuns`;Array.isArray(e)||h(t,"an array of text runs");let n=0,o=[],i=e.map((s,l)=>{(typeof s!="object"||s===null||typeof s.text!="string")&&h(`${t}[${l}]`,"a text run with a text string");let c=Hr(s.font,`${t}[${l}].font`),p=s.text.replace(/\r\n|\n/g,"\r");return c&&p.length>0&&o.push({span:{start:n,length:p.length},font:c}),n+=p.length,p}).join(""),a=this.#e;this.command("textRuns",s=>({op:"setText",shape:s(this.path),text:i,cell:a}));for(let{span:s,font:l}of o)this.command("textRuns",c=>({op:"setFont",shape:c(this.path),span:s,font:l,cell:a}))}resize(e,t){let n=`${this.path.label}.resize`;this.#s("resize",{op:"resizeTableCell",...this.#e,rowCount:Nt(e,n),columnCount:Nt(t,n)})}split(e,t){let n=`${this.path.label}.split`;this.#s("split",{op:"splitTableCell",...this.#e,rowCount:Nt(e,n),columnCount:Nt(t,n)})}#a(){return this.#o??=new me(this.context,u.derived(`${this.path.label}.paragraphFormat`,this.path),this.path,()=>{},this.#e)}#s(e,t){this.command(e,n=>({...t,shape:n(this.path)}))}onLoad(e){let t=this.selection(e,["text","rowIndex","columnIndex","rowCount","columnCount","verticalAlignment","horizontalAlignment","indentLevel","textRuns"],{font:()=>this.font,fill:()=>this.fill,borders:()=>this.borders,margins:()=>this.margins}),n=this.#e,o=t.filter(a=>a!=="horizontalAlignment"&&a!=="indentLevel"&&a!=="textRuns");this.loadScalars(o,"tableCell",a=>({op:"readTableCell",shape:a(this.path),...n}),a=>({...a.cell,verticalAlignment:de.fromFile(a.cell.anchor+(a.cell.anchorCenter?"Centered":""))})),this.loadScalars(t.filter(a=>a==="textRuns"),"textRuns",a=>({op:"readTextRuns",shape:a(this.path),cell:n}),a=>({textRuns:a.runs.map(zr)}));let i=t.filter(a=>a==="horizontalAlignment"||a==="indentLevel");this.loadScalars(i,"paragraph",a=>({op:"readParagraph",shape:a(this.path),cell:n}),a=>({horizontalAlignment:Ce.fromFile(a.paragraph.alignment),indentLevel:a.paragraph.indentLevel}))}};function zr(r){let{underline:e,...t}=r.font,n={};for(let[i,a]of Object.entries(t))a!==null&&(n[i]=a);let o=e===null?null:he.fromFile(e);return o&&(n.underline=o),{text:r.text,font:n}}function Xo(r,e,t){let n=U(r),o=`${n.label}.getCellOrNullObject(${e}, ${t})`;return new K(r.context,u.derived(o,n),e,t)}function Q(r,e,t){(typeof r!="object"||r===null||Array.isArray(r))&&h(t,"an object of options");for(let n of Object.keys(r))e.includes(n)||h(`${t}.${n}`,`an option name: ${z(e)}`,S(n,e));return r}function Ye(r,e){return typeof r!="string"&&h(e,"a string"),r}function bn(r,e){let t=R(r,e);return t<=0&&h(e,"a number greater than 0"),t}function _o(r,e){let t=R(r,e);return t<0&&h(e,"a number of 0 or more"),t}function Bt(r,e,t,n){return(typeof r!="number"||!Number.isInteger(r)||r<e||r>t)&&h(n,`a whole number from ${e} to ${t}`),r}function ge(r,e,t){return(!Array.isArray(r)||e!==void 0&&r.length!==e)&&h(t,e===void 0?"an array":`an array of ${e} entries, one for each ${t.endsWith("values")||t.endsWith("rows")||t.endsWith("specificCellProperties")?"row":"entry"}`),r}var qr=["color","dashStyle","transparency","weight"],Vo=["bottom","diagonalDown","diagonalUp","left","right","top"],Ko=["bottom","left","right","top"],yn=["allCaps","bold","color","doubleStrikethrough","italic","name","size","smallCaps","strikethrough","subscript","superscript","underline"],Wr=["borders","fill","font","horizontalAlignment","indentLevel","margins","text","textRuns","verticalAlignment"];function Qo(r,e){let t=Q(r,yn,e);for(let n of yn){let o=t[n],i=`${e}.${n}`;o!==void 0&&(n==="underline"?he.toFile(o,i):n==="name"||n==="color"?Ye(o,i):n==="size"?bn(o,i):typeof o!="boolean"&&h(i,"true or false"))}}function Yo(r,e){let t=Q(r,Wr,e),n=[],{borders:o,fill:i,font:a,horizontalAlignment:s,indentLevel:l,margins:c,text:p,textRuns:C}=t;if(p!==void 0&&C!==void 0&&h(`${e}.textRuns`,"text or textRuns, not both"),p!==void 0){let b=Ye(p,`${e}.text`);n.push(w=>w.text=b)}if(C!==void 0){let b=ge(C,void 0,`${e}.textRuns`).map((w,P)=>{let T=Q(w,["font","text"],`${e}.textRuns[${P}]`);return Ye(T.text,`${e}.textRuns[${P}].text`),T.font!==void 0&&Qo(T.font,`${e}.textRuns[${P}].font`),w});n.push(w=>w.textRuns=b)}if(a!==void 0){Qo(a,`${e}.font`);let b=a;n.push(w=>{for(let P of yn)b[P]!==void 0&&(w.font[P]=b[P])})}if(i!==void 0){let b=Q(i,["color","transparency"],`${e}.fill`),w=b.color===void 0?void 0:Ye(b.color,`${e}.fill.color`),P=b.transparency===void 0?void 0:X(b.transparency,`${e}.fill.transparency`);n.push(T=>{w!==void 0&&T.fill.setSolidColor(w),P!==void 0&&(T.fill.transparency=P)})}if(s!==void 0){Ce.toFile(s,`${e}.horizontalAlignment`);let b=s;n.push(w=>w.horizontalAlignment=b)}if(l!==void 0){let b=R(l,`${e}.indentLevel`);n.push(w=>w.indentLevel=b)}if(t.verticalAlignment!==void 0){de.toFile(t.verticalAlignment,`${e}.verticalAlignment`);let b=t.verticalAlignment;n.push(w=>w.verticalAlignment=b)}if(c!==void 0){let b=Q(c,Ko,`${e}.margins`);for(let w of Ko)if(b[w]!==void 0){let P=_o(b[w],`${e}.margins.${w}`);n.push(T=>T.margins[w]=P)}}if(o!==void 0){let b=Q(o,Vo,`${e}.borders`);for(let w of Vo){if(b[w]===void 0)continue;let P=`${e}.borders.${w}`,T=Q(b[w],qr,P);T.color!==void 0&&Ye(T.color,`${P}.color`),T.dashStyle!==void 0&&ce.toFile(T.dashStyle,`${P}.dashStyle`),T.transparency!==void 0&&X(T.transparency,`${P}.transparency`),T.weight!==void 0&&_o(T.weight,`${P}.weight`);let _=T;n.push(j=>{let D=j.borders[w];_.color!==void 0&&(D.color=_.color),_.weight!==void 0&&(D.weight=_.weight),_.dashStyle!==void 0&&(D.dashStyle=_.dashStyle),_.transparency!==void 0&&(D.transparency=_.transparency)})}}return b=>{for(let w of n)w(b)}}var Xr=["columns","height","left","mergedAreas","rows","specificCellProperties","style","top","uniformCellProperties","values","width"];function Zo(r,e,t,n){if(r===void 0)return{values:void 0,apply:()=>{}};let o=Q(r,Xr,n),i=[],a;if(o.values!==void 0&&(a=ge(o.values,e,`${n}.values`).map(s=>ge(s,t,`${n}.values`).map(l=>Ye(l,`${n}.values`)))),o.style!==void 0){Tt(o.style,`${n}.style`);let s=o.style;i.push(l=>l.styleSettings.style=s)}if(o.columns!==void 0&&ge(o.columns,t,`${n}.columns`).forEach((s,l)=>{let c=Q(s,["columnWidth"],`${n}.columns[${l}]`);if(c.columnWidth===void 0)return;let p=bn(c.columnWidth,`${n}.columns[${l}].columnWidth`);i.push(C=>C.columns.getItemAt(l).width=p)}),o.rows!==void 0&&ge(o.rows,e,`${n}.rows`).forEach((s,l)=>{let c=Q(s,["rowHeight"],`${n}.rows[${l}]`);if(c.rowHeight===void 0)return;let p=bn(c.rowHeight,`${n}.rows[${l}].rowHeight`);i.push(C=>C.rows.getItemAt(l).height=p)}),o.mergedAreas!==void 0&&ge(o.mergedAreas,void 0,`${n}.mergedAreas`).forEach((s,l)=>{let c=`${n}.mergedAreas[${l}]`,p=Q(s,["columnCount","columnIndex","rowCount","rowIndex"],c),C=Bt(p.rowIndex,0,e-1,`${c}.rowIndex`),b=Bt(p.columnIndex,0,t-1,`${c}.columnIndex`),w=Bt(p.rowCount,1,e-C,`${c}.rowCount`),P=Bt(p.columnCount,1,t-b,`${c}.columnCount`);i.push(T=>T.mergeCells(C,b,w,P))}),o.uniformCellProperties!==void 0){let s=Yo(o.uniformCellProperties,`${n}.uniformCellProperties`);i.push(l=>{for(let c=0;c<e;c+=1)for(let p=0;p<t;p+=1)s(Xo(l,c,p))})}if(o.specificCellProperties!==void 0){let s=`${n}.specificCellProperties`,l=ge(o.specificCellProperties,e,s).map((c,p)=>ge(c,t,`${s}[${p}]`).map((C,b)=>Yo(C,`${s}[${p}][${b}]`)));i.push(c=>l.forEach((p,C)=>p.forEach((b,w)=>b(Xo(c,C,w)))))}return{values:a,apply:s=>{for(let l of i)l(s)}}}function xn(r,e){return(typeof r!="number"||!Number.isInteger(r)||r<1)&&h(e,"a whole number of 1 or more"),r}function fe(r,e){return(typeof r!="number"||!Number.isInteger(r)||r<0)&&h(e,"a whole number of 0 or more"),r}var Ee=class extends f{#e;#t;#n;#o;constructor(e,t,n){super(e,t),this.#e=n}get columnCount(){return this.loadedProperty("columnCount")}get rowCount(){return this.loadedProperty("rowCount")}get values(){return this.loadedProperty("values")}get rows(){return this.#t??=new Ge(this.context,u.derived(`${this.path.label}.rows`,this.path))}get columns(){return this.#n??=new et(this.context,u.derived(`${this.path.label}.columns`,this.path))}get styleSettings(){return this.#o??=new Ne(this.context,u.derived(`${this.path.label}.styleSettings`,this.path),this.path)}getMergedAreas(){return new tt(this.context,u.derived(`${this.path.label}.getMergedAreas()`,this.path))}getShape(){return this.#e}getCellOrNullObject(e,t){let n=fe(e,`${this.path.label}.getCellOrNullObject`),o=fe(t,`${this.path.label}.getCellOrNullObject`),i=u.pending(`${this.path.label}.getCellOrNullObject(${n}, ${o})`),a=new K(this.context,i,n,o),s=i.label;return this.enqueue("read",`getCellOrNullObject(${n}, ${o})`,l=>({op:"readTableCell",shape:l(this.path),row:n,column:o}),l=>{if(l.kind==="null")return i.resolveNull();g(l,"tableCell",s),i.resolveTo(this.path.handle())},i,!1),a}mergeCells(e,t,n,o){let i=`${this.path.label}.mergeCells`,a={op:"mergeTableCells",row:fe(e,i),column:fe(t,i),rowCount:xn(n,i),columnCount:xn(o,i)};this.command("mergeCells",s=>({...a,shape:s(this.path)}))}clear(e){let t=`${this.path.label}.clear`;e!==void 0&&(typeof e!="object"||e===null)&&h(t,"a TableClearOptions object");for(let l of Object.keys(e??{}))l!=="all"&&l!=="format"&&l!=="text"&&h(`${t}.${l}`,"the options all, format, or text",S(l,["all","format","text"]));let{all:n,format:o,text:i}=e??{};for(let l of[n,o,i])l!==void 0&&typeof l!="boolean"&&h(t,"true or false");let a=n===!0||n===void 0&&o===void 0&&i===void 0,s={op:"clearTable",text:a||i===!0,format:a||o===!0};!s.text&&!s.format||this.command("clear",l=>({...s,shape:l(this.path)}))}onLoad(e){let t=this.selection(e,["columnCount","rowCount","values"],{rows:()=>this.rows,columns:()=>this.columns,styleSettings:()=>this.styleSettings});this.loadScalars(t,"table",n=>({op:"readTable",shape:n(this.path)}),n=>({columnCount:n.table.columnCount,rowCount:n.table.rowCount,values:n.table.values.map(o=>[...o])}))}},_r={target:"row",index:"rowIndex",size:"height"},Vr={target:"column",index:"columnIndex",size:"width"},An=new WeakMap,Ft=class extends f{#e;#t;constructor(e,t,n,o,i){super(e,t),this.#e=n,this.#t=i,this.setLoadedProperty(i.index,n),this.setLoadedProperty(i.size,o),An.set(this,{at:n,size:a=>this.setLoadedProperty(i.size,a)})}get target(){return this.#t.target}delete(){let e=this.target==="row"?"deleteTableRows":"deleteTableColumns";this.command("delete",t=>({op:e,shape:t(this.path),index:this.#e,count:1}))}writeSize(e,t){let n=R(t,e);n<=0&&h(`${this.path.label}.${e}`,"a size greater than 0 points"),this.command(e,o=>({op:"setTableSize",shape:o(this.path),target:this.target,index:this.#e,size:n}))}onLoad(e){this.selection(e,[this.#t.index,this.#t.size,"currentHeight"])}},Ze=class extends Ft{constructor(e,t,n,o){super(e,t,n,o,_r)}get rowIndex(){return this.loadedProperty("rowIndex")}get height(){return this.loadedProperty("height")}set height(e){this.writeSize("height",e)}get currentHeight(){return this.loadedProperty("height")}},Je=class extends Ft{constructor(e,t,n,o){super(e,t,n,o,Vr)}get columnIndex(){return this.loadedProperty("columnIndex")}get width(){return this.loadedProperty("width")}set width(e){this.writeSize("width",e)}},Mt=class extends f{get items(){return this.loadedProperty("items")}add(e,t){let n=e==null?void 0:fe(e,"index"),o=t===void 0?1:xn(t,"count"),i=this.target==="row"?"insertTableRows":"insertTableColumns";this.command("add",a=>({op:i,shape:a(this.path),...n===void 0?{}:{index:n},count:o}))}getCount(){let e=`${this.path.label}.getCount`,{result:t,fill:n}=k.create(e);return this.enqueue("read","getCount",o=>this.#e(o),o=>n(this.#t(g(o,"table",e).table).length)),t}getItemAt(e){let t=fe(e,`${this.path.label}.getItemAt`),n=this.make(u.derived(`${this.path.label}.getItemAt(${t})`,this.path),t,0),o=`${this.path.label}.getItemAt(${t})`;return this.enqueue("read",`getItemAt(${t})`,i=>this.#e(i),i=>{let a=this.#t(g(i,"table",o).table)[t];a===void 0&&A({code:"ItemNotFound",target:o}),An.get(n)?.size(a)}),n}deleteLines(e,t){Array.isArray(e)||h(`${this.path.label}.${t}`,"an array of rows or columns of this table");let n=i=>An.get(i)?.at??0,o=[...e].sort((i,a)=>n(a)-n(i));for(let i of o)i.delete()}#e(e){return{op:"readTable",shape:e(this.path)}}#t(e){return this.target==="row"?e.rowHeights:e.columnWidths}get loadsItemPaths(){return!0}onLoad(e){let t=`${this.path.label}.items`;this.enqueue("read","items",n=>this.#e(n),n=>{let o=this.#t(g(n,"table",t).table);this.setLoadedProperty("items",o.map((i,a)=>this.make(u.derived(`${t}[${a}]`,this.path),a,i)))})}},Ge=class extends Mt{constructor(e,t){super(e,t)}deleteRows(e){this.deleteLines(e,"deleteRows")}get target(){return"row"}make(e,t,n){return new Ze(this.context,e,t,n)}},et=class extends Mt{constructor(e,t){super(e,t)}deleteColumns(e){this.deleteLines(e,"deleteColumns")}get target(){return"column"}make(e,t,n){return new Je(this.context,e,t,n)}},tt=class extends f{constructor(e,t){super(e,t)}get items(){return this.loadedProperty("items")}getCount(){let e=`${this.path.label}.getCount`,{result:t,fill:n}=k.create(e);return this.enqueue("read","getCount",o=>this.#e(o),o=>n(g(o,"table",e).table.mergedAreas.length)),t}getItemAtOrNullObject(e,t){let n=fe(e,`${this.path.label}.getItemAtOrNullObject`),o=fe(t,`${this.path.label}.getItemAtOrNullObject`),i=u.pending(`${this.path.label}.getItemAtOrNullObject(${n}, ${o})`),a=new K(this.context,i,n,o),s=i.label;return this.enqueue("read",`getItemAtOrNullObject(${n}, ${o})`,l=>this.#e(l),l=>{let c=g(l,"table",s).table.mergedAreas.find(p=>n>=p.rowIndex&&n<p.rowIndex+p.rowCount&&o>=p.columnIndex&&o<p.columnIndex+p.columnCount);if(!c)return i.resolveNull();Et.get(a)?.(Jo(c)),i.resolveTo(this.path.handle())},i,!1),a}#e(e){return{op:"readTable",shape:e(this.path)}}get loadsItemPaths(){return!0}onLoad(e){let t=`${this.path.label}.items`;this.enqueue("read","items",n=>this.#e(n),n=>{let o=g(n,"table",t).table.mergedAreas;this.setLoadedProperty("items",o.map((i,a)=>{let s=new K(this.context,u.derived(`${t}[${a}]`,this.path),i.rowIndex,i.columnIndex);return Et.get(s)?.(Jo(i)),s}))})}};function Jo(r){return{rowIndex:r.rowIndex,columnIndex:r.columnIndex,rowCount:r.rowCount,columnCount:r.columnCount}}var Kr=["id","name","type","left","top","width","height","rotation","visible","zOrderPosition","level","altTextTitle","altTextDescription","isDecorative","creationId"];function Ut(r,e){if(r===void 0)return{};(typeof r!="object"||r===null)&&h(e,"a ShapeAddOptions object");let t={};for(let n of["left","top","width","height"]){let o=r[n];o!==void 0&&(t[n]=R(o,`${e}.${n}`))}return t}var B=class r extends f{#e;#t;#n;#o;#r;#i;#a;#s;#d;constructor(e,t,n=!1){super(e,t,{nullable:n})}get id(){return this.loadedProperty("id")}get name(){return this.loadedProperty("name")}set name(e){this.#l("name",{name:x(e,this.at("name"))})}get type(){return this.loadedProperty("type")}get left(){return this.loadedProperty("left")}set left(e){this.#l("left",{left:R(e,this.at("left"))})}get top(){return this.loadedProperty("top")}set top(e){this.#l("top",{top:R(e,this.at("top"))})}get width(){return this.loadedProperty("width")}set width(e){this.#l("width",{width:R(e,this.at("width"))})}get height(){return this.loadedProperty("height")}set height(e){this.#l("height",{height:R(e,this.at("height"))})}get rotation(){return this.loadedProperty("rotation")}set rotation(e){this.#l("rotation",{rotation:R(e,this.at("rotation"))})}get visible(){return this.loadedProperty("visible")}set visible(e){this.#l("visible",{visible:$(e,this.at("visible"))})}get zOrderPosition(){return this.loadedProperty("zOrderPosition")}get level(){return this.loadedProperty("level")}get altTextTitle(){return this.loadedProperty("altTextTitle")}set altTextTitle(e){this.#l("altTextTitle",{altTextTitle:x(e,this.at("altTextTitle"))})}get altTextDescription(){return this.loadedProperty("altTextDescription")}set altTextDescription(e){this.#l("altTextDescription",{altTextDescription:x(e,this.at("altTextDescription"))})}get isDecorative(){return this.loadedProperty("isDecorative")}set isDecorative(e){this.#l("isDecorative",{isDecorative:$(e,this.at("isDecorative"))})}get creationId(){return this.loadedProperty("creationId")}get adjustments(){return this.#d??=new Pe(this.context,u.derived(`${this.path.label}.adjustments`,this.path),this.path)}get fill(){return this.#e??=new ne(this.context,u.derived(`${this.path.label}.fill`,this.path),{kind:"shape",shape:this.path})}get lineFormat(){return this.#t??=new Oe(this.context,u.derived(`${this.path.label}.lineFormat`,this.path),this.path)}get textFrame(){return this.#n??=new ae(this.context,u.derived(`${this.path.label}.textFrame`,this.path),this.path)}get tags(){return this.#o??=new V(this.context,u.derived(`${this.path.label}.tags`,this.path))}get customXmlParts(){return this.#r??=new q(this.context,u.derived(`${this.path.label}.customXmlParts`,this.path))}get group(){return this.#i??=new nt(this.context,u.derived(`${this.path.label}.group`,this.path),this)}get placeholderFormat(){return this.#a??=new ot(this.context,u.derived(`${this.path.label}.placeholderFormat`,this.path),this.path)}get parentGroup(){return this.#c(!1)}#c(e){return this.#s??=this.navigation("parentGroup",t=>new r(this.context,t,e),t=>({op:"getParentGroup",shape:t(this.path),...e?{orNull:e}:{}}),e)}delete(){this.command("delete",e=>({op:"deleteShape",shape:e(this.path)}))}getImageAsBase64(e){let t=this.at("getImageAsBase64"),n=Lt(e,t,!0),{result:o,fill:i}=k.create(t);return this.enqueue("read","getImageAsBase64",a=>({op:"prepareImage",target:a(this.path),...n}),jt(this.internals,n,t,i)),o}getParentSlide(){return this.#u("getParentSlide()","slide",!1,e=>new J(this.context,e))}getParentSlideOrNullObject(){return this.#u("getParentSlideOrNullObject()","slide",!0,e=>new J(this.context,e,!0))}getParentSlideLayout(){return this.#u("getParentSlideLayout()","slideLayout",!1,e=>new G(this.context,e))}getParentSlideLayoutOrNullObject(){return this.#u("getParentSlideLayoutOrNullObject()","slideLayout",!0,e=>new G(this.context,e,!0))}getParentSlideMaster(){return this.#u("getParentSlideMaster()","slideMaster",!1,e=>new ee(this.context,e))}getParentSlideMasterOrNullObject(){return this.#u("getParentSlideMasterOrNullObject()","slideMaster",!0,e=>new ee(this.context,e,!0))}getTable(){return new Ee(this.context,u.derived(`${this.path.label}.getTable()`,this.path),this)}getTextFrameOrNullObject(){let e=u.pending(`${this.path.label}.getTextFrameOrNullObject()`),t=new ae(this.context,e,e,!0),n=e.label;return this.enqueue("read","getTextFrameOrNullObject()",o=>({op:"readShape",shape:o(this.path)}),o=>{(o.kind==="null"?null:g(o,"shape",n).shape)?.hasTextFrame&&this.path.isAddressable?e.resolveTo(this.path.handle()):e.resolveNull()},e,!1),t}setHyperlink(e){let t=e?.address??"",n=e?.screenTip;return x(t,this.at("address")),n!==void 0&&x(n,this.at("screenTip")),this.command("setHyperlink",o=>({op:"setShapeHyperlink",shape:o(this.path),address:t,...n===void 0?{}:{screenTip:n}})),Y.created(this.context,this.path,null,t,n??"")}setZOrder(e){let t=Oo.toFile(e,`${this.path.label}.setZOrder`);this.command("setZOrder",n=>({op:"setZOrder",shape:n(this.path),position:t}))}#u(e,t,n,o){return this.navigation(e,o,i=>({op:"parentOf",shape:i(this.path),kind:t,...n?{orNull:n}:{}}),n)}#l(e,t){this.command(e,n=>({op:"setShape",shape:n(this.path),props:t}))}onLoad(e){let t=this.selection(e,Kr,{adjustments:()=>this.adjustments,fill:()=>this.fill,lineFormat:()=>this.lineFormat,textFrame:()=>this.textFrame,tags:()=>this.tags,customXmlParts:()=>this.customXmlParts,placeholderFormat:()=>this.placeholderFormat,group:()=>this.group,parentGroup:()=>this.#c(this.loadingOrNull)});this.loadScalars(t,"shape",n=>({op:"readShape",shape:n(this.path)}),n=>({...n.shape,type:dn(n.shape.type),creationId:null}))}};function Qr(r,e){return g(r,"handles",e).handles}var Ht=class extends oe{getItem(e){return this.find({id:this.keyArg(e,"getItem")},"getItem()",!1)}getItemAt(e){let t=this.indexArg(e);return this.find({index:t},`getItemAt(${t})`,!1)}getItemOrNullObject(e){return this.find({id:this.keyArg(e,"getItemOrNullObject")},"getItemOrNullObject()",!0)}listing(e){return this.source.kind==="container"?{op:"listShapes",container:e(this.source.container)}:{op:"readSelection"}}handlesOf(e,t){return this.source.kind==="container"?Qr(e,t):g(e,"selection",t).selection.shapes}get hasLookup(){return this.source.kind==="container"}itemOf(e,t){return new B(this.context,e,t)}lookup(e,t,n){if(this.source.kind==="container")return{op:"getShape",container:e(this.source.container),key:t,...n?{orNull:!0}:{}}}groupOf(e,t){let n=u.pending(`${this.path.label}.${t}`),o=new B(this.context,n),i=n.label;return this.enqueue("write",t,a=>({op:"group",shapes:e.flatMap(s=>s()).map(s=>a(s))}),a=>n.resolveTo(g(a,"handle",i).handle),n),o}},ie=class extends Ht{source;constructor(e,t,n){super(e,t),this.source={kind:"container",container:n}}addGeometricShape(e,t){let n=To(e,`${this.path.label}.addGeometricShape`),o=Ut(t,`${this.path.label}.addGeometricShape`);return this.#e("addGeometricShape",{kind:"geometric",geometry:n},o)}addLine(e="Straight",t){let n=Po.toFile(e,`${this.path.label}.addLine`),o=Ut(t,`${this.path.label}.addLine`);return this.#e("addLine",{kind:"line",connector:n},o)}addTextBox(e,t){let n=Ut(t,`${this.path.label}.addTextBox`);return this.#e("addTextBox",{kind:"textBox",text:x(e,this.at("text"))},n)}addTable(e,t,n){let o=`${this.path.label}.addTable`;for(let w of[e,t])(typeof w!="number"||!Number.isInteger(w)||w<1)&&h(o,"a whole number of rows and of columns of 1 or more");let i=Zo(n,e,t,o),{left:a,top:s,width:l,height:c}=n??{},p=Ut({left:a,top:s,width:l,height:c},o),C=i.values,b=this.#e("addTable",{kind:"table",rows:e,columns:t,...C?{values:C}:{}},p);return i.apply(b.getTable()),b}addGroup(e){Array.isArray(e)||h(`${this.path.label}.addGroup`,"an array of shapes or shape ids"),e.length<2&&A({code:"InvalidArgument",target:`${this.path.label}.addGroup`,diagnostic:I("group-count")});let t=e.map(n=>typeof n=="string"?this.getItem(n):n);return t.some(n=>!(n instanceof M))&&h(`${this.path.label}.addGroup`,"an array of shapes or shape ids"),this.groupOf([()=>t.map(n=>U(n))],"addGroup")}#e(e,t,n){let o=u.pending(`${this.path.label}.${e}()`),i=new B(this.context,o),a=o.label,s=this.source.kind==="container"?this.source.container:this.path;return this.enqueue("write",e,l=>({op:"addShape",container:l(s),shape:t,box:n}),l=>o.resolveTo(g(l,"handle",a).handle),o),i}},be=class extends Ht{source;constructor(e,t,n){super(e,t),this.source=n}group(){if(this.hasLoadedProperty("items")){let n=this.items;return this.groupOf([()=>n.map(o=>U(o))],"group()")}let e=u.pending(`${this.path.label}.items`),t;return this.enqueue("read","items",n=>this.listing(n),n=>{t=this.handlesOf(n,e.label).map((o,i)=>this.itemOf(this.memberPath(o,i),!1))},e,!1),this.groupOf([()=>t?t.map(n=>U(n)):[e]],"group()")}},nt=class extends f{#e;#t;constructor(e,t,n){super(e,t),this.#e=n}get id(){return this.loadedProperty("id")}get creationId(){return this.loadedProperty("creationId")}get shape(){return this.#e}get shapes(){return this.#t??=new be(this.context,u.derived(`${this.path.label}.shapes`,this.path),{kind:"container",container:this.path})}ungroup(){this.enqueue("write","ungroup",e=>({op:"ungroup",group:e(this.path)}))}onLoad(e){let t=this.selection(e,["id","creationId"],{shapes:()=>this.shapes});this.loadScalars(t,"shape",n=>({op:"readShape",shape:n(this.path),group:!0}),n=>({id:n.shape.id,creationId:null}))}},ot=class extends f{#e;constructor(e,t,n){super(e,t),this.#e=n}get type(){return this.loadedProperty("type")}get containedType(){return this.loadedProperty("containedType")}onLoad(e){let t=this.selection(e,["type","containedType"]);this.loadScalars(t,"shape",n=>({op:"readShape",shape:n(this.#e)}),n=>({type:Ao.fromFile(n.shape.placeholder?.type)??"Unsupported",containedType:n.shape.placeholder?.containedType?dn(n.shape.placeholder.containedType):null}))}};var Go=new WeakMap,Y=class r extends f{#e;#t;#n=new Map;#o=[];constructor(e,t,n,o,i){super(e,t),this.#e=n,this.#t=o,i&&(this.setLoadedProperty("address",i.address),this.setLoadedProperty("screenTip",i.screenTip),this.setLoadedProperty("type",o===null?"Shape":"TextRange")),Go.set(this,a=>{this.#t=wn(a),this.setLoadedProperty("address",this.#n.get("address")??a.address??""),this.setLoadedProperty("screenTip",this.#n.get("screenTip")??a.screenTip??""),this.setLoadedProperty("type",a.type==="shape"?"Shape":"TextRange");for(let s of this.#o.splice(0))s(a)})}static created(e,t,n,o,i){return new r(e,u.derived(`${t.label}.hyperlink`,t),t,n,{address:o,screenTip:i})}get address(){return this.loadedProperty("address")}set address(e){this.#s("address",x(e,this.at("address")))}get screenTip(){return this.loadedProperty("screenTip")}set screenTip(e){this.#s("screenTip",x(e,this.at("screenTip")))}get type(){return this.loadedProperty("type")}delete(){this.command("delete",e=>this.#a(e,null,void 0))}getLinkedShapeOrNullObject(){let e=`${this.path.label}.getLinkedShapeOrNullObject()`;if(this.#t===void 0){let t=this.#e.sibling(e);return this.#o.push(n=>n.type==="shape"?t.resolveTo(n.shape):t.resolveNull()),new B(this.context,t,!0)}if(this.#i()!==null){let t=u.pending(e);return t.resolveNull(),new B(this.context,t,!0)}return new B(this.context,u.derived(e,this.#e),!0)}getLinkedTextRangeOrNullObject(){let e=`${this.path.label}.getLinkedTextRangeOrNullObject()`;if(this.#t===void 0){let{range:t,settle:n}=H.later(this.context,this.#e.sibling(e));return this.#o.push(o=>{let i=wn(o);n(i?{shape:o.shape,span:i}:null)}),t}if(this.#i()===null){let t=u.pending(e);return t.resolveNull(),new H(this.context,t,t,void 0,!0)}return new H(this.context,u.derived(e,this.#e),this.#e,this.#i()??void 0,!0)}#r(e){return this.#n.get(e)??(this.hasLoadedProperty(e)?this.loadedProperty(e):"")}#i(){return typeof this.#t=="function"?this.#t():this.#t}#a(e,t,n){let o=e(this.#e),i=n?{screenTip:n}:{},a=this.#i();return a===null?{op:"setShapeHyperlink",shape:o,address:t,...i}:{op:"setHyperlink",shape:o,...a?{span:a}:{},address:t,...i}}#s(e,t){this.#n.set(e,t),this.setLoadedProperty(e,t),this.command(e,n=>this.#a(n,this.#r("address"),this.#r("screenTip")))}onLoad(e){this.selection(e,["address","screenTip","type"])}},zt=class extends f{get items(){return this.loadedProperty("items")}getCount(){let e=`${this.path.label}.getCount`,{result:t,fill:n}=k.create(e);return this.enqueue("read","getCount",o=>this.listing(o),o=>n(g(o,"hyperlinks",e).hyperlinks.length)),t}getItemAt(e){(typeof e!="number"||!Number.isInteger(e)||e<0)&&h(`${this.path.label}.getItemAt`,"a whole number of 0 or more");let t=u.pending(`${this.path.label}.getItemAt(${e})`),n=new Y(this.context,t,t,void 0),o=t.label;return this.enqueue("read",`getItemAt(${e})`,i=>this.listing(i),i=>{let a=g(i,"hyperlinks",o).hyperlinks[e];a||A({code:"ItemNotFound",target:o}),Go.get(n)?.(a),t.resolveTo(a.shape)},t,!1),n}get loadsItemPaths(){return!0}onLoad(e){for(let n of[...e.select,...e.itemSelect])["items","address","screenTip","type"].includes(n)||h(`${this.path.label}.${n}`,"a property of hyperlinks: items, address, screenTip, or type",S(n,["items","address","screenTip","type"]));let t=`${this.path.label}.items`;this.enqueue("read","items",n=>this.listing(n),n=>{let o=g(n,"hyperlinks",t).hyperlinks;this.setLoadedProperty("items",o.map((i,a)=>{let s=u.of(`${t}[${a}]`,i.shape);return new Y(this.context,s,s,wn(i),{address:i.address??"",screenTip:i.screenTip??""})}))})}},De=class extends zt{#e;constructor(e,t,n){super(e,t),this.#e=n}add(e,t){if(e instanceof H||e instanceof B)return e.setHyperlink(t);h(`${this.path.label}.add`,"a TextRange or a Shape")}listing(e){return{op:"listHyperlinks",slide:e(this.#e)}}},Be=class extends zt{#e;#t;constructor(e,t,n,o){super(e,t),this.#e=n,this.#t=o}listing(e){let t=e(this.#e),n=this.#t();return{op:"listTextHyperlinks",shape:t,...n?{span:n}:{}}}};function wn(r){return!r||r.type==="shape"||r.start===null||r.length===null?null:{start:r.start,length:r.length}}var Yr=["autoSizeSetting","bottomMargin","leftMargin","rightMargin","topMargin","verticalAlignment","wordWrap","hasText"],ae=class extends f{#e;#t;constructor(e,t,n,o=!1){super(e,t,{nullable:o}),this.#e=n}get autoSizeSetting(){return this.loadedProperty("autoSizeSetting")}set autoSizeSetting(e){let t=rn.toFile(e,"autoSizeSetting");this.#n("autoSizeSetting",{autoSize:t})}get bottomMargin(){return this.loadedProperty("bottomMargin")}set bottomMargin(e){this.#n("bottomMargin",{bottomMargin:R(e,this.at("bottomMargin"))})}get leftMargin(){return this.loadedProperty("leftMargin")}set leftMargin(e){this.#n("leftMargin",{leftMargin:R(e,this.at("leftMargin"))})}get rightMargin(){return this.loadedProperty("rightMargin")}set rightMargin(e){this.#n("rightMargin",{rightMargin:R(e,this.at("rightMargin"))})}get topMargin(){return this.loadedProperty("topMargin")}set topMargin(e){this.#n("topMargin",{topMargin:R(e,this.at("topMargin"))})}get verticalAlignment(){return this.loadedProperty("verticalAlignment")}set verticalAlignment(e){this.#n("verticalAlignment",{verticalAlignment:de.toFile(e,"verticalAlignment")})}get wordWrap(){return this.loadedProperty("wordWrap")}set wordWrap(e){this.#n("wordWrap",{wordWrap:$(e,this.at("wordWrap"))})}get hasText(){return this.loadedProperty("hasText")}get textRange(){return this.#t??=new H(this.context,u.derived(`${this.path.label}.textRange`,this.path),this.#e,void 0)}deleteText(){let e=this.#e;this.command("deleteText",t=>({op:"setText",shape:t(e),text:""}))}getParentShape(){return new B(this.context,this.#e)}#n(e,t){let n=this.#e;this.command(e,o=>({op:"setTextFrame",shape:o(n),props:t}))}onLoad(e){let t=this.selection(e,Yr,{textRange:()=>this.textRange}),n=this.#e;this.loadScalars(t,"textFrame",o=>({op:"readTextFrame",shape:o(n)}),o=>({...o.textFrame,autoSizeSetting:rn.fromFile(o.textFrame.autoSize)??"AutoSizeMixed",verticalAlignment:de.fromFile(o.textFrame.verticalAlignment)??"Top"}))}},H=class r extends f{#e;#t;#n;#o;#r;constructor(e,t,n,o,i=!1){super(e,t,{nullable:i}),this.#e=n,this.#t=o}static selected(e,t,n){let o=u.pending(`presentation.${t}`),i=new r(e.context,o,o,void 0,n);return i.enqueue("read","",()=>({op:"readSelection"}),a=>{let s=g(a,"selection",o.label).selection.text;if(!s){if(n)return o.resolveNull();A({code:"ItemNotFound",target:o.label})}i.#t={start:s.start,length:s.length},o.resolveTo(s.shape)},o,!1),i}static later(e,t){let n=new r(e,t,t,void 0,!0);return{range:n,settle(o){if(!o)return t.resolveNull();n.#t=o.span,t.resolveTo(o.shape)}}}get text(){return this.loadedProperty("text")}set text(e){let t=x(e,this.at("text"));this.command("text",n=>({op:"setText",shape:n(this.#e),...this.#a(),text:t}))}get start(){return this.loadedProperty("start")}set start(e){let t=this.#s(e,"start"),n=this.#t?.length??this.#d();this.#t={start:t,length:n},this.setLoadedProperty("start",t)}get length(){return this.loadedProperty("length")}set length(e){let t=this.#s(e,"length");this.#t={start:this.#t?.start??0,length:t},this.setLoadedProperty("length",t)}get font(){return this.#n??=new pe(this.context,u.derived(`${this.path.label}.font`,this.path),this.#e,()=>this.#t)}get paragraphFormat(){return this.#o??=new me(this.context,u.derived(`${this.path.label}.paragraphFormat`,this.path),this.#e,()=>this.#t)}get hyperlinks(){return this.#r??=new Be(this.context,u.derived(`${this.path.label}.hyperlinks`,this.path),this.#e,()=>this.#t)}getParentTextFrame(){return new ae(this.context,u.derived(`${this.path.label}.getParentTextFrame()`,this.#e),this.#e)}getSubstring(e,t){let n=this.#s(e,"start"),o=t===void 0?void 0:this.#s(t,"length"),i=this.#t;if(i&&o!==void 0)return n+o>i.length&&h(`${this.path.label}.getSubstring`,"a start and a length inside the text range"),this.#i({start:i.start+n,length:o});if(i)return n>i.length&&h(`${this.path.label}.getSubstring`,"a start inside the text range"),this.#i({start:i.start+n,length:i.length-n});if(o!==void 0)return this.#i({start:n,length:o});let a=u.pending(`${this.path.label}.getSubstring()`),s=new r(this.context,a,a,void 0),l=this.#e;return this.enqueue("read","getSubstring()",c=>({op:"readText",shape:c(l)}),c=>{let p=g(c,"text",a.label).text;n>p.length&&h(a.label,"a start inside the text"),s.#t={start:n,length:p.length-n},a.resolveTo(l.handle())},a,!1),s}setSelected(){this.command("setSelected",e=>({op:"selectText",shape:e(this.#e),...this.#a()}))}setHyperlink(e){let t=x(e?.address??"",this.at("address")),n=e?.screenTip;return n!==void 0&&x(n,this.at("screenTip")),this.command("setHyperlink",o=>({op:"setHyperlink",shape:o(this.#e),...this.#a(),address:t,...n===void 0?{}:{screenTip:n}})),Y.created(this.context,this.#e,()=>this.#t,t,n??"")}#i(e){return new r(this.context,u.derived(`${this.path.label}.getSubstring()`,this.#e),this.#e,e)}#a(){return this.#t?{span:this.#t}:{}}#s(e,t){return(typeof e!="number"||!Number.isInteger(e)||e<0)&&h(`${this.path.label}.${t}`,"a whole number of 0 or more"),e}#d(){return this.hasLoadedProperty("length")||A({code:"PropertyNotLoaded",target:`${this.path.label}.length`}),this.loadedProperty("length")}onLoad(e){let t=this.selection(e,["text","start","length"],{font:()=>this.font,paragraphFormat:()=>this.paragraphFormat,hyperlinks:()=>this.hyperlinks});this.loadScalars(t,"text",n=>({op:"readText",shape:n(this.#e),...this.#a()}),n=>({text:n.text,start:this.#t?.start??0,length:this.#t?.length??n.text.length}))}},Zr=["allCaps","bold","color","doubleStrikethrough","italic","name","size","smallCaps","strikethrough","subscript","superscript","underline"],pe=class extends f{#e;#t;#n;constructor(e,t,n,o,i){super(e,t),this.#e=n,this.#t=o,this.#n=i?{cell:i}:{}}get allCaps(){return this.loadedProperty("allCaps")}set allCaps(e){this.#o("allCaps",{allCaps:$(e,this.at("allCaps"))})}get bold(){return this.loadedProperty("bold")}set bold(e){this.#o("bold",{bold:$(e,this.at("bold"))})}get color(){return this.loadedProperty("color")}set color(e){this.#o("color",{color:x(e,this.at("color"))})}get doubleStrikethrough(){return this.loadedProperty("doubleStrikethrough")}set doubleStrikethrough(e){this.#o("doubleStrikethrough",{doubleStrikethrough:$(e,this.at("doubleStrikethrough"))})}get italic(){return this.loadedProperty("italic")}set italic(e){this.#o("italic",{italic:$(e,this.at("italic"))})}get name(){return this.loadedProperty("name")}set name(e){this.#o("name",{name:x(e,this.at("name"))})}get size(){return this.loadedProperty("size")}set size(e){this.#o("size",{size:R(e,this.at("size"))})}get smallCaps(){return this.loadedProperty("smallCaps")}set smallCaps(e){this.#o("smallCaps",{smallCaps:$(e,this.at("smallCaps"))})}get strikethrough(){return this.loadedProperty("strikethrough")}set strikethrough(e){this.#o("strikethrough",{strikethrough:$(e,this.at("strikethrough"))})}get subscript(){return this.loadedProperty("subscript")}set subscript(e){this.#o("subscript",{subscript:$(e,this.at("subscript"))})}get superscript(){return this.loadedProperty("superscript")}set superscript(e){this.#o("superscript",{superscript:$(e,this.at("superscript"))})}get underline(){return this.loadedProperty("underline")}set underline(e){this.#o("underline",{underline:he.toFile(e,"underline")})}#o(e,t){let n=this.#e;this.command(e,o=>{let i=this.#t();return{op:"setFont",shape:o(n),...i?{span:i}:{},...this.#n,font:t}})}onLoad(e){let t=this.selection(e,Zr),n=this.#e;this.loadScalars(t,"font",o=>{let i=this.#t();return{op:"readFont",shape:o(n),...i?{span:i}:{},...this.#n}},o=>({...o.font,underline:he.fromFile(o.font.underline)}))}},me=class extends f{#e;#t;#n;#o;constructor(e,t,n,o,i){super(e,t),this.#e=n,this.#t=o,this.#n=i?{cell:i}:{}}get horizontalAlignment(){return this.loadedProperty("horizontalAlignment")}set horizontalAlignment(e){this.#i("horizontalAlignment",{alignment:Ce.toFile(e,"horizontalAlignment")})}get indentLevel(){return this.loadedProperty("indentLevel")}set indentLevel(e){this.#i("indentLevel",{indentLevel:R(e,this.at("indentLevel"))})}get bulletFormat(){return this.#o??=new rt(this.context,u.derived(`${this.path.label}.bulletFormat`,this.path),(e,t)=>this.#i(e,t),()=>this.#r())}#r(){let e=this.#e;return t=>{let n=this.#t();return{op:"readParagraph",shape:t(e),...n?{span:n}:{},...this.#n}}}#i(e,t){let n=this.#e;this.command(e,o=>{let i=this.#t();return{op:"setParagraph",shape:o(n),...i?{span:i}:{},...this.#n,paragraph:t}})}onLoad(e){let t=this.selection(e,["horizontalAlignment","indentLevel"],{bulletFormat:()=>this.bulletFormat});this.loadScalars(t,"paragraph",this.#r(),n=>({horizontalAlignment:Ce.fromFile(n.paragraph.alignment),indentLevel:n.paragraph.indentLevel}))}},rt=class extends f{#e;#t;constructor(e,t,n,o){super(e,t),this.#e=n,this.#t=o}get style(){return this.loadedProperty("style")}set style(e){this.#e("style",{bulletStyle:sn.toFile(e,"style")})}get type(){return this.loadedProperty("type")}set type(e){let t=ln.toFile(e,"type");this.#e("type",{bulletType:t})}get visible(){return this.loadedProperty("visible")}set visible(e){this.#e("visible",{bulletVisible:$(e,this.at("visible"))})}onLoad(e){let t=this.selection(e,["style","type","visible"]);this.loadScalars(t,"paragraph",this.#t(),n=>({style:n.paragraph.bulletStyle===null?null:sn.fromFile(n.paragraph.bulletStyle),type:n.paragraph.bulletType===null?null:ln.fromFile(n.paragraph.bulletType),visible:n.paragraph.bulletVisible}))}};function qt(r,e){return(typeof r!="string"||r.length===0||r.length>255)&&h(e,"a string of 1 to 255 characters"),r}function er(r,e){r!=="Shape"&&h(e,"'Shape'")}var tr=new WeakMap,se=class extends f{#e;constructor(e,t,n,o=!1){super(e,t,{nullable:o}),this.#e=n;let i=a=>{this.#e=a,this.setLoadedProperty("id",a),this.setLoadedProperty("type","Shape")};n&&i(n),tr.set(this,i)}get id(){return this.loadedProperty("id")}get type(){return this.loadedProperty("type")}delete(){this.command("delete",e=>({op:"deleteBinding",owner:e(this.path),id:this.#e}))}getShape(){return this.navigation("getShape()",e=>new B(this.context,e),e=>({op:"getBindingShape",owner:e(this.path),id:this.#e}))}onLoad(e){this.selection(e,["id","type"])}},Fe=class extends f{constructor(e,t){super(e,t)}get items(){return this.loadedProperty("items")}add(e,t,n){let o=`${this.path.label}.add`;e instanceof B||h(o,"a Shape"),er(t,o);let i=qt(n,o),a=U(e);return this.command("add",s=>({op:"addBinding",owner:s(this.path),shape:s(a),id:i})),new se(this.context,u.derived(`${o}()`,this.path),i)}addFromSelection(e,t){let n=`${this.path.label}.addFromSelection`;er(e,n);let o=qt(t,n);return this.command("addFromSelection",i=>({op:"addBindingFromSelection",owner:i(this.path),id:o})),new se(this.context,u.derived(`${n}()`,this.path),o)}getCount(){let e=`${this.path.label}.getCount`,{result:t,fill:n}=k.create(e);return this.enqueue("read","getCount",o=>({op:"listBindings",owner:o(this.path)}),o=>n(g(o,"bindings",e).bindings.length)),t}getItem(e){let t=qt(e,`${this.path.label}.getItem`);return this.#e("getItem()",n=>n.find(o=>o.id===t),t,!1)}getItemAt(e){return(typeof e!="number"||!Number.isInteger(e)||e<0)&&h(`${this.path.label}.getItemAt`,"a whole number of 0 or more"),this.#e(`getItemAt(${e})`,t=>t[e],void 0,!1)}getItemOrNullObject(e){let t=qt(e,`${this.path.label}.getItemOrNullObject`);return this.#e("getItemOrNullObject()",n=>n.find(o=>o.id===t),t,!0)}#e(e,t,n,o){let i=u.pending(`${this.path.label}.${e}`),a=new se(this.context,i,n??"",o),s=i.label;return this.enqueue("read",e,l=>({op:"listBindings",owner:l(this.path)}),l=>{let c=t(g(l,"bindings",s).bindings);if(!c){if(o)return i.resolveNull();A({code:"ItemNotFound",target:s})}tr.get(a)?.(c.id),i.resolveTo(this.path.handle())},i,!1),a}get loadsItemPaths(){return!0}onLoad(e){for(let n of[...e.select,...e.itemSelect])["items","id","type"].includes(n)||h(`${this.path.label}.${n}`,"a property of bindings: items, id, or type",S(n,["items","id","type"]));let t=`${this.path.label}.items`;this.enqueue("read","items",n=>({op:"listBindings",owner:n(this.path)}),n=>{let o=g(n,"bindings",t).bindings,i=e.top===void 0?o.length:(e.skip??0)+e.top;this.setLoadedProperty("items",o.slice(e.skip??0,i).map((a,s)=>new se(this.context,u.of(`${t}[${s}]`,this.path.handle()),a.id)))})}};var nr=new WeakMap;function Pn(r,e){nr.get(r)?.(e)}function Jr(r){return r.type==="Date"?new Date(r.value):r.value}function or(r,e){return typeof r=="string"?{type:"String",value:r}:typeof r=="number"&&Number.isFinite(r)?{type:"Number",value:r}:typeof r=="boolean"?{type:"Boolean",value:r}:r instanceof Date&&Number.isFinite(r.getTime())?{type:"Date",value:r.toISOString()}:h(e,"a string, a finite number, a boolean, or a valid Date")}function Cn(r,e){return(typeof r!="string"||r.length===0||r.length>255)&&h(e,"a key of 1 to 255 characters"),r}var On=(r,e)=>r.toLowerCase()===e.toLowerCase(),ye=class extends f{#e;#t;constructor(e,t,n,o,i=!1){super(e,t,{nullable:i}),this.#e=n,this.#t=o,o&&this.setLoadedProperty("key",o),nr.set(this,a=>{this.#t=a.key,this.setLoadedProperty("key",a.key),this.setLoadedProperty("type",a.type),this.setLoadedProperty("value",Jr(a))})}get key(){return this.loadedProperty("key")}get type(){return this.loadedProperty("type")}get value(){return this.loadedProperty("value")}set value(e){let t=or(e,this.at("value"));this.command("value",n=>({op:"setCustomProperty",owner:n(this.path),key:this.#t,value:t}))}delete(){this.command("delete",e=>({op:"deleteCustomProperty",owner:e(this.path),key:this.#t}))}onLoad(e){let t=this.selection(e,["key","type","value"]);if(!t.includes("type")&&!t.includes("value"))return;let n=`${this.path.label}.load`;this.enqueue("read","load",o=>({op:"readCustomProperties",owner:o(this.#e)}),o=>{if(o.kind==="null")return;let i=g(o,"customProperties",n).properties.find(a=>On(a.key,this.#t));i&&Pn(this,i)})}},Me=class extends f{constructor(e,t){super(e,t)}get items(){return this.loadedProperty("items")}add(e,t){let n=Cn(e,`${this.path.label}.add`),o=or(t,`${this.path.label}.add`);return this.command("add",a=>({op:"setCustomProperty",owner:a(this.path),key:n,value:o})),new ye(this.context,u.derived(`${this.path.label}.add()`,this.path),this.path,n)}deleteAll(){this.command("deleteAll",e=>({op:"deleteCustomProperties",owner:e(this.path)}))}getCount(){let e=`${this.path.label}.getCount`,{result:t,fill:n}=k.create(e);return this.enqueue("read","getCount",o=>({op:"readCustomProperties",owner:o(this.path)}),o=>n(g(o,"customProperties",e).properties.length)),t}getItem(e){let t=Cn(e,`${this.path.label}.getItem`);return this.#e("getItem()",n=>n.find(o=>On(o.key,t)),t,!1)}getItemAt(e){return(typeof e!="number"||!Number.isInteger(e)||e<0)&&h(`${this.path.label}.getItemAt`,"a whole number of 0 or more"),this.#e(`getItemAt(${e})`,t=>t[e],void 0,!1)}getItemOrNullObject(e){let t=Cn(e,`${this.path.label}.getItemOrNullObject`);return this.#e("getItemOrNullObject()",n=>n.find(o=>On(o.key,t)),t,!0)}#e(e,t,n,o){let i=u.pending(`${this.path.label}.${e}`),a=new ye(this.context,i,this.path,n??"",o),s=i.label;return this.enqueue("read",e,l=>({op:"readCustomProperties",owner:l(this.path)}),l=>{let c=t(g(l,"customProperties",s).properties);if(!c){if(o)return i.resolveNull();A({code:"ItemNotFound",target:s})}Pn(a,c),i.resolveTo(this.path.handle())},i,!1),a}get loadsItemPaths(){return!0}onLoad(e){for(let n of[...e.select,...e.itemSelect])["items","key","type","value"].includes(n)||h(`${this.path.label}.${n}`,"a property of custom properties: items, key, type, or value",S(n,["items","key","type","value"]));let t=`${this.path.label}.items`;this.enqueue("read","items",n=>({op:"readCustomProperties",owner:n(this.path)}),n=>{let o=g(n,"customProperties",t).properties,i=e.top===void 0?o.length:(e.skip??0)+e.top;this.setLoadedProperty("items",o.slice(e.skip??0,i).map((a,s)=>{let l=u.of(`${t}[${s}]`,this.path.handle()),c=new ye(this.context,l,this.path,a.key);return Pn(c,a),c}))})}};var Ue=class r extends f{#e;#t;#n;#o;#r;#i;#a;constructor(e,t){super(e,t)}static open(e){let t=u.pending("presentation"),n=new r(e,t);return n.enqueue("read","",()=>({op:"getPresentation"}),o=>t.resolveTo(g(o,"handle","presentation").handle),t),n}get id(){return this.loadedProperty("id")}get title(){return this.loadedProperty("title")}get slides(){return this.#e??=new Te(this.context,u.derived("presentation.slides",this.path))}get slideMasters(){return this.#t??=new je(this.context,u.derived("presentation.slideMasters",this.path))}get tags(){return this.#n??=new V(this.context,u.derived("presentation.tags",this.path))}get customXmlParts(){return this.#o??=new q(this.context,u.derived("presentation.customXmlParts",this.path))}get bindings(){return this.#a??=new Fe(this.context,u.derived("presentation.bindings",this.path))}get properties(){return this.#r??=new it(this.context,u.derived("presentation.properties",this.path))}get pageSetup(){return this.#i??=new at(this.context,u.derived("presentation.pageSetup",this.path))}getSelectedSlides(){return new Le(this.context,u.derived("presentation.getSelectedSlides()",this.path),"selection")}getSelectedShapes(){return new be(this.context,u.derived("presentation.getSelectedShapes()",this.path),{kind:"selection"})}getSelectedTextRange(){return H.selected(this,"getSelectedTextRange()",!1)}getSelectedTextRangeOrNullObject(){return H.selected(this,"getSelectedTextRangeOrNullObject()",!0)}setSelectedSlides(e){Array.isArray(e)||h("setSelectedSlides","an array of slide ids");let t=e.map(n=>this.slides.getItem(x(n,this.at("setSelectedSlides"))));this.command("setSelectedSlides",n=>({op:"selectSlides",slides:t.map(o=>n(U(o)))}))}insertSlidesFromBase64(e,t){let n=this.at("insertSlidesFromBase64"),o=x(e,n);o.length===0&&h(n,"the Base64 bytes of a PPTX file");let i=Gr(t,n);this.command("insertSlidesFromBase64",()=>({op:"insertSlides",base64:o,...i?{options:i}:{}}))}onLoad(e){let t=this.selection(e,["id","title"],{slides:()=>this.slides,slideMasters:()=>this.slideMasters,tags:()=>this.tags,bindings:()=>this.bindings,customXmlParts:()=>this.customXmlParts,properties:()=>this.properties,pageSetup:()=>this.pageSetup});this.loadScalars(t,"presentation",()=>({op:"readPresentation"}),n=>({id:n.presentation.id,title:n.presentation.title}))}};function Gr(r,e){if(r===void 0)return;(typeof r!="object"||r===null)&&h(e,"an InsertSlideOptions object");let{formatting:t,sourceSlideIds:n,targetSlideId:o}=r;return t!==void 0&&t!=="KeepSourceFormatting"&&t!=="UseDestinationTheme"&&h(`${e}.formatting`,z(Object.values(ht)),S(t,Object.values(ht))),n!==void 0&&(!Array.isArray(n)||n.some(i=>typeof i!="string"))&&h(`${e}.sourceSlideIds`,"an array of slide id strings"),o!==void 0&&typeof o!="string"&&h(`${e}.targetSlideId`,"a slide id string"),{...t===void 0?{}:{formatting:t==="UseDestinationTheme"?"useDestinationTheme":"keepSource"},...n===void 0?{}:{sourceSlideIds:[...n]},...o===void 0?{}:{targetSlideId:o}}}var ei=["author","category","comments","company","creationDate","keywords","lastAuthor","manager","revisionNumber","subject","title"],it=class extends f{#e;constructor(e,t){super(e,t)}get customProperties(){return this.#e??=new Me(this.context,u.derived("presentation.properties.customProperties",this.path))}get author(){return this.loadedProperty("author")}set author(e){this.#t("author",x(e,this.at("author")))}get category(){return this.loadedProperty("category")}set category(e){this.#t("category",x(e,this.at("category")))}get comments(){return this.loadedProperty("comments")}set comments(e){this.#t("comments",x(e,this.at("comments")))}get company(){return this.loadedProperty("company")}set company(e){this.#t("company",x(e,this.at("company")))}get creationDate(){return this.loadedProperty("creationDate")}get keywords(){return this.loadedProperty("keywords")}set keywords(e){this.#t("keywords",x(e,this.at("keywords")))}get lastAuthor(){return this.loadedProperty("lastAuthor")}get manager(){return this.loadedProperty("manager")}set manager(e){this.#t("manager",x(e,this.at("manager")))}get revisionNumber(){return this.loadedProperty("revisionNumber")}set revisionNumber(e){this.#t("revisionNumber",R(e,this.at("revisionNumber")))}get subject(){return this.loadedProperty("subject")}set subject(e){this.#t("subject",x(e,this.at("subject")))}get title(){return this.loadedProperty("title")}set title(e){this.#t("title",x(e,this.at("title")))}#t(e,t){this.command(e,()=>({op:"setProperties",properties:{[e]:t}}))}onLoad(e){let t=this.selection(e,ei,{customProperties:()=>this.customProperties});this.loadScalars(t,"properties",()=>({op:"getProperties"}),n=>({...n.properties,creationDate:new Date(n.properties.creationDate??Number.NaN)}))}},at=class extends f{constructor(e,t){super(e,t)}get slideHeight(){return this.loadedProperty("slideHeight")}set slideHeight(e){let t=R(e,this.at("slideHeight"));this.command("slideHeight",()=>({op:"setPageSetup",slideHeight:t}))}get slideWidth(){return this.loadedProperty("slideWidth")}set slideWidth(e){let t=R(e,this.at("slideWidth"));this.command("slideWidth",()=>({op:"setPageSetup",slideWidth:t}))}onLoad(e){let t=this.selection(e,["slideHeight","slideWidth"]);this.loadScalars(t,"presentation",()=>({op:"readPresentation"}),n=>({slideHeight:n.presentation.slideHeight,slideWidth:n.presentation.slideWidth}))}};function rr(r,e){if(Array.isArray(r)){for(let t of r)e(t);return}e(r)}var pt=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}add(e){this.#e.assertUsable(),rr(e,t=>{this.#n(t),this.#e.track(t)})}remove(e){this.#e.assertUsable(),rr(e,t=>{this.#n(t),this.#e.untrack(t)})}#n(e){this.#t(e)||A({code:"InvalidObjectPath"})}};var Wt=class{#e=[];#t=null;#n=[];get size(){return this.#e.length}labels(){return this.#e.map(e=>e.label)}push(e){(this.#t??this.#e).push(e)}continuing(e){let t=this.#t,n=[];this.#t=n;try{e()}finally{this.#t=t}for(let o of n)this.#n.push(o)}checkpoint(){let e=this.#t??this.#e,t=e.length;return()=>{e.length=Math.min(e.length,t)}}takeContinuations(){let e=this.#n;return this.#n=[],e}take(){let e=this.#e;return this.#e=[],e}clear(){this.#e=[],this.#n=[]}};function ti(){let r;try{r=import.meta.env?.DEV}catch{r=void 0}return typeof r=="boolean"?r:typeof process<"u"&&process.env.NODE_ENV!=="production"}var ir=new Set;function ni(r){!ti()||ir.has(r)||(ir.add(r),console.warn(`[pptx-editor] ${r}`))}function ar(r,e=[]){let t=e.map(n=>{let o=n,i=o.debugInfo?.errorLocation?` at ${o.debugInfo.errorLocation}`:"";return` ${o.code??"Error"}${i}: ${n.message}`});ni(`run() ended with ${r} queued ${r===1?"write":"writes"} that no sync() sent, so ${r===1?"it":"they"} did not apply. Call \`await context.sync()\` before the callback returns.`+(t.length===0?"":` That sync would have refused with ${t.length===1?"this error":"these errors"}:`+t.join(";")))}function sr(r){if(!(r instanceof L))return r;let e=I("read-after-commit");return new L({code:r.code,...r.target===void 0?{}:{target:r.target},...e===void 0?{}:{diagnostic:e}})}function oi(r){if(!(r instanceof L))return r;let e=I("partly-applied"),t=r.debugInfo.innerError,n=t?{code:t.code,hint:`${t.message} ${e?.hint??""}`.trim()}:e;return new L({code:r.code,...r.target===void 0?{}:{target:r.target},...n===void 0?{}:{diagnostic:n}})}var vn=32,ri=0;function ii(r,e,t){let n=t?r.indexOf(t):-1;return e.filter(o=>n<0||o.at<=n).map(o=>o.message)}var mt=class r{#e;#t=new Wt;#n=new Set;#o=new Set;#r;#i;#a;#s;#d=[];#c;#u="";#l=!1;#h=null;#p=0;#f=Promise.resolve();#m=[];constructor(e){this.#e=e,this.#r={host:e.host,capabilities:e.host.capabilities,queue:this.#t,session:e.id,assertUsable:t=>{this.#e.assertLive(t),this.#l&&A({code:"InvalidRequestContext",...t===void 0?{}:{target:t}})},isFinished:()=>this.#l,readRevision:()=>this.#h,register:t=>{this.#n.add(t)},track:t=>{this.#o.add(t)},untrack:t=>{this.#o.delete(t)},isTracked:t=>this.#o.has(t),disown:t=>{this.#n.delete(t),this.#o.delete(t)},defer:t=>{t.catch(()=>{}),this.#m.push(t)}},this.#i=new pt(this.#r,t=>this.#n.has(t))}get presentation(){return this.#r.assertUsable("presentation"),this.#a??=this.#e.openPresentation(this),this.#a}get application(){return this.#r.assertUsable("application"),this.#s??=this.#e.openApplication(this),this.#s}get debugInfo(){this.#r.assertUsable("debugInfo");let e=this.#t.labels(),t=[],n=0;for(let o=0;o<=e.length;o+=1){for(;n<this.#d.length&&this.#d[n].at<=o;)t.push(this.#d[n++].message);o<e.length&&t.push(e[o])}return{pendingStatements:t}}get capabilities(){return this.#e.capabilities}get trackedObjects(){return this.#i}load(e,t){return e.load(t)}loadRecursive(e,t,n){let o="loadRecursive";this.#r.assertUsable(o),e instanceof M||h(o,"an object of this API"),e.context!==this&&A({code:"InvalidObjectPath",target:o}),(typeof t!="object"||t===null||Array.isArray(t))&&h(`${o}.options`,"an object keyed by type name");let i=this.#e.typeNames,a=new Map;for(let[p,C]of Object.entries(t))i.includes(p)||h(`${o}.options.${p}`,"a type name of this API",S(p,i)),St(C,`${o}.options.${p}`),a.set(p,C);n!==void 0&&(typeof n!="number"||!Number.isInteger(n)||n<0||n>vn)&&h(`${o}.maxDepth`,`a whole number from 0 to ${vn}`);let s=n??vn,l=new WeakSet,c=(p,C)=>{if(l.has(p)||p[le].isReleased||p[le].isNull)return;l.add(p);let b=this.#e.typeName(p),w=b===void 0?void 0:a.get(b);w!==void 0&&(p.load(w),!(C>=s)&&this.#t.push({sort:"read",label:`${p[le].label}.loadRecursive`,continues:!0,plan:()=>({op:"getPresentation"}),settle:()=>this.#t.continuing(()=>{for(let P of p[At]())for(let T of Array.isArray(P)?P:[P])T instanceof M&&c(T,C+1)})}))};c(e,0)}trace(e){this.#r.assertUsable("trace"),typeof e!="string"&&h("trace","a string"),this.#d.push({message:e,at:this.#t.size})}sync(e){try{this.#r.assertUsable()}catch(s){return Promise.reject(s)}let t=this.#t.take(),n=this.#d;this.#d=[];let o=()=>this.#A(t,n),i=this.#p===0?o():this.#f.then(o);this.#p+=1;let a=()=>{this.#p-=1};return this.#f=i.then(a,a),i.then(()=>e)}async#x(){for(;this.#p>0;)await this.#f}async#A(e,t){if(e.length!==0){this.#c=void 0,this.#u=`sync-${ri+=1}`;try{await this.#w(e)}catch(n){throw jn(n,ii(e,t,this.#c))}}}async#w(e){let t=jo(e);try{let n=t.find(a=>a.refusal);if(n)throw this.#c=n,n.refusal;let o=t,i=!1;for(;o.length>0;){let a=Do(o),s=a<0?o:o.slice(0,a);try{await this.#C(s)}catch(l){throw i?oi(l):l}i||=s.some(l=>l.sort==="write"),o=a<0?[]:o.slice(a)}}catch(n){for(let o of t)o.sort==="read"?Xn(o):Vn(o);throw n}finally{this.#t.takeContinuations(),this.#m=[]}}async#C(e){let n=e.some(s=>s.sort==="write")&&this.#h!==null?this.#h:void 0,o=e;for(let s=pn(o);s.length>0;s=pn(o)){await this.#g(s,n),n=this.#h??void 0;let l=new Set(s);o=o.filter(c=>!l.has(c)&&!(c.sort==="read"&&c.target?.isNull))}let i=o.findIndex(s=>s.sort==="write"),a=i<0?[]:o.slice(0,i);if(a.some(s=>s.continues)&&(await this.#g(a,n),await this.#b(),n=this.#h??void 0,o=o.slice(i).filter(s=>!(s.sort==="read"&&s.target?.isNull))),o.length>0){await this.#g(o,n);let s=o.some(l=>l.sort==="write");try{await this.#b()}catch(l){throw s?sr(l):l}}}async#b(){for(let e=this.#t.takeContinuations();e.length>0;e=this.#t.takeContinuations())await this.#g(e,this.#h??void 0)}async#g(e,t){let n=Lo(e),o;try{o=this.#e.host.execute({operations:n.operations,...t===void 0?{}:{expectedRevision:t},historyGroup:this.#u})}catch(l){if(!xe(l))try{this.#e.onException?.(l,n.operations)}catch{}throw l}if(!o.ok){let l=$o(o,e,t,c=>{this.#c=c});try{this.#e.onRefusal?.(l,n.operations)}catch{}throw l}this.#h=o.revision,Io(e,o,l=>{this.#c=l}),this.#c=void 0;let i=this.#m;if(this.#m=[],i.length===0)return;let s=(await Promise.allSettled(i)).find(l=>l.status==="rejected");if(s)throw o.changed?sr(s.reason):s.reason}get[Ae](){return this.#r}static begin(e){let t=new r(e);return{context:t,adopt(n){for(let o of n)t.#y(o);for(let o of n)t.#P(o)},idle(){return t.#x()},finish(n=!1){t.#O(n)}}}#y(e){let t=e.context;if(t===this)return;let n=t[Ae];if(n.session!==this.#e.id)throw new L({code:"InvalidObjectPath"});if(!n.isFinished())throw new L({code:"ObjectInUse"});if(!n.isTracked(e))throw new L({code:"InvalidObjectPath"})}#P(e){let t=e.context;if(t===this)return;this.#y(e);let n=t[Ae],o=n.readRevision();n.disown(e),e[yt](this),this.#n.add(e),this.#o.add(e),o!==null&&(this.#h=this.#h===null?o:Math.min(this.#h,o))}#O(e){if(this.#l)return;this.#l=!0;let t=this.#t.take().filter(n=>n.sort==="write");e&&t.length>0&&ar(t.length,t.flatMap(n=>n.refusal?[n.refusal]:[])),this.#t.clear(),this.#d=[];for(let n of this.#n)this.#o.has(n)||n[bt]();this.#n.clear()}};import{createStoreAutomationHost as si}from"@pptx-editor.dev/core/automation";import{openPresentation as li,renderImageWith as di}from"@pptx-editor.dev/core/editor";var lr=[[Pe,"Adjustments"],[we,"Application"],[se,"Binding"],[Fe,"BindingCollection"],[Qe,"Border"],[$e,"Borders"],[rt,"BulletFormat"],[ye,"CustomProperty"],[Me,"CustomPropertyCollection"],[ue,"CustomXmlPart"],[q,"CustomXmlPartCollection"],[Ve,"CustomXmlPartScopedCollection"],[it,"DocumentProperties"],[Y,"Hyperlink"],[De,"HyperlinkCollection"],[Be,"HyperlinkScopedCollection"],[Ie,"Margins"],[at,"PageSetup"],[me,"ParagraphFormat"],[ot,"PlaceholderFormat"],[Ue,"Presentation"],[B,"Shape"],[ie,"ShapeCollection"],[ne,"ShapeFill"],[pe,"ShapeFont"],[nt,"ShapeGroup"],[Oe,"ShapeLineFormat"],[be,"ShapeScopedCollection"],[J,"Slide"],[ve,"SlideBackground"],[_e,"SlideBackgroundFill"],[qe,"SlideBackgroundGradientFill"],[We,"SlideBackgroundPatternFill"],[Xe,"SlideBackgroundPictureOrTextureFill"],[ze,"SlideBackgroundSolidFill"],[Te,"SlideCollection"],[G,"SlideLayout"],[Re,"SlideLayoutBackground"],[Ke,"SlideLayoutCollection"],[ee,"SlideMaster"],[Se,"SlideMasterBackground"],[je,"SlideMasterCollection"],[Le,"SlideScopedCollection"],[Ee,"Table"],[K,"TableCell"],[tt,"TableCellCollection"],[Je,"TableColumn"],[et,"TableColumnCollection"],[Ze,"TableRow"],[Ge,"TableRowCollection"],[Ne,"TableStyleSettings"],[ke,"Tag"],[V,"TagCollection"],[ae,"TextFrame"],[H,"TextRange"],[re,"ThemeColorScheme"]],ai=new Map(lr.map(([r,e])=>[r,e])),dr=Object.freeze(lr.map(([,r])=>r).sort());function hr(r){return ai.get(Object.getPrototypeOf(r)?.constructor)}function cr(r){let e=r.host,t=Object.freeze({document:e.capabilities.document,save:r.save&&e.capabilities.save,events:e.capabilities.events,selection:e.capabilities.selection,autofit:e.capabilities.autofit,images:e.capabilities.images===!0&&typeof e.renderImage=="function"}),n=!1,o=l=>{n&&A({code:"RuntimeDisposed",...l===void 0?{}:{target:l}})},i={host:e,capabilities:t,...r.onRefusal?{onRefusal:r.onRefusal}:{},...r.onException?{onException:r.onException}:{},id:{},assertLive:o,openPresentation:l=>Ue.open(l),openApplication:l=>we.open(l),typeName:hr,typeNames:dr};async function a(l,c){o();let p=typeof l=="function"?l:c;typeof p!="function"&&h("run","a callback, alone or after the objects to adopt");let C=typeof l=="function"?[]:Array.isArray(l)?l:l instanceof M?[l]:h("run","an object of this API or an array of them, then a callback");C.every(j=>j instanceof M)||h("run","objects of this API only");let{context:b,adopt:w,idle:P,finish:T}=mt.begin(i),_=!1;try{w(C);let j=await p(b);return _=!0,j}finally{await P(),T(_)}}let s={capabilities:t,run:a,dispose(){n||(n=!0,e.dispose())}};return r.save?{...s,async save(){o("save"),t.save||A({code:"NotSupported",target:"save"});let l=e.save();if(!l.ok)throw ct(l.error,{target:"save"});return l.bytes}}:s}async function Td(r,e={}){(!(r instanceof Uint8Array)||r.length===0)&&h("createServer","the bytes of a PPTX file as a non-empty Uint8Array"),(e===null||typeof e!="object")&&h("createServer","an options object");let t=e.rasterize;t!==void 0&&typeof t!="function"&&h("createServer","a rasterize function");let n=e.fonts===void 0?void 0:Array.isArray(e.fonts)?e.fonts:[e.fonts],o=await li(r.slice(),{...n?{fonts:n}:{},...e.substitutes===!1?{substitutes:!1}:{}});if(!o.ok){let s=o.error,l=s.reason==="zip"&&(s.detail==="too-many-entries"||s.detail==="too-large")||s.reason==="too-many-parts";A({code:l?"ResourceLimitExceeded":"InvalidArgument",target:"createServer"})}let i=o.session,a=si(i.store,{measurer:i.measurer,...t?{renderImage:s=>di(i,s.slideIndex,{...s.shapeNodeId===void 0?{}:{shapeNodeId:s.shapeNodeId},...s.width===void 0?{}:{width:s.width},...s.height===void 0?{}:{height:s.height}},t)}:{}});return cr({host:{...a,dispose(){a.dispose(),i.dispose()}},save:!0})}export{L as a,xe as b,M as c,we as d,k as e,Zn as f,Jn as g,Gn as h,eo as i,to as j,no as k,oo as l,ro as m,io as n,ao as o,so as p,lo as q,ho as r,co as s,uo as t,po as u,mo as v,go as w,fo as x,bo as y,on as z,ht as A,yo as B,xo as C,Pe as D,ne as E,Oe as F,ko as G,ae as H,H as I,pe as J,me as K,rt as L,Y as M,De as N,Be as O,ze as P,qe as Q,We as R,Xe as S,_e as T,ve as U,Re as V,Se as W,ue as X,q as Y,Ve as Z,ke as _,V as $,re as aa,J as ba,Te as ca,Le as da,G as ea,Ke as fa,ee as ga,je as ha,Qe as ia,$e as ja,Ie as ka,Ne as la,K as ma,Ee as na,Ze as oa,Je as pa,Ge as qa,et as ra,tt as sa,B as ta,ie as ua,be as va,nt as wa,ot as xa,se as ya,Fe as za,ye as Aa,Me as Ba,Ue as Ca,it as Da,at as Ea,pt as Fa,mt as Ga,cr as Ha,Td as Ia};
|
package/dist/index.js
CHANGED
|
@@ -3,4 +3,4 @@ Copyright (c) 2026 Eigenpal, Inc. All rights reserved.
|
|
|
3
3
|
Licensed under the EigenPal Pro Evaluation License 1.0. See LICENSE.md in this package.
|
|
4
4
|
Production use requires a commercial agreement: licensing@eigenpal.com
|
|
5
5
|
*/
|
|
6
|
-
import{$ as ee,A,Aa as Ae,B as U,Ba as Ue,C as g,Ca as ge,D as h,Da as he,E as k,Ea as ke,F as l,Fa as le,G as q,Ga as qe,H as w,I as B,Ia as e,J as D,K as F,L as G,M as H,N as I,O as J,P as K,Q as L,R as M,S as Q,T,U as V,V as W,W as X,X as Y,Y as Z,Z as _,_ as $,a as r,aa as re,b as t,ba as te,c as o,ca as oe,d as i,da as ie,e as p,ea as pe,f as m,fa as me,g as a,ga as ae,h as n,ha as ne,i as s,ia as se,j as x,ja as xe,k as c,ka as ce,l as v,la as ve,m as P,ma as Pe,n as S,na as Se,o as d,oa as de,p as f,pa as fe,q as E,qa as Ee,r as u,ra as ue,s as y,sa as ye,t as O,ta as Oe,u as b,ua as be,v as C,va as Ce,w as N,wa as Ne,x as R,xa as Re,y as j,ya as je,z,za as ze}from"./chunk-
|
|
6
|
+
import{$ as ee,A,Aa as Ae,B as U,Ba as Ue,C as g,Ca as ge,D as h,Da as he,E as k,Ea as ke,F as l,Fa as le,G as q,Ga as qe,H as w,I as B,Ia as e,J as D,K as F,L as G,M as H,N as I,O as J,P as K,Q as L,R as M,S as Q,T,U as V,V as W,W as X,X as Y,Y as Z,Z as _,_ as $,a as r,aa as re,b as t,ba as te,c as o,ca as oe,d as i,da as ie,e as p,ea as pe,f as m,fa as me,g as a,ga as ae,h as n,ha as ne,i as s,ia as se,j as x,ja as xe,k as c,ka as ce,l as v,la as ve,m as P,ma as Pe,n as S,na as Se,o as d,oa as de,p as f,pa as fe,q as E,qa as Ee,r as u,ra as ue,s as y,sa as ye,t as O,ta as Oe,u as b,ua as be,v as C,va as Ce,w as N,wa as Ne,x as R,xa as Re,y as j,ya as je,z,za as ze}from"./chunk-CSSS47FS.js";var Be=Object.freeze({createServer:e});export{h as Adjustments,i as Application,je as Binding,ze as BindingCollection,a as BindingType,se as Border,xe as Borders,G as BulletFormat,b as BulletStyle,O as BulletType,o as ClientObject,p as ClientResult,n as ConnectorType,Ae as CustomProperty,Ue as CustomPropertyCollection,Y as CustomXmlPart,Z as CustomXmlPartCollection,_ as CustomXmlPartScopedCollection,he as DocumentProperties,g as DocumentPropertyType,q as GeometricShapeType,H as Hyperlink,I as HyperlinkCollection,J as HyperlinkScopedCollection,s as HyperlinkType,A as InsertSlideFormatting,ce as Margins,ke as PageSetup,F as ParagraphFormat,f as ParagraphHorizontalAlignment,Re as PlaceholderFormat,u as PlaceholderType,Be as PptxEditor,r as PptxEditorError,ge as Presentation,qe as RequestContext,Oe as Shape,S as ShapeAutoSize,be as ShapeCollection,k as ShapeFill,c as ShapeFillType,D as ShapeFont,E as ShapeFontUnderlineStyle,U as ShapeGetImageFormatType,Ne as ShapeGroup,v as ShapeLineDashStyle,l as ShapeLineFormat,P as ShapeLineStyle,Ce as ShapeScopedCollection,m as ShapeType,x as ShapeZOrder,te as Slide,V as SlideBackground,T as SlideBackgroundFill,C as SlideBackgroundFillType,L as SlideBackgroundGradientFill,N as SlideBackgroundGradientFillType,M as SlideBackgroundPatternFill,R as SlideBackgroundPatternFillType,Q as SlideBackgroundPictureOrTextureFill,K as SlideBackgroundSolidFill,oe as SlideCollection,pe as SlideLayout,W as SlideLayoutBackground,me as SlideLayoutCollection,y as SlideLayoutType,ae as SlideMaster,X as SlideMasterBackground,ne as SlideMasterCollection,ie as SlideScopedCollection,Se as Table,Pe as TableCell,ye as TableCellCollection,fe as TableColumn,ue as TableColumnCollection,de as TableRow,Ee as TableRowCollection,z as TableStyle,ve as TableStyleSettings,$ as Tag,ee as TagCollection,w as TextFrame,B as TextRange,d as TextVerticalAlignment,j as ThemeColor,re as ThemeColorScheme,le as TrackedObjects,t as isPptxEditorError};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pptx-editor.dev/editor-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-canary.20261109032918.sha-39dc46e",
|
|
4
4
|
"description": "Presentation automation for PPTX: an Office.js-shaped batching object model that drives a deck on a server or in an editor already open in a page.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"build": "tsup",
|
|
30
|
-
"typecheck": "
|
|
30
|
+
"typecheck": "tsc --noEmit",
|
|
31
31
|
"api:extract": "node ../../scripts/api-extractor.mjs --package @pptx-editor.dev/editor-api --local",
|
|
32
32
|
"api:check": "node ../../scripts/api-extractor.mjs --package @pptx-editor.dev/editor-api",
|
|
33
33
|
"compat:generate": "node scripts/generate-conformance.mjs",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"office-js"
|
|
46
46
|
],
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@pptx-editor.dev/core": "
|
|
48
|
+
"@pptx-editor.dev/core": "0.3.0-canary.20261109032918.sha-39dc46e"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@pptx-editor.dev/core": "workspace:*"
|
package/dist/chunk-K2KXZPMF.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
Copyright (c) 2026 Eigenpal, Inc. All rights reserved.
|
|
3
|
-
Licensed under the EigenPal Pro Evaluation License 1.0. See LICENSE.md in this package.
|
|
4
|
-
Production use requires a commercial agreement: licensing@eigenpal.com
|
|
5
|
-
*/
|
|
6
|
-
var ur="Use a whole number of 0 or more that is less than the number of items.",B="Use true or false.",W="Use text of at most 4096 characters, with no control characters.",pr="Use a number of points from 0 to 4032.",gt="Use a margin of 0 to 4032 points.",mr=[["color","Use '#RRGGBB' (for example '#1F4E79') or a named color such as 'red'."],["foregroundColor","Use '#RRGGBB' (for example '#1F4E79') or a named color such as 'red'."],["backgroundColor","Use '#RRGGBB' (for example '#1F4E79') or a named color such as 'red'."],["transparency","Use a fraction from 0 (opaque) to 1 (clear)."],["fill","Use a fill object: a solid color, a gradient, a pattern, a picture, or no fill."],["gradientType","Use a value of SlideBackgroundGradientFillType."],["pattern","Use a value of SlideBackgroundPatternFillType."],["imageBase64","Use the Base64 bytes of a PNG, JPEG, GIF, or BMP picture."],["base64","Use the Base64 bytes of a PNG, JPEG, GIF, or BMP picture."],["image-size","Use a width and a height greater than 0, at most 8192 pixels."],["background","Use a fill write that this slide can take; a layout or master cannot inherit."],["areBackgroundGraphicsHidden",B],["line","Use a line object with color, weight, dashStyle, style, transparency, or visible."],["weight","Use a line weight from 0 to 1584 points."],["dashStyle","Use a value of ShapeLineDashStyle."],["style","Use a value of ShapeLineStyle, or a table style the presentation defines."],["visible",B],["side","Use a border side: left, right, top, bottom, diagonalDown, or diagonalUp."],["shape","Use a shape kind that this collection can add, with its options."],["shapes","Use an array of shapes of one slide or one group, at most 10 000."],["geometry","Use a value of GeometricShapeType."],["connector","Use a value of ConnectorType."],["left","Use a number of points from -169 093 to 169 093."],["top","Use a number of points from -169 093 to 169 093."],["width","Use a number of points from 0 to 169 093."],["height","Use a number of points from 0 to 169 093."],["rotation","Use a rotation in degrees, a finite number."],["position","Use a value of ShapeZOrder."],["props","Use an object of the properties to write."],["isDecorative",B],["title",W],["descr",W],["altTextTitle",W],["altTextDescription",W],["name","Use a name of 1 to 255 characters, with no control characters."],["value","Use a value of the type this property takes, in its range."],["index",ur],["group","Use a shape that is a group."],["group-count","Use two or more different shapes."],["group-parent","Use shapes of one slide, or of one group."],["text","Use text of at most 1 000 000 characters, with no control characters."],["span","Use a start and a length inside the text, around some text."],["start","Use a start of 0 or more, at most the length of the text."],["length","Use a length of 0 or more that ends inside the text."],["font","Use an object of font properties."],["size","Use a font size from 1 to 4000 points."],["underline","Use a value of ShapeFontUnderlineStyle."],["bold",B],["italic",B],["allCaps",B],["smallCaps",B],["strikethrough",B],["doubleStrikethrough",B],["subscript",B],["superscript",B],["paragraph","Use an object of paragraph format properties."],["alignment","Use a value of ParagraphHorizontalAlignment."],["indentLevel","Use a whole number from 1 to 9."],["bulletStyle","Use a value of ShapeBulletStyle."],["verticalAlignment","Use a value of TextVerticalAlignment."],["wordWrap",B],["autoSize","Use a value of ShapeAutoSize."],["leftMargin",gt],["rightMargin",gt],["topMargin",gt],["bottomMargin",gt],["address","Use an 'http', 'https', 'mailto', 'tel', or 'ftp' address of at most 2048 characters."],["screenTip","Use a screen tip of at most 1024 characters, with no control characters."],["values","Use an array of rows of strings, at most one per row and one per column."],["cell","Use a row and a column inside the table."],["row","Use a row index of 0 or more, less than the number of rows."],["column","Use a column index of 0 or more, less than the number of columns."],["rows","Use a whole number of rows from 1 to 75."],["columns","Use a whole number of columns from 1 to 75."],["rowCount","Use a whole number of rows of 1 or more that ends inside the table."],["columnCount","Use a whole number of columns of 1 or more that ends inside the table."],["count","Use a whole number of 1 or more that fits the table."],["lineSize",pr],["anchor","Use a value of TableCellVerticalAlignment."],["anchorCenter",B],["margins","Use an object of margins, each from 0 to 4032 points, or null."],["options","Use true or false for text and for format."],["styleName","Use the name of a table style as a string, or null."],["firstRow",B],["lastRow",B],["firstColumn",B],["lastColumn",B],["bandedRows",B],["bandedColumns",B],["properties","Use an object of document properties."],["revisionNumber","Use a whole number from 0 to 2147483647."],["subject",W],["author",W],["keywords",W],["comments",W],["category",W],["lastAuthor",W],["company",W],["manager",W],["slideWidth","Use a slide width from 72 to 4032 points (1 to 56 inches)."],["slideHeight","Use a slide height from 72 to 4032 points (1 to 56 inches)."],["key","Use a key of 1 to 255 characters, with no control characters, on a presentation with fewer than 2 147 483 647 properties."],["type","Use a value of DocumentPropertyType."],["id","Use an id of 1 to 255 characters."],["binding-limit","Delete bindings first: a runtime keeps at most 10 000."],["binding-selection","Select exactly one shape first."],["custom-xml","Use well-formed XML text with no DTD and one root element."],["custom-xml-id","Use an id that no other custom XML part has."],["xml","Delete custom XML parts first: the presentation has no free part name left."],["namespaceUri","Use a namespace URI as a string."],["slides","Use a non-empty array of slides of this presentation."],["layoutId","Use the id of a slide layout of this presentation as a string."],["slideMasterId","Use the id of a slide master of this presentation as a string."],["formatting","Use a value of InsertSlideFormatting."],["import-base64","Use the Base64 bytes of a PPTX file."],["sourceSlideIds","Use an array of different slide ids of the source file."],["operations","Make fewer calls in one sync."]],gr=Object.freeze(Object.assign(Object.create(null),Object.fromEntries(mr)));function Rn(r){return r===void 0?void 0:gr[r]}var Sn=[["disabled.cropFillMode","edit.picture-not-stretched","The picture is tiled or inset in its frame, so it cannot be cropped. Use a stretched picture."],["disabled.cropLocked","edit.picture-locked","The picture is locked against this change in the file. Remove the lock in the file first."],["disabled.rotationLocked","edit.picture-locked","The picture is locked against rotation in the file. Remove the lock in the file first."],["disabled.sizeLocked","edit.picture-locked","The picture is locked against resizing in the file. Remove the lock in the file first."],["disabled.shapeLocked","edit.picture-locked","The picture is locked against a change of shape in the file. Remove the lock in the file first."],["disabled.decorative","edit.decorative","The shape is decorative, so it has no alternative text. Set isDecorative to false first."],["disabled.distributeNeedsThree","edit.needs-three-shapes","Distributing needs three or more shapes. Pass more shapes."],["disabled.groupNeedsTwo","edit.group-count","A group needs two or more different shapes. Remove repeated shapes or add more."],["disabled.groupScope","edit.group-parent","The shapes are not in the same parent. Use shapes of one slide, or of one group."],["disabled.imageSizeUnknown","edit.picture-size-unknown","The size of the picture cannot be read from its bytes. Use a PNG, JPEG, or GIF picture."],["disabled.mergeOneCell","edit.merge-one-cell","A merge needs two or more cells. Pass a row count or a column count above 1."],["disabled.mixedSize","edit.mixed-size","The text has more than one size, so it cannot be stepped as one. Set font.size instead."],["disabled.noArrangeChange","edit.no-change","The shapes are already in that position. Read zOrderPosition before you move a shape."],["disabled.noEffectChange","edit.no-change","The shapes do not have that effect, so nothing changes."],["disabled.noLockChange","edit.no-change","The setting already has that value, so nothing changes."],["disabled.noNameChange","edit.no-change","The shape already has that name, so nothing changes."],["disabled.noVisibilityChange","edit.no-change","The shapes already have that visibility, so nothing changes."],["disabled.noEditor","host.no-document","The editor has no presentation open yet. Wait until it has loaded one."],["disabled.noList","edit.no-list","The paragraphs have no bullets or numbers. Set bulletFormat.visible to true first."],["disabled.noMatch","edit.no-match","The text was not found. Read the text again."],["disabled.noNotes","edit.no-notes","The slide has no speaker notes. Add notes first."],["disabled.noPicture","edit.not-a-picture","The shape is not a picture. Use a picture shape."],["disabled.onePicture","edit.not-a-picture","This change takes exactly one picture. Pass one picture shape."],["disabled.pictureEffects","edit.picture-effects","The picture has effects this API cannot change. Change another property, or remove the effects in the file."],["disabled.noSections","edit.no-sections","The presentation has no sections. Add a section first."],["disabled.sectionEdge","edit.section-edge","The section is already at that edge of the presentation, so it cannot move further."],["disabled.noSelection","edit.no-target","The call has no shape to act on. Pass a shape, or select one in the editor first."],["disabled.selectOne","edit.no-target","This change takes exactly one shape. Pass one shape."],["disabled.selectText","edit.no-target","The call needs a text range. Pass a text range with text in it."],["disabled.selectWord","edit.no-target","The call needs text. Pass a text range that is not empty."],["disabled.selectNotesText","edit.no-target","The call needs the text of the notes. Address the text of the notes placeholder."],["disabled.noShapeEffects","edit.no-effects","The shape cannot take effects. Use a shape, a line, or a picture."],["disabled.noShapeFill","edit.no-fill","The shape cannot have a fill, for example a line or a connector. Use a shape with an area."],["disabled.noShapeStyle","edit.no-style","The shape cannot take a shape style. Use a geometric shape."],["disabled.noSlideNumberPlaceholder","edit.no-slide-number-placeholder","The layouts have no slide number placeholder. Add one to the layout first."],["disabled.noTable","edit.not-a-table","The shape is not a table. Use a table shape."],["disabled.notAGroup","edit.not-a-group","The shape is not a group. Check shape.type first, and use a group shape."],["disabled.notALine","edit.not-a-line","The shape is not a line or a connector. Use a line."],["disabled.noText","edit.no-text-frame","The shape has no text frame. Check shape.type first, and read text only of a shape that holds text."],["disabled.slideNotCopyable","import.slide-not-copyable","A slide to import has threaded comments or an embedded control. Leave it out with sourceSlideIds."],["disabled.slideSorter","host.slide-sorter","The editor shows the slide sorter, which takes no shape edits. Switch the editor to the normal view."],["disabled.splitOneCell","edit.split-one-cell","A split takes one cell. Use getCellOrNullObject for one cell, then split it."],["disabled.splitUneven","edit.split-uneven","A merged cell splits only into parts that divide it evenly. Use a row and column count that divides its span."],["disabled.tableText","edit.table-text","A table cell does not take this text body setting. Set it on a text box or a shape."],["disabled.tableTooLarge","edit.table-too-large","A table has at most 75 columns and 1,000 rows. Use fewer rows or columns."],["disabled.unsupportedElement","edit.unsupported-element","The object is of a kind this API cannot edit, for example a chart or an embedded object. Read it, or edit another object."],["errors.altTextLength","edit.alt-text-length","Alternative text can have up to 4000 characters. Shorten it."],["errors.clipboard","edit.clipboard","The content is not shapes this API can insert. Insert shapes from a presentation instead."],["errors.coordinateRange","edit.coordinate-range","The position or size is outside the range a slide can hold. Use values within the slide size limits."],["errors.exportFailed","image.failed","The picture could not be made. Read the shape, then try again."],["errors.exportSize","image.invalid-size","A picture is from 16 to 8192 pixels on a side. Pass a size in that range."],["errors.findStale","edit.stale-target","An edit removed the object. Read the presentation again."],["errors.findTooLong","edit.text-too-long","The text is too long for this call. Use shorter text."],["errors.invalidName","edit.invalid-name","A name has 1 to 255 characters. Use a shorter name that is not empty."],["errors.invalidText","edit.invalid-text","The text has no characters that a slide can hold, such as control characters only. Remove them."],["errors.layoutNotFound","edit.layout-not-found","The presentation has no such slide layout. Read the layouts of the master again."],["errors.malformed","edit.malformed-part","A part of the presentation is damaged, so the change cannot apply. Repair the file, then try again."],["errors.sectionName","edit.section-name","A section name has 1 to 255 characters. Use a shorter name that is not empty."],["errors.sectionNotFound","edit.section-not-found","The presentation has no such section. Read the sections again."],["errors.slideNotFound","edit.slide-not-found","The presentation has no such slide. Read the slides again."],["errors.tooLarge","edit.too-large","The content is larger than the presentation accepts. Use smaller content."],["errors.unsafeLink","argument.not-accepted","Use an http, https, mailto, tel, or ftp address of up to 2048 characters."],["errors.unsupported","edit.unsupported","The presentation cannot take this change. Change another property."],["partly-applied","edit.partly-applied","A read in this sync needed the result of the writes before it, so those writes applied first. The call in errorLocation and the calls after it did not apply."],["document","host.no-document","The host holds no presentation. Open one before you run."],["damaged","host.damaged-document","A slide of the presentation did not open, so the editor holds it read-only. Repair the file and open it again."],["internal","host.internal","The engine could not complete the request, and nothing changed. Report the call that failed."],["no-theme","edit.no-theme-color","The master has no theme, or the theme has no such color. Use a theme color of the master."],["part","edit.not-xml-part","That part of the presentation is not XML. Use an XML part."],["picture","edit.picture-not-in-package","The background picture is a theme fill or a link outside the file. Pass imageBase64 to set a picture."],["rotation","edit.no-rotation","A table or another graphic frame does not rotate. Rotate another shape."],["transparency","edit.fill-not-solid","Only a solid fill has a transparency. Call setSolidColor first."],["result","edit.stale-target","The object is not available in this batch. Read the presentation again."],["parentGroup","edit.not-in-group","The shape is not in a group. Check shape.level first: 0 is the top level of the slide."],["group","edit.not-a-group","The shape is not a group. Check shape.type first, and use a group shape."]],Xt=Object.freeze({"invalid-argument":["argument.not-accepted","An argument is out of range or of the wrong form. errorLocation names the call; its reference lists the values it takes."],"item-not-found":["edit.item-not-found","The collection has no item with that id, key, or index. Read the items again."],"stale-revision":["edit.stale-document","Another writer changed the presentation after this context read it. Read again before you write."],"transaction-refused":["edit.refused","The presentation refused the change as a whole, and nothing applied. Change one property at a time to find the cause."],disposed:["host.disposed","The host was disposed. Create a new runtime."],"document-unavailable":["host.no-document","The editor holds no presentation right now. Wait until it has loaded one."],"unknown-operation":["host.unknown-operation","The host does not know this call. Use a host of the same package version."]});var _t=Object.freeze({PropertyNotLoaded:"the property has not been loaded. Call load(...) and await context.sync() before reading it.",ValueNotLoaded:"the result has not been filled in yet. Await context.sync() before reading it.",InvalidObjectPath:"the object cannot be addressed. Keep proxies within their run, or use context.trackedObjects.add(...) before the run ends.",ObjectInUse:"the object still belongs to a run that has not finished. Await that run before passing the object to another one.",InvalidArgument:"the argument is not one this API accepts.",ResourceLimitExceeded:"the presentation exceeds a supported resource limit.",ItemNotFound:"the collection has no such item.",NotSupported:"the operation or argument is outside the supported subset for this host or content.",NotImplemented:"this API does not implement that operation for this target.",InvalidRequestContext:"the request context has finished. Start another run to continue.",RuntimeDisposed:"the runtime has been disposed.",StaleDocument:"the presentation changed after this context read it, so nothing was applied. Read again before you decide.",DocumentUnavailable:"the presentation is not available right now.",GeneralException:"the presentation could not complete the request."}),ft="argument.not-accepted",kn=new Map([["gone","edit.stale-target","An edit removed the object. Read the presentation again."],["null-object","edit.null-object","The object is a null object: its lookup found nothing. Check isNullObject first."],["refused-sync","sync.object-from-refused-sync","This object came from a sync that was refused, so it was never created. Create it again."],["disabled.viewing","edit.read-only","The editor is open for viewing. Switch to editing."],["selection","host.no-selection","Only a runtime over a live editor has a selection."],["no-text","edit.no-text-frame","The shape has no text frame. Check shape.type first, and read text only of a shape that holds text."],["not-group","edit.not-a-group","The shape is not a group. Check shape.type first, and use a group shape."],["group-count","edit.group-count","A group needs two or more different shapes. Remove repeated shapes or add more."],["disabled.groupPlaceholder","edit.group-placeholder","A placeholder cannot be in a group. Group shapes that are not placeholders."],["group-parent","edit.group-parent","The shapes are not in the same parent. Use shapes of one slide, or of one group."],["group-owner","edit.group-off-slide","Only shapes on a slide can be grouped or ungrouped. Use a slide, not a layout or master."],["group-line","edit.group-line","A group has no outline of its own. Set the line format of each shape in the group."],["disabled.lastSlide","edit.last-slide","A presentation keeps at least one slide. Add a slide before you delete this one."],["not-table","edit.not-a-table","The shape is not a table. Use a table shape."],["table-style-undefined","edit.table-style-undefined","The presentation does not define that table style. Choose a style that the presentation defines, or MediumStyle2Accent1, which is built in."],["table-style-unknown","read.table-style-unknown","The table uses a style that has no TableStyle value. Read the other settings, or set a style first."],["no-preset-geometry","edit.no-preset-geometry","The shape has no preset geometry, so it has no adjustments. Use a shape with a preset geometry, not a freeform, a group, or a table."],["merge-overlap","edit.merge-overlap","The new span cuts another merged cell. Resize or split that cell first."],["duplicate-id","edit.duplicate-shape-id","Another shape on the slide has the same id. A write could reach the wrong shape."],["custom-xml","edit.invalid-custom-xml","The text is not one well-formed XML element, declares a DTD or an entity, declares an encoding other than UTF-8, or is longer than 8 MiB. Write plain XML with one root."],["custom-xml-id","edit.custom-xml-id-taken","Another custom XML part of the presentation has that id. Use a new GUID."],["custom-properties-root","read.custom-properties-invalid","The custom properties part of the file is not a custom properties part. Remove it first."],["import-base64","import.invalid-base64","The file is not Base64 text, or it is larger than 100 MiB. Send the PPTX bytes as Base64."],["import-package","import.not-a-presentation","The file is not a presentation, or it exceeds a limit of the bounded reader."],["import-slide","import.slide-not-found","The source presentation has no slide with that id. Use the ids of its Slide objects."],["import-target","import.target-not-found","The presentation has no slide with the targetSlideId. Read the slide ids again."],["save","host.no-save","This runtime borrows an editor, which saves its own document."],["images","host.no-images","This runtime draws no pictures. Use a runtime over a live editor in a browser, or create the server runtime with a rasterize option."],["image-owner","image.not-on-slide","Only a slide or a shape on a slide has a picture. Use a shape of a slide, not of a layout or a master."],["image-size","image.invalid-size","The width and the height of a picture must be positive numbers of pixels."],["image-failed","image.failed","The editor could not draw the picture: the shape is not drawn (for example, it is hidden), the browser has no canvas, or the rasterizer failed or answered something other than a PNG of the asked size. Read the shape, then try again."],["address",ft,"Use an http, https, mailto, tel, or ftp address of up to 2048 characters."],["binding-shape","binding.shape-deleted","An edit deleted the shape of the binding. Delete the binding, or bind another shape with the same id."],["binding-selection","binding.selection","The selection is not one shape. Select exactly one shape on a slide, then add the binding."],["binding-limit","binding.limit","The runtime holds 10000 bindings. Delete a binding before you add another."],["read-after-commit","edit.read-after-commit","The writes of this sync were applied, but a read after them failed. Read again, and do not apply the same edit again."]].map(([r,e,t])=>[r,Object.freeze({code:e,hint:t})]).concat(Sn.map(([r,e,t])=>[r,Object.freeze({code:e,hint:t})])));function Ln(r,e){let t=I(e);if(t)return t;let n=r==="invalid-argument"?Rn(e):void 0;if(n)return Object.freeze({code:ft,hint:n});let o=Object.prototype.hasOwnProperty.call(Xt,r)?Xt[r]:void 0;return o?Object.freeze({code:o[0],hint:o[1]}):void 0}var fr=/^disabled\.slideNotCopyable:import-(comments|control)(?::(\d{1,10}(?:,\d{1,10}){0,19}))?$/;function br(r){let e=fr.exec(r);if(!e)return;let t=e[2]?.split(",")??[],n=t.length<=1,o=t.length===0?"A slide to import":`${n?"Slide":"Slides"} ${t.join(", ")} of the source`,i=e[1]==="comments"?"threaded comments, which an import cannot copy yet":"an embedded control (p:control)";return Object.freeze({code:e[1]==="comments"?"import.slide-has-comments":"import.slide-has-controls",hint:`${o} ${n?"has":"have"} ${i}. Leave ${n?"it":"them"} out with sourceSlideIds.`})}function I(r){if(r!==void 0)return kn.get(r)??br(r)??kn.get(r.split(":")[0])}var yr="the object no longer exists in the presentation. An edit removed it. Read the presentation again to get a fresh object.",xr="the object is a null object, so it cannot be written or called. Check isNullObject after a sync before you use an object from a get...OrNullObject method.";function Ar(r,e){return r==="InvalidArgument"&&e?.code===ft?`${_t[r]} ${e.hint}`:r!=="InvalidObjectPath"?_t[r]:e?.code==="edit.stale-target"?yr:e?.code==="edit.null-object"?xr:_t[r]}var L=class extends Error{code;target;expectedRevision;actualRevision;debugInfo;traceMessages;constructor(e){let t=Ar(e.code,e.diagnostic),n=e.target?`${t} (${e.target})`:t;super(n),this.name="PptxEditorError",this.code=e.code,this.traceMessages=Object.freeze([...e.traceMessages??[]]),this.debugInfo=Object.freeze({code:e.code,message:n,...e.target===void 0?{}:{errorLocation:e.target},...e.diagnostic===void 0?{}:{innerError:Object.freeze({code:e.diagnostic.code,message:e.diagnostic.hint})}}),e.target!==void 0&&(this.target=e.target),e.expectedRevision!==void 0&&(this.expectedRevision=e.expectedRevision),e.actualRevision!==void 0&&(this.actualRevision=e.actualRevision)}};function xe(r){return r instanceof L?!0:typeof r=="object"&&r!==null&&r.name==="PptxEditorError"&&typeof r.code=="string"}function A(r){throw new L(r)}function jn(r,e){if(!(r instanceof L)||e.length===0)return r;let t=r.debugInfo.innerError;return new L({code:r.code,...r.target===void 0?{}:{target:r.target},...r.expectedRevision===void 0?{}:{expectedRevision:r.expectedRevision},...r.actualRevision===void 0?{}:{actualRevision:r.actualRevision},...t===void 0?{}:{diagnostic:{code:t.code,hint:t.message}},traceMessages:e})}function c(r,e,t){let n=t===void 0?`Use ${e}.`:`Did you mean '${t}'? Use ${e}.`;throw new L({code:"InvalidArgument",...r===void 0?{}:{target:r},diagnostic:Object.freeze({code:ft,hint:n})})}var wr=64;function Vt(r,e){let t=r.toLowerCase(),n=e.toLowerCase(),o=[],i=Array.from({length:n.length+1},(s,a)=>a);for(let s=1;s<=t.length;s+=1){let a=[s];for(let l=1;l<=n.length;l+=1){let h=Math.min(i[l]+1,a[l-1]+1,i[l-1]+(t[s-1]===n[l-1]?0:1));s>1&&l>1&&t[s-1]===n[l-2]&&t[s-2]===n[l-1]&&(h=Math.min(h,o[l-2]+1)),a[l]=h}o=i,i=a}return i[n.length]}function Tn(r){return r.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(e=>e.length>0)}function Cr(r,e){return r===e||r.length>=3&&e.startsWith(r)||e.length>=3&&r.startsWith(e)?!0:Math.min(r.length,e.length)>=4&&Vt(r,e)<=1}function S(r,e){if(typeof r!="string"||r.length===0||r.length>wr)return;let t,n=1/0;for(let a of e){let l=Vt(r,a);l<n&&(t=a,n=l)}if(t===void 0)return;let o=Math.min(3,Math.max(1,Math.floor(t.length/3)));if(n<=o)return t;let i=Tn(r);if(i.length===0)return;let s;for(let a of e){let l=Tn(a),h=new Set,p=0;for(let b of i){let w=l.findIndex((P,T)=>!h.has(T)&&Cr(b,P));w<0?p+=1:h.add(w)}if(p>(i.length>=3?1:0))continue;let C={candidate:a,missing:p,extra:l.length-h.size,d:Vt(r,a)};(!s||C.missing<s.missing||C.missing===s.missing&&(C.extra<s.extra||C.extra===s.extra&&C.d<s.d))&&(s=C)}return s?.candidate}var Pr=12;function z(r){let e=r.map(t=>`'${t}'`);return e.length===1?e[0]:e.length>Pr?`one of the ${e.length} values of the enum, such as ${e.slice(0,3).join(", ")}`:`one of ${e.slice(0,-1).join(", ")}${e.length>2?",":""} or ${e.at(-1)}`}var Ae=Symbol("pptx-editor.runtime.internals"),bt=Symbol("pptx-editor.runtime.release"),yt=Symbol("pptx-editor.runtime.rebind"),le=Symbol("pptx-editor.runtime.path"),te=Symbol("pptx-editor.runtime.load-request"),xt=Symbol("pptx-editor.runtime.defer-refusal"),At=Symbol("pptx-editor.runtime.loaded-values");var Or=new Set(["InvalidArgument","NotImplemented","NotSupported","ItemNotFound"]),vr=new Set(["constructor","load","toJSON","track","untrack","at","command","deleteLines","enqueue","find","groupOf","handlesOf","hasLoadedProperty","indexArg","itemOf","keyArg","listing","loadBackground","loadCellFormat","loadedProperty","loadScalars","lookup","make","markSkipped","memberPath","navigation","onLoad","requireUsable","selection","setLoadedProperty","takeNestedPaths","writeBackground","writeSize"]),Kt=0;function Rr(){let r=new Proxy(function(){},{get:(e,t)=>t==="then"||typeof t=="symbol"?void 0:r,set:()=>!0,apply:()=>r});return r}function Dn(r,e){return function(...t){Kt+=1;try{return r.apply(this,t)}catch(n){if(Kt>1||!xe(n)||!Or.has(n.code))throw n;return this[xt](n),e?Rr():void 0}finally{Kt-=1}}}var $n=new WeakSet,In=new Set;function Nn(r,e){for(;r&&r!==e&&!$n.has(r);){$n.add(r);for(let t of Object.getOwnPropertyNames(r)){if(vr.has(t))continue;let n=Object.getOwnPropertyDescriptor(r,t);typeof n.value=="function"?(Object.defineProperty(r,t,{...n,value:Dn(n.value,!0)}),In.add(t)):n.set&&(Object.defineProperty(r,t,{...n,set:Dn(n.set,!1)}),In.add(t))}r=Object.getPrototypeOf(r)}}function Rt(r){return r.select.length===0&&r.nested.size===0&&r.items===void 0}function wt(r){return r.all||Rt(r)}var Jt=Object.freeze({select:[],all:!1,nested:new Map,itemSelect:[]}),Qt=new Set(["select","expand","top","skip"]),Bn=/^[A-Za-z][A-Za-z0-9]*$/,Gt="$all",Ct="items",Pt=8,at=256,En=64;function Fn(){return{select:[],all:!1,nested:new Map}}var Ot=class{constructor(e){this.target=e}target;#e=at;spend(){this.#e-=1,this.#e<0&&c(this.target,`at most ${at} property names in one load`)}};function Mn(r,e){let t=r.nested.get(e);return t||(t=Fn(),r.nested.set(e,t)),t}function Sr(r,e){typeof r!="string"&&c(e,"a property path as a string");let t=r.split("/",Pt+1);return t.length<=Pt&&t.every((o,i)=>o.length<=En&&(Bn.test(o)||o===Gt&&i===t.length-1))||c(e,"property names separated by '/', such as 'items/name'"),t}function kr(r,e,t,n){let o=r,i=t?e.length-1:e.length;for(let a=0;a<i;a+=1)n.spend(),o=Mn(o,e[a]);if(!t)return;n.spend();let s=e[i];s===Gt?o.all=!0:o.select.includes(s)||o.select.push(s)}function Tr(r,e){return typeof r=="string"?r.split(",",at+1).map(t=>t.trim()):Array.isArray(r)?(r.length>at&&c(e,`at most ${at} paths`),r.map(t=>typeof t=="string"?t.trim():t)):c(e,"a path string, an array of path strings, or an options object")}function Yt(r,e,t,n){let o=new Ot(n),i=Tr(e,n);i.length===0&&c(n,"at least one property name");for(let s of i)kr(r,Sr(s,n),t,o)}function vt(r,e){return(typeof r!="number"||!Number.isInteger(r)||r<0)&&c(e,"a whole number of 0 or more"),r}function Un(r){if(typeof r!="object"||r===null||Array.isArray(r))return!1;let e=Object.getPrototypeOf(r);return e===Object.prototype||e===null}function Hn(r,e,t,n,o){n>Pt&&c(o.target,`a property tree at most ${Pt} levels deep`);for(let i of Object.keys(e)){o.spend();let s=e[i];if(i===Gt)typeof s!="boolean"&&c(`${t}.${i}`,"true or false"),s&&(r.all=!0);else if(i==="$top")r.top=vt(s,`${t}.${i}`);else if(i==="$skip")r.skip=vt(s,`${t}.${i}`);else if(i.length>En||!Bn.test(i))c(t,"property names of letters and digits");else if(s===!0)r.select.includes(i)||r.select.push(i);else{if(s===!1||s===void 0)continue;Un(s)?Hn(Mn(r,i),s,`${t}.${i}`,n+1,o):c(`${t}.${i}`,"true, false, or a nested property tree")}}}function lt(r){let e=r.nested.get(Ct),t=new Map;for(let[i,s]of r.nested)i!==Ct&&(r.select.includes(i)&&(s.all=!0),t.set(i,lt(s)));let n=r.select.filter(i=>!t.has(i)),o=e?lt(e):void 0;return{select:n,all:r.all,nested:t,...o?{items:o}:{},itemSelect:o?o.select:[],...r.top===void 0?{}:{top:r.top},...r.skip===void 0?{}:{skip:r.skip}}}function St(r,e){if(r===void 0)return Jt;let t=Fn();if(typeof r=="string"||Array.isArray(r))return Yt(t,r,!0,e),lt(t);Un(r)||c(e,"a path string, an array of path strings, or an options object");let n=Object.keys(r);if(!n.some(i=>Qt.has(i)))return Hn(t,r,e,1,new Ot(e)),lt(t);for(let i of n)Qt.has(i)||c(`${e}.${i}`,"the options select, expand, top, or skip",S(i,[...Qt]));let o=r;return o.select!==void 0&&Yt(t,o.select,!0,`${e}.select`),o.expand!==void 0&&Yt(t,o.expand,!1,`${e}.expand`),o.top!==void 0&&(t.top=vt(o.top,`${e}.top`)),o.skip!==void 0&&(t.skip=vt(o.skip,`${e}.skip`)),lt(t)}function Zt(r,e){let t=[...r.select];for(let i of e.select)t.includes(i)||t.push(i);let n=new Map(r.nested);for(let[i,s]of e.nested){let a=n.get(i);n.set(i,a?Zt(a,s):s)}let o=r.items&&e.items?Zt(r.items,e.items):r.items??e.items;return{select:t,all:wt(r)||wt(e),nested:n,...o?{items:o}:{},itemSelect:o?o.select:[]}}function zn(r){let e=Rt(r)||r.select.includes(Ct),t={select:r.select.filter(s=>s!==Ct),all:r.all||e,nested:r.nested,itemSelect:[]},n=r.items,o=t.select.length>0||t.nested.size>0||t.all,i=n?o?Zt(t,n):n:o?t:void 0;return i?{...i,orNull:!0}:void 0}function qn(r){return r instanceof M?r.toJSON():r}var M=class r{#e;#t;#n;#o;#r=new Map;#i=!1;#s=!1;#a;constructor(e,t,n={}){this.#e=e,this.#t=e[Ae],this.#n=t,this.#o=n.nullable===!0,this.#t.register(this),Nn(Object.getPrototypeOf(this),r.prototype)}get context(){return this.#e}get isNullObject(){return this.#n.isReleased&&A({code:"InvalidObjectPath",target:this.#n.label}),this.#o?(this.#n.isPending&&A({code:"PropertyNotLoaded",target:`${this.#n.label}.isNullObject`}),this.#n.isNull):!1}load(e){return this.#n.isReleased&&A({code:"InvalidObjectPath",target:this.#n.label}),this.#t.assertUsable(this.#n.label),this[te](St(e,this.#n.label))}[te](e){if(this.#n.isReleased&&A({code:"InvalidObjectPath",target:this.#n.label}),this.#t.assertUsable(this.#n.label),e.items!==void 0&&!this.loadsItemPaths&&c(`${this.#n.label}.items`,"'items/' paths on a collection only"),this.#n.isNull)return this;let t=this.#t.queue.checkpoint();this.#i=!1;let n=this.#s;this.#s=e.orNull===!0;try{if(this.onLoad(e),!this.#i){let o=e.nested.keys().next().value??e.items?.nested.keys().next().value;o!==void 0&&c(`${this.#n.label}.${o}`,"a path through the navigation properties of this object")}}catch(o){throw t(),o}finally{this.#s=n}return this}get loadingOrNull(){return this.#s}takeNestedPaths(){this.#i=!0}toJSON(){let e={};for(let[t,n]of this.#r)t==="__proto__"||t==="constructor"||t==="prototype"||(e[t]=Array.isArray(n)?n.map(qn):qn(n));return e}get loadsItemPaths(){return!1}get path(){return this.#n}get internals(){return this.#t}requireUsable(){if(this.#n.isReleased&&A({code:"InvalidObjectPath",target:this.#n.label}),this.#n.isNull){let e=I("null-object");A({code:"InvalidObjectPath",target:this.#n.label,...e?{diagnostic:e}:{}})}this.#t.assertUsable(this.#n.label)}enqueue(e,t,n,o=()=>{},i,s=!0,a=!1){this.requireUsable();let l=t?`${this.#n.label}.${t}`:this.#n.label,h={sort:e,label:l,target:this.#n,...a?{continues:a}:{},plan:p=>n(C=>C.ref(p)),settle:o};i?.producedBy(h,s),this.#t.queue.push(h)}loadedProperty(e){return this.#r.has(e)||(this.#n.isReleased&&A({code:"InvalidObjectPath",target:this.#n.label}),A({code:"PropertyNotLoaded",target:`${this.#n.label}.${e}`,...this.#a?{diagnostic:this.#a}:{}})),this.#r.get(e)}markSkipped(e){this.#a=e}hasLoadedProperty(e){return this.#r.has(e)}setLoadedProperty(e,t){this.#r.set(e,t)}[At](){return[...this.#r.values()]}get[le](){return this.#n}[xt](e){this.requireUsable(),this.#t.queue.push({sort:"write",label:e.debugInfo.errorLocation??this.#n.label,target:this.#n,refusal:e,plan:()=>{throw e},settle:()=>{}})}[bt](){this.#n.release()}[yt](e){this.#e=e,this.#t=e[Ae]}};function en(r,e,t=!1){let n=r.status==="null"?I("null-object"):t?I("refused-sync"):void 0;A({code:"InvalidObjectPath",target:e,...n?{diagnostic:n}:{}})}var He=class{constructor(e){this.producer=e}producer},Wn=new WeakSet;function Xn(r){Wn.add(r)}var _n=new WeakSet;function Vn(r){_n.add(r)}var dt=class{constructor(e){this.producer=e}producer},u=class r{label;#e;#t;#n=null;#o=!0;constructor(e,t,n=null){this.label=e,this.#e=t,this.#t=n}static of(e,t){return new r(e,{status:"resolved",handle:t})}static pending(e){return new r(e,{status:"pending"})}sibling(e){let t=new r(e,{status:"pending"}),n=this.origin;return n.#n&&(t.#n=n.#n,t.#o=!1),t}static derived(e,t){return new r(e,{status:"pending"},t)}get state(){return this.#t?this.#t.state:this.#e}get origin(){return this.#t?this.#t.origin:this}get isAddressable(){return this.state.status==="resolved"}get isPending(){return this.state.status==="pending"}get isNull(){return this.state.status==="null"}get isReleased(){return this.state.status==="released"}producedBy(e,t=!0){this.origin.#n=e,this.origin.#o=t}ref(e){let t=this.state;if(t.status==="resolved")return t.handle;if(t.status==="pending"){let n=this.origin.#n,o=n?e(n):void 0;if(o!==void 0){if(this.origin.#o)return{result:o};throw new He(n)}if(n&&Wn.has(n))throw new dt(n);n&&_n.has(n)&&en(t,this.label,!0)}en(t,this.label)}handle(){let e=this.state;return e.status!=="resolved"&&en(e,this.label),e.handle}resolveTo(e){this.#t||this.#e.status==="released"||(this.#e={status:"resolved",handle:e},this.#n=null)}resolveNull(){this.#t||this.#e.status==="released"||(this.#e={status:"null"},this.#n=null)}release(){this.#t||(this.#e={status:"released"},this.#n=null)}};function g(r,e,t){if(r.kind!==e)throw new L({code:"GeneralException",target:t});return r}function Kn(r,e){return r.kind==="null"?null:g(r,"handle",e).handle}function U(r){return r instanceof M||c(void 0,"an object of this API"),r[le]}var f=class extends M{selection(e,t,n={}){let o=h=>Object.prototype.hasOwnProperty.call(n,h),i=[...t,...Object.keys(n)],s=(h,p)=>c(`${this.path.label}.${h}`,`a property of this object: ${Lr(p)}`,S(h,p));for(let h of e.select)!t.includes(h)&&!o(h)&&s(h,i);for(let h of e.nested.keys())o(h)||s(h,Object.keys(n));this.takeNestedPaths();let a=wt(e)?[...t]:[],l=h=>e.orNull?{...h,orNull:!0}:h;for(let h of e.select)t.includes(h)?a.includes(h)||a.push(h):this.setLoadedProperty(h,n[h]()[te](l(Jt)));for(let[h,p]of e.nested)this.setLoadedProperty(h,n[h]()[te](l(p)));return a}loadScalars(e,t,n,o){if(e.length===0)return;let i=`${this.path.label}.load`,s=this.loadingOrNull,a,l=h=>a=tn(n(h));this.enqueue("read","load",s?l:n,h=>{if(h.kind==="null"){this.markSkipped(s&&a?jr(a):void 0);return}let p=o(g(h,t,i));for(let C of e)this.setLoadedProperty(C,p[C])})}at(e){return`${this.path.label}.${e}`}command(e,t){let n=`${this.path.label}.${e}`;this.enqueue("write",e,t,o=>{g(o,"applied",n)})}navigation(e,t,n,o=!1){let i=u.pending(`${this.path.label}.${e}`),s=t(i),a=i.label;return this.enqueue("read",e,n,l=>{if(l.kind==="null"&&o)return i.resolveNull();i.resolveTo(g(l,"handle",a).handle)},i),s}onLoad(e){this.selection(e,[])}};function Lr(r){let e=r.map(t=>`'${t}'`);return e.length<=2?e.join(" or "):`${e.slice(0,-1).join(", ")}, or ${e.at(-1)}`}var Qn=new Set(["readTextFrame","readText","readFont","readParagraph"]);function Yn(r){return Qn.has(r.op)?!("cell"in r&&r.cell!==void 0):r.op==="readShape"&&r.group===!0||r.op==="listShapes"}function tn(r){return Yn(r)?{...r,orNull:!0}:r}function jr(r){if(Yn(r))return Qn.has(r.op)?I("no-text"):r.op==="readShape"||r.op==="listShapes"?I("not-group"):void 0}function R(r,e){return(typeof r!="number"||!Number.isFinite(r))&&c(e,"a finite number"),r}function x(r,e){return typeof r!="string"&&c(e,"a string"),r}function $(r,e){return typeof r!="boolean"&&c(e,"true or false"),r}var we=class r extends f{constructor(e,t){super(e,t)}static open(e){return new r(e,u.pending("application"))}onLoad(e){this.selection(e,[])}};var k=class r{#e=!1;#t;#n;constructor(e){this.#n=e}get value(){return this.#e||A({code:"ValueNotLoaded",target:this.#n}),this.#t}get isLoaded(){return this.#e}static create(e){let t=new r(e);return{result:t,fill(n){t.#e=!0,t.#t=n}}}};var Zn=(D=>(D.unsupported="Unsupported",D.image="Image",D.geometricShape="GeometricShape",D.group="Group",D.line="Line",D.table="Table",D.callout="Callout",D.chart="Chart",D.contentApp="ContentApp",D.diagram="Diagram",D.freeform="Freeform",D.graphic="Graphic",D.ink="Ink",D.media="Media",D.model3D="Model3D",D.ole="Ole",D.placeholder="Placeholder",D.textBox="TextBox",D))(Zn||{}),Jn=(e=>(e.shape="Shape",e))(Jn||{}),Gn=(n=>(n.straight="Straight",n.elbow="Elbow",n.curve="Curve",n))(Gn||{}),eo=(t=>(t.textRange="TextRange",t.shape="Shape",t))(eo||{}),to=(o=>(o.bringForward="BringForward",o.bringToFront="BringToFront",o.sendBackward="SendBackward",o.sendToBack="SendToBack",o))(to||{}),no=(s=>(s.noFill="NoFill",s.solid="Solid",s.gradient="Gradient",s.pattern="Pattern",s.pictureAndTexture="PictureAndTexture",s.slideBackground="SlideBackground",s))(no||{}),oo=(b=>(b.dash="Dash",b.dashDot="DashDot",b.dashDotDot="DashDotDot",b.longDash="LongDash",b.longDashDot="LongDashDot",b.roundDot="RoundDot",b.solid="Solid",b.squareDot="SquareDot",b.longDashDotDot="LongDashDotDot",b.systemDash="SystemDash",b.systemDot="SystemDot",b.systemDashDot="SystemDashDot",b))(oo||{}),ro=(i=>(i.single="Single",i.thickBetweenThin="ThickBetweenThin",i.thickThin="ThickThin",i.thinThick="ThinThick",i.thinThin="ThinThin",i))(ro||{}),io=(o=>(o.autoSizeNone="AutoSizeNone",o.autoSizeTextToFitShape="AutoSizeTextToFitShape",o.autoSizeShapeToFitText="AutoSizeShapeToFitText",o.autoSizeMixed="AutoSizeMixed",o))(io||{}),so=(s=>(s.top="Top",s.middle="Middle",s.bottom="Bottom",s.topCentered="TopCentered",s.middleCentered="MiddleCentered",s.bottomCentered="BottomCentered",s))(so||{}),ao=(a=>(a.left="Left",a.center="Center",a.right="Right",a.justify="Justify",a.justifyLow="JustifyLow",a.distributed="Distributed",a.thaiDistributed="ThaiDistributed",a))(ao||{}),lo=(j=>(j.none="None",j.single="Single",j.double="Double",j.heavy="Heavy",j.dotted="Dotted",j.dottedHeavy="DottedHeavy",j.dash="Dash",j.dashHeavy="DashHeavy",j.dashLong="DashLong",j.dashLongHeavy="DashLongHeavy",j.dotDash="DotDash",j.dotDashHeavy="DotDashHeavy",j.dotDotDash="DotDotDash",j.dotDotDashHeavy="DotDotDashHeavy",j.wavy="Wavy",j.wavyHeavy="WavyHeavy",j.wavyDouble="WavyDouble",j))(lo||{}),co=(N=>(N.unsupported="Unsupported",N.date="Date",N.slideNumber="SlideNumber",N.footer="Footer",N.header="Header",N.title="Title",N.body="Body",N.centerTitle="CenterTitle",N.subtitle="Subtitle",N.verticalTitle="VerticalTitle",N.verticalBody="VerticalBody",N.content="Content",N.chart="Chart",N.table="Table",N.onlinePicture="OnlinePicture",N.media="Media",N.verticalContent="VerticalContent",N.picture="Picture",N.cameo="Cameo",N))(co||{}),ho=(v=>(v.blank="Blank",v.chart="Chart",v.chartAndText="ChartAndText",v.clipArtAndText="ClipArtAndText",v.clipArtAndVerticalText="ClipArtAndVerticalText",v.comparison="Comparison",v.contentWithCaption="ContentWithCaption",v.custom="Custom",v.fourObjects="FourObjects",v.largeObject="LargeObject",v.mediaClipAndText="MediaClipAndText",v.mixed="Mixed",v.object="Object",v.objectAndText="ObjectAndText",v.objectAndTwoObjects="ObjectAndTwoObjects",v.objectOverText="ObjectOverText",v.organizationChart="OrganizationChart",v.pictureWithCaption="PictureWithCaption",v.sectionHeader="SectionHeader",v.table="Table",v.text="Text",v.textAndChart="TextAndChart",v.textAndClipArt="TextAndClipArt",v.textAndMediaClip="TextAndMediaClip",v.textAndObject="TextAndObject",v.textAndTwoObjects="TextAndTwoObjects",v.textOverObject="TextOverObject",v.title="Title",v.titleOnly="TitleOnly",v.twoColumnText="TwoColumnText",v.twoObjects="TwoObjects",v.twoObjectsAndObject="TwoObjectsAndObject",v.twoObjectsAndText="TwoObjectsAndText",v.twoObjectsOverText="TwoObjectsOverText",v.verticalText="VerticalText",v.verticalTitleAndText="VerticalTitleAndText",v.verticalTitleAndTextOverChart="VerticalTitleAndTextOverChart",v))(ho||{}),uo=(o=>(o.unsupported="Unsupported",o.none="None",o.numbered="Numbered",o.unnumbered="Unnumbered",o))(uo||{}),po=(O=>(O.unsupported="Unsupported",O.alphabetLowercaseParenthesesBoth="AlphabetLowercaseParenthesesBoth",O.alphabetUppercaseParenthesesBoth="AlphabetUppercaseParenthesesBoth",O.alphabetLowercaseParenthesisRight="AlphabetLowercaseParenthesisRight",O.alphabetUppercaseParenthesisRight="AlphabetUppercaseParenthesisRight",O.alphabetLowercasePeriod="AlphabetLowercasePeriod",O.alphabetUppercasePeriod="AlphabetUppercasePeriod",O.arabicNumeralParenthesesBoth="ArabicNumeralParenthesesBoth",O.arabicNumeralParenthesisRight="ArabicNumeralParenthesisRight",O.arabicNumeralPeriod="ArabicNumeralPeriod",O.arabicNumeralPlain="ArabicNumeralPlain",O.romanLowercaseParenthesesBoth="RomanLowercaseParenthesesBoth",O.romanUppercaseParenthesesBoth="RomanUppercaseParenthesesBoth",O.romanLowercaseParenthesisRight="RomanLowercaseParenthesisRight",O.romanUppercaseParenthesisRight="RomanUppercaseParenthesisRight",O.romanLowercasePeriod="RomanLowercasePeriod",O.romanUppercasePeriod="RomanUppercasePeriod",O.circleNumberDoubleBytePlain="CircleNumberDoubleBytePlain",O.circleNumberWideDoubleByteBlackPlain="CircleNumberWideDoubleByteBlackPlain",O.circleNumberWideDoubleByteWhitePlain="CircleNumberWideDoubleByteWhitePlain",O.arabicDoubleBytePeriod="ArabicDoubleBytePeriod",O.arabicDoubleBytePlain="ArabicDoubleBytePlain",O.simplifiedChinesePeriod="SimplifiedChinesePeriod",O.simplifiedChinesePlain="SimplifiedChinesePlain",O.traditionalChinesePeriod="TraditionalChinesePeriod",O.traditionalChinesePlain="TraditionalChinesePlain",O.kanjiSimplifiedChineseDoubleBytePeriod="KanjiSimplifiedChineseDoubleBytePeriod",O.kanjiKoreanPlain="KanjiKoreanPlain",O.kanjiKoreanPeriod="KanjiKoreanPeriod",O.arabicAlphabetDash="ArabicAlphabetDash",O.arabicAbjadDash="ArabicAbjadDash",O.hebrewAlphabetDash="HebrewAlphabetDash",O.thaiAlphabetPeriod="ThaiAlphabetPeriod",O.thaiAlphabetParenthesisRight="ThaiAlphabetParenthesisRight",O.thaiAlphabetParenthesesBoth="ThaiAlphabetParenthesesBoth",O.thaiNumeralPeriod="ThaiNumeralPeriod",O.thaiNumeralParenthesisRight="ThaiNumeralParenthesisRight",O.thaiNumeralParenthesesBoth="ThaiNumeralParenthesesBoth",O.hindiAlphabetPeriod="HindiAlphabetPeriod",O.hindiNumeralPeriod="HindiNumeralPeriod",O.hindiNumeralParenthesisRight="HindiNumeralParenthesisRight",O.hindiAlphabet1Period="HindiAlphabet1Period",O))(po||{}),mo=(i=>(i.gradient="Gradient",i.pattern="Pattern",i.pictureOrTexture="PictureOrTexture",i.solid="Solid",i.unsupported="Unsupported",i))(mo||{}),go=(s=>(s.linear="Linear",s.path="Path",s.radial="Radial",s.rectangular="Rectangular",s.shadeFromTitle="ShadeFromTitle",s.unsupported="Unsupported",s))(go||{}),fo=(y=>(y.cross="Cross",y.darkDownwardDiagonal="DarkDownwardDiagonal",y.darkHorizontal="DarkHorizontal",y.darkUpwardDiagonal="DarkUpwardDiagonal",y.darkVertical="DarkVertical",y.dashedDownwardDiagonal="DashedDownwardDiagonal",y.dashedHorizontal="DashedHorizontal",y.dashedUpwardDiagonal="DashedUpwardDiagonal",y.dashedVertical="DashedVertical",y.diagonalBrick="DiagonalBrick",y.diagonalCross="DiagonalCross",y.divot="Divot",y.dottedDiamond="DottedDiamond",y.dottedGrid="DottedGrid",y.downwardDiagonal="DownwardDiagonal",y.horizontal="Horizontal",y.horizontalBrick="HorizontalBrick",y.largeCheckerBoard="LargeCheckerBoard",y.largeConfetti="LargeConfetti",y.largeGrid="LargeGrid",y.lightDownwardDiagonal="LightDownwardDiagonal",y.lightHorizontal="LightHorizontal",y.lightUpwardDiagonal="LightUpwardDiagonal",y.lightVertical="LightVertical",y.narrowHorizontal="NarrowHorizontal",y.narrowVertical="NarrowVertical",y.outlinedDiamond="OutlinedDiamond",y.percent10="Percent10",y.percent20="Percent20",y.percent25="Percent25",y.percent30="Percent30",y.percent40="Percent40",y.percent5="Percent5",y.percent50="Percent50",y.percent60="Percent60",y.percent70="Percent70",y.percent75="Percent75",y.percent80="Percent80",y.percent90="Percent90",y.plaid="Plaid",y.shingle="Shingle",y.smallCheckerBoard="SmallCheckerBoard",y.smallConfetti="SmallConfetti",y.smallGrid="SmallGrid",y.solidDiamond="SolidDiamond",y.sphere="Sphere",y.trellis="Trellis",y.unsupported="Unsupported",y.upwardDiagonal="UpwardDiagonal",y.vertical="Vertical",y.wave="Wave",y.weave="Weave",y.wideDownwardDiagonal="WideDownwardDiagonal",y.wideUpwardDiagonal="WideUpwardDiagonal",y.zigZag="ZigZag",y))(fo||{}),bo=(P=>(P.accent1="Accent1",P.accent2="Accent2",P.accent3="Accent3",P.accent4="Accent4",P.accent5="Accent5",P.accent6="Accent6",P.dark1="Dark1",P.dark2="Dark2",P.followedHyperlink="FollowedHyperlink",P.hyperlink="Hyperlink",P.light1="Light1",P.light2="Light2",P.mixed="Mixed",P.none="None",P))(bo||{}),on=(m=>(m.darkStyle1="DarkStyle1",m.darkStyle1Accent1="DarkStyle1Accent1",m.darkStyle1Accent2="DarkStyle1Accent2",m.darkStyle1Accent3="DarkStyle1Accent3",m.darkStyle1Accent4="DarkStyle1Accent4",m.darkStyle1Accent5="DarkStyle1Accent5",m.darkStyle1Accent6="DarkStyle1Accent6",m.darkStyle2="DarkStyle2",m.darkStyle2Accent1="DarkStyle2Accent1",m.darkStyle2Accent2="DarkStyle2Accent2",m.darkStyle2Accent3="DarkStyle2Accent3",m.lightStyle1="LightStyle1",m.lightStyle1Accent1="LightStyle1Accent1",m.lightStyle1Accent2="LightStyle1Accent2",m.lightStyle1Accent3="LightStyle1Accent3",m.lightStyle1Accent4="LightStyle1Accent4",m.lightStyle1Accent5="LightStyle1Accent5",m.lightStyle1Accent6="LightStyle1Accent6",m.lightStyle2="LightStyle2",m.lightStyle2Accent1="LightStyle2Accent1",m.lightStyle2Accent2="LightStyle2Accent2",m.lightStyle2Accent3="LightStyle2Accent3",m.lightStyle2Accent4="LightStyle2Accent4",m.lightStyle2Accent5="LightStyle2Accent5",m.lightStyle2Accent6="LightStyle2Accent6",m.lightStyle3="LightStyle3",m.lightStyle3Accent1="LightStyle3Accent1",m.lightStyle3Accent2="LightStyle3Accent2",m.lightStyle3Accent3="LightStyle3Accent3",m.lightStyle3Accent4="LightStyle3Accent4",m.lightStyle3Accent5="LightStyle3Accent5",m.lightStyle3Accent6="LightStyle3Accent6",m.mediumStyle1="MediumStyle1",m.mediumStyle1Accent1="MediumStyle1Accent1",m.mediumStyle1Accent2="MediumStyle1Accent2",m.mediumStyle1Accent3="MediumStyle1Accent3",m.mediumStyle1Accent4="MediumStyle1Accent4",m.mediumStyle1Accent5="MediumStyle1Accent5",m.mediumStyle1Accent6="MediumStyle1Accent6",m.mediumStyle2="MediumStyle2",m.mediumStyle2Accent1="MediumStyle2Accent1",m.mediumStyle2Accent2="MediumStyle2Accent2",m.mediumStyle2Accent3="MediumStyle2Accent3",m.mediumStyle2Accent4="MediumStyle2Accent4",m.mediumStyle2Accent5="MediumStyle2Accent5",m.mediumStyle2Accent6="MediumStyle2Accent6",m.mediumStyle3="MediumStyle3",m.mediumStyle3Accent1="MediumStyle3Accent1",m.mediumStyle3Accent2="MediumStyle3Accent2",m.mediumStyle3Accent3="MediumStyle3Accent3",m.mediumStyle3Accent4="MediumStyle3Accent4",m.mediumStyle3Accent5="MediumStyle3Accent5",m.mediumStyle3Accent6="MediumStyle3Accent6",m.mediumStyle4="MediumStyle4",m.mediumStyle4Accent1="MediumStyle4Accent1",m.mediumStyle4Accent2="MediumStyle4Accent2",m.mediumStyle4Accent3="MediumStyle4Accent3",m.mediumStyle4Accent4="MediumStyle4Accent4",m.mediumStyle4Accent5="MediumStyle4Accent5",m.mediumStyle4Accent6="MediumStyle4Accent6",m.noStyleNoGrid="NoStyleNoGrid",m.noStyleTableGrid="NoStyleTableGrid",m.themedStyle1Accent1="ThemedStyle1Accent1",m.themedStyle1Accent2="ThemedStyle1Accent2",m.themedStyle1Accent3="ThemedStyle1Accent3",m.themedStyle1Accent4="ThemedStyle1Accent4",m.themedStyle1Accent5="ThemedStyle1Accent5",m.themedStyle1Accent6="ThemedStyle1Accent6",m.themedStyle2Accent1="ThemedStyle2Accent1",m.themedStyle2Accent2="ThemedStyle2Accent2",m.themedStyle2Accent3="ThemedStyle2Accent3",m.themedStyle2Accent4="ThemedStyle2Accent4",m.themedStyle2Accent5="ThemedStyle2Accent5",m.themedStyle2Accent6="ThemedStyle2Accent6",m))(on||{}),ct=(t=>(t.keepSourceFormatting="KeepSourceFormatting",t.useDestinationTheme="UseDestinationTheme",t))(ct||{}),yo=(e=>(e.png="Png",e))(yo||{}),xo=(o=>(o.boolean="Boolean",o.date="Date",o.number="Number",o.string="String",o))(xo||{});function F(r,e={}){let t=Object.create(null),n=Object.create(null);for(let[o,i]of r)t[o]=i,n[i]??=o;for(let[o,i]of e.writeOnly??[])t[o]=i;return{toFile(o,i){return(typeof o!="string"||!(o in t))&&c(i,z(Object.keys(t)),S(o,Object.keys(t))),t[o]},fromFile(o){return o==null?null:n[o]??e.fallback??null}}}var de=F([["Top","t"],["Middle","ctr"],["Bottom","b"],["TopCentered","tCentered"],["MiddleCentered","ctrCentered"],["BottomCentered","bCentered"]]),Ce=F([["Left","l"],["Center","ctr"],["Right","r"],["Justify","just"],["JustifyLow","justLow"],["Distributed","dist"],["ThaiDistributed","thaiDist"]]),rn=F([["AutoSizeNone","none"],["AutoSizeTextToFitShape","normal"],["AutoSizeShapeToFitText","shape"]]),ce=F([["None","none"],["Single","sng"],["Single","words"],["Double","dbl"],["Heavy","heavy"],["Dotted","dotted"],["DottedHeavy","dottedHeavy"],["Dash","dash"],["DashHeavy","dashHeavy"],["DashLong","dashLong"],["DashLongHeavy","dashLongHeavy"],["DotDash","dotDash"],["DotDashHeavy","dotDashHeavy"],["DotDotDash","dotDotDash"],["DotDotDashHeavy","dotDotDashHeavy"],["Wavy","wavy"],["WavyHeavy","wavyHeavy"],["WavyDouble","wavyDbl"]]),he=F([["Solid","solid"],["RoundDot","dot"],["Dash","dash"],["LongDash","lgDash"],["DashDot","dashDot"],["LongDashDot","lgDashDot"],["LongDashDotDot","lgDashDotDot"],["SystemDash","sysDash"],["SystemDot","sysDot"],["SystemDashDot","sysDashDot"],["DashDotDot","sysDashDotDot"]],{writeOnly:[["SquareDot","sysDot"]]}),sn=F([["Single","sng"],["ThinThin","dbl"],["ThickThin","thickThin"],["ThinThick","thinThick"],["ThickBetweenThin","tri"]]),Ao=F([["Title","title"],["Body","body"],["CenterTitle","ctrTitle"],["Subtitle","subTitle"],["Date","dt"],["SlideNumber","sldNum"],["Footer","ftr"],["Header","hdr"],["Content","obj"],["Chart","chart"],["Table","tbl"],["OnlinePicture","clipArt"],["Media","media"],["Picture","pic"]],{fallback:"Unsupported"}),wo=F([["Title","title"],["Text","tx"],["TwoColumnText","twoColTx"],["Table","tbl"],["TextAndChart","txAndChart"],["ChartAndText","chartAndTx"],["OrganizationChart","dgm"],["Chart","chart"],["TextAndClipArt","txAndClipArt"],["ClipArtAndText","clipArtAndTx"],["TitleOnly","titleOnly"],["Blank","blank"],["TextAndObject","txAndObj"],["ObjectAndText","objAndTx"],["LargeObject","objOnly"],["Object","obj"],["TextAndMediaClip","txAndMedia"],["MediaClipAndText","mediaAndTx"],["ObjectOverText","objOverTx"],["TextOverObject","txOverObj"],["TextAndTwoObjects","txAndTwoObj"],["TwoObjectsAndText","twoObjAndTx"],["TwoObjectsOverText","twoObjOverTx"],["FourObjects","fourObj"],["VerticalText","vertTx"],["ClipArtAndVerticalText","clipArtAndVertTx"],["VerticalTitleAndText","vertTitleAndTx"],["VerticalTitleAndTextOverChart","vertTitleAndTxOverChart"],["TwoObjects","twoObj"],["ObjectAndTwoObjects","objAndTwoObj"],["TwoObjectsAndObject","twoObjAndObj"],["Custom","cust"],["SectionHeader","secHead"],["Comparison","twoTxTwoObj"],["ContentWithCaption","objTx"],["PictureWithCaption","picTx"]],{fallback:"Custom"}),Co=F([["NoFill","noFill"],["Solid","solid"],["Gradient","gradient"],["Pattern","pattern"],["PictureAndTexture","pictureAndTexture"]]),Po=F([["Straight","straight"],["Elbow","elbow"],["Curve","curve"]]),Oo=F([["BringForward","bringForward"],["BringToFront","bringToFront"],["SendBackward","sendBackward"],["SendToBack","sendToBack"]]),an=F([["AlphabetLowercaseParenthesesBoth","alphaLcParenBoth"],["AlphabetUppercaseParenthesesBoth","alphaUcParenBoth"],["AlphabetLowercaseParenthesisRight","alphaLcParenR"],["AlphabetUppercaseParenthesisRight","alphaUcParenR"],["AlphabetLowercasePeriod","alphaLcPeriod"],["AlphabetUppercasePeriod","alphaUcPeriod"],["ArabicNumeralParenthesesBoth","arabicParenBoth"],["ArabicNumeralParenthesisRight","arabicParenR"],["ArabicNumeralPeriod","arabicPeriod"],["ArabicNumeralPlain","arabicPlain"],["RomanLowercaseParenthesesBoth","romanLcParenBoth"],["RomanUppercaseParenthesesBoth","romanUcParenBoth"],["RomanLowercaseParenthesisRight","romanLcParenR"],["RomanUppercaseParenthesisRight","romanUcParenR"],["RomanLowercasePeriod","romanLcPeriod"],["RomanUppercasePeriod","romanUcPeriod"],["CircleNumberDoubleBytePlain","circleNumDbPlain"],["CircleNumberWideDoubleByteBlackPlain","circleNumWdBlackPlain"],["CircleNumberWideDoubleByteWhitePlain","circleNumWdWhitePlain"],["ArabicDoubleBytePeriod","arabicDbPeriod"],["ArabicDoubleBytePlain","arabicDbPlain"],["SimplifiedChinesePeriod","ea1ChsPeriod"],["SimplifiedChinesePlain","ea1ChsPlain"],["TraditionalChinesePeriod","ea1ChtPeriod"],["TraditionalChinesePlain","ea1ChtPlain"],["KanjiSimplifiedChineseDoubleBytePeriod","ea1JpnChsDbPeriod"],["KanjiKoreanPlain","ea1JpnKorPlain"],["KanjiKoreanPeriod","ea1JpnKorPeriod"],["ArabicAlphabetDash","arabic1Minus"],["ArabicAbjadDash","arabic2Minus"],["HebrewAlphabetDash","hebrew2Minus"],["ThaiAlphabetPeriod","thaiAlphaPeriod"],["ThaiAlphabetParenthesisRight","thaiAlphaParenR"],["ThaiAlphabetParenthesesBoth","thaiAlphaParenBoth"],["ThaiNumeralPeriod","thaiNumPeriod"],["ThaiNumeralParenthesisRight","thaiNumParenR"],["ThaiNumeralParenthesesBoth","thaiNumParenBoth"],["HindiAlphabetPeriod","hindiAlphaPeriod"],["HindiNumeralPeriod","hindiNumPeriod"],["HindiNumeralParenthesisRight","hindiNumParenR"],["HindiAlphabet1Period","hindiAlpha1Period"]],{fallback:"Unsupported"}),ln=F([["None","none"],["Numbered","autonum"],["Unnumbered","char"]],{fallback:"Unsupported"});function dn(r){let e=["Image","GeometricShape","Group","Line","Table","Chart","Diagram","Freeform","Media","Ole","Placeholder","TextBox"],t=r.charAt(0).toUpperCase()+r.slice(1);return e.includes(t)?t:"Unsupported"}var vo=F([["Solid","solid"],["Gradient","gradient"],["Pattern","pattern"],["PictureOrTexture","picture"]],{fallback:"Unsupported"}),cn=F([["Linear","linear"],["Radial","circle"],["Rectangular","rect"],["Path","shape"]],{fallback:"Unsupported"}),kt=F([["Cross","cross"],["DarkDownwardDiagonal","dkDnDiag"],["DarkHorizontal","dkHorz"],["DarkUpwardDiagonal","dkUpDiag"],["DarkVertical","dkVert"],["DashedDownwardDiagonal","dashDnDiag"],["DashedHorizontal","dashHorz"],["DashedUpwardDiagonal","dashUpDiag"],["DashedVertical","dashVert"],["DiagonalBrick","diagBrick"],["DiagonalCross","diagCross"],["Divot","divot"],["DottedDiamond","dotDmnd"],["DottedGrid","dotGrid"],["DownwardDiagonal","dnDiag"],["Horizontal","horz"],["HorizontalBrick","horzBrick"],["LargeCheckerBoard","lgCheck"],["LargeConfetti","lgConfetti"],["LargeGrid","lgGrid"],["LightDownwardDiagonal","ltDnDiag"],["LightHorizontal","ltHorz"],["LightUpwardDiagonal","ltUpDiag"],["LightVertical","ltVert"],["NarrowHorizontal","narHorz"],["NarrowVertical","narVert"],["OutlinedDiamond","openDmnd"],["Percent10","pct10"],["Percent20","pct20"],["Percent25","pct25"],["Percent30","pct30"],["Percent40","pct40"],["Percent5","pct5"],["Percent50","pct50"],["Percent60","pct60"],["Percent70","pct70"],["Percent75","pct75"],["Percent80","pct80"],["Percent90","pct90"],["Plaid","plaid"],["Shingle","shingle"],["SmallCheckerBoard","smCheck"],["SmallConfetti","smConfetti"],["SmallGrid","smGrid"],["SolidDiamond","solidDmnd"],["Sphere","sphere"],["Trellis","trellis"],["UpwardDiagonal","upDiag"],["Vertical","vert"],["Wave","wave"],["Weave","weave"],["WideDownwardDiagonal","wdDnDiag"],["WideUpwardDiagonal","wdUpDiag"],["ZigZag","zigZag"]],{fallback:"Unsupported"}),hn=F([["Dark1","dk1"],["Light1","lt1"],["Dark2","dk2"],["Light2","lt2"],["Accent1","accent1"],["Accent2","accent2"],["Accent3","accent3"],["Accent4","accent4"],["Accent5","accent5"],["Accent6","accent6"],["Hyperlink","hlink"],["FollowedHyperlink","folHlink"]]);function Tt(r,e){if((typeof r!="string"||!nn.has(r))&&c(e,z([...nn])),r==="NoStyleNoGrid")return null;if(r==="NoStyleTableGrid")return"No Style, Table Grid";let t=/^(Dark|Light|Medium|Themed)Style(\d)(?:Accent(\d))?$/.exec(r);return`${t[1]} Style ${t[2]}${t[3]?` - Accent ${t[3]}`:""}`}function Ro(r){if(r==="No Style, No Grid")return"NoStyleNoGrid";if(r==="No Style, Table Grid")return"NoStyleTableGrid";let e=/^(Dark|Light|Medium|Themed) Style (\d)(?: - Accent (\d))?$/.exec(r),t=e?`${e[1]}Style${e[2]}${e[3]?`Accent${e[3]}`:""}`:"";return nn.has(t)?t:null}var nn=new Set(Object.values(on));function So(r,e){return(typeof r!="number"||!Number.isInteger(r)||r<0)&&c(e,"a whole number of 0 or more"),r}var Pe=class extends f{#e;constructor(e,t,n){super(e,t),this.#e=n}get count(){return this.loadedProperty("count")}get(e){let t=So(e,`${this.path.label}.get`),n=`${this.path.label}.get(${t})`,{result:o,fill:i}=k.create(n),s=this.#e;return this.enqueue("read",`get(${t})`,a=>({op:"readAdjustments",shape:a(s)}),a=>{let l=g(a,"adjustments",n).adjustments.values;t>=l.length&&A({code:"ItemNotFound",target:n}),i(l[t])}),o}set(e,t){let n=So(e,`${this.path.label}.set`),o=R(t,`${this.path.label}.set`),i=this.#e;this.command("set",s=>({op:"setAdjustment",shape:s(i),index:n,value:o}))}onLoad(e){let t=this.#e;this.loadScalars(this.selection(e,["count"]),"adjustments",n=>({op:"readAdjustments",shape:n(t)}),n=>({count:n.adjustments.values.length}))}};function X(r,e){let t=R(r,e);return(t<0||t>1)&&c(e,"a fraction from 0 (opaque) to 1 (clear)"),t}var ne=class extends f{#e;constructor(e,t,n){super(e,t),this.#e=n}get foregroundColor(){return this.loadedProperty("foregroundColor")}set foregroundColor(e){this.#t("foregroundColor",{kind:"solid",color:x(e,this.at("foregroundColor"))})}get transparency(){return this.loadedProperty("transparency")}set transparency(e){this.#t("transparency",{kind:"transparency",transparency:X(e,"transparency")})}get type(){return this.loadedProperty("type")}clear(){this.#t("clear",{kind:"clear"})}setSolidColor(e){this.#t("setSolidColor",{kind:"solid",color:x(e,this.at("color"))})}setImage(e){let t=x(e,`${this.path.label}.setImage`);this.#t("setImage",{kind:"image",base64:t})}#t(e,t){let n=this.#e.shape,o=this.#n();this.command(e,i=>({op:"setFill",shape:i(n),fill:t,...o}))}#n(){return this.#e.kind==="cell"?{cell:this.#e.cell}:{}}onLoad(e){let t=this.selection(e,["foregroundColor","transparency","type"]),n=this.#e.shape;this.loadScalars(t,"fill",o=>({op:"readFill",shape:o(n),...this.#n()}),o=>({foregroundColor:o.fill.foregroundColor??"",transparency:o.fill.transparency??0,type:Co.fromFile(o.fill.type)??"NoFill"}))}},Dr=["color","dashStyle","style","transparency","visible","weight"],Oe=class extends f{#e;constructor(e,t,n){super(e,t),this.#e=n}get color(){return this.loadedProperty("color")}set color(e){this.#t("color",{color:x(e,this.at("color"))})}get dashStyle(){return this.loadedProperty("dashStyle")}set dashStyle(e){this.#t("dashStyle",{dashStyle:he.toFile(e,"dashStyle")})}get style(){return this.loadedProperty("style")}set style(e){this.#t("style",{style:sn.toFile(e,"style")})}get transparency(){return this.loadedProperty("transparency")}set transparency(e){this.#t("transparency",{transparency:X(e,"transparency")})}get visible(){return this.loadedProperty("visible")}set visible(e){this.#t("visible",{visible:$(e,this.at("visible"))})}get weight(){return this.loadedProperty("weight")}set weight(e){this.#t("weight",{weight:R(e,this.at("weight"))})}#t(e,t){let n=this.#e;this.command(e,o=>({op:"setLine",shape:o(n),line:t}))}onLoad(e){let t=this.selection(e,Dr),n=this.#e;this.loadScalars(t,"line",o=>({op:"readLine",shape:o(n)}),o=>({color:o.line.color??"",dashStyle:he.fromFile(o.line.dashStyle)??"Solid",style:sn.fromFile(o.line.style)??"Single",transparency:o.line.transparency??0,visible:o.line.visible,weight:o.line.weight??0}))}};var ko=(d=>(d.lineInverse="LineInverse",d.triangle="Triangle",d.rightTriangle="RightTriangle",d.rectangle="Rectangle",d.diamond="Diamond",d.parallelogram="Parallelogram",d.trapezoid="Trapezoid",d.nonIsoscelesTrapezoid="NonIsoscelesTrapezoid",d.pentagon="Pentagon",d.hexagon="Hexagon",d.heptagon="Heptagon",d.octagon="Octagon",d.decagon="Decagon",d.dodecagon="Dodecagon",d.star4="Star4",d.star5="Star5",d.star6="Star6",d.star7="Star7",d.star8="Star8",d.star10="Star10",d.star12="Star12",d.star16="Star16",d.star24="Star24",d.star32="Star32",d.roundRectangle="RoundRectangle",d.round1Rectangle="Round1Rectangle",d.round2SameRectangle="Round2SameRectangle",d.round2DiagonalRectangle="Round2DiagonalRectangle",d.snipRoundRectangle="SnipRoundRectangle",d.snip1Rectangle="Snip1Rectangle",d.snip2SameRectangle="Snip2SameRectangle",d.snip2DiagonalRectangle="Snip2DiagonalRectangle",d.plaque="Plaque",d.ellipse="Ellipse",d.teardrop="Teardrop",d.homePlate="HomePlate",d.chevron="Chevron",d.pieWedge="PieWedge",d.pie="Pie",d.blockArc="BlockArc",d.donut="Donut",d.noSmoking="NoSmoking",d.rightArrow="RightArrow",d.leftArrow="LeftArrow",d.upArrow="UpArrow",d.downArrow="DownArrow",d.stripedRightArrow="StripedRightArrow",d.notchedRightArrow="NotchedRightArrow",d.bentUpArrow="BentUpArrow",d.leftRightArrow="LeftRightArrow",d.upDownArrow="UpDownArrow",d.leftUpArrow="LeftUpArrow",d.leftRightUpArrow="LeftRightUpArrow",d.quadArrow="QuadArrow",d.leftArrowCallout="LeftArrowCallout",d.rightArrowCallout="RightArrowCallout",d.upArrowCallout="UpArrowCallout",d.downArrowCallout="DownArrowCallout",d.leftRightArrowCallout="LeftRightArrowCallout",d.upDownArrowCallout="UpDownArrowCallout",d.quadArrowCallout="QuadArrowCallout",d.bentArrow="BentArrow",d.uturnArrow="UturnArrow",d.circularArrow="CircularArrow",d.leftCircularArrow="LeftCircularArrow",d.leftRightCircularArrow="LeftRightCircularArrow",d.curvedRightArrow="CurvedRightArrow",d.curvedLeftArrow="CurvedLeftArrow",d.curvedUpArrow="CurvedUpArrow",d.curvedDownArrow="CurvedDownArrow",d.swooshArrow="SwooshArrow",d.cube="Cube",d.can="Can",d.lightningBolt="LightningBolt",d.heart="Heart",d.sun="Sun",d.moon="Moon",d.smileyFace="SmileyFace",d.irregularSeal1="IrregularSeal1",d.irregularSeal2="IrregularSeal2",d.foldedCorner="FoldedCorner",d.bevel="Bevel",d.frame="Frame",d.halfFrame="HalfFrame",d.corner="Corner",d.diagonalStripe="DiagonalStripe",d.chord="Chord",d.arc="Arc",d.leftBracket="LeftBracket",d.rightBracket="RightBracket",d.leftBrace="LeftBrace",d.rightBrace="RightBrace",d.bracketPair="BracketPair",d.bracePair="BracePair",d.callout1="Callout1",d.callout2="Callout2",d.callout3="Callout3",d.accentCallout1="AccentCallout1",d.accentCallout2="AccentCallout2",d.accentCallout3="AccentCallout3",d.borderCallout1="BorderCallout1",d.borderCallout2="BorderCallout2",d.borderCallout3="BorderCallout3",d.accentBorderCallout1="AccentBorderCallout1",d.accentBorderCallout2="AccentBorderCallout2",d.accentBorderCallout3="AccentBorderCallout3",d.wedgeRectCallout="WedgeRectCallout",d.wedgeRRectCallout="WedgeRRectCallout",d.wedgeEllipseCallout="WedgeEllipseCallout",d.cloudCallout="CloudCallout",d.cloud="Cloud",d.ribbon="Ribbon",d.ribbon2="Ribbon2",d.ellipseRibbon="EllipseRibbon",d.ellipseRibbon2="EllipseRibbon2",d.leftRightRibbon="LeftRightRibbon",d.verticalScroll="VerticalScroll",d.horizontalScroll="HorizontalScroll",d.wave="Wave",d.doubleWave="DoubleWave",d.plus="Plus",d.flowChartProcess="FlowChartProcess",d.flowChartDecision="FlowChartDecision",d.flowChartInputOutput="FlowChartInputOutput",d.flowChartPredefinedProcess="FlowChartPredefinedProcess",d.flowChartInternalStorage="FlowChartInternalStorage",d.flowChartDocument="FlowChartDocument",d.flowChartMultidocument="FlowChartMultidocument",d.flowChartTerminator="FlowChartTerminator",d.flowChartPreparation="FlowChartPreparation",d.flowChartManualInput="FlowChartManualInput",d.flowChartManualOperation="FlowChartManualOperation",d.flowChartConnector="FlowChartConnector",d.flowChartPunchedCard="FlowChartPunchedCard",d.flowChartPunchedTape="FlowChartPunchedTape",d.flowChartSummingJunction="FlowChartSummingJunction",d.flowChartOr="FlowChartOr",d.flowChartCollate="FlowChartCollate",d.flowChartSort="FlowChartSort",d.flowChartExtract="FlowChartExtract",d.flowChartMerge="FlowChartMerge",d.flowChartOfflineStorage="FlowChartOfflineStorage",d.flowChartOnlineStorage="FlowChartOnlineStorage",d.flowChartMagneticTape="FlowChartMagneticTape",d.flowChartMagneticDisk="FlowChartMagneticDisk",d.flowChartMagneticDrum="FlowChartMagneticDrum",d.flowChartDisplay="FlowChartDisplay",d.flowChartDelay="FlowChartDelay",d.flowChartAlternateProcess="FlowChartAlternateProcess",d.flowChartOffpageConnector="FlowChartOffpageConnector",d.actionButtonBlank="ActionButtonBlank",d.actionButtonHome="ActionButtonHome",d.actionButtonHelp="ActionButtonHelp",d.actionButtonInformation="ActionButtonInformation",d.actionButtonForwardNext="ActionButtonForwardNext",d.actionButtonBackPrevious="ActionButtonBackPrevious",d.actionButtonEnd="ActionButtonEnd",d.actionButtonBeginning="ActionButtonBeginning",d.actionButtonReturn="ActionButtonReturn",d.actionButtonDocument="ActionButtonDocument",d.actionButtonSound="ActionButtonSound",d.actionButtonMovie="ActionButtonMovie",d.gear6="Gear6",d.gear9="Gear9",d.funnel="Funnel",d.mathPlus="MathPlus",d.mathMinus="MathMinus",d.mathMultiply="MathMultiply",d.mathDivide="MathDivide",d.mathEqual="MathEqual",d.mathNotEqual="MathNotEqual",d.cornerTabs="CornerTabs",d.squareTabs="SquareTabs",d.plaqueTabs="PlaqueTabs",d.chartX="ChartX",d.chartStar="ChartStar",d.chartPlus="ChartPlus",d))(ko||{}),un=new Set(["LineInverse","Triangle","RightTriangle","Rectangle","Diamond","Parallelogram","Trapezoid","NonIsoscelesTrapezoid","Pentagon","Hexagon","Heptagon","Octagon","Decagon","Dodecagon","Star4","Star5","Star6","Star7","Star8","Star10","Star12","Star16","Star24","Star32","RoundRectangle","Round1Rectangle","Round2SameRectangle","Round2DiagonalRectangle","SnipRoundRectangle","Snip1Rectangle","Snip2SameRectangle","Snip2DiagonalRectangle","Plaque","Ellipse","Teardrop","HomePlate","Chevron","PieWedge","Pie","BlockArc","Donut","NoSmoking","RightArrow","LeftArrow","UpArrow","DownArrow","StripedRightArrow","NotchedRightArrow","BentUpArrow","LeftRightArrow","UpDownArrow","LeftUpArrow","LeftRightUpArrow","QuadArrow","LeftArrowCallout","RightArrowCallout","UpArrowCallout","DownArrowCallout","LeftRightArrowCallout","UpDownArrowCallout","QuadArrowCallout","BentArrow","UturnArrow","CircularArrow","LeftCircularArrow","LeftRightCircularArrow","CurvedRightArrow","CurvedLeftArrow","CurvedUpArrow","CurvedDownArrow","SwooshArrow","Cube","Can","LightningBolt","Heart","Sun","Moon","SmileyFace","IrregularSeal1","IrregularSeal2","FoldedCorner","Bevel","Frame","HalfFrame","Corner","DiagonalStripe","Chord","Arc","LeftBracket","RightBracket","LeftBrace","RightBrace","BracketPair","BracePair","Callout1","Callout2","Callout3","AccentCallout1","AccentCallout2","AccentCallout3","BorderCallout1","BorderCallout2","BorderCallout3","AccentBorderCallout1","AccentBorderCallout2","AccentBorderCallout3","WedgeRectCallout","WedgeRRectCallout","WedgeEllipseCallout","CloudCallout","Cloud","Ribbon","Ribbon2","EllipseRibbon","EllipseRibbon2","LeftRightRibbon","VerticalScroll","HorizontalScroll","Wave","DoubleWave","Plus","FlowChartProcess","FlowChartDecision","FlowChartInputOutput","FlowChartPredefinedProcess","FlowChartInternalStorage","FlowChartDocument","FlowChartMultidocument","FlowChartTerminator","FlowChartPreparation","FlowChartManualInput","FlowChartManualOperation","FlowChartConnector","FlowChartPunchedCard","FlowChartPunchedTape","FlowChartSummingJunction","FlowChartOr","FlowChartCollate","FlowChartSort","FlowChartExtract","FlowChartMerge","FlowChartOfflineStorage","FlowChartOnlineStorage","FlowChartMagneticTape","FlowChartMagneticDisk","FlowChartMagneticDrum","FlowChartDisplay","FlowChartDelay","FlowChartAlternateProcess","FlowChartOffpageConnector","ActionButtonBlank","ActionButtonHome","ActionButtonHelp","ActionButtonInformation","ActionButtonForwardNext","ActionButtonBackPrevious","ActionButtonEnd","ActionButtonBeginning","ActionButtonReturn","ActionButtonDocument","ActionButtonSound","ActionButtonMovie","Gear6","Gear9","Funnel","MathPlus","MathMinus","MathMultiply","MathDivide","MathEqual","MathNotEqual","CornerTabs","SquareTabs","PlaqueTabs","ChartX","ChartStar","ChartPlus"]),$r=Object.assign(Object.create(null),{LineInverse:"lineInv",RightTriangle:"rtTriangle",Rectangle:"rect",RoundRectangle:"roundRect",Round1Rectangle:"round1Rect",Round2SameRectangle:"round2SameRect",Round2DiagonalRectangle:"round2DiagRect",SnipRoundRectangle:"snipRoundRect",Snip1Rectangle:"snip1Rect",Snip2SameRectangle:"snip2SameRect",Snip2DiagonalRectangle:"snip2DiagRect",DiagonalStripe:"diagStripe",WedgeRRectCallout:"wedgeRoundRectCallout"});function To(r,e){return(typeof r!="string"||!un.has(r))&&c(e,z([...un]),S(r,[...un])),$r[r]??r.charAt(0).toLowerCase()+r.slice(1)}var oe=class extends f{handlesOf(e,t){return g(e,"handles",t).handles}get items(){return this.loadedProperty("items")}get loadsItemPaths(){return!0}onLoad(e){let t=zn(e);this.takeNestedPaths(),t&&this.#e(e,t);let n=e.skip??0,o=e.top,i=`${this.path.label}.items`,s=this.loadingOrNull;this.enqueue("read","items",a=>s?tn(this.listing(a)):this.listing(a),a=>{if(a.kind==="null"){this.markSkipped(I("not-group"));return}let l=this.handlesOf(a,i),h=o===void 0?l.length:Math.min(l.length,n+o),p=l.slice(n,h).map((C,b)=>this.itemOf(this.memberPath(C,n+b),!1));this.setLoadedProperty("items",p),t&&this.internals.queue.continuing(()=>{for(let C of p)C[te](t)})},void 0,!0,t!==void 0)}#e(e,t){let n=this.internals.queue.checkpoint();try{this.itemOf(u.pending(`${this.path.label}.items`),!1)[te](t)}catch(o){if(!xe(o)||o.code!=="InvalidArgument")throw o;for(let i of[...e.select,...e.nested.keys()])S(i,["items"])==="items"&&c(`${this.path.label}.${i}`,"'items/<property>', or a property of the items","items");throw o}finally{n()}}memberPath(e,t){return u.of(`${this.path.label}.items[${t}]`,e)}getCount(){let{result:e,fill:t}=k.create(`${this.path.label}.getCount`),n=`${this.path.label}.getCount`;return this.enqueue("read","getCount",o=>this.listing(o),o=>t(this.handlesOf(o,n).length)),e}find(e,t,n){let o=u.pending(`${this.path.label}.${t}`),i=this.itemOf(o,n),s=o.label;return this.hasLookup?(this.enqueue("read",t,a=>this.lookup(a,e,n),a=>{let l=Kn(a,s);l?o.resolveTo(l):o.resolveNull()},o),i):("index"in e||A({code:"NotImplemented",target:s}),this.enqueue("read",t,a=>this.listing(a),a=>{let l=this.handlesOf(a,s)[e.index];l?o.resolveTo(l):n?o.resolveNull():A({code:"ItemNotFound",target:s})},o,!1),i)}get hasLookup(){return!0}indexArg(e){return(typeof e!="number"||!Number.isInteger(e)||e<0)&&c(`${this.path.label}.getItemAt`,"a whole number of 0 or more"),e}keyArg(e,t){return(typeof e!="string"||e.length===0)&&c(`${this.path.label}.${t}`,"a non-empty string"),e}};function Lo(r){let e=new Map;r.forEach((i,s)=>e.set(i,s));let t=[],n=!1,o=!1;for(let i of r)t.push(i.plan(s=>e.get(s))),i.sort==="write"?o=!0:n=!0;return{operations:t,hasRead:n,hasWrite:o}}function jo(r){let e=[...r];for(let t=0;t<=r.length+1e4;t+=1){let n=new Map;e.forEach((s,a)=>n.set(s,a));let o,i=0;for(let[s,a]of e.entries())try{a.plan(l=>n.get(l))}catch(l){if(l instanceof dt){o=l.producer,i=s;break}}if(!o)return e;e=[...e.slice(0,i),o,...e.slice(i)]}return e}function Do(r){let e=new Map;r.forEach((o,i)=>e.set(o,i));let t=r.findIndex(o=>o.sort==="write");if(t<0)return-1;let n=-1;for(let o of r)try{o.plan(i=>e.get(i))}catch(i){if(!(i instanceof He))continue;let s=e.get(i.producer);s!==void 0&&s>t&&(n<0||s<n)&&(n=s)}return n}function pn(r){let e=new Map;r.forEach((a,l)=>e.set(a,l));let t=[],n=new Set,o=new Map;for(let a of r){let l=[];o.set(a,l);try{a.plan(h=>{let p=e.get(h);return p!==void 0&&l.push(r[p]),p})}catch(h){if(!(h instanceof He))throw h;t.push(h.producer),n.add(a)}}if(t.length===0)return[];let i=new Set,s=a=>{let l=new Set,h=[a];for(;h.length>0;){let p=h.pop();if(!(l.has(p)||i.has(p))){if(n.has(p))return null;if(p.sort==="write")throw new L({code:"InvalidObjectPath",target:a.label});l.add(p);for(let C of o.get(p)??[])h.push(C)}}return l};for(let a of t)for(let l of s(a)??[])i.add(l);if(i.size===0)throw new L({code:"InvalidObjectPath",target:[...n][0]?.label});return r.filter(a=>i.has(a))}var Ir=Object.freeze({"stale-revision":"StaleDocument","invalid-handle":"InvalidObjectPath","invalid-argument":"InvalidArgument","unsupported-capability":"NotSupported",disposed:"RuntimeDisposed","transaction-refused":"GeneralException","unknown-operation":"NotSupported","unsupported-content":"NotSupported","item-not-found":"ItemNotFound","document-unavailable":"DocumentUnavailable"});function ht(r,e={}){let t=Ir[r.code]??"GeneralException",n=t==="StaleDocument",o=Ln(r.code,r.detail);return new L({code:t,...o===void 0?{}:{diagnostic:o},...e.target===void 0?{}:{target:e.target},...n&&e.expectedRevision!==void 0?{expectedRevision:e.expectedRevision}:{},...n&&e.actualRevision!==void 0?{actualRevision:e.actualRevision}:{}})}function $o(r,e,t,n){for(let o=0;o<r.results.length;o+=1){let i=r.results[o];if(i?.status!=="error")continue;let s=e[o]?.label;return e[o]&&n?.(e[o]),ht(i.error,{...s===void 0?{}:{target:s},...t===void 0?{}:{expectedRevision:t},actualRevision:r.revision})}return new L({code:"GeneralException"})}function Io(r,e,t){if(e.results.length!==r.length)throw new L({code:"GeneralException"});for(let n=0;n<r.length;n+=1){let o=e.results[n],i=r[n];if(t?.(i),o.status!=="ok")throw new L({code:"GeneralException",target:i.label});i.settle(o.value)}}function No(r,e){if(r!=null)return(typeof r!="number"||!Number.isFinite(r)||r<=0)&&c(e,"a number of pixels greater than 0"),r}function Lt(r,e,t){if(r==null)return{};(typeof r!="object"||Array.isArray(r))&&c(e,"an options object with width and height");let n=r;t&&n.format!==void 0&&n.format!==null&&n.format!=="Png"&&c(e,"the format 'Png'");let o=No(n.width,e),i=No(n.height,e);return{...o===void 0?{}:{width:o},...i===void 0?{}:{height:i}}}async function Nr(r,e,t,n){let o=r.host;if(typeof o.renderImage!="function"){let s=I("images");throw new L({code:"NotSupported",target:n,...s===void 0?{}:{diagnostic:s}})}let i=await o.renderImage({target:e,...t});if(!i.ok)throw ht(i.error,{target:n});return i.base64}function jt(r,e,t,n){return o=>{let i=g(o,"handle",t).handle;r.defer(Nr(r,i,e,t).then(n))}}function Dt(r,e,t){if(r===void 0)return{};(typeof r!="object"||r===null||Array.isArray(r))&&c(t,"an options object");for(let n of Object.keys(r))e.includes(n)||c(`${t}.${n}`,`an option name: ${z(e)}`,S(n,e));return r}function Bo(r,e){return r==="ShadeFromTitle"&&A({code:"NotImplemented",target:e}),cn.toFile(r,e)}var Z=class extends f{owner;constructor(e,t,n,o=!1){super(e,t,{nullable:o}),this.owner=n}writeBackground(e,t){let n=this.owner;this.command(e,o=>({op:"setBackground",owner:o(n),background:t}))}loadBackground(e,t){let n=this.owner;this.loadScalars(e,"background",o=>({op:"readBackground",owner:o(n)}),o=>t(o.background))}},ze=class extends Z{get color(){return this.loadedProperty("color")}set color(e){this.writeBackground("color",{kind:"solid",color:x(e,this.at("color"))})}get transparency(){return this.loadedProperty("transparency")}set transparency(e){let t=X(e,this.at("transparency"));this.writeBackground("transparency",{kind:"solid",transparency:t})}onLoad(e){this.loadBackground(this.selection(e,["color","transparency"]),t=>({color:t.fill.color??"",transparency:t.fill.transparency??0}))}},qe=class extends Z{get type(){return this.loadedProperty("type")}set type(e){let t=Bo(e,this.at("type"));this.writeBackground("type",{kind:"gradient",gradientType:t})}onLoad(e){this.loadBackground(this.selection(e,["type"]),t=>({type:t.fill.gradientType==="shadeToTitle"?"ShadeFromTitle":cn.fromFile(t.fill.gradientType)??"Unsupported"}))}},We=class extends Z{get backgroundColor(){return this.loadedProperty("backgroundColor")}set backgroundColor(e){let t=x(e,this.at("backgroundColor"));this.writeBackground("backgroundColor",{kind:"pattern",backgroundColor:t})}get foregroundColor(){return this.loadedProperty("foregroundColor")}set foregroundColor(e){let t=x(e,this.at("foregroundColor"));this.writeBackground("foregroundColor",{kind:"pattern",foregroundColor:t})}get pattern(){return this.loadedProperty("pattern")}set pattern(e){let t=kt.toFile(e,this.at("pattern"));this.writeBackground("pattern",{kind:"pattern",pattern:t})}onLoad(e){let t=["backgroundColor","foregroundColor","pattern"];this.loadBackground(this.selection(e,t),n=>({backgroundColor:n.fill.backgroundColor??"",foregroundColor:n.fill.foregroundColor??"",pattern:kt.fromFile(n.fill.pattern)??"Unsupported"}))}},Xe=class extends Z{get transparency(){return this.loadedProperty("transparency")}set transparency(e){let t=X(e,this.at("transparency"));this.writeBackground("transparency",{kind:"picture",transparency:t})}setImage(e){let t=x(e,this.at("setImage"));this.writeBackground("setImage",{kind:"picture",base64:t})}onLoad(e){this.loadBackground(this.selection(e,["transparency"]),t=>({transparency:t.fill.transparency??0}))}},_e=class extends Z{get type(){return this.loadedProperty("type")}getGradientFillOrNullObject(){return this.#e("getGradientFillOrNullObject","gradient",e=>new qe(this.context,e,e,!0))}getPatternFillOrNullObject(){return this.#e("getPatternFillOrNullObject","pattern",e=>new We(this.context,e,e,!0))}getPictureOrTextureFillOrNullObject(){return this.#e("getPictureOrTextureFillOrNullObject","picture",e=>new Xe(this.context,e,e,!0))}getSolidFillOrNullObject(){return this.#e("getSolidFillOrNullObject","solid",e=>new ze(this.context,e,e,!0))}setGradientFill(e){let t=this.at("setGradientFill"),n=Dt(e,["type"],t);this.writeBackground("setGradientFill",{kind:"gradient",...n.type===void 0?{}:{gradientType:Bo(n.type,`${t}.type`)}})}setPatternFill(e){let t=this.at("setPatternFill"),n=Dt(e,["backgroundColor","foregroundColor","pattern"],t);this.writeBackground("setPatternFill",{kind:"pattern",...n.pattern===void 0?{}:{pattern:kt.toFile(n.pattern,`${t}.pattern`)},...n.foregroundColor===void 0?{}:{foregroundColor:x(n.foregroundColor,`${t}.foregroundColor`)},...n.backgroundColor===void 0?{}:{backgroundColor:x(n.backgroundColor,`${t}.backgroundColor`)}})}setPictureOrTextureFill(e){let t=this.at("setPictureOrTextureFill"),n=Dt(e,["imageBase64","transparency"],t);this.writeBackground("setPictureOrTextureFill",{kind:"picture",...n.imageBase64===void 0?{}:{base64:x(n.imageBase64,`${t}.imageBase64`)},...n.transparency===void 0?{}:{transparency:X(n.transparency,`${t}.transparency`)}})}setSolidFill(e){let t=this.at("setSolidFill"),n=Dt(e,["color","transparency"],t);this.writeBackground("setSolidFill",{kind:"solid",...n.color===void 0?{}:{color:x(n.color,`${t}.color`)},...n.transparency===void 0?{}:{transparency:X(n.transparency,`${t}.transparency`)}})}#e(e,t,n){let o=u.pending(`${this.path.label}.${e}()`),i=n(o),s=this.owner,a=o.label;return this.enqueue("read",`${e}()`,l=>({op:"readBackground",owner:l(s)}),l=>{(l.kind==="null"?null:g(l,"background",a).background)?.fill.type===t&&s.isAddressable?o.resolveTo(s.handle()):o.resolveNull()},o,!1),i}onLoad(e){this.loadBackground(this.selection(e,["type"]),t=>({type:vo.fromFile(t.fill.type)??"Unsupported"}))}};function mn(r,e,t){return new _e(r,u.derived(`${e.label}.fill`,e),t)}var ve=class extends Z{#e;get areBackgroundGraphicsHidden(){return this.loadedProperty("areBackgroundGraphicsHidden")}set areBackgroundGraphicsHidden(e){let t=$(e,this.at("areBackgroundGraphicsHidden"));this.writeBackground("areBackgroundGraphicsHidden",{kind:"graphicsHidden",hidden:t})}get isMasterBackgroundFollowed(){return this.loadedProperty("isMasterBackgroundFollowed")}set isMasterBackgroundFollowed(e){let t=$(e,this.at("isMasterBackgroundFollowed"));this.writeBackground("isMasterBackgroundFollowed",{kind:t?"follow":"own"})}get fill(){return this.#e??=mn(this.context,this.path,this.owner)}reset(){this.writeBackground("reset",{kind:"follow"})}onLoad(e){let t=["areBackgroundGraphicsHidden","isMasterBackgroundFollowed"];this.loadBackground(this.selection(e,t,{fill:()=>this.fill}),n=>({areBackgroundGraphicsHidden:n.graphicsHidden,isMasterBackgroundFollowed:n.followsMaster}))}},Re=class extends Z{#e;get areBackgroundGraphicsHidden(){return this.loadedProperty("areBackgroundGraphicsHidden")}set areBackgroundGraphicsHidden(e){let t=$(e,this.at("areBackgroundGraphicsHidden"));this.writeBackground("areBackgroundGraphicsHidden",{kind:"graphicsHidden",hidden:t})}get isMasterBackgroundFollowed(){return this.loadedProperty("isMasterBackgroundFollowed")}set isMasterBackgroundFollowed(e){let t=$(e,this.at("isMasterBackgroundFollowed"));this.writeBackground("isMasterBackgroundFollowed",{kind:t?"follow":"own"})}get fill(){return this.#e??=mn(this.context,this.path,this.owner)}reset(){this.writeBackground("reset",{kind:"follow"})}onLoad(e){let t=["areBackgroundGraphicsHidden","isMasterBackgroundFollowed"];this.loadBackground(this.selection(e,t,{fill:()=>this.fill}),n=>({areBackgroundGraphicsHidden:n.graphicsHidden,isMasterBackgroundFollowed:n.followsMaster}))}},Se=class extends Z{#e;get fill(){return this.#e??=mn(this.context,this.path,this.owner)}onLoad(e){this.selection(e,[],{fill:()=>this.fill})}};var Fo=new WeakMap;function gn(r,e){Fo.get(r)?.(e)}function Eo(r,e){let t=typeof r=="string"?/^\{?([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12})\}?$/.exec(r.trim()):null;return t||c(e,"a GUID such as '{01234567-89AB-CDEF-0123-456789ABCDEF}'"),`{${t[1].toUpperCase()}}`}function Mo(r,e){return(typeof r!="string"||r.length===0)&&c(e,"non-empty XML text"),r}function Br(){return`{${globalThis.crypto.randomUUID().toUpperCase()}}`}var ue=class extends f{#e;#t;constructor(e,t,n,o,i=!1){super(e,t,{nullable:i}),this.#e=n,this.#t=o,o&&this.setLoadedProperty("id",o),Fo.set(this,s=>{this.#t=s.id,this.setLoadedProperty("id",s.id),this.setLoadedProperty("namespaceUri",s.namespaceUri)})}get id(){return this.loadedProperty("id")}get namespaceUri(){return this.loadedProperty("namespaceUri")}getXml(){let e=`${this.path.label}.getXml`,{result:t,fill:n}=k.create(e);return this.enqueue("read","getXml",o=>({op:"readCustomXml",owner:o(this.path),id:this.#t}),o=>n(g(o,"text",e).text)),t}setXml(e){let t=Mo(e,this.at("setXml"));this.command("setXml",n=>({op:"setCustomXml",owner:n(this.path),id:this.#t,xml:t}))}delete(){this.command("delete",e=>({op:"deleteCustomXmlPart",owner:e(this.path),id:this.#t}))}onLoad(e){if(!this.selection(e,["id","namespaceUri"]).includes("namespaceUri"))return;let n=`${this.path.label}.load`;this.enqueue("read","load",o=>({op:"listCustomXmlParts",owner:o(this.#e)}),o=>{if(o.kind==="null")return;let i=g(o,"customXmlParts",n).parts.find(s=>s.id===this.#t);i&&gn(this,i)})}},$t=class extends f{#e;constructor(e,t,n){super(e,t),this.#e=n}get items(){return this.loadedProperty("items")}getCount(){let e=`${this.path.label}.getCount`,{result:t,fill:n}=k.create(e);return this.enqueue("read","getCount",o=>this.#t(o),o=>n(g(o,"customXmlParts",e).parts.length)),t}getItem(e){let t=Eo(e,`${this.path.label}.getItem`);return this.find("getItem()",n=>n.find(o=>o.id===t),t,!1)}getItemAt(e){return(typeof e!="number"||!Number.isInteger(e)||e<0)&&c(`${this.path.label}.getItemAt`,"a whole number of 0 or more"),this.find(`getItemAt(${e})`,t=>t[e],void 0,!1)}getItemOrNullObject(e){let t=Eo(e,`${this.path.label}.getItemOrNullObject`);return this.find("getItemOrNullObject()",n=>n.find(o=>o.id===t),t,!0)}#t(e){return{op:"listCustomXmlParts",owner:e(this.path),...this.#e===void 0?{}:{namespaceUri:this.#e}}}find(e,t,n,o){let i=u.pending(`${this.path.label}.${e}`),s=new ue(this.context,i,this.path,n??"",o),a=i.label;return this.enqueue("read",e,l=>this.#t(l),l=>{let h=t(g(l,"customXmlParts",a).parts);if(!h){if(o)return i.resolveNull();A({code:"ItemNotFound",target:a})}gn(s,h),i.resolveTo(this.path.handle())},i,!1),s}get loadsItemPaths(){return!0}onLoad(e){for(let n of[...e.select,...e.itemSelect])["items","id","namespaceUri"].includes(n)||c(`${this.path.label}.${n}`,"a property of custom XML parts: items, id, or namespaceUri",S(n,["items","id","namespaceUri"]));let t=`${this.path.label}.items`;this.enqueue("read","items",n=>this.#t(n),n=>{let o=g(n,"customXmlParts",t).parts,i=e.top===void 0?o.length:(e.skip??0)+e.top;this.setLoadedProperty("items",o.slice(e.skip??0,i).map((s,a)=>{let l=u.of(`${t}[${a}]`,this.path.handle()),h=new ue(this.context,l,this.path,s.id);return gn(h,s),h}))})}},q=class extends $t{constructor(e,t){super(e,t)}add(e){let t=Mo(e,`${this.path.label}.add`),n=Br(),o=`${this.path.label}.add`;return this.enqueue("write","add",i=>({op:"addCustomXmlPart",owner:i(this.path),xml:t,id:n}),i=>{g(i,"customXmlParts",o)}),new ue(this.context,u.derived(`${this.path.label}.add()`,this.path),this.path,n)}getByNamespace(e){return typeof e!="string"&&c(`${this.path.label}.getByNamespace`,"a namespace URI string"),new Ve(this.context,u.derived(`${this.path.label}.getByNamespace()`,this.path),e)}},Ve=class extends $t{constructor(e,t,n){super(e,t,n)}getOnlyItem(){return this.find("getOnlyItem()",e=>e.length===1?e[0]:void 0,void 0,!1)}getOnlyItemOrNullObject(){return this.find("getOnlyItemOrNullObject()",e=>e.length===1?e[0]:void 0,void 0,!0)}};var Ho=new WeakMap;function Uo(r,e,t){Ho.get(r)?.(e,t)}var ke=class extends f{#e;#t;constructor(e,t,n,o,i=!1){super(e,t,{nullable:i}),this.#e=n,this.#t=o,o&&this.setLoadedProperty("key",o),Ho.set(this,(s,a)=>{this.#t=s,this.setLoadedProperty("key",s),this.setLoadedProperty("value",a)})}get key(){return this.loadedProperty("key")}get value(){return this.loadedProperty("value")}set value(e){let t=x(e,this.at("value"));this.command("value",n=>({op:"setTag",owner:n(this.path),key:this.#t,value:t}))}onLoad(e){let t=this.selection(e,["key","value"]),n=`${this.path.label}.load`;t.includes("value")&&this.enqueue("read","load",o=>({op:"readTags",owner:o(this.#e)}),o=>{if(o.kind==="null")return;let i=g(o,"tags",n).tags.find(s=>s.key===this.#t);i&&this.setLoadedProperty("value",i.value)})}};function It(r,e){return(typeof r!="string"||r.length===0||r.length>255)&&c(e,"a key of 1 to 255 characters"),r.toUpperCase()}var V=class extends f{constructor(e,t){super(e,t)}get items(){return this.loadedProperty("items")}add(e,t){let n=It(e,`${this.path.label}.add`),o=x(t,this.at("value"));this.command("add",i=>({op:"setTag",owner:i(this.path),key:n,value:o}))}delete(e){let t=It(e,`${this.path.label}.delete`);this.command("delete",n=>({op:"deleteTag",owner:n(this.path),key:t}))}getCount(){let e=`${this.path.label}.getCount`,{result:t,fill:n}=k.create(e);return this.enqueue("read","getCount",o=>({op:"readTags",owner:o(this.path)}),o=>n(g(o,"tags",e).tags.length)),t}getItem(e){let t=It(e,`${this.path.label}.getItem`);return this.#e("getItem()",n=>n.find(o=>o.key===t),t,!1)}getItemAt(e){return(typeof e!="number"||!Number.isInteger(e)||e<0)&&c(`${this.path.label}.getItemAt`,"a whole number of 0 or more"),this.#e(`getItemAt(${e})`,t=>t[e],void 0,!1)}getItemOrNullObject(e){let t=It(e,`${this.path.label}.getItemOrNullObject`);return this.#e("getItemOrNullObject()",n=>n.find(o=>o.key===t),t,!0)}#e(e,t,n,o){let i=u.pending(`${this.path.label}.${e}`),s=new ke(this.context,i,this.path,n??"",o),a=i.label;return this.enqueue("read",e,l=>({op:"readTags",owner:l(this.path)}),l=>{let h=t(g(l,"tags",a).tags);if(!h){if(o)return i.resolveNull();A({code:"ItemNotFound",target:a})}Uo(s,h.key,h.value),i.resolveTo(this.path.handle())},i,!1),s}get loadsItemPaths(){return!0}onLoad(e){for(let n of[...e.select,...e.itemSelect])["items","key","value"].includes(n)||c(`${this.path.label}.${n}`,"a property of tags: items, key, or value",S(n,["items","key","value"]));let t=`${this.path.label}.items`;this.enqueue("read","items",n=>({op:"readTags",owner:n(this.path)}),n=>{let o=g(n,"tags",t).tags,i=e.top===void 0?o.length:(e.skip??0)+e.top;this.setLoadedProperty("items",o.slice(e.skip??0,i).map((s,a)=>{let l=u.of(`${t}[${a}]`,this.path.handle()),h=new ke(this.context,l,this.path,s.key);return Uo(h,s.key,s.value),h}))})}};var re=class extends f{#e;constructor(e,t,n){super(e,t),this.#e=n}getThemeColor(e){let t=this.at("getThemeColor"),n=hn.toFile(e,t),{result:o,fill:i}=k.create(t),s=this.#e;return this.enqueue("read","getThemeColor",a=>({op:"readThemeColor",owner:a(s),slot:n}),a=>i(g(a,"text",t).text)),o}setThemeColor(e,t){let n=hn.toFile(e,this.at("setThemeColor")),o=x(t,this.at("rgbColor")),i=this.#e;this.command("setThemeColor",s=>({op:"setThemeColor",owner:s(i),slot:n,color:o}))}};var J=class extends f{#e;#t;#n;#o;#r;#i;#s;#a;constructor(e,t,n=!1){super(e,t,{nullable:n})}get id(){return this.loadedProperty("id")}get index(){return this.loadedProperty("index")}get shapes(){return this.#e??=new ie(this.context,u.derived(`${this.path.label}.shapes`,this.path),this.path)}get tags(){return this.#t??=new V(this.context,u.derived(`${this.path.label}.tags`,this.path))}get customXmlParts(){return this.#n??=new q(this.context,u.derived(`${this.path.label}.customXmlParts`,this.path))}get hyperlinks(){return this.#o??=new De(this.context,u.derived(`${this.path.label}.hyperlinks`,this.path),this.path)}get background(){return this.#s??=new ve(this.context,u.derived(`${this.path.label}.background`,this.path),this.path)}get themeColorScheme(){return this.#a??=new re(this.context,u.derived(`${this.path.label}.themeColorScheme`,this.path),this.path)}get layout(){return this.#r??=this.navigation("layout",e=>new G(this.context,e),e=>({op:"getSlideLayout",slide:e(this.path)}))}get slideMaster(){return this.#i??=this.navigation("slideMaster",e=>new ee(this.context,e),e=>({op:"getSlideMaster",owner:e(this.path)}))}applyLayout(e){let t=U(e);this.command("applyLayout",n=>({op:"applyLayout",slide:n(this.path),layout:n(t)}))}delete(){this.command("delete",e=>({op:"deleteSlide",slide:e(this.path)}))}moveTo(e){(typeof e!="number"||!Number.isInteger(e)||e<0)&&c(`${this.path.label}.moveTo`,"a whole number of 0 or more"),this.command("moveTo",t=>({op:"moveSlide",slide:t(this.path),index:e}))}getImageAsBase64(e){let t=this.at("getImageAsBase64"),n=Lt(e,t,!1),{result:o,fill:i}=k.create(t);return this.enqueue("read","getImageAsBase64",s=>({op:"prepareImage",target:s(this.path),...n}),jt(this.internals,n,t,i)),o}exportAsBase64(){let e=`${this.path.label}.exportAsBase64`,{result:t,fill:n}=k.create(e);return this.enqueue("read","exportAsBase64",o=>({op:"exportSlides",slides:[o(this.path)]}),o=>n(g(o,"base64",e).base64)),t}setSelectedShapes(e){Array.isArray(e)||c("setSelectedShapes","an array of shape ids");let t=e.map(n=>this.shapes.getItem(x(n,this.at("setSelectedShapes"))));this.command("setSelectedShapes",n=>({op:"selectShapes",shapes:t.map(o=>n(U(o)))}))}onLoad(e){let t=this.selection(e,["id","index"],{shapes:()=>this.shapes,tags:()=>this.tags,hyperlinks:()=>this.hyperlinks,layout:()=>this.layout,slideMaster:()=>this.slideMaster,background:()=>this.background,themeColorScheme:()=>this.themeColorScheme,customXmlParts:()=>this.customXmlParts});this.loadScalars(t,"slide",n=>({op:"readSlide",slide:n(this.path)}),n=>({id:n.slide.id,index:n.slide.index}))}},Te=class extends oe{constructor(e,t){super(e,t)}add(e){let t=e?.layoutId,n=e?.slideMasterId;e!==void 0&&(typeof e!="object"||e===null)&&c("presentation.slides.add","an AddSlideOptions object");for(let o of Object.keys(e??{}))o!=="layoutId"&&o!=="slideMasterId"&&A({code:"NotImplemented",target:`presentation.slides.add.${o}`});this.enqueue("write","add",()=>({op:"addSlide",...t===void 0?{}:{layoutId:x(t,this.at("layoutId"))},...n===void 0?{}:{masterId:x(n,this.at("slideMasterId"))}}))}exportAsBase64Presentation(e){(!Array.isArray(e)||e.length===0)&&c("presentation.slides.exportAsBase64Presentation","a non-empty array of slides or slide ids");let n=e.map(a=>typeof a=="string"?this.getItem(a):a).map(a=>U(a)),o=`${this.path.label}.exportAsBase64Presentation`,{result:i,fill:s}=k.create(o);return this.enqueue("read","exportAsBase64Presentation",a=>({op:"exportSlides",slides:n.map(l=>a(l))}),a=>s(g(a,"base64",o).base64)),i}getItem(e){return this.find({id:this.keyArg(e,"getItem")},"getItem()",!1)}getItemAt(e){let t=this.indexArg(e);return this.find({index:t},`getItemAt(${t})`,!1)}getItemOrNullObject(e){return this.find({id:this.keyArg(e,"getItemOrNullObject")},"getItemOrNullObject()",!0)}listing(){return{op:"listSlides"}}itemOf(e,t){return new J(this.context,e,t)}lookup(e,t,n){return{op:"getSlide",key:t,...n?{orNull:!0}:{}}}},Le=class extends oe{constructor(e,t,n){super(e,t)}exportAsBase64Presentation(){let e=`${this.path.label}.exportAsBase64Presentation`,{result:t,fill:n}=k.create(e),o=u.pending(`${this.path.label}.items`),i=[];return this.enqueue("read","items",()=>this.listing(),s=>{i=this.handlesOf(s,e),i[0]?o.resolveTo(i[0]):o.resolveNull()},o,!1),this.enqueue("read","exportAsBase64Presentation",s=>(o.isNull&&A({code:"ItemNotFound",target:e}),s(o),{op:"exportSlides",slides:i}),s=>n(g(s,"base64",e).base64)),t}getItem(e){return this.find({id:this.keyArg(e,"getItem")},"getItem()",!1)}getItemAt(e){let t=this.indexArg(e);return this.find({index:t},`getItemAt(${t})`,!1)}getItemOrNullObject(e){return this.find({id:this.keyArg(e,"getItemOrNullObject")},"getItemOrNullObject()",!0)}listing(){return{op:"readSelection"}}handlesOf(e,t){return g(e,"selection",t).selection.slides}get hasLookup(){return!1}itemOf(e,t){return new J(this.context,e,t)}lookup(){}},Er=["id","name","type"],G=class extends f{#e;#t;#n;#o;constructor(e,t,n=!1){super(e,t,{nullable:n})}get id(){return this.loadedProperty("id")}get name(){return this.loadedProperty("name")}get type(){return this.loadedProperty("type")}get shapes(){return this.#e??=new ie(this.context,u.derived(`${this.path.label}.shapes`,this.path),this.path)}get background(){return this.#t??=new Re(this.context,u.derived(`${this.path.label}.background`,this.path),this.path)}get customXmlParts(){return this.#o??=new q(this.context,u.derived(`${this.path.label}.customXmlParts`,this.path))}get themeColorScheme(){return this.#n??=new re(this.context,u.derived(`${this.path.label}.themeColorScheme`,this.path),this.path)}onLoad(e){let t=this.selection(e,Er,{shapes:()=>this.shapes,background:()=>this.background,themeColorScheme:()=>this.themeColorScheme,customXmlParts:()=>this.customXmlParts});this.loadScalars(t,"layout",n=>({op:"readLayout",layout:n(this.path)}),n=>({id:n.layout.id,name:n.layout.name,type:wo.fromFile(n.layout.type)??"Custom"}))}},Ke=class extends oe{#e;constructor(e,t,n){super(e,t),this.#e=n}getItem(e){return this.find({id:this.keyArg(e,"getItem")},"getItem()",!1)}getItemAt(e){let t=this.indexArg(e);return this.find({index:t},`getItemAt(${t})`,!1)}getItemOrNullObject(e){return this.find({id:this.keyArg(e,"getItemOrNullObject")},"getItemOrNullObject()",!0)}listing(e){return{op:"listLayouts",master:e(this.#e)}}itemOf(e,t){return new G(this.context,e,t)}lookup(e,t,n){return{op:"getLayout",master:e(this.#e),key:t,...n?{orNull:!0}:{}}}},ee=class extends f{#e;#t;#n;#o;#r;constructor(e,t,n=!1){super(e,t,{nullable:n})}get id(){return this.loadedProperty("id")}get name(){return this.loadedProperty("name")}get layouts(){return this.#e??=new Ke(this.context,u.derived(`${this.path.label}.layouts`,this.path),this.path)}get shapes(){return this.#t??=new ie(this.context,u.derived(`${this.path.label}.shapes`,this.path),this.path)}get background(){return this.#n??=new Se(this.context,u.derived(`${this.path.label}.background`,this.path),this.path)}get customXmlParts(){return this.#r??=new q(this.context,u.derived(`${this.path.label}.customXmlParts`,this.path))}get themeColorScheme(){return this.#o??=new re(this.context,u.derived(`${this.path.label}.themeColorScheme`,this.path),this.path)}onLoad(e){let t=this.selection(e,["id","name"],{layouts:()=>this.layouts,shapes:()=>this.shapes,background:()=>this.background,themeColorScheme:()=>this.themeColorScheme,customXmlParts:()=>this.customXmlParts});this.loadScalars(t,"layout",n=>({op:"readMaster",master:n(this.path)}),n=>({id:n.layout.id,name:n.layout.name}))}},je=class extends oe{constructor(e,t){super(e,t)}getItem(e){return this.find({id:this.keyArg(e,"getItem")},"getItem()",!1)}getItemAt(e){let t=this.indexArg(e);return this.find({index:t},`getItemAt(${t})`,!1)}getItemOrNullObject(e){return this.find({id:this.keyArg(e,"getItemOrNullObject")},"getItemOrNullObject()",!0)}listing(){return{op:"listMasters"}}itemOf(e,t){return new ee(this.context,e,t)}lookup(e,t,n){return{op:"getMaster",key:t,...n?{orNull:!0}:{}}}};var ut=class extends f{target;constructor(e,t,n){super(e,t),this.target=n}loadCellFormat(e,t){let{shape:n,cell:o}=this.target;this.loadScalars(e,"tableCellFormat",i=>({op:"readTableCellFormat",shape:i(n),cell:o}),i=>t(i.format))}};function Fr(r){return r.visible?{color:r.color??void 0,dashStyle:he.fromFile(r.dashStyle)??"Solid",transparency:r.transparency??0,weight:r.weight??void 0}:{color:void 0,dashStyle:void 0,transparency:void 0,weight:void 0}}var Mr=["color","dashStyle","transparency","weight"],Qe=class extends ut{#e;constructor(e,t,n,o){super(e,t,n),this.#e=o}get color(){return this.loadedProperty("color")}set color(e){this.#t("color",{color:x(e,this.at("color"))})}get dashStyle(){return this.loadedProperty("dashStyle")}set dashStyle(e){this.#t("dashStyle",{dashStyle:he.toFile(e,this.at("dashStyle"))})}get transparency(){return this.loadedProperty("transparency")}set transparency(e){this.#t("transparency",{transparency:X(e,this.at("transparency"))})}get weight(){return this.loadedProperty("weight")}set weight(e){let t=R(e,this.at("weight"));t<0&&c(this.at("weight"),"a weight of 0 or more points"),this.#t("weight",{weight:t})}#t(e,t){let{shape:n,cell:o}=this.target,i=this.#e;this.command(e,s=>({op:"setTableCellBorder",shape:s(n),cell:o,side:i,line:t}))}onLoad(e){let t=this.#e;this.loadCellFormat(this.selection(e,Mr),n=>Fr(n.borders[t]))}},zo=["left","right","top","bottom","diagonalDown","diagonalUp"],$e=class extends ut{#e=new Map;get bottom(){return this.#t("bottom")}get diagonalDown(){return this.#t("diagonalDown")}get diagonalUp(){return this.#t("diagonalUp")}get left(){return this.#t("left")}get right(){return this.#t("right")}get top(){return this.#t("top")}#t(e){let t=this.#e.get(e);return t||(t=new Qe(this.context,u.derived(`${this.path.label}.${e}`,this.path),this.target,e),this.#e.set(e,t)),t}onLoad(e){let t=Object.fromEntries(zo.map(o=>[o,()=>this.#t(o)])),n=Rt(e)?[...zo]:e.select;this.selection({...e,select:n},[],t)}},Ur=["bottom","left","right","top"],Ie=class extends ut{get bottom(){return this.loadedProperty("bottom")}set bottom(e){this.#e("bottom",e)}get left(){return this.loadedProperty("left")}set left(e){this.#e("left",e)}get right(){return this.loadedProperty("right")}set right(e){this.#e("right",e)}get top(){return this.loadedProperty("top")}set top(e){this.#e("top",e)}#e(e,t){let n=t===void 0?null:R(t,this.at(e));n!==null&&n<0&&c(this.at(e),"a margin of 0 or more points");let{shape:o,cell:i}=this.target;this.command(e,s=>({op:"setTableCellMargins",shape:s(o),cell:i,margins:{[e]:n}}))}onLoad(e){this.loadCellFormat(this.selection(e,Ur),t=>({...t.margins}))}},qo=[["areColumnsBanded","bandedColumns"],["areRowsBanded","bandedRows"],["isFirstColumnHighlighted","firstColumn"],["isFirstRowHighlighted","firstRow"],["isLastColumnHighlighted","lastColumn"],["isLastRowHighlighted","lastRow"]],Wo=Symbol("unknown table style"),Ne=class extends f{#e;constructor(e,t,n){super(e,t),this.#e=n}get areColumnsBanded(){return this.loadedProperty("areColumnsBanded")}set areColumnsBanded(e){this.#t("areColumnsBanded","bandedColumns",e)}get areRowsBanded(){return this.loadedProperty("areRowsBanded")}set areRowsBanded(e){this.#t("areRowsBanded","bandedRows",e)}get isFirstColumnHighlighted(){return this.loadedProperty("isFirstColumnHighlighted")}set isFirstColumnHighlighted(e){this.#t("isFirstColumnHighlighted","firstColumn",e)}get isFirstRowHighlighted(){return this.loadedProperty("isFirstRowHighlighted")}set isFirstRowHighlighted(e){this.#t("isFirstRowHighlighted","firstRow",e)}get isLastColumnHighlighted(){return this.loadedProperty("isLastColumnHighlighted")}set isLastColumnHighlighted(e){this.#t("isLastColumnHighlighted","lastColumn",e)}get isLastRowHighlighted(){return this.loadedProperty("isLastRowHighlighted")}set isLastRowHighlighted(e){this.#t("isLastRowHighlighted","lastRow",e)}get style(){let e=this.loadedProperty("style");return e===Wo&&A({code:"NotImplemented",target:this.at("style"),diagnostic:I("table-style-unknown")}),e}set style(e){this.#n("style",{styleName:Tt(e,this.at("style"))})}#t(e,t,n){this.#n(e,{[t]:$(n,this.at(e))})}#n(e,t){let n=this.#e;this.command(e,o=>({op:"setTableStyle",shape:o(n),style:t}))}onLoad(e){let t=this.selection(e,[...qo.map(([o])=>o),"style"]),n=this.#e;this.loadScalars(t,"table",o=>({op:"readTable",shape:o(n)}),({table:{style:o}})=>{let i={};for(let[s,a]of qo)i[s]=o[a];return i.style=o.styleId===null&&o.styleName===null?"NoStyleNoGrid":(o.styleName===null?null:Ro(o.styleName))??Wo,i})}};var fn=new Set(["allCaps","bold","color","doubleStrikethrough","italic","name","size","smallCaps","strikethrough","subscript","superscript","underline"]);function Hr(r,e){if(r===void 0)return;(typeof r!="object"||r===null)&&c(e,"an object of font properties");let t={};for(let[n,o]of Object.entries(r))fn.has(n)||c(`${e}.${n}`,`a font property: ${z([...fn])}`,S(n,[...fn])),o!==void 0&&(t[n]=n==="underline"?ce.toFile(o,`${e}.underline`):o);return Object.keys(t).length===0?void 0:t}function Nt(r,e){return(typeof r!="number"||!Number.isInteger(r)||r<1)&&c(e,"a whole number of 1 or more"),r}var Bt=new WeakMap,K=class extends f{#e;#t;#n;#o;#r;#i;constructor(e,t,n,o){super(e,t,{nullable:!0}),this.#e=Object.freeze({row:n,column:o}),Bt.set(this,i=>{for(let[s,a]of Object.entries(i))this.setLoadedProperty(s,a)})}get text(){return this.loadedProperty("text")}set text(e){let t=x(e,this.at("text"));this.#a("text",{op:"setTableCell",...this.#e,text:t})}get rowIndex(){return this.loadedProperty("rowIndex")}get columnIndex(){return this.loadedProperty("columnIndex")}get rowCount(){return this.loadedProperty("rowCount")}get columnCount(){return this.loadedProperty("columnCount")}get font(){return this.#t??=new pe(this.context,u.derived(`${this.path.label}.font`,this.path),this.path,()=>{},this.#e)}get borders(){return this.#r??=new $e(this.context,u.derived(`${this.path.label}.borders`,this.path),{shape:this.path,cell:this.#e})}get margins(){return this.#i??=new Ie(this.context,u.derived(`${this.path.label}.margins`,this.path),{shape:this.path,cell:this.#e})}get fill(){return this.#n??=new ne(this.context,u.derived(`${this.path.label}.fill`,this.path),{kind:"cell",shape:this.path,cell:this.#e})}get horizontalAlignment(){return this.loadedProperty("horizontalAlignment")}set horizontalAlignment(e){this.#s().horizontalAlignment=e}get indentLevel(){return this.loadedProperty("indentLevel")}set indentLevel(e){this.#s().indentLevel=R(e,this.at("indentLevel"))}get verticalAlignment(){return this.loadedProperty("verticalAlignment")}set verticalAlignment(e){let t=de.toFile(e,`${this.path.label}.verticalAlignment`),n=t.endsWith("Centered"),o=n?t.slice(0,-8):t;this.#a("verticalAlignment",{op:"setTableCellAnchor",...this.#e,anchor:o,anchorCenter:n})}get textRuns(){return this.loadedProperty("textRuns")}set textRuns(e){let t=`${this.path.label}.textRuns`;Array.isArray(e)||c(t,"an array of text runs");let n=0,o=[],i=e.map((a,l)=>{(typeof a!="object"||a===null||typeof a.text!="string")&&c(`${t}[${l}]`,"a text run with a text string");let h=Hr(a.font,`${t}[${l}].font`),p=a.text.replace(/\r\n|\n/g,"\r");return h&&p.length>0&&o.push({span:{start:n,length:p.length},font:h}),n+=p.length,p}).join(""),s=this.#e;this.command("textRuns",a=>({op:"setText",shape:a(this.path),text:i,cell:s}));for(let{span:a,font:l}of o)this.command("textRuns",h=>({op:"setFont",shape:h(this.path),span:a,font:l,cell:s}))}resize(e,t){let n=`${this.path.label}.resize`;this.#a("resize",{op:"resizeTableCell",...this.#e,rowCount:Nt(e,n),columnCount:Nt(t,n)})}split(e,t){let n=`${this.path.label}.split`;this.#a("split",{op:"splitTableCell",...this.#e,rowCount:Nt(e,n),columnCount:Nt(t,n)})}#s(){return this.#o??=new me(this.context,u.derived(`${this.path.label}.paragraphFormat`,this.path),this.path,()=>{},this.#e)}#a(e,t){this.command(e,n=>({...t,shape:n(this.path)}))}onLoad(e){let t=this.selection(e,["text","rowIndex","columnIndex","rowCount","columnCount","verticalAlignment","horizontalAlignment","indentLevel","textRuns"],{font:()=>this.font,fill:()=>this.fill,borders:()=>this.borders,margins:()=>this.margins}),n=this.#e,o=t.filter(s=>s!=="horizontalAlignment"&&s!=="indentLevel"&&s!=="textRuns");this.loadScalars(o,"tableCell",s=>({op:"readTableCell",shape:s(this.path),...n}),s=>({...s.cell,verticalAlignment:de.fromFile(s.cell.anchor+(s.cell.anchorCenter?"Centered":""))})),this.loadScalars(t.filter(s=>s==="textRuns"),"textRuns",s=>({op:"readTextRuns",shape:s(this.path),cell:n}),s=>({textRuns:s.runs.map(zr)}));let i=t.filter(s=>s==="horizontalAlignment"||s==="indentLevel");this.loadScalars(i,"paragraph",s=>({op:"readParagraph",shape:s(this.path),cell:n}),s=>({horizontalAlignment:Ce.fromFile(s.paragraph.alignment),indentLevel:s.paragraph.indentLevel}))}};function zr(r){let{underline:e,...t}=r.font,n={};for(let[i,s]of Object.entries(t))s!==null&&(n[i]=s);let o=e===null?null:ce.fromFile(e);return o&&(n.underline=o),{text:r.text,font:n}}function Xo(r,e,t){let n=U(r),o=`${n.label}.getCellOrNullObject(${e}, ${t})`;return new K(r.context,u.derived(o,n),e,t)}function Q(r,e,t){(typeof r!="object"||r===null||Array.isArray(r))&&c(t,"an object of options");for(let n of Object.keys(r))e.includes(n)||c(`${t}.${n}`,`an option name: ${z(e)}`,S(n,e));return r}function Ye(r,e){return typeof r!="string"&&c(e,"a string"),r}function bn(r,e){let t=R(r,e);return t<=0&&c(e,"a number greater than 0"),t}function _o(r,e){let t=R(r,e);return t<0&&c(e,"a number of 0 or more"),t}function Et(r,e,t,n){return(typeof r!="number"||!Number.isInteger(r)||r<e||r>t)&&c(n,`a whole number from ${e} to ${t}`),r}function ge(r,e,t){return(!Array.isArray(r)||e!==void 0&&r.length!==e)&&c(t,e===void 0?"an array":`an array of ${e} entries, one for each ${t.endsWith("values")||t.endsWith("rows")||t.endsWith("specificCellProperties")?"row":"entry"}`),r}var qr=["color","dashStyle","transparency","weight"],Vo=["bottom","diagonalDown","diagonalUp","left","right","top"],Ko=["bottom","left","right","top"],yn=["allCaps","bold","color","doubleStrikethrough","italic","name","size","smallCaps","strikethrough","subscript","superscript","underline"],Wr=["borders","fill","font","horizontalAlignment","indentLevel","margins","text","textRuns","verticalAlignment"];function Qo(r,e){let t=Q(r,yn,e);for(let n of yn){let o=t[n],i=`${e}.${n}`;o!==void 0&&(n==="underline"?ce.toFile(o,i):n==="name"||n==="color"?Ye(o,i):n==="size"?bn(o,i):typeof o!="boolean"&&c(i,"true or false"))}}function Yo(r,e){let t=Q(r,Wr,e),n=[],{borders:o,fill:i,font:s,horizontalAlignment:a,indentLevel:l,margins:h,text:p,textRuns:C}=t;if(p!==void 0&&C!==void 0&&c(`${e}.textRuns`,"text or textRuns, not both"),p!==void 0){let b=Ye(p,`${e}.text`);n.push(w=>w.text=b)}if(C!==void 0){let b=ge(C,void 0,`${e}.textRuns`).map((w,P)=>{let T=Q(w,["font","text"],`${e}.textRuns[${P}]`);return Ye(T.text,`${e}.textRuns[${P}].text`),T.font!==void 0&&Qo(T.font,`${e}.textRuns[${P}].font`),w});n.push(w=>w.textRuns=b)}if(s!==void 0){Qo(s,`${e}.font`);let b=s;n.push(w=>{for(let P of yn)b[P]!==void 0&&(w.font[P]=b[P])})}if(i!==void 0){let b=Q(i,["color","transparency"],`${e}.fill`),w=b.color===void 0?void 0:Ye(b.color,`${e}.fill.color`),P=b.transparency===void 0?void 0:X(b.transparency,`${e}.fill.transparency`);n.push(T=>{w!==void 0&&T.fill.setSolidColor(w),P!==void 0&&(T.fill.transparency=P)})}if(a!==void 0){Ce.toFile(a,`${e}.horizontalAlignment`);let b=a;n.push(w=>w.horizontalAlignment=b)}if(l!==void 0){let b=R(l,`${e}.indentLevel`);n.push(w=>w.indentLevel=b)}if(t.verticalAlignment!==void 0){de.toFile(t.verticalAlignment,`${e}.verticalAlignment`);let b=t.verticalAlignment;n.push(w=>w.verticalAlignment=b)}if(h!==void 0){let b=Q(h,Ko,`${e}.margins`);for(let w of Ko)if(b[w]!==void 0){let P=_o(b[w],`${e}.margins.${w}`);n.push(T=>T.margins[w]=P)}}if(o!==void 0){let b=Q(o,Vo,`${e}.borders`);for(let w of Vo){if(b[w]===void 0)continue;let P=`${e}.borders.${w}`,T=Q(b[w],qr,P);T.color!==void 0&&Ye(T.color,`${P}.color`),T.dashStyle!==void 0&&he.toFile(T.dashStyle,`${P}.dashStyle`),T.transparency!==void 0&&X(T.transparency,`${P}.transparency`),T.weight!==void 0&&_o(T.weight,`${P}.weight`);let _=T;n.push(j=>{let D=j.borders[w];_.color!==void 0&&(D.color=_.color),_.weight!==void 0&&(D.weight=_.weight),_.dashStyle!==void 0&&(D.dashStyle=_.dashStyle),_.transparency!==void 0&&(D.transparency=_.transparency)})}}return b=>{for(let w of n)w(b)}}var Xr=["columns","height","left","mergedAreas","rows","specificCellProperties","style","top","uniformCellProperties","values","width"];function Zo(r,e,t,n){if(r===void 0)return{values:void 0,apply:()=>{}};let o=Q(r,Xr,n),i=[],s;if(o.values!==void 0&&(s=ge(o.values,e,`${n}.values`).map(a=>ge(a,t,`${n}.values`).map(l=>Ye(l,`${n}.values`)))),o.style!==void 0){Tt(o.style,`${n}.style`);let a=o.style;i.push(l=>l.styleSettings.style=a)}if(o.columns!==void 0&&ge(o.columns,t,`${n}.columns`).forEach((a,l)=>{let h=Q(a,["columnWidth"],`${n}.columns[${l}]`);if(h.columnWidth===void 0)return;let p=bn(h.columnWidth,`${n}.columns[${l}].columnWidth`);i.push(C=>C.columns.getItemAt(l).width=p)}),o.rows!==void 0&&ge(o.rows,e,`${n}.rows`).forEach((a,l)=>{let h=Q(a,["rowHeight"],`${n}.rows[${l}]`);if(h.rowHeight===void 0)return;let p=bn(h.rowHeight,`${n}.rows[${l}].rowHeight`);i.push(C=>C.rows.getItemAt(l).height=p)}),o.mergedAreas!==void 0&&ge(o.mergedAreas,void 0,`${n}.mergedAreas`).forEach((a,l)=>{let h=`${n}.mergedAreas[${l}]`,p=Q(a,["columnCount","columnIndex","rowCount","rowIndex"],h),C=Et(p.rowIndex,0,e-1,`${h}.rowIndex`),b=Et(p.columnIndex,0,t-1,`${h}.columnIndex`),w=Et(p.rowCount,1,e-C,`${h}.rowCount`),P=Et(p.columnCount,1,t-b,`${h}.columnCount`);i.push(T=>T.mergeCells(C,b,w,P))}),o.uniformCellProperties!==void 0){let a=Yo(o.uniformCellProperties,`${n}.uniformCellProperties`);i.push(l=>{for(let h=0;h<e;h+=1)for(let p=0;p<t;p+=1)a(Xo(l,h,p))})}if(o.specificCellProperties!==void 0){let a=`${n}.specificCellProperties`,l=ge(o.specificCellProperties,e,a).map((h,p)=>ge(h,t,`${a}[${p}]`).map((C,b)=>Yo(C,`${a}[${p}][${b}]`)));i.push(h=>l.forEach((p,C)=>p.forEach((b,w)=>b(Xo(h,C,w)))))}return{values:s,apply:a=>{for(let l of i)l(a)}}}function xn(r,e){return(typeof r!="number"||!Number.isInteger(r)||r<1)&&c(e,"a whole number of 1 or more"),r}function fe(r,e){return(typeof r!="number"||!Number.isInteger(r)||r<0)&&c(e,"a whole number of 0 or more"),r}var Be=class extends f{#e;#t;#n;#o;constructor(e,t,n){super(e,t),this.#e=n}get columnCount(){return this.loadedProperty("columnCount")}get rowCount(){return this.loadedProperty("rowCount")}get values(){return this.loadedProperty("values")}get rows(){return this.#t??=new Ge(this.context,u.derived(`${this.path.label}.rows`,this.path))}get columns(){return this.#n??=new et(this.context,u.derived(`${this.path.label}.columns`,this.path))}get styleSettings(){return this.#o??=new Ne(this.context,u.derived(`${this.path.label}.styleSettings`,this.path),this.path)}getMergedAreas(){return new tt(this.context,u.derived(`${this.path.label}.getMergedAreas()`,this.path))}getShape(){return this.#e}getCellOrNullObject(e,t){let n=fe(e,`${this.path.label}.getCellOrNullObject`),o=fe(t,`${this.path.label}.getCellOrNullObject`),i=u.pending(`${this.path.label}.getCellOrNullObject(${n}, ${o})`),s=new K(this.context,i,n,o),a=i.label;return this.enqueue("read",`getCellOrNullObject(${n}, ${o})`,l=>({op:"readTableCell",shape:l(this.path),row:n,column:o}),l=>{if(l.kind==="null")return i.resolveNull();g(l,"tableCell",a),i.resolveTo(this.path.handle())},i,!1),s}mergeCells(e,t,n,o){let i=`${this.path.label}.mergeCells`,s={op:"mergeTableCells",row:fe(e,i),column:fe(t,i),rowCount:xn(n,i),columnCount:xn(o,i)};this.command("mergeCells",a=>({...s,shape:a(this.path)}))}clear(e){let t=`${this.path.label}.clear`;e!==void 0&&(typeof e!="object"||e===null)&&c(t,"a TableClearOptions object");for(let l of Object.keys(e??{}))l!=="all"&&l!=="format"&&l!=="text"&&c(`${t}.${l}`,"the options all, format, or text",S(l,["all","format","text"]));let{all:n,format:o,text:i}=e??{};for(let l of[n,o,i])l!==void 0&&typeof l!="boolean"&&c(t,"true or false");let s=n===!0||n===void 0&&o===void 0&&i===void 0,a={op:"clearTable",text:s||i===!0,format:s||o===!0};!a.text&&!a.format||this.command("clear",l=>({...a,shape:l(this.path)}))}onLoad(e){let t=this.selection(e,["columnCount","rowCount","values"],{rows:()=>this.rows,columns:()=>this.columns,styleSettings:()=>this.styleSettings});this.loadScalars(t,"table",n=>({op:"readTable",shape:n(this.path)}),n=>({columnCount:n.table.columnCount,rowCount:n.table.rowCount,values:n.table.values.map(o=>[...o])}))}},_r={target:"row",index:"rowIndex",size:"height"},Vr={target:"column",index:"columnIndex",size:"width"},An=new WeakMap,Ft=class extends f{#e;#t;constructor(e,t,n,o,i){super(e,t),this.#e=n,this.#t=i,this.setLoadedProperty(i.index,n),this.setLoadedProperty(i.size,o),An.set(this,{at:n,size:s=>this.setLoadedProperty(i.size,s)})}get target(){return this.#t.target}delete(){let e=this.target==="row"?"deleteTableRows":"deleteTableColumns";this.command("delete",t=>({op:e,shape:t(this.path),index:this.#e,count:1}))}writeSize(e,t){let n=R(t,e);n<=0&&c(`${this.path.label}.${e}`,"a size greater than 0 points"),this.command(e,o=>({op:"setTableSize",shape:o(this.path),target:this.target,index:this.#e,size:n}))}onLoad(e){this.selection(e,[this.#t.index,this.#t.size,"currentHeight"])}},Ze=class extends Ft{constructor(e,t,n,o){super(e,t,n,o,_r)}get rowIndex(){return this.loadedProperty("rowIndex")}get height(){return this.loadedProperty("height")}set height(e){this.writeSize("height",e)}get currentHeight(){return this.loadedProperty("height")}},Je=class extends Ft{constructor(e,t,n,o){super(e,t,n,o,Vr)}get columnIndex(){return this.loadedProperty("columnIndex")}get width(){return this.loadedProperty("width")}set width(e){this.writeSize("width",e)}},Mt=class extends f{get items(){return this.loadedProperty("items")}add(e,t){let n=e==null?void 0:fe(e,"index"),o=t===void 0?1:xn(t,"count"),i=this.target==="row"?"insertTableRows":"insertTableColumns";this.command("add",s=>({op:i,shape:s(this.path),...n===void 0?{}:{index:n},count:o}))}getCount(){let e=`${this.path.label}.getCount`,{result:t,fill:n}=k.create(e);return this.enqueue("read","getCount",o=>this.#e(o),o=>n(this.#t(g(o,"table",e).table).length)),t}getItemAt(e){let t=fe(e,`${this.path.label}.getItemAt`),n=this.make(u.derived(`${this.path.label}.getItemAt(${t})`,this.path),t,0),o=`${this.path.label}.getItemAt(${t})`;return this.enqueue("read",`getItemAt(${t})`,i=>this.#e(i),i=>{let s=this.#t(g(i,"table",o).table)[t];s===void 0&&A({code:"ItemNotFound",target:o}),An.get(n)?.size(s)}),n}deleteLines(e,t){Array.isArray(e)||c(`${this.path.label}.${t}`,"an array of rows or columns of this table");let n=i=>An.get(i)?.at??0,o=[...e].sort((i,s)=>n(s)-n(i));for(let i of o)i.delete()}#e(e){return{op:"readTable",shape:e(this.path)}}#t(e){return this.target==="row"?e.rowHeights:e.columnWidths}get loadsItemPaths(){return!0}onLoad(e){let t=`${this.path.label}.items`;this.enqueue("read","items",n=>this.#e(n),n=>{let o=this.#t(g(n,"table",t).table);this.setLoadedProperty("items",o.map((i,s)=>this.make(u.derived(`${t}[${s}]`,this.path),s,i)))})}},Ge=class extends Mt{constructor(e,t){super(e,t)}deleteRows(e){this.deleteLines(e,"deleteRows")}get target(){return"row"}make(e,t,n){return new Ze(this.context,e,t,n)}},et=class extends Mt{constructor(e,t){super(e,t)}deleteColumns(e){this.deleteLines(e,"deleteColumns")}get target(){return"column"}make(e,t,n){return new Je(this.context,e,t,n)}},tt=class extends f{constructor(e,t){super(e,t)}get items(){return this.loadedProperty("items")}getCount(){let e=`${this.path.label}.getCount`,{result:t,fill:n}=k.create(e);return this.enqueue("read","getCount",o=>this.#e(o),o=>n(g(o,"table",e).table.mergedAreas.length)),t}getItemAtOrNullObject(e,t){let n=fe(e,`${this.path.label}.getItemAtOrNullObject`),o=fe(t,`${this.path.label}.getItemAtOrNullObject`),i=u.pending(`${this.path.label}.getItemAtOrNullObject(${n}, ${o})`),s=new K(this.context,i,n,o),a=i.label;return this.enqueue("read",`getItemAtOrNullObject(${n}, ${o})`,l=>this.#e(l),l=>{let h=g(l,"table",a).table.mergedAreas.find(p=>n>=p.rowIndex&&n<p.rowIndex+p.rowCount&&o>=p.columnIndex&&o<p.columnIndex+p.columnCount);if(!h)return i.resolveNull();Bt.get(s)?.(Jo(h)),i.resolveTo(this.path.handle())},i,!1),s}#e(e){return{op:"readTable",shape:e(this.path)}}get loadsItemPaths(){return!0}onLoad(e){let t=`${this.path.label}.items`;this.enqueue("read","items",n=>this.#e(n),n=>{let o=g(n,"table",t).table.mergedAreas;this.setLoadedProperty("items",o.map((i,s)=>{let a=new K(this.context,u.derived(`${t}[${s}]`,this.path),i.rowIndex,i.columnIndex);return Bt.get(a)?.(Jo(i)),a}))})}};function Jo(r){return{rowIndex:r.rowIndex,columnIndex:r.columnIndex,rowCount:r.rowCount,columnCount:r.columnCount}}var Kr=["id","name","type","left","top","width","height","rotation","visible","zOrderPosition","level","altTextTitle","altTextDescription","isDecorative","creationId"];function Ut(r,e){if(r===void 0)return{};(typeof r!="object"||r===null)&&c(e,"a ShapeAddOptions object");let t={};for(let n of["left","top","width","height"]){let o=r[n];o!==void 0&&(t[n]=R(o,`${e}.${n}`))}return t}var E=class r extends f{#e;#t;#n;#o;#r;#i;#s;#a;#d;constructor(e,t,n=!1){super(e,t,{nullable:n})}get id(){return this.loadedProperty("id")}get name(){return this.loadedProperty("name")}set name(e){this.#l("name",{name:x(e,this.at("name"))})}get type(){return this.loadedProperty("type")}get left(){return this.loadedProperty("left")}set left(e){this.#l("left",{left:R(e,this.at("left"))})}get top(){return this.loadedProperty("top")}set top(e){this.#l("top",{top:R(e,this.at("top"))})}get width(){return this.loadedProperty("width")}set width(e){this.#l("width",{width:R(e,this.at("width"))})}get height(){return this.loadedProperty("height")}set height(e){this.#l("height",{height:R(e,this.at("height"))})}get rotation(){return this.loadedProperty("rotation")}set rotation(e){this.#l("rotation",{rotation:R(e,this.at("rotation"))})}get visible(){return this.loadedProperty("visible")}set visible(e){this.#l("visible",{visible:$(e,this.at("visible"))})}get zOrderPosition(){return this.loadedProperty("zOrderPosition")}get level(){return this.loadedProperty("level")}get altTextTitle(){return this.loadedProperty("altTextTitle")}set altTextTitle(e){this.#l("altTextTitle",{altTextTitle:x(e,this.at("altTextTitle"))})}get altTextDescription(){return this.loadedProperty("altTextDescription")}set altTextDescription(e){this.#l("altTextDescription",{altTextDescription:x(e,this.at("altTextDescription"))})}get isDecorative(){return this.loadedProperty("isDecorative")}set isDecorative(e){this.#l("isDecorative",{isDecorative:$(e,this.at("isDecorative"))})}get creationId(){return this.loadedProperty("creationId")}get adjustments(){return this.#d??=new Pe(this.context,u.derived(`${this.path.label}.adjustments`,this.path),this.path)}get fill(){return this.#e??=new ne(this.context,u.derived(`${this.path.label}.fill`,this.path),{kind:"shape",shape:this.path})}get lineFormat(){return this.#t??=new Oe(this.context,u.derived(`${this.path.label}.lineFormat`,this.path),this.path)}get textFrame(){return this.#n??=new se(this.context,u.derived(`${this.path.label}.textFrame`,this.path),this.path)}get tags(){return this.#o??=new V(this.context,u.derived(`${this.path.label}.tags`,this.path))}get customXmlParts(){return this.#r??=new q(this.context,u.derived(`${this.path.label}.customXmlParts`,this.path))}get group(){return this.#i??=new nt(this.context,u.derived(`${this.path.label}.group`,this.path),this)}get placeholderFormat(){return this.#s??=new ot(this.context,u.derived(`${this.path.label}.placeholderFormat`,this.path),this.path)}get parentGroup(){return this.#h(!1)}#h(e){return this.#a??=this.navigation("parentGroup",t=>new r(this.context,t,e),t=>({op:"getParentGroup",shape:t(this.path),...e?{orNull:e}:{}}),e)}delete(){this.command("delete",e=>({op:"deleteShape",shape:e(this.path)}))}getImageAsBase64(e){let t=this.at("getImageAsBase64"),n=Lt(e,t,!0),{result:o,fill:i}=k.create(t);return this.enqueue("read","getImageAsBase64",s=>({op:"prepareImage",target:s(this.path),...n}),jt(this.internals,n,t,i)),o}getParentSlide(){return this.#u("getParentSlide()","slide",!1,e=>new J(this.context,e))}getParentSlideOrNullObject(){return this.#u("getParentSlideOrNullObject()","slide",!0,e=>new J(this.context,e,!0))}getParentSlideLayout(){return this.#u("getParentSlideLayout()","slideLayout",!1,e=>new G(this.context,e))}getParentSlideLayoutOrNullObject(){return this.#u("getParentSlideLayoutOrNullObject()","slideLayout",!0,e=>new G(this.context,e,!0))}getParentSlideMaster(){return this.#u("getParentSlideMaster()","slideMaster",!1,e=>new ee(this.context,e))}getParentSlideMasterOrNullObject(){return this.#u("getParentSlideMasterOrNullObject()","slideMaster",!0,e=>new ee(this.context,e,!0))}getTable(){return new Be(this.context,u.derived(`${this.path.label}.getTable()`,this.path),this)}getTextFrameOrNullObject(){let e=u.pending(`${this.path.label}.getTextFrameOrNullObject()`),t=new se(this.context,e,e,!0),n=e.label;return this.enqueue("read","getTextFrameOrNullObject()",o=>({op:"readShape",shape:o(this.path)}),o=>{(o.kind==="null"?null:g(o,"shape",n).shape)?.hasTextFrame&&this.path.isAddressable?e.resolveTo(this.path.handle()):e.resolveNull()},e,!1),t}setHyperlink(e){let t=e?.address??"",n=e?.screenTip;return x(t,this.at("address")),n!==void 0&&x(n,this.at("screenTip")),this.command("setHyperlink",o=>({op:"setShapeHyperlink",shape:o(this.path),address:t,...n===void 0?{}:{screenTip:n}})),Y.created(this.context,this.path,null,t,n??"")}setZOrder(e){let t=Oo.toFile(e,`${this.path.label}.setZOrder`);this.command("setZOrder",n=>({op:"setZOrder",shape:n(this.path),position:t}))}#u(e,t,n,o){return this.navigation(e,o,i=>({op:"parentOf",shape:i(this.path),kind:t,...n?{orNull:n}:{}}),n)}#l(e,t){this.command(e,n=>({op:"setShape",shape:n(this.path),props:t}))}onLoad(e){let t=this.selection(e,Kr,{adjustments:()=>this.adjustments,fill:()=>this.fill,lineFormat:()=>this.lineFormat,textFrame:()=>this.textFrame,tags:()=>this.tags,customXmlParts:()=>this.customXmlParts,placeholderFormat:()=>this.placeholderFormat,group:()=>this.group,parentGroup:()=>this.#h(this.loadingOrNull)});this.loadScalars(t,"shape",n=>({op:"readShape",shape:n(this.path)}),n=>({...n.shape,type:dn(n.shape.type),creationId:null}))}};function Qr(r,e){return g(r,"handles",e).handles}var Ht=class extends oe{getItem(e){return this.find({id:this.keyArg(e,"getItem")},"getItem()",!1)}getItemAt(e){let t=this.indexArg(e);return this.find({index:t},`getItemAt(${t})`,!1)}getItemOrNullObject(e){return this.find({id:this.keyArg(e,"getItemOrNullObject")},"getItemOrNullObject()",!0)}listing(e){return this.source.kind==="container"?{op:"listShapes",container:e(this.source.container)}:{op:"readSelection"}}handlesOf(e,t){return this.source.kind==="container"?Qr(e,t):g(e,"selection",t).selection.shapes}get hasLookup(){return this.source.kind==="container"}itemOf(e,t){return new E(this.context,e,t)}lookup(e,t,n){if(this.source.kind==="container")return{op:"getShape",container:e(this.source.container),key:t,...n?{orNull:!0}:{}}}groupOf(e,t){let n=u.pending(`${this.path.label}.${t}`),o=new E(this.context,n),i=n.label;return this.enqueue("write",t,s=>({op:"group",shapes:e.flatMap(a=>a()).map(a=>s(a))}),s=>n.resolveTo(g(s,"handle",i).handle),n),o}},ie=class extends Ht{source;constructor(e,t,n){super(e,t),this.source={kind:"container",container:n}}addGeometricShape(e,t){let n=To(e,`${this.path.label}.addGeometricShape`),o=Ut(t,`${this.path.label}.addGeometricShape`);return this.#e("addGeometricShape",{kind:"geometric",geometry:n},o)}addLine(e="Straight",t){let n=Po.toFile(e,`${this.path.label}.addLine`),o=Ut(t,`${this.path.label}.addLine`);return this.#e("addLine",{kind:"line",connector:n},o)}addTextBox(e,t){let n=Ut(t,`${this.path.label}.addTextBox`);return this.#e("addTextBox",{kind:"textBox",text:x(e,this.at("text"))},n)}addTable(e,t,n){let o=`${this.path.label}.addTable`;for(let w of[e,t])(typeof w!="number"||!Number.isInteger(w)||w<1)&&c(o,"a whole number of rows and of columns of 1 or more");let i=Zo(n,e,t,o),{left:s,top:a,width:l,height:h}=n??{},p=Ut({left:s,top:a,width:l,height:h},o),C=i.values,b=this.#e("addTable",{kind:"table",rows:e,columns:t,...C?{values:C}:{}},p);return i.apply(b.getTable()),b}addGroup(e){Array.isArray(e)||c(`${this.path.label}.addGroup`,"an array of shapes or shape ids"),e.length<2&&A({code:"InvalidArgument",target:`${this.path.label}.addGroup`,diagnostic:I("group-count")});let t=e.map(n=>typeof n=="string"?this.getItem(n):n);return t.some(n=>!(n instanceof M))&&c(`${this.path.label}.addGroup`,"an array of shapes or shape ids"),this.groupOf([()=>t.map(n=>U(n))],"addGroup")}#e(e,t,n){let o=u.pending(`${this.path.label}.${e}()`),i=new E(this.context,o),s=o.label,a=this.source.kind==="container"?this.source.container:this.path;return this.enqueue("write",e,l=>({op:"addShape",container:l(a),shape:t,box:n}),l=>o.resolveTo(g(l,"handle",s).handle),o),i}},be=class extends Ht{source;constructor(e,t,n){super(e,t),this.source=n}group(){if(this.hasLoadedProperty("items")){let n=this.items;return this.groupOf([()=>n.map(o=>U(o))],"group()")}let e=u.pending(`${this.path.label}.items`),t;return this.enqueue("read","items",n=>this.listing(n),n=>{t=this.handlesOf(n,e.label).map((o,i)=>this.itemOf(this.memberPath(o,i),!1))},e,!1),this.groupOf([()=>t?t.map(n=>U(n)):[e]],"group()")}},nt=class extends f{#e;#t;constructor(e,t,n){super(e,t),this.#e=n}get id(){return this.loadedProperty("id")}get creationId(){return this.loadedProperty("creationId")}get shape(){return this.#e}get shapes(){return this.#t??=new be(this.context,u.derived(`${this.path.label}.shapes`,this.path),{kind:"container",container:this.path})}ungroup(){this.enqueue("write","ungroup",e=>({op:"ungroup",group:e(this.path)}))}onLoad(e){let t=this.selection(e,["id","creationId"],{shapes:()=>this.shapes});this.loadScalars(t,"shape",n=>({op:"readShape",shape:n(this.path),group:!0}),n=>({id:n.shape.id,creationId:null}))}},ot=class extends f{#e;constructor(e,t,n){super(e,t),this.#e=n}get type(){return this.loadedProperty("type")}get containedType(){return this.loadedProperty("containedType")}onLoad(e){let t=this.selection(e,["type","containedType"]);this.loadScalars(t,"shape",n=>({op:"readShape",shape:n(this.#e)}),n=>({type:Ao.fromFile(n.shape.placeholder?.type)??"Unsupported",containedType:n.shape.placeholder?.containedType?dn(n.shape.placeholder.containedType):null}))}};var Go=new WeakMap,Y=class r extends f{#e;#t;#n=new Map;#o=[];constructor(e,t,n,o,i){super(e,t),this.#e=n,this.#t=o,i&&(this.setLoadedProperty("address",i.address),this.setLoadedProperty("screenTip",i.screenTip),this.setLoadedProperty("type",o===null?"Shape":"TextRange")),Go.set(this,s=>{this.#t=wn(s),this.setLoadedProperty("address",this.#n.get("address")??s.address??""),this.setLoadedProperty("screenTip",this.#n.get("screenTip")??s.screenTip??""),this.setLoadedProperty("type",s.type==="shape"?"Shape":"TextRange");for(let a of this.#o.splice(0))a(s)})}static created(e,t,n,o,i){return new r(e,u.derived(`${t.label}.hyperlink`,t),t,n,{address:o,screenTip:i})}get address(){return this.loadedProperty("address")}set address(e){this.#a("address",x(e,this.at("address")))}get screenTip(){return this.loadedProperty("screenTip")}set screenTip(e){this.#a("screenTip",x(e,this.at("screenTip")))}get type(){return this.loadedProperty("type")}delete(){this.command("delete",e=>this.#s(e,null,void 0))}getLinkedShapeOrNullObject(){let e=`${this.path.label}.getLinkedShapeOrNullObject()`;if(this.#t===void 0){let t=this.#e.sibling(e);return this.#o.push(n=>n.type==="shape"?t.resolveTo(n.shape):t.resolveNull()),new E(this.context,t,!0)}if(this.#i()!==null){let t=u.pending(e);return t.resolveNull(),new E(this.context,t,!0)}return new E(this.context,u.derived(e,this.#e),!0)}getLinkedTextRangeOrNullObject(){let e=`${this.path.label}.getLinkedTextRangeOrNullObject()`;if(this.#t===void 0){let{range:t,settle:n}=H.later(this.context,this.#e.sibling(e));return this.#o.push(o=>{let i=wn(o);n(i?{shape:o.shape,span:i}:null)}),t}if(this.#i()===null){let t=u.pending(e);return t.resolveNull(),new H(this.context,t,t,void 0,!0)}return new H(this.context,u.derived(e,this.#e),this.#e,this.#i()??void 0,!0)}#r(e){return this.#n.get(e)??(this.hasLoadedProperty(e)?this.loadedProperty(e):"")}#i(){return typeof this.#t=="function"?this.#t():this.#t}#s(e,t,n){let o=e(this.#e),i=n?{screenTip:n}:{},s=this.#i();return s===null?{op:"setShapeHyperlink",shape:o,address:t,...i}:{op:"setHyperlink",shape:o,...s?{span:s}:{},address:t,...i}}#a(e,t){this.#n.set(e,t),this.setLoadedProperty(e,t),this.command(e,n=>this.#s(n,this.#r("address"),this.#r("screenTip")))}onLoad(e){this.selection(e,["address","screenTip","type"])}},zt=class extends f{get items(){return this.loadedProperty("items")}getCount(){let e=`${this.path.label}.getCount`,{result:t,fill:n}=k.create(e);return this.enqueue("read","getCount",o=>this.listing(o),o=>n(g(o,"hyperlinks",e).hyperlinks.length)),t}getItemAt(e){(typeof e!="number"||!Number.isInteger(e)||e<0)&&c(`${this.path.label}.getItemAt`,"a whole number of 0 or more");let t=u.pending(`${this.path.label}.getItemAt(${e})`),n=new Y(this.context,t,t,void 0),o=t.label;return this.enqueue("read",`getItemAt(${e})`,i=>this.listing(i),i=>{let s=g(i,"hyperlinks",o).hyperlinks[e];s||A({code:"ItemNotFound",target:o}),Go.get(n)?.(s),t.resolveTo(s.shape)},t,!1),n}get loadsItemPaths(){return!0}onLoad(e){for(let n of[...e.select,...e.itemSelect])["items","address","screenTip","type"].includes(n)||c(`${this.path.label}.${n}`,"a property of hyperlinks: items, address, screenTip, or type",S(n,["items","address","screenTip","type"]));let t=`${this.path.label}.items`;this.enqueue("read","items",n=>this.listing(n),n=>{let o=g(n,"hyperlinks",t).hyperlinks;this.setLoadedProperty("items",o.map((i,s)=>{let a=u.of(`${t}[${s}]`,i.shape);return new Y(this.context,a,a,wn(i),{address:i.address??"",screenTip:i.screenTip??""})}))})}},De=class extends zt{#e;constructor(e,t,n){super(e,t),this.#e=n}add(e,t){if(e instanceof H||e instanceof E)return e.setHyperlink(t);c(`${this.path.label}.add`,"a TextRange or a Shape")}listing(e){return{op:"listHyperlinks",slide:e(this.#e)}}},Ee=class extends zt{#e;#t;constructor(e,t,n,o){super(e,t),this.#e=n,this.#t=o}listing(e){let t=e(this.#e),n=this.#t();return{op:"listTextHyperlinks",shape:t,...n?{span:n}:{}}}};function wn(r){return!r||r.type==="shape"||r.start===null||r.length===null?null:{start:r.start,length:r.length}}var Yr=["autoSizeSetting","bottomMargin","leftMargin","rightMargin","topMargin","verticalAlignment","wordWrap","hasText"],se=class extends f{#e;#t;constructor(e,t,n,o=!1){super(e,t,{nullable:o}),this.#e=n}get autoSizeSetting(){return this.loadedProperty("autoSizeSetting")}set autoSizeSetting(e){let t=rn.toFile(e,"autoSizeSetting");this.#n("autoSizeSetting",{autoSize:t})}get bottomMargin(){return this.loadedProperty("bottomMargin")}set bottomMargin(e){this.#n("bottomMargin",{bottomMargin:R(e,this.at("bottomMargin"))})}get leftMargin(){return this.loadedProperty("leftMargin")}set leftMargin(e){this.#n("leftMargin",{leftMargin:R(e,this.at("leftMargin"))})}get rightMargin(){return this.loadedProperty("rightMargin")}set rightMargin(e){this.#n("rightMargin",{rightMargin:R(e,this.at("rightMargin"))})}get topMargin(){return this.loadedProperty("topMargin")}set topMargin(e){this.#n("topMargin",{topMargin:R(e,this.at("topMargin"))})}get verticalAlignment(){return this.loadedProperty("verticalAlignment")}set verticalAlignment(e){this.#n("verticalAlignment",{verticalAlignment:de.toFile(e,"verticalAlignment")})}get wordWrap(){return this.loadedProperty("wordWrap")}set wordWrap(e){this.#n("wordWrap",{wordWrap:$(e,this.at("wordWrap"))})}get hasText(){return this.loadedProperty("hasText")}get textRange(){return this.#t??=new H(this.context,u.derived(`${this.path.label}.textRange`,this.path),this.#e,void 0)}deleteText(){let e=this.#e;this.command("deleteText",t=>({op:"setText",shape:t(e),text:""}))}getParentShape(){return new E(this.context,this.#e)}#n(e,t){let n=this.#e;this.command(e,o=>({op:"setTextFrame",shape:o(n),props:t}))}onLoad(e){let t=this.selection(e,Yr,{textRange:()=>this.textRange}),n=this.#e;this.loadScalars(t,"textFrame",o=>({op:"readTextFrame",shape:o(n)}),o=>({...o.textFrame,autoSizeSetting:rn.fromFile(o.textFrame.autoSize)??"AutoSizeMixed",verticalAlignment:de.fromFile(o.textFrame.verticalAlignment)??"Top"}))}},H=class r extends f{#e;#t;#n;#o;#r;constructor(e,t,n,o,i=!1){super(e,t,{nullable:i}),this.#e=n,this.#t=o}static selected(e,t,n){let o=u.pending(`presentation.${t}`),i=new r(e.context,o,o,void 0,n);return i.enqueue("read","",()=>({op:"readSelection"}),s=>{let a=g(s,"selection",o.label).selection.text;if(!a){if(n)return o.resolveNull();A({code:"ItemNotFound",target:o.label})}i.#t={start:a.start,length:a.length},o.resolveTo(a.shape)},o,!1),i}static later(e,t){let n=new r(e,t,t,void 0,!0);return{range:n,settle(o){if(!o)return t.resolveNull();n.#t=o.span,t.resolveTo(o.shape)}}}get text(){return this.loadedProperty("text")}set text(e){let t=x(e,this.at("text"));this.command("text",n=>({op:"setText",shape:n(this.#e),...this.#s(),text:t}))}get start(){return this.loadedProperty("start")}set start(e){let t=this.#a(e,"start"),n=this.#t?.length??this.#d();this.#t={start:t,length:n},this.setLoadedProperty("start",t)}get length(){return this.loadedProperty("length")}set length(e){let t=this.#a(e,"length");this.#t={start:this.#t?.start??0,length:t},this.setLoadedProperty("length",t)}get font(){return this.#n??=new pe(this.context,u.derived(`${this.path.label}.font`,this.path),this.#e,()=>this.#t)}get paragraphFormat(){return this.#o??=new me(this.context,u.derived(`${this.path.label}.paragraphFormat`,this.path),this.#e,()=>this.#t)}get hyperlinks(){return this.#r??=new Ee(this.context,u.derived(`${this.path.label}.hyperlinks`,this.path),this.#e,()=>this.#t)}getParentTextFrame(){return new se(this.context,u.derived(`${this.path.label}.getParentTextFrame()`,this.#e),this.#e)}getSubstring(e,t){let n=this.#a(e,"start"),o=t===void 0?void 0:this.#a(t,"length"),i=this.#t;if(i&&o!==void 0)return n+o>i.length&&c(`${this.path.label}.getSubstring`,"a start and a length inside the text range"),this.#i({start:i.start+n,length:o});if(i)return n>i.length&&c(`${this.path.label}.getSubstring`,"a start inside the text range"),this.#i({start:i.start+n,length:i.length-n});if(o!==void 0)return this.#i({start:n,length:o});let s=u.pending(`${this.path.label}.getSubstring()`),a=new r(this.context,s,s,void 0),l=this.#e;return this.enqueue("read","getSubstring()",h=>({op:"readText",shape:h(l)}),h=>{let p=g(h,"text",s.label).text;n>p.length&&c(s.label,"a start inside the text"),a.#t={start:n,length:p.length-n},s.resolveTo(l.handle())},s,!1),a}setSelected(){this.command("setSelected",e=>({op:"selectText",shape:e(this.#e),...this.#s()}))}setHyperlink(e){let t=x(e?.address??"",this.at("address")),n=e?.screenTip;return n!==void 0&&x(n,this.at("screenTip")),this.command("setHyperlink",o=>({op:"setHyperlink",shape:o(this.#e),...this.#s(),address:t,...n===void 0?{}:{screenTip:n}})),Y.created(this.context,this.#e,()=>this.#t,t,n??"")}#i(e){return new r(this.context,u.derived(`${this.path.label}.getSubstring()`,this.#e),this.#e,e)}#s(){return this.#t?{span:this.#t}:{}}#a(e,t){return(typeof e!="number"||!Number.isInteger(e)||e<0)&&c(`${this.path.label}.${t}`,"a whole number of 0 or more"),e}#d(){return this.hasLoadedProperty("length")||A({code:"PropertyNotLoaded",target:`${this.path.label}.length`}),this.loadedProperty("length")}onLoad(e){let t=this.selection(e,["text","start","length"],{font:()=>this.font,paragraphFormat:()=>this.paragraphFormat,hyperlinks:()=>this.hyperlinks});this.loadScalars(t,"text",n=>({op:"readText",shape:n(this.#e),...this.#s()}),n=>({text:n.text,start:this.#t?.start??0,length:this.#t?.length??n.text.length}))}},Zr=["allCaps","bold","color","doubleStrikethrough","italic","name","size","smallCaps","strikethrough","subscript","superscript","underline"],pe=class extends f{#e;#t;#n;constructor(e,t,n,o,i){super(e,t),this.#e=n,this.#t=o,this.#n=i?{cell:i}:{}}get allCaps(){return this.loadedProperty("allCaps")}set allCaps(e){this.#o("allCaps",{allCaps:$(e,this.at("allCaps"))})}get bold(){return this.loadedProperty("bold")}set bold(e){this.#o("bold",{bold:$(e,this.at("bold"))})}get color(){return this.loadedProperty("color")}set color(e){this.#o("color",{color:x(e,this.at("color"))})}get doubleStrikethrough(){return this.loadedProperty("doubleStrikethrough")}set doubleStrikethrough(e){this.#o("doubleStrikethrough",{doubleStrikethrough:$(e,this.at("doubleStrikethrough"))})}get italic(){return this.loadedProperty("italic")}set italic(e){this.#o("italic",{italic:$(e,this.at("italic"))})}get name(){return this.loadedProperty("name")}set name(e){this.#o("name",{name:x(e,this.at("name"))})}get size(){return this.loadedProperty("size")}set size(e){this.#o("size",{size:R(e,this.at("size"))})}get smallCaps(){return this.loadedProperty("smallCaps")}set smallCaps(e){this.#o("smallCaps",{smallCaps:$(e,this.at("smallCaps"))})}get strikethrough(){return this.loadedProperty("strikethrough")}set strikethrough(e){this.#o("strikethrough",{strikethrough:$(e,this.at("strikethrough"))})}get subscript(){return this.loadedProperty("subscript")}set subscript(e){this.#o("subscript",{subscript:$(e,this.at("subscript"))})}get superscript(){return this.loadedProperty("superscript")}set superscript(e){this.#o("superscript",{superscript:$(e,this.at("superscript"))})}get underline(){return this.loadedProperty("underline")}set underline(e){this.#o("underline",{underline:ce.toFile(e,"underline")})}#o(e,t){let n=this.#e;this.command(e,o=>{let i=this.#t();return{op:"setFont",shape:o(n),...i?{span:i}:{},...this.#n,font:t}})}onLoad(e){let t=this.selection(e,Zr),n=this.#e;this.loadScalars(t,"font",o=>{let i=this.#t();return{op:"readFont",shape:o(n),...i?{span:i}:{},...this.#n}},o=>({...o.font,underline:ce.fromFile(o.font.underline)}))}},me=class extends f{#e;#t;#n;#o;constructor(e,t,n,o,i){super(e,t),this.#e=n,this.#t=o,this.#n=i?{cell:i}:{}}get horizontalAlignment(){return this.loadedProperty("horizontalAlignment")}set horizontalAlignment(e){this.#i("horizontalAlignment",{alignment:Ce.toFile(e,"horizontalAlignment")})}get indentLevel(){return this.loadedProperty("indentLevel")}set indentLevel(e){this.#i("indentLevel",{indentLevel:R(e,this.at("indentLevel"))})}get bulletFormat(){return this.#o??=new rt(this.context,u.derived(`${this.path.label}.bulletFormat`,this.path),(e,t)=>this.#i(e,t),()=>this.#r())}#r(){let e=this.#e;return t=>{let n=this.#t();return{op:"readParagraph",shape:t(e),...n?{span:n}:{},...this.#n}}}#i(e,t){let n=this.#e;this.command(e,o=>{let i=this.#t();return{op:"setParagraph",shape:o(n),...i?{span:i}:{},...this.#n,paragraph:t}})}onLoad(e){let t=this.selection(e,["horizontalAlignment","indentLevel"],{bulletFormat:()=>this.bulletFormat});this.loadScalars(t,"paragraph",this.#r(),n=>({horizontalAlignment:Ce.fromFile(n.paragraph.alignment),indentLevel:n.paragraph.indentLevel}))}},rt=class extends f{#e;#t;constructor(e,t,n,o){super(e,t),this.#e=n,this.#t=o}get style(){return this.loadedProperty("style")}set style(e){this.#e("style",{bulletStyle:an.toFile(e,"style")})}get type(){return this.loadedProperty("type")}set type(e){let t=ln.toFile(e,"type");this.#e("type",{bulletType:t})}get visible(){return this.loadedProperty("visible")}set visible(e){this.#e("visible",{bulletVisible:$(e,this.at("visible"))})}onLoad(e){let t=this.selection(e,["style","type","visible"]);this.loadScalars(t,"paragraph",this.#t(),n=>({style:n.paragraph.bulletStyle===null?null:an.fromFile(n.paragraph.bulletStyle),type:n.paragraph.bulletType===null?null:ln.fromFile(n.paragraph.bulletType),visible:n.paragraph.bulletVisible}))}};function qt(r,e){return(typeof r!="string"||r.length===0||r.length>255)&&c(e,"a string of 1 to 255 characters"),r}function er(r,e){r!=="Shape"&&c(e,"'Shape'")}var tr=new WeakMap,ae=class extends f{#e;constructor(e,t,n,o=!1){super(e,t,{nullable:o}),this.#e=n;let i=s=>{this.#e=s,this.setLoadedProperty("id",s),this.setLoadedProperty("type","Shape")};n&&i(n),tr.set(this,i)}get id(){return this.loadedProperty("id")}get type(){return this.loadedProperty("type")}delete(){this.command("delete",e=>({op:"deleteBinding",owner:e(this.path),id:this.#e}))}getShape(){return this.navigation("getShape()",e=>new E(this.context,e),e=>({op:"getBindingShape",owner:e(this.path),id:this.#e}))}onLoad(e){this.selection(e,["id","type"])}},Fe=class extends f{constructor(e,t){super(e,t)}get items(){return this.loadedProperty("items")}add(e,t,n){let o=`${this.path.label}.add`;e instanceof E||c(o,"a Shape"),er(t,o);let i=qt(n,o),s=U(e);return this.command("add",a=>({op:"addBinding",owner:a(this.path),shape:a(s),id:i})),new ae(this.context,u.derived(`${o}()`,this.path),i)}addFromSelection(e,t){let n=`${this.path.label}.addFromSelection`;er(e,n);let o=qt(t,n);return this.command("addFromSelection",i=>({op:"addBindingFromSelection",owner:i(this.path),id:o})),new ae(this.context,u.derived(`${n}()`,this.path),o)}getCount(){let e=`${this.path.label}.getCount`,{result:t,fill:n}=k.create(e);return this.enqueue("read","getCount",o=>({op:"listBindings",owner:o(this.path)}),o=>n(g(o,"bindings",e).bindings.length)),t}getItem(e){let t=qt(e,`${this.path.label}.getItem`);return this.#e("getItem()",n=>n.find(o=>o.id===t),t,!1)}getItemAt(e){return(typeof e!="number"||!Number.isInteger(e)||e<0)&&c(`${this.path.label}.getItemAt`,"a whole number of 0 or more"),this.#e(`getItemAt(${e})`,t=>t[e],void 0,!1)}getItemOrNullObject(e){let t=qt(e,`${this.path.label}.getItemOrNullObject`);return this.#e("getItemOrNullObject()",n=>n.find(o=>o.id===t),t,!0)}#e(e,t,n,o){let i=u.pending(`${this.path.label}.${e}`),s=new ae(this.context,i,n??"",o),a=i.label;return this.enqueue("read",e,l=>({op:"listBindings",owner:l(this.path)}),l=>{let h=t(g(l,"bindings",a).bindings);if(!h){if(o)return i.resolveNull();A({code:"ItemNotFound",target:a})}tr.get(s)?.(h.id),i.resolveTo(this.path.handle())},i,!1),s}get loadsItemPaths(){return!0}onLoad(e){for(let n of[...e.select,...e.itemSelect])["items","id","type"].includes(n)||c(`${this.path.label}.${n}`,"a property of bindings: items, id, or type",S(n,["items","id","type"]));let t=`${this.path.label}.items`;this.enqueue("read","items",n=>({op:"listBindings",owner:n(this.path)}),n=>{let o=g(n,"bindings",t).bindings,i=e.top===void 0?o.length:(e.skip??0)+e.top;this.setLoadedProperty("items",o.slice(e.skip??0,i).map((s,a)=>new ae(this.context,u.of(`${t}[${a}]`,this.path.handle()),s.id)))})}};var nr=new WeakMap;function Pn(r,e){nr.get(r)?.(e)}function Jr(r){return r.type==="Date"?new Date(r.value):r.value}function or(r,e){return typeof r=="string"?{type:"String",value:r}:typeof r=="number"&&Number.isFinite(r)?{type:"Number",value:r}:typeof r=="boolean"?{type:"Boolean",value:r}:r instanceof Date&&Number.isFinite(r.getTime())?{type:"Date",value:r.toISOString()}:c(e,"a string, a finite number, a boolean, or a valid Date")}function Cn(r,e){return(typeof r!="string"||r.length===0||r.length>255)&&c(e,"a key of 1 to 255 characters"),r}var On=(r,e)=>r.toLowerCase()===e.toLowerCase(),ye=class extends f{#e;#t;constructor(e,t,n,o,i=!1){super(e,t,{nullable:i}),this.#e=n,this.#t=o,o&&this.setLoadedProperty("key",o),nr.set(this,s=>{this.#t=s.key,this.setLoadedProperty("key",s.key),this.setLoadedProperty("type",s.type),this.setLoadedProperty("value",Jr(s))})}get key(){return this.loadedProperty("key")}get type(){return this.loadedProperty("type")}get value(){return this.loadedProperty("value")}set value(e){let t=or(e,this.at("value"));this.command("value",n=>({op:"setCustomProperty",owner:n(this.path),key:this.#t,value:t}))}delete(){this.command("delete",e=>({op:"deleteCustomProperty",owner:e(this.path),key:this.#t}))}onLoad(e){let t=this.selection(e,["key","type","value"]);if(!t.includes("type")&&!t.includes("value"))return;let n=`${this.path.label}.load`;this.enqueue("read","load",o=>({op:"readCustomProperties",owner:o(this.#e)}),o=>{if(o.kind==="null")return;let i=g(o,"customProperties",n).properties.find(s=>On(s.key,this.#t));i&&Pn(this,i)})}},Me=class extends f{constructor(e,t){super(e,t)}get items(){return this.loadedProperty("items")}add(e,t){let n=Cn(e,`${this.path.label}.add`),o=or(t,`${this.path.label}.add`);return this.command("add",s=>({op:"setCustomProperty",owner:s(this.path),key:n,value:o})),new ye(this.context,u.derived(`${this.path.label}.add()`,this.path),this.path,n)}deleteAll(){this.command("deleteAll",e=>({op:"deleteCustomProperties",owner:e(this.path)}))}getCount(){let e=`${this.path.label}.getCount`,{result:t,fill:n}=k.create(e);return this.enqueue("read","getCount",o=>({op:"readCustomProperties",owner:o(this.path)}),o=>n(g(o,"customProperties",e).properties.length)),t}getItem(e){let t=Cn(e,`${this.path.label}.getItem`);return this.#e("getItem()",n=>n.find(o=>On(o.key,t)),t,!1)}getItemAt(e){return(typeof e!="number"||!Number.isInteger(e)||e<0)&&c(`${this.path.label}.getItemAt`,"a whole number of 0 or more"),this.#e(`getItemAt(${e})`,t=>t[e],void 0,!1)}getItemOrNullObject(e){let t=Cn(e,`${this.path.label}.getItemOrNullObject`);return this.#e("getItemOrNullObject()",n=>n.find(o=>On(o.key,t)),t,!0)}#e(e,t,n,o){let i=u.pending(`${this.path.label}.${e}`),s=new ye(this.context,i,this.path,n??"",o),a=i.label;return this.enqueue("read",e,l=>({op:"readCustomProperties",owner:l(this.path)}),l=>{let h=t(g(l,"customProperties",a).properties);if(!h){if(o)return i.resolveNull();A({code:"ItemNotFound",target:a})}Pn(s,h),i.resolveTo(this.path.handle())},i,!1),s}get loadsItemPaths(){return!0}onLoad(e){for(let n of[...e.select,...e.itemSelect])["items","key","type","value"].includes(n)||c(`${this.path.label}.${n}`,"a property of custom properties: items, key, type, or value",S(n,["items","key","type","value"]));let t=`${this.path.label}.items`;this.enqueue("read","items",n=>({op:"readCustomProperties",owner:n(this.path)}),n=>{let o=g(n,"customProperties",t).properties,i=e.top===void 0?o.length:(e.skip??0)+e.top;this.setLoadedProperty("items",o.slice(e.skip??0,i).map((s,a)=>{let l=u.of(`${t}[${a}]`,this.path.handle()),h=new ye(this.context,l,this.path,s.key);return Pn(h,s),h}))})}};var Ue=class r extends f{#e;#t;#n;#o;#r;#i;#s;constructor(e,t){super(e,t)}static open(e){let t=u.pending("presentation"),n=new r(e,t);return n.enqueue("read","",()=>({op:"getPresentation"}),o=>t.resolveTo(g(o,"handle","presentation").handle),t),n}get id(){return this.loadedProperty("id")}get title(){return this.loadedProperty("title")}get slides(){return this.#e??=new Te(this.context,u.derived("presentation.slides",this.path))}get slideMasters(){return this.#t??=new je(this.context,u.derived("presentation.slideMasters",this.path))}get tags(){return this.#n??=new V(this.context,u.derived("presentation.tags",this.path))}get customXmlParts(){return this.#o??=new q(this.context,u.derived("presentation.customXmlParts",this.path))}get bindings(){return this.#s??=new Fe(this.context,u.derived("presentation.bindings",this.path))}get properties(){return this.#r??=new it(this.context,u.derived("presentation.properties",this.path))}get pageSetup(){return this.#i??=new st(this.context,u.derived("presentation.pageSetup",this.path))}getSelectedSlides(){return new Le(this.context,u.derived("presentation.getSelectedSlides()",this.path),"selection")}getSelectedShapes(){return new be(this.context,u.derived("presentation.getSelectedShapes()",this.path),{kind:"selection"})}getSelectedTextRange(){return H.selected(this,"getSelectedTextRange()",!1)}getSelectedTextRangeOrNullObject(){return H.selected(this,"getSelectedTextRangeOrNullObject()",!0)}setSelectedSlides(e){Array.isArray(e)||c("setSelectedSlides","an array of slide ids");let t=e.map(n=>this.slides.getItem(x(n,this.at("setSelectedSlides"))));this.command("setSelectedSlides",n=>({op:"selectSlides",slides:t.map(o=>n(U(o)))}))}insertSlidesFromBase64(e,t){let n=this.at("insertSlidesFromBase64"),o=x(e,n);o.length===0&&c(n,"the Base64 bytes of a PPTX file");let i=Gr(t,n);this.command("insertSlidesFromBase64",()=>({op:"insertSlides",base64:o,...i?{options:i}:{}}))}onLoad(e){let t=this.selection(e,["id","title"],{slides:()=>this.slides,slideMasters:()=>this.slideMasters,tags:()=>this.tags,bindings:()=>this.bindings,customXmlParts:()=>this.customXmlParts,properties:()=>this.properties,pageSetup:()=>this.pageSetup});this.loadScalars(t,"presentation",()=>({op:"readPresentation"}),n=>({id:n.presentation.id,title:n.presentation.title}))}};function Gr(r,e){if(r===void 0)return;(typeof r!="object"||r===null)&&c(e,"an InsertSlideOptions object");let{formatting:t,sourceSlideIds:n,targetSlideId:o}=r;return t!==void 0&&t!=="KeepSourceFormatting"&&t!=="UseDestinationTheme"&&c(`${e}.formatting`,z(Object.values(ct)),S(t,Object.values(ct))),n!==void 0&&(!Array.isArray(n)||n.some(i=>typeof i!="string"))&&c(`${e}.sourceSlideIds`,"an array of slide id strings"),o!==void 0&&typeof o!="string"&&c(`${e}.targetSlideId`,"a slide id string"),{...t===void 0?{}:{formatting:t==="UseDestinationTheme"?"useDestinationTheme":"keepSource"},...n===void 0?{}:{sourceSlideIds:[...n]},...o===void 0?{}:{targetSlideId:o}}}var ei=["author","category","comments","company","creationDate","keywords","lastAuthor","manager","revisionNumber","subject","title"],it=class extends f{#e;constructor(e,t){super(e,t)}get customProperties(){return this.#e??=new Me(this.context,u.derived("presentation.properties.customProperties",this.path))}get author(){return this.loadedProperty("author")}set author(e){this.#t("author",x(e,this.at("author")))}get category(){return this.loadedProperty("category")}set category(e){this.#t("category",x(e,this.at("category")))}get comments(){return this.loadedProperty("comments")}set comments(e){this.#t("comments",x(e,this.at("comments")))}get company(){return this.loadedProperty("company")}set company(e){this.#t("company",x(e,this.at("company")))}get creationDate(){return this.loadedProperty("creationDate")}get keywords(){return this.loadedProperty("keywords")}set keywords(e){this.#t("keywords",x(e,this.at("keywords")))}get lastAuthor(){return this.loadedProperty("lastAuthor")}get manager(){return this.loadedProperty("manager")}set manager(e){this.#t("manager",x(e,this.at("manager")))}get revisionNumber(){return this.loadedProperty("revisionNumber")}set revisionNumber(e){this.#t("revisionNumber",R(e,this.at("revisionNumber")))}get subject(){return this.loadedProperty("subject")}set subject(e){this.#t("subject",x(e,this.at("subject")))}get title(){return this.loadedProperty("title")}set title(e){this.#t("title",x(e,this.at("title")))}#t(e,t){this.command(e,()=>({op:"setProperties",properties:{[e]:t}}))}onLoad(e){let t=this.selection(e,ei,{customProperties:()=>this.customProperties});this.loadScalars(t,"properties",()=>({op:"getProperties"}),n=>({...n.properties,creationDate:new Date(n.properties.creationDate??Number.NaN)}))}},st=class extends f{constructor(e,t){super(e,t)}get slideHeight(){return this.loadedProperty("slideHeight")}set slideHeight(e){let t=R(e,this.at("slideHeight"));this.command("slideHeight",()=>({op:"setPageSetup",slideHeight:t}))}get slideWidth(){return this.loadedProperty("slideWidth")}set slideWidth(e){let t=R(e,this.at("slideWidth"));this.command("slideWidth",()=>({op:"setPageSetup",slideWidth:t}))}onLoad(e){let t=this.selection(e,["slideHeight","slideWidth"]);this.loadScalars(t,"presentation",()=>({op:"readPresentation"}),n=>({slideHeight:n.presentation.slideHeight,slideWidth:n.presentation.slideWidth}))}};function rr(r,e){if(Array.isArray(r)){for(let t of r)e(t);return}e(r)}var pt=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}add(e){this.#e.assertUsable(),rr(e,t=>{this.#n(t),this.#e.track(t)})}remove(e){this.#e.assertUsable(),rr(e,t=>{this.#n(t),this.#e.untrack(t)})}#n(e){this.#t(e)||A({code:"InvalidObjectPath"})}};var Wt=class{#e=[];#t=null;#n=[];get size(){return this.#e.length}labels(){return this.#e.map(e=>e.label)}push(e){(this.#t??this.#e).push(e)}continuing(e){let t=this.#t,n=[];this.#t=n;try{e()}finally{this.#t=t}for(let o of n)this.#n.push(o)}checkpoint(){let e=this.#t??this.#e,t=e.length;return()=>{e.length=Math.min(e.length,t)}}takeContinuations(){let e=this.#n;return this.#n=[],e}take(){let e=this.#e;return this.#e=[],e}clear(){this.#e=[],this.#n=[]}};function ti(){let r;try{r=import.meta.env?.DEV}catch{r=void 0}return typeof r=="boolean"?r:typeof process<"u"&&process.env.NODE_ENV!=="production"}var ir=new Set;function ni(r){!ti()||ir.has(r)||(ir.add(r),console.warn(`[pptx-editor] ${r}`))}function sr(r,e=[]){let t=e.map(n=>{let o=n,i=o.debugInfo?.errorLocation?` at ${o.debugInfo.errorLocation}`:"";return` ${o.code??"Error"}${i}: ${n.message}`});ni(`run() ended with ${r} queued ${r===1?"write":"writes"} that no sync() sent, so ${r===1?"it":"they"} did not apply. Call \`await context.sync()\` before the callback returns.`+(t.length===0?"":` That sync would have refused with ${t.length===1?"this error":"these errors"}:`+t.join(";")))}function ar(r){if(!(r instanceof L))return r;let e=I("read-after-commit");return new L({code:r.code,...r.target===void 0?{}:{target:r.target},...e===void 0?{}:{diagnostic:e}})}function oi(r){if(!(r instanceof L))return r;let e=I("partly-applied"),t=r.debugInfo.innerError,n=t?{code:t.code,hint:`${t.message} ${e?.hint??""}`.trim()}:e;return new L({code:r.code,...r.target===void 0?{}:{target:r.target},...n===void 0?{}:{diagnostic:n}})}var vn=32,ri=0;function ii(r,e,t){let n=t?r.indexOf(t):-1;return e.filter(o=>n<0||o.at<=n).map(o=>o.message)}var mt=class r{#e;#t=new Wt;#n=new Set;#o=new Set;#r;#i;#s;#a;#d=[];#h;#u="";#l=!1;#c=null;#p=0;#f=Promise.resolve();#m=[];constructor(e){this.#e=e,this.#r={host:e.host,capabilities:e.host.capabilities,queue:this.#t,session:e.id,assertUsable:t=>{this.#e.assertLive(t),this.#l&&A({code:"InvalidRequestContext",...t===void 0?{}:{target:t}})},isFinished:()=>this.#l,readRevision:()=>this.#c,register:t=>{this.#n.add(t)},track:t=>{this.#o.add(t)},untrack:t=>{this.#o.delete(t)},isTracked:t=>this.#o.has(t),disown:t=>{this.#n.delete(t),this.#o.delete(t)},defer:t=>{t.catch(()=>{}),this.#m.push(t)}},this.#i=new pt(this.#r,t=>this.#n.has(t))}get presentation(){return this.#r.assertUsable("presentation"),this.#s??=this.#e.openPresentation(this),this.#s}get application(){return this.#r.assertUsable("application"),this.#a??=this.#e.openApplication(this),this.#a}get debugInfo(){this.#r.assertUsable("debugInfo");let e=this.#t.labels(),t=[],n=0;for(let o=0;o<=e.length;o+=1){for(;n<this.#d.length&&this.#d[n].at<=o;)t.push(this.#d[n++].message);o<e.length&&t.push(e[o])}return{pendingStatements:t}}get capabilities(){return this.#e.capabilities}get trackedObjects(){return this.#i}load(e,t){return e.load(t)}loadRecursive(e,t,n){let o="loadRecursive";this.#r.assertUsable(o),e instanceof M||c(o,"an object of this API"),e.context!==this&&A({code:"InvalidObjectPath",target:o}),(typeof t!="object"||t===null||Array.isArray(t))&&c(`${o}.options`,"an object keyed by type name");let i=this.#e.typeNames,s=new Map;for(let[p,C]of Object.entries(t))i.includes(p)||c(`${o}.options.${p}`,"a type name of this API",S(p,i)),St(C,`${o}.options.${p}`),s.set(p,C);n!==void 0&&(typeof n!="number"||!Number.isInteger(n)||n<0||n>vn)&&c(`${o}.maxDepth`,`a whole number from 0 to ${vn}`);let a=n??vn,l=new WeakSet,h=(p,C)=>{if(l.has(p)||p[le].isReleased||p[le].isNull)return;l.add(p);let b=this.#e.typeName(p),w=b===void 0?void 0:s.get(b);w!==void 0&&(p.load(w),!(C>=a)&&this.#t.push({sort:"read",label:`${p[le].label}.loadRecursive`,continues:!0,plan:()=>({op:"getPresentation"}),settle:()=>this.#t.continuing(()=>{for(let P of p[At]())for(let T of Array.isArray(P)?P:[P])T instanceof M&&h(T,C+1)})}))};h(e,0)}trace(e){this.#r.assertUsable("trace"),typeof e!="string"&&c("trace","a string"),this.#d.push({message:e,at:this.#t.size})}sync(e){try{this.#r.assertUsable()}catch(a){return Promise.reject(a)}let t=this.#t.take(),n=this.#d;this.#d=[];let o=()=>this.#A(t,n),i=this.#p===0?o():this.#f.then(o);this.#p+=1;let s=()=>{this.#p-=1};return this.#f=i.then(s,s),i.then(()=>e)}async#x(){for(;this.#p>0;)await this.#f}async#A(e,t){if(e.length!==0){this.#h=void 0,this.#u=`sync-${ri+=1}`;try{await this.#w(e)}catch(n){throw jn(n,ii(e,t,this.#h))}}}async#w(e){let t=jo(e);try{let n=t.find(s=>s.refusal);if(n)throw this.#h=n,n.refusal;let o=t,i=!1;for(;o.length>0;){let s=Do(o),a=s<0?o:o.slice(0,s);try{await this.#C(a)}catch(l){throw i?oi(l):l}i||=a.some(l=>l.sort==="write"),o=s<0?[]:o.slice(s)}}catch(n){for(let o of t)o.sort==="read"?Xn(o):Vn(o);throw n}finally{this.#t.takeContinuations(),this.#m=[]}}async#C(e){let n=e.some(a=>a.sort==="write")&&this.#c!==null?this.#c:void 0,o=e;for(let a=pn(o);a.length>0;a=pn(o)){await this.#g(a,n),n=this.#c??void 0;let l=new Set(a);o=o.filter(h=>!l.has(h)&&!(h.sort==="read"&&h.target?.isNull))}let i=o.findIndex(a=>a.sort==="write"),s=i<0?[]:o.slice(0,i);if(s.some(a=>a.continues)&&(await this.#g(s,n),await this.#b(),n=this.#c??void 0,o=o.slice(i).filter(a=>!(a.sort==="read"&&a.target?.isNull))),o.length>0){await this.#g(o,n);let a=o.some(l=>l.sort==="write");try{await this.#b()}catch(l){throw a?ar(l):l}}}async#b(){for(let e=this.#t.takeContinuations();e.length>0;e=this.#t.takeContinuations())await this.#g(e,this.#c??void 0)}async#g(e,t){let n=Lo(e),o;try{o=this.#e.host.execute({operations:n.operations,...t===void 0?{}:{expectedRevision:t},historyGroup:this.#u})}catch(l){if(!xe(l))try{this.#e.onException?.(l,n.operations)}catch{}throw l}if(!o.ok){let l=$o(o,e,t,h=>{this.#h=h});try{this.#e.onRefusal?.(l,n.operations)}catch{}throw l}this.#c=o.revision,Io(e,o,l=>{this.#h=l}),this.#h=void 0;let i=this.#m;if(this.#m=[],i.length===0)return;let a=(await Promise.allSettled(i)).find(l=>l.status==="rejected");if(a)throw o.changed?ar(a.reason):a.reason}get[Ae](){return this.#r}static begin(e){let t=new r(e);return{context:t,adopt(n){for(let o of n)t.#y(o);for(let o of n)t.#P(o)},idle(){return t.#x()},finish(n=!1){t.#O(n)}}}#y(e){let t=e.context;if(t===this)return;let n=t[Ae];if(n.session!==this.#e.id)throw new L({code:"InvalidObjectPath"});if(!n.isFinished())throw new L({code:"ObjectInUse"});if(!n.isTracked(e))throw new L({code:"InvalidObjectPath"})}#P(e){let t=e.context;if(t===this)return;this.#y(e);let n=t[Ae],o=n.readRevision();n.disown(e),e[yt](this),this.#n.add(e),this.#o.add(e),o!==null&&(this.#c=this.#c===null?o:Math.min(this.#c,o))}#O(e){if(this.#l)return;this.#l=!0;let t=this.#t.take().filter(n=>n.sort==="write");e&&t.length>0&&sr(t.length,t.flatMap(n=>n.refusal?[n.refusal]:[])),this.#t.clear(),this.#d=[];for(let n of this.#n)this.#o.has(n)||n[bt]();this.#n.clear()}};import{createStoreAutomationHost as ai}from"@pptx-editor.dev/core/automation";import{openPresentation as li,renderImageWith as di}from"@pptx-editor.dev/core/editor";var lr=[[Pe,"Adjustments"],[we,"Application"],[ae,"Binding"],[Fe,"BindingCollection"],[Qe,"Border"],[$e,"Borders"],[rt,"BulletFormat"],[ye,"CustomProperty"],[Me,"CustomPropertyCollection"],[ue,"CustomXmlPart"],[q,"CustomXmlPartCollection"],[Ve,"CustomXmlPartScopedCollection"],[it,"DocumentProperties"],[Y,"Hyperlink"],[De,"HyperlinkCollection"],[Ee,"HyperlinkScopedCollection"],[Ie,"Margins"],[st,"PageSetup"],[me,"ParagraphFormat"],[ot,"PlaceholderFormat"],[Ue,"Presentation"],[E,"Shape"],[ie,"ShapeCollection"],[ne,"ShapeFill"],[pe,"ShapeFont"],[nt,"ShapeGroup"],[Oe,"ShapeLineFormat"],[be,"ShapeScopedCollection"],[J,"Slide"],[ve,"SlideBackground"],[_e,"SlideBackgroundFill"],[qe,"SlideBackgroundGradientFill"],[We,"SlideBackgroundPatternFill"],[Xe,"SlideBackgroundPictureOrTextureFill"],[ze,"SlideBackgroundSolidFill"],[Te,"SlideCollection"],[G,"SlideLayout"],[Re,"SlideLayoutBackground"],[Ke,"SlideLayoutCollection"],[ee,"SlideMaster"],[Se,"SlideMasterBackground"],[je,"SlideMasterCollection"],[Le,"SlideScopedCollection"],[Be,"Table"],[K,"TableCell"],[tt,"TableCellCollection"],[Je,"TableColumn"],[et,"TableColumnCollection"],[Ze,"TableRow"],[Ge,"TableRowCollection"],[Ne,"TableStyleSettings"],[ke,"Tag"],[V,"TagCollection"],[se,"TextFrame"],[H,"TextRange"],[re,"ThemeColorScheme"]],si=new Map(lr.map(([r,e])=>[r,e])),dr=Object.freeze(lr.map(([,r])=>r).sort());function cr(r){return si.get(Object.getPrototypeOf(r)?.constructor)}function hr(r){let e=r.host,t=Object.freeze({document:e.capabilities.document,save:r.save&&e.capabilities.save,events:e.capabilities.events,selection:e.capabilities.selection,autofit:e.capabilities.autofit,images:e.capabilities.images===!0&&typeof e.renderImage=="function"}),n=!1,o=l=>{n&&A({code:"RuntimeDisposed",...l===void 0?{}:{target:l}})},i={host:e,capabilities:t,...r.onRefusal?{onRefusal:r.onRefusal}:{},...r.onException?{onException:r.onException}:{},id:{},assertLive:o,openPresentation:l=>Ue.open(l),openApplication:l=>we.open(l),typeName:cr,typeNames:dr};async function s(l,h){o();let p=typeof l=="function"?l:h;typeof p!="function"&&c("run","a callback, alone or after the objects to adopt");let C=typeof l=="function"?[]:Array.isArray(l)?l:l instanceof M?[l]:c("run","an object of this API or an array of them, then a callback");C.every(j=>j instanceof M)||c("run","objects of this API only");let{context:b,adopt:w,idle:P,finish:T}=mt.begin(i),_=!1;try{w(C);let j=await p(b);return _=!0,j}finally{await P(),T(_)}}let a={capabilities:t,run:s,dispose(){n||(n=!0,e.dispose())}};return r.save?{...a,async save(){o("save"),t.save||A({code:"NotSupported",target:"save"});let l=e.save();if(!l.ok)throw ht(l.error,{target:"save"});return l.bytes}}:a}async function Td(r,e={}){(!(r instanceof Uint8Array)||r.length===0)&&c("createServer","the bytes of a PPTX file as a non-empty Uint8Array"),(e===null||typeof e!="object")&&c("createServer","an options object");let t=e.rasterize;t!==void 0&&typeof t!="function"&&c("createServer","a rasterize function");let n=e.fonts===void 0?void 0:Array.isArray(e.fonts)?e.fonts:[e.fonts],o=await li(r.slice(),{...n?{fonts:n}:{},...e.substitutes===!1?{substitutes:!1}:{}});if(!o.ok){let a=o.error,l=a.reason==="zip"&&(a.detail==="too-many-entries"||a.detail==="too-large")||a.reason==="too-many-parts";A({code:l?"ResourceLimitExceeded":"InvalidArgument",target:"createServer"})}let i=o.session,s=ai(i.store,{measurer:i.measurer,...t?{renderImage:a=>di(i,a.slideIndex,{...a.shapeNodeId===void 0?{}:{shapeNodeId:a.shapeNodeId},...a.width===void 0?{}:{width:a.width},...a.height===void 0?{}:{height:a.height}},t)}:{}});return hr({host:{...s,dispose(){s.dispose(),i.dispose()}},save:!0})}export{L as a,xe as b,M as c,we as d,k as e,Zn as f,Jn as g,Gn as h,eo as i,to as j,no as k,oo as l,ro as m,io as n,so as o,ao as p,lo as q,co as r,ho as s,uo as t,po as u,mo as v,go as w,fo as x,bo as y,on as z,ct as A,yo as B,xo as C,Pe as D,ne as E,Oe as F,ko as G,se as H,H as I,pe as J,me as K,rt as L,Y as M,De as N,Ee as O,ze as P,qe as Q,We as R,Xe as S,_e as T,ve as U,Re as V,Se as W,ue as X,q as Y,Ve as Z,ke as _,V as $,re as aa,J as ba,Te as ca,Le as da,G as ea,Ke as fa,ee as ga,je as ha,Qe as ia,$e as ja,Ie as ka,Ne as la,K as ma,Be as na,Ze as oa,Je as pa,Ge as qa,et as ra,tt as sa,E as ta,ie as ua,be as va,nt as wa,ot as xa,ae as ya,Fe as za,ye as Aa,Me as Ba,Ue as Ca,it as Da,st as Ea,pt as Fa,mt as Ga,hr as Ha,Td as Ia};
|