@qy_better_lib/pc 0.0.8 → 0.1.0

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.
Files changed (150) hide show
  1. package/dist/@qy_better_lib/pc.min.js +42 -1
  2. package/lib/node_modules/@ctrl/tinycolor/dist/module/conversion.js +115 -0
  3. package/lib/node_modules/@ctrl/tinycolor/dist/module/css-color-names.js +153 -0
  4. package/lib/node_modules/@ctrl/tinycolor/dist/module/format-input.js +68 -0
  5. package/lib/node_modules/@ctrl/tinycolor/dist/module/index.js +183 -0
  6. package/lib/node_modules/@ctrl/tinycolor/dist/module/util.js +32 -0
  7. package/lib/node_modules/@element-plus/icons-vue/dist/index.js +167 -0
  8. package/lib/node_modules/@intlify/core-base/dist/core-base.js +1104 -0
  9. package/lib/node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.js +1004 -0
  10. package/lib/node_modules/@intlify/shared/dist/shared.js +142 -0
  11. package/lib/node_modules/@qy_better_lib/core/lib/directives/click-outside.js +40 -0
  12. package/lib/node_modules/@qy_better_lib/core/lib/utils/is.js +8 -0
  13. package/lib/node_modules/@vue/shared/dist/shared.esm-bundler.js +22 -0
  14. package/lib/node_modules/@vueuse/core/index.js +112 -0
  15. package/lib/node_modules/@vueuse/shared/index.js +68 -0
  16. package/lib/node_modules/element-plus/es/_virtual/plugin-vue_export-helper.js +9 -0
  17. package/lib/node_modules/element-plus/es/components/badge/index.js +7 -0
  18. package/lib/node_modules/element-plus/es/components/button/index.js +11 -0
  19. package/lib/node_modules/element-plus/es/components/icon/index.js +7 -0
  20. package/lib/node_modules/element-plus/es/components/input/index.js +7 -0
  21. package/lib/node_modules/element-plus/es/components/message/index.js +7 -0
  22. package/lib/node_modules/element-plus/es/components/message-box/index.js +10 -0
  23. package/lib/node_modules/element-plus/es/components/notification/index.js +7 -0
  24. package/lib/node_modules/element-plus/es/components/overlay/index.js +9 -0
  25. package/lib/node_modules/element-plus/es/constants/aria.js +20 -0
  26. package/lib/node_modules/element-plus/es/constants/event.js +4 -0
  27. package/lib/node_modules/element-plus/es/constants/size.js +4 -0
  28. package/lib/node_modules/element-plus/es/directives/trap-focus/index.js +36 -0
  29. package/lib/node_modules/element-plus/es/hooks/use-aria/index.js +14 -0
  30. package/lib/node_modules/element-plus/es/hooks/use-attrs/index.js +13 -0
  31. package/lib/node_modules/element-plus/es/hooks/use-composition/index.js +29 -0
  32. package/lib/node_modules/element-plus/es/hooks/use-cursor/index.js +39 -0
  33. package/lib/node_modules/element-plus/es/hooks/use-deprecated/index.js +14 -0
  34. package/lib/node_modules/element-plus/es/hooks/use-draggable/index.js +41 -0
  35. package/lib/node_modules/element-plus/es/hooks/use-empty-values/index.js +15 -0
  36. package/lib/node_modules/element-plus/es/hooks/use-escape-keydown/index.js +16 -0
  37. package/lib/node_modules/element-plus/es/hooks/use-focus-controller/index.js +34 -0
  38. package/lib/node_modules/element-plus/es/hooks/use-id/index.js +22 -0
  39. package/lib/node_modules/element-plus/es/hooks/use-locale/index.js +24 -0
  40. package/lib/node_modules/element-plus/es/hooks/use-lockscreen/index.js +30 -0
  41. package/lib/node_modules/element-plus/es/hooks/use-namespace/index.js +44 -0
  42. package/lib/node_modules/element-plus/es/hooks/use-prop/index.js +11 -0
  43. package/lib/node_modules/element-plus/es/hooks/use-same-target/index.js +16 -0
  44. package/lib/node_modules/element-plus/es/hooks/use-size/index.js +16 -0
  45. package/lib/node_modules/element-plus/es/hooks/use-z-index/index.js +24 -0
  46. package/lib/node_modules/element-plus/es/locale/lang/en.js +182 -0
  47. package/lib/node_modules/element-plus/es/utils/browser.js +6 -0
  48. package/lib/node_modules/element-plus/es/utils/dom/aria.js +23 -0
  49. package/lib/node_modules/element-plus/es/utils/dom/scroll.js +20 -0
  50. package/lib/node_modules/element-plus/es/utils/dom/style.js +47 -0
  51. package/lib/node_modules/element-plus/es/utils/error.js +19 -0
  52. package/lib/node_modules/element-plus/es/utils/i18n.js +4 -0
  53. package/lib/node_modules/element-plus/es/utils/objects.js +4 -0
  54. package/lib/node_modules/element-plus/es/utils/types.js +13 -0
  55. package/lib/node_modules/element-plus/es/utils/typescript.js +4 -0
  56. package/lib/node_modules/element-plus/es/utils/vue/icon.js +31 -0
  57. package/lib/node_modules/element-plus/es/utils/vue/install.js +17 -0
  58. package/lib/node_modules/element-plus/es/utils/vue/props/runtime.js +31 -0
  59. package/lib/node_modules/element-plus/es/utils/vue/validator.js +5 -0
  60. package/lib/node_modules/element-plus/es/utils/vue/vnode.js +5 -0
  61. package/lib/node_modules/lodash-es/_Hash.js +20 -0
  62. package/lib/node_modules/lodash-es/_ListCache.js +20 -0
  63. package/lib/node_modules/lodash-es/_Map.js +6 -0
  64. package/lib/node_modules/lodash-es/_MapCache.js +20 -0
  65. package/lib/node_modules/lodash-es/_Symbol.js +5 -0
  66. package/lib/node_modules/lodash-es/_apply.js +16 -0
  67. package/lib/node_modules/lodash-es/_arrayMap.js +8 -0
  68. package/lib/node_modules/lodash-es/_arrayPush.js +8 -0
  69. package/lib/node_modules/lodash-es/_assignValue.js +10 -0
  70. package/lib/node_modules/lodash-es/_assocIndexOf.js +10 -0
  71. package/lib/node_modules/lodash-es/_baseAssignValue.js +12 -0
  72. package/lib/node_modules/lodash-es/_baseFlatten.js +13 -0
  73. package/lib/node_modules/lodash-es/_baseGet.js +11 -0
  74. package/lib/node_modules/lodash-es/_baseGetTag.js +10 -0
  75. package/lib/node_modules/lodash-es/_baseHasIn.js +6 -0
  76. package/lib/node_modules/lodash-es/_baseIsArguments.js +9 -0
  77. package/lib/node_modules/lodash-es/_baseIsNative.js +16 -0
  78. package/lib/node_modules/lodash-es/_basePick.js +10 -0
  79. package/lib/node_modules/lodash-es/_basePickBy.js +13 -0
  80. package/lib/node_modules/lodash-es/_baseSet.js +24 -0
  81. package/lib/node_modules/lodash-es/_baseSetToString.js +14 -0
  82. package/lib/node_modules/lodash-es/_baseToString.js +18 -0
  83. package/lib/node_modules/lodash-es/_castPath.js +10 -0
  84. package/lib/node_modules/lodash-es/_coreJsData.js +5 -0
  85. package/lib/node_modules/lodash-es/_defineProperty.js +11 -0
  86. package/lib/node_modules/lodash-es/_flatRest.js +9 -0
  87. package/lib/node_modules/lodash-es/_freeGlobal.js +4 -0
  88. package/lib/node_modules/lodash-es/_getMapData.js +8 -0
  89. package/lib/node_modules/lodash-es/_getNative.js +9 -0
  90. package/lib/node_modules/lodash-es/_getRawTag.js +15 -0
  91. package/lib/node_modules/lodash-es/_getValue.js +6 -0
  92. package/lib/node_modules/lodash-es/_hasPath.js +19 -0
  93. package/lib/node_modules/lodash-es/_hashClear.js +7 -0
  94. package/lib/node_modules/lodash-es/_hashDelete.js +7 -0
  95. package/lib/node_modules/lodash-es/_hashGet.js +13 -0
  96. package/lib/node_modules/lodash-es/_hashHas.js +9 -0
  97. package/lib/node_modules/lodash-es/_hashSet.js +9 -0
  98. package/lib/node_modules/lodash-es/_isFlattenable.js +10 -0
  99. package/lib/node_modules/lodash-es/_isIndex.js +8 -0
  100. package/lib/node_modules/lodash-es/_isKey.js +12 -0
  101. package/lib/node_modules/lodash-es/_isKeyable.js +7 -0
  102. package/lib/node_modules/lodash-es/_isMasked.js +11 -0
  103. package/lib/node_modules/lodash-es/_listCacheClear.js +6 -0
  104. package/lib/node_modules/lodash-es/_listCacheDelete.js +12 -0
  105. package/lib/node_modules/lodash-es/_listCacheGet.js +8 -0
  106. package/lib/node_modules/lodash-es/_listCacheHas.js +7 -0
  107. package/lib/node_modules/lodash-es/_listCacheSet.js +8 -0
  108. package/lib/node_modules/lodash-es/_mapCacheClear.js +13 -0
  109. package/lib/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  110. package/lib/node_modules/lodash-es/_mapCacheGet.js +7 -0
  111. package/lib/node_modules/lodash-es/_mapCacheHas.js +7 -0
  112. package/lib/node_modules/lodash-es/_mapCacheSet.js +8 -0
  113. package/lib/node_modules/lodash-es/_memoizeCapped.js +11 -0
  114. package/lib/node_modules/lodash-es/_nativeCreate.js +5 -0
  115. package/lib/node_modules/lodash-es/_objectToString.js +7 -0
  116. package/lib/node_modules/lodash-es/_overRest.js +15 -0
  117. package/lib/node_modules/lodash-es/_root.js +5 -0
  118. package/lib/node_modules/lodash-es/_setToString.js +6 -0
  119. package/lib/node_modules/lodash-es/_shortOut.js +16 -0
  120. package/lib/node_modules/lodash-es/_stringToPath.js +10 -0
  121. package/lib/node_modules/lodash-es/_toKey.js +10 -0
  122. package/lib/node_modules/lodash-es/_toSource.js +17 -0
  123. package/lib/node_modules/lodash-es/constant.js +8 -0
  124. package/lib/node_modules/lodash-es/eq.js +6 -0
  125. package/lib/node_modules/lodash-es/flatten.js +8 -0
  126. package/lib/node_modules/lodash-es/fromPairs.js +10 -0
  127. package/lib/node_modules/lodash-es/get.js +8 -0
  128. package/lib/node_modules/lodash-es/hasIn.js +8 -0
  129. package/lib/node_modules/lodash-es/identity.js +6 -0
  130. package/lib/node_modules/lodash-es/isArguments.js +10 -0
  131. package/lib/node_modules/lodash-es/isArray.js +4 -0
  132. package/lib/node_modules/lodash-es/isFunction.js +12 -0
  133. package/lib/node_modules/lodash-es/isLength.js +7 -0
  134. package/lib/node_modules/lodash-es/isNil.js +6 -0
  135. package/lib/node_modules/lodash-es/isObject.js +7 -0
  136. package/lib/node_modules/lodash-es/isObjectLike.js +6 -0
  137. package/lib/node_modules/lodash-es/isSymbol.js +9 -0
  138. package/lib/node_modules/lodash-es/memoize.js +18 -0
  139. package/lib/node_modules/lodash-es/pick.js +8 -0
  140. package/lib/node_modules/lodash-es/toString.js +7 -0
  141. package/lib/node_modules/vue-i18n/dist/vue-i18n.js +864 -0
  142. package/package.json +4 -4
  143. package/lib/contextMenu/index.js +0 -7
  144. package/lib/index.js +0 -24
  145. package/lib/tableExtend/index.js +0 -7
  146. package/lib/tableExtend/props.js +0 -50
  147. package/lib/tableExtend/type.js +0 -4
  148. package/lib/tableExtend/useTable.js +0 -72
  149. package/lib/textButton/index.js +0 -7
  150. package/lib/utils/index.js +0 -79
