@superdoc-dev/mcp 0.3.0-next.96 → 0.3.0-next.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1973 -242
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -51891,7 +51891,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
51891
51891
|
emptyOptions2 = {};
|
|
51892
51892
|
});
|
|
51893
51893
|
|
|
51894
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
51894
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-8A1MBmqJ.es.js
|
|
51895
51895
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
51896
51896
|
const fieldValue = extension$1.config[field];
|
|
51897
51897
|
if (typeof fieldValue === "function")
|
|
@@ -56705,7 +56705,12 @@ function buildDispatchTable(api2) {
|
|
|
56705
56705
|
"permissionRanges.get": (input) => api2.permissionRanges.get(input),
|
|
56706
56706
|
"permissionRanges.create": (input, options) => api2.permissionRanges.create(input, options),
|
|
56707
56707
|
"permissionRanges.remove": (input, options) => api2.permissionRanges.remove(input, options),
|
|
56708
|
-
"permissionRanges.updatePrincipal": (input, options) => api2.permissionRanges.updatePrincipal(input, options)
|
|
56708
|
+
"permissionRanges.updatePrincipal": (input, options) => api2.permissionRanges.updatePrincipal(input, options),
|
|
56709
|
+
"customXml.parts.list": (input) => api2.customXml.parts.list(input),
|
|
56710
|
+
"customXml.parts.get": (input) => api2.customXml.parts.get(input),
|
|
56711
|
+
"customXml.parts.create": (input, options) => api2.customXml.parts.create(input, options),
|
|
56712
|
+
"customXml.parts.patch": (input, options) => api2.customXml.parts.patch(input, options),
|
|
56713
|
+
"customXml.parts.remove": (input, options) => api2.customXml.parts.remove(input, options)
|
|
56709
56714
|
};
|
|
56710
56715
|
}
|
|
56711
56716
|
function executeHistoryGet(adapter) {
|
|
@@ -58258,6 +58263,61 @@ function executeBookmarksRemove(adapter, input, options) {
|
|
|
58258
58263
|
validateBookmarkTarget(input.target, "bookmarks.remove");
|
|
58259
58264
|
return adapter.remove(input, normalizeMutationOptions(options));
|
|
58260
58265
|
}
|
|
58266
|
+
function validateTarget(target, operationName) {
|
|
58267
|
+
if (!target || typeof target !== "object")
|
|
58268
|
+
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} requires a target with either { id } or { partName }.`, { target });
|
|
58269
|
+
const t = target;
|
|
58270
|
+
const hasId = typeof t.id === "string" && t.id.length > 0;
|
|
58271
|
+
const hasPartName = typeof t.partName === "string" && t.partName.length > 0;
|
|
58272
|
+
if (!hasId && !hasPartName)
|
|
58273
|
+
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} target must have a non-empty 'id' or 'partName'.`, { target });
|
|
58274
|
+
if (hasId && hasPartName)
|
|
58275
|
+
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} target must not provide both 'id' and 'partName'; choose one.`, { target });
|
|
58276
|
+
}
|
|
58277
|
+
function validateContent(content$2, operationName) {
|
|
58278
|
+
if (typeof content$2 !== "string" || content$2.length === 0)
|
|
58279
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} requires a non-empty 'content' string of well-formed XML.`, { contentType: typeof content$2 });
|
|
58280
|
+
if (!/<\s*[A-Za-z_]/.test(content$2))
|
|
58281
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} 'content' does not contain a root XML element.`);
|
|
58282
|
+
}
|
|
58283
|
+
function validateSchemaRefs(schemaRefs, operationName) {
|
|
58284
|
+
if (!Array.isArray(schemaRefs))
|
|
58285
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} 'schemaRefs' must be an array of strings.`);
|
|
58286
|
+
for (const [i$1, entry] of schemaRefs.entries())
|
|
58287
|
+
if (typeof entry !== "string" || entry.length === 0)
|
|
58288
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} 'schemaRefs[${i$1}]' must be a non-empty string.`);
|
|
58289
|
+
}
|
|
58290
|
+
function executeCustomXmlPartsList(adapter, query) {
|
|
58291
|
+
if (query?.rootNamespace !== undefined && typeof query.rootNamespace !== "string")
|
|
58292
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `customXml.parts.list 'rootNamespace' must be a string when provided.`);
|
|
58293
|
+
if (query?.schemaRef !== undefined && typeof query.schemaRef !== "string")
|
|
58294
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `customXml.parts.list 'schemaRef' must be a string when provided.`);
|
|
58295
|
+
return adapter.list(query);
|
|
58296
|
+
}
|
|
58297
|
+
function executeCustomXmlPartsGet(adapter, input) {
|
|
58298
|
+
validateTarget(input.target, "customXml.parts.get");
|
|
58299
|
+
return adapter.get(input);
|
|
58300
|
+
}
|
|
58301
|
+
function executeCustomXmlPartsCreate(adapter, input, options) {
|
|
58302
|
+
validateContent(input.content, "customXml.parts.create");
|
|
58303
|
+
if (input.schemaRefs !== undefined)
|
|
58304
|
+
validateSchemaRefs(input.schemaRefs, "customXml.parts.create");
|
|
58305
|
+
return adapter.create(input, normalizeMutationOptions(options));
|
|
58306
|
+
}
|
|
58307
|
+
function executeCustomXmlPartsPatch(adapter, input, options) {
|
|
58308
|
+
validateTarget(input.target, "customXml.parts.patch");
|
|
58309
|
+
if (input.content === undefined && input.schemaRefs === undefined)
|
|
58310
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `customXml.parts.patch requires at least one of 'content' or 'schemaRefs'.`);
|
|
58311
|
+
if (input.content !== undefined)
|
|
58312
|
+
validateContent(input.content, "customXml.parts.patch");
|
|
58313
|
+
if (input.schemaRefs !== undefined)
|
|
58314
|
+
validateSchemaRefs(input.schemaRefs, "customXml.parts.patch");
|
|
58315
|
+
return adapter.patch(input, normalizeMutationOptions(options));
|
|
58316
|
+
}
|
|
58317
|
+
function executeCustomXmlPartsRemove(adapter, input, options) {
|
|
58318
|
+
validateTarget(input.target, "customXml.parts.remove");
|
|
58319
|
+
return adapter.remove(input, normalizeMutationOptions(options));
|
|
58320
|
+
}
|
|
58261
58321
|
function validateSetEditingRestrictionInput(input) {
|
|
58262
58322
|
if (!input || typeof input !== "object")
|
|
58263
58323
|
throw new DocumentApiValidationError("INVALID_INPUT", "protection.setEditingRestriction requires an object with a mode property.");
|
|
@@ -59866,6 +59926,23 @@ function createDocumentApi(adapters) {
|
|
|
59866
59926
|
return executePermissionRangesUpdatePrincipal(adapters.permissionRanges, input, options);
|
|
59867
59927
|
}
|
|
59868
59928
|
},
|
|
59929
|
+
customXml: { parts: {
|
|
59930
|
+
list(input) {
|
|
59931
|
+
return executeCustomXmlPartsList(requireAdapter(adapters.customXml, "customXml").parts, input);
|
|
59932
|
+
},
|
|
59933
|
+
get(input) {
|
|
59934
|
+
return executeCustomXmlPartsGet(requireAdapter(adapters.customXml, "customXml").parts, input);
|
|
59935
|
+
},
|
|
59936
|
+
create(input, options) {
|
|
59937
|
+
return executeCustomXmlPartsCreate(requireAdapter(adapters.customXml, "customXml").parts, input, options);
|
|
59938
|
+
},
|
|
59939
|
+
patch(input, options) {
|
|
59940
|
+
return executeCustomXmlPartsPatch(requireAdapter(adapters.customXml, "customXml").parts, input, options);
|
|
59941
|
+
},
|
|
59942
|
+
remove(input, options) {
|
|
59943
|
+
return executeCustomXmlPartsRemove(requireAdapter(adapters.customXml, "customXml").parts, input, options);
|
|
59944
|
+
}
|
|
59945
|
+
} },
|
|
59869
59946
|
invoke(request) {
|
|
59870
59947
|
if (!Object.prototype.hasOwnProperty.call(dispatch, request.operationId))
|
|
59871
59948
|
throw new Error(`Unknown operationId: "${request.operationId}"`);
|
|
@@ -62194,44 +62271,74 @@ function generateParagraphProperties(params) {
|
|
|
62194
62271
|
}
|
|
62195
62272
|
return pPr;
|
|
62196
62273
|
}
|
|
62274
|
+
function foldLeadingCommentStartsIntoTrackedChanges(elements) {
|
|
62275
|
+
const result = [];
|
|
62276
|
+
let i$1 = 0;
|
|
62277
|
+
while (i$1 < elements.length) {
|
|
62278
|
+
if (elements[i$1]?.name !== "w:commentRangeStart") {
|
|
62279
|
+
result.push(elements[i$1]);
|
|
62280
|
+
i$1++;
|
|
62281
|
+
continue;
|
|
62282
|
+
}
|
|
62283
|
+
const leadingStarts = [];
|
|
62284
|
+
while (i$1 < elements.length && elements[i$1]?.name === "w:commentRangeStart") {
|
|
62285
|
+
leadingStarts.push(elements[i$1]);
|
|
62286
|
+
i$1++;
|
|
62287
|
+
}
|
|
62288
|
+
const next = elements[i$1];
|
|
62289
|
+
if (isTrackedChangeWrapper(next)) {
|
|
62290
|
+
result.push({
|
|
62291
|
+
...next,
|
|
62292
|
+
elements: [...leadingStarts, ...next.elements || []]
|
|
62293
|
+
});
|
|
62294
|
+
i$1++;
|
|
62295
|
+
} else
|
|
62296
|
+
result.push(...leadingStarts);
|
|
62297
|
+
}
|
|
62298
|
+
return result;
|
|
62299
|
+
}
|
|
62197
62300
|
function mergeConsecutiveTrackedChanges(elements) {
|
|
62198
62301
|
if (!Array.isArray(elements) || elements.length === 0)
|
|
62199
62302
|
return elements;
|
|
62303
|
+
elements = foldLeadingCommentStartsIntoTrackedChanges(elements);
|
|
62200
62304
|
const result = [];
|
|
62201
62305
|
let i$1 = 0;
|
|
62202
62306
|
while (i$1 < elements.length) {
|
|
62203
62307
|
const current = elements[i$1];
|
|
62204
|
-
if (current
|
|
62308
|
+
if (isTrackedChangeWrapper(current)) {
|
|
62205
62309
|
const tcId = current.attributes?.["w:id"];
|
|
62206
62310
|
const tcName = current.name;
|
|
62207
62311
|
const mergedElements = [...current.elements || []];
|
|
62312
|
+
const pendingComments = [];
|
|
62313
|
+
let didMerge = false;
|
|
62208
62314
|
let j = i$1 + 1;
|
|
62209
62315
|
while (j < elements.length) {
|
|
62210
62316
|
const next = elements[j];
|
|
62211
|
-
if (next
|
|
62212
|
-
|
|
62317
|
+
if (isCommentMarker(next)) {
|
|
62318
|
+
pendingComments.push(next);
|
|
62213
62319
|
j++;
|
|
62214
62320
|
continue;
|
|
62215
62321
|
}
|
|
62216
|
-
if (next?.name === "w:r") {
|
|
62217
|
-
if (next.elements?.length === 1 && next.elements[0]?.name === "w:commentReference") {
|
|
62218
|
-
mergedElements.push(next);
|
|
62219
|
-
j++;
|
|
62220
|
-
continue;
|
|
62221
|
-
}
|
|
62222
|
-
}
|
|
62223
62322
|
if (next?.name === tcName && next.attributes?.["w:id"] === tcId) {
|
|
62224
|
-
mergedElements.push(...next.elements || []);
|
|
62323
|
+
mergedElements.push(...pendingComments, ...next.elements || []);
|
|
62324
|
+
pendingComments.length = 0;
|
|
62325
|
+
didMerge = true;
|
|
62225
62326
|
j++;
|
|
62226
62327
|
continue;
|
|
62227
62328
|
}
|
|
62228
62329
|
break;
|
|
62229
62330
|
}
|
|
62230
|
-
|
|
62231
|
-
|
|
62232
|
-
|
|
62233
|
-
|
|
62234
|
-
|
|
62331
|
+
if (didMerge) {
|
|
62332
|
+
result.push({
|
|
62333
|
+
name: tcName,
|
|
62334
|
+
attributes: { ...current.attributes },
|
|
62335
|
+
elements: mergedElements
|
|
62336
|
+
});
|
|
62337
|
+
result.push(...pendingComments);
|
|
62338
|
+
} else {
|
|
62339
|
+
result.push(current);
|
|
62340
|
+
result.push(...pendingComments);
|
|
62341
|
+
}
|
|
62235
62342
|
i$1 = j;
|
|
62236
62343
|
} else {
|
|
62237
62344
|
result.push(current);
|
|
@@ -90695,7 +90802,7 @@ var isRegExp = (value) => {
|
|
|
90695
90802
|
tracked: false,
|
|
90696
90803
|
carrier: runAttributeCarrier(runPropertyKey ?? key),
|
|
90697
90804
|
schema
|
|
90698
|
-
}), INLINE_PROPERTY_REGISTRY, INLINE_PROPERTY_KEY_SET, INLINE_PROPERTY_BY_KEY, UNDERLINE_OBJECT_ALLOWED_KEYS, SHADING_ALLOWED_KEYS, BORDER_ALLOWED_KEYS, FIT_TEXT_ALLOWED_KEYS, LANG_ALLOWED_KEYS, RFONTS_ALLOWED_KEYS, EAST_ASIAN_LAYOUT_ALLOWED_KEYS, STYLISTIC_SET_ALLOWED_KEYS, VERT_ALIGN_VALUES, PROPERTY_VALIDATOR_MAP, NONE_FAILURES, NONE_THROWS, T_NOT_FOUND, T_NOT_FOUND_CAPABLE, T_PLAN_ENGINE, T_NOT_FOUND_COMMAND, T_IMAGE_COMMAND, T_CC_READ, T_CC_MUTATION, T_CC_TYPED, T_CC_TYPED_READ, T_CC_RAW, T_QUERY_MATCH, T_SECTION_CREATE, T_SECTION_READ, T_PARAGRAPH_MUTATION, T_SECTION_MUTATION, T_SECTION_SETTINGS_MUTATION, T_HEADER_FOOTER_MUTATION, T_STORY, T_REF_READ_LIST, T_REF_MUTATION, T_REF_MUTATION_REMOVE, T_REF_INSERT, T_PROTECTION_READ, T_PROTECTION_MUTATION, T_PERM_RANGE_READ, T_PERM_RANGE_MUTATION, FORMAT_INLINE_ALIAS_OPERATION_DEFINITIONS, OPERATION_DEFINITIONS, OPERATION_IDS, COMMAND_CATALOG, TABLE_COLOR_PATTERN_SOURCE = "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$", TABLE_COLOR_PATTERN, PARAGRAPH_ALIGNMENTS, TAB_STOP_ALIGNMENTS, TAB_STOP_LEADERS, BORDER_SIDES, CLEAR_BORDER_SIDES, LINE_RULES, PARAGRAPH_DIRECTIONS, ALIGNMENT_POLICIES, PARAGRAPH_BLOCK_TYPES, SET_STYLE_KEYS, CLEAR_STYLE_KEYS, RESET_DIRECT_FORMATTING_KEYS, SET_ALIGNMENT_KEYS, CLEAR_ALIGNMENT_KEYS, SET_INDENTATION_KEYS, CLEAR_INDENTATION_KEYS, SET_SPACING_KEYS, CLEAR_SPACING_KEYS, SET_KEEP_OPTIONS_KEYS, SET_OUTLINE_LEVEL_KEYS, SET_FLOW_OPTIONS_KEYS, SET_TAB_STOP_KEYS, CLEAR_TAB_STOP_KEYS, CLEAR_ALL_TAB_STOPS_KEYS, SET_BORDER_KEYS, CLEAR_BORDER_KEYS, SET_SHADING_KEYS, CLEAR_SHADING_KEYS, SET_DIRECTION_KEYS, CLEAR_DIRECTION_KEYS, ST_ON_OFF_ON_VALUES, ST_ON_OFF_OFF_VALUES, ST_UNDERLINE_VALUES, ST_UNDERLINE_VALUE_SET, ST_VERTICAL_ALIGN_RUN, ST_EM, ST_TEXT_ALIGNMENT, ST_TEXT_DIRECTION, ST_TEXTBOX_TIGHT_WRAP, ST_TEXT_TRANSFORM, ST_JUSTIFICATION, FONT_FAMILY_SCHEMA, COLOR_SCHEMA, SPACING_SCHEMA, INDENT_SCHEMA, UNDERLINE_SCHEMA, BORDER_PROPERTIES_SCHEMA, SHADING_SCHEMA, LANG_SCHEMA, EAST_ASIAN_LAYOUT_SCHEMA, FIT_TEXT_SCHEMA, NUMBERING_PROPERTIES_SCHEMA, FRAME_PR_SCHEMA, PARAGRAPH_BORDERS_SCHEMA, TAB_STOP_SCHEMA, PROPERTY_REGISTRY, ALLOWED_KEYS_BY_CHANNEL, PROPERTY_INDEX, EXCLUDED_KEYS, INPUT_ALLOWED_KEYS, TARGET_ALLOWED_KEYS, OPTIONS_ALLOWED_KEYS, VALID_CHANNELS, Z_ORDER_RELATIVE_HEIGHT_MAX = 4294967295, nodeTypeValues, blockNodeTypeValues, deletableBlockNodeTypeValues, inlineNodeTypeValues, rangeSchema, textAddressSchema, textTargetSchema, blockNodeAddressSchema, deletableBlockNodeAddressSchema, tableAddressSchema, tableRowAddressSchema, tableCellAddressSchema, tableOrCellAddressSchema, paragraphAddressSchema, headingAddressSchema, listItemAddressSchema, paragraphTargetSchema, sectionAddressSchema, nodeAddressSchema, commentAddressSchema, trackedChangeAddressSchema, entityAddressSchema, selectionTargetSchema, deleteBehaviorSchema, resolvedHandleSchema, pageInfoSchema, receiptSuccessSchema, textMutationRangeSchema, textMutationResolutionSchema, textMutationSuccessSchema, matchBlockSchema, storyLocatorSchema, trackChangeRefSchema, createParagraphSuccessSchema, createHeadingSuccessSchema, headingLevelSchema, listsInsertSuccessSchema, listsMutateItemSuccessSchema, textSelectorSchema, nodeSelectorSchema, sdMutationResolutionSchema, sdMutationSuccessSchema, documentInfoCountsSchema, documentInfoOutlineItemSchema, documentInfoCapabilitiesSchema, documentStylesSchema, documentDefaultsSchema, listKindSchema, listInsertPositionSchema, sectionBreakTypeSchema, sectionOrientationSchema, sectionVerticalAlignSchema, sectionDirectionSchema, sectionHeaderFooterKindSchema, sectionHeaderFooterVariantSchema, sectionLineNumberRestartSchema, sectionPageNumberFormatSchema, sectionRangeDomainSchema, sectionPageMarginsSchema, sectionHeaderFooterMarginsSchema, sectionPageSetupSchema, sectionColumnsSchema, sectionLineNumberingSchema, sectionPageNumberingSchema, sectionHeaderFooterRefsSchema, sectionBorderSpecSchema, sectionPageBordersSchema, sectionMutationSuccessSchema, documentMutationSuccessSchema, paragraphMutationTargetSchema, paragraphMutationSuccessSchema, createSectionBreakSuccessSchema, trackChangeWordRevisionIdsSchema, capabilityReasonsSchema, capabilityFlagSchema, operationRuntimeCapabilitySchema, operationCapabilitiesSchema, inlinePropertyCapabilitySchema, formatCapabilitiesSchema, planEngineCapabilitiesSchema, tableBorderColorPattern, nullableTableBorderSpecSchema, sdFragmentSchema, placementSchema, nestingPolicySchema, tableCreateLocationSchema, formatInlineAliasOperationSchemas, tocMutationFailureSchema, tocMutationSuccessSchema, tocEntryMutationFailureSchema, tocEntryMutationSuccessSchema, hyperlinkTargetSchema, hyperlinkReadPropertiesSchema, hyperlinkSpecSchema, hyperlinkPatchSchema, hyperlinkDomainSchema, hyperlinkMutationSuccessSchema, hyperlinkMutationFailureSchema, contentControlTargetSchema, contentControlMutationSuccessSchema, contentControlMutationFailureSchema, ccListResultSchema, ccInfoSchema, refListQueryProperties, refFailureSchema, bookmarkAddressSchema, bookmarkMutation, footnoteAddressSchema, footnoteConfigScopeSchema, footnoteNumberingSchema, footnoteMutation, footnoteConfig, crossRefAddressSchema, crossRefTargetSchema, crossRefDisplaySchema, crossRefMutation, indexAddressSchema, indexEntryAddressSchema, indexConfigSchema, indexEntryDataSchema, indexEntryPatchSchema, indexMutation, indexEntryMutation, captionAddressSchema, captionMutation, captionConfig, fieldAddressSchema, fieldMutation, citationAddressSchema, citationSourceAddressSchema, bibliographyAddressSchema, citationMutation, citationSourceMutation, bibliographyMutation, citationPersonSchema, citationSourceFieldsSchema, tocCreateLocationSchema, authoritiesAddressSchema, authorityEntryAddressSchema, authoritiesConfigSchema, authorityEntryDataSchema, authorityEntryPatchSchema, authoritiesMutation, authorityEntryMutation, diffCoverageSchema, diffSummarySchema, diffSnapshotSchema, diffPayloadSchema, GROUP_METADATA, STEP_OP_CATALOG_UNFROZEN, PUBLIC_STEP_OP_CATALOG_UNFROZEN, PUBLIC_MUTATION_STEP_OP_IDS, PUBLIC_MUTATION_STEP_OP_SET, CAPABILITY_REASON_CODES, VALID_EDGE_VALUES, VALID_EDGE_NODE_TYPES, VALID_DOCUMENT_EDGES, VALID_REF_BOUNDARIES, VALID_ANCHOR_KINDS, RESOLVE_RANGE_ALLOWED_KEYS, SELECTION_CURRENT_ALLOWED_KEYS, CREATE_COMMENT_ALLOWED_KEYS, PATCH_COMMENT_ALLOWED_KEYS, STYLE_APPLY_INPUT_ALLOWED_KEYS, INLINE_ALIAS_INPUT_ALLOWED_KEYS, DELETE_INPUT_ALLOWED_KEYS, VALID_BEHAVIORS, CONTENT_KIND_SET, INLINE_KIND_SET, LEGACY_TOP_LEVEL_TYPES, TEXT_INSERT_ALLOWED_KEYS, STRUCTURAL_INSERT_ALLOWED_KEYS, VALID_INSERT_TYPES, LIST_KINDS, LIST_INSERT_POSITIONS, JOIN_DIRECTIONS, MUTATION_SCOPES, LEVEL_ALIGNMENTS, TRAILING_CHARACTERS, LIST_PRESET_IDS, VALID_BLOCK_NODE_TYPES$1, VALID_LIST_KINDS, VALID_INSERT_POSITIONS, VALID_JOIN_DIRECTIONS, VALID_MUTATION_SCOPES, VALID_LEVEL_ALIGNMENTS, VALID_TRAILING_CHARACTERS, VALID_LIST_PRESETS, VALID_CONTINUITY_VALUES, VALID_SEQUENCE_MODES, VALID_LIST_CREATE_MODES, TEXT_REPLACE_ALLOWED_KEYS, STRUCTURAL_REPLACE_ALLOWED_KEYS, VALID_HEADING_LEVELS, SECTION_BREAK_TYPES$1, SUPPORTED_DELETE_NODE_TYPES, REJECTED_DELETE_NODE_TYPES, VALID_BLOCK_NODE_TYPES, SNAPSHOT_VERSIONS, PAYLOAD_VERSIONS, VALID_STYLE_OPTION_FLAGS, VALID_APPLY_TO_VALUES, VALID_BORDER_EDGE_KEYS, HEADER_FOOTER_KINDS$1, HEADER_FOOTER_VARIANTS$1, DEFAULT_SECTIONS_LIST_LIMIT = 250, SECTION_BREAK_TYPES, SECTION_ORIENTATIONS, SECTION_VERTICAL_ALIGNS, SECTION_DIRECTIONS, HEADER_FOOTER_KINDS, HEADER_FOOTER_VARIANTS, LINE_NUMBER_RESTARTS, PAGE_NUMBER_FORMATS, PAGE_BORDER_DISPLAYS, PAGE_BORDER_OFFSET_FROM_VALUES, PAGE_BORDER_Z_ORDER_VALUES, VALID_WRAP_TYPES, VALID_WRAP_SIDES, VALID_IMAGE_SIZE_UNITS, VALID_TOC_UPDATE_MODES, EDIT_ENTRY_PATCH_ALLOWED_KEYS, PATCH_FIELDS, CONTENT_CONTROL_TYPES, LOCK_MODES, CONTENT_CONTROL_APPEARANCES, VALID_NODE_KINDS, VALID_LOCK_MODES$1, VALID_CC_TYPES, VALID_CC_APPEARANCES, VALID_CONTENT_FORMATS, VALID_RAW_PATCH_OPS, VALID_SET_MODES, VALID_CREATE_LOCATION_KINDS, DEFAULT_PROTECTION_STATE, ADAPTER_GATED_PREFIXES, _buffers, _defaultCollectionId = null, _nextCollectionId = 1, generateV2HandlerEntity = (handlerName, translator$218) => ({
|
|
90805
|
+
}), INLINE_PROPERTY_REGISTRY, INLINE_PROPERTY_KEY_SET, INLINE_PROPERTY_BY_KEY, UNDERLINE_OBJECT_ALLOWED_KEYS, SHADING_ALLOWED_KEYS, BORDER_ALLOWED_KEYS, FIT_TEXT_ALLOWED_KEYS, LANG_ALLOWED_KEYS, RFONTS_ALLOWED_KEYS, EAST_ASIAN_LAYOUT_ALLOWED_KEYS, STYLISTIC_SET_ALLOWED_KEYS, VERT_ALIGN_VALUES, PROPERTY_VALIDATOR_MAP, NONE_FAILURES, NONE_THROWS, T_NOT_FOUND, T_NOT_FOUND_CAPABLE, T_PLAN_ENGINE, T_NOT_FOUND_COMMAND, T_IMAGE_COMMAND, T_CC_READ, T_CC_MUTATION, T_CC_TYPED, T_CC_TYPED_READ, T_CC_RAW, T_QUERY_MATCH, T_SECTION_CREATE, T_SECTION_READ, T_PARAGRAPH_MUTATION, T_SECTION_MUTATION, T_SECTION_SETTINGS_MUTATION, T_HEADER_FOOTER_MUTATION, T_STORY, T_REF_READ_LIST, T_REF_MUTATION, T_REF_MUTATION_REMOVE, T_REF_INSERT, T_PROTECTION_READ, T_PROTECTION_MUTATION, T_PERM_RANGE_READ, T_PERM_RANGE_MUTATION, FORMAT_INLINE_ALIAS_OPERATION_DEFINITIONS, OPERATION_DEFINITIONS, OPERATION_IDS, COMMAND_CATALOG, TABLE_COLOR_PATTERN_SOURCE = "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$", TABLE_COLOR_PATTERN, PARAGRAPH_ALIGNMENTS, TAB_STOP_ALIGNMENTS, TAB_STOP_LEADERS, BORDER_SIDES, CLEAR_BORDER_SIDES, LINE_RULES, PARAGRAPH_DIRECTIONS, ALIGNMENT_POLICIES, PARAGRAPH_BLOCK_TYPES, SET_STYLE_KEYS, CLEAR_STYLE_KEYS, RESET_DIRECT_FORMATTING_KEYS, SET_ALIGNMENT_KEYS, CLEAR_ALIGNMENT_KEYS, SET_INDENTATION_KEYS, CLEAR_INDENTATION_KEYS, SET_SPACING_KEYS, CLEAR_SPACING_KEYS, SET_KEEP_OPTIONS_KEYS, SET_OUTLINE_LEVEL_KEYS, SET_FLOW_OPTIONS_KEYS, SET_TAB_STOP_KEYS, CLEAR_TAB_STOP_KEYS, CLEAR_ALL_TAB_STOPS_KEYS, SET_BORDER_KEYS, CLEAR_BORDER_KEYS, SET_SHADING_KEYS, CLEAR_SHADING_KEYS, SET_DIRECTION_KEYS, CLEAR_DIRECTION_KEYS, ST_ON_OFF_ON_VALUES, ST_ON_OFF_OFF_VALUES, ST_UNDERLINE_VALUES, ST_UNDERLINE_VALUE_SET, ST_VERTICAL_ALIGN_RUN, ST_EM, ST_TEXT_ALIGNMENT, ST_TEXT_DIRECTION, ST_TEXTBOX_TIGHT_WRAP, ST_TEXT_TRANSFORM, ST_JUSTIFICATION, FONT_FAMILY_SCHEMA, COLOR_SCHEMA, SPACING_SCHEMA, INDENT_SCHEMA, UNDERLINE_SCHEMA, BORDER_PROPERTIES_SCHEMA, SHADING_SCHEMA, LANG_SCHEMA, EAST_ASIAN_LAYOUT_SCHEMA, FIT_TEXT_SCHEMA, NUMBERING_PROPERTIES_SCHEMA, FRAME_PR_SCHEMA, PARAGRAPH_BORDERS_SCHEMA, TAB_STOP_SCHEMA, PROPERTY_REGISTRY, ALLOWED_KEYS_BY_CHANNEL, PROPERTY_INDEX, EXCLUDED_KEYS, INPUT_ALLOWED_KEYS, TARGET_ALLOWED_KEYS, OPTIONS_ALLOWED_KEYS, VALID_CHANNELS, Z_ORDER_RELATIVE_HEIGHT_MAX = 4294967295, nodeTypeValues, blockNodeTypeValues, deletableBlockNodeTypeValues, inlineNodeTypeValues, rangeSchema, textAddressSchema, textTargetSchema, blockNodeAddressSchema, deletableBlockNodeAddressSchema, tableAddressSchema, tableRowAddressSchema, tableCellAddressSchema, tableOrCellAddressSchema, paragraphAddressSchema, headingAddressSchema, listItemAddressSchema, paragraphTargetSchema, sectionAddressSchema, nodeAddressSchema, commentAddressSchema, trackedChangeAddressSchema, entityAddressSchema, selectionTargetSchema, deleteBehaviorSchema, resolvedHandleSchema, pageInfoSchema, receiptSuccessSchema, textMutationRangeSchema, textMutationResolutionSchema, textMutationSuccessSchema, matchBlockSchema, storyLocatorSchema, trackChangeRefSchema, createParagraphSuccessSchema, createHeadingSuccessSchema, headingLevelSchema, listsInsertSuccessSchema, listsMutateItemSuccessSchema, textSelectorSchema, nodeSelectorSchema, sdMutationResolutionSchema, sdMutationSuccessSchema, documentInfoCountsSchema, documentInfoOutlineItemSchema, documentInfoCapabilitiesSchema, documentStylesSchema, documentDefaultsSchema, listKindSchema, listInsertPositionSchema, sectionBreakTypeSchema, sectionOrientationSchema, sectionVerticalAlignSchema, sectionDirectionSchema, sectionHeaderFooterKindSchema, sectionHeaderFooterVariantSchema, sectionLineNumberRestartSchema, sectionPageNumberFormatSchema, sectionRangeDomainSchema, sectionPageMarginsSchema, sectionHeaderFooterMarginsSchema, sectionPageSetupSchema, sectionColumnsSchema, sectionLineNumberingSchema, sectionPageNumberingSchema, sectionHeaderFooterRefsSchema, sectionBorderSpecSchema, sectionPageBordersSchema, sectionMutationSuccessSchema, documentMutationSuccessSchema, paragraphMutationTargetSchema, paragraphMutationSuccessSchema, createSectionBreakSuccessSchema, trackChangeWordRevisionIdsSchema, capabilityReasonsSchema, capabilityFlagSchema, operationRuntimeCapabilitySchema, operationCapabilitiesSchema, inlinePropertyCapabilitySchema, formatCapabilitiesSchema, planEngineCapabilitiesSchema, tableBorderColorPattern, nullableTableBorderSpecSchema, sdFragmentSchema, placementSchema, nestingPolicySchema, tableCreateLocationSchema, formatInlineAliasOperationSchemas, tocMutationFailureSchema, tocMutationSuccessSchema, tocEntryMutationFailureSchema, tocEntryMutationSuccessSchema, hyperlinkTargetSchema, hyperlinkReadPropertiesSchema, hyperlinkSpecSchema, hyperlinkPatchSchema, hyperlinkDomainSchema, hyperlinkMutationSuccessSchema, hyperlinkMutationFailureSchema, contentControlTargetSchema, contentControlMutationSuccessSchema, contentControlMutationFailureSchema, ccListResultSchema, ccInfoSchema, refListQueryProperties, refFailureSchema, bookmarkAddressSchema, bookmarkMutation, customXmlPartTargetSchema, customXmlPartMutation, customXmlPartCreateMutation, footnoteAddressSchema, footnoteConfigScopeSchema, footnoteNumberingSchema, footnoteMutation, footnoteConfig, crossRefAddressSchema, crossRefTargetSchema, crossRefDisplaySchema, crossRefMutation, indexAddressSchema, indexEntryAddressSchema, indexConfigSchema, indexEntryDataSchema, indexEntryPatchSchema, indexMutation, indexEntryMutation, captionAddressSchema, captionMutation, captionConfig, fieldAddressSchema, fieldMutation, citationAddressSchema, citationSourceAddressSchema, bibliographyAddressSchema, citationMutation, citationSourceMutation, bibliographyMutation, citationPersonSchema, citationSourceFieldsSchema, tocCreateLocationSchema, authoritiesAddressSchema, authorityEntryAddressSchema, authoritiesConfigSchema, authorityEntryDataSchema, authorityEntryPatchSchema, authoritiesMutation, authorityEntryMutation, diffCoverageSchema, diffSummarySchema, diffSnapshotSchema, diffPayloadSchema, GROUP_METADATA, STEP_OP_CATALOG_UNFROZEN, PUBLIC_STEP_OP_CATALOG_UNFROZEN, PUBLIC_MUTATION_STEP_OP_IDS, PUBLIC_MUTATION_STEP_OP_SET, CAPABILITY_REASON_CODES, VALID_EDGE_VALUES, VALID_EDGE_NODE_TYPES, VALID_DOCUMENT_EDGES, VALID_REF_BOUNDARIES, VALID_ANCHOR_KINDS, RESOLVE_RANGE_ALLOWED_KEYS, SELECTION_CURRENT_ALLOWED_KEYS, CREATE_COMMENT_ALLOWED_KEYS, PATCH_COMMENT_ALLOWED_KEYS, STYLE_APPLY_INPUT_ALLOWED_KEYS, INLINE_ALIAS_INPUT_ALLOWED_KEYS, DELETE_INPUT_ALLOWED_KEYS, VALID_BEHAVIORS, CONTENT_KIND_SET, INLINE_KIND_SET, LEGACY_TOP_LEVEL_TYPES, TEXT_INSERT_ALLOWED_KEYS, STRUCTURAL_INSERT_ALLOWED_KEYS, VALID_INSERT_TYPES, LIST_KINDS, LIST_INSERT_POSITIONS, JOIN_DIRECTIONS, MUTATION_SCOPES, LEVEL_ALIGNMENTS, TRAILING_CHARACTERS, LIST_PRESET_IDS, VALID_BLOCK_NODE_TYPES$1, VALID_LIST_KINDS, VALID_INSERT_POSITIONS, VALID_JOIN_DIRECTIONS, VALID_MUTATION_SCOPES, VALID_LEVEL_ALIGNMENTS, VALID_TRAILING_CHARACTERS, VALID_LIST_PRESETS, VALID_CONTINUITY_VALUES, VALID_SEQUENCE_MODES, VALID_LIST_CREATE_MODES, TEXT_REPLACE_ALLOWED_KEYS, STRUCTURAL_REPLACE_ALLOWED_KEYS, VALID_HEADING_LEVELS, SECTION_BREAK_TYPES$1, SUPPORTED_DELETE_NODE_TYPES, REJECTED_DELETE_NODE_TYPES, VALID_BLOCK_NODE_TYPES, SNAPSHOT_VERSIONS, PAYLOAD_VERSIONS, VALID_STYLE_OPTION_FLAGS, VALID_APPLY_TO_VALUES, VALID_BORDER_EDGE_KEYS, HEADER_FOOTER_KINDS$1, HEADER_FOOTER_VARIANTS$1, DEFAULT_SECTIONS_LIST_LIMIT = 250, SECTION_BREAK_TYPES, SECTION_ORIENTATIONS, SECTION_VERTICAL_ALIGNS, SECTION_DIRECTIONS, HEADER_FOOTER_KINDS, HEADER_FOOTER_VARIANTS, LINE_NUMBER_RESTARTS, PAGE_NUMBER_FORMATS, PAGE_BORDER_DISPLAYS, PAGE_BORDER_OFFSET_FROM_VALUES, PAGE_BORDER_Z_ORDER_VALUES, VALID_WRAP_TYPES, VALID_WRAP_SIDES, VALID_IMAGE_SIZE_UNITS, VALID_TOC_UPDATE_MODES, EDIT_ENTRY_PATCH_ALLOWED_KEYS, PATCH_FIELDS, CONTENT_CONTROL_TYPES, LOCK_MODES, CONTENT_CONTROL_APPEARANCES, VALID_NODE_KINDS, VALID_LOCK_MODES$1, VALID_CC_TYPES, VALID_CC_APPEARANCES, VALID_CONTENT_FORMATS, VALID_RAW_PATCH_OPS, VALID_SET_MODES, VALID_CREATE_LOCATION_KINDS, DEFAULT_PROTECTION_STATE, ADAPTER_GATED_PREFIXES, _buffers, _defaultCollectionId = null, _nextCollectionId = 1, generateV2HandlerEntity = (handlerName, translator$218) => ({
|
|
90699
90806
|
handlerName,
|
|
90700
90807
|
handler: (params) => {
|
|
90701
90808
|
const { nodes } = params;
|
|
@@ -91124,6 +91231,14 @@ var isRegExp = (value) => {
|
|
|
91124
91231
|
if (normalizedNodes.length === 1 && normalizedNodes[0]?.type === "paragraph")
|
|
91125
91232
|
return normalizedNodes[0];
|
|
91126
91233
|
return normalizedNodes;
|
|
91234
|
+
}, isTrackedChangeWrapper = (el) => el?.name === "w:ins" || el?.name === "w:del", isCommentMarker = (el) => {
|
|
91235
|
+
if (!el)
|
|
91236
|
+
return false;
|
|
91237
|
+
if (el.name === "w:commentRangeStart" || el.name === "w:commentRangeEnd")
|
|
91238
|
+
return true;
|
|
91239
|
+
if (el.name === "w:r" && el.elements?.length === 1 && el.elements[0]?.name === "w:commentReference")
|
|
91240
|
+
return true;
|
|
91241
|
+
return false;
|
|
91127
91242
|
}, encode$59 = (attributes) => {
|
|
91128
91243
|
return attributes["w:rsidDel"];
|
|
91129
91244
|
}, decode$61 = (attrs) => {
|
|
@@ -104340,8 +104455,8 @@ var isRegExp = (value) => {
|
|
|
104340
104455
|
patchNumberingDefinitions(docx);
|
|
104341
104456
|
const numbering = getNumberingDefinitions(docx);
|
|
104342
104457
|
const trackedChangeIdMapOptions = { replacements: converter.trackedChangesOptions?.replacements ?? "paired" };
|
|
104343
|
-
converter.trackedChangeIdMap = buildTrackedChangeIdMap(docx, trackedChangeIdMapOptions);
|
|
104344
104458
|
converter.trackedChangeIdMapsByPart = buildTrackedChangeIdMapsByPart(docx, trackedChangeIdMapOptions);
|
|
104459
|
+
converter.trackedChangeIdMap = converter.trackedChangeIdMapsByPart.get("word/document.xml") ?? buildTrackedChangeIdMap(docx, trackedChangeIdMapOptions);
|
|
104345
104460
|
const comments = importCommentData({
|
|
104346
104461
|
docx,
|
|
104347
104462
|
nodeListHandler,
|
|
@@ -105551,7 +105666,7 @@ var isRegExp = (value) => {
|
|
|
105551
105666
|
state.kern = kernNode.attributes["w:val"];
|
|
105552
105667
|
}
|
|
105553
105668
|
}, SuperConverter;
|
|
105554
|
-
var
|
|
105669
|
+
var init_SuperConverter_8A1MBmqJ_es = __esm(() => {
|
|
105555
105670
|
init_rolldown_runtime_Bg48TavK_es();
|
|
105556
105671
|
init_jszip_C49i9kUs_es();
|
|
105557
105672
|
init_xml_js_CqGKpaft_es();
|
|
@@ -114057,6 +114172,72 @@ var init_SuperConverter_1Voea3gd_es = __esm(() => {
|
|
|
114057
114172
|
referenceDocPath: "permission-ranges/update-principal.mdx",
|
|
114058
114173
|
referenceGroup: "permissionRanges",
|
|
114059
114174
|
skipAsATool: true
|
|
114175
|
+
},
|
|
114176
|
+
"customXml.parts.list": {
|
|
114177
|
+
memberPath: "customXml.parts.list",
|
|
114178
|
+
description: "List Custom XML Data Storage Parts in the document, optionally filtered by root namespace or schema reference.",
|
|
114179
|
+
expectedResult: "Returns a CustomXmlPartsListResult with summary entries (no content); fetch content via get.",
|
|
114180
|
+
requiresDocumentContext: true,
|
|
114181
|
+
metadata: readOperation({
|
|
114182
|
+
idempotency: "idempotent",
|
|
114183
|
+
throws: T_REF_READ_LIST
|
|
114184
|
+
}),
|
|
114185
|
+
referenceDocPath: "custom-xml/parts/list.mdx",
|
|
114186
|
+
referenceGroup: "customXml"
|
|
114187
|
+
},
|
|
114188
|
+
"customXml.parts.get": {
|
|
114189
|
+
memberPath: "customXml.parts.get",
|
|
114190
|
+
description: "Get a single Custom XML Data Storage Part by itemID or package part name, including its full content. v1 partName targeting is limited to Word-style customXml/itemN.xml paths.",
|
|
114191
|
+
expectedResult: "Returns a CustomXmlPartInfo with id, partName, namespaces, schemaRefs, and content; or null if not found.",
|
|
114192
|
+
requiresDocumentContext: true,
|
|
114193
|
+
metadata: readOperation({ throws: T_NOT_FOUND_CAPABLE }),
|
|
114194
|
+
referenceDocPath: "custom-xml/parts/get.mdx",
|
|
114195
|
+
referenceGroup: "customXml"
|
|
114196
|
+
},
|
|
114197
|
+
"customXml.parts.create": {
|
|
114198
|
+
memberPath: "customXml.parts.create",
|
|
114199
|
+
description: "Add a new Custom XML Data Storage Part to the document. Generates a fresh itemID GUID and emits the Properties Part.",
|
|
114200
|
+
expectedResult: "Returns a CustomXmlPartsCreateResult with the generated id and package part names on success.",
|
|
114201
|
+
requiresDocumentContext: true,
|
|
114202
|
+
metadata: mutationOperation({
|
|
114203
|
+
idempotency: "non-idempotent",
|
|
114204
|
+
supportsDryRun: true,
|
|
114205
|
+
supportsTrackedMode: false,
|
|
114206
|
+
possibleFailureCodes: ["INVALID_INPUT"],
|
|
114207
|
+
throws: T_REF_INSERT
|
|
114208
|
+
}),
|
|
114209
|
+
referenceDocPath: "custom-xml/parts/create.mdx",
|
|
114210
|
+
referenceGroup: "customXml"
|
|
114211
|
+
},
|
|
114212
|
+
"customXml.parts.patch": {
|
|
114213
|
+
memberPath: "customXml.parts.patch",
|
|
114214
|
+
description: "Replace the content and/or schemaRefs of an existing Custom XML Data Storage Part. At least one of content or schemaRefs is required. v1 partName targeting is limited to Word-style customXml/itemN.xml paths.",
|
|
114215
|
+
expectedResult: "Returns a CustomXmlPartsMutationResult indicating success with the resolved target or a failure.",
|
|
114216
|
+
requiresDocumentContext: true,
|
|
114217
|
+
metadata: mutationOperation({
|
|
114218
|
+
idempotency: "idempotent",
|
|
114219
|
+
supportsDryRun: true,
|
|
114220
|
+
supportsTrackedMode: false,
|
|
114221
|
+
possibleFailureCodes: ["TARGET_NOT_FOUND", "INVALID_INPUT"],
|
|
114222
|
+
throws: T_REF_MUTATION
|
|
114223
|
+
}),
|
|
114224
|
+
referenceDocPath: "custom-xml/parts/patch.mdx",
|
|
114225
|
+
referenceGroup: "customXml"
|
|
114226
|
+
},
|
|
114227
|
+
"customXml.parts.remove": {
|
|
114228
|
+
memberPath: "customXml.parts.remove",
|
|
114229
|
+
description: "Remove a Custom XML Data Storage Part and clean up all linked package files (item, props, rels, content-types entry). v1 partName targeting is limited to Word-style customXml/itemN.xml paths.",
|
|
114230
|
+
expectedResult: "Returns a CustomXmlPartsMutationResult indicating success or a failure.",
|
|
114231
|
+
requiresDocumentContext: true,
|
|
114232
|
+
metadata: mutationOperation({
|
|
114233
|
+
idempotency: "non-idempotent",
|
|
114234
|
+
supportsDryRun: true,
|
|
114235
|
+
supportsTrackedMode: false,
|
|
114236
|
+
possibleFailureCodes: ["TARGET_NOT_FOUND"],
|
|
114237
|
+
throws: T_REF_MUTATION_REMOVE
|
|
114238
|
+
}),
|
|
114239
|
+
referenceDocPath: "custom-xml/parts/remove.mdx",
|
|
114240
|
+
referenceGroup: "customXml"
|
|
114060
114241
|
}
|
|
114061
114242
|
};
|
|
114062
114243
|
OPERATION_IDS = Object.freeze(Object.keys(OPERATION_DEFINITIONS));
|
|
@@ -116312,6 +116493,29 @@ var init_SuperConverter_1Voea3gd_es = __esm(() => {
|
|
|
116312
116493
|
"name"
|
|
116313
116494
|
]);
|
|
116314
116495
|
bookmarkMutation = refMutationSchemas({ bookmark: bookmarkAddressSchema }, ["bookmark"]);
|
|
116496
|
+
customXmlPartTargetSchema = { oneOf: [objectSchema({ id: {
|
|
116497
|
+
type: "string",
|
|
116498
|
+
minLength: 1
|
|
116499
|
+
} }, ["id"]), objectSchema({ partName: {
|
|
116500
|
+
type: "string",
|
|
116501
|
+
minLength: 1
|
|
116502
|
+
} }, ["partName"])] };
|
|
116503
|
+
customXmlPartMutation = refMutationSchemas({
|
|
116504
|
+
target: customXmlPartTargetSchema,
|
|
116505
|
+
id: {
|
|
116506
|
+
type: "string",
|
|
116507
|
+
minLength: 1
|
|
116508
|
+
}
|
|
116509
|
+
}, ["target"]);
|
|
116510
|
+
customXmlPartCreateMutation = refMutationSchemas({
|
|
116511
|
+
id: { type: "string" },
|
|
116512
|
+
partName: { type: "string" },
|
|
116513
|
+
propsPartName: { type: "string" }
|
|
116514
|
+
}, [
|
|
116515
|
+
"id",
|
|
116516
|
+
"partName",
|
|
116517
|
+
"propsPartName"
|
|
116518
|
+
]);
|
|
116315
116519
|
footnoteAddressSchema = objectSchema({
|
|
116316
116520
|
kind: { const: "entity" },
|
|
116317
116521
|
entityType: { const: "footnote" },
|
|
@@ -120216,7 +120420,23 @@ var init_SuperConverter_1Voea3gd_es = __esm(() => {
|
|
|
120216
120420
|
},
|
|
120217
120421
|
id: { type: "string" }
|
|
120218
120422
|
}, ["kind"])
|
|
120219
|
-
}, ["id", "principal"])
|
|
120423
|
+
}, ["id", "principal"]), objectSchema({
|
|
120424
|
+
...refListQueryProperties,
|
|
120425
|
+
rootNamespace: { type: "string" },
|
|
120426
|
+
schemaRef: { type: "string" }
|
|
120427
|
+
}), objectSchema({ target: customXmlPartTargetSchema }, ["target"]), objectSchema({
|
|
120428
|
+
content: {
|
|
120429
|
+
type: "string",
|
|
120430
|
+
minLength: 1
|
|
120431
|
+
},
|
|
120432
|
+
schemaRefs: {
|
|
120433
|
+
type: "array",
|
|
120434
|
+
items: {
|
|
120435
|
+
type: "string",
|
|
120436
|
+
minLength: 1
|
|
120437
|
+
}
|
|
120438
|
+
}
|
|
120439
|
+
}, ["content"]), { ...customXmlPartCreateMutation }, { ...customXmlPartMutation }, objectSchema({ target: customXmlPartTargetSchema }, ["target"]), { ...customXmlPartMutation };
|
|
120220
120440
|
projectFromDefinitions((_id, entry) => entry.memberPath);
|
|
120221
120441
|
[...new Set(OPERATION_IDS.map((id) => OPERATION_DEFINITIONS[id].memberPath))];
|
|
120222
120442
|
projectFromDefinitions((_id, entry) => entry.referenceDocPath);
|
|
@@ -120390,6 +120610,11 @@ var init_SuperConverter_1Voea3gd_es = __esm(() => {
|
|
|
120390
120610
|
title: "Permission Ranges",
|
|
120391
120611
|
description: "Permission range exception operations for protected documents.",
|
|
120392
120612
|
pagePath: "permission-ranges/index.mdx"
|
|
120613
|
+
},
|
|
120614
|
+
customXml: {
|
|
120615
|
+
title: "Custom XML",
|
|
120616
|
+
description: "Custom XML Data Storage Part operations (ECMA-376 §15.2.5, §15.2.6). Raw read and write of custom XML parts in the OOXML package.",
|
|
120617
|
+
pagePath: "custom-xml/index.mdx"
|
|
120393
120618
|
}
|
|
120394
120619
|
};
|
|
120395
120620
|
Object.keys(GROUP_METADATA).map((key) => ({
|
|
@@ -143431,7 +143656,7 @@ var init_SuperConverter_1Voea3gd_es = __esm(() => {
|
|
|
143431
143656
|
};
|
|
143432
143657
|
});
|
|
143433
143658
|
|
|
143434
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
143659
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-1RfXz7Wm.es.js
|
|
143435
143660
|
function parseSizeUnit(val = "0") {
|
|
143436
143661
|
const length = val.toString() || "0";
|
|
143437
143662
|
const value = Number.parseFloat(length);
|
|
@@ -146153,8 +146378,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
|
|
|
146153
146378
|
}
|
|
146154
146379
|
};
|
|
146155
146380
|
};
|
|
146156
|
-
var
|
|
146157
|
-
|
|
146381
|
+
var init_create_headless_toolbar_1RfXz7Wm_es = __esm(() => {
|
|
146382
|
+
init_SuperConverter_8A1MBmqJ_es();
|
|
146158
146383
|
init_constants_DrU4EASo_es();
|
|
146159
146384
|
init_dist_B8HfvhaK_es();
|
|
146160
146385
|
CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
|
|
@@ -147601,7 +147826,7 @@ var init_decrypt_docx_4kQ488M9_es = __esm(() => {
|
|
|
147601
147826
|
]);
|
|
147602
147827
|
});
|
|
147603
147828
|
|
|
147604
|
-
// ../../packages/superdoc/dist/chunks/DocxZipper-
|
|
147829
|
+
// ../../packages/superdoc/dist/chunks/DocxZipper-Bphhij1P.es.js
|
|
147605
147830
|
function sniffEncoding(u8) {
|
|
147606
147831
|
if (u8.length >= 2) {
|
|
147607
147832
|
const b0 = u8[0], b1 = u8[1];
|
|
@@ -148098,6 +148323,19 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
|
|
|
148098
148323
|
const staleOverridePartNames = COMMENT_FILE_BASENAMES.map((name) => `/word/${name}`).filter((partName) => {
|
|
148099
148324
|
return !hasFile(partName.slice(1));
|
|
148100
148325
|
});
|
|
148326
|
+
const CUSTOM_XML_PROPS_CT = "application/vnd.openxmlformats-officedocument.customXmlProperties+xml";
|
|
148327
|
+
if (types2?.elements?.length)
|
|
148328
|
+
for (const el of types2.elements) {
|
|
148329
|
+
if (el?.name !== "Override")
|
|
148330
|
+
continue;
|
|
148331
|
+
if (el?.attributes?.ContentType !== CUSTOM_XML_PROPS_CT)
|
|
148332
|
+
continue;
|
|
148333
|
+
const partName = el?.attributes?.PartName;
|
|
148334
|
+
if (typeof partName !== "string" || !partName.startsWith("/"))
|
|
148335
|
+
continue;
|
|
148336
|
+
if (!hasFile(partName.slice(1)))
|
|
148337
|
+
staleOverridePartNames.push(partName);
|
|
148338
|
+
}
|
|
148101
148339
|
const beginningString = '<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">';
|
|
148102
148340
|
let updatedContentTypesXml = contentTypesXml.replace(beginningString, `${beginningString}${typesString}`);
|
|
148103
148341
|
for (const partName of staleOverridePartNames) {
|
|
@@ -148261,7 +148499,7 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
|
|
|
148261
148499
|
return `image/${MIME_TYPE_FOR_EXT[detectedType] || detectedType}`;
|
|
148262
148500
|
}
|
|
148263
148501
|
}, DocxZipper_default;
|
|
148264
|
-
var
|
|
148502
|
+
var init_DocxZipper_Bphhij1P_es = __esm(() => {
|
|
148265
148503
|
init_rolldown_runtime_Bg48TavK_es();
|
|
148266
148504
|
init_jszip_C49i9kUs_es();
|
|
148267
148505
|
init_xml_js_CqGKpaft_es();
|
|
@@ -200373,7 +200611,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
200373
200611
|
init_remark_gfm_BhnWr3yf_es();
|
|
200374
200612
|
});
|
|
200375
200613
|
|
|
200376
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
200614
|
+
// ../../packages/superdoc/dist/chunks/src-Bnec7ggt.es.js
|
|
200377
200615
|
function deleteProps(obj, propOrProps) {
|
|
200378
200616
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
200379
200617
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -200623,9 +200861,9 @@ function getParagraphInlineDirection(attrs) {
|
|
|
200623
200861
|
if (fromContext != null)
|
|
200624
200862
|
return fromContext;
|
|
200625
200863
|
const ppRtl = attrs?.paragraphProperties?.rightToLeft;
|
|
200626
|
-
if (
|
|
200864
|
+
if (ppRtl === true)
|
|
200627
200865
|
return "rtl";
|
|
200628
|
-
if (
|
|
200866
|
+
if (ppRtl === false)
|
|
200629
200867
|
return "ltr";
|
|
200630
200868
|
}
|
|
200631
200869
|
function getTableVisualDirection(attrs) {
|
|
@@ -202538,11 +202776,11 @@ function syncSplitParagraphRunProperties(attrs, runProperties) {
|
|
|
202538
202776
|
paragraphProperties: nextParagraphProperties
|
|
202539
202777
|
};
|
|
202540
202778
|
}
|
|
202541
|
-
function getConverter$
|
|
202779
|
+
function getConverter$82(editor) {
|
|
202542
202780
|
return editor.converter;
|
|
202543
202781
|
}
|
|
202544
202782
|
function readTranslatedLinkedStyles(editor) {
|
|
202545
|
-
return getConverter$
|
|
202783
|
+
return getConverter$82(editor)?.translatedLinkedStyles ?? null;
|
|
202546
202784
|
}
|
|
202547
202785
|
function isHeadingStyleId$1(styleId) {
|
|
202548
202786
|
return typeof styleId === "string" && /^heading\s*[1-6]$/i.test(styleId.trim());
|
|
@@ -223502,7 +223740,7 @@ function makeTrackedChangeAnchorKey(ref$1) {
|
|
|
223502
223740
|
function makeCommentAnchorKey(commentId) {
|
|
223503
223741
|
return `${COMMENT_ANCHOR_KEY_PREFIX}${commentId}`;
|
|
223504
223742
|
}
|
|
223505
|
-
function getConverter$
|
|
223743
|
+
function getConverter$72(editor) {
|
|
223506
223744
|
return editor.converter;
|
|
223507
223745
|
}
|
|
223508
223746
|
function toRevisionCapableNoteId(note) {
|
|
@@ -223519,7 +223757,7 @@ function enumerateRevisionCapableStories(editor) {
|
|
|
223519
223757
|
kind: "story",
|
|
223520
223758
|
storyType: "body"
|
|
223521
223759
|
}];
|
|
223522
|
-
const converter = getConverter$
|
|
223760
|
+
const converter = getConverter$72(editor);
|
|
223523
223761
|
if (!converter)
|
|
223524
223762
|
return stories;
|
|
223525
223763
|
if (converter.headers)
|
|
@@ -227609,15 +227847,15 @@ function previewPlan(editor, input2) {
|
|
|
227609
227847
|
}
|
|
227610
227848
|
stepPreviews.push(preview);
|
|
227611
227849
|
}
|
|
227612
|
-
for (const failure of assertFailures)
|
|
227850
|
+
for (const failure$1 of assertFailures)
|
|
227613
227851
|
failures.push({
|
|
227614
227852
|
code: "PRECONDITION_FAILED",
|
|
227615
|
-
stepId: failure.stepId,
|
|
227853
|
+
stepId: failure$1.stepId,
|
|
227616
227854
|
phase: "assert",
|
|
227617
|
-
message: `assert "${failure.stepId}" expected ${failure.expectedCount} matches but found ${failure.actualCount}`,
|
|
227855
|
+
message: `assert "${failure$1.stepId}" expected ${failure$1.expectedCount} matches but found ${failure$1.actualCount}`,
|
|
227618
227856
|
details: {
|
|
227619
|
-
expectedCount: failure.expectedCount,
|
|
227620
|
-
actualCount: failure.actualCount
|
|
227857
|
+
expectedCount: failure$1.expectedCount,
|
|
227858
|
+
actualCount: failure$1.actualCount
|
|
227621
227859
|
}
|
|
227622
227860
|
});
|
|
227623
227861
|
} catch (error48) {
|
|
@@ -232009,10 +232247,10 @@ function registerBuiltInExecutors() {
|
|
|
232009
232247
|
};
|
|
232010
232248
|
} });
|
|
232011
232249
|
}
|
|
232012
|
-
function getConverter$
|
|
232250
|
+
function getConverter$62(editor) {
|
|
232013
232251
|
return editor.converter;
|
|
232014
232252
|
}
|
|
232015
|
-
function getConverter$
|
|
232253
|
+
function getConverter$52(editor) {
|
|
232016
232254
|
return editor.converter;
|
|
232017
232255
|
}
|
|
232018
232256
|
function createEmptyHeaderFooterJson() {
|
|
@@ -232025,7 +232263,7 @@ function createEmptyHeaderFooterJson() {
|
|
|
232025
232263
|
};
|
|
232026
232264
|
}
|
|
232027
232265
|
function syncHeaderFooterCaches(editor, part) {
|
|
232028
|
-
const converter = getConverter$
|
|
232266
|
+
const converter = getConverter$52(editor);
|
|
232029
232267
|
if (!converter)
|
|
232030
232268
|
return;
|
|
232031
232269
|
const relsRoot = part?.elements?.find((el) => el.name === "Relationships");
|
|
@@ -232087,7 +232325,7 @@ function createTableWrapper(editor, input2, options) {
|
|
|
232087
232325
|
});
|
|
232088
232326
|
return adapterResult;
|
|
232089
232327
|
}
|
|
232090
|
-
function getConverter$
|
|
232328
|
+
function getConverter$42(editor) {
|
|
232091
232329
|
return editor.converter;
|
|
232092
232330
|
}
|
|
232093
232331
|
function toSectionFailure2(code7, message) {
|
|
@@ -232155,7 +232393,7 @@ function buildSectionMarginsForAttrs2(sectPr) {
|
|
|
232155
232393
|
};
|
|
232156
232394
|
}
|
|
232157
232395
|
function syncConverterBodySection2(editor, sectPr) {
|
|
232158
|
-
const converter = getConverter$
|
|
232396
|
+
const converter = getConverter$42(editor);
|
|
232159
232397
|
if (!converter)
|
|
232160
232398
|
return;
|
|
232161
232399
|
converter.bodySectPr = cloneXmlElement(sectPr);
|
|
@@ -232275,7 +232513,7 @@ function createSectionBreakNode(editor, breakParagraphId, input2) {
|
|
|
232275
232513
|
return paragraphNode;
|
|
232276
232514
|
}
|
|
232277
232515
|
function updateGlobalTitlePageFlag(editor) {
|
|
232278
|
-
const converter = getConverter$
|
|
232516
|
+
const converter = getConverter$42(editor);
|
|
232279
232517
|
if (!converter)
|
|
232280
232518
|
return;
|
|
232281
232519
|
const anyTitlePage = resolveSectionProjections(editor).some((entry) => entry.domain.titlePage === true);
|
|
@@ -232359,7 +232597,7 @@ function sectionsSetTitlePageAdapter(editor, input2, options) {
|
|
|
232359
232597
|
}
|
|
232360
232598
|
function sectionsSetOddEvenHeadersFootersAdapter(editor, input2, options) {
|
|
232361
232599
|
rejectTrackedMode("sections.setOddEvenHeadersFooters", options);
|
|
232362
|
-
const converter = getConverter$
|
|
232600
|
+
const converter = getConverter$42(editor);
|
|
232363
232601
|
if (!converter)
|
|
232364
232602
|
throw new DocumentApiAdapterError("CAPABILITY_UNAVAILABLE", "sections.setOddEvenHeadersFooters requires an active document converter.");
|
|
232365
232603
|
return mutatePart({
|
|
@@ -232395,13 +232633,13 @@ function sectionsSetSectionDirectionAdapter(editor, input2, options) {
|
|
|
232395
232633
|
}
|
|
232396
232634
|
function sectionsSetHeaderFooterRefAdapter(editor, input2, options) {
|
|
232397
232635
|
return sectionMutationBySectPr$1(editor, input2, options, "sections.setHeaderFooterRef", (sectPr, _projection, _sections, dryRun) => {
|
|
232398
|
-
const converter = getConverter$
|
|
232636
|
+
const converter = getConverter$42(editor) ?? null;
|
|
232399
232637
|
return setHeaderFooterRefMutation(sectPr, input2.kind, input2.variant, input2.refId, converter, "sections.setHeaderFooterRef", dryRun);
|
|
232400
232638
|
});
|
|
232401
232639
|
}
|
|
232402
232640
|
function sectionsClearHeaderFooterRefAdapter(editor, input2, options) {
|
|
232403
232641
|
return sectionMutationBySectPr$1(editor, input2, options, "sections.clearHeaderFooterRef", (sectPr, _projection, _sections, dryRun) => {
|
|
232404
|
-
const converter = getConverter$
|
|
232642
|
+
const converter = getConverter$42(editor) ?? null;
|
|
232405
232643
|
clearHeaderFooterRefMutation(sectPr, input2.kind, input2.variant, converter, dryRun);
|
|
232406
232644
|
});
|
|
232407
232645
|
}
|
|
@@ -237030,11 +237268,11 @@ function createContentControlsAdapter(editor) {
|
|
|
237030
237268
|
create: (input2, options) => createWrapper(editor, input2, options)
|
|
237031
237269
|
};
|
|
237032
237270
|
}
|
|
237033
|
-
function getConverter$
|
|
237271
|
+
function getConverter$32(editor) {
|
|
237034
237272
|
return editor.converter;
|
|
237035
237273
|
}
|
|
237036
237274
|
function requireConverter$1(editor, operationName) {
|
|
237037
|
-
const converter = getConverter$
|
|
237275
|
+
const converter = getConverter$32(editor);
|
|
237038
237276
|
if (!converter)
|
|
237039
237277
|
throw new DocumentApiAdapterError("CAPABILITY_UNAVAILABLE", `${operationName} requires an active document converter.`);
|
|
237040
237278
|
return converter;
|
|
@@ -237140,7 +237378,7 @@ function headerFootersResolveAdapter(editor, input2) {
|
|
|
237140
237378
|
function headerFootersRefsSetAdapter(editor, input2, options) {
|
|
237141
237379
|
const { section, headerFooterKind, variant } = input2.target;
|
|
237142
237380
|
const result = sectionMutationBySectPr(editor, { target: section }, options, "headerFooters.refs.set", (sectPr, _projection, _sections, dryRun) => {
|
|
237143
|
-
const converter = getConverter$
|
|
237381
|
+
const converter = getConverter$32(editor) ?? null;
|
|
237144
237382
|
return setHeaderFooterRefMutation(sectPr, headerFooterKind, variant, input2.refId, converter, "headerFooters.refs.set", dryRun);
|
|
237145
237383
|
});
|
|
237146
237384
|
invalidateSlotRuntimesAfterRefChange(editor, result, options);
|
|
@@ -237149,7 +237387,7 @@ function headerFootersRefsSetAdapter(editor, input2, options) {
|
|
|
237149
237387
|
function headerFootersRefsClearAdapter(editor, input2, options) {
|
|
237150
237388
|
const { section, headerFooterKind, variant } = input2.target;
|
|
237151
237389
|
const result = sectionMutationBySectPr(editor, { target: section }, options, "headerFooters.refs.clear", (sectPr, _projection, _sections, dryRun) => {
|
|
237152
|
-
clearHeaderFooterRefMutation(sectPr, headerFooterKind, variant, getConverter$
|
|
237390
|
+
clearHeaderFooterRefMutation(sectPr, headerFooterKind, variant, getConverter$32(editor) ?? null, dryRun);
|
|
237153
237391
|
});
|
|
237154
237392
|
invalidateSlotRuntimesAfterRefChange(editor, result, options);
|
|
237155
237393
|
return result;
|
|
@@ -237985,6 +238223,672 @@ function bookmarksRemoveWrapper(editor, input2, options) {
|
|
|
237985
238223
|
disposeEphemeralWriteRuntime(runtime);
|
|
237986
238224
|
}
|
|
237987
238225
|
}
|
|
238226
|
+
function executeOutOfBandMutation(editor, mutateFn, options) {
|
|
238227
|
+
if (!options.dryRun)
|
|
238228
|
+
if (editor.options?.collaborationProvider && editor.options?.ydoc)
|
|
238229
|
+
try {
|
|
238230
|
+
yUndoPluginKey.getState(editor.state)?.undoManager?.stopCapturing();
|
|
238231
|
+
} catch {}
|
|
238232
|
+
else
|
|
238233
|
+
try {
|
|
238234
|
+
editor.view?.dispatch?.(closeHistory(editor.state.tr));
|
|
238235
|
+
} catch {}
|
|
238236
|
+
checkRevision(editor, options.expectedRevision);
|
|
238237
|
+
const result = mutateFn(options.dryRun);
|
|
238238
|
+
if (result.changed && !options.dryRun) {
|
|
238239
|
+
const converter = editor.converter;
|
|
238240
|
+
if (converter) {
|
|
238241
|
+
converter.documentModified = true;
|
|
238242
|
+
if (!converter.documentGuid && typeof converter.promoteToGuid === "function")
|
|
238243
|
+
converter.promoteToGuid();
|
|
238244
|
+
}
|
|
238245
|
+
incrementRevision(editor);
|
|
238246
|
+
}
|
|
238247
|
+
return result.payload;
|
|
238248
|
+
}
|
|
238249
|
+
function getLocalName2(name) {
|
|
238250
|
+
if (!name || typeof name !== "string")
|
|
238251
|
+
return "";
|
|
238252
|
+
const i4 = name.indexOf(":");
|
|
238253
|
+
return i4 >= 0 ? name.slice(i4 + 1) : name;
|
|
238254
|
+
}
|
|
238255
|
+
function findFirstElement(parent, localName) {
|
|
238256
|
+
if (!parent?.elements?.length)
|
|
238257
|
+
return null;
|
|
238258
|
+
return parent.elements.find((el) => el?.type === "element" && getLocalName2(el.name) === localName) ?? null;
|
|
238259
|
+
}
|
|
238260
|
+
function findAllElements(parent, localName) {
|
|
238261
|
+
if (!parent?.elements?.length)
|
|
238262
|
+
return [];
|
|
238263
|
+
return parent.elements.filter((el) => el?.type === "element" && getLocalName2(el.name) === localName);
|
|
238264
|
+
}
|
|
238265
|
+
function partNameFromIndex(index2) {
|
|
238266
|
+
return `customXml/item${index2}.xml`;
|
|
238267
|
+
}
|
|
238268
|
+
function propsPartNameFromIndex(index2) {
|
|
238269
|
+
return `customXml/itemProps${index2}.xml`;
|
|
238270
|
+
}
|
|
238271
|
+
function indexFromPartName(partName) {
|
|
238272
|
+
const m$1 = /^customXml\/item(\d+)\.xml$/i.exec(partName ?? "");
|
|
238273
|
+
return m$1 ? Number.parseInt(m$1[1], 10) : null;
|
|
238274
|
+
}
|
|
238275
|
+
function indexFromPropsPartName(propsPartName) {
|
|
238276
|
+
const m$1 = /^customXml\/itemProps(\d+)\.xml$/i.exec(propsPartName ?? "");
|
|
238277
|
+
return m$1 ? Number.parseInt(m$1[1], 10) : null;
|
|
238278
|
+
}
|
|
238279
|
+
function isCustomXmlStoragePartName(partName) {
|
|
238280
|
+
return indexFromPartName(partName) != null;
|
|
238281
|
+
}
|
|
238282
|
+
function listCustomXmlStoragePartNames(convertedXml) {
|
|
238283
|
+
if (!convertedXml || typeof convertedXml !== "object")
|
|
238284
|
+
return [];
|
|
238285
|
+
const indexes = [];
|
|
238286
|
+
for (const path2 of Object.keys(convertedXml)) {
|
|
238287
|
+
const idx = indexFromPartName(path2);
|
|
238288
|
+
if (idx != null)
|
|
238289
|
+
indexes.push(idx);
|
|
238290
|
+
}
|
|
238291
|
+
indexes.sort((a2, b$1) => a2 - b$1);
|
|
238292
|
+
return indexes.map(partNameFromIndex);
|
|
238293
|
+
}
|
|
238294
|
+
function findPropsPartFor(convertedXml, partName) {
|
|
238295
|
+
if (!convertedXml)
|
|
238296
|
+
return null;
|
|
238297
|
+
const idx = indexFromPartName(partName);
|
|
238298
|
+
if (idx == null)
|
|
238299
|
+
return null;
|
|
238300
|
+
const relsRoot = convertedXml[`customXml/_rels/item${idx}.xml.rels`]?.elements?.find((el) => getLocalName2(el?.name) === "Relationships");
|
|
238301
|
+
if (relsRoot?.elements?.length)
|
|
238302
|
+
for (const rel of relsRoot.elements) {
|
|
238303
|
+
if (rel?.attributes?.Type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps")
|
|
238304
|
+
continue;
|
|
238305
|
+
const target = rel?.attributes?.Target;
|
|
238306
|
+
if (typeof target !== "string" || target.length === 0)
|
|
238307
|
+
continue;
|
|
238308
|
+
const candidate = resolveOpcTargetPath(target, "customXml");
|
|
238309
|
+
if (candidate && convertedXml[candidate])
|
|
238310
|
+
return candidate;
|
|
238311
|
+
}
|
|
238312
|
+
const indexCandidate = propsPartNameFromIndex(idx);
|
|
238313
|
+
return convertedXml[indexCandidate] ? indexCandidate : null;
|
|
238314
|
+
}
|
|
238315
|
+
function parsePropsPart(propsDoc) {
|
|
238316
|
+
const root3 = propsDoc?.elements?.find((el) => el?.type === "element" && getLocalName2(el.name) === "datastoreItem");
|
|
238317
|
+
if (!root3)
|
|
238318
|
+
return null;
|
|
238319
|
+
const itemId = root3.attributes?.["ds:itemID"] ?? root3.attributes?.itemID ?? null;
|
|
238320
|
+
const schemaRefs = findAllElements(findFirstElement(root3, "schemaRefs"), "schemaRef").map((el) => el.attributes?.["ds:uri"] ?? el.attributes?.uri ?? null).filter((uri) => typeof uri === "string" && uri.length > 0);
|
|
238321
|
+
return {
|
|
238322
|
+
itemId: typeof itemId === "string" && itemId.length > 0 ? itemId : null,
|
|
238323
|
+
schemaRefs
|
|
238324
|
+
};
|
|
238325
|
+
}
|
|
238326
|
+
function parseStoragePartRootNamespace(storageDoc) {
|
|
238327
|
+
const root3 = storageDoc?.elements?.find((el) => el?.type === "element");
|
|
238328
|
+
if (!root3)
|
|
238329
|
+
return null;
|
|
238330
|
+
const xmlns2 = root3.attributes?.xmlns;
|
|
238331
|
+
if (typeof xmlns2 === "string" && xmlns2.length > 0)
|
|
238332
|
+
return xmlns2;
|
|
238333
|
+
const elementName = root3.name ?? "";
|
|
238334
|
+
const colonIdx = elementName.indexOf(":");
|
|
238335
|
+
if (colonIdx > 0) {
|
|
238336
|
+
const prefixedAttr = `xmlns:${elementName.slice(0, colonIdx)}`;
|
|
238337
|
+
const prefixedValue = root3.attributes?.[prefixedAttr];
|
|
238338
|
+
if (typeof prefixedValue === "string" && prefixedValue.length > 0)
|
|
238339
|
+
return prefixedValue;
|
|
238340
|
+
}
|
|
238341
|
+
return null;
|
|
238342
|
+
}
|
|
238343
|
+
function serializeXmlDoc(xmlDoc) {
|
|
238344
|
+
if (!xmlDoc)
|
|
238345
|
+
return "";
|
|
238346
|
+
return import_lib4.js2xml(xmlDoc, {
|
|
238347
|
+
compact: false,
|
|
238348
|
+
spaces: 0
|
|
238349
|
+
});
|
|
238350
|
+
}
|
|
238351
|
+
function readCustomXmlPart(convertedXml, target) {
|
|
238352
|
+
if (!target || !convertedXml)
|
|
238353
|
+
return null;
|
|
238354
|
+
let partName = null;
|
|
238355
|
+
let itemId = null;
|
|
238356
|
+
if (typeof target.partName === "string" && target.partName.length > 0) {
|
|
238357
|
+
if (!isCustomXmlStoragePartName(target.partName))
|
|
238358
|
+
return null;
|
|
238359
|
+
partName = target.partName;
|
|
238360
|
+
} else if (typeof target.id === "string" && target.id.length > 0) {
|
|
238361
|
+
itemId = target.id;
|
|
238362
|
+
for (const candidatePartName of listCustomXmlStoragePartNames(convertedXml)) {
|
|
238363
|
+
const propsName = findPropsPartFor(convertedXml, candidatePartName);
|
|
238364
|
+
if (!propsName)
|
|
238365
|
+
continue;
|
|
238366
|
+
if (parsePropsPart(convertedXml[propsName])?.itemId === itemId) {
|
|
238367
|
+
partName = candidatePartName;
|
|
238368
|
+
break;
|
|
238369
|
+
}
|
|
238370
|
+
}
|
|
238371
|
+
if (!partName)
|
|
238372
|
+
return null;
|
|
238373
|
+
} else
|
|
238374
|
+
return null;
|
|
238375
|
+
const storageDoc = convertedXml[partName];
|
|
238376
|
+
if (!storageDoc)
|
|
238377
|
+
return null;
|
|
238378
|
+
const propsPartName = findPropsPartFor(convertedXml, partName);
|
|
238379
|
+
const props = propsPartName ? parsePropsPart(convertedXml[propsPartName]) : null;
|
|
238380
|
+
return {
|
|
238381
|
+
id: props?.itemId ?? null,
|
|
238382
|
+
partName,
|
|
238383
|
+
propsPartName: propsPartName ?? null,
|
|
238384
|
+
rootNamespace: parseStoragePartRootNamespace(storageDoc),
|
|
238385
|
+
schemaRefs: props?.schemaRefs ?? [],
|
|
238386
|
+
content: serializeXmlDoc(storageDoc)
|
|
238387
|
+
};
|
|
238388
|
+
}
|
|
238389
|
+
function listCustomXmlParts(convertedXml) {
|
|
238390
|
+
return listCustomXmlStoragePartNames(convertedXml).map((partName) => {
|
|
238391
|
+
const propsPartName = findPropsPartFor(convertedXml, partName);
|
|
238392
|
+
const props = propsPartName ? parsePropsPart(convertedXml[propsPartName]) : null;
|
|
238393
|
+
return {
|
|
238394
|
+
id: props?.itemId ?? null,
|
|
238395
|
+
partName,
|
|
238396
|
+
propsPartName: propsPartName ?? null,
|
|
238397
|
+
rootNamespace: parseStoragePartRootNamespace(convertedXml[partName]),
|
|
238398
|
+
schemaRefs: props?.schemaRefs ?? []
|
|
238399
|
+
};
|
|
238400
|
+
});
|
|
238401
|
+
}
|
|
238402
|
+
function nextCustomXmlItemIndex(convertedXml, converter) {
|
|
238403
|
+
const used = /* @__PURE__ */ new Set;
|
|
238404
|
+
for (const path2 of Object.keys(convertedXml ?? {})) {
|
|
238405
|
+
const idx = indexFromPartName(path2) ?? indexFromPropsPartName(path2);
|
|
238406
|
+
if (idx != null)
|
|
238407
|
+
used.add(idx);
|
|
238408
|
+
}
|
|
238409
|
+
let candidate = 1;
|
|
238410
|
+
while (used.has(candidate))
|
|
238411
|
+
candidate += 1;
|
|
238412
|
+
return candidate;
|
|
238413
|
+
}
|
|
238414
|
+
function createXmlDocument2(rootElement, declaration) {
|
|
238415
|
+
const nextDeclaration = declaration ?? DEFAULT_XML_DECLARATION;
|
|
238416
|
+
return {
|
|
238417
|
+
declaration: {
|
|
238418
|
+
...nextDeclaration,
|
|
238419
|
+
attributes: { ...nextDeclaration.attributes }
|
|
238420
|
+
},
|
|
238421
|
+
elements: [rootElement]
|
|
238422
|
+
};
|
|
238423
|
+
}
|
|
238424
|
+
function parseContentToRootElement(content3) {
|
|
238425
|
+
const parsed = import_lib4.xml2js(content3, { compact: false });
|
|
238426
|
+
const root3 = (parsed.elements ?? []).find((el) => el?.type === "element");
|
|
238427
|
+
if (!root3)
|
|
238428
|
+
throw new Error("Custom XML content is missing a root element.");
|
|
238429
|
+
return {
|
|
238430
|
+
root: root3,
|
|
238431
|
+
declaration: parsed.declaration ?? null
|
|
238432
|
+
};
|
|
238433
|
+
}
|
|
238434
|
+
function ensureDocumentRelationshipsRoot2(convertedXml) {
|
|
238435
|
+
if (!convertedXml["word/_rels/document.xml.rels"])
|
|
238436
|
+
convertedXml["word/_rels/document.xml.rels"] = createXmlDocument2({
|
|
238437
|
+
type: "element",
|
|
238438
|
+
name: "Relationships",
|
|
238439
|
+
attributes: { xmlns: "http://schemas.openxmlformats.org/package/2006/relationships" },
|
|
238440
|
+
elements: []
|
|
238441
|
+
});
|
|
238442
|
+
const relsData = convertedXml["word/_rels/document.xml.rels"];
|
|
238443
|
+
relsData.elements ??= [];
|
|
238444
|
+
let relsRoot = relsData.elements.find((el) => getLocalName2(el?.name) === "Relationships");
|
|
238445
|
+
if (!relsRoot) {
|
|
238446
|
+
relsRoot = {
|
|
238447
|
+
type: "element",
|
|
238448
|
+
name: "Relationships",
|
|
238449
|
+
attributes: { xmlns: "http://schemas.openxmlformats.org/package/2006/relationships" },
|
|
238450
|
+
elements: []
|
|
238451
|
+
};
|
|
238452
|
+
relsData.elements.push(relsRoot);
|
|
238453
|
+
}
|
|
238454
|
+
relsRoot.elements ??= [];
|
|
238455
|
+
return relsRoot;
|
|
238456
|
+
}
|
|
238457
|
+
function getNextRelationshipId2(relsRoot) {
|
|
238458
|
+
const used = (relsRoot?.elements ?? []).map((rel) => {
|
|
238459
|
+
const id2 = rel?.attributes?.Id;
|
|
238460
|
+
const m$1 = typeof id2 === "string" ? /^rId(\d+)$/.exec(id2) : null;
|
|
238461
|
+
return m$1 ? Number.parseInt(m$1[1], 10) : NaN;
|
|
238462
|
+
}).filter((n) => Number.isFinite(n));
|
|
238463
|
+
return `rId${(used.length > 0 ? Math.max(...used) : 0) + 1}`;
|
|
238464
|
+
}
|
|
238465
|
+
function buildDocumentRelTarget(partName) {
|
|
238466
|
+
return partName.startsWith("customXml/") ? `../${partName}` : partName;
|
|
238467
|
+
}
|
|
238468
|
+
function buildItemPropsRoot(itemId, schemaRefs) {
|
|
238469
|
+
return [{
|
|
238470
|
+
type: "element",
|
|
238471
|
+
name: "ds:datastoreItem",
|
|
238472
|
+
attributes: {
|
|
238473
|
+
"ds:itemID": itemId,
|
|
238474
|
+
"xmlns:ds": CUSTOM_XML_DATASTORE_NAMESPACE
|
|
238475
|
+
},
|
|
238476
|
+
elements: schemaRefs === undefined ? [] : [{
|
|
238477
|
+
type: "element",
|
|
238478
|
+
name: "ds:schemaRefs",
|
|
238479
|
+
elements: schemaRefs.map((uri) => ({
|
|
238480
|
+
type: "element",
|
|
238481
|
+
name: "ds:schemaRef",
|
|
238482
|
+
attributes: { "ds:uri": uri }
|
|
238483
|
+
}))
|
|
238484
|
+
}]
|
|
238485
|
+
}][0];
|
|
238486
|
+
}
|
|
238487
|
+
function buildItemRelsRoot(propsPartFileName) {
|
|
238488
|
+
return {
|
|
238489
|
+
type: "element",
|
|
238490
|
+
name: "Relationships",
|
|
238491
|
+
attributes: { xmlns: "http://schemas.openxmlformats.org/package/2006/relationships" },
|
|
238492
|
+
elements: [{
|
|
238493
|
+
type: "element",
|
|
238494
|
+
name: "Relationship",
|
|
238495
|
+
attributes: {
|
|
238496
|
+
Id: "rId1",
|
|
238497
|
+
Type: CUSTOM_XML_PROPS_RELATIONSHIP_TYPE2,
|
|
238498
|
+
Target: propsPartFileName
|
|
238499
|
+
}
|
|
238500
|
+
}]
|
|
238501
|
+
};
|
|
238502
|
+
}
|
|
238503
|
+
function resolveTargetPartName(convertedXml, target) {
|
|
238504
|
+
if (!target)
|
|
238505
|
+
return null;
|
|
238506
|
+
if (typeof target.partName === "string" && target.partName.length > 0) {
|
|
238507
|
+
if (!isCustomXmlStoragePartName(target.partName))
|
|
238508
|
+
return null;
|
|
238509
|
+
return convertedXml[target.partName] ? target.partName : null;
|
|
238510
|
+
}
|
|
238511
|
+
if (typeof target.id === "string" && target.id.length > 0)
|
|
238512
|
+
for (const partName of listCustomXmlStoragePartNames(convertedXml)) {
|
|
238513
|
+
const propsName = findPropsPartFor(convertedXml, partName);
|
|
238514
|
+
if (!propsName)
|
|
238515
|
+
continue;
|
|
238516
|
+
if (parsePropsPart(convertedXml[propsName])?.itemId === target.id)
|
|
238517
|
+
return partName;
|
|
238518
|
+
}
|
|
238519
|
+
return null;
|
|
238520
|
+
}
|
|
238521
|
+
function createCustomXmlPart(convertedXml, { content: content3, schemaRefs }, converter) {
|
|
238522
|
+
const { root: root3, declaration } = parseContentToRootElement(content3);
|
|
238523
|
+
const index2 = nextCustomXmlItemIndex(convertedXml, converter);
|
|
238524
|
+
const partName = partNameFromIndex(index2);
|
|
238525
|
+
const propsPartName = propsPartNameFromIndex(index2);
|
|
238526
|
+
const itemRelsPath = `customXml/_rels/item${index2}.xml.rels`;
|
|
238527
|
+
const itemId = `{${v4_default().toUpperCase()}}`;
|
|
238528
|
+
convertedXml[partName] = createXmlDocument2(root3, declaration);
|
|
238529
|
+
convertedXml[propsPartName] = createXmlDocument2(buildItemPropsRoot(itemId, schemaRefs));
|
|
238530
|
+
convertedXml[itemRelsPath] = createXmlDocument2(buildItemRelsRoot(`itemProps${index2}.xml`));
|
|
238531
|
+
const relsRoot = ensureDocumentRelationshipsRoot2(convertedXml);
|
|
238532
|
+
relsRoot.elements.push({
|
|
238533
|
+
type: "element",
|
|
238534
|
+
name: "Relationship",
|
|
238535
|
+
attributes: {
|
|
238536
|
+
Id: getNextRelationshipId2(relsRoot),
|
|
238537
|
+
Type: CUSTOM_XML_DATA_RELATIONSHIP_TYPE,
|
|
238538
|
+
Target: buildDocumentRelTarget(partName)
|
|
238539
|
+
}
|
|
238540
|
+
});
|
|
238541
|
+
if (converter?.removedCustomXmlPaths instanceof Set) {
|
|
238542
|
+
converter.removedCustomXmlPaths.delete(partName);
|
|
238543
|
+
converter.removedCustomXmlPaths.delete(propsPartName);
|
|
238544
|
+
converter.removedCustomXmlPaths.delete(itemRelsPath);
|
|
238545
|
+
}
|
|
238546
|
+
return {
|
|
238547
|
+
id: itemId,
|
|
238548
|
+
partName,
|
|
238549
|
+
propsPartName
|
|
238550
|
+
};
|
|
238551
|
+
}
|
|
238552
|
+
function patchCustomXmlPart(convertedXml, target, { content: content3, schemaRefs }, converter) {
|
|
238553
|
+
const partName = resolveTargetPartName(convertedXml, target);
|
|
238554
|
+
if (!partName)
|
|
238555
|
+
return null;
|
|
238556
|
+
if (content3 !== undefined) {
|
|
238557
|
+
const { root: root3, declaration } = parseContentToRootElement(content3);
|
|
238558
|
+
convertedXml[partName] = createXmlDocument2(root3, convertedXml[partName]?.declaration ?? declaration);
|
|
238559
|
+
}
|
|
238560
|
+
let resolvedId = null;
|
|
238561
|
+
if (schemaRefs !== undefined) {
|
|
238562
|
+
let propsPartName = findPropsPartFor(convertedXml, partName);
|
|
238563
|
+
if (propsPartName)
|
|
238564
|
+
resolvedId = parsePropsPart(convertedXml[propsPartName])?.itemId ?? null;
|
|
238565
|
+
if (!propsPartName) {
|
|
238566
|
+
const idx = indexFromPartName(partName);
|
|
238567
|
+
if (idx == null)
|
|
238568
|
+
return null;
|
|
238569
|
+
propsPartName = propsPartNameFromIndex(idx);
|
|
238570
|
+
const itemRelsPath = `customXml/_rels/item${idx}.xml.rels`;
|
|
238571
|
+
resolvedId = `{${v4_default().toUpperCase()}}`;
|
|
238572
|
+
convertedXml[itemRelsPath] = createXmlDocument2(buildItemRelsRoot(`itemProps${idx}.xml`));
|
|
238573
|
+
}
|
|
238574
|
+
if (!resolvedId)
|
|
238575
|
+
resolvedId = `{${v4_default().toUpperCase()}}`;
|
|
238576
|
+
const existingDecl = convertedXml[propsPartName]?.declaration;
|
|
238577
|
+
convertedXml[propsPartName] = createXmlDocument2(buildItemPropsRoot(resolvedId, schemaRefs), existingDecl);
|
|
238578
|
+
} else {
|
|
238579
|
+
const propsPartName = findPropsPartFor(convertedXml, partName);
|
|
238580
|
+
if (propsPartName)
|
|
238581
|
+
resolvedId = parsePropsPart(convertedXml[propsPartName])?.itemId ?? null;
|
|
238582
|
+
}
|
|
238583
|
+
if (converter)
|
|
238584
|
+
invalidateConverterCachesForPath(converter, partName);
|
|
238585
|
+
return resolvedId ? {
|
|
238586
|
+
partName,
|
|
238587
|
+
id: resolvedId
|
|
238588
|
+
} : { partName };
|
|
238589
|
+
}
|
|
238590
|
+
function removeCustomXmlPart(convertedXml, target, converter) {
|
|
238591
|
+
const partName = resolveTargetPartName(convertedXml, target);
|
|
238592
|
+
if (!partName)
|
|
238593
|
+
return false;
|
|
238594
|
+
const index2 = indexFromPartName(partName);
|
|
238595
|
+
const removedPaths = [
|
|
238596
|
+
partName,
|
|
238597
|
+
findPropsPartFor(convertedXml, partName),
|
|
238598
|
+
index2 == null ? null : `customXml/_rels/item${index2}.xml.rels`
|
|
238599
|
+
].filter((path2) => typeof path2 === "string" && path2.length > 0);
|
|
238600
|
+
for (const path2 of removedPaths)
|
|
238601
|
+
delete convertedXml[path2];
|
|
238602
|
+
const relsRoot = convertedXml["word/_rels/document.xml.rels"]?.elements?.find((el) => getLocalName2(el?.name) === "Relationships");
|
|
238603
|
+
if (relsRoot?.elements?.length)
|
|
238604
|
+
relsRoot.elements = relsRoot.elements.filter((rel) => {
|
|
238605
|
+
if (rel?.attributes?.Type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml")
|
|
238606
|
+
return true;
|
|
238607
|
+
return resolveOpcTargetPath(rel?.attributes?.Target, "word") !== partName;
|
|
238608
|
+
});
|
|
238609
|
+
if (converter) {
|
|
238610
|
+
if (!(converter.removedCustomXmlPaths instanceof Set))
|
|
238611
|
+
converter.removedCustomXmlPaths = /* @__PURE__ */ new Set;
|
|
238612
|
+
for (const path2 of removedPaths)
|
|
238613
|
+
converter.removedCustomXmlPaths.add(path2);
|
|
238614
|
+
invalidateConverterCachesForPath(converter, partName);
|
|
238615
|
+
}
|
|
238616
|
+
return true;
|
|
238617
|
+
}
|
|
238618
|
+
function invalidateConverterCachesForPath(converter, partName) {
|
|
238619
|
+
if (!converter || typeof partName !== "string")
|
|
238620
|
+
return;
|
|
238621
|
+
const biblio = converter.bibliographyPart;
|
|
238622
|
+
if (biblio && biblio.partPath === partName)
|
|
238623
|
+
converter.bibliographyPart = {
|
|
238624
|
+
sources: [],
|
|
238625
|
+
partPath: null,
|
|
238626
|
+
itemPropsPath: null,
|
|
238627
|
+
itemRelsPath: null,
|
|
238628
|
+
selectedStyle: null,
|
|
238629
|
+
styleName: null,
|
|
238630
|
+
version: null
|
|
238631
|
+
};
|
|
238632
|
+
}
|
|
238633
|
+
function getConverter$22(editor) {
|
|
238634
|
+
return editor.converter ?? null;
|
|
238635
|
+
}
|
|
238636
|
+
function getConvertedXml2(editor) {
|
|
238637
|
+
return getConverter$22(editor)?.convertedXml ?? {};
|
|
238638
|
+
}
|
|
238639
|
+
function toSummary(record3) {
|
|
238640
|
+
const summary = {
|
|
238641
|
+
partName: record3.partName,
|
|
238642
|
+
schemaRefs: record3.schemaRefs
|
|
238643
|
+
};
|
|
238644
|
+
if (record3.id)
|
|
238645
|
+
summary.id = record3.id;
|
|
238646
|
+
if (record3.propsPartName)
|
|
238647
|
+
summary.propsPartName = record3.propsPartName;
|
|
238648
|
+
if (record3.rootNamespace)
|
|
238649
|
+
summary.rootNamespace = record3.rootNamespace;
|
|
238650
|
+
return summary;
|
|
238651
|
+
}
|
|
238652
|
+
function customXmlPartsListWrapper(editor, query) {
|
|
238653
|
+
const revision = getRevision(editor);
|
|
238654
|
+
let filtered = listCustomXmlParts(getConvertedXml2(editor));
|
|
238655
|
+
if (query?.rootNamespace !== undefined)
|
|
238656
|
+
filtered = filtered.filter((p$12) => p$12.rootNamespace === query.rootNamespace);
|
|
238657
|
+
if (query?.schemaRef !== undefined)
|
|
238658
|
+
filtered = filtered.filter((p$12) => p$12.schemaRefs.includes(query.schemaRef));
|
|
238659
|
+
const { total, items: paged } = paginate(filtered.map((record3) => {
|
|
238660
|
+
const summary = toSummary(record3);
|
|
238661
|
+
const stableId = summary.id ?? summary.partName;
|
|
238662
|
+
return buildDiscoveryItem(stableId, buildResolvedHandle(`customXml:${stableId}`, "ephemeral", "ext:customXmlPart"), summary);
|
|
238663
|
+
}), query?.offset, query?.limit);
|
|
238664
|
+
return buildDiscoveryResult({
|
|
238665
|
+
evaluatedRevision: revision,
|
|
238666
|
+
total,
|
|
238667
|
+
items: paged,
|
|
238668
|
+
page: {
|
|
238669
|
+
limit: query?.limit ?? total,
|
|
238670
|
+
offset: query?.offset ?? 0,
|
|
238671
|
+
returned: paged.length
|
|
238672
|
+
}
|
|
238673
|
+
});
|
|
238674
|
+
}
|
|
238675
|
+
function customXmlPartsGetWrapper(editor, input2) {
|
|
238676
|
+
const record3 = readCustomXmlPart(getConvertedXml2(editor), input2.target);
|
|
238677
|
+
if (!record3)
|
|
238678
|
+
return null;
|
|
238679
|
+
const info = {
|
|
238680
|
+
partName: record3.partName,
|
|
238681
|
+
rootNamespace: record3.rootNamespace ?? undefined,
|
|
238682
|
+
schemaRefs: record3.schemaRefs,
|
|
238683
|
+
content: record3.content
|
|
238684
|
+
};
|
|
238685
|
+
if (record3.id)
|
|
238686
|
+
info.id = record3.id;
|
|
238687
|
+
if (record3.propsPartName)
|
|
238688
|
+
info.propsPartName = record3.propsPartName;
|
|
238689
|
+
return info;
|
|
238690
|
+
}
|
|
238691
|
+
function failure(code7, message) {
|
|
238692
|
+
return {
|
|
238693
|
+
success: false,
|
|
238694
|
+
failure: {
|
|
238695
|
+
code: code7,
|
|
238696
|
+
message
|
|
238697
|
+
}
|
|
238698
|
+
};
|
|
238699
|
+
}
|
|
238700
|
+
function isWriteFailure(outcome) {
|
|
238701
|
+
return outcome.ok === false;
|
|
238702
|
+
}
|
|
238703
|
+
function targetNotFound() {
|
|
238704
|
+
return {
|
|
238705
|
+
ok: false,
|
|
238706
|
+
code: "TARGET_NOT_FOUND",
|
|
238707
|
+
message: "No custom XML part matched the supplied target."
|
|
238708
|
+
};
|
|
238709
|
+
}
|
|
238710
|
+
function safeValidate(fn2) {
|
|
238711
|
+
try {
|
|
238712
|
+
return {
|
|
238713
|
+
ok: true,
|
|
238714
|
+
payload: fn2()
|
|
238715
|
+
};
|
|
238716
|
+
} catch (e) {
|
|
238717
|
+
return {
|
|
238718
|
+
ok: false,
|
|
238719
|
+
code: "INVALID_INPUT",
|
|
238720
|
+
message: e instanceof Error ? e.message : String(e)
|
|
238721
|
+
};
|
|
238722
|
+
}
|
|
238723
|
+
}
|
|
238724
|
+
function customXmlPartsCreateWrapper(editor, input2, options) {
|
|
238725
|
+
rejectTrackedMode("customXml.parts.create", options);
|
|
238726
|
+
const outcome = executeOutOfBandMutation(editor, (dryRun) => {
|
|
238727
|
+
if (dryRun) {
|
|
238728
|
+
const probe$1 = safeValidate(() => createCustomXmlPart({}, {
|
|
238729
|
+
content: input2.content,
|
|
238730
|
+
schemaRefs: input2.schemaRefs
|
|
238731
|
+
}));
|
|
238732
|
+
if (isWriteFailure(probe$1))
|
|
238733
|
+
return {
|
|
238734
|
+
changed: false,
|
|
238735
|
+
payload: probe$1
|
|
238736
|
+
};
|
|
238737
|
+
return {
|
|
238738
|
+
changed: false,
|
|
238739
|
+
payload: {
|
|
238740
|
+
ok: true,
|
|
238741
|
+
payload: {
|
|
238742
|
+
id: "{DRY-RUN}",
|
|
238743
|
+
partName: "",
|
|
238744
|
+
propsPartName: ""
|
|
238745
|
+
}
|
|
238746
|
+
}
|
|
238747
|
+
};
|
|
238748
|
+
}
|
|
238749
|
+
const probe = safeValidate(() => createCustomXmlPart(getConvertedXml2(editor), {
|
|
238750
|
+
content: input2.content,
|
|
238751
|
+
schemaRefs: input2.schemaRefs
|
|
238752
|
+
}, getConverter$22(editor)));
|
|
238753
|
+
if (isWriteFailure(probe))
|
|
238754
|
+
return {
|
|
238755
|
+
changed: false,
|
|
238756
|
+
payload: probe
|
|
238757
|
+
};
|
|
238758
|
+
return {
|
|
238759
|
+
changed: true,
|
|
238760
|
+
payload: {
|
|
238761
|
+
ok: true,
|
|
238762
|
+
payload: probe.payload
|
|
238763
|
+
}
|
|
238764
|
+
};
|
|
238765
|
+
}, {
|
|
238766
|
+
dryRun: options?.dryRun === true,
|
|
238767
|
+
expectedRevision: options?.expectedRevision
|
|
238768
|
+
});
|
|
238769
|
+
if (isWriteFailure(outcome))
|
|
238770
|
+
return failure(outcome.code, outcome.message);
|
|
238771
|
+
return {
|
|
238772
|
+
success: true,
|
|
238773
|
+
id: outcome.payload.id,
|
|
238774
|
+
partName: outcome.payload.partName,
|
|
238775
|
+
propsPartName: outcome.payload.propsPartName
|
|
238776
|
+
};
|
|
238777
|
+
}
|
|
238778
|
+
function customXmlPartsPatchWrapper(editor, input2, options) {
|
|
238779
|
+
rejectTrackedMode("customXml.parts.patch", options);
|
|
238780
|
+
const outcome = executeOutOfBandMutation(editor, (dryRun) => {
|
|
238781
|
+
if (dryRun) {
|
|
238782
|
+
if (!resolveTargetPartName(getConvertedXml2(editor), input2.target))
|
|
238783
|
+
return {
|
|
238784
|
+
changed: false,
|
|
238785
|
+
payload: targetNotFound()
|
|
238786
|
+
};
|
|
238787
|
+
if (input2.content !== undefined) {
|
|
238788
|
+
const probe$1 = safeValidate(() => createCustomXmlPart({}, {
|
|
238789
|
+
content: input2.content,
|
|
238790
|
+
schemaRefs: undefined
|
|
238791
|
+
}));
|
|
238792
|
+
if (isWriteFailure(probe$1))
|
|
238793
|
+
return {
|
|
238794
|
+
changed: false,
|
|
238795
|
+
payload: probe$1
|
|
238796
|
+
};
|
|
238797
|
+
}
|
|
238798
|
+
return {
|
|
238799
|
+
changed: false,
|
|
238800
|
+
payload: {
|
|
238801
|
+
ok: true,
|
|
238802
|
+
payload: { id: null }
|
|
238803
|
+
}
|
|
238804
|
+
};
|
|
238805
|
+
}
|
|
238806
|
+
if (!resolveTargetPartName(getConvertedXml2(editor), input2.target))
|
|
238807
|
+
return {
|
|
238808
|
+
changed: false,
|
|
238809
|
+
payload: targetNotFound()
|
|
238810
|
+
};
|
|
238811
|
+
const probe = safeValidate(() => patchCustomXmlPart(getConvertedXml2(editor), input2.target, {
|
|
238812
|
+
content: input2.content,
|
|
238813
|
+
schemaRefs: input2.schemaRefs
|
|
238814
|
+
}, getConverter$22(editor)));
|
|
238815
|
+
if (isWriteFailure(probe))
|
|
238816
|
+
return {
|
|
238817
|
+
changed: false,
|
|
238818
|
+
payload: probe
|
|
238819
|
+
};
|
|
238820
|
+
if (!probe.payload)
|
|
238821
|
+
return {
|
|
238822
|
+
changed: false,
|
|
238823
|
+
payload: targetNotFound()
|
|
238824
|
+
};
|
|
238825
|
+
return {
|
|
238826
|
+
changed: true,
|
|
238827
|
+
payload: {
|
|
238828
|
+
ok: true,
|
|
238829
|
+
payload: { id: probe.payload.id ?? null }
|
|
238830
|
+
}
|
|
238831
|
+
};
|
|
238832
|
+
}, {
|
|
238833
|
+
dryRun: options?.dryRun === true,
|
|
238834
|
+
expectedRevision: options?.expectedRevision
|
|
238835
|
+
});
|
|
238836
|
+
if (isWriteFailure(outcome))
|
|
238837
|
+
return failure(outcome.code, outcome.message);
|
|
238838
|
+
const result = {
|
|
238839
|
+
success: true,
|
|
238840
|
+
target: input2.target
|
|
238841
|
+
};
|
|
238842
|
+
if (outcome.payload.id)
|
|
238843
|
+
result.id = outcome.payload.id;
|
|
238844
|
+
return result;
|
|
238845
|
+
}
|
|
238846
|
+
function customXmlPartsRemoveWrapper(editor, input2, options) {
|
|
238847
|
+
rejectTrackedMode("customXml.parts.remove", options);
|
|
238848
|
+
const outcome = executeOutOfBandMutation(editor, (dryRun) => {
|
|
238849
|
+
if (dryRun)
|
|
238850
|
+
return resolveTargetPartName(getConvertedXml2(editor), input2.target) ? {
|
|
238851
|
+
changed: false,
|
|
238852
|
+
payload: {
|
|
238853
|
+
ok: true,
|
|
238854
|
+
payload: true
|
|
238855
|
+
}
|
|
238856
|
+
} : {
|
|
238857
|
+
changed: false,
|
|
238858
|
+
payload: targetNotFound()
|
|
238859
|
+
};
|
|
238860
|
+
if (!removeCustomXmlPart(getConvertedXml2(editor), input2.target, getConverter$22(editor)))
|
|
238861
|
+
return {
|
|
238862
|
+
changed: false,
|
|
238863
|
+
payload: targetNotFound()
|
|
238864
|
+
};
|
|
238865
|
+
return {
|
|
238866
|
+
changed: true,
|
|
238867
|
+
payload: {
|
|
238868
|
+
ok: true,
|
|
238869
|
+
payload: true
|
|
238870
|
+
}
|
|
238871
|
+
};
|
|
238872
|
+
}, {
|
|
238873
|
+
dryRun: options?.dryRun === true,
|
|
238874
|
+
expectedRevision: options?.expectedRevision
|
|
238875
|
+
});
|
|
238876
|
+
if (isWriteFailure(outcome))
|
|
238877
|
+
return failure(outcome.code, outcome.message);
|
|
238878
|
+
return {
|
|
238879
|
+
success: true,
|
|
238880
|
+
target: input2.target
|
|
238881
|
+
};
|
|
238882
|
+
}
|
|
238883
|
+
function createCustomXmlPartsAdapter(editor) {
|
|
238884
|
+
return {
|
|
238885
|
+
list: (query) => customXmlPartsListWrapper(editor, query),
|
|
238886
|
+
get: (input2) => customXmlPartsGetWrapper(editor, input2),
|
|
238887
|
+
create: (input2, options) => customXmlPartsCreateWrapper(editor, input2, options),
|
|
238888
|
+
patch: (input2, options) => customXmlPartsPatchWrapper(editor, input2, options),
|
|
238889
|
+
remove: (input2, options) => customXmlPartsRemoveWrapper(editor, input2, options)
|
|
238890
|
+
};
|
|
238891
|
+
}
|
|
237988
238892
|
function getConverter$12(editor) {
|
|
237989
238893
|
return editor.converter ?? undefined;
|
|
237990
238894
|
}
|
|
@@ -240381,29 +241285,6 @@ function buildCitationAddress(doc$12, resolved) {
|
|
|
240381
241285
|
}
|
|
240382
241286
|
};
|
|
240383
241287
|
}
|
|
240384
|
-
function executeOutOfBandMutation(editor, mutateFn, options) {
|
|
240385
|
-
if (!options.dryRun)
|
|
240386
|
-
if (editor.options?.collaborationProvider && editor.options?.ydoc)
|
|
240387
|
-
try {
|
|
240388
|
-
yUndoPluginKey.getState(editor.state)?.undoManager?.stopCapturing();
|
|
240389
|
-
} catch {}
|
|
240390
|
-
else
|
|
240391
|
-
try {
|
|
240392
|
-
editor.view?.dispatch?.(closeHistory(editor.state.tr));
|
|
240393
|
-
} catch {}
|
|
240394
|
-
checkRevision(editor, options.expectedRevision);
|
|
240395
|
-
const result = mutateFn(options.dryRun);
|
|
240396
|
-
if (result.changed && !options.dryRun) {
|
|
240397
|
-
const converter = editor.converter;
|
|
240398
|
-
if (converter) {
|
|
240399
|
-
converter.documentModified = true;
|
|
240400
|
-
if (!converter.documentGuid && typeof converter.promoteToGuid === "function")
|
|
240401
|
-
converter.promoteToGuid();
|
|
240402
|
-
}
|
|
240403
|
-
incrementRevision(editor);
|
|
240404
|
-
}
|
|
240405
|
-
return result.payload;
|
|
240406
|
-
}
|
|
240407
241288
|
function citationSuccess(address) {
|
|
240408
241289
|
return {
|
|
240409
241290
|
success: true,
|
|
@@ -241621,6 +242502,7 @@ function assembleDocumentApiAdapters(editor) {
|
|
|
241621
242502
|
rename: (input2, options) => bookmarksRenameWrapper(editor, input2, options),
|
|
241622
242503
|
remove: (input2, options) => bookmarksRemoveWrapper(editor, input2, options)
|
|
241623
242504
|
},
|
|
242505
|
+
customXml: { parts: createCustomXmlPartsAdapter(editor) },
|
|
241624
242506
|
footnotes: {
|
|
241625
242507
|
list: (query) => footnotesListWrapper(editor, query),
|
|
241626
242508
|
get: (input2) => footnotesGetWrapper(editor, input2),
|
|
@@ -266269,7 +267151,7 @@ var Node$13 = class Node$14 {
|
|
|
266269
267151
|
}
|
|
266270
267152
|
});
|
|
266271
267153
|
return { decorations };
|
|
266272
|
-
}, ContextMenuPluginKey, MENU_OFFSET_X = 0, MENU_OFFSET_Y = 28, CONTEXT_MENU_OFFSET_X = 10, CONTEXT_MENU_OFFSET_Y = 10,
|
|
267154
|
+
}, ContextMenuPluginKey, MENU_OFFSET_X = 0, MENU_OFFSET_Y = 28, CONTEXT_MENU_OFFSET_X = 10, CONTEXT_MENU_OFFSET_Y = 10, ContextMenu, StructuredContentViewBase = class {
|
|
266273
267155
|
node;
|
|
266274
267156
|
view;
|
|
266275
267157
|
getPos;
|
|
@@ -273730,7 +274612,7 @@ var Node$13 = class Node$14 {
|
|
|
273730
274612
|
if (!target || !target.classList)
|
|
273731
274613
|
return;
|
|
273732
274614
|
target.classList.add(STYLE_ISOLATION_CLASS);
|
|
273733
|
-
}, _hoisted_1$22, _hoisted_2$17, _hoisted_3$13, _hoisted_4$9, _hoisted_5$
|
|
274615
|
+
}, _hoisted_1$22, _hoisted_2$17, _hoisted_3$13, _hoisted_4$9, _hoisted_5$7, Mentions_default, popoverPluginKey, PopoverPlugin, Popover = class {
|
|
273734
274616
|
constructor(view, editor) {
|
|
273735
274617
|
this.editor = editor;
|
|
273736
274618
|
this.view = view;
|
|
@@ -275297,7 +276179,7 @@ var Node$13 = class Node$14 {
|
|
|
275297
276179
|
</linearGradient>
|
|
275298
276180
|
</defs>
|
|
275299
276181
|
<path fill="url(#gradient)" d="M440 6.5L24 246.4c-34.4 19.9-31.1 70.8 5.7 85.9L144 379.6V464c0 46.4 59.2 65.5 86.6 28.6l43.8-59.1 111.9 46.2c5.9 2.4 12.1 3.6 18.3 3.6 8.2 0 16.3-2.1 23.6-6.2 12.8-7.2 21.6-20 23.9-34.5l59.4-387.2c6.1-40.1-36.9-68.8-71.5-48.9zM192 464v-64.6l36.6 15.1L192 464zm212.6-28.7l-153.8-63.5L391 169.5c10.7-15.5-9.5-33.5-23.7-21.2L155.8 332.6 48 288 464 48l-59.4 387.3z"/>
|
|
275300
|
-
</svg>`, _hoisted_1$21, _hoisted_2$16, _hoisted_3$12, _hoisted_4$8, _hoisted_5$
|
|
276182
|
+
</svg>`, _hoisted_1$21, _hoisted_2$16, _hoisted_3$12, _hoisted_4$8, _hoisted_5$6, AIWriter_default, isHighContrastMode, bold_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M0 64C0 46.3 14.3 32 32 32l48 0 16 0 128 0c70.7 0 128 57.3 128 128c0 31.3-11.3 60.1-30 82.3c37.1 22.4 62 63.1 62 109.7c0 70.7-57.3 128-128 128L96 480l-16 0-48 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l16 0 0-160L48 96 32 96C14.3 96 0 81.7 0 64zM224 224c35.3 0 64-28.7 64-64s-28.7-64-64-64L112 96l0 128 112 0zM112 288l0 128 144 0c35.3 0 64-28.7 64-64s-28.7-64-64-64l-32 0-112 0z"/></svg>', italic_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M128 64c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-58.7 0L160 416l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l58.7 0L224 96l-64 0c-17.7 0-32-14.3-32-32z"/></svg>', underline_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M16 64c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-16 0 0 128c0 53 43 96 96 96s96-43 96-96l0-128-16 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-16 0 0 128c0 88.4-71.6 160-160 160s-160-71.6-160-160L64 96 48 96C30.3 96 16 81.7 16 64zM0 448c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32z"/></svg>', list_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M40 48C26.7 48 16 58.7 16 72l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24L40 48zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM16 232l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0z"/></svg>', list_circle_solid_default = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. (bullet shapes modified)--><path fill-rule="evenodd" d="M192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM64 48 A48 48 0 1 0 64 144 A48 48 0 1 0 64 48 Z M64 68 A28 28 0 1 1 64 124 A28 28 0 1 1 64 68 Z M64 208 A48 48 0 1 0 64 304 A48 48 0 1 0 64 208 Z M64 228 A28 28 0 1 1 64 284 A28 28 0 1 1 64 228 Z M64 368 A48 48 0 1 0 64 464 A48 48 0 1 0 64 368 Z M64 388 A28 28 0 1 1 64 444 A28 28 0 1 1 64 388 Z"/></svg>
|
|
275301
276183
|
`, list_square_solid_default = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. (bullet shapes modified)--><path d="M192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM16 48 L112 48 L112 144 L16 144 Z M16 208 L112 208 L112 304 L16 304 Z M16 368 L112 368 L112 464 L16 464 Z"/></svg>
|
|
275302
276184
|
`, list_ol_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M24 56c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24l0 120 16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l16 0 0-96-8 0C34.7 80 24 69.3 24 56zM86.7 341.2c-6.5-7.4-18.3-6.9-24 1.2L51.5 357.9c-7.7 10.8-22.7 13.3-33.5 5.6s-13.3-22.7-5.6-33.5l11.1-15.6c23.7-33.2 72.3-35.6 99.2-4.9c21.3 24.4 20.8 60.9-1.1 84.7L86.8 432l33.2 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-88 0c-9.5 0-18.2-5.6-22-14.4s-2.1-18.9 4.3-25.9l72-78c5.3-5.8 5.4-14.6 .3-20.5zM224 64l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z"/></svg>', list_decimal_solid_default = `<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
275303
276185
|
<g clip-path="url(#clip0_0_1)">
|
|
@@ -275364,7 +276246,7 @@ var Node$13 = class Node$14 {
|
|
|
275364
276246
|
`, image_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"/></svg>', link_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"/></svg>', align_left_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"/></svg>', align_center_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"/></svg>', align_right_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"/></svg>', align_justify_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M448 64c0-17.7-14.3-32-32-32L32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32zm0 256c0-17.7-14.3-32-32-32L32 288c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 192c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32zM448 448c0-17.7-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32z"/></svg>', indent_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M0 64C0 46.3 14.3 32 32 32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64zM192 192c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32zm32 96l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zM0 448c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32zM127.8 268.6L25.8 347.9C15.3 356.1 0 348.6 0 335.3L0 176.7c0-13.3 15.3-20.8 25.8-12.6l101.9 79.3c8.2 6.4 8.2 18.9 0 25.3z"/></svg>', outdent_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M0 64C0 46.3 14.3 32 32 32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64zM192 192c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32zm32 96l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zM0 448c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32zM.2 268.6c-8.2-6.4-8.2-18.9 0-25.3l101.9-79.3c10.5-8.2 25.8-.7 25.8 12.6l0 158.6c0 13.3-15.3 20.8-25.8 12.6L.2 268.6z"/></svg>', paint_roller_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M0 64C0 28.7 28.7 0 64 0L352 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64L64 192c-35.3 0-64-28.7-64-64L0 64zM160 352c0-17.7 14.3-32 32-32l0-16c0-44.2 35.8-80 80-80l144 0c17.7 0 32-14.3 32-32l0-32 0-90.5c37.3 13.2 64 48.7 64 90.5l0 32c0 53-43 96-96 96l-144 0c-8.8 0-16 7.2-16 16l0 16c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-128z"/></svg>', text_slash_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L355.7 253.5 400.2 96 503 96 497 120.2c-4.3 17.1 6.1 34.5 23.3 38.8s34.5-6.1 38.8-23.3l11-44.1C577.6 61.3 554.7 32 523.5 32L376.1 32l-.3 0L204.5 32c-22 0-41.2 15-46.6 36.4l-6.3 25.2L38.8 5.1zm168 131.7c.1-.3 .2-.7 .3-1L217 96l116.7 0L301.3 210.8l-94.5-74.1zM243.3 416L192 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-42.2 0 17.6-62.1L272.9 311 243.3 416z"/></svg>', rotate_left_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M48.5 224L40 224c-13.3 0-24-10.7-24-24L16 72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2L98.6 96.6c87.6-86.5 228.7-86.2 315.8 1c87.5 87.5 87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3c-62.2-62.2-162.7-62.5-225.3-1L185 183c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8L48.5 224z"/></svg>', rotate_right_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M463.5 224l8.5 0c13.3 0 24-10.7 24-24l0-128c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8l119.5 0z"/></svg>', calendar_check_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zM329 305c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-95 95-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L329 305z"/></svg>', calendar_xmark_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zM305 305c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47z"/></svg>', list_check_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M152.1 38.2c9.9 8.9 10.7 24 1.8 33.9l-72 80c-4.4 4.9-10.6 7.8-17.2 7.9s-12.9-2.4-17.6-7L7 113C-2.3 103.6-2.3 88.4 7 79s24.6-9.4 33.9 0l22.1 22.1 55.1-61.2c8.9-9.9 24-10.7 33.9-1.8zm0 160c9.9 8.9 10.7 24 1.8 33.9l-72 80c-4.4 4.9-10.6 7.8-17.2 7.9s-12.9-2.4-17.6-7L7 273c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l22.1 22.1 55.1-61.2c8.9-9.9 24-10.7 33.9-1.8zM224 96c0-17.7 14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32zm0 160c0-17.7 14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32zM160 416c0-17.7 14.3-32 32-32l288 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-288 0c-17.7 0-32-14.3-32-32zM48 368a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"/></svg>', user_edit_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l293.1 0c-3.1-8.8-3.7-18.4-1.4-27.8l15-60.1c2.8-11.3 8.6-21.5 16.8-29.7l40.3-40.3c-32.1-31-75.7-50.1-123.9-50.1l-91.4 0zm435.5-68.3c-15.6-15.6-40.9-15.6-56.6 0l-29.4 29.4 71 71 29.4-29.4c15.6-15.6 15.6-40.9 0-56.6l-14.4-14.4zM375.9 417c-4.1 4.1-7 9.2-8.4 14.9l-15 60.1c-1.4 5.5 .2 11.2 4.2 15.2s9.7 5.6 15.2 4.2l60.1-15c5.6-1.4 10.8-4.3 14.9-8.4L576.1 358.7l-71-71L375.9 417z"/></svg>', eye_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"/></svg>', file_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 288c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128z"/></svg>', font_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M254 52.8C249.3 40.3 237.3 32 224 32s-25.3 8.3-30 20.8L57.8 416 32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-1.8 0 18-48 159.6 0 18 48-1.8 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-25.8 0L254 52.8zM279.8 304l-111.6 0L224 155.1 279.8 304z"/></svg>', file_half_dashed_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M64 0C28.7 0 0 28.7 0 64L0 320l384 0 0-160-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM0 416l64 0 0-64L0 352l0 64zm288 32l-80 0 0 64 80 0 0-64zm-112 0l-80 0 0 64 80 0 0-64zM64 448L0 448c0 35.3 28.7 64 64 64l0-64zm256 0l0 64c35.3 0 64-28.7 64-64l-64 0zm64-32l0-64-64 0 0 64 64 0z"/></svg>', comment_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z"/></svg>', circle_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z"/></svg>', check_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"/></svg>', xmark_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg>', up_right_from_square_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-128c0-17.7-14.3-32-32-32L352 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z"/></svg>', ellipsis_vertical_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"/></svg>', caret_up_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l256 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"/></svg>', caret_down_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"/></svg>', ruler_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M177.9 494.1c-18.7 18.7-49.1 18.7-67.9 0L17.9 401.9c-18.7-18.7-18.7-49.1 0-67.9l50.7-50.7 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 41.4-41.4 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 41.4-41.4 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 41.4-41.4 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 50.7-50.7c18.7-18.7 49.1-18.7 67.9 0l92.1 92.1c18.7 18.7 18.7 49.1 0 67.9L177.9 494.1z"/></svg>', paintbrush_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M339.3 367.1c27.3-3.9 51.9-19.4 67.2-42.9L568.2 74.1c12.6-19.5 9.4-45.3-7.6-61.2S517.7-4.4 499.1 9.6L262.4 187.2c-24 18-38.2 46.1-38.4 76.1L339.3 367.1zm-19.6 25.4l-116-104.4C143.9 290.3 96 339.6 96 400c0 3.9 .2 7.8 .6 11.6C98.4 429.1 86.4 448 68.8 448L64 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0c61.9 0 112-50.1 112-112c0-2.5-.1-5-.2-7.5z"/></svg>', highlighter_icon_default = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M315 315l158.4-215L444.1 70.6 229 229 315 315zm-187 5s0 0 0 0l0-71.7c0-15.3 7.2-29.6 19.5-38.6L420.6 8.4C428 2.9 437 0 446.2 0c11.4 0 22.4 4.5 30.5 12.6l54.8 54.8c8.1 8.1 12.6 19 12.6 30.5c0 9.2-2.9 18.2-8.4 25.6L334.4 396.5c-9 12.3-23.4 19.5-38.6 19.5L224 416l-25.4 25.4c-12.5 12.5-32.8 12.5-45.3 0l-50.7-50.7c-12.5-12.5-12.5-32.8 0-45.3L128 320zM7 466.3l63-63 70.6 70.6-31 31c-4.5 4.5-10.6 7-17 7L24 512c-13.3 0-24-10.7-24-24l0-4.7c0-6.4 2.5-12.5 7-17z"/></svg>
|
|
275365
276247
|
`, magic_wand_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M224 96l16-32 32-16-32-16-16-32-16 32-32 16 32 16 16 32zM80 160l26.7-53.3L160 80l-53.3-26.7L80 0 53.3 53.3 0 80l53.3 26.7L80 160zm352 128l-26.7 53.3L352 368l53.3 26.7L432 448l26.7-53.3L512 368l-53.3-26.7L432 288zm70.6-193.8L417.8 9.4C411.5 3.1 403.3 0 395.2 0c-8.2 0-16.4 3.1-22.6 9.4L9.4 372.5c-12.5 12.5-12.5 32.8 0 45.3l84.9 84.9c6.3 6.3 14.4 9.4 22.6 9.4 8.2 0 16.4-3.1 22.6-9.4l363.1-363.2c12.5-12.5 12.5-32.8 0-45.2zM359.5 203.5l-50.9-50.9 86.6-86.6 50.9 50.9-86.6 86.6z"/></svg>', table_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M64 256l0-96 160 0 0 96L64 256zm0 64l160 0 0 96L64 416l0-96zm224 96l0-96 160 0 0 96-160 0zM448 256l-160 0 0-96 160 0 0 96zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32z"/></svg>', table_columns_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm64 64l0 256 160 0 0-256L64 160zm384 0l-160 0 0 256 160 0 0-256z"/></svg>', arrows_left_right_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M406.6 374.6l96-96c12.5-12.5 12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224l-293.5 0 41.4-41.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 288l293.5 0-41.4 41.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"/></svg>', arrows_to_dot_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M256 0c17.7 0 32 14.3 32 32l0 32 32 0c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-64 64c-12.5 12.5-32.8 12.5-45.3 0l-64-64c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8l32 0 0-32c0-17.7 14.3-32 32-32zM169.4 393.4l64-64c12.5-12.5 32.8-12.5 45.3 0l64 64c9.2 9.2 11.9 22.9 6.9 34.9s-16.6 19.8-29.6 19.8l-32 0 0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32-32 0c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9zM32 224l32 0 0-32c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l64 64c12.5 12.5 12.5 32.8 0 45.3l-64 64c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-32-32 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm297.4 54.6c-12.5-12.5-12.5-32.8 0-45.3l64-64c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6l0 32 32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0 0 32c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-64-64zM256 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg>', plus_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"/></svg>', trash_can_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M135.2 17.7C140.6 6.8 151.7 0 163.8 0L284.2 0c12.1 0 23.2 6.8 28.6 17.7L320 32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 7.2-14.3zM32 128l384 0 0 320c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-320zm96 64c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16z"/></svg>', wrench_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M352 320c88.4 0 160-71.6 160-160c0-15.3-2.2-30.1-6.2-44.2c-3.1-10.8-16.4-13.2-24.3-5.3l-76.8 76.8c-3 3-7.1 4.7-11.3 4.7L336 192c-8.8 0-16-7.2-16-16l0-57.4c0-4.2 1.7-8.3 4.7-11.3l76.8-76.8c7.9-7.9 5.4-21.2-5.3-24.3C382.1 2.2 367.3 0 352 0C263.6 0 192 71.6 192 160c0 19.1 3.4 37.5 9.5 54.5L19.9 396.1C7.2 408.8 0 426.1 0 444.1C0 481.6 30.4 512 67.9 512c18 0 35.3-7.2 48-19.9L297.5 310.5c17 6.2 35.4 9.5 54.5 9.5zM80 408a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"/></svg>', border_none_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M32 480a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm96-64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-384a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0 256a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM320 416a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-320a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM224 480a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0-448a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0 256a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM416 416a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-384a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM32 96a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM416 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM32 288a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm192 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm192 64a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM32 320a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM416 192a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM32 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm192 64a32 32 0 1 1 0-64 32 32 0 1 1 0 64z"/></svg>', up_down_default = `<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" viewBox="3 4 18 16"><path stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 10V5m0 0L4 7m2-2 2 2m-2 7v5m0 0 2-2m-2 2-2-2m8-10h8m0 5h-8m0 5h8"></path></svg>
|
|
275366
276248
|
`, magnifying_glass_default = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/></svg>
|
|
275367
|
-
`, scissors_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M278.1 256L444.5 89.6c4.7-4.7 4.7-12.3 0-17-32.8-32.8-86-32.8-118.8 0L210.2 188.1l-24.9-24.9c4.3-10.9 6.7-22.8 6.7-35.3 0-53-43-96-96-96S0 75 0 128s43 96 96 96c4.5 0 9-.3 13.4-.9L142.3 256l-32.9 32.9c-4.4-.6-8.8-.9-13.4-.9-53 0-96 43-96 96s43 96 96 96 96-43 96-96c0-12.5-2.4-24.3-6.7-35.3l24.9-24.9L325.7 439.4c32.8 32.8 86 32.8 118.8 0 4.7-4.7 4.7-12.3 0-17L278.1 256zM96 160c-17.6 0-32-14.4-32-32s14.4-32 32-32 32 14.4 32 32-14.4 32-32 32zm0 256c-17.6 0-32-14.4-32-32s14.4-32 32-32 32 14.4 32 32-14.4 32-32 32z"/></svg>', copy_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M320 448v40c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V120c0-13.3 10.7-24 24-24h72v296c0 30.9 25.1 56 56 56h168zm0-344V0H152c-13.3 0-24 10.7-24 24v368c0 13.3 10.7 24 24 24h272c13.3 0 24-10.7 24-24V128H344c-13.2 0-24-10.8-24-24zm121-31L375 7A24 24 0 0 0 358.1 0H352v96h96v-6.1a24 24 0 0 0 -7-17z"/></svg>', paste_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M128 184c0-30.9 25.1-56 56-56h136V56c0-13.3-10.7-24-24-24h-80.6C204.3 12.9 183.6 0 160 0s-44.3 12.9-55.4 32H24C10.7 32 0 42.7 0 56v336c0 13.3 10.7 24 24 24h104V184zm32-144c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm184 248h104v200c0 13.3-10.7 24-24 24H184c-13.3 0-24-10.7-24-24V184c0-13.3 10.7-24 24-24h136v104c0 13.2 10.8 24 24 24zm104-38.1V256h-96v-96h6.1a24 24 0 0 1 17 7l65.9 65.9a24 24 0 0 1 7 17z"/></svg>', toolbarIcons, _hoisted_1$20, AlignmentButtons_default, _hoisted_1$19, StyleButtonsList_default, bulletStyleButtons, numberedStyleButtons, _hoisted_1$18, _hoisted_2$15, _hoisted_3$11, _hoisted_4$7, _hoisted_5$
|
|
276249
|
+
`, scissors_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M278.1 256L444.5 89.6c4.7-4.7 4.7-12.3 0-17-32.8-32.8-86-32.8-118.8 0L210.2 188.1l-24.9-24.9c4.3-10.9 6.7-22.8 6.7-35.3 0-53-43-96-96-96S0 75 0 128s43 96 96 96c4.5 0 9-.3 13.4-.9L142.3 256l-32.9 32.9c-4.4-.6-8.8-.9-13.4-.9-53 0-96 43-96 96s43 96 96 96 96-43 96-96c0-12.5-2.4-24.3-6.7-35.3l24.9-24.9L325.7 439.4c32.8 32.8 86 32.8 118.8 0 4.7-4.7 4.7-12.3 0-17L278.1 256zM96 160c-17.6 0-32-14.4-32-32s14.4-32 32-32 32 14.4 32 32-14.4 32-32 32zm0 256c-17.6 0-32-14.4-32-32s14.4-32 32-32 32 14.4 32 32-14.4 32-32 32z"/></svg>', copy_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M320 448v40c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V120c0-13.3 10.7-24 24-24h72v296c0 30.9 25.1 56 56 56h168zm0-344V0H152c-13.3 0-24 10.7-24 24v368c0 13.3 10.7 24 24 24h272c13.3 0 24-10.7 24-24V128H344c-13.2 0-24-10.8-24-24zm121-31L375 7A24 24 0 0 0 358.1 0H352v96h96v-6.1a24 24 0 0 0 -7-17z"/></svg>', paste_solid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M128 184c0-30.9 25.1-56 56-56h136V56c0-13.3-10.7-24-24-24h-80.6C204.3 12.9 183.6 0 160 0s-44.3 12.9-55.4 32H24C10.7 32 0 42.7 0 56v336c0 13.3 10.7 24 24 24h104V184zm32-144c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm184 248h104v200c0 13.3-10.7 24-24 24H184c-13.3 0-24-10.7-24-24V184c0-13.3 10.7-24 24-24h136v104c0 13.2 10.8 24 24 24zm104-38.1V256h-96v-96h6.1a24 24 0 0 1 17 7l65.9 65.9a24 24 0 0 1 7 17z"/></svg>', toolbarIcons, _hoisted_1$20, AlignmentButtons_default, _hoisted_1$19, StyleButtonsList_default, bulletStyleButtons, numberedStyleButtons, _hoisted_1$18, _hoisted_2$15, _hoisted_3$11, _hoisted_4$7, _hoisted_5$5, _hoisted_6$3, DocumentMode_default, _hoisted_1$17, _hoisted_2$14, LinkedStyle_default, _hoisted_1$16, _hoisted_2$13, _hoisted_3$10, _hoisted_4$6, _hoisted_5$4, _hoisted_6$2, _hoisted_7$2, _hoisted_8$1, _hoisted_9$1, _hoisted_10$1, _hoisted_11$1, _hoisted_12$1, _hoisted_13, _hoisted_14, LinkInput_default, _hoisted_1$15, _hoisted_2$12, _hoisted_3$9, ROW_SIZE$1 = 7, IconGridRow_default, droplet_slash_default = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M320 512c53.2 0 101.4-21.6 136.1-56.6l-298.3-235C140 257.1 128 292.3 128 320c0 106 86 192 192 192zM505.2 370.7c4.4-16.2 6.8-33.1 6.8-50.7c0-91.2-130.2-262.3-166.6-308.3C339.4 4.2 330.5 0 320.9 0l-1.8 0c-9.6 0-18.5 4.2-24.5 11.7C277.8 33 240.7 81.3 205.8 136L38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L505.2 370.7zM224 336c0 44.2 35.8 80 80 80c8.8 0 16 7.2 16 16s-7.2 16-16 16c-61.9 0-112-50.1-112-112c0-8.8 7.2-16 16-16s16 7.2 16 16z"/></svg>
|
|
275368
276250
|
`, _hoisted_1$14, _hoisted_2$11, _hoisted_3$8, IconGrid_default, closeDropdown$1 = (dropdown) => {
|
|
275369
276251
|
dropdown.expand.value = false;
|
|
275370
276252
|
}, makeColorOption = (color2, label = null) => {
|
|
@@ -275396,7 +276278,7 @@ var Node$13 = class Node$14 {
|
|
|
275396
276278
|
})]);
|
|
275397
276279
|
}, icons, getAvailableColorOptions = () => {
|
|
275398
276280
|
return icons.flat().map((item) => item.value);
|
|
275399
|
-
}, _hoisted_1$13, _hoisted_2$10, ROW_SIZE = 5, TableGrid_default, _hoisted_1$12, _hoisted_2$9, _hoisted_3$7, _hoisted_4$5, _hoisted_5$
|
|
276281
|
+
}, _hoisted_1$13, _hoisted_2$10, ROW_SIZE = 5, TableGrid_default, _hoisted_1$12, _hoisted_2$9, _hoisted_3$7, _hoisted_4$5, _hoisted_5$3, TableActions_default, check_default = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"/></svg>
|
|
275400
276282
|
`, _hoisted_1$11, _hoisted_2$8, _hoisted_3$6, SearchInput_default, TOOLBAR_FONTS, TOOLBAR_FONT_SIZES, RESPONSIVE_BREAKPOINTS, HEADLESS_ITEM_MAP, TABLE_ACTION_COMMAND_MAP, TABLE_ACTION_COMMAND_IDS, HEADLESS_TOOLBAR_COMMANDS, NON_HEADLESS_EXECUTE_ITEM_NAMES, HEADLESS_EXECUTE_ITEMS, closeDropdown = (dropdown) => {
|
|
275401
276283
|
dropdown.expand.value = false;
|
|
275402
276284
|
}, makeDefaultItems = ({ superToolbar, toolbarIcons: toolbarIcons$1, toolbarTexts: toolbarTexts$1, toolbarFonts, hideButtons, availableWidth, role, isDev = false } = {}) => {
|
|
@@ -276449,7 +277331,7 @@ var Node$13 = class Node$14 {
|
|
|
276449
277331
|
defaultItems: visibleItems,
|
|
276450
277332
|
overflowItems: overflowItems.filter((item) => item.type !== "separator")
|
|
276451
277333
|
};
|
|
276452
|
-
}, _hoisted_1$10, _hoisted_2$7, ToolbarButtonIcon_default, _hoisted_1$9, _hoisted_2$6, _hoisted_3$5, _hoisted_4$4, _hoisted_5$
|
|
277334
|
+
}, _hoisted_1$10, _hoisted_2$7, ToolbarButtonIcon_default, _hoisted_1$9, _hoisted_2$6, _hoisted_3$5, _hoisted_4$4, _hoisted_5$2, _hoisted_6$1, _hoisted_7$1, _hoisted_8, _hoisted_9, _hoisted_10, _hoisted_11, _hoisted_12, ToolbarButton_default, _hoisted_1$8, ToolbarSeparator_default, _hoisted_1$7, _hoisted_2$5, _hoisted_3$4, OverflowMenu_default, _hoisted_1$6, _hoisted_2$4, _hoisted_3$3, _hoisted_4$3, ToolbarDropdown_default, SdTooltip_default, _hoisted_1$5, _hoisted_2$3, _hoisted_3$2, _hoisted_4$2, ButtonGroup_default, DEFAULT_UI_FONT_FAMILY = "Arial, Helvetica, sans-serif", Toolbar_default, toolbarTexts, getParagraphFontFamilyFromProperties = (paragraphProps, convertedXml = {}) => {
|
|
276453
277335
|
const fontFamilyProps = paragraphProps?.runProperties?.fontFamily;
|
|
276454
277336
|
if (!fontFamilyProps)
|
|
276455
277337
|
return null;
|
|
@@ -278449,7 +279331,7 @@ var Node$13 = class Node$14 {
|
|
|
278449
279331
|
return () => {};
|
|
278450
279332
|
const handle3 = setInterval(callback, intervalMs);
|
|
278451
279333
|
return () => clearInterval(handle3);
|
|
278452
|
-
}, HISTORY_UNSAFE_OPS, CANONICAL_COMMENT_IGNORED_KEYS, INITIAL_HASH, ROUND_CONSTANTS, V1_COVERAGE, V2_COVERAGE, SNAPSHOT_VERSION_V2 = "sd-diff-snapshot/v2", PAYLOAD_VERSION_V1 = "sd-diff-payload/v1", PAYLOAD_VERSION_V2 = "sd-diff-payload/v2", ENGINE_ID = "super-editor", STAGED_CONVERTER_KEYS, DiffServiceError, DEFAULT_LEVEL = 1, SWITCH_PATTERN, TOC_BOOKMARK_PREFIX = "_Toc", ALLOWED_SOURCE_MARK_TYPES, TEXT_STYLE_ALLOWED_ATTRS, DEFAULT_RIGHT_TAB_POS = 9350, TAB_LEADER_MAP, NO_ENTRIES_PLACEHOLDER, TOC_ENTRY_STYLE_RE, TC_LEVEL_MIN = 1, TC_LEVEL_MAX = 9, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH2 = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN2, FOOTER_FILE_PATTERN2, SPECIAL_NOTE_TYPES, BOOKMARK_SCAN_REVISION_PREFIX = "bookmark-scan:", SETTINGS_PART, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, REFERENCE_BLOCK_PREFIX, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, DOCUMENT_STAT_FIELD_TYPES, TOA_LEADER_REVERSE_MAP, EDGE_NODE_TYPES, CONTENT_TYPES_PART_ID = "[Content_Types].xml", CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types", contentTypesPartDescriptor, empty_exports, init_empty, CURRENT_APP_VERSION2 = "1.32.0", PIXELS_PER_INCH2 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, cloneExtensionInstance = (extension2) => {
|
|
279334
|
+
}, HISTORY_UNSAFE_OPS, CANONICAL_COMMENT_IGNORED_KEYS, INITIAL_HASH, ROUND_CONSTANTS, V1_COVERAGE, V2_COVERAGE, SNAPSHOT_VERSION_V2 = "sd-diff-snapshot/v2", PAYLOAD_VERSION_V1 = "sd-diff-payload/v1", PAYLOAD_VERSION_V2 = "sd-diff-payload/v2", ENGINE_ID = "super-editor", STAGED_CONVERTER_KEYS, DiffServiceError, DEFAULT_LEVEL = 1, SWITCH_PATTERN, TOC_BOOKMARK_PREFIX = "_Toc", ALLOWED_SOURCE_MARK_TYPES, TEXT_STYLE_ALLOWED_ATTRS, DEFAULT_RIGHT_TAB_POS = 9350, TAB_LEADER_MAP, NO_ENTRIES_PLACEHOLDER, TOC_ENTRY_STYLE_RE, TC_LEVEL_MIN = 1, TC_LEVEL_MAX = 9, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH2 = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN2, FOOTER_FILE_PATTERN2, SPECIAL_NOTE_TYPES, BOOKMARK_SCAN_REVISION_PREFIX = "bookmark-scan:", import_lib4, CUSTOM_XML_DATA_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", CUSTOM_XML_DATASTORE_NAMESPACE = "http://schemas.openxmlformats.org/officeDocument/2006/customXml", SETTINGS_PART, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, REFERENCE_BLOCK_PREFIX, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, DOCUMENT_STAT_FIELD_TYPES, TOA_LEADER_REVERSE_MAP, EDGE_NODE_TYPES, CONTENT_TYPES_PART_ID = "[Content_Types].xml", CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types", contentTypesPartDescriptor, empty_exports, init_empty, CURRENT_APP_VERSION2 = "1.32.0", PIXELS_PER_INCH2 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, cloneExtensionInstance = (extension2) => {
|
|
278453
279335
|
const extensionLike = extension2;
|
|
278454
279336
|
const config3 = extensionLike?.config;
|
|
278455
279337
|
const ExtensionCtor = extensionLike?.constructor;
|
|
@@ -278509,21 +279391,31 @@ var Node$13 = class Node$14 {
|
|
|
278509
279391
|
continue;
|
|
278510
279392
|
const internalIds = new Set(parseCommaSeparated(el.dataset.commentInternalIds));
|
|
278511
279393
|
const primaryIsInternal = internalIds.has(ids[0]);
|
|
279394
|
+
const isTrackedChangeAnchored = el.classList.contains("highlighted") && (el.classList.contains("track-insert-dec") || el.classList.contains("track-delete-dec"));
|
|
278512
279395
|
if (activeId == null) {
|
|
278513
|
-
|
|
279396
|
+
if (!isTrackedChangeAnchored)
|
|
279397
|
+
applyBgColor(el, primaryIsInternal ? H.INT : H.EXT);
|
|
279398
|
+
else
|
|
279399
|
+
el.style.backgroundColor = "";
|
|
278514
279400
|
el.style.boxShadow = "";
|
|
278515
279401
|
continue;
|
|
278516
279402
|
}
|
|
278517
279403
|
const matchedId = this.#resolveMatch(activeId, ids, el.dataset.commentImportedIds);
|
|
278518
279404
|
if (matchedId != null) {
|
|
278519
279405
|
const matchIsInternal = internalIds.has(matchedId);
|
|
278520
|
-
|
|
279406
|
+
if (!isTrackedChangeAnchored)
|
|
279407
|
+
applyBgColor(el, matchIsInternal ? H.INT_ACTIVE : H.EXT_ACTIVE);
|
|
279408
|
+
else
|
|
279409
|
+
el.style.backgroundColor = "";
|
|
278521
279410
|
if (ids.length > 1)
|
|
278522
279411
|
applyBoxShadow(el, matchIsInternal ? H.INT_NESTED_BDR : H.EXT_NESTED_BDR);
|
|
278523
279412
|
else
|
|
278524
279413
|
el.style.boxShadow = "";
|
|
278525
279414
|
} else {
|
|
278526
|
-
|
|
279415
|
+
if (!isTrackedChangeAnchored)
|
|
279416
|
+
applyBgColor(el, primaryIsInternal ? H.INT_FADED : H.EXT_FADED);
|
|
279417
|
+
else
|
|
279418
|
+
el.style.backgroundColor = "";
|
|
278527
279419
|
el.style.boxShadow = "";
|
|
278528
279420
|
}
|
|
278529
279421
|
}
|
|
@@ -285024,7 +285916,7 @@ menclose::after {
|
|
|
285024
285916
|
return true;
|
|
285025
285917
|
if (!a2 || !b$1)
|
|
285026
285918
|
return !a2 && !b$1;
|
|
285027
|
-
if (a2.alignment !== b$1.alignment || a2.contextualSpacing !== b$1.contextualSpacing || a2.suppressFirstLineIndent !== b$1.suppressFirstLineIndent || a2.dropCap !== b$1.dropCap || a2.decimalSeparator !== b$1.decimalSeparator || a2.tabIntervalTwips !== b$1.tabIntervalTwips || a2.keepNext !== b$1.keepNext || a2.keepLines !== b$1.keepLines || a2
|
|
285919
|
+
if (a2.alignment !== b$1.alignment || a2.contextualSpacing !== b$1.contextualSpacing || a2.suppressFirstLineIndent !== b$1.suppressFirstLineIndent || a2.dropCap !== b$1.dropCap || a2.decimalSeparator !== b$1.decimalSeparator || a2.tabIntervalTwips !== b$1.tabIntervalTwips || a2.keepNext !== b$1.keepNext || a2.keepLines !== b$1.keepLines || getParagraphInlineDirection(a2) !== getParagraphInlineDirection(b$1) || a2.floatAlignment !== b$1.floatAlignment)
|
|
285028
285920
|
return false;
|
|
285029
285921
|
if (!paragraphSpacingEqual(a2.spacing, b$1.spacing))
|
|
285030
285922
|
return false;
|
|
@@ -287480,7 +288372,6 @@ menclose::after {
|
|
|
287480
288372
|
keepLines: resolvedParagraphProperties.keepLines,
|
|
287481
288373
|
floatAlignment,
|
|
287482
288374
|
pageBreakBefore: resolvedParagraphProperties.pageBreakBefore,
|
|
287483
|
-
...normalizedDirection ? { direction: normalizedDirection } : {},
|
|
287484
288375
|
directionContext
|
|
287485
288376
|
};
|
|
287486
288377
|
if (normalizedNumberingProperties && normalizedListRendering) {
|
|
@@ -294188,18 +295079,19 @@ menclose::after {
|
|
|
294188
295079
|
return;
|
|
294189
295080
|
console.log(...args$1);
|
|
294190
295081
|
}, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions;
|
|
294191
|
-
var
|
|
295082
|
+
var init_src_Bnec7ggt_es = __esm(() => {
|
|
294192
295083
|
init_rolldown_runtime_Bg48TavK_es();
|
|
294193
|
-
|
|
295084
|
+
init_SuperConverter_8A1MBmqJ_es();
|
|
294194
295085
|
init_jszip_C49i9kUs_es();
|
|
295086
|
+
init_xml_js_CqGKpaft_es();
|
|
294195
295087
|
init_uuid_qzgm05fK_es();
|
|
294196
|
-
|
|
295088
|
+
init_create_headless_toolbar_1RfXz7Wm_es();
|
|
294197
295089
|
init_constants_DrU4EASo_es();
|
|
294198
295090
|
init_dist_B8HfvhaK_es();
|
|
294199
295091
|
init_unified_Dsuw2be5_es();
|
|
294200
295092
|
init_remark_gfm_BhnWr3yf_es();
|
|
294201
295093
|
init_remark_stringify_6MMJfY0k_es();
|
|
294202
|
-
|
|
295094
|
+
init_DocxZipper_Bphhij1P_es();
|
|
294203
295095
|
init__plugin_vue_export_helper_HmhZBO0u_es();
|
|
294204
295096
|
init_eventemitter3_UwU_CLPU_es();
|
|
294205
295097
|
init_errors_C_DoKMoN_es();
|
|
@@ -295727,8 +296619,6 @@ ${err.toString()}`);
|
|
|
295727
296619
|
const editor = this.editor;
|
|
295728
296620
|
if (editor.options?.isHeadless)
|
|
295729
296621
|
return [];
|
|
295730
|
-
let slashCooldown = false;
|
|
295731
|
-
let slashCooldownTimeout = null;
|
|
295732
296622
|
const isMenuDisabled = () => Boolean(editor.options?.disableContextMenu);
|
|
295733
296623
|
const ensureStateShape = (value = {}) => ({
|
|
295734
296624
|
open: false,
|
|
@@ -295736,6 +296626,7 @@ ${err.toString()}`);
|
|
|
295736
296626
|
anchorPos: null,
|
|
295737
296627
|
menuPosition: null,
|
|
295738
296628
|
disabled: isMenuDisabled(),
|
|
296629
|
+
trigger: null,
|
|
295739
296630
|
...value
|
|
295740
296631
|
});
|
|
295741
296632
|
return [new Plugin({
|
|
@@ -295814,7 +296705,8 @@ ${err.toString()}`);
|
|
|
295814
296705
|
...value,
|
|
295815
296706
|
open: true,
|
|
295816
296707
|
anchorPos: meta4.pos,
|
|
295817
|
-
menuPosition
|
|
296708
|
+
menuPosition,
|
|
296709
|
+
trigger: isRightClick ? "rightClick" : "slash"
|
|
295818
296710
|
};
|
|
295819
296711
|
editor.emit("contextMenu:open", { menuPosition });
|
|
295820
296712
|
return ensureStateShape(newState);
|
|
@@ -295829,7 +296721,8 @@ ${err.toString()}`);
|
|
|
295829
296721
|
return ensureStateShape({
|
|
295830
296722
|
...value,
|
|
295831
296723
|
open: false,
|
|
295832
|
-
anchorPos: null
|
|
296724
|
+
anchorPos: null,
|
|
296725
|
+
trigger: null
|
|
295833
296726
|
});
|
|
295834
296727
|
default:
|
|
295835
296728
|
return ensureStateShape({
|
|
@@ -295851,18 +296744,12 @@ ${err.toString()}`);
|
|
|
295851
296744
|
return { destroy() {
|
|
295852
296745
|
window.removeEventListener("scroll", updatePosition$1, true);
|
|
295853
296746
|
window.removeEventListener("resize", updatePosition$1);
|
|
295854
|
-
if (slashCooldownTimeout) {
|
|
295855
|
-
clearTimeout(slashCooldownTimeout);
|
|
295856
|
-
slashCooldownTimeout = null;
|
|
295857
|
-
}
|
|
295858
296747
|
} };
|
|
295859
296748
|
},
|
|
295860
296749
|
props: { handleKeyDown(view, event) {
|
|
295861
296750
|
if (isMenuDisabled())
|
|
295862
296751
|
return false;
|
|
295863
296752
|
const pluginState = this.getState(view.state);
|
|
295864
|
-
if (event.key === "/" && slashCooldown)
|
|
295865
|
-
return false;
|
|
295866
296753
|
if (event.key === "/" && !pluginState.open) {
|
|
295867
296754
|
const { $cursor } = view.state.selection;
|
|
295868
296755
|
if (!$cursor)
|
|
@@ -295873,25 +296760,28 @@ ${err.toString()}`);
|
|
|
295873
296760
|
if (!(!textBefore || textBefore.endsWith(" ")))
|
|
295874
296761
|
return false;
|
|
295875
296762
|
event.preventDefault();
|
|
295876
|
-
slashCooldown = true;
|
|
295877
|
-
if (slashCooldownTimeout)
|
|
295878
|
-
clearTimeout(slashCooldownTimeout);
|
|
295879
|
-
slashCooldownTimeout = setTimeout(() => {
|
|
295880
|
-
slashCooldown = false;
|
|
295881
|
-
slashCooldownTimeout = null;
|
|
295882
|
-
}, SLASH_COOLDOWN_MS);
|
|
295883
296763
|
view.dispatch(view.state.tr.setMeta(ContextMenuPluginKey, {
|
|
295884
296764
|
type: "open",
|
|
295885
296765
|
pos: $cursor.pos
|
|
295886
296766
|
}));
|
|
295887
296767
|
return true;
|
|
295888
296768
|
}
|
|
295889
|
-
if (pluginState.open
|
|
295890
|
-
|
|
296769
|
+
if (!pluginState.open)
|
|
296770
|
+
return false;
|
|
296771
|
+
if (event.key === "Backspace" || event.key === "Delete") {
|
|
296772
|
+
event.preventDefault();
|
|
295891
296773
|
view.dispatch(view.state.tr.setMeta(ContextMenuPluginKey, { type: "close" }));
|
|
295892
|
-
|
|
295893
|
-
|
|
295894
|
-
|
|
296774
|
+
return true;
|
|
296775
|
+
}
|
|
296776
|
+
if (event.key === "Escape" || event.key === "ArrowLeft") {
|
|
296777
|
+
const { anchorPos, trigger } = pluginState;
|
|
296778
|
+
event.preventDefault();
|
|
296779
|
+
view.dispatch(view.state.tr.setMeta(ContextMenuPluginKey, { type: "close" }));
|
|
296780
|
+
if (trigger === "slash" && anchorPos !== null) {
|
|
296781
|
+
const insertTr = view.state.tr.insertText("/", anchorPos);
|
|
296782
|
+
const insertedAt = anchorPos + 1;
|
|
296783
|
+
insertTr.setSelection(view.state.selection.constructor.near(insertTr.doc.resolve(insertedAt)));
|
|
296784
|
+
view.dispatch(insertTr);
|
|
295895
296785
|
view.focus();
|
|
295896
296786
|
}
|
|
295897
296787
|
return true;
|
|
@@ -311643,7 +312533,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
311643
312533
|
_hoisted_2$17 = { key: 0 };
|
|
311644
312534
|
_hoisted_3$13 = { key: 0 };
|
|
311645
312535
|
_hoisted_4$9 = { key: 1 };
|
|
311646
|
-
_hoisted_5$
|
|
312536
|
+
_hoisted_5$7 = { key: 1 };
|
|
311647
312537
|
Mentions_default = /* @__PURE__ */ __plugin_vue_export_helper_default({
|
|
311648
312538
|
__name: "Mentions",
|
|
311649
312539
|
props: {
|
|
@@ -311709,7 +312599,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
311709
312599
|
onMouseleave: _cache[0] || (_cache[0] = ($event) => activeUserIndex.value = null),
|
|
311710
312600
|
key: user.email,
|
|
311711
312601
|
class: exports_vue.normalizeClass(["user-row", { selected: activeUserIndex.value === index2 }])
|
|
311712
|
-
}, [user.name ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_2$17, [user.name ? (exports_vue.openBlock(), exports_vue.createElementBlock("span", _hoisted_3$13, exports_vue.toDisplayString(user.name), 1)) : exports_vue.createCommentVNode("", true), user.name && user.email ? (exports_vue.openBlock(), exports_vue.createElementBlock("span", _hoisted_4$9, " (" + exports_vue.toDisplayString(user.email) + ")", 1)) : exports_vue.createCommentVNode("", true)])) : (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_5$
|
|
312602
|
+
}, [user.name ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_2$17, [user.name ? (exports_vue.openBlock(), exports_vue.createElementBlock("span", _hoisted_3$13, exports_vue.toDisplayString(user.name), 1)) : exports_vue.createCommentVNode("", true), user.name && user.email ? (exports_vue.openBlock(), exports_vue.createElementBlock("span", _hoisted_4$9, " (" + exports_vue.toDisplayString(user.email) + ")", 1)) : exports_vue.createCommentVNode("", true)])) : (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_5$7, [exports_vue.createElementVNode("span", null, exports_vue.toDisplayString(user.email), 1)]))], 42, _hoisted_1$22);
|
|
311713
312603
|
}), 128))], 544);
|
|
311714
312604
|
};
|
|
311715
312605
|
}
|
|
@@ -312897,7 +313787,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
312897
313787
|
_hoisted_2$16 = ["innerHTML"];
|
|
312898
313788
|
_hoisted_3$12 = ["placeholder"];
|
|
312899
313789
|
_hoisted_4$8 = { class: "ai-loader" };
|
|
312900
|
-
_hoisted_5$
|
|
313790
|
+
_hoisted_5$6 = ["innerHTML"];
|
|
312901
313791
|
AIWriter_default = /* @__PURE__ */ __plugin_vue_export_helper_default({
|
|
312902
313792
|
__name: "AIWriter",
|
|
312903
313793
|
props: {
|
|
@@ -313141,7 +314031,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
313141
314031
|
class: "ai-textarea-icon ai-submit-button",
|
|
313142
314032
|
onClick: exports_vue.withModifiers(handleSubmit, ["stop"]),
|
|
313143
314033
|
innerHTML: exports_vue.unref(paper_plane_regular_default)
|
|
313144
|
-
}, null, 8, _hoisted_5$
|
|
314034
|
+
}, null, 8, _hoisted_5$6)) : exports_vue.createCommentVNode("", true)])], 544);
|
|
313145
314035
|
};
|
|
313146
314036
|
}
|
|
313147
314037
|
}, [["__scopeId", "data-v-79953d57"]]);
|
|
@@ -313478,8 +314368,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
313478
314368
|
_hoisted_2$15 = { class: "document-mode-column icon-column" };
|
|
313479
314369
|
_hoisted_3$11 = ["innerHTML"];
|
|
313480
314370
|
_hoisted_4$7 = { class: "document-mode-column text-column" };
|
|
313481
|
-
_hoisted_5$
|
|
313482
|
-
_hoisted_6$
|
|
314371
|
+
_hoisted_5$5 = { class: "document-mode-type" };
|
|
314372
|
+
_hoisted_6$3 = { class: "document-mode-description" };
|
|
313483
314373
|
DocumentMode_default = /* @__PURE__ */ __plugin_vue_export_helper_default({
|
|
313484
314374
|
__name: "DocumentMode",
|
|
313485
314375
|
props: { options: { type: Array } },
|
|
@@ -313543,7 +314433,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
313543
314433
|
}, [exports_vue.createElementVNode("div", _hoisted_2$15, [exports_vue.createElementVNode("div", {
|
|
313544
314434
|
class: "icon-column__icon",
|
|
313545
314435
|
innerHTML: option.icon
|
|
313546
|
-
}, null, 8, _hoisted_3$11)]), exports_vue.createElementVNode("div", _hoisted_4$7, [exports_vue.createElementVNode("div", _hoisted_5$
|
|
314436
|
+
}, null, 8, _hoisted_3$11)]), exports_vue.createElementVNode("div", _hoisted_4$7, [exports_vue.createElementVNode("div", _hoisted_5$5, exports_vue.toDisplayString(option.label), 1), exports_vue.createElementVNode("div", _hoisted_6$3, exports_vue.toDisplayString(option.description), 1)])], 42, _hoisted_1$18);
|
|
313547
314437
|
}), 256))], 2);
|
|
313548
314438
|
};
|
|
313549
314439
|
}
|
|
@@ -313644,12 +314534,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
313644
314534
|
key: 3,
|
|
313645
314535
|
class: "link-title"
|
|
313646
314536
|
};
|
|
313647
|
-
_hoisted_5$
|
|
314537
|
+
_hoisted_5$4 = {
|
|
313648
314538
|
key: 4,
|
|
313649
314539
|
class: "link-input-wrapper"
|
|
313650
314540
|
};
|
|
313651
|
-
_hoisted_6$
|
|
313652
|
-
_hoisted_7$
|
|
314541
|
+
_hoisted_6$2 = { class: "input-row text-input-row" };
|
|
314542
|
+
_hoisted_7$2 = ["readonly"];
|
|
313653
314543
|
_hoisted_8$1 = { class: "input-row url-input-row" };
|
|
313654
314544
|
_hoisted_9$1 = ["innerHTML"];
|
|
313655
314545
|
_hoisted_10$1 = ["readonly", "onKeydown"];
|
|
@@ -313831,15 +314721,15 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
313831
314721
|
props.goToAnchor(url$1);
|
|
313832
314722
|
};
|
|
313833
314723
|
return (_ctx, _cache) => {
|
|
313834
|
-
return exports_vue.openBlock(), exports_vue.createElementBlock("div", { class: exports_vue.normalizeClass(["link-input-ctn", { "high-contrast": exports_vue.unref(isHighContrastMode$1) }]) }, [isAnchor.value ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_1$16, "Page anchor")) : isViewingMode.value ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_2$13, "Link details")) : isEditing.value ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_3$10, "Edit link")) : (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_4$6, "Add link")), __props.showInput && !isAnchor.value ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_5$
|
|
313835
|
-
exports_vue.createElementVNode("div", _hoisted_6$
|
|
314724
|
+
return exports_vue.openBlock(), exports_vue.createElementBlock("div", { class: exports_vue.normalizeClass(["link-input-ctn", { "high-contrast": exports_vue.unref(isHighContrastMode$1) }]) }, [isAnchor.value ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_1$16, "Page anchor")) : isViewingMode.value ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_2$13, "Link details")) : isEditing.value ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_3$10, "Edit link")) : (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_4$6, "Add link")), __props.showInput && !isAnchor.value ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_5$4, [
|
|
314725
|
+
exports_vue.createElementVNode("div", _hoisted_6$2, [_cache[5] || (_cache[5] = exports_vue.createElementVNode("div", { class: "input-icon text-input-icon" }, "T", -1)), exports_vue.withDirectives(exports_vue.createElementVNode("input", {
|
|
313836
314726
|
type: "text",
|
|
313837
314727
|
name: "text",
|
|
313838
314728
|
placeholder: "Text",
|
|
313839
314729
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => text5.value = $event),
|
|
313840
314730
|
readonly: isViewingMode.value,
|
|
313841
314731
|
onKeydown: _cache[1] || (_cache[1] = exports_vue.withKeys(exports_vue.withModifiers(($event) => !isViewingMode.value && handleSubmit, ["stop", "prevent"]), ["enter"]))
|
|
313842
|
-
}, null, 40, _hoisted_7$
|
|
314732
|
+
}, null, 40, _hoisted_7$2), [[exports_vue.vModelText, text5.value]])]),
|
|
313843
314733
|
exports_vue.createElementVNode("div", _hoisted_8$1, [
|
|
313844
314734
|
exports_vue.createElementVNode("div", {
|
|
313845
314735
|
class: "input-icon",
|
|
@@ -314275,7 +315165,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
314275
315165
|
];
|
|
314276
315166
|
_hoisted_3$7 = { class: "toolbar-table-actions__icon" };
|
|
314277
315167
|
_hoisted_4$5 = ["innerHTML"];
|
|
314278
|
-
_hoisted_5$
|
|
315168
|
+
_hoisted_5$3 = { class: "toolbar-table-actions__label" };
|
|
314279
315169
|
TableActions_default = /* @__PURE__ */ __plugin_vue_export_helper_default({
|
|
314280
315170
|
__name: "TableActions",
|
|
314281
315171
|
props: { options: { type: Array } },
|
|
@@ -314296,7 +315186,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
314296
315186
|
}, [exports_vue.createElementVNode("div", _hoisted_3$7, [exports_vue.createElementVNode("div", {
|
|
314297
315187
|
class: "toolbar-table-actions__icon-wrapper",
|
|
314298
315188
|
innerHTML: option.icon
|
|
314299
|
-
}, null, 8, _hoisted_4$5)]), exports_vue.createElementVNode("div", _hoisted_5$
|
|
315189
|
+
}, null, 8, _hoisted_4$5)]), exports_vue.createElementVNode("div", _hoisted_5$3, exports_vue.toDisplayString(option.label), 1)], 10, _hoisted_2$9);
|
|
314300
315190
|
}), 256))]);
|
|
314301
315191
|
};
|
|
314302
315192
|
}
|
|
@@ -314543,9 +315433,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
314543
315433
|
key: 1,
|
|
314544
315434
|
class: "button-label"
|
|
314545
315435
|
};
|
|
314546
|
-
_hoisted_5$
|
|
314547
|
-
_hoisted_6 = ["innerHTML"];
|
|
314548
|
-
_hoisted_7 = {
|
|
315436
|
+
_hoisted_5$2 = ["data-item", "aria-label"];
|
|
315437
|
+
_hoisted_6$1 = ["innerHTML"];
|
|
315438
|
+
_hoisted_7$1 = {
|
|
314549
315439
|
key: 1,
|
|
314550
315440
|
class: "button-label"
|
|
314551
315441
|
};
|
|
@@ -314693,7 +315583,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
314693
315583
|
class: "dropdown-caret",
|
|
314694
315584
|
innerHTML: caretIcon.value,
|
|
314695
315585
|
style: exports_vue.normalizeStyle({ opacity: exports_vue.unref(disabled) ? 0.6 : 1 })
|
|
314696
|
-
}, null, 12, _hoisted_6)], 8, _hoisted_5$
|
|
315586
|
+
}, null, 12, _hoisted_6$1)], 8, _hoisted_5$2)) : (exports_vue.openBlock(), exports_vue.createElementBlock(exports_vue.Fragment, { key: 2 }, [
|
|
314697
315587
|
exports_vue.unref(icon) ? (exports_vue.openBlock(), exports_vue.createBlock(ToolbarButtonIcon_default, {
|
|
314698
315588
|
key: 0,
|
|
314699
315589
|
color: exports_vue.unref(iconColor),
|
|
@@ -314705,7 +315595,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
314705
315595
|
"icon",
|
|
314706
315596
|
"name"
|
|
314707
315597
|
])) : exports_vue.createCommentVNode("", true),
|
|
314708
|
-
exports_vue.unref(label) && !exports_vue.unref(hideLabel) && !exports_vue.unref(inlineTextInputVisible) ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_7, exports_vue.toDisplayString(exports_vue.unref(label)), 1)) : exports_vue.createCommentVNode("", true),
|
|
315598
|
+
exports_vue.unref(label) && !exports_vue.unref(hideLabel) && !exports_vue.unref(inlineTextInputVisible) ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_7$1, exports_vue.toDisplayString(exports_vue.unref(label)), 1)) : exports_vue.createCommentVNode("", true),
|
|
314709
315599
|
exports_vue.unref(inlineTextInputVisible) ? (exports_vue.openBlock(), exports_vue.createElementBlock("span", _hoisted_8, [exports_vue.unref(name) === "fontSize" ? exports_vue.withDirectives((exports_vue.openBlock(), exports_vue.createElementBlock("input", {
|
|
314710
315600
|
key: 0,
|
|
314711
315601
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inlineTextInput.value = $event),
|
|
@@ -318038,7 +318928,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
318038
318928
|
stylesPartDescriptor = {
|
|
318039
318929
|
id: STYLES_PART_ID,
|
|
318040
318930
|
ensurePart(editor) {
|
|
318041
|
-
const converter = getConverter$
|
|
318931
|
+
const converter = getConverter$62(editor);
|
|
318042
318932
|
if (converter?.convertedXml[STYLES_PART_ID])
|
|
318043
318933
|
return converter.convertedXml[STYLES_PART_ID];
|
|
318044
318934
|
return {
|
|
@@ -318053,7 +318943,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
318053
318943
|
},
|
|
318054
318944
|
afterCommit(ctx$1) {
|
|
318055
318945
|
if (ctx$1.source.startsWith("collab:remote:")) {
|
|
318056
|
-
const converter = getConverter$
|
|
318946
|
+
const converter = getConverter$62(ctx$1.editor);
|
|
318057
318947
|
if (converter)
|
|
318058
318948
|
try {
|
|
318059
318949
|
converter.translatedLinkedStyles = translateStyleDefinitions(converter.convertedXml);
|
|
@@ -318481,6 +319371,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
318481
319371
|
HEADER_FILE_PATTERN2 = /header(\d+)\.xml$/;
|
|
318482
319372
|
FOOTER_FILE_PATTERN2 = /footer(\d+)\.xml$/;
|
|
318483
319373
|
SPECIAL_NOTE_TYPES = new Set(["separator", "continuationSeparator"]);
|
|
319374
|
+
import_lib4 = /* @__PURE__ */ __toESM2(require_lib(), 1);
|
|
318484
319375
|
SETTINGS_PART = SETTINGS_PART_PATH;
|
|
318485
319376
|
RESTART_POLICY_TO_OOXML = {
|
|
318486
319377
|
continuous: "continuous",
|
|
@@ -318731,14 +319622,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
318731
319622
|
if (!allowed.includes(this.#editorLifecycleState))
|
|
318732
319623
|
throw new InvalidStateError(`Invalid operation: editor is in '${this.#editorLifecycleState}' state, expected one of: ${allowed.join(", ")}`);
|
|
318733
319624
|
}
|
|
318734
|
-
async#withState(during, success2, failure, operation) {
|
|
319625
|
+
async#withState(during, success2, failure$1, operation) {
|
|
318735
319626
|
this.#editorLifecycleState = during;
|
|
318736
319627
|
try {
|
|
318737
319628
|
const result = await operation();
|
|
318738
319629
|
this.#editorLifecycleState = success2;
|
|
318739
319630
|
return result;
|
|
318740
319631
|
} catch (error48) {
|
|
318741
|
-
this.#editorLifecycleState = failure;
|
|
319632
|
+
this.#editorLifecycleState = failure$1;
|
|
318742
319633
|
throw error48;
|
|
318743
319634
|
}
|
|
318744
319635
|
}
|
|
@@ -320118,6 +321009,10 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
320118
321009
|
if (partData?.elements?.[0])
|
|
320119
321010
|
updatedDocs[path2] = String(this.converter.schemaToXml(partData.elements[0]));
|
|
320120
321011
|
}
|
|
321012
|
+
const removedCustomXmlPaths = this.converter.removedCustomXmlPaths;
|
|
321013
|
+
if (removedCustomXmlPaths instanceof Set)
|
|
321014
|
+
for (const path2 of removedCustomXmlPaths)
|
|
321015
|
+
updatedDocs[path2] = null;
|
|
320121
321016
|
const zipper = new DocxZipper_default;
|
|
320122
321017
|
if (getUpdatedDocs) {
|
|
320123
321018
|
updatedDocs["[Content_Types].xml"] = await zipper.updateContentTypes({ files: this.options.content }, media2, true, updatedDocs, this.options.fonts);
|
|
@@ -332255,11 +333150,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
332255
333150
|
];
|
|
332256
333151
|
});
|
|
332257
333152
|
|
|
332258
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
333153
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-BLwvPPRc.es.js
|
|
332259
333154
|
var MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
|
|
332260
|
-
var
|
|
332261
|
-
|
|
332262
|
-
|
|
333155
|
+
var init_create_super_doc_ui_BLwvPPRc_es = __esm(() => {
|
|
333156
|
+
init_SuperConverter_8A1MBmqJ_es();
|
|
333157
|
+
init_create_headless_toolbar_1RfXz7Wm_es();
|
|
332263
333158
|
MOD_ALIASES = new Set([
|
|
332264
333159
|
"Mod",
|
|
332265
333160
|
"Meta",
|
|
@@ -332301,16 +333196,16 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
|
|
|
332301
333196
|
|
|
332302
333197
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
332303
333198
|
var init_super_editor_es = __esm(() => {
|
|
332304
|
-
|
|
332305
|
-
|
|
333199
|
+
init_src_Bnec7ggt_es();
|
|
333200
|
+
init_SuperConverter_8A1MBmqJ_es();
|
|
332306
333201
|
init_jszip_C49i9kUs_es();
|
|
332307
333202
|
init_xml_js_CqGKpaft_es();
|
|
332308
|
-
|
|
333203
|
+
init_create_headless_toolbar_1RfXz7Wm_es();
|
|
332309
333204
|
init_constants_DrU4EASo_es();
|
|
332310
333205
|
init_dist_B8HfvhaK_es();
|
|
332311
333206
|
init_unified_Dsuw2be5_es();
|
|
332312
|
-
|
|
332313
|
-
|
|
333207
|
+
init_DocxZipper_Bphhij1P_es();
|
|
333208
|
+
init_create_super_doc_ui_BLwvPPRc_es();
|
|
332314
333209
|
init_ui_CGB3qmy3_es();
|
|
332315
333210
|
init_eventemitter3_UwU_CLPU_es();
|
|
332316
333211
|
init_errors_C_DoKMoN_es();
|
|
@@ -339341,6 +340236,74 @@ More content with **bold** and *italic*.`
|
|
|
339341
340236
|
referenceDocPath: "permission-ranges/update-principal.mdx",
|
|
339342
340237
|
referenceGroup: "permissionRanges",
|
|
339343
340238
|
skipAsATool: true
|
|
340239
|
+
},
|
|
340240
|
+
"customXml.parts.list": {
|
|
340241
|
+
memberPath: "customXml.parts.list",
|
|
340242
|
+
description: "List Custom XML Data Storage Parts in the document, optionally filtered by root namespace or schema reference.",
|
|
340243
|
+
expectedResult: "Returns a CustomXmlPartsListResult with summary entries (no content); fetch content via get.",
|
|
340244
|
+
requiresDocumentContext: true,
|
|
340245
|
+
metadata: readOperation2({
|
|
340246
|
+
idempotency: "idempotent",
|
|
340247
|
+
throws: T_REF_READ_LIST2
|
|
340248
|
+
}),
|
|
340249
|
+
referenceDocPath: "custom-xml/parts/list.mdx",
|
|
340250
|
+
referenceGroup: "customXml"
|
|
340251
|
+
},
|
|
340252
|
+
"customXml.parts.get": {
|
|
340253
|
+
memberPath: "customXml.parts.get",
|
|
340254
|
+
description: "Get a single Custom XML Data Storage Part by itemID or package part name, including its full content. " + "v1 partName targeting is limited to Word-style customXml/itemN.xml paths.",
|
|
340255
|
+
expectedResult: "Returns a CustomXmlPartInfo with id, partName, namespaces, schemaRefs, and content; or null if not found.",
|
|
340256
|
+
requiresDocumentContext: true,
|
|
340257
|
+
metadata: readOperation2({
|
|
340258
|
+
throws: T_NOT_FOUND_CAPABLE2
|
|
340259
|
+
}),
|
|
340260
|
+
referenceDocPath: "custom-xml/parts/get.mdx",
|
|
340261
|
+
referenceGroup: "customXml"
|
|
340262
|
+
},
|
|
340263
|
+
"customXml.parts.create": {
|
|
340264
|
+
memberPath: "customXml.parts.create",
|
|
340265
|
+
description: "Add a new Custom XML Data Storage Part to the document. Generates a fresh itemID GUID and emits the Properties Part.",
|
|
340266
|
+
expectedResult: "Returns a CustomXmlPartsCreateResult with the generated id and package part names on success.",
|
|
340267
|
+
requiresDocumentContext: true,
|
|
340268
|
+
metadata: mutationOperation2({
|
|
340269
|
+
idempotency: "non-idempotent",
|
|
340270
|
+
supportsDryRun: true,
|
|
340271
|
+
supportsTrackedMode: false,
|
|
340272
|
+
possibleFailureCodes: ["INVALID_INPUT"],
|
|
340273
|
+
throws: T_REF_INSERT2
|
|
340274
|
+
}),
|
|
340275
|
+
referenceDocPath: "custom-xml/parts/create.mdx",
|
|
340276
|
+
referenceGroup: "customXml"
|
|
340277
|
+
},
|
|
340278
|
+
"customXml.parts.patch": {
|
|
340279
|
+
memberPath: "customXml.parts.patch",
|
|
340280
|
+
description: "Replace the content and/or schemaRefs of an existing Custom XML Data Storage Part. " + "At least one of content or schemaRefs is required. " + "v1 partName targeting is limited to Word-style customXml/itemN.xml paths.",
|
|
340281
|
+
expectedResult: "Returns a CustomXmlPartsMutationResult indicating success with the resolved target or a failure.",
|
|
340282
|
+
requiresDocumentContext: true,
|
|
340283
|
+
metadata: mutationOperation2({
|
|
340284
|
+
idempotency: "idempotent",
|
|
340285
|
+
supportsDryRun: true,
|
|
340286
|
+
supportsTrackedMode: false,
|
|
340287
|
+
possibleFailureCodes: ["TARGET_NOT_FOUND", "INVALID_INPUT"],
|
|
340288
|
+
throws: T_REF_MUTATION2
|
|
340289
|
+
}),
|
|
340290
|
+
referenceDocPath: "custom-xml/parts/patch.mdx",
|
|
340291
|
+
referenceGroup: "customXml"
|
|
340292
|
+
},
|
|
340293
|
+
"customXml.parts.remove": {
|
|
340294
|
+
memberPath: "customXml.parts.remove",
|
|
340295
|
+
description: "Remove a Custom XML Data Storage Part and clean up all linked package files (item, props, rels, content-types entry). " + "v1 partName targeting is limited to Word-style customXml/itemN.xml paths.",
|
|
340296
|
+
expectedResult: "Returns a CustomXmlPartsMutationResult indicating success or a failure.",
|
|
340297
|
+
requiresDocumentContext: true,
|
|
340298
|
+
metadata: mutationOperation2({
|
|
340299
|
+
idempotency: "non-idempotent",
|
|
340300
|
+
supportsDryRun: true,
|
|
340301
|
+
supportsTrackedMode: false,
|
|
340302
|
+
possibleFailureCodes: ["TARGET_NOT_FOUND"],
|
|
340303
|
+
throws: T_REF_MUTATION_REMOVE2
|
|
340304
|
+
}),
|
|
340305
|
+
referenceDocPath: "custom-xml/parts/remove.mdx",
|
|
340306
|
+
referenceGroup: "customXml"
|
|
339344
340307
|
}
|
|
339345
340308
|
};
|
|
339346
340309
|
OPERATION_IDS2 = Object.freeze(Object.keys(OPERATION_DEFINITIONS2));
|
|
@@ -341079,7 +342042,7 @@ function refConfigSchemas2() {
|
|
|
341079
342042
|
failure: refFailureSchema2
|
|
341080
342043
|
};
|
|
341081
342044
|
}
|
|
341082
|
-
var nodeTypeValues2, blockNodeTypeValues2, deletableBlockNodeTypeValues2, inlineNodeTypeValues2, knownTargetKindValues, SHARED_DEFS, rangeSchema2, positionSchema, inlineAnchorSchema, targetKindSchema, textAddressSchema2, textTargetSchema2, blockNodeAddressSchema2, deletableBlockNodeAddressSchema2, tableAddressSchema2, tableRowAddressSchema2, tableCellAddressSchema2, tableOrCellAddressSchema2, paragraphAddressSchema2, headingAddressSchema2, listItemAddressSchema2, paragraphTargetSchema2, sectionAddressSchema2, inlineNodeAddressSchema, nodeAddressSchema2, commentAddressSchema2, trackedChangeAddressSchema2, entityAddressSchema2, selectionTargetSchema2, targetLocatorSchema, deleteBehaviorSchema2, resolvedHandleSchema2, pageInfoSchema2, receiptSuccessSchema2, textMutationRangeSchema2, textMutationResolutionSchema2, textMutationSuccessSchema2, matchRunSchema, matchBlockSchema2, storyLocatorSchema2, trackChangeRefSchema2, createParagraphSuccessSchema2, createHeadingSuccessSchema2, headingLevelSchema2, listsInsertSuccessSchema2, listsMutateItemSuccessSchema2, listsExitSuccessSchema, nodeSummarySchema, nodeInfoSchema, matchContextSchema, unknownNodeDiagnosticSchema, textSelectorSchema2, nodeSelectorSchema2, selectorShorthandSchema, sdTextSelectorSchema, sdNodeSelectorSchema, sdSelectorSchema, sdReadOptionsSchema, sdFindInputSchema, sdNodeResultSchema, sdFindResultSchema, sdMutationResolutionSchema2, sdMutationSuccessSchema2, documentInfoCountsSchema2, documentInfoOutlineItemSchema2, documentInfoCapabilitiesSchema2, documentStyleInfoSchema, documentStylesSchema2, documentDefaultsSchema2, documentInfoSchema, listKindSchema2, listInsertPositionSchema2, listItemInfoSchema, listItemDomainItemSchema, listsListResultSchema, sectionBreakTypeSchema2, sectionOrientationSchema2, sectionVerticalAlignSchema2, sectionDirectionSchema2, sectionHeaderFooterKindSchema2, sectionHeaderFooterVariantSchema2, sectionLineNumberRestartSchema2, sectionPageNumberFormatSchema2, sectionRangeDomainSchema2, sectionPageMarginsSchema2, sectionHeaderFooterMarginsSchema2, sectionPageSetupSchema2, sectionColumnsSchema2, sectionLineNumberingSchema2, sectionPageNumberingSchema2, sectionHeaderFooterRefsSchema2, sectionBorderSpecSchema2, sectionPageBordersSchema2, sectionInfoSchema, sectionResolvedHandleSchema, sectionDomainItemSchema, sectionsListResultSchema, sectionMutationSuccessSchema2, documentMutationSuccessSchema2, paragraphMutationTargetSchema2, paragraphMutationSuccessSchema2, createSectionBreakSuccessSchema2, commentInfoSchema, commentDomainItemSchema, commentsListResultSchema, trackChangeWordRevisionIdsSchema2, trackChangeInfoSchema, trackChangeDomainItemSchema, trackChangesListResultSchema, capabilityReasonCodeSchema, capabilityReasonsSchema2, capabilityFlagSchema2, operationRuntimeCapabilitySchema2, operationCapabilitiesSchema2, inlinePropertyCapabilitySchema2, inlinePropertyCapabilitiesByKeySchema, formatCapabilitiesSchema2, planEngineCapabilitiesSchema2, capabilitiesOutputSchema, strictEmptyObjectSchema, tableBorderColorPattern2, tableBorderSpecSchema, nullableTableBorderSpecSchema2, sdFragmentSchema2, placementSchema2, nestingPolicySchema2, insertInputSchema, tableLocatorSchema, cellLocatorSchema, cellOrTableScopedCellLocatorSchema, tableOrCellLocatorSchema, mergeRangeLocatorSchema, tableCreateLocationSchema2, tableMutationSuccessSchema, createTableSuccessSchema, tableMutationFailureCodes, tableMutationFailureSchema, tableMutationResultSchema, createTableResultSchema, historyActionSuccessSchema, historyActionFailureSchema, formatInlineAliasOperationSchemas2, tocMutationFailureCodes, tocMutationFailureSchema2, tocMutationSuccessSchema2, tocEntryMutationFailureCodes, tocEntryMutationFailureSchema2, tocEntryMutationSuccessSchema2, hyperlinkTargetSchema2, hyperlinkReadPropertiesSchema2, hyperlinkDestinationSchema, hyperlinkSpecSchema2, hyperlinkPatchSchema2, hyperlinkDomainSchema2, hyperlinkMutationSuccessSchema2, hyperlinkMutationFailureCodes, hyperlinkMutationFailureSchema2, hyperlinkInfoSchema, contentControlTargetSchema2, contentControlMutationSuccessSchema2, contentControlMutationFailureSchema2, ccListResultSchema2, ccInfoSchema2, refListQueryProperties2, refListQuerySchema, discoveryOutputSchema, receiptFailureSchema, refFailureSchema2, bookmarkAddressSchema2, bookmarkMutation2, footnoteAddressSchema2, footnoteConfigScopeSchema2, footnoteNumberingSchema2, footnoteMutation2, footnoteConfig2, crossRefAddressSchema2, crossRefTargetSchema2, crossRefDisplaySchema2, crossRefMutation2, indexAddressSchema2, indexEntryAddressSchema2, indexConfigSchema2, indexEntryDataSchema2, indexEntryPatchSchema2, indexMutation2, indexEntryMutation2, captionAddressSchema2, captionMutation2, captionConfig2, fieldAddressSchema2, fieldMutation2, citationAddressSchema2, citationSourceAddressSchema2, bibliographyAddressSchema2, citationMutation2, citationSourceMutation2, bibliographyMutation2, citationPersonSchema2, citationSourceFieldsSchema2, tocCreateLocationSchema2, authoritiesAddressSchema2, authorityEntryAddressSchema2, authoritiesConfigSchema2, authorityEntryDataSchema2, authorityEntryPatchSchema2, authoritiesMutation2, authorityEntryMutation2, diffCoverageSchema2, diffSummarySchema2, diffSnapshotSchema2, diffPayloadSchema2, diffApplyResultSchema, operationSchemas;
|
|
342045
|
+
var nodeTypeValues2, blockNodeTypeValues2, deletableBlockNodeTypeValues2, inlineNodeTypeValues2, knownTargetKindValues, SHARED_DEFS, rangeSchema2, positionSchema, inlineAnchorSchema, targetKindSchema, textAddressSchema2, textTargetSchema2, blockNodeAddressSchema2, deletableBlockNodeAddressSchema2, tableAddressSchema2, tableRowAddressSchema2, tableCellAddressSchema2, tableOrCellAddressSchema2, paragraphAddressSchema2, headingAddressSchema2, listItemAddressSchema2, paragraphTargetSchema2, sectionAddressSchema2, inlineNodeAddressSchema, nodeAddressSchema2, commentAddressSchema2, trackedChangeAddressSchema2, entityAddressSchema2, selectionTargetSchema2, targetLocatorSchema, deleteBehaviorSchema2, resolvedHandleSchema2, pageInfoSchema2, receiptSuccessSchema2, textMutationRangeSchema2, textMutationResolutionSchema2, textMutationSuccessSchema2, matchRunSchema, matchBlockSchema2, storyLocatorSchema2, trackChangeRefSchema2, createParagraphSuccessSchema2, createHeadingSuccessSchema2, headingLevelSchema2, listsInsertSuccessSchema2, listsMutateItemSuccessSchema2, listsExitSuccessSchema, nodeSummarySchema, nodeInfoSchema, matchContextSchema, unknownNodeDiagnosticSchema, textSelectorSchema2, nodeSelectorSchema2, selectorShorthandSchema, sdTextSelectorSchema, sdNodeSelectorSchema, sdSelectorSchema, sdReadOptionsSchema, sdFindInputSchema, sdNodeResultSchema, sdFindResultSchema, sdMutationResolutionSchema2, sdMutationSuccessSchema2, documentInfoCountsSchema2, documentInfoOutlineItemSchema2, documentInfoCapabilitiesSchema2, documentStyleInfoSchema, documentStylesSchema2, documentDefaultsSchema2, documentInfoSchema, listKindSchema2, listInsertPositionSchema2, listItemInfoSchema, listItemDomainItemSchema, listsListResultSchema, sectionBreakTypeSchema2, sectionOrientationSchema2, sectionVerticalAlignSchema2, sectionDirectionSchema2, sectionHeaderFooterKindSchema2, sectionHeaderFooterVariantSchema2, sectionLineNumberRestartSchema2, sectionPageNumberFormatSchema2, sectionRangeDomainSchema2, sectionPageMarginsSchema2, sectionHeaderFooterMarginsSchema2, sectionPageSetupSchema2, sectionColumnsSchema2, sectionLineNumberingSchema2, sectionPageNumberingSchema2, sectionHeaderFooterRefsSchema2, sectionBorderSpecSchema2, sectionPageBordersSchema2, sectionInfoSchema, sectionResolvedHandleSchema, sectionDomainItemSchema, sectionsListResultSchema, sectionMutationSuccessSchema2, documentMutationSuccessSchema2, paragraphMutationTargetSchema2, paragraphMutationSuccessSchema2, createSectionBreakSuccessSchema2, commentInfoSchema, commentDomainItemSchema, commentsListResultSchema, trackChangeWordRevisionIdsSchema2, trackChangeInfoSchema, trackChangeDomainItemSchema, trackChangesListResultSchema, capabilityReasonCodeSchema, capabilityReasonsSchema2, capabilityFlagSchema2, operationRuntimeCapabilitySchema2, operationCapabilitiesSchema2, inlinePropertyCapabilitySchema2, inlinePropertyCapabilitiesByKeySchema, formatCapabilitiesSchema2, planEngineCapabilitiesSchema2, capabilitiesOutputSchema, strictEmptyObjectSchema, tableBorderColorPattern2, tableBorderSpecSchema, nullableTableBorderSpecSchema2, sdFragmentSchema2, placementSchema2, nestingPolicySchema2, insertInputSchema, tableLocatorSchema, cellLocatorSchema, cellOrTableScopedCellLocatorSchema, tableOrCellLocatorSchema, mergeRangeLocatorSchema, tableCreateLocationSchema2, tableMutationSuccessSchema, createTableSuccessSchema, tableMutationFailureCodes, tableMutationFailureSchema, tableMutationResultSchema, createTableResultSchema, historyActionSuccessSchema, historyActionFailureSchema, formatInlineAliasOperationSchemas2, tocMutationFailureCodes, tocMutationFailureSchema2, tocMutationSuccessSchema2, tocEntryMutationFailureCodes, tocEntryMutationFailureSchema2, tocEntryMutationSuccessSchema2, hyperlinkTargetSchema2, hyperlinkReadPropertiesSchema2, hyperlinkDestinationSchema, hyperlinkSpecSchema2, hyperlinkPatchSchema2, hyperlinkDomainSchema2, hyperlinkMutationSuccessSchema2, hyperlinkMutationFailureCodes, hyperlinkMutationFailureSchema2, hyperlinkInfoSchema, contentControlTargetSchema2, contentControlMutationSuccessSchema2, contentControlMutationFailureSchema2, ccListResultSchema2, ccInfoSchema2, refListQueryProperties2, refListQuerySchema, discoveryOutputSchema, receiptFailureSchema, refFailureSchema2, bookmarkAddressSchema2, bookmarkMutation2, customXmlPartTargetSchema2, customXmlPartMutation2, customXmlPartCreateMutation2, footnoteAddressSchema2, footnoteConfigScopeSchema2, footnoteNumberingSchema2, footnoteMutation2, footnoteConfig2, crossRefAddressSchema2, crossRefTargetSchema2, crossRefDisplaySchema2, crossRefMutation2, indexAddressSchema2, indexEntryAddressSchema2, indexConfigSchema2, indexEntryDataSchema2, indexEntryPatchSchema2, indexMutation2, indexEntryMutation2, captionAddressSchema2, captionMutation2, captionConfig2, fieldAddressSchema2, fieldMutation2, citationAddressSchema2, citationSourceAddressSchema2, bibliographyAddressSchema2, citationMutation2, citationSourceMutation2, bibliographyMutation2, citationPersonSchema2, citationSourceFieldsSchema2, tocCreateLocationSchema2, authoritiesAddressSchema2, authorityEntryAddressSchema2, authoritiesConfigSchema2, authorityEntryDataSchema2, authorityEntryPatchSchema2, authoritiesMutation2, authorityEntryMutation2, diffCoverageSchema2, diffSummarySchema2, diffSnapshotSchema2, diffPayloadSchema2, diffApplyResultSchema, operationSchemas;
|
|
341083
342046
|
var init_schemas4 = __esm(() => {
|
|
341084
342047
|
init_command_catalog();
|
|
341085
342048
|
init_types4();
|
|
@@ -342181,6 +343144,21 @@ var init_schemas4 = __esm(() => {
|
|
|
342181
343144
|
story: ref3("StoryLocator")
|
|
342182
343145
|
}, ["kind", "entityType", "name"]);
|
|
342183
343146
|
bookmarkMutation2 = refMutationSchemas2({ bookmark: bookmarkAddressSchema2 }, ["bookmark"]);
|
|
343147
|
+
customXmlPartTargetSchema2 = {
|
|
343148
|
+
oneOf: [
|
|
343149
|
+
objectSchema2({ id: { type: "string", minLength: 1 } }, ["id"]),
|
|
343150
|
+
objectSchema2({ partName: { type: "string", minLength: 1 } }, ["partName"])
|
|
343151
|
+
]
|
|
343152
|
+
};
|
|
343153
|
+
customXmlPartMutation2 = refMutationSchemas2({
|
|
343154
|
+
target: customXmlPartTargetSchema2,
|
|
343155
|
+
id: { type: "string", minLength: 1 }
|
|
343156
|
+
}, ["target"]);
|
|
343157
|
+
customXmlPartCreateMutation2 = refMutationSchemas2({
|
|
343158
|
+
id: { type: "string" },
|
|
343159
|
+
partName: { type: "string" },
|
|
343160
|
+
propsPartName: { type: "string" }
|
|
343161
|
+
}, ["id", "partName", "propsPartName"]);
|
|
342184
343162
|
footnoteAddressSchema2 = objectSchema2({ kind: { const: "entity" }, entityType: { const: "footnote" }, noteId: { type: "string" } }, ["kind", "entityType", "noteId"]);
|
|
342185
343163
|
footnoteConfigScopeSchema2 = {
|
|
342186
343164
|
oneOf: [
|
|
@@ -346049,6 +347027,43 @@ var init_schemas4 = __esm(() => {
|
|
|
346049
347027
|
output: { type: "object" },
|
|
346050
347028
|
success: { type: "object" },
|
|
346051
347029
|
failure: { type: "object" }
|
|
347030
|
+
},
|
|
347031
|
+
"customXml.parts.list": {
|
|
347032
|
+
input: objectSchema2({
|
|
347033
|
+
...refListQueryProperties2,
|
|
347034
|
+
rootNamespace: { type: "string" },
|
|
347035
|
+
schemaRef: { type: "string" }
|
|
347036
|
+
}),
|
|
347037
|
+
output: discoveryOutputSchema
|
|
347038
|
+
},
|
|
347039
|
+
"customXml.parts.get": {
|
|
347040
|
+
input: objectSchema2({ target: customXmlPartTargetSchema2 }, ["target"]),
|
|
347041
|
+
output: { oneOf: [{ type: "object" }, { type: "null" }] }
|
|
347042
|
+
},
|
|
347043
|
+
"customXml.parts.create": {
|
|
347044
|
+
input: objectSchema2({
|
|
347045
|
+
content: { type: "string", minLength: 1 },
|
|
347046
|
+
schemaRefs: { type: "array", items: { type: "string", minLength: 1 } }
|
|
347047
|
+
}, ["content"]),
|
|
347048
|
+
...customXmlPartCreateMutation2
|
|
347049
|
+
},
|
|
347050
|
+
"customXml.parts.patch": {
|
|
347051
|
+
input: {
|
|
347052
|
+
type: "object",
|
|
347053
|
+
properties: {
|
|
347054
|
+
target: customXmlPartTargetSchema2,
|
|
347055
|
+
content: { type: "string", minLength: 1 },
|
|
347056
|
+
schemaRefs: { type: "array", items: { type: "string", minLength: 1 } }
|
|
347057
|
+
},
|
|
347058
|
+
required: ["target"],
|
|
347059
|
+
anyOf: [{ required: ["content"] }, { required: ["schemaRefs"] }],
|
|
347060
|
+
additionalProperties: false
|
|
347061
|
+
},
|
|
347062
|
+
...customXmlPartMutation2
|
|
347063
|
+
},
|
|
347064
|
+
"customXml.parts.remove": {
|
|
347065
|
+
input: objectSchema2({ target: customXmlPartTargetSchema2 }, ["target"]),
|
|
347066
|
+
...customXmlPartMutation2
|
|
346052
347067
|
}
|
|
346053
347068
|
};
|
|
346054
347069
|
});
|
|
@@ -346238,6 +347253,11 @@ var init_reference_doc_map = __esm(() => {
|
|
|
346238
347253
|
title: "Permission Ranges",
|
|
346239
347254
|
description: "Permission range exception operations for protected documents.",
|
|
346240
347255
|
pagePath: "permission-ranges/index.mdx"
|
|
347256
|
+
},
|
|
347257
|
+
customXml: {
|
|
347258
|
+
title: "Custom XML",
|
|
347259
|
+
description: "Custom XML Data Storage Part operations (ECMA-376 §15.2.5, §15.2.6). Raw read and write of custom XML parts in the OOXML package.",
|
|
347260
|
+
pagePath: "custom-xml/index.mdx"
|
|
346241
347261
|
}
|
|
346242
347262
|
};
|
|
346243
347263
|
REFERENCE_OPERATION_GROUPS = Object.keys(GROUP_METADATA2).map((key2) => ({
|
|
@@ -347510,7 +348530,7 @@ function textReceiptToSDReceipt2(receipt2) {
|
|
|
347510
348530
|
resolution: receipt2.resolution ? buildResolution2(receipt2.resolution) : undefined
|
|
347511
348531
|
};
|
|
347512
348532
|
}
|
|
347513
|
-
const
|
|
348533
|
+
const failure2 = {
|
|
347514
348534
|
code: "INTERNAL_ERROR",
|
|
347515
348535
|
message: receipt2.failure.message,
|
|
347516
348536
|
...receipt2.failure.details != null ? { details: receipt2.failure.details } : {}
|
|
@@ -347528,14 +348548,14 @@ function textReceiptToSDReceipt2(receipt2) {
|
|
|
347528
348548
|
REVISION_MISMATCH: "REVISION_MISMATCH",
|
|
347529
348549
|
INTERNAL_ERROR: "INTERNAL_ERROR"
|
|
347530
348550
|
};
|
|
347531
|
-
|
|
348551
|
+
failure2.code = CODE_MAP[receipt2.failure.code] ?? "INTERNAL_ERROR";
|
|
347532
348552
|
return {
|
|
347533
348553
|
success: false,
|
|
347534
|
-
failure,
|
|
348554
|
+
failure: failure2,
|
|
347535
348555
|
resolution: receipt2.resolution ? buildResolution2(receipt2.resolution) : undefined
|
|
347536
348556
|
};
|
|
347537
348557
|
}
|
|
347538
|
-
function buildStructuralReceipt2(success2, params3,
|
|
348558
|
+
function buildStructuralReceipt2(success2, params3, failure2) {
|
|
347539
348559
|
const resolution = {
|
|
347540
348560
|
target: params3.target,
|
|
347541
348561
|
range: params3.range,
|
|
@@ -347546,7 +348566,7 @@ function buildStructuralReceipt2(success2, params3, failure) {
|
|
|
347546
348566
|
}
|
|
347547
348567
|
return {
|
|
347548
348568
|
success: false,
|
|
347549
|
-
failure: { code:
|
|
348569
|
+
failure: { code: failure2?.code ?? "INTERNAL_ERROR", message: failure2?.message ?? "" },
|
|
347550
348570
|
resolution
|
|
347551
348571
|
};
|
|
347552
348572
|
}
|
|
@@ -349050,7 +350070,12 @@ function buildDispatchTable2(api2) {
|
|
|
349050
350070
|
"permissionRanges.get": (input2) => api2.permissionRanges.get(input2),
|
|
349051
350071
|
"permissionRanges.create": (input2, options) => api2.permissionRanges.create(input2, options),
|
|
349052
350072
|
"permissionRanges.remove": (input2, options) => api2.permissionRanges.remove(input2, options),
|
|
349053
|
-
"permissionRanges.updatePrincipal": (input2, options) => api2.permissionRanges.updatePrincipal(input2, options)
|
|
350073
|
+
"permissionRanges.updatePrincipal": (input2, options) => api2.permissionRanges.updatePrincipal(input2, options),
|
|
350074
|
+
"customXml.parts.list": (input2) => api2.customXml.parts.list(input2),
|
|
350075
|
+
"customXml.parts.get": (input2) => api2.customXml.parts.get(input2),
|
|
350076
|
+
"customXml.parts.create": (input2, options) => api2.customXml.parts.create(input2, options),
|
|
350077
|
+
"customXml.parts.patch": (input2, options) => api2.customXml.parts.patch(input2, options),
|
|
350078
|
+
"customXml.parts.remove": (input2, options) => api2.customXml.parts.remove(input2, options)
|
|
349054
350079
|
};
|
|
349055
350080
|
}
|
|
349056
350081
|
var init_invoke = __esm(() => {
|
|
@@ -350858,6 +351883,80 @@ var init_bookmarks = __esm(() => {
|
|
|
350858
351883
|
init_story_validator();
|
|
350859
351884
|
});
|
|
350860
351885
|
|
|
351886
|
+
// ../../packages/document-api/src/customXml/customXml.ts
|
|
351887
|
+
function validateTarget2(target, operationName) {
|
|
351888
|
+
if (!target || typeof target !== "object") {
|
|
351889
|
+
throw new DocumentApiValidationError3("INVALID_TARGET", `${operationName} requires a target with either { id } or { partName }.`, { target });
|
|
351890
|
+
}
|
|
351891
|
+
const t = target;
|
|
351892
|
+
const hasId = typeof t.id === "string" && t.id.length > 0;
|
|
351893
|
+
const hasPartName = typeof t.partName === "string" && t.partName.length > 0;
|
|
351894
|
+
if (!hasId && !hasPartName) {
|
|
351895
|
+
throw new DocumentApiValidationError3("INVALID_TARGET", `${operationName} target must have a non-empty 'id' or 'partName'.`, { target });
|
|
351896
|
+
}
|
|
351897
|
+
if (hasId && hasPartName) {
|
|
351898
|
+
throw new DocumentApiValidationError3("INVALID_TARGET", `${operationName} target must not provide both 'id' and 'partName'; choose one.`, { target });
|
|
351899
|
+
}
|
|
351900
|
+
}
|
|
351901
|
+
function validateContent2(content3, operationName) {
|
|
351902
|
+
if (typeof content3 !== "string" || content3.length === 0) {
|
|
351903
|
+
throw new DocumentApiValidationError3("INVALID_INPUT", `${operationName} requires a non-empty 'content' string of well-formed XML.`, { contentType: typeof content3 });
|
|
351904
|
+
}
|
|
351905
|
+
if (!/<\s*[A-Za-z_]/.test(content3)) {
|
|
351906
|
+
throw new DocumentApiValidationError3("INVALID_INPUT", `${operationName} 'content' does not contain a root XML element.`);
|
|
351907
|
+
}
|
|
351908
|
+
}
|
|
351909
|
+
function validateSchemaRefs2(schemaRefs, operationName) {
|
|
351910
|
+
if (!Array.isArray(schemaRefs)) {
|
|
351911
|
+
throw new DocumentApiValidationError3("INVALID_INPUT", `${operationName} 'schemaRefs' must be an array of strings.`);
|
|
351912
|
+
}
|
|
351913
|
+
for (const [i4, entry] of schemaRefs.entries()) {
|
|
351914
|
+
if (typeof entry !== "string" || entry.length === 0) {
|
|
351915
|
+
throw new DocumentApiValidationError3("INVALID_INPUT", `${operationName} 'schemaRefs[${i4}]' must be a non-empty string.`);
|
|
351916
|
+
}
|
|
351917
|
+
}
|
|
351918
|
+
}
|
|
351919
|
+
function executeCustomXmlPartsList2(adapter, query2) {
|
|
351920
|
+
if (query2?.rootNamespace !== undefined && typeof query2.rootNamespace !== "string") {
|
|
351921
|
+
throw new DocumentApiValidationError3("INVALID_INPUT", `customXml.parts.list 'rootNamespace' must be a string when provided.`);
|
|
351922
|
+
}
|
|
351923
|
+
if (query2?.schemaRef !== undefined && typeof query2.schemaRef !== "string") {
|
|
351924
|
+
throw new DocumentApiValidationError3("INVALID_INPUT", `customXml.parts.list 'schemaRef' must be a string when provided.`);
|
|
351925
|
+
}
|
|
351926
|
+
return adapter.list(query2);
|
|
351927
|
+
}
|
|
351928
|
+
function executeCustomXmlPartsGet2(adapter, input2) {
|
|
351929
|
+
validateTarget2(input2.target, "customXml.parts.get");
|
|
351930
|
+
return adapter.get(input2);
|
|
351931
|
+
}
|
|
351932
|
+
function executeCustomXmlPartsCreate2(adapter, input2, options) {
|
|
351933
|
+
validateContent2(input2.content, "customXml.parts.create");
|
|
351934
|
+
if (input2.schemaRefs !== undefined) {
|
|
351935
|
+
validateSchemaRefs2(input2.schemaRefs, "customXml.parts.create");
|
|
351936
|
+
}
|
|
351937
|
+
return adapter.create(input2, normalizeMutationOptions2(options));
|
|
351938
|
+
}
|
|
351939
|
+
function executeCustomXmlPartsPatch2(adapter, input2, options) {
|
|
351940
|
+
validateTarget2(input2.target, "customXml.parts.patch");
|
|
351941
|
+
if (input2.content === undefined && input2.schemaRefs === undefined) {
|
|
351942
|
+
throw new DocumentApiValidationError3("INVALID_INPUT", `customXml.parts.patch requires at least one of 'content' or 'schemaRefs'.`);
|
|
351943
|
+
}
|
|
351944
|
+
if (input2.content !== undefined) {
|
|
351945
|
+
validateContent2(input2.content, "customXml.parts.patch");
|
|
351946
|
+
}
|
|
351947
|
+
if (input2.schemaRefs !== undefined) {
|
|
351948
|
+
validateSchemaRefs2(input2.schemaRefs, "customXml.parts.patch");
|
|
351949
|
+
}
|
|
351950
|
+
return adapter.patch(input2, normalizeMutationOptions2(options));
|
|
351951
|
+
}
|
|
351952
|
+
function executeCustomXmlPartsRemove2(adapter, input2, options) {
|
|
351953
|
+
validateTarget2(input2.target, "customXml.parts.remove");
|
|
351954
|
+
return adapter.remove(input2, normalizeMutationOptions2(options));
|
|
351955
|
+
}
|
|
351956
|
+
var init_customXml = __esm(() => {
|
|
351957
|
+
init_errors5();
|
|
351958
|
+
});
|
|
351959
|
+
|
|
350861
351960
|
// ../../packages/document-api/src/protection/protection.ts
|
|
350862
351961
|
function validateSetEditingRestrictionInput2(input2) {
|
|
350863
351962
|
if (!input2 || typeof input2 !== "object") {
|
|
@@ -352589,6 +353688,25 @@ function createDocumentApi2(adapters) {
|
|
|
352589
353688
|
return executePermissionRangesUpdatePrincipal2(adapters.permissionRanges, input2, options);
|
|
352590
353689
|
}
|
|
352591
353690
|
},
|
|
353691
|
+
customXml: {
|
|
353692
|
+
parts: {
|
|
353693
|
+
list(input2) {
|
|
353694
|
+
return executeCustomXmlPartsList2(requireAdapter2(adapters.customXml, "customXml").parts, input2);
|
|
353695
|
+
},
|
|
353696
|
+
get(input2) {
|
|
353697
|
+
return executeCustomXmlPartsGet2(requireAdapter2(adapters.customXml, "customXml").parts, input2);
|
|
353698
|
+
},
|
|
353699
|
+
create(input2, options) {
|
|
353700
|
+
return executeCustomXmlPartsCreate2(requireAdapter2(adapters.customXml, "customXml").parts, input2, options);
|
|
353701
|
+
},
|
|
353702
|
+
patch(input2, options) {
|
|
353703
|
+
return executeCustomXmlPartsPatch2(requireAdapter2(adapters.customXml, "customXml").parts, input2, options);
|
|
353704
|
+
},
|
|
353705
|
+
remove(input2, options) {
|
|
353706
|
+
return executeCustomXmlPartsRemove2(requireAdapter2(adapters.customXml, "customXml").parts, input2, options);
|
|
353707
|
+
}
|
|
353708
|
+
}
|
|
353709
|
+
},
|
|
352592
353710
|
invoke(request) {
|
|
352593
353711
|
if (!Object.prototype.hasOwnProperty.call(dispatch, request.operationId)) {
|
|
352594
353712
|
throw new Error(`Unknown operationId: "${request.operationId}"`);
|
|
@@ -352635,6 +353753,7 @@ var init_src = __esm(() => {
|
|
|
352635
353753
|
init_hyperlinks();
|
|
352636
353754
|
init_content_controls();
|
|
352637
353755
|
init_bookmarks();
|
|
353756
|
+
init_customXml();
|
|
352638
353757
|
init_protection();
|
|
352639
353758
|
init_permission_ranges();
|
|
352640
353759
|
init_footnotes();
|
|
@@ -368632,7 +369751,7 @@ var init_part_registry = __esm(() => {
|
|
|
368632
369751
|
});
|
|
368633
369752
|
|
|
368634
369753
|
// ../../packages/super-editor/src/editors/v1/core/parts/store/part-store.ts
|
|
368635
|
-
function
|
|
369754
|
+
function getConvertedXml3(editor) {
|
|
368636
369755
|
const converter = editor.converter;
|
|
368637
369756
|
if (!converter?.convertedXml) {
|
|
368638
369757
|
throw new Error("PartStore: editor.converter.convertedXml is not available.");
|
|
@@ -368640,19 +369759,19 @@ function getConvertedXml2(editor) {
|
|
|
368640
369759
|
return converter.convertedXml;
|
|
368641
369760
|
}
|
|
368642
369761
|
function getPart2(editor, partId) {
|
|
368643
|
-
const store =
|
|
369762
|
+
const store = getConvertedXml3(editor);
|
|
368644
369763
|
return store[partId];
|
|
368645
369764
|
}
|
|
368646
369765
|
function hasPart2(editor, partId) {
|
|
368647
|
-
const store =
|
|
369766
|
+
const store = getConvertedXml3(editor);
|
|
368648
369767
|
return partId in store && store[partId] !== undefined;
|
|
368649
369768
|
}
|
|
368650
369769
|
function setPart2(editor, partId, data) {
|
|
368651
|
-
const store =
|
|
369770
|
+
const store = getConvertedXml3(editor);
|
|
368652
369771
|
store[partId] = data;
|
|
368653
369772
|
}
|
|
368654
369773
|
function removePart2(editor, partId) {
|
|
368655
|
-
const store =
|
|
369774
|
+
const store = getConvertedXml3(editor);
|
|
368656
369775
|
delete store[partId];
|
|
368657
369776
|
}
|
|
368658
369777
|
function clonePart2(part) {
|
|
@@ -394318,45 +395437,68 @@ var init_generate_paragraph_properties = __esm(() => {
|
|
|
394318
395437
|
});
|
|
394319
395438
|
|
|
394320
395439
|
// ../../packages/super-editor/src/editors/v1/core/super-converter/v3/handlers/w/p/helpers/translate-paragraph-node.js
|
|
395440
|
+
function foldLeadingCommentStartsIntoTrackedChanges2(elements) {
|
|
395441
|
+
const result = [];
|
|
395442
|
+
let i5 = 0;
|
|
395443
|
+
while (i5 < elements.length) {
|
|
395444
|
+
if (elements[i5]?.name !== "w:commentRangeStart") {
|
|
395445
|
+
result.push(elements[i5]);
|
|
395446
|
+
i5++;
|
|
395447
|
+
continue;
|
|
395448
|
+
}
|
|
395449
|
+
const leadingStarts = [];
|
|
395450
|
+
while (i5 < elements.length && elements[i5]?.name === "w:commentRangeStart") {
|
|
395451
|
+
leadingStarts.push(elements[i5]);
|
|
395452
|
+
i5++;
|
|
395453
|
+
}
|
|
395454
|
+
const next2 = elements[i5];
|
|
395455
|
+
if (isTrackedChangeWrapper2(next2)) {
|
|
395456
|
+
result.push({ ...next2, elements: [...leadingStarts, ...next2.elements || []] });
|
|
395457
|
+
i5++;
|
|
395458
|
+
} else {
|
|
395459
|
+
result.push(...leadingStarts);
|
|
395460
|
+
}
|
|
395461
|
+
}
|
|
395462
|
+
return result;
|
|
395463
|
+
}
|
|
394321
395464
|
function mergeConsecutiveTrackedChanges2(elements) {
|
|
394322
395465
|
if (!Array.isArray(elements) || elements.length === 0)
|
|
394323
395466
|
return elements;
|
|
395467
|
+
elements = foldLeadingCommentStartsIntoTrackedChanges2(elements);
|
|
394324
395468
|
const result = [];
|
|
394325
395469
|
let i5 = 0;
|
|
394326
395470
|
while (i5 < elements.length) {
|
|
394327
395471
|
const current = elements[i5];
|
|
394328
|
-
if (current
|
|
395472
|
+
if (isTrackedChangeWrapper2(current)) {
|
|
394329
395473
|
const tcId = current.attributes?.["w:id"];
|
|
394330
395474
|
const tcName = current.name;
|
|
394331
395475
|
const mergedElements = [...current.elements || []];
|
|
395476
|
+
const pendingComments = [];
|
|
395477
|
+
let didMerge = false;
|
|
394332
395478
|
let j = i5 + 1;
|
|
394333
395479
|
while (j < elements.length) {
|
|
394334
395480
|
const next2 = elements[j];
|
|
394335
|
-
if (next2
|
|
394336
|
-
|
|
395481
|
+
if (isCommentMarker2(next2)) {
|
|
395482
|
+
pendingComments.push(next2);
|
|
394337
395483
|
j++;
|
|
394338
395484
|
continue;
|
|
394339
395485
|
}
|
|
394340
|
-
if (next2?.name === "w:r") {
|
|
394341
|
-
const hasOnlyCommentRef = next2.elements?.length === 1 && next2.elements[0]?.name === "w:commentReference";
|
|
394342
|
-
if (hasOnlyCommentRef) {
|
|
394343
|
-
mergedElements.push(next2);
|
|
394344
|
-
j++;
|
|
394345
|
-
continue;
|
|
394346
|
-
}
|
|
394347
|
-
}
|
|
394348
395486
|
if (next2?.name === tcName && next2.attributes?.["w:id"] === tcId) {
|
|
394349
|
-
mergedElements.push(...next2.elements || []);
|
|
395487
|
+
mergedElements.push(...pendingComments, ...next2.elements || []);
|
|
395488
|
+
pendingComments.length = 0;
|
|
395489
|
+
didMerge = true;
|
|
394350
395490
|
j++;
|
|
394351
395491
|
continue;
|
|
394352
395492
|
}
|
|
394353
395493
|
break;
|
|
394354
395494
|
}
|
|
394355
|
-
|
|
394356
|
-
name: tcName,
|
|
394357
|
-
|
|
394358
|
-
|
|
394359
|
-
|
|
395495
|
+
if (didMerge) {
|
|
395496
|
+
result.push({ name: tcName, attributes: { ...current.attributes }, elements: mergedElements });
|
|
395497
|
+
result.push(...pendingComments);
|
|
395498
|
+
} else {
|
|
395499
|
+
result.push(current);
|
|
395500
|
+
result.push(...pendingComments);
|
|
395501
|
+
}
|
|
394360
395502
|
i5 = j;
|
|
394361
395503
|
} else {
|
|
394362
395504
|
result.push(current);
|
|
@@ -394393,6 +395535,15 @@ function translateParagraphNode2(params3) {
|
|
|
394393
395535
|
};
|
|
394394
395536
|
return result;
|
|
394395
395537
|
}
|
|
395538
|
+
var isTrackedChangeWrapper2 = (el) => el?.name === "w:ins" || el?.name === "w:del", isCommentMarker2 = (el) => {
|
|
395539
|
+
if (!el)
|
|
395540
|
+
return false;
|
|
395541
|
+
if (el.name === "w:commentRangeStart" || el.name === "w:commentRangeEnd")
|
|
395542
|
+
return true;
|
|
395543
|
+
if (el.name === "w:r" && el.elements?.length === 1 && el.elements[0]?.name === "w:commentReference")
|
|
395544
|
+
return true;
|
|
395545
|
+
return false;
|
|
395546
|
+
};
|
|
394396
395547
|
var init_translate_paragraph_node = __esm(() => {
|
|
394397
395548
|
init_helpers2();
|
|
394398
395549
|
init_generate_paragraph_properties();
|
|
@@ -397090,7 +398241,7 @@ var init_sdt_node_type_strategy = __esm(() => {
|
|
|
397090
398241
|
});
|
|
397091
398242
|
|
|
397092
398243
|
// ../../packages/super-editor/src/editors/v1/core/super-converter/v3/handlers/wp/helpers/drawingml-utils.js
|
|
397093
|
-
var
|
|
398244
|
+
var getLocalName3 = (name) => {
|
|
397094
398245
|
if (typeof name !== "string")
|
|
397095
398246
|
return "";
|
|
397096
398247
|
const parts = name.split(":");
|
|
@@ -397098,7 +398249,7 @@ var getLocalName2 = (name) => {
|
|
|
397098
398249
|
}, hasLocalName2 = (node4, localName) => {
|
|
397099
398250
|
if (!node4 || typeof node4 !== "object")
|
|
397100
398251
|
return false;
|
|
397101
|
-
return
|
|
398252
|
+
return getLocalName3(node4.name) === localName;
|
|
397102
398253
|
}, findChildByLocalName2 = (elements, localName) => {
|
|
397103
398254
|
if (!Array.isArray(elements))
|
|
397104
398255
|
return;
|
|
@@ -397481,7 +398632,7 @@ function convertDrawingMLPathToSvg2(pathEl) {
|
|
|
397481
398632
|
return "";
|
|
397482
398633
|
const parts = [];
|
|
397483
398634
|
for (const cmd of pathEl.elements) {
|
|
397484
|
-
switch (
|
|
398635
|
+
switch (getLocalName3(cmd.name)) {
|
|
397485
398636
|
case "moveTo": {
|
|
397486
398637
|
const pt = findChildByLocalName2(cmd.elements, "pt");
|
|
397487
398638
|
if (pt) {
|
|
@@ -423150,8 +424301,8 @@ var detectDocumentOrigin2 = (docx) => {
|
|
|
423150
424301
|
const trackedChangeIdMapOptions = {
|
|
423151
424302
|
replacements: converter.trackedChangesOptions?.replacements ?? "paired"
|
|
423152
424303
|
};
|
|
423153
|
-
converter.trackedChangeIdMap = buildTrackedChangeIdMap2(docx, trackedChangeIdMapOptions);
|
|
423154
424304
|
converter.trackedChangeIdMapsByPart = buildTrackedChangeIdMapsByPart2(docx, trackedChangeIdMapOptions);
|
|
424305
|
+
converter.trackedChangeIdMap = converter.trackedChangeIdMapsByPart.get("word/document.xml") ?? buildTrackedChangeIdMap2(docx, trackedChangeIdMapOptions);
|
|
423155
424306
|
const comments = importCommentData2({ docx, nodeListHandler, converter, editor });
|
|
423156
424307
|
const footnotes = importFootnoteData2({ docx, nodeListHandler, converter, editor, numbering });
|
|
423157
424308
|
const endnotes = importEndnoteData2({ docx, nodeListHandler, converter, editor, numbering });
|
|
@@ -426687,7 +427838,7 @@ var init_refresh_stat_fields = __esm(() => {
|
|
|
426687
427838
|
});
|
|
426688
427839
|
|
|
426689
427840
|
// ../../packages/super-editor/src/editors/v1/core/super-converter/citation-sources.js
|
|
426690
|
-
function
|
|
427841
|
+
function getLocalName4(name) {
|
|
426691
427842
|
if (!name || typeof name !== "string")
|
|
426692
427843
|
return "";
|
|
426693
427844
|
const separatorIndex = name.indexOf(":");
|
|
@@ -426706,7 +427857,7 @@ function createTextElement3(name, text7) {
|
|
|
426706
427857
|
elements: [{ type: "text", text: String(text7) }]
|
|
426707
427858
|
};
|
|
426708
427859
|
}
|
|
426709
|
-
function
|
|
427860
|
+
function createXmlDocument3(rootElement, declaration) {
|
|
426710
427861
|
const nextDeclaration = declaration ?? DEFAULT_XML_DECLARATION2;
|
|
426711
427862
|
return {
|
|
426712
427863
|
declaration: {
|
|
@@ -426724,7 +427875,7 @@ function collectPersonNodes2(node4, output) {
|
|
|
426724
427875
|
for (const child of node4.elements) {
|
|
426725
427876
|
if (!child || child.type !== "element")
|
|
426726
427877
|
continue;
|
|
426727
|
-
if (
|
|
427878
|
+
if (getLocalName4(child.name) === "Person") {
|
|
426728
427879
|
output.push(child);
|
|
426729
427880
|
continue;
|
|
426730
427881
|
}
|
|
@@ -426736,7 +427887,7 @@ function parsePersonNode2(personNode) {
|
|
|
426736
427887
|
for (const child of personNode?.elements ?? []) {
|
|
426737
427888
|
if (!child || child.type !== "element")
|
|
426738
427889
|
continue;
|
|
426739
|
-
const localName =
|
|
427890
|
+
const localName = getLocalName4(child.name);
|
|
426740
427891
|
const value = readTextNode2(child);
|
|
426741
427892
|
if (!value)
|
|
426742
427893
|
continue;
|
|
@@ -426750,7 +427901,7 @@ function parsePersonNode2(personNode) {
|
|
|
426750
427901
|
return typeof person.last === "string" && person.last.length > 0 ? person : null;
|
|
426751
427902
|
}
|
|
426752
427903
|
function parseContributorPeople2(sourceElement, contributorTag) {
|
|
426753
|
-
const contributorNode = (sourceElement?.elements ?? []).find((child) => child?.type === "element" &&
|
|
427904
|
+
const contributorNode = (sourceElement?.elements ?? []).find((child) => child?.type === "element" && getLocalName4(child.name) === contributorTag);
|
|
426754
427905
|
if (!contributorNode)
|
|
426755
427906
|
return [];
|
|
426756
427907
|
const peopleNodes = [];
|
|
@@ -426863,7 +428014,7 @@ function parseSourceNode2(sourceNode) {
|
|
|
426863
428014
|
for (const child of sourceNode?.elements ?? []) {
|
|
426864
428015
|
if (!child || child.type !== "element")
|
|
426865
428016
|
continue;
|
|
426866
|
-
const localName =
|
|
428017
|
+
const localName = getLocalName4(child.name);
|
|
426867
428018
|
if (localName === "Tag") {
|
|
426868
428019
|
tag = readTextNode2(child);
|
|
426869
428020
|
continue;
|
|
@@ -426922,7 +428073,7 @@ function buildSourceNode2(sourceRecord) {
|
|
|
426922
428073
|
function isBibliographySourcesRoot2(rootNode) {
|
|
426923
428074
|
if (!rootNode || rootNode.type !== "element")
|
|
426924
428075
|
return false;
|
|
426925
|
-
if (
|
|
428076
|
+
if (getLocalName4(rootNode.name) !== "Sources")
|
|
426926
428077
|
return false;
|
|
426927
428078
|
const rootNamespace = rootNode.attributes?.xmlns;
|
|
426928
428079
|
const prefixedNamespace = rootNode.attributes?.["xmlns:b"];
|
|
@@ -426939,11 +428090,11 @@ function getExistingDocumentRelationshipsRoot2(convertedXml) {
|
|
|
426939
428090
|
const relsData = convertedXml?.["word/_rels/document.xml.rels"];
|
|
426940
428091
|
if (!relsData?.elements?.length)
|
|
426941
428092
|
return null;
|
|
426942
|
-
return relsData.elements.find((element3) =>
|
|
428093
|
+
return relsData.elements.find((element3) => getLocalName4(element3.name) === "Relationships") || null;
|
|
426943
428094
|
}
|
|
426944
|
-
function
|
|
428095
|
+
function ensureDocumentRelationshipsRoot3(convertedXml) {
|
|
426945
428096
|
if (!convertedXml["word/_rels/document.xml.rels"]) {
|
|
426946
|
-
convertedXml["word/_rels/document.xml.rels"] =
|
|
428097
|
+
convertedXml["word/_rels/document.xml.rels"] = createXmlDocument3({
|
|
426947
428098
|
type: "element",
|
|
426948
428099
|
name: "Relationships",
|
|
426949
428100
|
attributes: {
|
|
@@ -426954,7 +428105,7 @@ function ensureDocumentRelationshipsRoot2(convertedXml) {
|
|
|
426954
428105
|
}
|
|
426955
428106
|
const relsData = convertedXml["word/_rels/document.xml.rels"];
|
|
426956
428107
|
relsData.elements ??= [];
|
|
426957
|
-
let relationshipsRoot = relsData.elements.find((element3) =>
|
|
428108
|
+
let relationshipsRoot = relsData.elements.find((element3) => getLocalName4(element3.name) === "Relationships");
|
|
426958
428109
|
if (!relationshipsRoot) {
|
|
426959
428110
|
relationshipsRoot = {
|
|
426960
428111
|
type: "element",
|
|
@@ -426969,7 +428120,7 @@ function ensureDocumentRelationshipsRoot2(convertedXml) {
|
|
|
426969
428120
|
relationshipsRoot.elements ??= [];
|
|
426970
428121
|
return relationshipsRoot;
|
|
426971
428122
|
}
|
|
426972
|
-
function
|
|
428123
|
+
function getNextRelationshipId3(relationshipsRoot) {
|
|
426973
428124
|
const existingNumericIds = (relationshipsRoot?.elements ?? []).map((relationship) => {
|
|
426974
428125
|
const id2 = relationship?.attributes?.Id;
|
|
426975
428126
|
if (typeof id2 !== "string")
|
|
@@ -427056,7 +428207,7 @@ function buildCustomXmlItemRelationshipsRoot2(itemPropsFileName) {
|
|
|
427056
428207
|
name: "Relationship",
|
|
427057
428208
|
attributes: {
|
|
427058
428209
|
Id: "rId1",
|
|
427059
|
-
Type:
|
|
428210
|
+
Type: CUSTOM_XML_PROPS_RELATIONSHIP_TYPE3,
|
|
427060
428211
|
Target: itemPropsFileName
|
|
427061
428212
|
}
|
|
427062
428213
|
}
|
|
@@ -427116,7 +428267,7 @@ function loadBibliographyPartFromPackage2(convertedXml) {
|
|
|
427116
428267
|
}
|
|
427117
428268
|
}
|
|
427118
428269
|
for (const child of rootElement.elements ?? []) {
|
|
427119
|
-
if (!child || child.type !== "element" ||
|
|
428270
|
+
if (!child || child.type !== "element" || getLocalName4(child.name) !== "Source")
|
|
427120
428271
|
continue;
|
|
427121
428272
|
const source = parseSourceNode2(child);
|
|
427122
428273
|
if (source)
|
|
@@ -427147,8 +428298,8 @@ function syncBibliographyPartToPackage2(convertedXml, bibliographyPart) {
|
|
|
427147
428298
|
const version4 = bibliographyPart?.version ?? currentPackageState.version ?? DEFAULT_VERSION2;
|
|
427148
428299
|
const existingPartDeclaration = convertedXml[partPath]?.declaration;
|
|
427149
428300
|
const sourcesRoot = buildSourcesRootElement2(normalizedSources, { selectedStyle, styleName, version: version4 });
|
|
427150
|
-
convertedXml[partPath] =
|
|
427151
|
-
const relationshipsRoot =
|
|
428301
|
+
convertedXml[partPath] = createXmlDocument3(sourcesRoot, existingPartDeclaration);
|
|
428302
|
+
const relationshipsRoot = ensureDocumentRelationshipsRoot3(convertedXml);
|
|
427152
428303
|
const expectedTarget = buildDocumentRelationshipTarget2(partPath);
|
|
427153
428304
|
const hasCustomXmlRelationship = relationshipsRoot.elements.some((relationship) => {
|
|
427154
428305
|
if (relationship?.attributes?.Type !== CUSTOM_XML_RELATIONSHIP_TYPE2)
|
|
@@ -427161,7 +428312,7 @@ function syncBibliographyPartToPackage2(convertedXml, bibliographyPart) {
|
|
|
427161
428312
|
type: "element",
|
|
427162
428313
|
name: "Relationship",
|
|
427163
428314
|
attributes: {
|
|
427164
|
-
Id:
|
|
428315
|
+
Id: getNextRelationshipId3(relationshipsRoot),
|
|
427165
428316
|
Type: CUSTOM_XML_RELATIONSHIP_TYPE2,
|
|
427166
428317
|
Target: expectedTarget
|
|
427167
428318
|
}
|
|
@@ -427170,9 +428321,9 @@ function syncBibliographyPartToPackage2(convertedXml, bibliographyPart) {
|
|
|
427170
428321
|
const existingItemProps = convertedXml[itemPropsPath];
|
|
427171
428322
|
const existingItemPropsDeclaration = existingItemProps?.declaration;
|
|
427172
428323
|
const dataStoreItemId = extractExistingDataStoreItemId2(existingItemProps) || `{${v42().toUpperCase()}}`;
|
|
427173
|
-
convertedXml[itemPropsPath] =
|
|
428324
|
+
convertedXml[itemPropsPath] = createXmlDocument3(buildItemPropsRootElement2(dataStoreItemId), existingItemPropsDeclaration);
|
|
427174
428325
|
const existingItemRelsDeclaration = convertedXml[itemRelsPath]?.declaration;
|
|
427175
|
-
convertedXml[itemRelsPath] =
|
|
428326
|
+
convertedXml[itemRelsPath] = createXmlDocument3(buildCustomXmlItemRelationshipsRoot2(`itemProps${itemIndex}.xml`), existingItemRelsDeclaration);
|
|
427176
428327
|
return {
|
|
427177
428328
|
sources: normalizedSources,
|
|
427178
428329
|
partPath,
|
|
@@ -427187,7 +428338,7 @@ function getBibliographyPartExportPaths2(bibliographyPart) {
|
|
|
427187
428338
|
const paths = [bibliographyPart?.partPath, bibliographyPart?.itemPropsPath, bibliographyPart?.itemRelsPath];
|
|
427188
428339
|
return paths.filter((path3) => typeof path3 === "string" && path3.length > 0);
|
|
427189
428340
|
}
|
|
427190
|
-
var BIBLIOGRAPHY_NAMESPACE_URI2 = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",
|
|
428341
|
+
var BIBLIOGRAPHY_NAMESPACE_URI2 = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE2 = "/APA.XSL", DEFAULT_STYLE_NAME2 = "APA", DEFAULT_VERSION2 = "6", API_TO_OOXML_SOURCE_TYPE2, OOXML_TO_API_SOURCE_TYPE2, SIMPLE_FIELD_TO_XML_TAG2, XML_TAG_TO_SIMPLE_FIELD2;
|
|
427191
428342
|
var init_citation_sources = __esm(() => {
|
|
427192
428343
|
init_wrapper();
|
|
427193
428344
|
init_helpers();
|
|
@@ -444858,13 +446009,13 @@ function previewPlan2(editor, input2) {
|
|
|
444858
446009
|
}
|
|
444859
446010
|
stepPreviews.push(preview);
|
|
444860
446011
|
}
|
|
444861
|
-
for (const
|
|
446012
|
+
for (const failure2 of assertFailures) {
|
|
444862
446013
|
failures.push({
|
|
444863
446014
|
code: "PRECONDITION_FAILED",
|
|
444864
|
-
stepId:
|
|
446015
|
+
stepId: failure2.stepId,
|
|
444865
446016
|
phase: "assert",
|
|
444866
|
-
message: `assert "${
|
|
444867
|
-
details: { expectedCount:
|
|
446017
|
+
message: `assert "${failure2.stepId}" expected ${failure2.expectedCount} matches but found ${failure2.actualCount}`,
|
|
446018
|
+
details: { expectedCount: failure2.expectedCount, actualCount: failure2.actualCount }
|
|
444868
446019
|
});
|
|
444869
446020
|
}
|
|
444870
446021
|
} catch (error48) {
|
|
@@ -460578,12 +461729,621 @@ var init_bookmark_wrappers = __esm(() => {
|
|
|
460578
461729
|
init_story_key();
|
|
460579
461730
|
});
|
|
460580
461731
|
|
|
460581
|
-
// ../../packages/super-editor/src/editors/v1/document-api-adapters/
|
|
461732
|
+
// ../../packages/super-editor/src/editors/v1/document-api-adapters/out-of-band-mutation.ts
|
|
461733
|
+
function executeOutOfBandMutation2(editor, mutateFn, options) {
|
|
461734
|
+
if (!options.dryRun) {
|
|
461735
|
+
if (editor.options?.collaborationProvider && editor.options?.ydoc) {
|
|
461736
|
+
try {
|
|
461737
|
+
yUndoPluginKey2.getState(editor.state)?.undoManager?.stopCapturing();
|
|
461738
|
+
} catch {}
|
|
461739
|
+
} else {
|
|
461740
|
+
try {
|
|
461741
|
+
editor.view?.dispatch?.(closeHistory2(editor.state.tr));
|
|
461742
|
+
} catch {}
|
|
461743
|
+
}
|
|
461744
|
+
}
|
|
461745
|
+
checkRevision2(editor, options.expectedRevision);
|
|
461746
|
+
const result = mutateFn(options.dryRun);
|
|
461747
|
+
if (result.changed && !options.dryRun) {
|
|
461748
|
+
const converter = editor.converter;
|
|
461749
|
+
if (converter) {
|
|
461750
|
+
converter.documentModified = true;
|
|
461751
|
+
if (!converter.documentGuid && typeof converter.promoteToGuid === "function") {
|
|
461752
|
+
converter.promoteToGuid();
|
|
461753
|
+
}
|
|
461754
|
+
}
|
|
461755
|
+
incrementRevision2(editor);
|
|
461756
|
+
}
|
|
461757
|
+
return result.payload;
|
|
461758
|
+
}
|
|
461759
|
+
var init_out_of_band_mutation = __esm(() => {
|
|
461760
|
+
init_dist6();
|
|
461761
|
+
init_y_prosemirror();
|
|
461762
|
+
init_revision_tracker();
|
|
461763
|
+
});
|
|
461764
|
+
|
|
461765
|
+
// ../../packages/super-editor/src/editors/v1/core/super-converter/custom-xml-parts.js
|
|
461766
|
+
function getLocalName5(name) {
|
|
461767
|
+
if (!name || typeof name !== "string")
|
|
461768
|
+
return "";
|
|
461769
|
+
const i5 = name.indexOf(":");
|
|
461770
|
+
return i5 >= 0 ? name.slice(i5 + 1) : name;
|
|
461771
|
+
}
|
|
461772
|
+
function findFirstElement2(parent, localName) {
|
|
461773
|
+
if (!parent?.elements?.length)
|
|
461774
|
+
return null;
|
|
461775
|
+
return parent.elements.find((el) => el?.type === "element" && getLocalName5(el.name) === localName) ?? null;
|
|
461776
|
+
}
|
|
461777
|
+
function findAllElements2(parent, localName) {
|
|
461778
|
+
if (!parent?.elements?.length)
|
|
461779
|
+
return [];
|
|
461780
|
+
return parent.elements.filter((el) => el?.type === "element" && getLocalName5(el.name) === localName);
|
|
461781
|
+
}
|
|
461782
|
+
function partNameFromIndex2(index3) {
|
|
461783
|
+
return `customXml/item${index3}.xml`;
|
|
461784
|
+
}
|
|
461785
|
+
function propsPartNameFromIndex2(index3) {
|
|
461786
|
+
return `customXml/itemProps${index3}.xml`;
|
|
461787
|
+
}
|
|
461788
|
+
function indexFromPartName2(partName) {
|
|
461789
|
+
const m2 = /^customXml\/item(\d+)\.xml$/i.exec(partName ?? "");
|
|
461790
|
+
return m2 ? Number.parseInt(m2[1], 10) : null;
|
|
461791
|
+
}
|
|
461792
|
+
function indexFromPropsPartName2(propsPartName) {
|
|
461793
|
+
const m2 = /^customXml\/itemProps(\d+)\.xml$/i.exec(propsPartName ?? "");
|
|
461794
|
+
return m2 ? Number.parseInt(m2[1], 10) : null;
|
|
461795
|
+
}
|
|
461796
|
+
function isCustomXmlStoragePartName2(partName) {
|
|
461797
|
+
return indexFromPartName2(partName) != null;
|
|
461798
|
+
}
|
|
461799
|
+
function listCustomXmlStoragePartNames2(convertedXml) {
|
|
461800
|
+
if (!convertedXml || typeof convertedXml !== "object")
|
|
461801
|
+
return [];
|
|
461802
|
+
const indexes = [];
|
|
461803
|
+
for (const path3 of Object.keys(convertedXml)) {
|
|
461804
|
+
const idx = indexFromPartName2(path3);
|
|
461805
|
+
if (idx != null)
|
|
461806
|
+
indexes.push(idx);
|
|
461807
|
+
}
|
|
461808
|
+
indexes.sort((a2, b2) => a2 - b2);
|
|
461809
|
+
return indexes.map(partNameFromIndex2);
|
|
461810
|
+
}
|
|
461811
|
+
function findPropsPartFor2(convertedXml, partName) {
|
|
461812
|
+
if (!convertedXml)
|
|
461813
|
+
return null;
|
|
461814
|
+
const idx = indexFromPartName2(partName);
|
|
461815
|
+
if (idx == null)
|
|
461816
|
+
return null;
|
|
461817
|
+
const relsPath = `customXml/_rels/item${idx}.xml.rels`;
|
|
461818
|
+
const relsDoc = convertedXml[relsPath];
|
|
461819
|
+
const relsRoot = relsDoc?.elements?.find((el) => getLocalName5(el?.name) === "Relationships");
|
|
461820
|
+
if (relsRoot?.elements?.length) {
|
|
461821
|
+
for (const rel of relsRoot.elements) {
|
|
461822
|
+
if (rel?.attributes?.Type !== CUSTOM_XML_PROPS_RELATIONSHIP_TYPE4)
|
|
461823
|
+
continue;
|
|
461824
|
+
const target = rel?.attributes?.Target;
|
|
461825
|
+
if (typeof target !== "string" || target.length === 0)
|
|
461826
|
+
continue;
|
|
461827
|
+
const candidate = resolveOpcTargetPath2(target, "customXml");
|
|
461828
|
+
if (candidate && convertedXml[candidate])
|
|
461829
|
+
return candidate;
|
|
461830
|
+
}
|
|
461831
|
+
}
|
|
461832
|
+
const indexCandidate = propsPartNameFromIndex2(idx);
|
|
461833
|
+
return convertedXml[indexCandidate] ? indexCandidate : null;
|
|
461834
|
+
}
|
|
461835
|
+
function parsePropsPart2(propsDoc) {
|
|
461836
|
+
const root4 = propsDoc?.elements?.find((el) => el?.type === "element" && getLocalName5(el.name) === "datastoreItem");
|
|
461837
|
+
if (!root4)
|
|
461838
|
+
return null;
|
|
461839
|
+
const itemId = root4.attributes?.["ds:itemID"] ?? root4.attributes?.itemID ?? null;
|
|
461840
|
+
const schemaRefsEl = findFirstElement2(root4, "schemaRefs");
|
|
461841
|
+
const schemaRefs = findAllElements2(schemaRefsEl, "schemaRef").map((el) => el.attributes?.["ds:uri"] ?? el.attributes?.uri ?? null).filter((uri) => typeof uri === "string" && uri.length > 0);
|
|
461842
|
+
return { itemId: typeof itemId === "string" && itemId.length > 0 ? itemId : null, schemaRefs };
|
|
461843
|
+
}
|
|
461844
|
+
function parseStoragePartRootNamespace2(storageDoc) {
|
|
461845
|
+
const root4 = storageDoc?.elements?.find((el) => el?.type === "element");
|
|
461846
|
+
if (!root4)
|
|
461847
|
+
return null;
|
|
461848
|
+
const xmlns2 = root4.attributes?.xmlns;
|
|
461849
|
+
if (typeof xmlns2 === "string" && xmlns2.length > 0)
|
|
461850
|
+
return xmlns2;
|
|
461851
|
+
const elementName = root4.name ?? "";
|
|
461852
|
+
const colonIdx = elementName.indexOf(":");
|
|
461853
|
+
if (colonIdx > 0) {
|
|
461854
|
+
const prefix2 = elementName.slice(0, colonIdx);
|
|
461855
|
+
const prefixedAttr = `xmlns:${prefix2}`;
|
|
461856
|
+
const prefixedValue = root4.attributes?.[prefixedAttr];
|
|
461857
|
+
if (typeof prefixedValue === "string" && prefixedValue.length > 0)
|
|
461858
|
+
return prefixedValue;
|
|
461859
|
+
}
|
|
461860
|
+
return null;
|
|
461861
|
+
}
|
|
461862
|
+
function serializeXmlDoc2(xmlDoc) {
|
|
461863
|
+
if (!xmlDoc)
|
|
461864
|
+
return "";
|
|
461865
|
+
return xmljs3.js2xml(xmlDoc, { compact: false, spaces: 0 });
|
|
461866
|
+
}
|
|
461867
|
+
function readCustomXmlPart2(convertedXml, target) {
|
|
461868
|
+
if (!target || !convertedXml)
|
|
461869
|
+
return null;
|
|
461870
|
+
let partName = null;
|
|
461871
|
+
let itemId = null;
|
|
461872
|
+
if (typeof target.partName === "string" && target.partName.length > 0) {
|
|
461873
|
+
if (!isCustomXmlStoragePartName2(target.partName))
|
|
461874
|
+
return null;
|
|
461875
|
+
partName = target.partName;
|
|
461876
|
+
} else if (typeof target.id === "string" && target.id.length > 0) {
|
|
461877
|
+
itemId = target.id;
|
|
461878
|
+
for (const candidatePartName of listCustomXmlStoragePartNames2(convertedXml)) {
|
|
461879
|
+
const propsName = findPropsPartFor2(convertedXml, candidatePartName);
|
|
461880
|
+
if (!propsName)
|
|
461881
|
+
continue;
|
|
461882
|
+
const parsed = parsePropsPart2(convertedXml[propsName]);
|
|
461883
|
+
if (parsed?.itemId === itemId) {
|
|
461884
|
+
partName = candidatePartName;
|
|
461885
|
+
break;
|
|
461886
|
+
}
|
|
461887
|
+
}
|
|
461888
|
+
if (!partName)
|
|
461889
|
+
return null;
|
|
461890
|
+
} else {
|
|
461891
|
+
return null;
|
|
461892
|
+
}
|
|
461893
|
+
const storageDoc = convertedXml[partName];
|
|
461894
|
+
if (!storageDoc)
|
|
461895
|
+
return null;
|
|
461896
|
+
const propsPartName = findPropsPartFor2(convertedXml, partName);
|
|
461897
|
+
const props = propsPartName ? parsePropsPart2(convertedXml[propsPartName]) : null;
|
|
461898
|
+
return {
|
|
461899
|
+
id: props?.itemId ?? null,
|
|
461900
|
+
partName,
|
|
461901
|
+
propsPartName: propsPartName ?? null,
|
|
461902
|
+
rootNamespace: parseStoragePartRootNamespace2(storageDoc),
|
|
461903
|
+
schemaRefs: props?.schemaRefs ?? [],
|
|
461904
|
+
content: serializeXmlDoc2(storageDoc)
|
|
461905
|
+
};
|
|
461906
|
+
}
|
|
461907
|
+
function listCustomXmlParts2(convertedXml) {
|
|
461908
|
+
return listCustomXmlStoragePartNames2(convertedXml).map((partName) => {
|
|
461909
|
+
const propsPartName = findPropsPartFor2(convertedXml, partName);
|
|
461910
|
+
const props = propsPartName ? parsePropsPart2(convertedXml[propsPartName]) : null;
|
|
461911
|
+
return {
|
|
461912
|
+
id: props?.itemId ?? null,
|
|
461913
|
+
partName,
|
|
461914
|
+
propsPartName: propsPartName ?? null,
|
|
461915
|
+
rootNamespace: parseStoragePartRootNamespace2(convertedXml[partName]),
|
|
461916
|
+
schemaRefs: props?.schemaRefs ?? []
|
|
461917
|
+
};
|
|
461918
|
+
});
|
|
461919
|
+
}
|
|
461920
|
+
function nextCustomXmlItemIndex2(convertedXml, converter) {
|
|
461921
|
+
const used = new Set;
|
|
461922
|
+
for (const path3 of Object.keys(convertedXml ?? {})) {
|
|
461923
|
+
const idx = indexFromPartName2(path3) ?? indexFromPropsPartName2(path3);
|
|
461924
|
+
if (idx != null)
|
|
461925
|
+
used.add(idx);
|
|
461926
|
+
}
|
|
461927
|
+
let candidate = 1;
|
|
461928
|
+
while (used.has(candidate))
|
|
461929
|
+
candidate += 1;
|
|
461930
|
+
return candidate;
|
|
461931
|
+
}
|
|
461932
|
+
function createXmlDocument4(rootElement, declaration) {
|
|
461933
|
+
const nextDeclaration = declaration ?? DEFAULT_XML_DECLARATION2;
|
|
461934
|
+
return {
|
|
461935
|
+
declaration: {
|
|
461936
|
+
...nextDeclaration,
|
|
461937
|
+
attributes: { ...nextDeclaration.attributes }
|
|
461938
|
+
},
|
|
461939
|
+
elements: [rootElement]
|
|
461940
|
+
};
|
|
461941
|
+
}
|
|
461942
|
+
function parseContentToRootElement2(content5) {
|
|
461943
|
+
const parsed = xmljs3.xml2js(content5, { compact: false });
|
|
461944
|
+
const root4 = (parsed.elements ?? []).find((el) => el?.type === "element");
|
|
461945
|
+
if (!root4) {
|
|
461946
|
+
throw new Error("Custom XML content is missing a root element.");
|
|
461947
|
+
}
|
|
461948
|
+
return { root: root4, declaration: parsed.declaration ?? null };
|
|
461949
|
+
}
|
|
461950
|
+
function ensureDocumentRelationshipsRoot4(convertedXml) {
|
|
461951
|
+
if (!convertedXml["word/_rels/document.xml.rels"]) {
|
|
461952
|
+
convertedXml["word/_rels/document.xml.rels"] = createXmlDocument4({
|
|
461953
|
+
type: "element",
|
|
461954
|
+
name: "Relationships",
|
|
461955
|
+
attributes: {
|
|
461956
|
+
xmlns: "http://schemas.openxmlformats.org/package/2006/relationships"
|
|
461957
|
+
},
|
|
461958
|
+
elements: []
|
|
461959
|
+
});
|
|
461960
|
+
}
|
|
461961
|
+
const relsData = convertedXml["word/_rels/document.xml.rels"];
|
|
461962
|
+
relsData.elements ??= [];
|
|
461963
|
+
let relsRoot = relsData.elements.find((el) => getLocalName5(el?.name) === "Relationships");
|
|
461964
|
+
if (!relsRoot) {
|
|
461965
|
+
relsRoot = {
|
|
461966
|
+
type: "element",
|
|
461967
|
+
name: "Relationships",
|
|
461968
|
+
attributes: {
|
|
461969
|
+
xmlns: "http://schemas.openxmlformats.org/package/2006/relationships"
|
|
461970
|
+
},
|
|
461971
|
+
elements: []
|
|
461972
|
+
};
|
|
461973
|
+
relsData.elements.push(relsRoot);
|
|
461974
|
+
}
|
|
461975
|
+
relsRoot.elements ??= [];
|
|
461976
|
+
return relsRoot;
|
|
461977
|
+
}
|
|
461978
|
+
function getNextRelationshipId4(relsRoot) {
|
|
461979
|
+
const used = (relsRoot?.elements ?? []).map((rel) => {
|
|
461980
|
+
const id2 = rel?.attributes?.Id;
|
|
461981
|
+
const m2 = typeof id2 === "string" ? /^rId(\d+)$/.exec(id2) : null;
|
|
461982
|
+
return m2 ? Number.parseInt(m2[1], 10) : NaN;
|
|
461983
|
+
}).filter((n) => Number.isFinite(n));
|
|
461984
|
+
const max3 = used.length > 0 ? Math.max(...used) : 0;
|
|
461985
|
+
return `rId${max3 + 1}`;
|
|
461986
|
+
}
|
|
461987
|
+
function buildDocumentRelTarget2(partName) {
|
|
461988
|
+
return partName.startsWith("customXml/") ? `../${partName}` : partName;
|
|
461989
|
+
}
|
|
461990
|
+
function buildItemPropsRoot2(itemId, schemaRefs) {
|
|
461991
|
+
const elements = [
|
|
461992
|
+
{
|
|
461993
|
+
type: "element",
|
|
461994
|
+
name: "ds:datastoreItem",
|
|
461995
|
+
attributes: {
|
|
461996
|
+
"ds:itemID": itemId,
|
|
461997
|
+
"xmlns:ds": CUSTOM_XML_DATASTORE_NAMESPACE2
|
|
461998
|
+
},
|
|
461999
|
+
elements: schemaRefs === undefined ? [] : [
|
|
462000
|
+
{
|
|
462001
|
+
type: "element",
|
|
462002
|
+
name: "ds:schemaRefs",
|
|
462003
|
+
elements: schemaRefs.map((uri) => ({
|
|
462004
|
+
type: "element",
|
|
462005
|
+
name: "ds:schemaRef",
|
|
462006
|
+
attributes: { "ds:uri": uri }
|
|
462007
|
+
}))
|
|
462008
|
+
}
|
|
462009
|
+
]
|
|
462010
|
+
}
|
|
462011
|
+
];
|
|
462012
|
+
return elements[0];
|
|
462013
|
+
}
|
|
462014
|
+
function buildItemRelsRoot2(propsPartFileName) {
|
|
462015
|
+
return {
|
|
462016
|
+
type: "element",
|
|
462017
|
+
name: "Relationships",
|
|
462018
|
+
attributes: {
|
|
462019
|
+
xmlns: "http://schemas.openxmlformats.org/package/2006/relationships"
|
|
462020
|
+
},
|
|
462021
|
+
elements: [
|
|
462022
|
+
{
|
|
462023
|
+
type: "element",
|
|
462024
|
+
name: "Relationship",
|
|
462025
|
+
attributes: {
|
|
462026
|
+
Id: "rId1",
|
|
462027
|
+
Type: CUSTOM_XML_PROPS_RELATIONSHIP_TYPE4,
|
|
462028
|
+
Target: propsPartFileName
|
|
462029
|
+
}
|
|
462030
|
+
}
|
|
462031
|
+
]
|
|
462032
|
+
};
|
|
462033
|
+
}
|
|
462034
|
+
function resolveTargetPartName2(convertedXml, target) {
|
|
462035
|
+
if (!target)
|
|
462036
|
+
return null;
|
|
462037
|
+
if (typeof target.partName === "string" && target.partName.length > 0) {
|
|
462038
|
+
if (!isCustomXmlStoragePartName2(target.partName))
|
|
462039
|
+
return null;
|
|
462040
|
+
return convertedXml[target.partName] ? target.partName : null;
|
|
462041
|
+
}
|
|
462042
|
+
if (typeof target.id === "string" && target.id.length > 0) {
|
|
462043
|
+
for (const partName of listCustomXmlStoragePartNames2(convertedXml)) {
|
|
462044
|
+
const propsName = findPropsPartFor2(convertedXml, partName);
|
|
462045
|
+
if (!propsName)
|
|
462046
|
+
continue;
|
|
462047
|
+
const parsed = parsePropsPart2(convertedXml[propsName]);
|
|
462048
|
+
if (parsed?.itemId === target.id)
|
|
462049
|
+
return partName;
|
|
462050
|
+
}
|
|
462051
|
+
}
|
|
462052
|
+
return null;
|
|
462053
|
+
}
|
|
462054
|
+
function createCustomXmlPart2(convertedXml, { content: content5, schemaRefs }, converter) {
|
|
462055
|
+
const { root: root4, declaration } = parseContentToRootElement2(content5);
|
|
462056
|
+
const index3 = nextCustomXmlItemIndex2(convertedXml, converter);
|
|
462057
|
+
const partName = partNameFromIndex2(index3);
|
|
462058
|
+
const propsPartName = propsPartNameFromIndex2(index3);
|
|
462059
|
+
const itemRelsPath = `customXml/_rels/item${index3}.xml.rels`;
|
|
462060
|
+
const itemId = `{${v42().toUpperCase()}}`;
|
|
462061
|
+
convertedXml[partName] = createXmlDocument4(root4, declaration);
|
|
462062
|
+
convertedXml[propsPartName] = createXmlDocument4(buildItemPropsRoot2(itemId, schemaRefs));
|
|
462063
|
+
convertedXml[itemRelsPath] = createXmlDocument4(buildItemRelsRoot2(`itemProps${index3}.xml`));
|
|
462064
|
+
const relsRoot = ensureDocumentRelationshipsRoot4(convertedXml);
|
|
462065
|
+
relsRoot.elements.push({
|
|
462066
|
+
type: "element",
|
|
462067
|
+
name: "Relationship",
|
|
462068
|
+
attributes: {
|
|
462069
|
+
Id: getNextRelationshipId4(relsRoot),
|
|
462070
|
+
Type: CUSTOM_XML_DATA_RELATIONSHIP_TYPE2,
|
|
462071
|
+
Target: buildDocumentRelTarget2(partName)
|
|
462072
|
+
}
|
|
462073
|
+
});
|
|
462074
|
+
if (converter?.removedCustomXmlPaths instanceof Set) {
|
|
462075
|
+
converter.removedCustomXmlPaths.delete(partName);
|
|
462076
|
+
converter.removedCustomXmlPaths.delete(propsPartName);
|
|
462077
|
+
converter.removedCustomXmlPaths.delete(itemRelsPath);
|
|
462078
|
+
}
|
|
462079
|
+
return { id: itemId, partName, propsPartName };
|
|
462080
|
+
}
|
|
462081
|
+
function patchCustomXmlPart2(convertedXml, target, { content: content5, schemaRefs }, converter) {
|
|
462082
|
+
const partName = resolveTargetPartName2(convertedXml, target);
|
|
462083
|
+
if (!partName)
|
|
462084
|
+
return null;
|
|
462085
|
+
if (content5 !== undefined) {
|
|
462086
|
+
const { root: root4, declaration } = parseContentToRootElement2(content5);
|
|
462087
|
+
const existingDecl = convertedXml[partName]?.declaration ?? declaration;
|
|
462088
|
+
convertedXml[partName] = createXmlDocument4(root4, existingDecl);
|
|
462089
|
+
}
|
|
462090
|
+
let resolvedId = null;
|
|
462091
|
+
if (schemaRefs !== undefined) {
|
|
462092
|
+
let propsPartName = findPropsPartFor2(convertedXml, partName);
|
|
462093
|
+
if (propsPartName) {
|
|
462094
|
+
resolvedId = parsePropsPart2(convertedXml[propsPartName])?.itemId ?? null;
|
|
462095
|
+
}
|
|
462096
|
+
if (!propsPartName) {
|
|
462097
|
+
const idx = indexFromPartName2(partName);
|
|
462098
|
+
if (idx == null)
|
|
462099
|
+
return null;
|
|
462100
|
+
propsPartName = propsPartNameFromIndex2(idx);
|
|
462101
|
+
const itemRelsPath = `customXml/_rels/item${idx}.xml.rels`;
|
|
462102
|
+
resolvedId = `{${v42().toUpperCase()}}`;
|
|
462103
|
+
convertedXml[itemRelsPath] = createXmlDocument4(buildItemRelsRoot2(`itemProps${idx}.xml`));
|
|
462104
|
+
}
|
|
462105
|
+
if (!resolvedId)
|
|
462106
|
+
resolvedId = `{${v42().toUpperCase()}}`;
|
|
462107
|
+
const existingDecl = convertedXml[propsPartName]?.declaration;
|
|
462108
|
+
convertedXml[propsPartName] = createXmlDocument4(buildItemPropsRoot2(resolvedId, schemaRefs), existingDecl);
|
|
462109
|
+
} else {
|
|
462110
|
+
const propsPartName = findPropsPartFor2(convertedXml, partName);
|
|
462111
|
+
if (propsPartName) {
|
|
462112
|
+
resolvedId = parsePropsPart2(convertedXml[propsPartName])?.itemId ?? null;
|
|
462113
|
+
}
|
|
462114
|
+
}
|
|
462115
|
+
if (converter)
|
|
462116
|
+
invalidateConverterCachesForPath2(converter, partName);
|
|
462117
|
+
return resolvedId ? { partName, id: resolvedId } : { partName };
|
|
462118
|
+
}
|
|
462119
|
+
function removeCustomXmlPart2(convertedXml, target, converter) {
|
|
462120
|
+
const partName = resolveTargetPartName2(convertedXml, target);
|
|
462121
|
+
if (!partName)
|
|
462122
|
+
return false;
|
|
462123
|
+
const index3 = indexFromPartName2(partName);
|
|
462124
|
+
const propsPartName = findPropsPartFor2(convertedXml, partName);
|
|
462125
|
+
const itemRelsPath = index3 == null ? null : `customXml/_rels/item${index3}.xml.rels`;
|
|
462126
|
+
const removedPaths = [partName, propsPartName, itemRelsPath].filter((path3) => typeof path3 === "string" && path3.length > 0);
|
|
462127
|
+
for (const path3 of removedPaths) {
|
|
462128
|
+
delete convertedXml[path3];
|
|
462129
|
+
}
|
|
462130
|
+
const relsRoot = convertedXml["word/_rels/document.xml.rels"]?.elements?.find((el) => getLocalName5(el?.name) === "Relationships");
|
|
462131
|
+
if (relsRoot?.elements?.length) {
|
|
462132
|
+
relsRoot.elements = relsRoot.elements.filter((rel) => {
|
|
462133
|
+
if (rel?.attributes?.Type !== CUSTOM_XML_DATA_RELATIONSHIP_TYPE2)
|
|
462134
|
+
return true;
|
|
462135
|
+
const resolved = resolveOpcTargetPath2(rel?.attributes?.Target, "word");
|
|
462136
|
+
return resolved !== partName;
|
|
462137
|
+
});
|
|
462138
|
+
}
|
|
462139
|
+
if (converter) {
|
|
462140
|
+
if (!(converter.removedCustomXmlPaths instanceof Set)) {
|
|
462141
|
+
converter.removedCustomXmlPaths = new Set;
|
|
462142
|
+
}
|
|
462143
|
+
for (const path3 of removedPaths)
|
|
462144
|
+
converter.removedCustomXmlPaths.add(path3);
|
|
462145
|
+
invalidateConverterCachesForPath2(converter, partName);
|
|
462146
|
+
}
|
|
462147
|
+
return true;
|
|
462148
|
+
}
|
|
462149
|
+
function invalidateConverterCachesForPath2(converter, partName) {
|
|
462150
|
+
if (!converter || typeof partName !== "string")
|
|
462151
|
+
return;
|
|
462152
|
+
const biblio = converter.bibliographyPart;
|
|
462153
|
+
if (biblio && biblio.partPath === partName) {
|
|
462154
|
+
converter.bibliographyPart = {
|
|
462155
|
+
sources: [],
|
|
462156
|
+
partPath: null,
|
|
462157
|
+
itemPropsPath: null,
|
|
462158
|
+
itemRelsPath: null,
|
|
462159
|
+
selectedStyle: null,
|
|
462160
|
+
styleName: null,
|
|
462161
|
+
version: null
|
|
462162
|
+
};
|
|
462163
|
+
}
|
|
462164
|
+
}
|
|
462165
|
+
var xmljs3, CUSTOM_XML_DATA_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE4 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", CUSTOM_XML_DATASTORE_NAMESPACE2 = "http://schemas.openxmlformats.org/officeDocument/2006/customXml";
|
|
462166
|
+
var init_custom_xml_parts = __esm(() => {
|
|
462167
|
+
init_wrapper();
|
|
462168
|
+
init_helpers();
|
|
462169
|
+
init_constants3();
|
|
462170
|
+
xmljs3 = __toESM(require_lib3(), 1);
|
|
462171
|
+
});
|
|
462172
|
+
|
|
462173
|
+
// ../../packages/super-editor/src/editors/v1/document-api-adapters/plan-engine/custom-xml-wrappers.ts
|
|
460582
462174
|
function getConverter19(editor) {
|
|
462175
|
+
return editor.converter ?? null;
|
|
462176
|
+
}
|
|
462177
|
+
function getConvertedXml4(editor) {
|
|
462178
|
+
return getConverter19(editor)?.convertedXml ?? {};
|
|
462179
|
+
}
|
|
462180
|
+
function toSummary2(record3) {
|
|
462181
|
+
const summary = {
|
|
462182
|
+
partName: record3.partName,
|
|
462183
|
+
schemaRefs: record3.schemaRefs
|
|
462184
|
+
};
|
|
462185
|
+
if (record3.id)
|
|
462186
|
+
summary.id = record3.id;
|
|
462187
|
+
if (record3.propsPartName)
|
|
462188
|
+
summary.propsPartName = record3.propsPartName;
|
|
462189
|
+
if (record3.rootNamespace)
|
|
462190
|
+
summary.rootNamespace = record3.rootNamespace;
|
|
462191
|
+
return summary;
|
|
462192
|
+
}
|
|
462193
|
+
function customXmlPartsListWrapper2(editor, query2) {
|
|
462194
|
+
const revision = getRevision2(editor);
|
|
462195
|
+
const all6 = listCustomXmlParts2(getConvertedXml4(editor));
|
|
462196
|
+
let filtered = all6;
|
|
462197
|
+
if (query2?.rootNamespace !== undefined) {
|
|
462198
|
+
filtered = filtered.filter((p3) => p3.rootNamespace === query2.rootNamespace);
|
|
462199
|
+
}
|
|
462200
|
+
if (query2?.schemaRef !== undefined) {
|
|
462201
|
+
filtered = filtered.filter((p3) => p3.schemaRefs.includes(query2.schemaRef));
|
|
462202
|
+
}
|
|
462203
|
+
const allItems = filtered.map((record3) => {
|
|
462204
|
+
const summary = toSummary2(record3);
|
|
462205
|
+
const stableId = summary.id ?? summary.partName;
|
|
462206
|
+
return buildDiscoveryItem2(stableId, buildResolvedHandle2(`customXml:${stableId}`, "ephemeral", "ext:customXmlPart"), summary);
|
|
462207
|
+
});
|
|
462208
|
+
const { total, items: paged } = paginate2(allItems, query2?.offset, query2?.limit);
|
|
462209
|
+
const effectiveLimit = query2?.limit ?? total;
|
|
462210
|
+
return buildDiscoveryResult2({
|
|
462211
|
+
evaluatedRevision: revision,
|
|
462212
|
+
total,
|
|
462213
|
+
items: paged,
|
|
462214
|
+
page: { limit: effectiveLimit, offset: query2?.offset ?? 0, returned: paged.length }
|
|
462215
|
+
});
|
|
462216
|
+
}
|
|
462217
|
+
function customXmlPartsGetWrapper2(editor, input2) {
|
|
462218
|
+
const record3 = readCustomXmlPart2(getConvertedXml4(editor), input2.target);
|
|
462219
|
+
if (!record3)
|
|
462220
|
+
return null;
|
|
462221
|
+
const info = {
|
|
462222
|
+
partName: record3.partName,
|
|
462223
|
+
rootNamespace: record3.rootNamespace ?? undefined,
|
|
462224
|
+
schemaRefs: record3.schemaRefs,
|
|
462225
|
+
content: record3.content
|
|
462226
|
+
};
|
|
462227
|
+
if (record3.id)
|
|
462228
|
+
info.id = record3.id;
|
|
462229
|
+
if (record3.propsPartName)
|
|
462230
|
+
info.propsPartName = record3.propsPartName;
|
|
462231
|
+
return info;
|
|
462232
|
+
}
|
|
462233
|
+
function failure2(code10, message) {
|
|
462234
|
+
return { success: false, failure: { code: code10, message } };
|
|
462235
|
+
}
|
|
462236
|
+
function isWriteFailure2(outcome) {
|
|
462237
|
+
return outcome.ok === false;
|
|
462238
|
+
}
|
|
462239
|
+
function targetNotFound2() {
|
|
462240
|
+
return { ok: false, code: "TARGET_NOT_FOUND", message: "No custom XML part matched the supplied target." };
|
|
462241
|
+
}
|
|
462242
|
+
function safeValidate2(fn2) {
|
|
462243
|
+
try {
|
|
462244
|
+
return { ok: true, payload: fn2() };
|
|
462245
|
+
} catch (e) {
|
|
462246
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
462247
|
+
return { ok: false, code: "INVALID_INPUT", message: msg };
|
|
462248
|
+
}
|
|
462249
|
+
}
|
|
462250
|
+
function customXmlPartsCreateWrapper2(editor, input2, options) {
|
|
462251
|
+
rejectTrackedMode2("customXml.parts.create", options);
|
|
462252
|
+
const outcome = executeOutOfBandMutation2(editor, (dryRun) => {
|
|
462253
|
+
if (dryRun) {
|
|
462254
|
+
const probe2 = safeValidate2(() => createCustomXmlPart2({}, { content: input2.content, schemaRefs: input2.schemaRefs }));
|
|
462255
|
+
if (isWriteFailure2(probe2))
|
|
462256
|
+
return { changed: false, payload: probe2 };
|
|
462257
|
+
return {
|
|
462258
|
+
changed: false,
|
|
462259
|
+
payload: { ok: true, payload: { id: "{DRY-RUN}", partName: "", propsPartName: "" } }
|
|
462260
|
+
};
|
|
462261
|
+
}
|
|
462262
|
+
const probe = safeValidate2(() => createCustomXmlPart2(getConvertedXml4(editor), { content: input2.content, schemaRefs: input2.schemaRefs }, getConverter19(editor)));
|
|
462263
|
+
if (isWriteFailure2(probe))
|
|
462264
|
+
return { changed: false, payload: probe };
|
|
462265
|
+
return { changed: true, payload: { ok: true, payload: probe.payload } };
|
|
462266
|
+
}, { dryRun: options?.dryRun === true, expectedRevision: options?.expectedRevision });
|
|
462267
|
+
if (isWriteFailure2(outcome))
|
|
462268
|
+
return failure2(outcome.code, outcome.message);
|
|
462269
|
+
return {
|
|
462270
|
+
success: true,
|
|
462271
|
+
id: outcome.payload.id,
|
|
462272
|
+
partName: outcome.payload.partName,
|
|
462273
|
+
propsPartName: outcome.payload.propsPartName
|
|
462274
|
+
};
|
|
462275
|
+
}
|
|
462276
|
+
function customXmlPartsPatchWrapper2(editor, input2, options) {
|
|
462277
|
+
rejectTrackedMode2("customXml.parts.patch", options);
|
|
462278
|
+
const outcome = executeOutOfBandMutation2(editor, (dryRun) => {
|
|
462279
|
+
if (dryRun) {
|
|
462280
|
+
const partName2 = resolveTargetPartName2(getConvertedXml4(editor), input2.target);
|
|
462281
|
+
if (!partName2)
|
|
462282
|
+
return { changed: false, payload: targetNotFound2() };
|
|
462283
|
+
if (input2.content !== undefined) {
|
|
462284
|
+
const probe2 = safeValidate2(() => createCustomXmlPart2({}, { content: input2.content, schemaRefs: undefined }));
|
|
462285
|
+
if (isWriteFailure2(probe2))
|
|
462286
|
+
return { changed: false, payload: probe2 };
|
|
462287
|
+
}
|
|
462288
|
+
return { changed: false, payload: { ok: true, payload: { id: null } } };
|
|
462289
|
+
}
|
|
462290
|
+
const partName = resolveTargetPartName2(getConvertedXml4(editor), input2.target);
|
|
462291
|
+
if (!partName)
|
|
462292
|
+
return { changed: false, payload: targetNotFound2() };
|
|
462293
|
+
const probe = safeValidate2(() => patchCustomXmlPart2(getConvertedXml4(editor), input2.target, { content: input2.content, schemaRefs: input2.schemaRefs }, getConverter19(editor)));
|
|
462294
|
+
if (isWriteFailure2(probe))
|
|
462295
|
+
return { changed: false, payload: probe };
|
|
462296
|
+
if (!probe.payload)
|
|
462297
|
+
return { changed: false, payload: targetNotFound2() };
|
|
462298
|
+
return { changed: true, payload: { ok: true, payload: { id: probe.payload.id ?? null } } };
|
|
462299
|
+
}, { dryRun: options?.dryRun === true, expectedRevision: options?.expectedRevision });
|
|
462300
|
+
if (isWriteFailure2(outcome))
|
|
462301
|
+
return failure2(outcome.code, outcome.message);
|
|
462302
|
+
const result = { success: true, target: input2.target };
|
|
462303
|
+
if (outcome.payload.id)
|
|
462304
|
+
result.id = outcome.payload.id;
|
|
462305
|
+
return result;
|
|
462306
|
+
}
|
|
462307
|
+
function customXmlPartsRemoveWrapper2(editor, input2, options) {
|
|
462308
|
+
rejectTrackedMode2("customXml.parts.remove", options);
|
|
462309
|
+
const outcome = executeOutOfBandMutation2(editor, (dryRun) => {
|
|
462310
|
+
if (dryRun) {
|
|
462311
|
+
const partName = resolveTargetPartName2(getConvertedXml4(editor), input2.target);
|
|
462312
|
+
return partName ? { changed: false, payload: { ok: true, payload: true } } : { changed: false, payload: targetNotFound2() };
|
|
462313
|
+
}
|
|
462314
|
+
const ok5 = removeCustomXmlPart2(getConvertedXml4(editor), input2.target, getConverter19(editor));
|
|
462315
|
+
if (!ok5)
|
|
462316
|
+
return { changed: false, payload: targetNotFound2() };
|
|
462317
|
+
return { changed: true, payload: { ok: true, payload: true } };
|
|
462318
|
+
}, { dryRun: options?.dryRun === true, expectedRevision: options?.expectedRevision });
|
|
462319
|
+
if (isWriteFailure2(outcome))
|
|
462320
|
+
return failure2(outcome.code, outcome.message);
|
|
462321
|
+
return { success: true, target: input2.target };
|
|
462322
|
+
}
|
|
462323
|
+
function createCustomXmlPartsAdapter2(editor) {
|
|
462324
|
+
return {
|
|
462325
|
+
list: (query2) => customXmlPartsListWrapper2(editor, query2),
|
|
462326
|
+
get: (input2) => customXmlPartsGetWrapper2(editor, input2),
|
|
462327
|
+
create: (input2, options) => customXmlPartsCreateWrapper2(editor, input2, options),
|
|
462328
|
+
patch: (input2, options) => customXmlPartsPatchWrapper2(editor, input2, options),
|
|
462329
|
+
remove: (input2, options) => customXmlPartsRemoveWrapper2(editor, input2, options)
|
|
462330
|
+
};
|
|
462331
|
+
}
|
|
462332
|
+
var init_custom_xml_wrappers = __esm(() => {
|
|
462333
|
+
init_src();
|
|
462334
|
+
init_adapter_utils();
|
|
462335
|
+
init_revision_tracker();
|
|
462336
|
+
init_mutation_helpers();
|
|
462337
|
+
init_out_of_band_mutation();
|
|
462338
|
+
init_custom_xml_parts();
|
|
462339
|
+
});
|
|
462340
|
+
|
|
462341
|
+
// ../../packages/super-editor/src/editors/v1/document-api-adapters/protection-adapter.ts
|
|
462342
|
+
function getConverter20(editor) {
|
|
460583
462343
|
return editor.converter ?? undefined;
|
|
460584
462344
|
}
|
|
460585
462345
|
function requireConverter3(editor, operationName) {
|
|
460586
|
-
const converter =
|
|
462346
|
+
const converter = getConverter20(editor);
|
|
460587
462347
|
if (!converter) {
|
|
460588
462348
|
throw new DocumentApiAdapterError3("CAPABILITY_UNAVAILABLE", `${operationName} requires an active document converter.`);
|
|
460589
462349
|
}
|
|
@@ -460609,7 +462369,7 @@ function protectionGetAdapter2(editor) {
|
|
|
460609
462369
|
if (stored?.initialized) {
|
|
460610
462370
|
return stored.state;
|
|
460611
462371
|
}
|
|
460612
|
-
const converter =
|
|
462372
|
+
const converter = getConverter20(editor);
|
|
460613
462373
|
const settingsRoot = converter ? readSettingsRoot2(converter) : null;
|
|
460614
462374
|
return parseProtectionState2(settingsRoot);
|
|
460615
462375
|
}
|
|
@@ -461385,7 +463145,7 @@ function footnoteFailure2(code10, message) {
|
|
|
461385
463145
|
function configSuccess2() {
|
|
461386
463146
|
return { success: true };
|
|
461387
463147
|
}
|
|
461388
|
-
function
|
|
463148
|
+
function getConverter21(editor) {
|
|
461389
463149
|
const converter = editor.converter;
|
|
461390
463150
|
if (!converter) {
|
|
461391
463151
|
throw new DocumentApiAdapterError3("CAPABILITY_UNAVAILABLE", "converter not available.");
|
|
@@ -461452,7 +463212,7 @@ function footnotesGetWrapper2(editor, input2) {
|
|
|
461452
463212
|
function footnotesInsertWrapper2(editor, input2, options) {
|
|
461453
463213
|
rejectTrackedMode2("footnotes.insert", options);
|
|
461454
463214
|
checkRevision2(editor, options?.expectedRevision);
|
|
461455
|
-
const converter =
|
|
463215
|
+
const converter = getConverter21(editor);
|
|
461456
463216
|
const notesConfig = getNotesConfig2(input2.type);
|
|
461457
463217
|
const noteId = allocateNextNoteId2(editor, converter, input2.type);
|
|
461458
463218
|
const address2 = { kind: "entity", entityType: "footnote", noteId };
|
|
@@ -461606,7 +463366,7 @@ function footnotesConfigureWrapper2(editor, input2, options) {
|
|
|
461606
463366
|
return configSuccess2();
|
|
461607
463367
|
}
|
|
461608
463368
|
function syncFootnotePropertiesCache2(editor) {
|
|
461609
|
-
const converter =
|
|
463369
|
+
const converter = getConverter21(editor);
|
|
461610
463370
|
if (!converter?.footnoteProperties || converter.footnoteProperties.source !== "settings")
|
|
461611
463371
|
return;
|
|
461612
463372
|
const settingsPart = converter.convertedXml?.["word/settings.xml"];
|
|
@@ -463394,39 +465154,6 @@ var init_citation_resolver = __esm(() => {
|
|
|
463394
465154
|
init_reference_block_node_id();
|
|
463395
465155
|
});
|
|
463396
465156
|
|
|
463397
|
-
// ../../packages/super-editor/src/editors/v1/document-api-adapters/out-of-band-mutation.ts
|
|
463398
|
-
function executeOutOfBandMutation2(editor, mutateFn, options) {
|
|
463399
|
-
if (!options.dryRun) {
|
|
463400
|
-
if (editor.options?.collaborationProvider && editor.options?.ydoc) {
|
|
463401
|
-
try {
|
|
463402
|
-
yUndoPluginKey2.getState(editor.state)?.undoManager?.stopCapturing();
|
|
463403
|
-
} catch {}
|
|
463404
|
-
} else {
|
|
463405
|
-
try {
|
|
463406
|
-
editor.view?.dispatch?.(closeHistory2(editor.state.tr));
|
|
463407
|
-
} catch {}
|
|
463408
|
-
}
|
|
463409
|
-
}
|
|
463410
|
-
checkRevision2(editor, options.expectedRevision);
|
|
463411
|
-
const result = mutateFn(options.dryRun);
|
|
463412
|
-
if (result.changed && !options.dryRun) {
|
|
463413
|
-
const converter = editor.converter;
|
|
463414
|
-
if (converter) {
|
|
463415
|
-
converter.documentModified = true;
|
|
463416
|
-
if (!converter.documentGuid && typeof converter.promoteToGuid === "function") {
|
|
463417
|
-
converter.promoteToGuid();
|
|
463418
|
-
}
|
|
463419
|
-
}
|
|
463420
|
-
incrementRevision2(editor);
|
|
463421
|
-
}
|
|
463422
|
-
return result.payload;
|
|
463423
|
-
}
|
|
463424
|
-
var init_out_of_band_mutation = __esm(() => {
|
|
463425
|
-
init_dist6();
|
|
463426
|
-
init_y_prosemirror();
|
|
463427
|
-
init_revision_tracker();
|
|
463428
|
-
});
|
|
463429
|
-
|
|
463430
465157
|
// ../../packages/super-editor/src/editors/v1/document-api-adapters/plan-engine/citation-wrappers.ts
|
|
463431
465158
|
function citationSuccess2(address2) {
|
|
463432
465159
|
return { success: true, citation: address2 };
|
|
@@ -464564,6 +466291,9 @@ function assembleDocumentApiAdapters2(editor) {
|
|
|
464564
466291
|
rename: (input2, options) => bookmarksRenameWrapper2(editor, input2, options),
|
|
464565
466292
|
remove: (input2, options) => bookmarksRemoveWrapper2(editor, input2, options)
|
|
464566
466293
|
},
|
|
466294
|
+
customXml: {
|
|
466295
|
+
parts: createCustomXmlPartsAdapter2(editor)
|
|
466296
|
+
},
|
|
464567
466297
|
footnotes: {
|
|
464568
466298
|
list: (query2) => footnotesListWrapper2(editor, query2),
|
|
464569
466299
|
get: (input2) => footnotesGetWrapper2(editor, input2),
|
|
@@ -464721,6 +466451,7 @@ var init_assemble_adapters = __esm(() => {
|
|
|
464721
466451
|
init_content_controls_wrappers();
|
|
464722
466452
|
init_header_footers_adapter();
|
|
464723
466453
|
init_bookmark_wrappers();
|
|
466454
|
+
init_custom_xml_wrappers();
|
|
464724
466455
|
init_protection_adapter();
|
|
464725
466456
|
init_permission_ranges_adapter();
|
|
464726
466457
|
init_footnote_wrappers();
|