palt-typesetting 0.1.9 → 0.1.11

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 CHANGED
@@ -1,10 +1,15 @@
1
1
  # Palt Typesetting
2
2
 
3
- ## Typesetting Library for Propotional Spacing
3
+ ## Typesetting Library for Proportional Spacing
4
4
 
5
- Palt Typesetting は、読みやすく美しいテキスト表示を実現するための JavaScript ライブラリです。和欧混合、およびメトリクス詰め(`font-feature-settings: 'palt'`) の版面設計において、最大限の力を発揮します。
5
+ Palt Typesetting は、美しいテキスト表示を実現するための JavaScript ライブラリです。和欧混植、およびメトリクス詰め(`font-feature-settings: 'palt'`) の版面設計において、最大限の力を発揮します。
6
6
 
7
- 四分アキの自動挿入、カーニングルールの適用、英語のような語単位での改行など、高度な組版機能を提供します。
7
+ 四分アキの自動挿入、カーニングルールの適用、英語のような単語区切りでの改行など、洗練された組版機能を提供します。
8
+
9
+ ## Demo
10
+
11
+ - [Interactive Demo](https://palt.typesetting.jp)
12
+ - [Simple Demo in CodeSandbox](https://codesandbox.io/p/sandbox/a-simple-demo-of-palt-typesetting-rptqm7?file=%2Fsrc%2Findex.js%3A12%2C1)
8
13
 
9
14
  ## Getting Started
10
15
 
@@ -17,36 +22,28 @@ npm install palt-typesetting
17
22
  ```javascript
18
23
  import Typesetter from 'palt-typesetting'
19
24
 
25
+ // Typesetter のインスタンスを作成
20
26
  const typesetter = new Typesetter()
21
- typesetter.renderToSelector('.my-class')
22
- ```
23
27
 
24
- ### Use from CDN
25
-
26
- ```html
27
- <script src="https://unpkg.com/palt-typesetting@0.1.9/bundle/palt-typesetting.min.js"></script>
28
- ```
29
-
30
- ```html
31
- <script>
32
- const typesetter = new Typesetter()
33
- typesetter.renderToSelector('.my-class')
34
- </script>
28
+ // セレクターにマッチする要素に対して組版を適用
29
+ typesetter.renderToSelector('.my-class')
35
30
  ```
36
31
 
37
- ### Add CSS (optional)
32
+ ### Apply CSS
38
33
 
39
34
  ```css
35
+ /* 共通のスタイリング */
40
36
  .typeset {
41
37
  font-feature-settings: 'palt';
42
38
  letter-spacing: 0.1em;
43
39
  line-height: 1.8;
44
40
  }
45
41
 
42
+ /* 英数のみのスタイリング */
46
43
  .typeset-latin {
47
44
  letter-spacing: 0.05em;
48
45
 
49
- /* if needed */
46
+ /* 必要に応じて */
50
47
  font-size: 105%;
51
48
  line-height: calc(1.8 / 1.05);
52
49
  }
@@ -57,18 +54,19 @@ typesetter.renderToSelector('.my-class')
57
54
  ### Usage
58
55
 
59
56
  ```javascript
60
- // Initialize
57
+ // Typesetter のインスタンスを作成
61
58
  const typesetter = new Typesetter()
62
59
 
63
- // Render to Selector
60
+ // セレクターにマッチする要素に対して組版を適用
61
+ typesetter.renderToSelector('div')
64
62
  typesetter.renderToSelector('.my-class')
65
63
  typesetter.renderToSelector('#my-id')
66
64
 
67
- // Render to HTMLElements
65
+ // HTML 要素に組版を適用
68
66
  const elements = document.querySelectorAll('.my-class')
69
67
  typesetter.renderToElements(elements)
70
68
 
71
- // Render Typesetting
69
+ // 組版を適用した HTML の取得
72
70
  const srcHtml = '「日本語」とEnglish'
73
71
  console.log(typesetter.render(srcHtml))
74
72
  // <span class="typeset" /* 中略 */>「日本語」<span class="typeset-thin-space" style="font-size: 50%;" /* 中略 */> </span><wbr>と<span class="typeset-thin-space" style="font-size: 50%;" /* 中略 */> </span><wbr><span class="typeset-latin">English</span></span>
@@ -82,7 +80,7 @@ console.log(typesetter.render(srcHtml))
82
80
 
83
81
  ### Methods
84
82
 
85
- | メソッド名 | 説明 | 引数 | 返り値 |
83
+ | メソッド名 | 説明 | 引数 | 戻り値 |
86
84
  | ---------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------- |
87
85
  | `render(srcHtml)` | スタイルを適用した HTML 文字列を返します。 | `srcHtml`: 処理する HTML 文字列 | `string`: スタイルを適用した HTML 文字列 |
88
86
  | `renderToElements(elements)` | 指定された Element または Element の配列にスタイルを適用します。 | `elements`: スタイルを適用する Element または Element の配列 | `void` |
@@ -97,7 +95,7 @@ const options = {
97
95
  // ライブラリで使用される CSS クラス名のプレフィックスを指定します。
98
96
  classNamePrefix: 'typeset',
99
97
 
100
- // 単語や助詞など、語単位での改行を行います。
98
+ // 単語や助詞など、単語区切りでの改行を行います。
101
99
  useWordBreak: true,
102
100
 
103
101
  // 英数を `.typeset-latin` でラップします。
@@ -106,8 +104,8 @@ const options = {
106
104
  // 罫線などの分離禁則文字を `.typeset-no-breaks` でラップし、文字間を 0 に設定します。
107
105
  noSpaceBetweenNoBreaks: true,
108
106
 
109
- // 四分アキスペースを自動で追加します。
110
- addThinSpaces: true,
107
+ // 四分アキスペースを自動で挿入します。
108
+ insertThinSpaces: true,
111
109
 
112
110
  // 四分アキスペースの幅を設定します。
113
111
  thinSpaceWidth: '50%',
@@ -134,23 +132,23 @@ typesetter.renderToSelector('.my-class')
134
132
  | オプション名 | 説明 | 型 | デフォルト値 |
135
133
  | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------- | ------------ |
136
134
  | `classNamePrefix` | ライブラリで使用される CSS クラス名のプレフィックスを指定します。 | `string` | `'typeset' ` |
137
- | `useWordBreak` | 単語や助詞など、語単位での改行を行います。 | `boolean` | `true` |
135
+ | `useWordBreak` | 単語や助詞など、単語区切りでの改行を行います。 | `boolean` | `true` |
138
136
  | `wrapLatin` | 英数を `span.typeset-latin` でラップします。<br>`useWordBreak` が `true` の場合にのみ有効です。 | `boolean` | `true` |
139
137
  | `noSpaceBetweenNoBreaks` | 罫線などの分離禁則文字を `span.typeset-no-breaks` でラップし、文字間を 0 に設定します。<br>`useWordBreak` が `true` の場合にのみ有効です。 | `boolean` | `true` |
140
- | `addThinSpaces` | 四分アキスペースを自動で追加します。 | `boolean` | `true` |
141
- | `thinSpaceWidth` | 四分アキスペースの幅を設定します。<br>`addThinSpaces` が `true` の場合にのみ有効です。 | `string` | `'50%' ` |
138
+ | `insertThinSpaces` | 四分アキスペースを自動で挿入します。 | `boolean` | `true` |
139
+ | `thinSpaceWidth` | 四分アキスペースの幅を設定します。<br>`insertThinSpaces` が `true` の場合にのみ有効です。 | `string` | `'50%' ` |
142
140
  | `kerningRules` | 特定の文字間のカーニングルールを設定します。 | `{between: [string, string], value: string \| number}[]` | `[]` |
143
141
 
144
142
  ## Notes
145
143
 
146
144
  ### 環境要件
147
145
 
148
- Palt Typesetting ライブラリは、語単位の改行機能のコアとして `Intl.Segmenter` による分割処理を使用しています。そのため、以下の環境要件があります。
146
+ Palt Typesetting ライブラリは、テキストを言語固有のセグメントに分割する `Intl.Segmenter` という機能に依存しています。そのため、以下の環境要件があります。
149
147
 
150
148
  - Node.js: 16.0.0 以上
151
149
  - ブラウザ: Intl.Segmenter をサポートしているブラウザ
152
150
 
153
- `Intl.Segmenter` は、テキストを言語固有のセグメントに分割する機能を提供しますが、一部のブラウザでは利用できません(クライアントサイドで実行する場合)。Palt Typesetting ライブラリは、`Intl.Segmenter` がサポートされていない環境では組版処理をスキップし、元のテキストをそのまま返します。
151
+ クライアントサイドで実行する場合、この機能は一部のブラウザで利用できません。Palt Typesetting ライブラリは、`Intl.Segmenter` がサポートされていない環境では組版処理をスキップし、元のテキストをそのまま返します。
154
152
 
155
153
  `Intl.Segmenter` の対応状況については、[MDN Web Docs](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) で確認できます。
156
154
 
package/dist/index.d.ts CHANGED
@@ -1,2 +1,14 @@
1
- export {};
1
+ import HTMLProcessor from './html-processor';
2
+ import type { TypesettingOptions } from './types';
3
+ declare class Typesetter extends HTMLProcessor {
4
+ static defaultOptions: TypesettingOptions;
5
+ private isIntlSegmenterSupported;
6
+ constructor(options?: Partial<TypesettingOptions>);
7
+ private static validateOptions;
8
+ private static isValidKerningRule;
9
+ render(srcHtml: string): string;
10
+ renderToElements(elements: Element | Element[] | null): void;
11
+ renderToSelector(selector: string | null): void;
12
+ }
13
+ export default Typesetter;
2
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,kBAAkB,CAAA;AAI5C,OAAO,KAAK,EAAE,kBAAkB,EAAe,MAAM,SAAS,CAAA;AAM9D,cAAM,UAAW,SAAQ,aAAa;IAIpC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAQxC;IAKD,OAAO,CAAC,wBAAwB,CAAS;gBAE7B,OAAO,GAAE,OAAO,CAAC,kBAAkB,CAAM;IA2BrD,OAAO,CAAC,MAAM,CAAC,eAAe;IAkB9B,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAiBjC,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAc/B,gBAAgB,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,IAAI,GAAG,IAAI;IAqB5D,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;CAQhD;AAED,eAAe,UAAU,CAAA"}
package/dist/index.js CHANGED
@@ -65,9 +65,9 @@ Typesetter.defaultOptions = {
65
65
  useWordBreak: true,
66
66
  wrapLatin: true,
67
67
  noSpaceBetweenNoBreaks: true,
68
- addThinSpaces: true,
68
+ insertThinSpaces: true,
69
69
  thinSpaceWidth: '50%',
70
70
  kerningRules: [],
71
71
  };
72
- module.exports = Typesetter;
72
+ exports.default = Typesetter;
73
73
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,sEAA4C;AAC5C,4EAAwD;AACxD,+CAAqE;AACrE,gDAAuB;AAOvB,MAAM,UAAW,SAAQ,wBAAa;IAmBpC,YAAY,UAAuC,EAAE;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,CAAC,QAAoC;QACnD,IAAI,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChD,OAAM;QACR,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7B,QAAQ,GAAG,CAAC,QAAQ,CAAC,CAAA;QACvB,CAAC;QAED,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YACzB,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;YACpD,OAAO,CAAC,SAAS,GAAG,aAAa,CAAA;QACnC,CAAC,CAAC,CAAA;IACJ,CAAC;IAQD,gBAAgB,CAAC,QAAuB;QACtC,IAAI,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChD,OAAM;QACR,CAAC;QAED,MAAM,QAAQ,GAAG,aAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAA;QACxD,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAA;IAC7C,CAAC;;AAvHM,yBAAc,GAAuB;IAC1C,eAAe,EAAE,SAAS;IAC1B,YAAY,EAAE,IAAI;IAClB,SAAS,EAAE,IAAI;IACf,sBAAsB,EAAE,IAAI;IAC5B,gBAAgB,EAAE,IAAI;IACtB,cAAc,EAAE,KAAK;IACrB,YAAY,EAAE,EAAE;CACjB,CAAA;AAkHH,kBAAe,UAAU,CAAA"}
@@ -26,7 +26,7 @@ const addSeparatorsToSegment = (current, next = '', options) => {
26
26
  if (!next)
27
27
  return current;
28
28
  const addWbr = options.useWordBreak && shouldAddWbr(current, next);
29
- const addSpace = options.addThinSpaces && shouldAddThinSpace(current, next);
29
+ const addSpace = options.insertThinSpaces && shouldAddThinSpace(current, next);
30
30
  return current + (addSpace ? (0, utils_tags_1.thinSpace)(options.thinSpaceWidth, options.classNamePrefix) : '') + (addWbr ? utils_tags_1.wbr : '');
31
31
  };
32
32
  exports.addSeparatorsToSegment = addSeparatorsToSegment;
@@ -1 +1 @@
1
- {"version":3,"file":"insert-separators.js","sourceRoot":"","sources":["../src/insert-separators.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAmC;AACnC,6DAA+D;AAC/D,6CAA6C;AAS7C,MAAM,sBAAsB,GAAG,CAAC,WAAmB,EAAE,QAAgB,EAAE,OAA2B,EAAU,EAAE;IAC5G,MAAM,eAAe,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAA;IACrD,MAAM,YAAY,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAA;IAE/C,MAAM,aAAa,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,eAAe,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;QACtF,MAAM,OAAO,GAAG,OAAO,CAAA;QACvB,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,CAAA;QAChD,OAAO,eAAe,GAAG,sBAAsB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;IACzE,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,aAAa,CAAA;AACtB,CAAC,CAAA;AAOD,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAY,EAAE;IACjD,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAA;IACtE,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,CAAA;AACrE,CAAC,CAAA;AAwCQ,4CAAgB;AAhCzB,MAAM,sBAAsB,GAAG,CAAC,OAAe,EAAE,IAAI,GAAG,EAAE,EAAE,OAA2B,EAA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AAQ,GAAG,OAAO,CAAC,gBAAgB,IAAI,kBAAkB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;IAC9E,OAAO,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,sBAAS,EAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AACrH,CAAC,CAAA;AA0B0B,wDAAsB;AAlBjD,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,IAAY,EAAkB,EAAE;IACrE,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACzD,MAAM,EAAE,GAAG,IAAI,mBAAW,CAAC,YAAY,CAAC,CAAA;IACxC,MAAM,gBAAgB,GAAG,EAAE,CAAC,SAAS,EAAE,CAAA;IACvC,OAAO,gBAAgB,IAAI,gBAAgB,CAAC,QAAQ,KAAK,CAAC,CAAA;AAC5D,CAAC,CAAA;AAakD,oCAAY;AAL/D,MAAM,kBAAkB,GAAG,CAAC,OAAe,EAAE,IAAY,EAAW,EAAE;IACpE,OAAO,kCAAa,CAAC,kBAAkB,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,8BAAS,CAAC,kBAAkB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;AACvG,CAAC,CAAA;AAGgE,gDAAkB;AADnF,kBAAe,sBAAsB,CAAA"}
@@ -31,15 +31,15 @@ export interface TypesettingOptions {
31
31
  noSpaceBetweenNoBreaks: boolean
32
32
 
33
33
  /**
34
- * HTML内のテキストにTHIN SPACEを自動的に追加するかどうかを指定します。
34
+ * HTML内のテキストにTHIN SPACEを自動的に挿入するかどうかを指定します。
35
35
  * THIN SPACEは、視覚的なスペースを微調整するために使用されます。
36
36
  */
37
- addThinSpaces: boolean
37
+ insertThinSpaces: boolean
38
38
 
39
39
  /**
40
40
  * THIN SPACEの幅を指定します。
41
41
  * 例えば'20%'と指定すると、THIN SPACEは通常のスペースの20%の幅になります。
42
- * addThinSpaces が true の場合のみ有効です。
42
+ * insertThinSpaces が true の場合のみ有効です。
43
43
  */
44
44
  thinSpaceWidth: string
45
45
 
package/package.json CHANGED
@@ -1,22 +1,21 @@
1
1
  {
2
2
  "name": "palt-typesetting",
3
- "version": "0.1.9",
4
- "description": "A typesetting library, primarily focused on Japanese proportional spacing (font-feature-settings: 'palt').",
3
+ "version": "0.1.11",
4
+ "description": "A typesetting library.",
5
5
  "main": "./dist/index.js",
6
+ "type": "module",
6
7
  "files": [
7
- "dist/**/*",
8
- "bundle/**/*"
8
+ "dist/**/*"
9
9
  ],
10
10
  "repository": {
11
11
  "type": "git",
12
12
  "url": "https://github.com/yamatoiizuka/palt-typesetting.git"
13
13
  },
14
14
  "scripts": {
15
- "clean": "rm -rf ./dist && rm -rf ./bundle",
15
+ "clean": "rm -rf ./dist",
16
16
  "copy": "mkdir -p ./dist/types && cp -R ./src/types/* ./dist/types",
17
17
  "prebuild": "npm run clean && npm run copy",
18
- "build": "tsc && npm run bundle",
19
- "bundle": "esbuild ./dist/index.js --bundle --outfile=bundle/palt-typesetting.min.js --minify --sourcemap --platform=browser --target=es2016 --global-name=Typesetter",
18
+ "build": "tsc",
20
19
  "test": "jest",
21
20
  "lint": "eslint ./src/** --no-error-on-unmatched-pattern",
22
21
  "lint:fix": "eslint ./src/** --fix"
@@ -40,7 +39,6 @@
40
39
  "@typescript-eslint/eslint-plugin": "^6.18.0",
41
40
  "@typescript-eslint/parser": "^6.18.0",
42
41
  "babel-jest": "^29.7.0",
43
- "esbuild": "^0.19.11",
44
42
  "eslint": "^8",
45
43
  "jest": "^29.7.0",
46
44
  "ts-jest": "^29.1.1",
@@ -1,6 +0,0 @@
1
- "use strict";var Typesetter=(()=>{var S=(s,a)=>()=>(a||s((a={exports:{}}).exports,a),a.exports);var G=S(K=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var st=window;K.default=st});var be=S(m=>{"use strict";var nt=m&&m.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(m,"__esModule",{value:!0});m.getTextNodes=m.parseFromString=void 0;var j=nt(G()),Q=class{constructor(a,n){this.replaceNode=(i,o)=>{let c=j.default.document.createRange();c.selectNode(i);let d=c.createContextualFragment(o);i.parentNode&&(i.parentNode.insertBefore(d,i),i.parentNode.removeChild(i))},this.transformFunctions=a,this.options=n}processHtmlWithFunctions(a){return a===""?a:this.transformFunctions.reduce((n,i)=>this.processHtml(n,i),a)}processHtml(a,n){if(a==="")return a;let i=he(a),o=pe(i.body);return o.forEach((c,d)=>{let h=o[d+1]||null,p=this.getTransformedHtml(c,h,n);this.replaceNode(c,p)}),i.body.innerHTML}getTransformedHtml(a,n,i){return i(a.nodeValue||"",n&&n.nodeValue||"",this.options)}},he=s=>new j.default.DOMParser().parseFromString(s,"text/html");m.parseFromString=he;var pe=s=>{let a=j.default.document.createTreeWalker(s,j.default.NodeFilter.SHOW_TEXT),n=a.nextNode(),i=[];for(;n;)n.nodeValue&&n.nodeValue.trim()!==""&&i.push(n),n=a.nextNode();return i};m.getTextNodes=pe;m.default=Q});var me=S((dr,Le)=>{var ee=0,ye=-3;function k(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function at(s,a){this.source=s,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=a,this.destLen=0,this.ltree=new k,this.dtree=new k}var Se=new k,$e=new k,te=new Uint8Array(30),re=new Uint16Array(30),Ae=new Uint8Array(30),we=new Uint16Array(30),it=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ge=new k,T=new Uint8Array(320);function Te(s,a,n,i){var o,c;for(o=0;o<n;++o)s[o]=0;for(o=0;o<30-n;++o)s[o+n]=o/n|0;for(c=i,o=0;o<30;++o)a[o]=c,c+=1<<s[o]}function ot(s,a){var n;for(n=0;n<7;++n)s.table[n]=0;for(s.table[7]=24,s.table[8]=152,s.table[9]=112,n=0;n<24;++n)s.trans[n]=256+n;for(n=0;n<144;++n)s.trans[24+n]=n;for(n=0;n<8;++n)s.trans[168+n]=280+n;for(n=0;n<112;++n)s.trans[176+n]=144+n;for(n=0;n<5;++n)a.table[n]=0;for(a.table[5]=32,n=0;n<32;++n)a.trans[n]=n}var xe=new Uint16Array(16);function J(s,a,n,i){var o,c;for(o=0;o<16;++o)s.table[o]=0;for(o=0;o<i;++o)s.table[a[n+o]]++;for(s.table[0]=0,c=0,o=0;o<16;++o)xe[o]=c,c+=s.table[o];for(o=0;o<i;++o)a[n+o]&&(s.trans[xe[a[n+o]]++]=o)}function ct(s){s.bitcount--||(s.tag=s.source[s.sourceIndex++],s.bitcount=7);var a=s.tag&1;return s.tag>>>=1,a}function L(s,a,n){if(!a)return n;for(;s.bitcount<24;)s.tag|=s.source[s.sourceIndex++]<<s.bitcount,s.bitcount+=8;var i=s.tag&65535>>>16-a;return s.tag>>>=a,s.bitcount-=a,i+n}function Y(s,a){for(;s.bitcount<24;)s.tag|=s.source[s.sourceIndex++]<<s.bitcount,s.bitcount+=8;var n=0,i=0,o=0,c=s.tag;do i=2*i+(c&1),c>>>=1,++o,n+=a.table[o],i-=a.table[o];while(i>=0);return s.tag=c,s.bitcount-=o,a.trans[n+i]}function ft(s,a,n){var i,o,c,d,h,p;for(i=L(s,5,257),o=L(s,5,1),c=L(s,4,4),d=0;d<19;++d)T[d]=0;for(d=0;d<c;++d){var g=L(s,3,0);T[it[d]]=g}for(J(ge,T,0,19),h=0;h<i+o;){var H=Y(s,ge);switch(H){case 16:var I=T[h-1];for(p=L(s,2,3);p;--p)T[h++]=I;break;case 17:for(p=L(s,3,3);p;--p)T[h++]=0;break;case 18:for(p=L(s,7,11);p;--p)T[h++]=0;break;default:T[h++]=H;break}}J(a,T,0,i),J(n,T,i,o)}function ve(s,a,n){for(;;){var i=Y(s,a);if(i===256)return ee;if(i<256)s.dest[s.destLen++]=i;else{var o,c,d,h;for(i-=257,o=L(s,te[i],re[i]),c=Y(s,n),d=s.destLen-L(s,Ae[c],we[c]),h=d;h<d+o;++h)s.dest[s.destLen++]=s.dest[h]}}}function lt(s){for(var a,n,i;s.bitcount>8;)s.sourceIndex--,s.bitcount-=8;if(a=s.source[s.sourceIndex+1],a=256*a+s.source[s.sourceIndex],n=s.source[s.sourceIndex+3],n=256*n+s.source[s.sourceIndex+2],a!==(~n&65535))return ye;for(s.sourceIndex+=4,i=a;i;--i)s.dest[s.destLen++]=s.source[s.sourceIndex++];return s.bitcount=0,ee}function ut(s,a){var n=new at(s,a),i,o,c;do{switch(i=ct(n),o=L(n,2,0),o){case 0:c=lt(n);break;case 1:c=ve(n,Se,$e);break;case 2:ft(n,n.ltree,n.dtree),c=ve(n,n.ltree,n.dtree);break;default:c=ye}if(c!==ee)throw new Error("Data error")}while(!i);return n.destLen<n.dest.length?typeof n.dest.slice=="function"?n.dest.slice(0,n.destLen):n.dest.subarray(0,n.destLen):n.dest}ot(Se,$e);Te(te,re,4,3);Te(Ae,we,2,1);te[28]=0;re[28]=258;Le.exports=ut});var Pe=S((hr,Ne)=>{var dt=new Uint8Array(new Uint32Array([305419896]).buffer)[0]===18,_e=(s,a,n)=>{let i=s[a];s[a]=s[n],s[n]=i},ht=s=>{let a=s.length;for(let n=0;n<a;n+=4)_e(s,n,n+3),_e(s,n+1,n+2)},pt=s=>{dt&&ht(s)};Ne.exports={swap32LE:pt}});var Fe=S((pr,Ce)=>{var He=me(),{swap32LE:bt}=Pe(),ae=11,P=5,gt=ae-P,xt=65536>>ae,vt=1<<gt,yt=vt-1,V=2,St=1<<P,se=St-1,Be=65536>>P,$t=1024>>P,At=Be+$t,wt=At,Tt=32,Lt=wt+Tt,mt=1<<V,ne=class{constructor(a){let n=typeof a.readUInt32BE=="function"&&typeof a.slice=="function";if(n||a instanceof Uint8Array){let i;if(n)this.highStart=a.readUInt32LE(0),this.errorValue=a.readUInt32LE(4),i=a.readUInt32LE(8),a=a.slice(12);else{let o=new DataView(a.buffer);this.highStart=o.getUint32(0,!0),this.errorValue=o.getUint32(4,!0),i=o.getUint32(8,!0),a=a.subarray(12)}a=He(a,new Uint8Array(i)),a=He(a,new Uint8Array(i)),bt(a),this.data=new Uint32Array(a.buffer)}else({data:this.data,highStart:this.highStart,errorValue:this.errorValue}=a)}get(a){let n;return a<0||a>1114111?this.errorValue:a<55296||a>56319&&a<=65535?(n=(this.data[a>>P]<<V)+(a&se),this.data[n]):a<=65535?(n=(this.data[Be+(a-55296>>P)]<<V)+(a&se),this.data[n]):a<this.highStart?(n=this.data[Lt-xt+(a>>ae)],n=this.data[n+(a>>P&yt)],n=(n<<V)+(a&se),this.data[n]):this.data[this.data.length-mt]}};Ce.exports=ne});var Xe=S(E=>{var _t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(s){"use strict";var a=typeof Uint8Array!="undefined"?Uint8Array:Array,n=43,i=47,o=48,c=97,d=65,h=45,p=95;function g(u){var l=u.charCodeAt(0);if(l===n||l===h)return 62;if(l===i||l===p)return 63;if(l<o)return-1;if(l<o+10)return l-o+26+26;if(l<d+26)return l-d;if(l<c+26)return l-c+26}function H(u){var l,W,A,b,_,y;if(u.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var z=u.length;_=u.charAt(z-2)==="="?2:u.charAt(z-1)==="="?1:0,y=new a(u.length*3/4-_),A=_>0?u.length-4:u.length;var N=0;function B(rt){y[N++]=rt}for(l=0,W=0;l<A;l+=4,W+=3)b=g(u.charAt(l))<<18|g(u.charAt(l+1))<<12|g(u.charAt(l+2))<<6|g(u.charAt(l+3)),B((b&16711680)>>16),B((b&65280)>>8),B(b&255);return _===2?(b=g(u.charAt(l))<<2|g(u.charAt(l+1))>>4,B(b&255)):_===1&&(b=g(u.charAt(l))<<10|g(u.charAt(l+1))<<4|g(u.charAt(l+2))>>2,B(b>>8&255),B(b&255)),y}function I(u){var l,W=u.length%3,A="",b,_;function y(N){return _t.charAt(N)}function z(N){return y(N>>18&63)+y(N>>12&63)+y(N>>6&63)+y(N&63)}for(l=0,_=u.length-W;l<_;l+=3)b=(u[l]<<16)+(u[l+1]<<8)+u[l+2],A+=z(b);switch(W){case 1:b=u[u.length-1],A+=y(b>>2),A+=y(b<<4&63),A+="==";break;case 2:b=(u[u.length-2]<<8)+u[u.length-1],A+=y(b>>10),A+=y(b>>4&63),A+=y(b<<2&63),A+="=";break}return A}s.toByteArray=H,s.fromByteArray=I})(typeof E=="undefined"?E.base64js={}:E)});var Ee=S((gr,Ve)=>{var Nt=Fe(),Pt=Xe();function De(s){return s&&s.__esModule?s.default:s}var Ht=5,Oe=12,Bt=13,Ct=16,Ft=17,Xt=22,Ie=28,We=31,Ot=33,R=34,It=35,ie=36,oe=37,ze=38,Wt=39,kt=40,U=41,Ut=42,e=0,t=1,f=2,je=3,r=4,Dt=[[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,je,r,r,r,r,r,r,r,r,r,r,r],[e,r,r,t,t,r,r,r,r,t,t,e,e,e,e,t,t,t,e,e,r,f,r,e,e,e,e,e,e,e,e,t,e],[e,r,r,t,t,r,r,r,r,t,t,t,t,t,e,t,t,t,e,e,r,f,r,e,e,e,e,e,e,e,e,t,e],[r,r,r,t,t,t,r,r,r,t,t,t,t,t,t,t,t,t,t,t,r,f,r,t,t,t,t,t,t,t,t,t,t],[t,r,r,t,t,t,r,r,r,t,t,t,t,t,t,t,t,t,t,t,r,f,r,t,t,t,t,t,t,t,t,t,t],[e,r,r,t,t,t,r,r,r,e,e,e,e,e,e,t,t,t,e,e,r,f,r,e,e,e,e,e,e,e,e,t,e],[e,r,r,t,t,t,r,r,r,e,e,e,e,e,e,t,t,t,e,e,r,f,r,e,e,e,e,e,e,e,e,t,e],[e,r,r,t,t,t,r,r,r,e,e,t,e,t,e,t,t,t,e,e,r,f,r,e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r8uXXW6enbP6b/B8/l5OifVHYLnb9S39s2zcc+Ph+rh8+eQgVPS72elzGWY/tUtbbabBpDiI7yN1q6/4th2y+ErAc5+9BVvu/7KamJbWNZeuqI/R4tRf+YyD1HmOZM1bMV3/14Sn10c0Xu+Sj1nOXb5jL73ncdy02uvlXZNde65dOHYl7Vs4KYuS6FzWLn2zJlpZqPXPVPOa5yzKOyn1VhT9lmMfdbfH7D11Wf2PXN5h9y+dD287+qxgSnaYmnIrRtIb8pJe6/Uv9OVer6Whn0zfGO/BEloZI9ojmfAlUflClDd178bTmVHVTpZXOkAlk/lb42UujmI89HH5V+cl7XtowY6vTxLVWok6UrGzoGTHN+bB+6ri05687VNpvfuvRfaP2uMlNQth1D5JjGelm/8yn+9p3p/7qk9gnfeddXZmq/Sm333PJT659Kv1zjNbZ9uv2Oi//67CV8/N1nj1DmviyXDNVeJkaeaX8UsyesYg8cu2+NvdaPfb+lLDu5tvt/"),jt=new(De(Nt))(zt),ke=function(s){switch(s){case Ot:return Oe;case Wt:case kt:case Ut:return Oe;case It:return Ht;default:return s}},Ue=function(s){switch(s){case oe:case ze:return R;case U:return Xt;default:return s}},D=class{constructor(a,n=!1){this.position=a,this.required=n}},ce=class{nextCodePoint(){let a=this.string.charCodeAt(this.pos++),n=this.string.charCodeAt(this.pos);return 55296<=a&&a<=56319&&56320<=n&&n<=57343?(this.pos++,(a-55296)*1024+(n-56320)+65536):a}nextCharClass(){return ke(jt.get(this.nextCodePoint()))}getSimpleBreak(){switch(this.nextClass){case U:return!1;case R:case oe:case ze:return this.curClass=R,!1;case ie:return this.curClass=ie,!1}return null}getPairTableBreak(a){let n=!1;switch(Dt[this.curClass][this.nextClass]){case e:n=!0;break;case t:n=a===U;break;case f:if(n=a===U,!n)return n=!1,n;break;case je:if(a!==U)return n;break;case r:break}return this.LB8a&&(n=!1),this.LB21a&&(this.curClass===Ct||this.curClass===Ft)?(n=!1,this.LB21a=!1):this.LB21a=this.curClass===Bt,this.curClass===Ie?(this.LB30a++,this.LB30a==2&&this.nextClass===Ie&&(n=!0,this.LB30a=0)):this.LB30a=0,this.curClass=this.nextClass,n}nextBreak(){if(this.curClass==null){let a=this.nextCharClass();this.curClass=Ue(a),this.nextClass=a,this.LB8a=a===We,this.LB30a=0}for(;this.pos<this.string.length;){this.lastPos=this.pos;let a=this.nextClass;if(this.nextClass=this.nextCharClass(),this.curClass===R||this.curClass===ie&&this.nextClass!==oe)return this.curClass=Ue(ke(this.nextClass)),new D(this.lastPos,!0);let n=this.getSimpleBreak();if(n===null&&(n=this.getPairTableBreak(a)),this.LB8a=this.nextClass===We,n)return new D(this.lastPos)}return this.lastPos<this.string.length?(this.lastPos=this.string.length,new D(this.string.length)):null}constructor(a){this.string=a,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null,this.LB8a=!1,this.LB21a=!1,this.LB30a=0}};Ve.exports=ce});var Re=S(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.noBreakRulesRegex=x.middleDotsRegex=x.closingsRegex=x.openingsRegex=x.japaneseRegex=x.latinRegex=void 0;x.latinRegex=/[A-Za-z0-9!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~]+/;x.japaneseRegex=/[\p{scx=Hiragana}\p{scx=Katakana}|ヲ-゚\p{scx=Han}]+/u;x.openingsRegex=/(|[|{|〔|〈|《|「|『|【|〘|〖|“|‘/;x.closingsRegex=/)|]|}|〕|〉|》|」|』|】|〙|〗|”|’|、|,|。|./;x.middleDotsRegex=/・|:|;/;x.noBreakRulesRegex=new RegExp("[\u2014\u2025\u2026\uFF3F\u2500-\u257F]+")});var fe=S(w=>{"use strict";var Vt=w&&w.__createBinding||(Object.create?function(s,a,n,i){i===void 0&&(i=n);var o=Object.getOwnPropertyDescriptor(a,n);(!o||("get"in o?!a.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return a[n]}}),Object.defineProperty(s,i,o)}:function(s,a,n,i){i===void 0&&(i=n),s[i]=a[n]}),Et=w&&w.__setModuleDefault||(Object.create?function(s,a){Object.defineProperty(s,"default",{enumerable:!0,value:a})}:function(s,a){s.default=a}),Rt=w&&w.__importStar||function(s){if(s&&s.__esModule)return s;var a={};if(s!=null)for(var n in s)n!=="default"&&Object.prototype.hasOwnProperty.call(s,n)&&Vt(a,s,n);return Et(a,s),a};Object.defineProperty(w,"__esModule",{value:!0});w.LanguageClass=w.CharClass=void 0;var F=Rt(Re()),qt={shouldNotBreak:s=>F.noBreakRulesRegex.test(s),shouldAddThinSpace:(s,a)=>{let n={openings:{regex:F.openingsRegex,hasSpaceBefore:!0,hasSpaceAfter:!1},closings:{regex:F.closingsRegex,hasSpaceBefore:!1,hasSpaceAfter:!0},middleDots:{regex:F.middleDotsRegex,hasSpaceBefore:!0,hasSpaceAfter:!0}};for(let{regex:i,hasSpaceBefore:o,hasSpaceAfter:c}of Object.values(n))if(o&&i.test(a)&&!i.test(s)||c&&i.test(s)&&!i.test(a))return!0;return!1}};w.CharClass=qt;var C={isLatin:s=>F.latinRegex.test(s),isJapanese:s=>F.japaneseRegex.test(s),isDifferentLanguageClass:(s,a)=>C.isJapanese(s)&&C.isLatin(a)||C.isLatin(s)&&C.isJapanese(a),shouldAddThinSpace:(s,a)=>C.isDifferentLanguageClass(s,a)};w.LanguageClass=C});var le=S(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.applyNoBreakStyle=v.applyLatinStyle=v.applyWrapperStyle=v.applyKerning=v.thinSpace=v.wbr=void 0;var X={preventSelectStyle:"user-select:none;",hiddenFromReader:'aria-hidden="true"',noIndex:'data-nosnippet=""'},Mt="<wbr>";v.wbr=Mt;var Zt=(s,a)=>{let n="\u2009",i=a+"-thin-space",o=`font-size: ${s}; ${X.preventSelectStyle}`;return`<span class="${i}" style="${o}" ${X.hiddenFromReader} ${X.noIndex}>${n}</span>`};v.thinSpace=Zt;var Kt=(s,a,n)=>{let i=a/1e3/2+"em",o=n+"-kerning",c=`margin: ${i}; ${X.preventSelectStyle}`;return`${s}<span class="${o}" style="${c}" ${X.hiddenFromReader} ${X.noIndex}></span>`};v.applyKerning=Kt;var Gt=(s,a,n)=>`<span class="${a}" style="${n?"word-break: keep-all; overflow-wrap: anywhere;":""}">${s}</span>`;v.applyWrapperStyle=Gt;var Qt=(s,a)=>`<span class="${a+"-latin"}">${s}</span>`;v.applyLatinStyle=Qt;var Jt=(s,a)=>`<span class="${a+"-no-breaks"}" style="letter-spacing: 0">${s}</span>`;v.applyNoBreakStyle=Jt});var Qe=S($=>{"use strict";var Yt=$&&$.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty($,"__esModule",{value:!0});$.shouldAddThinSpace=$.shouldAddWbr=$.addSeparatorsToSegment=$.generateSegments=void 0;var er=Yt(Ee()),qe=fe(),Me=le(),tr=(s,a,n)=>{let i=ue(s),o=ue(a);return i.reduce((d,h,p,g)=>{let H=h,I=g[p+1]||o[0];return d+Ze(H,I,n)},"")},ue=s=>{let a=new Intl.Segmenter("ja-JP",{granularity:"word"});return Array.from(a.segment(s),({segment:n})=>n)};$.generateSegments=ue;var Ze=(s,a="",n)=>{if(!a)return s;let i=n.useWordBreak&&Ke(s,a),o=n.addThinSpaces&&Ge(s,a);return s+(o?(0,Me.thinSpace)(n.thinSpaceWidth,n.classNamePrefix):"")+(i?Me.wbr:"")};$.addSeparatorsToSegment=Ze;var Ke=(s,a)=>{let n=s.slice(-1)+a.slice(0,1),o=new er.default(n).nextBreak();return o&&o.position===1};$.shouldAddWbr=Ke;var Ge=(s,a)=>qe.LanguageClass.shouldAddThinSpace(s,a)||qe.CharClass.shouldAddThinSpace(s,a);$.shouldAddThinSpace=Ge;$.default=tr});var Ye=S(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.applyStyleToSegment=O.applyStyleToText=void 0;var Je=fe(),q=le(),rr=(s,a,n)=>s===" "?s:(0,q.applyWrapperStyle)(s,n.classNamePrefix,n.useWordBreak);O.applyStyleToText=rr;var sr=(s,a,n)=>{if(s===" ")return s;let i=nr(s,a,n);return n.wrapLatin&&Je.LanguageClass.isLatin(s)?(0,q.applyLatinStyle)(i,n.classNamePrefix):n.noSpaceBetweenNoBreaks&&Je.CharClass.shouldNotBreak(s)?(0,q.applyNoBreakStyle)(i,n.classNamePrefix):i};O.applyStyleToSegment=sr;var nr=(s,a,n)=>{let i=[...s];return i.map((c,d)=>{let h=i[d+1]||a[0]||"",p=n.kerningRules.find(g=>g.between[0]===c&&g.between[1]===h);if(p){let g=typeof p.value=="number"?p.value:parseInt(p.value,10);return(0,q.applyKerning)(c,g,n.classNamePrefix)}return c}).join("")}});var cr=S((Z,tt)=>{var de=Z&&Z.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Z,"__esModule",{value:!0});var ar=de(be()),ir=de(Qe()),et=Ye(),or=de(G()),M=class s extends ar.default{constructor(a={}){let n=[et.applyStyleToText,ir.default,et.applyStyleToSegment],i=s.validateOptions(a);super(n,i),this.isIntlSegmenterSupported=typeof Intl.Segmenter!="undefined",this.isIntlSegmenterSupported||console.warn(`
2
- Intl.Segmenter is not supported in this environment.
3
- The original HTML string will be returned.
4
- For more information, see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter
5
- `)}static validateOptions(a){return a.kerningRules&&(a.kerningRules=a.kerningRules.filter(s.isValidKerningRule)),Object.assign(Object.assign({},s.defaultOptions),a)}static isValidKerningRule(a){return a.between[0].length!==1||a.between[1].length!==1?(console.warn(`Kerning rule between '${a.between[0]}' and '${a.between[1]}' must be single characters.`),!1):!0}render(a){return!this.isIntlSegmenterSupported||!a?a:this.processHtmlWithFunctions(a)}renderToElements(a){!this.isIntlSegmenterSupported||!a||(Array.isArray(a)||(a=[a]),a.forEach(n=>{let i=this.render(n.innerHTML);n.innerHTML=i}))}renderToSelector(a){if(!this.isIntlSegmenterSupported||!a)return;let n=or.default.document.querySelectorAll(a);this.renderToElements(Array.from(n))}};M.defaultOptions={classNamePrefix:"typeset",useWordBreak:!0,wrapLatin:!0,noSpaceBetweenNoBreaks:!0,addThinSpaces:!0,thinSpaceWidth:"50%",kerningRules:[]};tt.exports=M});return cr();})();
6
- //# sourceMappingURL=palt-typesetting.min.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/win-browser.ts", "../src/html-processor.ts", "../node_modules/tiny-inflate/index.js", "../node_modules/unicode-trie/swap.js", "../node_modules/unicode-trie/index.js", "../node_modules/base64-js/lib/b64.js", "../node_modules/linebreak/dist/src/linebreaker.js", "../node_modules/linebreak/dist/node_modules/@parcel/node-resolver-core/lib/_empty.js", "../node_modules/linebreak/dist/src/classes.js", "../node_modules/linebreak/dist/src/pairs.js", "../src/utils-regex.ts", "../src/utils-text-classes.ts", "../src/utils-tags.ts", "../src/insert-separators.ts", "../src/apply-style.ts", "../src/index.ts"],
4
- "sourcesContent": ["/**\n * \u30D6\u30E9\u30A6\u30B6\u74B0\u5883\u3067\u4F7F\u7528\u3055\u308C\u308B\u3001\u30B0\u30ED\u30FC\u30D0\u30EB\u306Awindow\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002\n *\n * @return \u30D6\u30E9\u30A6\u30B6\u306E\u30B0\u30ED\u30FC\u30D0\u30EBWindow\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3002\n */\nconst win = window\n\nexport default win\n", "import win from './win'\nimport type { TransformFunction, TypesettingOptions } from './types'\n\n/**\n * HTML\u30B3\u30F3\u30C6\u30F3\u30C4\u306E\u5909\u63DB\u3068\u51E6\u7406\u3092\u884C\u3046\u30AF\u30E9\u30B9\u3067\u3059\u3002\n * \u3053\u306E\u30AF\u30E9\u30B9\u306F\u3001HTML\u6587\u5B57\u5217\u3092\u89E3\u6790\u3057\u3001\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3055\u308C\u305F\u5909\u63DB\u95A2\u6570\u3092\u9069\u7528\u3057\u3066\u3001\n * \u5909\u63DB\u3055\u308C\u305F\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u751F\u6210\u3057\u307E\u3059\u3002\n */\nclass HTMLProcessor {\n private transformFunctions: TransformFunction[]\n private options: TypesettingOptions\n\n constructor(transformFunctions: TransformFunction[], options: TypesettingOptions) {\n this.transformFunctions = transformFunctions\n this.options = options\n }\n\n /**\n * \u4E0E\u3048\u3089\u308C\u305FHTML\u6587\u5B57\u5217\u306B\u5BFE\u3057\u3066\u3001\u6307\u5B9A\u3055\u308C\u305F\u5909\u63DB\u95A2\u6570\u306E\u914D\u5217\u3092\u9806\u756A\u306B\u9069\u7528\u3057\u3001\n * \u5909\u63DB\u3055\u308C\u305FHTML\u3092\u751F\u6210\u3057\u307E\u3059\u3002\n *\n * @param srcHtml - \u5909\u63DB\u3092\u9069\u7528\u3059\u308B\u5143\u306EHTML\u6587\u5B57\u5217\u3002\n * @param functions - \u9806\u756A\u306B\u9069\u7528\u3059\u308B\u5909\u63DB\u95A2\u6570\u306E\u914D\u5217\u3002\n * @return \u5909\u63DB\u5F8C\u306EHTML\u6587\u5B57\u5217\u3002\n */\n processHtmlWithFunctions(srcHtml: string): string {\n if (srcHtml === '') {\n return srcHtml\n }\n\n return this.transformFunctions.reduce(\n (currentHtml, transformFunction) => this.processHtml(currentHtml, transformFunction),\n srcHtml\n )\n }\n\n /**\n * HTML\u6587\u5B57\u5217\u3092\u89E3\u6790\u3057\u3001\u7279\u5B9A\u306E\u5909\u63DB\u95A2\u6570\u3092\u4F7F\u7528\u3057\u3066\u305D\u306E\u5185\u5BB9\u3092\u5909\u63DB\u3057\u3001\n * \u5909\u63DB\u3055\u308C\u305FHTML\u3092\u6587\u5B57\u5217\u3068\u3057\u3066\u8FD4\u3057\u307E\u3059\u3002\n *\n * @param html - \u89E3\u6790\u304A\u3088\u3073\u5909\u63DB\u3059\u308BHTML\u6587\u5B57\u5217\u3002\n * @param transformFunction - \u5404\u30C6\u30AD\u30B9\u30C8\u30CE\u30FC\u30C9\u306B\u9069\u7528\u3055\u308C\u308B\u5909\u63DB\u95A2\u6570\u3002\n * @return \u5909\u63DB\u5F8C\u306EHTML\u5185\u5BB9\u3092\u542B\u3080\u6587\u5B57\u5217\u3002\u30C6\u30AD\u30B9\u30C8\u304C\u7A7A\u306E\u5834\u5408\u306F\u3001\u305D\u306E\u307E\u307E\u8FD4\u3055\u308C\u307E\u3059\u3002\n */\n private processHtml(html: string, transformFunction: TransformFunction): string {\n if (html === '') {\n return html\n }\n\n const doc = parseFromString(html)\n const textNodes = getTextNodes(doc.body)\n\n textNodes.forEach((currentNode, index) => {\n const nextNode = textNodes[index + 1] || null\n const transformedHtml = this.getTransformedHtml(currentNode, nextNode, transformFunction)\n this.replaceNode(currentNode, transformedHtml)\n })\n\n return doc.body.innerHTML\n }\n\n /**\n * \u4E0E\u3048\u3089\u308C\u305F\u30CE\u30FC\u30C9\u3068\u3001\u305D\u306E\u6B21\u306E\u30CE\u30FC\u30C9\u306B\u57FA\u3065\u3044\u3066\u5909\u63DB\u3055\u308C\u305FHTML\u3092\u751F\u6210\u3057\u307E\u3059\u3002\n *\n * @param currentNode - \u73FE\u5728\u306E\u30CE\u30FC\u30C9\u3002\n * @param nextNode - \u6B21\u306E\u30CE\u30FC\u30C9\u3001\u307E\u305F\u306F\u5B58\u5728\u3057\u306A\u3044\u5834\u5408\u306F null\u3002\n * @param transformFunction - \u30CE\u30FC\u30C9\u306E\u5024\u3092\u5909\u63DB\u3059\u308B\u305F\u3081\u306E\u95A2\u6570\u3002\n * @return \u5909\u63DB\u3055\u308C\u305FHTML\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u542B\u3080\u6587\u5B57\u5217\u3002\n */\n private getTransformedHtml(currentNode: Node, nextNode: Node | null, transformFunction: TransformFunction): string {\n const transformedHtml = transformFunction(\n currentNode.nodeValue || '',\n nextNode ? nextNode.nodeValue || '' : '',\n this.options\n )\n return transformedHtml\n }\n\n /**\n * \u6307\u5B9A\u3055\u308C\u305F\u30CE\u30FC\u30C9\u3092\u3001\u65B0\u3057\u3044HTML\u30B3\u30F3\u30C6\u30F3\u30C4\u3067\u7F6E\u304D\u63DB\u3048\u307E\u3059\u3002\n *\n * @param node - \u7F6E\u304D\u63DB\u3048\u308B\u30CE\u30FC\u30C9\u3002\n * @param transformedHtml - \u30CE\u30FC\u30C9\u306B\u633F\u5165\u3055\u308C\u308B\u5909\u63DB\u5F8C\u306EHTML\u30B3\u30F3\u30C6\u30F3\u30C4\u3002\n */\n private replaceNode = (node: Node, transformedHtml: string): void => {\n const range = win.document.createRange()\n range.selectNode(node)\n const fragment = range.createContextualFragment(transformedHtml)\n\n if (node.parentNode) {\n node.parentNode.insertBefore(fragment, node)\n node.parentNode.removeChild(node)\n }\n }\n}\n\n/**\n * \u6587\u5B57\u5217\u304B\u3089HTML\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u89E3\u6790\u3057\u307E\u3059\u3002\n *\n * @param html - \u89E3\u6790\u3059\u308BHTML\u6587\u5B57\u5217\u3002\n * @return \u89E3\u6790\u3055\u308C\u305FHTML\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3002\n */\nconst parseFromString = (html: string) => {\n return new win.DOMParser().parseFromString(html, 'text/html')\n}\n\n/**\n * \u6307\u5B9A\u3055\u308C\u305FHTMLElement\u5185\u306E\u3059\u3079\u3066\u306E\u30C6\u30AD\u30B9\u30C8\u30CE\u30FC\u30C9\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002\n *\n * @param element - \u30C6\u30AD\u30B9\u30C8\u30CE\u30FC\u30C9\u3092\u53D6\u5F97\u3059\u308B\u8981\u7D20\u3002\n * @return \u53D6\u5F97\u3057\u305F\u30C6\u30AD\u30B9\u30C8\u30CE\u30FC\u30C9\u306E\u914D\u5217\u3002\n */\nconst getTextNodes = (element: HTMLElement): Node[] => {\n const walk = win.document.createTreeWalker(element, win.NodeFilter.SHOW_TEXT)\n let textNode = walk.nextNode() as Node | null\n const textNodes: Node[] = []\n\n while (textNode) {\n if (textNode.nodeValue && textNode.nodeValue.trim() !== '') {\n textNodes.push(textNode)\n }\n textNode = walk.nextNode()\n }\n\n return textNodes\n}\n\nexport default HTMLProcessor\nexport { parseFromString, getTextNodes }\n", "var TINF_OK = 0;\nvar TINF_DATA_ERROR = -3;\n\nfunction Tree() {\n this.table = new Uint16Array(16); /* table of code length counts */\n this.trans = new Uint16Array(288); /* code -> symbol translation table */\n}\n\nfunction Data(source, dest) {\n this.source = source;\n this.sourceIndex = 0;\n this.tag = 0;\n this.bitcount = 0;\n \n this.dest = dest;\n this.destLen = 0;\n \n this.ltree = new Tree(); /* dynamic length/symbol tree */\n this.dtree = new Tree(); /* dynamic distance tree */\n}\n\n/* --------------------------------------------------- *\n * -- uninitialized global data (static structures) -- *\n * --------------------------------------------------- */\n\nvar sltree = new Tree();\nvar sdtree = new Tree();\n\n/* extra bits and base tables for length codes */\nvar length_bits = new Uint8Array(30);\nvar length_base = new Uint16Array(30);\n\n/* extra bits and base tables for distance codes */\nvar dist_bits = new Uint8Array(30);\nvar dist_base = new Uint16Array(30);\n\n/* special ordering of code length codes */\nvar clcidx = new Uint8Array([\n 16, 17, 18, 0, 8, 7, 9, 6,\n 10, 5, 11, 4, 12, 3, 13, 2,\n 14, 1, 15\n]);\n\n/* used by tinf_decode_trees, avoids allocations every call */\nvar code_tree = new Tree();\nvar lengths = new Uint8Array(288 + 32);\n\n/* ----------------------- *\n * -- utility functions -- *\n * ----------------------- */\n\n/* build extra bits and base tables */\nfunction tinf_build_bits_base(bits, base, delta, first) {\n var i, sum;\n\n /* build bits table */\n for (i = 0; i < delta; ++i) bits[i] = 0;\n for (i = 0; i < 30 - delta; ++i) bits[i + delta] = i / delta | 0;\n\n /* build base table */\n for (sum = first, i = 0; i < 30; ++i) {\n base[i] = sum;\n sum += 1 << bits[i];\n }\n}\n\n/* build the fixed huffman trees */\nfunction tinf_build_fixed_trees(lt, dt) {\n var i;\n\n /* build fixed length tree */\n for (i = 0; i < 7; ++i) lt.table[i] = 0;\n\n lt.table[7] = 24;\n lt.table[8] = 152;\n lt.table[9] = 112;\n\n for (i = 0; i < 24; ++i) lt.trans[i] = 256 + i;\n for (i = 0; i < 144; ++i) lt.trans[24 + i] = i;\n for (i = 0; i < 8; ++i) lt.trans[24 + 144 + i] = 280 + i;\n for (i = 0; i < 112; ++i) lt.trans[24 + 144 + 8 + i] = 144 + i;\n\n /* build fixed distance tree */\n for (i = 0; i < 5; ++i) dt.table[i] = 0;\n\n dt.table[5] = 32;\n\n for (i = 0; i < 32; ++i) dt.trans[i] = i;\n}\n\n/* given an array of code lengths, build a tree */\nvar offs = new Uint16Array(16);\n\nfunction tinf_build_tree(t, lengths, off, num) {\n var i, sum;\n\n /* clear code length count table */\n for (i = 0; i < 16; ++i) t.table[i] = 0;\n\n /* scan symbol lengths, and sum code length counts */\n for (i = 0; i < num; ++i) t.table[lengths[off + i]]++;\n\n t.table[0] = 0;\n\n /* compute offset table for distribution sort */\n for (sum = 0, i = 0; i < 16; ++i) {\n offs[i] = sum;\n sum += t.table[i];\n }\n\n /* create code->symbol translation table (symbols sorted by code) */\n for (i = 0; i < num; ++i) {\n if (lengths[off + i]) t.trans[offs[lengths[off + i]]++] = i;\n }\n}\n\n/* ---------------------- *\n * -- decode functions -- *\n * ---------------------- */\n\n/* get one bit from source stream */\nfunction tinf_getbit(d) {\n /* check if tag is empty */\n if (!d.bitcount--) {\n /* load next tag */\n d.tag = d.source[d.sourceIndex++];\n d.bitcount = 7;\n }\n\n /* shift bit out of tag */\n var bit = d.tag & 1;\n d.tag >>>= 1;\n\n return bit;\n}\n\n/* read a num bit value from a stream and add base */\nfunction tinf_read_bits(d, num, base) {\n if (!num)\n return base;\n\n while (d.bitcount < 24) {\n d.tag |= d.source[d.sourceIndex++] << d.bitcount;\n d.bitcount += 8;\n }\n\n var val = d.tag & (0xffff >>> (16 - num));\n d.tag >>>= num;\n d.bitcount -= num;\n return val + base;\n}\n\n/* given a data stream and a tree, decode a symbol */\nfunction tinf_decode_symbol(d, t) {\n while (d.bitcount < 24) {\n d.tag |= d.source[d.sourceIndex++] << d.bitcount;\n d.bitcount += 8;\n }\n \n var sum = 0, cur = 0, len = 0;\n var tag = d.tag;\n\n /* get more bits while code value is above sum */\n do {\n cur = 2 * cur + (tag & 1);\n tag >>>= 1;\n ++len;\n\n sum += t.table[len];\n cur -= t.table[len];\n } while (cur >= 0);\n \n d.tag = tag;\n d.bitcount -= len;\n\n return t.trans[sum + cur];\n}\n\n/* given a data stream, decode dynamic trees from it */\nfunction tinf_decode_trees(d, lt, dt) {\n var hlit, hdist, hclen;\n var i, num, length;\n\n /* get 5 bits HLIT (257-286) */\n hlit = tinf_read_bits(d, 5, 257);\n\n /* get 5 bits HDIST (1-32) */\n hdist = tinf_read_bits(d, 5, 1);\n\n /* get 4 bits HCLEN (4-19) */\n hclen = tinf_read_bits(d, 4, 4);\n\n for (i = 0; i < 19; ++i) lengths[i] = 0;\n\n /* read code lengths for code length alphabet */\n for (i = 0; i < hclen; ++i) {\n /* get 3 bits code length (0-7) */\n var clen = tinf_read_bits(d, 3, 0);\n lengths[clcidx[i]] = clen;\n }\n\n /* build code length tree */\n tinf_build_tree(code_tree, lengths, 0, 19);\n\n /* decode code lengths for the dynamic trees */\n for (num = 0; num < hlit + hdist;) {\n var sym = tinf_decode_symbol(d, code_tree);\n\n switch (sym) {\n case 16:\n /* copy previous code length 3-6 times (read 2 bits) */\n var prev = lengths[num - 1];\n for (length = tinf_read_bits(d, 2, 3); length; --length) {\n lengths[num++] = prev;\n }\n break;\n case 17:\n /* repeat code length 0 for 3-10 times (read 3 bits) */\n for (length = tinf_read_bits(d, 3, 3); length; --length) {\n lengths[num++] = 0;\n }\n break;\n case 18:\n /* repeat code length 0 for 11-138 times (read 7 bits) */\n for (length = tinf_read_bits(d, 7, 11); length; --length) {\n lengths[num++] = 0;\n }\n break;\n default:\n /* values 0-15 represent the actual code lengths */\n lengths[num++] = sym;\n break;\n }\n }\n\n /* build dynamic trees */\n tinf_build_tree(lt, lengths, 0, hlit);\n tinf_build_tree(dt, lengths, hlit, hdist);\n}\n\n/* ----------------------------- *\n * -- block inflate functions -- *\n * ----------------------------- */\n\n/* given a stream and two trees, inflate a block of data */\nfunction tinf_inflate_block_data(d, lt, dt) {\n while (1) {\n var sym = tinf_decode_symbol(d, lt);\n\n /* check for end of block */\n if (sym === 256) {\n return TINF_OK;\n }\n\n if (sym < 256) {\n d.dest[d.destLen++] = sym;\n } else {\n var length, dist, offs;\n var i;\n\n sym -= 257;\n\n /* possibly get more bits from length code */\n length = tinf_read_bits(d, length_bits[sym], length_base[sym]);\n\n dist = tinf_decode_symbol(d, dt);\n\n /* possibly get more bits from distance code */\n offs = d.destLen - tinf_read_bits(d, dist_bits[dist], dist_base[dist]);\n\n /* copy match */\n for (i = offs; i < offs + length; ++i) {\n d.dest[d.destLen++] = d.dest[i];\n }\n }\n }\n}\n\n/* inflate an uncompressed block of data */\nfunction tinf_inflate_uncompressed_block(d) {\n var length, invlength;\n var i;\n \n /* unread from bitbuffer */\n while (d.bitcount > 8) {\n d.sourceIndex--;\n d.bitcount -= 8;\n }\n\n /* get length */\n length = d.source[d.sourceIndex + 1];\n length = 256 * length + d.source[d.sourceIndex];\n\n /* get one's complement of length */\n invlength = d.source[d.sourceIndex + 3];\n invlength = 256 * invlength + d.source[d.sourceIndex + 2];\n\n /* check length */\n if (length !== (~invlength & 0x0000ffff))\n return TINF_DATA_ERROR;\n\n d.sourceIndex += 4;\n\n /* copy block */\n for (i = length; i; --i)\n d.dest[d.destLen++] = d.source[d.sourceIndex++];\n\n /* make sure we start next block on a byte boundary */\n d.bitcount = 0;\n\n return TINF_OK;\n}\n\n/* inflate stream from source to dest */\nfunction tinf_uncompress(source, dest) {\n var d = new Data(source, dest);\n var bfinal, btype, res;\n\n do {\n /* read final block flag */\n bfinal = tinf_getbit(d);\n\n /* read block type (2 bits) */\n btype = tinf_read_bits(d, 2, 0);\n\n /* decompress block */\n switch (btype) {\n case 0:\n /* decompress uncompressed block */\n res = tinf_inflate_uncompressed_block(d);\n break;\n case 1:\n /* decompress block with fixed huffman trees */\n res = tinf_inflate_block_data(d, sltree, sdtree);\n break;\n case 2:\n /* decompress block with dynamic huffman trees */\n tinf_decode_trees(d, d.ltree, d.dtree);\n res = tinf_inflate_block_data(d, d.ltree, d.dtree);\n break;\n default:\n res = TINF_DATA_ERROR;\n }\n\n if (res !== TINF_OK)\n throw new Error('Data error');\n\n } while (!bfinal);\n\n if (d.destLen < d.dest.length) {\n if (typeof d.dest.slice === 'function')\n return d.dest.slice(0, d.destLen);\n else\n return d.dest.subarray(0, d.destLen);\n }\n \n return d.dest;\n}\n\n/* -------------------- *\n * -- initialization -- *\n * -------------------- */\n\n/* build fixed huffman trees */\ntinf_build_fixed_trees(sltree, sdtree);\n\n/* build extra bits and base tables */\ntinf_build_bits_base(length_bits, length_base, 4, 3);\ntinf_build_bits_base(dist_bits, dist_base, 2, 1);\n\n/* fix a special case */\nlength_bits[28] = 0;\nlength_base[28] = 258;\n\nmodule.exports = tinf_uncompress;\n", "const isBigEndian = (new Uint8Array(new Uint32Array([0x12345678]).buffer)[0] === 0x12);\n\nconst swap = (b, n, m) => {\n let i = b[n];\n b[n] = b[m];\n b[m] = i;\n};\n\nconst swap32 = array => {\n const len = array.length;\n for (let i = 0; i < len; i += 4) {\n swap(array, i, i + 3);\n swap(array, i + 1, i + 2);\n }\n};\n\nconst swap32LE = array => {\n if (isBigEndian) {\n swap32(array);\n }\n};\n\nmodule.exports = {\n swap32LE: swap32LE\n};\n", "const inflate = require('tiny-inflate');\nconst { swap32LE } = require('./swap');\n\n// Shift size for getting the index-1 table offset.\nconst SHIFT_1 = 6 + 5;\n\n// Shift size for getting the index-2 table offset.\nconst SHIFT_2 = 5;\n\n// Difference between the two shift sizes,\n// for getting an index-1 offset from an index-2 offset. 6=11-5\nconst SHIFT_1_2 = SHIFT_1 - SHIFT_2;\n\n// Number of index-1 entries for the BMP. 32=0x20\n// This part of the index-1 table is omitted from the serialized form.\nconst OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> SHIFT_1;\n\n// Number of entries in an index-2 block. 64=0x40\nconst INDEX_2_BLOCK_LENGTH = 1 << SHIFT_1_2;\n\n// Mask for getting the lower bits for the in-index-2-block offset. */\nconst INDEX_2_MASK = INDEX_2_BLOCK_LENGTH - 1;\n\n// Shift size for shifting left the index array values.\n// Increases possible data size with 16-bit index values at the cost\n// of compactability.\n// This requires data blocks to be aligned by DATA_GRANULARITY.\nconst INDEX_SHIFT = 2;\n\n// Number of entries in a data block. 32=0x20\nconst DATA_BLOCK_LENGTH = 1 << SHIFT_2;\n\n// Mask for getting the lower bits for the in-data-block offset.\nconst DATA_MASK = DATA_BLOCK_LENGTH - 1;\n\n// The part of the index-2 table for U+D800..U+DBFF stores values for\n// lead surrogate code _units_ not code _points_.\n// Values for lead surrogate code _points_ are indexed with this portion of the table.\n// Length=32=0x20=0x400>>SHIFT_2. (There are 1024=0x400 lead surrogates.)\nconst LSCP_INDEX_2_OFFSET = 0x10000 >> SHIFT_2;\nconst LSCP_INDEX_2_LENGTH = 0x400 >> SHIFT_2;\n\n// Count the lengths of both BMP pieces. 2080=0x820\nconst INDEX_2_BMP_LENGTH = LSCP_INDEX_2_OFFSET + LSCP_INDEX_2_LENGTH;\n\n// The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.\n// Length 32=0x20 for lead bytes C0..DF, regardless of SHIFT_2.\nconst UTF8_2B_INDEX_2_OFFSET = INDEX_2_BMP_LENGTH;\nconst UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; // U+0800 is the first code point after 2-byte UTF-8\n\n// The index-1 table, only used for supplementary code points, at offset 2112=0x840.\n// Variable length, for code points up to highStart, where the last single-value range starts.\n// Maximum length 512=0x200=0x100000>>SHIFT_1.\n// (For 0x100000 supplementary code points U+10000..U+10ffff.)\n//\n// The part of the index-2 table for supplementary code points starts\n// after this index-1 table.\n//\n// Both the index-1 table and the following part of the index-2 table\n// are omitted completely if there is only BMP data.\nconst INDEX_1_OFFSET = UTF8_2B_INDEX_2_OFFSET + UTF8_2B_INDEX_2_LENGTH;\n\n// The alignment size of a data block. Also the granularity for compaction.\nconst DATA_GRANULARITY = 1 << INDEX_SHIFT;\n\nclass UnicodeTrie {\n constructor(data) {\n const isBuffer = (typeof data.readUInt32BE === 'function') && (typeof data.slice === 'function');\n\n if (isBuffer || data instanceof Uint8Array) {\n // read binary format\n let uncompressedLength;\n if (isBuffer) {\n this.highStart = data.readUInt32LE(0);\n this.errorValue = data.readUInt32LE(4);\n uncompressedLength = data.readUInt32LE(8);\n data = data.slice(12);\n } else {\n const view = new DataView(data.buffer);\n this.highStart = view.getUint32(0, true);\n this.errorValue = view.getUint32(4, true);\n uncompressedLength = view.getUint32(8, true);\n data = data.subarray(12);\n }\n\n // double inflate the actual trie data\n data = inflate(data, new Uint8Array(uncompressedLength));\n data = inflate(data, new Uint8Array(uncompressedLength));\n\n // swap bytes from little-endian\n swap32LE(data);\n\n this.data = new Uint32Array(data.buffer);\n\n } else {\n // pre-parsed data\n ({ data: this.data, highStart: this.highStart, errorValue: this.errorValue } = data);\n }\n }\n\n get(codePoint) {\n let index;\n if ((codePoint < 0) || (codePoint > 0x10ffff)) {\n return this.errorValue;\n }\n\n if ((codePoint < 0xd800) || ((codePoint > 0xdbff) && (codePoint <= 0xffff))) {\n // Ordinary BMP code point, excluding leading surrogates.\n // BMP uses a single level lookup. BMP index starts at offset 0 in the index.\n // data is stored in the index array itself.\n index = (this.data[codePoint >> SHIFT_2] << INDEX_SHIFT) + (codePoint & DATA_MASK);\n return this.data[index];\n }\n\n if (codePoint <= 0xffff) {\n // Lead Surrogate Code Point. A Separate index section is stored for\n // lead surrogate code units and code points.\n // The main index has the code unit data.\n // For this function, we need the code point data.\n index = (this.data[LSCP_INDEX_2_OFFSET + ((codePoint - 0xd800) >> SHIFT_2)] << INDEX_SHIFT) + (codePoint & DATA_MASK);\n return this.data[index];\n }\n\n if (codePoint < this.highStart) {\n // Supplemental code point, use two-level lookup.\n index = this.data[(INDEX_1_OFFSET - OMITTED_BMP_INDEX_1_LENGTH) + (codePoint >> SHIFT_1)];\n index = this.data[index + ((codePoint >> SHIFT_2) & INDEX_2_MASK)];\n index = (index << INDEX_SHIFT) + (codePoint & DATA_MASK);\n return this.data[index];\n }\n\n return this.data[this.data.length - DATA_GRANULARITY];\n }\n}\n\nmodule.exports = UnicodeTrie;", "var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n;(function (exports) {\n\t'use strict';\n\n var Arr = (typeof Uint8Array !== 'undefined')\n ? Uint8Array\n : Array\n\n\tvar PLUS = '+'.charCodeAt(0)\n\tvar SLASH = '/'.charCodeAt(0)\n\tvar NUMBER = '0'.charCodeAt(0)\n\tvar LOWER = 'a'.charCodeAt(0)\n\tvar UPPER = 'A'.charCodeAt(0)\n\tvar PLUS_URL_SAFE = '-'.charCodeAt(0)\n\tvar SLASH_URL_SAFE = '_'.charCodeAt(0)\n\n\tfunction decode (elt) {\n\t\tvar code = elt.charCodeAt(0)\n\t\tif (code === PLUS ||\n\t\t code === PLUS_URL_SAFE)\n\t\t\treturn 62 // '+'\n\t\tif (code === SLASH ||\n\t\t code === SLASH_URL_SAFE)\n\t\t\treturn 63 // '/'\n\t\tif (code < NUMBER)\n\t\t\treturn -1 //no match\n\t\tif (code < NUMBER + 10)\n\t\t\treturn code - NUMBER + 26 + 26\n\t\tif (code < UPPER + 26)\n\t\t\treturn code - UPPER\n\t\tif (code < LOWER + 26)\n\t\t\treturn code - LOWER + 26\n\t}\n\n\tfunction b64ToByteArray (b64) {\n\t\tvar i, j, l, tmp, placeHolders, arr\n\n\t\tif (b64.length % 4 > 0) {\n\t\t\tthrow new Error('Invalid string. Length must be a multiple of 4')\n\t\t}\n\n\t\t// the number of equal signs (place holders)\n\t\t// if there are two placeholders, than the two characters before it\n\t\t// represent one byte\n\t\t// if there is only one, then the three characters before it represent 2 bytes\n\t\t// this is just a cheap hack to not do indexOf twice\n\t\tvar len = b64.length\n\t\tplaceHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0\n\n\t\t// base64 is 4/3 + up to two characters of the original data\n\t\tarr = new Arr(b64.length * 3 / 4 - placeHolders)\n\n\t\t// if there are placeholders, only get up to the last complete 4 chars\n\t\tl = placeHolders > 0 ? b64.length - 4 : b64.length\n\n\t\tvar L = 0\n\n\t\tfunction push (v) {\n\t\t\tarr[L++] = v\n\t\t}\n\n\t\tfor (i = 0, j = 0; i < l; i += 4, j += 3) {\n\t\t\ttmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3))\n\t\t\tpush((tmp & 0xFF0000) >> 16)\n\t\t\tpush((tmp & 0xFF00) >> 8)\n\t\t\tpush(tmp & 0xFF)\n\t\t}\n\n\t\tif (placeHolders === 2) {\n\t\t\ttmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4)\n\t\t\tpush(tmp & 0xFF)\n\t\t} else if (placeHolders === 1) {\n\t\t\ttmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2)\n\t\t\tpush((tmp >> 8) & 0xFF)\n\t\t\tpush(tmp & 0xFF)\n\t\t}\n\n\t\treturn arr\n\t}\n\n\tfunction uint8ToBase64 (uint8) {\n\t\tvar i,\n\t\t\textraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes\n\t\t\toutput = \"\",\n\t\t\ttemp, length\n\n\t\tfunction encode (num) {\n\t\t\treturn lookup.charAt(num)\n\t\t}\n\n\t\tfunction tripletToBase64 (num) {\n\t\t\treturn encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F)\n\t\t}\n\n\t\t// go through the array every three bytes, we'll deal with trailing stuff later\n\t\tfor (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {\n\t\t\ttemp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n\t\t\toutput += tripletToBase64(temp)\n\t\t}\n\n\t\t// pad the end with zeros, but make sure to not forget the extra bytes\n\t\tswitch (extraBytes) {\n\t\t\tcase 1:\n\t\t\t\ttemp = uint8[uint8.length - 1]\n\t\t\t\toutput += encode(temp >> 2)\n\t\t\t\toutput += encode((temp << 4) & 0x3F)\n\t\t\t\toutput += '=='\n\t\t\t\tbreak\n\t\t\tcase 2:\n\t\t\t\ttemp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1])\n\t\t\t\toutput += encode(temp >> 10)\n\t\t\t\toutput += encode((temp >> 4) & 0x3F)\n\t\t\t\toutput += encode((temp << 2) & 0x3F)\n\t\t\t\toutput += '='\n\t\t\t\tbreak\n\t\t}\n\n\t\treturn output\n\t}\n\n\texports.toByteArray = b64ToByteArray\n\texports.fromByteArray = uint8ToBase64\n}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))\n", "import UnicodeTrie from 'unicode-trie';\nimport fs from 'fs';\nimport base64 from 'base64-js';\nimport { BK, CR, LF, NL, SG, WJ, SP, ZWJ, BA, HY, NS, AI, AL, CJ, HL, RI, SA, XX } from './classes';\nimport { DI_BRK, IN_BRK, CI_BRK, CP_BRK, PR_BRK, pairTable } from './pairs';\n\nconst data = base64.toByteArray(fs.readFileSync(__dirname + '/classes.trie', 'base64'));\nconst classTrie = new UnicodeTrie(data);\n\nconst mapClass = function (c) {\n switch (c) {\n case AI:\n return AL;\n\n case SA:\n case SG:\n case XX:\n return AL;\n\n case CJ:\n return NS;\n\n default:\n return c;\n }\n};\n\nconst mapFirst = function (c) {\n switch (c) {\n case LF:\n case NL:\n return BK;\n\n case SP:\n return WJ;\n\n default:\n return c;\n }\n};\n\nclass Break {\n constructor(position, required = false) {\n this.position = position;\n this.required = required;\n }\n}\n\nclass LineBreaker {\n constructor(string) {\n this.string = string;\n this.pos = 0;\n this.lastPos = 0;\n this.curClass = null;\n this.nextClass = null;\n this.LB8a = false;\n this.LB21a = false;\n this.LB30a = 0;\n }\n\n nextCodePoint() {\n const code = this.string.charCodeAt(this.pos++);\n const next = this.string.charCodeAt(this.pos);\n\n // If a surrogate pair\n if ((0xd800 <= code && code <= 0xdbff) && (0xdc00 <= next && next <= 0xdfff)) {\n this.pos++;\n return ((code - 0xd800) * 0x400) + (next - 0xdc00) + 0x10000;\n }\n\n return code;\n }\n\n nextCharClass() {\n return mapClass(classTrie.get(this.nextCodePoint()));\n }\n\n getSimpleBreak() {\n // handle classes not handled by the pair table\n switch (this.nextClass) {\n case SP:\n return false;\n\n case BK:\n case LF:\n case NL:\n this.curClass = BK;\n return false;\n\n case CR:\n this.curClass = CR;\n return false;\n }\n\n return null;\n }\n\n getPairTableBreak(lastClass) {\n // if not handled already, use the pair table\n let shouldBreak = false;\n switch (pairTable[this.curClass][this.nextClass]) {\n case DI_BRK: // Direct break\n shouldBreak = true;\n break;\n\n case IN_BRK: // possible indirect break\n shouldBreak = lastClass === SP;\n break;\n\n case CI_BRK:\n shouldBreak = lastClass === SP;\n if (!shouldBreak) {\n shouldBreak = false;\n return shouldBreak;\n }\n break;\n\n case CP_BRK: // prohibited for combining marks\n if (lastClass !== SP) {\n return shouldBreak;\n }\n break;\n\n case PR_BRK:\n break;\n }\n\n if (this.LB8a) {\n shouldBreak = false;\n }\n\n // Rule LB21a\n if (this.LB21a && (this.curClass === HY || this.curClass === BA)) {\n shouldBreak = false;\n this.LB21a = false;\n } else {\n this.LB21a = (this.curClass === HL);\n }\n\n // Rule LB30a\n if (this.curClass === RI) {\n this.LB30a++;\n if (this.LB30a == 2 && (this.nextClass === RI)) {\n shouldBreak = true;\n this.LB30a = 0;\n }\n } else {\n this.LB30a = 0;\n }\n\n this.curClass = this.nextClass;\n\n return shouldBreak;\n }\n\n nextBreak() {\n // get the first char if we're at the beginning of the string\n if (this.curClass == null) {\n let firstClass = this.nextCharClass();\n this.curClass = mapFirst(firstClass);\n this.nextClass = firstClass;\n this.LB8a = (firstClass === ZWJ);\n this.LB30a = 0;\n }\n\n while (this.pos < this.string.length) {\n this.lastPos = this.pos;\n const lastClass = this.nextClass;\n this.nextClass = this.nextCharClass();\n\n // explicit newline\n if ((this.curClass === BK) || ((this.curClass === CR) && (this.nextClass !== LF))) {\n this.curClass = mapFirst(mapClass(this.nextClass));\n return new Break(this.lastPos, true);\n }\n\n let shouldBreak = this.getSimpleBreak();\n\n if (shouldBreak === null) {\n shouldBreak = this.getPairTableBreak(lastClass);\n }\n\n // Rule LB8a\n this.LB8a = (this.nextClass === ZWJ);\n\n if (shouldBreak) {\n return new Break(this.lastPos);\n }\n }\n\n if (this.lastPos < this.string.length) {\n this.lastPos = this.string.length;\n return new Break(this.string.length);\n }\n\n return null;\n }\n}\n\nmodule.exports = LineBreaker;\n", "\"use strict\";", "// The following break classes are handled by the pair table\nexport const OP = 0; // Opening punctuation\nexport const CL = 1; // Closing punctuation\nexport const CP = 2; // Closing parenthesis\nexport const QU = 3; // Ambiguous quotation\nexport const GL = 4; // Glue\nexport const NS = 5; // Non-starters\nexport const EX = 6; // Exclamation/Interrogation\nexport const SY = 7; // Symbols allowing break after\nexport const IS = 8; // Infix separator\nexport const PR = 9; // Prefix\nexport const PO = 10; // Postfix\nexport const NU = 11; // Numeric\nexport const AL = 12; // Alphabetic\nexport const HL = 13; // Hebrew Letter\nexport const ID = 14; // Ideographic\nexport const IN = 15; // Inseparable characters\nexport const HY = 16; // Hyphen\nexport const BA = 17; // Break after\nexport const BB = 18; // Break before\nexport const B2 = 19; // Break on either side (but not pair)\nexport const ZW = 20; // Zero-width space\nexport const CM = 21; // Combining marks\nexport const WJ = 22; // Word joiner\nexport const H2 = 23; // Hangul LV\nexport const H3 = 24; // Hangul LVT\nexport const JL = 25; // Hangul L Jamo\nexport const JV = 26; // Hangul V Jamo\nexport const JT = 27; // Hangul T Jamo\nexport const RI = 28; // Regional Indicator\nexport const EB = 29; // Emoji Base\nexport const EM = 30; // Emoji Modifier\nexport const ZWJ = 31; // Zero Width Joiner\nexport const CB = 32; // Contingent break\n\n// The following break classes are not handled by the pair table\nexport const AI = 33; // Ambiguous (Alphabetic or Ideograph)\nexport const BK = 34; // Break (mandatory)\nexport const CJ = 35; // Conditional Japanese Starter\nexport const CR = 36; // Carriage return\nexport const LF = 37; // Line feed\nexport const NL = 38; // Next line\nexport const SA = 39; // South-East Asian\nexport const SG = 40; // Surrogates\nexport const SP = 41; // Space\nexport const XX = 42; // Unknown\n", "export const DI_BRK = 0; // Direct break opportunity\nexport const IN_BRK = 1; // Indirect break opportunity\nexport const CI_BRK = 2; // Indirect break opportunity for combining marks\nexport const CP_BRK = 3; // Prohibited break for combining marks\nexport const PR_BRK = 4; // Prohibited break\n\n// Based on example pair table from https://www.unicode.org/reports/tr14/tr14-37.html#Table2\n// - ZWJ special processing for LB8a of Revision 41\n// - CB manually added as per Rule LB20\n// - CL, CP, NS, SY, IS, PR, PO, HY, BA, B2 and RI manually adjusted as per LB22 of Revision 45\nexport const pairTable = [\n //OP , CL , CP , QU , GL , NS , EX , SY , IS , PR , PO , NU , AL , HL , ID , IN , HY , BA , BB , B2 , ZW , CM , WJ , H2 , H3 , JL , JV , JT , RI , EB , EM , ZWJ , CB\n [PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, CP_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK], // OP\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // CL\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // CP\n [PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK], // QU\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK], // GL\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // NS\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // EX\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // SY\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // IS\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK], // PR\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // PO\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // NU\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // AL\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // HL\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // ID\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // IN\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, DI_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // HY\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, DI_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // BA\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK], // BB\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, PR_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // B2\n [DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK], // ZW\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // CM\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK], // WJ\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // H2\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // H3\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // JL\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // JV\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // JT\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // RI\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, DI_BRK], // EB\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // EM\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // ZWJ\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, DI_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK] // CB\n];", "/**\n * \u30E9\u30C6\u30F3\u6587\u5B57\u3001\u6570\u5B57\u3001\u57FA\u672C\u7684\u306A\u8A18\u53F7\u985E\n */\nexport const latinRegex = /[A-Za-z0-9!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_`{|}~]+/\n\n/**\n * \u65E5\u672C\u8A9E\n */\nexport const japaneseRegex = /[\\p{scx=Hiragana}\\p{scx=Katakana}|\uFF66-\uFF9F\\p{scx=Han}]+/u\n\n/**\n * \u521D\u3081\u62EC\u5F27\u985E\n */\nexport const openingsRegex = /\uFF08|\uFF3B|\uFF5B|\u3014|\u3008|\u300A|\u300C|\u300E|\u3010|\u3018|\u3016|\u201C|\u2018/\n\n/**\n * \u7D42\u308F\u308A\u62EC\u5F27\u985E\u3001\u53E5\u70B9\u985E\u3001\u8AAD\u70B9\u985E\n */\nexport const closingsRegex = /\uFF09|\uFF3D|\uFF5D|\u3015|\u3009|\u300B|\u300D|\u300F|\u3011|\u3019|\u3017|\u201D|\u2019|\u3001|\uFF0C|\u3002|\uFF0E/\n\n/**\n * \u4E2D\u70B9\u985E\n */\nexport const middleDotsRegex = /\u30FB|\uFF1A|\uFF1B/\n\n/**\n * \u5206\u96E2\u7981\u5247\u6587\u5B57\n */\nexport const noBreakRulesRegex = new RegExp(\n `[${'\u2014\u2025\u2026\uFF3F'}${String.fromCharCode(0x2500)}-${String.fromCharCode(0x257f)}]+`\n)\n", "import * as utils from './utils-regex'\n\n/**\n * \u6587\u5B57\u30AF\u30E9\u30B9\u95A2\u9023\u306E\u51E6\u7406\u3092\u63D0\u4F9B\u3059\u308B\u30AF\u30E9\u30B9\u3067\u3059\u3002\n * \u6587\u7AE0\u5185\u306E\u7279\u5B9A\u306E\u6587\u5B57\u3084\u6587\u5B57\u30AF\u30E9\u30B9\u306B\u57FA\u3065\u3044\u3066\u3001\n * \u5206\u96E2\u7981\u5247\u51E6\u7406\u3084\u56DB\u5206\u30A2\u30AD\u306E\u8FFD\u52A0\u306E\u5224\u5B9A\u3092\u884C\u3044\u307E\u3059\u3002\n */\nconst CharClass = {\n /**\n * \u30BB\u30B0\u30E1\u30F3\u30C8\u304C\u5206\u96E2\u7981\u5247\u6587\u5B57\u3067\u69CB\u6210\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B\u3092\u5224\u5B9A\u3057\u307E\u3059\u3002\n * @param segment - \u5224\u5B9A\u3059\u308B\u30C6\u30AD\u30B9\u30C8\u30BB\u30B0\u30E1\u30F3\u30C8\n * @return \u5206\u96E2\u7981\u5247\u6587\u5B57\u3067\u69CB\u6210\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306Ftrue\u3001\u305D\u3046\u3067\u306A\u3044\u5834\u5408\u306Ffalse\n */\n shouldNotBreak: (segment: string): boolean => {\n return utils.noBreakRulesRegex.test(segment)\n },\n\n /**\n * 2\u3064\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\u9593\u306B\u56DB\u5206\u30A2\u30AD\u3092\u8FFD\u52A0\u3059\u3079\u304D\u304B\u3092\u5224\u65AD\u3057\u307E\u3059\u3002\n * @param current - \u73FE\u5728\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\n * @param next - \u6B21\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\n * @return \u56DB\u5206\u30A2\u30AD\u3092\u8FFD\u52A0\u3059\u3079\u304D\u304B\u3069\u3046\u304B\n */\n shouldAddThinSpace: (current: string, next: string): boolean => {\n const settings = {\n openings: {\n regex: utils.openingsRegex,\n hasSpaceBefore: true,\n hasSpaceAfter: false,\n },\n closings: {\n regex: utils.closingsRegex,\n hasSpaceBefore: false,\n hasSpaceAfter: true,\n },\n middleDots: {\n regex: utils.middleDotsRegex,\n hasSpaceBefore: true,\n hasSpaceAfter: true,\n },\n }\n\n for (const { regex, hasSpaceBefore, hasSpaceAfter } of Object.values(settings)) {\n // \u540C\u3058\u6587\u5B57\u30AF\u30E9\u30B9\u306E\u8A18\u53F7\u304C\u9023\u7D9A\u3059\u308B\u5834\u5408\u306F\u30A2\u30AD\u3092\u5165\u308C\u306A\u3044\n if (hasSpaceBefore && regex.test(next) && !regex.test(current)) {\n return true\n }\n\n if (hasSpaceAfter && regex.test(current) && !regex.test(next)) {\n return true\n }\n }\n\n return false\n },\n}\n\n/**\n * \u8A00\u8A9E\u30AF\u30E9\u30B9\u306B\u95A2\u9023\u3059\u308B\u51E6\u7406\u3092\u63D0\u4F9B\u3059\u308B\u30AF\u30E9\u30B9\u3067\u3059\u3002\n * \u6587\u7AE0\u5185\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\u304C\u3069\u306E\u8A00\u8A9E\u30AF\u30E9\u30B9\u306B\u5C5E\u3059\u308B\u304B\u3092\u5224\u5B9A\u3057\u3001\n * \u305D\u308C\u306B\u5FDC\u3058\u305F\u30C6\u30AD\u30B9\u30C8\u51E6\u7406\u3092\u884C\u3046\u305F\u3081\u306E\u30E1\u30BD\u30C3\u30C9\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002\n */\nconst LanguageClass = {\n /**\n * \u30BB\u30B0\u30E1\u30F3\u30C8\u304C\u30E9\u30C6\u30F3\u6587\u5B57\u3067\u69CB\u6210\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B\u3092\u5224\u5B9A\u3057\u307E\u3059\u3002\n * @param segment - \u5224\u5B9A\u3059\u308B\u30C6\u30AD\u30B9\u30C8\u30BB\u30B0\u30E1\u30F3\u30C8\n * @return \u30E9\u30C6\u30F3\u6587\u5B57\u3067\u69CB\u6210\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306Ftrue\u3001\u305D\u3046\u3067\u306A\u3044\u5834\u5408\u306Ffalse\n */\n isLatin: (segment: string): boolean => {\n return utils.latinRegex.test(segment)\n },\n\n /**\n * \u30BB\u30B0\u30E1\u30F3\u30C8\u304C\u65E5\u672C\u8A9E\u6587\u5B57\u3067\u69CB\u6210\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B\u3092\u5224\u5B9A\u3057\u307E\u3059\u3002\n * @param segment - \u5224\u5B9A\u3059\u308B\u30C6\u30AD\u30B9\u30C8\u30BB\u30B0\u30E1\u30F3\u30C8\n * @return \u65E5\u672C\u8A9E\u6587\u5B57\u3067\u69CB\u6210\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306Ftrue\u3001\u305D\u3046\u3067\u306A\u3044\u5834\u5408\u306Ffalse\n */\n isJapanese: (segment: string): boolean => {\n return utils.japaneseRegex.test(segment)\n },\n\n /**\n * 2\u3064\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\u304C\u7570\u306A\u308B\u8A00\u8A9E\u3067\u69CB\u6210\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B\u3092\u5224\u5B9A\u3057\u307E\u3059\u3002\n * @param current - \u73FE\u5728\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\n * @param next - \u6B21\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\n * @return 2\u3064\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\u304C\u7570\u306A\u308B\u8A00\u8A9E\u304C\u3069\u3046\u304B\n */\n isDifferentLanguageClass: (current: string, next: string): boolean => {\n return (\n (LanguageClass.isJapanese(current) && LanguageClass.isLatin(next)) ||\n (LanguageClass.isLatin(current) && LanguageClass.isJapanese(next))\n )\n },\n\n /**\n * 2\u3064\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\u9593\u306B\u56DB\u5206\u30A2\u30AD\u3092\u8FFD\u52A0\u3059\u3079\u304D\u304B\u3092\u5224\u65AD\u3057\u307E\u3059\u3002\n * @param current - \u73FE\u5728\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\n * @param next - \u6B21\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\n * @return \u56DB\u5206\u30A2\u30AD\u3092\u8FFD\u52A0\u3059\u3079\u304D\u304B\u3069\u3046\u304B\n */\n shouldAddThinSpace: (current: string, next: string): boolean => {\n return LanguageClass.isDifferentLanguageClass(current, next)\n },\n}\n\nexport { CharClass, LanguageClass }\n", "/**\n * \u30E6\u30FC\u30B6\u30FC\u30A4\u30F3\u30BF\u30FC\u30D5\u30A7\u30FC\u30B9\u306E\u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3\u3068\u691C\u7D22\u30A8\u30F3\u30B8\u30F3\u306E\u6700\u9069\u5316\u306B\u95A2\u9023\u3059\u308B\u8A2D\u5B9A\u3092\u5B9A\u7FA9\u3057\u307E\u3059\u3002\n * - preventSelectStyle: \u30E6\u30FC\u30B6\u30FC\u304C\u30C6\u30AD\u30B9\u30C8\u3092\u9078\u629E\u3057\u3066\u30B3\u30D4\u30FC\u3059\u308B\u3053\u3068\u3092\u9632\u6B62\u3057\u307E\u3059\u3002\n * - hiddenFromReader: \u30B9\u30AF\u30EA\u30FC\u30F3\u30EA\u30FC\u30C0\u30FC\u306A\u3069\u306E\u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3\u30C4\u30FC\u30EB\u304B\u3089\u3053\u306E\u8981\u7D20\u3092\u96A0\u3057\u307E\u3059\u3002\n * - noIndex: \u691C\u7D22\u30A8\u30F3\u30B8\u30F3\u304C\u3053\u306E\u8981\u7D20\u306E\u5185\u5BB9\u3092\u691C\u7D22\u7D50\u679C\u306E\u30B9\u30CB\u30DA\u30C3\u30C8\u3068\u3057\u3066\u8868\u793A\u3057\u306A\u3044\u3088\u3046\u306B\u3057\u307E\u3059\u3002\n */\nconst uiIgnoreSettings = {\n preventSelectStyle: 'user-select:none;',\n hiddenFromReader: 'aria-hidden=\"true\"',\n noIndex: 'data-nosnippet=\"\"',\n}\n\n/**\n * `<wbr>`\u30BF\u30B0\u306FHTML\u6587\u66F8\u5185\u3067\u5358\u8A9E\u306E\u533A\u5207\u308A\u3092\u793A\u3057\u3001\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u6539\u884C\u306E\u633F\u5165\u3092\u8A31\u53EF\u3059\u308B\u30BF\u30B0\u3067\u3059\u3002\n */\nconst wbr = '<wbr>'\n\n/**\n * THIN SPACE\u3092\u6307\u5B9A\u3057\u305F\u5E45\u3067\u751F\u6210\u3059\u308B\u95A2\u6570\u3067\u3059\u3002\n * @param thisSpaceWidth - THIN SPACE\u306E\u5E45\u3002\n * @param classNamePrefix - \u9069\u7528\u3059\u308BCSS\u30AF\u30E9\u30B9\u540D\u306E\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u306F 'typeset'\u3002\n * @return \u30B9\u30BF\u30A4\u30EB\u9069\u7528\u3055\u308C\u305FTHIN SPACE\u3092\u542B\u3080span\u30BF\u30B0\u3002\n */\nconst thinSpace = (thisSpaceWidth: string, classNamePrefix: string): string => {\n const THIN_SPACE = String.fromCharCode(0x2009) // U+2009 THIN SPACE\n const className = classNamePrefix + '-thin-space'\n const style = `font-size: ${thisSpaceWidth}; ${uiIgnoreSettings.preventSelectStyle}`\n return `<span class=\"${className}\" style=\"${style}\" ${uiIgnoreSettings.hiddenFromReader} ${uiIgnoreSettings.noIndex}>${THIN_SPACE}</span>`\n}\n\n/**\n * \u6307\u5B9A\u3055\u308C\u305F\u6587\u5B57\u306B\u30AB\u30FC\u30CB\u30F3\u30B0\uFF08\u6587\u5B57\u9593\u9694\u8ABF\u6574\uFF09\u3092\u9069\u7528\u3057\u307E\u3059\u3002\n *\n * @param char - \u30AB\u30FC\u30CB\u30F3\u30B0\u3092\u9069\u7528\u3059\u308B\u6587\u5B57\u3002\n * @param kerningValue - \u30AB\u30FC\u30CB\u30F3\u30B0\u5024\uFF08\u5343\u5206\u7387\uFF09\u3002\u4F8B: 1000 \u306F 1em \u306E\u30AB\u30FC\u30CB\u30F3\u30B0\u3092\u610F\u5473\u3057\u307E\u3059\u3002\n * @param classNamePrefix - \u9069\u7528\u3059\u308BCSS\u30AF\u30E9\u30B9\u540D\u306E\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u306F 'typeset'\u3002\n * @return \u30AB\u30FC\u30CB\u30F3\u30B0\u9069\u7528\u5F8C\u306EHTML\u30B3\u30F3\u30C6\u30F3\u30C4\u3002\n */\nconst applyKerning = (char: string, kerningValue: number, classNamePrefix: string): string => {\n const emValue = kerningValue / 1000 / 2 + 'em'\n const className = classNamePrefix + '-kerning'\n const style = `margin: ${emValue}; ${uiIgnoreSettings.preventSelectStyle}`\n return `${char}<span class=\"${className}\" style=\"${style}\" ${uiIgnoreSettings.hiddenFromReader} ${uiIgnoreSettings.noIndex}></span>`\n}\n\n/**\n * \u4E0E\u3048\u3089\u308C\u305F\u30C6\u30AD\u30B9\u30C8\u306Bword-break\u3068overflow-wrap\u30B9\u30BF\u30A4\u30EB\u3092\u9069\u7528\u3057\u307E\u3059\u3002\n * @param text - \u30B9\u30BF\u30A4\u30EB\u3092\u9069\u7528\u3059\u308B\u30C6\u30AD\u30B9\u30C8\u3002\n * @param classNamePrefix - \u9069\u7528\u3059\u308BCSS\u30AF\u30E9\u30B9\u540D\u306E\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u306F 'typeset'\u3002\n * @param useWordBreak - \u5358\u8A9E\u3084\u52A9\u8A5E\u306A\u3069\u3001\u8A9E\u5358\u4F4D\u3067\u306E\u6539\u884C\u3092\u884C\u3046\u304B\u3069\u3046\u304B\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u306F true\u3002\n * @return \u30B9\u30BF\u30A4\u30EB\u9069\u7528\u3055\u308C\u305F\u30C6\u30AD\u30B9\u30C8\u3092\u542B\u3080span\u30BF\u30B0\u3002\n */\nconst applyWrapperStyle = (text: string, classNamePrefix: string, useWordBreak: boolean): string => {\n // <wbr> \u4EE5\u5916\u306E\u7B87\u6240\u3067\u6539\u884C\u3057\u306A\u3044\u305F\u3081\u306E\u30B9\u30BF\u30A4\u30EA\u30F3\u30B0\n const style = useWordBreak ? 'word-break: keep-all; overflow-wrap: anywhere;' : ''\n return `<span class=\"${classNamePrefix}\" style=\"${style}\">${text}</span>`\n}\n\n/**\n * \u4E0E\u3048\u3089\u308C\u305F\u30BB\u30B0\u30E1\u30F3\u30C8\u306B\u30AF\u30E9\u30B9\u540D\u3092\u9069\u7528\u3057\u307E\u3059\u3002\n * @param segment - \u30AF\u30E9\u30B9\u3092\u9069\u7528\u3059\u308B\u30BB\u30B0\u30E1\u30F3\u30C8\u3002\n * @param classNamePrefix - \u9069\u7528\u3059\u308BCSS\u30AF\u30E9\u30B9\u540D\u306E\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u306F 'typeset'\u3002\n * @return \u30AF\u30E9\u30B9\u9069\u7528\u3055\u308C\u305F\u30BB\u30B0\u30E1\u30F3\u30C8\u3092\u542B\u3080span\u30BF\u30B0\u3002\n */\nconst applyLatinStyle = (segment: string, classNamePrefix: string): string => {\n const className = classNamePrefix + '-latin'\n return `<span class=\"${className}\">${segment}</span>`\n}\n\n/**\n * \u4E0E\u3048\u3089\u308C\u305F\u30BB\u30B0\u30E1\u30F3\u30C8\u306Bno-break\u30B9\u30BF\u30A4\u30EB\u3092\u9069\u7528\u3057\u307E\u3059\u3002\n * @param segment - \u30B9\u30BF\u30A4\u30EB\u3092\u9069\u7528\u3059\u308B\u30BB\u30B0\u30E1\u30F3\u30C8\u3002\n * @param classNamePrefix - \u9069\u7528\u3059\u308BCSS\u30AF\u30E9\u30B9\u540D\u306E\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u306F 'typeset'\u3002\n * @return \u30B9\u30BF\u30A4\u30EB\u9069\u7528\u3055\u308C\u305F\u30BB\u30B0\u30E1\u30F3\u30C8\u3092\u542B\u3080span\u30BF\u30B0\u3002\n */\nconst applyNoBreakStyle = (segment: string, classNamePrefix: string): string => {\n const className = classNamePrefix + '-no-breaks'\n return `<span class=\"${className}\" style=\"letter-spacing: 0\">${segment}</span>`\n}\n\nexport { wbr, thinSpace, applyKerning, applyWrapperStyle, applyLatinStyle, applyNoBreakStyle }\n", "import LineBreaker from 'linebreak'\nimport { CharClass, LanguageClass } from './utils-text-classes'\nimport { wbr, thinSpace } from './utils-tags'\nimport { TypesettingOptions } from './types'\n\n/**\n * HTML\u30C6\u30AD\u30B9\u30C8\u30CE\u30FC\u30C9\u306B\u30BB\u30D1\u30EC\u30FC\u30BF\u30FC\uFF08\u56DB\u5206\u30A2\u30AD\u3001<wbr>\uFF09\u3092\u633F\u5165\u3057\u307E\u3059\u3002\n * @param currentText - \u73FE\u5728\u306E\u30C6\u30AD\u30B9\u30C8\u30CE\u30FC\u30C9\n * @param nextText - \u6B21\u306E\u30C6\u30AD\u30B9\u30C8\u30CE\u30FC\u30C9\n * @return \u30BB\u30D1\u30EC\u30FC\u30BF\u30FC\u3092\u633F\u5165\u3057\u305FHTML\u6587\u5B57\u5217\n */\nconst insertSeparatorsToText = (currentText: string, nextText: string, options: TypesettingOptions): string => {\n const currentSegments = generateSegments(currentText)\n const nextSegments = generateSegments(nextText)\n\n const formattedText = currentSegments.reduce((accumulatedText, segment, index, array) => {\n const current = segment\n const next = array[index + 1] || nextSegments[0]\n return accumulatedText + addSeparatorsToSegment(current, next, options)\n }, '')\n\n return formattedText\n}\n\n/**\n * \u6587\u7AE0\u304B\u3089\u6587\u7BC0\u533A\u5207\u308A\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\u306E\u914D\u5217\u3092\u751F\u6210\u3057\u307E\u3059\u3002\n * @param src - \u30BD\u30FC\u30B9\u30C6\u30AD\u30B9\u30C8\n * @return \u6587\u7AE0\u304B\u3089\u751F\u6210\u3055\u308C\u305F\u30BB\u30B0\u30E1\u30F3\u30C8\u306E\u914D\u5217\n */\nconst generateSegments = (src: string): string[] => {\n const segmenter = new Intl.Segmenter('ja-JP', { granularity: 'word' })\n return Array.from(segmenter.segment(src), ({ segment }) => segment)\n}\n\n/**\n * 2\u3064\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\u9593\u306B\u30BB\u30D1\u30EC\u30FC\u30BF\u30FC\uFF08\u56DB\u5206\u30A2\u30AD\u3001<wbr>\uFF09\u3092\u8FFD\u52A0\u3057\u307E\u3059\u3002\n * @param current - \u73FE\u5728\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\n * @param next - \u6B21\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\n * @return \u30BB\u30D1\u30EC\u30FC\u30BF\u30FC\u3092\u8FFD\u52A0\u3057\u305F\u30BB\u30B0\u30E1\u30F3\u30C8\n */\nconst addSeparatorsToSegment = (current: string, next = '', options: TypesettingOptions): string => {\n if (!next) return current\n\n const addWbr = options.useWordBreak && shouldAddWbr(current, next)\n const addSpace = options.addThinSpaces && shouldAddThinSpace(current, next)\n return current + (addSpace ? thinSpace(options.thinSpaceWidth, options.classNamePrefix) : '') + (addWbr ? wbr : '')\n}\n\n/**\n * 2\u3064\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\u9593\u306B<wbr>\u3092\u8FFD\u52A0\u3059\u3079\u304D\u304B\u3092\u5224\u65AD\u3057\u307E\u3059\u3002\n * @param current - \u73FE\u5728\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\n * @param next - \u6B21\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\n * @return <wbr>\u3092\u8FFD\u52A0\u3059\u3079\u304D\u304B\u3069\u3046\u304B\n */\nconst shouldAddWbr = (current: string, next: string): boolean | null => {\n const combinedText = current.slice(-1) + next.slice(0, 1)\n const lb = new LineBreaker(combinedText)\n const breakOpportunity = lb.nextBreak()\n return breakOpportunity && breakOpportunity.position === 1\n}\n\n/**\n * 2\u3064\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\u9593\u306B\u56DB\u5206\u30A2\u30AD\u3092\u8FFD\u52A0\u3059\u3079\u304D\u304B\u3092\u5224\u65AD\u3057\u307E\u3059\u3002\n * @param current - \u73FE\u5728\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\n * @param next - \u6B21\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\n * @return \u56DB\u5206\u30A2\u30AD\u3092\u8FFD\u52A0\u3059\u3079\u304D\u304B\u3069\u3046\u304B\n */\nconst shouldAddThinSpace = (current: string, next: string): boolean => {\n return LanguageClass.shouldAddThinSpace(current, next) || CharClass.shouldAddThinSpace(current, next)\n}\n\nexport default insertSeparatorsToText\nexport { generateSegments, addSeparatorsToSegment, shouldAddWbr, shouldAddThinSpace }\n", "import { CharClass, LanguageClass } from './utils-text-classes'\nimport { applyWrapperStyle, applyLatinStyle, applyNoBreakStyle, applyKerning } from './utils-tags'\nimport { TypesettingOptions } from './types'\n\n/**\n * \u4E0E\u3048\u3089\u308C\u305F\u30C6\u30AD\u30B9\u30C8\u306B\u5BFE\u3057\u3066\u3001word-break\u3068overflow-wrap\u30B9\u30BF\u30A4\u30EB\u3092\u6301\u3064span\u30BF\u30B0\u3067\u30E9\u30C3\u30D7\u3057\u307E\u3059\u3002\n *\n * @param text - \u30B9\u30BF\u30A4\u30EA\u30F3\u30B0\u3055\u308C\u308B\u30C6\u30AD\u30B9\u30C8\u3002\n * @return \u30B9\u30BF\u30A4\u30EA\u30F3\u30B0\u3055\u308C\u305F\u30C6\u30AD\u30B9\u30C8\u3002\u30C6\u30AD\u30B9\u30C8\u304C\u7A7A\u306E\u5834\u5408\u306F\u3001\u305D\u306E\u307E\u307E\u8FD4\u3055\u308C\u307E\u3059\u3002\n */\nconst applyStyleToText = (currentNodeValue: string, nextNodeValue: string, options: TypesettingOptions): string => {\n // \u3053\u3053\u3067\u306F nextNodeValue \u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u305B\u3093\u304C\u3001\u95A2\u6570\u306E\u30B7\u30B0\u30CD\u30C1\u30E3\u306FTransformFunction\u306B\u5408\u308F\u305B\u3066\u3044\u307E\u3059\u3002\n if (currentNodeValue === ' ') {\n return currentNodeValue\n }\n\n return applyWrapperStyle(currentNodeValue, options.classNamePrefix, options.useWordBreak)\n}\n\n/**\n * \u4E0E\u3048\u3089\u308C\u305F\u30C6\u30AD\u30B9\u30C8\u30BB\u30B0\u30E1\u30F3\u30C8\u306B\u30B9\u30BF\u30A4\u30EA\u30F3\u30B0\u3092\u9069\u7528\u3057\u307E\u3059\u3002\u3053\u308C\u306B\u306F\u3001\u30BB\u30B0\u30E1\u30F3\u30C8\u306E\u5185\u5BB9\u306B\u57FA\u3065\u3044\u3066\u3001\n * \u7279\u5B9A\u306E\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30B9\u30BF\u30A4\u30EB\u3067HTML\u306Espan\u30BF\u30B0\u3067\u30BB\u30B0\u30E1\u30F3\u30C8\u3092\u30E9\u30C3\u30D7\u3059\u308B\u3053\u3068\u304C\u542B\u307E\u308C\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002\n *\n * @param segment - \u30B9\u30BF\u30A4\u30EA\u30F3\u30B0\u3055\u308C\u308B\u30C6\u30AD\u30B9\u30C8\u30BB\u30B0\u30E1\u30F3\u30C8\u3002\n * @return \u30B9\u30BF\u30A4\u30EA\u30F3\u30B0\u3055\u308C\u305F\u30C6\u30AD\u30B9\u30C8\u30BB\u30B0\u30E1\u30F3\u30C8\u3002\u30BB\u30B0\u30E1\u30F3\u30C8\u304C\u30B9\u30DA\u30FC\u30B9\u3067\u3042\u308B\u304B\u3001\u7279\u5225\u306A\u30B9\u30BF\u30A4\u30EA\u30F3\u30B0\u304C\u4E0D\u8981\u3067\u3042\u308C\u3070\u3001\n * \u305D\u306E\u307E\u307E\u8FD4\u3055\u308C\u307E\u3059\u3002\u305D\u308C\u4EE5\u5916\u306E\u5834\u5408\u306F\u3001\u9069\u5207\u306A\u30B9\u30BF\u30A4\u30EA\u30F3\u30B0\u3067span\u30BF\u30B0\u3067\u30E9\u30C3\u30D7\u3055\u308C\u307E\u3059\u3002\n */\nconst applyStyleToSegment = (currentSegment: string, nextSegment: string, options: TypesettingOptions): string => {\n // \u30BB\u30B0\u30E1\u30F3\u30C8\u304C\u30B9\u30DA\u30FC\u30B9\u3067\u3042\u308C\u3070\u305D\u306E\u307E\u307E\u8FD4\u3059\n if (currentSegment === ' ') {\n return currentSegment\n }\n\n const kernedSegment = applyKerningToSegment(currentSegment, nextSegment, options)\n\n // \u30E9\u30C6\u30F3\u6587\u5B57\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\u306B\u306F 'latin' \u30AF\u30E9\u30B9\u3092\u9069\u7528\n if (options.wrapLatin && LanguageClass.isLatin(currentSegment)) {\n return applyLatinStyle(kernedSegment, options.classNamePrefix)\n }\n\n // \u6539\u884C\u3092\u3057\u306A\u3044\u30BB\u30B0\u30E1\u30F3\u30C8\u306B\u306F\u30BC\u30ED\u306E\u6587\u5B57\u9593\u9694\u30B9\u30BF\u30A4\u30EB\u3092\u9069\u7528\n if (options.noSpaceBetweenNoBreaks && CharClass.shouldNotBreak(currentSegment)) {\n return applyNoBreakStyle(kernedSegment, options.classNamePrefix)\n }\n\n return kernedSegment\n}\n\n/**\n * \u30AB\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30EB\u306B\u57FA\u3065\u304D\u3001\u30C6\u30AD\u30B9\u30C8\u30BB\u30B0\u30E1\u30F3\u30C8\u306B\u30AB\u30FC\u30CB\u30F3\u30B0\u3092\u9069\u7528\u3057\u307E\u3059\u3002\n *\n * @param currentSegment - \u30AB\u30FC\u30CB\u30F3\u30B0\u3092\u9069\u7528\u3059\u308B\u73FE\u5728\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\u3002\n * @param nextSegment - \u6B21\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\uFF08\u30AB\u30FC\u30CB\u30F3\u30B0\u9069\u7528\u306E\u5224\u65AD\u306B\u4F7F\u7528\uFF09\u3002\n * @param kerningRules - \u9069\u7528\u3059\u308B\u30AB\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30EB\u306E\u914D\u5217\u3002\n * @return \u30AB\u30FC\u30CB\u30F3\u30B0\u9069\u7528\u5F8C\u306E\u30C6\u30AD\u30B9\u30C8\u30BB\u30B0\u30E1\u30F3\u30C8\u3002\n */\nconst applyKerningToSegment = (currentSegment: string, nextSegment: string, options: TypesettingOptions): string => {\n const chars = [...currentSegment]\n\n const kernedChars = chars.map((currentChar, i) => {\n const nextChar = chars[i + 1] || nextSegment[0] || ''\n const kerningRule = options.kerningRules.find(\n rule => rule.between[0] === currentChar && rule.between[1] === nextChar\n )\n\n if (kerningRule) {\n const kerningValue = typeof kerningRule.value === 'number' ? kerningRule.value : parseInt(kerningRule.value, 10)\n return applyKerning(currentChar, kerningValue, options.classNamePrefix)\n }\n\n return currentChar\n })\n\n return kernedChars.join('')\n}\n\nexport { applyStyleToText, applyStyleToSegment }\n", "import HTMLProcessor from './html-processor'\nimport insertSeparatorsToText from './insert-separators'\nimport { applyStyleToText, applyStyleToSegment } from './apply-style'\nimport win from './win'\nimport type { TypesettingOptions, KerningRule } from './types'\n\n/**\n * HTML\u30C6\u30AD\u30B9\u30C8\u3092\u51E6\u7406\u3057\u3001\u30AB\u30B9\u30BF\u30E0\u30B9\u30BF\u30A4\u30EB\u3068\u533A\u5207\u308A\u6587\u5B57\u3092\u9069\u7528\u3059\u308B\u305F\u3081\u306E\u30AF\u30E9\u30B9\u3002\n * HTMLProcessor \u30AF\u30E9\u30B9\u3092\u62E1\u5F35\u3057\u3001\u7279\u5B9A\u306E\u5909\u63DB\u95A2\u6570\u3092\u9069\u7528\u3057\u307E\u3059\u3002\n */\nclass Typesetter extends HTMLProcessor {\n /**\n * Typesetter \u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u8A2D\u5B9A\u3067\u3059\u3002\n */\n static defaultOptions: TypesettingOptions = {\n classNamePrefix: 'typeset',\n useWordBreak: true,\n wrapLatin: true,\n noSpaceBetweenNoBreaks: true,\n addThinSpaces: true,\n thinSpaceWidth: '50%',\n kerningRules: [],\n }\n\n /**\n * Intl.Segmenter API \u304C\u73FE\u5728\u306E\u5B9F\u884C\u74B0\u5883\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B\u3092\u793A\u3057\u307E\u3059\u3002\n */\n private isIntlSegmenterSupported: boolean\n\n constructor(options: Partial<TypesettingOptions> = {}) {\n const transformFunctions = [applyStyleToText, insertSeparatorsToText, applyStyleToSegment]\n const validatedOptions = Typesetter.validateOptions(options)\n\n super(transformFunctions, validatedOptions)\n\n /**\n * \u73FE\u5728\u306E\u5B9F\u884C\u74B0\u5883\u3067 Intl.Segmenter \u304C\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002\n * Intl.Segmenter \u306F\u3001\u30C6\u30AD\u30B9\u30C8\u3092\u8A00\u8A9E\u56FA\u6709\u306E\u30BB\u30B0\u30E1\u30F3\u30C8\u306B\u5206\u5272\u3059\u308B\u6A5F\u80FD\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002\n * \u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u306F\u8B66\u544A\u3092\u30B3\u30F3\u30BD\u30FC\u30EB\u306B\u8868\u793A\u3057\u307E\u3059\u3002\n */\n this.isIntlSegmenterSupported = typeof Intl.Segmenter !== 'undefined'\n if (!this.isIntlSegmenterSupported) {\n console.warn(`\n Intl.Segmenter is not supported in this environment. \n The original HTML string will be returned. \n For more information, see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter\n `)\n }\n }\n\n /**\n * \u4E0E\u3048\u3089\u308C\u305F\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u691C\u8A3C\u3057\u3001\u4FEE\u6B63\u3055\u308C\u305F\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8FD4\u3057\u307E\u3059\u3002\n *\n * @param options - \u691C\u8A3C\u3059\u308B\u30AA\u30D7\u30B7\u30E7\u30F3\u3002\n * @return \u4FEE\u6B63\u3055\u308C\u305F\u30AA\u30D7\u30B7\u30E7\u30F3\u3002\n */\n private static validateOptions(options: Partial<TypesettingOptions>): TypesettingOptions {\n if (options.kerningRules) {\n options.kerningRules = options.kerningRules.filter(Typesetter.isValidKerningRule)\n }\n\n // \u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u3068\u30DE\u30FC\u30B8\n return {\n ...Typesetter.defaultOptions,\n ...options,\n }\n }\n\n /**\n * \u30AB\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30EB\u304C\u9069\u5207\u304B\u3069\u3046\u304B\u3092\u691C\u8A3C\u3057\u307E\u3059\u3002\n *\n * @param kerningRule - \u691C\u8A3C\u3059\u308B\u30AB\u30FC\u30CB\u30F3\u30B0\u30EB\u30FC\u30EB\u3002\n * @return \u30EB\u30FC\u30EB\u304C\u6709\u52B9\u306A\u5834\u5408\u306Ftrue\u3001\u305D\u3046\u3067\u306A\u3044\u5834\u5408\u306Ffalse\u3002\n */\n private static isValidKerningRule(kerningRule: KerningRule): boolean {\n if (kerningRule.between[0].length !== 1 || kerningRule.between[1].length !== 1) {\n console.warn(\n `Kerning rule between '${kerningRule.between[0]}' and '${kerningRule.between[1]}' must be single characters.`\n )\n return false\n }\n\n return true\n }\n\n /**\n * \u4E0E\u3048\u3089\u308C\u305FHTML\u6587\u5B57\u5217\u3092\u51E6\u7406\u3057\u3001\u6307\u5B9A\u3055\u308C\u305F\u30B9\u30BF\u30A4\u30EB\u3068\u533A\u5207\u308A\u6587\u5B57\u3092\u9069\u7528\u3057\u305F\u7D50\u679C\u3092\u8FD4\u3057\u307E\u3059\u3002\n *\n * @param srcHtml - \u51E6\u7406\u3059\u308BHTML\u6587\u5B57\u5217\u3002\n * @return \u51E6\u7406\u5F8C\u306EHTML\u6587\u5B57\u5217\u3002\n */\n render(srcHtml: string): string {\n if (!this.isIntlSegmenterSupported || !srcHtml) {\n return srcHtml\n }\n\n return this.processHtmlWithFunctions(srcHtml)\n }\n\n /**\n * \u4E0E\u3048\u3089\u308C\u305FElement\u307E\u305F\u306FElement\u306E\u914D\u5217\u306B\u5BFE\u3057\u3066\u3001\u30B9\u30BF\u30A4\u30EB\u3068\u533A\u5207\u308A\u6587\u5B57\u3092\u9069\u7528\u3057\u307E\u3059\u3002\n * \u5404\u8981\u7D20\u306EinnerHTML\u3092\u53D6\u5F97\u3057\u3001\u5909\u63DB\u51E6\u7406\u3092\u9069\u7528\u3057\u305F\u5F8C\u3001\u5909\u63DB\u3055\u308C\u305FHTML\u3067\u5143\u306E\u5185\u5BB9\u3092\u7F6E\u304D\u63DB\u3048\u307E\u3059\u3002\n *\n * @param elements - \u30B9\u30BF\u30A4\u30EB\u3092\u9069\u7528\u3059\u308BElement\u307E\u305F\u306FHTMLElement\u306E\u914D\u5217\u3002\n */\n renderToElements(elements: Element | Element[] | null): void {\n if (!this.isIntlSegmenterSupported || !elements) {\n return\n }\n\n if (!Array.isArray(elements)) {\n elements = [elements]\n }\n\n elements.forEach(element => {\n const processedHtml = this.render(element.innerHTML)\n element.innerHTML = processedHtml\n })\n }\n\n /**\n * \u6307\u5B9A\u3055\u308C\u305FCSS\u30BB\u30EC\u30AF\u30BF\u306B\u4E00\u81F4\u3059\u308B\u3059\u3079\u3066\u306E\u8981\u7D20\u306B\u30B9\u30BF\u30A4\u30EB\u3092\u9069\u7528\u3057\u307E\u3059\u3002\n * document.querySelectorAll\u3092\u4F7F\u7528\u3057\u3066\u8981\u7D20\u3092\u53D6\u5F97\u3057\u3001\u305D\u308C\u305E\u308C\u306B\u5BFE\u3057\u3066\u30B9\u30BF\u30A4\u30EB\u9069\u7528\u51E6\u7406\u3092\u884C\u3044\u307E\u3059\u3002\n *\n * @param selector - \u30B9\u30BF\u30A4\u30EB\u3092\u9069\u7528\u3059\u308B\u8981\u7D20\u3092\u9078\u629E\u3059\u308BCSS\u30BB\u30EC\u30AF\u30BF\u3002\n */\n renderToSelector(selector: string | null): void {\n if (!this.isIntlSegmenterSupported || !selector) {\n return\n }\n\n const elements = win.document.querySelectorAll(selector)\n this.renderToElements(Array.from(elements))\n }\n}\n\nmodule.exports = Typesetter\n"],
5
- "mappings": "0KAKA,IAAMA,GAAM,OAEZC,EAAA,QAAeD,uMCPf,IAAAE,EAAAC,GAAA,GAAA,EAQMC,EAAN,KAAmB,CAIjB,YAAYC,EAAyCC,EAA2B,CAwExE,KAAA,YAAc,CAACC,EAAYC,IAAiC,CAClE,IAAMC,EAAQP,EAAA,QAAI,SAAS,YAAW,EACtCO,EAAM,WAAWF,CAAI,EACrB,IAAMG,EAAWD,EAAM,yBAAyBD,CAAe,EAE3DD,EAAK,aACPA,EAAK,WAAW,aAAaG,EAAUH,CAAI,EAC3CA,EAAK,WAAW,YAAYA,CAAI,EAEpC,EAhFE,KAAK,mBAAqBF,EAC1B,KAAK,QAAUC,CACjB,CAUA,yBAAyBK,EAAe,CACtC,OAAIA,IAAY,GACPA,EAGF,KAAK,mBAAmB,OAC7B,CAACC,EAAaC,IAAsB,KAAK,YAAYD,EAAaC,CAAiB,EACnFF,CAAO,CAEX,CAUQ,YAAYG,EAAcD,EAAoC,CACpE,GAAIC,IAAS,GACX,OAAOA,EAGT,IAAMC,EAAMC,GAAgBF,CAAI,EAC1BG,EAAYC,GAAaH,EAAI,IAAI,EAEvC,OAAAE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Q,OAAO,gBAAgBF,EAAoC,CACjE,OAAIA,EAAQ,eACVA,EAAQ,aAAeA,EAAQ,aAAa,OAAOD,EAAW,kBAAkB,GAIlF,OAAA,OAAA,OAAA,OAAA,CAAA,EACKA,EAAW,cAAc,EACzBC,CAAO,CAEd,CAQQ,OAAO,mBAAmBG,EAAwB,CACxD,OAAIA,EAAY,QAAQ,CAAC,EAAE,SAAW,GAAKA,EAAY,QAAQ,CAAC,EAAE,SAAW,GAC3E,QAAQ,KACN,yBAAyBA,EAAY,QAAQ,CAAC,CAAC,UAAUA,EAAY,QAAQ,CAAC,CAAC,8BAA8B,EAExG,IAGF,EACT,CAQA,OAAOC,EAAe,CACpB,MAAI,CAAC,KAAK,0BAA4B,CAACA,EAC9BA,EAGF,KAAK,yBAAyBA,CAAO,CAC9C,CAQA,iBAAiBC,EAAoC,CAC/C,CAAC,KAAK,0BAA4B,CAACA,IAIlC,MAAM,QAAQA,CAAQ,IACzBA,EAAW,CAACA,CAAQ,GAGtBA,EAAS,QAAQC,GAAU,CACzB,IAAMC,EAAgB,KAAK,OAAOD,EAAQ,SAAS,EACnDA,EAAQ,UAAYC,CACtB,CAAC,EACH,CAQA,iBAAiBC,EAAuB,CACtC,GAAI,CAAC,KAAK,0BAA4B,CAACA,EACrC,OAGF,IAAMH,EAAWR,GAAA,QAAI,SAAS,iBAAiBW,CAAQ,EACvD,KAAK,iBAAiB,MAAM,KAAKH,CAAQ,CAAC,CAC5C,GAvHOP,EAAA,eAAqC,CAC1C,gBAAiB,UACjB,aAAc,GACd,UAAW,GACX,uBAAwB,GACxB,cAAe,GACf,eAAgB,MAChB,aAAc,CAAA,GAmHlBW,GAAO,QAAUX",
6
- "names": ["win", "exports", "win_1", "__importDefault", "HTMLProcessor", "transformFunctions", "options", "node", "transformedHtml", "range", "fragment", "srcHtml", "currentHtml", "transformFunction", "html", "doc", "parseFromString", "textNodes", "getTextNodes", "currentNode", "index", "nextNode", "exports", "element", "walk", "textNode", "require_tiny_inflate", "__commonJSMin", "exports", "module", "TINF_OK", "TINF_DATA_ERROR", "Tree", "Data", "source", "dest", "sltree", "sdtree", "length_bits", "length_base", "dist_bits", "dist_base", "clcidx", "code_tree", "lengths", "tinf_build_bits_base", "bits", "base", "delta", "first", "i", "sum", "tinf_build_fixed_trees", "lt", "dt", "offs", "tinf_build_tree", "t", "off", "num", "tinf_getbit", "d", "bit", "tinf_read_bits", "val", "tinf_decode_symbol", "cur", "len", "tag", "tinf_decode_trees", "hlit", "hdist", "hclen", "length", "clen", "sym", "prev", "tinf_inflate_block_data", "dist", "tinf_inflate_uncompressed_block", "invlength", "tinf_uncompress", "bfinal", "btype", "res", "require_swap", "__commonJSMin", "exports", "module", "isBigEndian", "swap", "b", "n", "m", "swap32", "array", "len", "i", "swap32LE", "require_unicode_trie", "__commonJSMin", "exports", "module", "inflate", "swap32LE", "SHIFT_1", "SHIFT_2", "SHIFT_1_2", "OMITTED_BMP_INDEX_1_LENGTH", "INDEX_2_BLOCK_LENGTH", "INDEX_2_MASK", "INDEX_SHIFT", "DATA_BLOCK_LENGTH", "DATA_MASK", "LSCP_INDEX_2_OFFSET", "LSCP_INDEX_2_LENGTH", "INDEX_2_BMP_LENGTH", "UTF8_2B_INDEX_2_OFFSET", "UTF8_2B_INDEX_2_LENGTH", "INDEX_1_OFFSET", "DATA_GRANULARITY", "UnicodeTrie", "data", "isBuffer", "uncompressedLength", "view", "codePoint", "index", "require_b64", "__commonJSMin", "exports", "lookup", "Arr", "PLUS", "SLASH", "NUMBER", "LOWER", "UPPER", "PLUS_URL_SAFE", "SLASH_URL_SAFE", "decode", "elt", "code", "b64ToByteArray", "b64", "i", "j", "l", "tmp", "placeHolders", "arr", "len", "L", "push", "v", "uint8ToBase64", "uint8", "extraBytes", "output", "temp", "length", "encode", "num", "tripletToBase64", "$60ff486a304db230$export$fb4028874a74450", "$60ff486a304db230$export$1bb1140fe1358b00", "$60ff486a304db230$export$f3e416a182673355", "$60ff486a304db230$export$24aa617c849a894a", "$60ff486a304db230$export$a73c4d14459b698d", "$60ff486a304db230$export$9e5d732f3676a9ba", "$60ff486a304db230$export$1dff41d5c0caca01", "$60ff486a304db230$export$30a74a373318dec6", "$60ff486a304db230$export$d710c5f50fc7496a", "$60ff486a304db230$export$66498d28055820a9", "$60ff486a304db230$export$eb6c6d0b7c8826f2", "$60ff486a304db230$export$de92be486109a1df", "$60ff486a304db230$export$606cfc2a8896c91f", "$60ff486a304db230$export$e51d3c675bb0140d", "$60ff486a304db230$export$da51c6332ad11d7b", "$60ff486a304db230$export$bea437c40441867d", "$60ff486a304db230$export$c4c7eecbfed13dc9", "$60ff486a304db230$export$98e1f8a379849661", "$1b6fba3281342923$export$98f50d781a474745", "$1b6fba3281342923$export$12ee1f8f5315ca7e", "$1b6fba3281342923$export$e4965ce242860454", "$1b6fba3281342923$export$8f14048969dcd45e", "$1b6fba3281342923$export$133eb141bf58aff4", "$1b6fba3281342923$export$5bdb8ccbf5c57afc", "$f898ea50f3b38ab8$var$data", "$parcel$interopDefault", "$kQ2hT$base64js", "$f898ea50f3b38ab8$var$classTrie", "$kQ2hT$unicodetrie", "$f898ea50f3b38ab8$var$mapClass", "c", "$f898ea50f3b38ab8$var$mapFirst", "$f898ea50f3b38ab8$var$Break", "position", "required", "$f898ea50f3b38ab8$var$LineBreaker", "code", "next", "lastClass", "shouldBreak", "firstClass", "string", "module", "exports", "utils", "__importStar", "CharClass", "segment", "current", "next", "settings", "regex", "hasSpaceBefore", "hasSpaceAfter", "exports", "LanguageClass", "uiIgnoreSettings", "wbr", "exports", "thinSpace", "thisSpaceWidth", "classNamePrefix", "THIN_SPACE", "className", "style", "applyKerning", "char", "kerningValue", "emValue", "applyWrapperStyle", "text", "useWordBreak", "applyLatinStyle", "segment", "applyNoBreakStyle", "linebreak_1", "__importDefault", "utils_text_classes_1", "utils_tags_1", "insertSeparatorsToText", "currentText", "nextText", "options", "currentSegments", "generateSegments", "nextSegments", "accumulatedText", "segment", "index", "array", "current", "next", "addSeparatorsToSegment", "src", "segmenter", "exports", "addWbr", "shouldAddWbr", "addSpace", "shouldAddThinSpace", "combinedText", "breakOpportunity", "utils_text_classes_1", "utils_tags_1", "applyStyleToText", "currentNodeValue", "nextNodeValue", "options", "exports", "applyStyleToSegment", "currentSegment", "nextSegment", "kernedSegment", "applyKerningToSegment", "chars", "currentChar", "i", "nextChar", "kerningRule", "rule", "kerningValue", "html_processor_1", "__importDefault", "insert_separators_1", "apply_style_1", "win_1", "Typesetter", "_Typesetter", "options", "transformFunctions", "validatedOptions", "kerningRule", "srcHtml", "elements", "element", "processedHtml", "selector", "module"]
7
- }