@@ -0,0 +1,1004 @@
1
+ /*!
2
+ * message-compiler v9.13.1
3
+ * (c) 2024 kazuya kawaguchi
4
+ * Released under the MIT License.
5
+ */
6
+ function me(r, n, c) {
7
+ return { line: r, column: n, offset: c };
8
+ }
9
+ function B(r, n, c) {
10
+ return { start: r, end: n };
11
+ }
12
+ const ye = /\{([0-9a-zA-Z]+)\}/g;
13
+ function se(r, ...n) {
14
+ return n.length === 1 && be(n[0]) && (n = n[0]), (!n || !n.hasOwnProperty) && (n = {}), r.replace(ye, (c, l) => n.hasOwnProperty(l) ? n[l] : "");
15
+ }
16
+ const ce = Object.assign, te = (r) => typeof r == "string", be = (r) => r !== null && typeof r == "object";
17
+ function ue(r, n = "") {
18
+ return r.reduce((c, l, N) => N === 0 ? c + l : c + n + l, "");
19
+ }
20
+ const ae = {
21
+ USE_MODULO_SYNTAX: 1,
22
+ __EXTEND_POINT__: 2
23
+ }, Re = {
24
+ [ae.USE_MODULO_SYNTAX]: "Use modulo before '{{0}}'."
25
+ };
26
+ function Ue(r, n, ...c) {
27
+ const l = se(Re[r], ...c || []), N = { message: String(l), code: r };
28
+ return n && (N.location = n), N;
29
+ }
30
+ const L = {
31
+ // tokenizer error codes
32
+ EXPECTED_TOKEN: 1,
33
+ INVALID_TOKEN_IN_PLACEHOLDER: 2,
34
+ UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
35
+ UNKNOWN_ESCAPE_SEQUENCE: 4,
36
+ INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
37
+ UNBALANCED_CLOSING_BRACE: 6,
38
+ UNTERMINATED_CLOSING_BRACE: 7,
39
+ EMPTY_PLACEHOLDER: 8,
40
+ NOT_ALLOW_NEST_PLACEHOLDER: 9,
41
+ INVALID_LINKED_FORMAT: 10,
42
+ // parser error codes
43
+ MUST_HAVE_MESSAGES_IN_PLURAL: 11,
44
+ UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
45
+ UNEXPECTED_EMPTY_LINKED_KEY: 13,
46
+ UNEXPECTED_LEXICAL_ANALYSIS: 14,
47
+ // generator error codes
48
+ UNHANDLED_CODEGEN_NODE_TYPE: 15,
49
+ // minifier error codes
50
+ UNHANDLED_MINIFIER_NODE_TYPE: 16,
51
+ // Special value for higher-order compilers to pick up the last code
52
+ // to avoid collision of error codes. This should always be kept as the last
53
+ // item.
54
+ __EXTEND_POINT__: 17
55
+ }, Me = {
56
+ // tokenizer error messages
57
+ [L.EXPECTED_TOKEN]: "Expected token: '{0}'",
58
+ [L.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'",
59
+ [L.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: "Unterminated single quote in placeholder",
60
+ [L.UNKNOWN_ESCAPE_SEQUENCE]: "Unknown escape sequence: \\{0}",
61
+ [L.INVALID_UNICODE_ESCAPE_SEQUENCE]: "Invalid unicode escape sequence: {0}",
62
+ [L.UNBALANCED_CLOSING_BRACE]: "Unbalanced closing brace",
63
+ [L.UNTERMINATED_CLOSING_BRACE]: "Unterminated closing brace",
64
+ [L.EMPTY_PLACEHOLDER]: "Empty placeholder",
65
+ [L.NOT_ALLOW_NEST_PLACEHOLDER]: "Not allowed nest placeholder",
66
+ [L.INVALID_LINKED_FORMAT]: "Invalid linked format",
67
+ // parser error messages
68
+ [L.MUST_HAVE_MESSAGES_IN_PLURAL]: "Plural must have messages",
69
+ [L.UNEXPECTED_EMPTY_LINKED_MODIFIER]: "Unexpected empty linked modifier",
70
+ [L.UNEXPECTED_EMPTY_LINKED_KEY]: "Unexpected empty linked key",
71
+ [L.UNEXPECTED_LEXICAL_ANALYSIS]: "Unexpected lexical analysis in token: '{0}'",
72
+ // generator error messages
73
+ [L.UNHANDLED_CODEGEN_NODE_TYPE]: "unhandled codegen node type: '{0}'",
74
+ // minimizer error messages
75
+ [L.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
76
+ };
77
+ function V(r, n, c = {}) {
78
+ const { domain: l, messages: N, args: f } = c, I = se((N || Me)[r] || "", ...f || []), _ = new SyntaxError(String(I));
79
+ return _.code = r, n && (_.location = n), _.domain = l, _;
80
+ }
81
+ function rt(r) {
82
+ throw r;
83
+ }
84
+ const ve = /<\/?[\w\s="/.':;#-\/]+>/, it = (r) => ve.test(r), g = " ", Xe = "\r", m = `
85
+ `, we = "\u2028", Ye = "\u2029";
86
+ function ge(r) {
87
+ const n = r;
88
+ let c = 0, l = 1, N = 1, f = 0;
89
+ const I = (o) => n[o] === Xe && n[o + 1] === m, _ = (o) => n[o] === m, C = (o) => n[o] === Ye, R = (o) => n[o] === we, y = (o) => I(o) || _(o) || C(o) || R(o), T = () => c, A = () => l, U = () => N, X = () => f, D = (o) => I(o) || C(o) || R(o) ? m : n[o], h = () => D(c), b = () => D(c + f);
90
+ function w() {
91
+ return f = 0, y(c) && (l++, N = 0), I(c) && c++, c++, N++, n[c];
92
+ }
93
+ function s() {
94
+ return I(c + f) && f++, f++, n[c + f];
95
+ }
96
+ function a() {
97
+ c = 0, l = 1, N = 1, f = 0;
98
+ }
99
+ function d(o = 0) {
100
+ f = o;
101
+ }
102
+ function u() {
103
+ const o = c + f;
104
+ for (; o !== c; )
105
+ w();
106
+ f = 0;
107
+ }
108
+ return {
109
+ index: T,
110
+ line: A,
111
+ column: U,
112
+ peekOffset: X,
113
+ charAt: D,
114
+ currentChar: h,
115
+ currentPeek: b,
116
+ next: w,
117
+ peek: s,
118
+ reset: a,
119
+ resetPeek: d,
120
+ skipToPeek: u
121
+ };
122
+ }
123
+ const K = void 0, He = ".", ne = "'", Ke = "tokenizer";
124
+ function xe(r, n = {}) {
125
+ const c = n.location !== !1, l = ge(r), N = () => l.index(), f = () => me(l.line(), l.column(), l.index()), I = f(), _ = N(), C = {
126
+ currentType: 14,
127
+ offset: _,
128
+ startLoc: I,
129
+ endLoc: I,
130
+ lastType: 14,
131
+ lastOffset: _,
132
+ lastStartLoc: I,
133
+ lastEndLoc: I,
134
+ braceNest: 0,
135
+ inLinked: !1,
136
+ text: ""
137
+ }, R = () => C, { onError: y } = n;
138
+ function T(e, t, i, ...E) {
139
+ const k = R();
140
+ if (t.column += i, t.offset += i, y) {
141
+ const S = c ? B(k.startLoc, t) : null, H = V(e, S, {
142
+ domain: Ke,
143
+ args: E
144
+ });
145
+ y(H);
146
+ }
147
+ }
148
+ function A(e, t, i) {
149
+ e.endLoc = f(), e.currentType = t;
150
+ const E = { type: t };
151
+ return c && (E.loc = B(e.startLoc, e.endLoc)), i != null && (E.value = i), E;
152
+ }
153
+ const U = (e) => A(
154
+ e,
155
+ 14
156
+ /* TokenTypes.EOF */
157
+ );
158
+ function X(e, t) {
159
+ return e.currentChar() === t ? (e.next(), t) : (T(L.EXPECTED_TOKEN, f(), 0, t), "");
160
+ }
161
+ function D(e) {
162
+ let t = "";
163
+ for (; e.currentPeek() === g || e.currentPeek() === m; )
164
+ t += e.currentPeek(), e.peek();
165
+ return t;
166
+ }
167
+ function h(e) {
168
+ const t = D(e);
169
+ return e.skipToPeek(), t;
170
+ }
171
+ function b(e) {
172
+ if (e === K)
173
+ return !1;
174
+ const t = e.charCodeAt(0);
175
+ return t >= 97 && t <= 122 || // a-z
176
+ t >= 65 && t <= 90 || // A-Z
177
+ t === 95;
178
+ }
179
+ function w(e) {
180
+ if (e === K)
181
+ return !1;
182
+ const t = e.charCodeAt(0);
183
+ return t >= 48 && t <= 57;
184
+ }
185
+ function s(e, t) {
186
+ const { currentType: i } = t;
187
+ if (i !== 2)
188
+ return !1;
189
+ D(e);
190
+ const E = b(e.currentPeek());
191
+ return e.resetPeek(), E;
192
+ }
193
+ function a(e, t) {
194
+ const { currentType: i } = t;
195
+ if (i !== 2)
196
+ return !1;
197
+ D(e);
198
+ const E = e.currentPeek() === "-" ? e.peek() : e.currentPeek(), k = w(E);
199
+ return e.resetPeek(), k;
200
+ }
201
+ function d(e, t) {
202
+ const { currentType: i } = t;
203
+ if (i !== 2)
204
+ return !1;
205
+ D(e);
206
+ const E = e.currentPeek() === ne;
207
+ return e.resetPeek(), E;
208
+ }
209
+ function u(e, t) {
210
+ const { currentType: i } = t;
211
+ if (i !== 8)
212
+ return !1;
213
+ D(e);
214
+ const E = e.currentPeek() === ".";
215
+ return e.resetPeek(), E;
216
+ }
217
+ function o(e, t) {
218
+ const { currentType: i } = t;
219
+ if (i !== 9)
220
+ return !1;
221
+ D(e);
222
+ const E = b(e.currentPeek());
223
+ return e.resetPeek(), E;
224
+ }
225
+ function p(e, t) {
226
+ const { currentType: i } = t;
227
+ if (!(i === 8 || i === 12))
228
+ return !1;
229
+ D(e);
230
+ const E = e.currentPeek() === ":";
231
+ return e.resetPeek(), E;
232
+ }
233
+ function O(e, t) {
234
+ const { currentType: i } = t;
235
+ if (i !== 10)
236
+ return !1;
237
+ const E = () => {
238
+ const S = e.currentPeek();
239
+ return S === "{" ? b(e.peek()) : S === "@" || S === "%" || S === "|" || S === ":" || S === "." || S === g || !S ? !1 : S === m ? (e.peek(), E()) : P(e, !1);
240
+ }, k = E();
241
+ return e.resetPeek(), k;
242
+ }
243
+ function M(e) {
244
+ D(e);
245
+ const t = e.currentPeek() === "|";
246
+ return e.resetPeek(), t;
247
+ }
248
+ function W(e) {
249
+ const t = D(e), i = e.currentPeek() === "%" && e.peek() === "{";
250
+ return e.resetPeek(), {
251
+ isModulo: i,
252
+ hasSpace: t.length > 0
253
+ };
254
+ }
255
+ function P(e, t = !0) {
256
+ const i = (k = !1, S = "", H = !1) => {
257
+ const x = e.currentPeek();
258
+ return x === "{" ? S === "%" ? !1 : k : x === "@" || !x ? S === "%" ? !0 : k : x === "%" ? (e.peek(), i(k, "%", !0)) : x === "|" ? S === "%" || H ? !0 : !(S === g || S === m) : x === g ? (e.peek(), i(!0, g, H)) : x === m ? (e.peek(), i(!0, m, H)) : !0;
259
+ }, E = i();
260
+ return t && e.resetPeek(), E;
261
+ }
262
+ function Y(e, t) {
263
+ const i = e.currentChar();
264
+ return i === K ? K : t(i) ? (e.next(), i) : null;
265
+ }
266
+ function oe(e) {
267
+ const t = e.charCodeAt(0);
268
+ return t >= 97 && t <= 122 || // a-z
269
+ t >= 65 && t <= 90 || // A-Z
270
+ t >= 48 && t <= 57 || // 0-9
271
+ t === 95 || // _
272
+ t === 36;
273
+ }
274
+ function le(e) {
275
+ return Y(e, oe);
276
+ }
277
+ function fe(e) {
278
+ const t = e.charCodeAt(0);
279
+ return t >= 97 && t <= 122 || // a-z
280
+ t >= 65 && t <= 90 || // A-Z
281
+ t >= 48 && t <= 57 || // 0-9
282
+ t === 95 || // _
283
+ t === 36 || // $
284
+ t === 45;
285
+ }
286
+ function Ee(e) {
287
+ return Y(e, fe);
288
+ }
289
+ function de(e) {
290
+ const t = e.charCodeAt(0);
291
+ return t >= 48 && t <= 57;
292
+ }
293
+ function Le(e) {
294
+ return Y(e, de);
295
+ }
296
+ function Ne(e) {
297
+ const t = e.charCodeAt(0);
298
+ return t >= 48 && t <= 57 || // 0-9
299
+ t >= 65 && t <= 70 || // A-F
300
+ t >= 97 && t <= 102;
301
+ }
302
+ function _e(e) {
303
+ return Y(e, Ne);
304
+ }
305
+ function Z(e) {
306
+ let t = "", i = "";
307
+ for (; t = Le(e); )
308
+ i += t;
309
+ return i;
310
+ }
311
+ function pe(e) {
312
+ h(e);
313
+ const t = e.currentChar();
314
+ return t !== "%" && T(L.EXPECTED_TOKEN, f(), 0, t), e.next(), "%";
315
+ }
316
+ function z(e) {
317
+ let t = "";
318
+ for (; ; ) {
319
+ const i = e.currentChar();
320
+ if (i === "{" || i === "}" || i === "@" || i === "|" || !i)
321
+ break;
322
+ if (i === "%")
323
+ if (P(e))
324
+ t += i, e.next();
325
+ else
326
+ break;
327
+ else if (i === g || i === m)
328
+ if (P(e))
329
+ t += i, e.next();
330
+ else {
331
+ if (M(e))
332
+ break;
333
+ t += i, e.next();
334
+ }
335
+ else
336
+ t += i, e.next();
337
+ }
338
+ return t;
339
+ }
340
+ function he(e) {
341
+ h(e);
342
+ let t = "", i = "";
343
+ for (; t = Ee(e); )
344
+ i += t;
345
+ return e.currentChar() === K && T(L.UNTERMINATED_CLOSING_BRACE, f(), 0), i;
346
+ }
347
+ function Ie(e) {
348
+ h(e);
349
+ let t = "";
350
+ return e.currentChar() === "-" ? (e.next(), t += `-${Z(e)}`) : t += Z(e), e.currentChar() === K && T(L.UNTERMINATED_CLOSING_BRACE, f(), 0), t;
351
+ }
352
+ function Ce(e) {
353
+ return e !== ne && e !== m;
354
+ }
355
+ function Te(e) {
356
+ h(e), X(e, "'");
357
+ let t = "", i = "";
358
+ for (; t = Y(e, Ce); )
359
+ t === "\\" ? i += Ae(e) : i += t;
360
+ const E = e.currentChar();
361
+ return E === m || E === K ? (T(L.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, f(), 0), E === m && (e.next(), X(e, "'")), i) : (X(e, "'"), i);
362
+ }
363
+ function Ae(e) {
364
+ const t = e.currentChar();
365
+ switch (t) {
366
+ case "\\":
367
+ case "'":
368
+ return e.next(), `\\${t}`;
369
+ case "u":
370
+ return ee(e, t, 4);
371
+ case "U":
372
+ return ee(e, t, 6);
373
+ default:
374
+ return T(L.UNKNOWN_ESCAPE_SEQUENCE, f(), 0, t), "";
375
+ }
376
+ }
377
+ function ee(e, t, i) {
378
+ X(e, t);
379
+ let E = "";
380
+ for (let k = 0; k < i; k++) {
381
+ const S = _e(e);
382
+ if (!S) {
383
+ T(L.INVALID_UNICODE_ESCAPE_SEQUENCE, f(), 0, `\\${t}${E}${e.currentChar()}`);
384
+ break;
385
+ }
386
+ E += S;
387
+ }
388
+ return `\\${t}${E}`;
389
+ }
390
+ function Se(e) {
391
+ return e !== "{" && e !== "}" && e !== g && e !== m;
392
+ }
393
+ function ke(e) {
394
+ h(e);
395
+ let t = "", i = "";
396
+ for (; t = Y(e, Se); )
397
+ i += t;
398
+ return i;
399
+ }
400
+ function Oe(e) {
401
+ let t = "", i = "";
402
+ for (; t = le(e); )
403
+ i += t;
404
+ return i;
405
+ }
406
+ function Pe(e) {
407
+ const t = (i) => {
408
+ const E = e.currentChar();
409
+ return E === "{" || E === "%" || E === "@" || E === "|" || E === "(" || E === ")" || !E || E === g ? i : (i += E, e.next(), t(i));
410
+ };
411
+ return t("");
412
+ }
413
+ function Q(e) {
414
+ h(e);
415
+ const t = X(
416
+ e,
417
+ "|"
418
+ /* TokenChars.Pipe */
419
+ );
420
+ return h(e), t;
421
+ }
422
+ function q(e, t) {
423
+ let i = null;
424
+ switch (e.currentChar()) {
425
+ case "{":
426
+ return t.braceNest >= 1 && T(L.NOT_ALLOW_NEST_PLACEHOLDER, f(), 0), e.next(), i = A(
427
+ t,
428
+ 2,
429
+ "{"
430
+ /* TokenChars.BraceLeft */
431
+ ), h(e), t.braceNest++, i;
432
+ case "}":
433
+ return t.braceNest > 0 && t.currentType === 2 && T(L.EMPTY_PLACEHOLDER, f(), 0), e.next(), i = A(
434
+ t,
435
+ 3,
436
+ "}"
437
+ /* TokenChars.BraceRight */
438
+ ), t.braceNest--, t.braceNest > 0 && h(e), t.inLinked && t.braceNest === 0 && (t.inLinked = !1), i;
439
+ case "@":
440
+ return t.braceNest > 0 && T(L.UNTERMINATED_CLOSING_BRACE, f(), 0), i = F(e, t) || U(t), t.braceNest = 0, i;
441
+ default: {
442
+ let k = !0, S = !0, H = !0;
443
+ if (M(e))
444
+ return t.braceNest > 0 && T(L.UNTERMINATED_CLOSING_BRACE, f(), 0), i = A(t, 1, Q(e)), t.braceNest = 0, t.inLinked = !1, i;
445
+ if (t.braceNest > 0 && (t.currentType === 5 || t.currentType === 6 || t.currentType === 7))
446
+ return T(L.UNTERMINATED_CLOSING_BRACE, f(), 0), t.braceNest = 0, j(e, t);
447
+ if (k = s(e, t))
448
+ return i = A(t, 5, he(e)), h(e), i;
449
+ if (S = a(e, t))
450
+ return i = A(t, 6, Ie(e)), h(e), i;
451
+ if (H = d(e, t))
452
+ return i = A(t, 7, Te(e)), h(e), i;
453
+ if (!k && !S && !H)
454
+ return i = A(t, 13, ke(e)), T(L.INVALID_TOKEN_IN_PLACEHOLDER, f(), 0, i.value), h(e), i;
455
+ break;
456
+ }
457
+ }
458
+ return i;
459
+ }
460
+ function F(e, t) {
461
+ const { currentType: i } = t;
462
+ let E = null;
463
+ const k = e.currentChar();
464
+ switch ((i === 8 || i === 9 || i === 12 || i === 10) && (k === m || k === g) && T(L.INVALID_LINKED_FORMAT, f(), 0), k) {
465
+ case "@":
466
+ return e.next(), E = A(
467
+ t,
468
+ 8,
469
+ "@"
470
+ /* TokenChars.LinkedAlias */
471
+ ), t.inLinked = !0, E;
472
+ case ".":
473
+ return h(e), e.next(), A(
474
+ t,
475
+ 9,
476
+ "."
477
+ /* TokenChars.LinkedDot */
478
+ );
479
+ case ":":
480
+ return h(e), e.next(), A(
481
+ t,
482
+ 10,
483
+ ":"
484
+ /* TokenChars.LinkedDelimiter */
485
+ );
486
+ default:
487
+ return M(e) ? (E = A(t, 1, Q(e)), t.braceNest = 0, t.inLinked = !1, E) : u(e, t) || p(e, t) ? (h(e), F(e, t)) : o(e, t) ? (h(e), A(t, 12, Oe(e))) : O(e, t) ? (h(e), k === "{" ? q(e, t) || E : A(t, 11, Pe(e))) : (i === 8 && T(L.INVALID_LINKED_FORMAT, f(), 0), t.braceNest = 0, t.inLinked = !1, j(e, t));
488
+ }
489
+ }
490
+ function j(e, t) {
491
+ let i = {
492
+ type: 14
493
+ /* TokenTypes.EOF */
494
+ };
495
+ if (t.braceNest > 0)
496
+ return q(e, t) || U(t);
497
+ if (t.inLinked)
498
+ return F(e, t) || U(t);
499
+ switch (e.currentChar()) {
500
+ case "{":
501
+ return q(e, t) || U(t);
502
+ case "}":
503
+ return T(L.UNBALANCED_CLOSING_BRACE, f(), 0), e.next(), A(
504
+ t,
505
+ 3,
506
+ "}"
507
+ /* TokenChars.BraceRight */
508
+ );
509
+ case "@":
510
+ return F(e, t) || U(t);
511
+ default: {
512
+ if (M(e))
513
+ return i = A(t, 1, Q(e)), t.braceNest = 0, t.inLinked = !1, i;
514
+ const { isModulo: k, hasSpace: S } = W(e);
515
+ if (k)
516
+ return S ? A(t, 0, z(e)) : A(t, 4, pe(e));
517
+ if (P(e))
518
+ return A(t, 0, z(e));
519
+ break;
520
+ }
521
+ }
522
+ return i;
523
+ }
524
+ function De() {
525
+ const { currentType: e, offset: t, startLoc: i, endLoc: E } = C;
526
+ return C.lastType = e, C.lastOffset = t, C.lastStartLoc = i, C.lastEndLoc = E, C.offset = N(), C.startLoc = f(), l.currentChar() === K ? A(
527
+ C,
528
+ 14
529
+ /* TokenTypes.EOF */
530
+ ) : j(l, C);
531
+ }
532
+ return {
533
+ nextToken: De,
534
+ currentOffset: N,
535
+ currentPosition: f,
536
+ context: R
537
+ };
538
+ }
539
+ const $e = "parser", Ge = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
540
+ function Fe(r, n, c) {
541
+ switch (r) {
542
+ case "\\\\":
543
+ return "\\";
544
+ // eslint-disable-next-line no-useless-escape
545
+ case "\\'":
546
+ return "'";
547
+ default: {
548
+ const l = parseInt(n || c, 16);
549
+ return l <= 55295 || l >= 57344 ? String.fromCodePoint(l) : "�";
550
+ }
551
+ }
552
+ }
553
+ function Be(r = {}) {
554
+ const n = r.location !== !1, { onError: c, onWarn: l } = r;
555
+ function N(s, a, d, u, ...o) {
556
+ const p = s.currentPosition();
557
+ if (p.offset += u, p.column += u, c) {
558
+ const O = n ? B(d, p) : null, M = V(a, O, {
559
+ domain: $e,
560
+ args: o
561
+ });
562
+ c(M);
563
+ }
564
+ }
565
+ function f(s, a, d, u, ...o) {
566
+ const p = s.currentPosition();
567
+ if (p.offset += u, p.column += u, l) {
568
+ const O = n ? B(d, p) : null;
569
+ l(Ue(a, O, o));
570
+ }
571
+ }
572
+ function I(s, a, d) {
573
+ const u = { type: s };
574
+ return n && (u.start = a, u.end = a, u.loc = { start: d, end: d }), u;
575
+ }
576
+ function _(s, a, d, u) {
577
+ n && (s.end = a, s.loc && (s.loc.end = d));
578
+ }
579
+ function C(s, a) {
580
+ const d = s.context(), u = I(3, d.offset, d.startLoc);
581
+ return u.value = a, _(u, s.currentOffset(), s.currentPosition()), u;
582
+ }
583
+ function R(s, a) {
584
+ const d = s.context(), { lastOffset: u, lastStartLoc: o } = d, p = I(5, u, o);
585
+ return p.index = parseInt(a, 10), s.nextToken(), _(p, s.currentOffset(), s.currentPosition()), p;
586
+ }
587
+ function y(s, a, d) {
588
+ const u = s.context(), { lastOffset: o, lastStartLoc: p } = u, O = I(4, o, p);
589
+ return O.key = a, d === !0 && (O.modulo = !0), s.nextToken(), _(O, s.currentOffset(), s.currentPosition()), O;
590
+ }
591
+ function T(s, a) {
592
+ const d = s.context(), { lastOffset: u, lastStartLoc: o } = d, p = I(9, u, o);
593
+ return p.value = a.replace(Ge, Fe), s.nextToken(), _(p, s.currentOffset(), s.currentPosition()), p;
594
+ }
595
+ function A(s) {
596
+ const a = s.nextToken(), d = s.context(), { lastOffset: u, lastStartLoc: o } = d, p = I(8, u, o);
597
+ return a.type !== 12 ? (N(s, L.UNEXPECTED_EMPTY_LINKED_MODIFIER, d.lastStartLoc, 0), p.value = "", _(p, u, o), {
598
+ nextConsumeToken: a,
599
+ node: p
600
+ }) : (a.value == null && N(s, L.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, v(a)), p.value = a.value || "", _(p, s.currentOffset(), s.currentPosition()), {
601
+ node: p
602
+ });
603
+ }
604
+ function U(s, a) {
605
+ const d = s.context(), u = I(7, d.offset, d.startLoc);
606
+ return u.value = a, _(u, s.currentOffset(), s.currentPosition()), u;
607
+ }
608
+ function X(s) {
609
+ const a = s.context(), d = I(6, a.offset, a.startLoc);
610
+ let u = s.nextToken();
611
+ if (u.type === 9) {
612
+ const o = A(s);
613
+ d.modifier = o.node, u = o.nextConsumeToken || s.nextToken();
614
+ }
615
+ switch (u.type !== 10 && N(s, L.UNEXPECTED_LEXICAL_ANALYSIS, a.lastStartLoc, 0, v(u)), u = s.nextToken(), u.type === 2 && (u = s.nextToken()), u.type) {
616
+ case 11:
617
+ u.value == null && N(s, L.UNEXPECTED_LEXICAL_ANALYSIS, a.lastStartLoc, 0, v(u)), d.key = U(s, u.value || "");
618
+ break;
619
+ case 5:
620
+ u.value == null && N(s, L.UNEXPECTED_LEXICAL_ANALYSIS, a.lastStartLoc, 0, v(u)), d.key = y(s, u.value || "");
621
+ break;
622
+ case 6:
623
+ u.value == null && N(s, L.UNEXPECTED_LEXICAL_ANALYSIS, a.lastStartLoc, 0, v(u)), d.key = R(s, u.value || "");
624
+ break;
625
+ case 7:
626
+ u.value == null && N(s, L.UNEXPECTED_LEXICAL_ANALYSIS, a.lastStartLoc, 0, v(u)), d.key = T(s, u.value || "");
627
+ break;
628
+ default: {
629
+ N(s, L.UNEXPECTED_EMPTY_LINKED_KEY, a.lastStartLoc, 0);
630
+ const o = s.context(), p = I(7, o.offset, o.startLoc);
631
+ return p.value = "", _(p, o.offset, o.startLoc), d.key = p, _(d, o.offset, o.startLoc), {
632
+ nextConsumeToken: u,
633
+ node: d
634
+ };
635
+ }
636
+ }
637
+ return _(d, s.currentOffset(), s.currentPosition()), {
638
+ node: d
639
+ };
640
+ }
641
+ function D(s) {
642
+ const a = s.context(), d = a.currentType === 1 ? s.currentOffset() : a.offset, u = a.currentType === 1 ? a.endLoc : a.startLoc, o = I(2, d, u);
643
+ o.items = [];
644
+ let p = null, O = null;
645
+ do {
646
+ const P = p || s.nextToken();
647
+ switch (p = null, P.type) {
648
+ case 0:
649
+ P.value == null && N(s, L.UNEXPECTED_LEXICAL_ANALYSIS, a.lastStartLoc, 0, v(P)), o.items.push(C(s, P.value || ""));
650
+ break;
651
+ case 6:
652
+ P.value == null && N(s, L.UNEXPECTED_LEXICAL_ANALYSIS, a.lastStartLoc, 0, v(P)), o.items.push(R(s, P.value || ""));
653
+ break;
654
+ case 4:
655
+ O = !0;
656
+ break;
657
+ case 5:
658
+ P.value == null && N(s, L.UNEXPECTED_LEXICAL_ANALYSIS, a.lastStartLoc, 0, v(P)), o.items.push(y(s, P.value || "", !!O)), O && (f(s, ae.USE_MODULO_SYNTAX, a.lastStartLoc, 0, v(P)), O = null);
659
+ break;
660
+ case 7:
661
+ P.value == null && N(s, L.UNEXPECTED_LEXICAL_ANALYSIS, a.lastStartLoc, 0, v(P)), o.items.push(T(s, P.value || ""));
662
+ break;
663
+ case 8: {
664
+ const Y = X(s);
665
+ o.items.push(Y.node), p = Y.nextConsumeToken || null;
666
+ break;
667
+ }
668
+ }
669
+ } while (a.currentType !== 14 && a.currentType !== 1);
670
+ const M = a.currentType === 1 ? a.lastOffset : s.currentOffset(), W = a.currentType === 1 ? a.lastEndLoc : s.currentPosition();
671
+ return _(o, M, W), o;
672
+ }
673
+ function h(s, a, d, u) {
674
+ const o = s.context();
675
+ let p = u.items.length === 0;
676
+ const O = I(1, a, d);
677
+ O.cases = [], O.cases.push(u);
678
+ do {
679
+ const M = D(s);
680
+ p || (p = M.items.length === 0), O.cases.push(M);
681
+ } while (o.currentType !== 14);
682
+ return p && N(s, L.MUST_HAVE_MESSAGES_IN_PLURAL, d, 0), _(O, s.currentOffset(), s.currentPosition()), O;
683
+ }
684
+ function b(s) {
685
+ const a = s.context(), { offset: d, startLoc: u } = a, o = D(s);
686
+ return a.currentType === 14 ? o : h(s, d, u, o);
687
+ }
688
+ function w(s) {
689
+ const a = xe(s, ce({}, r)), d = a.context(), u = I(0, d.offset, d.startLoc);
690
+ return n && u.loc && (u.loc.source = s), u.body = b(a), r.onCacheKey && (u.cacheKey = r.onCacheKey(s)), d.currentType !== 14 && N(a, L.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, s[d.offset] || ""), _(u, a.currentOffset(), a.currentPosition()), u;
691
+ }
692
+ return { parse: w };
693
+ }
694
+ function v(r) {
695
+ if (r.type === 14)
696
+ return "EOF";
697
+ const n = (r.value || "").replace(/\r?\n/gu, "\\n");
698
+ return n.length > 10 ? n.slice(0, 9) + "…" : n;
699
+ }
700
+ function Ve(r, n = {}) {
701
+ const c = {
702
+ ast: r,
703
+ helpers: /* @__PURE__ */ new Set()
704
+ };
705
+ return { context: () => c, helper: (f) => (c.helpers.add(f), f) };
706
+ }
707
+ function re(r, n) {
708
+ for (let c = 0; c < r.length; c++)
709
+ J(r[c], n);
710
+ }
711
+ function J(r, n) {
712
+ switch (r.type) {
713
+ case 1:
714
+ re(r.cases, n), n.helper(
715
+ "plural"
716
+ /* HelperNameMap.PLURAL */
717
+ );
718
+ break;
719
+ case 2:
720
+ re(r.items, n);
721
+ break;
722
+ case 6: {
723
+ J(r.key, n), n.helper(
724
+ "linked"
725
+ /* HelperNameMap.LINKED */
726
+ ), n.helper(
727
+ "type"
728
+ /* HelperNameMap.TYPE */
729
+ );
730
+ break;
731
+ }
732
+ case 5:
733
+ n.helper(
734
+ "interpolate"
735
+ /* HelperNameMap.INTERPOLATE */
736
+ ), n.helper(
737
+ "list"
738
+ /* HelperNameMap.LIST */
739
+ );
740
+ break;
741
+ case 4:
742
+ n.helper(
743
+ "interpolate"
744
+ /* HelperNameMap.INTERPOLATE */
745
+ ), n.helper(
746
+ "named"
747
+ /* HelperNameMap.NAMED */
748
+ );
749
+ break;
750
+ }
751
+ }
752
+ function We(r, n = {}) {
753
+ const c = Ve(r);
754
+ c.helper(
755
+ "normalize"
756
+ /* HelperNameMap.NORMALIZE */
757
+ ), r.body && J(r.body, c);
758
+ const l = c.context();
759
+ r.helpers = Array.from(l.helpers);
760
+ }
761
+ function Qe(r) {
762
+ const n = r.body;
763
+ return n.type === 2 ? ie(n) : n.cases.forEach((c) => ie(c)), r;
764
+ }
765
+ function ie(r) {
766
+ if (r.items.length === 1) {
767
+ const n = r.items[0];
768
+ (n.type === 3 || n.type === 9) && (r.static = n.value, delete n.value);
769
+ } else {
770
+ const n = [];
771
+ for (let c = 0; c < r.items.length; c++) {
772
+ const l = r.items[c];
773
+ if (!(l.type === 3 || l.type === 9) || l.value == null)
774
+ break;
775
+ n.push(l.value);
776
+ }
777
+ if (n.length === r.items.length) {
778
+ r.static = ue(n);
779
+ for (let c = 0; c < r.items.length; c++) {
780
+ const l = r.items[c];
781
+ (l.type === 3 || l.type === 9) && delete l.value;
782
+ }
783
+ }
784
+ }
785
+ }
786
+ const qe = "minifier";
787
+ function $(r) {
788
+ switch (r.t = r.type, r.type) {
789
+ case 0: {
790
+ const n = r;
791
+ $(n.body), n.b = n.body, delete n.body;
792
+ break;
793
+ }
794
+ case 1: {
795
+ const n = r, c = n.cases;
796
+ for (let l = 0; l < c.length; l++)
797
+ $(c[l]);
798
+ n.c = c, delete n.cases;
799
+ break;
800
+ }
801
+ case 2: {
802
+ const n = r, c = n.items;
803
+ for (let l = 0; l < c.length; l++)
804
+ $(c[l]);
805
+ n.i = c, delete n.items, n.static && (n.s = n.static, delete n.static);
806
+ break;
807
+ }
808
+ case 3:
809
+ case 9:
810
+ case 8:
811
+ case 7: {
812
+ const n = r;
813
+ n.value && (n.v = n.value, delete n.value);
814
+ break;
815
+ }
816
+ case 6: {
817
+ const n = r;
818
+ $(n.key), n.k = n.key, delete n.key, n.modifier && ($(n.modifier), n.m = n.modifier, delete n.modifier);
819
+ break;
820
+ }
821
+ case 5: {
822
+ const n = r;
823
+ n.i = n.index, delete n.index;
824
+ break;
825
+ }
826
+ case 4: {
827
+ const n = r;
828
+ n.k = n.key, delete n.key;
829
+ break;
830
+ }
831
+ default:
832
+ throw V(L.UNHANDLED_MINIFIER_NODE_TYPE, null, {
833
+ domain: qe,
834
+ args: [r.type]
835
+ });
836
+ }
837
+ delete r.type;
838
+ }
839
+ const je = "parser";
840
+ function Je(r, n) {
841
+ const { sourceMap: c, filename: l, breakLineCode: N, needIndent: f } = n, I = n.location !== !1, _ = {
842
+ filename: l,
843
+ code: "",
844
+ column: 1,
845
+ line: 1,
846
+ offset: 0,
847
+ map: void 0,
848
+ breakLineCode: N,
849
+ needIndent: f,
850
+ indentLevel: 0
851
+ };
852
+ I && r.loc && (_.source = r.loc.source);
853
+ const C = () => _;
854
+ function R(h, b) {
855
+ _.code += h;
856
+ }
857
+ function y(h, b = !0) {
858
+ const w = b ? N : "";
859
+ R(f ? w + " ".repeat(h) : w);
860
+ }
861
+ function T(h = !0) {
862
+ const b = ++_.indentLevel;
863
+ h && y(b);
864
+ }
865
+ function A(h = !0) {
866
+ const b = --_.indentLevel;
867
+ h && y(b);
868
+ }
869
+ function U() {
870
+ y(_.indentLevel);
871
+ }
872
+ return {
873
+ context: C,
874
+ push: R,
875
+ indent: T,
876
+ deindent: A,
877
+ newline: U,
878
+ helper: (h) => `_${h}`,
879
+ needIndent: () => _.needIndent
880
+ };
881
+ }
882
+ function Ze(r, n) {
883
+ const { helper: c } = r;
884
+ r.push(`${c(
885
+ "linked"
886
+ /* HelperNameMap.LINKED */
887
+ )}(`), G(r, n.key), n.modifier ? (r.push(", "), G(r, n.modifier), r.push(", _type")) : r.push(", undefined, _type"), r.push(")");
888
+ }
889
+ function ze(r, n) {
890
+ const { helper: c, needIndent: l } = r;
891
+ r.push(`${c(
892
+ "normalize"
893
+ /* HelperNameMap.NORMALIZE */
894
+ )}([`), r.indent(l());
895
+ const N = n.items.length;
896
+ for (let f = 0; f < N && (G(r, n.items[f]), f !== N - 1); f++)
897
+ r.push(", ");
898
+ r.deindent(l()), r.push("])");
899
+ }
900
+ function et(r, n) {
901
+ const { helper: c, needIndent: l } = r;
902
+ if (n.cases.length > 1) {
903
+ r.push(`${c(
904
+ "plural"
905
+ /* HelperNameMap.PLURAL */
906
+ )}([`), r.indent(l());
907
+ const N = n.cases.length;
908
+ for (let f = 0; f < N && (G(r, n.cases[f]), f !== N - 1); f++)
909
+ r.push(", ");
910
+ r.deindent(l()), r.push("])");
911
+ }
912
+ }
913
+ function tt(r, n) {
914
+ n.body ? G(r, n.body) : r.push("null");
915
+ }
916
+ function G(r, n) {
917
+ const { helper: c } = r;
918
+ switch (n.type) {
919
+ case 0:
920
+ tt(r, n);
921
+ break;
922
+ case 1:
923
+ et(r, n);
924
+ break;
925
+ case 2:
926
+ ze(r, n);
927
+ break;
928
+ case 6:
929
+ Ze(r, n);
930
+ break;
931
+ case 8:
932
+ r.push(JSON.stringify(n.value), n);
933
+ break;
934
+ case 7:
935
+ r.push(JSON.stringify(n.value), n);
936
+ break;
937
+ case 5:
938
+ r.push(`${c(
939
+ "interpolate"
940
+ /* HelperNameMap.INTERPOLATE */
941
+ )}(${c(
942
+ "list"
943
+ /* HelperNameMap.LIST */
944
+ )}(${n.index}))`, n);
945
+ break;
946
+ case 4:
947
+ r.push(`${c(
948
+ "interpolate"
949
+ /* HelperNameMap.INTERPOLATE */
950
+ )}(${c(
951
+ "named"
952
+ /* HelperNameMap.NAMED */
953
+ )}(${JSON.stringify(n.key)}))`, n);
954
+ break;
955
+ case 9:
956
+ r.push(JSON.stringify(n.value), n);
957
+ break;
958
+ case 3:
959
+ r.push(JSON.stringify(n.value), n);
960
+ break;
961
+ default:
962
+ throw V(L.UNHANDLED_CODEGEN_NODE_TYPE, null, {
963
+ domain: je,
964
+ args: [n.type]
965
+ });
966
+ }
967
+ }
968
+ const nt = (r, n = {}) => {
969
+ const c = te(n.mode) ? n.mode : "normal", l = te(n.filename) ? n.filename : "message.intl", N = !!n.sourceMap, f = n.breakLineCode != null ? n.breakLineCode : c === "arrow" ? ";" : `
970
+ `, I = n.needIndent ? n.needIndent : c !== "arrow", _ = r.helpers || [], C = Je(r, {
971
+ mode: c,
972
+ filename: l,
973
+ sourceMap: N,
974
+ breakLineCode: f,
975
+ needIndent: I
976
+ });
977
+ C.push(c === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), C.indent(I), _.length > 0 && (C.push(`const { ${ue(_.map((T) => `${T}: _${T}`), ", ")} } = ctx`), C.newline()), C.push("return "), G(C, r), C.deindent(I), C.push("}"), delete r.helpers;
978
+ const { code: R, map: y } = C.context();
979
+ return {
980
+ ast: r,
981
+ code: R,
982
+ map: y ? y.toJSON() : void 0
983
+ // eslint-disable-line @typescript-eslint/no-explicit-any
984
+ };
985
+ };
986
+ function st(r, n = {}) {
987
+ const c = ce({}, n), l = !!c.jit, N = !!c.minify, f = c.optimize == null ? !0 : c.optimize, _ = Be(c).parse(r);
988
+ return l ? (f && Qe(_), N && $(_), { ast: _, code: "" }) : (We(_, c), nt(_, c));
989
+ }
990
+ export {
991
+ L as CompileErrorCodes,
992
+ ae as CompileWarnCodes,
993
+ $e as ERROR_DOMAIN,
994
+ st as baseCompile,
995
+ V as createCompileError,
996
+ Ue as createCompileWarn,
997
+ B as createLocation,
998
+ Be as createParser,
999
+ me as createPosition,
1000
+ rt as defaultOnError,
1001
+ it as detectHtmlTag,
1002
+ Me as errorMessages,
1003
+ Re as warnMessages
1004
+ };