diff --git a/cs_chart.html b/cs_chart.html
index 4b3b11d..6fb9ff8 100644
--- a/cs_chart.html
+++ b/cs_chart.html
@@ -5,8 +5,8 @@
客服工作台 - 优化版
-
-
+
+
= 0; i--) {
+ const newlineIndex = this.newlines[i];
+ if (index > newlineIndex) {
+ line = i + 2;
+ column = index - newlineIndex;
+ break;
+ }
+ }
+ return {
+ column,
+ line,
+ offset: index
+ };
+ }
+ peek() {
+ return this.buffer.charCodeAt(this.index + 1);
+ }
+ stateText(c) {
+ if (c === 60) {
+ if (this.index > this.sectionStart) {
+ this.cbs.ontext(this.sectionStart, this.index);
+ }
+ this.state = 5;
+ this.sectionStart = this.index;
+ } else if (!this.inVPre && c === this.delimiterOpen[0]) {
+ this.state = 2;
+ this.delimiterIndex = 0;
+ this.stateInterpolationOpen(c);
+ }
+ }
+ stateInterpolationOpen(c) {
+ if (c === this.delimiterOpen[this.delimiterIndex]) {
+ if (this.delimiterIndex === this.delimiterOpen.length - 1) {
+ const start = this.index + 1 - this.delimiterOpen.length;
+ if (start > this.sectionStart) {
+ this.cbs.ontext(this.sectionStart, start);
+ }
+ this.state = 3;
+ this.sectionStart = start;
+ } else {
+ this.delimiterIndex++;
+ }
+ } else if (this.inRCDATA) {
+ this.state = 32;
+ this.stateInRCDATA(c);
+ } else {
+ this.state = 1;
+ this.stateText(c);
+ }
+ }
+ stateInterpolation(c) {
+ if (c === this.delimiterClose[0]) {
+ this.state = 4;
+ this.delimiterIndex = 0;
+ this.stateInterpolationClose(c);
+ }
+ }
+ stateInterpolationClose(c) {
+ if (c === this.delimiterClose[this.delimiterIndex]) {
+ if (this.delimiterIndex === this.delimiterClose.length - 1) {
+ this.cbs.oninterpolation(this.sectionStart, this.index + 1);
+ if (this.inRCDATA) {
+ this.state = 32;
+ } else {
+ this.state = 1;
+ }
+ this.sectionStart = this.index + 1;
+ } else {
+ this.delimiterIndex++;
+ }
+ } else {
+ this.state = 3;
+ this.stateInterpolation(c);
+ }
+ }
+ stateSpecialStartSequence(c) {
+ const isEnd = this.sequenceIndex === this.currentSequence.length;
+ const isMatch = isEnd ? (
+ // If we are at the end of the sequence, make sure the tag name has ended
+ isEndOfTagSection(c)
+ ) : (
+ // Otherwise, do a case-insensitive comparison
+ (c | 32) === this.currentSequence[this.sequenceIndex]
+ );
+ if (!isMatch) {
+ this.inRCDATA = false;
+ } else if (!isEnd) {
+ this.sequenceIndex++;
+ return;
+ }
+ this.sequenceIndex = 0;
+ this.state = 6;
+ this.stateInTagName(c);
+ }
+ /** Look for an end tag. For and