@embedpdf/viewer-chrome 3.0.0-next.13 → 3.0.0-next.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/README.md +175 -132
  2. package/dist/annotation-fonts-BqoLZ4Mp.js +80 -0
  3. package/dist/annotation-fonts-BqoLZ4Mp.js.map +1 -0
  4. package/dist/annotation-fonts-Dt0IQXhz.cjs +91 -0
  5. package/dist/annotation-fonts-Dt0IQXhz.cjs.map +1 -0
  6. package/dist/annotation-style--rPIZsuP.js +879 -0
  7. package/dist/annotation-style--rPIZsuP.js.map +1 -0
  8. package/dist/annotation-style-Bzvvp8-N.cjs +879 -0
  9. package/dist/annotation-style-Bzvvp8-N.cjs.map +1 -0
  10. package/dist/ar-D9XKAmDx.js +567 -0
  11. package/dist/ar-D9XKAmDx.js.map +1 -0
  12. package/dist/ar-DnEj5vbP.cjs +567 -0
  13. package/dist/ar-DnEj5vbP.cjs.map +1 -0
  14. package/dist/chrome.cjs +378 -221
  15. package/dist/chrome.cjs.map +1 -1
  16. package/dist/chrome.d.cts +5 -34
  17. package/dist/chrome.d.ts +5 -34
  18. package/dist/chrome.js +377 -218
  19. package/dist/chrome.js.map +1 -1
  20. package/dist/commands-BmgxhJ8B.js +953 -0
  21. package/dist/commands-BmgxhJ8B.js.map +1 -0
  22. package/dist/commands-CYt4SFUX.cjs +1060 -0
  23. package/dist/commands-CYt4SFUX.cjs.map +1 -0
  24. package/dist/commands.cjs +12 -595
  25. package/dist/commands.d.cts +29 -4
  26. package/dist/commands.d.ts +29 -4
  27. package/dist/commands.js +2 -593
  28. package/dist/comments-panel-MUVgLCBI.js +514 -0
  29. package/dist/comments-panel-MUVgLCBI.js.map +1 -0
  30. package/dist/comments-panel-pEcQg4Vs.cjs +514 -0
  31. package/dist/comments-panel-pEcQg4Vs.cjs.map +1 -0
  32. package/dist/de-Bdr4aWzm.js +566 -0
  33. package/dist/de-Bdr4aWzm.js.map +1 -0
  34. package/dist/de-Dv6zvbnd.cjs +566 -0
  35. package/dist/de-Dv6zvbnd.cjs.map +1 -0
  36. package/dist/dialog-B5GBisKv.js +55 -0
  37. package/dist/dialog-B5GBisKv.js.map +1 -0
  38. package/dist/dialog-t8F13BL_.cjs +60 -0
  39. package/dist/dialog-t8F13BL_.cjs.map +1 -0
  40. package/dist/es-BP09DR9w.cjs +566 -0
  41. package/dist/es-BP09DR9w.cjs.map +1 -0
  42. package/dist/es-BSXz5tBv.js +566 -0
  43. package/dist/es-BSXz5tBv.js.map +1 -0
  44. package/dist/form-design-panel-B5MXTZ96.cjs +418 -0
  45. package/dist/form-design-panel-B5MXTZ96.cjs.map +1 -0
  46. package/dist/form-design-panel-vWWU9uB-.js +418 -0
  47. package/dist/form-design-panel-vWWU9uB-.js.map +1 -0
  48. package/dist/fr-BBQQn7tJ.cjs +566 -0
  49. package/dist/fr-BBQQn7tJ.cjs.map +1 -0
  50. package/dist/fr-Ckn3K9v1.js +566 -0
  51. package/dist/fr-Ckn3K9v1.js.map +1 -0
  52. package/dist/he-DRsG7bH7.cjs +567 -0
  53. package/dist/he-DRsG7bH7.cjs.map +1 -0
  54. package/dist/he-wdGU5PkU.js +567 -0
  55. package/dist/he-wdGU5PkU.js.map +1 -0
  56. package/dist/icons-BrK5iVL8.js +856 -0
  57. package/dist/icons-BrK5iVL8.js.map +1 -0
  58. package/dist/icons-x0Tc05bs.cjs +1010 -0
  59. package/dist/icons-x0Tc05bs.cjs.map +1 -0
  60. package/dist/index.cjs +3162 -5106
  61. package/dist/index.cjs.map +1 -1
  62. package/dist/index.d.cts +636 -143
  63. package/dist/index.d.ts +636 -143
  64. package/dist/index.js +3083 -4975
  65. package/dist/index.js.map +1 -1
  66. package/dist/it-BuP4o0xQ.cjs +566 -0
  67. package/dist/it-BuP4o0xQ.cjs.map +1 -0
  68. package/dist/it-Us-VmvIu.js +566 -0
  69. package/dist/it-Us-VmvIu.js.map +1 -0
  70. package/dist/ja-Cizj0-5O.js +566 -0
  71. package/dist/ja-Cizj0-5O.js.map +1 -0
  72. package/dist/ja-DovEd6ts.cjs +566 -0
  73. package/dist/ja-DovEd6ts.cjs.map +1 -0
  74. package/dist/ko-B-qJEol2.cjs +566 -0
  75. package/dist/ko-B-qJEol2.cjs.map +1 -0
  76. package/dist/ko-DlrXliE1.js +566 -0
  77. package/dist/ko-DlrXliE1.js.map +1 -0
  78. package/dist/labels-BiM9wp9K.cjs +21 -0
  79. package/dist/labels-BiM9wp9K.cjs.map +1 -0
  80. package/dist/labels-C6_i87Oj.js +16 -0
  81. package/dist/labels-C6_i87Oj.js.map +1 -0
  82. package/dist/link-editor-CSjqPnj1.cjs +125 -0
  83. package/dist/link-editor-CSjqPnj1.cjs.map +1 -0
  84. package/dist/link-editor-SxM1nnJU.js +125 -0
  85. package/dist/link-editor-SxM1nnJU.js.map +1 -0
  86. package/dist/measurement-Bs61XWbJ.js +325 -0
  87. package/dist/measurement-Bs61XWbJ.js.map +1 -0
  88. package/dist/measurement-CcCsHPOX.cjs +326 -0
  89. package/dist/measurement-CcCsHPOX.cjs.map +1 -0
  90. package/dist/nl-0aF7M_0h.js +566 -0
  91. package/dist/nl-0aF7M_0h.js.map +1 -0
  92. package/dist/nl-D3KZDDiJ.cjs +566 -0
  93. package/dist/nl-D3KZDDiJ.cjs.map +1 -0
  94. package/dist/pl-BW--AaCI.js +566 -0
  95. package/dist/pl-BW--AaCI.js.map +1 -0
  96. package/dist/pl-DSFhAUqx.cjs +566 -0
  97. package/dist/pl-DSFhAUqx.cjs.map +1 -0
  98. package/dist/pt-C5S-8MC5.cjs +566 -0
  99. package/dist/pt-C5S-8MC5.cjs.map +1 -0
  100. package/dist/pt-DIhpU5pT.js +566 -0
  101. package/dist/pt-DIhpU5pT.js.map +1 -0
  102. package/dist/redact-confirm-B6j36TPw.js +83 -0
  103. package/dist/redact-confirm-B6j36TPw.js.map +1 -0
  104. package/dist/redact-confirm-CX_SY2ZN.cjs +83 -0
  105. package/dist/redact-confirm-CX_SY2ZN.cjs.map +1 -0
  106. package/dist/redaction-panel-BmoIl-Ll.cjs +96 -0
  107. package/dist/redaction-panel-BmoIl-Ll.cjs.map +1 -0
  108. package/dist/redaction-panel-IJDshSJI.js +96 -0
  109. package/dist/redaction-panel-IJDshSJI.js.map +1 -0
  110. package/dist/search-panel-HfIhJm1M.js +249 -0
  111. package/dist/search-panel-HfIhJm1M.js.map +1 -0
  112. package/dist/search-panel-s9IoiOtv.cjs +249 -0
  113. package/dist/search-panel-s9IoiOtv.cjs.map +1 -0
  114. package/dist/sheet-BDsa_Sup.cjs +442 -0
  115. package/dist/sheet-BDsa_Sup.cjs.map +1 -0
  116. package/dist/sheet-R6XDgyEf.js +365 -0
  117. package/dist/sheet-R6XDgyEf.js.map +1 -0
  118. package/dist/sign-dialog-CgnR7akj.cjs +155 -0
  119. package/dist/sign-dialog-CgnR7akj.cjs.map +1 -0
  120. package/dist/sign-dialog-GDqCoQhA.js +155 -0
  121. package/dist/sign-dialog-GDqCoQhA.js.map +1 -0
  122. package/dist/signature-inspector-DyO313Qf.cjs +166 -0
  123. package/dist/signature-inspector-DyO313Qf.cjs.map +1 -0
  124. package/dist/signature-inspector-okFz8do6.js +166 -0
  125. package/dist/signature-inspector-okFz8do6.js.map +1 -0
  126. package/dist/signature-maker-BhCmYyHD.js +393 -0
  127. package/dist/signature-maker-BhCmYyHD.js.map +1 -0
  128. package/dist/signature-maker-BoYa8vgA.cjs +393 -0
  129. package/dist/signature-maker-BoYa8vgA.cjs.map +1 -0
  130. package/dist/signatures-panel-B56PC6d9.cjs +300 -0
  131. package/dist/signatures-panel-B56PC6d9.cjs.map +1 -0
  132. package/dist/signatures-panel-CgnFfhFm.js +300 -0
  133. package/dist/signatures-panel-CgnFfhFm.js.map +1 -0
  134. package/dist/stamp-store-BHvRs-Do.cjs +147 -0
  135. package/dist/stamp-store-BHvRs-Do.cjs.map +1 -0
  136. package/dist/stamp-store-WuF-L3Jj.js +112 -0
  137. package/dist/stamp-store-WuF-L3Jj.js.map +1 -0
  138. package/dist/stamps-panel-B9NYGayn.cjs +231 -0
  139. package/dist/stamps-panel-B9NYGayn.cjs.map +1 -0
  140. package/dist/stamps-panel-CDO0FPyK.js +231 -0
  141. package/dist/stamps-panel-CDO0FPyK.js.map +1 -0
  142. package/dist/toolbar-CJu2wKTU.cjs +1659 -0
  143. package/dist/toolbar-CJu2wKTU.cjs.map +1 -0
  144. package/dist/toolbar-z9od3tKl.js +1564 -0
  145. package/dist/toolbar-z9od3tKl.js.map +1 -0
  146. package/dist/zh-cn-3tmMeHqv.cjs +566 -0
  147. package/dist/zh-cn-3tmMeHqv.cjs.map +1 -0
  148. package/dist/zh-cn-CxkUUBct.js +566 -0
  149. package/dist/zh-cn-CxkUUBct.js.map +1 -0
  150. package/package.json +6 -4
  151. package/src/styles.css +153 -89
  152. package/dist/commands.cjs.map +0 -1
  153. package/dist/commands.js.map +0 -1
  154. package/dist/es-DYwzfxyt.cjs +0 -293
  155. package/dist/es-DYwzfxyt.cjs.map +0 -1
  156. package/dist/es-sN6uqBgD.js +0 -293
  157. package/dist/es-sN6uqBgD.js.map +0 -1
