GitHub Actions commited on
Commit
ff6ab6d
·
1 Parent(s): db7ee8a

Deploy from GitHub Actions (2026-03-06 15:20 UTC)

Browse files
.gitignore CHANGED
@@ -227,3 +227,6 @@ nginx/logs/
227
  # Database backups
228
  *.sql
229
  !scripts/init-db.sql
 
 
 
 
227
  # Database backups
228
  *.sql
229
  !scripts/init-db.sql
230
+
231
+ # Node.js (frontend-widget Vite/Preact source project)
232
+ frontend-widget/node_modules/
frontend-widget/package-lock.json ADDED
@@ -0,0 +1,2059 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "smart-chatbot-widget",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "smart-chatbot-widget",
9
+ "version": "1.0.0",
10
+ "dependencies": {
11
+ "marked": "^9.0.0",
12
+ "preact": "^10.0.0"
13
+ },
14
+ "devDependencies": {
15
+ "@preact/preset-vite": "^2.9.0",
16
+ "vite": "^6.0.0"
17
+ }
18
+ },
19
+ "node_modules/@babel/code-frame": {
20
+ "version": "7.29.0",
21
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz",
22
+ "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==",
23
+ "dev": true,
24
+ "license": "MIT",
25
+ "dependencies": {
26
+ "@babel/helper-validator-identifier": "^7.28.5",
27
+ "js-tokens": "^4.0.0",
28
+ "picocolors": "^1.1.1"
29
+ },
30
+ "engines": {
31
+ "node": ">=6.9.0"
32
+ }
33
+ },
34
+ "node_modules/@babel/compat-data": {
35
+ "version": "7.29.0",
36
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz",
37
+ "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==",
38
+ "dev": true,
39
+ "license": "MIT",
40
+ "engines": {
41
+ "node": ">=6.9.0"
42
+ }
43
+ },
44
+ "node_modules/@babel/core": {
45
+ "version": "7.29.0",
46
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz",
47
+ "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==",
48
+ "dev": true,
49
+ "license": "MIT",
50
+ "dependencies": {
51
+ "@babel/code-frame": "^7.29.0",
52
+ "@babel/generator": "^7.29.0",
53
+ "@babel/helper-compilation-targets": "^7.28.6",
54
+ "@babel/helper-module-transforms": "^7.28.6",
55
+ "@babel/helpers": "^7.28.6",
56
+ "@babel/parser": "^7.29.0",
57
+ "@babel/template": "^7.28.6",
58
+ "@babel/traverse": "^7.29.0",
59
+ "@babel/types": "^7.29.0",
60
+ "@jridgewell/remapping": "^2.3.5",
61
+ "convert-source-map": "^2.0.0",
62
+ "debug": "^4.1.0",
63
+ "gensync": "^1.0.0-beta.2",
64
+ "json5": "^2.2.3",
65
+ "semver": "^6.3.1"
66
+ },
67
+ "engines": {
68
+ "node": ">=6.9.0"
69
+ },
70
+ "funding": {
71
+ "type": "opencollective",
72
+ "url": "https://opencollective.com/babel"
73
+ }
74
+ },
75
+ "node_modules/@babel/generator": {
76
+ "version": "7.29.1",
77
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz",
78
+ "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==",
79
+ "dev": true,
80
+ "license": "MIT",
81
+ "dependencies": {
82
+ "@babel/parser": "^7.29.0",
83
+ "@babel/types": "^7.29.0",
84
+ "@jridgewell/gen-mapping": "^0.3.12",
85
+ "@jridgewell/trace-mapping": "^0.3.28",
86
+ "jsesc": "^3.0.2"
87
+ },
88
+ "engines": {
89
+ "node": ">=6.9.0"
90
+ }
91
+ },
92
+ "node_modules/@babel/helper-annotate-as-pure": {
93
+ "version": "7.27.3",
94
+ "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz",
95
+ "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==",
96
+ "dev": true,
97
+ "license": "MIT",
98
+ "dependencies": {
99
+ "@babel/types": "^7.27.3"
100
+ },
101
+ "engines": {
102
+ "node": ">=6.9.0"
103
+ }
104
+ },
105
+ "node_modules/@babel/helper-compilation-targets": {
106
+ "version": "7.28.6",
107
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz",
108
+ "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==",
109
+ "dev": true,
110
+ "license": "MIT",
111
+ "dependencies": {
112
+ "@babel/compat-data": "^7.28.6",
113
+ "@babel/helper-validator-option": "^7.27.1",
114
+ "browserslist": "^4.24.0",
115
+ "lru-cache": "^5.1.1",
116
+ "semver": "^6.3.1"
117
+ },
118
+ "engines": {
119
+ "node": ">=6.9.0"
120
+ }
121
+ },
122
+ "node_modules/@babel/helper-globals": {
123
+ "version": "7.28.0",
124
+ "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz",
125
+ "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==",
126
+ "dev": true,
127
+ "license": "MIT",
128
+ "engines": {
129
+ "node": ">=6.9.0"
130
+ }
131
+ },
132
+ "node_modules/@babel/helper-module-imports": {
133
+ "version": "7.28.6",
134
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz",
135
+ "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==",
136
+ "dev": true,
137
+ "license": "MIT",
138
+ "dependencies": {
139
+ "@babel/traverse": "^7.28.6",
140
+ "@babel/types": "^7.28.6"
141
+ },
142
+ "engines": {
143
+ "node": ">=6.9.0"
144
+ }
145
+ },
146
+ "node_modules/@babel/helper-module-transforms": {
147
+ "version": "7.28.6",
148
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz",
149
+ "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==",
150
+ "dev": true,
151
+ "license": "MIT",
152
+ "dependencies": {
153
+ "@babel/helper-module-imports": "^7.28.6",
154
+ "@babel/helper-validator-identifier": "^7.28.5",
155
+ "@babel/traverse": "^7.28.6"
156
+ },
157
+ "engines": {
158
+ "node": ">=6.9.0"
159
+ },
160
+ "peerDependencies": {
161
+ "@babel/core": "^7.0.0"
162
+ }
163
+ },
164
+ "node_modules/@babel/helper-plugin-utils": {
165
+ "version": "7.28.6",
166
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz",
167
+ "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==",
168
+ "dev": true,
169
+ "license": "MIT",
170
+ "engines": {
171
+ "node": ">=6.9.0"
172
+ }
173
+ },
174
+ "node_modules/@babel/helper-string-parser": {
175
+ "version": "7.27.1",
176
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
177
+ "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
178
+ "dev": true,
179
+ "license": "MIT",
180
+ "engines": {
181
+ "node": ">=6.9.0"
182
+ }
183
+ },
184
+ "node_modules/@babel/helper-validator-identifier": {
185
+ "version": "7.28.5",
186
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",
187
+ "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",
188
+ "dev": true,
189
+ "license": "MIT",
190
+ "engines": {
191
+ "node": ">=6.9.0"
192
+ }
193
+ },
194
+ "node_modules/@babel/helper-validator-option": {
195
+ "version": "7.27.1",
196
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz",
197
+ "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==",
198
+ "dev": true,
199
+ "license": "MIT",
200
+ "engines": {
201
+ "node": ">=6.9.0"
202
+ }
203
+ },
204
+ "node_modules/@babel/helpers": {
205
+ "version": "7.28.6",
206
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.6.tgz",
207
+ "integrity": "sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw==",
208
+ "dev": true,
209
+ "license": "MIT",
210
+ "dependencies": {
211
+ "@babel/template": "^7.28.6",
212
+ "@babel/types": "^7.28.6"
213
+ },
214
+ "engines": {
215
+ "node": ">=6.9.0"
216
+ }
217
+ },
218
+ "node_modules/@babel/parser": {
219
+ "version": "7.29.0",
220
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.0.tgz",
221
+ "integrity": "sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww==",
222
+ "dev": true,
223
+ "license": "MIT",
224
+ "dependencies": {
225
+ "@babel/types": "^7.29.0"
226
+ },
227
+ "bin": {
228
+ "parser": "bin/babel-parser.js"
229
+ },
230
+ "engines": {
231
+ "node": ">=6.0.0"
232
+ }
233
+ },
234
+ "node_modules/@babel/plugin-syntax-jsx": {
235
+ "version": "7.28.6",
236
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz",
237
+ "integrity": "sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w==",
238
+ "dev": true,
239
+ "license": "MIT",
240
+ "dependencies": {
241
+ "@babel/helper-plugin-utils": "^7.28.6"
242
+ },
243
+ "engines": {
244
+ "node": ">=6.9.0"
245
+ },
246
+ "peerDependencies": {
247
+ "@babel/core": "^7.0.0-0"
248
+ }
249
+ },
250
+ "node_modules/@babel/plugin-transform-react-jsx": {
251
+ "version": "7.28.6",
252
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.28.6.tgz",
253
+ "integrity": "sha512-61bxqhiRfAACulXSLd/GxqmAedUSrRZIu/cbaT18T1CetkTmtDN15it7i80ru4DVqRK1WMxQhXs+Lf9kajm5Ow==",
254
+ "dev": true,
255
+ "license": "MIT",
256
+ "dependencies": {
257
+ "@babel/helper-annotate-as-pure": "^7.27.3",
258
+ "@babel/helper-module-imports": "^7.28.6",
259
+ "@babel/helper-plugin-utils": "^7.28.6",
260
+ "@babel/plugin-syntax-jsx": "^7.28.6",
261
+ "@babel/types": "^7.28.6"
262
+ },
263
+ "engines": {
264
+ "node": ">=6.9.0"
265
+ },
266
+ "peerDependencies": {
267
+ "@babel/core": "^7.0.0-0"
268
+ }
269
+ },
270
+ "node_modules/@babel/plugin-transform-react-jsx-development": {
271
+ "version": "7.27.1",
272
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.27.1.tgz",
273
+ "integrity": "sha512-ykDdF5yI4f1WrAolLqeF3hmYU12j9ntLQl/AOG1HAS21jxyg1Q0/J/tpREuYLfatGdGmXp/3yS0ZA76kOlVq9Q==",
274
+ "dev": true,
275
+ "license": "MIT",
276
+ "dependencies": {
277
+ "@babel/plugin-transform-react-jsx": "^7.27.1"
278
+ },
279
+ "engines": {
280
+ "node": ">=6.9.0"
281
+ },
282
+ "peerDependencies": {
283
+ "@babel/core": "^7.0.0-0"
284
+ }
285
+ },
286
+ "node_modules/@babel/template": {
287
+ "version": "7.28.6",
288
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz",
289
+ "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==",
290
+ "dev": true,
291
+ "license": "MIT",
292
+ "dependencies": {
293
+ "@babel/code-frame": "^7.28.6",
294
+ "@babel/parser": "^7.28.6",
295
+ "@babel/types": "^7.28.6"
296
+ },
297
+ "engines": {
298
+ "node": ">=6.9.0"
299
+ }
300
+ },
301
+ "node_modules/@babel/traverse": {
302
+ "version": "7.29.0",
303
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz",
304
+ "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==",
305
+ "dev": true,
306
+ "license": "MIT",
307
+ "dependencies": {
308
+ "@babel/code-frame": "^7.29.0",
309
+ "@babel/generator": "^7.29.0",
310
+ "@babel/helper-globals": "^7.28.0",
311
+ "@babel/parser": "^7.29.0",
312
+ "@babel/template": "^7.28.6",
313
+ "@babel/types": "^7.29.0",
314
+ "debug": "^4.3.1"
315
+ },
316
+ "engines": {
317
+ "node": ">=6.9.0"
318
+ }
319
+ },
320
+ "node_modules/@babel/types": {
321
+ "version": "7.29.0",
322
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz",
323
+ "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==",
324
+ "dev": true,
325
+ "license": "MIT",
326
+ "dependencies": {
327
+ "@babel/helper-string-parser": "^7.27.1",
328
+ "@babel/helper-validator-identifier": "^7.28.5"
329
+ },
330
+ "engines": {
331
+ "node": ">=6.9.0"
332
+ }
333
+ },
334
+ "node_modules/@esbuild/aix-ppc64": {
335
+ "version": "0.25.12",
336
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz",
337
+ "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==",
338
+ "cpu": [
339
+ "ppc64"
340
+ ],
341
+ "dev": true,
342
+ "license": "MIT",
343
+ "optional": true,
344
+ "os": [
345
+ "aix"
346
+ ],
347
+ "engines": {
348
+ "node": ">=18"
349
+ }
350
+ },
351
+ "node_modules/@esbuild/android-arm": {
352
+ "version": "0.25.12",
353
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz",
354
+ "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==",
355
+ "cpu": [
356
+ "arm"
357
+ ],
358
+ "dev": true,
359
+ "license": "MIT",
360
+ "optional": true,
361
+ "os": [
362
+ "android"
363
+ ],
364
+ "engines": {
365
+ "node": ">=18"
366
+ }
367
+ },
368
+ "node_modules/@esbuild/android-arm64": {
369
+ "version": "0.25.12",
370
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz",
371
+ "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==",
372
+ "cpu": [
373
+ "arm64"
374
+ ],
375
+ "dev": true,
376
+ "license": "MIT",
377
+ "optional": true,
378
+ "os": [
379
+ "android"
380
+ ],
381
+ "engines": {
382
+ "node": ">=18"
383
+ }
384
+ },
385
+ "node_modules/@esbuild/android-x64": {
386
+ "version": "0.25.12",
387
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz",
388
+ "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==",
389
+ "cpu": [
390
+ "x64"
391
+ ],
392
+ "dev": true,
393
+ "license": "MIT",
394
+ "optional": true,
395
+ "os": [
396
+ "android"
397
+ ],
398
+ "engines": {
399
+ "node": ">=18"
400
+ }
401
+ },
402
+ "node_modules/@esbuild/darwin-arm64": {
403
+ "version": "0.25.12",
404
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz",
405
+ "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==",
406
+ "cpu": [
407
+ "arm64"
408
+ ],
409
+ "dev": true,
410
+ "license": "MIT",
411
+ "optional": true,
412
+ "os": [
413
+ "darwin"
414
+ ],
415
+ "engines": {
416
+ "node": ">=18"
417
+ }
418
+ },
419
+ "node_modules/@esbuild/darwin-x64": {
420
+ "version": "0.25.12",
421
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz",
422
+ "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==",
423
+ "cpu": [
424
+ "x64"
425
+ ],
426
+ "dev": true,
427
+ "license": "MIT",
428
+ "optional": true,
429
+ "os": [
430
+ "darwin"
431
+ ],
432
+ "engines": {
433
+ "node": ">=18"
434
+ }
435
+ },
436
+ "node_modules/@esbuild/freebsd-arm64": {
437
+ "version": "0.25.12",
438
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz",
439
+ "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==",
440
+ "cpu": [
441
+ "arm64"
442
+ ],
443
+ "dev": true,
444
+ "license": "MIT",
445
+ "optional": true,
446
+ "os": [
447
+ "freebsd"
448
+ ],
449
+ "engines": {
450
+ "node": ">=18"
451
+ }
452
+ },
453
+ "node_modules/@esbuild/freebsd-x64": {
454
+ "version": "0.25.12",
455
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz",
456
+ "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==",
457
+ "cpu": [
458
+ "x64"
459
+ ],
460
+ "dev": true,
461
+ "license": "MIT",
462
+ "optional": true,
463
+ "os": [
464
+ "freebsd"
465
+ ],
466
+ "engines": {
467
+ "node": ">=18"
468
+ }
469
+ },
470
+ "node_modules/@esbuild/linux-arm": {
471
+ "version": "0.25.12",
472
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz",
473
+ "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==",
474
+ "cpu": [
475
+ "arm"
476
+ ],
477
+ "dev": true,
478
+ "license": "MIT",
479
+ "optional": true,
480
+ "os": [
481
+ "linux"
482
+ ],
483
+ "engines": {
484
+ "node": ">=18"
485
+ }
486
+ },
487
+ "node_modules/@esbuild/linux-arm64": {
488
+ "version": "0.25.12",
489
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz",
490
+ "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==",
491
+ "cpu": [
492
+ "arm64"
493
+ ],
494
+ "dev": true,
495
+ "license": "MIT",
496
+ "optional": true,
497
+ "os": [
498
+ "linux"
499
+ ],
500
+ "engines": {
501
+ "node": ">=18"
502
+ }
503
+ },
504
+ "node_modules/@esbuild/linux-ia32": {
505
+ "version": "0.25.12",
506
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz",
507
+ "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==",
508
+ "cpu": [
509
+ "ia32"
510
+ ],
511
+ "dev": true,
512
+ "license": "MIT",
513
+ "optional": true,
514
+ "os": [
515
+ "linux"
516
+ ],
517
+ "engines": {
518
+ "node": ">=18"
519
+ }
520
+ },
521
+ "node_modules/@esbuild/linux-loong64": {
522
+ "version": "0.25.12",
523
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz",
524
+ "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==",
525
+ "cpu": [
526
+ "loong64"
527
+ ],
528
+ "dev": true,
529
+ "license": "MIT",
530
+ "optional": true,
531
+ "os": [
532
+ "linux"
533
+ ],
534
+ "engines": {
535
+ "node": ">=18"
536
+ }
537
+ },
538
+ "node_modules/@esbuild/linux-mips64el": {
539
+ "version": "0.25.12",
540
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz",
541
+ "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==",
542
+ "cpu": [
543
+ "mips64el"
544
+ ],
545
+ "dev": true,
546
+ "license": "MIT",
547
+ "optional": true,
548
+ "os": [
549
+ "linux"
550
+ ],
551
+ "engines": {
552
+ "node": ">=18"
553
+ }
554
+ },
555
+ "node_modules/@esbuild/linux-ppc64": {
556
+ "version": "0.25.12",
557
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz",
558
+ "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==",
559
+ "cpu": [
560
+ "ppc64"
561
+ ],
562
+ "dev": true,
563
+ "license": "MIT",
564
+ "optional": true,
565
+ "os": [
566
+ "linux"
567
+ ],
568
+ "engines": {
569
+ "node": ">=18"
570
+ }
571
+ },
572
+ "node_modules/@esbuild/linux-riscv64": {
573
+ "version": "0.25.12",
574
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz",
575
+ "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==",
576
+ "cpu": [
577
+ "riscv64"
578
+ ],
579
+ "dev": true,
580
+ "license": "MIT",
581
+ "optional": true,
582
+ "os": [
583
+ "linux"
584
+ ],
585
+ "engines": {
586
+ "node": ">=18"
587
+ }
588
+ },
589
+ "node_modules/@esbuild/linux-s390x": {
590
+ "version": "0.25.12",
591
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz",
592
+ "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==",
593
+ "cpu": [
594
+ "s390x"
595
+ ],
596
+ "dev": true,
597
+ "license": "MIT",
598
+ "optional": true,
599
+ "os": [
600
+ "linux"
601
+ ],
602
+ "engines": {
603
+ "node": ">=18"
604
+ }
605
+ },
606
+ "node_modules/@esbuild/linux-x64": {
607
+ "version": "0.25.12",
608
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz",
609
+ "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==",
610
+ "cpu": [
611
+ "x64"
612
+ ],
613
+ "dev": true,
614
+ "license": "MIT",
615
+ "optional": true,
616
+ "os": [
617
+ "linux"
618
+ ],
619
+ "engines": {
620
+ "node": ">=18"
621
+ }
622
+ },
623
+ "node_modules/@esbuild/netbsd-arm64": {
624
+ "version": "0.25.12",
625
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz",
626
+ "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==",
627
+ "cpu": [
628
+ "arm64"
629
+ ],
630
+ "dev": true,
631
+ "license": "MIT",
632
+ "optional": true,
633
+ "os": [
634
+ "netbsd"
635
+ ],
636
+ "engines": {
637
+ "node": ">=18"
638
+ }
639
+ },
640
+ "node_modules/@esbuild/netbsd-x64": {
641
+ "version": "0.25.12",
642
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz",
643
+ "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==",
644
+ "cpu": [
645
+ "x64"
646
+ ],
647
+ "dev": true,
648
+ "license": "MIT",
649
+ "optional": true,
650
+ "os": [
651
+ "netbsd"
652
+ ],
653
+ "engines": {
654
+ "node": ">=18"
655
+ }
656
+ },
657
+ "node_modules/@esbuild/openbsd-arm64": {
658
+ "version": "0.25.12",
659
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz",
660
+ "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==",
661
+ "cpu": [
662
+ "arm64"
663
+ ],
664
+ "dev": true,
665
+ "license": "MIT",
666
+ "optional": true,
667
+ "os": [
668
+ "openbsd"
669
+ ],
670
+ "engines": {
671
+ "node": ">=18"
672
+ }
673
+ },
674
+ "node_modules/@esbuild/openbsd-x64": {
675
+ "version": "0.25.12",
676
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz",
677
+ "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==",
678
+ "cpu": [
679
+ "x64"
680
+ ],
681
+ "dev": true,
682
+ "license": "MIT",
683
+ "optional": true,
684
+ "os": [
685
+ "openbsd"
686
+ ],
687
+ "engines": {
688
+ "node": ">=18"
689
+ }
690
+ },
691
+ "node_modules/@esbuild/openharmony-arm64": {
692
+ "version": "0.25.12",
693
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz",
694
+ "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==",
695
+ "cpu": [
696
+ "arm64"
697
+ ],
698
+ "dev": true,
699
+ "license": "MIT",
700
+ "optional": true,
701
+ "os": [
702
+ "openharmony"
703
+ ],
704
+ "engines": {
705
+ "node": ">=18"
706
+ }
707
+ },
708
+ "node_modules/@esbuild/sunos-x64": {
709
+ "version": "0.25.12",
710
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz",
711
+ "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==",
712
+ "cpu": [
713
+ "x64"
714
+ ],
715
+ "dev": true,
716
+ "license": "MIT",
717
+ "optional": true,
718
+ "os": [
719
+ "sunos"
720
+ ],
721
+ "engines": {
722
+ "node": ">=18"
723
+ }
724
+ },
725
+ "node_modules/@esbuild/win32-arm64": {
726
+ "version": "0.25.12",
727
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz",
728
+ "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==",
729
+ "cpu": [
730
+ "arm64"
731
+ ],
732
+ "dev": true,
733
+ "license": "MIT",
734
+ "optional": true,
735
+ "os": [
736
+ "win32"
737
+ ],
738
+ "engines": {
739
+ "node": ">=18"
740
+ }
741
+ },
742
+ "node_modules/@esbuild/win32-ia32": {
743
+ "version": "0.25.12",
744
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz",
745
+ "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==",
746
+ "cpu": [
747
+ "ia32"
748
+ ],
749
+ "dev": true,
750
+ "license": "MIT",
751
+ "optional": true,
752
+ "os": [
753
+ "win32"
754
+ ],
755
+ "engines": {
756
+ "node": ">=18"
757
+ }
758
+ },
759
+ "node_modules/@esbuild/win32-x64": {
760
+ "version": "0.25.12",
761
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz",
762
+ "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==",
763
+ "cpu": [
764
+ "x64"
765
+ ],
766
+ "dev": true,
767
+ "license": "MIT",
768
+ "optional": true,
769
+ "os": [
770
+ "win32"
771
+ ],
772
+ "engines": {
773
+ "node": ">=18"
774
+ }
775
+ },
776
+ "node_modules/@jridgewell/gen-mapping": {
777
+ "version": "0.3.13",
778
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
779
+ "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
780
+ "dev": true,
781
+ "license": "MIT",
782
+ "dependencies": {
783
+ "@jridgewell/sourcemap-codec": "^1.5.0",
784
+ "@jridgewell/trace-mapping": "^0.3.24"
785
+ }
786
+ },
787
+ "node_modules/@jridgewell/remapping": {
788
+ "version": "2.3.5",
789
+ "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",
790
+ "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",
791
+ "dev": true,
792
+ "license": "MIT",
793
+ "dependencies": {
794
+ "@jridgewell/gen-mapping": "^0.3.5",
795
+ "@jridgewell/trace-mapping": "^0.3.24"
796
+ }
797
+ },
798
+ "node_modules/@jridgewell/resolve-uri": {
799
+ "version": "3.1.2",
800
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
801
+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
802
+ "dev": true,
803
+ "license": "MIT",
804
+ "engines": {
805
+ "node": ">=6.0.0"
806
+ }
807
+ },
808
+ "node_modules/@jridgewell/sourcemap-codec": {
809
+ "version": "1.5.5",
810
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
811
+ "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
812
+ "dev": true,
813
+ "license": "MIT"
814
+ },
815
+ "node_modules/@jridgewell/trace-mapping": {
816
+ "version": "0.3.31",
817
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",
818
+ "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",
819
+ "dev": true,
820
+ "license": "MIT",
821
+ "dependencies": {
822
+ "@jridgewell/resolve-uri": "^3.1.0",
823
+ "@jridgewell/sourcemap-codec": "^1.4.14"
824
+ }
825
+ },
826
+ "node_modules/@preact/preset-vite": {
827
+ "version": "2.10.3",
828
+ "resolved": "https://registry.npmjs.org/@preact/preset-vite/-/preset-vite-2.10.3.tgz",
829
+ "integrity": "sha512-1SiS+vFItpkNdBs7q585PSAIln0wBeBdcpJYbzPs1qipsb/FssnkUioNXuRsb8ZnU8YEQHr+3v8+/mzWSnTQmg==",
830
+ "dev": true,
831
+ "license": "MIT",
832
+ "dependencies": {
833
+ "@babel/plugin-transform-react-jsx": "^7.27.1",
834
+ "@babel/plugin-transform-react-jsx-development": "^7.27.1",
835
+ "@prefresh/vite": "^2.4.11",
836
+ "@rollup/pluginutils": "^5.0.0",
837
+ "babel-plugin-transform-hook-names": "^1.0.2",
838
+ "debug": "^4.4.3",
839
+ "picocolors": "^1.1.1",
840
+ "vite-prerender-plugin": "^0.5.8"
841
+ },
842
+ "peerDependencies": {
843
+ "@babel/core": "7.x",
844
+ "vite": "2.x || 3.x || 4.x || 5.x || 6.x || 7.x"
845
+ }
846
+ },
847
+ "node_modules/@prefresh/babel-plugin": {
848
+ "version": "0.5.3",
849
+ "resolved": "https://registry.npmjs.org/@prefresh/babel-plugin/-/babel-plugin-0.5.3.tgz",
850
+ "integrity": "sha512-57LX2SHs4BX2s1IwCjNzTE2OJeEepRCNf1VTEpbNcUyHfMO68eeOWGDIt4ob9aYlW6PEWZ1SuwNikuoIXANDtQ==",
851
+ "dev": true,
852
+ "license": "MIT"
853
+ },
854
+ "node_modules/@prefresh/core": {
855
+ "version": "1.5.9",
856
+ "resolved": "https://registry.npmjs.org/@prefresh/core/-/core-1.5.9.tgz",
857
+ "integrity": "sha512-IKBKCPaz34OFVC+adiQ2qaTF5qdztO2/4ZPf4KsRTgjKosWqxVXmEbxCiUydYZRY8GVie+DQlKzQr9gt6HQ+EQ==",
858
+ "dev": true,
859
+ "license": "MIT",
860
+ "peerDependencies": {
861
+ "preact": "^10.0.0 || ^11.0.0-0"
862
+ }
863
+ },
864
+ "node_modules/@prefresh/utils": {
865
+ "version": "1.2.1",
866
+ "resolved": "https://registry.npmjs.org/@prefresh/utils/-/utils-1.2.1.tgz",
867
+ "integrity": "sha512-vq/sIuN5nYfYzvyayXI4C2QkprfNaHUQ9ZX+3xLD8nL3rWyzpxOm1+K7RtMbhd+66QcaISViK7amjnheQ/4WZw==",
868
+ "dev": true,
869
+ "license": "MIT"
870
+ },
871
+ "node_modules/@prefresh/vite": {
872
+ "version": "2.4.12",
873
+ "resolved": "https://registry.npmjs.org/@prefresh/vite/-/vite-2.4.12.tgz",
874
+ "integrity": "sha512-FY1fzXpUjiuosznMV0YM7XAOPZjB5FIdWS0W24+XnlxYkt9hNAwwsiKYn+cuTEoMtD/ZVazS5QVssBr9YhpCQA==",
875
+ "dev": true,
876
+ "license": "MIT",
877
+ "dependencies": {
878
+ "@babel/core": "^7.22.1",
879
+ "@prefresh/babel-plugin": "^0.5.2",
880
+ "@prefresh/core": "^1.5.0",
881
+ "@prefresh/utils": "^1.2.0",
882
+ "@rollup/pluginutils": "^4.2.1"
883
+ },
884
+ "peerDependencies": {
885
+ "preact": "^10.4.0 || ^11.0.0-0",
886
+ "vite": ">=2.0.0"
887
+ }
888
+ },
889
+ "node_modules/@prefresh/vite/node_modules/@rollup/pluginutils": {
890
+ "version": "4.2.1",
891
+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz",
892
+ "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==",
893
+ "dev": true,
894
+ "license": "MIT",
895
+ "dependencies": {
896
+ "estree-walker": "^2.0.1",
897
+ "picomatch": "^2.2.2"
898
+ },
899
+ "engines": {
900
+ "node": ">= 8.0.0"
901
+ }
902
+ },
903
+ "node_modules/@prefresh/vite/node_modules/picomatch": {
904
+ "version": "2.3.1",
905
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
906
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
907
+ "dev": true,
908
+ "license": "MIT",
909
+ "engines": {
910
+ "node": ">=8.6"
911
+ },
912
+ "funding": {
913
+ "url": "https://github.com/sponsors/jonschlinkert"
914
+ }
915
+ },
916
+ "node_modules/@rollup/pluginutils": {
917
+ "version": "5.3.0",
918
+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.3.0.tgz",
919
+ "integrity": "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==",
920
+ "dev": true,
921
+ "license": "MIT",
922
+ "dependencies": {
923
+ "@types/estree": "^1.0.0",
924
+ "estree-walker": "^2.0.2",
925
+ "picomatch": "^4.0.2"
926
+ },
927
+ "engines": {
928
+ "node": ">=14.0.0"
929
+ },
930
+ "peerDependencies": {
931
+ "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
932
+ },
933
+ "peerDependenciesMeta": {
934
+ "rollup": {
935
+ "optional": true
936
+ }
937
+ }
938
+ },
939
+ "node_modules/@rollup/rollup-android-arm-eabi": {
940
+ "version": "4.59.0",
941
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz",
942
+ "integrity": "sha512-upnNBkA6ZH2VKGcBj9Fyl9IGNPULcjXRlg0LLeaioQWueH30p6IXtJEbKAgvyv+mJaMxSm1l6xwDXYjpEMiLMg==",
943
+ "cpu": [
944
+ "arm"
945
+ ],
946
+ "dev": true,
947
+ "license": "MIT",
948
+ "optional": true,
949
+ "os": [
950
+ "android"
951
+ ]
952
+ },
953
+ "node_modules/@rollup/rollup-android-arm64": {
954
+ "version": "4.59.0",
955
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.59.0.tgz",
956
+ "integrity": "sha512-hZ+Zxj3SySm4A/DylsDKZAeVg0mvi++0PYVceVyX7hemkw7OreKdCvW2oQ3T1FMZvCaQXqOTHb8qmBShoqk69Q==",
957
+ "cpu": [
958
+ "arm64"
959
+ ],
960
+ "dev": true,
961
+ "license": "MIT",
962
+ "optional": true,
963
+ "os": [
964
+ "android"
965
+ ]
966
+ },
967
+ "node_modules/@rollup/rollup-darwin-arm64": {
968
+ "version": "4.59.0",
969
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.59.0.tgz",
970
+ "integrity": "sha512-W2Psnbh1J8ZJw0xKAd8zdNgF9HRLkdWwwdWqubSVk0pUuQkoHnv7rx4GiF9rT4t5DIZGAsConRE3AxCdJ4m8rg==",
971
+ "cpu": [
972
+ "arm64"
973
+ ],
974
+ "dev": true,
975
+ "license": "MIT",
976
+ "optional": true,
977
+ "os": [
978
+ "darwin"
979
+ ]
980
+ },
981
+ "node_modules/@rollup/rollup-darwin-x64": {
982
+ "version": "4.59.0",
983
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.59.0.tgz",
984
+ "integrity": "sha512-ZW2KkwlS4lwTv7ZVsYDiARfFCnSGhzYPdiOU4IM2fDbL+QGlyAbjgSFuqNRbSthybLbIJ915UtZBtmuLrQAT/w==",
985
+ "cpu": [
986
+ "x64"
987
+ ],
988
+ "dev": true,
989
+ "license": "MIT",
990
+ "optional": true,
991
+ "os": [
992
+ "darwin"
993
+ ]
994
+ },
995
+ "node_modules/@rollup/rollup-freebsd-arm64": {
996
+ "version": "4.59.0",
997
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.59.0.tgz",
998
+ "integrity": "sha512-EsKaJ5ytAu9jI3lonzn3BgG8iRBjV4LxZexygcQbpiU0wU0ATxhNVEpXKfUa0pS05gTcSDMKpn3Sx+QB9RlTTA==",
999
+ "cpu": [
1000
+ "arm64"
1001
+ ],
1002
+ "dev": true,
1003
+ "license": "MIT",
1004
+ "optional": true,
1005
+ "os": [
1006
+ "freebsd"
1007
+ ]
1008
+ },
1009
+ "node_modules/@rollup/rollup-freebsd-x64": {
1010
+ "version": "4.59.0",
1011
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.59.0.tgz",
1012
+ "integrity": "sha512-d3DuZi2KzTMjImrxoHIAODUZYoUUMsuUiY4SRRcJy6NJoZ6iIqWnJu9IScV9jXysyGMVuW+KNzZvBLOcpdl3Vg==",
1013
+ "cpu": [
1014
+ "x64"
1015
+ ],
1016
+ "dev": true,
1017
+ "license": "MIT",
1018
+ "optional": true,
1019
+ "os": [
1020
+ "freebsd"
1021
+ ]
1022
+ },
1023
+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
1024
+ "version": "4.59.0",
1025
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.59.0.tgz",
1026
+ "integrity": "sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw==",
1027
+ "cpu": [
1028
+ "arm"
1029
+ ],
1030
+ "dev": true,
1031
+ "license": "MIT",
1032
+ "optional": true,
1033
+ "os": [
1034
+ "linux"
1035
+ ]
1036
+ },
1037
+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {
1038
+ "version": "4.59.0",
1039
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.59.0.tgz",
1040
+ "integrity": "sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA==",
1041
+ "cpu": [
1042
+ "arm"
1043
+ ],
1044
+ "dev": true,
1045
+ "license": "MIT",
1046
+ "optional": true,
1047
+ "os": [
1048
+ "linux"
1049
+ ]
1050
+ },
1051
+ "node_modules/@rollup/rollup-linux-arm64-gnu": {
1052
+ "version": "4.59.0",
1053
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.59.0.tgz",
1054
+ "integrity": "sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA==",
1055
+ "cpu": [
1056
+ "arm64"
1057
+ ],
1058
+ "dev": true,
1059
+ "license": "MIT",
1060
+ "optional": true,
1061
+ "os": [
1062
+ "linux"
1063
+ ]
1064
+ },
1065
+ "node_modules/@rollup/rollup-linux-arm64-musl": {
1066
+ "version": "4.59.0",
1067
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.59.0.tgz",
1068
+ "integrity": "sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA==",
1069
+ "cpu": [
1070
+ "arm64"
1071
+ ],
1072
+ "dev": true,
1073
+ "license": "MIT",
1074
+ "optional": true,
1075
+ "os": [
1076
+ "linux"
1077
+ ]
1078
+ },
1079
+ "node_modules/@rollup/rollup-linux-loong64-gnu": {
1080
+ "version": "4.59.0",
1081
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.59.0.tgz",
1082
+ "integrity": "sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg==",
1083
+ "cpu": [
1084
+ "loong64"
1085
+ ],
1086
+ "dev": true,
1087
+ "license": "MIT",
1088
+ "optional": true,
1089
+ "os": [
1090
+ "linux"
1091
+ ]
1092
+ },
1093
+ "node_modules/@rollup/rollup-linux-loong64-musl": {
1094
+ "version": "4.59.0",
1095
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.59.0.tgz",
1096
+ "integrity": "sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q==",
1097
+ "cpu": [
1098
+ "loong64"
1099
+ ],
1100
+ "dev": true,
1101
+ "license": "MIT",
1102
+ "optional": true,
1103
+ "os": [
1104
+ "linux"
1105
+ ]
1106
+ },
1107
+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {
1108
+ "version": "4.59.0",
1109
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.59.0.tgz",
1110
+ "integrity": "sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA==",
1111
+ "cpu": [
1112
+ "ppc64"
1113
+ ],
1114
+ "dev": true,
1115
+ "license": "MIT",
1116
+ "optional": true,
1117
+ "os": [
1118
+ "linux"
1119
+ ]
1120
+ },
1121
+ "node_modules/@rollup/rollup-linux-ppc64-musl": {
1122
+ "version": "4.59.0",
1123
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.59.0.tgz",
1124
+ "integrity": "sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA==",
1125
+ "cpu": [
1126
+ "ppc64"
1127
+ ],
1128
+ "dev": true,
1129
+ "license": "MIT",
1130
+ "optional": true,
1131
+ "os": [
1132
+ "linux"
1133
+ ]
1134
+ },
1135
+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {
1136
+ "version": "4.59.0",
1137
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.59.0.tgz",
1138
+ "integrity": "sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg==",
1139
+ "cpu": [
1140
+ "riscv64"
1141
+ ],
1142
+ "dev": true,
1143
+ "license": "MIT",
1144
+ "optional": true,
1145
+ "os": [
1146
+ "linux"
1147
+ ]
1148
+ },
1149
+ "node_modules/@rollup/rollup-linux-riscv64-musl": {
1150
+ "version": "4.59.0",
1151
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.59.0.tgz",
1152
+ "integrity": "sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg==",
1153
+ "cpu": [
1154
+ "riscv64"
1155
+ ],
1156
+ "dev": true,
1157
+ "license": "MIT",
1158
+ "optional": true,
1159
+ "os": [
1160
+ "linux"
1161
+ ]
1162
+ },
1163
+ "node_modules/@rollup/rollup-linux-s390x-gnu": {
1164
+ "version": "4.59.0",
1165
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.59.0.tgz",
1166
+ "integrity": "sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w==",
1167
+ "cpu": [
1168
+ "s390x"
1169
+ ],
1170
+ "dev": true,
1171
+ "license": "MIT",
1172
+ "optional": true,
1173
+ "os": [
1174
+ "linux"
1175
+ ]
1176
+ },
1177
+ "node_modules/@rollup/rollup-linux-x64-gnu": {
1178
+ "version": "4.59.0",
1179
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.59.0.tgz",
1180
+ "integrity": "sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==",
1181
+ "cpu": [
1182
+ "x64"
1183
+ ],
1184
+ "dev": true,
1185
+ "license": "MIT",
1186
+ "optional": true,
1187
+ "os": [
1188
+ "linux"
1189
+ ]
1190
+ },
1191
+ "node_modules/@rollup/rollup-linux-x64-musl": {
1192
+ "version": "4.59.0",
1193
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.59.0.tgz",
1194
+ "integrity": "sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==",
1195
+ "cpu": [
1196
+ "x64"
1197
+ ],
1198
+ "dev": true,
1199
+ "license": "MIT",
1200
+ "optional": true,
1201
+ "os": [
1202
+ "linux"
1203
+ ]
1204
+ },
1205
+ "node_modules/@rollup/rollup-openbsd-x64": {
1206
+ "version": "4.59.0",
1207
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.59.0.tgz",
1208
+ "integrity": "sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ==",
1209
+ "cpu": [
1210
+ "x64"
1211
+ ],
1212
+ "dev": true,
1213
+ "license": "MIT",
1214
+ "optional": true,
1215
+ "os": [
1216
+ "openbsd"
1217
+ ]
1218
+ },
1219
+ "node_modules/@rollup/rollup-openharmony-arm64": {
1220
+ "version": "4.59.0",
1221
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.59.0.tgz",
1222
+ "integrity": "sha512-tt9KBJqaqp5i5HUZzoafHZX8b5Q2Fe7UjYERADll83O4fGqJ49O1FsL6LpdzVFQcpwvnyd0i+K/VSwu/o/nWlA==",
1223
+ "cpu": [
1224
+ "arm64"
1225
+ ],
1226
+ "dev": true,
1227
+ "license": "MIT",
1228
+ "optional": true,
1229
+ "os": [
1230
+ "openharmony"
1231
+ ]
1232
+ },
1233
+ "node_modules/@rollup/rollup-win32-arm64-msvc": {
1234
+ "version": "4.59.0",
1235
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.59.0.tgz",
1236
+ "integrity": "sha512-V5B6mG7OrGTwnxaNUzZTDTjDS7F75PO1ae6MJYdiMu60sq0CqN5CVeVsbhPxalupvTX8gXVSU9gq+Rx1/hvu6A==",
1237
+ "cpu": [
1238
+ "arm64"
1239
+ ],
1240
+ "dev": true,
1241
+ "license": "MIT",
1242
+ "optional": true,
1243
+ "os": [
1244
+ "win32"
1245
+ ]
1246
+ },
1247
+ "node_modules/@rollup/rollup-win32-ia32-msvc": {
1248
+ "version": "4.59.0",
1249
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.59.0.tgz",
1250
+ "integrity": "sha512-UKFMHPuM9R0iBegwzKF4y0C4J9u8C6MEJgFuXTBerMk7EJ92GFVFYBfOZaSGLu6COf7FxpQNqhNS4c4icUPqxA==",
1251
+ "cpu": [
1252
+ "ia32"
1253
+ ],
1254
+ "dev": true,
1255
+ "license": "MIT",
1256
+ "optional": true,
1257
+ "os": [
1258
+ "win32"
1259
+ ]
1260
+ },
1261
+ "node_modules/@rollup/rollup-win32-x64-gnu": {
1262
+ "version": "4.59.0",
1263
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.59.0.tgz",
1264
+ "integrity": "sha512-laBkYlSS1n2L8fSo1thDNGrCTQMmxjYY5G0WFWjFFYZkKPjsMBsgJfGf4TLxXrF6RyhI60L8TMOjBMvXiTcxeA==",
1265
+ "cpu": [
1266
+ "x64"
1267
+ ],
1268
+ "dev": true,
1269
+ "license": "MIT",
1270
+ "optional": true,
1271
+ "os": [
1272
+ "win32"
1273
+ ]
1274
+ },
1275
+ "node_modules/@rollup/rollup-win32-x64-msvc": {
1276
+ "version": "4.59.0",
1277
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.59.0.tgz",
1278
+ "integrity": "sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA==",
1279
+ "cpu": [
1280
+ "x64"
1281
+ ],
1282
+ "dev": true,
1283
+ "license": "MIT",
1284
+ "optional": true,
1285
+ "os": [
1286
+ "win32"
1287
+ ]
1288
+ },
1289
+ "node_modules/@types/estree": {
1290
+ "version": "1.0.8",
1291
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
1292
+ "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
1293
+ "dev": true,
1294
+ "license": "MIT"
1295
+ },
1296
+ "node_modules/babel-plugin-transform-hook-names": {
1297
+ "version": "1.0.2",
1298
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-hook-names/-/babel-plugin-transform-hook-names-1.0.2.tgz",
1299
+ "integrity": "sha512-5gafyjyyBTTdX/tQQ0hRgu4AhNHG/hqWi0ZZmg2xvs2FgRkJXzDNKBZCyoYqgFkovfDrgM8OoKg8karoUvWeCw==",
1300
+ "dev": true,
1301
+ "license": "MIT",
1302
+ "peerDependencies": {
1303
+ "@babel/core": "^7.12.10"
1304
+ }
1305
+ },
1306
+ "node_modules/baseline-browser-mapping": {
1307
+ "version": "2.10.0",
1308
+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.0.tgz",
1309
+ "integrity": "sha512-lIyg0szRfYbiy67j9KN8IyeD7q7hcmqnJ1ddWmNt19ItGpNN64mnllmxUNFIOdOm6by97jlL6wfpTTJrmnjWAA==",
1310
+ "dev": true,
1311
+ "license": "Apache-2.0",
1312
+ "bin": {
1313
+ "baseline-browser-mapping": "dist/cli.cjs"
1314
+ },
1315
+ "engines": {
1316
+ "node": ">=6.0.0"
1317
+ }
1318
+ },
1319
+ "node_modules/boolbase": {
1320
+ "version": "1.0.0",
1321
+ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
1322
+ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==",
1323
+ "dev": true,
1324
+ "license": "ISC"
1325
+ },
1326
+ "node_modules/browserslist": {
1327
+ "version": "4.28.1",
1328
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz",
1329
+ "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==",
1330
+ "dev": true,
1331
+ "funding": [
1332
+ {
1333
+ "type": "opencollective",
1334
+ "url": "https://opencollective.com/browserslist"
1335
+ },
1336
+ {
1337
+ "type": "tidelift",
1338
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
1339
+ },
1340
+ {
1341
+ "type": "github",
1342
+ "url": "https://github.com/sponsors/ai"
1343
+ }
1344
+ ],
1345
+ "license": "MIT",
1346
+ "dependencies": {
1347
+ "baseline-browser-mapping": "^2.9.0",
1348
+ "caniuse-lite": "^1.0.30001759",
1349
+ "electron-to-chromium": "^1.5.263",
1350
+ "node-releases": "^2.0.27",
1351
+ "update-browserslist-db": "^1.2.0"
1352
+ },
1353
+ "bin": {
1354
+ "browserslist": "cli.js"
1355
+ },
1356
+ "engines": {
1357
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
1358
+ }
1359
+ },
1360
+ "node_modules/caniuse-lite": {
1361
+ "version": "1.0.30001777",
1362
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001777.tgz",
1363
+ "integrity": "sha512-tmN+fJxroPndC74efCdp12j+0rk0RHwV5Jwa1zWaFVyw2ZxAuPeG8ZgWC3Wz7uSjT3qMRQ5XHZ4COgQmsCMJAQ==",
1364
+ "dev": true,
1365
+ "funding": [
1366
+ {
1367
+ "type": "opencollective",
1368
+ "url": "https://opencollective.com/browserslist"
1369
+ },
1370
+ {
1371
+ "type": "tidelift",
1372
+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
1373
+ },
1374
+ {
1375
+ "type": "github",
1376
+ "url": "https://github.com/sponsors/ai"
1377
+ }
1378
+ ],
1379
+ "license": "CC-BY-4.0"
1380
+ },
1381
+ "node_modules/convert-source-map": {
1382
+ "version": "2.0.0",
1383
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
1384
+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
1385
+ "dev": true,
1386
+ "license": "MIT"
1387
+ },
1388
+ "node_modules/css-select": {
1389
+ "version": "5.2.2",
1390
+ "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz",
1391
+ "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==",
1392
+ "dev": true,
1393
+ "license": "BSD-2-Clause",
1394
+ "dependencies": {
1395
+ "boolbase": "^1.0.0",
1396
+ "css-what": "^6.1.0",
1397
+ "domhandler": "^5.0.2",
1398
+ "domutils": "^3.0.1",
1399
+ "nth-check": "^2.0.1"
1400
+ },
1401
+ "funding": {
1402
+ "url": "https://github.com/sponsors/fb55"
1403
+ }
1404
+ },
1405
+ "node_modules/css-what": {
1406
+ "version": "6.2.2",
1407
+ "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz",
1408
+ "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==",
1409
+ "dev": true,
1410
+ "license": "BSD-2-Clause",
1411
+ "engines": {
1412
+ "node": ">= 6"
1413
+ },
1414
+ "funding": {
1415
+ "url": "https://github.com/sponsors/fb55"
1416
+ }
1417
+ },
1418
+ "node_modules/debug": {
1419
+ "version": "4.4.3",
1420
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
1421
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
1422
+ "dev": true,
1423
+ "license": "MIT",
1424
+ "dependencies": {
1425
+ "ms": "^2.1.3"
1426
+ },
1427
+ "engines": {
1428
+ "node": ">=6.0"
1429
+ },
1430
+ "peerDependenciesMeta": {
1431
+ "supports-color": {
1432
+ "optional": true
1433
+ }
1434
+ }
1435
+ },
1436
+ "node_modules/dom-serializer": {
1437
+ "version": "2.0.0",
1438
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
1439
+ "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==",
1440
+ "dev": true,
1441
+ "license": "MIT",
1442
+ "dependencies": {
1443
+ "domelementtype": "^2.3.0",
1444
+ "domhandler": "^5.0.2",
1445
+ "entities": "^4.2.0"
1446
+ },
1447
+ "funding": {
1448
+ "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
1449
+ }
1450
+ },
1451
+ "node_modules/domelementtype": {
1452
+ "version": "2.3.0",
1453
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
1454
+ "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==",
1455
+ "dev": true,
1456
+ "funding": [
1457
+ {
1458
+ "type": "github",
1459
+ "url": "https://github.com/sponsors/fb55"
1460
+ }
1461
+ ],
1462
+ "license": "BSD-2-Clause"
1463
+ },
1464
+ "node_modules/domhandler": {
1465
+ "version": "5.0.3",
1466
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
1467
+ "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
1468
+ "dev": true,
1469
+ "license": "BSD-2-Clause",
1470
+ "dependencies": {
1471
+ "domelementtype": "^2.3.0"
1472
+ },
1473
+ "engines": {
1474
+ "node": ">= 4"
1475
+ },
1476
+ "funding": {
1477
+ "url": "https://github.com/fb55/domhandler?sponsor=1"
1478
+ }
1479
+ },
1480
+ "node_modules/domutils": {
1481
+ "version": "3.2.2",
1482
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz",
1483
+ "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==",
1484
+ "dev": true,
1485
+ "license": "BSD-2-Clause",
1486
+ "dependencies": {
1487
+ "dom-serializer": "^2.0.0",
1488
+ "domelementtype": "^2.3.0",
1489
+ "domhandler": "^5.0.3"
1490
+ },
1491
+ "funding": {
1492
+ "url": "https://github.com/fb55/domutils?sponsor=1"
1493
+ }
1494
+ },
1495
+ "node_modules/electron-to-chromium": {
1496
+ "version": "1.5.307",
1497
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.307.tgz",
1498
+ "integrity": "sha512-5z3uFKBWjiNR44nFcYdkcXjKMbg5KXNdciu7mhTPo9tB7NbqSNP2sSnGR+fqknZSCwKkBN+oxiiajWs4dT6ORg==",
1499
+ "dev": true,
1500
+ "license": "ISC"
1501
+ },
1502
+ "node_modules/entities": {
1503
+ "version": "4.5.0",
1504
+ "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
1505
+ "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
1506
+ "dev": true,
1507
+ "license": "BSD-2-Clause",
1508
+ "engines": {
1509
+ "node": ">=0.12"
1510
+ },
1511
+ "funding": {
1512
+ "url": "https://github.com/fb55/entities?sponsor=1"
1513
+ }
1514
+ },
1515
+ "node_modules/esbuild": {
1516
+ "version": "0.25.12",
1517
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz",
1518
+ "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==",
1519
+ "dev": true,
1520
+ "hasInstallScript": true,
1521
+ "license": "MIT",
1522
+ "bin": {
1523
+ "esbuild": "bin/esbuild"
1524
+ },
1525
+ "engines": {
1526
+ "node": ">=18"
1527
+ },
1528
+ "optionalDependencies": {
1529
+ "@esbuild/aix-ppc64": "0.25.12",
1530
+ "@esbuild/android-arm": "0.25.12",
1531
+ "@esbuild/android-arm64": "0.25.12",
1532
+ "@esbuild/android-x64": "0.25.12",
1533
+ "@esbuild/darwin-arm64": "0.25.12",
1534
+ "@esbuild/darwin-x64": "0.25.12",
1535
+ "@esbuild/freebsd-arm64": "0.25.12",
1536
+ "@esbuild/freebsd-x64": "0.25.12",
1537
+ "@esbuild/linux-arm": "0.25.12",
1538
+ "@esbuild/linux-arm64": "0.25.12",
1539
+ "@esbuild/linux-ia32": "0.25.12",
1540
+ "@esbuild/linux-loong64": "0.25.12",
1541
+ "@esbuild/linux-mips64el": "0.25.12",
1542
+ "@esbuild/linux-ppc64": "0.25.12",
1543
+ "@esbuild/linux-riscv64": "0.25.12",
1544
+ "@esbuild/linux-s390x": "0.25.12",
1545
+ "@esbuild/linux-x64": "0.25.12",
1546
+ "@esbuild/netbsd-arm64": "0.25.12",
1547
+ "@esbuild/netbsd-x64": "0.25.12",
1548
+ "@esbuild/openbsd-arm64": "0.25.12",
1549
+ "@esbuild/openbsd-x64": "0.25.12",
1550
+ "@esbuild/openharmony-arm64": "0.25.12",
1551
+ "@esbuild/sunos-x64": "0.25.12",
1552
+ "@esbuild/win32-arm64": "0.25.12",
1553
+ "@esbuild/win32-ia32": "0.25.12",
1554
+ "@esbuild/win32-x64": "0.25.12"
1555
+ }
1556
+ },
1557
+ "node_modules/escalade": {
1558
+ "version": "3.2.0",
1559
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
1560
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
1561
+ "dev": true,
1562
+ "license": "MIT",
1563
+ "engines": {
1564
+ "node": ">=6"
1565
+ }
1566
+ },
1567
+ "node_modules/estree-walker": {
1568
+ "version": "2.0.2",
1569
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
1570
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
1571
+ "dev": true,
1572
+ "license": "MIT"
1573
+ },
1574
+ "node_modules/fdir": {
1575
+ "version": "6.5.0",
1576
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
1577
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
1578
+ "dev": true,
1579
+ "license": "MIT",
1580
+ "engines": {
1581
+ "node": ">=12.0.0"
1582
+ },
1583
+ "peerDependencies": {
1584
+ "picomatch": "^3 || ^4"
1585
+ },
1586
+ "peerDependenciesMeta": {
1587
+ "picomatch": {
1588
+ "optional": true
1589
+ }
1590
+ }
1591
+ },
1592
+ "node_modules/fsevents": {
1593
+ "version": "2.3.3",
1594
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
1595
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
1596
+ "dev": true,
1597
+ "hasInstallScript": true,
1598
+ "license": "MIT",
1599
+ "optional": true,
1600
+ "os": [
1601
+ "darwin"
1602
+ ],
1603
+ "engines": {
1604
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
1605
+ }
1606
+ },
1607
+ "node_modules/gensync": {
1608
+ "version": "1.0.0-beta.2",
1609
+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
1610
+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
1611
+ "dev": true,
1612
+ "license": "MIT",
1613
+ "engines": {
1614
+ "node": ">=6.9.0"
1615
+ }
1616
+ },
1617
+ "node_modules/he": {
1618
+ "version": "1.2.0",
1619
+ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
1620
+ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
1621
+ "dev": true,
1622
+ "license": "MIT",
1623
+ "bin": {
1624
+ "he": "bin/he"
1625
+ }
1626
+ },
1627
+ "node_modules/js-tokens": {
1628
+ "version": "4.0.0",
1629
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
1630
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
1631
+ "dev": true,
1632
+ "license": "MIT"
1633
+ },
1634
+ "node_modules/jsesc": {
1635
+ "version": "3.1.0",
1636
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
1637
+ "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
1638
+ "dev": true,
1639
+ "license": "MIT",
1640
+ "bin": {
1641
+ "jsesc": "bin/jsesc"
1642
+ },
1643
+ "engines": {
1644
+ "node": ">=6"
1645
+ }
1646
+ },
1647
+ "node_modules/json5": {
1648
+ "version": "2.2.3",
1649
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
1650
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
1651
+ "dev": true,
1652
+ "license": "MIT",
1653
+ "bin": {
1654
+ "json5": "lib/cli.js"
1655
+ },
1656
+ "engines": {
1657
+ "node": ">=6"
1658
+ }
1659
+ },
1660
+ "node_modules/kolorist": {
1661
+ "version": "1.8.0",
1662
+ "resolved": "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz",
1663
+ "integrity": "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==",
1664
+ "dev": true,
1665
+ "license": "MIT"
1666
+ },
1667
+ "node_modules/lru-cache": {
1668
+ "version": "5.1.1",
1669
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
1670
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
1671
+ "dev": true,
1672
+ "license": "ISC",
1673
+ "dependencies": {
1674
+ "yallist": "^3.0.2"
1675
+ }
1676
+ },
1677
+ "node_modules/magic-string": {
1678
+ "version": "0.30.21",
1679
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
1680
+ "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",
1681
+ "dev": true,
1682
+ "license": "MIT",
1683
+ "dependencies": {
1684
+ "@jridgewell/sourcemap-codec": "^1.5.5"
1685
+ }
1686
+ },
1687
+ "node_modules/marked": {
1688
+ "version": "9.1.6",
1689
+ "resolved": "https://registry.npmjs.org/marked/-/marked-9.1.6.tgz",
1690
+ "integrity": "sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q==",
1691
+ "license": "MIT",
1692
+ "bin": {
1693
+ "marked": "bin/marked.js"
1694
+ },
1695
+ "engines": {
1696
+ "node": ">= 16"
1697
+ }
1698
+ },
1699
+ "node_modules/ms": {
1700
+ "version": "2.1.3",
1701
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
1702
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
1703
+ "dev": true,
1704
+ "license": "MIT"
1705
+ },
1706
+ "node_modules/nanoid": {
1707
+ "version": "3.3.11",
1708
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
1709
+ "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
1710
+ "dev": true,
1711
+ "funding": [
1712
+ {
1713
+ "type": "github",
1714
+ "url": "https://github.com/sponsors/ai"
1715
+ }
1716
+ ],
1717
+ "license": "MIT",
1718
+ "bin": {
1719
+ "nanoid": "bin/nanoid.cjs"
1720
+ },
1721
+ "engines": {
1722
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
1723
+ }
1724
+ },
1725
+ "node_modules/node-html-parser": {
1726
+ "version": "6.1.13",
1727
+ "resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-6.1.13.tgz",
1728
+ "integrity": "sha512-qIsTMOY4C/dAa5Q5vsobRpOOvPfC4pB61UVW2uSwZNUp0QU/jCekTal1vMmbO0DgdHeLUJpv/ARmDqErVxA3Sg==",
1729
+ "dev": true,
1730
+ "license": "MIT",
1731
+ "dependencies": {
1732
+ "css-select": "^5.1.0",
1733
+ "he": "1.2.0"
1734
+ }
1735
+ },
1736
+ "node_modules/node-releases": {
1737
+ "version": "2.0.36",
1738
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz",
1739
+ "integrity": "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==",
1740
+ "dev": true,
1741
+ "license": "MIT"
1742
+ },
1743
+ "node_modules/nth-check": {
1744
+ "version": "2.1.1",
1745
+ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
1746
+ "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==",
1747
+ "dev": true,
1748
+ "license": "BSD-2-Clause",
1749
+ "dependencies": {
1750
+ "boolbase": "^1.0.0"
1751
+ },
1752
+ "funding": {
1753
+ "url": "https://github.com/fb55/nth-check?sponsor=1"
1754
+ }
1755
+ },
1756
+ "node_modules/picocolors": {
1757
+ "version": "1.1.1",
1758
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
1759
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
1760
+ "dev": true,
1761
+ "license": "ISC"
1762
+ },
1763
+ "node_modules/picomatch": {
1764
+ "version": "4.0.3",
1765
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
1766
+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
1767
+ "dev": true,
1768
+ "license": "MIT",
1769
+ "engines": {
1770
+ "node": ">=12"
1771
+ },
1772
+ "funding": {
1773
+ "url": "https://github.com/sponsors/jonschlinkert"
1774
+ }
1775
+ },
1776
+ "node_modules/postcss": {
1777
+ "version": "8.5.8",
1778
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz",
1779
+ "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==",
1780
+ "dev": true,
1781
+ "funding": [
1782
+ {
1783
+ "type": "opencollective",
1784
+ "url": "https://opencollective.com/postcss/"
1785
+ },
1786
+ {
1787
+ "type": "tidelift",
1788
+ "url": "https://tidelift.com/funding/github/npm/postcss"
1789
+ },
1790
+ {
1791
+ "type": "github",
1792
+ "url": "https://github.com/sponsors/ai"
1793
+ }
1794
+ ],
1795
+ "license": "MIT",
1796
+ "dependencies": {
1797
+ "nanoid": "^3.3.11",
1798
+ "picocolors": "^1.1.1",
1799
+ "source-map-js": "^1.2.1"
1800
+ },
1801
+ "engines": {
1802
+ "node": "^10 || ^12 || >=14"
1803
+ }
1804
+ },
1805
+ "node_modules/preact": {
1806
+ "version": "10.28.4",
1807
+ "resolved": "https://registry.npmjs.org/preact/-/preact-10.28.4.tgz",
1808
+ "integrity": "sha512-uKFfOHWuSNpRFVTnljsCluEFq57OKT+0QdOiQo8XWnQ/pSvg7OpX5eNOejELXJMWy+BwM2nobz0FkvzmnpCNsQ==",
1809
+ "license": "MIT",
1810
+ "funding": {
1811
+ "type": "opencollective",
1812
+ "url": "https://opencollective.com/preact"
1813
+ }
1814
+ },
1815
+ "node_modules/rollup": {
1816
+ "version": "4.59.0",
1817
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.0.tgz",
1818
+ "integrity": "sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==",
1819
+ "dev": true,
1820
+ "license": "MIT",
1821
+ "dependencies": {
1822
+ "@types/estree": "1.0.8"
1823
+ },
1824
+ "bin": {
1825
+ "rollup": "dist/bin/rollup"
1826
+ },
1827
+ "engines": {
1828
+ "node": ">=18.0.0",
1829
+ "npm": ">=8.0.0"
1830
+ },
1831
+ "optionalDependencies": {
1832
+ "@rollup/rollup-android-arm-eabi": "4.59.0",
1833
+ "@rollup/rollup-android-arm64": "4.59.0",
1834
+ "@rollup/rollup-darwin-arm64": "4.59.0",
1835
+ "@rollup/rollup-darwin-x64": "4.59.0",
1836
+ "@rollup/rollup-freebsd-arm64": "4.59.0",
1837
+ "@rollup/rollup-freebsd-x64": "4.59.0",
1838
+ "@rollup/rollup-linux-arm-gnueabihf": "4.59.0",
1839
+ "@rollup/rollup-linux-arm-musleabihf": "4.59.0",
1840
+ "@rollup/rollup-linux-arm64-gnu": "4.59.0",
1841
+ "@rollup/rollup-linux-arm64-musl": "4.59.0",
1842
+ "@rollup/rollup-linux-loong64-gnu": "4.59.0",
1843
+ "@rollup/rollup-linux-loong64-musl": "4.59.0",
1844
+ "@rollup/rollup-linux-ppc64-gnu": "4.59.0",
1845
+ "@rollup/rollup-linux-ppc64-musl": "4.59.0",
1846
+ "@rollup/rollup-linux-riscv64-gnu": "4.59.0",
1847
+ "@rollup/rollup-linux-riscv64-musl": "4.59.0",
1848
+ "@rollup/rollup-linux-s390x-gnu": "4.59.0",
1849
+ "@rollup/rollup-linux-x64-gnu": "4.59.0",
1850
+ "@rollup/rollup-linux-x64-musl": "4.59.0",
1851
+ "@rollup/rollup-openbsd-x64": "4.59.0",
1852
+ "@rollup/rollup-openharmony-arm64": "4.59.0",
1853
+ "@rollup/rollup-win32-arm64-msvc": "4.59.0",
1854
+ "@rollup/rollup-win32-ia32-msvc": "4.59.0",
1855
+ "@rollup/rollup-win32-x64-gnu": "4.59.0",
1856
+ "@rollup/rollup-win32-x64-msvc": "4.59.0",
1857
+ "fsevents": "~2.3.2"
1858
+ }
1859
+ },
1860
+ "node_modules/semver": {
1861
+ "version": "6.3.1",
1862
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
1863
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
1864
+ "dev": true,
1865
+ "license": "ISC",
1866
+ "bin": {
1867
+ "semver": "bin/semver.js"
1868
+ }
1869
+ },
1870
+ "node_modules/simple-code-frame": {
1871
+ "version": "1.3.0",
1872
+ "resolved": "https://registry.npmjs.org/simple-code-frame/-/simple-code-frame-1.3.0.tgz",
1873
+ "integrity": "sha512-MB4pQmETUBlNs62BBeRjIFGeuy/x6gGKh7+eRUemn1rCFhqo7K+4slPqsyizCbcbYLnaYqaoZ2FWsZ/jN06D8w==",
1874
+ "dev": true,
1875
+ "license": "MIT",
1876
+ "dependencies": {
1877
+ "kolorist": "^1.6.0"
1878
+ }
1879
+ },
1880
+ "node_modules/source-map": {
1881
+ "version": "0.7.6",
1882
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz",
1883
+ "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==",
1884
+ "dev": true,
1885
+ "license": "BSD-3-Clause",
1886
+ "engines": {
1887
+ "node": ">= 12"
1888
+ }
1889
+ },
1890
+ "node_modules/source-map-js": {
1891
+ "version": "1.2.1",
1892
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
1893
+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
1894
+ "dev": true,
1895
+ "license": "BSD-3-Clause",
1896
+ "engines": {
1897
+ "node": ">=0.10.0"
1898
+ }
1899
+ },
1900
+ "node_modules/stack-trace": {
1901
+ "version": "1.0.0-pre2",
1902
+ "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-1.0.0-pre2.tgz",
1903
+ "integrity": "sha512-2ztBJRek8IVofG9DBJqdy2N5kulaacX30Nz7xmkYF6ale9WBVmIy6mFBchvGX7Vx/MyjBhx+Rcxqrj+dbOnQ6A==",
1904
+ "dev": true,
1905
+ "license": "MIT",
1906
+ "engines": {
1907
+ "node": ">=16"
1908
+ }
1909
+ },
1910
+ "node_modules/tinyglobby": {
1911
+ "version": "0.2.15",
1912
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
1913
+ "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",
1914
+ "dev": true,
1915
+ "license": "MIT",
1916
+ "dependencies": {
1917
+ "fdir": "^6.5.0",
1918
+ "picomatch": "^4.0.3"
1919
+ },
1920
+ "engines": {
1921
+ "node": ">=12.0.0"
1922
+ },
1923
+ "funding": {
1924
+ "url": "https://github.com/sponsors/SuperchupuDev"
1925
+ }
1926
+ },
1927
+ "node_modules/update-browserslist-db": {
1928
+ "version": "1.2.3",
1929
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",
1930
+ "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==",
1931
+ "dev": true,
1932
+ "funding": [
1933
+ {
1934
+ "type": "opencollective",
1935
+ "url": "https://opencollective.com/browserslist"
1936
+ },
1937
+ {
1938
+ "type": "tidelift",
1939
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
1940
+ },
1941
+ {
1942
+ "type": "github",
1943
+ "url": "https://github.com/sponsors/ai"
1944
+ }
1945
+ ],
1946
+ "license": "MIT",
1947
+ "dependencies": {
1948
+ "escalade": "^3.2.0",
1949
+ "picocolors": "^1.1.1"
1950
+ },
1951
+ "bin": {
1952
+ "update-browserslist-db": "cli.js"
1953
+ },
1954
+ "peerDependencies": {
1955
+ "browserslist": ">= 4.21.0"
1956
+ }
1957
+ },
1958
+ "node_modules/vite": {
1959
+ "version": "6.4.1",
1960
+ "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz",
1961
+ "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
1962
+ "dev": true,
1963
+ "license": "MIT",
1964
+ "dependencies": {
1965
+ "esbuild": "^0.25.0",
1966
+ "fdir": "^6.4.4",
1967
+ "picomatch": "^4.0.2",
1968
+ "postcss": "^8.5.3",
1969
+ "rollup": "^4.34.9",
1970
+ "tinyglobby": "^0.2.13"
1971
+ },
1972
+ "bin": {
1973
+ "vite": "bin/vite.js"
1974
+ },
1975
+ "engines": {
1976
+ "node": "^18.0.0 || ^20.0.0 || >=22.0.0"
1977
+ },
1978
+ "funding": {
1979
+ "url": "https://github.com/vitejs/vite?sponsor=1"
1980
+ },
1981
+ "optionalDependencies": {
1982
+ "fsevents": "~2.3.3"
1983
+ },
1984
+ "peerDependencies": {
1985
+ "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
1986
+ "jiti": ">=1.21.0",
1987
+ "less": "*",
1988
+ "lightningcss": "^1.21.0",
1989
+ "sass": "*",
1990
+ "sass-embedded": "*",
1991
+ "stylus": "*",
1992
+ "sugarss": "*",
1993
+ "terser": "^5.16.0",
1994
+ "tsx": "^4.8.1",
1995
+ "yaml": "^2.4.2"
1996
+ },
1997
+ "peerDependenciesMeta": {
1998
+ "@types/node": {
1999
+ "optional": true
2000
+ },
2001
+ "jiti": {
2002
+ "optional": true
2003
+ },
2004
+ "less": {
2005
+ "optional": true
2006
+ },
2007
+ "lightningcss": {
2008
+ "optional": true
2009
+ },
2010
+ "sass": {
2011
+ "optional": true
2012
+ },
2013
+ "sass-embedded": {
2014
+ "optional": true
2015
+ },
2016
+ "stylus": {
2017
+ "optional": true
2018
+ },
2019
+ "sugarss": {
2020
+ "optional": true
2021
+ },
2022
+ "terser": {
2023
+ "optional": true
2024
+ },
2025
+ "tsx": {
2026
+ "optional": true
2027
+ },
2028
+ "yaml": {
2029
+ "optional": true
2030
+ }
2031
+ }
2032
+ },
2033
+ "node_modules/vite-prerender-plugin": {
2034
+ "version": "0.5.12",
2035
+ "resolved": "https://registry.npmjs.org/vite-prerender-plugin/-/vite-prerender-plugin-0.5.12.tgz",
2036
+ "integrity": "sha512-EiwhbMn+flg14EysbLTmZSzq8NGTxhytgK3bf4aGRF1evWLGwZiHiUJ1KZDvbxgKbMf2pG6fJWGEa3UZXOnR1g==",
2037
+ "dev": true,
2038
+ "license": "MIT",
2039
+ "dependencies": {
2040
+ "kolorist": "^1.8.0",
2041
+ "magic-string": "0.x >= 0.26.0",
2042
+ "node-html-parser": "^6.1.12",
2043
+ "simple-code-frame": "^1.3.0",
2044
+ "source-map": "^0.7.4",
2045
+ "stack-trace": "^1.0.0-pre2"
2046
+ },
2047
+ "peerDependencies": {
2048
+ "vite": "5.x || 6.x || 7.x"
2049
+ }
2050
+ },
2051
+ "node_modules/yallist": {
2052
+ "version": "3.1.1",
2053
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
2054
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
2055
+ "dev": true,
2056
+ "license": "ISC"
2057
+ }
2058
+ }
2059
+ }
frontend-widget/package.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "smart-chatbot-widget",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "vite",
7
+ "build": "vite build",
8
+ "preview": "vite preview"
9
+ },
10
+ "dependencies": {
11
+ "marked": "^9.0.0",
12
+ "preact": "^10.0.0"
13
+ },
14
+ "devDependencies": {
15
+ "@preact/preset-vite": "^2.9.0",
16
+ "vite": "^6.0.0"
17
+ }
18
+ }
frontend-widget/src/ChatWidget.jsx ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useState, useEffect } from 'preact/hooks';
2
+ import ChatPanel from './components/ChatPanel';
3
+
4
+ function EnvBadge() {
5
+ const cfg = window.ChatbotConfig;
6
+ if (!cfg?.DEBUG) return null;
7
+ return (
8
+ <div class={`env-badge ${cfg.DETECTED_ENVIRONMENT || ''}`}>
9
+ Environment: {cfg.ENVIRONMENT} | API: {cfg.API_URL || '(same-origin)'}
10
+ </div>
11
+ );
12
+ }
13
+
14
+ export default function ChatWidget() {
15
+ const [isOpen, setIsOpen] = useState(false);
16
+
17
+ // Standalone demo: add gradient so glassmorphism is visible.
18
+ // In iframe: body stays transparent so host page background shows through.
19
+ useEffect(() => {
20
+ if (window === window.top) {
21
+ document.body.style.background = 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)';
22
+ document.body.style.minHeight = '100vh';
23
+ }
24
+ }, []);
25
+
26
+ return (
27
+ <>
28
+ <EnvBadge />
29
+ <button
30
+ class="chat-widget-btn"
31
+ onClick={() => setIsOpen(o => !o)}
32
+ aria-label="Toggle chat"
33
+ >
34
+ {isOpen ? '\u2715' : '\uD83D\uDCAC'}
35
+ </button>
36
+ <ChatPanel isOpen={isOpen} onClose={() => setIsOpen(false)} />
37
+ </>
38
+ );
39
+ }
frontend-widget/src/components/ChatHeader.jsx ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ export default function ChatHeader({ onClose }) {
2
+ return (
3
+ <div class="chat-header">
4
+ <h1>Smart Chatbot</h1>
5
+ <button class="chat-close-btn" onClick={onClose} aria-label="Close chat">
6
+ &#x2715;
7
+ </button>
8
+ </div>
9
+ );
10
+ }
frontend-widget/src/components/ChatInput.jsx ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useRef, useEffect } from 'preact/hooks';
2
+
3
+ export default function ChatInput({ onSend, disabled }) {
4
+ const textareaRef = useRef(null);
5
+
6
+ useEffect(() => {
7
+ if (!disabled) textareaRef.current?.focus();
8
+ }, [disabled]);
9
+
10
+ function handleSend() {
11
+ const text = textareaRef.current?.value.trim();
12
+ if (!text || disabled) return;
13
+ onSend(text);
14
+ textareaRef.current.value = '';
15
+ textareaRef.current.style.height = '38px';
16
+ }
17
+
18
+ function handleKeyDown(e) {
19
+ if (e.key === 'Enter' && !e.shiftKey && !disabled) {
20
+ e.preventDefault();
21
+ handleSend();
22
+ }
23
+ }
24
+
25
+ function handleInput() {
26
+ const el = textareaRef.current;
27
+ el.style.height = '38px';
28
+ if (el.scrollHeight > 38) {
29
+ el.style.height = el.scrollHeight + 'px';
30
+ }
31
+ }
32
+
33
+ return (
34
+ <div class="chat-input">
35
+ <div class="input-container">
36
+ <textarea
37
+ ref={textareaRef}
38
+ placeholder="Type your message..."
39
+ onKeyDown={handleKeyDown}
40
+ onInput={handleInput}
41
+ disabled={disabled}
42
+ />
43
+ </div>
44
+ <button
45
+ class="send-button"
46
+ onClick={handleSend}
47
+ disabled={disabled}
48
+ aria-label="Send message"
49
+ >
50
+ &#x27A4;
51
+ </button>
52
+ </div>
53
+ );
54
+ }
frontend-widget/src/components/ChatPanel.jsx ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useRef, useEffect } from 'preact/hooks';
2
+ import { useChat } from '../hooks/useChat';
3
+ import ChatHeader from './ChatHeader';
4
+ import MessageList from './MessageList';
5
+ import TypingIndicator from './TypingIndicator';
6
+ import ChatInput from './ChatInput';
7
+
8
+ export default function ChatPanel({ isOpen, onClose }) {
9
+ const { messages, isTyping, initialize, sendMessage } = useChat();
10
+ const initializedRef = useRef(false);
11
+
12
+ useEffect(() => {
13
+ if (isOpen && !initializedRef.current) {
14
+ initializedRef.current = true;
15
+ initialize();
16
+ }
17
+ }, [isOpen]);
18
+
19
+ return (
20
+ <div class={`chat-panel${isOpen ? ' open' : ''}`}>
21
+ <ChatHeader onClose={onClose} />
22
+ <MessageList messages={messages} />
23
+ <TypingIndicator active={isTyping} />
24
+ <ChatInput onSend={sendMessage} disabled={isTyping} />
25
+ </div>
26
+ );
27
+ }
frontend-widget/src/components/Message.jsx ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { marked } from 'marked';
2
+ import ThinkingBlock from './ThinkingBlock';
3
+
4
+ export default function Message({ message }) {
5
+ const { sender, text, thinking, debugInfo } = message;
6
+ const isUser = sender === 'user';
7
+
8
+ let debugText = '';
9
+ if (debugInfo) {
10
+ debugText = `Intent: ${debugInfo.intent} (${debugInfo.confidence})`;
11
+ if (debugInfo.entities && Object.keys(debugInfo.entities).length > 0) {
12
+ debugText += ` | Entities: ${JSON.stringify(debugInfo.entities)}`;
13
+ }
14
+ if (debugInfo.language) debugText += ` | Language: ${debugInfo.language}`;
15
+ if (debugInfo.environment) debugText += ` | Env: ${debugInfo.environment}`;
16
+ }
17
+
18
+ return (
19
+ <>
20
+ {!isUser && <ThinkingBlock thinking={thinking} duration={message.thinkingDuration} />}
21
+ <div class={`message ${isUser ? 'user-message' : 'bot-message'}`}>
22
+ <div class="message-avatar">{isUser ? '\uD83D\uDC64' : '\uD83E\uDD16'}</div>
23
+ <div class="message-content">
24
+ <div dangerouslySetInnerHTML={{ __html: marked.parse(text) }} />
25
+ {debugInfo && <div class="debug-info">{debugText}</div>}
26
+ </div>
27
+ </div>
28
+ </>
29
+ );
30
+ }
frontend-widget/src/components/MessageList.jsx ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useEffect, useRef } from 'preact/hooks';
2
+ import Message from './Message';
3
+
4
+ export default function MessageList({ messages }) {
5
+ const endRef = useRef(null);
6
+
7
+ useEffect(() => {
8
+ endRef.current?.scrollIntoView({ behavior: 'smooth' });
9
+ }, [messages]);
10
+
11
+ return (
12
+ <div class="chat-messages">
13
+ <div class="messages-spacer" />
14
+ {messages.map(msg => <Message key={msg.id} message={msg} />)}
15
+ <div ref={endRef} />
16
+ </div>
17
+ );
18
+ }
frontend-widget/src/components/ThinkingBlock.jsx ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ export default function ThinkingBlock({ thinking, duration}) {
2
+ if (!thinking) return null;
3
+ return (
4
+ <details class="thinking-details">
5
+ <summary>Drafted in {duration}s</summary>
6
+ <div class="thinking-block">{thinking}</div>
7
+ </details>
8
+ );
9
+ }
frontend-widget/src/components/TypingIndicator.jsx ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export default function TypingIndicator({ active }) {
2
+ if (!active) return null;
3
+ return (
4
+ <div class="typing-indicator">
5
+ <div class="message-avatar">&#x1F916;</div>
6
+ <div class="message-content typing-content" style="display:flex; align-items:center;">
7
+ <span style="font-style: italic; margin-right: 6px; opacity: 0.8;">Pondering</span>
8
+ <div class="typing-dots">
9
+ <span />
10
+ <span />
11
+ <span />
12
+ </div>
13
+ </div>
14
+
15
+ </div>
16
+ );
17
+ }
frontend-widget/src/hooks/useChat.js ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useState, useRef } from 'preact/hooks';
2
+
3
+ async function waitForConfig() {
4
+ return new Promise((resolve) => {
5
+ const check = () => {
6
+ if (window.ChatbotConfig) resolve(window.ChatbotConfig);
7
+ else setTimeout(check, 50);
8
+ };
9
+ check();
10
+ });
11
+ }
12
+
13
+ export function useChat() {
14
+ const [messages, setMessages] = useState([]);
15
+ const [isTyping, setIsTyping] = useState(false);
16
+ const sessionId = useRef(null);
17
+ const config = useRef(null);
18
+
19
+ async function getConfig() {
20
+ if (!config.current) {
21
+ config.current = await waitForConfig();
22
+ }
23
+ return config.current;
24
+ }
25
+
26
+ async function initialize() {
27
+ await getConfig();
28
+ setMessages([{
29
+ id: Date.now(),
30
+ sender: 'bot',
31
+ text: 'Hello! How can I help you today? \u60A8\u597D\uFF01\u4ECA\u5929\u6211\u80FD\u4E3A\u60A8\u505A\u4E9B\u4EC0\u4E48\uFF1F',
32
+ }]);
33
+ }
34
+
35
+ async function sendMessage(text) {
36
+ if (isTyping || !text.trim()) return;
37
+
38
+ const cfg = await getConfig();
39
+
40
+ setMessages(prev => [...prev, { id: Date.now(), sender: 'user', text }]);
41
+ setIsTyping(true);
42
+
43
+ try {
44
+ const body = { message: text };
45
+ if (sessionId.current) body.session_id = sessionId.current;
46
+
47
+ const controller = new AbortController();
48
+ const timeout = setTimeout(() => controller.abort(), cfg.REQUEST_TIMEOUT_MS);
49
+
50
+ const thinkingStart = Date.now();
51
+ const res = await fetch(`${cfg.API_URL}/chat`, {
52
+ method: 'POST',
53
+ headers: { 'Content-Type': 'application/json' },
54
+ body: JSON.stringify(body),
55
+ signal: controller.signal,
56
+ });
57
+ clearTimeout(timeout);
58
+ if (!res.ok) throw new Error(`HTTP ${res.status}: ${res.statusText}`);
59
+ const data = await res.json();
60
+ const thinkingDuration = data.thinking
61
+ ? ((Date.now() - thinkingStart) / 1000).toFixed(1)
62
+ : null;
63
+
64
+ sessionId.current = data.session_id;
65
+
66
+ let debugInfo = null;
67
+ if (cfg.SHOW_DEBUG_INFO) {
68
+ debugInfo = {
69
+ intent: data.intent,
70
+ confidence: data.confidence?.toFixed(2),
71
+ entities: data.entities,
72
+ language: data.debug_info?.language,
73
+ environment: data.debug_info?.environment,
74
+ };
75
+ }
76
+
77
+ setMessages(prev => [...prev, {
78
+ id: Date.now(),
79
+ sender: 'bot',
80
+ text: data.response,
81
+ thinking: data.thinking || null,
82
+ thinkingDuration,
83
+ debugInfo,
84
+ }]);
85
+ } catch (err) {
86
+ const cfg = config.current;
87
+ const errMsg = cfg?.DEBUG
88
+ ? `Error: ${err.message}`
89
+ : 'Sorry, I encountered an error. Please try again.';
90
+ setMessages(prev => [...prev, { id: Date.now(), sender: 'bot', text: errMsg }]);
91
+ } finally {
92
+ setIsTyping(false);
93
+ }
94
+ }
95
+
96
+ return { messages, isTyping, initialize, sendMessage };
97
+ }
frontend-widget/src/index.jsx ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { render } from 'preact';
2
+ import ChatWidget from './ChatWidget';
3
+ import styles from './styles.css?inline';
4
+
5
+ class SmartChatbotElement extends HTMLElement {
6
+ connectedCallback() {
7
+ const shadow = this.attachShadow({ mode: 'open' });
8
+
9
+ const styleEl = document.createElement('style');
10
+ styleEl.textContent = styles;
11
+ shadow.appendChild(styleEl);
12
+
13
+ const container = document.createElement('div');
14
+ shadow.appendChild(container);
15
+
16
+ render(<ChatWidget />, container);
17
+ }
18
+ }
19
+
20
+ if (!customElements.get('smart-chatbot')) {
21
+ customElements.define('smart-chatbot', SmartChatbotElement);
22
+ }
frontend-widget/src/styles.css ADDED
@@ -0,0 +1,478 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Shadow DOM host element */
2
+ :host {
3
+ display: block;
4
+ }
5
+
6
+ * {
7
+ box-sizing: border-box;
8
+ margin: 0;
9
+ padding: 0;
10
+ }
11
+
12
+ /* ============================================================
13
+ FLOATING CHAT BUTTON
14
+ ============================================================ */
15
+
16
+ .chat-widget-btn {
17
+ position: fixed;
18
+ bottom: 24px;
19
+ right: 24px;
20
+ width: 60px;
21
+ height: 60px;
22
+ background: rgba(255, 255, 255, 0.2);
23
+ backdrop-filter: blur(12px);
24
+ -webkit-backdrop-filter: blur(12px);
25
+ border: 1px solid rgba(255, 255, 255, 0.35);
26
+ border-radius: 50%;
27
+ cursor: pointer;
28
+ display: flex;
29
+ align-items: center;
30
+ justify-content: center;
31
+ font-size: 26px;
32
+ box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.45);
33
+ transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
34
+ z-index: 9999;
35
+ user-select: none;
36
+ }
37
+
38
+ .chat-widget-btn:hover {
39
+ transform: scale(1.08);
40
+ background: rgba(255, 255, 255, 0.28);
41
+ box-shadow: 0 6px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
42
+ }
43
+
44
+ /* ============================================================
45
+ CHAT PANEL
46
+ ============================================================ */
47
+
48
+ .chat-panel {
49
+ position: fixed;
50
+ bottom: 96px;
51
+ right: 24px;
52
+ width: 370px;
53
+ height: 520px;
54
+ background: rgba(255, 255, 255, 0.15);
55
+ backdrop-filter: blur(24px);
56
+ -webkit-backdrop-filter: blur(24px);
57
+ border: 1px solid rgba(255, 255, 255, 0.25);
58
+ border-radius: 18px;
59
+ box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
60
+ display: flex;
61
+ flex-direction: column;
62
+ overflow: hidden;
63
+ z-index: 9998;
64
+
65
+ /* Hidden by default */
66
+ opacity: 0;
67
+ pointer-events: none;
68
+ transform: scale(0.88) translateY(16px);
69
+ transform-origin: bottom right;
70
+ transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
71
+ }
72
+
73
+ .chat-panel.open {
74
+ opacity: 1;
75
+ pointer-events: all;
76
+ transform: scale(1) translateY(0);
77
+ }
78
+
79
+ /* ============================================================
80
+ HEADER
81
+ ============================================================ */
82
+
83
+ .chat-header {
84
+ background: rgba(102, 126, 234, 0.5);
85
+ backdrop-filter: blur(10px);
86
+ -webkit-backdrop-filter: blur(10px);
87
+ border-bottom: 1px solid rgba(255, 255, 255, 0.2);
88
+ color: white;
89
+ padding: 16px 20px;
90
+ border-radius: 18px 18px 0 0;
91
+ position: relative;
92
+ flex-shrink: 0;
93
+ }
94
+
95
+ .chat-header h1 {
96
+ font-size: 1.1rem;
97
+ font-weight: 600;
98
+ margin-bottom: 2px;
99
+ text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
100
+ }
101
+
102
+ .chat-close-btn {
103
+ position: absolute;
104
+ top: 12px;
105
+ right: 14px;
106
+ background: rgba(255, 255, 255, 0.15);
107
+ border: 1px solid rgba(255, 255, 255, 0.25);
108
+ color: white;
109
+ font-size: 16px;
110
+ cursor: pointer;
111
+ opacity: 0.9;
112
+ width: 28px;
113
+ height: 28px;
114
+ border-radius: 50%;
115
+ display: flex;
116
+ align-items: center;
117
+ justify-content: center;
118
+ transition: opacity 0.15s, background 0.15s;
119
+ }
120
+
121
+ .chat-close-btn:hover {
122
+ opacity: 1;
123
+ background: rgba(255, 255, 255, 0.28);
124
+ }
125
+
126
+ /* ============================================================
127
+ MESSAGES
128
+ ============================================================ */
129
+
130
+ .chat-messages {
131
+ flex: 1;
132
+ padding: 14px;
133
+ overflow-y: auto;
134
+ background: rgba(255, 255, 255, 0.06);
135
+ display: flex;
136
+ flex-direction: column;
137
+ gap: 10px;
138
+ }
139
+
140
+ .messages-spacer {
141
+ flex: 1;
142
+ }
143
+
144
+ .chat-messages::-webkit-scrollbar {
145
+ width: 4px;
146
+ }
147
+
148
+ .chat-messages::-webkit-scrollbar-track {
149
+ background: transparent;
150
+ }
151
+
152
+ .chat-messages::-webkit-scrollbar-thumb {
153
+ background: rgba(255, 255, 255, 0.3);
154
+ border-radius: 2px;
155
+ }
156
+
157
+ .message {
158
+ display: flex;
159
+ align-items: flex-start;
160
+ gap: 8px;
161
+ max-width: 88%;
162
+ animation: slideIn 0.25s ease-out;
163
+ }
164
+
165
+ @keyframes slideIn {
166
+ from {
167
+ opacity: 0;
168
+ transform: translateY(8px);
169
+ }
170
+
171
+ to {
172
+ opacity: 1;
173
+ transform: translateY(0);
174
+ }
175
+ }
176
+
177
+ .message.user-message {
178
+ align-self: flex-end;
179
+ flex-direction: row-reverse;
180
+ }
181
+
182
+ .message.bot-message {
183
+ align-self: flex-start;
184
+ }
185
+
186
+ .message-avatar {
187
+ width: 28px;
188
+ height: 28px;
189
+ border-radius: 50%;
190
+ display: flex;
191
+ align-items: center;
192
+ justify-content: center;
193
+ font-size: 14px;
194
+ flex-shrink: 0;
195
+ border: 1px solid rgba(255, 255, 255, 0.3);
196
+ }
197
+
198
+ .user-message .message-avatar {
199
+ background: rgba(102, 126, 234, 0.6);
200
+ }
201
+
202
+ .bot-message .message-avatar {
203
+ background: rgba(255, 255, 255, 0.2);
204
+ }
205
+
206
+ .message-content {
207
+ padding: 9px 13px;
208
+ border-radius: 14px;
209
+ font-size: 13.5px;
210
+ line-height: 1.45;
211
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
212
+ backdrop-filter: blur(8px);
213
+ -webkit-backdrop-filter: blur(8px);
214
+ }
215
+
216
+ .user-message .message-content {
217
+ background: rgba(102, 126, 234, 0.75);
218
+ border: 1px solid rgba(255, 255, 255, 0.2);
219
+ color: white;
220
+ box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
221
+ }
222
+
223
+ .bot-message .message-content {
224
+ background: rgba(255, 255, 255, 0.65);
225
+ border: 1px solid rgba(255, 255, 255, 0.5);
226
+ color: #1a1a2e;
227
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
228
+ }
229
+
230
+ .message-content ul,
231
+ .message-content ol {
232
+ padding-left: 18px;
233
+ }
234
+
235
+ .message-content p {
236
+ margin-bottom: 6px;
237
+ }
238
+
239
+ .message-content p:last-child {
240
+ margin-bottom: 0;
241
+ }
242
+
243
+ .message-content h1,
244
+ .message-content h2,
245
+ .message-content h3 {
246
+ margin-top: 8px;
247
+ margin-bottom: 4px;
248
+ }
249
+
250
+ .debug-info {
251
+ font-size: 10px;
252
+ color: #6c757d;
253
+ margin-top: 6px;
254
+ padding: 5px 8px;
255
+ background: rgba(255, 255, 255, 0.4);
256
+ border-radius: 6px;
257
+ border: 1px solid rgba(255, 255, 255, 0.3);
258
+ }
259
+
260
+ /* ============================================================
261
+ THINKING BLOCK
262
+ ============================================================ */
263
+
264
+ .thinking-details {
265
+ align-self: flex-start;
266
+ max-width: 88%;
267
+ font-size: 12px;
268
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
269
+ color: rgba(255, 255, 255, 0.75);
270
+ background: rgba(255, 255, 255, 0.08);
271
+ border: 1px solid rgba(255, 255, 255, 0.18);
272
+ border-radius: 10px;
273
+ padding: 6px 10px;
274
+ animation: slideIn 0.25s ease-out;
275
+ }
276
+
277
+ .thinking-details summary {
278
+ cursor: pointer;
279
+ font-style: italic;
280
+ user-select: none;
281
+ }
282
+
283
+ .thinking-block {
284
+ margin-top: 6px;
285
+ font-size: 11px;
286
+ opacity: 0.85;
287
+ white-space: pre-wrap;
288
+ line-height: 1.4;
289
+ }
290
+
291
+ /* ============================================================
292
+ TYPING INDICATOR
293
+ ============================================================ */
294
+
295
+ .typing-indicator {
296
+ display: flex;
297
+ align-items: center;
298
+ gap: 5px;
299
+ padding: 5px 14px;
300
+ color: rgba(255, 255, 255, 0.75);
301
+ font-style: italic;
302
+ font-size: 12px;
303
+ background: rgba(255, 255, 255, 0.06);
304
+ flex-shrink: 0;
305
+ }
306
+
307
+ .typing-content {
308
+ background: rgba(255, 255, 255, 0.3) !important;
309
+ border: 1px solid rgba(255, 255, 255, 0.4) !important;
310
+ color: white !important;
311
+ }
312
+
313
+ .typing-dots {
314
+ display: flex;
315
+ gap: 3px;
316
+ }
317
+
318
+ .typing-dots span {
319
+ width: 5px;
320
+ height: 5px;
321
+ background: rgba(255, 255, 255, 0.6);
322
+ border-radius: 50%;
323
+ animation: typingBounce 1.4s infinite;
324
+ }
325
+
326
+ .typing-dots span:nth-child(2) {
327
+ animation-delay: 0.2s;
328
+ }
329
+
330
+ .typing-dots span:nth-child(3) {
331
+ animation-delay: 0.4s;
332
+ }
333
+
334
+ @keyframes typingBounce {
335
+
336
+ 0%,
337
+ 60%,
338
+ 100% {
339
+ transform: translateY(0);
340
+ opacity: 0.35;
341
+ }
342
+
343
+ 30% {
344
+ transform: translateY(-6px);
345
+ opacity: 1;
346
+ }
347
+ }
348
+
349
+ /* ============================================================
350
+ INPUT
351
+ ============================================================ */
352
+
353
+ .chat-input {
354
+ display: flex;
355
+ padding: 10px 12px;
356
+ border-top: 1px solid rgba(255, 255, 255, 0.15);
357
+ background: rgba(255, 255, 255, 0.1);
358
+ gap: 8px;
359
+ align-items: flex-end;
360
+ flex-shrink: 0;
361
+ }
362
+
363
+ .input-container {
364
+ flex: 1;
365
+ }
366
+
367
+ .chat-input textarea {
368
+ width: 100%;
369
+ padding: 9px 13px;
370
+ line-height: 1.4;
371
+ height: 38px;
372
+ max-height: 110px;
373
+ border: 1px solid rgba(255, 255, 255, 0.4);
374
+ border-radius: 18px;
375
+ font-size: 13.5px;
376
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
377
+ outline: none;
378
+ transition: border-color 0.2s, background 0.2s;
379
+ overflow-y: auto;
380
+ resize: none;
381
+ scrollbar-width: none;
382
+ -ms-overflow-style: none;
383
+ background: rgba(255, 255, 255, 0.75);
384
+ color: #1a1a2e;
385
+ }
386
+
387
+ .chat-input textarea::-webkit-scrollbar {
388
+ display: none;
389
+ }
390
+
391
+ .chat-input textarea:focus {
392
+ border-color: rgba(255, 255, 255, 0.7);
393
+ background: rgba(255, 255, 255, 0.88);
394
+ }
395
+
396
+ .chat-input textarea::placeholder {
397
+ color: rgba(80, 80, 120, 0.55);
398
+ }
399
+
400
+ .send-button {
401
+ width: 38px;
402
+ height: 38px;
403
+ background: rgba(102, 126, 234, 0.8);
404
+ border: 1px solid rgba(255, 255, 255, 0.25);
405
+ color: white;
406
+ border-radius: 50%;
407
+ cursor: pointer;
408
+ display: flex;
409
+ align-items: center;
410
+ justify-content: center;
411
+ transition: background 0.2s, transform 0.1s;
412
+ font-size: 15px;
413
+ flex-shrink: 0;
414
+ backdrop-filter: blur(6px);
415
+ -webkit-backdrop-filter: blur(6px);
416
+ }
417
+
418
+ .send-button:hover {
419
+ background: rgba(102, 126, 234, 1);
420
+ transform: scale(1.06);
421
+ }
422
+
423
+ .send-button:disabled {
424
+ background: rgba(180, 180, 200, 0.4);
425
+ cursor: not-allowed;
426
+ transform: none;
427
+ }
428
+
429
+ /* ============================================================
430
+ ENVIRONMENT BADGE
431
+ ============================================================ */
432
+
433
+ .env-badge {
434
+ position: fixed;
435
+ top: 12px;
436
+ right: 12px;
437
+ background: rgba(255, 255, 255, 0.2);
438
+ backdrop-filter: blur(10px);
439
+ -webkit-backdrop-filter: blur(10px);
440
+ padding: 6px 10px;
441
+ border-radius: 16px;
442
+ font-size: 11px;
443
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
444
+ color: white;
445
+ border: 1px solid rgba(255, 255, 255, 0.3);
446
+ z-index: 10000;
447
+ }
448
+
449
+ .env-badge.development {
450
+ background: rgba(144, 238, 144, 0.25);
451
+ border-color: rgba(144, 238, 144, 0.4);
452
+ }
453
+
454
+ .env-badge.production {
455
+ background: rgba(255, 100, 100, 0.25);
456
+ border-color: rgba(255, 100, 100, 0.4);
457
+ }
458
+
459
+ /* ============================================================
460
+ MOBILE
461
+ ============================================================ */
462
+
463
+ @media (max-width: 480px) {
464
+ .chat-panel {
465
+ width: calc(100vw - 20px);
466
+ height: 75vh;
467
+ right: 10px;
468
+ bottom: 86px;
469
+ }
470
+
471
+ .chat-widget-btn {
472
+ bottom: 16px;
473
+ right: 16px;
474
+ width: 54px;
475
+ height: 54px;
476
+ font-size: 22px;
477
+ }
478
+ }
frontend-widget/vite.config.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { defineConfig } from 'vite';
2
+ import preact from '@preact/preset-vite';
3
+
4
+ export default defineConfig({
5
+ plugins: [preact()],
6
+ build: {
7
+ lib: {
8
+ entry: 'src/index.jsx',
9
+ name: 'SmartChatbot',
10
+ formats: ['iife'],
11
+ fileName: () => 'chatbot-widget.js',
12
+ },
13
+ outDir: '../frontend',
14
+ emptyOutDir: false, // preserve config.js and other assets
15
+ rollupOptions: {
16
+ output: {
17
+ inlineDynamicImports: true,
18
+ },
19
+ },
20
+ },
21
+ });
frontend/chatbot-widget.js ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var Ft=Object.defineProperty;var it=R=>{throw TypeError(R)};var qt=(R,g,C)=>g in R?Ft(R,g,{enumerable:!0,configurable:!0,writable:!0,value:C}):R[g]=C;var T=(R,g,C)=>qt(R,typeof g!="symbol"?g+"":g,C),Ot=(R,g,C)=>g.has(R)||it("Cannot "+C);var rt=(R,g,C)=>g.has(R)?it("Cannot add the same private member more than once"):g instanceof WeakSet?g.add(R):g.set(R,C);var pe=(R,g,C)=>(Ot(R,g,"access private method"),C);(function(){"use strict";var F,Te,st;var R,g,C,U,Se,ze,Re,Ie,ue,he,fe,K={},Y=[],ot=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,V=Array.isArray;function H(i,e){for(var t in e)i[t]=e[t];return i}function _e(i){i&&i.parentNode&&i.parentNode.removeChild(i)}function lt(i,e,t){var n,s,r,o={};for(r in e)r=="key"?n=e[r]:r=="ref"?s=e[r]:o[r]=e[r];if(arguments.length>2&&(o.children=arguments.length>3?R.call(arguments,2):t),typeof i=="function"&&i.defaultProps!=null)for(r in i.defaultProps)o[r]===void 0&&(o[r]=i.defaultProps[r]);return G(i,o,n,s,null)}function G(i,e,t,n,s){var r={type:i,props:e,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++C,__i:-1,__u:0};return s==null&&g.vnode!=null&&g.vnode(r),r}function q(i){return i.children}function J(i,e){this.props=i,this.context=e}function O(i,e){if(e==null)return i.__?O(i.__,i.__i+1):null;for(var t;e<i.__k.length;e++)if((t=i.__k[e])!=null&&t.__e!=null)return t.__e;return typeof i.type=="function"?O(i):null}function at(i){if(i.__P&&i.__d){var e=i.__v,t=e.__e,n=[],s=[],r=H({},e);r.__v=e.__v+1,g.vnode&&g.vnode(r),de(i.__P,r,e,i.__n,i.__P.namespaceURI,32&e.__u?[t]:null,n,t??O(e),!!(32&e.__u),s),r.__v=e.__v,r.__.__k[r.__i]=r,Le(n,r,s),e.__e=e.__=null,r.__e!=t&&Ce(r)}}function Ce(i){if((i=i.__)!=null&&i.__c!=null)return i.__e=i.__c.base=null,i.__k.some(function(e){if(e!=null&&e.__e!=null)return i.__e=i.__c.base=e.__e}),Ce(i)}function Ee(i){(!i.__d&&(i.__d=!0)&&U.push(i)&&!X.__r++||Se!=g.debounceRendering)&&((Se=g.debounceRendering)||ze)(X)}function X(){for(var i,e=1;U.length;)U.length>e&&U.sort(Re),i=U.shift(),e=U.length,at(i);X.__r=0}function Ae(i,e,t,n,s,r,o,l,c,p,u){var a,h,f,k,y,$,x,b=n&&n.__k||Y,z=e.length;for(c=ct(t,e,b,c,z),a=0;a<z;a++)(f=t.__k[a])!=null&&(h=f.__i!=-1&&b[f.__i]||K,f.__i=a,$=de(i,f,h,s,r,o,l,c,p,u),k=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&me(h.ref,null,f),u.push(f.ref,f.__c||k,f)),y==null&&k!=null&&(y=k),(x=!!(4&f.__u))||h.__k===f.__k?c=De(f,c,i,x):typeof f.type=="function"&&$!==void 0?c=$:k&&(c=k.nextSibling),f.__u&=-7);return t.__e=y,c}function ct(i,e,t,n,s){var r,o,l,c,p,u=t.length,a=u,h=0;for(i.__k=new Array(s),r=0;r<s;r++)(o=e[r])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=i.__k[r]=G(null,o,null,null,null):V(o)?o=i.__k[r]=G(q,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=i.__k[r]=G(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):i.__k[r]=o,c=r+h,o.__=i,o.__b=i.__b+1,l=null,(p=o.__i=pt(o,t,c,a))!=-1&&(a--,(l=t[p])&&(l.__u|=2)),l==null||l.__v==null?(p==-1&&(s>u?h--:s<u&&h++),typeof o.type!="function"&&(o.__u|=4)):p!=c&&(p==c-1?h--:p==c+1?h++:(p>c?h--:h++,o.__u|=4))):i.__k[r]=null;if(a)for(r=0;r<u;r++)(l=t[r])!=null&&(2&l.__u)==0&&(l.__e==n&&(n=O(l)),Ue(l,l));return n}function De(i,e,t,n){var s,r;if(typeof i.type=="function"){for(s=i.__k,r=0;s&&r<s.length;r++)s[r]&&(s[r].__=i,e=De(s[r],e,t,n));return e}i.__e!=e&&(n&&(e&&i.type&&!e.parentNode&&(e=O(i)),t.insertBefore(i.__e,e||null)),e=i.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function pt(i,e,t,n){var s,r,o,l=i.key,c=i.type,p=e[t],u=p!=null&&(2&p.__u)==0;if(p===null&&l==null||u&&l==p.key&&c==p.type)return t;if(n>(u?1:0)){for(s=t-1,r=t+1;s>=0||r<e.length;)if((p=e[o=s>=0?s--:r++])!=null&&(2&p.__u)==0&&l==p.key&&c==p.type)return o}return-1}function Pe(i,e,t){e[0]=="-"?i.setProperty(e,t??""):i[e]=t==null?"":typeof t!="number"||ot.test(e)?t:t+"px"}function ee(i,e,t,n,s){var r,o;e:if(e=="style")if(typeof t=="string")i.style.cssText=t;else{if(typeof n=="string"&&(i.style.cssText=n=""),n)for(e in n)t&&e in t||Pe(i.style,e,"");if(t)for(e in t)n&&t[e]==n[e]||Pe(i.style,e,t[e])}else if(e[0]=="o"&&e[1]=="n")r=e!=(e=e.replace(Ie,"$1")),o=e.toLowerCase(),e=o in i||e=="onFocusOut"||e=="onFocusIn"?o.slice(2):e.slice(2),i.l||(i.l={}),i.l[e+r]=t,t?n?t.u=n.u:(t.u=ue,i.addEventListener(e,r?fe:he,r)):i.removeEventListener(e,r?fe:he,r);else{if(s=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in i)try{i[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!="-"?i.removeAttribute(e):i.setAttribute(e,e=="popover"&&t==1?"":t))}}function Me(i){return function(e){if(this.l){var t=this.l[e.type+i];if(e.t==null)e.t=ue++;else if(e.t<t.u)return;return t(g.event?g.event(e):e)}}}function de(i,e,t,n,s,r,o,l,c,p){var u,a,h,f,k,y,$,x,b,z,A,D,ae,ce,$e,L=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(c=!!(32&t.__u),r=[l=e.__e=t.__e]),(u=g.__b)&&u(e);e:if(typeof L=="function")try{if(x=e.props,b="prototype"in L&&L.prototype.render,z=(u=L.contextType)&&n[u.__c],A=u?z?z.props.value:u.__:n,t.__c?$=(a=e.__c=t.__c).__=a.__E:(b?e.__c=a=new L(x,A):(e.__c=a=new J(x,A),a.constructor=L,a.render=ht),z&&z.sub(a),a.state||(a.state={}),a.__n=n,h=a.__d=!0,a.__h=[],a._sb=[]),b&&a.__s==null&&(a.__s=a.state),b&&L.getDerivedStateFromProps!=null&&(a.__s==a.state&&(a.__s=H({},a.__s)),H(a.__s,L.getDerivedStateFromProps(x,a.__s))),f=a.props,k=a.state,a.__v=e,h)b&&L.getDerivedStateFromProps==null&&a.componentWillMount!=null&&a.componentWillMount(),b&&a.componentDidMount!=null&&a.__h.push(a.componentDidMount);else{if(b&&L.getDerivedStateFromProps==null&&x!==f&&a.componentWillReceiveProps!=null&&a.componentWillReceiveProps(x,A),e.__v==t.__v||!a.__e&&a.shouldComponentUpdate!=null&&a.shouldComponentUpdate(x,a.__s,A)===!1){e.__v!=t.__v&&(a.props=x,a.state=a.__s,a.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.some(function(Z){Z&&(Z.__=e)}),Y.push.apply(a.__h,a._sb),a._sb=[],a.__h.length&&o.push(a);break e}a.componentWillUpdate!=null&&a.componentWillUpdate(x,a.__s,A),b&&a.componentDidUpdate!=null&&a.__h.push(function(){a.componentDidUpdate(f,k,y)})}if(a.context=A,a.props=x,a.__P=i,a.__e=!1,D=g.__r,ae=0,b)a.state=a.__s,a.__d=!1,D&&D(e),u=a.render(a.props,a.state,a.context),Y.push.apply(a.__h,a._sb),a._sb=[];else do a.__d=!1,D&&D(e),u=a.render(a.props,a.state,a.context),a.state=a.__s;while(a.__d&&++ae<25);a.state=a.__s,a.getChildContext!=null&&(n=H(H({},n),a.getChildContext())),b&&!h&&a.getSnapshotBeforeUpdate!=null&&(y=a.getSnapshotBeforeUpdate(f,k)),ce=u!=null&&u.type===q&&u.key==null?He(u.props.children):u,l=Ae(i,V(ce)?ce:[ce],e,t,n,s,r,o,l,c,p),a.base=e.__e,e.__u&=-161,a.__h.length&&o.push(a),$&&(a.__E=a.__=null)}catch(Z){if(e.__v=null,c||r!=null)if(Z.then){for(e.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;r[r.indexOf(l)]=null,e.__e=l}else{for($e=r.length;$e--;)_e(r[$e]);ge(e)}else e.__e=t.__e,e.__k=t.__k,Z.then||ge(e);g.__e(Z,e,t)}else r==null&&e.__v==t.__v?(e.__k=t.__k,e.__e=t.__e):l=e.__e=ut(t.__e,e,t,n,s,r,o,c,p);return(u=g.diffed)&&u(e),128&e.__u?void 0:l}function ge(i){i&&(i.__c&&(i.__c.__e=!0),i.__k&&i.__k.some(ge))}function Le(i,e,t){for(var n=0;n<t.length;n++)me(t[n],t[++n],t[++n]);g.__c&&g.__c(e,i),i.some(function(s){try{i=s.__h,s.__h=[],i.some(function(r){r.call(s)})}catch(r){g.__e(r,s.__v)}})}function He(i){return typeof i!="object"||i==null||i.__b>0?i:V(i)?i.map(He):H({},i)}function ut(i,e,t,n,s,r,o,l,c){var p,u,a,h,f,k,y,$=t.props||K,x=e.props,b=e.type;if(b=="svg"?s="http://www.w3.org/2000/svg":b=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),r!=null){for(p=0;p<r.length;p++)if((f=r[p])&&"setAttribute"in f==!!b&&(b?f.localName==b:f.nodeType==3)){i=f,r[p]=null;break}}if(i==null){if(b==null)return document.createTextNode(x);i=document.createElementNS(s,b,x.is&&x),l&&(g.__m&&g.__m(e,r),l=!1),r=null}if(b==null)$===x||l&&i.data==x||(i.data=x);else{if(r=r&&R.call(i.childNodes),!l&&r!=null)for($={},p=0;p<i.attributes.length;p++)$[(f=i.attributes[p]).name]=f.value;for(p in $)f=$[p],p=="dangerouslySetInnerHTML"?a=f:p=="children"||p in x||p=="value"&&"defaultValue"in x||p=="checked"&&"defaultChecked"in x||ee(i,p,null,f,s);for(p in x)f=x[p],p=="children"?h=f:p=="dangerouslySetInnerHTML"?u=f:p=="value"?k=f:p=="checked"?y=f:l&&typeof f!="function"||$[p]===f||ee(i,p,f,$[p],s);if(u)l||a&&(u.__html==a.__html||u.__html==i.innerHTML)||(i.innerHTML=u.__html),e.__k=[];else if(a&&(i.innerHTML=""),Ae(e.type=="template"?i.content:i,V(h)?h:[h],e,t,n,b=="foreignObject"?"http://www.w3.org/1999/xhtml":s,r,o,r?r[0]:t.__k&&O(t,0),l,c),r!=null)for(p=r.length;p--;)_e(r[p]);l||(p="value",b=="progress"&&k==null?i.removeAttribute("value"):k!=null&&(k!==i[p]||b=="progress"&&!k||b=="option"&&k!=$[p])&&ee(i,p,k,$[p],s),p="checked",y!=null&&y!=i[p]&&ee(i,p,y,$[p],s))}return i}function me(i,e,t){try{if(typeof i=="function"){var n=typeof i.__u=="function";n&&i.__u(),n&&e==null||(i.__u=i(e))}else i.current=e}catch(s){g.__e(s,t)}}function Ue(i,e,t){var n,s;if(g.unmount&&g.unmount(i),(n=i.ref)&&(n.current&&n.current!=i.__e||me(n,null,e)),(n=i.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(r){g.__e(r,e)}n.base=n.__P=null}if(n=i.__k)for(s=0;s<n.length;s++)n[s]&&Ue(n[s],e,t||typeof i.type!="function");t||_e(i.__e),i.__c=i.__=i.__e=void 0}function ht(i,e,t){return this.constructor(i,t)}function ft(i,e,t){var n,s,r,o;e==document&&(e=document.documentElement),g.__&&g.__(i,e),s=(n=!1)?null:e.__k,r=[],o=[],de(e,i=e.__k=lt(q,null,[i]),s||K,K,e.namespaceURI,s?null:e.firstChild?R.call(e.childNodes):null,r,s?s.__e:e.firstChild,n,o),Le(r,i,o)}R=Y.slice,g={__e:function(i,e,t,n){for(var s,r,o;e=e.__;)if((s=e.__c)&&!s.__)try{if((r=s.constructor)&&r.getDerivedStateFromError!=null&&(s.setState(r.getDerivedStateFromError(i)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(i,n||{}),o=s.__d),o)return s.__E=s}catch(l){i=l}throw i}},C=0,J.prototype.setState=function(i,e){var t;t=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=H({},this.state),typeof i=="function"&&(i=i(H({},t),this.props)),i&&H(t,i),i!=null&&this.__v&&(e&&this._sb.push(e),Ee(this))},J.prototype.forceUpdate=function(i){this.__v&&(this.__e=!0,i&&this.__h.push(i),Ee(this))},J.prototype.render=q,U=[],ze=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Re=function(i,e){return i.__v.__b-e.__v.__b},X.__r=0,Ie=/(PointerCapture)$|Capture$/i,ue=0,he=Me(!1),fe=Me(!0);var _t=0;function m(i,e,t,n,s,r){e||(e={});var o,l,c=e;if("ref"in c)for(l in c={},e)l=="ref"?o=e[l]:c[l]=e[l];var p={type:i,props:c,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--_t,__i:-1,__u:0,__source:s,__self:r};if(typeof i=="function"&&(o=i.defaultProps))for(l in o)c[l]===void 0&&(c[l]=o[l]);return g.vnode&&g.vnode(p),p}var j,S,ke,Be,te=0,Ne=[],I=g,Fe=I.__b,qe=I.__r,Oe=I.diffed,Ze=I.__c,je=I.unmount,Qe=I.__;function be(i,e){I.__h&&I.__h(S,i,te||e),te=0;var t=S.__H||(S.__H={__:[],__h:[]});return i>=t.__.length&&t.__.push({}),t.__[i]}function xe(i){return te=1,dt(Ye,i)}function dt(i,e,t){var n=be(j++,2);if(n.t=i,!n.__c&&(n.__=[Ye(void 0,e),function(l){var c=n.__N?n.__N[0]:n.__[0],p=n.t(c,l);c!==p&&(n.__N=[p,n.__[1]],n.__c.setState({}))}],n.__c=S,!S.__f)){var s=function(l,c,p){if(!n.__c.__H)return!0;var u=n.__c.__H.__.filter(function(h){return h.__c});if(u.every(function(h){return!h.__N}))return!r||r.call(this,l,c,p);var a=n.__c.props!==l;return u.some(function(h){if(h.__N){var f=h.__[0];h.__=h.__N,h.__N=void 0,f!==h.__[0]&&(a=!0)}}),r&&r.call(this,l,c,p)||a};S.__f=!0;var r=S.shouldComponentUpdate,o=S.componentWillUpdate;S.componentWillUpdate=function(l,c,p){if(this.__e){var u=r;r=void 0,s(l,c,p),r=u}o&&o.call(this,l,c,p)},S.shouldComponentUpdate=s}return n.__N||n.__}function ne(i,e){var t=be(j++,3);!I.__s&&Ke(t.__H,e)&&(t.__=i,t.u=e,S.__H.__h.push(t))}function Q(i){return te=5,gt(function(){return{current:i}},[])}function gt(i,e){var t=be(j++,7);return Ke(t.__H,e)&&(t.__=i(),t.__H=e,t.__h=i),t.__}function mt(){for(var i;i=Ne.shift();){var e=i.__H;if(i.__P&&e)try{e.__h.some(ie),e.__h.some(we),e.__h=[]}catch(t){e.__h=[],I.__e(t,i.__v)}}}I.__b=function(i){S=null,Fe&&Fe(i)},I.__=function(i,e){i&&e.__k&&e.__k.__m&&(i.__m=e.__k.__m),Qe&&Qe(i,e)},I.__r=function(i){qe&&qe(i),j=0;var e=(S=i.__c).__H;e&&(ke===S?(e.__h=[],S.__h=[],e.__.some(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.some(ie),e.__h.some(we),e.__h=[],j=0)),ke=S},I.diffed=function(i){Oe&&Oe(i);var e=i.__c;e&&e.__H&&(e.__H.__h.length&&(Ne.push(e)!==1&&Be===I.requestAnimationFrame||((Be=I.requestAnimationFrame)||kt)(mt)),e.__H.__.some(function(t){t.u&&(t.__H=t.u),t.u=void 0})),ke=S=null},I.__c=function(i,e){e.some(function(t){try{t.__h.some(ie),t.__h=t.__h.filter(function(n){return!n.__||we(n)})}catch(n){e.some(function(s){s.__h&&(s.__h=[])}),e=[],I.__e(n,t.__v)}}),Ze&&Ze(i,e)},I.unmount=function(i){je&&je(i);var e,t=i.__c;t&&t.__H&&(t.__H.__.some(function(n){try{ie(n)}catch(s){e=s}}),t.__H=void 0,e&&I.__e(e,t.__v))};var We=typeof requestAnimationFrame=="function";function kt(i){var e,t=function(){clearTimeout(n),We&&cancelAnimationFrame(e),setTimeout(i)},n=setTimeout(t,35);We&&(e=requestAnimationFrame(t))}function ie(i){var e=S,t=i.__c;typeof t=="function"&&(i.__c=void 0,t()),S=e}function we(i){var e=S;i.__c=i.__(),S=e}function Ke(i,e){return!i||i.length!==e.length||e.some(function(t,n){return t!==i[n]})}function Ye(i,e){return typeof e=="function"?e(i):e}async function bt(){return new Promise(i=>{const e=()=>{window.ChatbotConfig?i(window.ChatbotConfig):setTimeout(e,50)};e()})}function xt(){const[i,e]=xe([]),[t,n]=xe(!1),s=Q(null),r=Q(null);async function o(){return r.current||(r.current=await bt()),r.current}async function l(){await o(),e([{id:Date.now(),sender:"bot",text:"Hello! How can I help you today? 您好!今天我能为您做些什么?"}])}async function c(p){var a,h,f;if(t||!p.trim())return;const u=await o();e(k=>[...k,{id:Date.now(),sender:"user",text:p}]),n(!0);try{const k={message:p};s.current&&(k.session_id=s.current);const y=new AbortController,$=setTimeout(()=>y.abort(),u.REQUEST_TIMEOUT_MS),x=Date.now(),b=await fetch(`${u.API_URL}/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k),signal:y.signal});if(clearTimeout($),!b.ok)throw new Error(`HTTP ${b.status}: ${b.statusText}`);const z=await b.json(),A=z.thinking?((Date.now()-x)/1e3).toFixed(1):null;s.current=z.session_id;let D=null;u.SHOW_DEBUG_INFO&&(D={intent:z.intent,confidence:(a=z.confidence)==null?void 0:a.toFixed(2),entities:z.entities,language:(h=z.debug_info)==null?void 0:h.language,environment:(f=z.debug_info)==null?void 0:f.environment}),e(ae=>[...ae,{id:Date.now(),sender:"bot",text:z.response,thinking:z.thinking||null,thinkingDuration:A,debugInfo:D}])}catch(k){const y=r.current,$=y!=null&&y.DEBUG?`Error: ${k.message}`:"Sorry, I encountered an error. Please try again.";e(x=>[...x,{id:Date.now(),sender:"bot",text:$}])}finally{n(!1)}}return{messages:i,isTyping:t,initialize:l,sendMessage:c}}function wt({onClose:i}){return m("div",{class:"chat-header",children:[m("h1",{children:"Smart Chatbot"}),m("button",{class:"chat-close-btn",onClick:i,"aria-label":"Close chat",children:"✕"})]})}function ye(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let B=ye();function Ve(i){B=i}const Ge=/[&<>"']/,yt=new RegExp(Ge.source,"g"),Je=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,vt=new RegExp(Je.source,"g"),$t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Xe=i=>$t[i];function E(i,e){if(e){if(Ge.test(i))return i.replace(yt,Xe)}else if(Je.test(i))return i.replace(vt,Xe);return i}const Tt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function St(i){return i.replace(Tt,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const zt=/(^|[^\[])\^/g;function w(i,e){i=typeof i=="string"?i:i.source,e=e||"";const t={replace:(n,s)=>(s=typeof s=="object"&&"source"in s?s.source:s,s=s.replace(zt,"$1"),i=i.replace(n,s),t),getRegex:()=>new RegExp(i,e)};return t}function et(i){try{i=encodeURI(i).replace(/%25/g,"%")}catch{return null}return i}const re={exec:()=>null};function tt(i,e){const t=i.replace(/\|/g,(r,o,l)=>{let c=!1,p=o;for(;--p>=0&&l[p]==="\\";)c=!c;return c?"|":" |"}),n=t.split(/ \|/);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(/\\\|/g,"|");return n}function se(i,e,t){const n=i.length;if(n===0)return"";let s=0;for(;s<n&&i.charAt(n-s-1)===e;)s++;return i.slice(0,n-s)}function Rt(i,e){if(i.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<i.length;n++)if(i[n]==="\\")n++;else if(i[n]===e[0])t++;else if(i[n]===e[1]&&(t--,t<0))return n;return-1}function nt(i,e,t,n){const s=e.href,r=e.title?E(e.title):null,o=i[1].replace(/\\([\[\]])/g,"$1");if(i[0].charAt(0)!=="!"){n.state.inLink=!0;const l={type:"link",raw:t,href:s,title:r,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}return{type:"image",raw:t,href:s,title:r,text:E(o)}}function It(i,e){const t=i.match(/^(\s+)(?:```)/);if(t===null)return e;const n=t[1];return e.split(`
2
+ `).map(s=>{const r=s.match(/^\s+/);if(r===null)return s;const[o]=r;return o.length>=n.length?s.slice(n.length):s}).join(`
3
+ `)}class oe{constructor(e){T(this,"options");T(this,"rules");T(this,"lexer");this.options=e||B}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:se(n,`
4
+ `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],s=It(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:s}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){const s=se(n,"#");(this.options.pedantic||!s||/ $/.test(s))&&(n=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const n=se(t[0].replace(/^ *>[ \t]?/gm,""),`
5
+ `),s=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(n);return this.lexer.state.top=s,{type:"blockquote",raw:t[0],tokens:r,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const o=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);let l="",c="",p=!1;for(;e;){let u=!1;if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;l=t[0],e=e.substring(l.length);let a=t[2].split(`
6
+ `,1)[0].replace(/^\t+/,x=>" ".repeat(3*x.length)),h=e.split(`
7
+ `,1)[0],f=0;this.options.pedantic?(f=2,c=a.trimStart()):(f=t[2].search(/[^ ]/),f=f>4?1:f,c=a.slice(f),f+=t[1].length);let k=!1;if(!a&&/^ *$/.test(h)&&(l+=h+`
8
+ `,e=e.substring(h.length+1),u=!0),!u){const x=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),b=new RegExp(`^ {0,${Math.min(3,f-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),z=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:\`\`\`|~~~)`),A=new RegExp(`^ {0,${Math.min(3,f-1)}}#`);for(;e;){const D=e.split(`
9
+ `,1)[0];if(h=D,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),z.test(h)||A.test(h)||x.test(h)||b.test(e))break;if(h.search(/[^ ]/)>=f||!h.trim())c+=`
10
+ `+h.slice(f);else{if(k||a.search(/[^ ]/)>=4||z.test(a)||A.test(a)||b.test(a))break;c+=`
11
+ `+h}!k&&!h.trim()&&(k=!0),l+=D+`
12
+ `,e=e.substring(D.length+1),a=h.slice(f)}}r.loose||(p?r.loose=!0:/\n *\n *$/.test(l)&&(p=!0));let y=null,$;this.options.gfm&&(y=/^\[[ xX]\] /.exec(c),y&&($=y[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),r.items.push({type:"list_item",raw:l,task:!!y,checked:$,loose:!1,text:c,tokens:[]}),r.raw+=l}r.items[r.items.length-1].raw=l.trimEnd(),r.items[r.items.length-1].text=c.trimEnd(),r.raw=r.raw.trimEnd();for(let u=0;u<r.items.length;u++)if(this.lexer.state.top=!1,r.items[u].tokens=this.lexer.blockTokens(r.items[u].text,[]),!r.loose){const a=r.items[u].tokens.filter(f=>f.type==="space"),h=a.length>0&&a.some(f=>/\n.*\n/.test(f.raw));r.loose=h}if(r.loose)for(let u=0;u<r.items.length;u++)r.items[u].loose=!0;return r}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(/\s+/g," "),s=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(t){if(!/[:|]/.test(t[2]))return;const n={type:"table",raw:t[0],header:tt(t[1]).map(s=>({text:s,tokens:[]})),align:t[2].replace(/^\||\| *$/g,"").split("|"),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(`
13
+ `):[]};if(n.header.length===n.align.length){let s=n.align.length,r,o,l,c;for(r=0;r<s;r++){const p=n.align[r];p&&(/^ *-+: *$/.test(p)?n.align[r]="right":/^ *:-+: *$/.test(p)?n.align[r]="center":/^ *:-+ *$/.test(p)?n.align[r]="left":n.align[r]=null)}for(s=n.rows.length,r=0;r<s;r++)n.rows[r]=tt(n.rows[r],n.header.length).map(p=>({text:p,tokens:[]}));for(s=n.header.length,o=0;o<s;o++)n.header[o].tokens=this.lexer.inline(n.header[o].text);for(s=n.rows.length,o=0;o<s;o++)for(c=n.rows[o],l=0;l<c.length;l++)c[l].tokens=this.lexer.inline(c[l].text);return n}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===`
14
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:E(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;const o=se(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{const o=Rt(t[2],"()");if(o>-1){const c=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,c).trim(),t[3]=""}}let s=t[2],r="";if(this.options.pedantic){const o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);o&&(s=o[1],r=o[3])}else r=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^</.test(s)&&(this.options.pedantic&&!/>$/.test(n)?s=s.slice(1):s=s.slice(1,-1)),nt(t,{href:s&&s.replace(this.rules.inline._escapes,"$1"),title:r&&r.replace(this.rules.inline._escapes,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let s=(n[2]||n[1]).replace(/\s+/g," ");if(s=t[s.toLowerCase()],!s){const r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return nt(n,s,n[0],this.lexer)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrong.lDelim.exec(e);if(!s||s[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const o=[...s[0]].length-1;let l,c,p=o,u=0;const a=s[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+o);(s=a.exec(t))!=null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(c=[...l].length,s[3]||s[4]){p+=c;continue}else if((s[5]||s[6])&&o%3&&!((o+c)%3)){u+=c;continue}if(p-=c,p>0)continue;c=Math.min(c,c+p+u);const h=[...s[0]][0].length,f=e.slice(0,o+s.index+h+c);if(Math.min(o,c)%2){const y=f.slice(1,-1);return{type:"em",raw:f,text:y,tokens:this.lexer.inlineTokens(y)}}const k=f.slice(2,-2);return{type:"strong",raw:f,text:k,tokens:this.lexer.inlineTokens(k)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const s=/[^ ]/.test(n),r=/^ /.test(n)&&/ $/.test(n);return s&&r&&(n=n.substring(1,n.length-1)),n=E(n,!0),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=E(t[1]),s="mailto:"+n):(n=E(t[1]),s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,s;if(t[2]==="@")n=E(t[0]),s="mailto:"+n;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])[0];while(r!==t[0]);n=E(t[0]),t[1]==="www."?s="http://"+t[0]:s=t[0]}return{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let n;return this.lexer.state.inRawBlock?n=t[0]:n=E(t[0]),{type:"text",raw:t[0],text:n}}}}const d={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:re,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};d._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,d._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,d.def=w(d.def).replace("label",d._label).replace("title",d._title).getRegex(),d.bullet=/(?:[*+-]|\d{1,9}[.)])/,d.listItemStart=w(/^( *)(bull) */).replace("bull",d.bullet).getRegex(),d.list=w(d.list).replace(/bull/g,d.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+d.def.source+")").getRegex(),d._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",d._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,d.html=w(d.html,"i").replace("comment",d._comment).replace("tag",d._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),d.lheading=w(d.lheading).replace(/bull/g,d.bullet).getRegex(),d.paragraph=w(d._paragraph).replace("hr",d.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",d._tag).getRegex(),d.blockquote=w(d.blockquote).replace("paragraph",d.paragraph).getRegex(),d.normal={...d},d.gfm={...d.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},d.gfm.table=w(d.gfm.table).replace("hr",d.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",d._tag).getRegex(),d.gfm.paragraph=w(d._paragraph).replace("hr",d.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",d.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",d._tag).getRegex(),d.pedantic={...d.normal,html:w(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",d._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:re,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:w(d.normal._paragraph).replace("hr",d.hr).replace("heading",` *#{1,6} *[^
15
+ ]`).replace("lheading",d.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const _={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:re,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:re,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^((?![*_])[\spunctuation])/};_._punctuation="\\p{P}$+<=>`^|~",_.punctuation=w(_.punctuation,"u").replace(/punctuation/g,_._punctuation).getRegex(),_.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,_.anyPunctuation=/\\[punct]/g,_._escapes=/\\([punct])/g,_._comment=w(d._comment).replace("(?:-->|$)","-->").getRegex(),_.emStrong.lDelim=w(_.emStrong.lDelim,"u").replace(/punct/g,_._punctuation).getRegex(),_.emStrong.rDelimAst=w(_.emStrong.rDelimAst,"gu").replace(/punct/g,_._punctuation).getRegex(),_.emStrong.rDelimUnd=w(_.emStrong.rDelimUnd,"gu").replace(/punct/g,_._punctuation).getRegex(),_.anyPunctuation=w(_.anyPunctuation,"gu").replace(/punct/g,_._punctuation).getRegex(),_._escapes=w(_._escapes,"gu").replace(/punct/g,_._punctuation).getRegex(),_._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,_._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,_.autolink=w(_.autolink).replace("scheme",_._scheme).replace("email",_._email).getRegex(),_._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,_.tag=w(_.tag).replace("comment",_._comment).replace("attribute",_._attribute).getRegex(),_._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,_._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,_._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,_.link=w(_.link).replace("label",_._label).replace("href",_._href).replace("title",_._title).getRegex(),_.reflink=w(_.reflink).replace("label",_._label).replace("ref",d._label).getRegex(),_.nolink=w(_.nolink).replace("ref",d._label).getRegex(),_.reflinkSearch=w(_.reflinkSearch,"g").replace("reflink",_.reflink).replace("nolink",_.nolink).getRegex(),_.normal={..._},_.pedantic={..._.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:w(/^!?\[(label)\]\((.*?)\)/).replace("label",_._label).getRegex(),reflink:w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_._label).getRegex()},_.gfm={..._.normal,escape:w(_.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},_.gfm.url=w(_.gfm.url,"i").replace("email",_.gfm._extended_email).getRegex(),_.breaks={..._.gfm,br:w(_.br).replace("{2,}","*").getRegex(),text:w(_.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class P{constructor(e){T(this,"tokens");T(this,"options");T(this,"state");T(this,"tokenizer");T(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||B,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:d.normal,inline:_.normal};this.options.pedantic?(t.block=d.pedantic,t.inline=_.pedantic):this.options.gfm&&(t.block=d.gfm,this.options.breaks?t.inline=_.breaks:t.inline=_.gfm),this.tokenizer.rules=t}static get rules(){return{block:d,inline:_}}static lex(e,t){return new P(t).lex(e)}static lexInline(e,t){return new P(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
16
+ `),this.blockTokens(e,this.tokens);let t;for(;t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(l,c,p)=>c+" ".repeat(p.length));let n,s,r,o;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(n=l.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),n.raw.length===1&&t.length>0?t[t.length-1].raw+=`
17
+ `:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=`
18
+ `+n.raw,s.text+=`
19
+ `+n.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=`
20
+ `+n.raw,s.text+=`
21
+ `+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(r=e,this.options.extensions&&this.options.extensions.startBlock){let l=1/0;const c=e.slice(1);let p;this.options.extensions.startBlock.forEach(u=>{p=u.call({lexer:this},c),typeof p=="number"&&p>=0&&(l=Math.min(l,p))}),l<1/0&&l>=0&&(r=e.substring(0,l+1))}if(this.state.top&&(n=this.tokenizer.paragraph(r))){s=t[t.length-1],o&&s.type==="paragraph"?(s.raw+=`
22
+ `+n.raw,s.text+=`
23
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n),o=r.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&s.type==="text"?(s.raw+=`
24
+ `+n.raw,s.text+=`
25
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,s,r,o=e,l,c,p;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)u.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,l.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(c||(p=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(u=>(n=u.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&n.type==="text"&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),s=t[t.length-1],s&&n.type==="text"&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,o,p)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}if(r=e,this.options.extensions&&this.options.extensions.startInline){let u=1/0;const a=e.slice(1);let h;this.options.extensions.startInline.forEach(f=>{h=f.call({lexer:this},a),typeof h=="number"&&h>=0&&(u=Math.min(u,h))}),u<1/0&&u>=0&&(r=e.substring(0,u+1))}if(n=this.tokenizer.inlineText(r)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(p=n.raw.slice(-1)),c=!0,s=t[t.length-1],s&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(e){const u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return t}}class le{constructor(e){T(this,"options");this.options=e||B}code(e,t,n){var r;const s=(r=(t||"").match(/^\S*/))==null?void 0:r[0];return e=e.replace(/\n$/,"")+`
26
+ `,s?'<pre><code class="language-'+E(s)+'">'+(n?e:E(e,!0))+`</code></pre>
27
+ `:"<pre><code>"+(n?e:E(e,!0))+`</code></pre>
28
+ `}blockquote(e){return`<blockquote>
29
+ ${e}</blockquote>
30
+ `}html(e,t){return e}heading(e,t,n){return`<h${t}>${e}</h${t}>
31
+ `}hr(){return`<hr>
32
+ `}list(e,t,n){const s=t?"ol":"ul",r=t&&n!==1?' start="'+n+'"':"";return"<"+s+r+`>
33
+ `+e+"</"+s+`>
34
+ `}listitem(e,t,n){return`<li>${e}</li>
35
+ `}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>
36
+ `}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),`<table>
37
+ <thead>
38
+ `+e+`</thead>
39
+ `+t+`</table>
40
+ `}tablerow(e){return`<tr>
41
+ ${e}</tr>
42
+ `}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
43
+ `}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){const s=et(e);if(s===null)return n;e=s;let r='<a href="'+e+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image(e,t,n){const s=et(e);if(s===null)return n;e=s;let r=`<img src="${e}" alt="${n}"`;return t&&(r+=` title="${t}"`),r+=">",r}text(e){return e}}class ve{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class M{constructor(e){T(this,"options");T(this,"renderer");T(this,"textRenderer");this.options=e||B,this.options.renderer=this.options.renderer||new le,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ve}static parse(e,t){return new M(t).parse(e)}static parseInline(e,t){return new M(t).parseInline(e)}parse(e,t=!0){let n="";for(let s=0;s<e.length;s++){const r=e[s];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const o=r,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(o.type)){n+=l||"";continue}}switch(r.type){case"space":continue;case"hr":{n+=this.renderer.hr();continue}case"heading":{const o=r;n+=this.renderer.heading(this.parseInline(o.tokens),o.depth,St(this.parseInline(o.tokens,this.textRenderer)));continue}case"code":{const o=r;n+=this.renderer.code(o.text,o.lang,!!o.escaped);continue}case"table":{const o=r;let l="",c="";for(let u=0;u<o.header.length;u++)c+=this.renderer.tablecell(this.parseInline(o.header[u].tokens),{header:!0,align:o.align[u]});l+=this.renderer.tablerow(c);let p="";for(let u=0;u<o.rows.length;u++){const a=o.rows[u];c="";for(let h=0;h<a.length;h++)c+=this.renderer.tablecell(this.parseInline(a[h].tokens),{header:!1,align:o.align[h]});p+=this.renderer.tablerow(c)}n+=this.renderer.table(l,p);continue}case"blockquote":{const o=r,l=this.parse(o.tokens);n+=this.renderer.blockquote(l);continue}case"list":{const o=r,l=o.ordered,c=o.start,p=o.loose;let u="";for(let a=0;a<o.items.length;a++){const h=o.items[a],f=h.checked,k=h.task;let y="";if(h.task){const $=this.renderer.checkbox(!!f);p?h.tokens.length>0&&h.tokens[0].type==="paragraph"?(h.tokens[0].text=$+" "+h.tokens[0].text,h.tokens[0].tokens&&h.tokens[0].tokens.length>0&&h.tokens[0].tokens[0].type==="text"&&(h.tokens[0].tokens[0].text=$+" "+h.tokens[0].tokens[0].text)):h.tokens.unshift({type:"text",text:$+" "}):y+=$+" "}y+=this.parse(h.tokens,p),u+=this.renderer.listitem(y,k,!!f)}n+=this.renderer.list(u,l,c);continue}case"html":{const o=r;n+=this.renderer.html(o.text,o.block);continue}case"paragraph":{const o=r;n+=this.renderer.paragraph(this.parseInline(o.tokens));continue}case"text":{let o=r,l=o.tokens?this.parseInline(o.tokens):o.text;for(;s+1<e.length&&e[s+1].type==="text";)o=e[++s],l+=`
44
+ `+(o.tokens?this.parseInline(o.tokens):o.text);n+=t?this.renderer.paragraph(l):l;continue}default:{const o='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let s=0;s<e.length;s++){const r=e[s];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const o=this.options.extensions.renderers[r.type].call({parser:this},r);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){n+=o||"";continue}}switch(r.type){case"escape":{const o=r;n+=t.text(o.text);break}case"html":{const o=r;n+=t.html(o.text);break}case"link":{const o=r;n+=t.link(o.href,o.title,this.parseInline(o.tokens,t));break}case"image":{const o=r;n+=t.image(o.href,o.title,o.text);break}case"strong":{const o=r;n+=t.strong(this.parseInline(o.tokens,t));break}case"em":{const o=r;n+=t.em(this.parseInline(o.tokens,t));break}case"codespan":{const o=r;n+=t.codespan(o.text);break}case"br":{n+=t.br();break}case"del":{const o=r;n+=t.del(this.parseInline(o.tokens,t));break}case"text":{const o=r;n+=t.text(o.text);break}default:{const o='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}}class W{constructor(e){T(this,"options");this.options=e||B}preprocess(e){return e}postprocess(e){return e}}T(W,"passThroughHooks",new Set(["preprocess","postprocess"]));class Ct{constructor(...e){rt(this,F);T(this,"defaults",ye());T(this,"options",this.setOptions);T(this,"parse",pe(this,F,Te).call(this,P.lex,M.parse));T(this,"parseInline",pe(this,F,Te).call(this,P.lexInline,M.parseInline));T(this,"Parser",M);T(this,"Renderer",le);T(this,"TextRenderer",ve);T(this,"Lexer",P);T(this,"Tokenizer",oe);T(this,"Hooks",W);this.use(...e)}walkTokens(e,t){var s,r;let n=[];for(const o of e)switch(n=n.concat(t.call(this,o)),o.type){case"table":{const l=o;for(const c of l.header)n=n.concat(this.walkTokens(c.tokens,t));for(const c of l.rows)for(const p of c)n=n.concat(this.walkTokens(p.tokens,t));break}case"list":{const l=o;n=n.concat(this.walkTokens(l.items,t));break}default:{const l=o;(r=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&r[l.type]?this.defaults.extensions.childTokens[l.type].forEach(c=>{n=n.concat(this.walkTokens(l[c],t))}):l.tokens&&(n=n.concat(this.walkTokens(l.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const o=t.renderers[r.name];o?t.renderers[r.name]=function(...l){let c=r.renderer.apply(this,l);return c===!1&&(c=o.apply(this,l)),c}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=t[r.level];o?o.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),s.extensions=t),n.renderer){const r=this.defaults.renderer||new le(this.defaults);for(const o in n.renderer){const l=n.renderer[o],c=o,p=r[c];r[c]=(...u)=>{let a=l.apply(r,u);return a===!1&&(a=p.apply(r,u)),a||""}}s.renderer=r}if(n.tokenizer){const r=this.defaults.tokenizer||new oe(this.defaults);for(const o in n.tokenizer){const l=n.tokenizer[o],c=o,p=r[c];r[c]=(...u)=>{let a=l.apply(r,u);return a===!1&&(a=p.apply(r,u)),a}}s.tokenizer=r}if(n.hooks){const r=this.defaults.hooks||new W;for(const o in n.hooks){const l=n.hooks[o],c=o,p=r[c];W.passThroughHooks.has(o)?r[c]=u=>{if(this.defaults.async)return Promise.resolve(l.call(r,u)).then(h=>p.call(r,h));const a=l.call(r,u);return p.call(r,a)}:r[c]=(...u)=>{let a=l.apply(r,u);return a===!1&&(a=p.apply(r,u)),a}}s.hooks=r}if(n.walkTokens){const r=this.defaults.walkTokens,o=n.walkTokens;s.walkTokens=function(l){let c=[];return c.push(o.call(this,l)),r&&(c=c.concat(r.call(this,l))),c}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return P.lex(e,t??this.defaults)}parser(e,t){return M.parse(e,t??this.defaults)}}F=new WeakSet,Te=function(e,t){return(n,s)=>{const r={...s},o={...this.defaults,...r};this.defaults.async===!0&&r.async===!1&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);const l=pe(this,F,st).call(this,!!o.silent,!!o.async);if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o),o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then(c=>e(c,o)).then(c=>o.walkTokens?Promise.all(this.walkTokens(c,o.walkTokens)).then(()=>c):c).then(c=>t(c,o)).then(c=>o.hooks?o.hooks.postprocess(c):c).catch(l);try{o.hooks&&(n=o.hooks.preprocess(n));const c=e(n,o);o.walkTokens&&this.walkTokens(c,o.walkTokens);let p=t(c,o);return o.hooks&&(p=o.hooks.postprocess(p)),p}catch(c){return l(c)}}},st=function(e,t){return n=>{if(n.message+=`
45
+ Please report this to https://github.com/markedjs/marked.`,e){const s="<p>An error occurred:</p><pre>"+E(n.message+"",!0)+"</pre>";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}};const N=new Ct;function v(i,e){return N.parse(i,e)}v.options=v.setOptions=function(i){return N.setOptions(i),v.defaults=N.defaults,Ve(v.defaults),v},v.getDefaults=ye,v.defaults=B,v.use=function(...i){return N.use(...i),v.defaults=N.defaults,Ve(v.defaults),v},v.walkTokens=function(i,e){return N.walkTokens(i,e)},v.parseInline=N.parseInline,v.Parser=M,v.parser=M.parse,v.Renderer=le,v.TextRenderer=ve,v.Lexer=P,v.lexer=P.lex,v.Tokenizer=oe,v.Hooks=W,v.parse=v,v.options,v.setOptions,v.use,v.walkTokens,v.parseInline,M.parse,P.lex;function Et({thinking:i,duration:e}){return i?m("details",{class:"thinking-details",children:[m("summary",{children:["Drafted in ",e,"s"]}),m("div",{class:"thinking-block",children:i})]}):null}function At({message:i}){const{sender:e,text:t,thinking:n,debugInfo:s}=i,r=e==="user";let o="";return s&&(o=`Intent: ${s.intent} (${s.confidence})`,s.entities&&Object.keys(s.entities).length>0&&(o+=` | Entities: ${JSON.stringify(s.entities)}`),s.language&&(o+=` | Language: ${s.language}`),s.environment&&(o+=` | Env: ${s.environment}`)),m(q,{children:[!r&&m(Et,{thinking:n,duration:i.thinkingDuration}),m("div",{class:`message ${r?"user-message":"bot-message"}`,children:[m("div",{class:"message-avatar",children:r?"👤":"🤖"}),m("div",{class:"message-content",children:[m("div",{dangerouslySetInnerHTML:{__html:v.parse(t)}}),s&&m("div",{class:"debug-info",children:o})]})]})]})}function Dt({messages:i}){const e=Q(null);return ne(()=>{var t;(t=e.current)==null||t.scrollIntoView({behavior:"smooth"})},[i]),m("div",{class:"chat-messages",children:[m("div",{class:"messages-spacer"}),i.map(t=>m(At,{message:t},t.id)),m("div",{ref:e})]})}function Pt({active:i}){return i?m("div",{class:"typing-indicator",children:[m("div",{class:"message-avatar",children:"🤖"}),m("div",{class:"message-content typing-content",style:"display:flex; align-items:center;",children:[m("span",{style:"font-style: italic; margin-right: 6px; opacity: 0.8;",children:"Pondering"}),m("div",{class:"typing-dots",children:[m("span",{}),m("span",{}),m("span",{})]})]})]}):null}function Mt({onSend:i,disabled:e}){const t=Q(null);ne(()=>{var o;e||(o=t.current)==null||o.focus()},[e]);function n(){var l;const o=(l=t.current)==null?void 0:l.value.trim();!o||e||(i(o),t.current.value="",t.current.style.height="38px")}function s(o){o.key==="Enter"&&!o.shiftKey&&!e&&(o.preventDefault(),n())}function r(){const o=t.current;o.style.height="38px",o.scrollHeight>38&&(o.style.height=o.scrollHeight+"px")}return m("div",{class:"chat-input",children:[m("div",{class:"input-container",children:m("textarea",{ref:t,placeholder:"Type your message...",onKeyDown:s,onInput:r,disabled:e})}),m("button",{class:"send-button",onClick:n,disabled:e,"aria-label":"Send message",children:"➤"})]})}function Lt({isOpen:i,onClose:e}){const{messages:t,isTyping:n,initialize:s,sendMessage:r}=xt(),o=Q(!1);return ne(()=>{i&&!o.current&&(o.current=!0,s())},[i]),m("div",{class:`chat-panel${i?" open":""}`,children:[m(wt,{onClose:e}),m(Dt,{messages:t}),m(Pt,{active:n}),m(Mt,{onSend:r,disabled:n})]})}function Ht(){const i=window.ChatbotConfig;return i!=null&&i.DEBUG?m("div",{class:`env-badge ${i.DETECTED_ENVIRONMENT||""}`,children:["Environment: ",i.ENVIRONMENT," | API: ",i.API_URL||"(same-origin)"]}):null}function Ut(){const[i,e]=xe(!1);return ne(()=>{window===window.top&&(document.body.style.background="linear-gradient(135deg, #667eea 0%, #764ba2 100%)",document.body.style.minHeight="100vh")},[]),m(q,{children:[m(Ht,{}),m("button",{class:"chat-widget-btn",onClick:()=>e(t=>!t),"aria-label":"Toggle chat",children:i?"✕":"💬"}),m(Lt,{isOpen:i,onClose:()=>e(!1)})]})}const Bt=":host{display:block}*{box-sizing:border-box;margin:0;padding:0}.chat-widget-btn{position:fixed;bottom:24px;right:24px;width:60px;height:60px;background:#fff3;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.35);border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:26px;box-shadow:0 4px 24px #0003,inset 0 1px #ffffff73;transition:transform .2s,box-shadow .2s,background .2s;z-index:9999;-webkit-user-select:none;user-select:none}.chat-widget-btn:hover{transform:scale(1.08);background:#ffffff47;box-shadow:0 6px 32px #00000047,inset 0 1px #ffffff80}.chat-panel{position:fixed;bottom:96px;right:24px;width:370px;height:520px;background:#ffffff26;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid rgba(255,255,255,.25);border-radius:18px;box-shadow:0 8px 40px #00000040,inset 0 1px #ffffff4d;display:flex;flex-direction:column;overflow:hidden;z-index:9998;opacity:0;pointer-events:none;transform:scale(.88) translateY(16px);transform-origin:bottom right;transition:opacity .25s ease,transform .25s cubic-bezier(.175,.885,.32,1.275)}.chat-panel.open{opacity:1;pointer-events:all;transform:scale(1) translateY(0)}.chat-header{background:#667eea80;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid rgba(255,255,255,.2);color:#fff;padding:16px 20px;border-radius:18px 18px 0 0;position:relative;flex-shrink:0}.chat-header h1{font-size:1.1rem;font-weight:600;margin-bottom:2px;text-shadow:0 1px 4px rgba(0,0,0,.15)}.chat-close-btn{position:absolute;top:12px;right:14px;background:#ffffff26;border:1px solid rgba(255,255,255,.25);color:#fff;font-size:16px;cursor:pointer;opacity:.9;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:opacity .15s,background .15s}.chat-close-btn:hover{opacity:1;background:#ffffff47}.chat-messages{flex:1;padding:14px;overflow-y:auto;background:#ffffff0f;display:flex;flex-direction:column;gap:10px}.messages-spacer{flex:1}.chat-messages::-webkit-scrollbar{width:4px}.chat-messages::-webkit-scrollbar-track{background:transparent}.chat-messages::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:2px}.message{display:flex;align-items:flex-start;gap:8px;max-width:88%;animation:slideIn .25s ease-out}@keyframes slideIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.message.user-message{align-self:flex-end;flex-direction:row-reverse}.message.bot-message{align-self:flex-start}.message-avatar{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0;border:1px solid rgba(255,255,255,.3)}.user-message .message-avatar{background:#667eea99}.bot-message .message-avatar{background:#fff3}.message-content{padding:9px 13px;border-radius:14px;font-size:13.5px;line-height:1.45;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.user-message .message-content{background:#667eeabf;border:1px solid rgba(255,255,255,.2);color:#fff;box-shadow:0 2px 10px #667eea4d}.bot-message .message-content{background:#ffffffa6;border:1px solid rgba(255,255,255,.5);color:#1a1a2e;box-shadow:0 2px 10px #00000014}.message-content ul,.message-content ol{padding-left:18px}.message-content p{margin-bottom:6px}.message-content p:last-child{margin-bottom:0}.message-content h1,.message-content h2,.message-content h3{margin-top:8px;margin-bottom:4px}.debug-info{font-size:10px;color:#6c757d;margin-top:6px;padding:5px 8px;background:#fff6;border-radius:6px;border:1px solid rgba(255,255,255,.3)}.thinking-details{align-self:flex-start;max-width:88%;font-size:12px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;color:#ffffffbf;background:#ffffff14;border:1px solid rgba(255,255,255,.18);border-radius:10px;padding:6px 10px;animation:slideIn .25s ease-out}.thinking-details summary{cursor:pointer;font-style:italic;-webkit-user-select:none;user-select:none}.thinking-block{margin-top:6px;font-size:11px;opacity:.85;white-space:pre-wrap;line-height:1.4}.typing-indicator{display:flex;align-items:center;gap:5px;padding:5px 14px;color:#ffffffbf;font-style:italic;font-size:12px;background:#ffffff0f;flex-shrink:0}.typing-content{background:#ffffff4d!important;border:1px solid rgba(255,255,255,.4)!important;color:#fff!important}.typing-dots{display:flex;gap:3px}.typing-dots span{width:5px;height:5px;background:#fff9;border-radius:50%;animation:typingBounce 1.4s infinite}.typing-dots span:nth-child(2){animation-delay:.2s}.typing-dots span:nth-child(3){animation-delay:.4s}@keyframes typingBounce{0%,60%,to{transform:translateY(0);opacity:.35}30%{transform:translateY(-6px);opacity:1}}.chat-input{display:flex;padding:10px 12px;border-top:1px solid rgba(255,255,255,.15);background:#ffffff1a;gap:8px;align-items:flex-end;flex-shrink:0}.input-container{flex:1}.chat-input textarea{width:100%;padding:9px 13px;line-height:1.4;height:38px;max-height:110px;border:1px solid rgba(255,255,255,.4);border-radius:18px;font-size:13.5px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;outline:none;transition:border-color .2s,background .2s;overflow-y:auto;resize:none;scrollbar-width:none;-ms-overflow-style:none;background:#ffffffbf;color:#1a1a2e}.chat-input textarea::-webkit-scrollbar{display:none}.chat-input textarea:focus{border-color:#ffffffb3;background:#ffffffe0}.chat-input textarea::placeholder{color:#5050788c}.send-button{width:38px;height:38px;background:#667eeacc;border:1px solid rgba(255,255,255,.25);color:#fff;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s,transform .1s;font-size:15px;flex-shrink:0;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}.send-button:hover{background:#667eea;transform:scale(1.06)}.send-button:disabled{background:#b4b4c866;cursor:not-allowed;transform:none}.env-badge{position:fixed;top:12px;right:12px;background:#fff3;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);padding:6px 10px;border-radius:16px;font-size:11px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;color:#fff;border:1px solid rgba(255,255,255,.3);z-index:10000}.env-badge.development{background:#90ee9040;border-color:#90ee9066}.env-badge.production{background:#ff646440;border-color:#ff646466}@media(max-width:480px){.chat-panel{width:calc(100vw - 20px);height:75vh;right:10px;bottom:86px}.chat-widget-btn{bottom:16px;right:16px;width:54px;height:54px;font-size:22px}}";class Nt extends HTMLElement{connectedCallback(){const e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=Bt,e.appendChild(t);const n=document.createElement("div");e.appendChild(n),ft(m(Ut,{}),n)}}customElements.get("smart-chatbot")||customElements.define("smart-chatbot",Nt)})();
frontend/config.js CHANGED
@@ -1,7 +1,7 @@
1
  /**
2
  * Frontend Configuration
3
  *
4
- * Auto-generated from backend .env files on 2026-03-03 11:46:27
5
  * DO NOT EDIT THIS FILE MANUALLY - your changes will be overwritten!
6
  *
7
  * To update configuration:
@@ -18,7 +18,8 @@ const config = {
18
  "SHOW_DEBUG_INFO": true,
19
  "ENVIRONMENT": "development",
20
  "CONFIDENCE_THRESHOLD": 0.3,
21
- "DEFAULT_LANGUAGE": "en"
 
22
  },
23
  "production": {
24
  "API_URL": "",
@@ -26,7 +27,8 @@ const config = {
26
  "SHOW_DEBUG_INFO": false,
27
  "ENVIRONMENT": "production",
28
  "CONFIDENCE_THRESHOLD": 0.8,
29
- "DEFAULT_LANGUAGE": "en"
 
30
  },
31
  "staging": {
32
  "API_URL": "",
@@ -34,7 +36,8 @@ const config = {
34
  "SHOW_DEBUG_INFO": true,
35
  "ENVIRONMENT": "staging",
36
  "CONFIDENCE_THRESHOLD": 0.8,
37
- "DEFAULT_LANGUAGE": "en"
 
38
  }
39
  };
40
 
@@ -46,7 +49,7 @@ function detectEnvironment() {
46
  const hostname = window.location.hostname;
47
 
48
  // Local development
49
- if (hostname === 'localhost' || hostname === '127.0.0.1') {
50
  return 'development';
51
  }
52
 
 
1
  /**
2
  * Frontend Configuration
3
  *
4
+ * Auto-generated from backend .env files on 2026-03-06 19:04:49
5
  * DO NOT EDIT THIS FILE MANUALLY - your changes will be overwritten!
6
  *
7
  * To update configuration:
 
18
  "SHOW_DEBUG_INFO": true,
19
  "ENVIRONMENT": "development",
20
  "CONFIDENCE_THRESHOLD": 0.3,
21
+ "DEFAULT_LANGUAGE": "en",
22
+ "REQUEST_TIMEOUT_MS": 60000
23
  },
24
  "production": {
25
  "API_URL": "",
 
27
  "SHOW_DEBUG_INFO": false,
28
  "ENVIRONMENT": "production",
29
  "CONFIDENCE_THRESHOLD": 0.8,
30
+ "DEFAULT_LANGUAGE": "en",
31
+ "REQUEST_TIMEOUT_MS": 30000
32
  },
33
  "staging": {
34
  "API_URL": "",
 
36
  "SHOW_DEBUG_INFO": true,
37
  "ENVIRONMENT": "staging",
38
  "CONFIDENCE_THRESHOLD": 0.8,
39
+ "DEFAULT_LANGUAGE": "en",
40
+ "REQUEST_TIMEOUT_MS": 30000
41
  }
42
  };
43
 
 
49
  const hostname = window.location.hostname;
50
 
51
  // Local development
52
+ if (hostname === 'localhost' || hostname === '127.0.0.1' || hostname.endsWith('.local')) {
53
  return 'development';
54
  }
55
 
frontend/index.html CHANGED
@@ -1,719 +1,16 @@
1
  <!DOCTYPE html>
2
  <html>
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Monireach's Smart Chatbot Demo</title>
7
- <script src="config.js"></script>
8
- <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
9
- <style>
10
- * {
11
- box-sizing: border-box;
12
- margin: 0;
13
- padding: 0;
14
- }
15
 
16
- body {
17
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
18
- background: transparent;
19
- }
 
 
20
 
21
- /* ============================================================
22
- FLOATING CHAT BUTTON
23
- ============================================================ */
 
24
 
25
- .chat-widget-btn {
26
- position: fixed;
27
- bottom: 24px;
28
- right: 24px;
29
- width: 60px;
30
- height: 60px;
31
- background: rgba(255, 255, 255, 0.2);
32
- backdrop-filter: blur(12px);
33
- -webkit-backdrop-filter: blur(12px);
34
- border: 1px solid rgba(255, 255, 255, 0.35);
35
- border-radius: 50%;
36
- cursor: pointer;
37
- display: flex;
38
- align-items: center;
39
- justify-content: center;
40
- font-size: 26px;
41
- box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.45);
42
- transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
43
- z-index: 9999;
44
- user-select: none;
45
- }
46
-
47
- .chat-widget-btn:hover {
48
- transform: scale(1.08);
49
- background: rgba(255, 255, 255, 0.28);
50
- box-shadow: 0 6px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
51
- }
52
-
53
- /* ============================================================
54
- CHAT PANEL
55
- ============================================================ */
56
-
57
- .chat-panel {
58
- position: fixed;
59
- bottom: 96px;
60
- right: 24px;
61
- width: 370px;
62
- height: 520px;
63
- background: rgba(255, 255, 255, 0.15);
64
- backdrop-filter: blur(24px);
65
- -webkit-backdrop-filter: blur(24px);
66
- border: 1px solid rgba(255, 255, 255, 0.25);
67
- border-radius: 18px;
68
- box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
69
- display: flex;
70
- flex-direction: column;
71
- overflow: hidden;
72
- z-index: 9998;
73
-
74
- /* Hidden by default */
75
- opacity: 0;
76
- pointer-events: none;
77
- transform: scale(0.88) translateY(16px);
78
- transform-origin: bottom right;
79
- transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
80
- }
81
-
82
- .chat-panel.open {
83
- opacity: 1;
84
- pointer-events: all;
85
- transform: scale(1) translateY(0);
86
- }
87
-
88
- /* ============================================================
89
- HEADER
90
- ============================================================ */
91
-
92
- .chat-header {
93
- background: rgba(102, 126, 234, 0.5);
94
- backdrop-filter: blur(10px);
95
- -webkit-backdrop-filter: blur(10px);
96
- border-bottom: 1px solid rgba(255, 255, 255, 0.2);
97
- color: white;
98
- padding: 16px 20px;
99
- border-radius: 18px 18px 0 0;
100
- position: relative;
101
- flex-shrink: 0;
102
- }
103
-
104
- .chat-header h1 {
105
- font-size: 1.1rem;
106
- font-weight: 600;
107
- margin-bottom: 2px;
108
- text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
109
- }
110
-
111
- .chat-header p {
112
- opacity: 0.85;
113
- font-size: 0.78rem;
114
- text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
115
- }
116
-
117
- .chat-close-btn {
118
- position: absolute;
119
- top: 12px;
120
- right: 14px;
121
- background: rgba(255, 255, 255, 0.15);
122
- border: 1px solid rgba(255, 255, 255, 0.25);
123
- color: white;
124
- font-size: 16px;
125
- cursor: pointer;
126
- opacity: 0.9;
127
- width: 28px;
128
- height: 28px;
129
- border-radius: 50%;
130
- display: flex;
131
- align-items: center;
132
- justify-content: center;
133
- transition: opacity 0.15s, background 0.15s;
134
- }
135
-
136
- .chat-close-btn:hover {
137
- opacity: 1;
138
- background: rgba(255, 255, 255, 0.28);
139
- }
140
-
141
- /* ============================================================
142
- MESSAGES
143
- ============================================================ */
144
-
145
- .chat-messages {
146
- flex: 1;
147
- padding: 14px;
148
- overflow-y: auto;
149
- background: rgba(255, 255, 255, 0.06);
150
- display: flex;
151
- flex-direction: column;
152
- gap: 10px;
153
- }
154
-
155
- .chat-messages::before {
156
- content: '';
157
- flex: 1;
158
- }
159
-
160
- .chat-messages::-webkit-scrollbar {
161
- width: 4px;
162
- }
163
-
164
- .chat-messages::-webkit-scrollbar-track {
165
- background: transparent;
166
- }
167
-
168
- .chat-messages::-webkit-scrollbar-thumb {
169
- background: rgba(255, 255, 255, 0.3);
170
- border-radius: 2px;
171
- }
172
-
173
- .message {
174
- display: flex;
175
- align-items: flex-start;
176
- gap: 8px;
177
- max-width: 88%;
178
- animation: slideIn 0.25s ease-out;
179
- }
180
-
181
- @keyframes slideIn {
182
- from {
183
- opacity: 0;
184
- transform: translateY(8px);
185
- }
186
- to {
187
- opacity: 1;
188
- transform: translateY(0);
189
- }
190
- }
191
-
192
- .message.user-message {
193
- align-self: flex-end;
194
- flex-direction: row-reverse;
195
- }
196
-
197
- .message.bot-message {
198
- align-self: flex-start;
199
- }
200
-
201
- .message-avatar {
202
- width: 28px;
203
- height: 28px;
204
- border-radius: 50%;
205
- display: flex;
206
- align-items: center;
207
- justify-content: center;
208
- font-size: 14px;
209
- flex-shrink: 0;
210
- border: 1px solid rgba(255, 255, 255, 0.3);
211
- }
212
-
213
- .user-message .message-avatar {
214
- background: rgba(102, 126, 234, 0.6);
215
- }
216
-
217
- .bot-message .message-avatar {
218
- background: rgba(255, 255, 255, 0.2);
219
- }
220
-
221
- .message-content {
222
- padding: 9px 13px;
223
- border-radius: 14px;
224
- font-size: 13.5px;
225
- line-height: 1.45;
226
- backdrop-filter: blur(8px);
227
- -webkit-backdrop-filter: blur(8px);
228
- }
229
-
230
- .user-message .message-content {
231
- background: rgba(102, 126, 234, 0.75);
232
- border: 1px solid rgba(255, 255, 255, 0.2);
233
- color: white;
234
- box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
235
- }
236
-
237
- .bot-message .message-content {
238
- background: rgba(255, 255, 255, 0.65);
239
- border: 1px solid rgba(255, 255, 255, 0.5);
240
- color: #1a1a2e;
241
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
242
- }
243
-
244
- .message-content ul,
245
- .message-content ol {
246
- padding-left: 18px;
247
- }
248
-
249
- .message-content p {
250
- margin-bottom: 6px;
251
- }
252
-
253
- .message-content p:last-child {
254
- margin-bottom: 0;
255
- }
256
-
257
- .message-content h1,
258
- .message-content h2,
259
- .message-content h3 {
260
- margin-top: 8px;
261
- margin-bottom: 4px;
262
- }
263
-
264
- .debug-info {
265
- font-size: 10px;
266
- color: #6c757d;
267
- margin-top: 6px;
268
- padding: 5px 8px;
269
- background: rgba(255, 255, 255, 0.4);
270
- border-radius: 6px;
271
- border: 1px solid rgba(255, 255, 255, 0.3);
272
- }
273
-
274
- /* ============================================================
275
- TYPING INDICATOR
276
- ============================================================ */
277
-
278
- .typing-indicator {
279
- display: none;
280
- align-items: center;
281
- gap: 5px;
282
- padding: 5px 14px;
283
- color: rgba(255, 255, 255, 0.75);
284
- font-style: italic;
285
- font-size: 12px;
286
- background: rgba(255, 255, 255, 0.06);
287
- flex-shrink: 0;
288
- }
289
-
290
- .typing-indicator.active {
291
- display: flex;
292
- }
293
-
294
- .typing-dots {
295
- display: flex;
296
- gap: 3px;
297
- }
298
-
299
- .typing-dots span {
300
- width: 5px;
301
- height: 5px;
302
- background: rgba(255, 255, 255, 0.6);
303
- border-radius: 50%;
304
- animation: typing 1.4s infinite;
305
- }
306
-
307
- .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
308
- .typing-dots span:nth-child(3) { animation-delay: 0.4s; }
309
-
310
- @keyframes typing {
311
- 0%, 60%, 100% {
312
- transform: translateY(0);
313
- opacity: 0.35;
314
- }
315
- 30% {
316
- transform: translateY(-6px);
317
- opacity: 1;
318
- }
319
- }
320
-
321
- /* ============================================================
322
- INPUT
323
- ============================================================ */
324
-
325
- .chat-input {
326
- display: flex;
327
- padding: 10px 12px;
328
- border-top: 1px solid rgba(255, 255, 255, 0.15);
329
- background: rgba(255, 255, 255, 0.1);
330
- gap: 8px;
331
- align-items: flex-end;
332
- flex-shrink: 0;
333
- }
334
-
335
- .input-container {
336
- flex: 1;
337
- }
338
-
339
- .chat-input textarea {
340
- width: 100%;
341
- padding: 9px 13px;
342
- line-height: 1.4;
343
- height: 38px;
344
- max-height: 110px;
345
- border: 1px solid rgba(255, 255, 255, 0.4);
346
- border-radius: 18px;
347
- font-size: 13.5px;
348
- font-family: inherit;
349
- outline: none;
350
- transition: border-color 0.2s, background 0.2s;
351
- overflow-y: auto;
352
- resize: none;
353
- scrollbar-width: none;
354
- -ms-overflow-style: none;
355
- background: rgba(255, 255, 255, 0.75);
356
- color: #1a1a2e;
357
- }
358
-
359
- .chat-input textarea::-webkit-scrollbar {
360
- display: none;
361
- }
362
-
363
- .chat-input textarea:focus {
364
- border-color: rgba(255, 255, 255, 0.7);
365
- background: rgba(255, 255, 255, 0.88);
366
- }
367
-
368
- .chat-input textarea::placeholder {
369
- color: rgba(80, 80, 120, 0.55);
370
- }
371
-
372
- .send-button {
373
- width: 38px;
374
- height: 38px;
375
- background: rgba(102, 126, 234, 0.8);
376
- border: 1px solid rgba(255, 255, 255, 0.25);
377
- color: white;
378
- border-radius: 50%;
379
- cursor: pointer;
380
- display: flex;
381
- align-items: center;
382
- justify-content: center;
383
- transition: background 0.2s, transform 0.1s;
384
- font-size: 15px;
385
- flex-shrink: 0;
386
- backdrop-filter: blur(6px);
387
- -webkit-backdrop-filter: blur(6px);
388
- }
389
-
390
- .send-button:hover {
391
- background: rgba(102, 126, 234, 1);
392
- transform: scale(1.06);
393
- }
394
-
395
- .send-button:disabled {
396
- background: rgba(180, 180, 200, 0.4);
397
- cursor: not-allowed;
398
- transform: none;
399
- }
400
-
401
- /* ============================================================
402
- ENVIRONMENT INFO
403
- ============================================================ */
404
-
405
- .environment-info {
406
- position: fixed;
407
- top: 12px;
408
- right: 12px;
409
- background: rgba(255, 255, 255, 0.2);
410
- backdrop-filter: blur(10px);
411
- -webkit-backdrop-filter: blur(10px);
412
- padding: 6px 10px;
413
- border-radius: 16px;
414
- font-size: 11px;
415
- color: white;
416
- border: 1px solid rgba(255, 255, 255, 0.3);
417
- z-index: 10000;
418
- }
419
-
420
- .environment-info.development {
421
- background: rgba(144, 238, 144, 0.25);
422
- border-color: rgba(144, 238, 144, 0.4);
423
- }
424
-
425
- .environment-info.production {
426
- background: rgba(255, 100, 100, 0.25);
427
- border-color: rgba(255, 100, 100, 0.4);
428
- }
429
-
430
- /* ============================================================
431
- MOBILE
432
- ============================================================ */
433
-
434
- @media (max-width: 480px) {
435
- .chat-panel {
436
- width: calc(100vw - 20px);
437
- height: 75vh;
438
- right: 10px;
439
- bottom: 86px;
440
- }
441
-
442
- .chat-widget-btn {
443
- bottom: 16px;
444
- right: 16px;
445
- width: 54px;
446
- height: 54px;
447
- font-size: 22px;
448
- }
449
- }
450
- </style>
451
- </head>
452
-
453
- <body>
454
- <!-- Environment indicator (debug mode only) -->
455
- <div id="environmentInfo" class="environment-info" style="display: none;"></div>
456
-
457
- <!-- Floating chat button -->
458
- <div id="chatWidgetBtn" class="chat-widget-btn" onclick="toggleChat()">
459
- <span id="chatBtnIcon">💬</span>
460
- </div>
461
-
462
- <!-- Chat panel -->
463
- <div id="chatPanel" class="chat-panel">
464
- <div class="chat-header">
465
- <h1>Smart Chatbot</h1>
466
- <button class="chat-close-btn" onclick="toggleChat()">✕</button>
467
- </div>
468
-
469
- <div class="chat-messages" id="messages"></div>
470
-
471
- <div class="typing-indicator" id="typingIndicator">
472
- <div class="message-avatar">🤖</div>
473
- <div class="message-content" style="background: rgba(255,255,255,0.3); border: 1px solid rgba(255,255,255,0.4); color: white;">
474
- <div class="typing-dots">
475
- <span></span>
476
- <span></span>
477
- <span></span>
478
- </div>
479
- </div>
480
- </div>
481
-
482
- <div class="chat-input">
483
- <div class="input-container">
484
- <textarea id="messageInput" placeholder="Type your message..."></textarea>
485
- </div>
486
- <button class="send-button" id="sendButton" onclick="sendMessage()">
487
-
488
- </button>
489
- </div>
490
- </div>
491
-
492
- <script>
493
- let CONFIG = null;
494
- let sessionId = null;
495
- let isTyping = false;
496
- let chatOpen = false;
497
- let initialized = false;
498
-
499
- function toggleChat() {
500
- chatOpen = !chatOpen;
501
- const panel = document.getElementById('chatPanel');
502
- const icon = document.getElementById('chatBtnIcon');
503
-
504
- if (chatOpen) {
505
- panel.classList.add('open');
506
- icon.textContent = '✕';
507
- if (!initialized) {
508
- initializeApp();
509
- initialized = true;
510
- } else {
511
- document.getElementById('messageInput').focus();
512
- }
513
- } else {
514
- panel.classList.remove('open');
515
- icon.textContent = '💬';
516
- }
517
- }
518
-
519
- function waitForConfig() {
520
- return new Promise((resolve) => {
521
- const checkConfig = () => {
522
- if (window.ChatbotConfig) {
523
- CONFIG = window.ChatbotConfig;
524
- resolve(CONFIG);
525
- } else {
526
- setTimeout(checkConfig, 50);
527
- }
528
- };
529
- checkConfig();
530
- });
531
- }
532
-
533
- async function initializeApp() {
534
- try {
535
- CONFIG = await waitForConfig();
536
- console.log('✅ Configuration loaded successfully:', CONFIG);
537
-
538
- if (CONFIG.DEBUG) {
539
- const envInfo = document.getElementById('environmentInfo');
540
- envInfo.textContent = `Environment: ${CONFIG.ENVIRONMENT} | API: ${CONFIG.API_URL}`;
541
- envInfo.className = `environment-info ${CONFIG.DETECTED_ENVIRONMENT}`;
542
- envInfo.style.display = 'block';
543
- }
544
-
545
- addMessage('Hello! How can I help you today? 您好!今天我能为您做些什么?', 'bot');
546
- document.getElementById('messageInput').focus();
547
-
548
- if (CONFIG.DEBUG) {
549
- console.log('🤖 Chatbot initialized with configuration:', CONFIG);
550
- }
551
- } catch (error) {
552
- console.error('❌ Failed to initialize chatbot:', error);
553
- addMessage('Configuration error. Please refresh the page.', 'bot');
554
- }
555
- }
556
-
557
- function showTypingIndicator() {
558
- const indicator = document.getElementById('typingIndicator');
559
- indicator.classList.add('active');
560
- scrollToBottom();
561
- }
562
-
563
- function hideTypingIndicator() {
564
- const indicator = document.getElementById('typingIndicator');
565
- indicator.classList.remove('active');
566
- }
567
-
568
- async function sendMessage() {
569
- if (isTyping) return;
570
-
571
- if (!CONFIG) {
572
- CONFIG = await waitForConfig();
573
- }
574
-
575
- const input = document.getElementById("messageInput");
576
- const sendButton = document.getElementById("sendButton");
577
- const message = input.value.trim();
578
-
579
- if (!message) return;
580
-
581
- isTyping = true;
582
- input.disabled = true;
583
- sendButton.disabled = true;
584
-
585
- addMessage(message, 'user');
586
- input.value = '';
587
- input.style.height = '38px';
588
-
589
- showTypingIndicator();
590
-
591
- try {
592
- const requestBody = {message: message};
593
- if (sessionId) {
594
- requestBody.session_id = sessionId;
595
- }
596
-
597
- const response = await fetch(`${CONFIG.API_URL}/chat`, {
598
- method: 'POST',
599
- headers: {
600
- 'Content-Type': 'application/json',
601
- },
602
- body: JSON.stringify(requestBody),
603
- });
604
-
605
- if (!response.ok) {
606
- throw new Error(`HTTP ${response.status}: ${response.statusText}`);
607
- }
608
-
609
- const data = await response.json();
610
- sessionId = data.session_id;
611
-
612
- hideTypingIndicator();
613
-
614
- let debugInfo = null;
615
- if (CONFIG.SHOW_DEBUG_INFO) {
616
- debugInfo = {
617
- intent: data.intent,
618
- confidence: data.confidence.toFixed(2),
619
- entities: data.entities,
620
- };
621
-
622
- if (data.debug_info) {
623
- debugInfo.language = data.debug_info.language;
624
- debugInfo.environment = data.debug_info.environment;
625
- }
626
- }
627
-
628
- addMessage(data.response, 'bot', debugInfo);
629
-
630
- } catch (error) {
631
- hideTypingIndicator();
632
-
633
- if (CONFIG.DEBUG) {
634
- console.error('Chat request failed:', error);
635
- addMessage(`Error: ${error.message}`, 'bot');
636
- } else {
637
- addMessage('Sorry, I encountered an error. Please try again.', 'bot');
638
- }
639
- } finally {
640
- isTyping = false;
641
- input.disabled = false;
642
- sendButton.disabled = false;
643
- input.focus();
644
- }
645
- }
646
-
647
- function addMessage(text, sender, debug = null) {
648
- const messagesDiv = document.getElementById('messages');
649
- const messageDiv = document.createElement('div');
650
- messageDiv.className = `message ${sender}-message`;
651
-
652
- const avatar = document.createElement('div');
653
- avatar.className = 'message-avatar';
654
- avatar.textContent = sender === 'user' ? '👤' : '🤖';
655
-
656
- const content = document.createElement('div');
657
- content.className = 'message-content';
658
- content.innerHTML = marked.parse(text);
659
-
660
- if (debug) {
661
- const debugDiv = document.createElement('div');
662
- debugDiv.className = 'debug-info';
663
-
664
- let debugText = `Intent: ${debug.intent} (${debug.confidence})`;
665
- if (Object.keys(debug.entities).length > 0) {
666
- debugText += ` | Entities: ${JSON.stringify(debug.entities)}`;
667
- }
668
- if (debug.language) {
669
- debugText += ` | Language: ${debug.language}`;
670
- }
671
- if (debug.environment) {
672
- debugText += ` | Env: ${debug.environment}`;
673
- }
674
-
675
- debugDiv.textContent = debugText;
676
- content.appendChild(debugDiv);
677
- }
678
-
679
- messageDiv.appendChild(avatar);
680
- messageDiv.appendChild(content);
681
- messagesDiv.appendChild(messageDiv);
682
-
683
- scrollToBottom();
684
- }
685
-
686
- function scrollToBottom() {
687
- const messagesDiv = document.getElementById('messages');
688
- messagesDiv.scrollTop = messagesDiv.scrollHeight;
689
- }
690
-
691
- document.getElementById('messageInput').addEventListener('keydown', function(e) {
692
- if (e.key === 'Enter' && !e.shiftKey && !isTyping) {
693
- e.preventDefault();
694
- sendMessage();
695
- }
696
- });
697
-
698
- document.getElementById('messageInput').addEventListener('input', function() {
699
- this.style.height = '38px';
700
- if (this.scrollHeight > 38) {
701
- this.style.height = this.scrollHeight + 'px';
702
- }
703
- });
704
-
705
- window.addEventListener('error', function(e) {
706
- if (e.message.includes('config.js')) {
707
- console.error('Failed to load configuration. Make sure to run: python scripts/build-frontend-config.py');
708
- }
709
- });
710
-
711
- // Standalone demo: add gradient background so glassmorphism blur is visible.
712
- // In iframe: body stays transparent so the host page background shows through.
713
- if (window === window.top) {
714
- document.body.style.background = 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)';
715
- document.body.style.minHeight = '100vh';
716
- }
717
- </script>
718
- </body>
719
  </html>
 
1
  <!DOCTYPE html>
2
  <html>
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Monireach's Smart Chatbot Demo</title>
8
+ <script src="config.js"></script>
9
+ </head>
10
 
11
+ <body>
12
+ <smart-chatbot></smart-chatbot>
13
+ <script src="chatbot-widget.js"></script>
14
+ </body>
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  </html>
scripts/build-frontend-config.py CHANGED
@@ -57,6 +57,7 @@ class FrontendConfigBuilder:
57
  "ENVIRONMENT": os.getenv("ENVIRONMENT", environment),
58
  "CONFIDENCE_THRESHOLD": float(os.getenv("CONFIDENCE_THRESHOLD", "0.5")),
59
  "DEFAULT_LANGUAGE": os.getenv("DEFAULT_LANGUAGE", "en"),
 
60
  }
61
 
62
  self.log(f"Loaded config for {environment}: API_URL={config['API_URL']}")
@@ -115,7 +116,7 @@ function detectEnvironment() {{
115
  const hostname = window.location.hostname;
116
 
117
  // Local development
118
- if (hostname === 'localhost' || hostname === '127.0.0.1') {{
119
  return 'development';
120
  }}
121
 
@@ -227,7 +228,7 @@ if (typeof module !== 'undefined' && module.exports) {{
227
  print("Next steps:")
228
  print("1. Review the generated frontend/config.js file")
229
  print("2. Test frontend locally")
230
- print("3. Deploy frontend to Netlify")
231
  print("4. The frontend will automatically use the correct environment!")
232
 
233
  return True
 
57
  "ENVIRONMENT": os.getenv("ENVIRONMENT", environment),
58
  "CONFIDENCE_THRESHOLD": float(os.getenv("CONFIDENCE_THRESHOLD", "0.5")),
59
  "DEFAULT_LANGUAGE": os.getenv("DEFAULT_LANGUAGE", "en"),
60
+ "REQUEST_TIMEOUT_MS": int(os.getenv("REQUEST_TIMEOUT_MS") or 30000),
61
  }
62
 
63
  self.log(f"Loaded config for {environment}: API_URL={config['API_URL']}")
 
116
  const hostname = window.location.hostname;
117
 
118
  // Local development
119
+ if (hostname === 'localhost' || hostname === '127.0.0.1' || hostname.endsWith('.local')) {{
120
  return 'development';
121
  }}
122
 
 
228
  print("Next steps:")
229
  print("1. Review the generated frontend/config.js file")
230
  print("2. Test frontend locally")
231
+ print("3. Deploy frontend to Netlify or any other used frontend tools")
232
  print("4. The frontend will automatically use the correct environment!")
233
 
234
  return True