@keycloakify/angular-email 1.4.0 → 1.6.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.
@@ -1,28 +1,26 @@
1
- import { createCompilerPlugin } from '@angular/build/private';
2
-
1
+ import { createCompilerPlugin } from "@angular/build/private";
3
2
  const angularEsbuildPlugin = (cwd) => createCompilerPlugin({
4
- browserOnlyBuild: false,
5
- incremental: false,
6
- sourcemap: true,
7
- tsconfig: cwd + '/tsconfig.json',
3
+ browserOnlyBuild: false,
4
+ incremental: false,
5
+ sourcemap: true,
6
+ tsconfig: cwd + "/tsconfig.json"
8
7
  }, {
9
- cacheOptions: {
10
- basePath: cwd + '/.angular/cache',
11
- enabled: false,
12
- path: cwd + '/.angular/cache/angular-email',
13
- },
14
- inlineFonts: false,
15
- inlineStyleLanguage: 'css',
16
- optimization: true,
17
- sourcemap: false,
18
- target: [],
19
- workspaceRoot: cwd,
20
- outputNames: { bundles: '', media: '' },
8
+ cacheOptions: {
9
+ basePath: cwd + "/.angular/cache",
10
+ enabled: false,
11
+ path: cwd + "/.angular/cache/angular-email"
12
+ },
13
+ inlineFonts: false,
14
+ inlineStyleLanguage: "css",
15
+ optimization: true,
16
+ sourcemap: false,
17
+ target: [],
18
+ workspaceRoot: cwd,
19
+ outputNames: {
20
+ bundles: "",
21
+ media: ""
22
+ }
21
23
  });
22
-
23
- /**
24
- * Generated bundle index. Do not edit.
25
- */
26
-
27
24
  export { angularEsbuildPlugin };