@@ -0,0 +1,1010 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+ //#endregion
23
+ const require_chrome = require("./chrome.cjs");
24
+ let react = require("react");
25
+ react = __toESM(react, 1);
26
+ let _embedpdf_core_ui = require("@embedpdf/core-ui");
27
+ let react_jsx_runtime = require("react/jsx-runtime");
28
+ //#region src/config/viewer-commands.ts
29
+ /**
30
+ * Your commands, as the `commands` config gives them, over the built-in ones.
31
+ *
32
+ * A command of yours is the headless command, with functions that get the viewer's words:
33
+ * `get` takes a plugin's name (`get('selection')`) as well as its token, and `viewer` is the
34
+ * viewer `onReady` gets. One with a built-in id merges over the built-in command, so what it
35
+ * leaves out stays: `{ id: 'document:download', run }` keeps Download's label, icon, shortcut
36
+ * and checks. A shortcut of yours takes its keys from every built-in command that has them, so
37
+ * a key runs your command and the built-in one's tooltip no longer shows it.
38
+ */
39
+ const FUNCTIONS = [
40
+ "iconAccent",
41
+ "allowed",
42
+ "enabled",
43
+ "active",
44
+ "visible",
45
+ "run"
46
+ ];
47
+ /** Fields that go together: giving one of them replaces all of the built-in command's. */
48
+ const TOGETHER = [["label", "labelKey"], [
49
+ "run",
50
+ "menu",
51
+ "panel",
52
+ "modal"
53
+ ]];
54
+ /** The viewer's words over a command's context: plugins by name, and the viewer. */
55
+ function viewerContextOf(context, scope) {
56
+ const tokenOf = (plugin) => typeof plugin !== "string" ? plugin : Object.prototype.hasOwnProperty.call(scope.plugins, plugin) ? scope.plugins[plugin] ?? null : null;
57
+ const get = ((plugin) => {
58
+ const token = tokenOf(plugin);
59
+ if (!token) throw new Error(`[embedpdf] the viewer has no plugin named "${String(plugin)}". Its plugins: ${Object.keys(scope.plugins).join(", ")}.`);
60
+ return context.get(token);
61
+ });
62
+ const tryGet = ((plugin) => {
63
+ const token = tokenOf(plugin);
64
+ return token ? context.tryGet(token) : null;
65
+ });
66
+ return {
67
+ documentId: context.documentId,
68
+ ...context.args === void 0 ? {} : { args: context.args },
69
+ ...context.signal ? { signal: context.signal } : {},
70
+ get,
71
+ tryGet,
72
+ get viewer() {
73
+ const viewer = scope.viewer();
74
+ if (!viewer) throw new Error("[embedpdf] the viewer is not live yet");
75
+ return viewer;
76
+ }
77
+ };
78
+ }
79
+ /** A command of yours as the commands plugin takes it: each function gets the viewer's words. */
80
+ function toPluginCommand(command, scope) {
81
+ const contexts = /* @__PURE__ */ new WeakMap();
82
+ const contextOf = (context) => {
83
+ let viewerContext = contexts.get(context);
84
+ if (!viewerContext) {
85
+ viewerContext = viewerContextOf(context, scope);
86
+ contexts.set(context, viewerContext);
87
+ }
88
+ return viewerContext;
89
+ };
90
+ const converted = { ...command };
91
+ for (const name of FUNCTIONS) {
92
+ const given = command[name];
93
+ if (given) converted[name] = (context) => given(contextOf(context));
94
+ }
95
+ return converted;
96
+ }
97
+ /** A built-in command with yours over it: what yours gives replaces, the rest stays. */
98
+ function mergeCommand(builtIn, yours) {
99
+ const merged = { ...builtIn };
100
+ for (const fields of TOGETHER) {
101
+ if (!fields.some((field) => yours[field] !== void 0)) continue;
102
+ for (const field of fields) delete merged[field];
103
+ }
104
+ for (const [field, value] of Object.entries(yours)) if (value !== void 0) merged[field] = value;
105
+ return merged;
106
+ }
107
+ const shortcutsOf = (command) => command.shortcut === void 0 ? [] : [].concat(command.shortcut);
108
+ /** No commands of yours: the built-in ones as they are. */
109
+ const NO_VIEWER_COMMANDS = {
110
+ commands: [],
111
+ isYours: () => false,
112
+ over: (builtIn) => builtIn
113
+ };
114
+ /**
115
+ * Your commands over the built-in ones. A later command of yours with an id that's taken
116
+ * replaces the earlier one. `isMac` says which keys `Mod` is, to tell two shortcuts apart.
117
+ */
118
+ function resolveViewerCommands(builtIns, given, scope, options) {
119
+ const yours = /* @__PURE__ */ new Map();
120
+ for (const command of given) yours.set(command.id, toPluginCommand(command, scope));
121
+ const taken = [...yours.values()].flatMap(shortcutsOf);
122
+ const isTaken = (shortcut) => taken.some((key) => {
123
+ try {
124
+ return (0, _embedpdf_core_ui.sameShortcut)(key, shortcut, options);
125
+ } catch {
126
+ return false;
127
+ }
128
+ });
129
+ const over = (builtIn) => {
130
+ const shortcuts = shortcutsOf(builtIn);
131
+ const kept = shortcuts.filter((shortcut) => !isTaken(shortcut));
132
+ const base = kept.length === shortcuts.length ? builtIn : {
133
+ ...builtIn,
134
+ shortcut: kept
135
+ };
136
+ const own = yours.get(builtIn.id);
137
+ return own ? mergeCommand(base, own) : base;
138
+ };
139
+ const builtInIds = new Set(builtIns.map((command) => command.id));
140
+ return {
141
+ commands: [...builtIns.map(over), ...[...yours.values()].filter((command) => !builtInIds.has(command.id))],
142
+ isYours: (id) => yours.has(id) && !builtInIds.has(id),
143
+ over
144
+ };
145
+ }
146
+ //#endregion
147
+ //#region src/config-context.tsx
148
+ /**
149
+ * The resolved customization, as React context. The `layout` option and the
150
+ * user's extra icons are resolved once in <FullViewer>; the layout at the
151
+ * viewer's current size is resolved by <LayoutRoot> (layout-root.tsx), and read
152
+ * here by the shell, menus and strips — no component imports the default
153
+ * layout directly, so "the host changed the layout" is invisible below this
154
+ * line.
155
+ *
156
+ * The default context values are the default config and the default layout:
157
+ * components render correctly in tests and stories without a provider.
158
+ */
159
+ const ViewerConfigContext = (0, react.createContext)({
160
+ icons: {},
161
+ viewerCommands: NO_VIEWER_COMMANDS,
162
+ stamp: {},
163
+ signature: {},
164
+ fonts: []
165
+ });
166
+ const ViewerConfigProvider = ViewerConfigContext.Provider;
167
+ /** The `layout` option, for <LayoutRoot> to resolve at the viewer's size. */
168
+ function useLayoutOption() {
169
+ return (0, react.useContext)(ViewerConfigContext).layout;
170
+ }
171
+ /** Tells the app a panel's new width: what the panel frame calls once the user has resized it. */
172
+ function usePanelResize() {
173
+ const { onPanelResize } = (0, react.useContext)(ViewerConfigContext);
174
+ return (event) => onPanelResize?.(event);
175
+ }
176
+ /** The env before the viewer is measured, and without a <LayoutRoot>. */
177
+ const DEFAULT_ENV = {
178
+ size: "expanded",
179
+ width: _embedpdf_core_ui.EXPANDED_MIN_WIDTH_PX,
180
+ touch: false,
181
+ dir: "ltr"
182
+ };
183
+ /**
184
+ * The bars over a selection of this kind as one bar, read through `bar`: one bar as it is, or
185
+ * several as one, their groups in bar order and named after their bar so the names stay unique.
186
+ */
187
+ function stripOf(data, target, bar) {
188
+ const bars = (0, _embedpdf_core_ui.barsAt)(data, target).map(bar).filter((each) => each !== null);
189
+ if (bars.length <= 1) return bars[0] ?? null;
190
+ const sections = {};
191
+ for (const name of [
192
+ "start",
193
+ "center",
194
+ "end"
195
+ ]) {
196
+ const groups = bars.flatMap((each) => (each.sections[name] ?? []).map((group) => ({
197
+ ...group,
198
+ id: `${each.id}.${group.id}`
199
+ })));
200
+ if (groups.length > 0) sections[name] = groups;
201
+ }
202
+ return {
203
+ id: target,
204
+ sections
205
+ };
206
+ }
207
+ /** The layout as plain reads of its data: no bar leaves anything out. */
208
+ function staticResolvedLayout(data, env) {
209
+ const bar = (id) => (0, _embedpdf_core_ui.compileBar)(data, id);
210
+ return {
211
+ data,
212
+ env,
213
+ bar,
214
+ strip: (target) => stripOf(data, target, bar),
215
+ menu: (id) => (0, _embedpdf_core_ui.menuOf)(data, id)
216
+ };
217
+ }
218
+ const ResolvedLayoutContext = (0, react.createContext)(staticResolvedLayout(require_chrome.DEFAULT_LAYOUT, DEFAULT_ENV));
219
+ const ResolvedLayoutProvider = ResolvedLayoutContext.Provider;
220
+ function useResolvedLayout() {
221
+ return (0, react.useContext)(ResolvedLayoutContext);
222
+ }
223
+ /** The viewer's env: its size, width, whether it's touched, and its direction. */
224
+ function useLayoutEnv() {
225
+ return (0, react.useContext)(ResolvedLayoutContext).env;
226
+ }
227
+ /** A menu's sections from the layout, or `null` for a menu it doesn't have. */
228
+ function useMenu(id) {
229
+ return (0, react.useContext)(ResolvedLayoutContext).menu(id);
230
+ }
231
+ /** The bars over a selection of this kind, as one bar; `undefined` when the layout has none. */
232
+ function useStripSchema(target) {
233
+ return (0, react.useContext)(ResolvedLayoutContext).strip(target) ?? void 0;
234
+ }
235
+ /** Your commands over the built-in ones: what the layout's panel and mode commands merge under. */
236
+ function useViewerCommands() {
237
+ return (0, react.useContext)(ViewerConfigContext).viewerCommands;
238
+ }
239
+ function useCustomIcons() {
240
+ return (0, react.useContext)(ViewerConfigContext).icons;
241
+ }
242
+ function useStampSettings() {
243
+ return (0, react.useContext)(ViewerConfigContext).stamp;
244
+ }
245
+ function useSignatureSettings() {
246
+ return (0, react.useContext)(ViewerConfigContext).signature;
247
+ }
248
+ function useConfiguredFonts() {
249
+ return (0, react.useContext)(ViewerConfigContext).fonts;
250
+ }
251
+ //#endregion
252
+ //#region src/ui/icons.tsx
253
+ /**
254
+ * Icon set — Tabler-style stroke icons as path data, rendered by one <Icon>
255
+ * component. Stroke-based (currentColor); a few glyphs carry filled sub-paths,
256
+ * marked `fill: true`. The names are API: a command's `icon` names one, and an
257
+ * icon of yours with the same name replaces it everywhere it shows.
258
+ *
259
+ * Accent slots: a tool glyph tags the sub-paths that preview the tool's
260
+ * drawing defaults — `stroke`/`fill: 'primary' | 'secondary'` paint from the
261
+ * command's resolved `iconAccent`. With no accent, a slotted stroke inherits
262
+ * currentColor and a slotted fill renders nothing — pixel-identical to the
263
+ * untagged glyph, so non-tool surfaces never change.
264
+ */
265
+ const isPathList = (paths) => Array.isArray(paths);
266
+ /** An icon's paths as the renderer draws them: filled ones carry `fill: true`. */
267
+ function pathsOfIcon(icon) {
268
+ if (typeof icon === "string") return [icon];
269
+ if (isPathList(icon)) return icon;
270
+ const paths = typeof icon.paths === "string" ? [icon.paths] : icon.paths;
271
+ if (!icon.fill) return paths;
272
+ return paths.map((path) => typeof path === "string" ? {
273
+ d: path,
274
+ fill: true
275
+ } : path);
276
+ }
277
+ const measurementOutline = [{
278
+ d: "M5 4H19M20 5V19M19 20H5M4 19V5",
279
+ stroke: "primary"
280
+ }, {
281
+ d: "M3.1 3.1h1.8v1.8H3.1zM19.1 3.1h1.8v1.8h-1.8zM3.1 19.1h1.8v1.8H3.1zM19.1 19.1h1.8v1.8h-1.8z",
282
+ stroke: "primary"
283
+ }];
284
+ const ICON_PATHS = {
285
+ ruler: ["M3 8h18v8H3z", "M7 8v4M11 8v2M15 8v4M19 8v2"],
286
+ distance: [{
287
+ d: "M5 12H19",
288
+ stroke: "primary",
289
+ strokeDasharray: "2 2"
290
+ }, {
291
+ d: "M3.5 10.5a1.5 1.5 0 1 0 0 3a1.5 1.5 0 1 0 0-3M20.5 10.5a1.5 1.5 0 1 0 0 3a1.5 1.5 0 1 0 0-3",
292
+ stroke: "primary",
293
+ fill: "primary",
294
+ fillOpacity: .25
295
+ }],
296
+ perimeter: measurementOutline,
297
+ area: [
298
+ {
299
+ d: "M5 4H19V5H20V19H19V20H5V19H4V5H5Z",
300
+ fill: "primary",
301
+ fillOpacity: .08
302
+ },
303
+ {
304
+ d: "M4.5 7.5L7.5 4.5M4.5 10.5L10.5 4.5M4.5 13.5L13.5 4.5M4.5 16.5L16.5 4.5M4.5 19.5L19.5 4.5M7.5 19.5L19.5 7.5M10.5 19.5L19.5 10.5M13.5 19.5L19.5 13.5M16.5 19.5L19.5 16.5",
305
+ stroke: "primary",
306
+ strokeWidth: .6,
307
+ strokeOpacity: .5
308
+ },
309
+ ...measurementOutline
310
+ ],
311
+ alertTriangle: ["M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"],
312
+ alignBottom: [
313
+ "M3 19v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",
314
+ "M11 17h2",
315
+ "M9 14h6",
316
+ "M10 11h4"
317
+ ],
318
+ alignCenter: [
319
+ "M4 6l16 0",
320
+ "M8 12l8 0",
321
+ "M6 18l12 0"
322
+ ],
323
+ alignLeft: [
324
+ "M4 6l16 0",
325
+ "M4 12l10 0",
326
+ "M4 18l14 0"
327
+ ],
328
+ alignMiddle: [
329
+ "M3 19v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",
330
+ "M11 15h2",
331
+ "M9 12h6",
332
+ "M10 9h4"
333
+ ],
334
+ alignRight: [
335
+ "M4 6l16 0",
336
+ "M10 12l10 0",
337
+ "M6 18l14 0"
338
+ ],
339
+ alignTop: [
340
+ "M3 19v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",
341
+ "M11 13h2",
342
+ "M9 10h6",
343
+ "M10 7h4"
344
+ ],
345
+ arrowBackUp: ["M9 14l-4 -4l4 -4", "M5 10h11a4 4 0 1 1 0 8h-1"],
346
+ arrowForwardUp: ["M15 14l4 -4l-4 -4", "M19 10h-11a4 4 0 1 0 0 8h1"],
347
+ bold: ["M7 5h6a3.5 3.5 0 0 1 0 7h-6z", "M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7"],
348
+ book: [
349
+ "M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0",
350
+ "M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0",
351
+ "M3 6l0 13",
352
+ "M12 6l0 13",
353
+ "M21 6l0 13"
354
+ ],
355
+ book2: [
356
+ "M19 4v16h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12z",
357
+ "M19 16h-12a2 2 0 0 0 -2 2",
358
+ "M9 8h6"
359
+ ],
360
+ calibrate: [
361
+ "M12 12m-7.5 0a7.5 7.5 0 1 0 15 0a7.5 7.5 0 1 0 -15 0",
362
+ "M12 2.75V7M12 17V21.25M2.75 12H7M17 12H21.25",
363
+ "M12 12m-2.5 0a2.5 2.5 0 1 0 5 0a2.5 2.5 0 1 0 -5 0"
364
+ ],
365
+ callout: [
366
+ {
367
+ d: "M20 6v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1",
368
+ stroke: "primary",
369
+ fill: "secondary"
370
+ },
371
+ {
372
+ d: "M17 11v6h-9",
373
+ stroke: "primary"
374
+ },
375
+ {
376
+ d: "M8 15l-2 2l2 2",
377
+ stroke: "primary"
378
+ }
379
+ ],
380
+ check: ["M5 12l5 5l10 -10"],
381
+ chevronDown: ["M6 9l6 6l6 -6"],
382
+ chevronLeft: ["M15 6l-6 6l6 6"],
383
+ chevronRight: ["M9 6l6 6l-6 6"],
384
+ circle: [{
385
+ d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",
386
+ stroke: "primary",
387
+ fill: "secondary"
388
+ }],
389
+ comment: [
390
+ "M12 11v.01",
391
+ "M8 11v.01",
392
+ "M16 11v.01",
393
+ "M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3z"
394
+ ],
395
+ copy: ["M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z", "M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1"],
396
+ deviceFloppy: [
397
+ "M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",
398
+ "M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",
399
+ "M14 4l0 4l-6 0l0 -4"
400
+ ],
401
+ dots: [
402
+ "M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",
403
+ "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",
404
+ "M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"
405
+ ],
406
+ doublePage: ["M3 3m0 1a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1zm9 -1v18"],
407
+ download: [
408
+ "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",
409
+ "M7 11l5 5l5 -5",
410
+ "M12 4l0 12"
411
+ ],
412
+ externalLink: [
413
+ "M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",
414
+ "M11 13l9 -9",
415
+ "M15 4h5v5"
416
+ ],
417
+ eye: ["M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z", "M9 12a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"],
418
+ file: ["M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"],
419
+ fileImport: ["M14 3v4a1 1 0 0 0 1 1h4", "M5 13v-8a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-5.5m-9.5 -2h7m-3 -3l3 3l-3 3"],
420
+ fitToPage: [
421
+ "M12 20h-6a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h6",
422
+ "M18 14v7",
423
+ "M18 3v7",
424
+ "M15 18l3 3l3 -3",
425
+ "M15 6l3 -3l3 3"
426
+ ],
427
+ fitToWidth: [
428
+ "M4 12v-6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v6",
429
+ "M10 18h-7",
430
+ "M21 18h-7",
431
+ "M6 15l-3 3l3 3",
432
+ "M18 15l3 3l-3 3"
433
+ ],
434
+ formButton: ["M3 8a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-8", "M8 12h8"],
435
+ formCheckbox: ["M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14", "M9 12l2 2l4 -4"],
436
+ formDesign: [
437
+ "M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",
438
+ "M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2",
439
+ "M9 12l.01 0",
440
+ "M13 12l2 0",
441
+ "M9 16l.01 0",
442
+ "M13 16l2 0"
443
+ ],
444
+ formListbox: [
445
+ "M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",
446
+ "M11 8h6",
447
+ "M11 12h6",
448
+ "M11 16h6",
449
+ "M7 8l0 .01",
450
+ "M7 12l0 .01",
451
+ "M7 16l0 .01"
452
+ ],
453
+ formRadio: [{
454
+ d: "M9 12a2 2 0 1 0 6 0a2 2 0 1 0 -6 0",
455
+ fill: true
456
+ }, "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"],
457
+ formSelect: ["M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14", "M9 11l3 3l3 -3"],
458
+ formTextfield: [
459
+ "M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3",
460
+ "M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3",
461
+ "M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7",
462
+ "M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1",
463
+ "M17 12h.01",
464
+ "M13 12h.01"
465
+ ],
466
+ freeText: [
467
+ {
468
+ d: "M4 7v-2h12v2",
469
+ stroke: "primary"
470
+ },
471
+ {
472
+ d: "M10 5v14",
473
+ stroke: "primary"
474
+ },
475
+ {
476
+ d: "M12 19h-4",
477
+ stroke: "primary"
478
+ },
479
+ {
480
+ d: "M15 13v-1h6v1",
481
+ stroke: "primary"
482
+ },
483
+ {
484
+ d: "M18 12v7",
485
+ stroke: "primary"
486
+ },
487
+ {
488
+ d: "M17 19h2",
489
+ stroke: "primary"
490
+ }
491
+ ],
492
+ fullscreen: [
493
+ "M4 8v-2a2 2 0 0 1 2 -2h2",
494
+ "M4 16v2a2 2 0 0 0 2 2h2",
495
+ "M16 4h2a2 2 0 0 1 2 2v2",
496
+ "M16 20h2a2 2 0 0 0 2 -2v-2"
497
+ ],
498
+ fullscreenExit: [
499
+ "M4 8v-2c0 -.551 .223 -1.05 .584 -1.412",
500
+ "M4 16v2a2 2 0 0 0 2 2h2",
501
+ "M16 4h2a2 2 0 0 1 2 2v2",
502
+ "M16 20h2c.545 0 1.04 -.218 1.4 -.572",
503
+ "M3 3l18 18"
504
+ ],
505
+ group: [
506
+ "M3 5a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",
507
+ "M17 5a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",
508
+ "M3 19a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",
509
+ "M17 19a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",
510
+ "M5 7v10",
511
+ "M19 7v10",
512
+ "M7 5h10",
513
+ "M7 19h10",
514
+ "M8 8H12.8V11.2H16V16H11.2V12.8H8V8Z"
515
+ ],
516
+ hand: [
517
+ "M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5",
518
+ "M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5",
519
+ "M14 5.5a1.5 1.5 0 0 1 3 0v6.5",
520
+ "M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"
521
+ ],
522
+ highlight: [
523
+ {
524
+ d: "M4 6h16a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2H4a2 2 0 0 1 -2 -2V8a2 2 0 0 1 2 -2z",
525
+ fill: "primary"
526
+ },
527
+ "M8 16v-8a4 4 0 1 1 8 0v8",
528
+ "M8 10h8"
529
+ ],
530
+ horizontal: [
531
+ "M7 8l-4 4l4 4",
532
+ "M17 8l4 4l-4 4",
533
+ "M3 12l18 0"
534
+ ],
535
+ inkHighlighter: [
536
+ "M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",
537
+ "M12.5 5.5l4 4",
538
+ "M4.5 13.5l4 4",
539
+ {
540
+ d: "M21 15v4h-8l4 -4l4 0",
541
+ stroke: "primary",
542
+ fill: "primary"
543
+ }
544
+ ],
545
+ insertText: [
546
+ {
547
+ d: "M3 7v-2h12v2",
548
+ stroke: "primary"
549
+ },
550
+ {
551
+ d: "M9 5v14",
552
+ stroke: "primary"
553
+ },
554
+ {
555
+ d: "M7 19h4",
556
+ stroke: "primary"
557
+ },
558
+ {
559
+ d: "M18 15l2 2h-5",
560
+ stroke: "primary"
561
+ },
562
+ {
563
+ d: "M18 19l2 -2",
564
+ stroke: "primary"
565
+ }
566
+ ],
567
+ italic: [
568
+ "M11 5l6 0",
569
+ "M7 19l6 0",
570
+ "M14 5l-4 14"
571
+ ],
572
+ line: [{
573
+ d: "M20 4l-16 16",
574
+ stroke: "primary"
575
+ }],
576
+ lineArrow: [{
577
+ d: "M20 4l-16 16",
578
+ stroke: "primary"
579
+ }, {
580
+ d: "M16 3h5v5",
581
+ stroke: "primary"
582
+ }],
583
+ link: [
584
+ "M9 15l6 -6",
585
+ "M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",
586
+ "M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"
587
+ ],
588
+ linkOff: [
589
+ "M9 15l3 -3m2 -2l1 -1",
590
+ "M11 6l.463 -.536a5 5 0 0 1 7.072 7.071l-.534 .464",
591
+ "M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",
592
+ "M3 3l18 18"
593
+ ],
594
+ listTree: [
595
+ "M9 6h11",
596
+ "M12 12h8",
597
+ "M15 18h5",
598
+ "M5 6v.01",
599
+ "M8 12v.01",
600
+ "M11 18v.01"
601
+ ],
602
+ lock: ["M5 11h14a2 2 0 0 1 2 2v7a2 2 0 0 1 -2 2H5a2 2 0 0 1 -2 -2v-7a2 2 0 0 1 2 -2z", "M7 11V7a5 5 0 0 1 10 0v4"],
603
+ marqueeSelect: [
604
+ "M17 20h6",
605
+ "M20 17v6",
606
+ "M4 13v-2",
607
+ "M4 6v-1a1 1 0 0 1 1 -1h1",
608
+ "M6 20h-1a1 1 0 0 1 -1 -1v-1",
609
+ "M11 4h2",
610
+ "M11 20h2",
611
+ "M18 4h1a1 1 0 0 1 1 1v1",
612
+ "M20 11v2"
613
+ ],
614
+ menu: ["M4 8l16 0", "M4 16l16 0"],
615
+ message: [
616
+ "M8 9h8",
617
+ "M8 13h6",
618
+ "M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12"
619
+ ],
620
+ palette: [
621
+ "M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25",
622
+ "M8.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",
623
+ "M12.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",
624
+ "M16.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"
625
+ ],
626
+ paperclip: ["M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5"],
627
+ pencilMarker: ["m9.109 16.275 8.856-8.097c.812-.743.87-2.014.127-2.826s-2.014-.869-2.826-.127L6.41 13.322l-.127 2.826zM13.79 6.575l2.7 2.952", {
628
+ d: "M19.375 20.125c.569.063-4.05-.562-6.412-.437s-4.759 1.229-6.857 1.625c-1.764.687-3.404-.938-1.981-2.5",
629
+ stroke: "primary"
630
+ }],
631
+ photo: [
632
+ "M15 8h.01",
633
+ "M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z",
634
+ "M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5",
635
+ "M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3"
636
+ ],
637
+ plus: ["M12 5l0 14", "M5 12l14 0"],
638
+ pointer: ["M7.904 17.563a1.2 1.2 0 0 0 2.228 .308l2.09 -3.093l4.907 4.907a1.067 1.067 0 0 0 1.509 0l1.047 -1.047a1.067 1.067 0 0 0 0 -1.509l-4.907 -4.907l3.113 -2.09a1.2 1.2 0 0 0 -.309 -2.228l-13.582 -3.904l3.904 13.563z"],
639
+ polygon: [{
640
+ d: "M13.163 2.168l8.021 5.828c.694 .504 .984 1.397 .719 2.212l-3.064 9.43a1.978 1.978 0 0 1 -1.881 1.367h-9.916a1.978 1.978 0 0 1 -1.881 -1.367l-3.064 -9.43a1.978 1.978 0 0 1 .719 -2.212l8.021 -5.828a1.978 1.978 0 0 1 2.326 0z",
641
+ stroke: "primary",
642
+ fill: "secondary"
643
+ }],
644
+ print: [
645
+ "M17 17h2a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-14a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h2",
646
+ "M17 9v-4a2 2 0 0 0 -2 -2h-6a2 2 0 0 0 -2 2v4",
647
+ "M7 13m0 2a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2z"
648
+ ],
649
+ redact: [
650
+ "M7 4h10",
651
+ "M12 4v8",
652
+ "M-7 24l12 -12",
653
+ "M-3 24l12 -12",
654
+ "M1 24l12 -12",
655
+ "M5 24l12 -12",
656
+ "M9 24l12 -12",
657
+ "M13 24l12 -12",
658
+ "M17 24l12 -12",
659
+ "M21 24l12 -12",
660
+ "M25 24l12 -12"
661
+ ],
662
+ redactArea: [
663
+ "M6 20h-1a2 2 0 0 1 -2 -2v-1",
664
+ "M3 13v-3",
665
+ "M3 6v-1a2 2 0 0 1 2 -2h1",
666
+ "M10 3h3",
667
+ "M17 3h1a2 2 0 0 1 2 2v1",
668
+ "M12 10h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-8a2 2 0 0 1 2 -2z",
669
+ "M10 12l2 -2",
670
+ "M10 16l6 -6",
671
+ "M10 20l10 -10",
672
+ "M12 22l10 -10",
673
+ "M16 22l6 -6",
674
+ "M20 22l2 -2"
675
+ ],
676
+ redactCombined: [
677
+ "M6 20h-1a2 2 0 0 1 -2 -2v-1",
678
+ "M3 13v-3",
679
+ "M20 13v-3",
680
+ "M3 6v-1a2 2 0 0 1 2 -2h1",
681
+ "M10 3h3",
682
+ "M17 3h1a2 2 0 0 1 2 2v1",
683
+ "M8 8h8",
684
+ "M12 8v7",
685
+ "M6 19l12 -12",
686
+ "M6 23l12 -12",
687
+ "M10 23l12 -12",
688
+ "M14 27l12 -12",
689
+ "M14 23l12 -12"
690
+ ],
691
+ redactionSidebar: [
692
+ "M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",
693
+ "M15 4v16",
694
+ "M7 8h5",
695
+ "M7 11h5",
696
+ "M7 14h4"
697
+ ],
698
+ replaceText: [
699
+ {
700
+ d: "M3 7v-2h12v2",
701
+ stroke: "primary"
702
+ },
703
+ {
704
+ d: "M9 5v14",
705
+ stroke: "primary"
706
+ },
707
+ {
708
+ d: "M7 19h4",
709
+ stroke: "primary"
710
+ },
711
+ {
712
+ d: "M20 14l2 2h-3",
713
+ stroke: "primary"
714
+ },
715
+ {
716
+ d: "M20 18l2 -2",
717
+ stroke: "primary"
718
+ },
719
+ {
720
+ d: "M19 16a3 3 0 1 0 2 5.236",
721
+ stroke: "primary"
722
+ }
723
+ ],
724
+ rotateClockwise: ["M4.05 11a8 8 0 1 1 .5 4m-.5 5v-5h5"],
725
+ rotateCounterClockwise: ["M19.95 11a8 8 0 1 0 -.5 4m.5 5v-5h-5"],
726
+ rubberStamp: ["M21 17.85h-18c0 -4.05 1.421 -4.05 3.79 -4.05c5.21 0 1.21 -4.59 1.21 -6.8a4 4 0 1 1 8 0c0 2.21 -4 6.8 1.21 6.8c2.369 0 3.79 0 3.79 4.05", "M5 21h14"],
727
+ rubberStampPlus: [
728
+ "M21 17.85h-18c0 -4.05 1.421 -4.05 3.79 -4.05c5.21 0 1.21 -4.59 1.21 -6.8a4 4 0 0 1 4.9 -4.1",
729
+ "M16 10c0 1.2 -4 3.8 1.21 3.8c2.369 0 3.79 0 3.79 4.05",
730
+ "M5 21h14",
731
+ "M16 5h6",
732
+ "M19 2v6"
733
+ ],
734
+ save: [
735
+ "M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",
736
+ "M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",
737
+ "M14 4l0 4l-6 0l0 -4"
738
+ ],
739
+ screenshot: [
740
+ "M7 19a2 2 0 0 1 -2 -2",
741
+ "M5 13v-2",
742
+ "M5 7a2 2 0 0 1 2 -2",
743
+ "M11 5h2",
744
+ "M17 5a2 2 0 0 1 2 2",
745
+ "M19 11v2",
746
+ "M19 17v4",
747
+ "M21 19h-4",
748
+ "M13 19h-2"
749
+ ],
750
+ search: ["M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0", "M21 21l-6 -6"],
751
+ settings: ["M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z", "M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"],
752
+ sidebar: ["M4 18v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z", "M10 18v-12a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2z"],
753
+ signature: ["M3 17c3.333 -3.333 5 -6 5 -8c0 -3 -1 -3 -2 -3s-2.032 1.085 -2 3c.034 2.048 1.658 4.877 2.5 6c1.5 2 2.5 2.5 3.5 1l2 -3c.333 2.667 1.333 4 3 4c.53 0 2.639 -2 3 -2c.517 0 1.517 .667 3 2"],
754
+ singlePage: ["M5 3m0 1a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1z"],
755
+ square: [{
756
+ d: "M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",
757
+ stroke: "primary",
758
+ fill: "secondary"
759
+ }],
760
+ squares: ["M8 10a2 2 0 0 1 2 -2h9a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-9a2 2 0 0 1 -2 -2z", "M16 8v-3a2 2 0 0 0 -2 -2h-9a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h3"],
761
+ squiggly: [
762
+ "M8 16v-8a4 4 0 1 1 8 0v8",
763
+ "M8 10h8",
764
+ {
765
+ d: "M4 20c1.5 -1.5 3.5 -1.5 5 0s3.5 1.5 5 0 3.5 -1.5 5 0",
766
+ stroke: "primary"
767
+ }
768
+ ],
769
+ strikethrough: ["M8 16v-8a4 4 0 1 1 8 0v8", {
770
+ d: "M4 10h16",
771
+ stroke: "primary"
772
+ }],
773
+ text: [
774
+ "M6.5 15.5m-3.5 0a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0 -7 0",
775
+ "M14 19v-10.5a3.5 3.5 0 0 1 7 0v10.5",
776
+ "M14 13h7",
777
+ "M10 12v7"
778
+ ],
779
+ trash: [
780
+ "M4 7l16 0",
781
+ "M10 11l0 6",
782
+ "M14 11l0 6",
783
+ "M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",
784
+ "M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"
785
+ ],
786
+ underline: [
787
+ {
788
+ d: "M4 20h16",
789
+ stroke: "primary"
790
+ },
791
+ "M8 16v-8a4 4 0 1 1 8 0v8",
792
+ "M8 10h8"
793
+ ],
794
+ ungroup: ["M4 5a1 1 0 0 1 1 -1h5a1 1 0 0 1 1 1v5a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1z", "M13 14a1 1 0 0 1 1 -1h5a1 1 0 0 1 1 1v5a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1z"],
795
+ unlock: ["M7 11V7a5 5 0 0 1 9.9-1"],
796
+ updateScale: [
797
+ "M3.5 13.5L18.5 7.5L21.25 14.5L6.25 20.5L3.5 13.5Z",
798
+ "M8 12.8L9 15.2M11.5 11.4L12.2 13.2M15 10L16 12.4",
799
+ "M4 9.39849C4.10585 8.34804 4.487 7.34411 5.10497 6.48809C5.72294 5.63207 6.55584 4.95427 7.51957 4.52312C8.4833 4.09198 9.54373 3.92277 10.5938 4.03257C11.6438 4.14237 12.6463 4.5273 13.5 5.14849M11.5 6.00003L13.5 5.14849L12.7807 2.96999"
800
+ ],
801
+ vertical: [
802
+ "M8 7l4 -4l4 4",
803
+ "M8 17l4 4l4 -4",
804
+ "M12 3l0 18"
805
+ ],
806
+ viewSettings: [
807
+ "M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",
808
+ "M12 10.5v1.5",
809
+ "M12 16v1.5",
810
+ "M15.031 12.25l-1.299 .75",
811
+ "M10.268 15l-1.3 .75",
812
+ "M15 15.803l-1.285 -.773",
813
+ "M10.285 12.97l-1.285 -.773",
814
+ "M14 3v4a1 1 0 0 0 1 1h4",
815
+ "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"
816
+ ],
817
+ widgetEdit: [
818
+ "M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",
819
+ "M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415",
820
+ "M16 5l3 3"
821
+ ],
822
+ x: ["M18 6l-12 12", "M6 6l12 12"],
823
+ zigzag: [{
824
+ d: "M12 2.4L21.36 11.76L2.64 12.24L12 21.6",
825
+ stroke: "primary"
826
+ }],
827
+ zoomIn: [
828
+ "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",
829
+ "M9 12h6",
830
+ "M12 9v6"
831
+ ],
832
+ zoomInArea: [
833
+ "M15 13v4",
834
+ "M13 15h4",
835
+ "M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0",
836
+ "M22 22l-3 -3",
837
+ "M6 18h-1a2 2 0 0 1 -2 -2v-1",
838
+ "M3 11v-1",
839
+ "M3 6v-1a2 2 0 0 1 2 -2h1",
840
+ "M10 3h1",
841
+ "M15 3h1a2 2 0 0 1 2 2v1"
842
+ ],
843
+ zoomOut: ["M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", "M9 12l6 0"]
844
+ };
845
+ const BUILT_IN_ICONS = ICON_PATHS;
846
+ /** Whether the viewer has an icon by this name of its own. */
847
+ const hasIcon = (name) => Object.prototype.hasOwnProperty.call(BUILT_IN_ICONS, name);
848
+ /** The paths an icon name draws: yours, else the viewer's own; `null` for neither. */
849
+ function iconPathsOf(name, custom) {
850
+ const own = Object.prototype.hasOwnProperty.call(custom, name) ? custom[name] : void 0;
851
+ if (own !== void 0) return pathsOfIcon(own);
852
+ return hasIcon(name) ? BUILT_IN_ICONS[name] : null;
853
+ }
854
+ /** One SVG renderer for every icon. Unknown names render nothing (caller shows
855
+ * a text fallback), so a missing glyph never throws. */
856
+ function Icon({ name, size = 20, strokeWidth = 2, className, title, accent }) {
857
+ const paths = iconPathsOf(name, useCustomIcons());
858
+ if (!paths) return null;
859
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
860
+ width: size,
861
+ height: size,
862
+ viewBox: "0 0 24 24",
863
+ fill: "none",
864
+ stroke: "currentColor",
865
+ strokeWidth,
866
+ strokeLinecap: "round",
867
+ strokeLinejoin: "round",
868
+ className,
869
+ role: "img",
870
+ "aria-hidden": title ? void 0 : true,
871
+ "aria-label": title,
872
+ children: paths.map((path, i) => {
873
+ if (typeof path === "string") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: path }, i);
874
+ const fill = path.fill === true ? "currentColor" : path.fill ? accent?.[path.fill] : void 0;
875
+ const stroke = path.stroke ? accent?.[path.stroke] : path.fill ? "none" : void 0;
876
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
877
+ d: path.d,
878
+ fill: fill ?? "none",
879
+ stroke,
880
+ strokeWidth: path.strokeWidth,
881
+ strokeDasharray: path.strokeDasharray,
882
+ strokeOpacity: path.strokeOpacity,
883
+ fillOpacity: path.fillOpacity
884
+ }, i);
885
+ })
886
+ });
887
+ }
888
+ //#endregion
889
+ Object.defineProperty(exports, "DEFAULT_ENV", {
890
+ enumerable: true,
891
+ get: function() {
892
+ return DEFAULT_ENV;
893
+ }
894
+ });
895
+ Object.defineProperty(exports, "ICON_PATHS", {
896
+ enumerable: true,
897
+ get: function() {
898
+ return ICON_PATHS;
899
+ }
900
+ });
901
+ Object.defineProperty(exports, "Icon", {
902
+ enumerable: true,
903
+ get: function() {
904
+ return Icon;
905
+ }
906
+ });
907
+ Object.defineProperty(exports, "ResolvedLayoutProvider", {
908
+ enumerable: true,
909
+ get: function() {
910
+ return ResolvedLayoutProvider;
911
+ }
912
+ });
913
+ Object.defineProperty(exports, "ViewerConfigProvider", {
914
+ enumerable: true,
915
+ get: function() {
916
+ return ViewerConfigProvider;
917
+ }
918
+ });
919
+ Object.defineProperty(exports, "hasIcon", {
920
+ enumerable: true,
921
+ get: function() {
922
+ return hasIcon;
923
+ }
924
+ });
925
+ Object.defineProperty(exports, "iconPathsOf", {
926
+ enumerable: true,
927
+ get: function() {
928
+ return iconPathsOf;
929
+ }
930
+ });
931
+ Object.defineProperty(exports, "resolveViewerCommands", {
932
+ enumerable: true,
933
+ get: function() {
934
+ return resolveViewerCommands;
935
+ }
936
+ });
937
+ Object.defineProperty(exports, "stripOf", {
938
+ enumerable: true,
939
+ get: function() {
940
+ return stripOf;
941
+ }
942
+ });
943
+ Object.defineProperty(exports, "useConfiguredFonts", {
944
+ enumerable: true,
945
+ get: function() {
946
+ return useConfiguredFonts;
947
+ }
948
+ });
949
+ Object.defineProperty(exports, "useCustomIcons", {
950
+ enumerable: true,
951
+ get: function() {
952
+ return useCustomIcons;
953
+ }
954
+ });
955
+ Object.defineProperty(exports, "useLayoutEnv", {
956
+ enumerable: true,
957
+ get: function() {
958
+ return useLayoutEnv;
959
+ }
960
+ });
961
+ Object.defineProperty(exports, "useLayoutOption", {
962
+ enumerable: true,
963
+ get: function() {
964
+ return useLayoutOption;
965
+ }
966
+ });
967
+ Object.defineProperty(exports, "useMenu", {
968
+ enumerable: true,
969
+ get: function() {
970
+ return useMenu;
971
+ }
972
+ });
973
+ Object.defineProperty(exports, "usePanelResize", {
974
+ enumerable: true,
975
+ get: function() {
976
+ return usePanelResize;
977
+ }
978
+ });
979
+ Object.defineProperty(exports, "useResolvedLayout", {
980
+ enumerable: true,
981
+ get: function() {
982
+ return useResolvedLayout;
983
+ }
984
+ });
985
+ Object.defineProperty(exports, "useSignatureSettings", {
986
+ enumerable: true,
987
+ get: function() {
988
+ return useSignatureSettings;
989
+ }
990
+ });
991
+ Object.defineProperty(exports, "useStampSettings", {
992
+ enumerable: true,
993
+ get: function() {
994
+ return useStampSettings;
995
+ }
996
+ });
997
+ Object.defineProperty(exports, "useStripSchema", {
998
+ enumerable: true,
999
+ get: function() {
1000
+ return useStripSchema;
1001
+ }
1002
+ });
1003
+ Object.defineProperty(exports, "useViewerCommands", {
1004
+ enumerable: true,
1005
+ get: function() {
1006
+ return useViewerCommands;
1007
+ }
1008
+ });
1009
+
1010
+ //# sourceMappingURL=icons-x0Tc05bs.cjs.map