@univer-cli/unit-layout-lint 1.4.0 → 1.6.0

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/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  English | [简体中文](./README.zh-CN.md)
4
4
 
5
- Use real browser-generated layout facts to detect text overflow and overlap in Slides, returning structured findings with evidence.
5
+ Check Slide text overflow and overlap, and Board elements, connectors, and labels, returning structured findings with SDK geometry evidence.
6
6
 
7
- Currently only Slide is supported. If the goal is to take a screenshot rather than diagnose, use `@univer-cli/unit-screenshot`.
7
+ Slide uses browser layout facts. Board supports model-only, rendered, and combined analysis. If the goal is to take a screenshot rather than diagnose, use `@univer-cli/unit-screenshot`.
8
8
 
9
9
  ## Installation
10
10
 
@@ -12,7 +12,7 @@ Currently only Slide is supported. If the goal is to take a screenshot rather th
12
12
  pnpm add @univer-cli/unit-layout-lint @univer-cli/univer-render-runtime
13
13
  ```
14
14
 
15
- The application must also build the Render Page and provide Chrome, Chromium, or Edge.
15
+ Slide and rendered Board analysis require a caller-built Render Page and Chrome, Chromium, or Edge. Board model analysis uses an injected headless adapter and does not require a browser.
16
16
 
17
17
  ## Quick Start
18
18
 
@@ -38,7 +38,7 @@ try {
38
38
  }
39
39
  ```
40
40
 
41
- ## Current rules
41
+ ## Slide rules
42
42
 
43
43
  - `text-off-page`: actual glyph ink extends beyond the page.
44
44
  - `text-escapes-container`: text visibly escapes a smaller opaque container.
