n8n-nodes-kordoc 0.1.21 → 0.1.23
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/vendor/kordoc/index.cjs +105 -46
- package/package.json +1 -1
|
@@ -3816,7 +3816,7 @@ var require_crc32 = __commonJS({
|
|
|
3816
3816
|
return table3;
|
|
3817
3817
|
}
|
|
3818
3818
|
var crcTable = makeTable();
|
|
3819
|
-
function
|
|
3819
|
+
function crc324(crc, buf, len, pos) {
|
|
3820
3820
|
var t = crcTable, end = pos + len;
|
|
3821
3821
|
crc = crc ^ -1;
|
|
3822
3822
|
for (var i = pos; i < end; i++) {
|
|
@@ -3838,7 +3838,7 @@ var require_crc32 = __commonJS({
|
|
|
3838
3838
|
}
|
|
3839
3839
|
var isArray = utils.getTypeOf(input) !== "string";
|
|
3840
3840
|
if (isArray) {
|
|
3841
|
-
return
|
|
3841
|
+
return crc324(crc | 0, input, input.length, 0);
|
|
3842
3842
|
} else {
|
|
3843
3843
|
return crc32str(crc | 0, input, input.length, 0);
|
|
3844
3844
|
}
|
|
@@ -3852,7 +3852,7 @@ var require_Crc32Probe = __commonJS({
|
|
|
3852
3852
|
"use strict";
|
|
3853
3853
|
init_cjs_shims();
|
|
3854
3854
|
var GenericWorker = require_GenericWorker();
|
|
3855
|
-
var
|
|
3855
|
+
var crc324 = require_crc32();
|
|
3856
3856
|
var utils = require_utils();
|
|
3857
3857
|
function Crc32Probe() {
|
|
3858
3858
|
GenericWorker.call(this, "Crc32Probe");
|
|
@@ -3860,7 +3860,7 @@ var require_Crc32Probe = __commonJS({
|
|
|
3860
3860
|
}
|
|
3861
3861
|
utils.inherits(Crc32Probe, GenericWorker);
|
|
3862
3862
|
Crc32Probe.prototype.processChunk = function(chunk2) {
|
|
3863
|
-
this.streamInfo.crc32 =
|
|
3863
|
+
this.streamInfo.crc32 = crc324(chunk2.data, this.streamInfo.crc32 || 0);
|
|
3864
3864
|
this.push(chunk2);
|
|
3865
3865
|
};
|
|
3866
3866
|
module2.exports = Crc32Probe;
|
|
@@ -3900,10 +3900,10 @@ var require_compressedObject = __commonJS({
|
|
|
3900
3900
|
var DataWorker = require_DataWorker();
|
|
3901
3901
|
var Crc32Probe = require_Crc32Probe();
|
|
3902
3902
|
var DataLengthProbe = require_DataLengthProbe();
|
|
3903
|
-
function CompressedObject(compressedSize, uncompressedSize,
|
|
3903
|
+
function CompressedObject(compressedSize, uncompressedSize, crc324, compression, data) {
|
|
3904
3904
|
this.compressedSize = compressedSize;
|
|
3905
3905
|
this.uncompressedSize = uncompressedSize;
|
|
3906
|
-
this.crc32 =
|
|
3906
|
+
this.crc32 = crc324;
|
|
3907
3907
|
this.compression = compression;
|
|
3908
3908
|
this.compressedContent = data;
|
|
3909
3909
|
}
|
|
@@ -4830,7 +4830,7 @@ var require_crc322 = __commonJS({
|
|
|
4830
4830
|
return table3;
|
|
4831
4831
|
}
|
|
4832
4832
|
var crcTable = makeTable();
|
|
4833
|
-
function
|
|
4833
|
+
function crc324(crc, buf, len, pos) {
|
|
4834
4834
|
var t = crcTable, end = pos + len;
|
|
4835
4835
|
crc ^= -1;
|
|
4836
4836
|
for (var i = pos; i < end; i++) {
|
|
@@ -4838,7 +4838,7 @@ var require_crc322 = __commonJS({
|
|
|
4838
4838
|
}
|
|
4839
4839
|
return crc ^ -1;
|
|
4840
4840
|
}
|
|
4841
|
-
module2.exports =
|
|
4841
|
+
module2.exports = crc324;
|
|
4842
4842
|
}
|
|
4843
4843
|
});
|
|
4844
4844
|
|
|
@@ -4878,7 +4878,7 @@ var require_deflate = __commonJS({
|
|
|
4878
4878
|
var utils = require_common();
|
|
4879
4879
|
var trees = require_trees();
|
|
4880
4880
|
var adler32 = require_adler32();
|
|
4881
|
-
var
|
|
4881
|
+
var crc324 = require_crc322();
|
|
4882
4882
|
var msg2 = require_messages();
|
|
4883
4883
|
var Z_NO_FLUSH = 0;
|
|
4884
4884
|
var Z_PARTIAL_FLUSH = 1;
|
|
@@ -4981,7 +4981,7 @@ var require_deflate = __commonJS({
|
|
|
4981
4981
|
if (strm.state.wrap === 1) {
|
|
4982
4982
|
strm.adler = adler32(strm.adler, buf, len, start);
|
|
4983
4983
|
} else if (strm.state.wrap === 2) {
|
|
4984
|
-
strm.adler =
|
|
4984
|
+
strm.adler = crc324(strm.adler, buf, len, start);
|
|
4985
4985
|
}
|
|
4986
4986
|
strm.next_in += len;
|
|
4987
4987
|
strm.total_in += len;
|
|
@@ -5623,7 +5623,7 @@ var require_deflate = __commonJS({
|
|
|
5623
5623
|
put_byte(s, s.gzhead.extra.length >> 8 & 255);
|
|
5624
5624
|
}
|
|
5625
5625
|
if (s.gzhead.hcrc) {
|
|
5626
|
-
strm.adler =
|
|
5626
|
+
strm.adler = crc324(strm.adler, s.pending_buf, s.pending, 0);
|
|
5627
5627
|
}
|
|
5628
5628
|
s.gzindex = 0;
|
|
5629
5629
|
s.status = EXTRA_STATE;
|
|
@@ -5660,7 +5660,7 @@ var require_deflate = __commonJS({
|
|
|
5660
5660
|
while (s.gzindex < (s.gzhead.extra.length & 65535)) {
|
|
5661
5661
|
if (s.pending === s.pending_buf_size) {
|
|
5662
5662
|
if (s.gzhead.hcrc && s.pending > beg) {
|
|
5663
|
-
strm.adler =
|
|
5663
|
+
strm.adler = crc324(strm.adler, s.pending_buf, s.pending - beg, beg);
|
|
5664
5664
|
}
|
|
5665
5665
|
flush_pending(strm);
|
|
5666
5666
|
beg = s.pending;
|
|
@@ -5672,7 +5672,7 @@ var require_deflate = __commonJS({
|
|
|
5672
5672
|
s.gzindex++;
|
|
5673
5673
|
}
|
|
5674
5674
|
if (s.gzhead.hcrc && s.pending > beg) {
|
|
5675
|
-
strm.adler =
|
|
5675
|
+
strm.adler = crc324(strm.adler, s.pending_buf, s.pending - beg, beg);
|
|
5676
5676
|
}
|
|
5677
5677
|
if (s.gzindex === s.gzhead.extra.length) {
|
|
5678
5678
|
s.gzindex = 0;
|
|
@@ -5688,7 +5688,7 @@ var require_deflate = __commonJS({
|
|
|
5688
5688
|
do {
|
|
5689
5689
|
if (s.pending === s.pending_buf_size) {
|
|
5690
5690
|
if (s.gzhead.hcrc && s.pending > beg) {
|
|
5691
|
-
strm.adler =
|
|
5691
|
+
strm.adler = crc324(strm.adler, s.pending_buf, s.pending - beg, beg);
|
|
5692
5692
|
}
|
|
5693
5693
|
flush_pending(strm);
|
|
5694
5694
|
beg = s.pending;
|
|
@@ -5705,7 +5705,7 @@ var require_deflate = __commonJS({
|
|
|
5705
5705
|
put_byte(s, val);
|
|
5706
5706
|
} while (val !== 0);
|
|
5707
5707
|
if (s.gzhead.hcrc && s.pending > beg) {
|
|
5708
|
-
strm.adler =
|
|
5708
|
+
strm.adler = crc324(strm.adler, s.pending_buf, s.pending - beg, beg);
|
|
5709
5709
|
}
|
|
5710
5710
|
if (val === 0) {
|
|
5711
5711
|
s.gzindex = 0;
|
|
@@ -5721,7 +5721,7 @@ var require_deflate = __commonJS({
|
|
|
5721
5721
|
do {
|
|
5722
5722
|
if (s.pending === s.pending_buf_size) {
|
|
5723
5723
|
if (s.gzhead.hcrc && s.pending > beg) {
|
|
5724
|
-
strm.adler =
|
|
5724
|
+
strm.adler = crc324(strm.adler, s.pending_buf, s.pending - beg, beg);
|
|
5725
5725
|
}
|
|
5726
5726
|
flush_pending(strm);
|
|
5727
5727
|
beg = s.pending;
|
|
@@ -5738,7 +5738,7 @@ var require_deflate = __commonJS({
|
|
|
5738
5738
|
put_byte(s, val);
|
|
5739
5739
|
} while (val !== 0);
|
|
5740
5740
|
if (s.gzhead.hcrc && s.pending > beg) {
|
|
5741
|
-
strm.adler =
|
|
5741
|
+
strm.adler = crc324(strm.adler, s.pending_buf, s.pending - beg, beg);
|
|
5742
5742
|
}
|
|
5743
5743
|
if (val === 0) {
|
|
5744
5744
|
s.status = HCRC_STATE;
|
|
@@ -6802,7 +6802,7 @@ var require_inflate = __commonJS({
|
|
|
6802
6802
|
init_cjs_shims();
|
|
6803
6803
|
var utils = require_common();
|
|
6804
6804
|
var adler32 = require_adler32();
|
|
6805
|
-
var
|
|
6805
|
+
var crc324 = require_crc322();
|
|
6806
6806
|
var inflate_fast = require_inffast();
|
|
6807
6807
|
var inflate_table = require_inftrees();
|
|
6808
6808
|
var CODES = 0;
|
|
@@ -7106,7 +7106,7 @@ var require_inflate = __commonJS({
|
|
|
7106
7106
|
state.check = 0;
|
|
7107
7107
|
hbuf[0] = hold & 255;
|
|
7108
7108
|
hbuf[1] = hold >>> 8 & 255;
|
|
7109
|
-
state.check =
|
|
7109
|
+
state.check = crc324(state.check, hbuf, 2, 0);
|
|
7110
7110
|
hold = 0;
|
|
7111
7111
|
bits = 0;
|
|
7112
7112
|
state.mode = FLAGS;
|
|
@@ -7169,7 +7169,7 @@ var require_inflate = __commonJS({
|
|
|
7169
7169
|
if (state.flags & 512) {
|
|
7170
7170
|
hbuf[0] = hold & 255;
|
|
7171
7171
|
hbuf[1] = hold >>> 8 & 255;
|
|
7172
|
-
state.check =
|
|
7172
|
+
state.check = crc324(state.check, hbuf, 2, 0);
|
|
7173
7173
|
}
|
|
7174
7174
|
hold = 0;
|
|
7175
7175
|
bits = 0;
|
|
@@ -7192,7 +7192,7 @@ var require_inflate = __commonJS({
|
|
|
7192
7192
|
hbuf[1] = hold >>> 8 & 255;
|
|
7193
7193
|
hbuf[2] = hold >>> 16 & 255;
|
|
7194
7194
|
hbuf[3] = hold >>> 24 & 255;
|
|
7195
|
-
state.check =
|
|
7195
|
+
state.check = crc324(state.check, hbuf, 4, 0);
|
|
7196
7196
|
}
|
|
7197
7197
|
hold = 0;
|
|
7198
7198
|
bits = 0;
|
|
@@ -7214,7 +7214,7 @@ var require_inflate = __commonJS({
|
|
|
7214
7214
|
if (state.flags & 512) {
|
|
7215
7215
|
hbuf[0] = hold & 255;
|
|
7216
7216
|
hbuf[1] = hold >>> 8 & 255;
|
|
7217
|
-
state.check =
|
|
7217
|
+
state.check = crc324(state.check, hbuf, 2, 0);
|
|
7218
7218
|
}
|
|
7219
7219
|
hold = 0;
|
|
7220
7220
|
bits = 0;
|
|
@@ -7237,7 +7237,7 @@ var require_inflate = __commonJS({
|
|
|
7237
7237
|
if (state.flags & 512) {
|
|
7238
7238
|
hbuf[0] = hold & 255;
|
|
7239
7239
|
hbuf[1] = hold >>> 8 & 255;
|
|
7240
|
-
state.check =
|
|
7240
|
+
state.check = crc324(state.check, hbuf, 2, 0);
|
|
7241
7241
|
}
|
|
7242
7242
|
hold = 0;
|
|
7243
7243
|
bits = 0;
|
|
@@ -7270,7 +7270,7 @@ var require_inflate = __commonJS({
|
|
|
7270
7270
|
);
|
|
7271
7271
|
}
|
|
7272
7272
|
if (state.flags & 512) {
|
|
7273
|
-
state.check =
|
|
7273
|
+
state.check = crc324(state.check, input, copy, next);
|
|
7274
7274
|
}
|
|
7275
7275
|
have -= copy;
|
|
7276
7276
|
next += copy;
|
|
@@ -7296,7 +7296,7 @@ var require_inflate = __commonJS({
|
|
|
7296
7296
|
}
|
|
7297
7297
|
} while (len && copy < have);
|
|
7298
7298
|
if (state.flags & 512) {
|
|
7299
|
-
state.check =
|
|
7299
|
+
state.check = crc324(state.check, input, copy, next);
|
|
7300
7300
|
}
|
|
7301
7301
|
have -= copy;
|
|
7302
7302
|
next += copy;
|
|
@@ -7322,7 +7322,7 @@ var require_inflate = __commonJS({
|
|
|
7322
7322
|
}
|
|
7323
7323
|
} while (len && copy < have);
|
|
7324
7324
|
if (state.flags & 512) {
|
|
7325
|
-
state.check =
|
|
7325
|
+
state.check = crc324(state.check, input, copy, next);
|
|
7326
7326
|
}
|
|
7327
7327
|
have -= copy;
|
|
7328
7328
|
next += copy;
|
|
@@ -7897,7 +7897,7 @@ var require_inflate = __commonJS({
|
|
|
7897
7897
|
state.total += _out;
|
|
7898
7898
|
if (_out) {
|
|
7899
7899
|
strm.adler = state.check = /*UPDATE(state.check, put - _out, _out);*/
|
|
7900
|
-
state.flags ?
|
|
7900
|
+
state.flags ? crc324(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out);
|
|
7901
7901
|
}
|
|
7902
7902
|
_out = left;
|
|
7903
7903
|
if ((state.flags ? hold : zswap32(hold)) !== state.check) {
|
|
@@ -7963,7 +7963,7 @@ var require_inflate = __commonJS({
|
|
|
7963
7963
|
state.total += _out;
|
|
7964
7964
|
if (state.wrap && _out) {
|
|
7965
7965
|
strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
|
|
7966
|
-
state.flags ?
|
|
7966
|
+
state.flags ? crc324(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out);
|
|
7967
7967
|
}
|
|
7968
7968
|
strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
|
|
7969
7969
|
if ((_in === 0 && _out === 0 || flush === Z_FINISH) && ret === Z_OK) {
|
|
@@ -8395,7 +8395,7 @@ var require_ZipFileWorker = __commonJS({
|
|
|
8395
8395
|
var utils = require_utils();
|
|
8396
8396
|
var GenericWorker = require_GenericWorker();
|
|
8397
8397
|
var utf8 = require_utf8();
|
|
8398
|
-
var
|
|
8398
|
+
var crc324 = require_crc32();
|
|
8399
8399
|
var signature = require_signature();
|
|
8400
8400
|
var decToHex = function(dec, bytes) {
|
|
8401
8401
|
var hex = "", i;
|
|
@@ -8459,7 +8459,7 @@ var require_ZipFileWorker = __commonJS({
|
|
|
8459
8459
|
if (useUTF8ForFileName) {
|
|
8460
8460
|
unicodePathExtraField = // Version
|
|
8461
8461
|
decToHex(1, 1) + // NameCRC32
|
|
8462
|
-
decToHex(
|
|
8462
|
+
decToHex(crc324(encodedFileName), 4) + // UnicodeName
|
|
8463
8463
|
utfEncodedFileName;
|
|
8464
8464
|
extraFields += // Info-ZIP Unicode Path Extra Field
|
|
8465
8465
|
"up" + // size
|
|
@@ -8469,7 +8469,7 @@ var require_ZipFileWorker = __commonJS({
|
|
|
8469
8469
|
if (useUTF8ForComment) {
|
|
8470
8470
|
unicodeCommentExtraField = // Version
|
|
8471
8471
|
decToHex(1, 1) + // CommentCRC32
|
|
8472
|
-
decToHex(
|
|
8472
|
+
decToHex(crc324(encodedComment), 4) + // UnicodeName
|
|
8473
8473
|
utfEncodedComment;
|
|
8474
8474
|
extraFields += // Info-ZIP Unicode Path Extra Field
|
|
8475
8475
|
"uc" + // size
|
|
@@ -9959,7 +9959,7 @@ var init_utils = __esm({
|
|
|
9959
9959
|
".kordoc-source/src/utils.ts"() {
|
|
9960
9960
|
"use strict";
|
|
9961
9961
|
init_cjs_shims();
|
|
9962
|
-
VERSION = true ? "4.
|
|
9962
|
+
VERSION = true ? "4.10.0" : "0.0.0-dev";
|
|
9963
9963
|
KordocError = class extends Error {
|
|
9964
9964
|
constructor(message) {
|
|
9965
9965
|
super(message);
|
|
@@ -26821,7 +26821,7 @@ function resolveImageBlocks(binDataMap, blocks, warnings, sweepUnreferenced) {
|
|
|
26821
26821
|
const ext = mime.includes("jpeg") ? "jpg" : mime.includes("png") ? "png" : mime.includes("gif") ? "gif" : mime.includes("bmp") ? "bmp" : "bin";
|
|
26822
26822
|
img = { filename: `image_${String(imageIndex).padStart(3, "0")}.${ext}`, data: new Uint8Array(bin.data), mime };
|
|
26823
26823
|
resolved.set(storageId, img);
|
|
26824
|
-
images.push({ filename: img.filename, data: img.data, mimeType: img.mime });
|
|
26824
|
+
images.push({ filename: img.filename, data: img.data, mimeType: img.mime, source: bin.name });
|
|
26825
26825
|
renamed.set(storageId, img.filename);
|
|
26826
26826
|
}
|
|
26827
26827
|
}
|
|
@@ -26845,7 +26845,7 @@ function resolveImageBlocks(binDataMap, blocks, warnings, sweepUnreferenced) {
|
|
|
26845
26845
|
const ext = mime.includes("jpeg") ? "jpg" : mime.includes("png") ? "png" : mime.includes("gif") ? "gif" : mime.includes("bmp") ? "bmp" : "bin";
|
|
26846
26846
|
const filename = `image_${String(imageIndex).padStart(3, "0")}.${ext}`;
|
|
26847
26847
|
const data = new Uint8Array(bin.data);
|
|
26848
|
-
images.push({ filename, data, mimeType: mime });
|
|
26848
|
+
images.push({ filename, data, mimeType: mime, source: bin.name });
|
|
26849
26849
|
blocks.push({ type: "image", text: filename, imageData: { data, mimeType: mime, filename: bin.name } });
|
|
26850
26850
|
}
|
|
26851
26851
|
}
|
|
@@ -26983,7 +26983,7 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
|
|
|
26983
26983
|
const mimeType = imageExtToMime(ext);
|
|
26984
26984
|
imageIndex++;
|
|
26985
26985
|
const filename2 = `image_${String(imageIndex).padStart(3, "0")}.${mimeToExt(mimeType)}`;
|
|
26986
|
-
img = { filename: filename2, data, mimeType };
|
|
26986
|
+
img = { filename: filename2, data, mimeType, source: path };
|
|
26987
26987
|
images.push(img);
|
|
26988
26988
|
usedPaths.add(path);
|
|
26989
26989
|
break;
|
|
@@ -27022,7 +27022,7 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
|
|
|
27022
27022
|
}
|
|
27023
27023
|
imageIndex++;
|
|
27024
27024
|
const filename = `image_${String(imageIndex).padStart(3, "0")}.${mimeToExt(mimeType)}`;
|
|
27025
|
-
const img = { filename, data, mimeType };
|
|
27025
|
+
const img = { filename, data, mimeType, source: file.name };
|
|
27026
27026
|
images.push(img);
|
|
27027
27027
|
blocks.push({ type: "image", text: filename, imageData: { data, mimeType, filename: file.name } });
|
|
27028
27028
|
} catch (err) {
|
|
@@ -43760,7 +43760,7 @@ function collectCellText(tc2, styles, numbering, footnotes, rels, depth) {
|
|
|
43760
43760
|
return parts;
|
|
43761
43761
|
}
|
|
43762
43762
|
async function buildImageMap(zip, rels, doc, warnings) {
|
|
43763
|
-
var _a2, _b, _c;
|
|
43763
|
+
var _a2, _b, _c, _d;
|
|
43764
43764
|
const imageMap = /* @__PURE__ */ new Map();
|
|
43765
43765
|
const images = [];
|
|
43766
43766
|
let imgIdx = 0;
|
|
@@ -43791,10 +43791,14 @@ async function buildImageMap(zip, rels, doc, warnings) {
|
|
|
43791
43791
|
gif: "image/gif",
|
|
43792
43792
|
bmp: "image/bmp",
|
|
43793
43793
|
wmf: "image/wmf",
|
|
43794
|
-
emf: "image/emf"
|
|
43794
|
+
emf: "image/emf",
|
|
43795
|
+
tif: "image/tiff",
|
|
43796
|
+
tiff: "image/tiff",
|
|
43797
|
+
svg: "image/svg+xml"
|
|
43795
43798
|
};
|
|
43796
43799
|
const filename = `image_${String(imgIdx).padStart(3, "0")}.${ext}`;
|
|
43797
|
-
|
|
43800
|
+
const mimeType = (_d = (_c = mimeMap[ext]) != null ? _c : detectImageMime(data)) != null ? _d : "application/octet-stream";
|
|
43801
|
+
images.push({ filename, data, mimeType, source: imgPath });
|
|
43798
43802
|
imageMap.set(embedId, filename);
|
|
43799
43803
|
} catch (err) {
|
|
43800
43804
|
warnings.push({
|
|
@@ -47042,7 +47046,9 @@ var GJ_CHAR_BAR = 24;
|
|
|
47042
47046
|
var GJ_CHAR_BODY_TITLE = 25;
|
|
47043
47047
|
var GJ_CHAR_TITLE_BAR = 26;
|
|
47044
47048
|
var GJ_CHAR_APPROVAL = 27;
|
|
47045
|
-
var
|
|
47049
|
+
var GJ_CHAR_SRC = 28;
|
|
47050
|
+
var GJ_CHAR_SRC_BOLD = 29;
|
|
47051
|
+
var GJ_CHAR_COUNT = GJ_CHAR_SRC_BOLD - GJ_CHAR_DAE + 1;
|
|
47046
47052
|
var GJ_PARA_CHAM = 20;
|
|
47047
47053
|
var GJ_PARA_COVER = 21;
|
|
47048
47054
|
var GJ_PARA_TOC_ITEM = 22;
|
|
@@ -47050,7 +47056,8 @@ var GJ_PARA_CHAPTER = 23;
|
|
|
47050
47056
|
var GJ_PARA_BAR = 24;
|
|
47051
47057
|
var GONGMUN_LIST_PLAIN_BASE = 25;
|
|
47052
47058
|
var GONGMUN_PARA_APPROVAL = GONGMUN_LIST_PLAIN_BASE + GONGMUN_LIST_LEVELS;
|
|
47053
|
-
var
|
|
47059
|
+
var GONGMUN_SRC_LEFT = GONGMUN_PARA_APPROVAL + 1;
|
|
47060
|
+
var GONGMUN_LIST_VARIANT_BASE = GONGMUN_SRC_LEFT + 1;
|
|
47054
47061
|
var GJ_BF_CHAPTER_NUM = 3;
|
|
47055
47062
|
var GJ_BF_CHAPTER_GAP = 4;
|
|
47056
47063
|
var GJ_BF_CHAPTER_TITLE = 5;
|
|
@@ -47097,10 +47104,15 @@ var GONGMUN_TBL_CHAR_BOLD = 12;
|
|
|
47097
47104
|
var GONGMUN_TBL_PT = 1200;
|
|
47098
47105
|
var GONGMUN_TITLE_BAR_CHAR = 13;
|
|
47099
47106
|
var GONGMUN_APPROVAL_CHAR = 14;
|
|
47107
|
+
var GONGMUN_SRC_CHAR = 15;
|
|
47108
|
+
var GONGMUN_SRC_CHAR_BOLD = 16;
|
|
47109
|
+
function srcCaptionPt(bodyHeight) {
|
|
47110
|
+
return Math.max(bodyHeight - 300, 1e3);
|
|
47111
|
+
}
|
|
47100
47112
|
var CHAR_VARIANT_BASE = CHAR_QUOTE + 1;
|
|
47101
47113
|
function charVariantBase(richAssets, isGongmun = true) {
|
|
47102
47114
|
if (!isGongmun) return CHAR_VARIANT_BASE;
|
|
47103
|
-
return richAssets ? CHAR_VARIANT_BASE + GJ_CHAR_COUNT : CHAR_VARIANT_BASE + (
|
|
47115
|
+
return richAssets ? CHAR_VARIANT_BASE + GJ_CHAR_COUNT : CHAR_VARIANT_BASE + (GONGMUN_SRC_CHAR_BOLD - GONGMUN_TBL_CHAR + 1);
|
|
47104
47116
|
}
|
|
47105
47117
|
var GONGMUN_BODY_RATIO = 95;
|
|
47106
47118
|
|
|
@@ -47611,7 +47623,10 @@ function buildCharProperties(theme, gongmun, ratioVariants = [], extraCharPrXmls
|
|
|
47611
47623
|
charPr(11, GONGMUN_TBL_PT, false, false, bodyFont, theme.body),
|
|
47612
47624
|
charPr(12, GONGMUN_TBL_PT, true, false, bodyFont, theme.body),
|
|
47613
47625
|
charPr(GONGMUN_TITLE_BAR_CHAR, 100, false, false, bodyFont, theme.body),
|
|
47614
|
-
charPr(GONGMUN_APPROVAL_CHAR, 1e3, false, false, bodyFont, theme.body)
|
|
47626
|
+
charPr(GONGMUN_APPROVAL_CHAR, 1e3, false, false, bodyFont, theme.body),
|
|
47627
|
+
// 출처행 캡션 — 본문 폰트 -3pt (실무 보고서: 표 아래 출처는 본문과 구분되는 작은 글씨)
|
|
47628
|
+
charPr(GONGMUN_SRC_CHAR, srcCaptionPt(body), false, false, bodyFont, theme.body),
|
|
47629
|
+
charPr(GONGMUN_SRC_CHAR_BOLD, srcCaptionPt(body), true, false, bodyFont, theme.body)
|
|
47615
47630
|
);
|
|
47616
47631
|
}
|
|
47617
47632
|
if (richAssets) {
|
|
@@ -47649,8 +47664,12 @@ function buildCharProperties(theme, gongmun, ratioVariants = [], extraCharPrXmls
|
|
|
47649
47664
|
// 본문 제목박스(HY헤드라인M 22pt, 실측 GT3 표④)
|
|
47650
47665
|
charPr(GJ_CHAR_TITLE_BAR, 100, false, false, 4),
|
|
47651
47666
|
// 1페이지형 제목박스 바(1pt)
|
|
47652
|
-
charPr(GJ_CHAR_APPROVAL, 1e3, false, false, 7)
|
|
47667
|
+
charPr(GJ_CHAR_APPROVAL, 1e3, false, false, 7),
|
|
47653
47668
|
// 결재란 라벨(맑은 고딕 10pt)
|
|
47669
|
+
charPr(GJ_CHAR_SRC, srcCaptionPt(body), false, false, 5),
|
|
47670
|
+
// 출처행 캡션(한양중고딕 본문-3pt)
|
|
47671
|
+
charPr(GJ_CHAR_SRC_BOLD, srcCaptionPt(body), true, false, 5)
|
|
47672
|
+
// 출처행 캡션 bold
|
|
47654
47673
|
);
|
|
47655
47674
|
}
|
|
47656
47675
|
const expectedBase = charVariantBase(richAssets, !!gongmun);
|
|
@@ -47738,6 +47757,7 @@ ${base3.join("\n")}
|
|
|
47738
47757
|
base2.push(paraPr(GONGMUN_LIST_PLAIN_BASE + d, { align: listAlign, lineSpacing: ls, left, indent: 0, spaceBefore: sectionGap, keepWord: true }));
|
|
47739
47758
|
}
|
|
47740
47759
|
base2.push(paraPr(GONGMUN_PARA_APPROVAL, { align: "CENTER", lineSpacing: 100, keepWord: true }));
|
|
47760
|
+
base2.push(paraPr(GONGMUN_SRC_LEFT, { align: "LEFT", lineSpacing: ls, keepWord: true }));
|
|
47741
47761
|
for (let vi = 0; vi < listIndentVariants.length; vi++) {
|
|
47742
47762
|
const { depth, widthHu } = listIndentVariants[vi];
|
|
47743
47763
|
const { left } = levelIndent(depth, gongmun.bodyHeight, gongmun.numbering, gongmun.sizes, gongmun.bullet2, usesAsteriskThird(gongmun.preset));
|
|
@@ -50399,7 +50419,17 @@ function renderParagraph(block2, blockIdx, ctx) {
|
|
|
50399
50419
|
const ctr = gongmun && /^<center>([\s\S]*)<\/center>$/i.exec((block2.text || "").trim());
|
|
50400
50420
|
const rgt = gongmun && /^<right>([\s\S]*)<\/right>$/i.exec((block2.text || "").trim());
|
|
50401
50421
|
if (ctr) return generateParagraph(ctr[1].trim(), GONGMUN_CENTER);
|
|
50402
|
-
if (rgt)
|
|
50422
|
+
if (rgt) {
|
|
50423
|
+
const t = rgt[1].trim();
|
|
50424
|
+
const isSrc = /^(출처|자료)\s*[::]/.test(t);
|
|
50425
|
+
const srcChar = ctx.richAssets ? GJ_CHAR_SRC : GONGMUN_SRC_CHAR;
|
|
50426
|
+
const srcBold = ctx.richAssets ? GJ_CHAR_SRC_BOLD : GONGMUN_SRC_CHAR_BOLD;
|
|
50427
|
+
const h = isSrc ? srcCaptionPt(gongmun.bodyHeight) : gongmun.bodyHeight;
|
|
50428
|
+
const fits = measureTextWidth(t, h, isSrc ? 100 : GONGMUN_BODY_RATIO) <= ctx.gjBodyW + 0.5;
|
|
50429
|
+
const paraId = fits ? GONGMUN_RIGHT : GONGMUN_SRC_LEFT;
|
|
50430
|
+
if (!isSrc) return generateParagraph(t, paraId);
|
|
50431
|
+
return generateParagraph(t, paraId, srcChar, (id) => id === CHAR_BOLD ? srcBold : id);
|
|
50432
|
+
}
|
|
50403
50433
|
return generateParagraph(block2.text || "", PARA_NORMAL, CHAR_NORMAL, fit ? variantMapper(fit, blockIdx, vBase) : void 0);
|
|
50404
50434
|
}
|
|
50405
50435
|
function renderCodeBlock(block2, blockIdx, ctx) {
|
|
@@ -53771,7 +53801,7 @@ async function patchHwp(original, editedMarkdown, options) {
|
|
|
53771
53801
|
for (let i = 0; i < scans.length; i++) {
|
|
53772
53802
|
if (scans[i].repl.size === 0 && scans[i].inserts.size === 0) continue;
|
|
53773
53803
|
const newStream = serializeRecords(scans[i].records, scans[i].repl, scans[i].inserts);
|
|
53774
|
-
const content = compressed ? (
|
|
53804
|
+
const content = compressed ? compressWithTail(newStream) : newStream;
|
|
53775
53805
|
out = replaceOleStream(out, sectionPaths[i], content);
|
|
53776
53806
|
}
|
|
53777
53807
|
data = new Uint8Array(out);
|
|
@@ -54260,6 +54290,26 @@ function rebuildCharShape(csData, coreStartUnit) {
|
|
|
54260
54290
|
});
|
|
54261
54291
|
return { buf, count: kept.length };
|
|
54262
54292
|
}
|
|
54293
|
+
var CRC_TABLE3 = (() => {
|
|
54294
|
+
const t = new Uint32Array(256);
|
|
54295
|
+
for (let n = 0; n < 256; n++) {
|
|
54296
|
+
let c = n;
|
|
54297
|
+
for (let k = 0; k < 8; k++) c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1;
|
|
54298
|
+
t[n] = c >>> 0;
|
|
54299
|
+
}
|
|
54300
|
+
return t;
|
|
54301
|
+
})();
|
|
54302
|
+
function crc323(buf) {
|
|
54303
|
+
let c = 4294967295;
|
|
54304
|
+
for (let i = 0; i < buf.length; i++) c = CRC_TABLE3[(c ^ buf[i]) & 255] ^ c >>> 8;
|
|
54305
|
+
return (c ^ 4294967295) >>> 0;
|
|
54306
|
+
}
|
|
54307
|
+
function compressWithTail(raw) {
|
|
54308
|
+
const tail = Buffer.alloc(8);
|
|
54309
|
+
tail.writeUInt32LE(crc323(raw), 0);
|
|
54310
|
+
tail.writeUInt32LE(raw.length >>> 0, 4);
|
|
54311
|
+
return Buffer.concat([(0, import_zlib7.deflateRawSync)(raw), tail]);
|
|
54312
|
+
}
|
|
54263
54313
|
function synthesizeLineSegs(lineSegData, newRaw, startUnits) {
|
|
54264
54314
|
if (lineSegData.length < 36) return null;
|
|
54265
54315
|
const seg0 = lineSegData.subarray(0, 36);
|
|
@@ -54338,6 +54388,15 @@ function stageParaPatch(scan, para2, newPlain, skip) {
|
|
|
54338
54388
|
scan.repl.set(para2.lineSegIdx, synth.buf);
|
|
54339
54389
|
newHeader.writeUInt16LE(synth.count, 16);
|
|
54340
54390
|
}
|
|
54391
|
+
} else {
|
|
54392
|
+
const lineSegData = records[para2.lineSegIdx].data;
|
|
54393
|
+
const segCount = Math.floor(lineSegData.length / 36);
|
|
54394
|
+
let keep = 1;
|
|
54395
|
+
while (keep < segCount && lineSegData.readUInt32LE(keep * 36) < nChars) keep++;
|
|
54396
|
+
if (keep < segCount) {
|
|
54397
|
+
scan.repl.set(para2.lineSegIdx, Buffer.from(lineSegData.subarray(0, keep * 36)));
|
|
54398
|
+
newHeader.writeUInt16LE(keep, 16);
|
|
54399
|
+
}
|
|
54341
54400
|
}
|
|
54342
54401
|
scan.repl.set(para2.headerIdx, newHeader);
|
|
54343
54402
|
return 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-kordoc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"description": "n8n community node for converting HWP, HWPX, PDF, and Office documents to Markdown with KorDoc",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/chowhi123/n8n-nodes-kordoc#readme",
|