html2canvas-pro 2.5.1 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -3
- package/dist/html2canvas-pro.cjs +1903 -1478
- package/dist/html2canvas-pro.cjs.map +1 -1
- package/dist/html2canvas-pro.esm.js +1903 -1478
- package/dist/html2canvas-pro.esm.js.map +1 -1
- package/dist/html2canvas-pro.js +1907 -1479
- package/dist/html2canvas-pro.js.map +1 -1
- package/dist/html2canvas-pro.min.js +6 -5
- package/dist/types/core/cache-storage.d.ts +6 -2
- package/dist/types/core/constants.d.ts +11 -0
- package/dist/types/core/context.d.ts +9 -1
- package/dist/types/core/features.d.ts +9 -5
- package/dist/types/core/origin-checker.d.ts +7 -4
- package/dist/types/core/validator.d.ts +0 -2
- package/dist/types/css/grouped/background-styles.d.ts +4 -0
- package/dist/types/css/grouped/border-styles.d.ts +4 -0
- package/dist/types/css/grouped/font-styles.d.ts +4 -0
- package/dist/types/css/grouped/layout-styles.d.ts +4 -0
- package/dist/types/css/index.d.ts +4 -0
- package/dist/types/css/property-descriptor.d.ts +11 -3
- package/dist/types/css/property-descriptors/scale.d.ts +9 -0
- package/dist/types/css/property-descriptors/translate.d.ts +10 -0
- package/dist/types/css/syntax/tokenizer.d.ts +8 -0
- package/dist/types/css/types/color-utilities.d.ts +21 -0
- package/dist/types/css/types/functions/color-mix.d.ts +17 -0
- package/dist/types/dom/adopted-styles.d.ts +23 -0
- package/dist/types/dom/document-cloner.d.ts +12 -0
- package/dist/types/dom/dom-normalizer.d.ts +2 -0
- package/dist/types/dom/elements/li-element-container.d.ts +2 -2
- package/dist/types/dom/elements/ol-element-container.d.ts +2 -2
- package/dist/types/dom/elements/select-element-container.d.ts +2 -2
- package/dist/types/dom/elements/textarea-element-container.d.ts +2 -2
- package/dist/types/dom/iframe-mount.d.ts +36 -0
- package/dist/types/dom/node-parser.d.ts +2 -2
- package/dist/types/dom/replaced-elements/canvas-element-container.d.ts +2 -2
- package/dist/types/dom/replaced-elements/iframe-element-container.d.ts +2 -2
- package/dist/types/dom/replaced-elements/image-element-container.d.ts +2 -2
- package/dist/types/dom/replaced-elements/input-element-container.d.ts +2 -2
- package/dist/types/dom/replaced-elements/svg-element-container.d.ts +2 -2
- package/dist/types/dom/slot-cloner.d.ts +10 -0
- package/dist/types/options.d.ts +24 -0
- package/dist/types/render/canvas/border-image-renderer.d.ts +7 -0
- package/dist/types/render/canvas/canvas-renderer.d.ts +2 -3
- package/dist/types/render/canvas/filter-surface.d.ts +37 -11
- package/dist/types/render/canvas/gradient-rasterizer.d.ts +53 -0
- package/dist/types/render/canvas/mask-renderer.d.ts +5 -2
- package/dist/types/render/canvas/text-clip-renderer.d.ts +0 -1
- package/dist/types/render/canvas/text-renderer.d.ts +1 -0
- package/package.json +25 -48
- package/dist/types/render/font-metrics.d.ts +0 -11
- package/dist/types/render/renderer-interface.d.ts +0 -28
package/dist/html2canvas-pro.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* html2canvas-pro 2.5.
|
|
2
|
+
* html2canvas-pro 2.5.3 <https://yorickshan.github.io/html2canvas-pro/>
|
|
3
3
|
* Copyright (c) 2024-present yorickshan and html2canvas-pro contributors
|
|
4
4
|
* Released under MIT License
|
|
5
5
|
*/
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
* Eliminates the need for global static variables.
|
|
19
19
|
*/
|
|
20
20
|
var Html2CanvasConfig = class Html2CanvasConfig {
|
|
21
|
+
window;
|
|
22
|
+
cspNonce;
|
|
23
|
+
cache;
|
|
21
24
|
constructor(options = {}) {
|
|
22
25
|
const resolvedWindow = options.window || (typeof window !== "undefined" ? window : void 0);
|
|
23
26
|
if (!resolvedWindow) throw new Error("Window object is required but not available");
|
|
@@ -58,6 +61,7 @@
|
|
|
58
61
|
* Validates and sanitizes user inputs for security and correctness.
|
|
59
62
|
*/
|
|
60
63
|
var Validator = class {
|
|
64
|
+
config;
|
|
61
65
|
constructor(config = {}) {
|
|
62
66
|
this.config = {
|
|
63
67
|
maxImageTimeout: 3e5,
|
|
@@ -125,8 +129,7 @@
|
|
|
125
129
|
}
|
|
126
130
|
return {
|
|
127
131
|
valid: true,
|
|
128
|
-
sanitized: url
|
|
129
|
-
requiresRuntimeCheck: true
|
|
132
|
+
sanitized: url
|
|
130
133
|
};
|
|
131
134
|
}
|
|
132
135
|
return {
|
|
@@ -431,10 +434,13 @@
|
|
|
431
434
|
* ```
|
|
432
435
|
*/
|
|
433
436
|
var PerformanceMonitor = class {
|
|
437
|
+
context;
|
|
438
|
+
activeMetrics = /* @__PURE__ */ new Map();
|
|
439
|
+
completedMetrics = [];
|
|
440
|
+
enabled;
|
|
441
|
+
getTime;
|
|
434
442
|
constructor(context, enabled = true) {
|
|
435
443
|
this.context = context;
|
|
436
|
-
this.activeMetrics = /* @__PURE__ */ new Map();
|
|
437
|
-
this.completedMetrics = [];
|
|
438
444
|
this.enabled = enabled;
|
|
439
445
|
this.getTime = typeof performance !== "undefined" && typeof performance.now === "function" ? () => performance.now() : () => Date.now();
|
|
440
446
|
}
|
|
@@ -581,6 +587,10 @@
|
|
|
581
587
|
//#endregion
|
|
582
588
|
//#region src/css/layout/bounds.ts
|
|
583
589
|
var Bounds = class Bounds {
|
|
590
|
+
left;
|
|
591
|
+
top;
|
|
592
|
+
width;
|
|
593
|
+
height;
|
|
584
594
|
constructor(left, top, width, height) {
|
|
585
595
|
this.left = left;
|
|
586
596
|
this.top = top;
|
|
@@ -600,9 +610,7 @@
|
|
|
600
610
|
if (!domRect && rects.length > 0) domRect = rects[0];
|
|
601
611
|
return domRect ? new Bounds(domRect.left + context.windowBounds.left, domRect.top + context.windowBounds.top, domRect.width, domRect.height) : Bounds.EMPTY;
|
|
602
612
|
}
|
|
603
|
-
static
|
|
604
|
-
this.EMPTY = new Bounds(0, 0, 0, 0);
|
|
605
|
-
}
|
|
613
|
+
static EMPTY = new Bounds(0, 0, 0, 0);
|
|
606
614
|
};
|
|
607
615
|
const parseBounds = (context, node) => {
|
|
608
616
|
return Bounds.fromClientRect(context, node.getBoundingClientRect());
|
|
@@ -614,522 +622,6 @@
|
|
|
614
622
|
return new Bounds(0, 0, Math.max(Math.max(body.scrollWidth, documentElement.scrollWidth), Math.max(body.offsetWidth, documentElement.offsetWidth), Math.max(body.clientWidth, documentElement.clientWidth)), Math.max(Math.max(body.scrollHeight, documentElement.scrollHeight), Math.max(body.offsetHeight, documentElement.offsetHeight), Math.max(body.clientHeight, documentElement.clientHeight)));
|
|
615
623
|
};
|
|
616
624
|
//#endregion
|
|
617
|
-
//#region node_modules/.pnpm/css-line-break@2.1.0/node_modules/css-line-break/dist/css-line-break.es5.js
|
|
618
|
-
var toCodePoints$1 = function(str) {
|
|
619
|
-
var codePoints = [];
|
|
620
|
-
var i = 0;
|
|
621
|
-
var length = str.length;
|
|
622
|
-
while (i < length) {
|
|
623
|
-
var value = str.charCodeAt(i++);
|
|
624
|
-
if (value >= 55296 && value <= 56319 && i < length) {
|
|
625
|
-
var extra = str.charCodeAt(i++);
|
|
626
|
-
if ((extra & 64512) === 56320) codePoints.push(((value & 1023) << 10) + (extra & 1023) + 65536);
|
|
627
|
-
else {
|
|
628
|
-
codePoints.push(value);
|
|
629
|
-
i--;
|
|
630
|
-
}
|
|
631
|
-
} else codePoints.push(value);
|
|
632
|
-
}
|
|
633
|
-
return codePoints;
|
|
634
|
-
};
|
|
635
|
-
var fromCodePoint$1 = function() {
|
|
636
|
-
var codePoints = [];
|
|
637
|
-
for (var _i = 0; _i < arguments.length; _i++) codePoints[_i] = arguments[_i];
|
|
638
|
-
if (String.fromCodePoint) return String.fromCodePoint.apply(String, codePoints);
|
|
639
|
-
var length = codePoints.length;
|
|
640
|
-
if (!length) return "";
|
|
641
|
-
var codeUnits = [];
|
|
642
|
-
var index = -1;
|
|
643
|
-
var result = "";
|
|
644
|
-
while (++index < length) {
|
|
645
|
-
var codePoint = codePoints[index];
|
|
646
|
-
if (codePoint <= 65535) codeUnits.push(codePoint);
|
|
647
|
-
else {
|
|
648
|
-
codePoint -= 65536;
|
|
649
|
-
codeUnits.push((codePoint >> 10) + 55296, codePoint % 1024 + 56320);
|
|
650
|
-
}
|
|
651
|
-
if (index + 1 === length || codeUnits.length > 16384) {
|
|
652
|
-
result += String.fromCharCode.apply(String, codeUnits);
|
|
653
|
-
codeUnits.length = 0;
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
return result;
|
|
657
|
-
};
|
|
658
|
-
var chars$2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
659
|
-
var lookup$2 = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);
|
|
660
|
-
for (var i$2 = 0; i$2 < chars$2.length; i$2++) lookup$2[chars$2.charCodeAt(i$2)] = i$2;
|
|
661
|
-
var chars$1$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
662
|
-
var lookup$1$1 = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);
|
|
663
|
-
for (var i$1$1 = 0; i$1$1 < chars$1$1.length; i$1$1++) lookup$1$1[chars$1$1.charCodeAt(i$1$1)] = i$1$1;
|
|
664
|
-
var decode$1 = function(base64) {
|
|
665
|
-
var bufferLength = base64.length * .75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
|
|
666
|
-
if (base64[base64.length - 1] === "=") {
|
|
667
|
-
bufferLength--;
|
|
668
|
-
if (base64[base64.length - 2] === "=") bufferLength--;
|
|
669
|
-
}
|
|
670
|
-
var buffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined" && typeof Uint8Array.prototype.slice !== "undefined" ? new ArrayBuffer(bufferLength) : new Array(bufferLength);
|
|
671
|
-
var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);
|
|
672
|
-
for (i = 0; i < len; i += 4) {
|
|
673
|
-
encoded1 = lookup$1$1[base64.charCodeAt(i)];
|
|
674
|
-
encoded2 = lookup$1$1[base64.charCodeAt(i + 1)];
|
|
675
|
-
encoded3 = lookup$1$1[base64.charCodeAt(i + 2)];
|
|
676
|
-
encoded4 = lookup$1$1[base64.charCodeAt(i + 3)];
|
|
677
|
-
bytes[p++] = encoded1 << 2 | encoded2 >> 4;
|
|
678
|
-
bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;
|
|
679
|
-
bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;
|
|
680
|
-
}
|
|
681
|
-
return buffer;
|
|
682
|
-
};
|
|
683
|
-
var polyUint16Array$1 = function(buffer) {
|
|
684
|
-
var length = buffer.length;
|
|
685
|
-
var bytes = [];
|
|
686
|
-
for (var i = 0; i < length; i += 2) bytes.push(buffer[i + 1] << 8 | buffer[i]);
|
|
687
|
-
return bytes;
|
|
688
|
-
};
|
|
689
|
-
var polyUint32Array$1 = function(buffer) {
|
|
690
|
-
var length = buffer.length;
|
|
691
|
-
var bytes = [];
|
|
692
|
-
for (var i = 0; i < length; i += 4) bytes.push(buffer[i + 3] << 24 | buffer[i + 2] << 16 | buffer[i + 1] << 8 | buffer[i]);
|
|
693
|
-
return bytes;
|
|
694
|
-
};
|
|
695
|
-
/** Shift size for getting the index-2 table offset. */
|
|
696
|
-
var UTRIE2_SHIFT_2$1 = 5;
|
|
697
|
-
/** Shift size for getting the index-1 table offset. */
|
|
698
|
-
var UTRIE2_SHIFT_1$1 = 11;
|
|
699
|
-
/**
|
|
700
|
-
* Shift size for shifting left the index array values.
|
|
701
|
-
* Increases possible data size with 16-bit index values at the cost
|
|
702
|
-
* of compactability.
|
|
703
|
-
* This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.
|
|
704
|
-
*/
|
|
705
|
-
var UTRIE2_INDEX_SHIFT$1 = 2;
|
|
706
|
-
/**
|
|
707
|
-
* Difference between the two shift sizes,
|
|
708
|
-
* for getting an index-1 offset from an index-2 offset. 6=11-5
|
|
709
|
-
*/
|
|
710
|
-
var UTRIE2_SHIFT_1_2$1 = UTRIE2_SHIFT_1$1 - UTRIE2_SHIFT_2$1;
|
|
711
|
-
/**
|
|
712
|
-
* The part of the index-2 table for U+D800..U+DBFF stores values for
|
|
713
|
-
* lead surrogate code _units_ not code _points_.
|
|
714
|
-
* Values for lead surrogate code _points_ are indexed with this portion of the table.
|
|
715
|
-
* Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)
|
|
716
|
-
*/
|
|
717
|
-
var UTRIE2_LSCP_INDEX_2_OFFSET$1 = 65536 >> UTRIE2_SHIFT_2$1;
|
|
718
|
-
/** Mask for getting the lower bits for the in-data-block offset. */
|
|
719
|
-
var UTRIE2_DATA_MASK$1 = (1 << UTRIE2_SHIFT_2$1) - 1;
|
|
720
|
-
/**
|
|
721
|
-
* The index-1 table, only used for supplementary code points, at offset 2112=0x840.
|
|
722
|
-
* Variable length, for code points up to highStart, where the last single-value range starts.
|
|
723
|
-
* Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.
|
|
724
|
-
* (For 0x100000 supplementary code points U+10000..U+10ffff.)
|
|
725
|
-
*
|
|
726
|
-
* The part of the index-2 table for supplementary code points starts
|
|
727
|
-
* after this index-1 table.
|
|
728
|
-
*
|
|
729
|
-
* Both the index-1 table and the following part of the index-2 table
|
|
730
|
-
* are omitted completely if there is only BMP data.
|
|
731
|
-
*/
|
|
732
|
-
var UTRIE2_INDEX_1_OFFSET$1 = UTRIE2_LSCP_INDEX_2_OFFSET$1 + (1024 >> UTRIE2_SHIFT_2$1) + 32;
|
|
733
|
-
/**
|
|
734
|
-
* Number of index-1 entries for the BMP. 32=0x20
|
|
735
|
-
* This part of the index-1 table is omitted from the serialized form.
|
|
736
|
-
*/
|
|
737
|
-
var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH$1 = 65536 >> UTRIE2_SHIFT_1$1;
|
|
738
|
-
/** Mask for getting the lower bits for the in-index-2-block offset. */
|
|
739
|
-
var UTRIE2_INDEX_2_MASK$1 = (1 << UTRIE2_SHIFT_1_2$1) - 1;
|
|
740
|
-
var slice16$1 = function(view, start, end) {
|
|
741
|
-
if (view.slice) return view.slice(start, end);
|
|
742
|
-
return new Uint16Array(Array.prototype.slice.call(view, start, end));
|
|
743
|
-
};
|
|
744
|
-
var slice32$1 = function(view, start, end) {
|
|
745
|
-
if (view.slice) return view.slice(start, end);
|
|
746
|
-
return new Uint32Array(Array.prototype.slice.call(view, start, end));
|
|
747
|
-
};
|
|
748
|
-
var createTrieFromBase64$1 = function(base64, _byteLength) {
|
|
749
|
-
var buffer = decode$1(base64);
|
|
750
|
-
var view32 = Array.isArray(buffer) ? polyUint32Array$1(buffer) : new Uint32Array(buffer);
|
|
751
|
-
var view16 = Array.isArray(buffer) ? polyUint16Array$1(buffer) : new Uint16Array(buffer);
|
|
752
|
-
var headerLength = 24;
|
|
753
|
-
var index = slice16$1(view16, headerLength / 2, view32[4] / 2);
|
|
754
|
-
var data = view32[5] === 2 ? slice16$1(view16, (headerLength + view32[4]) / 2) : slice32$1(view32, Math.ceil((headerLength + view32[4]) / 4));
|
|
755
|
-
return new Trie$1(view32[0], view32[1], view32[2], view32[3], index, data);
|
|
756
|
-
};
|
|
757
|
-
var Trie$1 = function() {
|
|
758
|
-
function Trie(initialValue, errorValue, highStart, highValueIndex, index, data) {
|
|
759
|
-
this.initialValue = initialValue;
|
|
760
|
-
this.errorValue = errorValue;
|
|
761
|
-
this.highStart = highStart;
|
|
762
|
-
this.highValueIndex = highValueIndex;
|
|
763
|
-
this.index = index;
|
|
764
|
-
this.data = data;
|
|
765
|
-
}
|
|
766
|
-
/**
|
|
767
|
-
* Get the value for a code point as stored in the Trie.
|
|
768
|
-
*
|
|
769
|
-
* @param codePoint the code point
|
|
770
|
-
* @return the value
|
|
771
|
-
*/
|
|
772
|
-
Trie.prototype.get = function(codePoint) {
|
|
773
|
-
var ix;
|
|
774
|
-
if (codePoint >= 0) {
|
|
775
|
-
if (codePoint < 55296 || codePoint > 56319 && codePoint <= 65535) {
|
|
776
|
-
ix = this.index[codePoint >> UTRIE2_SHIFT_2$1];
|
|
777
|
-
ix = (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1);
|
|
778
|
-
return this.data[ix];
|
|
779
|
-
}
|
|
780
|
-
if (codePoint <= 65535) {
|
|
781
|
-
ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET$1 + (codePoint - 55296 >> UTRIE2_SHIFT_2$1)];
|
|
782
|
-
ix = (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1);
|
|
783
|
-
return this.data[ix];
|
|
784
|
-
}
|
|
785
|
-
if (codePoint < this.highStart) {
|
|
786
|
-
ix = UTRIE2_INDEX_1_OFFSET$1 - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH$1 + (codePoint >> UTRIE2_SHIFT_1$1);
|
|
787
|
-
ix = this.index[ix];
|
|
788
|
-
ix += codePoint >> UTRIE2_SHIFT_2$1 & UTRIE2_INDEX_2_MASK$1;
|
|
789
|
-
ix = this.index[ix];
|
|
790
|
-
ix = (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1);
|
|
791
|
-
return this.data[ix];
|
|
792
|
-
}
|
|
793
|
-
if (codePoint <= 1114111) return this.data[this.highValueIndex];
|
|
794
|
-
}
|
|
795
|
-
return this.errorValue;
|
|
796
|
-
};
|
|
797
|
-
return Trie;
|
|
798
|
-
}();
|
|
799
|
-
var chars$3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
800
|
-
var lookup$3 = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);
|
|
801
|
-
for (var i$3 = 0; i$3 < chars$3.length; i$3++) lookup$3[chars$3.charCodeAt(i$3)] = i$3;
|
|
802
|
-
var base64$1 = "KwA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xMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHL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GgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHA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BYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADA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QAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4AB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gAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKw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KwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAl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ACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==";
|
|
803
|
-
var LETTER_NUMBER_MODIFIER = 50;
|
|
804
|
-
var BK = 1;
|
|
805
|
-
var CR$1 = 2;
|
|
806
|
-
var LF$1 = 3;
|
|
807
|
-
var CM = 4;
|
|
808
|
-
var NL = 5;
|
|
809
|
-
var WJ = 7;
|
|
810
|
-
var ZW = 8;
|
|
811
|
-
var GL = 9;
|
|
812
|
-
var SP = 10;
|
|
813
|
-
var ZWJ$1 = 11;
|
|
814
|
-
var B2 = 12;
|
|
815
|
-
var BA = 13;
|
|
816
|
-
var BB = 14;
|
|
817
|
-
var HY = 15;
|
|
818
|
-
var CB = 16;
|
|
819
|
-
var CL = 17;
|
|
820
|
-
var CP = 18;
|
|
821
|
-
var EX = 19;
|
|
822
|
-
var IN = 20;
|
|
823
|
-
var NS = 21;
|
|
824
|
-
var OP = 22;
|
|
825
|
-
var QU = 23;
|
|
826
|
-
var IS = 24;
|
|
827
|
-
var NU = 25;
|
|
828
|
-
var PO = 26;
|
|
829
|
-
var PR = 27;
|
|
830
|
-
var SY = 28;
|
|
831
|
-
var AI = 29;
|
|
832
|
-
var AL = 30;
|
|
833
|
-
var CJ = 31;
|
|
834
|
-
var EB = 32;
|
|
835
|
-
var EM = 33;
|
|
836
|
-
var H2 = 34;
|
|
837
|
-
var H3 = 35;
|
|
838
|
-
var HL = 36;
|
|
839
|
-
var ID = 37;
|
|
840
|
-
var JL = 38;
|
|
841
|
-
var JV = 39;
|
|
842
|
-
var JT = 40;
|
|
843
|
-
var RI$1 = 41;
|
|
844
|
-
var SA = 42;
|
|
845
|
-
var XX = 43;
|
|
846
|
-
var ea_OP = [9001, 65288];
|
|
847
|
-
var BREAK_MANDATORY = "!";
|
|
848
|
-
var BREAK_NOT_ALLOWED$1 = "×";
|
|
849
|
-
var BREAK_ALLOWED$1 = "÷";
|
|
850
|
-
var UnicodeTrie$1 = createTrieFromBase64$1(base64$1);
|
|
851
|
-
var ALPHABETICS = [AL, HL];
|
|
852
|
-
var HARD_LINE_BREAKS = [
|
|
853
|
-
BK,
|
|
854
|
-
CR$1,
|
|
855
|
-
LF$1,
|
|
856
|
-
NL
|
|
857
|
-
];
|
|
858
|
-
var SPACE$1 = [SP, ZW];
|
|
859
|
-
var PREFIX_POSTFIX = [PR, PO];
|
|
860
|
-
var LINE_BREAKS = HARD_LINE_BREAKS.concat(SPACE$1);
|
|
861
|
-
var KOREAN_SYLLABLE_BLOCK = [
|
|
862
|
-
JL,
|
|
863
|
-
JV,
|
|
864
|
-
JT,
|
|
865
|
-
H2,
|
|
866
|
-
H3
|
|
867
|
-
];
|
|
868
|
-
var HYPHEN = [HY, BA];
|
|
869
|
-
var codePointsToCharacterClasses = function(codePoints, lineBreak) {
|
|
870
|
-
if (lineBreak === void 0) lineBreak = "strict";
|
|
871
|
-
var types = [];
|
|
872
|
-
var indices = [];
|
|
873
|
-
var categories = [];
|
|
874
|
-
codePoints.forEach(function(codePoint, index) {
|
|
875
|
-
var classType = UnicodeTrie$1.get(codePoint);
|
|
876
|
-
if (classType > LETTER_NUMBER_MODIFIER) {
|
|
877
|
-
categories.push(true);
|
|
878
|
-
classType -= LETTER_NUMBER_MODIFIER;
|
|
879
|
-
} else categories.push(false);
|
|
880
|
-
if ([
|
|
881
|
-
"normal",
|
|
882
|
-
"auto",
|
|
883
|
-
"loose"
|
|
884
|
-
].indexOf(lineBreak) !== -1) {
|
|
885
|
-
if ([
|
|
886
|
-
8208,
|
|
887
|
-
8211,
|
|
888
|
-
12316,
|
|
889
|
-
12448
|
|
890
|
-
].indexOf(codePoint) !== -1) {
|
|
891
|
-
indices.push(index);
|
|
892
|
-
return types.push(CB);
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
if (classType === CM || classType === ZWJ$1) {
|
|
896
|
-
if (index === 0) {
|
|
897
|
-
indices.push(index);
|
|
898
|
-
return types.push(AL);
|
|
899
|
-
}
|
|
900
|
-
var prev = types[index - 1];
|
|
901
|
-
if (LINE_BREAKS.indexOf(prev) === -1) {
|
|
902
|
-
indices.push(indices[index - 1]);
|
|
903
|
-
return types.push(prev);
|
|
904
|
-
}
|
|
905
|
-
indices.push(index);
|
|
906
|
-
return types.push(AL);
|
|
907
|
-
}
|
|
908
|
-
indices.push(index);
|
|
909
|
-
if (classType === CJ) return types.push(lineBreak === "strict" ? NS : ID);
|
|
910
|
-
if (classType === SA) return types.push(AL);
|
|
911
|
-
if (classType === AI) return types.push(AL);
|
|
912
|
-
if (classType === XX) {
|
|
913
|
-
if (codePoint >= 131072 && codePoint <= 196605 || codePoint >= 196608 && codePoint <= 262141) return types.push(ID);
|
|
914
|
-
else return types.push(AL);
|
|
915
|
-
}
|
|
916
|
-
types.push(classType);
|
|
917
|
-
});
|
|
918
|
-
return [
|
|
919
|
-
indices,
|
|
920
|
-
types,
|
|
921
|
-
categories
|
|
922
|
-
];
|
|
923
|
-
};
|
|
924
|
-
var isAdjacentWithSpaceIgnored = function(a, b, currentIndex, classTypes) {
|
|
925
|
-
var current = classTypes[currentIndex];
|
|
926
|
-
if (Array.isArray(a) ? a.indexOf(current) !== -1 : a === current) {
|
|
927
|
-
var i = currentIndex;
|
|
928
|
-
while (i <= classTypes.length) {
|
|
929
|
-
i++;
|
|
930
|
-
var next = classTypes[i];
|
|
931
|
-
if (next === b) return true;
|
|
932
|
-
if (next !== SP) break;
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
if (current === SP) {
|
|
936
|
-
var i = currentIndex;
|
|
937
|
-
while (i > 0) {
|
|
938
|
-
i--;
|
|
939
|
-
var prev = classTypes[i];
|
|
940
|
-
if (Array.isArray(a) ? a.indexOf(prev) !== -1 : a === prev) {
|
|
941
|
-
var n = currentIndex;
|
|
942
|
-
while (n <= classTypes.length) {
|
|
943
|
-
n++;
|
|
944
|
-
var next = classTypes[n];
|
|
945
|
-
if (next === b) return true;
|
|
946
|
-
if (next !== SP) break;
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
if (prev !== SP) break;
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
return false;
|
|
953
|
-
};
|
|
954
|
-
var previousNonSpaceClassType = function(currentIndex, classTypes) {
|
|
955
|
-
var i = currentIndex;
|
|
956
|
-
while (i >= 0) {
|
|
957
|
-
var type = classTypes[i];
|
|
958
|
-
if (type === SP) i--;
|
|
959
|
-
else return type;
|
|
960
|
-
}
|
|
961
|
-
return 0;
|
|
962
|
-
};
|
|
963
|
-
var _lineBreakAtIndex = function(codePoints, classTypes, indicies, index, forbiddenBreaks) {
|
|
964
|
-
if (indicies[index] === 0) return BREAK_NOT_ALLOWED$1;
|
|
965
|
-
var currentIndex = index - 1;
|
|
966
|
-
if (Array.isArray(forbiddenBreaks) && forbiddenBreaks[currentIndex] === true) return BREAK_NOT_ALLOWED$1;
|
|
967
|
-
var beforeIndex = currentIndex - 1;
|
|
968
|
-
var afterIndex = currentIndex + 1;
|
|
969
|
-
var current = classTypes[currentIndex];
|
|
970
|
-
var before = beforeIndex >= 0 ? classTypes[beforeIndex] : 0;
|
|
971
|
-
var next = classTypes[afterIndex];
|
|
972
|
-
if (current === CR$1 && next === LF$1) return BREAK_NOT_ALLOWED$1;
|
|
973
|
-
if (HARD_LINE_BREAKS.indexOf(current) !== -1) return BREAK_MANDATORY;
|
|
974
|
-
if (HARD_LINE_BREAKS.indexOf(next) !== -1) return BREAK_NOT_ALLOWED$1;
|
|
975
|
-
if (SPACE$1.indexOf(next) !== -1) return BREAK_NOT_ALLOWED$1;
|
|
976
|
-
if (previousNonSpaceClassType(currentIndex, classTypes) === ZW) return BREAK_ALLOWED$1;
|
|
977
|
-
if (UnicodeTrie$1.get(codePoints[currentIndex]) === ZWJ$1) return BREAK_NOT_ALLOWED$1;
|
|
978
|
-
if ((current === EB || current === EM) && UnicodeTrie$1.get(codePoints[afterIndex]) === ZWJ$1) return BREAK_NOT_ALLOWED$1;
|
|
979
|
-
if (current === WJ || next === WJ) return BREAK_NOT_ALLOWED$1;
|
|
980
|
-
if (current === GL) return BREAK_NOT_ALLOWED$1;
|
|
981
|
-
if ([
|
|
982
|
-
SP,
|
|
983
|
-
BA,
|
|
984
|
-
HY
|
|
985
|
-
].indexOf(current) === -1 && next === GL) return BREAK_NOT_ALLOWED$1;
|
|
986
|
-
if ([
|
|
987
|
-
CL,
|
|
988
|
-
CP,
|
|
989
|
-
EX,
|
|
990
|
-
IS,
|
|
991
|
-
SY
|
|
992
|
-
].indexOf(next) !== -1) return BREAK_NOT_ALLOWED$1;
|
|
993
|
-
if (previousNonSpaceClassType(currentIndex, classTypes) === OP) return BREAK_NOT_ALLOWED$1;
|
|
994
|
-
if (isAdjacentWithSpaceIgnored(QU, OP, currentIndex, classTypes)) return BREAK_NOT_ALLOWED$1;
|
|
995
|
-
if (isAdjacentWithSpaceIgnored([CL, CP], NS, currentIndex, classTypes)) return BREAK_NOT_ALLOWED$1;
|
|
996
|
-
if (isAdjacentWithSpaceIgnored(B2, B2, currentIndex, classTypes)) return BREAK_NOT_ALLOWED$1;
|
|
997
|
-
if (current === SP) return BREAK_ALLOWED$1;
|
|
998
|
-
if (current === QU || next === QU) return BREAK_NOT_ALLOWED$1;
|
|
999
|
-
if (next === CB || current === CB) return BREAK_ALLOWED$1;
|
|
1000
|
-
if ([
|
|
1001
|
-
BA,
|
|
1002
|
-
HY,
|
|
1003
|
-
NS
|
|
1004
|
-
].indexOf(next) !== -1 || current === BB) return BREAK_NOT_ALLOWED$1;
|
|
1005
|
-
if (before === HL && HYPHEN.indexOf(current) !== -1) return BREAK_NOT_ALLOWED$1;
|
|
1006
|
-
if (current === SY && next === HL) return BREAK_NOT_ALLOWED$1;
|
|
1007
|
-
if (next === IN) return BREAK_NOT_ALLOWED$1;
|
|
1008
|
-
if (ALPHABETICS.indexOf(next) !== -1 && current === NU || ALPHABETICS.indexOf(current) !== -1 && next === NU) return BREAK_NOT_ALLOWED$1;
|
|
1009
|
-
if (current === PR && [
|
|
1010
|
-
ID,
|
|
1011
|
-
EB,
|
|
1012
|
-
EM
|
|
1013
|
-
].indexOf(next) !== -1 || [
|
|
1014
|
-
ID,
|
|
1015
|
-
EB,
|
|
1016
|
-
EM
|
|
1017
|
-
].indexOf(current) !== -1 && next === PO) return BREAK_NOT_ALLOWED$1;
|
|
1018
|
-
if (ALPHABETICS.indexOf(current) !== -1 && PREFIX_POSTFIX.indexOf(next) !== -1 || PREFIX_POSTFIX.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1) return BREAK_NOT_ALLOWED$1;
|
|
1019
|
-
if ([PR, PO].indexOf(current) !== -1 && (next === NU || [OP, HY].indexOf(next) !== -1 && classTypes[afterIndex + 1] === NU) || [OP, HY].indexOf(current) !== -1 && next === NU || current === NU && [
|
|
1020
|
-
NU,
|
|
1021
|
-
SY,
|
|
1022
|
-
IS
|
|
1023
|
-
].indexOf(next) !== -1) return BREAK_NOT_ALLOWED$1;
|
|
1024
|
-
if ([
|
|
1025
|
-
NU,
|
|
1026
|
-
SY,
|
|
1027
|
-
IS,
|
|
1028
|
-
CL,
|
|
1029
|
-
CP
|
|
1030
|
-
].indexOf(next) !== -1) {
|
|
1031
|
-
var prevIndex = currentIndex;
|
|
1032
|
-
while (prevIndex >= 0) {
|
|
1033
|
-
var type = classTypes[prevIndex];
|
|
1034
|
-
if (type === NU) return BREAK_NOT_ALLOWED$1;
|
|
1035
|
-
else if ([SY, IS].indexOf(type) !== -1) prevIndex--;
|
|
1036
|
-
else break;
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
if ([PR, PO].indexOf(next) !== -1) {
|
|
1040
|
-
var prevIndex = [CL, CP].indexOf(current) !== -1 ? beforeIndex : currentIndex;
|
|
1041
|
-
while (prevIndex >= 0) {
|
|
1042
|
-
var type = classTypes[prevIndex];
|
|
1043
|
-
if (type === NU) return BREAK_NOT_ALLOWED$1;
|
|
1044
|
-
else if ([SY, IS].indexOf(type) !== -1) prevIndex--;
|
|
1045
|
-
else break;
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
if (JL === current && [
|
|
1049
|
-
JL,
|
|
1050
|
-
JV,
|
|
1051
|
-
H2,
|
|
1052
|
-
H3
|
|
1053
|
-
].indexOf(next) !== -1 || [JV, H2].indexOf(current) !== -1 && [JV, JT].indexOf(next) !== -1 || [JT, H3].indexOf(current) !== -1 && next === JT) return BREAK_NOT_ALLOWED$1;
|
|
1054
|
-
if (KOREAN_SYLLABLE_BLOCK.indexOf(current) !== -1 && [IN, PO].indexOf(next) !== -1 || KOREAN_SYLLABLE_BLOCK.indexOf(next) !== -1 && current === PR) return BREAK_NOT_ALLOWED$1;
|
|
1055
|
-
if (ALPHABETICS.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1) return BREAK_NOT_ALLOWED$1;
|
|
1056
|
-
if (current === IS && ALPHABETICS.indexOf(next) !== -1) return BREAK_NOT_ALLOWED$1;
|
|
1057
|
-
if (ALPHABETICS.concat(NU).indexOf(current) !== -1 && next === OP && ea_OP.indexOf(codePoints[afterIndex]) === -1 || ALPHABETICS.concat(NU).indexOf(next) !== -1 && current === CP) return BREAK_NOT_ALLOWED$1;
|
|
1058
|
-
if (current === RI$1 && next === RI$1) {
|
|
1059
|
-
var i = indicies[currentIndex];
|
|
1060
|
-
var count = 1;
|
|
1061
|
-
while (i > 0) {
|
|
1062
|
-
i--;
|
|
1063
|
-
if (classTypes[i] === RI$1) count++;
|
|
1064
|
-
else break;
|
|
1065
|
-
}
|
|
1066
|
-
if (count % 2 !== 0) return BREAK_NOT_ALLOWED$1;
|
|
1067
|
-
}
|
|
1068
|
-
if (current === EB && next === EM) return BREAK_NOT_ALLOWED$1;
|
|
1069
|
-
return BREAK_ALLOWED$1;
|
|
1070
|
-
};
|
|
1071
|
-
var cssFormattedClasses = function(codePoints, options) {
|
|
1072
|
-
if (!options) options = {
|
|
1073
|
-
lineBreak: "normal",
|
|
1074
|
-
wordBreak: "normal"
|
|
1075
|
-
};
|
|
1076
|
-
var _a = codePointsToCharacterClasses(codePoints, options.lineBreak), indicies = _a[0], classTypes = _a[1], isLetterNumber = _a[2];
|
|
1077
|
-
if (options.wordBreak === "break-all" || options.wordBreak === "break-word") classTypes = classTypes.map(function(type) {
|
|
1078
|
-
return [
|
|
1079
|
-
NU,
|
|
1080
|
-
AL,
|
|
1081
|
-
SA
|
|
1082
|
-
].indexOf(type) !== -1 ? ID : type;
|
|
1083
|
-
});
|
|
1084
|
-
var forbiddenBreakpoints = options.wordBreak === "keep-all" ? isLetterNumber.map(function(letterNumber, i) {
|
|
1085
|
-
return letterNumber && codePoints[i] >= 19968 && codePoints[i] <= 40959;
|
|
1086
|
-
}) : void 0;
|
|
1087
|
-
return [
|
|
1088
|
-
indicies,
|
|
1089
|
-
classTypes,
|
|
1090
|
-
forbiddenBreakpoints
|
|
1091
|
-
];
|
|
1092
|
-
};
|
|
1093
|
-
var Break = function() {
|
|
1094
|
-
function Break(codePoints, lineBreak, start, end) {
|
|
1095
|
-
this.codePoints = codePoints;
|
|
1096
|
-
this.required = lineBreak === BREAK_MANDATORY;
|
|
1097
|
-
this.start = start;
|
|
1098
|
-
this.end = end;
|
|
1099
|
-
}
|
|
1100
|
-
Break.prototype.slice = function() {
|
|
1101
|
-
return fromCodePoint$1.apply(void 0, this.codePoints.slice(this.start, this.end));
|
|
1102
|
-
};
|
|
1103
|
-
return Break;
|
|
1104
|
-
}();
|
|
1105
|
-
var LineBreaker = function(str, options) {
|
|
1106
|
-
var codePoints = toCodePoints$1(str);
|
|
1107
|
-
var _a = cssFormattedClasses(codePoints, options), indicies = _a[0], classTypes = _a[1], forbiddenBreakpoints = _a[2];
|
|
1108
|
-
var length = codePoints.length;
|
|
1109
|
-
var lastEnd = 0;
|
|
1110
|
-
var nextIndex = 0;
|
|
1111
|
-
return { next: function() {
|
|
1112
|
-
if (nextIndex >= length) return {
|
|
1113
|
-
done: true,
|
|
1114
|
-
value: null
|
|
1115
|
-
};
|
|
1116
|
-
var lineBreak = BREAK_NOT_ALLOWED$1;
|
|
1117
|
-
while (nextIndex < length && (lineBreak = _lineBreakAtIndex(codePoints, classTypes, indicies, ++nextIndex, forbiddenBreakpoints)) === BREAK_NOT_ALLOWED$1);
|
|
1118
|
-
if (lineBreak !== BREAK_NOT_ALLOWED$1 || nextIndex === length) {
|
|
1119
|
-
var value = new Break(codePoints, lineBreak, lastEnd, nextIndex);
|
|
1120
|
-
lastEnd = nextIndex;
|
|
1121
|
-
return {
|
|
1122
|
-
value,
|
|
1123
|
-
done: false
|
|
1124
|
-
};
|
|
1125
|
-
}
|
|
1126
|
-
return {
|
|
1127
|
-
done: true,
|
|
1128
|
-
value: null
|
|
1129
|
-
};
|
|
1130
|
-
} };
|
|
1131
|
-
};
|
|
1132
|
-
//#endregion
|
|
1133
625
|
//#region src/core/util.ts
|
|
1134
626
|
/**
|
|
1135
627
|
* Indexed access where the shape/arity is guaranteed by construction (the CSS
|
|
@@ -1185,7 +677,7 @@
|
|
|
1185
677
|
integers.push(at(codePoints, c));
|
|
1186
678
|
c++;
|
|
1187
679
|
}
|
|
1188
|
-
const int = integers.length ? parseInt(fromCodePoint
|
|
680
|
+
const int = integers.length ? parseInt(String.fromCodePoint(...integers), 10) : 0;
|
|
1189
681
|
if (codePoints[c] === 46) c++;
|
|
1190
682
|
const fraction = [];
|
|
1191
683
|
while (isDigit(codePoints[c] ?? NaN)) {
|
|
@@ -1193,7 +685,7 @@
|
|
|
1193
685
|
c++;
|
|
1194
686
|
}
|
|
1195
687
|
const fracd = fraction.length;
|
|
1196
|
-
const frac = fracd ? parseInt(fromCodePoint
|
|
688
|
+
const frac = fracd ? parseInt(String.fromCodePoint(...fraction), 10) : 0;
|
|
1197
689
|
if (codePoints[c] === 69 || codePoints[c] === 101) c++;
|
|
1198
690
|
let expsign = 1;
|
|
1199
691
|
if (codePoints[c] === 43 || codePoints[c] === 45) {
|
|
@@ -1205,7 +697,7 @@
|
|
|
1205
697
|
exponent.push(at(codePoints, c));
|
|
1206
698
|
c++;
|
|
1207
699
|
}
|
|
1208
|
-
const exp = exponent.length ? parseInt(fromCodePoint
|
|
700
|
+
const exp = exponent.length ? parseInt(String.fromCodePoint(...exponent), 10) : 0;
|
|
1209
701
|
return sign * (int + frac * Math.pow(10, -fracd)) * Math.pow(10, expsign * exp);
|
|
1210
702
|
};
|
|
1211
703
|
//#endregion
|
|
@@ -1234,12 +726,8 @@
|
|
|
1234
726
|
//#endregion
|
|
1235
727
|
//#region src/css/syntax/tokenizer.ts
|
|
1236
728
|
var Tokenizer = class Tokenizer {
|
|
1237
|
-
static
|
|
1238
|
-
|
|
1239
|
-
}
|
|
1240
|
-
static {
|
|
1241
|
-
this.MAX_POOL_SIZE = 40;
|
|
1242
|
-
}
|
|
729
|
+
static _pool = [];
|
|
730
|
+
static MAX_POOL_SIZE = 40;
|
|
1243
731
|
static get() {
|
|
1244
732
|
return Tokenizer._pool.pop() || new Tokenizer();
|
|
1245
733
|
}
|
|
@@ -1249,14 +737,29 @@
|
|
|
1249
737
|
Tokenizer._pool.push(tokenizer);
|
|
1250
738
|
}
|
|
1251
739
|
}
|
|
740
|
+
_value;
|
|
741
|
+
/**
|
|
742
|
+
* Read cursor into `_value`. Consumption advances the cursor instead of
|
|
743
|
+
* shifting the array — `Array.shift()` per code point makes tokenising a
|
|
744
|
+
* long value O(n²) (a 200 KB inline data-URI background alone would cost
|
|
745
|
+
* billions of operations, and background-image values are never parse-
|
|
746
|
+
* cached). `write()` compacts already-consumed prefix bytes.
|
|
747
|
+
*/
|
|
748
|
+
_cursor;
|
|
1252
749
|
constructor() {
|
|
1253
750
|
this._value = [];
|
|
751
|
+
this._cursor = 0;
|
|
1254
752
|
}
|
|
1255
753
|
_reset() {
|
|
1256
754
|
this._value = [];
|
|
755
|
+
this._cursor = 0;
|
|
1257
756
|
}
|
|
1258
757
|
write(chunk) {
|
|
1259
|
-
this.
|
|
758
|
+
if (this._cursor > 0) {
|
|
759
|
+
this._value = this._value.slice(this._cursor);
|
|
760
|
+
this._cursor = 0;
|
|
761
|
+
}
|
|
762
|
+
this._value = this._value.concat([...chunk].map((char) => char.codePointAt(0)));
|
|
1260
763
|
}
|
|
1261
764
|
read() {
|
|
1262
765
|
const tokens = [];
|
|
@@ -1424,19 +927,21 @@
|
|
|
1424
927
|
}
|
|
1425
928
|
return {
|
|
1426
929
|
type: 6,
|
|
1427
|
-
value: fromCodePoint
|
|
930
|
+
value: String.fromCodePoint(codePoint)
|
|
1428
931
|
};
|
|
1429
932
|
}
|
|
1430
933
|
consumeCodePoint() {
|
|
1431
|
-
const value = this._value.
|
|
1432
|
-
|
|
934
|
+
const value = this._value[this._cursor];
|
|
935
|
+
if (value === void 0) return -1;
|
|
936
|
+
this._cursor++;
|
|
937
|
+
return value;
|
|
1433
938
|
}
|
|
1434
939
|
reconsumeCodePoint(codePoint) {
|
|
1435
|
-
this._value.
|
|
940
|
+
if (this._cursor > 0 && this._value[this._cursor - 1] === codePoint) this._cursor--;
|
|
941
|
+
else this._value.splice(this._cursor, 0, codePoint);
|
|
1436
942
|
}
|
|
1437
943
|
peekCodePoint(delta) {
|
|
1438
|
-
|
|
1439
|
-
const codePoint = this._value[delta];
|
|
944
|
+
const codePoint = this._value[this._cursor + delta];
|
|
1440
945
|
return codePoint !== void 0 ? codePoint : -1;
|
|
1441
946
|
}
|
|
1442
947
|
consumeUnicodeRangeToken() {
|
|
@@ -1454,10 +959,10 @@
|
|
|
1454
959
|
}
|
|
1455
960
|
if (questionMarks) return {
|
|
1456
961
|
type: 30,
|
|
1457
|
-
start: parseInt(fromCodePoint
|
|
1458
|
-
end: parseInt(fromCodePoint
|
|
962
|
+
start: parseInt(String.fromCodePoint(...digits.map((digit) => digit === 63 ? 48 : digit)), 16),
|
|
963
|
+
end: parseInt(String.fromCodePoint(...digits.map((digit) => digit === 63 ? 70 : digit)), 16)
|
|
1459
964
|
};
|
|
1460
|
-
const start = parseInt(fromCodePoint
|
|
965
|
+
const start = parseInt(String.fromCodePoint(...digits), 16);
|
|
1461
966
|
if (codePoint === 45 && isHex(this.peekCodePoint(0))) {
|
|
1462
967
|
codePoint = this.consumeCodePoint();
|
|
1463
968
|
const endDigits = [];
|
|
@@ -1468,7 +973,7 @@
|
|
|
1468
973
|
return {
|
|
1469
974
|
type: 30,
|
|
1470
975
|
start,
|
|
1471
|
-
end: parseInt(fromCodePoint
|
|
976
|
+
end: parseInt(String.fromCodePoint(...endDigits), 16)
|
|
1472
977
|
};
|
|
1473
978
|
} else return {
|
|
1474
979
|
type: 30,
|
|
@@ -1520,7 +1025,7 @@
|
|
|
1520
1025
|
const codePoint = this.consumeCodePoint();
|
|
1521
1026
|
if (codePoint === -1 || codePoint === 41) return {
|
|
1522
1027
|
type: 22,
|
|
1523
|
-
value: fromCodePoint
|
|
1028
|
+
value: String.fromCodePoint(...value)
|
|
1524
1029
|
};
|
|
1525
1030
|
else if (isWhiteSpace(codePoint)) {
|
|
1526
1031
|
this.consumeWhiteSpace();
|
|
@@ -1528,7 +1033,7 @@
|
|
|
1528
1033
|
this.consumeCodePoint();
|
|
1529
1034
|
return {
|
|
1530
1035
|
type: 22,
|
|
1531
|
-
value: fromCodePoint
|
|
1036
|
+
value: String.fromCodePoint(...value)
|
|
1532
1037
|
};
|
|
1533
1038
|
}
|
|
1534
1039
|
this.consumeBadUrlRemnants();
|
|
@@ -1558,19 +1063,21 @@
|
|
|
1558
1063
|
consumeStringSlice(count) {
|
|
1559
1064
|
const SLICE_STACK_SIZE = 5e4;
|
|
1560
1065
|
let value = "";
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1066
|
+
const end = this._cursor + count;
|
|
1067
|
+
let from = this._cursor;
|
|
1068
|
+
while (from < end) {
|
|
1069
|
+
const to = Math.min(end, from + SLICE_STACK_SIZE);
|
|
1070
|
+
value += String.fromCodePoint(...this._value.slice(from, to));
|
|
1071
|
+
from = to;
|
|
1072
|
+
}
|
|
1073
|
+
this._cursor = end + 1;
|
|
1567
1074
|
return value;
|
|
1568
1075
|
}
|
|
1569
1076
|
consumeStringToken(endingCodePoint) {
|
|
1570
1077
|
let value = "";
|
|
1571
1078
|
let i = 0;
|
|
1572
1079
|
do {
|
|
1573
|
-
const codePoint = this._value[i];
|
|
1080
|
+
const codePoint = this._value[this._cursor + i];
|
|
1574
1081
|
if (codePoint === -1 || codePoint === void 0 || codePoint === endingCodePoint) {
|
|
1575
1082
|
value += this.consumeStringSlice(i);
|
|
1576
1083
|
return {
|
|
@@ -1579,19 +1086,19 @@
|
|
|
1579
1086
|
};
|
|
1580
1087
|
}
|
|
1581
1088
|
if (codePoint === 10) {
|
|
1582
|
-
this.
|
|
1089
|
+
this._cursor += i;
|
|
1583
1090
|
return BAD_STRING_TOKEN;
|
|
1584
1091
|
}
|
|
1585
1092
|
if (codePoint === 92) {
|
|
1586
|
-
const next = this._value[i + 1];
|
|
1093
|
+
const next = this._value[this._cursor + i + 1];
|
|
1587
1094
|
if (next !== -1 && next !== void 0) {
|
|
1588
1095
|
if (next === 10) {
|
|
1589
1096
|
value += this.consumeStringSlice(i);
|
|
1590
1097
|
i = -1;
|
|
1591
|
-
this.
|
|
1098
|
+
this._cursor++;
|
|
1592
1099
|
} else if (isValidEscape(codePoint, next)) {
|
|
1593
1100
|
value += this.consumeStringSlice(i);
|
|
1594
|
-
value += fromCodePoint
|
|
1101
|
+
value += String.fromCodePoint(this.consumeEscapedCodePoint());
|
|
1595
1102
|
i = -1;
|
|
1596
1103
|
}
|
|
1597
1104
|
}
|
|
@@ -1650,8 +1157,8 @@
|
|
|
1650
1157
|
consumeEscapedCodePoint() {
|
|
1651
1158
|
const codePoint = this.consumeCodePoint();
|
|
1652
1159
|
if (isHex(codePoint)) {
|
|
1653
|
-
let hex = fromCodePoint
|
|
1654
|
-
while (isHex(this.peekCodePoint(0)) && hex.length < 6) hex += fromCodePoint
|
|
1160
|
+
let hex = String.fromCodePoint(codePoint);
|
|
1161
|
+
while (isHex(this.peekCodePoint(0)) && hex.length < 6) hex += String.fromCodePoint(this.consumeCodePoint());
|
|
1655
1162
|
if (isWhiteSpace(this.peekCodePoint(0))) this.consumeCodePoint();
|
|
1656
1163
|
const hexCodePoint = parseInt(hex, 16);
|
|
1657
1164
|
if (hexCodePoint === 0 || isSurrogateCodePoint(hexCodePoint) || hexCodePoint > 1114111) return REPLACEMENT_CHARACTER;
|
|
@@ -1664,8 +1171,8 @@
|
|
|
1664
1171
|
let result = "";
|
|
1665
1172
|
while (true) {
|
|
1666
1173
|
const codePoint = this.consumeCodePoint();
|
|
1667
|
-
if (isNameCodePoint(codePoint)) result += fromCodePoint
|
|
1668
|
-
else if (isValidEscape(codePoint, this.peekCodePoint(0))) result += fromCodePoint
|
|
1174
|
+
if (isNameCodePoint(codePoint)) result += String.fromCodePoint(codePoint);
|
|
1175
|
+
else if (isValidEscape(codePoint, this.peekCodePoint(0))) result += String.fromCodePoint(this.consumeEscapedCodePoint());
|
|
1669
1176
|
else {
|
|
1670
1177
|
this.reconsumeCodePoint(codePoint);
|
|
1671
1178
|
return result;
|
|
@@ -1676,6 +1183,7 @@
|
|
|
1676
1183
|
//#endregion
|
|
1677
1184
|
//#region src/css/syntax/parser.ts
|
|
1678
1185
|
var Parser = class Parser {
|
|
1186
|
+
_tokens;
|
|
1679
1187
|
constructor(tokens) {
|
|
1680
1188
|
this._tokens = tokens;
|
|
1681
1189
|
}
|
|
@@ -2205,13 +1713,17 @@
|
|
|
2205
1713
|
};
|
|
2206
1714
|
const packLab = (_context, args) => {
|
|
2207
1715
|
if (isRelativeTransform(args.filter(nonFunctionArgSeparator))) throw new Error("Relative color not supported for lab()");
|
|
2208
|
-
const [
|
|
1716
|
+
const [extractedL, a, b, alpha] = extractLabComponents(args), l = isPercentageLightness(args) ? extractedL * 100 : extractedL, rgb = srgbLinear2rgb(xyz2rgbLinear(lab2xyz([
|
|
2209
1717
|
l,
|
|
2210
1718
|
a,
|
|
2211
1719
|
b
|
|
2212
1720
|
])));
|
|
2213
1721
|
return pack(clamp(Math.round(rgb[0] * 255), 0, 255), clamp(Math.round(rgb[1] * 255), 0, 255), clamp(Math.round(rgb[2] * 255), 0, 255), alpha);
|
|
2214
1722
|
};
|
|
1723
|
+
const isPercentageLightness = (args) => {
|
|
1724
|
+
const t0 = args.filter(nonFunctionArgSeparator)[0];
|
|
1725
|
+
return t0 !== void 0 && t0.type === 16;
|
|
1726
|
+
};
|
|
2215
1727
|
const packOkLab = (_context, args) => {
|
|
2216
1728
|
if (isRelativeTransform(args.filter(nonFunctionArgSeparator))) throw new Error("Relative color not supported for oklab()");
|
|
2217
1729
|
const [l, a, b, alpha] = extractLabComponents(args), rgb = srgbLinear2rgb(xyz2rgbLinear(oklab2xyz([
|
|
@@ -2240,7 +1752,7 @@
|
|
|
2240
1752
|
return pack(clamp(Math.round(rgb[0] * 255), 0, 255), clamp(Math.round(rgb[1] * 255), 0, 255), clamp(Math.round(rgb[2] * 255), 0, 255), a);
|
|
2241
1753
|
};
|
|
2242
1754
|
const extractHslComponents = (context, args) => {
|
|
2243
|
-
const tokens = args.filter(nonFunctionArgSeparator), hue = tokens[0], saturation = tokens[1], lightness = tokens[2], alpha = tokens[3];
|
|
1755
|
+
const tokens = args.filter(nonFunctionArgSeparator), hue = tokens[0], saturation = tokens[1], lightness = tokens[2], slash = tokens[3], alpha = slash !== void 0 && slash.type === 6 && slash.value === "/" ? tokens[4] : tokens[3];
|
|
2244
1756
|
return [
|
|
2245
1757
|
hue ? (hue.type === 17 ? deg(hue.number) : angle.parse(context, hue)) / (Math.PI * 2) : 0,
|
|
2246
1758
|
saturation !== void 0 && isLengthPercentage(saturation) ? saturation.number / 100 : 0,
|
|
@@ -2255,7 +1767,7 @@
|
|
|
2255
1767
|
s,
|
|
2256
1768
|
l
|
|
2257
1769
|
]);
|
|
2258
|
-
return pack(rgb[0] * 255, rgb[1] * 255, rgb[2] * 255,
|
|
1770
|
+
return pack(rgb[0] * 255, rgb[1] * 255, rgb[2] * 255, a);
|
|
2259
1771
|
};
|
|
2260
1772
|
const extractLchComponents = (args) => {
|
|
2261
1773
|
const tokens = args.filter(nonFunctionArgSeparator), t0 = tokens[0], t1 = tokens[1], t2 = tokens[2], t4 = tokens[4];
|
|
@@ -2330,9 +1842,9 @@
|
|
|
2330
1842
|
};
|
|
2331
1843
|
const hsl2rgb = ([h, s, l]) => {
|
|
2332
1844
|
if (s === 0) return [
|
|
2333
|
-
l
|
|
2334
|
-
l
|
|
2335
|
-
l
|
|
1845
|
+
l,
|
|
1846
|
+
l,
|
|
1847
|
+
l
|
|
2336
1848
|
];
|
|
2337
1849
|
const t2 = l <= .5 ? l * (s + 1) : l + s - l * s, t1 = l * 2 - t2;
|
|
2338
1850
|
return [
|
|
@@ -3082,6 +2594,393 @@
|
|
|
3082
2594
|
]);
|
|
3083
2595
|
};
|
|
3084
2596
|
//#endregion
|
|
2597
|
+
//#region src/css/types/functions/color-mix.ts
|
|
2598
|
+
const HUE_DEG_INDEX = {
|
|
2599
|
+
lch: 2,
|
|
2600
|
+
oklch: 2,
|
|
2601
|
+
hsl: 0
|
|
2602
|
+
};
|
|
2603
|
+
const XYZ_FROM_LMS = [
|
|
2604
|
+
1.2268798758459243,
|
|
2605
|
+
-.5578149944602171,
|
|
2606
|
+
.2813910456659647,
|
|
2607
|
+
-.0405757452148008,
|
|
2608
|
+
1.112286803280317,
|
|
2609
|
+
-.0717110580655164,
|
|
2610
|
+
-.0763729366746601,
|
|
2611
|
+
-.4214933324022432,
|
|
2612
|
+
1.5869240198367816
|
|
2613
|
+
];
|
|
2614
|
+
const LMS_FROM_OKLAB = [
|
|
2615
|
+
1,
|
|
2616
|
+
.3963377773761749,
|
|
2617
|
+
.2158037573099136,
|
|
2618
|
+
1,
|
|
2619
|
+
-.1055613458156586,
|
|
2620
|
+
-.0638541728258133,
|
|
2621
|
+
1,
|
|
2622
|
+
-.0894841775298119,
|
|
2623
|
+
-1.2914855480194092
|
|
2624
|
+
];
|
|
2625
|
+
const matrix3Inverse = (m) => {
|
|
2626
|
+
const a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5], g = m[6], h = m[7], i = m[8];
|
|
2627
|
+
const det = a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g);
|
|
2628
|
+
return [
|
|
2629
|
+
(e * i - f * h) / det,
|
|
2630
|
+
(c * h - b * i) / det,
|
|
2631
|
+
(b * f - c * e) / det,
|
|
2632
|
+
(f * g - d * i) / det,
|
|
2633
|
+
(a * i - c * g) / det,
|
|
2634
|
+
(c * d - a * f) / det,
|
|
2635
|
+
(d * h - e * g) / det,
|
|
2636
|
+
(b * g - a * h) / det,
|
|
2637
|
+
(a * e - b * d) / det
|
|
2638
|
+
];
|
|
2639
|
+
};
|
|
2640
|
+
const XYZ_TO_LMS = matrix3Inverse(XYZ_FROM_LMS);
|
|
2641
|
+
const OKLAB_FROM_LMS = matrix3Inverse(LMS_FROM_OKLAB);
|
|
2642
|
+
const LAB_K = 24389 / 27;
|
|
2643
|
+
const LAB_E = 24 / 116;
|
|
2644
|
+
const LAB_E3 = LAB_E * LAB_E * LAB_E;
|
|
2645
|
+
const LAB_X_SCALE = .3457 / .3585;
|
|
2646
|
+
const LAB_Z_SCALE = .2958 / .3585;
|
|
2647
|
+
const unpackSrgb = (color) => [
|
|
2648
|
+
(255 & color >> 24) / 255,
|
|
2649
|
+
(255 & color >> 16) / 255,
|
|
2650
|
+
(255 & color >> 8) / 255
|
|
2651
|
+
];
|
|
2652
|
+
/** Inverse of color-utilities' lab2xyz: D65 XYZ → CIE Lab (0..100 scale). */
|
|
2653
|
+
const xyzD65ToLab = (xyz) => {
|
|
2654
|
+
const [x50, y50, z50] = d65toD50([
|
|
2655
|
+
xyz[0],
|
|
2656
|
+
xyz[1],
|
|
2657
|
+
xyz[2]
|
|
2658
|
+
]);
|
|
2659
|
+
const xi = x50 / LAB_X_SCALE;
|
|
2660
|
+
const yi = y50;
|
|
2661
|
+
const zi = z50 / LAB_Z_SCALE;
|
|
2662
|
+
const fx = xi > LAB_E3 ? Math.cbrt(xi) : (LAB_K * xi + 16) / 116;
|
|
2663
|
+
const fy = yi > LAB_E3 ? Math.cbrt(yi) : (LAB_K * yi + 16) / 116;
|
|
2664
|
+
const fz = zi > LAB_E3 ? Math.cbrt(zi) : (LAB_K * zi + 16) / 116;
|
|
2665
|
+
return [
|
|
2666
|
+
116 * fy - 16,
|
|
2667
|
+
500 * (fx - fy),
|
|
2668
|
+
200 * (fy - fz)
|
|
2669
|
+
];
|
|
2670
|
+
};
|
|
2671
|
+
/** D65 XYZ → OKLab via the inverted forward matrices. */
|
|
2672
|
+
const xyzD65ToOklab = (xyz) => {
|
|
2673
|
+
const lms = multiplyMatrices(XYZ_TO_LMS, xyz);
|
|
2674
|
+
const lmsCbrt = [
|
|
2675
|
+
Math.cbrt(lms[0]),
|
|
2676
|
+
Math.cbrt(lms[1]),
|
|
2677
|
+
Math.cbrt(lms[2])
|
|
2678
|
+
];
|
|
2679
|
+
return multiplyMatrices(OKLAB_FROM_LMS, lmsCbrt);
|
|
2680
|
+
};
|
|
2681
|
+
/** Lab/Oklab rectangular coordinates → polar LCH (hue in degrees). */
|
|
2682
|
+
const labToLch = (lab) => {
|
|
2683
|
+
const c = Math.hypot(lab[1], lab[2]);
|
|
2684
|
+
const h = Math.atan2(lab[2], lab[1]) * 180 / Math.PI;
|
|
2685
|
+
return [
|
|
2686
|
+
lab[0],
|
|
2687
|
+
c,
|
|
2688
|
+
(h + 360) % 360
|
|
2689
|
+
];
|
|
2690
|
+
};
|
|
2691
|
+
/** Gamma sRGB (0..1) → HSL with hue in turns (0..1), matching hsl2rgb input. */
|
|
2692
|
+
const rgbToHslTurns = (rgb) => {
|
|
2693
|
+
const r = rgb[0], g = rgb[1], b = rgb[2];
|
|
2694
|
+
const max = Math.max(r, g, b);
|
|
2695
|
+
const min = Math.min(r, g, b);
|
|
2696
|
+
const l = (max + min) / 2;
|
|
2697
|
+
if (max === min) return [
|
|
2698
|
+
0,
|
|
2699
|
+
0,
|
|
2700
|
+
l
|
|
2701
|
+
];
|
|
2702
|
+
const d = max - min;
|
|
2703
|
+
const s = l > .5 ? d / (2 - max - min) : d / (max + min);
|
|
2704
|
+
let h;
|
|
2705
|
+
if (max === r) h = ((g - b) / d + (g < b ? 6 : 0)) / 6;
|
|
2706
|
+
else if (max === g) h = ((b - r) / d + 2) / 6;
|
|
2707
|
+
else h = ((r - g) / d + 4) / 6;
|
|
2708
|
+
return [
|
|
2709
|
+
h,
|
|
2710
|
+
s,
|
|
2711
|
+
l
|
|
2712
|
+
];
|
|
2713
|
+
};
|
|
2714
|
+
/** Packed color → coordinates in the given space, alpha kept on a 0..1 scale. */
|
|
2715
|
+
const toCoords = (color, space) => {
|
|
2716
|
+
const a = (255 & color) / 255;
|
|
2717
|
+
const rgb = unpackSrgb(color);
|
|
2718
|
+
const linear = rgb2rgbLinear(rgb);
|
|
2719
|
+
const xyz = rgbLinear2xyz(linear);
|
|
2720
|
+
let coords;
|
|
2721
|
+
switch (space) {
|
|
2722
|
+
case "srgb":
|
|
2723
|
+
coords = rgb;
|
|
2724
|
+
break;
|
|
2725
|
+
case "srgb-linear":
|
|
2726
|
+
coords = linear;
|
|
2727
|
+
break;
|
|
2728
|
+
case "xyz":
|
|
2729
|
+
case "xyz-d65":
|
|
2730
|
+
coords = xyz;
|
|
2731
|
+
break;
|
|
2732
|
+
case "xyz-d50":
|
|
2733
|
+
coords = d65toD50(xyz);
|
|
2734
|
+
break;
|
|
2735
|
+
case "lab":
|
|
2736
|
+
coords = xyzD65ToLab(xyz);
|
|
2737
|
+
break;
|
|
2738
|
+
case "oklab":
|
|
2739
|
+
coords = xyzD65ToOklab(xyz);
|
|
2740
|
+
break;
|
|
2741
|
+
case "lch":
|
|
2742
|
+
coords = labToLch(xyzD65ToLab(xyz));
|
|
2743
|
+
break;
|
|
2744
|
+
case "oklch":
|
|
2745
|
+
coords = labToLch(xyzD65ToOklab(xyz));
|
|
2746
|
+
break;
|
|
2747
|
+
case "hsl": coords = [
|
|
2748
|
+
rgbToHslTurns(rgb)[0] * 360,
|
|
2749
|
+
rgbToHslTurns(rgb)[1],
|
|
2750
|
+
rgbToHslTurns(rgb)[2]
|
|
2751
|
+
];
|
|
2752
|
+
}
|
|
2753
|
+
return [
|
|
2754
|
+
coords[0],
|
|
2755
|
+
coords[1],
|
|
2756
|
+
coords[2],
|
|
2757
|
+
a
|
|
2758
|
+
];
|
|
2759
|
+
};
|
|
2760
|
+
/** Coordinates in the given space → packed color. */
|
|
2761
|
+
const fromCoords = (coords, space) => {
|
|
2762
|
+
const c0 = coords[0], c1 = coords[1], c2 = coords[2], a = coords[3];
|
|
2763
|
+
switch (space) {
|
|
2764
|
+
case "srgb": return packSrgb([
|
|
2765
|
+
c0,
|
|
2766
|
+
c1,
|
|
2767
|
+
c2,
|
|
2768
|
+
a
|
|
2769
|
+
]);
|
|
2770
|
+
case "srgb-linear": return packSrgbLinear([
|
|
2771
|
+
c0,
|
|
2772
|
+
c1,
|
|
2773
|
+
c2,
|
|
2774
|
+
a
|
|
2775
|
+
]);
|
|
2776
|
+
case "xyz":
|
|
2777
|
+
case "xyz-d65": return packXYZ([
|
|
2778
|
+
c0,
|
|
2779
|
+
c1,
|
|
2780
|
+
c2,
|
|
2781
|
+
a
|
|
2782
|
+
]);
|
|
2783
|
+
case "xyz-d50": return packXYZ([...d50toD65([
|
|
2784
|
+
c0,
|
|
2785
|
+
c1,
|
|
2786
|
+
c2
|
|
2787
|
+
]), a]);
|
|
2788
|
+
case "lab": return packViaXyz(lab2xyz([
|
|
2789
|
+
c0,
|
|
2790
|
+
c1,
|
|
2791
|
+
c2
|
|
2792
|
+
]), a);
|
|
2793
|
+
case "oklab": return packViaXyz(oklab2xyz([
|
|
2794
|
+
c0,
|
|
2795
|
+
c1,
|
|
2796
|
+
c2
|
|
2797
|
+
]), a);
|
|
2798
|
+
case "lch": return packViaXyz(lab2xyz(lch2lab([
|
|
2799
|
+
c0,
|
|
2800
|
+
c1,
|
|
2801
|
+
c2
|
|
2802
|
+
])), a);
|
|
2803
|
+
case "oklch": return packViaXyz(oklab2xyz(lch2lab([
|
|
2804
|
+
c0,
|
|
2805
|
+
c1,
|
|
2806
|
+
c2
|
|
2807
|
+
])), a);
|
|
2808
|
+
case "hsl": {
|
|
2809
|
+
const rgb = hsl2rgb([
|
|
2810
|
+
c0 / 360,
|
|
2811
|
+
c1,
|
|
2812
|
+
c2
|
|
2813
|
+
]);
|
|
2814
|
+
return packSrgb([
|
|
2815
|
+
rgb[0],
|
|
2816
|
+
rgb[1],
|
|
2817
|
+
rgb[2],
|
|
2818
|
+
a
|
|
2819
|
+
]);
|
|
2820
|
+
}
|
|
2821
|
+
}
|
|
2822
|
+
};
|
|
2823
|
+
const packViaXyz = (xyz, a) => {
|
|
2824
|
+
const rgb = srgbLinear2rgb(xyz2rgbLinear(xyz));
|
|
2825
|
+
return packSrgb([
|
|
2826
|
+
rgb[0],
|
|
2827
|
+
rgb[1],
|
|
2828
|
+
rgb[2],
|
|
2829
|
+
a
|
|
2830
|
+
]);
|
|
2831
|
+
};
|
|
2832
|
+
/**
|
|
2833
|
+
* Interpolate a hue angle in degrees per css-color-4 §12.4. `weight1` and
|
|
2834
|
+
* `weight2` are the (normalized) mix weights; the hue travels from h1 towards
|
|
2835
|
+
* h2 by the shared fraction. Exported for unit tests.
|
|
2836
|
+
*/
|
|
2837
|
+
const interpolateHue = (h1, h2, weight1, weight2, method = "shorter") => {
|
|
2838
|
+
const wSum = weight1 + weight2;
|
|
2839
|
+
if (wSum === 0) return h1;
|
|
2840
|
+
let d = ((h2 - h1) % 360 + 360) % 360;
|
|
2841
|
+
switch (method) {
|
|
2842
|
+
case "shorter":
|
|
2843
|
+
if (d > 180) d -= 360;
|
|
2844
|
+
break;
|
|
2845
|
+
case "longer":
|
|
2846
|
+
if (d < 180) d -= 360;
|
|
2847
|
+
break;
|
|
2848
|
+
case "increasing": break;
|
|
2849
|
+
case "decreasing": if (d > 0) d -= 360;
|
|
2850
|
+
}
|
|
2851
|
+
return h1 + d * (weight2 / wSum);
|
|
2852
|
+
};
|
|
2853
|
+
const parseMixComponent = (context, tokens) => {
|
|
2854
|
+
let colorToken;
|
|
2855
|
+
let percentage = null;
|
|
2856
|
+
for (const token of tokens) {
|
|
2857
|
+
if (token.type === 31 || token.type === 4) continue;
|
|
2858
|
+
if (token.type === 16) percentage = token.number;
|
|
2859
|
+
else if (isIdentToken(token) && token.value === "none") {
|
|
2860
|
+
if (percentage === null) percentage = 0;
|
|
2861
|
+
} else if (colorToken === void 0) colorToken = token;
|
|
2862
|
+
else throw new Error(`Unexpected token in color-mix() component`);
|
|
2863
|
+
}
|
|
2864
|
+
if (colorToken === void 0) throw new Error("color-mix() component is missing a color");
|
|
2865
|
+
const token = colorToken;
|
|
2866
|
+
return {
|
|
2867
|
+
color: color$1.parse(context, token),
|
|
2868
|
+
percentage
|
|
2869
|
+
};
|
|
2870
|
+
};
|
|
2871
|
+
const SUPPORTED_SPACES = [
|
|
2872
|
+
"srgb",
|
|
2873
|
+
"srgb-linear",
|
|
2874
|
+
"lab",
|
|
2875
|
+
"oklab",
|
|
2876
|
+
"lch",
|
|
2877
|
+
"oklch",
|
|
2878
|
+
"hsl",
|
|
2879
|
+
"xyz",
|
|
2880
|
+
"xyz-d50",
|
|
2881
|
+
"xyz-d65"
|
|
2882
|
+
];
|
|
2883
|
+
const mixCoords = (c1, c2, w1, w2, space, hueMethod) => {
|
|
2884
|
+
const hueIdx = HUE_DEG_INDEX[space];
|
|
2885
|
+
const p1 = [
|
|
2886
|
+
c1[0] * c1[3],
|
|
2887
|
+
c1[1] * c1[3],
|
|
2888
|
+
c1[2] * c1[3],
|
|
2889
|
+
c1[3]
|
|
2890
|
+
];
|
|
2891
|
+
const p2 = [
|
|
2892
|
+
c2[0] * c2[3],
|
|
2893
|
+
c2[1] * c2[3],
|
|
2894
|
+
c2[2] * c2[3],
|
|
2895
|
+
c2[3]
|
|
2896
|
+
];
|
|
2897
|
+
const alpha = w1 * p1[3] + w2 * p2[3];
|
|
2898
|
+
if (alpha <= 0) return [
|
|
2899
|
+
0,
|
|
2900
|
+
0,
|
|
2901
|
+
0,
|
|
2902
|
+
0
|
|
2903
|
+
];
|
|
2904
|
+
const out = [
|
|
2905
|
+
0,
|
|
2906
|
+
0,
|
|
2907
|
+
0,
|
|
2908
|
+
alpha
|
|
2909
|
+
];
|
|
2910
|
+
for (let i = 0; i < 3; i++) {
|
|
2911
|
+
if (i === hueIdx) continue;
|
|
2912
|
+
out[i] = (w1 * at(p1, i) + w2 * at(p2, i)) / alpha;
|
|
2913
|
+
}
|
|
2914
|
+
if (hueIdx !== void 0) {
|
|
2915
|
+
let h1 = at(c1, hueIdx);
|
|
2916
|
+
let h2 = at(c2, hueIdx);
|
|
2917
|
+
if (c1[1] === 0) h1 = h2;
|
|
2918
|
+
if (c2[1] === 0) h2 = h1;
|
|
2919
|
+
out[hueIdx] = interpolateHue(h1, h2, w1, w2, hueMethod);
|
|
2920
|
+
}
|
|
2921
|
+
return out;
|
|
2922
|
+
};
|
|
2923
|
+
const computeColorMix = (context, args) => {
|
|
2924
|
+
const groups = [[]];
|
|
2925
|
+
for (const token of args) if (token.type === 4) groups.push([]);
|
|
2926
|
+
else groups[groups.length - 1].push(token);
|
|
2927
|
+
const meaningful = groups.map((group) => group.filter((t) => t.type !== 31));
|
|
2928
|
+
if (meaningful.length !== 3) throw new Error("color-mix() requires exactly two color components");
|
|
2929
|
+
const header = meaningful[0];
|
|
2930
|
+
const inKeyword = header ? header[0] : void 0;
|
|
2931
|
+
const hasInKeyword = inKeyword !== void 0 && isIdentToken(inKeyword) && inKeyword.value === "in";
|
|
2932
|
+
if (!header || header.length < 2 || !hasInKeyword) throw new Error("color-mix() requires an interpolation space after `in`");
|
|
2933
|
+
const spaceIdent = header[1];
|
|
2934
|
+
if (!spaceIdent || !isIdentToken(spaceIdent)) throw new Error("color-mix() space must be an identifier");
|
|
2935
|
+
const space = spaceIdent.value;
|
|
2936
|
+
if (SUPPORTED_SPACES.indexOf(space) === -1) throw new Error(`Unsupported color-mix() interpolation space "${space}"`);
|
|
2937
|
+
let hueMethod = "shorter";
|
|
2938
|
+
const rest = header.slice(2);
|
|
2939
|
+
if (rest.length > 0) {
|
|
2940
|
+
const method = rest[0];
|
|
2941
|
+
const hueKeyword = rest[1];
|
|
2942
|
+
if (!method || !hueKeyword || !isIdentToken(method) || !isIdentToken(hueKeyword) || hueKeyword.value !== "hue") throw new Error("Unsupported color-mix() hue method syntax");
|
|
2943
|
+
if ([
|
|
2944
|
+
"shorter",
|
|
2945
|
+
"longer",
|
|
2946
|
+
"increasing",
|
|
2947
|
+
"decreasing"
|
|
2948
|
+
].indexOf(method.value) === -1) throw new Error(`Unsupported color-mix() hue method "${method.value}"`);
|
|
2949
|
+
hueMethod = method.value;
|
|
2950
|
+
}
|
|
2951
|
+
const group1 = meaningful[1];
|
|
2952
|
+
const group2 = meaningful[2];
|
|
2953
|
+
if (!group1 || !group2) throw new Error("color-mix() requires exactly two color components");
|
|
2954
|
+
const component1 = parseMixComponent(context, group1);
|
|
2955
|
+
const component2 = parseMixComponent(context, group2);
|
|
2956
|
+
let p1 = component1.percentage;
|
|
2957
|
+
let p2 = component2.percentage;
|
|
2958
|
+
if (p1 === null && p2 === null) {
|
|
2959
|
+
p1 = 50;
|
|
2960
|
+
p2 = 50;
|
|
2961
|
+
} else if (p1 === null) p1 = 100 - (p2 ?? 0);
|
|
2962
|
+
else if (p2 === null) p2 = 100 - p1;
|
|
2963
|
+
else {
|
|
2964
|
+
const sum = p1 + p2;
|
|
2965
|
+
if (sum > 0) {
|
|
2966
|
+
p1 = p1 / sum * 100;
|
|
2967
|
+
p2 = p2 / sum * 100;
|
|
2968
|
+
}
|
|
2969
|
+
}
|
|
2970
|
+
const weight1 = (p1 ?? 0) / 100;
|
|
2971
|
+
const weight2 = (p2 ?? 0) / 100;
|
|
2972
|
+
const mixed = mixCoords(toCoords(component1.color, space), toCoords(component2.color, space), weight1, weight2, space, hueMethod);
|
|
2973
|
+
return fromCoords(mixed, space);
|
|
2974
|
+
};
|
|
2975
|
+
const colorMix = (context, args) => {
|
|
2976
|
+
try {
|
|
2977
|
+
return computeColorMix(context, args);
|
|
2978
|
+
} catch (e) {
|
|
2979
|
+
context.logger.warn(`Unsupported color-mix() value: ${e instanceof Error ? e.message : e}`);
|
|
2980
|
+
return 0;
|
|
2981
|
+
}
|
|
2982
|
+
};
|
|
2983
|
+
//#endregion
|
|
3085
2984
|
//#region src/css/types/color.ts
|
|
3086
2985
|
const color$1 = {
|
|
3087
2986
|
name: "color",
|
|
@@ -3331,7 +3230,8 @@
|
|
|
3331
3230
|
oklch: packOkLch,
|
|
3332
3231
|
oklab: packOkLab,
|
|
3333
3232
|
lab: packLab,
|
|
3334
|
-
color: _color
|
|
3233
|
+
color: _color,
|
|
3234
|
+
"color-mix": colorMix
|
|
3335
3235
|
};
|
|
3336
3236
|
const parseColor = (context, value) => color$1.parse(context, Parser.create(value).parseComponentValue());
|
|
3337
3237
|
const COLORS = {
|
|
@@ -3614,9 +3514,7 @@
|
|
|
3614
3514
|
//#endregion
|
|
3615
3515
|
//#region src/css/types/functions/counter.ts
|
|
3616
3516
|
var CounterState = class {
|
|
3617
|
-
|
|
3618
|
-
this.counters = {};
|
|
3619
|
-
}
|
|
3517
|
+
counters = {};
|
|
3620
3518
|
getCounterValue(name) {
|
|
3621
3519
|
const counter = this.counters[name];
|
|
3622
3520
|
if (counter && counter.length) return at(counter, counter.length - 1);
|
|
@@ -3943,7 +3841,7 @@
|
|
|
3943
3841
|
};
|
|
3944
3842
|
const createCounterStyleFromRange = (value, codePointRangeStart, codePointRangeEnd, isNumeric, suffix) => {
|
|
3945
3843
|
const codePointRangeLength = codePointRangeEnd - codePointRangeStart + 1;
|
|
3946
|
-
return (value < 0 ? "-" : "") + (createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, isNumeric, (codePoint) => fromCodePoint
|
|
3844
|
+
return (value < 0 ? "-" : "") + (createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, isNumeric, (codePoint) => String.fromCodePoint(Math.floor(codePoint % codePointRangeLength) + codePointRangeStart)) + suffix);
|
|
3947
3845
|
};
|
|
3948
3846
|
const createCounterStyleFromSymbols = (value, symbols, suffix = ". ") => {
|
|
3949
3847
|
const codePointRangeLength = symbols.length;
|
|
@@ -4528,7 +4426,7 @@
|
|
|
4528
4426
|
const COVER = "cover";
|
|
4529
4427
|
const CONTAIN = "contain";
|
|
4530
4428
|
const radialGradient = (context, tokens) => {
|
|
4531
|
-
let shape =
|
|
4429
|
+
let shape = 1;
|
|
4532
4430
|
let size = 3;
|
|
4533
4431
|
const stops = [];
|
|
4534
4432
|
const position = [];
|
|
@@ -4601,7 +4499,7 @@
|
|
|
4601
4499
|
//#endregion
|
|
4602
4500
|
//#region src/css/types/functions/-prefix-radial-gradient.ts
|
|
4603
4501
|
const prefixRadialGradient = (context, tokens) => {
|
|
4604
|
-
let shape =
|
|
4502
|
+
let shape = 1;
|
|
4605
4503
|
let size = 3;
|
|
4606
4504
|
const stops = [];
|
|
4607
4505
|
const position = [];
|
|
@@ -5994,28 +5892,37 @@
|
|
|
5994
5892
|
if (first.type === 20 && first.value === "none") return null;
|
|
5995
5893
|
}
|
|
5996
5894
|
const parts = [];
|
|
5997
|
-
for (const token of tokens)
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
5895
|
+
for (const token of tokens) {
|
|
5896
|
+
if (token.type === 22) {
|
|
5897
|
+
parts.push(`url("${token.value}")`);
|
|
5898
|
+
continue;
|
|
5899
|
+
}
|
|
5900
|
+
if (token.type === 18) {
|
|
5901
|
+
const fn = token;
|
|
5902
|
+
const renderedArgs = renderFilterArgs(fn.values);
|
|
5903
|
+
switch (fn.name) {
|
|
5904
|
+
case "blur":
|
|
5905
|
+
parts.push(`blur(${renderedArgs})`);
|
|
5906
|
+
break;
|
|
5907
|
+
case "brightness":
|
|
5908
|
+
case "contrast":
|
|
5909
|
+
case "invert":
|
|
5910
|
+
case "opacity":
|
|
5911
|
+
case "saturate":
|
|
5912
|
+
case "sepia":
|
|
5913
|
+
parts.push(`${fn.name}(${renderedArgs})`);
|
|
5914
|
+
break;
|
|
5915
|
+
case "grayscale":
|
|
5916
|
+
parts.push(`grayscale(${renderedArgs})`);
|
|
5917
|
+
break;
|
|
5918
|
+
case "hue-rotate":
|
|
5919
|
+
parts.push(`hue-rotate(${renderedArgs})`);
|
|
5920
|
+
break;
|
|
5921
|
+
case "drop-shadow":
|
|
5922
|
+
parts.push(`drop-shadow(${renderedArgs})`);
|
|
5923
|
+
break;
|
|
5924
|
+
default: parts.push(`${fn.name}(${renderedArgs})`);
|
|
5925
|
+
}
|
|
6019
5926
|
}
|
|
6020
5927
|
}
|
|
6021
5928
|
return parts.length > 0 ? parts.join(" ") : null;
|
|
@@ -6584,8 +6491,47 @@
|
|
|
6584
6491
|
};
|
|
6585
6492
|
}
|
|
6586
6493
|
};
|
|
6494
|
+
//#endregion
|
|
6495
|
+
//#region src/css/property-descriptors/translate.ts
|
|
6496
|
+
const translate = {
|
|
6497
|
+
name: "translate",
|
|
6498
|
+
initialValue: "none",
|
|
6499
|
+
prefix: false,
|
|
6500
|
+
type: 1,
|
|
6501
|
+
parse: (_context, tokens) => {
|
|
6502
|
+
const values = [];
|
|
6503
|
+
for (const token of tokens) if (isLengthPercentage(token)) values.push(token);
|
|
6504
|
+
if (values.length === 0) return null;
|
|
6505
|
+
return [at(values, 0), values.length > 1 ? at(values, 1) : ZERO_LENGTH];
|
|
6506
|
+
}
|
|
6507
|
+
};
|
|
6508
|
+
//#endregion
|
|
6509
|
+
//#region src/css/property-descriptors/scale.ts
|
|
6510
|
+
const scale = {
|
|
6511
|
+
name: "scale",
|
|
6512
|
+
initialValue: "none",
|
|
6513
|
+
prefix: false,
|
|
6514
|
+
type: 1,
|
|
6515
|
+
parse: (_context, tokens) => {
|
|
6516
|
+
const numbers = [];
|
|
6517
|
+
for (const token of tokens) if (isNumberToken(token)) numbers.push(token.number);
|
|
6518
|
+
if (numbers.length === 0) return null;
|
|
6519
|
+
return [at(numbers, 0), numbers.length > 1 ? at(numbers, 1) : at(numbers, 0)];
|
|
6520
|
+
}
|
|
6521
|
+
};
|
|
6587
6522
|
/** Z-axis mask offset used during box-shadow rendering. */
|
|
6588
6523
|
const SHADOW_MASK_OFFSET = 1e4;
|
|
6524
|
+
/**
|
|
6525
|
+
* Total time (ms) to wait for the cloned iframe document to become ready
|
|
6526
|
+
* after its load event. A missed deadline resolves with a warning (the
|
|
6527
|
+
* capture continues with a possibly incomplete document).
|
|
6528
|
+
*/
|
|
6529
|
+
const CLONE_READY_TIMEOUT_MS = 3e4;
|
|
6530
|
+
/**
|
|
6531
|
+
* Hard ceiling (ms) for the cloned iframe's load event itself. If the event
|
|
6532
|
+
* never fires, the mount is rejected instead of hanging forever.
|
|
6533
|
+
*/
|
|
6534
|
+
const IFRAME_LOAD_WATCHDOG_MS = 6e4;
|
|
6589
6535
|
//#endregion
|
|
6590
6536
|
//#region src/css/parse.ts
|
|
6591
6537
|
const STANDARD_PROPERTIES = [
|
|
@@ -6899,6 +6845,16 @@
|
|
|
6899
6845
|
rotate,
|
|
6900
6846
|
"rotate"
|
|
6901
6847
|
],
|
|
6848
|
+
[
|
|
6849
|
+
"translate",
|
|
6850
|
+
translate,
|
|
6851
|
+
"translate"
|
|
6852
|
+
],
|
|
6853
|
+
[
|
|
6854
|
+
"scale",
|
|
6855
|
+
scale,
|
|
6856
|
+
"scale"
|
|
6857
|
+
],
|
|
6902
6858
|
[
|
|
6903
6859
|
"visibility",
|
|
6904
6860
|
visibility,
|
|
@@ -7150,10 +7106,15 @@
|
|
|
7150
7106
|
/**
|
|
7151
7107
|
* Read-only grouped accessor for border-related CSS properties.
|
|
7152
7108
|
*
|
|
7109
|
+
* Convenience accessors only — the render pipeline reads the top-level
|
|
7110
|
+
* parsed fields directly. Some underlying properties are parsed but not
|
|
7111
|
+
* rendered; see docs/features.md "Known unsupported CSS features".
|
|
7112
|
+
*
|
|
7153
7113
|
* Provides structured access: `styles.border.topColor` as an alternative
|
|
7154
7114
|
* to the flat `styles.borderTopColor`. Both forms remain valid.
|
|
7155
7115
|
*/
|
|
7156
7116
|
var BorderStyles = class {
|
|
7117
|
+
styles;
|
|
7157
7118
|
constructor(styles) {
|
|
7158
7119
|
this.styles = styles;
|
|
7159
7120
|
}
|
|
@@ -7222,8 +7183,13 @@
|
|
|
7222
7183
|
//#region src/css/grouped/background-styles.ts
|
|
7223
7184
|
/**
|
|
7224
7185
|
* Read-only grouped accessor for background-related CSS properties.
|
|
7186
|
+
*
|
|
7187
|
+
* Convenience accessors only — the render pipeline reads the top-level
|
|
7188
|
+
* parsed fields directly. Some underlying properties are parsed but not
|
|
7189
|
+
* rendered; see docs/features.md "Known unsupported CSS features".
|
|
7225
7190
|
*/
|
|
7226
7191
|
var BackgroundStyles = class {
|
|
7192
|
+
styles;
|
|
7227
7193
|
constructor(styles) {
|
|
7228
7194
|
this.styles = styles;
|
|
7229
7195
|
}
|
|
@@ -7256,8 +7222,13 @@
|
|
|
7256
7222
|
//#region src/css/grouped/font-styles.ts
|
|
7257
7223
|
/**
|
|
7258
7224
|
* Read-only grouped accessor for font/text-related CSS properties.
|
|
7225
|
+
*
|
|
7226
|
+
* Convenience accessors only — the render pipeline reads the top-level
|
|
7227
|
+
* parsed fields directly. Some underlying properties are parsed but not
|
|
7228
|
+
* rendered; see docs/features.md "Known unsupported CSS features".
|
|
7259
7229
|
*/
|
|
7260
7230
|
var FontStyles = class {
|
|
7231
|
+
styles;
|
|
7261
7232
|
constructor(styles) {
|
|
7262
7233
|
this.styles = styles;
|
|
7263
7234
|
}
|
|
@@ -7347,8 +7318,13 @@
|
|
|
7347
7318
|
//#region src/css/grouped/layout-styles.ts
|
|
7348
7319
|
/**
|
|
7349
7320
|
* Read-only grouped accessor for layout/display/positioning CSS properties.
|
|
7321
|
+
*
|
|
7322
|
+
* Convenience accessors only — the render pipeline reads the top-level
|
|
7323
|
+
* parsed fields directly. Some underlying properties are parsed but not
|
|
7324
|
+
* rendered; see docs/features.md "Known unsupported CSS features".
|
|
7350
7325
|
*/
|
|
7351
7326
|
var LayoutStyles = class {
|
|
7327
|
+
styles;
|
|
7352
7328
|
constructor(styles) {
|
|
7353
7329
|
this.styles = styles;
|
|
7354
7330
|
}
|
|
@@ -7470,6 +7446,117 @@
|
|
|
7470
7446
|
//#endregion
|
|
7471
7447
|
//#region src/css/index.ts
|
|
7472
7448
|
var CSSParsedDeclaration = class {
|
|
7449
|
+
animationDuration;
|
|
7450
|
+
backgroundClip;
|
|
7451
|
+
backgroundColor;
|
|
7452
|
+
backgroundImage;
|
|
7453
|
+
backgroundOrigin;
|
|
7454
|
+
backgroundPosition;
|
|
7455
|
+
backgroundRepeat;
|
|
7456
|
+
backgroundSize;
|
|
7457
|
+
borderTopColor;
|
|
7458
|
+
borderRightColor;
|
|
7459
|
+
borderBottomColor;
|
|
7460
|
+
borderLeftColor;
|
|
7461
|
+
borderTopLeftRadius;
|
|
7462
|
+
borderTopRightRadius;
|
|
7463
|
+
borderBottomRightRadius;
|
|
7464
|
+
borderBottomLeftRadius;
|
|
7465
|
+
borderTopStyle;
|
|
7466
|
+
borderRightStyle;
|
|
7467
|
+
borderBottomStyle;
|
|
7468
|
+
borderLeftStyle;
|
|
7469
|
+
borderTopWidth;
|
|
7470
|
+
borderRightWidth;
|
|
7471
|
+
borderBottomWidth;
|
|
7472
|
+
borderLeftWidth;
|
|
7473
|
+
boxShadow;
|
|
7474
|
+
clipPath;
|
|
7475
|
+
color;
|
|
7476
|
+
direction;
|
|
7477
|
+
display;
|
|
7478
|
+
float;
|
|
7479
|
+
fontFamily;
|
|
7480
|
+
fontSize;
|
|
7481
|
+
fontStyle;
|
|
7482
|
+
fontVariant;
|
|
7483
|
+
fontWeight;
|
|
7484
|
+
letterSpacing;
|
|
7485
|
+
lineBreak;
|
|
7486
|
+
lineHeight;
|
|
7487
|
+
listStyleImage;
|
|
7488
|
+
listStylePosition;
|
|
7489
|
+
listStyleType;
|
|
7490
|
+
marginTop;
|
|
7491
|
+
marginRight;
|
|
7492
|
+
marginBottom;
|
|
7493
|
+
marginLeft;
|
|
7494
|
+
opacity;
|
|
7495
|
+
overflowX;
|
|
7496
|
+
overflowY;
|
|
7497
|
+
overflowWrap;
|
|
7498
|
+
paddingTop;
|
|
7499
|
+
paddingRight;
|
|
7500
|
+
paddingBottom;
|
|
7501
|
+
paddingLeft;
|
|
7502
|
+
paintOrder;
|
|
7503
|
+
position;
|
|
7504
|
+
textAlign;
|
|
7505
|
+
textDecorationColor;
|
|
7506
|
+
textDecorationLine;
|
|
7507
|
+
textDecorationStyle;
|
|
7508
|
+
textDecorationThickness;
|
|
7509
|
+
textUnderlineOffset;
|
|
7510
|
+
textShadow;
|
|
7511
|
+
textTransform;
|
|
7512
|
+
textOverflow;
|
|
7513
|
+
transform;
|
|
7514
|
+
transformOrigin;
|
|
7515
|
+
rotate;
|
|
7516
|
+
translate;
|
|
7517
|
+
scale;
|
|
7518
|
+
visibility;
|
|
7519
|
+
webkitTextStrokeColor;
|
|
7520
|
+
webkitTextStrokeWidth;
|
|
7521
|
+
webkitLineClamp;
|
|
7522
|
+
wordBreak;
|
|
7523
|
+
whiteSpace;
|
|
7524
|
+
writingMode;
|
|
7525
|
+
zIndex;
|
|
7526
|
+
objectFit;
|
|
7527
|
+
imageRendering;
|
|
7528
|
+
mixBlendMode;
|
|
7529
|
+
filter;
|
|
7530
|
+
fontVariantLigatures;
|
|
7531
|
+
zoom;
|
|
7532
|
+
objectPosition;
|
|
7533
|
+
backgroundBlendMode;
|
|
7534
|
+
borderImageSource;
|
|
7535
|
+
borderImageSlice;
|
|
7536
|
+
borderImageRepeat;
|
|
7537
|
+
boxDecorationBreak;
|
|
7538
|
+
accentColor;
|
|
7539
|
+
webkitTextFillColor;
|
|
7540
|
+
isolation;
|
|
7541
|
+
outlineColor;
|
|
7542
|
+
outlineStyle;
|
|
7543
|
+
outlineWidth;
|
|
7544
|
+
outlineOffset;
|
|
7545
|
+
backdropFilter;
|
|
7546
|
+
maskImage;
|
|
7547
|
+
maskPosition;
|
|
7548
|
+
maskRepeat;
|
|
7549
|
+
maskSize;
|
|
7550
|
+
textEmphasisStyle;
|
|
7551
|
+
textEmphasisColor;
|
|
7552
|
+
textEmphasisPosition;
|
|
7553
|
+
borderImageWidth;
|
|
7554
|
+
borderImageOutset;
|
|
7555
|
+
webkitBoxReflect;
|
|
7556
|
+
_border;
|
|
7557
|
+
_background;
|
|
7558
|
+
_font;
|
|
7559
|
+
_layout;
|
|
7473
7560
|
get border() {
|
|
7474
7561
|
return this._border ?? (this._border = new BorderStyles(this));
|
|
7475
7562
|
}
|
|
@@ -7499,7 +7586,7 @@
|
|
|
7499
7586
|
return isTransparent(this.backgroundColor);
|
|
7500
7587
|
}
|
|
7501
7588
|
isTransformed() {
|
|
7502
|
-
return this.transform !== null || this.rotate !== null;
|
|
7589
|
+
return this.transform !== null || this.rotate !== null || this.translate !== null || this.scale !== null;
|
|
7503
7590
|
}
|
|
7504
7591
|
isPositioned() {
|
|
7505
7592
|
return this.position !== 0;
|
|
@@ -7534,12 +7621,16 @@
|
|
|
7534
7621
|
};
|
|
7535
7622
|
};
|
|
7536
7623
|
var CSSParsedPseudoDeclaration = class {
|
|
7624
|
+
content;
|
|
7625
|
+
quotes;
|
|
7537
7626
|
constructor(context, declaration) {
|
|
7538
7627
|
this.content = parse(context, content, declaration.content);
|
|
7539
7628
|
this.quotes = parse(context, quotes, declaration.quotes);
|
|
7540
7629
|
}
|
|
7541
7630
|
};
|
|
7542
7631
|
var CSSParsedCounterDeclaration = class {
|
|
7632
|
+
counterIncrement;
|
|
7633
|
+
counterReset;
|
|
7543
7634
|
constructor(context, declaration) {
|
|
7544
7635
|
this.counterIncrement = parse(context, counterIncrement, declaration.counterIncrement);
|
|
7545
7636
|
this.counterReset = parse(context, counterReset, declaration.counterReset);
|
|
@@ -7563,6 +7654,48 @@
|
|
|
7563
7654
|
return elementType === 1 || type === elementType;
|
|
7564
7655
|
};
|
|
7565
7656
|
//#endregion
|
|
7657
|
+
//#region src/dom/adopted-styles.ts
|
|
7658
|
+
/**
|
|
7659
|
+
* Constructable stylesheet cloning (adoptedStyleSheets).
|
|
7660
|
+
*
|
|
7661
|
+
* `adoptedStyleSheets` on a Document or ShadowRoot is the standard way Lit,
|
|
7662
|
+
* React and other frameworks inject component styles, but the sheets are not
|
|
7663
|
+
* part of the node tree — cloneNode never carries them. A shadow root that
|
|
7664
|
+
* relies on adopted sheets (and whose computed styles are not inlined per
|
|
7665
|
+
* element, i.e. copyStyles is false) would otherwise lose those rules in the
|
|
7666
|
+
* clone. The rules are re-materialised as a regular <style> element, which
|
|
7667
|
+
* also cascades last like the spec treats adopted sheets.
|
|
7668
|
+
*/
|
|
7669
|
+
/**
|
|
7670
|
+
* Serialize the CSS rules of the given sheets into one stylesheet string.
|
|
7671
|
+
* Sheets that cannot be read (e.g. detached) are skipped rather than failing
|
|
7672
|
+
* the render.
|
|
7673
|
+
*/
|
|
7674
|
+
const serializeStyleSheetRules = (sheets) => {
|
|
7675
|
+
let css = "";
|
|
7676
|
+
for (const sheet of sheets) try {
|
|
7677
|
+
const rules = sheet.cssRules;
|
|
7678
|
+
for (let i = 0; i < rules.length; i++) {
|
|
7679
|
+
const rule = rules[i];
|
|
7680
|
+
if (rule && typeof rule.cssText === "string") css += rule.cssText;
|
|
7681
|
+
}
|
|
7682
|
+
} catch (e) {}
|
|
7683
|
+
return css;
|
|
7684
|
+
};
|
|
7685
|
+
/**
|
|
7686
|
+
* Build a <style> element carrying the rules of the given adopted sheets, or
|
|
7687
|
+
* null when there is nothing to clone. `styleDocument` must be the document
|
|
7688
|
+
* the clone lives in.
|
|
7689
|
+
*/
|
|
7690
|
+
const createAdoptedStylesElement = (styleDocument, sheets, nonce) => {
|
|
7691
|
+
const css = serializeStyleSheetRules(sheets);
|
|
7692
|
+
if (!css) return null;
|
|
7693
|
+
const style = styleDocument.createElement("style");
|
|
7694
|
+
style.textContent = css;
|
|
7695
|
+
if (nonce) style.nonce = nonce;
|
|
7696
|
+
return style;
|
|
7697
|
+
};
|
|
7698
|
+
//#endregion
|
|
7566
7699
|
//#region src/dom/slot-cloner.ts
|
|
7567
7700
|
/** Exported for reuse in document-cloner.ts */
|
|
7568
7701
|
const IGNORE_ATTRIBUTE = "data-html2canvas-ignore";
|
|
@@ -7571,6 +7704,9 @@
|
|
|
7571
7704
|
* Extracted from DocumentCloner to reduce file size and improve separation of concerns.
|
|
7572
7705
|
*/
|
|
7573
7706
|
var SlotCloner = class {
|
|
7707
|
+
cloneNodeFn;
|
|
7708
|
+
options;
|
|
7709
|
+
context;
|
|
7574
7710
|
constructor(cloneNodeFn, options, context) {
|
|
7575
7711
|
this.cloneNodeFn = cloneNodeFn;
|
|
7576
7712
|
this.options = options;
|
|
@@ -7649,6 +7785,7 @@
|
|
|
7649
7785
|
cloneShadowDOMChildren(shadowRoot, targetShadowRoot, copyStyles) {
|
|
7650
7786
|
for (let child = shadowRoot.firstChild; child; child = child.nextSibling) if (isElementNode(child) && isSlotElement(child)) this.cloneSlotElement(child, targetShadowRoot, copyStyles);
|
|
7651
7787
|
else this.safeAppendClonedChild(targetShadowRoot, child, copyStyles);
|
|
7788
|
+
this.appendAdoptedStyleSheets(shadowRoot, targetShadowRoot, copyStyles);
|
|
7652
7789
|
}
|
|
7653
7790
|
/**
|
|
7654
7791
|
* Clone light DOM children to the target element.
|
|
@@ -7677,6 +7814,23 @@
|
|
|
7677
7814
|
cloneShadowDOMAsLightDOM(shadowRoot, clone, copyStyles) {
|
|
7678
7815
|
for (let child = shadowRoot.firstChild; child; child = child.nextSibling) if (isElementNode(child) && isSlotElement(child)) this.cloneSlotElementAsLightDOM(child, clone, copyStyles);
|
|
7679
7816
|
else this.appendChildNode(clone, child, copyStyles);
|
|
7817
|
+
this.appendAdoptedStyleSheets(shadowRoot, clone, copyStyles);
|
|
7818
|
+
}
|
|
7819
|
+
/**
|
|
7820
|
+
* Re-materialise the shadow root's constructable stylesheets (adoptedStyleSheets)
|
|
7821
|
+
* as a <style> element in the clone — cloneNode never carries them.
|
|
7822
|
+
*
|
|
7823
|
+
* Skipped when computed styles are inlined per element (copyStyles), mirroring
|
|
7824
|
+
* how <style> elements inside shadow roots are dropped in that mode.
|
|
7825
|
+
*/
|
|
7826
|
+
appendAdoptedStyleSheets(shadowRoot, target, copyStyles) {
|
|
7827
|
+
if (copyStyles) return;
|
|
7828
|
+
const sheets = shadowRoot.adoptedStyleSheets;
|
|
7829
|
+
if (!sheets || sheets.length === 0) return;
|
|
7830
|
+
const styleDocument = "host" in target ? target.host.ownerDocument : target.ownerDocument;
|
|
7831
|
+
if (!styleDocument) return;
|
|
7832
|
+
const style = createAdoptedStylesElement(styleDocument, sheets, this.options.cspNonce);
|
|
7833
|
+
if (style) target.appendChild(style);
|
|
7680
7834
|
}
|
|
7681
7835
|
};
|
|
7682
7836
|
//#endregion
|
|
@@ -7751,10 +7905,12 @@
|
|
|
7751
7905
|
* pairing across the whole clone walk, shared with the cloner's counter state.
|
|
7752
7906
|
*/
|
|
7753
7907
|
var PseudoContentResolver = class {
|
|
7908
|
+
context;
|
|
7909
|
+
counters;
|
|
7910
|
+
quoteDepth = 0;
|
|
7754
7911
|
constructor(context, counters) {
|
|
7755
7912
|
this.context = context;
|
|
7756
7913
|
this.counters = counters;
|
|
7757
|
-
this.quoteDepth = 0;
|
|
7758
7914
|
}
|
|
7759
7915
|
resolvePseudoContent(node, clone, style, pseudoElt) {
|
|
7760
7916
|
if (!style) return;
|
|
@@ -7814,7 +7970,44 @@
|
|
|
7814
7970
|
}
|
|
7815
7971
|
};
|
|
7816
7972
|
//#endregion
|
|
7973
|
+
//#region src/core/abort-helper.ts
|
|
7974
|
+
/**
|
|
7975
|
+
* AbortSignal helper utilities.
|
|
7976
|
+
*/
|
|
7977
|
+
/**
|
|
7978
|
+
* Throw a DOMException if the given AbortSignal is already aborted.
|
|
7979
|
+
* Used at checkpoints throughout the rendering pipeline to support
|
|
7980
|
+
* cancellable renders.
|
|
7981
|
+
*
|
|
7982
|
+
* @param signal - The AbortSignal to check. If undefined or not aborted, this is a no-op.
|
|
7983
|
+
* @throws {DOMException} With name 'AbortError' if the signal has been aborted.
|
|
7984
|
+
*/
|
|
7985
|
+
const throwIfAborted = (signal) => {
|
|
7986
|
+
if (signal?.aborted) throw new DOMException("The operation was aborted.", "AbortError");
|
|
7987
|
+
};
|
|
7988
|
+
//#endregion
|
|
7817
7989
|
//#region src/dom/iframe-mount.ts
|
|
7990
|
+
const trustedTypePolicies = /* @__PURE__ */ new WeakMap();
|
|
7991
|
+
/**
|
|
7992
|
+
* Resolve the Trusted Types policy used for writing the clone document.
|
|
7993
|
+
* Returns null when Trusted Types are unavailable or the policy could not be
|
|
7994
|
+
* created — document.write is not a Trusted Types sink, so the plain string
|
|
7995
|
+
* stays functional in both cases.
|
|
7996
|
+
* @internal – exported for testing only.
|
|
7997
|
+
*/
|
|
7998
|
+
const resolveTrustedTypesPolicy = (ownerWindow) => {
|
|
7999
|
+
const factory = ownerWindow && ownerWindow.trustedTypes;
|
|
8000
|
+
if (!factory) return null;
|
|
8001
|
+
if (trustedTypePolicies.has(factory)) return trustedTypePolicies.get(factory) ?? null;
|
|
8002
|
+
let policy = null;
|
|
8003
|
+
try {
|
|
8004
|
+
policy = factory.getPolicy?.("html2canvas-pro") ?? factory.createPolicy("html2canvas-pro", { createHTML: (s) => s });
|
|
8005
|
+
} catch (e) {
|
|
8006
|
+
policy = null;
|
|
8007
|
+
}
|
|
8008
|
+
trustedTypePolicies.set(factory, policy);
|
|
8009
|
+
return policy;
|
|
8010
|
+
};
|
|
7818
8011
|
const createIFrameContainer = (ownerDocument, bounds, customContainer) => {
|
|
7819
8012
|
const cloneIframeContainer = ownerDocument.createElement("iframe");
|
|
7820
8013
|
cloneIframeContainer.className = "html2canvas-container";
|
|
@@ -7847,29 +8040,105 @@
|
|
|
7847
8040
|
const imagesReady = (document) => {
|
|
7848
8041
|
return Promise.all([].slice.call(document.images, 0).map(imageReady));
|
|
7849
8042
|
};
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
8043
|
+
/**
|
|
8044
|
+
* Wait until every external stylesheet link of the clone has been applied or
|
|
8045
|
+
* definitively failed, or the readiness budget expires.
|
|
8046
|
+
*
|
|
8047
|
+
* The clone is mounted by adoptNode() into an already-closed document
|
|
8048
|
+
* (close() must precede adoptNode for Chrome uppercase class-name matching,
|
|
8049
|
+
* see the mount sequence below), so the cloned <link rel="stylesheet">
|
|
8050
|
+
* elements are inserted after the document finished loading: they neither
|
|
8051
|
+
* delay the iframe load event nor change readyState, and the iframeLoader
|
|
8052
|
+
* readiness poll cannot observe them. On a cold cache the first capture
|
|
8053
|
+
* could then measure the clone before its external CSS arrived and render
|
|
8054
|
+
* an unstyled layout (issue #245). Inline <style> clones apply
|
|
8055
|
+
* synchronously and document-level adopted stylesheets are serialised at
|
|
8056
|
+
* clone time, so neither needs this wait.
|
|
8057
|
+
* @internal – exported for testing only.
|
|
8058
|
+
*/
|
|
8059
|
+
const stylesheetsReady = (documentClone, logger, signal) => {
|
|
8060
|
+
if (signal?.aborted) return Promise.resolve();
|
|
8061
|
+
const pending = [];
|
|
8062
|
+
const links = documentClone.getElementsByTagName("link");
|
|
8063
|
+
for (let i = 0; i < links.length; i++) {
|
|
8064
|
+
const link = links[i];
|
|
8065
|
+
if (!link || link.sheet) continue;
|
|
8066
|
+
const rel = (link.getAttribute("rel") ?? "").trim().toLowerCase().split(/\s+/);
|
|
8067
|
+
if (!rel.includes("stylesheet") || rel.includes("alternate") || link.disabled || !link.getAttribute("href")) continue;
|
|
8068
|
+
pending.push(new Promise((resolve) => {
|
|
8069
|
+
let timer;
|
|
8070
|
+
const settle = () => {
|
|
8071
|
+
link.removeEventListener("load", settle);
|
|
8072
|
+
link.removeEventListener("error", settle);
|
|
8073
|
+
signal?.removeEventListener("abort", onAbort);
|
|
8074
|
+
clearTimeout(timer);
|
|
8075
|
+
resolve();
|
|
8076
|
+
};
|
|
8077
|
+
const onAbort = () => settle();
|
|
8078
|
+
timer = setTimeout(() => {
|
|
8079
|
+
logger?.warn(`Stylesheet ${link.href} did not finish loading within ${CLONE_READY_TIMEOUT_MS / 1e3}s; continuing with a possibly unstyled clone`);
|
|
8080
|
+
settle();
|
|
8081
|
+
}, CLONE_READY_TIMEOUT_MS);
|
|
8082
|
+
link.addEventListener("load", settle);
|
|
8083
|
+
link.addEventListener("error", settle);
|
|
8084
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
8085
|
+
if (link.sheet) settle();
|
|
8086
|
+
}));
|
|
8087
|
+
}
|
|
8088
|
+
if (pending.length === 0) return Promise.resolve();
|
|
8089
|
+
return Promise.all(pending).then(() => void 0);
|
|
8090
|
+
};
|
|
8091
|
+
const iframeLoader = (iframe, logger, signal) => {
|
|
8092
|
+
return new Promise((resolve, reject) => {
|
|
8093
|
+
const cloneWindow = iframe.contentWindow;
|
|
8094
|
+
if (!cloneWindow) return reject(`No window assigned for iframe`);
|
|
8095
|
+
const documentClone = cloneWindow.document;
|
|
8096
|
+
let interval;
|
|
8097
|
+
const watchdog = setTimeout(() => {
|
|
8098
|
+
if (interval) clearInterval(interval);
|
|
8099
|
+
reject(/* @__PURE__ */ new Error(`Cloned iframe did not fire its load event within ${IFRAME_LOAD_WATCHDOG_MS}ms`));
|
|
8100
|
+
}, IFRAME_LOAD_WATCHDOG_MS);
|
|
8101
|
+
const onAbort = () => {
|
|
8102
|
+
if (interval) clearInterval(interval);
|
|
8103
|
+
clearTimeout(watchdog);
|
|
8104
|
+
reject(new DOMException("The operation was aborted.", "AbortError"));
|
|
8105
|
+
};
|
|
8106
|
+
cloneWindow.onload = iframe.onload = () => {
|
|
7856
8107
|
cloneWindow.onload = iframe.onload = null;
|
|
7857
|
-
const
|
|
8108
|
+
const maxAttempts = Math.ceil(CLONE_READY_TIMEOUT_MS / 50);
|
|
7858
8109
|
let attempts = 0;
|
|
7859
|
-
|
|
8110
|
+
interval = setInterval(() => {
|
|
7860
8111
|
attempts++;
|
|
7861
|
-
if (
|
|
8112
|
+
if (signal?.aborted) onAbort();
|
|
8113
|
+
else if (documentClone.body.childNodes.length > 0 && documentClone.readyState === "complete") {
|
|
7862
8114
|
clearInterval(interval);
|
|
8115
|
+
interval = void 0;
|
|
8116
|
+
clearTimeout(watchdog);
|
|
7863
8117
|
resolve(iframe);
|
|
7864
|
-
} else if (attempts >=
|
|
8118
|
+
} else if (attempts >= maxAttempts) {
|
|
7865
8119
|
clearInterval(interval);
|
|
8120
|
+
interval = void 0;
|
|
8121
|
+
logger?.warn(`Cloned iframe did not become ready within ${CLONE_READY_TIMEOUT_MS / 1e3} seconds; continuing with a possibly incomplete document`);
|
|
7866
8122
|
resolve(iframe);
|
|
7867
8123
|
}
|
|
7868
8124
|
}, 50);
|
|
7869
8125
|
};
|
|
8126
|
+
if (signal) {
|
|
8127
|
+
if (signal.aborted) onAbort();
|
|
8128
|
+
else signal.addEventListener("abort", onAbort, { once: true });
|
|
8129
|
+
}
|
|
7870
8130
|
});
|
|
7871
8131
|
};
|
|
7872
8132
|
/**
|
|
8133
|
+
* Reduce a doctype component to characters that are inert inside a
|
|
8134
|
+
* <!DOCTYPE ...> declaration. Doctype content is parsed as a declaration
|
|
8135
|
+
* token, never as HTML markup, but the fields originate from the captured
|
|
8136
|
+
* document — stripping markup delimiters and control characters here makes
|
|
8137
|
+
* that property locally verifiable (and keeps the sanitizer guarantee even
|
|
8138
|
+
* if a future serializer ever embeds the result elsewhere).
|
|
8139
|
+
*/
|
|
8140
|
+
const sanitizeDoctypePart = (value) => value.replace(/[<>&"'`\\]|[\u0000-\u001f\u007f]/g, "");
|
|
8141
|
+
/**
|
|
7873
8142
|
* Serialise a document type declaration to an HTML string.
|
|
7874
8143
|
* @internal – exported for testing only, not part of the public API.
|
|
7875
8144
|
*/
|
|
@@ -7877,12 +8146,12 @@
|
|
|
7877
8146
|
let str = "";
|
|
7878
8147
|
if (doctype) {
|
|
7879
8148
|
str += "<!DOCTYPE ";
|
|
7880
|
-
if (doctype.name) str += doctype.name;
|
|
7881
|
-
if (doctype.internalSubset) str += " " + doctype.internalSubset
|
|
8149
|
+
if (doctype.name) str += sanitizeDoctypePart(doctype.name);
|
|
8150
|
+
if (doctype.internalSubset) str += " " + sanitizeDoctypePart(doctype.internalSubset);
|
|
7882
8151
|
if (doctype.publicId) {
|
|
7883
|
-
str += " PUBLIC \"" + doctype.publicId
|
|
7884
|
-
if (doctype.systemId) str += " \"" + doctype.systemId
|
|
7885
|
-
} else if (doctype.systemId) str += " SYSTEM \"" + doctype.systemId
|
|
8152
|
+
str += " PUBLIC \"" + sanitizeDoctypePart(doctype.publicId) + "\"";
|
|
8153
|
+
if (doctype.systemId) str += " \"" + sanitizeDoctypePart(doctype.systemId) + "\"";
|
|
8154
|
+
} else if (doctype.systemId) str += " SYSTEM \"" + sanitizeDoctypePart(doctype.systemId) + "\"";
|
|
7886
8155
|
str += ">";
|
|
7887
8156
|
}
|
|
7888
8157
|
return str;
|
|
@@ -7911,14 +8180,21 @@
|
|
|
7911
8180
|
const scrollY = ownerDocument.defaultView.pageYOffset;
|
|
7912
8181
|
const cloneWindow = iframe.contentWindow;
|
|
7913
8182
|
const documentClone = cloneWindow.document;
|
|
7914
|
-
const iframeLoad = iframeLoader(iframe).then(async () => {
|
|
8183
|
+
const iframeLoad = iframeLoader(iframe, context.logger, mount.signal).then(async () => {
|
|
7915
8184
|
mount.scrolledElements.forEach(restoreNodeScroll);
|
|
7916
8185
|
if (cloneWindow) cloneWindow.scrollTo(windowSize.left, windowSize.top);
|
|
7917
8186
|
const onclone = mount.onclone;
|
|
7918
8187
|
const referenceElement = mount.clonedReferenceElement;
|
|
7919
8188
|
if (typeof referenceElement === "undefined") throw new Error(`Error finding the ${mount.referenceElementName} in the cloned document`);
|
|
8189
|
+
throwIfAborted(mount.signal);
|
|
8190
|
+
await stylesheetWait;
|
|
8191
|
+
throwIfAborted(mount.signal);
|
|
7920
8192
|
if (documentClone.fonts && documentClone.fonts.ready) await documentClone.fonts.ready;
|
|
7921
|
-
|
|
8193
|
+
throwIfAborted(mount.signal);
|
|
8194
|
+
if (/(AppleWebKit)/g.test(navigator.userAgent)) {
|
|
8195
|
+
await imagesReady(documentClone);
|
|
8196
|
+
throwIfAborted(mount.signal);
|
|
8197
|
+
}
|
|
7922
8198
|
if (typeof onclone === "function") await Promise.resolve().then(() => onclone(documentClone, referenceElement));
|
|
7923
8199
|
cloneWindow.scrollTo(windowSize.left, windowSize.top);
|
|
7924
8200
|
if (/AppleWebKit/g.test(navigator.userAgent) && (cloneWindow.scrollY !== windowSize.top || cloneWindow.scrollX !== windowSize.left)) {
|
|
@@ -7934,12 +8210,9 @@
|
|
|
7934
8210
|
*/
|
|
7935
8211
|
const baseUri = ownerDocument.baseURI;
|
|
7936
8212
|
documentClone.open();
|
|
7937
|
-
const rawHTML = serializeDoctype(
|
|
8213
|
+
const rawHTML = serializeDoctype(ownerDocument.doctype) + "<html></html>";
|
|
7938
8214
|
try {
|
|
7939
|
-
const
|
|
7940
|
-
const trustedTypesFactory = ownerWindow && ownerWindow.trustedTypes;
|
|
7941
|
-
let policy = trustedTypesFactory?.getPolicy?.("html2canvas-pro");
|
|
7942
|
-
if (!policy && trustedTypesFactory) policy = trustedTypesFactory.createPolicy("html2canvas-pro", { createHTML: (s) => s });
|
|
8215
|
+
const policy = resolveTrustedTypesPolicy(ownerDocument.defaultView);
|
|
7943
8216
|
const html = policy ? policy.createHTML(rawHTML) : rawHTML;
|
|
7944
8217
|
documentClone.write(html);
|
|
7945
8218
|
} catch (_e) {
|
|
@@ -7966,6 +8239,7 @@
|
|
|
7966
8239
|
const adoptedNode = documentClone.adoptNode(mount.documentElement);
|
|
7967
8240
|
addBase(adoptedNode, baseUri);
|
|
7968
8241
|
documentClone.replaceChild(adoptedNode, documentClone.documentElement);
|
|
8242
|
+
const stylesheetWait = stylesheetsReady(documentClone, context.logger, mount.signal);
|
|
7969
8243
|
return iframeLoad;
|
|
7970
8244
|
};
|
|
7971
8245
|
//#endregion
|
|
@@ -7986,6 +8260,15 @@
|
|
|
7986
8260
|
return null;
|
|
7987
8261
|
};
|
|
7988
8262
|
var DocumentCloner = class {
|
|
8263
|
+
context;
|
|
8264
|
+
options;
|
|
8265
|
+
scrolledElements;
|
|
8266
|
+
referenceElement;
|
|
8267
|
+
clonedReferenceElement;
|
|
8268
|
+
documentElement;
|
|
8269
|
+
counters;
|
|
8270
|
+
pseudoContents;
|
|
8271
|
+
slotCloner;
|
|
7989
8272
|
constructor(context, element, options) {
|
|
7990
8273
|
this.context = context;
|
|
7991
8274
|
this.options = options;
|
|
@@ -7995,7 +8278,8 @@
|
|
|
7995
8278
|
this.pseudoContents = new PseudoContentResolver(context, this.counters);
|
|
7996
8279
|
this.slotCloner = new SlotCloner((node, copyStyles) => this.cloneNode(node, copyStyles), {
|
|
7997
8280
|
ignoreElements: options.ignoreElements,
|
|
7998
|
-
copyStyles: options.copyStyles ?? true
|
|
8281
|
+
copyStyles: options.copyStyles ?? true,
|
|
8282
|
+
cspNonce: options.cspNonce
|
|
7999
8283
|
}, context);
|
|
8000
8284
|
if (!element.ownerDocument) throw new Error("Cloned element does not have an owner document");
|
|
8001
8285
|
if (!this.options.iframeContainer) {
|
|
@@ -8003,6 +8287,25 @@
|
|
|
8003
8287
|
if (shadowRoot) this.options.iframeContainer = shadowRoot;
|
|
8004
8288
|
}
|
|
8005
8289
|
this.documentElement = this.cloneNode(element.ownerDocument.documentElement, false);
|
|
8290
|
+
this.appendDocumentAdoptedStyles(element.ownerDocument);
|
|
8291
|
+
}
|
|
8292
|
+
/**
|
|
8293
|
+
* Re-materialise the source document's constructable stylesheets
|
|
8294
|
+
* (document.adoptedStyleSheets) as a <style> at the end of the clone's
|
|
8295
|
+
* <head>: cloneNode never carries them, and they cascade after all author
|
|
8296
|
+
* sheets, which appending last approximates.
|
|
8297
|
+
*
|
|
8298
|
+
* Skipped when computed styles are inlined per element (copyStyles), like
|
|
8299
|
+
* the other stylesheet-cloning paths.
|
|
8300
|
+
*/
|
|
8301
|
+
appendDocumentAdoptedStyles(ownerDocument) {
|
|
8302
|
+
if (this.options.copyStyles) return;
|
|
8303
|
+
const sheets = ownerDocument.adoptedStyleSheets;
|
|
8304
|
+
if (!sheets || sheets.length === 0) return;
|
|
8305
|
+
const head = this.documentElement.getElementsByTagName("head").item(0);
|
|
8306
|
+
if (!head) return;
|
|
8307
|
+
const style = createAdoptedStylesElement(this.documentElement.ownerDocument ?? ownerDocument, sheets, this.options.cspNonce);
|
|
8308
|
+
if (style) head.appendChild(style);
|
|
8006
8309
|
}
|
|
8007
8310
|
toIFrame(ownerDocument, windowSize) {
|
|
8008
8311
|
return mountCloneInIFrame(this.context, ownerDocument, windowSize, {
|
|
@@ -8011,7 +8314,8 @@
|
|
|
8011
8314
|
referenceElementName: this.referenceElement.nodeName,
|
|
8012
8315
|
scrolledElements: this.scrolledElements,
|
|
8013
8316
|
onclone: this.options.onclone,
|
|
8014
|
-
container: this.options.iframeContainer
|
|
8317
|
+
container: this.options.iframeContainer,
|
|
8318
|
+
signal: this.options.signal
|
|
8015
8319
|
});
|
|
8016
8320
|
}
|
|
8017
8321
|
createElementClone(node) {
|
|
@@ -8129,7 +8433,7 @@
|
|
|
8129
8433
|
this.slotCloner.cloneChildNodes(node, clone, copyStyles);
|
|
8130
8434
|
}
|
|
8131
8435
|
cloneNode(node, copyStyles) {
|
|
8132
|
-
if (isTextNode(node)) return document.createTextNode(node.data);
|
|
8436
|
+
if (isTextNode(node)) return (node.ownerDocument ?? document).createTextNode(node.data);
|
|
8133
8437
|
if (!node.ownerDocument) return node.cloneNode(false);
|
|
8134
8438
|
const window = node.ownerDocument.defaultView;
|
|
8135
8439
|
if (window && isElementNode(node) && (isHTMLElementNode(node) || isSVGElementNode(node))) {
|
|
@@ -8215,7 +8519,7 @@
|
|
|
8215
8519
|
*/
|
|
8216
8520
|
static normalizeElement(element, styles) {
|
|
8217
8521
|
const originalStyles = {};
|
|
8218
|
-
if (!isHTMLElementNode(element)) return originalStyles;
|
|
8522
|
+
if (!isHTMLElementNode(element) && !isSVGElementNode(element)) return originalStyles;
|
|
8219
8523
|
if (styles.animationDuration.some((duration) => duration > 0)) {
|
|
8220
8524
|
originalStyles.animationDuration = element.style.animationDuration;
|
|
8221
8525
|
element.style.animationDuration = "0s";
|
|
@@ -8224,13 +8528,25 @@
|
|
|
8224
8528
|
originalStyles.transform = element.style.transform;
|
|
8225
8529
|
element.style.transform = "translate(0, 0)";
|
|
8226
8530
|
}
|
|
8531
|
+
let needsContainingBlockFallback = false;
|
|
8227
8532
|
if (styles.rotate !== null) {
|
|
8228
8533
|
originalStyles.rotate = element.style.rotate;
|
|
8229
8534
|
element.style.rotate = "0deg";
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
-
|
|
8535
|
+
needsContainingBlockFallback = true;
|
|
8536
|
+
}
|
|
8537
|
+
if (styles.translate !== null) {
|
|
8538
|
+
originalStyles.translate = element.style.translate;
|
|
8539
|
+
element.style.translate = "0px";
|
|
8540
|
+
needsContainingBlockFallback = true;
|
|
8541
|
+
}
|
|
8542
|
+
if (styles.scale !== null) {
|
|
8543
|
+
originalStyles.scale = element.style.scale;
|
|
8544
|
+
element.style.scale = "1";
|
|
8545
|
+
needsContainingBlockFallback = true;
|
|
8546
|
+
}
|
|
8547
|
+
if (needsContainingBlockFallback && originalStyles.transform === void 0) {
|
|
8548
|
+
originalStyles.transform = element.style.transform;
|
|
8549
|
+
element.style.transform = "translate(0, 0)";
|
|
8234
8550
|
}
|
|
8235
8551
|
return originalStyles;
|
|
8236
8552
|
}
|
|
@@ -8241,26 +8557,39 @@
|
|
|
8241
8557
|
* @param originalStyles - Original styles to restore
|
|
8242
8558
|
*/
|
|
8243
8559
|
static restoreElement(element, originalStyles) {
|
|
8244
|
-
if (!isHTMLElementNode(element)) return;
|
|
8560
|
+
if (!isHTMLElementNode(element) && !isSVGElementNode(element)) return;
|
|
8245
8561
|
if (originalStyles.animationDuration !== void 0) element.style.animationDuration = originalStyles.animationDuration;
|
|
8246
8562
|
if (originalStyles.transform !== void 0) element.style.transform = originalStyles.transform;
|
|
8247
8563
|
if (originalStyles.rotate !== void 0) element.style.rotate = originalStyles.rotate;
|
|
8564
|
+
if (originalStyles.translate !== void 0) element.style.translate = originalStyles.translate;
|
|
8565
|
+
if (originalStyles.scale !== void 0) element.style.scale = originalStyles.scale;
|
|
8248
8566
|
}
|
|
8249
8567
|
};
|
|
8250
8568
|
//#endregion
|
|
8251
8569
|
//#region src/dom/element-container.ts
|
|
8252
8570
|
var ElementContainer = class {
|
|
8571
|
+
context;
|
|
8572
|
+
styles;
|
|
8573
|
+
textNodes = [];
|
|
8574
|
+
elements = [];
|
|
8575
|
+
bounds;
|
|
8576
|
+
/**
|
|
8577
|
+
* Bounds of the <legend> child of a <fieldset>, when present. Browsers break
|
|
8578
|
+
* the fieldset's top border where the legend sits; the renderer uses these
|
|
8579
|
+
* bounds to leave a matching gap (issue #227).
|
|
8580
|
+
*/
|
|
8581
|
+
legendBounds;
|
|
8582
|
+
createsStackingContext = false;
|
|
8583
|
+
createsRealStackingContext = false;
|
|
8584
|
+
isListOwner = false;
|
|
8585
|
+
debugRender = false;
|
|
8586
|
+
originalStyles;
|
|
8587
|
+
originalElement;
|
|
8253
8588
|
constructor(context, element, options = {}) {
|
|
8254
8589
|
this.context = context;
|
|
8255
|
-
this.textNodes = [];
|
|
8256
|
-
this.elements = [];
|
|
8257
|
-
this.createsStackingContext = false;
|
|
8258
|
-
this.createsRealStackingContext = false;
|
|
8259
|
-
this.isListOwner = false;
|
|
8260
|
-
this.debugRender = false;
|
|
8261
8590
|
if (isDebugging(element, 3)) debugger;
|
|
8262
8591
|
this.styles = new CSSParsedDeclaration(context, context.config.window.getComputedStyle(element, null));
|
|
8263
|
-
if (options.normalizeDom !== false && isHTMLElementNode(element)) {
|
|
8592
|
+
if (options.normalizeDom !== false && (isHTMLElementNode(element) || isSVGElementNode(element))) {
|
|
8264
8593
|
this.originalStyles = DOMNormalizer.normalizeElement(element, this.styles);
|
|
8265
8594
|
this.originalElement = element;
|
|
8266
8595
|
}
|
|
@@ -8297,278 +8626,16 @@
|
|
|
8297
8626
|
}
|
|
8298
8627
|
};
|
|
8299
8628
|
//#endregion
|
|
8300
|
-
//#region node_modules/.pnpm/text-segmentation@1.0.3/node_modules/text-segmentation/dist/text-segmentation.es5.js
|
|
8301
|
-
var base64 = "AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAC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IAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYEC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OAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=";
|
|
8302
|
-
var chars$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
8303
|
-
var lookup$1 = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);
|
|
8304
|
-
for (var i$1 = 0; i$1 < chars$1.length; i$1++) lookup$1[chars$1.charCodeAt(i$1)] = i$1;
|
|
8305
|
-
var decode = function(base64) {
|
|
8306
|
-
var bufferLength = base64.length * .75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
|
|
8307
|
-
if (base64[base64.length - 1] === "=") {
|
|
8308
|
-
bufferLength--;
|
|
8309
|
-
if (base64[base64.length - 2] === "=") bufferLength--;
|
|
8310
|
-
}
|
|
8311
|
-
var buffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined" && typeof Uint8Array.prototype.slice !== "undefined" ? new ArrayBuffer(bufferLength) : new Array(bufferLength);
|
|
8312
|
-
var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);
|
|
8313
|
-
for (i = 0; i < len; i += 4) {
|
|
8314
|
-
encoded1 = lookup$1[base64.charCodeAt(i)];
|
|
8315
|
-
encoded2 = lookup$1[base64.charCodeAt(i + 1)];
|
|
8316
|
-
encoded3 = lookup$1[base64.charCodeAt(i + 2)];
|
|
8317
|
-
encoded4 = lookup$1[base64.charCodeAt(i + 3)];
|
|
8318
|
-
bytes[p++] = encoded1 << 2 | encoded2 >> 4;
|
|
8319
|
-
bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;
|
|
8320
|
-
bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;
|
|
8321
|
-
}
|
|
8322
|
-
return buffer;
|
|
8323
|
-
};
|
|
8324
|
-
var polyUint16Array = function(buffer) {
|
|
8325
|
-
var length = buffer.length;
|
|
8326
|
-
var bytes = [];
|
|
8327
|
-
for (var i = 0; i < length; i += 2) bytes.push(buffer[i + 1] << 8 | buffer[i]);
|
|
8328
|
-
return bytes;
|
|
8329
|
-
};
|
|
8330
|
-
var polyUint32Array = function(buffer) {
|
|
8331
|
-
var length = buffer.length;
|
|
8332
|
-
var bytes = [];
|
|
8333
|
-
for (var i = 0; i < length; i += 4) bytes.push(buffer[i + 3] << 24 | buffer[i + 2] << 16 | buffer[i + 1] << 8 | buffer[i]);
|
|
8334
|
-
return bytes;
|
|
8335
|
-
};
|
|
8336
|
-
/** Shift size for getting the index-2 table offset. */
|
|
8337
|
-
var UTRIE2_SHIFT_2 = 5;
|
|
8338
|
-
/** Shift size for getting the index-1 table offset. */
|
|
8339
|
-
var UTRIE2_SHIFT_1 = 11;
|
|
8340
|
-
/**
|
|
8341
|
-
* Shift size for shifting left the index array values.
|
|
8342
|
-
* Increases possible data size with 16-bit index values at the cost
|
|
8343
|
-
* of compactability.
|
|
8344
|
-
* This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.
|
|
8345
|
-
*/
|
|
8346
|
-
var UTRIE2_INDEX_SHIFT = 2;
|
|
8347
|
-
/**
|
|
8348
|
-
* Difference between the two shift sizes,
|
|
8349
|
-
* for getting an index-1 offset from an index-2 offset. 6=11-5
|
|
8350
|
-
*/
|
|
8351
|
-
var UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2;
|
|
8352
|
-
/**
|
|
8353
|
-
* The part of the index-2 table for U+D800..U+DBFF stores values for
|
|
8354
|
-
* lead surrogate code _units_ not code _points_.
|
|
8355
|
-
* Values for lead surrogate code _points_ are indexed with this portion of the table.
|
|
8356
|
-
* Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)
|
|
8357
|
-
*/
|
|
8358
|
-
var UTRIE2_LSCP_INDEX_2_OFFSET = 65536 >> UTRIE2_SHIFT_2;
|
|
8359
|
-
/** Mask for getting the lower bits for the in-data-block offset. */
|
|
8360
|
-
var UTRIE2_DATA_MASK = (1 << UTRIE2_SHIFT_2) - 1;
|
|
8361
|
-
/**
|
|
8362
|
-
* The index-1 table, only used for supplementary code points, at offset 2112=0x840.
|
|
8363
|
-
* Variable length, for code points up to highStart, where the last single-value range starts.
|
|
8364
|
-
* Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.
|
|
8365
|
-
* (For 0x100000 supplementary code points U+10000..U+10ffff.)
|
|
8366
|
-
*
|
|
8367
|
-
* The part of the index-2 table for supplementary code points starts
|
|
8368
|
-
* after this index-1 table.
|
|
8369
|
-
*
|
|
8370
|
-
* Both the index-1 table and the following part of the index-2 table
|
|
8371
|
-
* are omitted completely if there is only BMP data.
|
|
8372
|
-
*/
|
|
8373
|
-
var UTRIE2_INDEX_1_OFFSET = UTRIE2_LSCP_INDEX_2_OFFSET + (1024 >> UTRIE2_SHIFT_2) + 32;
|
|
8374
|
-
/**
|
|
8375
|
-
* Number of index-1 entries for the BMP. 32=0x20
|
|
8376
|
-
* This part of the index-1 table is omitted from the serialized form.
|
|
8377
|
-
*/
|
|
8378
|
-
var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 65536 >> UTRIE2_SHIFT_1;
|
|
8379
|
-
/** Mask for getting the lower bits for the in-index-2-block offset. */
|
|
8380
|
-
var UTRIE2_INDEX_2_MASK = (1 << UTRIE2_SHIFT_1_2) - 1;
|
|
8381
|
-
var slice16 = function(view, start, end) {
|
|
8382
|
-
if (view.slice) return view.slice(start, end);
|
|
8383
|
-
return new Uint16Array(Array.prototype.slice.call(view, start, end));
|
|
8384
|
-
};
|
|
8385
|
-
var slice32 = function(view, start, end) {
|
|
8386
|
-
if (view.slice) return view.slice(start, end);
|
|
8387
|
-
return new Uint32Array(Array.prototype.slice.call(view, start, end));
|
|
8388
|
-
};
|
|
8389
|
-
var createTrieFromBase64 = function(base64, _byteLength) {
|
|
8390
|
-
var buffer = decode(base64);
|
|
8391
|
-
var view32 = Array.isArray(buffer) ? polyUint32Array(buffer) : new Uint32Array(buffer);
|
|
8392
|
-
var view16 = Array.isArray(buffer) ? polyUint16Array(buffer) : new Uint16Array(buffer);
|
|
8393
|
-
var headerLength = 24;
|
|
8394
|
-
var index = slice16(view16, headerLength / 2, view32[4] / 2);
|
|
8395
|
-
var data = view32[5] === 2 ? slice16(view16, (headerLength + view32[4]) / 2) : slice32(view32, Math.ceil((headerLength + view32[4]) / 4));
|
|
8396
|
-
return new Trie(view32[0], view32[1], view32[2], view32[3], index, data);
|
|
8397
|
-
};
|
|
8398
|
-
var Trie = function() {
|
|
8399
|
-
function Trie(initialValue, errorValue, highStart, highValueIndex, index, data) {
|
|
8400
|
-
this.initialValue = initialValue;
|
|
8401
|
-
this.errorValue = errorValue;
|
|
8402
|
-
this.highStart = highStart;
|
|
8403
|
-
this.highValueIndex = highValueIndex;
|
|
8404
|
-
this.index = index;
|
|
8405
|
-
this.data = data;
|
|
8406
|
-
}
|
|
8407
|
-
/**
|
|
8408
|
-
* Get the value for a code point as stored in the Trie.
|
|
8409
|
-
*
|
|
8410
|
-
* @param codePoint the code point
|
|
8411
|
-
* @return the value
|
|
8412
|
-
*/
|
|
8413
|
-
Trie.prototype.get = function(codePoint) {
|
|
8414
|
-
var ix;
|
|
8415
|
-
if (codePoint >= 0) {
|
|
8416
|
-
if (codePoint < 55296 || codePoint > 56319 && codePoint <= 65535) {
|
|
8417
|
-
ix = this.index[codePoint >> UTRIE2_SHIFT_2];
|
|
8418
|
-
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
|
8419
|
-
return this.data[ix];
|
|
8420
|
-
}
|
|
8421
|
-
if (codePoint <= 65535) {
|
|
8422
|
-
ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + (codePoint - 55296 >> UTRIE2_SHIFT_2)];
|
|
8423
|
-
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
|
8424
|
-
return this.data[ix];
|
|
8425
|
-
}
|
|
8426
|
-
if (codePoint < this.highStart) {
|
|
8427
|
-
ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1);
|
|
8428
|
-
ix = this.index[ix];
|
|
8429
|
-
ix += codePoint >> UTRIE2_SHIFT_2 & UTRIE2_INDEX_2_MASK;
|
|
8430
|
-
ix = this.index[ix];
|
|
8431
|
-
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
|
8432
|
-
return this.data[ix];
|
|
8433
|
-
}
|
|
8434
|
-
if (codePoint <= 1114111) return this.data[this.highValueIndex];
|
|
8435
|
-
}
|
|
8436
|
-
return this.errorValue;
|
|
8437
|
-
};
|
|
8438
|
-
return Trie;
|
|
8439
|
-
}();
|
|
8440
|
-
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
8441
|
-
var lookup = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);
|
|
8442
|
-
for (var i = 0; i < chars.length; i++) lookup[chars.charCodeAt(i)] = i;
|
|
8443
|
-
var Prepend = 1;
|
|
8444
|
-
var CR = 2;
|
|
8445
|
-
var LF = 3;
|
|
8446
|
-
var Control = 4;
|
|
8447
|
-
var Extend = 5;
|
|
8448
|
-
var SpacingMark = 7;
|
|
8449
|
-
var L = 8;
|
|
8450
|
-
var V = 9;
|
|
8451
|
-
var T = 10;
|
|
8452
|
-
var LV = 11;
|
|
8453
|
-
var LVT = 12;
|
|
8454
|
-
var ZWJ = 13;
|
|
8455
|
-
var Extended_Pictographic = 14;
|
|
8456
|
-
var RI = 15;
|
|
8457
|
-
var toCodePoints = function(str) {
|
|
8458
|
-
var codePoints = [];
|
|
8459
|
-
var i = 0;
|
|
8460
|
-
var length = str.length;
|
|
8461
|
-
while (i < length) {
|
|
8462
|
-
var value = str.charCodeAt(i++);
|
|
8463
|
-
if (value >= 55296 && value <= 56319 && i < length) {
|
|
8464
|
-
var extra = str.charCodeAt(i++);
|
|
8465
|
-
if ((extra & 64512) === 56320) codePoints.push(((value & 1023) << 10) + (extra & 1023) + 65536);
|
|
8466
|
-
else {
|
|
8467
|
-
codePoints.push(value);
|
|
8468
|
-
i--;
|
|
8469
|
-
}
|
|
8470
|
-
} else codePoints.push(value);
|
|
8471
|
-
}
|
|
8472
|
-
return codePoints;
|
|
8473
|
-
};
|
|
8474
|
-
var fromCodePoint = function() {
|
|
8475
|
-
var codePoints = [];
|
|
8476
|
-
for (var _i = 0; _i < arguments.length; _i++) codePoints[_i] = arguments[_i];
|
|
8477
|
-
if (String.fromCodePoint) return String.fromCodePoint.apply(String, codePoints);
|
|
8478
|
-
var length = codePoints.length;
|
|
8479
|
-
if (!length) return "";
|
|
8480
|
-
var codeUnits = [];
|
|
8481
|
-
var index = -1;
|
|
8482
|
-
var result = "";
|
|
8483
|
-
while (++index < length) {
|
|
8484
|
-
var codePoint = codePoints[index];
|
|
8485
|
-
if (codePoint <= 65535) codeUnits.push(codePoint);
|
|
8486
|
-
else {
|
|
8487
|
-
codePoint -= 65536;
|
|
8488
|
-
codeUnits.push((codePoint >> 10) + 55296, codePoint % 1024 + 56320);
|
|
8489
|
-
}
|
|
8490
|
-
if (index + 1 === length || codeUnits.length > 16384) {
|
|
8491
|
-
result += String.fromCharCode.apply(String, codeUnits);
|
|
8492
|
-
codeUnits.length = 0;
|
|
8493
|
-
}
|
|
8494
|
-
}
|
|
8495
|
-
return result;
|
|
8496
|
-
};
|
|
8497
|
-
var UnicodeTrie = createTrieFromBase64(base64);
|
|
8498
|
-
var BREAK_NOT_ALLOWED = "×";
|
|
8499
|
-
var BREAK_ALLOWED = "÷";
|
|
8500
|
-
var codePointToClass = function(codePoint) {
|
|
8501
|
-
return UnicodeTrie.get(codePoint);
|
|
8502
|
-
};
|
|
8503
|
-
var _graphemeBreakAtIndex = function(_codePoints, classTypes, index) {
|
|
8504
|
-
var prevIndex = index - 2;
|
|
8505
|
-
var prev = classTypes[prevIndex];
|
|
8506
|
-
var current = classTypes[index - 1];
|
|
8507
|
-
var next = classTypes[index];
|
|
8508
|
-
if (current === CR && next === LF) return BREAK_NOT_ALLOWED;
|
|
8509
|
-
if (current === CR || current === LF || current === Control) return BREAK_ALLOWED;
|
|
8510
|
-
if (next === CR || next === LF || next === Control) return BREAK_ALLOWED;
|
|
8511
|
-
if (current === L && [
|
|
8512
|
-
L,
|
|
8513
|
-
V,
|
|
8514
|
-
LV,
|
|
8515
|
-
LVT
|
|
8516
|
-
].indexOf(next) !== -1) return BREAK_NOT_ALLOWED;
|
|
8517
|
-
if ((current === LV || current === V) && (next === V || next === T)) return BREAK_NOT_ALLOWED;
|
|
8518
|
-
if ((current === LVT || current === T) && next === T) return BREAK_NOT_ALLOWED;
|
|
8519
|
-
if (next === ZWJ || next === Extend) return BREAK_NOT_ALLOWED;
|
|
8520
|
-
if (next === SpacingMark) return BREAK_NOT_ALLOWED;
|
|
8521
|
-
if (current === Prepend) return BREAK_NOT_ALLOWED;
|
|
8522
|
-
if (current === ZWJ && next === Extended_Pictographic) {
|
|
8523
|
-
while (prev === Extend) prev = classTypes[--prevIndex];
|
|
8524
|
-
if (prev === Extended_Pictographic) return BREAK_NOT_ALLOWED;
|
|
8525
|
-
}
|
|
8526
|
-
if (current === RI && next === RI) {
|
|
8527
|
-
var countRI = 0;
|
|
8528
|
-
while (prev === RI) {
|
|
8529
|
-
countRI++;
|
|
8530
|
-
prev = classTypes[--prevIndex];
|
|
8531
|
-
}
|
|
8532
|
-
if (countRI % 2 === 0) return BREAK_NOT_ALLOWED;
|
|
8533
|
-
}
|
|
8534
|
-
return BREAK_ALLOWED;
|
|
8535
|
-
};
|
|
8536
|
-
var GraphemeBreaker = function(str) {
|
|
8537
|
-
var codePoints = toCodePoints(str);
|
|
8538
|
-
var length = codePoints.length;
|
|
8539
|
-
var index = 0;
|
|
8540
|
-
var lastEnd = 0;
|
|
8541
|
-
var classTypes = codePoints.map(codePointToClass);
|
|
8542
|
-
return { next: function() {
|
|
8543
|
-
if (index >= length) return {
|
|
8544
|
-
done: true,
|
|
8545
|
-
value: null
|
|
8546
|
-
};
|
|
8547
|
-
var graphemeBreak = BREAK_NOT_ALLOWED;
|
|
8548
|
-
while (index < length && (graphemeBreak = _graphemeBreakAtIndex(codePoints, classTypes, ++index)) === BREAK_NOT_ALLOWED);
|
|
8549
|
-
if (graphemeBreak !== BREAK_NOT_ALLOWED || index === length) {
|
|
8550
|
-
var value = fromCodePoint.apply(null, codePoints.slice(lastEnd, index));
|
|
8551
|
-
lastEnd = index;
|
|
8552
|
-
return {
|
|
8553
|
-
value,
|
|
8554
|
-
done: false
|
|
8555
|
-
};
|
|
8556
|
-
}
|
|
8557
|
-
return {
|
|
8558
|
-
done: true,
|
|
8559
|
-
value: null
|
|
8560
|
-
};
|
|
8561
|
-
} };
|
|
8562
|
-
};
|
|
8563
|
-
var splitGraphemes = function(str) {
|
|
8564
|
-
var breaker = GraphemeBreaker(str);
|
|
8565
|
-
var graphemes = [];
|
|
8566
|
-
var bk;
|
|
8567
|
-
while (!(bk = breaker.next()).done) if (bk.value) graphemes.push(bk.value.slice());
|
|
8568
|
-
return graphemes;
|
|
8569
|
-
};
|
|
8570
|
-
//#endregion
|
|
8571
8629
|
//#region src/core/features.ts
|
|
8630
|
+
/**
|
|
8631
|
+
* Runtime feature detection.
|
|
8632
|
+
*
|
|
8633
|
+
* Only checks that still gate real behaviour are kept: range-bounds
|
|
8634
|
+
* measurement (iOS 13 quirk), SVG drawing and CORS image support.
|
|
8635
|
+
* Dead probes (IE-era CORS XHR / XHR response-type checks) were removed —
|
|
8636
|
+
* every supported browser exposes `crossOrigin`, `responseType` and
|
|
8637
|
+
* `withCredentials`; Intl.Segmenter is used unconditionally.
|
|
8638
|
+
*/
|
|
8572
8639
|
const testRangeBounds = (document) => {
|
|
8573
8640
|
const TEST_HEIGHT = 123;
|
|
8574
8641
|
if (document.createRange) {
|
|
@@ -8587,35 +8654,7 @@
|
|
|
8587
8654
|
}
|
|
8588
8655
|
return false;
|
|
8589
8656
|
};
|
|
8590
|
-
const testIOSLineBreak = (document) => {
|
|
8591
|
-
const testElement = document.createElement("boundtest");
|
|
8592
|
-
testElement.style.width = "50px";
|
|
8593
|
-
testElement.style.display = "block";
|
|
8594
|
-
testElement.style.fontSize = "12px";
|
|
8595
|
-
testElement.style.letterSpacing = "0px";
|
|
8596
|
-
testElement.style.wordSpacing = "0px";
|
|
8597
|
-
document.body.appendChild(testElement);
|
|
8598
|
-
const range = document.createRange();
|
|
8599
|
-
testElement.innerHTML = typeof "".repeat === "function" ? "👨".repeat(10) : "";
|
|
8600
|
-
const node = testElement.firstChild;
|
|
8601
|
-
const textList = toCodePoints$1(node.data).map((i) => fromCodePoint$1(i));
|
|
8602
|
-
let offset = 0;
|
|
8603
|
-
let prev = {};
|
|
8604
|
-
const supports = textList.every((text, i) => {
|
|
8605
|
-
range.setStart(node, offset);
|
|
8606
|
-
range.setEnd(node, offset + text.length);
|
|
8607
|
-
const rect = range.getBoundingClientRect();
|
|
8608
|
-
offset += text.length;
|
|
8609
|
-
const boundAhead = rect.x > prev.x || rect.y > prev.y;
|
|
8610
|
-
prev = rect;
|
|
8611
|
-
if (i === 0) return true;
|
|
8612
|
-
return boundAhead;
|
|
8613
|
-
});
|
|
8614
|
-
document.body.removeChild(testElement);
|
|
8615
|
-
return supports;
|
|
8616
|
-
};
|
|
8617
8657
|
const testCORS = () => typeof new Image().crossOrigin !== "undefined";
|
|
8618
|
-
const testResponseType = () => typeof new XMLHttpRequest().responseType === "string";
|
|
8619
8658
|
const testSVG = (document) => {
|
|
8620
8659
|
const img = new Image();
|
|
8621
8660
|
const canvas = document.createElement("canvas");
|
|
@@ -8630,36 +8669,6 @@
|
|
|
8630
8669
|
}
|
|
8631
8670
|
return true;
|
|
8632
8671
|
};
|
|
8633
|
-
const isGreenPixel = (data) => data[0] === 0 && data[1] === 255 && data[2] === 0 && data[3] === 255;
|
|
8634
|
-
const testForeignObject = (document) => {
|
|
8635
|
-
const canvas = document.createElement("canvas");
|
|
8636
|
-
const size = 100;
|
|
8637
|
-
canvas.width = size;
|
|
8638
|
-
canvas.height = size;
|
|
8639
|
-
const ctx = canvas.getContext("2d");
|
|
8640
|
-
if (!ctx) return Promise.reject(/* @__PURE__ */ new Error("Failed to get 2D rendering context"));
|
|
8641
|
-
ctx.fillStyle = "rgb(0, 255, 0)";
|
|
8642
|
-
ctx.fillRect(0, 0, size, size);
|
|
8643
|
-
const img = new Image();
|
|
8644
|
-
const greenImageSrc = canvas.toDataURL();
|
|
8645
|
-
img.src = greenImageSrc;
|
|
8646
|
-
const svg = createForeignObjectSVG(size, size, 0, 0, img);
|
|
8647
|
-
ctx.fillStyle = "red";
|
|
8648
|
-
ctx.fillRect(0, 0, size, size);
|
|
8649
|
-
return loadSerializedSVG(svg).then((img) => {
|
|
8650
|
-
ctx.drawImage(img, 0, 0);
|
|
8651
|
-
const data = ctx.getImageData(0, 0, size, size).data;
|
|
8652
|
-
ctx.fillStyle = "red";
|
|
8653
|
-
ctx.fillRect(0, 0, size, size);
|
|
8654
|
-
const node = document.createElement("div");
|
|
8655
|
-
node.style.backgroundImage = `url(${greenImageSrc})`;
|
|
8656
|
-
node.style.height = `${size}px`;
|
|
8657
|
-
return isGreenPixel(data) ? loadSerializedSVG(createForeignObjectSVG(size, size, 0, 0, node)) : Promise.reject(/* @__PURE__ */ new Error("ForeignObject rendering not supported"));
|
|
8658
|
-
}).then((img) => {
|
|
8659
|
-
ctx.drawImage(img, 0, 0);
|
|
8660
|
-
return isGreenPixel(ctx.getImageData(0, 0, size, size).data);
|
|
8661
|
-
}).catch(() => false);
|
|
8662
|
-
};
|
|
8663
8672
|
const createForeignObjectSVG = (width, height, x, y, node) => {
|
|
8664
8673
|
const xmlns = "http://www.w3.org/2000/svg";
|
|
8665
8674
|
const svg = document.createElementNS(xmlns, "svg");
|
|
@@ -8690,52 +8699,24 @@
|
|
|
8690
8699
|
Object.defineProperty(FEATURES, "SUPPORT_RANGE_BOUNDS", { value });
|
|
8691
8700
|
return value;
|
|
8692
8701
|
},
|
|
8693
|
-
get SUPPORT_WORD_BREAKING() {
|
|
8694
|
-
"use strict";
|
|
8695
|
-
const value = FEATURES.SUPPORT_RANGE_BOUNDS && testIOSLineBreak(document);
|
|
8696
|
-
Object.defineProperty(FEATURES, "SUPPORT_WORD_BREAKING", { value });
|
|
8697
|
-
return value;
|
|
8698
|
-
},
|
|
8699
8702
|
get SUPPORT_SVG_DRAWING() {
|
|
8700
8703
|
"use strict";
|
|
8701
8704
|
const value = testSVG(document);
|
|
8702
8705
|
Object.defineProperty(FEATURES, "SUPPORT_SVG_DRAWING", { value });
|
|
8703
8706
|
return value;
|
|
8704
8707
|
},
|
|
8705
|
-
get SUPPORT_FOREIGNOBJECT_DRAWING() {
|
|
8706
|
-
"use strict";
|
|
8707
|
-
const value = typeof Array.from === "function" && typeof window.fetch === "function" ? testForeignObject(document) : Promise.resolve(false);
|
|
8708
|
-
Object.defineProperty(FEATURES, "SUPPORT_FOREIGNOBJECT_DRAWING", { value });
|
|
8709
|
-
return value;
|
|
8710
|
-
},
|
|
8711
8708
|
get SUPPORT_CORS_IMAGES() {
|
|
8712
8709
|
"use strict";
|
|
8713
8710
|
const value = testCORS();
|
|
8714
8711
|
Object.defineProperty(FEATURES, "SUPPORT_CORS_IMAGES", { value });
|
|
8715
8712
|
return value;
|
|
8716
|
-
},
|
|
8717
|
-
get SUPPORT_RESPONSE_TYPE() {
|
|
8718
|
-
"use strict";
|
|
8719
|
-
const value = testResponseType();
|
|
8720
|
-
Object.defineProperty(FEATURES, "SUPPORT_RESPONSE_TYPE", { value });
|
|
8721
|
-
return value;
|
|
8722
|
-
},
|
|
8723
|
-
get SUPPORT_CORS_XHR() {
|
|
8724
|
-
"use strict";
|
|
8725
|
-
const value = "withCredentials" in new XMLHttpRequest();
|
|
8726
|
-
Object.defineProperty(FEATURES, "SUPPORT_CORS_XHR", { value });
|
|
8727
|
-
return value;
|
|
8728
|
-
},
|
|
8729
|
-
get SUPPORT_NATIVE_TEXT_SEGMENTATION() {
|
|
8730
|
-
"use strict";
|
|
8731
|
-
const value = !!(typeof Intl !== "undefined" && Intl.Segmenter);
|
|
8732
|
-
Object.defineProperty(FEATURES, "SUPPORT_NATIVE_TEXT_SEGMENTATION", { value });
|
|
8733
|
-
return value;
|
|
8734
8713
|
}
|
|
8735
8714
|
};
|
|
8736
8715
|
//#endregion
|
|
8737
8716
|
//#region src/css/layout/text.ts
|
|
8738
8717
|
var TextBounds = class {
|
|
8718
|
+
text;
|
|
8719
|
+
bounds;
|
|
8739
8720
|
constructor(text, bounds) {
|
|
8740
8721
|
this.text = text;
|
|
8741
8722
|
this.bounds = bounds;
|
|
@@ -8794,58 +8775,24 @@
|
|
|
8794
8775
|
const getSegmenter = (granularity) => {
|
|
8795
8776
|
let segmenter = segmenterCache.get(granularity);
|
|
8796
8777
|
if (!segmenter) {
|
|
8797
|
-
|
|
8798
|
-
segmenter = new Segmenter(void 0, { granularity });
|
|
8778
|
+
segmenter = new Intl.Segmenter(void 0, { granularity });
|
|
8799
8779
|
segmenterCache.set(granularity, segmenter);
|
|
8800
8780
|
}
|
|
8801
8781
|
return segmenter;
|
|
8802
8782
|
};
|
|
8803
|
-
const segmentGraphemes = (value) =>
|
|
8804
|
-
|
|
8805
|
-
return
|
|
8806
|
-
};
|
|
8807
|
-
const segmentWords = (value, styles) => {
|
|
8808
|
-
if (FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) return Array.from(getSegmenter("word").segment(value)).map((s) => s.segment);
|
|
8809
|
-
return breakWords(value, styles);
|
|
8783
|
+
const segmentGraphemes = (value) => Array.from(getSegmenter("grapheme").segment(value), (s) => s.segment);
|
|
8784
|
+
const segmentWords = (value) => {
|
|
8785
|
+
return Array.from(getSegmenter("word").segment(value), (s) => s.segment);
|
|
8810
8786
|
};
|
|
8811
8787
|
const breakText = (value, styles) => {
|
|
8812
8788
|
if (isVerticalWritingMode(styles.writingMode)) return segmentGraphemes(value);
|
|
8813
|
-
return styles.letterSpacing !== 0 ? segmentGraphemes(value) : segmentWords(value
|
|
8814
|
-
};
|
|
8815
|
-
const wordSeparators = [
|
|
8816
|
-
32,
|
|
8817
|
-
160,
|
|
8818
|
-
4961,
|
|
8819
|
-
65792,
|
|
8820
|
-
65793,
|
|
8821
|
-
4153,
|
|
8822
|
-
4241
|
|
8823
|
-
];
|
|
8824
|
-
const breakWords = (str, styles) => {
|
|
8825
|
-
const breaker = LineBreaker(str, {
|
|
8826
|
-
lineBreak: styles.lineBreak,
|
|
8827
|
-
wordBreak: styles.overflowWrap === "break-word" ? "break-word" : styles.wordBreak
|
|
8828
|
-
});
|
|
8829
|
-
const words = [];
|
|
8830
|
-
let bk;
|
|
8831
|
-
while (!(bk = breaker.next()).done) if (bk.value) {
|
|
8832
|
-
const codePoints = toCodePoints$1(bk.value.slice());
|
|
8833
|
-
let word = "";
|
|
8834
|
-
codePoints.forEach((codePoint) => {
|
|
8835
|
-
if (wordSeparators.indexOf(codePoint) === -1) word += fromCodePoint$1(codePoint);
|
|
8836
|
-
else {
|
|
8837
|
-
if (word.length) words.push(word);
|
|
8838
|
-
words.push(fromCodePoint$1(codePoint));
|
|
8839
|
-
word = "";
|
|
8840
|
-
}
|
|
8841
|
-
});
|
|
8842
|
-
if (word.length) words.push(word);
|
|
8843
|
-
}
|
|
8844
|
-
return words;
|
|
8789
|
+
return styles.letterSpacing !== 0 ? segmentGraphemes(value) : segmentWords(value);
|
|
8845
8790
|
};
|
|
8846
8791
|
//#endregion
|
|
8847
8792
|
//#region src/dom/text-container.ts
|
|
8848
8793
|
var TextContainer = class {
|
|
8794
|
+
text;
|
|
8795
|
+
textBounds;
|
|
8849
8796
|
constructor(context, node, styles) {
|
|
8850
8797
|
this.text = transform(node.data, styles.textTransform);
|
|
8851
8798
|
if (this.text.length !== node.data.length) node.data = this.text;
|
|
@@ -8868,8 +8815,11 @@
|
|
|
8868
8815
|
//#endregion
|
|
8869
8816
|
//#region src/dom/replaced-elements/image-element-container.ts
|
|
8870
8817
|
var ImageElementContainer = class extends ElementContainer {
|
|
8871
|
-
|
|
8872
|
-
|
|
8818
|
+
src;
|
|
8819
|
+
intrinsicWidth;
|
|
8820
|
+
intrinsicHeight;
|
|
8821
|
+
constructor(context, img, options = {}) {
|
|
8822
|
+
super(context, img, options);
|
|
8873
8823
|
this.src = img.currentSrc || img.src;
|
|
8874
8824
|
this.intrinsicWidth = img.naturalWidth;
|
|
8875
8825
|
this.intrinsicHeight = img.naturalHeight;
|
|
@@ -8879,8 +8829,11 @@
|
|
|
8879
8829
|
//#endregion
|
|
8880
8830
|
//#region src/dom/replaced-elements/canvas-element-container.ts
|
|
8881
8831
|
var CanvasElementContainer = class extends ElementContainer {
|
|
8882
|
-
|
|
8883
|
-
|
|
8832
|
+
canvas;
|
|
8833
|
+
intrinsicWidth;
|
|
8834
|
+
intrinsicHeight;
|
|
8835
|
+
constructor(context, canvas, options = {}) {
|
|
8836
|
+
super(context, canvas, options);
|
|
8884
8837
|
this.canvas = canvas;
|
|
8885
8838
|
this.intrinsicWidth = canvas.width;
|
|
8886
8839
|
this.intrinsicHeight = canvas.height;
|
|
@@ -8922,8 +8875,11 @@
|
|
|
8922
8875
|
return serialized;
|
|
8923
8876
|
};
|
|
8924
8877
|
var SVGElementContainer = class extends ElementContainer {
|
|
8925
|
-
|
|
8926
|
-
|
|
8878
|
+
svg;
|
|
8879
|
+
intrinsicWidth;
|
|
8880
|
+
intrinsicHeight;
|
|
8881
|
+
constructor(context, img, options = {}) {
|
|
8882
|
+
super(context, img, options);
|
|
8927
8883
|
const s = new XMLSerializer();
|
|
8928
8884
|
const bounds = parseBounds(context, img);
|
|
8929
8885
|
img.setAttribute("width", `${bounds.width}px`);
|
|
@@ -8937,16 +8893,19 @@
|
|
|
8937
8893
|
//#endregion
|
|
8938
8894
|
//#region src/dom/elements/li-element-container.ts
|
|
8939
8895
|
var LIElementContainer = class extends ElementContainer {
|
|
8940
|
-
|
|
8941
|
-
|
|
8896
|
+
value;
|
|
8897
|
+
constructor(context, element, options = {}) {
|
|
8898
|
+
super(context, element, options);
|
|
8942
8899
|
this.value = element.value;
|
|
8943
8900
|
}
|
|
8944
8901
|
};
|
|
8945
8902
|
//#endregion
|
|
8946
8903
|
//#region src/dom/elements/ol-element-container.ts
|
|
8947
8904
|
var OLElementContainer = class extends ElementContainer {
|
|
8948
|
-
|
|
8949
|
-
|
|
8905
|
+
start;
|
|
8906
|
+
reversed;
|
|
8907
|
+
constructor(context, element, options = {}) {
|
|
8908
|
+
super(context, element, options);
|
|
8950
8909
|
this.start = element.start;
|
|
8951
8910
|
this.reversed = typeof element.reversed === "boolean" && element.reversed === true;
|
|
8952
8911
|
}
|
|
@@ -8980,8 +8939,12 @@
|
|
|
8980
8939
|
const RADIO = "radio";
|
|
8981
8940
|
const PLACEHOLDER_COLOR = 1970632191;
|
|
8982
8941
|
var InputElementContainer = class extends ElementContainer {
|
|
8983
|
-
|
|
8984
|
-
|
|
8942
|
+
type;
|
|
8943
|
+
checked;
|
|
8944
|
+
value;
|
|
8945
|
+
isPlaceholder;
|
|
8946
|
+
constructor(context, input, options = {}) {
|
|
8947
|
+
super(context, input, options);
|
|
8985
8948
|
this.type = input.type.toLowerCase();
|
|
8986
8949
|
this.checked = input.checked;
|
|
8987
8950
|
this.value = getInputValue(input);
|
|
@@ -9006,8 +8969,9 @@
|
|
|
9006
8969
|
//#endregion
|
|
9007
8970
|
//#region src/dom/elements/select-element-container.ts
|
|
9008
8971
|
var SelectElementContainer = class extends ElementContainer {
|
|
9009
|
-
|
|
9010
|
-
|
|
8972
|
+
value;
|
|
8973
|
+
constructor(context, element, options = {}) {
|
|
8974
|
+
super(context, element, options);
|
|
9011
8975
|
const option = element.options[element.selectedIndex || 0];
|
|
9012
8976
|
this.value = option ? option.text || "" : "";
|
|
9013
8977
|
}
|
|
@@ -9015,29 +8979,42 @@
|
|
|
9015
8979
|
//#endregion
|
|
9016
8980
|
//#region src/dom/elements/textarea-element-container.ts
|
|
9017
8981
|
var TextareaElementContainer = class extends ElementContainer {
|
|
9018
|
-
|
|
9019
|
-
|
|
8982
|
+
value;
|
|
8983
|
+
constructor(context, element, options = {}) {
|
|
8984
|
+
super(context, element, options);
|
|
9020
8985
|
this.value = element.value;
|
|
9021
8986
|
}
|
|
9022
8987
|
};
|
|
9023
8988
|
//#endregion
|
|
9024
8989
|
//#region src/dom/replaced-elements/iframe-element-container.ts
|
|
9025
8990
|
var IFrameElementContainer = class extends ElementContainer {
|
|
9026
|
-
|
|
9027
|
-
|
|
8991
|
+
src;
|
|
8992
|
+
width;
|
|
8993
|
+
height;
|
|
8994
|
+
tree;
|
|
8995
|
+
backgroundColor;
|
|
8996
|
+
parseTreeFn;
|
|
8997
|
+
constructor(context, iframe, parseTreeFn, options = {}) {
|
|
8998
|
+
super(context, iframe, options);
|
|
9028
8999
|
this.src = iframe.src;
|
|
9029
9000
|
this.width = parseInt(iframe.width, 10) || 0;
|
|
9030
9001
|
this.height = parseInt(iframe.height, 10) || 0;
|
|
9031
9002
|
this.backgroundColor = this.styles.backgroundColor;
|
|
9032
9003
|
this.parseTreeFn = parseTreeFn;
|
|
9033
9004
|
try {
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
|
-
|
|
9037
|
-
|
|
9005
|
+
const contentWindow = iframe.contentWindow;
|
|
9006
|
+
const contentDocument = contentWindow?.document;
|
|
9007
|
+
if (contentWindow && contentDocument && contentDocument.documentElement && this.parseTreeFn) {
|
|
9008
|
+
this.tree = this.parseTreeFn(context, contentDocument.documentElement);
|
|
9009
|
+
const documentBackgroundColor = parseColor(context, contentWindow.getComputedStyle(contentDocument.documentElement).backgroundColor);
|
|
9010
|
+
const bodyBackgroundColor = contentDocument.body ? parseColor(context, contentWindow.getComputedStyle(contentDocument.body).backgroundColor) : 0;
|
|
9038
9011
|
this.backgroundColor = isTransparent(documentBackgroundColor) ? isTransparent(bodyBackgroundColor) ? this.styles.backgroundColor : bodyBackgroundColor : documentBackgroundColor;
|
|
9039
9012
|
}
|
|
9040
|
-
} catch (e) {
|
|
9013
|
+
} catch (e) {
|
|
9014
|
+
const error = e instanceof Error ? e : new Error(String(e));
|
|
9015
|
+
this.context.logger.warn(`Unable to render iframe content${this.src ? ` from ${this.src}` : ""}: ${error.message}`);
|
|
9016
|
+
this.context.onError?.(error);
|
|
9017
|
+
}
|
|
9041
9018
|
}
|
|
9042
9019
|
};
|
|
9043
9020
|
//#endregion
|
|
@@ -9047,10 +9024,10 @@
|
|
|
9047
9024
|
"UL",
|
|
9048
9025
|
"MENU"
|
|
9049
9026
|
];
|
|
9050
|
-
const parseNodeTree = (context, node, parent, root, zoomScale = 1) => {
|
|
9027
|
+
const parseNodeTree = (context, node, parent, root, zoomScale = 1, options = {}) => {
|
|
9051
9028
|
for (let childNode = node.firstChild, nextNode; childNode; childNode = nextNode) {
|
|
9052
9029
|
nextNode = childNode.nextSibling;
|
|
9053
|
-
parseChildNode(context, childNode, parent, root, zoomScale);
|
|
9030
|
+
parseChildNode(context, childNode, parent, root, zoomScale, options);
|
|
9054
9031
|
}
|
|
9055
9032
|
};
|
|
9056
9033
|
/**
|
|
@@ -9061,7 +9038,7 @@
|
|
|
9061
9038
|
* this, slotted shadow-DOM content such as web component labels was silently
|
|
9062
9039
|
* dropped because `parseNodeTree` only iterates `node.firstChild` (issue #226).
|
|
9063
9040
|
*/
|
|
9064
|
-
const parseChildNode = (context, childNode, parent, root, zoomScale = 1) => {
|
|
9041
|
+
const parseChildNode = (context, childNode, parent, root, zoomScale = 1, options = {}) => {
|
|
9065
9042
|
if (isTextNode(childNode) && childNode.data.length > 0) {
|
|
9066
9043
|
const textContainer = new TextContainer(context, childNode, parent.styles);
|
|
9067
9044
|
if (zoomScale !== 1) {
|
|
@@ -9071,9 +9048,9 @@
|
|
|
9071
9048
|
}
|
|
9072
9049
|
parent.textNodes.push(textContainer);
|
|
9073
9050
|
} else if (isElementNode(childNode)) {
|
|
9074
|
-
if (isSlotElement(childNode) && childNode.assignedNodes) childNode.assignedNodes().forEach((assignedNode) => parseChildNode(context, assignedNode, parent, root, zoomScale));
|
|
9051
|
+
if (isSlotElement(childNode) && childNode.assignedNodes) childNode.assignedNodes().forEach((assignedNode) => parseChildNode(context, assignedNode, parent, root, zoomScale, options));
|
|
9075
9052
|
else {
|
|
9076
|
-
const container = createContainer(context, childNode);
|
|
9053
|
+
const container = createContainer(context, childNode, options);
|
|
9077
9054
|
const ownZoom = container.styles.zoom || 1;
|
|
9078
9055
|
if (ownZoom !== 1) container.bounds = new Bounds(container.bounds.left, container.bounds.top, container.bounds.width / ownZoom, container.bounds.height / ownZoom);
|
|
9079
9056
|
if (container.styles.isVisible()) {
|
|
@@ -9082,28 +9059,28 @@
|
|
|
9082
9059
|
if (LIST_OWNERS.indexOf(childNode.tagName) !== -1) container.isListOwner = true;
|
|
9083
9060
|
parent.elements.push(container);
|
|
9084
9061
|
const childZoom = zoomScale * (container.styles.zoom || 1);
|
|
9085
|
-
if (childNode.shadowRoot) parseNodeTree(context, childNode.shadowRoot, container, root, childZoom);
|
|
9086
|
-
else if (!isTextareaElement(childNode) && !isSVGElement(childNode) && !isSelectElement(childNode)) parseNodeTree(context, childNode, container, root, childZoom);
|
|
9062
|
+
if (childNode.shadowRoot) parseNodeTree(context, childNode.shadowRoot, container, root, childZoom, options);
|
|
9063
|
+
else if (!isTextareaElement(childNode) && !isSVGElement(childNode) && !isSelectElement(childNode)) parseNodeTree(context, childNode, container, root, childZoom, options);
|
|
9087
9064
|
}
|
|
9088
9065
|
}
|
|
9089
9066
|
}
|
|
9090
9067
|
};
|
|
9091
|
-
const createContainer = (context, element) => {
|
|
9092
|
-
if (isImageElement(element)) return new ImageElementContainer(context, element);
|
|
9093
|
-
if (isCanvasElement(element)) return new CanvasElementContainer(context, element);
|
|
9094
|
-
if (isSVGElement(element)) return new SVGElementContainer(context, element);
|
|
9095
|
-
if (isLIElement(element)) return new LIElementContainer(context, element);
|
|
9096
|
-
if (isOLElement(element)) return new OLElementContainer(context, element);
|
|
9097
|
-
if (isInputElement(element)) return new InputElementContainer(context, element);
|
|
9098
|
-
if (isSelectElement(element)) return new SelectElementContainer(context, element);
|
|
9099
|
-
if (isTextareaElement(element)) return new TextareaElementContainer(context, element);
|
|
9100
|
-
if (isIFrameElement(element)) return new IFrameElementContainer(context, element, parseTree);
|
|
9101
|
-
return new ElementContainer(context, element);
|
|
9068
|
+
const createContainer = (context, element, options = {}) => {
|
|
9069
|
+
if (isImageElement(element)) return new ImageElementContainer(context, element, options);
|
|
9070
|
+
if (isCanvasElement(element)) return new CanvasElementContainer(context, element, options);
|
|
9071
|
+
if (isSVGElement(element)) return new SVGElementContainer(context, element, options);
|
|
9072
|
+
if (isLIElement(element)) return new LIElementContainer(context, element, options);
|
|
9073
|
+
if (isOLElement(element)) return new OLElementContainer(context, element, options);
|
|
9074
|
+
if (isInputElement(element)) return new InputElementContainer(context, element, options);
|
|
9075
|
+
if (isSelectElement(element)) return new SelectElementContainer(context, element, options);
|
|
9076
|
+
if (isTextareaElement(element)) return new TextareaElementContainer(context, element, options);
|
|
9077
|
+
if (isIFrameElement(element)) return new IFrameElementContainer(context, element, (ctx, node) => parseTree(ctx, node, options), options);
|
|
9078
|
+
return new ElementContainer(context, element, options);
|
|
9102
9079
|
};
|
|
9103
|
-
const parseTree = (context, element) => {
|
|
9104
|
-
const container = createContainer(context, element);
|
|
9080
|
+
const parseTree = (context, element, options = {}) => {
|
|
9081
|
+
const container = createContainer(context, element, options);
|
|
9105
9082
|
container.createsRealStackingContext = true;
|
|
9106
|
-
parseNodeTree(context, element, container, container);
|
|
9083
|
+
parseNodeTree(context, element, container, container, 1, options);
|
|
9107
9084
|
return container;
|
|
9108
9085
|
};
|
|
9109
9086
|
const createsRealStackingContext = (node, container, root) => {
|
|
@@ -9134,6 +9111,9 @@
|
|
|
9134
9111
|
//#endregion
|
|
9135
9112
|
//#region src/render/vector.ts
|
|
9136
9113
|
var Vector = class Vector {
|
|
9114
|
+
type;
|
|
9115
|
+
x;
|
|
9116
|
+
y;
|
|
9137
9117
|
constructor(x, y) {
|
|
9138
9118
|
this.type = 0;
|
|
9139
9119
|
this.x = x;
|
|
@@ -9149,6 +9129,11 @@
|
|
|
9149
9129
|
return new Vector(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t);
|
|
9150
9130
|
};
|
|
9151
9131
|
var BezierCurve = class BezierCurve {
|
|
9132
|
+
type;
|
|
9133
|
+
start;
|
|
9134
|
+
startControl;
|
|
9135
|
+
endControl;
|
|
9136
|
+
end;
|
|
9152
9137
|
constructor(start, startControl, endControl, end) {
|
|
9153
9138
|
this.type = 1;
|
|
9154
9139
|
this.start = start;
|
|
@@ -9176,6 +9161,30 @@
|
|
|
9176
9161
|
//#endregion
|
|
9177
9162
|
//#region src/render/bound-curves.ts
|
|
9178
9163
|
var BoundCurves = class {
|
|
9164
|
+
topLeftBorderDoubleOuterBox;
|
|
9165
|
+
topRightBorderDoubleOuterBox;
|
|
9166
|
+
bottomRightBorderDoubleOuterBox;
|
|
9167
|
+
bottomLeftBorderDoubleOuterBox;
|
|
9168
|
+
topLeftBorderDoubleInnerBox;
|
|
9169
|
+
topRightBorderDoubleInnerBox;
|
|
9170
|
+
bottomRightBorderDoubleInnerBox;
|
|
9171
|
+
bottomLeftBorderDoubleInnerBox;
|
|
9172
|
+
topLeftBorderStroke;
|
|
9173
|
+
topRightBorderStroke;
|
|
9174
|
+
bottomRightBorderStroke;
|
|
9175
|
+
bottomLeftBorderStroke;
|
|
9176
|
+
topLeftBorderBox;
|
|
9177
|
+
topRightBorderBox;
|
|
9178
|
+
bottomRightBorderBox;
|
|
9179
|
+
bottomLeftBorderBox;
|
|
9180
|
+
topLeftPaddingBox;
|
|
9181
|
+
topRightPaddingBox;
|
|
9182
|
+
bottomRightPaddingBox;
|
|
9183
|
+
bottomLeftPaddingBox;
|
|
9184
|
+
topLeftContentBox;
|
|
9185
|
+
topRightContentBox;
|
|
9186
|
+
bottomRightContentBox;
|
|
9187
|
+
bottomLeftContentBox;
|
|
9179
9188
|
constructor(element) {
|
|
9180
9189
|
const styles = element.styles;
|
|
9181
9190
|
const bounds = element.bounds;
|
|
@@ -9212,15 +9221,15 @@
|
|
|
9212
9221
|
const paddingBottom = getAbsoluteValue(styles.paddingBottom, element.bounds.width);
|
|
9213
9222
|
const paddingLeft = getAbsoluteValue(styles.paddingLeft, element.bounds.width);
|
|
9214
9223
|
this.topLeftBorderDoubleOuterBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borderLeftWidth / 3, bounds.top + borderTopWidth / 3, tlh - borderLeftWidth / 3, tlv - borderTopWidth / 3, 0) : new Vector(bounds.left + borderLeftWidth / 3, bounds.top + borderTopWidth / 3);
|
|
9215
|
-
this.topRightBorderDoubleOuterBox =
|
|
9224
|
+
this.topRightBorderDoubleOuterBox = trh > 0 || trv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth / 3, trh - borderRightWidth / 3, trv - borderTopWidth / 3, 1) : new Vector(bounds.left + bounds.width - borderRightWidth / 3, bounds.top + borderTopWidth / 3);
|
|
9216
9225
|
this.bottomRightBorderDoubleOuterBox = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth / 3, brv - borderBottomWidth / 3, 2) : new Vector(bounds.left + bounds.width - borderRightWidth / 3, bounds.top + bounds.height - borderBottomWidth / 3);
|
|
9217
9226
|
this.bottomLeftBorderDoubleOuterBox = blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borderLeftWidth / 3, bounds.top + leftHeight, blh - borderLeftWidth / 3, blv - borderBottomWidth / 3, 3) : new Vector(bounds.left + borderLeftWidth / 3, bounds.top + bounds.height - borderBottomWidth / 3);
|
|
9218
9227
|
this.topLeftBorderDoubleInnerBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borderLeftWidth * 2 / 3, bounds.top + borderTopWidth * 2 / 3, tlh - borderLeftWidth * 2 / 3, tlv - borderTopWidth * 2 / 3, 0) : new Vector(bounds.left + borderLeftWidth * 2 / 3, bounds.top + borderTopWidth * 2 / 3);
|
|
9219
|
-
this.topRightBorderDoubleInnerBox =
|
|
9228
|
+
this.topRightBorderDoubleInnerBox = trh > 0 || trv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth * 2 / 3, trh - borderRightWidth * 2 / 3, trv - borderTopWidth * 2 / 3, 1) : new Vector(bounds.left + bounds.width - borderRightWidth * 2 / 3, bounds.top + borderTopWidth * 2 / 3);
|
|
9220
9229
|
this.bottomRightBorderDoubleInnerBox = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth * 2 / 3, brv - borderBottomWidth * 2 / 3, 2) : new Vector(bounds.left + bounds.width - borderRightWidth * 2 / 3, bounds.top + bounds.height - borderBottomWidth * 2 / 3);
|
|
9221
9230
|
this.bottomLeftBorderDoubleInnerBox = blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borderLeftWidth * 2 / 3, bounds.top + leftHeight, blh - borderLeftWidth * 2 / 3, blv - borderBottomWidth * 2 / 3, 3) : new Vector(bounds.left + borderLeftWidth * 2 / 3, bounds.top + bounds.height - borderBottomWidth * 2 / 3);
|
|
9222
9231
|
this.topLeftBorderStroke = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borderLeftWidth / 2, bounds.top + borderTopWidth / 2, tlh - borderLeftWidth / 2, tlv - borderTopWidth / 2, 0) : new Vector(bounds.left + borderLeftWidth / 2, bounds.top + borderTopWidth / 2);
|
|
9223
|
-
this.topRightBorderStroke =
|
|
9232
|
+
this.topRightBorderStroke = trh > 0 || trv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth / 2, trh - borderRightWidth / 2, trv - borderTopWidth / 2, 1) : new Vector(bounds.left + bounds.width - borderRightWidth / 2, bounds.top + borderTopWidth / 2);
|
|
9224
9233
|
this.bottomRightBorderStroke = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth / 2, brv - borderBottomWidth / 2, 2) : new Vector(bounds.left + bounds.width - borderRightWidth / 2, bounds.top + bounds.height - borderBottomWidth / 2);
|
|
9225
9234
|
this.bottomLeftBorderStroke = blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borderLeftWidth / 2, bounds.top + leftHeight, blh - borderLeftWidth / 2, blv - borderBottomWidth / 2, 3) : new Vector(bounds.left + borderLeftWidth / 2, bounds.top + bounds.height - borderBottomWidth / 2);
|
|
9226
9235
|
this.topLeftBorderBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left, bounds.top, tlh, tlv, 0) : new Vector(bounds.left, bounds.top);
|
|
@@ -9277,26 +9286,32 @@
|
|
|
9277
9286
|
//#endregion
|
|
9278
9287
|
//#region src/render/effects.ts
|
|
9279
9288
|
var TransformEffect = class {
|
|
9289
|
+
offsetX;
|
|
9290
|
+
offsetY;
|
|
9291
|
+
matrix;
|
|
9292
|
+
type = 0;
|
|
9293
|
+
target = 6;
|
|
9280
9294
|
constructor(offsetX, offsetY, matrix) {
|
|
9281
9295
|
this.offsetX = offsetX;
|
|
9282
9296
|
this.offsetY = offsetY;
|
|
9283
9297
|
this.matrix = matrix;
|
|
9284
|
-
this.type = 0;
|
|
9285
|
-
this.target = 6;
|
|
9286
9298
|
}
|
|
9287
9299
|
};
|
|
9288
9300
|
var ClipEffect = class {
|
|
9301
|
+
path;
|
|
9302
|
+
target;
|
|
9303
|
+
type = 1;
|
|
9289
9304
|
constructor(path, target) {
|
|
9290
9305
|
this.path = path;
|
|
9291
9306
|
this.target = target;
|
|
9292
|
-
this.type = 1;
|
|
9293
9307
|
}
|
|
9294
9308
|
};
|
|
9295
9309
|
var OpacityEffect = class {
|
|
9310
|
+
opacity;
|
|
9311
|
+
type = 2;
|
|
9312
|
+
target = 6;
|
|
9296
9313
|
constructor(opacity) {
|
|
9297
9314
|
this.opacity = opacity;
|
|
9298
|
-
this.type = 2;
|
|
9299
|
-
this.target = 6;
|
|
9300
9315
|
}
|
|
9301
9316
|
};
|
|
9302
9317
|
/**
|
|
@@ -9306,10 +9321,11 @@
|
|
|
9306
9321
|
* the path is constructed (arc, ellipse, lineTo, Path2D, etc.).
|
|
9307
9322
|
*/
|
|
9308
9323
|
var ClipPathEffect = class {
|
|
9324
|
+
applyClip;
|
|
9325
|
+
type = 3;
|
|
9326
|
+
target = 6;
|
|
9309
9327
|
constructor(applyClip) {
|
|
9310
9328
|
this.applyClip = applyClip;
|
|
9311
|
-
this.type = 3;
|
|
9312
|
-
this.target = 6;
|
|
9313
9329
|
}
|
|
9314
9330
|
};
|
|
9315
9331
|
/**
|
|
@@ -9336,17 +9352,23 @@
|
|
|
9336
9352
|
[MIX_BLEND_MODE$1.LUMINOSITY]: "luminosity"
|
|
9337
9353
|
};
|
|
9338
9354
|
var BlendEffect = class {
|
|
9355
|
+
mixBlendMode;
|
|
9356
|
+
type = 4;
|
|
9357
|
+
target = 6;
|
|
9358
|
+
compositeOperation;
|
|
9339
9359
|
constructor(mixBlendMode) {
|
|
9340
9360
|
this.mixBlendMode = mixBlendMode;
|
|
9341
|
-
this.type = 4;
|
|
9342
|
-
this.target = 6;
|
|
9343
9361
|
this.compositeOperation = MIX_BLEND_MODE_TO_COMPOSITE[mixBlendMode];
|
|
9344
9362
|
}
|
|
9345
9363
|
};
|
|
9346
9364
|
var FilterEffect = class FilterEffect {
|
|
9365
|
+
type = 5;
|
|
9366
|
+
target = 6;
|
|
9367
|
+
/** CSS filter string with drop-shadow() stripped (safe for ctx.filter). */
|
|
9368
|
+
safeFilterString;
|
|
9369
|
+
/** Shadow params for drop-shadow(), if present and successfully parsed. */
|
|
9370
|
+
shadow;
|
|
9347
9371
|
constructor(filterString) {
|
|
9348
|
-
this.type = 5;
|
|
9349
|
-
this.target = 6;
|
|
9350
9372
|
const parsed = FilterEffect.parseDropShadow(filterString);
|
|
9351
9373
|
this.shadow = parsed.shadow;
|
|
9352
9374
|
this.safeFilterString = parsed.safeFilterString;
|
|
@@ -9472,6 +9494,14 @@
|
|
|
9472
9494
|
//#endregion
|
|
9473
9495
|
//#region src/render/stacking-context.ts
|
|
9474
9496
|
var StackingContext = class {
|
|
9497
|
+
element;
|
|
9498
|
+
negativeZIndex;
|
|
9499
|
+
zeroOrAutoZIndexOrTransformedOrOpacity;
|
|
9500
|
+
positiveZIndex;
|
|
9501
|
+
nonPositionedFloats;
|
|
9502
|
+
nonPositionedInlineLevel;
|
|
9503
|
+
inlineLevel;
|
|
9504
|
+
nonInlineLevel;
|
|
9475
9505
|
constructor(container) {
|
|
9476
9506
|
this.element = container;
|
|
9477
9507
|
this.inlineLevel = [];
|
|
@@ -9484,13 +9514,34 @@
|
|
|
9484
9514
|
}
|
|
9485
9515
|
};
|
|
9486
9516
|
var ElementPaint = class {
|
|
9517
|
+
container;
|
|
9518
|
+
parent;
|
|
9519
|
+
effects = [];
|
|
9520
|
+
curves;
|
|
9521
|
+
listValue;
|
|
9522
|
+
/** Memoised getEffects results for the plain (surfaceRoot-less) render path. */
|
|
9523
|
+
plainEffectsCache = null;
|
|
9487
9524
|
constructor(container, parent) {
|
|
9488
9525
|
this.container = container;
|
|
9489
9526
|
this.parent = parent;
|
|
9490
|
-
this.effects = [];
|
|
9491
|
-
this.plainEffectsCache = null;
|
|
9492
9527
|
this.curves = new BoundCurves(this.container);
|
|
9493
9528
|
if (this.container.styles.opacity < 1) this.effects.push(new OpacityEffect(this.container.styles.opacity));
|
|
9529
|
+
if (this.container.styles.translate !== null) {
|
|
9530
|
+
const origin = this.container.styles.transformOrigin;
|
|
9531
|
+
const offsetX = this.container.bounds.left + getAbsoluteValue(origin[0], this.container.bounds.width);
|
|
9532
|
+
const offsetY = this.container.bounds.top + getAbsoluteValue(origin[1], this.container.bounds.height);
|
|
9533
|
+
const [tx, ty] = this.container.styles.translate;
|
|
9534
|
+
const dx = getAbsoluteValue(tx, this.container.bounds.width);
|
|
9535
|
+
const dy = getAbsoluteValue(ty, this.container.bounds.height);
|
|
9536
|
+
this.effects.push(new TransformEffect(offsetX, offsetY, [
|
|
9537
|
+
1,
|
|
9538
|
+
0,
|
|
9539
|
+
0,
|
|
9540
|
+
1,
|
|
9541
|
+
dx,
|
|
9542
|
+
dy
|
|
9543
|
+
]));
|
|
9544
|
+
}
|
|
9494
9545
|
if (this.container.styles.rotate !== null) {
|
|
9495
9546
|
const origin = this.container.styles.transformOrigin;
|
|
9496
9547
|
const offsetX = this.container.bounds.left + getAbsoluteValue(origin[0], this.container.bounds.width);
|
|
@@ -9508,6 +9559,20 @@
|
|
|
9508
9559
|
];
|
|
9509
9560
|
this.effects.push(new TransformEffect(offsetX, offsetY, rotateMatrix));
|
|
9510
9561
|
}
|
|
9562
|
+
if (this.container.styles.scale !== null) {
|
|
9563
|
+
const origin = this.container.styles.transformOrigin;
|
|
9564
|
+
const offsetX = this.container.bounds.left + getAbsoluteValue(origin[0], this.container.bounds.width);
|
|
9565
|
+
const offsetY = this.container.bounds.top + getAbsoluteValue(origin[1], this.container.bounds.height);
|
|
9566
|
+
const [sx, sy] = this.container.styles.scale;
|
|
9567
|
+
this.effects.push(new TransformEffect(offsetX, offsetY, [
|
|
9568
|
+
sx,
|
|
9569
|
+
0,
|
|
9570
|
+
0,
|
|
9571
|
+
sy,
|
|
9572
|
+
0,
|
|
9573
|
+
0
|
|
9574
|
+
]));
|
|
9575
|
+
}
|
|
9511
9576
|
if (this.container.styles.transform !== null) {
|
|
9512
9577
|
const origin = this.container.styles.transformOrigin;
|
|
9513
9578
|
const offsetX = this.container.bounds.left + getAbsoluteValue(origin[0], this.container.bounds.width);
|
|
@@ -9703,8 +9768,8 @@
|
|
|
9703
9768
|
if (order < 0) {
|
|
9704
9769
|
let index = 0;
|
|
9705
9770
|
parentStack.negativeZIndex.some((current, i) => {
|
|
9706
|
-
if (order
|
|
9707
|
-
index = i;
|
|
9771
|
+
if (order >= current.element.container.styles.zIndex.order) {
|
|
9772
|
+
index = i + 1;
|
|
9708
9773
|
return false;
|
|
9709
9774
|
} else if (index > 0) return true;
|
|
9710
9775
|
return false;
|
|
@@ -9751,6 +9816,86 @@
|
|
|
9751
9816
|
return root;
|
|
9752
9817
|
};
|
|
9753
9818
|
//#endregion
|
|
9819
|
+
//#region src/render/canvas/gradient-rasterizer.ts
|
|
9820
|
+
const clampStop = (stop) => Math.min(1, Math.max(0, stop));
|
|
9821
|
+
/**
|
|
9822
|
+
* Stack the one-cycle stop list periodically across [0, 1]. Returns null for
|
|
9823
|
+
* a degenerate period (all stops clamped to one point) — CSS renders the
|
|
9824
|
+
* last colour across the whole area in that case, and callers should paint
|
|
9825
|
+
* the last colour instead of stacking.
|
|
9826
|
+
*/
|
|
9827
|
+
const stackRepeatingStops = (processed) => {
|
|
9828
|
+
const first = at(processed, 0);
|
|
9829
|
+
const last = at(processed, processed.length - 1);
|
|
9830
|
+
if (last.stop - first.stop < 1e-6) return null;
|
|
9831
|
+
const period = Math.max(last.stop - first.stop, .01);
|
|
9832
|
+
const stops = [];
|
|
9833
|
+
const cycles = Math.ceil(1 / period);
|
|
9834
|
+
for (let k = 0; k < cycles; k++) for (const s of processed) {
|
|
9835
|
+
const stop = k * period + (s.stop - first.stop);
|
|
9836
|
+
if (stop > 1) break;
|
|
9837
|
+
stops.push({
|
|
9838
|
+
stop,
|
|
9839
|
+
color: asString(s.color)
|
|
9840
|
+
});
|
|
9841
|
+
}
|
|
9842
|
+
const lastPushed = stops[stops.length - 1];
|
|
9843
|
+
if (!lastPushed || lastPushed.stop < 1) stops.push({
|
|
9844
|
+
stop: 1,
|
|
9845
|
+
color: asString(last.color)
|
|
9846
|
+
});
|
|
9847
|
+
return stops;
|
|
9848
|
+
};
|
|
9849
|
+
/** Map parsed stops to string-colour stops clamped into the canvas [0, 1] range. */
|
|
9850
|
+
const toCanvasStops = (processed) => processed.map((s) => ({
|
|
9851
|
+
stop: clampStop(s.stop),
|
|
9852
|
+
color: asString(s.color)
|
|
9853
|
+
}));
|
|
9854
|
+
/**
|
|
9855
|
+
* Rasterise a radial gradient's ending-shape ellipse to an offscreen canvas.
|
|
9856
|
+
*
|
|
9857
|
+
* The ellipse is a circle of radius rx scaled vertically by ry / rx around
|
|
9858
|
+
* the canvas centre, so the offscreen canvas is the ellipse's full 2rx × 2ry
|
|
9859
|
+
* bounding box and callers draw it at (centre - rx, centre - ry). Handles the
|
|
9860
|
+
* repeating variant by stacking stops across the [0, 1] gradient range.
|
|
9861
|
+
*/
|
|
9862
|
+
const rasterizeRadialGradient = (ownerDocument, rx, ry, stops, repeating = false) => {
|
|
9863
|
+
const processed = processColorStops(stops, rx);
|
|
9864
|
+
const last = at(processed, processed.length - 1);
|
|
9865
|
+
const lastColor = asString(last.color);
|
|
9866
|
+
const canvas = ownerDocument.createElement("canvas");
|
|
9867
|
+
canvas.width = Math.max(1, Math.ceil(rx * 2));
|
|
9868
|
+
canvas.height = Math.max(1, Math.ceil(ry * 2));
|
|
9869
|
+
const ctx = canvas.getContext("2d");
|
|
9870
|
+
if (!ctx) return null;
|
|
9871
|
+
let colorStops;
|
|
9872
|
+
if (repeating) {
|
|
9873
|
+
const stacked = stackRepeatingStops(processed);
|
|
9874
|
+
if (!stacked) {
|
|
9875
|
+
ctx.fillStyle = lastColor;
|
|
9876
|
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
9877
|
+
return {
|
|
9878
|
+
canvas,
|
|
9879
|
+
lastColor,
|
|
9880
|
+
rx,
|
|
9881
|
+
ry
|
|
9882
|
+
};
|
|
9883
|
+
}
|
|
9884
|
+
colorStops = stacked;
|
|
9885
|
+
} else colorStops = toCanvasStops(processed);
|
|
9886
|
+
const gradient = ctx.createRadialGradient(rx, rx, 0, rx, rx, rx);
|
|
9887
|
+
colorStops.forEach((s) => gradient.addColorStop(clampStop(s.stop), s.color));
|
|
9888
|
+
ctx.fillStyle = gradient;
|
|
9889
|
+
if (rx !== ry) ctx.scale(1, ry / rx);
|
|
9890
|
+
ctx.fillRect(0, 0, rx * 2, rx * 2);
|
|
9891
|
+
return {
|
|
9892
|
+
canvas,
|
|
9893
|
+
lastColor,
|
|
9894
|
+
rx,
|
|
9895
|
+
ry
|
|
9896
|
+
};
|
|
9897
|
+
};
|
|
9898
|
+
//#endregion
|
|
9754
9899
|
//#region src/render/box-sizing.ts
|
|
9755
9900
|
const paddingBox = (element) => {
|
|
9756
9901
|
const bounds = element.bounds;
|
|
@@ -9869,67 +10014,184 @@
|
|
|
9869
10014
|
}
|
|
9870
10015
|
};
|
|
9871
10016
|
//#endregion
|
|
9872
|
-
//#region src/core/abort-helper.ts
|
|
9873
|
-
/**
|
|
9874
|
-
* AbortSignal helper utilities.
|
|
9875
|
-
*/
|
|
9876
|
-
/**
|
|
9877
|
-
* Throw a DOMException if the given AbortSignal is already aborted.
|
|
9878
|
-
* Used at checkpoints throughout the rendering pipeline to support
|
|
9879
|
-
* cancellable renders.
|
|
9880
|
-
*
|
|
9881
|
-
* @param signal - The AbortSignal to check. If undefined or not aborted, this is a no-op.
|
|
9882
|
-
* @throws {DOMException} With name 'AbortError' if the signal has been aborted.
|
|
9883
|
-
*/
|
|
9884
|
-
const throwIfAborted = (signal) => {
|
|
9885
|
-
if (signal?.aborted) throw new DOMException("The operation was aborted.", "AbortError");
|
|
9886
|
-
};
|
|
9887
|
-
//#endregion
|
|
9888
10017
|
//#region src/render/canvas/filter-surface.ts
|
|
9889
10018
|
var FilterSurfaceError = class extends Error {};
|
|
9890
10019
|
const releaseSurface = (canvas) => {
|
|
9891
10020
|
canvas.width = canvas.height = 0;
|
|
9892
10021
|
};
|
|
9893
|
-
const
|
|
9894
|
-
|
|
9895
|
-
|
|
9896
|
-
|
|
9897
|
-
|
|
10022
|
+
const UNITLESS_NAMES = [
|
|
10023
|
+
"brightness",
|
|
10024
|
+
"contrast",
|
|
10025
|
+
"grayscale",
|
|
10026
|
+
"hue-rotate",
|
|
10027
|
+
"invert",
|
|
10028
|
+
"opacity",
|
|
10029
|
+
"saturate",
|
|
10030
|
+
"sepia"
|
|
10031
|
+
];
|
|
10032
|
+
const PARSED_FILTER_CACHE_MAX = 256;
|
|
10033
|
+
const parsedFilterCache = /* @__PURE__ */ new Map();
|
|
10034
|
+
const EMPTY_FILTER = { functions: [] };
|
|
10035
|
+
function parseFilterChain(value) {
|
|
10036
|
+
if (!value || value === "none") return EMPTY_FILTER;
|
|
10037
|
+
const cached = parsedFilterCache.get(value);
|
|
9898
10038
|
if (cached !== void 0) {
|
|
9899
|
-
|
|
9900
|
-
|
|
10039
|
+
parsedFilterCache.delete(value);
|
|
10040
|
+
parsedFilterCache.set(value, cached);
|
|
9901
10041
|
return cached;
|
|
9902
10042
|
}
|
|
9903
|
-
const parsed =
|
|
9904
|
-
if (
|
|
9905
|
-
const oldest =
|
|
9906
|
-
if (oldest !== void 0)
|
|
10043
|
+
const parsed = computeFilterChain(value);
|
|
10044
|
+
if (parsedFilterCache.size >= PARSED_FILTER_CACHE_MAX) {
|
|
10045
|
+
const oldest = parsedFilterCache.keys().next().value;
|
|
10046
|
+
if (oldest !== void 0) parsedFilterCache.delete(oldest);
|
|
9907
10047
|
}
|
|
9908
|
-
|
|
10048
|
+
parsedFilterCache.set(value, parsed);
|
|
9909
10049
|
return parsed;
|
|
9910
10050
|
}
|
|
9911
|
-
|
|
9912
|
-
const
|
|
9913
|
-
|
|
9914
|
-
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
|
|
10051
|
+
const computeFilterChain = (value) => {
|
|
10052
|
+
const functions = [];
|
|
10053
|
+
let index = 0;
|
|
10054
|
+
while (index < value.length) {
|
|
10055
|
+
const char = value[index];
|
|
10056
|
+
if (char === " " || char === "\n" || char === " ") {
|
|
10057
|
+
index++;
|
|
10058
|
+
continue;
|
|
10059
|
+
}
|
|
10060
|
+
const open = value.indexOf("(", index);
|
|
10061
|
+
if (open === -1) return null;
|
|
10062
|
+
const name = value.slice(index, open).trim();
|
|
10063
|
+
if (!/^[a-zA-Z-]+$/.test(name)) return null;
|
|
10064
|
+
const bodyEnd = matchingParenthesis(value, open);
|
|
10065
|
+
if (bodyEnd === -1) return null;
|
|
10066
|
+
const fn = parseFilterFunction(name, value.slice(open + 1, bodyEnd).trim());
|
|
10067
|
+
if (!fn) return null;
|
|
10068
|
+
functions.push(fn);
|
|
10069
|
+
index = bodyEnd + 1;
|
|
10070
|
+
}
|
|
10071
|
+
return { functions };
|
|
10072
|
+
};
|
|
10073
|
+
/** Index of the ')' matching the '(' at `open`, or -1. */
|
|
10074
|
+
const matchingParenthesis = (value, open) => {
|
|
10075
|
+
let depth = 1;
|
|
10076
|
+
for (let i = open + 1; i < value.length; i++) {
|
|
10077
|
+
const char = value[i];
|
|
10078
|
+
if (char === "(") depth++;
|
|
10079
|
+
else if (char === ")") {
|
|
10080
|
+
depth--;
|
|
10081
|
+
if (depth === 0) return i;
|
|
10082
|
+
}
|
|
10083
|
+
}
|
|
10084
|
+
return -1;
|
|
10085
|
+
};
|
|
10086
|
+
const PX_LENGTH_RE = /^-?\d+(?:\.\d+)?px$/;
|
|
10087
|
+
const parseFilterFunction = (name, body) => {
|
|
10088
|
+
if (name === "blur") {
|
|
10089
|
+
if (body === "0") return {
|
|
10090
|
+
kind: "blur",
|
|
10091
|
+
value: 0
|
|
10092
|
+
};
|
|
10093
|
+
if (!PX_LENGTH_RE.test(body)) return null;
|
|
10094
|
+
const value = Number.parseFloat(body);
|
|
10095
|
+
return value < 0 ? null : {
|
|
10096
|
+
kind: "blur",
|
|
10097
|
+
value
|
|
10098
|
+
};
|
|
10099
|
+
}
|
|
10100
|
+
if (name === "drop-shadow") return parseDropShadowBody(body);
|
|
10101
|
+
if (UNITLESS_NAMES.indexOf(name) !== -1) {
|
|
10102
|
+
const unitless = name;
|
|
10103
|
+
if (unitless === "hue-rotate") {
|
|
10104
|
+
const degrees = parseAngleDegrees(body);
|
|
10105
|
+
return degrees === null ? null : {
|
|
10106
|
+
kind: "unitless",
|
|
10107
|
+
name: unitless,
|
|
10108
|
+
value: degrees
|
|
10109
|
+
};
|
|
10110
|
+
}
|
|
10111
|
+
const trimmed = body.trim();
|
|
10112
|
+
const percentage = trimmed.endsWith("%");
|
|
10113
|
+
const numeric = percentage ? trimmed.slice(0, -1) : trimmed;
|
|
10114
|
+
if (!/^-?\d+(?:\.\d+)?$/.test(numeric)) return null;
|
|
10115
|
+
return {
|
|
10116
|
+
kind: "unitless",
|
|
10117
|
+
name: unitless,
|
|
10118
|
+
value: Number.parseFloat(numeric) * (percentage ? 1 / 100 : 1)
|
|
10119
|
+
};
|
|
10120
|
+
}
|
|
10121
|
+
return null;
|
|
10122
|
+
};
|
|
10123
|
+
/** Split on whitespace outside parentheses so rgba(...) colours stay one token. */
|
|
10124
|
+
const splitTopLevel = (body) => {
|
|
10125
|
+
const parts = [];
|
|
10126
|
+
let depth = 0;
|
|
10127
|
+
let current = "";
|
|
10128
|
+
for (const char of body) {
|
|
10129
|
+
if (char === "(") depth++;
|
|
10130
|
+
else if (char === ")") depth--;
|
|
10131
|
+
if (char === " " && depth === 0) {
|
|
10132
|
+
if (current) parts.push(current);
|
|
10133
|
+
current = "";
|
|
10134
|
+
continue;
|
|
10135
|
+
}
|
|
10136
|
+
current += char;
|
|
10137
|
+
}
|
|
10138
|
+
if (current) parts.push(current);
|
|
10139
|
+
return parts;
|
|
10140
|
+
};
|
|
10141
|
+
const parseDropShadowBody = (body) => {
|
|
10142
|
+
const parts = splitTopLevel(body);
|
|
10143
|
+
const lengths = parts.filter((part) => PX_LENGTH_RE.test(part)).map((part) => Number.parseFloat(part));
|
|
10144
|
+
if (lengths.length < 2 || lengths.length > 3) return null;
|
|
10145
|
+
const colors = parts.filter((part) => !PX_LENGTH_RE.test(part));
|
|
10146
|
+
if (parts.length - colors.length !== lengths.length) return null;
|
|
9918
10147
|
return {
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
|
|
9922
|
-
|
|
9923
|
-
|
|
9924
|
-
color: effect.shadow.color
|
|
9925
|
-
} : void 0
|
|
10148
|
+
kind: "drop-shadow",
|
|
10149
|
+
x: lengths[0],
|
|
10150
|
+
y: lengths[1],
|
|
10151
|
+
blur: lengths[2] ?? 0,
|
|
10152
|
+
color: colors.join(" ") || "rgba(0, 0, 0, 0)"
|
|
9926
10153
|
};
|
|
9927
|
-
}
|
|
10154
|
+
};
|
|
10155
|
+
const parseAngleDegrees = (body) => {
|
|
10156
|
+
const trimmed = body.trim();
|
|
10157
|
+
if (trimmed === "0") return 0;
|
|
10158
|
+
const numeric = Number.parseFloat(trimmed);
|
|
10159
|
+
if (Number.isNaN(numeric)) return null;
|
|
10160
|
+
if (trimmed.endsWith("deg")) return numeric;
|
|
10161
|
+
if (trimmed.endsWith("grad")) return numeric * .9;
|
|
10162
|
+
if (trimmed.endsWith("rad")) return numeric * 180 / Math.PI;
|
|
10163
|
+
if (trimmed.endsWith("turn")) return numeric * 360;
|
|
10164
|
+
return null;
|
|
10165
|
+
};
|
|
10166
|
+
/**
|
|
10167
|
+
* Render the chain as a canvas ctx.filter string, scaling all device-space
|
|
10168
|
+
* lengths (blur radii, shadow offsets) by the capture scale. Unitless
|
|
10169
|
+
* functions and hue angles are scale-invariant.
|
|
10170
|
+
*/
|
|
10171
|
+
const nativeFilterString = (filter, scale) => filter.functions.map((fn) => {
|
|
10172
|
+
switch (fn.kind) {
|
|
10173
|
+
case "blur": return `blur(${fn.value * scale}px)`;
|
|
10174
|
+
case "drop-shadow": return `drop-shadow(${fn.x * scale}px ${fn.y * scale}px ${fn.blur * scale}px ${fn.color})`;
|
|
10175
|
+
case "unitless": return fn.name === "hue-rotate" ? `hue-rotate(${fn.value}deg)` : `${fn.name}(${fn.value})`;
|
|
10176
|
+
}
|
|
10177
|
+
}).join(" ");
|
|
10178
|
+
/**
|
|
10179
|
+
* Outset (in CSS pixels) a surface must grow so blur/shadow spillover is not
|
|
10180
|
+
* cropped. Unitless functions never spread beyond the bounds. Consecutive
|
|
10181
|
+
* blurs compound, so their radii sum.
|
|
10182
|
+
*/
|
|
9928
10183
|
function filterOutset(filter) {
|
|
9929
|
-
|
|
10184
|
+
let blurSum = 0;
|
|
10185
|
+
let maxShadowOffset = 0;
|
|
10186
|
+
for (const fn of filter.functions) if (fn.kind === "blur") blurSum += fn.value;
|
|
10187
|
+
else if (fn.kind === "drop-shadow") {
|
|
10188
|
+
blurSum += fn.blur;
|
|
10189
|
+
maxShadowOffset = Math.max(maxShadowOffset, Math.abs(fn.x), Math.abs(fn.y));
|
|
10190
|
+
}
|
|
10191
|
+
return Math.ceil(3 * blurSum + maxShadowOffset);
|
|
9930
10192
|
}
|
|
9931
10193
|
function canvasLike(source) {
|
|
9932
|
-
const canvas = document.createElement("canvas");
|
|
10194
|
+
const canvas = (source.ownerDocument ?? document).createElement("canvas");
|
|
9933
10195
|
canvas.width = source.width;
|
|
9934
10196
|
canvas.height = source.height;
|
|
9935
10197
|
return canvas;
|
|
@@ -9977,7 +10239,7 @@
|
|
|
9977
10239
|
canvasFilterSupport.set(owner, supported);
|
|
9978
10240
|
return supported;
|
|
9979
10241
|
}
|
|
9980
|
-
function tryNativeFilterSurface(source,
|
|
10242
|
+
function tryNativeFilterSurface(source, filter, opacity, scale, signal) {
|
|
9981
10243
|
let filtered;
|
|
9982
10244
|
let output;
|
|
9983
10245
|
let complete = false;
|
|
@@ -9986,11 +10248,8 @@
|
|
|
9986
10248
|
filtered = canvasLike(source);
|
|
9987
10249
|
const context = filtered.getContext("2d");
|
|
9988
10250
|
if (!context || !("filter" in context)) return null;
|
|
9989
|
-
|
|
9990
|
-
if (
|
|
9991
|
-
if (shadow) functions.push(`drop-shadow(${shadow.x * scale}px ${shadow.y * scale}px ${shadow.blur * scale}px ${shadow.color})`);
|
|
9992
|
-
context.filter = functions.join(" ");
|
|
9993
|
-
if (context.filter === "none") return null;
|
|
10251
|
+
context.filter = nativeFilterString(filter, scale);
|
|
10252
|
+
if (context.filter === "none" || context.filter === "") return null;
|
|
9994
10253
|
context.drawImage(source, 0, 0);
|
|
9995
10254
|
throwIfAborted(signal);
|
|
9996
10255
|
output = canvasLike(source);
|
|
@@ -10009,17 +10268,43 @@
|
|
|
10009
10268
|
if (output && !complete) releaseSurface(output);
|
|
10010
10269
|
}
|
|
10011
10270
|
}
|
|
10271
|
+
/**
|
|
10272
|
+
* The SVG fallback predates the ordered-chain parser and only expresses the
|
|
10273
|
+
* blur + single drop-shadow subset (at most one of each, blur before the
|
|
10274
|
+
* shadow). Chains outside that subset reject with FilterSurfaceError so the
|
|
10275
|
+
* caller keeps its legacy renderer instead of rendering a wrong filter.
|
|
10276
|
+
*/
|
|
10277
|
+
const isSvgExpressible = (filter) => {
|
|
10278
|
+
let blurs = 0;
|
|
10279
|
+
let shadows = 0;
|
|
10280
|
+
for (const fn of filter.functions) if (fn.kind === "blur") blurs++;
|
|
10281
|
+
else if (fn.kind === "drop-shadow") shadows++;
|
|
10282
|
+
else return false;
|
|
10283
|
+
if (blurs > 1 || shadows > 1) return false;
|
|
10284
|
+
if (blurs > 0 && shadows > 0) return filter.functions.findIndex((fn) => fn.kind === "blur") < filter.functions.findIndex((fn) => fn.kind === "drop-shadow");
|
|
10285
|
+
return true;
|
|
10286
|
+
};
|
|
10012
10287
|
async function renderFilterSurface(source, filter, opacity, scale, signal) {
|
|
10013
10288
|
throwIfAborted(signal);
|
|
10014
|
-
if (
|
|
10289
|
+
if (filter.functions.length > 0 && supportsNativeFilters(source.ownerDocument ?? document)) {
|
|
10015
10290
|
const output = tryNativeFilterSurface(source, filter, opacity, scale, signal);
|
|
10016
10291
|
if (output) return output;
|
|
10017
10292
|
}
|
|
10293
|
+
if (!isSvgExpressible(filter)) throw new FilterSurfaceError("Filter chain requires native canvas filters");
|
|
10018
10294
|
return renderSvgFilterSurface(source, filter, opacity, scale, signal);
|
|
10019
10295
|
}
|
|
10020
|
-
async function renderSvgFilterSurface(source,
|
|
10296
|
+
async function renderSvgFilterSurface(source, filter, opacity, scale, signal) {
|
|
10021
10297
|
throwIfAborted(signal);
|
|
10022
|
-
|
|
10298
|
+
const blur = filter.functions.find((fn) => fn.kind === "blur");
|
|
10299
|
+
const shadow = filter.functions.find((fn) => fn.kind === "drop-shadow");
|
|
10300
|
+
const blurValue = blur && blur.kind === "blur" ? blur.value : 0;
|
|
10301
|
+
const shadowValue = shadow && shadow.kind === "drop-shadow" ? {
|
|
10302
|
+
x: shadow.x,
|
|
10303
|
+
y: shadow.y,
|
|
10304
|
+
blur: shadow.blur,
|
|
10305
|
+
color: shadow.color
|
|
10306
|
+
} : void 0;
|
|
10307
|
+
if (!blurValue && !shadowValue) {
|
|
10023
10308
|
const output = canvasLike(source);
|
|
10024
10309
|
const context = output.getContext("2d");
|
|
10025
10310
|
if (!context) {
|
|
@@ -10036,8 +10321,9 @@
|
|
|
10036
10321
|
}
|
|
10037
10322
|
}
|
|
10038
10323
|
const namespace = "http://www.w3.org/2000/svg";
|
|
10324
|
+
const svgDocument = source.ownerDocument ?? document;
|
|
10039
10325
|
const element = (tag, attributes = {}) => {
|
|
10040
|
-
const node =
|
|
10326
|
+
const node = svgDocument.createElementNS(namespace, tag);
|
|
10041
10327
|
Object.entries(attributes).forEach(([key, value]) => node.setAttribute(key, String(value)));
|
|
10042
10328
|
return node;
|
|
10043
10329
|
};
|
|
@@ -10047,7 +10333,7 @@
|
|
|
10047
10333
|
viewBox: `0 0 ${source.width} ${source.height}`
|
|
10048
10334
|
});
|
|
10049
10335
|
const defs = element("defs");
|
|
10050
|
-
const
|
|
10336
|
+
const filterElement = element("filter", {
|
|
10051
10337
|
id: "composited-filter",
|
|
10052
10338
|
filterUnits: "userSpaceOnUse",
|
|
10053
10339
|
x: 0,
|
|
@@ -10056,31 +10342,31 @@
|
|
|
10056
10342
|
height: source.height,
|
|
10057
10343
|
"color-interpolation-filters": "sRGB"
|
|
10058
10344
|
});
|
|
10059
|
-
if (
|
|
10060
|
-
stdDeviation:
|
|
10345
|
+
if (blurValue) filterElement.appendChild(element("feGaussianBlur", {
|
|
10346
|
+
stdDeviation: blurValue * scale,
|
|
10061
10347
|
result: "blurred-source"
|
|
10062
10348
|
}));
|
|
10063
|
-
if (
|
|
10064
|
-
|
|
10065
|
-
in:
|
|
10066
|
-
stdDeviation:
|
|
10349
|
+
if (shadowValue) {
|
|
10350
|
+
filterElement.appendChild(element("feGaussianBlur", {
|
|
10351
|
+
in: blurValue ? "blurred-source" : "SourceAlpha",
|
|
10352
|
+
stdDeviation: shadowValue.blur * scale
|
|
10067
10353
|
}));
|
|
10068
|
-
|
|
10069
|
-
dx:
|
|
10070
|
-
dy:
|
|
10354
|
+
filterElement.appendChild(element("feOffset", {
|
|
10355
|
+
dx: shadowValue.x * scale,
|
|
10356
|
+
dy: shadowValue.y * scale,
|
|
10071
10357
|
result: "offset-shadow"
|
|
10072
10358
|
}));
|
|
10073
|
-
|
|
10074
|
-
|
|
10359
|
+
filterElement.appendChild(element("feFlood", { "flood-color": shadowValue.color }));
|
|
10360
|
+
filterElement.appendChild(element("feComposite", {
|
|
10075
10361
|
in2: "offset-shadow",
|
|
10076
10362
|
operator: "in"
|
|
10077
10363
|
}));
|
|
10078
10364
|
const merge = element("feMerge");
|
|
10079
10365
|
merge.appendChild(element("feMergeNode"));
|
|
10080
|
-
merge.appendChild(element("feMergeNode", { in:
|
|
10081
|
-
|
|
10366
|
+
merge.appendChild(element("feMergeNode", { in: blurValue ? "blurred-source" : "SourceGraphic" }));
|
|
10367
|
+
filterElement.appendChild(merge);
|
|
10082
10368
|
}
|
|
10083
|
-
defs.appendChild(
|
|
10369
|
+
defs.appendChild(filterElement);
|
|
10084
10370
|
svg.appendChild(defs);
|
|
10085
10371
|
let sourceUrl;
|
|
10086
10372
|
try {
|
|
@@ -10095,7 +10381,8 @@
|
|
|
10095
10381
|
href: sourceUrl,
|
|
10096
10382
|
filter: "url(#composited-filter)"
|
|
10097
10383
|
}));
|
|
10098
|
-
const
|
|
10384
|
+
const imageWindow = svgDocument.defaultView;
|
|
10385
|
+
const image = imageWindow?.Image ? new imageWindow.Image() : new Image();
|
|
10099
10386
|
let output;
|
|
10100
10387
|
try {
|
|
10101
10388
|
image.src = `data:image/svg+xml,${encodeURIComponent(new XMLSerializer().serializeToString(svg))}`;
|
|
@@ -10136,7 +10423,7 @@
|
|
|
10136
10423
|
for (const shadow of styles.textShadow) bounds = union(bounds, expand(ink.add(shadow.offsetX.number, shadow.offsetY.number, 0, 0), 3 * shadow.blur.number));
|
|
10137
10424
|
}
|
|
10138
10425
|
for (const child of container.elements) if (child.styles.isVisible()) bounds = union(bounds, surfaceBounds(child));
|
|
10139
|
-
const filter =
|
|
10426
|
+
const filter = parseFilterChain(styles.filter);
|
|
10140
10427
|
return expand(bounds, filter ? filterOutset(filter) : 0);
|
|
10141
10428
|
}
|
|
10142
10429
|
function cropSurface(bounds, viewport, margin, scale) {
|
|
@@ -10150,11 +10437,12 @@
|
|
|
10150
10437
|
//#endregion
|
|
10151
10438
|
//#region src/render/canvas/text/text-decoration-renderer.ts
|
|
10152
10439
|
var TextDecorationRenderer = class {
|
|
10440
|
+
ctx;
|
|
10153
10441
|
constructor(ctx) {
|
|
10154
10442
|
this.ctx = ctx;
|
|
10155
10443
|
}
|
|
10156
10444
|
render(bounds, styles) {
|
|
10157
|
-
this.ctx.fillStyle = asString(styles.textDecorationColor
|
|
10445
|
+
this.ctx.fillStyle = asString(styles.textDecorationColor ?? styles.color);
|
|
10158
10446
|
let thickness = 1;
|
|
10159
10447
|
if (typeof styles.textDecorationThickness === "number") thickness = styles.textDecorationThickness;
|
|
10160
10448
|
else if (styles.textDecorationThickness === "from-font") thickness = Math.max(1, Math.floor(styles.fontSize.number * .05));
|
|
@@ -10273,7 +10561,6 @@
|
|
|
10273
10561
|
};
|
|
10274
10562
|
//#endregion
|
|
10275
10563
|
//#region src/render/canvas/text-renderer.ts
|
|
10276
|
-
const iOSBrokenFonts = ["-apple-system", "system-ui"];
|
|
10277
10564
|
const TEXT_OVERFLOW_EPSILON = 1;
|
|
10278
10565
|
/**
|
|
10279
10566
|
* Detect CJK (Chinese, Japanese, Korean) characters in a string.
|
|
@@ -10292,29 +10579,19 @@
|
|
|
10292
10579
|
const CJK_CHAR_REGEX = /[\u2E80-\u2FFF\u3000-\u30FF\u3400-\u4DBF\u4E00-\u9FFF\uAC00-\uD7AF\uF900-\uFAFF\uFF01-\uFFEF]/;
|
|
10293
10580
|
const hasCJKCharacters = (text) => CJK_CHAR_REGEX.test(text);
|
|
10294
10581
|
/**
|
|
10295
|
-
*
|
|
10296
|
-
*
|
|
10582
|
+
* Chromium-based engines render stroked text with visibly sharper joins when
|
|
10583
|
+
* `miter` is requested, closely matching their own -webkit-text-stroke
|
|
10584
|
+
* output; other engines need `round` joins to avoid glyph spikes. No CSS or
|
|
10585
|
+
* platform API expresses this behavioural difference, so engine detection is
|
|
10586
|
+
* the only reliable signal: `navigator.userAgentData` is Chromium-only, with
|
|
10587
|
+
* the legacy `window.chrome` marker as a fallback for older webviews.
|
|
10297
10588
|
*/
|
|
10298
|
-
const
|
|
10299
|
-
if (typeof navigator === "undefined") return
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
const isIPadOS = /Macintosh/.test(userAgent) && navigator.maxTouchPoints && navigator.maxTouchPoints > 1;
|
|
10303
|
-
if (!isIOS && !isIPadOS) return null;
|
|
10304
|
-
for (const pattern of [/(?:iPhone|CPU(?:\siPhone)?)\sOS\s(\d+)[\._](\d+)/, /Version\/(\d+)\.(\d+)/]) {
|
|
10305
|
-
const match = userAgent.match(pattern);
|
|
10306
|
-
if (match && match[1]) return parseInt(match[1], 10);
|
|
10307
|
-
}
|
|
10308
|
-
return null;
|
|
10309
|
-
};
|
|
10310
|
-
const fixIOSSystemFonts = (fontFamilies) => {
|
|
10311
|
-
const iosVersion = getIOSVersion();
|
|
10312
|
-
if (iosVersion !== null && iosVersion >= 15 && iosVersion < 17) return fontFamilies.map((fontFamily) => iOSBrokenFonts.indexOf(fontFamily) !== -1 ? `-apple-system, "Helvetica Neue", Arial, sans-serif` : fontFamily);
|
|
10313
|
-
return fontFamilies;
|
|
10314
|
-
};
|
|
10315
|
-
const getTextStrokeLineJoin = () => {
|
|
10316
|
-
return (typeof window !== "undefined" ? window : void 0)?.chrome ? "miter" : "round";
|
|
10589
|
+
const isChromiumEngine = () => {
|
|
10590
|
+
if (typeof navigator === "undefined") return false;
|
|
10591
|
+
if (navigator.userAgentData !== void 0) return true;
|
|
10592
|
+
return (typeof window !== "undefined" ? window : void 0)?.chrome !== void 0;
|
|
10317
10593
|
};
|
|
10594
|
+
const getTextStrokeLineJoin = () => isChromiumEngine() ? "miter" : "round";
|
|
10318
10595
|
/**
|
|
10319
10596
|
* Text Renderer
|
|
10320
10597
|
*
|
|
@@ -10322,9 +10599,23 @@
|
|
|
10322
10599
|
* Extracted from CanvasRenderer to improve code organization and maintainability.
|
|
10323
10600
|
*/
|
|
10324
10601
|
var TextRenderer = class {
|
|
10602
|
+
ctx;
|
|
10603
|
+
options;
|
|
10604
|
+
decorationRenderer;
|
|
10605
|
+
/**
|
|
10606
|
+
* Baseline ascent per font string. Consecutive text nodes overwhelmingly
|
|
10607
|
+
* share a font, and each measureBaseline call issues a canvas measureText,
|
|
10608
|
+
* so repeated fonts are memoised (bounded; cleared if the working set
|
|
10609
|
+
* exceeds the cap).
|
|
10610
|
+
*/
|
|
10611
|
+
baselineCache = /* @__PURE__ */ new Map();
|
|
10612
|
+
/**
|
|
10613
|
+
* Per-render glyph width cache. Keyed by glyph + font string,
|
|
10614
|
+
* avoids redundant `measureText` calls when letter-spacing is non-zero.
|
|
10615
|
+
* Cleared at the start of each renderTextNode call.
|
|
10616
|
+
*/
|
|
10617
|
+
glyphWidthCache = null;
|
|
10325
10618
|
constructor(deps) {
|
|
10326
|
-
this.baselineCache = /* @__PURE__ */ new Map();
|
|
10327
|
-
this.glyphWidthCache = null;
|
|
10328
10619
|
this.ctx = deps.ctx;
|
|
10329
10620
|
this.options = deps.options;
|
|
10330
10621
|
this.decorationRenderer = new TextDecorationRenderer(deps.ctx);
|
|
@@ -10517,7 +10808,7 @@
|
|
|
10517
10808
|
*/
|
|
10518
10809
|
createFontStyle(styles) {
|
|
10519
10810
|
const fontVariant = styles.fontVariant.filter((variant) => variant === "normal" || variant === "small-caps").join("");
|
|
10520
|
-
const fontFamily =
|
|
10811
|
+
const fontFamily = styles.fontFamily.join(", ");
|
|
10521
10812
|
const fontSize = isDimensionToken(styles.fontSize) ? `${styles.fontSize.number}${styles.fontSize.unit}` : `${styles.fontSize.number}px`;
|
|
10522
10813
|
return [
|
|
10523
10814
|
[
|
|
@@ -10546,7 +10837,7 @@
|
|
|
10546
10837
|
* only the first N-1 complete lines followed by an ellipsis on the Nth line.
|
|
10547
10838
|
*/
|
|
10548
10839
|
renderLineClampedText(text, styles, paintOrder, baseline, containerBounds) {
|
|
10549
|
-
const lineHeight = styles.fontSize.number
|
|
10840
|
+
const lineHeight = computeLineHeight(styles.lineHeight, styles.fontSize.number);
|
|
10550
10841
|
const lines = [];
|
|
10551
10842
|
let currentLine = [];
|
|
10552
10843
|
let currentLineTop = at(text.textBounds, 0).bounds.top;
|
|
@@ -10579,7 +10870,7 @@
|
|
|
10579
10870
|
* Returns true if ellipsis was applied (caller should skip normal rendering).
|
|
10580
10871
|
*/
|
|
10581
10872
|
renderEllipsisText(text, styles, paintOrder, baseline, containerBounds) {
|
|
10582
|
-
const lineHeight = styles.fontSize.number
|
|
10873
|
+
const lineHeight = computeLineHeight(styles.lineHeight, styles.fontSize.number);
|
|
10583
10874
|
const firstTop = at(text.textBounds, 0).bounds.top;
|
|
10584
10875
|
if (!text.textBounds.every((tb) => Math.abs(tb.bounds.top - firstTop) < lineHeight * .5)) return false;
|
|
10585
10876
|
let fullText = text.textBounds.map((tb) => tb.text).join("").replace(/\s+/g, " ").trim();
|
|
@@ -10728,6 +11019,8 @@
|
|
|
10728
11019
|
* ```
|
|
10729
11020
|
*/
|
|
10730
11021
|
var LRUMap = class {
|
|
11022
|
+
maxSize;
|
|
11023
|
+
_map;
|
|
10731
11024
|
constructor(maxSize) {
|
|
10732
11025
|
this.maxSize = maxSize;
|
|
10733
11026
|
this._map = /* @__PURE__ */ new Map();
|
|
@@ -10776,8 +11069,17 @@
|
|
|
10776
11069
|
* Extracted from CanvasRenderer to improve code organization and maintainability.
|
|
10777
11070
|
*/
|
|
10778
11071
|
var BackgroundRenderer = class {
|
|
11072
|
+
ctx;
|
|
11073
|
+
context;
|
|
11074
|
+
canvas;
|
|
11075
|
+
/**
|
|
11076
|
+
* Instance-level LRU cache for background-image patterns.
|
|
11077
|
+
* CanvasPatterns are tied to the rendering context and must not be
|
|
11078
|
+
* shared across different render passes. This cache lives for the
|
|
11079
|
+
* duration of one html2canvas() call.
|
|
11080
|
+
*/
|
|
11081
|
+
patternCache = new LRUMap(50);
|
|
10779
11082
|
constructor(deps) {
|
|
10780
|
-
this.patternCache = new LRUMap(50);
|
|
10781
11083
|
this.ctx = deps.ctx;
|
|
10782
11084
|
this.context = deps.context;
|
|
10783
11085
|
this.canvas = deps.canvas;
|
|
@@ -10824,7 +11126,6 @@
|
|
|
10824
11126
|
image = await this.context.cache.match(url);
|
|
10825
11127
|
} catch (e) {
|
|
10826
11128
|
this.context.logger.error(`Error loading background-image ${url}`);
|
|
10827
|
-
this.context.onError?.(e instanceof Error ? e : new Error(String(e)));
|
|
10828
11129
|
}
|
|
10829
11130
|
if (image) {
|
|
10830
11131
|
const imageWidth = isNaN(image.width) || image.width === 0 ? 1 : image.width;
|
|
@@ -10863,34 +11164,13 @@
|
|
|
10863
11164
|
const gy0 = y + ly0;
|
|
10864
11165
|
const gy1 = y + ly1;
|
|
10865
11166
|
const processedStops = processColorStops(backgroundImage.stops, lineLength || 1);
|
|
10866
|
-
const
|
|
10867
|
-
const firstStop = at(processedStops, 0);
|
|
10868
|
-
const period = Math.max(lastStop.stop - firstStop.stop, .01);
|
|
10869
|
-
if (lastStop.stop - firstStop.stop < 1e-6) {
|
|
10870
|
-
const gradient = this.ctx.createLinearGradient(gx0, gy0, gx1, gy1);
|
|
10871
|
-
gradient.addColorStop(0, asString(lastStop.color));
|
|
10872
|
-
gradient.addColorStop(1, asString(lastStop.color));
|
|
10873
|
-
this.path(path);
|
|
10874
|
-
this.ctx.fillStyle = gradient;
|
|
10875
|
-
this.ctx.fill();
|
|
10876
|
-
return;
|
|
10877
|
-
}
|
|
10878
|
-
const stops = [];
|
|
10879
|
-
const cycles = Math.ceil(1 / period);
|
|
10880
|
-
for (let k = 0; k < cycles; k++) for (const s of processedStops) {
|
|
10881
|
-
const stop = k * period + (s.stop - firstStop.stop);
|
|
10882
|
-
if (stop > 1) break;
|
|
10883
|
-
stops.push({
|
|
10884
|
-
stop,
|
|
10885
|
-
color: asString(s.color)
|
|
10886
|
-
});
|
|
10887
|
-
}
|
|
10888
|
-
stops.push({
|
|
10889
|
-
stop: 1,
|
|
10890
|
-
color: asString(lastStop.color)
|
|
10891
|
-
});
|
|
11167
|
+
const stacked = stackRepeatingStops(processedStops);
|
|
10892
11168
|
const gradient = this.ctx.createLinearGradient(gx0, gy0, gx1, gy1);
|
|
10893
|
-
|
|
11169
|
+
if (!stacked) {
|
|
11170
|
+
const lastColor = asString(at(processedStops, processedStops.length - 1).color);
|
|
11171
|
+
gradient.addColorStop(0, lastColor);
|
|
11172
|
+
gradient.addColorStop(1, lastColor);
|
|
11173
|
+
} else stacked.forEach((s) => gradient.addColorStop(Math.min(1, Math.max(0, s.stop)), s.color));
|
|
10894
11174
|
this.path(path);
|
|
10895
11175
|
this.ctx.fillStyle = gradient;
|
|
10896
11176
|
this.ctx.fill();
|
|
@@ -10943,37 +11223,25 @@
|
|
|
10943
11223
|
}
|
|
10944
11224
|
if (rx > 0 && ry > 0) {
|
|
10945
11225
|
const cacheKey = `rg|${Math.round(x)}x${Math.round(y)}|${Math.round(rx)}x${Math.round(ry)}|${JSON.stringify(backgroundImage.stops)}`;
|
|
10946
|
-
const
|
|
10947
|
-
const
|
|
11226
|
+
const processed = processColorStops(backgroundImage.stops, rx);
|
|
11227
|
+
const lastColor = asString(at(processed, processed.length - 1).color);
|
|
10948
11228
|
let pattern = this.patternCache.get(cacheKey);
|
|
10949
11229
|
if (!pattern) {
|
|
10950
|
-
const
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
|
|
10954
|
-
|
|
10955
|
-
const gradient = offCtx.createRadialGradient(rx, rx, 0, rx, rx, rx);
|
|
10956
|
-
stops.forEach((s) => gradient.addColorStop(s.stop, asString(s.color)));
|
|
10957
|
-
offCtx.fillStyle = gradient;
|
|
10958
|
-
if (rx !== ry) offCtx.scale(1, ry / rx);
|
|
10959
|
-
offCtx.fillRect(0, 0, rx * 2, rx * 2);
|
|
10960
|
-
pattern = this.ctx.createPattern(offscreen, "no-repeat");
|
|
10961
|
-
this.patternCache.set(cacheKey, pattern);
|
|
10962
|
-
}
|
|
10963
|
-
}
|
|
10964
|
-
if (pattern) {
|
|
10965
|
-
this.path(path);
|
|
10966
|
-
this.ctx.save();
|
|
10967
|
-
this.ctx.clip();
|
|
10968
|
-
if (lastStop) {
|
|
10969
|
-
this.ctx.fillStyle = asString(lastStop.color);
|
|
10970
|
-
this.ctx.fill();
|
|
10971
|
-
}
|
|
10972
|
-
this.ctx.translate(left + x - rx, top + y - ry);
|
|
10973
|
-
this.ctx.fillStyle = pattern;
|
|
10974
|
-
this.ctx.fillRect(0, 0, rx * 2, ry * 2);
|
|
10975
|
-
this.ctx.restore();
|
|
11230
|
+
const ownerDocument = this.canvas.ownerDocument ?? document;
|
|
11231
|
+
const rasterized = rasterizeRadialGradient(ownerDocument, rx, ry, backgroundImage.stops, false);
|
|
11232
|
+
if (!rasterized) return;
|
|
11233
|
+
pattern = this.ctx.createPattern(rasterized.canvas, "no-repeat");
|
|
11234
|
+
this.patternCache.set(cacheKey, pattern);
|
|
10976
11235
|
}
|
|
11236
|
+
this.path(path);
|
|
11237
|
+
this.ctx.save();
|
|
11238
|
+
this.ctx.clip();
|
|
11239
|
+
this.ctx.fillStyle = lastColor;
|
|
11240
|
+
this.ctx.fill();
|
|
11241
|
+
this.ctx.translate(left + x - rx, top + y - ry);
|
|
11242
|
+
this.ctx.fillStyle = pattern;
|
|
11243
|
+
this.ctx.fillRect(0, 0, rx * 2, ry * 2);
|
|
11244
|
+
this.ctx.restore();
|
|
10977
11245
|
}
|
|
10978
11246
|
}
|
|
10979
11247
|
/**
|
|
@@ -11000,40 +11268,14 @@
|
|
|
11000
11268
|
ry = Math.max(ry, .01);
|
|
11001
11269
|
}
|
|
11002
11270
|
if (!(rx > 0 && ry > 0)) return;
|
|
11003
|
-
const
|
|
11004
|
-
const firstStop = at(processed, 0);
|
|
11005
|
-
const lastStop = at(processed, processed.length - 1);
|
|
11006
|
-
const period = Math.max(lastStop.stop - firstStop.stop, .01);
|
|
11007
|
-
const stops = [];
|
|
11008
|
-
const rings = Math.ceil(1 / period);
|
|
11009
|
-
for (let k = 0; k < rings; k++) for (const s of processed) {
|
|
11010
|
-
const stop = k * period + (s.stop - firstStop.stop);
|
|
11011
|
-
if (stop > 1) break;
|
|
11012
|
-
stops.push({
|
|
11013
|
-
stop,
|
|
11014
|
-
color: asString(s.color)
|
|
11015
|
-
});
|
|
11016
|
-
}
|
|
11017
|
-
stops.push({
|
|
11018
|
-
stop: 1,
|
|
11019
|
-
color: asString(lastStop.color)
|
|
11020
|
-
});
|
|
11021
|
-
const cacheKey = `rrg|${Math.round(x)}x${Math.round(y)}|${Math.round(rx)}x${Math.round(ry)}|${stops.length}|${JSON.stringify(backgroundImage.stops)}`;
|
|
11271
|
+
const cacheKey = `rrg|${Math.round(x)}x${Math.round(y)}|${Math.round(rx)}x${Math.round(ry)}|${JSON.stringify(backgroundImage.stops)}`;
|
|
11022
11272
|
let pattern = this.patternCache.get(cacheKey);
|
|
11023
11273
|
if (!pattern) {
|
|
11024
|
-
const
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
|
|
11029
|
-
const gradient = offCtx.createRadialGradient(rx, rx, 0, rx, rx, rx);
|
|
11030
|
-
stops.forEach((s) => gradient.addColorStop(s.stop, s.color));
|
|
11031
|
-
offCtx.fillStyle = gradient;
|
|
11032
|
-
if (rx !== ry) offCtx.scale(1, ry / rx);
|
|
11033
|
-
offCtx.fillRect(0, 0, rx * 2, ry * 2);
|
|
11034
|
-
pattern = this.ctx.createPattern(offscreen, "no-repeat");
|
|
11035
|
-
this.patternCache.set(cacheKey, pattern);
|
|
11036
|
-
}
|
|
11274
|
+
const ownerDocument = this.canvas.ownerDocument ?? document;
|
|
11275
|
+
const rasterized = rasterizeRadialGradient(ownerDocument, rx, ry, backgroundImage.stops, true);
|
|
11276
|
+
if (!rasterized) return;
|
|
11277
|
+
pattern = this.ctx.createPattern(rasterized.canvas, "no-repeat");
|
|
11278
|
+
this.patternCache.set(cacheKey, pattern);
|
|
11037
11279
|
}
|
|
11038
11280
|
if (pattern) {
|
|
11039
11281
|
this.path(path);
|
|
@@ -11245,6 +11487,8 @@
|
|
|
11245
11487
|
* Extracted from CanvasRenderer to improve code organization and maintainability.
|
|
11246
11488
|
*/
|
|
11247
11489
|
var BorderRenderer = class {
|
|
11490
|
+
ctx;
|
|
11491
|
+
pathCallbacks;
|
|
11248
11492
|
constructor(deps, pathCallbacks) {
|
|
11249
11493
|
this.ctx = deps.ctx;
|
|
11250
11494
|
this.pathCallbacks = pathCallbacks;
|
|
@@ -11421,6 +11665,7 @@
|
|
|
11421
11665
|
};
|
|
11422
11666
|
};
|
|
11423
11667
|
var BorderImageRenderer = class {
|
|
11668
|
+
ctx;
|
|
11424
11669
|
constructor(ctx) {
|
|
11425
11670
|
this.ctx = ctx;
|
|
11426
11671
|
}
|
|
@@ -11458,7 +11703,8 @@
|
|
|
11458
11703
|
dy: top,
|
|
11459
11704
|
dw: width - dL - dR,
|
|
11460
11705
|
dh: dT,
|
|
11461
|
-
repeat: repeat.horizontal
|
|
11706
|
+
repeat: repeat.horizontal,
|
|
11707
|
+
horizontal: true
|
|
11462
11708
|
},
|
|
11463
11709
|
{
|
|
11464
11710
|
sx: imgW - sR,
|
|
@@ -11469,7 +11715,8 @@
|
|
|
11469
11715
|
dy: top + dT,
|
|
11470
11716
|
dw: dR,
|
|
11471
11717
|
dh: height - dT - dB,
|
|
11472
|
-
repeat: repeat.vertical
|
|
11718
|
+
repeat: repeat.vertical,
|
|
11719
|
+
horizontal: false
|
|
11473
11720
|
},
|
|
11474
11721
|
{
|
|
11475
11722
|
sx: sL,
|
|
@@ -11480,7 +11727,8 @@
|
|
|
11480
11727
|
dy: top + height - dB,
|
|
11481
11728
|
dw: width - dL - dR,
|
|
11482
11729
|
dh: dB,
|
|
11483
|
-
repeat: repeat.horizontal
|
|
11730
|
+
repeat: repeat.horizontal,
|
|
11731
|
+
horizontal: true
|
|
11484
11732
|
},
|
|
11485
11733
|
{
|
|
11486
11734
|
sx: 0,
|
|
@@ -11491,33 +11739,33 @@
|
|
|
11491
11739
|
dy: top + dT,
|
|
11492
11740
|
dw: dL,
|
|
11493
11741
|
dh: height - dT - dB,
|
|
11494
|
-
repeat: repeat.vertical
|
|
11742
|
+
repeat: repeat.vertical,
|
|
11743
|
+
horizontal: false
|
|
11495
11744
|
}
|
|
11496
11745
|
];
|
|
11497
11746
|
for (const edge of edges) {
|
|
11498
11747
|
if (edge.sw <= 0 || edge.sh <= 0 || edge.dw <= 0 || edge.dh <= 0) continue;
|
|
11499
|
-
const isHorizontal = edge.dw >= edge.dh;
|
|
11500
11748
|
if (edge.repeat === 0) this.ctx.drawImage(image, edge.sx, edge.sy, edge.sw, edge.sh, edge.dx, edge.dy, edge.dw, edge.dh);
|
|
11501
|
-
else if (edge.repeat === 1 || edge.repeat === 2) this.drawRepeatedEdge(image, edge,
|
|
11502
|
-
}
|
|
11503
|
-
if (slice.fill) {
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
|
|
11511
|
-
|
|
11512
|
-
|
|
11513
|
-
}
|
|
11749
|
+
else if (edge.repeat === 1 || edge.repeat === 2) this.drawRepeatedEdge(image, edge, edge.horizontal, edge.repeat === 2);
|
|
11750
|
+
}
|
|
11751
|
+
if (slice.fill) this.drawCenterRegion(image, {
|
|
11752
|
+
sx: sL,
|
|
11753
|
+
sy: sT,
|
|
11754
|
+
sw: imgW - sL - sR,
|
|
11755
|
+
sh: imgH - sT - sB
|
|
11756
|
+
}, {
|
|
11757
|
+
dx: left + dL,
|
|
11758
|
+
dy: top + dT,
|
|
11759
|
+
dw: width - dL - dR,
|
|
11760
|
+
dh: height - dT - dB
|
|
11761
|
+
}, repeat);
|
|
11514
11762
|
}
|
|
11515
11763
|
drawRegion(image, sx, sy, sw, sh, dx, dy, dw, dh) {
|
|
11516
11764
|
if (sw > 0 && sh > 0 && dw > 0 && dh > 0) this.ctx.drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh);
|
|
11517
11765
|
}
|
|
11518
|
-
drawRepeatedEdge(image, edge,
|
|
11519
|
-
const srcLength =
|
|
11520
|
-
const tgLength =
|
|
11766
|
+
drawRepeatedEdge(image, edge, horizontal, round) {
|
|
11767
|
+
const srcLength = horizontal ? edge.sw : edge.sh;
|
|
11768
|
+
const tgLength = horizontal ? edge.dw : edge.dh;
|
|
11521
11769
|
if (srcLength <= 0 || tgLength <= 0) return;
|
|
11522
11770
|
let tileSize;
|
|
11523
11771
|
let tileCount;
|
|
@@ -11534,14 +11782,45 @@
|
|
|
11534
11782
|
this.ctx.clip();
|
|
11535
11783
|
for (let i = 0; i < tileCount; i++) {
|
|
11536
11784
|
const offset = i * tileSize;
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
if (clampedSize <= 0) break;
|
|
11540
|
-
if (isHorizontal) this.ctx.drawImage(image, edge.sx, edge.sy, edge.sw, edge.sh, edge.dx + offset, edge.dy, clampedSize, edge.dh);
|
|
11541
|
-
else this.ctx.drawImage(image, edge.sx, edge.sy, edge.sw, edge.sh, edge.dx, edge.dy + offset, edge.dw, clampedSize);
|
|
11785
|
+
if (horizontal) this.ctx.drawImage(image, edge.sx, edge.sy, edge.sw, edge.sh, edge.dx + offset, edge.dy, tileSize, edge.dh);
|
|
11786
|
+
else this.ctx.drawImage(image, edge.sx, edge.sy, edge.sw, edge.sh, edge.dx, edge.dy + offset, edge.dw, tileSize);
|
|
11542
11787
|
}
|
|
11543
11788
|
this.ctx.restore();
|
|
11544
11789
|
}
|
|
11790
|
+
/**
|
|
11791
|
+
* Draw the center region of the border image, tiling each axis per its
|
|
11792
|
+
* border-image-repeat keyword (stretch spans the whole axis, repeat
|
|
11793
|
+
* tiles at source size with the overflow cropped, round scales the tile
|
|
11794
|
+
* to divide the axis evenly).
|
|
11795
|
+
*/
|
|
11796
|
+
drawCenterRegion(image, src, dst, repeat) {
|
|
11797
|
+
if (src.sw <= 0 || src.sh <= 0 || dst.dw <= 0 || dst.dh <= 0) return;
|
|
11798
|
+
const axis = (mode, srcLen, dstLen) => {
|
|
11799
|
+
if (mode === 0) return {
|
|
11800
|
+
size: dstLen,
|
|
11801
|
+
count: 1
|
|
11802
|
+
};
|
|
11803
|
+
if (mode === 2) {
|
|
11804
|
+
const count = Math.max(1, Math.round(dstLen / srcLen));
|
|
11805
|
+
return {
|
|
11806
|
+
size: dstLen / count,
|
|
11807
|
+
count
|
|
11808
|
+
};
|
|
11809
|
+
}
|
|
11810
|
+
return {
|
|
11811
|
+
size: srcLen,
|
|
11812
|
+
count: Math.max(1, Math.ceil(dstLen / srcLen))
|
|
11813
|
+
};
|
|
11814
|
+
};
|
|
11815
|
+
const columns = axis(repeat.horizontal, src.sw, dst.dw);
|
|
11816
|
+
const rows = axis(repeat.vertical, src.sh, dst.dh);
|
|
11817
|
+
this.ctx.save();
|
|
11818
|
+
this.ctx.beginPath();
|
|
11819
|
+
this.ctx.rect(dst.dx, dst.dy, dst.dw, dst.dh);
|
|
11820
|
+
this.ctx.clip();
|
|
11821
|
+
for (let row = 0; row < rows.count; row++) for (let column = 0; column < columns.count; column++) this.ctx.drawImage(image, src.sx, src.sy, src.sw, src.sh, dst.dx + column * columns.size, dst.dy + row * rows.size, columns.size, rows.size);
|
|
11822
|
+
this.ctx.restore();
|
|
11823
|
+
}
|
|
11545
11824
|
};
|
|
11546
11825
|
//#endregion
|
|
11547
11826
|
//#region src/render/canvas/effects-renderer.ts
|
|
@@ -11595,10 +11874,17 @@
|
|
|
11595
11874
|
* `restore()` **once** when that effect is popped.
|
|
11596
11875
|
*/
|
|
11597
11876
|
var EffectsRenderer = class {
|
|
11877
|
+
ctx;
|
|
11878
|
+
pathCallback;
|
|
11879
|
+
scale;
|
|
11880
|
+
activeEffects = [];
|
|
11881
|
+
/** Whether a canvas state save was performed for the current batch. */
|
|
11882
|
+
didSave = false;
|
|
11883
|
+
/** Index (0-based, from start of activeEffects array) of the last
|
|
11884
|
+
* heavyweight effect in the batch — the one whose pop triggers
|
|
11885
|
+
* restore(). Set to -1 when no save was performed. */
|
|
11886
|
+
saveAtDepth = -1;
|
|
11598
11887
|
constructor(deps, pathCallback) {
|
|
11599
|
-
this.activeEffects = [];
|
|
11600
|
-
this.didSave = false;
|
|
11601
|
-
this.saveAtDepth = -1;
|
|
11602
11888
|
this.ctx = deps.ctx;
|
|
11603
11889
|
this.pathCallback = pathCallback;
|
|
11604
11890
|
this.scale = deps.scale ?? 1;
|
|
@@ -11699,8 +11985,11 @@
|
|
|
11699
11985
|
* always fills the whole area — a mask surface is about alpha coverage, not
|
|
11700
11986
|
* about what is visible underneath.
|
|
11701
11987
|
*
|
|
11702
|
-
*
|
|
11703
|
-
*
|
|
11988
|
+
* Gradient layers share the rasterisation primitives of the background
|
|
11989
|
+
* renderer (gradient-rasterizer.ts): repeating gradients stack their stop
|
|
11990
|
+
* cycles, and the area beyond a radial gradient's ending shape keeps the
|
|
11991
|
+
* last stop's colour. Limitations (v1): mask-mode is alpha-only; layers
|
|
11992
|
+
* composite with source-over (≈ the spec-default `add`).
|
|
11704
11993
|
*/
|
|
11705
11994
|
/**
|
|
11706
11995
|
* CSS layer lists cycle: a single mask-size applies to every mask-image
|
|
@@ -11766,17 +12055,12 @@
|
|
|
11766
12055
|
let [rx, ry] = calculateRadius(layer, cx, cy, width, height);
|
|
11767
12056
|
rx = Math.max(rx, .01);
|
|
11768
12057
|
ry = Math.max(ry, .01);
|
|
11769
|
-
const
|
|
11770
|
-
|
|
11771
|
-
|
|
11772
|
-
|
|
11773
|
-
|
|
11774
|
-
|
|
11775
|
-
processColorStops(layer.stops, rx * 2).forEach((s) => gradient.addColorStop(Math.min(1, Math.max(0, s.stop)), asString(s.color)));
|
|
11776
|
-
offCtx.fillStyle = gradient;
|
|
11777
|
-
if (rx !== ry) offCtx.scale(1, ry / rx);
|
|
11778
|
-
offCtx.fillRect(0, 0, rx * 2, ry * 2);
|
|
11779
|
-
ctx.drawImage(offscreen, area.left + cx - rx, area.top + cy - ry, rx * 2, ry * 2);
|
|
12058
|
+
const ownerDocument = ctx.canvas.ownerDocument ?? document;
|
|
12059
|
+
const rasterized = rasterizeRadialGradient(ownerDocument, rx, ry, layer.stops, isRepeatingRadialGradient(layer));
|
|
12060
|
+
if (!rasterized) return;
|
|
12061
|
+
ctx.fillStyle = rasterized.lastColor;
|
|
12062
|
+
ctx.fillRect(area.left, area.top, area.width, area.height);
|
|
12063
|
+
ctx.drawImage(rasterized.canvas, area.left + cx - rx, area.top + cy - ry, rx * 2, ry * 2);
|
|
11780
12064
|
};
|
|
11781
12065
|
/** Draw one gradient layer filling the whole mask area. */
|
|
11782
12066
|
const paintGradientLayer = (ctx, layer, area) => {
|
|
@@ -11790,12 +12074,31 @@
|
|
|
11790
12074
|
if (layer.type === 1 || layer.type === 3) {
|
|
11791
12075
|
const linear = layer;
|
|
11792
12076
|
const [lineLength, lx0, lx1, ly0, ly1] = calculateGradientDirection(linear.angle || 0, width, height);
|
|
11793
|
-
|
|
11794
|
-
|
|
11795
|
-
|
|
12077
|
+
const processed = processColorStops(linear.stops, lineLength || 1);
|
|
12078
|
+
if (layer.type === 3) {
|
|
12079
|
+
const stacked = stackRepeatingStops(processed);
|
|
12080
|
+
if (!stacked) {
|
|
12081
|
+
ctx.fillStyle = asString(at(processed, processed.length - 1).color);
|
|
12082
|
+
ctx.fillRect(area.left, area.top, width, height);
|
|
12083
|
+
return;
|
|
12084
|
+
}
|
|
12085
|
+
gradient = ctx.createLinearGradient(area.left + lx0, area.top + ly0, area.left + lx1, area.top + ly1);
|
|
12086
|
+
stacked.forEach((s) => gradient.addColorStop(Math.min(1, Math.max(0, s.stop)), s.color));
|
|
12087
|
+
} else {
|
|
12088
|
+
gradient = ctx.createLinearGradient(area.left + lx0, area.top + ly0, area.left + lx1, area.top + ly1);
|
|
12089
|
+
toCanvasStops(processed).forEach((s) => gradient.addColorStop(s.stop, s.color));
|
|
12090
|
+
}
|
|
12091
|
+
} else if (layer.type === 5 || layer.type === 6) {
|
|
11796
12092
|
const conic = layer;
|
|
12093
|
+
const processed = processColorStops(conic.stops, 1);
|
|
12094
|
+
const repeating = layer.type === 6;
|
|
12095
|
+
if (repeating && !stackRepeatingStops(processed)) {
|
|
12096
|
+
ctx.fillStyle = asString(at(processed, processed.length - 1).color);
|
|
12097
|
+
ctx.fillRect(area.left, area.top, width, height);
|
|
12098
|
+
return;
|
|
12099
|
+
}
|
|
11797
12100
|
gradient = ctx.createConicGradient(conic.angle - Math.PI / 2, area.left + width / 2, area.top + height / 2);
|
|
11798
|
-
|
|
12101
|
+
((repeating ? stackRepeatingStops(processed) : null) ?? toCanvasStops(processed)).forEach((s) => gradient.addColorStop(Math.min(1, Math.max(0, s.stop)), s.color));
|
|
11799
12102
|
}
|
|
11800
12103
|
if (gradient) {
|
|
11801
12104
|
ctx.fillStyle = gradient;
|
|
@@ -11862,7 +12165,11 @@
|
|
|
11862
12165
|
dh = sh;
|
|
11863
12166
|
}
|
|
11864
12167
|
} else if (objectFit === 16) {
|
|
11865
|
-
|
|
12168
|
+
const containW = imgRatio > boxRatio ? dw : dh * imgRatio;
|
|
12169
|
+
const containH = imgRatio > boxRatio ? dw / imgRatio : dh;
|
|
12170
|
+
const noneW = Math.min(sw, dw);
|
|
12171
|
+
const noneH = Math.min(sh, dh);
|
|
12172
|
+
if (containW * containH < noneW * noneH) {
|
|
11866
12173
|
if (imgRatio > boxRatio) {
|
|
11867
12174
|
dh = dw / imgRatio;
|
|
11868
12175
|
dy += (box.height - dh) * posY;
|
|
@@ -11913,14 +12220,12 @@
|
|
|
11913
12220
|
ctx.imageSmoothingEnabled = prevSmoothing;
|
|
11914
12221
|
} catch (e) {
|
|
11915
12222
|
context.logger.error(`Error loading image ${container.src}`);
|
|
11916
|
-
context.onError?.(e instanceof Error ? e : new Error(String(e)));
|
|
11917
12223
|
}
|
|
11918
12224
|
if (container instanceof CanvasElementContainer) renderReplacedElementFn(container, curves, container.canvas);
|
|
11919
12225
|
if (container instanceof SVGElementContainer) try {
|
|
11920
12226
|
renderReplacedElementFn(container, curves, await context.cache.match(container.svg));
|
|
11921
12227
|
} catch (e) {
|
|
11922
12228
|
context.logger.error(`Error loading svg ${container.svg.substring(0, 255)}`);
|
|
11923
|
-
context.onError?.(e instanceof Error ? e : new Error(String(e)));
|
|
11924
12229
|
}
|
|
11925
12230
|
if (container instanceof IFrameElementContainer && container.tree) {
|
|
11926
12231
|
const canvas = await iframeRendererFactory(context, {
|
|
@@ -12068,7 +12373,6 @@
|
|
|
12068
12373
|
ctx.drawImage(image, container.bounds.left - (markerWidth + 10), markerCenterY - markerHeight / 2, markerWidth, markerHeight);
|
|
12069
12374
|
} catch (e) {
|
|
12070
12375
|
context.logger.error(`Error loading list-style-image ${url}`);
|
|
12071
|
-
context.onError?.(e instanceof Error ? e : new Error(String(e)));
|
|
12072
12376
|
}
|
|
12073
12377
|
}
|
|
12074
12378
|
} else if (paint.listValue && container.styles.listStyleType !== -1) {
|
|
@@ -12255,7 +12559,10 @@
|
|
|
12255
12559
|
else createCanvasPath(sourceCtx, path);
|
|
12256
12560
|
sourceCtx.fillStyle = asString(shadow.color);
|
|
12257
12561
|
sourceCtx.fill(shadow.inset ? "evenodd" : "nonzero");
|
|
12258
|
-
filtered = await renderFilterSurface(source, {
|
|
12562
|
+
filtered = await renderFilterSurface(source, { functions: [{
|
|
12563
|
+
kind: "blur",
|
|
12564
|
+
value: blur
|
|
12565
|
+
}] }, 1, space.scale, options.signal);
|
|
12259
12566
|
ctx.save();
|
|
12260
12567
|
try {
|
|
12261
12568
|
if (shadow.inset) {
|
|
@@ -12341,6 +12648,10 @@
|
|
|
12341
12648
|
//#endregion
|
|
12342
12649
|
//#region src/render/canvas/text-clip-renderer.ts
|
|
12343
12650
|
var TextClipRenderer = class {
|
|
12651
|
+
ctx;
|
|
12652
|
+
context;
|
|
12653
|
+
scale;
|
|
12654
|
+
createFontStyle;
|
|
12344
12655
|
constructor(deps) {
|
|
12345
12656
|
this.ctx = deps.ctx;
|
|
12346
12657
|
this.context = deps.context;
|
|
@@ -12360,59 +12671,69 @@
|
|
|
12360
12671
|
const deviceHeight = Math.ceil(bounds.height * scale);
|
|
12361
12672
|
const offscreen = this.createLayer(ownerDocument, deviceWidth, deviceHeight);
|
|
12362
12673
|
if (!offscreen) return;
|
|
12363
|
-
|
|
12364
|
-
|
|
12365
|
-
|
|
12366
|
-
|
|
12367
|
-
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12371
|
-
|
|
12372
|
-
|
|
12373
|
-
|
|
12374
|
-
|
|
12375
|
-
|
|
12376
|
-
|
|
12377
|
-
|
|
12378
|
-
|
|
12379
|
-
|
|
12380
|
-
|
|
12381
|
-
|
|
12382
|
-
|
|
12383
|
-
|
|
12384
|
-
|
|
12385
|
-
|
|
12386
|
-
|
|
12387
|
-
|
|
12388
|
-
|
|
12389
|
-
bounds,
|
|
12390
|
-
|
|
12391
|
-
|
|
12392
|
-
|
|
12393
|
-
|
|
12394
|
-
|
|
12395
|
-
|
|
12396
|
-
|
|
12397
|
-
|
|
12398
|
-
mask
|
|
12399
|
-
mask
|
|
12400
|
-
|
|
12401
|
-
|
|
12402
|
-
|
|
12403
|
-
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
12674
|
+
let mask = null;
|
|
12675
|
+
let composite = null;
|
|
12676
|
+
let shadowCanvases = null;
|
|
12677
|
+
try {
|
|
12678
|
+
offscreen.ctx.scale(scale, scale);
|
|
12679
|
+
const [fontString] = this.createFontStyle(styles);
|
|
12680
|
+
offscreen.ctx.font = fontString ?? "";
|
|
12681
|
+
offscreen.ctx.textBaseline = "alphabetic";
|
|
12682
|
+
offscreen.ctx.textAlign = "left";
|
|
12683
|
+
offscreen.ctx.direction = styles.direction === 1 ? "rtl" : "ltr";
|
|
12684
|
+
const baseline = measureBaseline(offscreen.ctx, styles.fontSize.number);
|
|
12685
|
+
const bgRenderer = new BackgroundRenderer({
|
|
12686
|
+
ctx: offscreen.ctx,
|
|
12687
|
+
context: this.context,
|
|
12688
|
+
canvas: offscreen.canvas,
|
|
12689
|
+
options: {
|
|
12690
|
+
width,
|
|
12691
|
+
height,
|
|
12692
|
+
scale: 1
|
|
12693
|
+
}
|
|
12694
|
+
});
|
|
12695
|
+
if (!isTransparent(styles.backgroundColor)) {
|
|
12696
|
+
offscreen.ctx.fillStyle = asString(styles.backgroundColor);
|
|
12697
|
+
offscreen.ctx.fillRect(0, 0, width, height);
|
|
12698
|
+
}
|
|
12699
|
+
offscreen.ctx.save();
|
|
12700
|
+
offscreen.ctx.translate(-bounds.left, -bounds.top);
|
|
12701
|
+
await bgRenderer.renderBackgroundImage(container);
|
|
12702
|
+
offscreen.ctx.restore();
|
|
12703
|
+
const drawOptions = {
|
|
12704
|
+
bounds,
|
|
12705
|
+
baseline,
|
|
12706
|
+
letterSpacing: styles.letterSpacing,
|
|
12707
|
+
writingMode: styles.writingMode
|
|
12708
|
+
};
|
|
12709
|
+
mask = this.createGlyphLayer(ownerDocument, deviceWidth, deviceHeight, offscreen.ctx);
|
|
12710
|
+
if (!mask) return;
|
|
12711
|
+
const hasStroke = !!styles.webkitTextStrokeWidth;
|
|
12712
|
+
if (hasStroke) {
|
|
12713
|
+
mask.ctx.strokeStyle = asString(styles.webkitTextStrokeColor);
|
|
12714
|
+
mask.ctx.lineWidth = styles.webkitTextStrokeWidth;
|
|
12715
|
+
mask.ctx.lineJoin = getTextStrokeLineJoin();
|
|
12716
|
+
}
|
|
12717
|
+
for (const textNode of container.textNodes) for (const textBound of textNode.textBounds) this.drawGlyphs(mask, textBound, drawOptions, (ctx, text, x, y) => {
|
|
12718
|
+
ctx.fillText(text, x, y);
|
|
12719
|
+
if (hasStroke) ctx.strokeText(text, x, y);
|
|
12720
|
+
});
|
|
12721
|
+
offscreen.ctx.globalCompositeOperation = "destination-in";
|
|
12722
|
+
offscreen.ctx.drawImage(mask.canvas, 0, 0, width, height);
|
|
12723
|
+
shadowCanvases = this.renderShadowSilhouettes(paint, ownerDocument, deviceWidth, deviceHeight, offscreen.ctx, styles, drawOptions);
|
|
12724
|
+
if (shadowCanvases) {
|
|
12725
|
+
composite = this.createLayer(ownerDocument, deviceWidth, deviceHeight);
|
|
12726
|
+
if (!composite) return;
|
|
12727
|
+
for (const shadowCanvas of shadowCanvases) composite.ctx.drawImage(shadowCanvas, 0, 0);
|
|
12728
|
+
composite.ctx.drawImage(offscreen.canvas, 0, 0);
|
|
12729
|
+
this.ctx.drawImage(composite.canvas, bounds.left, bounds.top, bounds.width, bounds.height);
|
|
12730
|
+
} else this.ctx.drawImage(offscreen.canvas, bounds.left, bounds.top, bounds.width, bounds.height);
|
|
12731
|
+
} finally {
|
|
12732
|
+
releaseSurface(offscreen.canvas);
|
|
12733
|
+
if (mask) releaseSurface(mask.canvas);
|
|
12734
|
+
if (composite) releaseSurface(composite.canvas);
|
|
12735
|
+
if (shadowCanvases) shadowCanvases.forEach(releaseSurface);
|
|
12736
|
+
}
|
|
12416
12737
|
}
|
|
12417
12738
|
createLayer(ownerDocument, width, height) {
|
|
12418
12739
|
const canvas = ownerDocument.createElement("canvas");
|
|
@@ -12484,20 +12805,29 @@
|
|
|
12484
12805
|
}
|
|
12485
12806
|
return canvases.length ? canvases : null;
|
|
12486
12807
|
}
|
|
12487
|
-
getTextStrokeLineJoin() {
|
|
12488
|
-
return (typeof window !== "undefined" ? window : void 0)?.chrome ? "miter" : "round";
|
|
12489
|
-
}
|
|
12490
12808
|
};
|
|
12491
12809
|
//#endregion
|
|
12492
12810
|
//#region src/render/canvas/canvas-renderer.ts
|
|
12493
12811
|
var CanvasRenderer = class CanvasRenderer {
|
|
12812
|
+
surfaceRoot;
|
|
12813
|
+
surfaceBudget;
|
|
12814
|
+
canvas;
|
|
12815
|
+
ctx;
|
|
12816
|
+
context;
|
|
12817
|
+
options;
|
|
12818
|
+
backgroundRenderer;
|
|
12819
|
+
borderRenderer;
|
|
12820
|
+
borderImageRenderer;
|
|
12821
|
+
effectsRenderer;
|
|
12822
|
+
textRenderer;
|
|
12823
|
+
textClipRenderer;
|
|
12824
|
+
legacySubtree = false;
|
|
12494
12825
|
constructor(context, options, surfaceRoot, surfaceBudget = { pixels: 0 }) {
|
|
12495
12826
|
this.surfaceRoot = surfaceRoot;
|
|
12496
12827
|
this.surfaceBudget = surfaceBudget;
|
|
12497
|
-
this.legacySubtree = false;
|
|
12498
12828
|
this.context = context;
|
|
12499
12829
|
this.options = options;
|
|
12500
|
-
this.canvas = options.canvas ? options.canvas :
|
|
12830
|
+
this.canvas = options.canvas ? options.canvas : context.resourceDocument.createElement("canvas");
|
|
12501
12831
|
const ctx = this.canvas.getContext("2d");
|
|
12502
12832
|
if (!ctx) {
|
|
12503
12833
|
if (!options.canvas) releaseSurface(this.canvas);
|
|
@@ -12550,11 +12880,12 @@
|
|
|
12550
12880
|
async renderStack(stack) {
|
|
12551
12881
|
const styles = stack.element.container.styles;
|
|
12552
12882
|
if (styles.isVisible()) {
|
|
12553
|
-
const filter =
|
|
12883
|
+
const filter = parseFilterChain(styles.filter);
|
|
12884
|
+
const hasFilter = filter !== null && filter.functions.length > 0;
|
|
12554
12885
|
const hasMask = styles.maskImage.length > 0;
|
|
12555
12886
|
const reflect = styles.webkitBoxReflect;
|
|
12556
12887
|
const hasBlend = styles.mixBlendMode !== MIX_BLEND_MODE$1.NORMAL;
|
|
12557
|
-
if (stack.element !== this.surfaceRoot && !this.legacySubtree && (hasMask || reflect || hasBlend || filter && (
|
|
12888
|
+
if (stack.element !== this.surfaceRoot && !this.legacySubtree && (hasMask || reflect || hasBlend || filter !== null && (hasFilter || styles.opacity < 1)) && this.canComposite(stack.element)) {
|
|
12558
12889
|
if (!await this.renderCompositedStack(stack, filter, hasMask, reflect, hasBlend)) {
|
|
12559
12890
|
this.legacySubtree = true;
|
|
12560
12891
|
try {
|
|
@@ -12571,7 +12902,7 @@
|
|
|
12571
12902
|
canComposite(paint) {
|
|
12572
12903
|
const supported = (container) => {
|
|
12573
12904
|
const styles = container.styles;
|
|
12574
|
-
return !styles.isTransformed() && styles.zoom === 1 && styles.clipPath.type === 0 && !contains(styles.display, 2048) &&
|
|
12905
|
+
return !styles.isTransformed() && styles.zoom === 1 && styles.clipPath.type === 0 && !contains(styles.display, 2048) && parseFilterChain(styles.filter) !== null;
|
|
12575
12906
|
};
|
|
12576
12907
|
const subtree = (container) => supported(container) && container.elements.every(subtree);
|
|
12577
12908
|
let ancestor = paint.parent;
|
|
@@ -12639,7 +12970,7 @@
|
|
|
12639
12970
|
async applyMask(surface, styles, bounds) {
|
|
12640
12971
|
const ctx = surface.getContext("2d");
|
|
12641
12972
|
if (!ctx) return;
|
|
12642
|
-
const maskCanvas =
|
|
12973
|
+
const maskCanvas = this.context.resourceDocument.createElement("canvas");
|
|
12643
12974
|
maskCanvas.width = surface.width;
|
|
12644
12975
|
maskCanvas.height = surface.height;
|
|
12645
12976
|
const maskCtx = maskCanvas.getContext("2d");
|
|
@@ -12681,7 +13012,7 @@
|
|
|
12681
13012
|
let refCanvas;
|
|
12682
13013
|
let maskCanvas;
|
|
12683
13014
|
try {
|
|
12684
|
-
refCanvas =
|
|
13015
|
+
refCanvas = this.context.resourceDocument.createElement("canvas");
|
|
12685
13016
|
refCanvas.width = w;
|
|
12686
13017
|
refCanvas.height = h;
|
|
12687
13018
|
const ctx = refCanvas.getContext("2d");
|
|
@@ -12703,7 +13034,7 @@
|
|
|
12703
13034
|
ctx.restore();
|
|
12704
13035
|
}
|
|
12705
13036
|
if (reflect.mask) {
|
|
12706
|
-
maskCanvas =
|
|
13037
|
+
maskCanvas = this.context.resourceDocument.createElement("canvas");
|
|
12707
13038
|
maskCanvas.width = w;
|
|
12708
13039
|
maskCanvas.height = h;
|
|
12709
13040
|
const mctx = maskCanvas.getContext("2d");
|
|
@@ -12827,18 +13158,6 @@
|
|
|
12827
13158
|
await this.renderStack(child);
|
|
12828
13159
|
}
|
|
12829
13160
|
}
|
|
12830
|
-
mask(paths) {
|
|
12831
|
-
this.ctx.beginPath();
|
|
12832
|
-
const x = this.options.x;
|
|
12833
|
-
const y = this.options.y;
|
|
12834
|
-
this.ctx.moveTo(x, y);
|
|
12835
|
-
this.ctx.lineTo(x + this.options.width, y);
|
|
12836
|
-
this.ctx.lineTo(x + this.options.width, y + this.options.height);
|
|
12837
|
-
this.ctx.lineTo(x, y + this.options.height);
|
|
12838
|
-
this.ctx.lineTo(x, y);
|
|
12839
|
-
this.formatPath(paths.slice(0).reverse());
|
|
12840
|
-
this.ctx.closePath();
|
|
12841
|
-
}
|
|
12842
13161
|
path(paths) {
|
|
12843
13162
|
createCanvasPath(this.ctx, paths);
|
|
12844
13163
|
}
|
|
@@ -12860,7 +13179,7 @@
|
|
|
12860
13179
|
let source;
|
|
12861
13180
|
let filtered;
|
|
12862
13181
|
try {
|
|
12863
|
-
source =
|
|
13182
|
+
source = this.context.resourceDocument.createElement("canvas");
|
|
12864
13183
|
source.width = width;
|
|
12865
13184
|
source.height = height;
|
|
12866
13185
|
const ctx = source.getContext("2d");
|
|
@@ -12870,7 +13189,10 @@
|
|
|
12870
13189
|
createCanvasPath(ctx, transformPath(calculateBorderBoxPath(paint.curves), -spread, -spread, 2 * spread, 2 * spread));
|
|
12871
13190
|
ctx.fillStyle = asString(shadow.color);
|
|
12872
13191
|
ctx.fill();
|
|
12873
|
-
filtered = await renderFilterSurface(source, {
|
|
13192
|
+
filtered = await renderFilterSurface(source, { functions: [{
|
|
13193
|
+
kind: "blur",
|
|
13194
|
+
value: blur
|
|
13195
|
+
}] }, 1, scale, this.options.signal);
|
|
12874
13196
|
this.ctx.save();
|
|
12875
13197
|
try {
|
|
12876
13198
|
this.ctx.beginPath();
|
|
@@ -13046,9 +13368,19 @@
|
|
|
13046
13368
|
if (source.type === 1 || source.type === 3) {
|
|
13047
13369
|
const gradientImage = source;
|
|
13048
13370
|
const [lineLength, x0, y0, x1, y1] = calculateGradientDirection(gradientImage.angle, width, height);
|
|
13371
|
+
const processed = processColorStops(gradientImage.stops, lineLength || width);
|
|
13372
|
+
const repeating = source.type === 3;
|
|
13373
|
+
const stacked = repeating ? stackRepeatingStops(processed) : null;
|
|
13049
13374
|
const gradient = ctx.createLinearGradient(x0, y0, x1, y1);
|
|
13050
|
-
|
|
13051
|
-
gradient.addColorStop(Math.min(1, Math.max(0, colorStop.stop)),
|
|
13375
|
+
if (stacked) stacked.forEach((colorStop) => {
|
|
13376
|
+
gradient.addColorStop(Math.min(1, Math.max(0, colorStop.stop)), colorStop.color);
|
|
13377
|
+
});
|
|
13378
|
+
else if (repeating) {
|
|
13379
|
+
const lastColor = asString(at(processed, processed.length - 1).color);
|
|
13380
|
+
gradient.addColorStop(0, lastColor);
|
|
13381
|
+
gradient.addColorStop(1, lastColor);
|
|
13382
|
+
} else toCanvasStops(processed).forEach((colorStop) => {
|
|
13383
|
+
gradient.addColorStop(colorStop.stop, colorStop.color);
|
|
13052
13384
|
});
|
|
13053
13385
|
ctx.fillStyle = gradient;
|
|
13054
13386
|
ctx.fillRect(0, 0, width, height);
|
|
@@ -13056,21 +13388,17 @@
|
|
|
13056
13388
|
}
|
|
13057
13389
|
if (source.type === 2 || source.type === 4) {
|
|
13058
13390
|
const gradientImage = source;
|
|
13059
|
-
const
|
|
13060
|
-
const
|
|
13391
|
+
const position = gradientImage.position.length === 0 ? [FIFTY_PERCENT] : gradientImage.position;
|
|
13392
|
+
const cx = getAbsoluteValue(at(position, 0), width);
|
|
13393
|
+
const cy = getAbsoluteValue(at(position, position.length - 1), height);
|
|
13061
13394
|
const [rx, ry] = calculateRadius(gradientImage, cx, cy, width, height);
|
|
13062
13395
|
if (rx <= 0 || ry <= 0) return null;
|
|
13063
|
-
ctx.
|
|
13064
|
-
|
|
13065
|
-
|
|
13066
|
-
ctx.
|
|
13067
|
-
const gradient = ctx.createRadialGradient(cx, cy, 0, cx, cy, rx);
|
|
13068
|
-
processColorStops(gradientImage.stops, rx).forEach((colorStop) => {
|
|
13069
|
-
gradient.addColorStop(Math.min(1, Math.max(0, colorStop.stop)), asString(colorStop.color));
|
|
13070
|
-
});
|
|
13071
|
-
ctx.fillStyle = gradient;
|
|
13396
|
+
const ownerDocument = this.ctx.canvas.ownerDocument ?? document;
|
|
13397
|
+
const rasterized = rasterizeRadialGradient(ownerDocument, rx, ry, gradientImage.stops, source.type === 4);
|
|
13398
|
+
if (!rasterized) return null;
|
|
13399
|
+
ctx.fillStyle = rasterized.lastColor;
|
|
13072
13400
|
ctx.fillRect(0, 0, width, height);
|
|
13073
|
-
ctx.
|
|
13401
|
+
ctx.drawImage(rasterized.canvas, cx - rx, cy - ry, rx * 2, ry * 2);
|
|
13074
13402
|
return canvas;
|
|
13075
13403
|
}
|
|
13076
13404
|
if (source.type === 5 || source.type === 6) {
|
|
@@ -13115,12 +13443,12 @@
|
|
|
13115
13443
|
}
|
|
13116
13444
|
/**
|
|
13117
13445
|
* Filter the already-painted content beneath the element's border box and
|
|
13118
|
-
* paint the result back, approximating CSS backdrop-filter for the
|
|
13119
|
-
*
|
|
13446
|
+
* paint the result back, approximating CSS backdrop-filter for the chain
|
|
13447
|
+
* subset the filter surface backends support.
|
|
13120
13448
|
*/
|
|
13121
13449
|
async renderBackdropFilter(paint) {
|
|
13122
|
-
const filter =
|
|
13123
|
-
if (!filter ||
|
|
13450
|
+
const filter = parseFilterChain(paint.container.styles.backdropFilter);
|
|
13451
|
+
if (!filter || filter.functions.length === 0) return;
|
|
13124
13452
|
const bounds = paint.container.bounds;
|
|
13125
13453
|
if (bounds.width <= 0 || bounds.height <= 0) return;
|
|
13126
13454
|
const scale = this.options.scale;
|
|
@@ -13132,7 +13460,7 @@
|
|
|
13132
13460
|
let source;
|
|
13133
13461
|
let filtered;
|
|
13134
13462
|
try {
|
|
13135
|
-
source =
|
|
13463
|
+
source = this.context.resourceDocument.createElement("canvas");
|
|
13136
13464
|
source.width = width;
|
|
13137
13465
|
source.height = height;
|
|
13138
13466
|
const srcCtx = source.getContext("2d");
|
|
@@ -13140,7 +13468,15 @@
|
|
|
13140
13468
|
const sx = Math.round((bounds.left - this.options.x) * scale);
|
|
13141
13469
|
const sy = Math.round((bounds.top - this.options.y) * scale);
|
|
13142
13470
|
srcCtx.drawImage(this.canvas, sx, sy, width, height, 0, 0, width, height);
|
|
13143
|
-
|
|
13471
|
+
try {
|
|
13472
|
+
filtered = await renderFilterSurface(source, filter, 1, scale, this.options.signal);
|
|
13473
|
+
} catch (error) {
|
|
13474
|
+
if (error instanceof FilterSurfaceError) {
|
|
13475
|
+
this.context.logger.info(`${error.message}; rendering without the backdrop effect`);
|
|
13476
|
+
return;
|
|
13477
|
+
}
|
|
13478
|
+
throw error;
|
|
13479
|
+
}
|
|
13144
13480
|
if (this.options.signal?.aborted) throw new DOMException("The operation was aborted.", "AbortError");
|
|
13145
13481
|
this.ctx.save();
|
|
13146
13482
|
try {
|
|
@@ -13187,10 +13523,14 @@
|
|
|
13187
13523
|
//#endregion
|
|
13188
13524
|
//#region src/render/canvas/foreignobject-renderer.ts
|
|
13189
13525
|
var ForeignObjectRenderer = class {
|
|
13526
|
+
canvas;
|
|
13527
|
+
ctx;
|
|
13528
|
+
options;
|
|
13529
|
+
context;
|
|
13190
13530
|
constructor(context, options) {
|
|
13191
13531
|
this.context = context;
|
|
13192
13532
|
this.options = options;
|
|
13193
|
-
this.canvas = options.canvas ? options.canvas :
|
|
13533
|
+
this.canvas = options.canvas ? options.canvas : context.resourceDocument.createElement("canvas");
|
|
13194
13534
|
const ctx = this.canvas.getContext("2d");
|
|
13195
13535
|
if (!ctx) throw new Error("Failed to get 2D rendering context from canvas");
|
|
13196
13536
|
this.ctx = ctx;
|
|
@@ -13204,19 +13544,49 @@
|
|
|
13204
13544
|
}
|
|
13205
13545
|
async render(element) {
|
|
13206
13546
|
if (this.options.signal?.aborted) throw new DOMException("The operation was aborted.", "AbortError");
|
|
13207
|
-
const
|
|
13208
|
-
const
|
|
13547
|
+
const restoreRootOffsets = stripRootOffsets(element);
|
|
13548
|
+
const svg = createForeignObjectSVG(this.options.width, this.options.height, 0, 0, element);
|
|
13549
|
+
const imagePromise = loadSerializedSVG(svg);
|
|
13550
|
+
restoreRootOffsets();
|
|
13551
|
+
const img = await imagePromise;
|
|
13552
|
+
if (this.options.signal?.aborted) throw new DOMException("The operation was aborted.", "AbortError");
|
|
13209
13553
|
if (this.options.backgroundColor) {
|
|
13210
13554
|
this.ctx.fillStyle = asString(this.options.backgroundColor);
|
|
13211
|
-
this.ctx.fillRect(
|
|
13555
|
+
this.ctx.fillRect(this.options.x, this.options.y, this.options.width, this.options.height);
|
|
13212
13556
|
}
|
|
13213
|
-
this.ctx.drawImage(img,
|
|
13557
|
+
this.ctx.drawImage(img, this.options.x, this.options.y, this.options.width, this.options.height);
|
|
13214
13558
|
return this.canvas;
|
|
13215
13559
|
}
|
|
13216
13560
|
};
|
|
13561
|
+
/**
|
|
13562
|
+
* Temporarily neutralize the root element's layout offsets for SVG
|
|
13563
|
+
* serialization. `top/right/bottom/left` reset to `auto` (inset values of
|
|
13564
|
+
* positioned elements are baked into the capture rect); margins to `0`.
|
|
13565
|
+
*/
|
|
13566
|
+
const ROOT_OFFSET_PROPERTIES = [
|
|
13567
|
+
"marginTop",
|
|
13568
|
+
"marginRight",
|
|
13569
|
+
"marginBottom",
|
|
13570
|
+
"marginLeft",
|
|
13571
|
+
"top",
|
|
13572
|
+
"right",
|
|
13573
|
+
"bottom",
|
|
13574
|
+
"left"
|
|
13575
|
+
];
|
|
13576
|
+
const stripRootOffsets = (element) => {
|
|
13577
|
+
const style = element.style;
|
|
13578
|
+
const previous = ROOT_OFFSET_PROPERTIES.map((property) => [property, style[property]]);
|
|
13579
|
+
for (const property of ROOT_OFFSET_PROPERTIES) style[property] = property.startsWith("margin") ? "0px" : "auto";
|
|
13580
|
+
return () => {
|
|
13581
|
+
for (const [property, value] of previous) style[property] = value;
|
|
13582
|
+
};
|
|
13583
|
+
};
|
|
13217
13584
|
//#endregion
|
|
13218
13585
|
//#region src/core/logger.ts
|
|
13219
13586
|
var Logger = class {
|
|
13587
|
+
id;
|
|
13588
|
+
enabled;
|
|
13589
|
+
start;
|
|
13220
13590
|
constructor({ id, enabled }) {
|
|
13221
13591
|
this.id = id;
|
|
13222
13592
|
this.enabled = enabled;
|
|
@@ -13252,17 +13622,33 @@
|
|
|
13252
13622
|
//#endregion
|
|
13253
13623
|
//#region src/core/cache-storage.ts
|
|
13254
13624
|
var Cache = class {
|
|
13625
|
+
context;
|
|
13626
|
+
_options;
|
|
13627
|
+
_cache = /* @__PURE__ */ new Map();
|
|
13628
|
+
maxSize;
|
|
13629
|
+
_pendingOperations = /* @__PURE__ */ new Map();
|
|
13630
|
+
/** When true, addImage() collects URLs without starting loads. */
|
|
13631
|
+
_deferMode = false;
|
|
13632
|
+
/** URLs collected during defer mode, pending batch preload. */
|
|
13633
|
+
_collectedUrls = /* @__PURE__ */ new Set();
|
|
13634
|
+
/**
|
|
13635
|
+
* Eviction is suspended between startDefer() and the end of preloadAll():
|
|
13636
|
+
* the render pipeline loads every image it is going to paint inside that
|
|
13637
|
+
* window, and match() never reloads, so an LRU eviction there would
|
|
13638
|
+
* silently drop images from the output on pages with more unique images
|
|
13639
|
+
* than maxSize.
|
|
13640
|
+
*
|
|
13641
|
+
* A counter (not a flag) keeps nested/overlapping defer windows — e.g.
|
|
13642
|
+
* two renders sharing one cache via `config.cache` — suspended until the
|
|
13643
|
+
* last one finishes preloading.
|
|
13644
|
+
*/
|
|
13645
|
+
_evictionSuspendCount = 0;
|
|
13255
13646
|
get _evictionEnabled() {
|
|
13256
13647
|
return this._evictionSuspendCount === 0;
|
|
13257
13648
|
}
|
|
13258
13649
|
constructor(context, _options) {
|
|
13259
13650
|
this.context = context;
|
|
13260
13651
|
this._options = _options;
|
|
13261
|
-
this._cache = /* @__PURE__ */ new Map();
|
|
13262
|
-
this._pendingOperations = /* @__PURE__ */ new Map();
|
|
13263
|
-
this._deferMode = false;
|
|
13264
|
-
this._collectedUrls = /* @__PURE__ */ new Set();
|
|
13265
|
-
this._evictionSuspendCount = 0;
|
|
13266
13652
|
this.maxSize = _options.maxCacheSize ?? 100;
|
|
13267
13653
|
if (this.maxSize < 1) throw new Error("Cache maxSize must be at least 1");
|
|
13268
13654
|
if (this.maxSize > 1e4) this.context.logger.warn(`Cache maxSize ${this.maxSize} is very large and may cause memory issues. Consider using a smaller value (recommended: 100-1000).`);
|
|
@@ -13280,14 +13666,18 @@
|
|
|
13280
13666
|
* an optional concurrency cap to avoid overwhelming the browser's network
|
|
13281
13667
|
* stack (default: 10 concurrent loads).
|
|
13282
13668
|
* After this call returns, all images are either loaded (cache hit) or
|
|
13283
|
-
* failed (logged). Subsequent cache.match()
|
|
13669
|
+
* failed (logged and reported via onError). Subsequent cache.match()
|
|
13670
|
+
* calls return immediately.
|
|
13284
13671
|
*
|
|
13285
13672
|
* @param concurrency - Max concurrent image loads (1–100, default 10).
|
|
13286
13673
|
* @param onProgress - Invoked once before loading and after each settled
|
|
13287
13674
|
* batch with (settledCount, totalCount), enabling coarse progress UI.
|
|
13288
13675
|
* Not invoked when there is nothing to load.
|
|
13676
|
+
* @param signal - Checked before each batch; aborting rejects the whole
|
|
13677
|
+
* preload with an AbortError instead of waiting for the remaining
|
|
13678
|
+
* batches to finish.
|
|
13289
13679
|
*/
|
|
13290
|
-
async preloadAll(concurrency = 10, onProgress) {
|
|
13680
|
+
async preloadAll(concurrency = 10, onProgress, signal) {
|
|
13291
13681
|
this._deferMode = false;
|
|
13292
13682
|
const urls = Array.from(this._collectedUrls);
|
|
13293
13683
|
this._collectedUrls.clear();
|
|
@@ -13296,11 +13686,19 @@
|
|
|
13296
13686
|
const limit = Math.max(1, Math.min(concurrency, 100));
|
|
13297
13687
|
this.context.logger.debug(`Preloading ${urls.length} image(s) with concurrency ${limit}`);
|
|
13298
13688
|
let settled = 0;
|
|
13689
|
+
const abortPromise = signal ? new Promise((_, reject) => {
|
|
13690
|
+
const onAbort = () => reject(new DOMException("The operation was aborted.", "AbortError"));
|
|
13691
|
+
if (signal.aborted) onAbort();
|
|
13692
|
+
else signal.addEventListener("abort", onAbort, { once: true });
|
|
13693
|
+
}) : null;
|
|
13694
|
+
abortPromise?.catch(() => void 0);
|
|
13299
13695
|
onProgress?.(0, urls.length);
|
|
13300
13696
|
for (let i = 0; i < urls.length; i += limit) {
|
|
13697
|
+
throwIfAborted(signal);
|
|
13301
13698
|
const batch = urls.slice(i, i + limit);
|
|
13302
|
-
|
|
13303
|
-
|
|
13699
|
+
batch.map((url) => this._addImageWithPending(url));
|
|
13700
|
+
const batchSettled = Promise.allSettled(batch.map((url) => this._cache.get(url)?.value ?? Promise.resolve()));
|
|
13701
|
+
await (abortPromise ? Promise.race([batchSettled, abortPromise]) : batchSettled);
|
|
13304
13702
|
settled += batch.length;
|
|
13305
13703
|
onProgress?.(settled, urls.length);
|
|
13306
13704
|
}
|
|
@@ -13343,7 +13741,10 @@
|
|
|
13343
13741
|
const timeoutMs = this._options.imageTimeout ?? 15e3;
|
|
13344
13742
|
const imageWithTimeout = this.withTimeout(this.loadImage(src), timeoutMs, `Timed out (${timeoutMs}ms) loading image`);
|
|
13345
13743
|
imageWithTimeout.catch((error) => {
|
|
13346
|
-
|
|
13744
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
13745
|
+
const message = `Failed to load image ${src.substring(0, 256)}: ${reason}`;
|
|
13746
|
+
this.context.logger.error(message);
|
|
13747
|
+
this.context.onError?.(new Error(message));
|
|
13347
13748
|
});
|
|
13348
13749
|
this.set(src, imageWithTimeout);
|
|
13349
13750
|
}
|
|
@@ -13405,18 +13806,22 @@
|
|
|
13405
13806
|
const isSameOrigin = typeof this._options.customIsSameOrigin === "function" ? await this._options.customIsSameOrigin(key, defaultIsSameOrigin) : defaultIsSameOrigin(key);
|
|
13406
13807
|
const canAttemptCors = !isSameOrigin && this._options.allowTaint === false && !isInlineImage(key) && !isBlobImage(key) && typeof this._options.proxy !== "string";
|
|
13407
13808
|
const useCORS = !isInlineImage(key) && (this._options.useCORS === true || canAttemptCors) && FEATURES.SUPPORT_CORS_IMAGES && !isSameOrigin;
|
|
13408
|
-
const useProxy = !isInlineImage(key) && !isSameOrigin && !isBlobImage(key) && typeof this._options.proxy === "string" &&
|
|
13809
|
+
const useProxy = !isInlineImage(key) && !isSameOrigin && !isBlobImage(key) && typeof this._options.proxy === "string" && !useCORS;
|
|
13409
13810
|
if (!isSameOrigin && this._options.allowTaint === false && !isInlineImage(key) && !isBlobImage(key) && !useProxy && !useCORS) return;
|
|
13410
13811
|
let src = key;
|
|
13411
13812
|
if (useProxy) src = await this.proxy(src);
|
|
13412
13813
|
this.context.logger.debug(`Added image ${key.substring(0, 256)}`);
|
|
13814
|
+
const imageConstructor = this.context.config.window.Image ?? Image;
|
|
13413
13815
|
return await new Promise((resolve, reject) => {
|
|
13414
|
-
const img = new
|
|
13816
|
+
const img = new imageConstructor();
|
|
13415
13817
|
img.onload = () => resolve(img);
|
|
13416
13818
|
img.onerror = reject;
|
|
13417
13819
|
if (isInlineBase64Image(src) || useCORS) img.crossOrigin = "anonymous";
|
|
13418
13820
|
img.src = src;
|
|
13419
|
-
if (img.complete === true)
|
|
13821
|
+
if (img.complete === true) {
|
|
13822
|
+
if (typeof img.decode === "function") img.decode().then(() => resolve(img), () => reject(/* @__PURE__ */ new Error(`Failed to decode image ${src.substring(0, 256)}`)));
|
|
13823
|
+
else setTimeout(() => resolve(img), 500);
|
|
13824
|
+
}
|
|
13420
13825
|
});
|
|
13421
13826
|
}
|
|
13422
13827
|
has(key) {
|
|
@@ -13430,23 +13835,19 @@
|
|
|
13430
13835
|
if (!proxy) throw new Error("No proxy defined");
|
|
13431
13836
|
const key = src.substring(0, 256);
|
|
13432
13837
|
return new Promise((resolve, reject) => {
|
|
13433
|
-
const responseType = FEATURES.SUPPORT_RESPONSE_TYPE ? "blob" : "text";
|
|
13434
13838
|
const xhr = new XMLHttpRequest();
|
|
13435
13839
|
xhr.onload = () => {
|
|
13436
13840
|
if (xhr.status === 200) {
|
|
13437
|
-
|
|
13438
|
-
|
|
13439
|
-
|
|
13440
|
-
|
|
13441
|
-
reader.addEventListener("error", (e) => reject(e), false);
|
|
13442
|
-
reader.readAsDataURL(xhr.response);
|
|
13443
|
-
}
|
|
13841
|
+
const reader = new FileReader();
|
|
13842
|
+
reader.addEventListener("load", () => resolve(reader.result), false);
|
|
13843
|
+
reader.addEventListener("error", (e) => reject(e), false);
|
|
13844
|
+
reader.readAsDataURL(xhr.response);
|
|
13444
13845
|
} else reject(`Failed to proxy resource ${key} with status code ${xhr.status}`);
|
|
13445
13846
|
};
|
|
13446
13847
|
xhr.onerror = reject;
|
|
13447
13848
|
const queryString = proxy.indexOf("?") > -1 ? "&" : "?";
|
|
13448
|
-
xhr.open("GET", `${proxy}${queryString}url=${encodeURIComponent(src)}&responseType
|
|
13449
|
-
|
|
13849
|
+
xhr.open("GET", `${proxy}${queryString}url=${encodeURIComponent(src)}&responseType=blob`);
|
|
13850
|
+
xhr.responseType = "blob";
|
|
13450
13851
|
if (this._options.imageTimeout) {
|
|
13451
13852
|
const timeout = this._options.imageTimeout;
|
|
13452
13853
|
xhr.timeout = timeout;
|
|
@@ -13470,27 +13871,34 @@
|
|
|
13470
13871
|
* Origin Checker
|
|
13471
13872
|
*
|
|
13472
13873
|
* Provides origin checking functionality without global static state.
|
|
13473
|
-
* Each instance maintains its own
|
|
13874
|
+
* Each instance maintains its own base URI and origin reference.
|
|
13474
13875
|
*
|
|
13475
13876
|
* Replaces the static methods in CacheStorage with instance-based approach.
|
|
13476
13877
|
*/
|
|
13477
13878
|
var OriginChecker = class {
|
|
13879
|
+
baseUri;
|
|
13880
|
+
origin;
|
|
13478
13881
|
constructor(window) {
|
|
13479
13882
|
if (!window || !window.document) throw new Error("Valid window object required for OriginChecker");
|
|
13480
13883
|
if (!window.location || !window.location.href) throw new Error("Window object must have valid location");
|
|
13481
|
-
this.
|
|
13884
|
+
this.baseUri = window.location.href;
|
|
13482
13885
|
this.origin = this.getOrigin(window.location.href);
|
|
13483
13886
|
}
|
|
13484
13887
|
/**
|
|
13485
13888
|
* Get the origin (protocol + hostname + port) of a URL
|
|
13486
13889
|
*
|
|
13487
|
-
* @param url - URL to parse
|
|
13488
|
-
*
|
|
13890
|
+
* @param url - URL to parse; relative URLs resolve against the context
|
|
13891
|
+
* window's location, as the anchor element used to
|
|
13892
|
+
* @returns Origin string (e.g. "https://example.com:8080"), or an empty
|
|
13893
|
+
* string for unparseable URLs — which never matches and is
|
|
13894
|
+
* therefore treated as cross-origin
|
|
13489
13895
|
*/
|
|
13490
13896
|
getOrigin(url) {
|
|
13491
|
-
|
|
13492
|
-
|
|
13493
|
-
|
|
13897
|
+
try {
|
|
13898
|
+
return new URL(url, this.baseUri).origin;
|
|
13899
|
+
} catch (e) {
|
|
13900
|
+
return "";
|
|
13901
|
+
}
|
|
13494
13902
|
}
|
|
13495
13903
|
/**
|
|
13496
13904
|
* Check if a URL is from the same origin as the context
|
|
@@ -13513,11 +13921,15 @@
|
|
|
13513
13921
|
//#endregion
|
|
13514
13922
|
//#region src/core/context.ts
|
|
13515
13923
|
var Context = class Context {
|
|
13516
|
-
static
|
|
13517
|
-
|
|
13518
|
-
|
|
13924
|
+
static instanceCount = 1;
|
|
13925
|
+
instanceName = `#${Context.instanceCount++}`;
|
|
13926
|
+
logger;
|
|
13927
|
+
cache;
|
|
13928
|
+
originChecker;
|
|
13929
|
+
config;
|
|
13930
|
+
onError;
|
|
13931
|
+
_windowBounds;
|
|
13519
13932
|
constructor(options, windowBounds, config) {
|
|
13520
|
-
this.instanceName = `#${Context.instanceCount++}`;
|
|
13521
13933
|
this.config = config;
|
|
13522
13934
|
this.logger = new Logger({
|
|
13523
13935
|
id: this.instanceName,
|
|
@@ -13533,6 +13945,18 @@
|
|
|
13533
13945
|
return this._windowBounds;
|
|
13534
13946
|
}
|
|
13535
13947
|
/**
|
|
13948
|
+
* Document used to allocate offscreen resources (offscreen canvases,
|
|
13949
|
+
* images, measurement elements). Prefers the configured window's document
|
|
13950
|
+
* so resources live in the captured realm; falls back to the global
|
|
13951
|
+
* document, which keeps mock environments without a window document
|
|
13952
|
+
* working.
|
|
13953
|
+
*/
|
|
13954
|
+
get resourceDocument() {
|
|
13955
|
+
const windowDocument = this.config.window.document;
|
|
13956
|
+
if (windowDocument) return windowDocument;
|
|
13957
|
+
return typeof document !== "undefined" ? document : void 0;
|
|
13958
|
+
}
|
|
13959
|
+
/**
|
|
13536
13960
|
* Compensate window bounds for a page scroll that the browser performed
|
|
13537
13961
|
* underneath us. Used by the document cloner: WebKit's scroll anchoring can
|
|
13538
13962
|
* scroll the cloned iframe after `onclone`, and the offset must be applied
|
|
@@ -13604,7 +14028,8 @@
|
|
|
13604
14028
|
iframeContainer: opts.iframeContainer,
|
|
13605
14029
|
inlineImages: foreignObjectRendering,
|
|
13606
14030
|
copyStyles: foreignObjectRendering,
|
|
13607
|
-
cspNonce: opts.cspNonce ?? config.cspNonce
|
|
14031
|
+
cspNonce: opts.cspNonce ?? config.cspNonce,
|
|
14032
|
+
signal: opts.signal
|
|
13608
14033
|
});
|
|
13609
14034
|
/** Assemble canvas rendering options. */
|
|
13610
14035
|
const assembleRenderOptions = (opts, backgroundColor, left, top, width, height, devicePixelRatio) => ({
|
|
@@ -13710,13 +14135,13 @@
|
|
|
13710
14135
|
perfMonitor.start("parse");
|
|
13711
14136
|
throwIfAborted(signal);
|
|
13712
14137
|
context.cache.startDefer();
|
|
13713
|
-
root = parseTree(context, clonedElement);
|
|
14138
|
+
root = parseTree(context, clonedElement, { normalizeDom: opts.normalizeDom });
|
|
13714
14139
|
perfMonitor.end("parse");
|
|
13715
14140
|
emitProgress(opts.onProgress, context, "parse", 50);
|
|
13716
14141
|
perfMonitor.start("preload");
|
|
13717
14142
|
await context.cache.preloadAll(10, (loaded, total) => {
|
|
13718
14143
|
emitProgress(opts.onProgress, context, "preload", 50 + Math.round(loaded / total * 10));
|
|
13719
|
-
});
|
|
14144
|
+
}, signal);
|
|
13720
14145
|
perfMonitor.end("preload");
|
|
13721
14146
|
emitProgress(opts.onProgress, context, "layout", 60);
|
|
13722
14147
|
if (backgroundColor === root.styles.backgroundColor) root.styles.backgroundColor = 0;
|
|
@@ -13787,6 +14212,9 @@
|
|
|
13787
14212
|
exports.default = html2canvas;
|
|
13788
14213
|
exports.html2canvas = html2canvas;
|
|
13789
14214
|
});
|
|
13790
|
-
if (typeof window !== "undefined" && window.html2canvas && window.html2canvas.default)
|
|
14215
|
+
if (typeof window !== "undefined" && window.html2canvas && window.html2canvas.default) {
|
|
14216
|
+
window.html2canvasExports = window.html2canvas;
|
|
14217
|
+
window.html2canvas = window.html2canvas.default;
|
|
14218
|
+
}
|
|
13791
14219
|
|
|
13792
14220
|
//# sourceMappingURL=html2canvas-pro.js.map
|