28
- //# sourceMappingURL=keycloakify-angular-email-esbuild.mjs.map
25
+
26
+ //# sourceMappingURL=keycloakify-angular-email-esbuild.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"keycloakify-angular-email-esbuild.mjs","sources":["../../../projects/angular-email/esbuild/esbuild.ts","../../../projects/angular-email/esbuild/keycloakify-angular-email-esbuild.ts"],"sourcesContent":["import { createCompilerPlugin } from '@angular/build/private';\nimport { Plugin } from 'esbuild';\n\nexport const angularEsbuildPlugin = (cwd: string): Plugin =>\n createCompilerPlugin(\n {\n browserOnlyBuild: false,\n incremental: false,\n sourcemap: true,\n tsconfig: cwd + '/tsconfig.json',\n },\n {\n cacheOptions: {\n basePath: cwd + '/.angular/cache',\n enabled: false,\n path: cwd + '/.angular/cache/angular-email',\n },\n inlineFonts: false,\n inlineStyleLanguage: 'css',\n optimization: true,\n sourcemap: false,\n target: [],\n workspaceRoot: cwd,\n outputNames: { bundles: '', media: '' },\n },\n );\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAGO,MAAM,oBAAoB,GAAG,CAAC,GAAW,KAC9C,oBAAoB,CAClB;AACE,IAAA,gBAAgB,EAAE,KAAK;AACvB,IAAA,WAAW,EAAE,KAAK;AAClB,IAAA,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,GAAG,GAAG,gBAAgB;CACjC,EACD;AACE,IAAA,YAAY,EAAE;QACZ,QAAQ,EAAE,GAAG,GAAG,iBAAiB;AACjC,QAAA,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,GAAG,GAAG,+BAA+B;AAC5C,KAAA;AACD,IAAA,WAAW,EAAE,KAAK;AAClB,IAAA,mBAAmB,EAAE,KAAK;AAC1B,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,aAAa,EAAE,GAAG;IAClB,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;AACxC,CAAA;;ACxBL;;AAEG;;;;"}
1
+ {"version":3,"file":"keycloakify-angular-email-esbuild.mjs","names":[],"sources":["../../../projects/angular-email/esbuild/esbuild.ts"],"sourcesContent":["import { createCompilerPlugin } from '@angular/build/private';\nimport { Plugin } from 'esbuild';\n\nexport const angularEsbuildPlugin = (cwd: string): Plugin =>\n createCompilerPlugin(\n {\n browserOnlyBuild: false,\n incremental: false,\n sourcemap: true,\n tsconfig: cwd + '/tsconfig.json',\n },\n {\n cacheOptions: {\n basePath: cwd + '/.angular/cache',\n enabled: false,\n path: cwd + '/.angular/cache/angular-email',\n },\n inlineFonts: false,\n inlineStyleLanguage: 'css',\n optimization: true,\n sourcemap: false,\n target: [],\n workspaceRoot: cwd,\n outputNames: { bundles: '', media: '' },\n },\n );\n"],"mappings":";AAGA,MAAa,wBAAwB,QACnC,qBACE;CACE,kBAAkB;CAClB,aAAa;CACb,WAAW;CACX,UAAU,MAAM;AACjB,GACD;CACE,cAAc;EACZ,UAAU,MAAM;EAChB,SAAS;EACT,MAAM,MAAM;CACb;CACD,aAAa;CACb,qBAAqB;CACrB,cAAc;CACd,WAAW;CACX,QAAQ,CAAA;CACR,eAAe;CACf,aAAa;EAAE,SAAS;EAAI,OAAO;CAAE;AACtC,CAAA"}
@@ -1,82 +1,68 @@
1
- import tailwindcss from '@tailwindcss/postcss';
2
- import postcss from 'postcss';
3
- import calc from 'postcss-calc';
4
- import properties from 'postcss-custom-properties';
5
- import logical from 'postcss-logical';
6
- import preset from 'postcss-preset-env';
7
-
1
+ import tailwindcss from "@tailwindcss/postcss";
2
+ import postcss from "postcss";
3
+ import calc from "postcss-calc";
4
+ import properties from "postcss-custom-properties";
5
+ import logical from "postcss-logical";
6
+ import preset from "postcss-preset-env";
8
7
  const cssProcessor = async (style, html) => {
9
- try {
10
- const inlineSafelist = html
11
- ? Array.from(new Set((html.match(/class=["']([^"']+)["']/g) ?? [])
12
- .flatMap((m) => m
13
- .replace(/^class=["']|["']$/g, '')
14
- .trim()
15
- .split(/\s+/))
16
- .filter(Boolean)))
17
- .slice(0, 5000) // safety cap
18
- .map((c) => c.replace(/\\/g, '\\\\').replace(/"/g, '\\"'))
19
- .join(' ')
20
- : '';
21
- const styleWithSources = inlineSafelist.length > 0 ? `@source inline("${inlineSafelist}");\n${style}` : style;
22
- const result = await postcss(tailwindcss({ base: '' }), properties({ preserve: false }), calc({ preserve: false }), {
23
- postcssPlugin: 'inline-tw-vars-from-layer',
24
- Once(root) {
25
- const defaultVars = new Map();
26
- // 1. Find the default variables in @layer properties
27
- root.walkAtRules('layer', (layerRule) => {
28
- if (layerRule.params === 'properties') {
29
- layerRule.walkDecls(/^--tw-/, (decl) => {
30
- defaultVars.set(decl.prop, decl.value);
31
- });
32
- }
33
- });
34
- // 2. Walk all rules and replace var() usages
35
- root.walkDecls((decl) => {
36
- decl.value = decl.value.replace(/var\((--tw-[^,)]+)\)/g, (match, varName) => {
37
- return defaultVars.has(varName) ? defaultVars.get(varName) : match;
38
- });
39
- });
40
- },
41
- }, {
42
- postcssPlugin: 'remove-unused-tw-vars',
43
- Once(root) {
44
- root.walkDecls(/^--tw-/, (decl) => {
45
- decl.remove();
46
- });
47
- root.walkAtRules('property', (atRule) => {
48
- if (atRule.params.startsWith('--tw-')) {
49
- atRule.remove();
50
- }
51
- });
52
- root.walkAtRules('layer', (atRule) => {
53
- if (atRule.params === 'properties') {
54
- atRule.remove();
55
- }
56
- });
57
- },
58
- }, logical({
59
- blockDirection: 'top-to-bottom',
60
- inlineDirection: 'left-to-right',
61
- }), preset({
62
- stage: 4,
63
- minimumVendorImplementations: 3,
64
- logical: {
65
- blockDirection: 'top-to-bottom',
66
- inlineDirection: 'left-to-right',
67
- },
68
- })).process(styleWithSources, { map: false, from: undefined });
69
- return result.css;
70
- }
71
- catch (error) {
72
- console.error('CSS processing failed:', error);
73
- throw new Error(`Failed to process CSS: ${error instanceof Error ? error.message : 'Unknown error'}`);
74
- }
8
+ try {
9
+ const inlineSafelist = html ? Array.from(new Set((html.match(/class=["']([^"']+)["']/g) ?? []).flatMap((m) => m.replace(/^class=["']|["']$/g, "").trim().split(/\s+/)).filter(Boolean))).slice(0, 5e3).map((c) => c.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")).join(" ") : "";
10
+ const styleWithSources = inlineSafelist.length > 0 ? `@source inline("${inlineSafelist}");\n${style}` : style;
11
+ return (await postcss(tailwindcss({ base: "" }), properties({ preserve: false }), calc(), {
12
+ postcssPlugin: "unwrap-single-value-calc",
13
+ OnceExit(root) {
14
+ root.walkDecls((decl) => {
15
+ if (!decl.value.includes("calc(")) return;
16
+ decl.value = decl.value.replace(/calc\(\s*([+-]?(?:\d+\.?\d*|\.\d+)(?:[a-z]+|%)?)\s*\)/gi, "$1");
17
+ });
18
+ }
19
+ }, {
20
+ postcssPlugin: "inline-tw-vars-from-layer",
21
+ Once(root) {
22
+ const defaultVars = /* @__PURE__ */ new Map();
23
+ root.walkAtRules("layer", (layerRule) => {
24
+ if (layerRule.params === "properties") layerRule.walkDecls(/^--tw-/, (decl) => {
25
+ defaultVars.set(decl.prop, decl.value);
26
+ });
27
+ });
28
+ root.walkDecls((decl) => {
29
+ decl.value = decl.value.replace(/var\((--tw-[^,)]+)\)/g, (match, varName) => {
30
+ return defaultVars.has(varName) ? defaultVars.get(varName) : match;
31
+ });
32
+ });
33
+ }
34
+ }, {
35
+ postcssPlugin: "remove-unused-tw-vars",
36
+ Once(root) {
37
+ root.walkDecls(/^--tw-/, (decl) => {
38
+ decl.remove();
39
+ });
40
+ root.walkAtRules("property", (atRule) => {
41
+ if (atRule.params.startsWith("--tw-")) atRule.remove();
42
+ });
43
+ root.walkAtRules("layer", (atRule) => {
44
+ if (atRule.params === "properties") atRule.remove();
45
+ });
46
+ }
47
+ }, logical({
48
+ blockDirection: "top-to-bottom",
49
+ inlineDirection: "left-to-right"
50
+ }), preset({
51
+ stage: 4,
52
+ minimumVendorImplementations: 3,
53
+ logical: {
54
+ blockDirection: "top-to-bottom",
55
+ inlineDirection: "left-to-right"
56
+ }
57
+ })).process(styleWithSources, {
58
+ map: false,
59
+ from: void 0
60
+ })).css;
61
+ } catch (error) {
62
+ console.error("CSS processing failed:", error);
63
+ throw new Error(`Failed to process CSS: ${error instanceof Error ? error.message : "Unknown error"}`, { cause: error });
64
+ }
75
65
  };
76
-
77
- /**
78
- * Generated bundle index. Do not edit.
79
- */
80
-
81
66
  export { cssProcessor };
82
- //# sourceMappingURL=keycloakify-angular-email-tailwindcss-preset-email-css-processor.mjs.map
67
+
68
+ //# sourceMappingURL=keycloakify-angular-email-tailwindcss-preset-email-css-processor.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"keycloakify-angular-email-tailwindcss-preset-email-css-processor.mjs","sources":["../../../projects/angular-email/tailwindcss-preset-email/css-processor/css-processor.ts","../../../projects/angular-email/tailwindcss-preset-email/css-processor/keycloakify-angular-email-tailwindcss-preset-email-css-processor.ts"],"sourcesContent":["import tailwindcss from '@tailwindcss/postcss';\nimport postcss from 'postcss';\nimport calc from 'postcss-calc';\nimport properties from 'postcss-custom-properties';\nimport logical, { type DirectionFlow } from 'postcss-logical';\nimport preset from 'postcss-preset-env';\n\nexport const cssProcessor = async (style: string, html: string) => {\n try {\n const inlineSafelist = html\n ? Array.from(\n new Set(\n (html.match(/class=[\"']([^\"']+)[\"']/g) ?? [])\n .flatMap((m) =>\n m\n .replace(/^class=[\"']|[\"']$/g, '')\n .trim()\n .split(/\\s+/),\n )\n .filter(Boolean),\n ),\n )\n .slice(0, 5000) // safety cap\n .map((c) => c.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"'))\n .join(' ')\n : '';\n const styleWithSources = inlineSafelist.length > 0 ? `@source inline(\"${inlineSafelist}\");\\n${style}` : style;\n const result = await postcss(\n tailwindcss({ base: '' }),\n properties({ preserve: false }),\n calc({ preserve: false }),\n {\n postcssPlugin: 'inline-tw-vars-from-layer',\n Once(root) {\n const defaultVars = new Map<string, string>();\n\n // 1. Find the default variables in @layer properties\n root.walkAtRules('layer', (layerRule) => {\n if (layerRule.params === 'properties') {\n layerRule.walkDecls(/^--tw-/, (decl) => {\n defaultVars.set(decl.prop, decl.value);\n });\n }\n });\n\n // 2. Walk all rules and replace var() usages\n root.walkDecls((decl) => {\n decl.value = decl.value.replace(/var\\((--tw-[^,)]+)\\)/g, (match, varName) => {\n return defaultVars.has(varName) ? defaultVars.get(varName)! : match;\n });\n });\n },\n },\n {\n postcssPlugin: 'remove-unused-tw-vars',\n Once(root) {\n root.walkDecls(/^--tw-/, (decl) => {\n decl.remove();\n });\n root.walkAtRules('property', (atRule) => {\n if (atRule.params.startsWith('--tw-')) {\n atRule.remove();\n }\n });\n root.walkAtRules('layer', (atRule) => {\n if (atRule.params === 'properties') {\n atRule.remove();\n }\n });\n },\n },\n logical({\n blockDirection: 'top-to-bottom' as DirectionFlow,\n inlineDirection: 'left-to-right' as DirectionFlow,\n }),\n preset({\n stage: 4,\n minimumVendorImplementations: 3,\n logical: {\n blockDirection: 'top-to-bottom' as DirectionFlow,\n inlineDirection: 'left-to-right' as DirectionFlow,\n },\n }),\n ).process(styleWithSources, { map: false, from: undefined });\n return result.css;\n } catch (error) {\n console.error('CSS processing failed:', error);\n throw new Error(`Failed to process CSS: ${error instanceof Error ? error.message : 'Unknown error'}`);\n }\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAOO,MAAM,YAAY,GAAG,OAAO,KAAa,EAAE,IAAY,KAAI;AAChE,IAAA,IAAI;QACF,MAAM,cAAc,GAAG;AACrB,cAAE,KAAK,CAAC,IAAI,CACR,IAAI,GAAG,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,yBAAyB,CAAC,IAAI,EAAE;AACzC,iBAAA,OAAO,CAAC,CAAC,CAAC,KACT;AACG,iBAAA,OAAO,CAAC,oBAAoB,EAAE,EAAE;AAChC,iBAAA,IAAI;iBACJ,KAAK,CAAC,KAAK,CAAC;AAEhB,iBAAA,MAAM,CAAC,OAAO,CAAC,CACnB;AAEA,iBAAA,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC;iBACd,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;iBACxD,IAAI,CAAC,GAAG;cACX,EAAE;AACN,QAAA,MAAM,gBAAgB,GAAG,c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AAI;oBAChC,IAAI,CAAC,MAAM,EAAE;AACf,gBAAA,CAAC,CAAC;gBACF,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,MAAM,KAAI;oBACtC,IAAI,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;wBACrC,MAAM,CAAC,MAAM,EAAE;oBACjB;AACF,gBAAA,CAAC,CAAC;gBACF,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,MAAM,KAAI;AACnC,oBAAA,IAAI,MAAM,CAAC,MAAM,KAAK,YAAY,EAAE;wBAClC,MAAM,CAAC,MAAM,EAAE;oBACjB;AACF,gBAAA,CAAC,CAAC;YACJ,CAAC;AACF,SAAA,EACD,OAAO,CAAC;AACN,YAAA,cAAc,EAAE,eAAgC;AAChD,YAAA,eAAe,EAAE,eAAgC;SAClD,CAAC,EACF,MAAM,CAAC;AACL,YAAA,KAAK,EAAE,CAAC;AACR,YAAA,4BAA4B,EAAE,CAAC;AAC/B,YAAA,OAAO,EAAE;AACP,gBAAA,cAAc,EAAE,eAAgC;AAChD,gBAAA,eAAe,EAAE,eAAgC;AAClD,aAAA;AACF,SAAA,CAAC,CACH,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAC5D,OAAO,MAAM,CAAC,GAAG;IACnB;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC;AAC9C,QAAA,MAAM,IAAI,KAAK,CAAC,0BAA0B,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,eAAe,CAAA,CAAE,CAAC;IACvG;AACF;;ACzFA;;AAEG;;;;"}
1
+ {"version":3,"file":"keycloakify-angular-email-tailwindcss-preset-email-css-processor.mjs","names":[],"sources":["../../../projects/angular-email/tailwindcss-preset-email/css-processor/css-processor.ts"],"sourcesContent":["import tailwindcss from '@tailwindcss/postcss';\nimport postcss from 'postcss';\nimport calc from 'postcss-calc';\nimport properties from 'postcss-custom-properties';\nimport logical, { type DirectionFlow } from 'postcss-logical';\nimport preset from 'postcss-preset-env';\n\nexport const cssProcessor = async (style: string, html: string) => {\n try {\n const inlineSafelist = html\n ? Array.from(\n new Set(\n (html.match(/class=[\"']([^\"']+)[\"']/g) ?? [])\n .flatMap((m) =>\n m\n .replace(/^class=[\"']|[\"']$/g, '')\n .trim()\n .split(/\\s+/),\n )\n .filter(Boolean),\n ),\n )\n .slice(0, 5000) // safety cap\n .map((c) => c.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"'))\n .join(' ')\n : '';\n const styleWithSources = inlineSafelist.length > 0 ? `@source inline(\"${inlineSafelist}\");\\n${style}` : style;\n const result = await postcss(\n tailwindcss({ base: '' }),\n properties({ preserve: false }),\n calc(),\n {\n // postcss-calc >= 11 reduces `calc(4px * 12)` to `calc(48px)` but keeps the wrapper:\n // email clients without calc() support (Outlook, Outlook.com) drop the whole declaration.\n // Only single-value calc() are unwrapped; real expressions (e.g. `calc(100% - 20px)`) are kept.\n // OnceExit: postcss-calc reduces in its own OnceExit, which runs before this one (plugin order).\n postcssPlugin: 'unwrap-single-value-calc',\n OnceExit(root) {\n root.walkDecls((decl) => {\n if (!decl.value.includes('calc(')) return;\n decl.value = decl.value.replace(/calc\\(\\s*([+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:[a-z]+|%)?)\\s*\\)/gi, '$1');\n });\n },\n },\n {\n postcssPlugin: 'inline-tw-vars-from-layer',\n Once(root) {\n const defaultVars = new Map<string, string>();\n\n // 1. Find the default variables in @layer properties\n root.walkAtRules('layer', (layerRule) => {\n if (layerRule.params === 'properties') {\n layerRule.walkDecls(/^--tw-/, (decl) => {\n defaultVars.set(decl.prop, decl.value);\n });\n }\n });\n\n // 2. Walk all rules and replace var() usages\n root.walkDecls((decl) => {\n decl.value = decl.value.replace(/var\\((--tw-[^,)]+)\\)/g, (match, varName) => {\n return defaultVars.has(varName) ? defaultVars.get(varName)! : match;\n });\n });\n },\n },\n {\n postcssPlugin: 'remove-unused-tw-vars',\n Once(root) {\n root.walkDecls(/^--tw-/, (decl) => {\n decl.remove();\n });\n root.walkAtRules('property', (atRule) => {\n if (atRule.params.startsWith('--tw-')) {\n atRule.remove();\n }\n });\n root.walkAtRules('layer', (atRule) => {\n if (atRule.params === 'properties') {\n atRule.remove();\n }\n });\n },\n },\n logical({\n blockDirection: 'top-to-bottom' as DirectionFlow,\n inlineDirection: 'left-to-right' as DirectionFlow,\n }),\n preset({\n stage: 4,\n minimumVendorImplementations: 3,\n logical: {\n blockDirection: 'top-to-bottom' as DirectionFlow,\n inlineDirection: 'left-to-right' as DirectionFlow,\n },\n }),\n ).process(styleWithSources, { map: false, from: undefined });\n return result.css;\n } catch (error) {\n console.error('CSS processing failed:', error);\n throw new Error(`Failed to process CSS: ${error instanceof Error ? error.message : 'Unknown error'}`, {\n cause: error,\n });\n }\n};\n"],"mappings":";;;;;;AAOA,MAAa,eAAe,OAAO,OAAe,SAAgB;CAChE,IAAI;EACF,MAAM,iBAAiB,OACnB,MAAM,KACJ,IAAI,KACD,KAAK,MAAM,yBAAyB,KAAK,CAAA,EAAA,CACvC,SAAS,MACR,EACG,QAAQ,sBAAsB,EAAE,CAAC,CACjC,KAAI,CAAE,CACN,MAAM,KAAK,CAAC,CAChB,CACA,OAAO,OAAO,CAAC,CACnB,CACF,CACE,MAAM,GAAG,GAAI,CAAC,CACd,KAAK,MAAM,EAAE,QAAQ,OAAO,MAAM,CAAC,CAAC,QAAQ,MAAM,MAAK,CAAC,CAAC,CACzD,KAAK,GAAG,IACX;EACJ,MAAM,mBAAmB,eAAe,SAAS,IAAI,mBAAmB,eAAc,OAAQ,UAAU;EAuExG,QAAO,MAtEc,QACnB,YAAY,EAAE,MAAM,GAAE,CAAE,GACxB,WAAW,EAAE,UAAU,MAAK,CAAE,GAC9B,KAAI,GACJ;GAKE,eA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