@@ -46,7 +46,57 @@ try {
46
46
 
47
47
  A finding is an evidence-backed review suggestion, not a content error that must always be fixed. When `pages` is omitted, every page is checked. Numeric page selectors are one-based; string selectors use page IDs from `slideOrder`.
48
48
 
49
- The application is responsible for materializing the Slide and providing a render runtime. The package does not load remote targets, save reports, or define lint rules for other Unit types.
49
+ ## Board analysis
50
+
51
+ ```ts
52
+ import {
53
+ createHeadlessBoardLayoutRuntime,
54
+ createStandardHeadlessUniverFactory,
55
+ } from "@univer-cli/headless-univer";
56
+
57
+ const modelRuntime = createHeadlessBoardLayoutRuntime({
58
+ createUniver: createStandardHeadlessUniverFactory({ license: "" }),
59
+ });
60
+ const lint = createUnitLayoutLint({ modelRuntime });
61
+ const report = await lint.lint({ unitType: "board", unitData: boardData, mode: "model" });
62
+ ```
63
+
64
+ Board `mode` is `model`, `rendered`, or `both` (default). For rendered analysis, also provide `runtime` from `createUniverRenderRuntime()`. Custom adapters can implement `UniverBoardModelLayoutRuntime` or `UniverBoardLayoutRuntime`. Both phases receive detached copies of the same snapshot; `snapshotHash` identifies that input. `pages` accepts one-based positions or IDs from `pageOrder`, defaulting to all pages. Formula reference and embedded Unit snapshots can accompany the host.
65
+
66
+ Set `includeLabelPlan: true` with rendered or combined analysis to include native measured label repair plans in `analyses[].labelPlan`. Planning is read-only and opt-in. Apply only a `ready` plan through `board.applyLayoutPlan(plan)` and re-run lint; stale plans must be regenerated. A missing requested plan makes coverage incomplete.
67
+
68
+ Set `includePortPlan: true` in rendered or combined mode to return native automatic port-order plans in `analyses[].portPlan`. Missing or incomplete requested plans make coverage incomplete. Original findings remain visible until a fresh snapshot proves the repair. Apply one ready plan through `board.applyLayoutPlan(plan)`, then lint again; any other plans from the previous snapshot must be regenerated. The native planner preserves node frames, authored ports/routes and editing ownership.
69
+
70
+ For generated shape text, pass `textPlanElementIds: ["decision-id"]` in rendered or both mode. Each `analyses[]` entry can contain the native read-only `textPlan`; the report checks its Unit/page identity and limits every proposed resize to the selected shapes. Missing planning support adds `text-plan-unavailable`; an incomplete native plan adds `text-plan-incomplete`. Neither is clean coverage. No plan is applied automatically. Apply a ready plan with the Board Facade, replan graph/container layout and lint the updated snapshot.
71
+
72
+ Optional `textPlanMaximumWidthGrowth` must be a finite number from 1 to 2 and requires non-empty `textPlanElementIds`; 1 preserves authored widths, while omission keeps the native twofold search. Native planning preserves complete text and fonts. Callers still require complete coverage; `unit-layout-lint` rejects returned plans that exceed the requested width budget.
73
+
74
+ Apply only a plan for the current Board page; `applyLayoutPlan` rejects a mismatched page.
75
+
76
+ If a rendered label plan is incomplete with `connector-label-endpoint-constrained` or `no-free-position`, check whether the affected nodes can move and their connectors use ordinary automatic endpoints. In the browser, re-plan with `board.planLayout({ ...graphOptions, mode: "graph", layerGap: 160 })`, retaining the same `elementIds`, `fixedElementIds`, `direction`, and other constraints; choose a gap larger than the previous one. Apply only a `ready` graph plan, then lint a fresh snapshot with `includeLabelPlan: true`, apply only its new `ready` label plan, and lint again. A graph edit invalidates prior label plans. Preserve manual routes, native ownership, and hard constraints; if either plan remains incomplete, report the unresolved evidence and remaining raw findings.
77
+
78
+ `analyses` retains original SDK issues, routes, summaries, label IDs, and focus bounds per page and source. `findings` adds page/source identities and fingerprints without changing rule codes or severity. Geometry and rule evaluation remain owned by Univer; the package does not route or rearrange objects.
79
+
80
+ Optional `analysis.connectorLabelLayouts` retains native label rectangles, rotation, sizes, and flags when the runtime supplies them. Malformed measurements fail explicitly. An `unresolved` entry contributes the existing `unresolved-label` coverage reason once per page and final source, including when a native issue reports the same label. Ready measurements preserve overflow and endpoint constraints without adding findings. Older runtimes may omit the field; their reports remain compatible, but a `clean` result then does not establish complete label measurements or proximity to connector lines.
81
+
82
+ Set `maximumAutomaticLabelDistance` to a finite non-negative number (zero is valid) with rendered or combined analysis to inspect automatic label proximity. Native `labelDistanceInspection` echoes the exact policy; each measured label records a ready distance, an exclusion reason, or unresolved status. Older producers remain compatible when the option is omitted. When requested, missing support/status or unresolved distance adds `automatic-label-distance-unavailable` and makes coverage incomplete; malformed or contradictory evidence is rejected. Native exceeded-distance findings are errors. This is distance to the sampled, marker-trimmed stroke centerline before dash gaps and label clipping, not raster ink; curves use the native bounded polyline approximation. Inspection never moves labels.
83
+
84
+ `connector-route-retrace` identifies a resolved connector drawing back over its own line. Its route points and focus bounds locate the repeated ink. Inspection preserves authored guides; use rendered evidence to check the final automatic route.
85
+
86
+ `coverage.complete` describes the requested phases. Missing runtimes or page evidence and unresolved final routes, connector labels, or element text measurements produce `status: "incomplete"`, even with no findings. In combined mode, final rendered evidence can resolve model-only unknown routes. Rendered findings preserve native shape-text overflow and collisions involving container captions and swimlane header regions. Native table findings also retain the zero-based inclusive `tableRange` of the measured cell, including merged cells, and `textLayout` sizes when resolved. Use that range to address the owning rows and columns; do not infer a cell from the table's outer frame. Model-only coverage explicitly excludes final font metrics and automatic rendered routes. A `clean` report only proves the requested checks; it does not prove visual or interaction coverage that was not requested. Intentional overlaps remain in the report for review.
87
+
88
+ The application materializes UnitData and provides runtimes. The package does not load remote targets, save reports, mutate content, or manage runtime lifecycles.
50
89
 
51
90
  For the preset command, see
52
91
  [`@univer-cli/unit-layout-lint-command`](../unit-layout-lint-command/README.md).
92
+
93
+ ### Board layout plans
94
+
95
+ `layoutPlan` requests one native plan per rendered Board page. Select `graph` for complete layout,
96
+ `routes` for automatic path coordination, `ports` for automatic endpoints, `labels` for caption
97
+ placement, or `text` for grow-only frame sizing. Use element IDs for graph and text or connector IDs
98
+ for the other modes. The Render Page must use a Board SDK with `FBoard.planLayout()`.
99
+
100
+ With the Commander preset, use `lint --unit <id> --mode rendered --plan routes --plan-ids edge-a edge-b --json`.
101
+ Read `analyses[].plan` from the lint report. A ready plan can be applied on its original Board page
102
+ through `board.applyLayoutPlan(plan)`. Reinspect the new snapshot after application.
package/README.zh-CN.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  [English](./README.md) | 简体中文
4
4
 
5
- 使用浏览器产生的真实 layout facts 检查 Slide 中的文字越界与重叠,并返回带证据的结构化 findings。
5
+ 检查 Slide 文字越界、重叠与 Board 元素、连接线和标签,返回带 SDK 几何证据的结构化 findings。
6
6
 
7
- 当前只支持 Slide。若目标是截图而不是诊断,使用 `@univer-cli/unit-screenshot`。
7
+ Slide 使用浏览器 layout facts;Board 支持 model、rendered 和组合分析。若目标是截图而不是诊断,使用 `@univer-cli/unit-screenshot`。
8
8
 
9
9
  ## 安装
10
10
 
@@ -12,7 +12,7 @@
12
12
  pnpm add @univer-cli/unit-layout-lint @univer-cli/univer-render-runtime
13
13
  ```
14
14
 
15
- 还需要 application 构建 Render Page,并提供 Chrome、Chromium 或 Edge。
15
+ Slide 与 Board rendered 分析需要 application 构建 Render Page,并提供 Chrome、Chromium 或 Edge。Board model 分析使用注入的 headless adapter,无需浏览器。
16
16
 
17
17
  ## 快速开始
18
18
 
@@ -38,7 +38,7 @@ try {
38
38
  }
39
39
  ```
40
40
 
41
- ## 当前规则
41
+ ## Slide 规则
42
42
 
43
43
  - `text-off-page`:实际 glyph ink 超出页面;
44
44
  - `text-escapes-container`:文字明显冲出较小、不透明的容器;
@@ -47,8 +47,46 @@ try {
47
47
  Finding 是带证据的复查建议,不是必须清零的内容错误。省略 `pages` 时检查全部页面;page number 从 1 开始,
48
48
  字符串 selector 使用 `slideOrder` 中的 page ID。
49
49
 
50
- Application 负责物化 Slide 并提供 render runtime。Package 不加载远程 target、不保存报告,也不声明其他 Unit
51
- lint。
50
+ ## Board 分析
51
+
52
+ ```ts
53
+ import {
54
+ createHeadlessBoardLayoutRuntime,
55
+ createStandardHeadlessUniverFactory,
56
+ } from "@univer-cli/headless-univer";
57
+
58
+ const modelRuntime = createHeadlessBoardLayoutRuntime({
59
+ createUniver: createStandardHeadlessUniverFactory({ license: "" }),
60
+ });
61
+ const lint = createUnitLayoutLint({ modelRuntime });
62
+ const report = await lint.lint({ unitType: "board", unitData: boardData, mode: "model" });
63
+ ```
64
+
65
+ Board `mode` 为 `model`、`rendered` 或默认的 `both`。Rendered 分析还需提供 `createUniverRenderRuntime()` 返回的 `runtime`;自定义 adapter 可实现 `UniverBoardModelLayoutRuntime` 或 `UniverBoardLayoutRuntime`。两阶段接收同一 snapshot 的独立副本,`snapshotHash` 标识其输入。`pages` 使用从 1 开始的位置或 `pageOrder` 中的 ID,默认检查全部页面。Host 可附带 formula reference 与 embedded Unit snapshots。
66
+
67
+ Rendered 或组合分析可显式设置 `includeLabelPlan: true`,通过 `analyses[].labelPlan` 返回原生 SDK 实测标签修复 plan。规划只读且默认关闭。仅通过 `board.applyLayoutPlan(plan)` 应用 `ready` plan,然后重新 lint;过期 plan 必须重新生成。请求后缺少 plan 会使 coverage 不完整。
68
+
69
+ Rendered 或组合模式可设置 `includePortPlan: true`,通过 `analyses[].portPlan` 返回原生自动端口排序计划。请求后计划缺失或不完整会使 coverage 不完整。原始 findings 会保留,直到新 snapshot 的检查证明修复。通过 `board.applyLayoutPlan(plan)` 应用一个 ready 计划后重新 lint;旧 snapshot 的其他计划必须重新生成。原生规划保留节点框、人工端口/路由和编辑所有权。
70
+
71
+ 对于生成图形的文字,在 rendered 或 both 模式传入 `textPlanElementIds: ["decision-id"]`。各 `analyses[]` 可包含原生只读 `textPlan`;report 检查 Unit/page 身份,并限制所有尺寸建议只针对所选图形。缺少规划支持会增加 `text-plan-unavailable`,原生计划不完整会增加 `text-plan-incomplete`,均不算完整覆盖。不会自动应用计划。通过 Board Facade 应用 ready 计划后,重新规划图和容器布局,并对更新的 snapshot 再次 lint。
72
+
73
+ 可选的 `textPlanMaximumWidthGrowth` 必须是 1 到 2 的有限数,并与非空 `textPlanElementIds` 一起提供;1 保留原宽,默认沿用原生最多两倍宽度搜索。原生计划保留完整文字和字号,调用方仍须检查完整覆盖。`unit-layout-lint` 拒绝超过请求宽度预算的返回计划。
74
+
75
+ 仅应用当前 Board page 对应的 plan;`applyLayoutPlan` 会拒绝页面不匹配的 plan。
76
+
77
+ 若 rendered label plan 因 `connector-label-endpoint-constrained` 或 `no-free-position` 不完整,先确认相关节点可移动且连接线使用普通自动端点。保留相同的 `elementIds`、`fixedElementIds`、`direction` 与其他约束,在浏览器中通过 `board.planLayout({ ...graphOptions, mode: "graph", layerGap: 160 })` 增加层间距;新间距应大于原值。仅应用 `ready` graph plan,再对新 snapshot 设置 `includeLabelPlan: true` 重新 lint,仅应用这次新生成的 `ready` label plan,然后再次 lint。Graph 编辑会使旧 label plan 失效。保留手工路由、原生布局所有权与硬约束;若任一 plan 仍不完整,报告未解决证据和剩余原始 findings。
78
+
79
+ `analyses` 按页面、来源保留 SDK 原始 issues、routes、summary、label IDs 和 focus bounds;`findings` 仅补充页面、来源与 fingerprint,不更改规则代码或 severity。几何与规则计算委托 Univer;本 package 不布线或移动对象。
80
+
81
+ Runtime 提供可选的 `analysis.connectorLabelLayouts` 时,结果保留原生标签矩形、旋转、尺寸与标志;无效度量会明确失败。`unresolved` 项计入既有的 `unresolved-label` coverage reason,每个页面的最终来源仅记录一次,即使原生 issue 同时报告了该标签。Ready 度量保留溢出与端点约束,不额外生成 findings。旧 runtime 可缺少此字段,报告保持兼容,但此时 `clean` 不证明完整的标签度量或标签贴近连接线。
82
+
83
+ Rendered 或组合分析可设置有限、非负的 `maximumAutomaticLabelDistance`(0 有效),显式检查自动标签与连接线的距离。原生 `labelDistanceInspection` 回传精确 policy,每个已测量标签记录 ready 距离、排除原因或 unresolved 状态。省略选项时保持旧 producer 兼容;请求后缺少支持、状态或距离未解析会增加 `automatic-label-distance-unavailable` 并使 coverage 不完整,无效或矛盾证据会被拒绝。原生距离超限 finding 为 error。度量针对采样、裁去 marker 的 stroke 中心线,在 dash gaps 和 label clipping 之前计算,不是 raster ink;曲线采用原生有界折线近似。检查不会移动标签。
84
+
85
+ `connector-route-retrace` 表示已解析的连接线沿自身线段反向重复绘制。报告通过 route points 和 focus bounds 定位重复线段。检查保留手工路径;最终自动路由应通过 rendered evidence 验证。
86
+
87
+ `coverage.complete` 描述请求阶段的覆盖。缺少 runtime、页面证据或最终 route、连接线标签或元素文字度量未解析时返回 `status: "incomplete"`,即使 findings 为空。组合模式下,最终 rendered 证据可解决 model 阶段无法确定的自动路由。Rendered findings 保留原生 shape 文字溢出、容器标题和泳道标题区域碰撞。原生表格 findings 还保留实际测量单元格的零基、两端包含的 `tableRange`(含合并单元格),度量成功时附 `textLayout` 尺寸。根据该范围定位所属行列,不从整个表格的外框推断单元格。Model-only 明确不涵盖最终字体度量与自动渲染路径。`clean` 只证明请求的检查,不证明未请求的视觉或交互覆盖。刻意重叠也保留 findings 供复查。
88
+
89
+ Application 负责物化 UnitData、提供 runtime。Package 不加载远程 target、不保存报告、不修改内容,也不管理 runtime 生命周期。
52
90
 
53
91
  预设 command 见
54
92
  [`@univer-cli/unit-layout-lint-command`](../unit-layout-lint-command/README.zh-CN.md)。
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { UniverRenderFormulaReferenceUnit, UniverRenderUnit, UniverSlideLayoutRuntime } from "@univer-cli/univer-render-runtime";
1
+ import { UniverBoardLayoutAnalysis, UniverBoardLayoutIssue, UniverBoardLayoutPlan, UniverBoardLayoutPlanOptions, UniverBoardLayoutRuntime, UniverBoardModelLayoutRuntime, UniverRenderEmbeddedUnit, UniverRenderFormulaReferenceUnit, UniverRenderUnit, UniverSlideLayoutRuntime } from "@univer-cli/univer-render-runtime";
2
2
  //#region src/errors.d.ts
3
3
  type UnitLayoutLintErrorCode = "INVALID_INPUT" | "INVALID_RENDER_RESULT";
4
4
  declare class UnitLayoutLintError extends Error {
@@ -65,8 +65,28 @@ interface SlideUnitLayoutLintInput {
65
65
  readonly unitData: SlideUnitData;
66
66
  readonly unitType: "slide";
67
67
  }
68
- type UnitLayoutLintInput = SlideUnitLayoutLintInput;
69
- type UnitLayoutLintSource = Omit<UnitLayoutLintInput, "pages">;
68
+ type BoardLayoutLintMode = "model" | "rendered" | "both";
69
+ interface BoardUnitLayoutLintInput {
70
+ readonly embeddedUnits?: readonly UniverRenderEmbeddedUnit[];
71
+ readonly formulaReferenceUnits?: readonly UniverRenderFormulaReferenceUnit[];
72
+ readonly mode?: BoardLayoutLintMode;
73
+ readonly layoutPlan?: UniverBoardLayoutPlanOptions;
74
+ readonly includeLabelPlan?: boolean;
75
+ readonly includePortPlan?: boolean;
76
+ /** Explicit generated shape IDs; requires native rendered text planning. */
77
+ readonly textPlanElementIds?: readonly string[];
78
+ /** Optional native width-growth limit from 1 to 2; requires an explicit text-plan selection. */
79
+ readonly textPlanMaximumWidthGrowth?: number;
80
+ readonly maximumAutomaticLabelDistance?: number;
81
+ readonly pages?: readonly SlideLayoutLintPageSelector[];
82
+ readonly signal?: AbortSignal;
83
+ readonly unitData: Extract<UniverRenderUnit, {
84
+ readonly unitType: "board";
85
+ }>["unitData"];
86
+ readonly unitType: "board";
87
+ }
88
+ type UnitLayoutLintInput = SlideUnitLayoutLintInput | BoardUnitLayoutLintInput;
89
+ type UnitLayoutLintSource = Omit<SlideUnitLayoutLintInput, "pages"> | Omit<BoardUnitLayoutLintInput, "pages" | "mode" | "layoutPlan" | "includeLabelPlan" | "includePortPlan" | "textPlanElementIds" | "textPlanMaximumWidthGrowth" | "maximumAutomaticLabelDistance">;
70
90
  interface SlideUnitLayoutLintReport {
71
91
  readonly coverage: {
72
92
  readonly pages: readonly {
@@ -80,15 +100,56 @@ interface SlideUnitLayoutLintReport {
80
100
  readonly unitId: string;
81
101
  readonly unitType: "slide";
82
102
  }
83
- type UnitLayoutLintReport = SlideUnitLayoutLintReport;
103
+ type BoardLayoutLintFinding = UniverBoardLayoutIssue & {
104
+ readonly fingerprint: string;
105
+ readonly page: number;
106
+ readonly pageId: string;
107
+ readonly source: "model" | "rendered";
108
+ };
109
+ interface BoardUnitLayoutLintReport {
110
+ readonly kind: "unit-layout-lint";
111
+ readonly unitId: string;
112
+ readonly unitType: "board";
113
+ readonly mode: BoardLayoutLintMode;
114
+ readonly snapshotHash: string;
115
+ readonly status: "clean" | "findings" | "incomplete";
116
+ readonly coverage: {
117
+ readonly pages: readonly {
118
+ readonly page: number;
119
+ readonly pageId: string;
120
+ }[];
121
+ readonly sources: readonly ("model" | "rendered")[];
122
+ readonly complete: boolean;
123
+ readonly incomplete: readonly {
124
+ readonly pageId: string;
125
+ readonly source: "model" | "rendered";
126
+ readonly reason: "runtime-unavailable" | "analysis-missing" | "layout-plan-unavailable" | "layout-plan-incomplete" | "unresolved-route" | "unresolved-label" | "unresolved-element-text" | "label-plan-unavailable" | "port-plan-unavailable" | "port-plan-incomplete" | "text-plan-unavailable" | "text-plan-incomplete" | "automatic-label-distance-unavailable";
127
+ }[];
128
+ readonly limitations: readonly string[];
129
+ };
130
+ /** Original SDK analyses, including routes, summaries, and all issue evidence. */
131
+ readonly analyses: readonly {
132
+ readonly page: number;
133
+ readonly pageId: string;
134
+ readonly model?: UniverBoardLayoutAnalysis;
135
+ readonly rendered?: UniverBoardLayoutAnalysis;
136
+ readonly plan?: UniverBoardLayoutPlan;
137
+ readonly labelPlan?: UniverBoardLayoutPlan;
138
+ readonly portPlan?: UniverBoardLayoutPlan;
139
+ readonly textPlan?: UniverBoardLayoutPlan;
140
+ }[];
141
+ readonly findings: readonly BoardLayoutLintFinding[];
142
+ }
143
+ type UnitLayoutLintReport = SlideUnitLayoutLintReport | BoardUnitLayoutLintReport;
84
144
  interface UnitLayoutLint {
85
145
  lint(input: UnitLayoutLintInput): Promise<UnitLayoutLintReport>;
86
146
  }
87
147
  interface UnitLayoutLintOptions {
88
- readonly runtime: UniverSlideLayoutRuntime;
148
+ readonly runtime?: UniverSlideLayoutRuntime | UniverBoardLayoutRuntime;
149
+ readonly modelRuntime?: UniverBoardModelLayoutRuntime;
89
150
  }
90
151
  //#endregion
91
152
  //#region src/unit-layout-lint.d.ts
92
153
  declare function createUnitLayoutLint(options: UnitLayoutLintOptions): UnitLayoutLint;
93
154
  //#endregion
94
- export { type SlideLayoutLintBox, type SlideLayoutLintContainer, type SlideLayoutLintFinding, type SlideLayoutLintOverflow, type SlideLayoutLintPageSelector, type SlideLayoutLintRule, type SlideLayoutLintText, type SlideUnitLayoutLintInput, type SlideUnitLayoutLintReport, type UnitLayoutLint, UnitLayoutLintError, type UnitLayoutLintErrorCode, type UnitLayoutLintInput, type UnitLayoutLintOptions, type UnitLayoutLintReport, type UnitLayoutLintSource, createUnitLayoutLint, isUnitLayoutLintError };
155
+ export { type BoardLayoutLintFinding, type BoardLayoutLintMode, type UniverBoardLayoutPlanOptions as BoardLayoutPlanOptions, type BoardUnitLayoutLintInput, type BoardUnitLayoutLintReport, type SlideLayoutLintBox, type SlideLayoutLintContainer, type SlideLayoutLintFinding, type SlideLayoutLintOverflow, type SlideLayoutLintPageSelector, type SlideLayoutLintRule, type SlideLayoutLintText, type SlideUnitLayoutLintInput, type SlideUnitLayoutLintReport, type UnitLayoutLint, UnitLayoutLintError, type UnitLayoutLintErrorCode, type UnitLayoutLintInput, type UnitLayoutLintOptions, type UnitLayoutLintReport, type UnitLayoutLintSource, createUnitLayoutLint, isUnitLayoutLintError };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- const _0x4037ef=_0x8b3d;(function(_0x2be0c1,_0x2b4799){const _0x2e6992=_0x8b3d,_0x2f7f24=_0x2be0c1();while(!![]){try{const _0x31c6a0=parseInt(_0x2e6992(0x17d))/0x1+parseInt(_0x2e6992(0x171))/0x2+-parseInt(_0x2e6992(0x1ad))/0x3+-parseInt(_0x2e6992(0x19b))/0x4+-parseInt(_0x2e6992(0x16b))/0x5*(parseInt(_0x2e6992(0x1b7))/0x6)+-parseInt(_0x2e6992(0x167))/0x7*(-parseInt(_0x2e6992(0x181))/0x8)+parseInt(_0x2e6992(0x187))/0x9;if(_0x31c6a0===_0x2b4799)break;else _0x2f7f24['push'](_0x2f7f24['shift']());}catch(_0x23928a){_0x2f7f24['push'](_0x2f7f24['shift']());}}}(_0x48af,0x80f6c));var e=class extends Error{[_0x4037ef(0x18b)];constructor(_0x5b5a7b,_0x55b503,_0x1d1410){const _0x153639=_0x4037ef;super(_0x55b503,_0x1d1410),this['name']=_0x153639(0x162),this['code']=_0x5b5a7b;}};function t(_0xe504d4){return _0xe504d4 instanceof e;}var n=0x2,r=0x6,i=0.02,a=0.15,o=0.5,s=new Set([_0x4037ef(0x183),_0x4037ef(0x163)]),c=[_0x4037ef(0x16a),_0x4037ef(0x160),_0x4037ef(0x1b4)];function l(_0x1dfbd5){return{async 'lint'(_0x41c49){const _0x4eefc5=_0x8b3d;if(_0x41c49[_0x4eefc5(0x172)]!==_0x4eefc5(0x16d))throw new e(_0x4eefc5(0x18d),'Unit\x20layout\x20lint\x20currently\x20supports\x20Slide\x20only');let _0x579d63=O(_0x41c49[_0x4eefc5(0x1a4)]['id']),_0x42c436=u(_0x41c49[_0x4eefc5(0x1a4)][_0x4eefc5(0x1a9)]??[],_0x41c49[_0x4eefc5(0x1b5)]),_0x306d14=await _0x1dfbd5[_0x4eefc5(0x1b1)][_0x4eefc5(0x1a1)]({'unitType':_0x4eefc5(0x16d),'unitData':_0x41c49[_0x4eefc5(0x1a4)],..._0x41c49[_0x4eefc5(0x17f)]===void 0x0?{}:{'formulaReferenceUnits':_0x41c49[_0x4eefc5(0x17f)]},'pages':_0x42c436[_0x4eefc5(0x16f)](({page:_0x2e915c})=>_0x2e915c),..._0x41c49[_0x4eefc5(0x15d)]===void 0x0?{}:{'signal':_0x41c49[_0x4eefc5(0x15d)]}});return d(_0x306d14,_0x42c436),{'kind':_0x4eefc5(0x166),'unitId':_0x579d63,'unitType':_0x4eefc5(0x16d),'coverage':{'pages':_0x42c436,'rules':c},'findings':f(_0x306d14)};}};}function u(_0x190aad,_0x4a3110){const _0x5bfc52=_0x4037ef;if(_0x190aad[_0x5bfc52(0x17c)]===0x0)throw new e(_0x5bfc52(0x18d),'Slide\x20has\x20no\x20pages\x20to\x20lint');if(_0x4a3110!==void 0x0&&_0x4a3110[_0x5bfc52(0x17c)]===0x0)throw new e(_0x5bfc52(0x18d),_0x5bfc52(0x18f));let _0x53a22c=_0x4a3110??_0x190aad['map']((_0x287f86,_0x4ec611)=>_0x4ec611+0x1),_0x1adbac=new Set(),_0x5e61b5=[];for(let _0x3b158f of _0x53a22c){let _0x24110e=typeof _0x3b158f=='number'?_0x3b158f:_0x190aad[_0x5bfc52(0x17b)](_0x464c7d=>_0x464c7d===_0x3b158f)+0x1;if(!Number[_0x5bfc52(0x195)](_0x24110e)||_0x24110e<0x1||_0x24110e>_0x190aad[_0x5bfc52(0x17c)])throw new e(_0x5bfc52(0x18d),'Slide\x20page\x20selector\x20is\x20invalid:\x20'+String(_0x3b158f));let _0x1a326c=_0x190aad[_0x24110e-0x1];_0x1adbac[_0x5bfc52(0x169)](_0x1a326c)||(_0x1adbac[_0x5bfc52(0x1a7)](_0x1a326c),_0x5e61b5[_0x5bfc52(0x164)]({'page':_0x24110e,'pageId':_0x1a326c}));}return _0x5e61b5;}function d(_0xd6c6ce,_0x3c96e1){const _0x319ec1=_0x4037ef;let _0x4891aa=new Map();for(let _0x3a29cd of _0xd6c6ce['pages']){let _0xc8d074=_0x4891aa[_0x319ec1(0x1ae)](_0x3a29cd[_0x319ec1(0x15c)])??[];_0xc8d074[_0x319ec1(0x164)](_0x3a29cd),_0x4891aa[_0x319ec1(0x1a0)](_0x3a29cd['pageId'],_0xc8d074);}for(let _0x133b9b of _0x3c96e1){let _0x28dc2c=_0x4891aa[_0x319ec1(0x1ae)](_0x133b9b[_0x319ec1(0x15c)])??[];if(_0x28dc2c[_0x319ec1(0x17c)]!==0x1||_0x28dc2c[0x0]?.[_0x319ec1(0x197)]!==_0x133b9b['page'])throw new e('INVALID_RENDER_RESULT',_0x319ec1(0x178)+_0x133b9b[_0x319ec1(0x15c)]);let _0x43b09c=_0x28dc2c[0x0][_0x319ec1(0x1af)]['map'](({elementId:_0x1c318e})=>_0x1c318e);if(new Set(_0x43b09c)['size']!==_0x43b09c['length'])throw new e('INVALID_RENDER_RESULT',_0x319ec1(0x18e)+_0x133b9b[_0x319ec1(0x15c)]);}if(_0xd6c6ce[_0x319ec1(0x1b5)][_0x319ec1(0x17c)]!==_0x3c96e1['length'])throw new e(_0x319ec1(0x180),_0x319ec1(0x182));}function f(_0x2f6065){const _0x2ec414=_0x4037ef;let _0x4520be=[];for(let _0x49c629 of _0x2f6065[_0x2ec414(0x1b5)]){let _0x35e53c=_0x49c629[_0x2ec414(0x1af)][_0x2ec414(0x158)](_0xaec813=>!_0xaec813[_0x2ec414(0x16e)][_0x2ec414(0x175)](_0x2ec414(0x15e))),_0x184e07=_0x35e53c[_0x2ec414(0x158)](_0x2088de=>_0x2088de[_0x2ec414(0x1b2)]!==void 0x0&&_0x2088de[_0x2ec414(0x1b2)]['content']['trim']()!=='');for(let _0x2a5d71 of _0x184e07){let _0x5e7245=m(_0x2a5d71[_0x2ec414(0x1b2)]['ink']),_0xf573c1={..._0x5e7245[_0x2ec414(0x1a5)]<-0x2?{'left':_(-_0x5e7245[_0x2ec414(0x1a5)])}:{},..._0x5e7245[_0x2ec414(0x1a3)]<-0x2?{'top':_(-_0x5e7245[_0x2ec414(0x1a3)])}:{},..._0x5e7245[_0x2ec414(0x1b3)]>_0x49c629['pageWidth']+n?{'right':_(_0x5e7245[_0x2ec414(0x1b3)]-_0x49c629['pageWidth'])}:{},..._0x5e7245[_0x2ec414(0x176)]>_0x49c629[_0x2ec414(0x196)]+n?{'bottom':_(_0x5e7245['bottom']-_0x49c629[_0x2ec414(0x196)])}:{}},_0x21da8c=D(_0xf573c1);if(_0x21da8c!=='-'){let _0x5727a3=b(_0x2a5d71),_0x5f9ad2=y({'left':0x0,'top':0x0,'width':_0x49c629[_0x2ec414(0x15a)],'height':_0x49c629[_0x2ec414(0x196)]});_0x4520be[_0x2ec414(0x164)](p({'page':_0x49c629[_0x2ec414(0x197)],'pageId':_0x49c629[_0x2ec414(0x15c)],'rule':_0x2ec414(0x16a),'id':_0x2a5d71[_0x2ec414(0x16e)],'text':_0x5727a3,'pageBox':_0x5f9ad2,'overflow':_0xf573c1,'detail':_0x2ec414(0x159)+v(_0x5727a3[_0x2ec414(0x177)])+_0x2ec414(0x179)+_0x21da8c+_0x2ec414(0x18c)+w(_0x5727a3[_0x2ec414(0x16c)])+_0x2ec414(0x189)+w(_0x5f9ad2)}));}}for(let _0x4c99d3 of _0x184e07){let _0x407d51=E(_0x4c99d3,_0x35e53c,_0x49c629);if(_0x407d51===void 0x0)continue;let _0x2376d0=m(_0x4c99d3[_0x2ec414(0x1b2)]['ink']),_0x164536=m(_0x407d51[_0x2ec414(0x1a8)]),_0x1bb2f1=Math[_0x2ec414(0x198)](r,i*(_0x164536[_0x2ec414(0x1b3)]-_0x164536[_0x2ec414(0x1a5)])),_0x493c40={..._0x164536[_0x2ec414(0x1a5)]-_0x2376d0['left']>_0x1bb2f1?{'left':_(_0x164536[_0x2ec414(0x1a5)]-_0x2376d0[_0x2ec414(0x1a5)])}:{},..._0x2376d0[_0x2ec414(0x1b3)]-_0x164536[_0x2ec414(0x1b3)]>_0x1bb2f1?{'right':_(_0x2376d0[_0x2ec414(0x1b3)]-_0x164536[_0x2ec414(0x1b3)])}:{},..._0x2376d0[_0x2ec414(0x176)]-_0x164536[_0x2ec414(0x176)]>_0x1bb2f1?{'bottom':_(_0x2376d0[_0x2ec414(0x176)]-_0x164536[_0x2ec414(0x176)])}:{}},_0x329524=D(_0x493c40);if(_0x329524!=='-'){let _0x4a04c3=b(_0x4c99d3),_0x581e94=S(_0x407d51);_0x4520be['push'](p({'page':_0x49c629['page'],'pageId':_0x49c629['pageId'],'rule':_0x2ec414(0x160),'id':_0x4c99d3[_0x2ec414(0x16e)],'related':_0x407d51['elementId'],'text':_0x4a04c3,'container':_0x581e94,'overflow':_0x493c40,'detail':_0x2ec414(0x159)+v(_0x4a04c3[_0x2ec414(0x177)])+_0x2ec414(0x188)+_0x581e94['id']+'\x20('+_0x329524+_0x2ec414(0x18c)+w(_0x4a04c3[_0x2ec414(0x16c)])+',\x20'+_0x581e94['id']+'\x20=\x20'+_0x581e94[_0x2ec414(0x194)]+'\x20'+C(_0x581e94['fill'])+'\x20'+w(_0x581e94[_0x2ec414(0x1b6)])}));}}for(let _0x4e28b4=0x0;_0x4e28b4<_0x184e07['length'];_0x4e28b4+=0x1)for(let _0x5c13a9=_0x4e28b4+0x1;_0x5c13a9<_0x184e07[_0x2ec414(0x17c)];_0x5c13a9+=0x1){let _0x502e27=_0x184e07[_0x4e28b4],_0x428d1e=_0x184e07[_0x5c13a9],_0x58faa6=m(_0x502e27[_0x2ec414(0x1b2)][_0x2ec414(0x16c)]),_0x3209b7=m(_0x428d1e[_0x2ec414(0x1b2)][_0x2ec414(0x16c)]),_0x366fce=h(g(_0x58faa6,_0x3209b7));if(_0x366fce<=0x1)continue;let _0x199e68=_0x366fce/Math['max'](0x1,Math[_0x2ec414(0x17e)](h(_0x58faa6),h(_0x3209b7)));if(_0x199e68<=a)continue;let _0x597a97=b(_0x502e27),_0x4f8de0=b(_0x428d1e);_0x4520be[_0x2ec414(0x164)](p({'page':_0x49c629[_0x2ec414(0x197)],'pageId':_0x49c629[_0x2ec414(0x15c)],'rule':'text-overlaps-text','id':_0x502e27[_0x2ec414(0x16e)],'related':_0x428d1e[_0x2ec414(0x16e)],'text':_0x597a97,'other':_0x4f8de0,'overlapRatio':Math['round'](_0x199e68*0x64)/0x64,'detail':_0x2ec414(0x159)+v(_0x597a97[_0x2ec414(0x177)])+'\x22'+x(_0x597a97)+_0x2ec414(0x1a2)+v(_0x4f8de0[_0x2ec414(0x177)])+'\x22'+x(_0x4f8de0)+_0x2ec414(0x15b)+Math[_0x2ec414(0x1a6)](_0x199e68*0x64)+_0x2ec414(0x19e)+w(_0x597a97['ink'])+',\x20'+w(_0x4f8de0[_0x2ec414(0x16c)])}));}}return _0x4520be[_0x2ec414(0x170)]((_0x234939,_0x126d97)=>_0x234939[_0x2ec414(0x190)]['localeCompare'](_0x126d97[_0x2ec414(0x190)]));}function p(_0x16de96){const _0x217d0b=_0x4037ef;return{..._0x16de96,'fingerprint':[_0x16de96[_0x217d0b(0x19a)],_0x16de96[_0x217d0b(0x15c)],_0x16de96['id'],_0x16de96['related']??''][_0x217d0b(0x173)](':'),'severity':_0x217d0b(0x17a)};}function m(_0x539211){const _0x4a33f6=_0x4037ef;return{'left':_0x539211[_0x4a33f6(0x1a5)],'top':_0x539211[_0x4a33f6(0x1a3)],'right':_0x539211[_0x4a33f6(0x1a5)]+_0x539211[_0x4a33f6(0x15f)],'bottom':_0x539211[_0x4a33f6(0x1a3)]+_0x539211[_0x4a33f6(0x174)]};}function h(_0xdf5e1){const _0x96f3bd=_0x4037ef;return Math[_0x96f3bd(0x198)](0x0,_0xdf5e1[_0x96f3bd(0x1b3)]-_0xdf5e1[_0x96f3bd(0x1a5)])*Math[_0x96f3bd(0x198)](0x0,_0xdf5e1[_0x96f3bd(0x176)]-_0xdf5e1[_0x96f3bd(0x1a3)]);}function g(_0x5f3d22,_0x351e29){const _0x598d38=_0x4037ef;return{'left':Math[_0x598d38(0x198)](_0x5f3d22[_0x598d38(0x1a5)],_0x351e29[_0x598d38(0x1a5)]),'top':Math['max'](_0x5f3d22['top'],_0x351e29[_0x598d38(0x1a3)]),'right':Math[_0x598d38(0x17e)](_0x5f3d22[_0x598d38(0x1b3)],_0x351e29[_0x598d38(0x1b3)]),'bottom':Math['min'](_0x5f3d22[_0x598d38(0x176)],_0x351e29[_0x598d38(0x176)])};}function _(_0x560feb){return Math['round'](_0x560feb);}function v(_0x37a956){const _0x399da2=_0x4037ef;let _0x2f53e1=_0x37a956[_0x399da2(0x1aa)](/\s+/gu,'\x20')[_0x399da2(0x161)]();return _0x2f53e1['length']<=0x10?_0x2f53e1:_0x2f53e1[_0x399da2(0x18a)](0x0,0x10)+'…';}function _0x48af(){const _0x4a5586=['round','add','declared','slideOrder','replace','area','opacity','2276211FjmpSe','get','elements','top\x20','runtime','text','right','text-overlaps-text','pages','box','758994EozBxi','filter','text\x20\x22','pageWidth','\x20by\x20','pageId','signal','layout:','width','text-escapes-container','trim','UnitLayoutLintError','roundRect','push','\x20\x20opacity\x20','unit-layout-lint','1554vkrsRn','right\x20','has','text-off-page','5BJtbGo','ink','slide','elementId','map','sort','84556EPqGKJ','unitType','join','height','startsWith','bottom','content','Render\x20result\x20does\x20not\x20contain\x20exactly\x20one\x20matching\x20page\x20','\x22\x20runs\x20off\x20the\x20page\x20(','warning','findIndex','length','1024262mPmeic','min','formulaReferenceUnits','INVALID_RENDER_RESULT','2432SQnWsE','Render\x20result\x20contains\x20unrequested\x20Slide\x20pages','rect','zIndex','Slide\x20unitData.id\x20is\x20required','string','12012102VwfFeX','\x22\x20escapes\x20',',\x20page\x20','slice','code',');\x20ink\x20','INVALID_INPUT','Render\x20result\x20contains\x20duplicate\x20element\x20identities\x20on\x20page\x20','pages\x20must\x20not\x20be\x20empty','fingerprint','left\x20','elementType','shapeType','type','isInteger','pageHeight','page','max','none','rule','4220936ZxPDCY','fill','visible','%\x20of\x20the\x20smaller\x20glyph\x20band;\x20ink\x20','color','set','captureSlideLayout','\x20overlaps\x20\x22','top','unitData','left'];_0x48af=function(){return _0x4a5586;};return _0x48af();}function y(_0x640070){const _0x5083c=_0x4037ef;return{'left':_(_0x640070['left']),'top':_(_0x640070[_0x5083c(0x1a3)]),'width':_(_0x640070[_0x5083c(0x15f)]),'height':_(_0x640070[_0x5083c(0x174)])};}function b(_0x20aea8){const _0x53ab31=_0x4037ef;let _0x33ab42=_0x20aea8[_0x53ab31(0x1b2)];return{'id':_0x20aea8['elementId'],'content':_0x33ab42[_0x53ab31(0x177)],'ink':y(_0x33ab42[_0x53ab31(0x16c)]),..._0x33ab42[_0x53ab31(0x19f)]===void 0x0?{}:{'color':_0x33ab42[_0x53ab31(0x19f)]},..._0x33ab42[_0x53ab31(0x1ac)]===void 0x0?{}:{'opacity':_0x33ab42['opacity']}};}function x(_0x4f3d61){const _0x522e61=_0x4037ef;return _0x4f3d61['color']===void 0x0&&_0x4f3d61[_0x522e61(0x1ac)]===void 0x0?'':''+(_0x4f3d61['color']===void 0x0?'':'\x20\x20'+_0x4f3d61[_0x522e61(0x19f)])+(_0x4f3d61[_0x522e61(0x1ac)]===void 0x0?'':_0x522e61(0x165)+_0x4f3d61['opacity']);}function S(_0x1d061c){const _0x1732f9=_0x4037ef;return{'id':_0x1d061c[_0x1732f9(0x16e)],'type':_0x1d061c[_0x1732f9(0x193)]===void 0x0?_0x1d061c['elementType']:_0x1d061c[_0x1732f9(0x192)]+':'+_0x1d061c[_0x1732f9(0x193)],..._0x1d061c[_0x1732f9(0x19c)]===void 0x0?{}:{'fill':_0x1d061c['fill']},'box':y(_0x1d061c[_0x1732f9(0x1a8)])};}function C(_0x139055){const _0x125e11=_0x4037ef;if(_0x139055===void 0x0)return'no\x20fill';let _0x3298e0=_0x139055[_0x125e11(0x1ac)]===void 0x0||_0x139055['opacity']===0x1?'':'\x20@'+_0x139055[_0x125e11(0x1ac)];return((_0x139055[_0x125e11(0x194)]??'?')+'\x20'+(_0x139055[_0x125e11(0x19f)]??'')+_0x3298e0)['trim']();}function w(_0x39c893){const _0x1ca126=_0x4037ef;return'('+_0x39c893['left']+','+_0x39c893[_0x1ca126(0x1a3)]+'\x20'+_0x39c893['width']+'×'+_0x39c893[_0x1ca126(0x174)]+')';}function _0x8b3d(_0xdc88d4,_0x288875){_0xdc88d4=_0xdc88d4-0x158;const _0x48af68=_0x48af();let _0x8b3d6=_0x48af68[_0xdc88d4];return _0x8b3d6;}function T(_0x1cd1f6){const _0x2711df=_0x4037ef;let _0x15b026=_0x1cd1f6[_0x2711df(0x19c)];return!(_0x15b026===void 0x0||_0x15b026[_0x2711df(0x194)]===_0x2711df(0x199)||_0x15b026[_0x2711df(0x1ac)]!==void 0x0&&_0x15b026[_0x2711df(0x1ac)]<o||_0x1cd1f6[_0x2711df(0x193)]===void 0x0||!s['has'](_0x1cd1f6['shapeType'])||_0x1cd1f6[_0x2711df(0x19d)]===!0x1);}function E(_0x4e1f48,_0x4ab562,_0x45223e){const _0x636423=_0x4037ef;let _0xcb77e2=m(_0x4e1f48['text'][_0x636423(0x16c)]),_0x5130c9;for(let _0xd67824 of _0x4ab562){if(_0xd67824[_0x636423(0x184)]>=_0x4e1f48['zIndex']||!T(_0xd67824))continue;let _0x59bfc3=m(_0xd67824['declared']),_0xccae15=h(_0x59bfc3);if(_0xccae15>=0.5*_0x45223e[_0x636423(0x15a)]*_0x45223e[_0x636423(0x196)])continue;let _0x392b55=_0xcb77e2[_0x636423(0x1a3)]>=_0x59bfc3[_0x636423(0x1a3)]-n&&_0xcb77e2['bottom']<=_0x59bfc3['bottom']+n,_0x21e857=_0xcb77e2[_0x636423(0x1a5)]>=_0x59bfc3[_0x636423(0x1a5)]-n&&_0xcb77e2['left']<=_0x59bfc3['right']+n&&_0xcb77e2[_0x636423(0x1a3)]>=_0x59bfc3['top']-n,_0x10e002=h(g(_0xcb77e2,_0x59bfc3))/Math[_0x636423(0x198)](h(_0xcb77e2),0x1);!_0x392b55||!_0x21e857||_0x10e002<0.35||(_0x5130c9===void 0x0||_0xccae15<_0x5130c9[_0x636423(0x1ab)])&&(_0x5130c9={'element':_0xd67824,'area':_0xccae15});}return _0x5130c9?.['element'];}function D(_0x4d3927){const _0x4f658a=_0x4037ef;let _0x3fa086=[_0x4d3927['left']===void 0x0?'':_0x4f658a(0x191)+_0x4d3927['left']+'px',_0x4d3927['top']===void 0x0?'':_0x4f658a(0x1b0)+_0x4d3927[_0x4f658a(0x1a3)]+'px',_0x4d3927['right']===void 0x0?'':_0x4f658a(0x168)+_0x4d3927[_0x4f658a(0x1b3)]+'px',_0x4d3927[_0x4f658a(0x176)]===void 0x0?'':'bottom\x20'+_0x4d3927[_0x4f658a(0x176)]+'px'][_0x4f658a(0x158)](_0x350f7d=>_0x350f7d!=='');return _0x3fa086[_0x4f658a(0x17c)]===0x0?'-':_0x3fa086[_0x4f658a(0x173)](',\x20');}function O(_0x15c5a7){const _0x3de663=_0x4037ef;if(typeof _0x15c5a7!=_0x3de663(0x186)||_0x15c5a7[_0x3de663(0x161)]()==='')throw new e(_0x3de663(0x18d),_0x3de663(0x185));return _0x15c5a7;}export{e as UnitLayoutLintError,l as createUnitLayoutLint,t as isUnitLayoutLintError};
1
+ const _0x2b8321=_0xc35f;(function(_0x160c50,_0x444ec7){const _0x276d8d=_0xc35f,_0x123c5a=_0x160c50();while(!![]){try{const _0x9cb689=-parseInt(_0x276d8d(0x1d8))/0x1*(-parseInt(_0x276d8d(0x212))/0x2)+parseInt(_0x276d8d(0x241))/0x3+parseInt(_0x276d8d(0x1d0))/0x4*(-parseInt(_0x276d8d(0x1e3))/0x5)+-parseInt(_0x276d8d(0x22b))/0x6+parseInt(_0x276d8d(0x225))/0x7+parseInt(_0x276d8d(0x1a3))/0x8+-parseInt(_0x276d8d(0x1f0))/0x9;if(_0x9cb689===_0x444ec7)break;else _0x123c5a['push'](_0x123c5a['shift']());}catch(_0x46dbc2){_0x123c5a['push'](_0x123c5a['shift']());}}}(_0x2172,0x63291));import{createHash as _0x4a671c}from'node:crypto';var t=class extends Error{[_0x2b8321(0x1db)];constructor(_0xf0793d,_0x101577,_0x4bab0c){const _0x1ab87b=_0x2b8321;super(_0x101577,_0x4bab0c),this[_0x1ab87b(0x1a9)]=_0x1ab87b(0x1eb),this[_0x1ab87b(0x1db)]=_0xf0793d;}};function n(_0x42329b){return _0x42329b instanceof t;}async function r(_0x214ad8,_0x1ff34c){const _0x4b37fb=_0x2b8321;if(typeof _0x214ad8['unitData']['id']!=_0x4b37fb(0x199)||_0x214ad8[_0x4b37fb(0x18e)]['id'][_0x4b37fb(0x232)]()==='')throw new t(_0x4b37fb(0x22a),_0x4b37fb(0x177));let _0x739521=_0x214ad8[_0x4b37fb(0x1ed)]??_0x4b37fb(0x1ec);if(_0x739521!==_0x4b37fb(0x231)&&_0x739521!=='rendered'&&_0x739521!==_0x4b37fb(0x1ec))throw new t(_0x4b37fb(0x22a),_0x4b37fb(0x191));if(_0x214ad8[_0x4b37fb(0x19d)]!==void 0x0&&(_0x739521===_0x4b37fb(0x231)||_0x214ad8['includeLabelPlan']||_0x214ad8[_0x4b37fb(0x1da)]||_0x214ad8[_0x4b37fb(0x19f)]!==void 0x0))throw new t(_0x4b37fb(0x22a),'A\x20layout\x20plan\x20requires\x20rendered\x20Board\x20analysis\x20and\x20one\x20planning\x20request');if(_0x214ad8['includeLabelPlan']===!0x0&&_0x739521===_0x4b37fb(0x231))throw new t(_0x4b37fb(0x22a),_0x4b37fb(0x21e));if(_0x214ad8['includePortPlan']===!0x0&&_0x739521===_0x4b37fb(0x231))throw new t(_0x4b37fb(0x22a),_0x4b37fb(0x206));if(_0x214ad8['textPlanElementIds']!==void 0x0&&_0x739521===_0x4b37fb(0x231))throw new t(_0x4b37fb(0x22a),'Text\x20plans\x20require\x20rendered\x20Board\x20analysis');let _0x879d6c=_0x214ad8[_0x4b37fb(0x239)];if(_0x879d6c!==void 0x0&&!l(_0x879d6c))throw new t('INVALID_INPUT',_0x4b37fb(0x1de));if(_0x879d6c!==void 0x0&&_0x739521===_0x4b37fb(0x231))throw new t(_0x4b37fb(0x22a),_0x4b37fb(0x19b));let _0x2f3239=_0x214ad8[_0x4b37fb(0x18e)][_0x4b37fb(0x1ae)];if(!Array['isArray'](_0x2f3239)||_0x2f3239[_0x4b37fb(0x1b4)]===0x0||new Set(_0x2f3239)[_0x4b37fb(0x1d7)]!==_0x2f3239[_0x4b37fb(0x1b4)])throw new t('INVALID_INPUT',_0x4b37fb(0x1c5));if(_0x214ad8[_0x4b37fb(0x185)]?.[_0x4b37fb(0x1b4)]===0x0)throw new t(_0x4b37fb(0x22a),_0x4b37fb(0x1f1));let _0x56872=[...new Set((_0x214ad8[_0x4b37fb(0x185)]??_0x2f3239)[_0x4b37fb(0x1ef)](_0x29e124=>{const _0x302830=_0x4b37fb;let _0x1c6f0d=typeof _0x29e124==_0x302830(0x1d4)?_0x29e124-0x1:_0x2f3239[_0x302830(0x1bb)](_0x29e124),_0x4af8d5=_0x2f3239[_0x1c6f0d];if(!Number[_0x302830(0x21d)](_0x1c6f0d)||_0x1c6f0d<0x0||_0x4af8d5===void 0x0||!_0x214ad8[_0x302830(0x18e)]['pages'][_0x4af8d5])throw new t(_0x302830(0x22a),_0x302830(0x1fe)+String(_0x29e124));return _0x4af8d5;}))][_0x4b37fb(0x1ef)](_0x5699fe=>({'page':_0x2f3239[_0x4b37fb(0x1bb)](_0x5699fe)+0x1,'pageId':_0x5699fe})),_0x2e2d8a=_0x214ad8['textPlanElementIds'];if(_0x2e2d8a!==void 0x0&&(!Array[_0x4b37fb(0x233)](_0x2e2d8a)||_0x2e2d8a[_0x4b37fb(0x1ca)](_0x409ff8=>typeof _0x409ff8!='string'||_0x409ff8['trim']()==='')||new Set(_0x2e2d8a)[_0x4b37fb(0x1d7)]!==_0x2e2d8a[_0x4b37fb(0x1b4)]||_0x2e2d8a['some'](_0x515203=>!_0x56872[_0x4b37fb(0x1ca)](({pageId:_0x491c30})=>_0x214ad8['unitData']['pages'][_0x491c30]?.[_0x4b37fb(0x1e0)][_0x515203]?.[_0x4b37fb(0x182)]===_0x4b37fb(0x1e9)))))throw new t('INVALID_INPUT',_0x4b37fb(0x1c7));let _0x24b588=_0x214ad8[_0x4b37fb(0x17b)];if(_0x24b588!==void 0x0&&(!Number[_0x4b37fb(0x1c8)](_0x24b588)||_0x24b588<0x1||_0x24b588>0x2||!_0x2e2d8a?.[_0x4b37fb(0x1b4)]))throw new t(_0x4b37fb(0x22a),_0x4b37fb(0x1cd));let _0x46cd5a=structuredClone({'unitType':_0x214ad8[_0x4b37fb(0x1c9)],'unitData':_0x214ad8[_0x4b37fb(0x18e)],..._0x214ad8[_0x4b37fb(0x1f8)]===void 0x0?{}:{'formulaReferenceUnits':_0x214ad8[_0x4b37fb(0x1f8)]},..._0x214ad8[_0x4b37fb(0x23d)]===void 0x0?{}:{'embeddedUnits':_0x214ad8[_0x4b37fb(0x23d)]},'pages':_0x56872[_0x4b37fb(0x1ef)](({pageId:_0x5152b9})=>_0x5152b9),'focusPadding':0x30,..._0x879d6c===void 0x0?{}:{'maximumAutomaticLabelDistance':_0x879d6c},..._0x214ad8['layoutPlan']===void 0x0?{}:{'layoutPlan':_0x214ad8['layoutPlan']},..._0x214ad8[_0x4b37fb(0x187)]===!0x0?{'includeLabelPlan':!0x0}:{},..._0x214ad8[_0x4b37fb(0x1da)]===!0x0?{'includePortPlan':!0x0}:{},..._0x2e2d8a===void 0x0?{}:{'textPlanElementIds':_0x2e2d8a},..._0x24b588===void 0x0?{}:{'textPlanMaximumWidthGrowth':_0x24b588}}),_0x57a11b=_0x4a671c(_0x4b37fb(0x1a2))['update'](JSON[_0x4b37fb(0x1b7)](_0x46cd5a))[_0x4b37fb(0x18f)]('hex'),_0x1a2ea6=_0x739521==='both'?[_0x4b37fb(0x231),_0x4b37fb(0x245)]:[_0x739521],_0x4eca75=[],_0x1315a5=_0x56872[_0x4b37fb(0x1ef)](_0x3a789c=>({..._0x3a789c})),_0x550edc=[];for(let _0x2d3883 of _0x1a2ea6){_0x214ad8['signal']?.[_0x4b37fb(0x1f2)]();let _0x5d7f23=_0x2d3883==='model'?_0x1ff34c['modelRuntime']?.[_0x4b37fb(0x1c2)][_0x4b37fb(0x201)](_0x1ff34c['modelRuntime']):_0x1ff34c[_0x4b37fb(0x1b2)]!==void 0x0&&_0x4b37fb(0x1b1)in _0x1ff34c['runtime']?_0x1ff34c[_0x4b37fb(0x1b2)][_0x4b37fb(0x1b1)][_0x4b37fb(0x201)](_0x1ff34c[_0x4b37fb(0x1b2)]):void 0x0;if(_0x5d7f23===void 0x0){for(let {pageId:_0x15fcce}of _0x56872)_0x4eca75[_0x4b37fb(0x1e8)]({'pageId':_0x15fcce,'source':_0x2d3883,'reason':_0x4b37fb(0x250)});continue;}let _0x4879cc=structuredClone(_0x46cd5a);_0x2d3883==='model'&&(delete _0x4879cc[_0x4b37fb(0x1da)],delete _0x4879cc[_0x4b37fb(0x19d)],delete _0x4879cc[_0x4b37fb(0x239)],delete _0x4879cc['textPlanElementIds'],delete _0x4879cc[_0x4b37fb(0x17b)]);let _0x41e67d=await _0x5d7f23({..._0x4879cc,..._0x214ad8['signal']===void 0x0?{}:{'signal':_0x214ad8[_0x4b37fb(0x216)]}});_0x214ad8['signal']?.[_0x4b37fb(0x1f2)](),i(_0x41e67d,_0x56872[_0x4b37fb(0x1ef)](({pageId:_0x5c5f65})=>_0x5c5f65),_0x2d3883);for(let _0x289e0a of _0x1315a5){let _0x2d6da2=_0x41e67d['pages'][_0x4b37fb(0x222)](({pageId:_0x503717})=>_0x503717===_0x289e0a['pageId']),_0x50a2a3=_0x2d6da2?.[_0x4b37fb(0x224)];if(_0x50a2a3===void 0x0){_0x4eca75['push']({'pageId':_0x289e0a[_0x4b37fb(0x1ac)],'source':_0x2d3883,'reason':_0x4b37fb(0x190)});continue;}if(_0x289e0a[_0x2d3883]=_0x50a2a3,_0x2d3883===_0x4b37fb(0x245)&&_0x879d6c!==void 0x0&&!d(_0x50a2a3,_0x879d6c,_0x46cd5a[_0x4b37fb(0x18e)]['pages'][_0x289e0a[_0x4b37fb(0x1ac)]]['elements'])&&_0x4eca75[_0x4b37fb(0x1e8)]({'pageId':_0x289e0a['pageId'],'source':_0x2d3883,'reason':_0x4b37fb(0x20e)}),_0x2d3883===_0x4b37fb(0x245)&&_0x46cd5a[_0x4b37fb(0x19d)]!==void 0x0){let _0x49a3c=_0x2d6da2?.[_0x4b37fb(0x24b)];if(_0x49a3c===void 0x0)_0x4eca75['push']({'pageId':_0x289e0a['pageId'],'source':_0x2d3883,'reason':_0x4b37fb(0x1f7)});else{if(!a(_0x49a3c)||_0x49a3c[_0x4b37fb(0x20b)]!==_0x214ad8[_0x4b37fb(0x18e)]['id']||_0x49a3c[_0x4b37fb(0x1ac)]!==_0x289e0a[_0x4b37fb(0x1ac)]||_0x49a3c[_0x4b37fb(0x223)]!==_0x4b37fb(0x1e5)&&_0x49a3c[_0x4b37fb(0x223)]!==_0x4b37fb(0x215)||!Array[_0x4b37fb(0x233)](_0x49a3c[_0x4b37fb(0x1d5)])||!Array[_0x4b37fb(0x233)](_0x49a3c['patches'])||!Array[_0x4b37fb(0x233)](_0x49a3c['diagnostics']))throw new t('INVALID_RENDER_RESULT',_0x4b37fb(0x1fa));_0x289e0a['plan']=_0x49a3c,_0x49a3c[_0x4b37fb(0x223)]==='incomplete'&&_0x4eca75[_0x4b37fb(0x1e8)]({'pageId':_0x289e0a[_0x4b37fb(0x1ac)],'source':_0x2d3883,'reason':_0x4b37fb(0x1fc)});}}if(_0x2d3883===_0x4b37fb(0x245)&&_0x214ad8[_0x4b37fb(0x187)]===!0x0){if(_0x2d6da2?.[_0x4b37fb(0x1bd)]===void 0x0)_0x4eca75[_0x4b37fb(0x1e8)]({'pageId':_0x289e0a['pageId'],'source':_0x2d3883,'reason':'label-plan-unavailable'});else{if(_0x2d6da2[_0x4b37fb(0x1bd)]['unitId']!==_0x214ad8[_0x4b37fb(0x18e)]['id']||_0x2d6da2[_0x4b37fb(0x1bd)][_0x4b37fb(0x1ac)]!==_0x289e0a[_0x4b37fb(0x1ac)])throw new t(_0x4b37fb(0x208),_0x4b37fb(0x1c1));_0x289e0a[_0x4b37fb(0x1bd)]=_0x2d6da2[_0x4b37fb(0x1bd)];}}if(_0x2d3883===_0x4b37fb(0x245)&&_0x214ad8[_0x4b37fb(0x1da)]===!0x0){if(_0x2d6da2?.[_0x4b37fb(0x209)]===void 0x0)_0x4eca75[_0x4b37fb(0x1e8)]({'pageId':_0x289e0a[_0x4b37fb(0x1ac)],'source':_0x2d3883,'reason':'port-plan-unavailable'});else{if(_0x2d6da2[_0x4b37fb(0x209)][_0x4b37fb(0x20b)]!==_0x214ad8['unitData']['id']||_0x2d6da2['portPlan'][_0x4b37fb(0x1ac)]!==_0x289e0a['pageId']||_0x2d6da2[_0x4b37fb(0x209)][_0x4b37fb(0x223)]!==_0x4b37fb(0x1e5)&&_0x2d6da2[_0x4b37fb(0x209)][_0x4b37fb(0x223)]!=='incomplete')throw new t(_0x4b37fb(0x208),_0x4b37fb(0x230));_0x289e0a[_0x4b37fb(0x209)]=_0x2d6da2[_0x4b37fb(0x209)],_0x2d6da2[_0x4b37fb(0x209)]['status']===_0x4b37fb(0x215)&&_0x4eca75[_0x4b37fb(0x1e8)]({'pageId':_0x289e0a[_0x4b37fb(0x1ac)],'source':_0x2d3883,'reason':_0x4b37fb(0x18a)});}}_0x2d3883===_0x4b37fb(0x245)&&_0x46cd5a[_0x4b37fb(0x19f)]!==void 0x0&&(_0x2d6da2?.[_0x4b37fb(0x1fb)]===void 0x0?_0x4eca75[_0x4b37fb(0x1e8)]({'pageId':_0x289e0a[_0x4b37fb(0x1ac)],'source':_0x2d3883,'reason':_0x4b37fb(0x200)}):(f(_0x2d6da2['textPlan'],_0x214ad8[_0x4b37fb(0x18e)]['id'],_0x289e0a[_0x4b37fb(0x1ac)],_0x46cd5a['textPlanElementIds'],_0x46cd5a[_0x4b37fb(0x18e)][_0x4b37fb(0x185)][_0x289e0a[_0x4b37fb(0x1ac)]][_0x4b37fb(0x1e0)],_0x46cd5a[_0x4b37fb(0x17b)]),_0x289e0a[_0x4b37fb(0x1fb)]=_0x2d6da2[_0x4b37fb(0x1fb)],_0x2d6da2[_0x4b37fb(0x1fb)][_0x4b37fb(0x223)]===_0x4b37fb(0x215)&&_0x4eca75[_0x4b37fb(0x1e8)]({'pageId':_0x289e0a['pageId'],'source':_0x2d3883,'reason':_0x4b37fb(0x1f6)})));for(let _0x2366c7 of _0x50a2a3[_0x4b37fb(0x243)])_0x550edc[_0x4b37fb(0x1e8)]({..._0x2366c7,'page':_0x289e0a[_0x4b37fb(0x220)],'pageId':_0x289e0a['pageId'],'source':_0x2d3883,'fingerprint':_0x2d3883+':'+_0x289e0a[_0x4b37fb(0x1ac)]+':'+_0x2366c7[_0x4b37fb(0x251)]+':'+_0x2366c7['id']});}}for(let _0x5b1759 of _0x1315a5){let _0x5ca324=_0x739521===_0x4b37fb(0x231)?_0x4b37fb(0x231):_0x4b37fb(0x245),_0x25b461=_0x5b1759[_0x5ca324];(_0x25b461?.[_0x4b37fb(0x202)][_0x4b37fb(0x18c)]||_0x25b461?.[_0x4b37fb(0x17f)][_0x4b37fb(0x1ca)](_0x1fb215=>!_0x1fb215[_0x4b37fb(0x178)]))&&_0x4eca75[_0x4b37fb(0x1e8)]({'pageId':_0x5b1759[_0x4b37fb(0x1ac)],'source':_0x5ca324,'reason':_0x4b37fb(0x246)}),(_0x25b461?.[_0x4b37fb(0x243)][_0x4b37fb(0x1ca)](_0x4eead2=>_0x4eead2[_0x4b37fb(0x251)]===_0x4b37fb(0x247))||Object[_0x4b37fb(0x1d9)](_0x25b461?.[_0x4b37fb(0x23c)]??{})['some'](_0x20b817=>Object['values'](_0x20b817)[_0x4b37fb(0x1ca)](_0x2ed0d0=>_0x2ed0d0[_0x4b37fb(0x223)]===_0x4b37fb(0x17e))))&&_0x4eca75[_0x4b37fb(0x1e8)]({'pageId':_0x5b1759[_0x4b37fb(0x1ac)],'source':_0x5ca324,'reason':'unresolved-label'}),_0x25b461?.[_0x4b37fb(0x243)][_0x4b37fb(0x1ca)](_0x95611d=>_0x95611d[_0x4b37fb(0x251)]===_0x4b37fb(0x19e))&&_0x4eca75[_0x4b37fb(0x1e8)]({'pageId':_0x5b1759['pageId'],'source':_0x5ca324,'reason':'unresolved-element-text'});}return{'kind':_0x4b37fb(0x210),'unitId':_0x214ad8[_0x4b37fb(0x18e)]['id'],'unitType':_0x4b37fb(0x21b),'mode':_0x739521,'snapshotHash':_0x57a11b,'status':_0x4eca75['length']>0x0?_0x4b37fb(0x215):_0x550edc[_0x4b37fb(0x1b4)]>0x0?'findings':_0x4b37fb(0x1ad),'coverage':{'pages':_0x56872,'sources':_0x1a2ea6,'complete':_0x4eca75['length']===0x0,'incomplete':_0x4eca75,'limitations':_0x739521===_0x4b37fb(0x231)?['Model\x20analysis\x20does\x20not\x20establish\x20final\x20font\x20metrics\x20or\x20automatic\x20rendered\x20routes.']:_0x879d6c===void 0x0?[]:[_0x4b37fb(0x249)]},'analyses':_0x1315a5,'findings':_0x550edc};}function i(_0x558821,_0x439b22,_0x45db5f){const _0x307fc3=_0x2b8321;let _0x5edb85=new Set();for(let _0x862930 of _0x558821[_0x307fc3(0x185)]){if(!_0x439b22['includes'](_0x862930[_0x307fc3(0x1ac)])||_0x5edb85[_0x307fc3(0x203)](_0x862930[_0x307fc3(0x1ac)])||_0x862930[_0x307fc3(0x224)][_0x307fc3(0x1be)]!==_0x45db5f)throw new t(_0x307fc3(0x208),'Board\x20capture\x20contains\x20an\x20unexpected\x20page,\x20duplicate\x20page,\x20or\x20source');_0x5edb85[_0x307fc3(0x17a)](_0x862930[_0x307fc3(0x1ac)]);let {errorCount:_0x3b944d,warningCount:_0x2065d8,unresolvedConnectorCount:_0x84871d}=_0x862930[_0x307fc3(0x224)][_0x307fc3(0x202)];if([_0x3b944d,_0x2065d8,_0x84871d][_0x307fc3(0x1ca)](_0x29bf54=>!Number[_0x307fc3(0x205)](_0x29bf54)||_0x29bf54<0x0))throw new t(_0x307fc3(0x208),_0x307fc3(0x1bf));if(_0x3b944d!==_0x862930[_0x307fc3(0x224)][_0x307fc3(0x243)][_0x307fc3(0x20c)](({severity:_0x28dc48})=>_0x28dc48==='error')['length']||_0x2065d8!==_0x862930['analysis'][_0x307fc3(0x243)][_0x307fc3(0x20c)](({severity:_0x17f9ed})=>_0x17f9ed===_0x307fc3(0x217))[_0x307fc3(0x1b4)])throw new t(_0x307fc3(0x208),'Board\x20capture\x20issue\x20counts\x20do\x20not\x20match\x20its\x20summary');if(_0x862930[_0x307fc3(0x224)][_0x307fc3(0x23c)]!==void 0x0&&!s(_0x862930['analysis'][_0x307fc3(0x23c)]))throw new t(_0x307fc3(0x208),_0x307fc3(0x1b3));if(_0x862930[_0x307fc3(0x224)]['labelDistanceInspection']!==void 0x0&&(!a(_0x862930[_0x307fc3(0x224)][_0x307fc3(0x21f)])||!l(_0x862930['analysis'][_0x307fc3(0x21f)][_0x307fc3(0x239)])||_0x862930[_0x307fc3(0x224)][_0x307fc3(0x21f)][_0x307fc3(0x207)]!=='rendered-stroke-polyline-v1'))throw new t(_0x307fc3(0x208),_0x307fc3(0x1a0));for(let _0x218395 of _0x862930[_0x307fc3(0x224)][_0x307fc3(0x243)]){if(_0x218395[_0x307fc3(0x1a8)]!==void 0x0&&(!a(_0x218395['labelDistance'])||!l(_0x218395[_0x307fc3(0x1a8)][_0x307fc3(0x235)])||!l(_0x218395['labelDistance'][_0x307fc3(0x1d1)])))throw new t(_0x307fc3(0x208),_0x307fc3(0x22e));if(_0x218395[_0x307fc3(0x1d3)]!==void 0x0){let _0x378780=_0x218395[_0x307fc3(0x1d3)];if(!_0x378780||![_0x378780[_0x307fc3(0x196)],_0x378780['endRow'],_0x378780[_0x307fc3(0x1b8)],_0x378780['endColumn']][_0x307fc3(0x1df)](_0x23d43c=>Number[_0x307fc3(0x21d)](_0x23d43c)&&_0x23d43c>=0x0)||_0x378780[_0x307fc3(0x196)]>_0x378780['endRow']||_0x378780[_0x307fc3(0x1b8)]>_0x378780[_0x307fc3(0x1b0)])throw new t(_0x307fc3(0x208),_0x307fc3(0x197));}if(_0x218395[_0x307fc3(0x1d2)]!==void 0x0&&(!c(_0x218395[_0x307fc3(0x1d2)]?.['availableSize'],!0x1)||!c(_0x218395['textLayout']?.['contentSize'],!0x0)))throw new t(_0x307fc3(0x208),'Board\x20capture\x20contains\x20invalid\x20text\x20measurements');}}}function a(_0x4335b2){const _0x2ee8da=_0x2b8321;if(!_0x4335b2||typeof _0x4335b2!=_0x2ee8da(0x1b5)||Array['isArray'](_0x4335b2))return!0x1;let _0x17b16f=Object[_0x2ee8da(0x22c)](_0x4335b2);return _0x17b16f===Object['prototype']||_0x17b16f===null;}function o(_0x36e04a){const _0x35db48=_0x2b8321;return a(_0x36e04a)&&c(_0x36e04a,!0x0)&&[_0x36e04a['left'],_0x36e04a[_0x35db48(0x1cb)]][_0x35db48(0x1df)](_0x15ad02=>typeof _0x15ad02==_0x35db48(0x1d4)&&Number['isFinite'](_0x15ad02));}function s(_0x3466c9){const _0xc1941d=_0x2b8321;if(!a(_0x3466c9))return!0x1;for(let [_0x178b78,_0x4175cb]of Object[_0xc1941d(0x1e7)](_0x3466c9)){if(_0x178b78[_0xc1941d(0x232)]()===''||!a(_0x4175cb))return!0x1;for(let [_0x7f0e15,_0xe40acc]of Object[_0xc1941d(0x1e7)](_0x4175cb)){if(_0x7f0e15[_0xc1941d(0x232)]()===''||!a(_0xe40acc))return!0x1;if(_0xe40acc[_0xc1941d(0x223)]==='unresolved'){if(Reflect[_0xc1941d(0x21a)](_0xe40acc)[_0xc1941d(0x1b4)]!==0x1||!Object[_0xc1941d(0x1f9)][_0xc1941d(0x20f)][_0xc1941d(0x1fd)](_0xe40acc,_0xc1941d(0x223)))return!0x1;continue;}if(_0xe40acc['status']!==_0xc1941d(0x1e5)||_0xe40acc[_0xc1941d(0x218)]!==void 0x0&&!u(_0xe40acc['automaticLabelDistance'])||!o(_0xe40acc[_0xc1941d(0x252)])||!o(_0xe40acc[_0xc1941d(0x244)])||typeof _0xe40acc[_0xc1941d(0x1ea)]!=_0xc1941d(0x1d4)||!Number[_0xc1941d(0x1c8)](_0xe40acc[_0xc1941d(0x1ea)])||!a(_0xe40acc[_0xc1941d(0x19c)])||!c(_0xe40acc[_0xc1941d(0x19c)],!0x0)||!a(_0xe40acc[_0xc1941d(0x1a1)])||!c(_0xe40acc[_0xc1941d(0x1a1)],!0x0)||![_0xe40acc[_0xc1941d(0x19a)],_0xe40acc[_0xc1941d(0x1f3)],_0xe40acc[_0xc1941d(0x1c0)]][_0xc1941d(0x1df)](_0x4e7220=>typeof _0x4e7220=='boolean'))return!0x1;}}return!0x0;}function c(_0x92ec8c,_0x26b4b5){const _0x13bbf2=_0x2b8321;if(!_0x92ec8c||typeof _0x92ec8c!=_0x13bbf2(0x1b5))return!0x1;let _0xb6d8bf=_0x92ec8c;return[_0xb6d8bf['width'],_0xb6d8bf[_0x13bbf2(0x221)]][_0x13bbf2(0x1df)](_0x546817=>typeof _0x546817==_0x13bbf2(0x1d4)&&Number[_0x13bbf2(0x1c8)](_0x546817)&&(_0x26b4b5?_0x546817>=0x0:_0x546817>0x0));}function l(_0x5e4c81){const _0x24cbf2=_0x2b8321;return typeof _0x5e4c81=='number'&&Number[_0x24cbf2(0x1c8)](_0x5e4c81)&&_0x5e4c81>=0x0;}function u(_0x1f20b5){const _0x2f7fee=_0x2b8321;return a(_0x1f20b5)?_0x1f20b5['status']===_0x2f7fee(0x1e5)?l(_0x1f20b5[_0x2f7fee(0x254)]):_0x1f20b5[_0x2f7fee(0x223)]==='excluded'?typeof _0x1f20b5[_0x2f7fee(0x1cf)]==_0x2f7fee(0x199)&&[_0x2f7fee(0x19a),_0x2f7fee(0x24a),_0x2f7fee(0x1c6)]['includes'](_0x1f20b5[_0x2f7fee(0x1cf)]):_0x1f20b5[_0x2f7fee(0x223)]==='unresolved'&&Reflect[_0x2f7fee(0x21a)](_0x1f20b5)[_0x2f7fee(0x1b4)]===0x1:!0x1;}function d(_0x1f91d8,_0x3545d5,_0x5dde7a){const _0x3cadf6=_0x2b8321;let _0x52173c=_0x1f91d8[_0x3cadf6(0x21f)];if(_0x52173c===void 0x0)return!0x1;if(_0x52173c[_0x3cadf6(0x239)]!==_0x3545d5)throw new t(_0x3cadf6(0x208),_0x3cadf6(0x1dd));let _0x36a172=_0x1f91d8[_0x3cadf6(0x23c)];if(_0x36a172===void 0x0)return!0x1;let _0x144f40=!0x0;for(let _0x2708f0 of _0x1f91d8[_0x3cadf6(0x17f)]){let _0x2f75a7=_0x5dde7a[_0x2708f0[_0x3cadf6(0x1ba)]];if(!(!_0x2f75a7||!('connectorData'in _0x2f75a7))){for(let _0x476feb of _0x2f75a7[_0x3cadf6(0x1cc)]['labels']??[])Object[_0x3cadf6(0x227)](_0x36a172[_0x2708f0[_0x3cadf6(0x1ba)]]??{},_0x476feb['id'])||(_0x144f40=!0x1);}}for(let [_0x2ea052,_0x4fe7d5]of Object[_0x3cadf6(0x1e7)](_0x36a172))for(let [_0x39eaee,_0x2e1db4]of Object[_0x3cadf6(0x1e7)](_0x4fe7d5)){if(_0x2e1db4[_0x3cadf6(0x223)]===_0x3cadf6(0x17e)||_0x2e1db4[_0x3cadf6(0x218)]===void 0x0){_0x144f40=!0x1;continue;}let _0x1883ab=_0x2e1db4[_0x3cadf6(0x218)];if(_0x1883ab[_0x3cadf6(0x223)]==='unresolved'&&(_0x144f40=!0x1),_0x1883ab['status']===_0x3cadf6(0x204)&&_0x1883ab[_0x3cadf6(0x1cf)]===_0x3cadf6(0x19a)!==_0x2e1db4['empty']||_0x1883ab[_0x3cadf6(0x223)]==='ready'&&_0x2e1db4[_0x3cadf6(0x19a)])throw new t(_0x3cadf6(0x208),_0x3cadf6(0x1af));if(_0x1883ab['status']===_0x3cadf6(0x1e5)&&_0x1883ab['distance']>_0x3545d5+0.001&&!_0x1f91d8[_0x3cadf6(0x243)][_0x3cadf6(0x1ca)](_0x5b15fa=>_0x5b15fa[_0x3cadf6(0x251)]===_0x3cadf6(0x17c)&&_0x5b15fa[_0x3cadf6(0x1b6)][_0x3cadf6(0x184)](_0x2ea052)&&_0x5b15fa[_0x3cadf6(0x211)]?.[_0x3cadf6(0x184)](_0x39eaee)))throw new t('INVALID_RENDER_RESULT','Missing\x20native\x20label-distance\x20finding');}for(let _0x250c32 of _0x1f91d8[_0x3cadf6(0x243)]){if(_0x250c32['rule']!==_0x3cadf6(0x17c)&&_0x250c32['rule']!==_0x3cadf6(0x189))continue;let _0x1ffabf=_0x250c32[_0x3cadf6(0x1b6)][0x0],_0x4bd863=_0x250c32[_0x3cadf6(0x211)]?.[0x0],_0xdbd6bc=_0x1ffabf&&_0x4bd863?_0x36a172[_0x1ffabf]?.[_0x4bd863]:void 0x0,_0x2ccb5d=_0xdbd6bc?.[_0x3cadf6(0x223)]==='ready'?_0xdbd6bc[_0x3cadf6(0x218)]:void 0x0,_0x4be535=_0x250c32[_0x3cadf6(0x251)]===_0x3cadf6(0x17c)?_0x2ccb5d?.['status']===_0x3cadf6(0x1e5)&&_0x2ccb5d[_0x3cadf6(0x254)]>_0x3545d5+0.001&&_0x250c32[_0x3cadf6(0x23e)]==='error'&&_0x250c32['labelDistance']?.[_0x3cadf6(0x235)]===_0x2ccb5d[_0x3cadf6(0x254)]&&_0x250c32[_0x3cadf6(0x1a8)]?.[_0x3cadf6(0x1d1)]===_0x3545d5:_0x2ccb5d?.[_0x3cadf6(0x223)]===_0x3cadf6(0x17e)&&_0x250c32[_0x3cadf6(0x23e)]===_0x3cadf6(0x217)&&_0x250c32[_0x3cadf6(0x1a8)]===void 0x0;if(_0x250c32[_0x3cadf6(0x1b6)][_0x3cadf6(0x1b4)]!==0x1||_0x250c32[_0x3cadf6(0x211)]?.[_0x3cadf6(0x1b4)]!==0x1||!_0x4be535)throw new t('INVALID_RENDER_RESULT',_0x3cadf6(0x240));}return _0x144f40;}function f(_0x48a6c7,_0x25bb36,_0x972f8c,_0x29a403,_0x32e268,_0x381330){const _0x5d4f7e=_0x2b8321;let _0x4e6c56=()=>{const _0x359718=_0xc35f;throw new t(_0x359718(0x208),_0x359718(0x1f5));};(!a(_0x48a6c7)||_0x48a6c7['unitId']!==_0x25bb36||_0x48a6c7[_0x5d4f7e(0x1ac)]!==_0x972f8c||_0x48a6c7[_0x5d4f7e(0x223)]!==_0x5d4f7e(0x1e5)&&_0x48a6c7[_0x5d4f7e(0x223)]!==_0x5d4f7e(0x215)||!Array[_0x5d4f7e(0x233)](_0x48a6c7[_0x5d4f7e(0x183)])||!Array[_0x5d4f7e(0x233)](_0x48a6c7['preconditions']))&&_0x4e6c56();let _0x567a01=new Set(_0x29a403),_0xea2e63=new Set();for(let _0x155bc8 of _0x48a6c7['patches']){(!a(_0x155bc8)||typeof _0x155bc8['elementId']!='string'||!_0x567a01[_0x5d4f7e(0x203)](_0x155bc8['elementId'])||_0xea2e63[_0x5d4f7e(0x203)](_0x155bc8[_0x5d4f7e(0x181)])||_0x32e268[_0x155bc8[_0x5d4f7e(0x181)]]?.['type']!==_0x5d4f7e(0x1e9)||Object[_0x5d4f7e(0x1e2)](_0x155bc8)[_0x5d4f7e(0x1ca)](_0x4dc446=>_0x4dc446!==_0x5d4f7e(0x181)&&_0x4dc446!==_0x5d4f7e(0x22f))||!a(_0x155bc8[_0x5d4f7e(0x22f)]))&&_0x4e6c56();let _0x8ef450=_0x155bc8[_0x5d4f7e(0x22f)],_0x24c401=_0x32e268[_0x155bc8[_0x5d4f7e(0x181)]][_0x5d4f7e(0x22f)];(Object['keys'](_0x8ef450)['some'](_0x322468=>_0x322468!=='width'&&_0x322468!==_0x5d4f7e(0x221))||typeof _0x8ef450[_0x5d4f7e(0x214)]!=_0x5d4f7e(0x1d4)||!Number[_0x5d4f7e(0x1c8)](_0x8ef450[_0x5d4f7e(0x214)])||_0x8ef450[_0x5d4f7e(0x214)]<=0x0||_0x8ef450['width']<(_0x24c401[_0x5d4f7e(0x214)]??0x0)||_0x381330!==void 0x0&&_0x8ef450['width']>(_0x24c401[_0x5d4f7e(0x214)]??0x0)*_0x381330||typeof _0x8ef450[_0x5d4f7e(0x221)]!=_0x5d4f7e(0x1d4)||!Number['isFinite'](_0x8ef450['height'])||_0x8ef450[_0x5d4f7e(0x221)]<=0x0||_0x8ef450[_0x5d4f7e(0x221)]<(_0x24c401[_0x5d4f7e(0x221)]??0x0))&&_0x4e6c56(),_0xea2e63[_0x5d4f7e(0x17a)](_0x155bc8['elementId']);}}var p=0x2,m=0x6,h=0.02,g=0.15,_=0.5,v=new Set([_0x2b8321(0x252),_0x2b8321(0x226)]),y=[_0x2b8321(0x1dc),_0x2b8321(0x24e),_0x2b8321(0x1e6)];function _0x2172(){const _0xeff354=['textPlanElementIds','Invalid\x20label-distance\x20receipt','requiredSize','sha256','3258520TxzlIN','\x20by\x20','slice','round','Unit\x20layout\x20lint\x20supports\x20Slide\x20and\x20Board\x20only','labelDistance','name','text','box','pageId','clean','pageOrder','Contradictory\x20empty-label\x20distance','endColumn','captureBoardLayout','runtime','Board\x20capture\x20contains\x20invalid\x20connector\x20label\x20measurements','length','object','connectorIds','stringify','startColumn','right\x20','connectorId','indexOf','zIndex','labelPlan','source','Board\x20capture\x20contains\x20invalid\x20summary\x20counts','endpointConstrained','Label\x20plan\x20targets\x20an\x20unexpected\x20Unit\x20or\x20page','captureBoardModelLayout','Render\x20result\x20contains\x20unrequested\x20Slide\x20pages','\x20=\x20','Board\x20pageOrder\x20must\x20contain\x20unique\x20page\x20IDs','endpoint-role','textPlanElementIds\x20must\x20select\x20unique\x20non-empty\x20shape\x20IDs\x20on\x20the\x20requested\x20pages','isFinite','unitType','some','top','connectorData','textPlanMaximumWidthGrowth\x20requires\x20selected\x20shape\x20IDs\x20and\x20a\x20finite\x20number\x20from\x201\x20to\x202','pageWidth','reason','216wTBuVD','maximum','textLayout','tableRange','number','preconditions','top\x20','size','220526wxqDvm','values','includePortPlan','code','text-off-page','Label-distance\x20threshold\x20was\x20not\x20echoed','maximumAutomaticLabelDistance\x20must\x20be\x20a\x20finite\x20non-negative\x20number','every','elements','\x20overlaps\x20\x22','keys','37150JLkZSF','layout:','ready','text-overlaps-text','entries','push','shape','angleRadians','UnitLayoutLintError','both','mode','pageHeight','map','10000998AwbIwi','pages\x20must\x20not\x20be\x20empty','throwIfAborted','overflow','ink','Text\x20plan\x20does\x20not\x20match\x20its\x20requested\x20Unit,\x20page\x20or\x20shape-size\x20selection','text-plan-incomplete','layout-plan-unavailable','formulaReferenceUnits','prototype','Layout\x20plan\x20has\x20an\x20unexpected\x20Unit,\x20page,\x20status\x20or\x20payload','textPlan','layout-plan-incomplete','call','Board\x20page\x20selector\x20is\x20invalid:\x20','element','text-plan-unavailable','bind','summary','has','excluded','isSafeInteger','Port\x20plans\x20require\x20rendered\x20Board\x20analysis','metric','INVALID_RENDER_RESULT','portPlan','fill','unitId','filter','area','automatic-label-distance-unavailable','hasOwnProperty','unit-layout-lint','labelIds','4cEWxnC','captureSlideLayout','width','incomplete','signal','warning','automaticLabelDistance','slideOrder','ownKeys','board','fingerprint','isInteger','Label\x20plans\x20require\x20rendered\x20Board\x20analysis','labelDistanceInspection','page','height','find','status','analysis','4813991MfxiJA','roundRect','hasOwn','Slide\x20page\x20selector\x20is\x20invalid:\x20','startsWith','INVALID_INPUT','1803234YzQLIH','getPrototypeOf','text\x20\x22','Invalid\x20label-distance\x20evidence','transform','Port\x20plan\x20has\x20an\x20unexpected\x20Unit,\x20page\x20or\x20status','model','trim','isArray','right','measured',');\x20ink\x20','slide','shapeType','maximumAutomaticLabelDistance','\x20\x20opacity\x20','max','connectorLabelLayouts','embeddedUnits','severity','get','Contradictory\x20native\x20label-distance\x20finding','2049186uBTnET','opacity','issues','bounds','rendered','unresolved-route','connector-label-layout-unresolved','bottom','Automatic\x20label\x20distance\x20uses\x20the\x20native\x20sampled,\x20marker-trimmed\x20stroke\x20centerline\x20before\x20dash\x20gaps\x20and\x20label\x20clipping;\x20it\x20is\x20not\x20raster-ink\x20distance.','authored-placement','plan','Slide\x20layout\x20runtime\x20is\x20required','elementType','text-escapes-container','localeCompare','runtime-unavailable','rule','rect',',\x20page\x20','distance','Board\x20unitData.id\x20is\x20required','resolved','\x22\x20runs\x20off\x20the\x20page\x20(','add','textPlanMaximumWidthGrowth','connector-label-distance-exceeded','content','unresolved','routes','left','elementId','type','patches','includes','pages','none','includeLabelPlan','findIndex','connector-label-distance-unresolved','port-plan-incomplete','left\x20','unresolvedConnectorCount','replace','unitData','digest','analysis-missing','Board\x20mode\x20must\x20be\x20model,\x20rendered,\x20or\x20both','min','%\x20of\x20the\x20smaller\x20glyph\x20band;\x20ink\x20','Slide\x20unitData.id\x20is\x20required','color','startRow','Board\x20capture\x20contains\x20an\x20invalid\x20table\x20cell\x20range','sort','string','empty','Label\x20distance\x20requires\x20rendered\x20Board\x20analysis','outerSize','layoutPlan','element-text-layout-unresolved'];_0x2172=function(){return _0xeff354;};return _0x2172();}function b(_0x21ddbb){return{async 'lint'(_0x4d5432){const _0x2692a7=_0xc35f;if(_0x4d5432[_0x2692a7(0x1c9)]===_0x2692a7(0x21b))return await r(_0x4d5432,_0x21ddbb);if(_0x4d5432[_0x2692a7(0x1c9)]!==_0x2692a7(0x237))throw new t(_0x2692a7(0x22a),_0x2692a7(0x1a7));if(_0x2692a7(0x239)in _0x4d5432&&_0x4d5432[_0x2692a7(0x239)]!==void 0x0)throw new t('INVALID_INPUT','Label\x20distance\x20is\x20only\x20supported\x20for\x20Board');let _0x4d0ed9=z(_0x4d5432[_0x2692a7(0x18e)]['id']),_0x1095ec=x(_0x4d5432[_0x2692a7(0x18e)][_0x2692a7(0x219)]??[],_0x4d5432[_0x2692a7(0x185)]);if(_0x21ddbb[_0x2692a7(0x1b2)]===void 0x0||!(_0x2692a7(0x213)in _0x21ddbb['runtime']))throw new t('INVALID_INPUT',_0x2692a7(0x24c));let _0x41f865=await _0x21ddbb[_0x2692a7(0x1b2)][_0x2692a7(0x213)]({'unitType':_0x2692a7(0x237),'unitData':_0x4d5432['unitData'],..._0x4d5432[_0x2692a7(0x1f8)]===void 0x0?{}:{'formulaReferenceUnits':_0x4d5432[_0x2692a7(0x1f8)]},'pages':_0x1095ec['map'](({page:_0x42152d})=>_0x42152d),..._0x4d5432[_0x2692a7(0x216)]===void 0x0?{}:{'signal':_0x4d5432[_0x2692a7(0x216)]}});return S(_0x41f865,_0x1095ec),{'kind':_0x2692a7(0x210),'unitId':_0x4d0ed9,'unitType':_0x2692a7(0x237),'coverage':{'pages':_0x1095ec,'rules':y},'findings':C(_0x41f865)};}};}function x(_0x3d6a25,_0xd26d90){const _0x470db7=_0x2b8321;if(_0x3d6a25[_0x470db7(0x1b4)]===0x0)throw new t(_0x470db7(0x22a),'Slide\x20has\x20no\x20pages\x20to\x20lint');if(_0xd26d90!==void 0x0&&_0xd26d90[_0x470db7(0x1b4)]===0x0)throw new t('INVALID_INPUT',_0x470db7(0x1f1));let _0x181fb9=_0xd26d90??_0x3d6a25[_0x470db7(0x1ef)]((_0x4e2b2f,_0x3168a6)=>_0x3168a6+0x1),_0x786110=new Set(),_0x5466b6=[];for(let _0x15647a of _0x181fb9){let _0x228483=typeof _0x15647a==_0x470db7(0x1d4)?_0x15647a:_0x3d6a25[_0x470db7(0x188)](_0xeee160=>_0xeee160===_0x15647a)+0x1;if(!Number[_0x470db7(0x21d)](_0x228483)||_0x228483<0x1||_0x228483>_0x3d6a25[_0x470db7(0x1b4)])throw new t(_0x470db7(0x22a),_0x470db7(0x228)+String(_0x15647a));let _0x29dd48=_0x3d6a25[_0x228483-0x1];_0x786110[_0x470db7(0x203)](_0x29dd48)||(_0x786110[_0x470db7(0x17a)](_0x29dd48),_0x5466b6[_0x470db7(0x1e8)]({'page':_0x228483,'pageId':_0x29dd48}));}return _0x5466b6;}function S(_0x2d278c,_0x3f1ba0){const _0x1b80e0=_0x2b8321;let _0x2c6656=new Map();for(let _0x20ca11 of _0x2d278c[_0x1b80e0(0x185)]){let _0x1f11b4=_0x2c6656[_0x1b80e0(0x23f)](_0x20ca11[_0x1b80e0(0x1ac)])??[];_0x1f11b4[_0x1b80e0(0x1e8)](_0x20ca11),_0x2c6656['set'](_0x20ca11[_0x1b80e0(0x1ac)],_0x1f11b4);}for(let _0x3c0b39 of _0x3f1ba0){let _0x23f878=_0x2c6656[_0x1b80e0(0x23f)](_0x3c0b39['pageId'])??[];if(_0x23f878[_0x1b80e0(0x1b4)]!==0x1||_0x23f878[0x0]?.['page']!==_0x3c0b39[_0x1b80e0(0x220)])throw new t(_0x1b80e0(0x208),'Render\x20result\x20does\x20not\x20contain\x20exactly\x20one\x20matching\x20page\x20'+_0x3c0b39[_0x1b80e0(0x1ac)]);let _0x382040=_0x23f878[0x0]['elements']['map'](({elementId:_0x2aead6})=>_0x2aead6);if(new Set(_0x382040)[_0x1b80e0(0x1d7)]!==_0x382040[_0x1b80e0(0x1b4)])throw new t('INVALID_RENDER_RESULT','Render\x20result\x20contains\x20duplicate\x20element\x20identities\x20on\x20page\x20'+_0x3c0b39['pageId']);}if(_0x2d278c[_0x1b80e0(0x185)][_0x1b80e0(0x1b4)]!==_0x3f1ba0[_0x1b80e0(0x1b4)])throw new t(_0x1b80e0(0x208),_0x1b80e0(0x1c3));}function C(_0x3ac437){const _0x4d5d4a=_0x2b8321;let _0x5efdfc=[];for(let _0x4cf8b9 of _0x3ac437[_0x4d5d4a(0x185)]){let _0x59a7ac=_0x4cf8b9[_0x4d5d4a(0x1e0)][_0x4d5d4a(0x20c)](_0x36770e=>!_0x36770e['elementId'][_0x4d5d4a(0x229)](_0x4d5d4a(0x1e4))),_0x3006b8=_0x59a7ac[_0x4d5d4a(0x20c)](_0x53393d=>_0x53393d[_0x4d5d4a(0x1aa)]!==void 0x0&&_0x53393d[_0x4d5d4a(0x1aa)][_0x4d5d4a(0x17d)][_0x4d5d4a(0x232)]()!=='');for(let _0x52d55b of _0x3006b8){let _0x39d8fe=T(_0x52d55b[_0x4d5d4a(0x1aa)]['ink']),_0x1246e0={..._0x39d8fe[_0x4d5d4a(0x180)]<-0x2?{'left':O(-_0x39d8fe[_0x4d5d4a(0x180)])}:{},..._0x39d8fe[_0x4d5d4a(0x1cb)]<-0x2?{'top':O(-_0x39d8fe['top'])}:{},..._0x39d8fe[_0x4d5d4a(0x234)]>_0x4cf8b9['pageWidth']+p?{'right':O(_0x39d8fe[_0x4d5d4a(0x234)]-_0x4cf8b9['pageWidth'])}:{},..._0x39d8fe[_0x4d5d4a(0x248)]>_0x4cf8b9[_0x4d5d4a(0x1ee)]+p?{'bottom':O(_0x39d8fe['bottom']-_0x4cf8b9[_0x4d5d4a(0x1ee)])}:{}},_0x32c96f=R(_0x1246e0);if(_0x32c96f!=='-'){let _0x58471f=j(_0x52d55b),_0x51b2e6=A({'left':0x0,'top':0x0,'width':_0x4cf8b9[_0x4d5d4a(0x1ce)],'height':_0x4cf8b9[_0x4d5d4a(0x1ee)]});_0x5efdfc[_0x4d5d4a(0x1e8)](w({'page':_0x4cf8b9[_0x4d5d4a(0x220)],'pageId':_0x4cf8b9[_0x4d5d4a(0x1ac)],'rule':_0x4d5d4a(0x1dc),'id':_0x52d55b[_0x4d5d4a(0x181)],'text':_0x58471f,'pageBox':_0x51b2e6,'overflow':_0x1246e0,'detail':_0x4d5d4a(0x22d)+k(_0x58471f[_0x4d5d4a(0x17d)])+_0x4d5d4a(0x179)+_0x32c96f+_0x4d5d4a(0x236)+F(_0x58471f[_0x4d5d4a(0x1f4)])+_0x4d5d4a(0x253)+F(_0x51b2e6)}));}}for(let _0x5cf749 of _0x3006b8){let _0x4506f6=L(_0x5cf749,_0x59a7ac,_0x4cf8b9);if(_0x4506f6===void 0x0)continue;let _0x589ccf=T(_0x5cf749['text'][_0x4d5d4a(0x1f4)]),_0x3c164d=T(_0x4506f6['declared']),_0x5c0893=Math[_0x4d5d4a(0x23b)](m,h*(_0x3c164d[_0x4d5d4a(0x234)]-_0x3c164d[_0x4d5d4a(0x180)])),_0x3eb3f4={..._0x3c164d[_0x4d5d4a(0x180)]-_0x589ccf[_0x4d5d4a(0x180)]>_0x5c0893?{'left':O(_0x3c164d['left']-_0x589ccf['left'])}:{},..._0x589ccf['right']-_0x3c164d[_0x4d5d4a(0x234)]>_0x5c0893?{'right':O(_0x589ccf[_0x4d5d4a(0x234)]-_0x3c164d[_0x4d5d4a(0x234)])}:{},..._0x589ccf['bottom']-_0x3c164d[_0x4d5d4a(0x248)]>_0x5c0893?{'bottom':O(_0x589ccf['bottom']-_0x3c164d[_0x4d5d4a(0x248)])}:{}},_0x278c87=R(_0x3eb3f4);if(_0x278c87!=='-'){let _0x446da7=j(_0x5cf749),_0x3c4003=N(_0x4506f6);_0x5efdfc[_0x4d5d4a(0x1e8)](w({'page':_0x4cf8b9['page'],'pageId':_0x4cf8b9['pageId'],'rule':_0x4d5d4a(0x24e),'id':_0x5cf749['elementId'],'related':_0x4506f6[_0x4d5d4a(0x181)],'text':_0x446da7,'container':_0x3c4003,'overflow':_0x3eb3f4,'detail':_0x4d5d4a(0x22d)+k(_0x446da7['content'])+'\x22\x20escapes\x20'+_0x3c4003['id']+'\x20('+_0x278c87+_0x4d5d4a(0x236)+F(_0x446da7[_0x4d5d4a(0x1f4)])+',\x20'+_0x3c4003['id']+_0x4d5d4a(0x1c4)+_0x3c4003[_0x4d5d4a(0x182)]+'\x20'+P(_0x3c4003['fill'])+'\x20'+F(_0x3c4003[_0x4d5d4a(0x1ab)])}));}}for(let _0x5c31d4=0x0;_0x5c31d4<_0x3006b8[_0x4d5d4a(0x1b4)];_0x5c31d4+=0x1)for(let _0x4106cd=_0x5c31d4+0x1;_0x4106cd<_0x3006b8[_0x4d5d4a(0x1b4)];_0x4106cd+=0x1){let _0xc019f4=_0x3006b8[_0x5c31d4],_0x520fe3=_0x3006b8[_0x4106cd],_0x58880a=T(_0xc019f4[_0x4d5d4a(0x1aa)]['ink']),_0x3336af=T(_0x520fe3[_0x4d5d4a(0x1aa)][_0x4d5d4a(0x1f4)]),_0xdd8a35=E(D(_0x58880a,_0x3336af));if(_0xdd8a35<=0x1)continue;let _0x2b2194=_0xdd8a35/Math[_0x4d5d4a(0x23b)](0x1,Math[_0x4d5d4a(0x192)](E(_0x58880a),E(_0x3336af)));if(_0x2b2194<=g)continue;let _0x3d7929=j(_0xc019f4),_0x2da3e2=j(_0x520fe3);_0x5efdfc[_0x4d5d4a(0x1e8)](w({'page':_0x4cf8b9[_0x4d5d4a(0x220)],'pageId':_0x4cf8b9[_0x4d5d4a(0x1ac)],'rule':'text-overlaps-text','id':_0xc019f4[_0x4d5d4a(0x181)],'related':_0x520fe3[_0x4d5d4a(0x181)],'text':_0x3d7929,'other':_0x2da3e2,'overlapRatio':Math[_0x4d5d4a(0x1a6)](_0x2b2194*0x64)/0x64,'detail':_0x4d5d4a(0x22d)+k(_0x3d7929['content'])+'\x22'+M(_0x3d7929)+_0x4d5d4a(0x1e1)+k(_0x2da3e2[_0x4d5d4a(0x17d)])+'\x22'+M(_0x2da3e2)+_0x4d5d4a(0x1a4)+Math[_0x4d5d4a(0x1a6)](_0x2b2194*0x64)+_0x4d5d4a(0x193)+F(_0x3d7929[_0x4d5d4a(0x1f4)])+',\x20'+F(_0x2da3e2[_0x4d5d4a(0x1f4)])}));}}return _0x5efdfc[_0x4d5d4a(0x198)]((_0xda3c3b,_0x381980)=>_0xda3c3b[_0x4d5d4a(0x21c)][_0x4d5d4a(0x24f)](_0x381980[_0x4d5d4a(0x21c)]));}function w(_0x3b86c8){const _0x205599=_0x2b8321;return{..._0x3b86c8,'fingerprint':[_0x3b86c8[_0x205599(0x251)],_0x3b86c8[_0x205599(0x1ac)],_0x3b86c8['id'],_0x3b86c8['related']??'']['join'](':'),'severity':_0x205599(0x217)};}function T(_0x5a8994){const _0x50e3ab=_0x2b8321;return{'left':_0x5a8994[_0x50e3ab(0x180)],'top':_0x5a8994[_0x50e3ab(0x1cb)],'right':_0x5a8994[_0x50e3ab(0x180)]+_0x5a8994[_0x50e3ab(0x214)],'bottom':_0x5a8994[_0x50e3ab(0x1cb)]+_0x5a8994[_0x50e3ab(0x221)]};}function E(_0x3d6b4b){const _0x24062c=_0x2b8321;return Math['max'](0x0,_0x3d6b4b[_0x24062c(0x234)]-_0x3d6b4b[_0x24062c(0x180)])*Math[_0x24062c(0x23b)](0x0,_0x3d6b4b[_0x24062c(0x248)]-_0x3d6b4b[_0x24062c(0x1cb)]);}function D(_0x316f4a,_0x508f64){const _0x1f819b=_0x2b8321;return{'left':Math[_0x1f819b(0x23b)](_0x316f4a[_0x1f819b(0x180)],_0x508f64['left']),'top':Math['max'](_0x316f4a['top'],_0x508f64[_0x1f819b(0x1cb)]),'right':Math[_0x1f819b(0x192)](_0x316f4a[_0x1f819b(0x234)],_0x508f64[_0x1f819b(0x234)]),'bottom':Math[_0x1f819b(0x192)](_0x316f4a[_0x1f819b(0x248)],_0x508f64['bottom'])};}function O(_0x487604){const _0x30563d=_0x2b8321;return Math[_0x30563d(0x1a6)](_0x487604);}function k(_0x403258){const _0x37180d=_0x2b8321;let _0x440986=_0x403258[_0x37180d(0x18d)](/\s+/gu,'\x20')['trim']();return _0x440986[_0x37180d(0x1b4)]<=0x10?_0x440986:_0x440986[_0x37180d(0x1a5)](0x0,0x10)+'…';}function A(_0x506e73){const _0x163ef1=_0x2b8321;return{'left':O(_0x506e73[_0x163ef1(0x180)]),'top':O(_0x506e73['top']),'width':O(_0x506e73[_0x163ef1(0x214)]),'height':O(_0x506e73[_0x163ef1(0x221)])};}function j(_0x3df76a){const _0x2a04f1=_0x2b8321;let _0x5a9029=_0x3df76a[_0x2a04f1(0x1aa)];return{'id':_0x3df76a[_0x2a04f1(0x181)],'content':_0x5a9029[_0x2a04f1(0x17d)],'ink':A(_0x5a9029[_0x2a04f1(0x1f4)]),..._0x5a9029[_0x2a04f1(0x195)]===void 0x0?{}:{'color':_0x5a9029[_0x2a04f1(0x195)]},..._0x5a9029[_0x2a04f1(0x242)]===void 0x0?{}:{'opacity':_0x5a9029[_0x2a04f1(0x242)]}};}function M(_0x3a5246){const _0x445b3f=_0x2b8321;return _0x3a5246[_0x445b3f(0x195)]===void 0x0&&_0x3a5246[_0x445b3f(0x242)]===void 0x0?'':''+(_0x3a5246[_0x445b3f(0x195)]===void 0x0?'':'\x20\x20'+_0x3a5246[_0x445b3f(0x195)])+(_0x3a5246[_0x445b3f(0x242)]===void 0x0?'':_0x445b3f(0x23a)+_0x3a5246[_0x445b3f(0x242)]);}function N(_0x415313){const _0x4c9f85=_0x2b8321;return{'id':_0x415313['elementId'],'type':_0x415313['shapeType']===void 0x0?_0x415313[_0x4c9f85(0x24d)]:_0x415313['elementType']+':'+_0x415313[_0x4c9f85(0x238)],..._0x415313[_0x4c9f85(0x20a)]===void 0x0?{}:{'fill':_0x415313[_0x4c9f85(0x20a)]},'box':A(_0x415313['declared'])};}function P(_0x37f075){const _0x10846e=_0x2b8321;if(_0x37f075===void 0x0)return'no\x20fill';let _0x164897=_0x37f075['opacity']===void 0x0||_0x37f075[_0x10846e(0x242)]===0x1?'':'\x20@'+_0x37f075['opacity'];return((_0x37f075['type']??'?')+'\x20'+(_0x37f075[_0x10846e(0x195)]??'')+_0x164897)[_0x10846e(0x232)]();}function F(_0x33f7a7){const _0x1a1a9d=_0x2b8321;return'('+_0x33f7a7['left']+','+_0x33f7a7[_0x1a1a9d(0x1cb)]+'\x20'+_0x33f7a7[_0x1a1a9d(0x214)]+'×'+_0x33f7a7[_0x1a1a9d(0x221)]+')';}function I(_0x51be74){const _0x177daa=_0x2b8321;let _0x4f520e=_0x51be74[_0x177daa(0x20a)];return!(_0x4f520e===void 0x0||_0x4f520e[_0x177daa(0x182)]===_0x177daa(0x186)||_0x4f520e[_0x177daa(0x242)]!==void 0x0&&_0x4f520e[_0x177daa(0x242)]<_||_0x51be74[_0x177daa(0x238)]===void 0x0||!v[_0x177daa(0x203)](_0x51be74[_0x177daa(0x238)])||_0x51be74['visible']===!0x1);}function L(_0x2c45ea,_0x10468c,_0x31a3a7){const _0x18a7f4=_0x2b8321;let _0x280a34=T(_0x2c45ea[_0x18a7f4(0x1aa)][_0x18a7f4(0x1f4)]),_0x5bb9fa;for(let _0xfd3eaf of _0x10468c){if(_0xfd3eaf['zIndex']>=_0x2c45ea[_0x18a7f4(0x1bc)]||!I(_0xfd3eaf))continue;let _0x4496c9=T(_0xfd3eaf['declared']),_0x5916d8=E(_0x4496c9);if(_0x5916d8>=0.5*_0x31a3a7[_0x18a7f4(0x1ce)]*_0x31a3a7[_0x18a7f4(0x1ee)])continue;let _0x582c3f=_0x280a34[_0x18a7f4(0x1cb)]>=_0x4496c9[_0x18a7f4(0x1cb)]-p&&_0x280a34['bottom']<=_0x4496c9['bottom']+p,_0x5f1292=_0x280a34['left']>=_0x4496c9[_0x18a7f4(0x180)]-p&&_0x280a34['left']<=_0x4496c9[_0x18a7f4(0x234)]+p&&_0x280a34[_0x18a7f4(0x1cb)]>=_0x4496c9['top']-p,_0x58f939=E(D(_0x280a34,_0x4496c9))/Math[_0x18a7f4(0x23b)](E(_0x280a34),0x1);!_0x582c3f||!_0x5f1292||_0x58f939<0.35||(_0x5bb9fa===void 0x0||_0x5916d8<_0x5bb9fa[_0x18a7f4(0x20d)])&&(_0x5bb9fa={'element':_0xfd3eaf,'area':_0x5916d8});}return _0x5bb9fa?.[_0x18a7f4(0x1ff)];}function R(_0x25d0cb){const _0x35d395=_0x2b8321;let _0x3c355f=[_0x25d0cb[_0x35d395(0x180)]===void 0x0?'':_0x35d395(0x18b)+_0x25d0cb[_0x35d395(0x180)]+'px',_0x25d0cb['top']===void 0x0?'':_0x35d395(0x1d6)+_0x25d0cb[_0x35d395(0x1cb)]+'px',_0x25d0cb[_0x35d395(0x234)]===void 0x0?'':_0x35d395(0x1b9)+_0x25d0cb[_0x35d395(0x234)]+'px',_0x25d0cb[_0x35d395(0x248)]===void 0x0?'':'bottom\x20'+_0x25d0cb[_0x35d395(0x248)]+'px'][_0x35d395(0x20c)](_0x23aeb3=>_0x23aeb3!=='');return _0x3c355f['length']===0x0?'-':_0x3c355f['join'](',\x20');}function z(_0x4c8c75){const _0xc947d4=_0x2b8321;if(typeof _0x4c8c75!=_0xc947d4(0x199)||_0x4c8c75[_0xc947d4(0x232)]()==='')throw new t(_0xc947d4(0x22a),_0xc947d4(0x194));return _0x4c8c75;}function _0xc35f(_0x280c09,_0x1d48e1){_0x280c09=_0x280c09-0x177;const _0x217274=_0x2172();let _0xc35fec=_0x217274[_0x280c09];return _0xc35fec;}export{t as UnitLayoutLintError,b as createUnitLayoutLint,n as isUnitLayoutLintError};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@univer-cli/unit-layout-lint",
3
3
  "type": "module",
4
- "version": "1.4.0",
4
+ "version": "1.6.0",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
@@ -18,6 +18,6 @@
18
18
  "README.zh-CN.md"
19
19
  ],
20
20
  "dependencies": {
21
- "@univer-cli/univer-render-runtime": "1.4.0"
21
+ "@univer-cli/univer-render-runtime": "1.6.0"
22
22
  }
23
23
  }