botframework-webchat-fluent-theme 4.17.0-main.20240425.edca85d → 4.17.0-main.20240502.a8ff179

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/botframework-webchat-fluent-theme.css.map +1 -0
  2. package/dist/{index.d.mts → botframework-webchat-fluent-theme.d.mts} +7 -1
  3. package/dist/{index.d.ts → botframework-webchat-fluent-theme.d.ts} +7 -1
  4. package/dist/botframework-webchat-fluent-theme.development.css.map +1 -1
  5. package/dist/botframework-webchat-fluent-theme.development.d.ts +2 -0
  6. package/dist/botframework-webchat-fluent-theme.development.js +2 -2424
  7. package/dist/botframework-webchat-fluent-theme.development.js.map +1 -1
  8. package/dist/botframework-webchat-fluent-theme.js +3 -0
  9. package/dist/botframework-webchat-fluent-theme.js.map +1 -0
  10. package/dist/botframework-webchat-fluent-theme.mjs +3 -0
  11. package/dist/botframework-webchat-fluent-theme.mjs.map +1 -0
  12. package/dist/botframework-webchat-fluent-theme.production.min.css.map +1 -1
  13. package/dist/botframework-webchat-fluent-theme.production.min.d.ts +2 -0
  14. package/dist/botframework-webchat-fluent-theme.production.min.js +2 -10
  15. package/dist/botframework-webchat-fluent-theme.production.min.js.map +1 -1
  16. package/package.json +17 -12
  17. package/src/components/dropZone/{index.tsx → DropZone.tsx} +2 -2
  18. package/src/components/dropZone/index.ts +1 -0
  19. package/src/components/{sendbox → sendBox}/AddAttachmentButton.tsx +1 -1
  20. package/src/components/{sendbox/index.tsx → sendBox/SendBox.tsx} +52 -13
  21. package/src/components/{sendbox → sendBox}/TelephoneKeypadToolbarButton.tsx +2 -2
  22. package/src/components/sendBox/index.tsx +1 -0
  23. package/src/components/suggestedActions/SuggestedAction.tsx +4 -2
  24. package/src/components/suggestedActions/{index.tsx → SuggestedActions.tsx} +19 -9
  25. package/src/components/suggestedActions/index.ts +1 -0
  26. package/src/components/suggestedActions/private/rovingFocus.tsx +180 -0
  27. package/src/components/telephoneKeypad/Surrogate.tsx +2 -2
  28. package/src/components/telephoneKeypad/private/TelephoneKeypad.tsx +4 -7
  29. package/src/components/{Theme.tsx → theme/Theme.tsx} +1 -1
  30. package/src/components/theme/index.ts +1 -0
  31. package/src/icons/AddDocumentIcon.tsx +4 -2
  32. package/src/icons/AttachmentIcon.tsx +4 -2
  33. package/src/icons/InfoSmallIcon.tsx +19 -15
  34. package/src/icons/SendIcon.tsx +4 -2
  35. package/src/icons/{TelephoneKeypad.tsx → TelephoneKeypadIcon.tsx} +4 -2
  36. package/src/icons/index.ts +5 -0
  37. package/src/index.ts +11 -4
  38. package/src/private/FluentThemeProvider.tsx +3 -3
  39. package/src/styles/index.ts +4 -0
  40. package/src/types/index.ts +1 -0
  41. package/dist/index.css.map +0 -1
  42. package/dist/index.js +0 -1151
  43. package/dist/index.js.map +0 -1
  44. package/dist/index.mjs +0 -1115
  45. package/dist/index.mjs.map +0 -1
  46. package/src/components/DropZone.tsx +0 -3
  47. package/src/components/SendBox.tsx +0 -3
  48. package/src/components/SuggestedActions.tsx +0 -3
  49. package/src/components/TelephoneKeypad.tsx +0 -1
  50. package/src/styles.ts +0 -4
  51. /package/src/components/dropZone/{index.module.css → DropZone.module.css} +0 -0
  52. /package/src/components/{sendbox → sendBox}/AddAttachmentButton.module.css +0 -0
  53. /package/src/components/{sendbox → sendBox}/Attachments.module.css +0 -0
  54. /package/src/components/{sendbox → sendBox}/Attachments.tsx +0 -0
  55. /package/src/components/{sendbox → sendBox}/ErrorMessage.module.css +0 -0
  56. /package/src/components/{sendbox → sendBox}/ErrorMessage.tsx +0 -0
  57. /package/src/components/{sendbox/index.module.css → sendBox/SendBox.module.css} +0 -0
  58. /package/src/components/{sendbox → sendBox}/TextArea.module.css +0 -0
  59. /package/src/components/{sendbox → sendBox}/TextArea.tsx +0 -0
  60. /package/src/components/{sendbox → sendBox}/Toolbar.module.css +0 -0
  61. /package/src/components/{sendbox → sendBox}/Toolbar.tsx +0 -0
  62. /package/src/components/{sendbox → sendBox}/private/useSubmitError.ts +0 -0
  63. /package/src/components/{sendbox → sendBox}/private/useUniqueId.ts +0 -0
  64. /package/src/components/suggestedActions/{index.module.css → SuggestedActions.module.css} +0 -0
  65. /package/src/components/{Theme.module.css → theme/Theme.module.css} +0 -0
@@ -1,2425 +1,3 @@
1
- "use strict";
2
- (() => {
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __commonJS = (cb, mod) => function __require() {
10
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
-
29
- // src/external.umd/botframework-webchat-component.ts
30
- var require_botframework_webchat_component = __commonJS({
31
- "src/external.umd/botframework-webchat-component.ts"(exports, module) {
32
- module.exports = {
33
- Components: globalThis.WebChat.Components,
34
- hooks: globalThis.WebChat.hooks
35
- };
36
- }
37
- });
38
-
39
- // src/external.umd/react.ts
40
- var require_react = __commonJS({
41
- "src/external.umd/react.ts"(exports, module) {
42
- module.exports = globalThis.React;
43
- }
44
- });
45
-
46
- // node_modules/classnames/index.js
47
- var require_classnames = __commonJS({
48
- "node_modules/classnames/index.js"(exports, module) {
49
- (function() {
50
- "use strict";
51
- var hasOwn = {}.hasOwnProperty;
52
- function classNames() {
53
- var classes = "";
54
- for (var i = 0; i < arguments.length; i++) {
55
- var arg = arguments[i];
56
- if (arg) {
57
- classes = appendClass(classes, parseValue(arg));
58
- }
59
- }
60
- return classes;
61
- }
62
- function parseValue(arg) {
63
- if (typeof arg === "string" || typeof arg === "number") {
64
- return arg;
65
- }
66
- if (typeof arg !== "object") {
67
- return "";
68
- }
69
- if (Array.isArray(arg)) {
70
- return classNames.apply(null, arg);
71
- }
72
- if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
73
- return arg.toString();
74
- }
75
- var classes = "";
76
- for (var key in arg) {
77
- if (hasOwn.call(arg, key) && arg[key]) {
78
- classes = appendClass(classes, key);
79
- }
80
- }
81
- return classes;
82
- }
83
- function appendClass(value, newClass) {
84
- if (!newClass) {
85
- return value;
86
- }
87
- if (value) {
88
- return value + " " + newClass;
89
- }
90
- return value + newClass;
91
- }
92
- if (typeof module !== "undefined" && module.exports) {
93
- classNames.default = classNames;
94
- module.exports = classNames;
95
- } else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
96
- define("classnames", [], function() {
97
- return classNames;
98
- });
99
- } else {
100
- window.classNames = classNames;
101
- }
102
- })();
103
- }
104
- });
105
-
106
- // node_modules/core-js-pure/internals/global.js
107
- var require_global = __commonJS({
108
- "node_modules/core-js-pure/internals/global.js"(exports, module) {
109
- "use strict";
110
- var check = function(it) {
111
- return it && it.Math === Math && it;
112
- };
113
- module.exports = // eslint-disable-next-line es/no-global-this -- safe
114
- check(typeof globalThis == "object" && globalThis) || check(typeof window == "object" && window) || // eslint-disable-next-line no-restricted-globals -- safe
115
- check(typeof self == "object" && self) || check(typeof global == "object" && global) || check(typeof exports == "object" && exports) || // eslint-disable-next-line no-new-func -- fallback
116
- /* @__PURE__ */ function() {
117
- return this;
118
- }() || Function("return this")();
119
- }
120
- });
121
-
122
- // node_modules/core-js-pure/internals/fails.js
123
- var require_fails = __commonJS({
124
- "node_modules/core-js-pure/internals/fails.js"(exports, module) {
125
- "use strict";
126
- module.exports = function(exec) {
127
- try {
128
- return !!exec();
129
- } catch (error) {
130
- return true;
131
- }
132
- };
133
- }
134
- });
135
-
136
- // node_modules/core-js-pure/internals/function-bind-native.js
137
- var require_function_bind_native = __commonJS({
138
- "node_modules/core-js-pure/internals/function-bind-native.js"(exports, module) {
139
- "use strict";
140
- var fails = require_fails();
141
- module.exports = !fails(function() {
142
- var test = (function() {
143
- }).bind();
144
- return typeof test != "function" || test.hasOwnProperty("prototype");
145
- });
146
- }
147
- });
148
-
149
- // node_modules/core-js-pure/internals/function-apply.js
150
- var require_function_apply = __commonJS({
151
- "node_modules/core-js-pure/internals/function-apply.js"(exports, module) {
152
- "use strict";
153
- var NATIVE_BIND = require_function_bind_native();
154
- var FunctionPrototype = Function.prototype;
155
- var apply = FunctionPrototype.apply;
156
- var call = FunctionPrototype.call;
157
- module.exports = typeof Reflect == "object" && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function() {
158
- return call.apply(apply, arguments);
159
- });
160
- }
161
- });
162
-
163
- // node_modules/core-js-pure/internals/function-uncurry-this.js
164
- var require_function_uncurry_this = __commonJS({
165
- "node_modules/core-js-pure/internals/function-uncurry-this.js"(exports, module) {
166
- "use strict";
167
- var NATIVE_BIND = require_function_bind_native();
168
- var FunctionPrototype = Function.prototype;
169
- var call = FunctionPrototype.call;
170
- var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
171
- module.exports = NATIVE_BIND ? uncurryThisWithBind : function(fn) {
172
- return function() {
173
- return call.apply(fn, arguments);
174
- };
175
- };
176
- }
177
- });
178
-
179
- // node_modules/core-js-pure/internals/classof-raw.js
180
- var require_classof_raw = __commonJS({
181
- "node_modules/core-js-pure/internals/classof-raw.js"(exports, module) {
182
- "use strict";
183
- var uncurryThis = require_function_uncurry_this();
184
- var toString = uncurryThis({}.toString);
185
- var stringSlice = uncurryThis("".slice);
186
- module.exports = function(it) {
187
- return stringSlice(toString(it), 8, -1);
188
- };
189
- }
190
- });
191
-
192
- // node_modules/core-js-pure/internals/function-uncurry-this-clause.js
193
- var require_function_uncurry_this_clause = __commonJS({
194
- "node_modules/core-js-pure/internals/function-uncurry-this-clause.js"(exports, module) {
195
- "use strict";
196
- var classofRaw = require_classof_raw();
197
- var uncurryThis = require_function_uncurry_this();
198
- module.exports = function(fn) {
199
- if (classofRaw(fn) === "Function")
200
- return uncurryThis(fn);
201
- };
202
- }
203
- });
204
-
205
- // node_modules/core-js-pure/internals/is-callable.js
206
- var require_is_callable = __commonJS({
207
- "node_modules/core-js-pure/internals/is-callable.js"(exports, module) {
208
- "use strict";
209
- var documentAll = typeof document == "object" && document.all;
210
- module.exports = typeof documentAll == "undefined" && documentAll !== void 0 ? function(argument) {
211
- return typeof argument == "function" || argument === documentAll;
212
- } : function(argument) {
213
- return typeof argument == "function";
214
- };
215
- }
216
- });
217
-
218
- // node_modules/core-js-pure/internals/descriptors.js
219
- var require_descriptors = __commonJS({
220
- "node_modules/core-js-pure/internals/descriptors.js"(exports, module) {
221
- "use strict";
222
- var fails = require_fails();
223
- module.exports = !fails(function() {
224
- return Object.defineProperty({}, 1, { get: function() {
225
- return 7;
226
- } })[1] !== 7;
227
- });
228
- }
229
- });
230
-
231
- // node_modules/core-js-pure/internals/function-call.js
232
- var require_function_call = __commonJS({
233
- "node_modules/core-js-pure/internals/function-call.js"(exports, module) {
234
- "use strict";
235
- var NATIVE_BIND = require_function_bind_native();
236
- var call = Function.prototype.call;
237
- module.exports = NATIVE_BIND ? call.bind(call) : function() {
238
- return call.apply(call, arguments);
239
- };
240
- }
241
- });
242
-
243
- // node_modules/core-js-pure/internals/object-property-is-enumerable.js
244
- var require_object_property_is_enumerable = __commonJS({
245
- "node_modules/core-js-pure/internals/object-property-is-enumerable.js"(exports) {
246
- "use strict";
247
- var $propertyIsEnumerable = {}.propertyIsEnumerable;
248
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
249
- var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
250
- exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
251
- var descriptor = getOwnPropertyDescriptor(this, V);
252
- return !!descriptor && descriptor.enumerable;
253
- } : $propertyIsEnumerable;
254
- }
255
- });
256
-
257
- // node_modules/core-js-pure/internals/create-property-descriptor.js
258
- var require_create_property_descriptor = __commonJS({
259
- "node_modules/core-js-pure/internals/create-property-descriptor.js"(exports, module) {
260
- "use strict";
261
- module.exports = function(bitmap, value) {
262
- return {
263
- enumerable: !(bitmap & 1),
264
- configurable: !(bitmap & 2),
265
- writable: !(bitmap & 4),
266
- value
267
- };
268
- };
269
- }
270
- });
271
-
272
- // node_modules/core-js-pure/internals/indexed-object.js
273
- var require_indexed_object = __commonJS({
274
- "node_modules/core-js-pure/internals/indexed-object.js"(exports, module) {
275
- "use strict";
276
- var uncurryThis = require_function_uncurry_this();
277
- var fails = require_fails();
278
- var classof = require_classof_raw();
279
- var $Object = Object;
280
- var split = uncurryThis("".split);
281
- module.exports = fails(function() {
282
- return !$Object("z").propertyIsEnumerable(0);
283
- }) ? function(it) {
284
- return classof(it) === "String" ? split(it, "") : $Object(it);
285
- } : $Object;
286
- }
287
- });
288
-
289
- // node_modules/core-js-pure/internals/is-null-or-undefined.js
290
- var require_is_null_or_undefined = __commonJS({
291
- "node_modules/core-js-pure/internals/is-null-or-undefined.js"(exports, module) {
292
- "use strict";
293
- module.exports = function(it) {
294
- return it === null || it === void 0;
295
- };
296
- }
297
- });
298
-
299
- // node_modules/core-js-pure/internals/require-object-coercible.js
300
- var require_require_object_coercible = __commonJS({
301
- "node_modules/core-js-pure/internals/require-object-coercible.js"(exports, module) {
302
- "use strict";
303
- var isNullOrUndefined = require_is_null_or_undefined();
304
- var $TypeError = TypeError;
305
- module.exports = function(it) {
306
- if (isNullOrUndefined(it))
307
- throw new $TypeError("Can't call method on " + it);
308
- return it;
309
- };
310
- }
311
- });
312
-
313
- // node_modules/core-js-pure/internals/to-indexed-object.js
314
- var require_to_indexed_object = __commonJS({
315
- "node_modules/core-js-pure/internals/to-indexed-object.js"(exports, module) {
316
- "use strict";
317
- var IndexedObject = require_indexed_object();
318
- var requireObjectCoercible = require_require_object_coercible();
319
- module.exports = function(it) {
320
- return IndexedObject(requireObjectCoercible(it));
321
- };
322
- }
323
- });
324
-
325
- // node_modules/core-js-pure/internals/is-object.js
326
- var require_is_object = __commonJS({
327
- "node_modules/core-js-pure/internals/is-object.js"(exports, module) {
328
- "use strict";
329
- var isCallable = require_is_callable();
330
- module.exports = function(it) {
331
- return typeof it == "object" ? it !== null : isCallable(it);
332
- };
333
- }
334
- });
335
-
336
- // node_modules/core-js-pure/internals/path.js
337
- var require_path = __commonJS({
338
- "node_modules/core-js-pure/internals/path.js"(exports, module) {
339
- "use strict";
340
- module.exports = {};
341
- }
342
- });
343
-
344
- // node_modules/core-js-pure/internals/get-built-in.js
345
- var require_get_built_in = __commonJS({
346
- "node_modules/core-js-pure/internals/get-built-in.js"(exports, module) {
347
- "use strict";
348
- var path = require_path();
349
- var global2 = require_global();
350
- var isCallable = require_is_callable();
351
- var aFunction = function(variable) {
352
- return isCallable(variable) ? variable : void 0;
353
- };
354
- module.exports = function(namespace, method) {
355
- return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global2[namespace]) : path[namespace] && path[namespace][method] || global2[namespace] && global2[namespace][method];
356
- };
357
- }
358
- });
359
-
360
- // node_modules/core-js-pure/internals/object-is-prototype-of.js
361
- var require_object_is_prototype_of = __commonJS({
362
- "node_modules/core-js-pure/internals/object-is-prototype-of.js"(exports, module) {
363
- "use strict";
364
- var uncurryThis = require_function_uncurry_this();
365
- module.exports = uncurryThis({}.isPrototypeOf);
366
- }
367
- });
368
-
369
- // node_modules/core-js-pure/internals/engine-user-agent.js
370
- var require_engine_user_agent = __commonJS({
371
- "node_modules/core-js-pure/internals/engine-user-agent.js"(exports, module) {
372
- "use strict";
373
- module.exports = typeof navigator != "undefined" && String(navigator.userAgent) || "";
374
- }
375
- });
376
-
377
- // node_modules/core-js-pure/internals/engine-v8-version.js
378
- var require_engine_v8_version = __commonJS({
379
- "node_modules/core-js-pure/internals/engine-v8-version.js"(exports, module) {
380
- "use strict";
381
- var global2 = require_global();
382
- var userAgent = require_engine_user_agent();
383
- var process = global2.process;
384
- var Deno = global2.Deno;
385
- var versions = process && process.versions || Deno && Deno.version;
386
- var v8 = versions && versions.v8;
387
- var match;
388
- var version;
389
- if (v8) {
390
- match = v8.split(".");
391
- version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
392
- }
393
- if (!version && userAgent) {
394
- match = userAgent.match(/Edge\/(\d+)/);
395
- if (!match || match[1] >= 74) {
396
- match = userAgent.match(/Chrome\/(\d+)/);
397
- if (match)
398
- version = +match[1];
399
- }
400
- }
401
- module.exports = version;
402
- }
403
- });
404
-
405
- // node_modules/core-js-pure/internals/symbol-constructor-detection.js
406
- var require_symbol_constructor_detection = __commonJS({
407
- "node_modules/core-js-pure/internals/symbol-constructor-detection.js"(exports, module) {
408
- "use strict";
409
- var V8_VERSION = require_engine_v8_version();
410
- var fails = require_fails();
411
- var global2 = require_global();
412
- var $String = global2.String;
413
- module.exports = !!Object.getOwnPropertySymbols && !fails(function() {
414
- var symbol = Symbol("symbol detection");
415
- return !$String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
416
- !Symbol.sham && V8_VERSION && V8_VERSION < 41;
417
- });
418
- }
419
- });
420
-
421
- // node_modules/core-js-pure/internals/use-symbol-as-uid.js
422
- var require_use_symbol_as_uid = __commonJS({
423
- "node_modules/core-js-pure/internals/use-symbol-as-uid.js"(exports, module) {
424
- "use strict";
425
- var NATIVE_SYMBOL = require_symbol_constructor_detection();
426
- module.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == "symbol";
427
- }
428
- });
429
-
430
- // node_modules/core-js-pure/internals/is-symbol.js
431
- var require_is_symbol = __commonJS({
432
- "node_modules/core-js-pure/internals/is-symbol.js"(exports, module) {
433
- "use strict";
434
- var getBuiltIn = require_get_built_in();
435
- var isCallable = require_is_callable();
436
- var isPrototypeOf = require_object_is_prototype_of();
437
- var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
438
- var $Object = Object;
439
- module.exports = USE_SYMBOL_AS_UID ? function(it) {
440
- return typeof it == "symbol";
441
- } : function(it) {
442
- var $Symbol = getBuiltIn("Symbol");
443
- return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
444
- };
445
- }
446
- });
447
-
448
- // node_modules/core-js-pure/internals/try-to-string.js
449
- var require_try_to_string = __commonJS({
450
- "node_modules/core-js-pure/internals/try-to-string.js"(exports, module) {
451
- "use strict";
452
- var $String = String;
453
- module.exports = function(argument) {
454
- try {
455
- return $String(argument);
456
- } catch (error) {
457
- return "Object";
458
- }
459
- };
460
- }
461
- });
462
-
463
- // node_modules/core-js-pure/internals/a-callable.js
464
- var require_a_callable = __commonJS({
465
- "node_modules/core-js-pure/internals/a-callable.js"(exports, module) {
466
- "use strict";
467
- var isCallable = require_is_callable();
468
- var tryToString = require_try_to_string();
469
- var $TypeError = TypeError;
470
- module.exports = function(argument) {
471
- if (isCallable(argument))
472
- return argument;
473
- throw new $TypeError(tryToString(argument) + " is not a function");
474
- };
475
- }
476
- });
477
-
478
- // node_modules/core-js-pure/internals/get-method.js
479
- var require_get_method = __commonJS({
480
- "node_modules/core-js-pure/internals/get-method.js"(exports, module) {
481
- "use strict";
482
- var aCallable = require_a_callable();
483
- var isNullOrUndefined = require_is_null_or_undefined();
484
- module.exports = function(V, P) {
485
- var func = V[P];
486
- return isNullOrUndefined(func) ? void 0 : aCallable(func);
487
- };
488
- }
489
- });
490
-
491
- // node_modules/core-js-pure/internals/ordinary-to-primitive.js
492
- var require_ordinary_to_primitive = __commonJS({
493
- "node_modules/core-js-pure/internals/ordinary-to-primitive.js"(exports, module) {
494
- "use strict";
495
- var call = require_function_call();
496
- var isCallable = require_is_callable();
497
- var isObject = require_is_object();
498
- var $TypeError = TypeError;
499
- module.exports = function(input, pref) {
500
- var fn, val;
501
- if (pref === "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))
502
- return val;
503
- if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input)))
504
- return val;
505
- if (pref !== "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))
506
- return val;
507
- throw new $TypeError("Can't convert object to primitive value");
508
- };
509
- }
510
- });
511
-
512
- // node_modules/core-js-pure/internals/is-pure.js
513
- var require_is_pure = __commonJS({
514
- "node_modules/core-js-pure/internals/is-pure.js"(exports, module) {
515
- "use strict";
516
- module.exports = true;
517
- }
518
- });
519
-
520
- // node_modules/core-js-pure/internals/define-global-property.js
521
- var require_define_global_property = __commonJS({
522
- "node_modules/core-js-pure/internals/define-global-property.js"(exports, module) {
523
- "use strict";
524
- var global2 = require_global();
525
- var defineProperty = Object.defineProperty;
526
- module.exports = function(key, value) {
527
- try {
528
- defineProperty(global2, key, { value, configurable: true, writable: true });
529
- } catch (error) {
530
- global2[key] = value;
531
- }
532
- return value;
533
- };
534
- }
535
- });
536
-
537
- // node_modules/core-js-pure/internals/shared-store.js
538
- var require_shared_store = __commonJS({
539
- "node_modules/core-js-pure/internals/shared-store.js"(exports, module) {
540
- "use strict";
541
- var IS_PURE = require_is_pure();
542
- var globalThis2 = require_global();
543
- var defineGlobalProperty = require_define_global_property();
544
- var SHARED = "__core-js_shared__";
545
- var store = module.exports = globalThis2[SHARED] || defineGlobalProperty(SHARED, {});
546
- (store.versions || (store.versions = [])).push({
547
- version: "3.36.1",
548
- mode: IS_PURE ? "pure" : "global",
549
- copyright: "\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",
550
- license: "https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",
551
- source: "https://github.com/zloirock/core-js"
552
- });
553
- }
554
- });
555
-
556
- // node_modules/core-js-pure/internals/shared.js
557
- var require_shared = __commonJS({
558
- "node_modules/core-js-pure/internals/shared.js"(exports, module) {
559
- "use strict";
560
- var store = require_shared_store();
561
- module.exports = function(key, value) {
562
- return store[key] || (store[key] = value || {});
563
- };
564
- }
565
- });
566
-
567
- // node_modules/core-js-pure/internals/to-object.js
568
- var require_to_object = __commonJS({
569
- "node_modules/core-js-pure/internals/to-object.js"(exports, module) {
570
- "use strict";
571
- var requireObjectCoercible = require_require_object_coercible();
572
- var $Object = Object;
573
- module.exports = function(argument) {
574
- return $Object(requireObjectCoercible(argument));
575
- };
576
- }
577
- });
578
-
579
- // node_modules/core-js-pure/internals/has-own-property.js
580
- var require_has_own_property = __commonJS({
581
- "node_modules/core-js-pure/internals/has-own-property.js"(exports, module) {
582
- "use strict";
583
- var uncurryThis = require_function_uncurry_this();
584
- var toObject = require_to_object();
585
- var hasOwnProperty = uncurryThis({}.hasOwnProperty);
586
- module.exports = Object.hasOwn || function hasOwn(it, key) {
587
- return hasOwnProperty(toObject(it), key);
588
- };
589
- }
590
- });
591
-
592
- // node_modules/core-js-pure/internals/uid.js
593
- var require_uid = __commonJS({
594
- "node_modules/core-js-pure/internals/uid.js"(exports, module) {
595
- "use strict";
596
- var uncurryThis = require_function_uncurry_this();
597
- var id = 0;
598
- var postfix = Math.random();
599
- var toString = uncurryThis(1 .toString);
600
- module.exports = function(key) {
601
- return "Symbol(" + (key === void 0 ? "" : key) + ")_" + toString(++id + postfix, 36);
602
- };
603
- }
604
- });
605
-
606
- // node_modules/core-js-pure/internals/well-known-symbol.js
607
- var require_well_known_symbol = __commonJS({
608
- "node_modules/core-js-pure/internals/well-known-symbol.js"(exports, module) {
609
- "use strict";
610
- var global2 = require_global();
611
- var shared = require_shared();
612
- var hasOwn = require_has_own_property();
613
- var uid = require_uid();
614
- var NATIVE_SYMBOL = require_symbol_constructor_detection();
615
- var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
616
- var Symbol2 = global2.Symbol;
617
- var WellKnownSymbolsStore = shared("wks");
618
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol2["for"] || Symbol2 : Symbol2 && Symbol2.withoutSetter || uid;
619
- module.exports = function(name) {
620
- if (!hasOwn(WellKnownSymbolsStore, name)) {
621
- WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol2, name) ? Symbol2[name] : createWellKnownSymbol("Symbol." + name);
622
- }
623
- return WellKnownSymbolsStore[name];
624
- };
625
- }
626
- });
627
-
628
- // node_modules/core-js-pure/internals/to-primitive.js
629
- var require_to_primitive = __commonJS({
630
- "node_modules/core-js-pure/internals/to-primitive.js"(exports, module) {
631
- "use strict";
632
- var call = require_function_call();
633
- var isObject = require_is_object();
634
- var isSymbol = require_is_symbol();
635
- var getMethod = require_get_method();
636
- var ordinaryToPrimitive = require_ordinary_to_primitive();
637
- var wellKnownSymbol = require_well_known_symbol();
638
- var $TypeError = TypeError;
639
- var TO_PRIMITIVE = wellKnownSymbol("toPrimitive");
640
- module.exports = function(input, pref) {
641
- if (!isObject(input) || isSymbol(input))
642
- return input;
643
- var exoticToPrim = getMethod(input, TO_PRIMITIVE);
644
- var result;
645
- if (exoticToPrim) {
646
- if (pref === void 0)
647
- pref = "default";
648
- result = call(exoticToPrim, input, pref);
649
- if (!isObject(result) || isSymbol(result))
650
- return result;
651
- throw new $TypeError("Can't convert object to primitive value");
652
- }
653
- if (pref === void 0)
654
- pref = "number";
655
- return ordinaryToPrimitive(input, pref);
656
- };
657
- }
658
- });
659
-
660
- // node_modules/core-js-pure/internals/to-property-key.js
661
- var require_to_property_key = __commonJS({
662
- "node_modules/core-js-pure/internals/to-property-key.js"(exports, module) {
663
- "use strict";
664
- var toPrimitive = require_to_primitive();
665
- var isSymbol = require_is_symbol();
666
- module.exports = function(argument) {
667
- var key = toPrimitive(argument, "string");
668
- return isSymbol(key) ? key : key + "";
669
- };
670
- }
671
- });
672
-
673
- // node_modules/core-js-pure/internals/document-create-element.js
674
- var require_document_create_element = __commonJS({
675
- "node_modules/core-js-pure/internals/document-create-element.js"(exports, module) {
676
- "use strict";
677
- var global2 = require_global();
678
- var isObject = require_is_object();
679
- var document2 = global2.document;
680
- var EXISTS = isObject(document2) && isObject(document2.createElement);
681
- module.exports = function(it) {
682
- return EXISTS ? document2.createElement(it) : {};
683
- };
684
- }
685
- });
686
-
687
- // node_modules/core-js-pure/internals/ie8-dom-define.js
688
- var require_ie8_dom_define = __commonJS({
689
- "node_modules/core-js-pure/internals/ie8-dom-define.js"(exports, module) {
690
- "use strict";
691
- var DESCRIPTORS = require_descriptors();
692
- var fails = require_fails();
693
- var createElement = require_document_create_element();
694
- module.exports = !DESCRIPTORS && !fails(function() {
695
- return Object.defineProperty(createElement("div"), "a", {
696
- get: function() {
697
- return 7;
698
- }
699
- }).a !== 7;
700
- });
701
- }
702
- });
703
-
704
- // node_modules/core-js-pure/internals/object-get-own-property-descriptor.js
705
- var require_object_get_own_property_descriptor = __commonJS({
706
- "node_modules/core-js-pure/internals/object-get-own-property-descriptor.js"(exports) {
707
- "use strict";
708
- var DESCRIPTORS = require_descriptors();
709
- var call = require_function_call();
710
- var propertyIsEnumerableModule = require_object_property_is_enumerable();
711
- var createPropertyDescriptor = require_create_property_descriptor();
712
- var toIndexedObject = require_to_indexed_object();
713
- var toPropertyKey = require_to_property_key();
714
- var hasOwn = require_has_own_property();
715
- var IE8_DOM_DEFINE = require_ie8_dom_define();
716
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
717
- exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
718
- O = toIndexedObject(O);
719
- P = toPropertyKey(P);
720
- if (IE8_DOM_DEFINE)
721
- try {
722
- return $getOwnPropertyDescriptor(O, P);
723
- } catch (error) {
724
- }
725
- if (hasOwn(O, P))
726
- return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
727
- };
728
- }
729
- });
730
-
731
- // node_modules/core-js-pure/internals/is-forced.js
732
- var require_is_forced = __commonJS({
733
- "node_modules/core-js-pure/internals/is-forced.js"(exports, module) {
734
- "use strict";
735
- var fails = require_fails();
736
- var isCallable = require_is_callable();
737
- var replacement = /#|\.prototype\./;
738
- var isForced = function(feature, detection) {
739
- var value = data[normalize(feature)];
740
- return value === POLYFILL ? true : value === NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
741
- };
742
- var normalize = isForced.normalize = function(string) {
743
- return String(string).replace(replacement, ".").toLowerCase();
744
- };
745
- var data = isForced.data = {};
746
- var NATIVE = isForced.NATIVE = "N";
747
- var POLYFILL = isForced.POLYFILL = "P";
748
- module.exports = isForced;
749
- }
750
- });
751
-
752
- // node_modules/core-js-pure/internals/function-bind-context.js
753
- var require_function_bind_context = __commonJS({
754
- "node_modules/core-js-pure/internals/function-bind-context.js"(exports, module) {
755
- "use strict";
756
- var uncurryThis = require_function_uncurry_this_clause();
757
- var aCallable = require_a_callable();
758
- var NATIVE_BIND = require_function_bind_native();
759
- var bind = uncurryThis(uncurryThis.bind);
760
- module.exports = function(fn, that) {
761
- aCallable(fn);
762
- return that === void 0 ? fn : NATIVE_BIND ? bind(fn, that) : function() {
763
- return fn.apply(that, arguments);
764
- };
765
- };
766
- }
767
- });
768
-
769
- // node_modules/core-js-pure/internals/v8-prototype-define-bug.js
770
- var require_v8_prototype_define_bug = __commonJS({
771
- "node_modules/core-js-pure/internals/v8-prototype-define-bug.js"(exports, module) {
772
- "use strict";
773
- var DESCRIPTORS = require_descriptors();
774
- var fails = require_fails();
775
- module.exports = DESCRIPTORS && fails(function() {
776
- return Object.defineProperty(function() {
777
- }, "prototype", {
778
- value: 42,
779
- writable: false
780
- }).prototype !== 42;
781
- });
782
- }
783
- });
784
-
785
- // node_modules/core-js-pure/internals/an-object.js
786
- var require_an_object = __commonJS({
787
- "node_modules/core-js-pure/internals/an-object.js"(exports, module) {
788
- "use strict";
789
- var isObject = require_is_object();
790
- var $String = String;
791
- var $TypeError = TypeError;
792
- module.exports = function(argument) {
793
- if (isObject(argument))
794
- return argument;
795
- throw new $TypeError($String(argument) + " is not an object");
796
- };
797
- }
798
- });
799
-
800
- // node_modules/core-js-pure/internals/object-define-property.js
801
- var require_object_define_property = __commonJS({
802
- "node_modules/core-js-pure/internals/object-define-property.js"(exports) {
803
- "use strict";
804
- var DESCRIPTORS = require_descriptors();
805
- var IE8_DOM_DEFINE = require_ie8_dom_define();
806
- var V8_PROTOTYPE_DEFINE_BUG = require_v8_prototype_define_bug();
807
- var anObject = require_an_object();
808
- var toPropertyKey = require_to_property_key();
809
- var $TypeError = TypeError;
810
- var $defineProperty = Object.defineProperty;
811
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
812
- var ENUMERABLE = "enumerable";
813
- var CONFIGURABLE = "configurable";
814
- var WRITABLE = "writable";
815
- exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
816
- anObject(O);
817
- P = toPropertyKey(P);
818
- anObject(Attributes);
819
- if (typeof O === "function" && P === "prototype" && "value" in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
820
- var current = $getOwnPropertyDescriptor(O, P);
821
- if (current && current[WRITABLE]) {
822
- O[P] = Attributes.value;
823
- Attributes = {
824
- configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
825
- enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
826
- writable: false
827
- };
828
- }
829
- }
830
- return $defineProperty(O, P, Attributes);
831
- } : $defineProperty : function defineProperty(O, P, Attributes) {
832
- anObject(O);
833
- P = toPropertyKey(P);
834
- anObject(Attributes);
835
- if (IE8_DOM_DEFINE)
836
- try {
837
- return $defineProperty(O, P, Attributes);
838
- } catch (error) {
839
- }
840
- if ("get" in Attributes || "set" in Attributes)
841
- throw new $TypeError("Accessors not supported");
842
- if ("value" in Attributes)
843
- O[P] = Attributes.value;
844
- return O;
845
- };
846
- }
847
- });
848
-
849
- // node_modules/core-js-pure/internals/create-non-enumerable-property.js
850
- var require_create_non_enumerable_property = __commonJS({
851
- "node_modules/core-js-pure/internals/create-non-enumerable-property.js"(exports, module) {
852
- "use strict";
853
- var DESCRIPTORS = require_descriptors();
854
- var definePropertyModule = require_object_define_property();
855
- var createPropertyDescriptor = require_create_property_descriptor();
856
- module.exports = DESCRIPTORS ? function(object, key, value) {
857
- return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
858
- } : function(object, key, value) {
859
- object[key] = value;
860
- return object;
861
- };
862
- }
863
- });
864
-
865
- // node_modules/core-js-pure/internals/export.js
866
- var require_export = __commonJS({
867
- "node_modules/core-js-pure/internals/export.js"(exports, module) {
868
- "use strict";
869
- var global2 = require_global();
870
- var apply = require_function_apply();
871
- var uncurryThis = require_function_uncurry_this_clause();
872
- var isCallable = require_is_callable();
873
- var getOwnPropertyDescriptor = require_object_get_own_property_descriptor().f;
874
- var isForced = require_is_forced();
875
- var path = require_path();
876
- var bind = require_function_bind_context();
877
- var createNonEnumerableProperty = require_create_non_enumerable_property();
878
- var hasOwn = require_has_own_property();
879
- require_shared_store();
880
- var wrapConstructor = function(NativeConstructor) {
881
- var Wrapper = function(a, b, c) {
882
- if (this instanceof Wrapper) {
883
- switch (arguments.length) {
884
- case 0:
885
- return new NativeConstructor();
886
- case 1:
887
- return new NativeConstructor(a);
888
- case 2:
889
- return new NativeConstructor(a, b);
890
- }
891
- return new NativeConstructor(a, b, c);
892
- }
893
- return apply(NativeConstructor, this, arguments);
894
- };
895
- Wrapper.prototype = NativeConstructor.prototype;
896
- return Wrapper;
897
- };
898
- module.exports = function(options, source) {
899
- var TARGET = options.target;
900
- var GLOBAL = options.global;
901
- var STATIC = options.stat;
902
- var PROTO = options.proto;
903
- var nativeSource = GLOBAL ? global2 : STATIC ? global2[TARGET] : global2[TARGET] && global2[TARGET].prototype;
904
- var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, TARGET, {})[TARGET];
905
- var targetPrototype = target.prototype;
906
- var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;
907
- var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;
908
- for (key in source) {
909
- FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced);
910
- USE_NATIVE = !FORCED && nativeSource && hasOwn(nativeSource, key);
911
- targetProperty = target[key];
912
- if (USE_NATIVE)
913
- if (options.dontCallGetSet) {
914
- descriptor = getOwnPropertyDescriptor(nativeSource, key);
915
- nativeProperty = descriptor && descriptor.value;
916
- } else
917
- nativeProperty = nativeSource[key];
918
- sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key];
919
- if (!FORCED && !PROTO && typeof targetProperty == typeof sourceProperty)
920
- continue;
921
- if (options.bind && USE_NATIVE)
922
- resultProperty = bind(sourceProperty, global2);
923
- else if (options.wrap && USE_NATIVE)
924
- resultProperty = wrapConstructor(sourceProperty);
925
- else if (PROTO && isCallable(sourceProperty))
926
- resultProperty = uncurryThis(sourceProperty);
927
- else
928
- resultProperty = sourceProperty;
929
- if (options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) {
930
- createNonEnumerableProperty(resultProperty, "sham", true);
931
- }
932
- createNonEnumerableProperty(target, key, resultProperty);
933
- if (PROTO) {
934
- VIRTUAL_PROTOTYPE = TARGET + "Prototype";
935
- if (!hasOwn(path, VIRTUAL_PROTOTYPE)) {
936
- createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});
937
- }
938
- createNonEnumerableProperty(path[VIRTUAL_PROTOTYPE], key, sourceProperty);
939
- if (options.real && targetPrototype && (FORCED || !targetPrototype[key])) {
940
- createNonEnumerableProperty(targetPrototype, key, sourceProperty);
941
- }
942
- }
943
- }
944
- };
945
- }
946
- });
947
-
948
- // node_modules/core-js-pure/internals/math-trunc.js
949
- var require_math_trunc = __commonJS({
950
- "node_modules/core-js-pure/internals/math-trunc.js"(exports, module) {
951
- "use strict";
952
- var ceil = Math.ceil;
953
- var floor = Math.floor;
954
- module.exports = Math.trunc || function trunc(x) {
955
- var n = +x;
956
- return (n > 0 ? floor : ceil)(n);
957
- };
958
- }
959
- });
960
-
961
- // node_modules/core-js-pure/internals/to-integer-or-infinity.js
962
- var require_to_integer_or_infinity = __commonJS({
963
- "node_modules/core-js-pure/internals/to-integer-or-infinity.js"(exports, module) {
964
- "use strict";
965
- var trunc = require_math_trunc();
966
- module.exports = function(argument) {
967
- var number = +argument;
968
- return number !== number || number === 0 ? 0 : trunc(number);
969
- };
970
- }
971
- });
972
-
973
- // node_modules/core-js-pure/internals/to-absolute-index.js
974
- var require_to_absolute_index = __commonJS({
975
- "node_modules/core-js-pure/internals/to-absolute-index.js"(exports, module) {
976
- "use strict";
977
- var toIntegerOrInfinity = require_to_integer_or_infinity();
978
- var max = Math.max;
979
- var min = Math.min;
980
- module.exports = function(index, length) {
981
- var integer = toIntegerOrInfinity(index);
982
- return integer < 0 ? max(integer + length, 0) : min(integer, length);
983
- };
984
- }
985
- });
986
-
987
- // node_modules/core-js-pure/internals/to-length.js
988
- var require_to_length = __commonJS({
989
- "node_modules/core-js-pure/internals/to-length.js"(exports, module) {
990
- "use strict";
991
- var toIntegerOrInfinity = require_to_integer_or_infinity();
992
- var min = Math.min;
993
- module.exports = function(argument) {
994
- var len = toIntegerOrInfinity(argument);
995
- return len > 0 ? min(len, 9007199254740991) : 0;
996
- };
997
- }
998
- });
999
-
1000
- // node_modules/core-js-pure/internals/length-of-array-like.js
1001
- var require_length_of_array_like = __commonJS({
1002
- "node_modules/core-js-pure/internals/length-of-array-like.js"(exports, module) {
1003
- "use strict";
1004
- var toLength = require_to_length();
1005
- module.exports = function(obj) {
1006
- return toLength(obj.length);
1007
- };
1008
- }
1009
- });
1010
-
1011
- // node_modules/core-js-pure/internals/array-includes.js
1012
- var require_array_includes = __commonJS({
1013
- "node_modules/core-js-pure/internals/array-includes.js"(exports, module) {
1014
- "use strict";
1015
- var toIndexedObject = require_to_indexed_object();
1016
- var toAbsoluteIndex = require_to_absolute_index();
1017
- var lengthOfArrayLike = require_length_of_array_like();
1018
- var createMethod = function(IS_INCLUDES) {
1019
- return function($this, el, fromIndex) {
1020
- var O = toIndexedObject($this);
1021
- var length = lengthOfArrayLike(O);
1022
- if (length === 0)
1023
- return !IS_INCLUDES && -1;
1024
- var index = toAbsoluteIndex(fromIndex, length);
1025
- var value;
1026
- if (IS_INCLUDES && el !== el)
1027
- while (length > index) {
1028
- value = O[index++];
1029
- if (value !== value)
1030
- return true;
1031
- }
1032
- else
1033
- for (; length > index; index++) {
1034
- if ((IS_INCLUDES || index in O) && O[index] === el)
1035
- return IS_INCLUDES || index || 0;
1036
- }
1037
- return !IS_INCLUDES && -1;
1038
- };
1039
- };
1040
- module.exports = {
1041
- // `Array.prototype.includes` method
1042
- // https://tc39.es/ecma262/#sec-array.prototype.includes
1043
- includes: createMethod(true),
1044
- // `Array.prototype.indexOf` method
1045
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
1046
- indexOf: createMethod(false)
1047
- };
1048
- }
1049
- });
1050
-
1051
- // node_modules/core-js-pure/internals/hidden-keys.js
1052
- var require_hidden_keys = __commonJS({
1053
- "node_modules/core-js-pure/internals/hidden-keys.js"(exports, module) {
1054
- "use strict";
1055
- module.exports = {};
1056
- }
1057
- });
1058
-
1059
- // node_modules/core-js-pure/internals/object-keys-internal.js
1060
- var require_object_keys_internal = __commonJS({
1061
- "node_modules/core-js-pure/internals/object-keys-internal.js"(exports, module) {
1062
- "use strict";
1063
- var uncurryThis = require_function_uncurry_this();
1064
- var hasOwn = require_has_own_property();
1065
- var toIndexedObject = require_to_indexed_object();
1066
- var indexOf = require_array_includes().indexOf;
1067
- var hiddenKeys = require_hidden_keys();
1068
- var push = uncurryThis([].push);
1069
- module.exports = function(object, names) {
1070
- var O = toIndexedObject(object);
1071
- var i = 0;
1072
- var result = [];
1073
- var key;
1074
- for (key in O)
1075
- !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
1076
- while (names.length > i)
1077
- if (hasOwn(O, key = names[i++])) {
1078
- ~indexOf(result, key) || push(result, key);
1079
- }
1080
- return result;
1081
- };
1082
- }
1083
- });
1084
-
1085
- // node_modules/core-js-pure/internals/enum-bug-keys.js
1086
- var require_enum_bug_keys = __commonJS({
1087
- "node_modules/core-js-pure/internals/enum-bug-keys.js"(exports, module) {
1088
- "use strict";
1089
- module.exports = [
1090
- "constructor",
1091
- "hasOwnProperty",
1092
- "isPrototypeOf",
1093
- "propertyIsEnumerable",
1094
- "toLocaleString",
1095
- "toString",
1096
- "valueOf"
1097
- ];
1098
- }
1099
- });
1100
-
1101
- // node_modules/core-js-pure/internals/object-keys.js
1102
- var require_object_keys = __commonJS({
1103
- "node_modules/core-js-pure/internals/object-keys.js"(exports, module) {
1104
- "use strict";
1105
- var internalObjectKeys = require_object_keys_internal();
1106
- var enumBugKeys = require_enum_bug_keys();
1107
- module.exports = Object.keys || function keys(O) {
1108
- return internalObjectKeys(O, enumBugKeys);
1109
- };
1110
- }
1111
- });
1112
-
1113
- // node_modules/core-js-pure/internals/object-define-properties.js
1114
- var require_object_define_properties = __commonJS({
1115
- "node_modules/core-js-pure/internals/object-define-properties.js"(exports) {
1116
- "use strict";
1117
- var DESCRIPTORS = require_descriptors();
1118
- var V8_PROTOTYPE_DEFINE_BUG = require_v8_prototype_define_bug();
1119
- var definePropertyModule = require_object_define_property();
1120
- var anObject = require_an_object();
1121
- var toIndexedObject = require_to_indexed_object();
1122
- var objectKeys = require_object_keys();
1123
- exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1124
- anObject(O);
1125
- var props = toIndexedObject(Properties);
1126
- var keys = objectKeys(Properties);
1127
- var length = keys.length;
1128
- var index = 0;
1129
- var key;
1130
- while (length > index)
1131
- definePropertyModule.f(O, key = keys[index++], props[key]);
1132
- return O;
1133
- };
1134
- }
1135
- });
1136
-
1137
- // node_modules/core-js-pure/internals/html.js
1138
- var require_html = __commonJS({
1139
- "node_modules/core-js-pure/internals/html.js"(exports, module) {
1140
- "use strict";
1141
- var getBuiltIn = require_get_built_in();
1142
- module.exports = getBuiltIn("document", "documentElement");
1143
- }
1144
- });
1145
-
1146
- // node_modules/core-js-pure/internals/shared-key.js
1147
- var require_shared_key = __commonJS({
1148
- "node_modules/core-js-pure/internals/shared-key.js"(exports, module) {
1149
- "use strict";
1150
- var shared = require_shared();
1151
- var uid = require_uid();
1152
- var keys = shared("keys");
1153
- module.exports = function(key) {
1154
- return keys[key] || (keys[key] = uid(key));
1155
- };
1156
- }
1157
- });
1158
-
1159
- // node_modules/core-js-pure/internals/object-create.js
1160
- var require_object_create = __commonJS({
1161
- "node_modules/core-js-pure/internals/object-create.js"(exports, module) {
1162
- "use strict";
1163
- var anObject = require_an_object();
1164
- var definePropertiesModule = require_object_define_properties();
1165
- var enumBugKeys = require_enum_bug_keys();
1166
- var hiddenKeys = require_hidden_keys();
1167
- var html = require_html();
1168
- var documentCreateElement = require_document_create_element();
1169
- var sharedKey = require_shared_key();
1170
- var GT = ">";
1171
- var LT = "<";
1172
- var PROTOTYPE = "prototype";
1173
- var SCRIPT = "script";
1174
- var IE_PROTO = sharedKey("IE_PROTO");
1175
- var EmptyConstructor = function() {
1176
- };
1177
- var scriptTag = function(content) {
1178
- return LT + SCRIPT + GT + content + LT + "/" + SCRIPT + GT;
1179
- };
1180
- var NullProtoObjectViaActiveX = function(activeXDocument2) {
1181
- activeXDocument2.write(scriptTag(""));
1182
- activeXDocument2.close();
1183
- var temp = activeXDocument2.parentWindow.Object;
1184
- activeXDocument2 = null;
1185
- return temp;
1186
- };
1187
- var NullProtoObjectViaIFrame = function() {
1188
- var iframe = documentCreateElement("iframe");
1189
- var JS = "java" + SCRIPT + ":";
1190
- var iframeDocument;
1191
- iframe.style.display = "none";
1192
- html.appendChild(iframe);
1193
- iframe.src = String(JS);
1194
- iframeDocument = iframe.contentWindow.document;
1195
- iframeDocument.open();
1196
- iframeDocument.write(scriptTag("document.F=Object"));
1197
- iframeDocument.close();
1198
- return iframeDocument.F;
1199
- };
1200
- var activeXDocument;
1201
- var NullProtoObject = function() {
1202
- try {
1203
- activeXDocument = new ActiveXObject("htmlfile");
1204
- } catch (error) {
1205
- }
1206
- NullProtoObject = typeof document != "undefined" ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument);
1207
- var length = enumBugKeys.length;
1208
- while (length--)
1209
- delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1210
- return NullProtoObject();
1211
- };
1212
- hiddenKeys[IE_PROTO] = true;
1213
- module.exports = Object.create || function create(O, Properties) {
1214
- var result;
1215
- if (O !== null) {
1216
- EmptyConstructor[PROTOTYPE] = anObject(O);
1217
- result = new EmptyConstructor();
1218
- EmptyConstructor[PROTOTYPE] = null;
1219
- result[IE_PROTO] = O;
1220
- } else
1221
- result = NullProtoObject();
1222
- return Properties === void 0 ? result : definePropertiesModule.f(result, Properties);
1223
- };
1224
- }
1225
- });
1226
-
1227
- // node_modules/core-js-pure/modules/es.object.create.js
1228
- var require_es_object_create = __commonJS({
1229
- "node_modules/core-js-pure/modules/es.object.create.js"() {
1230
- "use strict";
1231
- var $ = require_export();
1232
- var DESCRIPTORS = require_descriptors();
1233
- var create = require_object_create();
1234
- $({ target: "Object", stat: true, sham: !DESCRIPTORS }, {
1235
- create
1236
- });
1237
- }
1238
- });
1239
-
1240
- // node_modules/core-js-pure/es/object/create.js
1241
- var require_create = __commonJS({
1242
- "node_modules/core-js-pure/es/object/create.js"(exports, module) {
1243
- "use strict";
1244
- require_es_object_create();
1245
- var path = require_path();
1246
- var Object2 = path.Object;
1247
- module.exports = function create(P, D) {
1248
- return Object2.create(P, D);
1249
- };
1250
- }
1251
- });
1252
-
1253
- // node_modules/core-js-pure/stable/object/create.js
1254
- var require_create2 = __commonJS({
1255
- "node_modules/core-js-pure/stable/object/create.js"(exports, module) {
1256
- "use strict";
1257
- var parent = require_create();
1258
- module.exports = parent;
1259
- }
1260
- });
1261
-
1262
- // node_modules/@babel/runtime-corejs3/core-js-stable/object/create.js
1263
- var require_create3 = __commonJS({
1264
- "node_modules/@babel/runtime-corejs3/core-js-stable/object/create.js"(exports, module) {
1265
- module.exports = require_create2();
1266
- }
1267
- });
1268
-
1269
- // node_modules/inject-meta-tag/lib/esmodules/injectMetaTag.js
1270
- function injectMeta(name, content) {
1271
- try {
1272
- if (typeof document === "undefined") {
1273
- return;
1274
- }
1275
- var metaElement = document.createElement("meta");
1276
- metaElement.setAttribute("name", name);
1277
- content && metaElement.setAttribute("content", content);
1278
- document.head.appendChild(metaElement);
1279
- } catch (error) {
1280
- console.error('inject-meta-tag: Failed to inject <meta name="'.concat(name, '"> tag.'), error);
1281
- }
1282
- }
1283
-
1284
- // src/private/FluentThemeProvider.tsx
1285
- var import_botframework_webchat_component10 = __toESM(require_botframework_webchat_component());
1286
- var import_react28 = __toESM(require_react());
1287
-
1288
- // src/components/telephoneKeypad/Provider.tsx
1289
- var import_react2 = __toESM(require_react());
1290
-
1291
- // src/components/telephoneKeypad/private/Context.ts
1292
- var import_react = __toESM(require_react());
1293
- var Context = (0, import_react.createContext)(
1294
- new Proxy({}, {
1295
- get() {
1296
- throw new Error("botframework-webchat: This hook can only used under its corresponding <Provider>.");
1297
- }
1298
- })
1299
- );
1300
- Context.displayName = "TelephoneKeypad.Context";
1301
- var Context_default = Context;
1302
-
1303
- // src/components/telephoneKeypad/Provider.tsx
1304
- var Provider = (0, import_react2.memo)(({ children }) => {
1305
- const [shown, setShown] = (0, import_react2.useState)(false);
1306
- const context = (0, import_react2.useMemo)(
1307
- () => Object.freeze({
1308
- setShown,
1309
- shown
1310
- }),
1311
- [setShown, shown]
1312
- );
1313
- return /* @__PURE__ */ import_react2.default.createElement(Context_default.Provider, { value: context }, children);
1314
- });
1315
- var Provider_default = Provider;
1316
-
1317
- // src/components/telephoneKeypad/Surrogate.tsx
1318
- var import_react9 = __toESM(require_react());
1319
-
1320
- // src/components/telephoneKeypad/private/TelephoneKeypad.tsx
1321
- var import_react8 = __toESM(require_react());
1322
- var import_classnames = __toESM(require_classnames());
1323
-
1324
- // node_modules/use-ref-from/lib/esmodules/useRefFrom.js
1325
- var import_create = __toESM(require_create3());
1326
- var import_react3 = __toESM(require_react());
1327
- function useRefFrom(value) {
1328
- var ref = (0, import_react3.useRef)();
1329
- var readOnlyRef = (0, import_react3.useMemo)(function() {
1330
- return (0, import_create.default)({}, {
1331
- current: {
1332
- get: function get() {
1333
- return ref.current;
1334
- }
1335
- }
1336
- });
1337
- }, [ref]);
1338
- ref.current = value;
1339
- return readOnlyRef;
1340
- }
1341
-
1342
- // src/components/telephoneKeypad/private/TelephoneKeypad.tsx
1343
- var import_botframework_webchat_component = __toESM(require_botframework_webchat_component());
1344
-
1345
- // src/components/telephoneKeypad/private/Button.tsx
1346
- var import_react5 = __toESM(require_react());
1347
-
1348
- // src/components/telephoneKeypad/private/Button.module.css
1349
- var Button_default = {
1350
- "telephone-keypad__button": "Button_telephone-keypad__button",
1351
- "telephone-keypad__button__ruby": "Button_telephone-keypad__button__ruby",
1352
- "telephone-keypad__button__text": "Button_telephone-keypad__button__text",
1353
- "telephone-keypad--horizontal": "Button_telephone-keypad--horizontal"
1354
- };
1355
-
1356
- // src/styles/injectStyle.ts
1357
- var injectedStyles = "/* src/components/telephoneKeypad/private/Button.module.css */\n.webchat-fluent .Button_telephone-keypad__button {\n -webkit-user-select: none;\n align-items: center;\n appearance: none;\n background-color: White;\n border-radius: 100%;\n border: solid 1px var(--webchat-colorNeutralStroke1);\n color: var(--webchat-colorGray200);\n font-weight: var(--webchat-fontWeightSemibold);\n cursor: pointer;\n display: flex;\n flex-direction: column;\n height: 60px;\n opacity: 0.7;\n padding: 0;\n position: relative;\n touch-action: none;\n user-select: none;\n width: 60px;\n}\n.webchat-fluent .Button_telephone-keypad__button:hover {\n background-color: var(--webchat-colorGray30);\n}\n.webchat-fluent .Button_telephone-keypad__button__ruby {\n color: var(--webchat-colorGray190);\n font-size: 10px;\n}\n.webchat-fluent .Button_telephone-keypad__button__text {\n font-size: 24px;\n margin-top: 8px;\n}\n.webchat-fluent .Button_telephone-keypad--horizontal .Button_telephone-keypad__button {\n height: 32px;\n justify-content: center;\n margin: 8px 4px;\n width: 32px;\n}\n.webchat-fluent .Button_telephone-keypad--horizontal .Button_telephone-keypad__button__ruby {\n display: none;\n}\n.webchat-fluent .Button_telephone-keypad--horizontal .Button_telephone-keypad__button__text {\n font-size: 20px;\n margin-top: 0;\n}\n\n/* src/components/telephoneKeypad/private/TelephoneKeypad.module.css */\n.webchat-fluent .TelephoneKeypad_telephone-keypad {\n align-items: center;\n background: var(--webchat-colorNeutralBackground1);\n border: none;\n border-radius: var(--webchat-borderRadiusXLarge);\n display: flex;\n flex-direction: column;\n font-family: var(--webchat-fontFamilyBase);\n justify-content: center;\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__box {\n box-sizing: border-box;\n display: grid;\n gap: 16px;\n grid-template-columns: repeat(3, 1fr);\n grid-template-rows: repeat(4, 1fr);\n justify-items: center;\n padding: 16px;\n width: 100%;\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__info-message {\n align-items: center;\n color: var(--webchat-colorNeutralForeground4);\n display: flex;\n font-size: 12px;\n gap: 6px;\n margin-block-end: 6px;\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__info-message-link {\n color: var(--webchat-colorBrandForegroundLink);\n text-decoration-color: transparent;\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__info-message-link:target {\n color: var(--webchat-colorBrandForegroundLinkSelected);\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__info-message-link:hover {\n color: var(--webchat-colorBrandForegroundLinkHover);\n text-decoration: underline 1px currentColor;\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__info-message-link:active {\n color: var(--webchat-colorBrandForegroundLinkPressed);\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__info-message-link:focus-visible {\n outline: none;\n text-decoration: underline 1px double var(--webchat-colorStrokeFocus2);\n}\n\n/* src/components/Theme.module.css */\n.webchat-fluent.Theme_theme {\n display: contents;\n --webchat-colorNeutralForeground1: var(--colorNeutralForeground1, #242424);\n --webchat-colorNeutralForeground2: var(--colorNeutralForeground2, #424242);\n --webchat-colorNeutralForeground4: var(--colorNeutralForeground4, #707070);\n --webchat-colorNeutralForeground2BrandHover: var(--colorNeutralForeground2BrandHover, #02729c);\n --webchat-colorNeutralForeground2BrandPressed: var(--colorNeutralForeground2BrandPressed, #01678c);\n --webchat-colorNeutralForeground2BrandSelected: var(--colorNeutralForeground2BrandSelected, #067191);\n --webchat-colorNeutralForegroundDisabled: var(--colorNeutralForegroundDisabled, #bdbdbd);\n --webchat-colorNeutralBackground1: var(--colorNeutralBackground1, #ffffff);\n --webchat-colorNeutralBackground4: var(--colorNeutralBackground4, #f0f0f0);\n --webchat-colorNeutralBackground5: var(--colorNeutralBackground5, #ebebeb);\n --webchat-colorNeutralStroke1: var(--colorNeutralStroke1, #d1d1d1);\n --webchat-colorNeutralStroke2: var(--colorNeutralStroke2, #e0e0e0);\n --webchat-colorNeutralStroke1Selected: var(--colorNeutralStroke1Selected, #bdbdbd);\n --webchat-colorStrokeFocus2: var(--colorStrokeFocus2, #000000);\n --webchat-colorBrandStroke2: var(--colorBrandStroke2, #9edcf7);\n --webchat-colorBrandForeground2Hover: var(--colorBrandForeground2Hover, #015a7a);\n --webchat-colorBrandForeground2Pressed: var(--colorBrandForeground2Pressed, #01384d);\n --webchat-colorBrandForegroundLink: var(--colorBrandForegroundLink, #01678c);\n --webchat-colorBrandForegroundLinkHover: var(--colorBrandForegroundLinkHover, #015a7a);\n --webchat-colorBrandForegroundLinkPressed: var(--colorBrandForegroundLinkPressed, #014259);\n --webchat-colorBrandForegroundLinkSelected: var(--colorBrandForegroundLinkSelected, #01678c);\n --webchat-colorBrandBackground2Hover: var(--colorBrandBackground2Hover, #bee7fa);\n --webchat-colorBrandBackground2Pressed: var(--colorBrandBackground2Pressed, #7fd2f5);\n --webchat-colorCompoundBrandForeground1Hover: var(--colorCompoundBrandForeground1Hover, #02729c);\n --webchat-colorStatusDangerForeground1: var(--colorStatusDangerForeground1, #b10e1c);\n --webchat-colorGray30: var(--colorGray30, #edebe9);\n --webchat-colorGray160: var(--colorGray160, #323130);\n --webchat-colorGray190: var(--colorGray190, #201f1e);\n --webchat-colorGray200: var(--colorGray200, #1b1a19);\n --webchat-borderRadiusSmall: var(--borderRadiusSmall, 2px);\n --webchat-borderRadiusLarge: var(--borderRadiusLarge, 6px);\n --webchat-borderRadiusXLarge: var(--borderRadiusXLarge, 8px);\n --webchat-shadow16: var(--shadow16, 0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108));\n --webchat-spacingHorizontalMNudge: var(--spacingHorizontalMNudge, 10px);\n --webchat-fontFamilyBase: var(--fontFamilyBase, \"Segoe UI\", \"Segoe UI Web (West European)\", -apple-system, BlinkMacSystemFont, Roboto, \"Helvetica Neue\", sans-serif);\n --webchat-fontFamilyNumeric: var(--fontFamilyNumeric, Bahnschrift, \"Segoe UI\", \"Segoe UI Web (West European)\", -apple-system, BlinkMacSystemFont, Roboto, \"Helvetica Neue\", sans-serif);\n --webchat-fontWeightSemibold: var(--fontWeightSemibold, 600);\n --webchat-strokeWidthThicker: var(--strokeWidthThicker, 3px);\n --webchat-durationUltraFast: var(--durationUltraFast, 0);\n --webchat-durationNormal: var(--durationNormal, 200ms);\n --webchat-curveAccelerateMid: var(--curveAccelerateMid, cubic-bezier(1,0,1,1));\n --webchat-curveDecelerateMid: var(--curveDecelerateMid, cubic-bezier(0,0,0,1));\n}\n@media (prefers-reduced-motion) {\n .webchat-fluent.Theme_theme {\n --webchat-durationUltraFast: 0.01ms;\n --webchat-durationNormal: 0.01ms;\n }\n}\n\n/* src/components/dropZone/index.module.css */\n.webchat-fluent .dropZone_sendbox__attachment-drop-zone {\n background-color: var(--webchat-colorNeutralBackground4);\n border-radius: inherit;\n cursor: copy;\n display: grid;\n gap: 8px;\n inset: 0;\n place-content: center;\n place-items: center;\n position: absolute;\n}\n.webchat-fluent .dropZone_sendbox__attachment-drop-zone--droppable {\n background-color: #e00;\n color: White;\n}\n.webchat-fluent .dropZone_sendbox__attachment-drop-zone-icon {\n height: 36px;\n pointer-events: none;\n width: 36px;\n}\n\n/* src/components/suggestedActions/SuggestedAction.module.css */\n.webchat-fluent .SuggestedAction_suggested-action {\n align-items: center;\n background: transparent;\n border-radius: 8px;\n border: 1px solid var(--webchat-colorBrandStroke2);\n color: currentColor;\n cursor: pointer;\n display: flex;\n font-size: 12px;\n gap: 4px;\n padding: 4px 8px 4px;\n text-align: start;\n transition: all .15s ease-out;\n}\n@media (hover: hover) {\n .webchat-fluent .SuggestedAction_suggested-action:not([aria-disabled=true]):hover {\n background-color: var(--webchat-colorBrandBackground2Hover);\n color: var(--webchat-colorBrandForeground2Hover);\n }\n}\n.webchat-fluent .SuggestedAction_suggested-action:not([aria-disabled=true]):active {\n background-color: var(--webchat-colorBrandBackground2Pressed);\n color: var(--webchat-colorBrandForeground2Pressed);\n}\n.webchat-fluent .SuggestedAction_suggested-action[aria-disabled=true] {\n color: var(--webchat-colorNeutralForegroundDisabled);\n cursor: not-allowed;\n}\n.webchat-fluent .SuggestedAction_suggested-action__image {\n font-size: 12px;\n height: 1em;\n width: 1em;\n}\n\n/* src/components/suggestedActions/index.module.css */\n.webchat-fluent .suggestedActions_suggested-actions {\n align-items: flex-end;\n align-self: flex-end;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.webchat-fluent .suggestedActions_suggested-actions:not(:empty) {\n padding-block-end: 8px;\n padding-inline-start: 4px;\n}\n.webchat-fluent .suggestedActions_suggested-actions.suggestedActions_suggested-actions--flow {\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-end;\n}\n.webchat-fluent .suggestedActions_suggested-actions.suggestedActions_suggested-actions--stacked {\n flex-direction: column;\n}\n\n/* src/components/sendbox/Toolbar.module.css */\n.webchat-fluent .Toolbar_sendbox__toolbar {\n display: flex;\n gap: 4px;\n margin-inline-start: auto;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button {\n align-items: center;\n appearance: none;\n aspect-ratio: 1;\n background: transparent;\n border-radius: var(--webchat-borderRadiusSmall);\n border: none;\n color: currentColor;\n cursor: pointer;\n display: flex;\n justify-content: center;\n padding: 3px;\n width: 32px;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button > svg {\n font-size: 20px;\n pointer-events: none;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button.Toolbar_sendbox__toolbar-button--selected {\n color: var(--webchat-colorNeutralForeground2BrandSelected);\n}\n@media (hover: hover) {\n .webchat-fluent .Toolbar_sendbox__toolbar-button:not([aria-disabled=true]):hover {\n color: var(--webchat-colorNeutralForeground2BrandHover);\n }\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button:not([aria-disabled=true]):active {\n color: var(--webchat-colorNeutralForeground2BrandPressed);\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button[aria-disabled=true] {\n color: var(--webchat-colorNeutralForegroundDisabled);\n cursor: not-allowed;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-separator {\n align-self: center;\n border-inline-end: 1px solid var(--webchat-colorNeutralStroke2);\n height: 28px;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-separator:is(:first-child, :last-child, :only-child) {\n display: none;\n}\n\n/* src/components/sendbox/AddAttachmentButton.module.css */\n.webchat-fluent .AddAttachmentButton_sendbox__add-attachment {\n display: grid;\n}\n.webchat-fluent .AddAttachmentButton_sendbox__add-attachment-input {\n font-size: 0;\n height: 0;\n opacity: 0;\n width: 0;\n}\n\n/* src/components/sendbox/Attachments.module.css */\n.webchat-fluent .Attachments_sendbox__attachment {\n border-radius: var(--webchat-borderRadiusLarge);\n border: 1px solid var(--webchat-colorNeutralStroke1);\n cursor: default;\n padding: 6px 8px;\n width: fit-content;\n}\n\n/* src/components/sendbox/ErrorMessage.module.css */\n.webchat-fluent .ErrorMessage_sendbox__error-message {\n color: transparent;\n font-size: 0;\n height: 0;\n left: 0;\n position: absolute;\n top: 0;\n width: 0;\n}\n\n/* src/components/sendbox/TextArea.module.css */\n.webchat-fluent .TextArea_sendbox__text-area {\n display: grid;\n grid-template-areas: \"main\";\n max-height: 200px;\n overflow: hidden;\n}\n.webchat-fluent .TextArea_sendbox__text-area--hidden {\n height: 0;\n visibility: collapse;\n}\n.webchat-fluent .TextArea_sendbox__text-area-shared {\n border: none;\n font: inherit;\n grid-area: main;\n outline: inherit;\n overflow-wrap: anywhere;\n resize: inherit;\n scrollbar-gutter: stable;\n}\n.webchat-fluent .TextArea_sendbox__text-area-doppelganger {\n overflow: hidden;\n visibility: hidden;\n white-space: pre-wrap;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input {\n background-color: inherit;\n color: currentColor;\n height: 100%;\n padding: 0;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll {\n scrollbar-color: unset;\n scrollbar-width: unset;\n -moz-scrollbar-color: var(--webchat-colorNeutralBackground5) var(--webchat-colorNeutralForeground2);\n -moz-scrollbar-width: thin;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar {\n width: 8px;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar-track {\n background-color: var(--webchat-colorNeutralBackground5);\n border-radius: 16px;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar-thumb {\n background-color: var(--webchat-colorNeutralForeground2);\n border-radius: 16px;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar-corner {\n background-color: var(--webchat-colorNeutralBackground5);\n}\n\n/* src/components/sendbox/index.module.css */\n.webchat-fluent .sendbox_sendbox {\n color: var(--webchat-colorNeutralForeground1);\n font-family: var(--webchat-fontFamilyBase);\n padding: 0 10px 10px;\n text-rendering: optimizeLegibility;\n --webchat-sendbox-attachment-area-active: ;\n --webchat-sendbox-border-radius: var(--webchat-borderRadiusLarge);\n}\n.webchat-fluent .sendbox_sendbox__sendbox {\n background-color: var(--webchat-colorNeutralBackground1);\n border-radius: var(--webchat-sendbox-border-radius);\n border: 1px solid var(--webchat-colorNeutralStroke1);\n display: grid;\n font-family: var(--webchat-fontFamilyBase);\n font-size: 14px;\n gap: 6px;\n grid-template: [telephone-keypad-start] \"text-area\" [telephone-keypad-end] var(--webchat-sendbox-attachment-area-active) \"controls\" / [telephone-keypad] 1fr;\n line-height: 20px;\n padding: 8px;\n position: relative;\n}\n.webchat-fluent .sendbox_sendbox__sendbox:has(.sendbox_sendbox__attachment--in-grid) {\n --webchat-sendbox-attachment-area-active: \"attachment\" ;\n}\n.webchat-fluent .sendbox_sendbox__sendbox:focus-within {\n border-color: var(--webchat-colorNeutralStroke1Selected);\n}\n.webchat-fluent .sendbox_sendbox__sendbox::after {\n border-bottom-left-radius: var(--webchat-sendbox-border-radius);\n border-bottom-right-radius: var(--webchat-sendbox-border-radius);\n border-bottom: var(--webchat-strokeWidthThicker) solid var(--webchat-colorCompoundBrandForeground1Hover);\n bottom: -1px;\n clip-path: inset(calc(100% - var(--webchat-strokeWidthThicker)) 50% 0 50%);\n content: \"\";\n height: var(--webchat-sendbox-border-radius);\n left: -1px;\n position: absolute;\n right: -1px;\n transition: clip-path var(--webchat-durationUltraFast) var(--webchat-curveAccelerateMid);\n}\n.webchat-fluent .sendbox_sendbox__sendbox:focus-within::after {\n clip-path: inset(calc(100% - var(--webchat-strokeWidthThicker)) 0 0 0);\n transition: clip-path var(--webchat-durationNormal) var(--webchat-curveDecelerateMid);\n}\n.webchat-fluent .sendbox_sendbox__sendbox > .sendbox_sendbox__text-area--in-grid {\n grid-area: text-area;\n}\n.webchat-fluent .sendbox_sendbox__sendbox > .sendbox_sendbox__attachment--in-grid {\n grid-area: attachment;\n}\n.webchat-fluent .sendbox_sendbox__sendbox > .sendbox_sendbox__sendbox-controls--in-grid {\n grid-area: controls;\n}\n.webchat-fluent .sendbox_sendbox__sendbox > .sendbox_sendbox__telephone-keypad--in-grid {\n grid-area: telephone-keypad;\n}\n.webchat-fluent .sendbox_sendbox__sendbox-text {\n background-color: transparent;\n border: none;\n flex: auto;\n font-family: var(--webchat-fontFamilyBase);\n font-size: 14px;\n line-height: 20px;\n outline: none;\n padding: 4px 4px 0;\n resize: none;\n}\n.webchat-fluent .sendbox_sendbox__sendbox-controls {\n align-items: center;\n display: flex;\n padding-inline-start: 4px;\n}\n.webchat-fluent .sendbox_sendbox__text-counter {\n color: var(--webchat-colorNeutralForeground4);\n cursor: default;\n font-family: var(--webchat-fontFamilyNumeric);\n font-size: 10px;\n line-height: 14px;\n margin-inline-end: 4px;\n}\n.webchat-fluent .sendbox_sendbox__text-counter--error {\n color: var(--webchat-colorStatusDangerForeground1);\n}\n";
1358
- function injectStyles() {
1359
- if (globalThis.document) {
1360
- const style = document.createElement("style");
1361
- style.append(document.createTextNode(injectedStyles));
1362
- document.head.appendChild(style);
1363
- }
1364
- }
1365
-
1366
- // src/styles/useStyles.ts
1367
- var import_react4 = __toESM(require_react());
1368
- function useStyles(styles) {
1369
- return (0, import_react4.useMemo)(
1370
- () => Object.freeze(
1371
- Object.fromEntries(
1372
- Object.entries(styles).map(([baseClassName, resultClassName]) => [
1373
- baseClassName,
1374
- `${baseClassName} ${resultClassName}`
1375
- ])
1376
- )
1377
- ),
1378
- [styles]
1379
- );
1380
- }
1381
- var useStyles_default = useStyles;
1382
-
1383
- // src/components/telephoneKeypad/private/Button.tsx
1384
- var Button = (0, import_react5.memo)(
1385
- // As we are all TypeScript, internal components do not need propTypes.
1386
- // eslint-disable-next-line react/prop-types
1387
- (0, import_react5.forwardRef)(({ button, "data-testid": dataTestId, onClick, ruby }, ref) => {
1388
- const classNames = useStyles_default(Button_default);
1389
- const onClickRef = useRefFrom(onClick);
1390
- const handleClick = (0, import_react5.useCallback)(() => onClickRef.current?.(), [onClickRef]);
1391
- return /* @__PURE__ */ import_react5.default.createElement(
1392
- "button",
1393
- {
1394
- className: classNames["telephone-keypad__button"],
1395
- "data-testid": dataTestId,
1396
- onClick: handleClick,
1397
- ref,
1398
- type: "button"
1399
- },
1400
- /* @__PURE__ */ import_react5.default.createElement("span", { className: classNames["telephone-keypad__button__text"] }, button === "star" ? "\u2217" : button === "pound" ? "#" : button),
1401
- !!ruby && /* @__PURE__ */ import_react5.default.createElement("ruby", { className: classNames["telephone-keypad__button__ruby"] }, ruby)
1402
- );
1403
- })
1404
- );
1405
- Button.displayName = "TelephoneKeypad.Button";
1406
- var Button_default2 = Button;
1407
-
1408
- // src/testIds.ts
1409
- var testIds = {
1410
- sendBoxDropZone: "send box drop zone",
1411
- sendBoxSendButton: "send box send button",
1412
- sendBoxTextBox: "send box text area",
1413
- sendBoxTelephoneKeypadButton1: `send box telephone keypad button 1`,
1414
- sendBoxTelephoneKeypadButton2: `send box telephone keypad button 2`,
1415
- sendBoxTelephoneKeypadButton3: `send box telephone keypad button 3`,
1416
- sendBoxTelephoneKeypadButton4: `send box telephone keypad button 4`,
1417
- sendBoxTelephoneKeypadButton5: `send box telephone keypad button 5`,
1418
- sendBoxTelephoneKeypadButton6: `send box telephone keypad button 6`,
1419
- sendBoxTelephoneKeypadButton7: `send box telephone keypad button 7`,
1420
- sendBoxTelephoneKeypadButton8: `send box telephone keypad button 8`,
1421
- sendBoxTelephoneKeypadButton9: `send box telephone keypad button 9`,
1422
- sendBoxTelephoneKeypadButton0: `send box telephone keypad button 0`,
1423
- sendBoxTelephoneKeypadButtonStar: `send box telephone keypad button star`,
1424
- sendBoxTelephoneKeypadButtonPound: `send box telephone keypad button pound`,
1425
- sendBoxTelephoneKeypadToolbarButton: "send box telephone keypad toolbar button",
1426
- sendBoxUploadButton: "send box upload button"
1427
- };
1428
- var testIds_default = testIds;
1429
-
1430
- // src/components/telephoneKeypad/useShown.ts
1431
- var import_react6 = __toESM(require_react());
1432
- function useShown() {
1433
- const { setShown, shown } = (0, import_react6.useContext)(Context_default);
1434
- return (0, import_react6.useMemo)(() => Object.freeze([shown, setShown]), [shown, setShown]);
1435
- }
1436
-
1437
- // src/components/telephoneKeypad/private/TelephoneKeypad.module.css
1438
- var TelephoneKeypad_default = {
1439
- "telephone-keypad": "TelephoneKeypad_telephone-keypad",
1440
- "telephone-keypad__box": "TelephoneKeypad_telephone-keypad__box",
1441
- "telephone-keypad__info-message": "TelephoneKeypad_telephone-keypad__info-message",
1442
- "telephone-keypad__info-message-link": "TelephoneKeypad_telephone-keypad__info-message-link"
1443
- };
1444
-
1445
- // src/icons/InfoSmallIcon.tsx
1446
- var import_react7 = __toESM(require_react());
1447
- var InfoSmallIcon_default = (0, import_react7.memo)((props) => /* @__PURE__ */ import_react7.default.createElement(
1448
- "svg",
1449
- {
1450
- "aria-hidden": "true",
1451
- className: props.className,
1452
- height: "1em",
1453
- viewBox: "0 0 16 16",
1454
- width: "1em",
1455
- xmlns: "http://www.w3.org/2000/svg"
1456
- },
1457
- /* @__PURE__ */ import_react7.default.createElement(
1458
- "path",
1459
- {
1460
- d: "M8.5 7.5a.5.5 0 1 0-1 0v3a.5.5 0 0 0 1 0v-3Zm.25-2a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1ZM2 8a6 6 0 1 1 12 0A6 6 0 0 1 2 8Z",
1461
- fill: "currentColor"
1462
- }
1463
- )
1464
- ));
1465
-
1466
- // src/components/telephoneKeypad/private/TelephoneKeypad.tsx
1467
- var { LocalizedString } = import_botframework_webchat_component.Components;
1468
- var Orientation = (0, import_react8.memo)(
1469
- ({ children, isHorizontal }) => {
1470
- const classNames = useStyles_default(TelephoneKeypad_default);
1471
- return isHorizontal ? (
1472
- // <HorizontalDialPadController>{children}</HorizontalDialPadController>
1473
- false
1474
- ) : /* @__PURE__ */ import_react8.default.createElement("div", { className: classNames["telephone-keypad__box"] }, children);
1475
- }
1476
- );
1477
- Orientation.displayName = "TelephoneKeypad:Orientation";
1478
- var TelephoneKeypad = (0, import_react8.memo)(({ autoFocus, className, onButtonClick, isHorizontal }) => {
1479
- const autoFocusRef = useRefFrom(autoFocus);
1480
- const classNames = useStyles_default(TelephoneKeypad_default);
1481
- const firstButtonRef = (0, import_react8.useRef)(null);
1482
- const onButtonClickRef = useRefFrom(onButtonClick);
1483
- const [, setShown] = useShown();
1484
- const handleButton1Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("1"), [onButtonClickRef]);
1485
- const handleButton2Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("2"), [onButtonClickRef]);
1486
- const handleButton3Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("3"), [onButtonClickRef]);
1487
- const handleButton4Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("4"), [onButtonClickRef]);
1488
- const handleButton5Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("5"), [onButtonClickRef]);
1489
- const handleButton6Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("6"), [onButtonClickRef]);
1490
- const handleButton7Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("7"), [onButtonClickRef]);
1491
- const handleButton8Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("8"), [onButtonClickRef]);
1492
- const handleButton9Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("9"), [onButtonClickRef]);
1493
- const handleButton0Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("0"), [onButtonClickRef]);
1494
- const handleButtonStarClick = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("star"), [onButtonClickRef]);
1495
- const handleButtonPoundClick = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("pound"), [onButtonClickRef]);
1496
- const handleKeyDown = (0, import_react8.useCallback)(
1497
- (event) => {
1498
- if (event.key === "Escape") {
1499
- setShown(false);
1500
- }
1501
- },
1502
- [setShown]
1503
- );
1504
- (0, import_react8.useEffect)(() => {
1505
- autoFocusRef.current && firstButtonRef.current?.focus();
1506
- }, [autoFocusRef, firstButtonRef]);
1507
- return /* @__PURE__ */ import_react8.default.createElement("div", { className: (0, import_classnames.default)(classNames["telephone-keypad"], className), onKeyDown: handleKeyDown }, /* @__PURE__ */ import_react8.default.createElement(Orientation, { isHorizontal }, /* @__PURE__ */ import_react8.default.createElement(
1508
- Button_default2,
1509
- {
1510
- button: "1",
1511
- "data-testid": testIds_default.sendBoxTelephoneKeypadButton1,
1512
- onClick: handleButton1Click,
1513
- ref: firstButtonRef
1514
- }
1515
- ), /* @__PURE__ */ import_react8.default.createElement(
1516
- Button_default2,
1517
- {
1518
- button: "2",
1519
- "data-testid": testIds_default.sendBoxTelephoneKeypadButton2,
1520
- onClick: handleButton2Click,
1521
- ruby: "ABC"
1522
- }
1523
- ), /* @__PURE__ */ import_react8.default.createElement(
1524
- Button_default2,
1525
- {
1526
- button: "3",
1527
- "data-testid": testIds_default.sendBoxTelephoneKeypadButton3,
1528
- onClick: handleButton3Click,
1529
- ruby: "DEF"
1530
- }
1531
- ), /* @__PURE__ */ import_react8.default.createElement(
1532
- Button_default2,
1533
- {
1534
- button: "4",
1535
- "data-testid": testIds_default.sendBoxTelephoneKeypadButton4,
1536
- onClick: handleButton4Click,
1537
- ruby: "GHI"
1538
- }
1539
- ), /* @__PURE__ */ import_react8.default.createElement(
1540
- Button_default2,
1541
- {
1542
- button: "5",
1543
- "data-testid": testIds_default.sendBoxTelephoneKeypadButton5,
1544
- onClick: handleButton5Click,
1545
- ruby: "JKL"
1546
- }
1547
- ), /* @__PURE__ */ import_react8.default.createElement(
1548
- Button_default2,
1549
- {
1550
- button: "6",
1551
- "data-testid": testIds_default.sendBoxTelephoneKeypadButton6,
1552
- onClick: handleButton6Click,
1553
- ruby: "MNO"
1554
- }
1555
- ), /* @__PURE__ */ import_react8.default.createElement(
1556
- Button_default2,
1557
- {
1558
- button: "7",
1559
- "data-testid": testIds_default.sendBoxTelephoneKeypadButton7,
1560
- onClick: handleButton7Click,
1561
- ruby: "PQRS"
1562
- }
1563
- ), /* @__PURE__ */ import_react8.default.createElement(
1564
- Button_default2,
1565
- {
1566
- button: "8",
1567
- "data-testid": testIds_default.sendBoxTelephoneKeypadButton8,
1568
- onClick: handleButton8Click,
1569
- ruby: "TUV"
1570
- }
1571
- ), /* @__PURE__ */ import_react8.default.createElement(
1572
- Button_default2,
1573
- {
1574
- button: "9",
1575
- "data-testid": testIds_default.sendBoxTelephoneKeypadButton9,
1576
- onClick: handleButton9Click,
1577
- ruby: "WXYZ"
1578
- }
1579
- ), /* @__PURE__ */ import_react8.default.createElement(Button_default2, { button: "star", "data-testid": testIds_default.sendBoxTelephoneKeypadButtonStar, onClick: handleButtonStarClick }), /* @__PURE__ */ import_react8.default.createElement(Button_default2, { button: "0", "data-testid": testIds_default.sendBoxTelephoneKeypadButton0, onClick: handleButton0Click, ruby: "+" }), /* @__PURE__ */ import_react8.default.createElement(
1580
- Button_default2,
1581
- {
1582
- button: "pound",
1583
- "data-testid": testIds_default.sendBoxTelephoneKeypadButtonPound,
1584
- onClick: handleButtonPoundClick
1585
- }
1586
- )), /* @__PURE__ */ import_react8.default.createElement("div", { className: classNames["telephone-keypad__info-message"] }, /* @__PURE__ */ import_react8.default.createElement(InfoSmallIcon_default, null), /* @__PURE__ */ import_react8.default.createElement(
1587
- LocalizedString,
1588
- {
1589
- linkClassName: classNames["telephone-keypad__info-message-link"],
1590
- stringIds: "TELEPHONE_KEYPAD_INPUT_MESSAGE"
1591
- }
1592
- )));
1593
- });
1594
- TelephoneKeypad.displayName = "TelephoneKeypad";
1595
- var TelephoneKeypad_default2 = TelephoneKeypad;
1596
-
1597
- // src/components/telephoneKeypad/Surrogate.tsx
1598
- var TelephoneKeypadSurrogate = (0, import_react9.memo)((props) => useShown()[0] ? /* @__PURE__ */ import_react9.default.createElement(TelephoneKeypad_default2, { ...props }) : false);
1599
- TelephoneKeypadSurrogate.displayName = "TelephoneKeypad.Surrogate";
1600
- var Surrogate_default = TelephoneKeypadSurrogate;
1601
-
1602
- // src/components/Theme.tsx
1603
- var import_react10 = __toESM(require_react());
1604
- var import_classnames2 = __toESM(require_classnames());
1605
-
1606
- // src/components/Theme.module.css
1607
- var Theme_default = {
1608
- theme: "Theme_theme"
1609
- };
1610
-
1611
- // src/components/Theme.tsx
1612
- var rootClassName = "webchat-fluent";
1613
- function WebchatTheme(props) {
1614
- const classNames = useStyles_default(Theme_default);
1615
- return /* @__PURE__ */ import_react10.default.createElement("div", { className: (0, import_classnames2.default)(rootClassName, classNames["theme"]) }, props.children);
1616
- }
1617
-
1618
- // src/components/sendbox/index.tsx
1619
- var import_botframework_webchat_component9 = __toESM(require_botframework_webchat_component());
1620
- var import_classnames9 = __toESM(require_classnames());
1621
- var import_react27 = __toESM(require_react());
1622
-
1623
- // src/icons/SendIcon.tsx
1624
- var import_react11 = __toESM(require_react());
1625
- function SendIcon(props) {
1626
- return /* @__PURE__ */ import_react11.default.createElement(
1627
- "svg",
1628
- {
1629
- "aria-hidden": "true",
1630
- className: props.className,
1631
- height: "1em",
1632
- viewBox: "0 0 20 20",
1633
- width: "1em",
1634
- xmlns: "http://www.w3.org/2000/svg"
1635
- },
1636
- /* @__PURE__ */ import_react11.default.createElement(
1637
- "path",
1638
- {
1639
- d: "M2.18 2.11a.5.5 0 0 1 .54-.06l15 7.5a.5.5 0 0 1 0 .9l-15 7.5a.5.5 0 0 1-.7-.58L3.98 10 2.02 2.63a.5.5 0 0 1 .16-.52Zm2.7 8.39-1.61 6.06L16.38 10 3.27 3.44 4.88 9.5h6.62a.5.5 0 1 1 0 1H4.88Z",
1640
- fill: "currentColor"
1641
- }
1642
- )
1643
- );
1644
- }
1645
-
1646
- // src/components/dropZone/index.tsx
1647
- var import_botframework_webchat_component2 = __toESM(require_botframework_webchat_component());
1648
- var import_classnames3 = __toESM(require_classnames());
1649
- var import_react13 = __toESM(require_react());
1650
-
1651
- // src/icons/AddDocumentIcon.tsx
1652
- var import_react12 = __toESM(require_react());
1653
- function AddDocumentIcon(props) {
1654
- return /* @__PURE__ */ import_react12.default.createElement(
1655
- "svg",
1656
- {
1657
- "aria-hidden": "true",
1658
- className: props.className,
1659
- height: "1em",
1660
- viewBox: "0 0 20 20",
1661
- width: "1em",
1662
- xmlns: "http://www.w3.org/2000/svg"
1663
- },
1664
- /* @__PURE__ */ import_react12.default.createElement(
1665
- "path",
1666
- {
1667
- d: "M6 2a2 2 0 0 0-2 2v5.2c.32-.08.66-.15 1-.18V4a1 1 0 0 1 1-1h4v3.5c0 .83.67 1.5 1.5 1.5H15v8a1 1 0 0 1-1 1h-3.6c-.18.36-.4.7-.66 1H14a2 2 0 0 0 2-2V7.41c0-.4-.16-.78-.44-1.06l-3.91-3.91A1.5 1.5 0 0 0 10.59 2H6Zm8.8 5h-3.3a.5.5 0 0 1-.5-.5V3.2L14.8 7ZM10 14.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Zm-4-2a.5.5 0 0 0-1 0V14H3.5a.5.5 0 0 0 0 1H5v1.5a.5.5 0 0 0 1 0V15h1.5a.5.5 0 0 0 0-1H6v-1.5Z",
1668
- fill: "currentColor"
1669
- }
1670
- )
1671
- );
1672
- }
1673
-
1674
- // src/components/dropZone/index.module.css
1675
- var dropZone_default = {
1676
- "sendbox__attachment-drop-zone": "dropZone_sendbox__attachment-drop-zone",
1677
- "sendbox__attachment-drop-zone--droppable": "dropZone_sendbox__attachment-drop-zone--droppable",
1678
- "sendbox__attachment-drop-zone-icon": "dropZone_sendbox__attachment-drop-zone-icon"
1679
- };
1680
-
1681
- // src/components/dropZone/index.tsx
1682
- var { useLocalizer } = import_botframework_webchat_component2.hooks;
1683
- var handleDragOver = (event) => {
1684
- event.preventDefault();
1685
- };
1686
- var isFilesTransferEvent = (event) => !!event.dataTransfer?.types?.some((type) => type.toLowerCase() === "files");
1687
- function isDescendantOf(target, ancestor) {
1688
- let current = target.parentNode;
1689
- while (current) {
1690
- if (current === ancestor) {
1691
- return true;
1692
- }
1693
- current = current.parentNode;
1694
- }
1695
- return false;
1696
- }
1697
- var DropZone = (props) => {
1698
- const [dropZoneState, setDropZoneState] = (0, import_react13.useState)(false);
1699
- const classNames = useStyles_default(dropZone_default);
1700
- const dropZoneRef = (0, import_react13.useRef)(null);
1701
- const localize = useLocalizer();
1702
- const onFilesAddedRef = useRefFrom(props.onFilesAdded);
1703
- (0, import_react13.useEffect)(() => {
1704
- let entranceCounter = 0;
1705
- const handleDragEnter = (event) => {
1706
- entranceCounter++;
1707
- if (isFilesTransferEvent(event)) {
1708
- setDropZoneState(
1709
- dropZoneRef.current && (event.target === dropZoneRef.current || event.target instanceof HTMLElement && isDescendantOf(event.target, dropZoneRef.current)) ? "droppable" : "visible"
1710
- );
1711
- }
1712
- };
1713
- const handleDragLeave = () => --entranceCounter <= 0 && setDropZoneState(false);
1714
- document.addEventListener("dragenter", handleDragEnter, false);
1715
- document.addEventListener("dragleave", handleDragLeave, false);
1716
- return () => {
1717
- document.removeEventListener("dragenter", handleDragEnter);
1718
- document.removeEventListener("dragleave", handleDragLeave);
1719
- };
1720
- }, [setDropZoneState]);
1721
- const handleDrop = (0, import_react13.useCallback)(
1722
- (event) => {
1723
- event.preventDefault();
1724
- setDropZoneState(false);
1725
- if (!isFilesTransferEvent(event.nativeEvent)) {
1726
- return;
1727
- }
1728
- onFilesAddedRef.current([...event.dataTransfer.files]);
1729
- },
1730
- [onFilesAddedRef, setDropZoneState]
1731
- );
1732
- return dropZoneState ? /* @__PURE__ */ import_react13.default.createElement(
1733
- "div",
1734
- {
1735
- className: (0, import_classnames3.default)(classNames["sendbox__attachment-drop-zone"], {
1736
- [classNames["sendbox__attachment-drop-zone--droppable"]]: dropZoneState === "droppable"
1737
- }),
1738
- "data-testid": testIds_default.sendBoxDropZone,
1739
- onDragOver: handleDragOver,
1740
- onDrop: handleDrop,
1741
- ref: dropZoneRef
1742
- },
1743
- /* @__PURE__ */ import_react13.default.createElement(AddDocumentIcon, { className: classNames["sendbox__attachment-drop-zone-icon"] }),
1744
- localize("TEXT_INPUT_DROP_ZONE")
1745
- ) : null;
1746
- };
1747
- DropZone.displayName = "DropZone";
1748
- var dropZone_default2 = (0, import_react13.memo)(DropZone);
1749
-
1750
- // src/components/DropZone.tsx
1751
- var DropZone_default = dropZone_default2;
1752
-
1753
- // src/components/suggestedActions/index.tsx
1754
- var import_botframework_webchat_component4 = __toESM(require_botframework_webchat_component());
1755
- var import_classnames5 = __toESM(require_classnames());
1756
- var import_react16 = __toESM(require_react());
1757
-
1758
- // src/components/suggestedActions/SuggestedAction.tsx
1759
- var import_botframework_webchat_component3 = __toESM(require_botframework_webchat_component());
1760
- var import_classnames4 = __toESM(require_classnames());
1761
- var import_react15 = __toESM(require_react());
1762
-
1763
- // src/components/suggestedActions/SuggestedAction.module.css
1764
- var SuggestedAction_default = {
1765
- "suggested-action": "SuggestedAction_suggested-action",
1766
- "suggested-action__image": "SuggestedAction_suggested-action__image"
1767
- };
1768
-
1769
- // src/components/suggestedActions/AccessibleButton.tsx
1770
- var import_react14 = __toESM(require_react());
1771
- var preventDefaultHandler = (event) => event.preventDefault();
1772
- var AccessibleButton = (0, import_react14.forwardRef)(
1773
- ({ "aria-hidden": ariaHidden, children, disabled, onClick, tabIndex, ...props }, forwardedRef) => {
1774
- const targetRef = (0, import_react14.useRef)(null);
1775
- const ref = forwardedRef || targetRef;
1776
- return /* @__PURE__ */ import_react14.default.createElement(
1777
- "button",
1778
- {
1779
- "aria-disabled": disabled ? "true" : "false",
1780
- "aria-hidden": ariaHidden,
1781
- onClick: disabled ? preventDefaultHandler : onClick,
1782
- ref,
1783
- tabIndex,
1784
- ...disabled && {
1785
- "aria-disabled": "true",
1786
- tabIndex: -1
1787
- },
1788
- ...props,
1789
- type: "button"
1790
- },
1791
- children
1792
- );
1793
- }
1794
- );
1795
- var AccessibleButton_default = (0, import_react14.memo)(AccessibleButton);
1796
-
1797
- // src/components/suggestedActions/SuggestedAction.tsx
1798
- var { useDisabled, useFocus, usePerformCardAction, useScrollToEnd, useStyleSet, useSuggestedActions } = import_botframework_webchat_component3.hooks;
1799
- function SuggestedAction({
1800
- buttonText,
1801
- className,
1802
- displayText,
1803
- image,
1804
- imageAlt,
1805
- text,
1806
- type,
1807
- value
1808
- }) {
1809
- const [_, setSuggestedActions] = useSuggestedActions();
1810
- const [{ suggestedAction: suggestedActionStyleSet }] = useStyleSet();
1811
- const [disabled] = useDisabled();
1812
- const focus = useFocus();
1813
- const focusRef = (0, import_react15.useRef)(null);
1814
- const performCardAction = usePerformCardAction();
1815
- const classNames = useStyles_default(SuggestedAction_default);
1816
- const scrollToEnd = useScrollToEnd();
1817
- const handleClick = (0, import_react15.useCallback)(
1818
- ({ target }) => {
1819
- (async function() {
1820
- await focus("sendBoxWithoutKeyboard");
1821
- performCardAction({ displayText, text, type, value }, { target });
1822
- type === "openUrl" && setSuggestedActions([]);
1823
- scrollToEnd();
1824
- })();
1825
- },
1826
- [displayText, focus, performCardAction, scrollToEnd, setSuggestedActions, text, type, value]
1827
- );
1828
- return /* @__PURE__ */ import_react15.default.createElement(
1829
- AccessibleButton_default,
1830
- {
1831
- className: (0, import_classnames4.default)(classNames["suggested-action"], suggestedActionStyleSet + "", (className || "") + ""),
1832
- disabled,
1833
- onClick: handleClick,
1834
- ref: focusRef,
1835
- type: "button"
1836
- },
1837
- image && /* @__PURE__ */ import_react15.default.createElement("img", { alt: imageAlt, className: classNames["suggested-action__image"], src: image }),
1838
- /* @__PURE__ */ import_react15.default.createElement("span", null, buttonText)
1839
- );
1840
- }
1841
- var SuggestedAction_default2 = (0, import_react15.memo)(SuggestedAction);
1842
-
1843
- // src/components/suggestedActions/private/computeSuggestedActionText.ts
1844
- function computeSuggestedActionText(cardAction) {
1845
- const { title } = cardAction;
1846
- const { type, value } = cardAction;
1847
- if (type === "messageBack") {
1848
- return title || cardAction.displayText;
1849
- } else if (title) {
1850
- return title;
1851
- } else if (typeof value === "string") {
1852
- return value;
1853
- }
1854
- return JSON.stringify(value);
1855
- }
1856
-
1857
- // src/components/suggestedActions/index.module.css
1858
- var suggestedActions_default = {
1859
- "suggested-actions": "suggestedActions_suggested-actions",
1860
- "suggested-actions--flow": "suggestedActions_suggested-actions--flow",
1861
- "suggested-actions--stacked": "suggestedActions_suggested-actions--stacked"
1862
- };
1863
-
1864
- // src/components/suggestedActions/index.tsx
1865
- var { useLocalizer: useLocalizer2, useStyleOptions, useStyleSet: useStyleSet2, useSuggestedActions: useSuggestedActions2 } = import_botframework_webchat_component4.hooks;
1866
- function SuggestedActionStackedOrFlowContainer(props) {
1867
- const [{ suggestedActionLayout }] = useStyleOptions();
1868
- const [{ suggestedActions: suggestedActionsStyleSet }] = useStyleSet2();
1869
- const classNames = useStyles_default(suggestedActions_default);
1870
- return /* @__PURE__ */ import_react16.default.createElement(
1871
- "div",
1872
- {
1873
- "aria-label": props["aria-label"],
1874
- "aria-live": "polite",
1875
- "aria-orientation": "vertical",
1876
- className: (0, import_classnames5.default)(
1877
- classNames["suggested-actions"],
1878
- suggestedActionsStyleSet + "",
1879
- {
1880
- [classNames["suggested-actions--flow"]]: suggestedActionLayout === "flow",
1881
- [classNames["suggested-actions--stacked"]]: suggestedActionLayout !== "flow"
1882
- },
1883
- props.className
1884
- ),
1885
- role: "toolbar"
1886
- },
1887
- !!props.children && !!import_react16.default.Children.count(props.children) && props.children
1888
- );
1889
- }
1890
- function SuggestedActions() {
1891
- const classNames = useStyles_default(suggestedActions_default);
1892
- const localize = useLocalizer2();
1893
- const [suggestedActions] = useSuggestedActions2();
1894
- const children = suggestedActions.map((cardAction, index) => {
1895
- const { displayText, image, imageAltText, text, type, value } = cardAction;
1896
- if (!suggestedActions?.length) {
1897
- return null;
1898
- }
1899
- return /* @__PURE__ */ import_react16.default.createElement(
1900
- SuggestedAction_default2,
1901
- {
1902
- buttonText: computeSuggestedActionText(cardAction),
1903
- displayText,
1904
- image,
1905
- imageAlt: image && (imageAltText || text),
1906
- itemIndex: index,
1907
- key: index,
1908
- text,
1909
- type,
1910
- value
1911
- }
1912
- );
1913
- });
1914
- return /* @__PURE__ */ import_react16.default.createElement(
1915
- SuggestedActionStackedOrFlowContainer,
1916
- {
1917
- "aria-label": localize("SUGGESTED_ACTIONS_LABEL_ALT"),
1918
- className: classNames["suggested-actions"]
1919
- },
1920
- children
1921
- );
1922
- }
1923
- var suggestedActions_default2 = (0, import_react16.memo)(SuggestedActions);
1924
-
1925
- // src/components/SuggestedActions.tsx
1926
- var SuggestedActions_default = suggestedActions_default2;
1927
-
1928
- // src/components/sendbox/AddAttachmentButton.tsx
1929
- var import_botframework_webchat_component5 = __toESM(require_botframework_webchat_component());
1930
- var import_react19 = __toESM(require_react());
1931
-
1932
- // src/icons/AttachmentIcon.tsx
1933
- var import_react17 = __toESM(require_react());
1934
- function AttachmentIcon(props) {
1935
- return /* @__PURE__ */ import_react17.default.createElement(
1936
- "svg",
1937
- {
1938
- "aria-hidden": "true",
1939
- className: props.className,
1940
- height: "1em",
1941
- viewBox: "0 0 20 20",
1942
- width: "1em",
1943
- xmlns: "http://www.w3.org/2000/svg"
1944
- },
1945
- /* @__PURE__ */ import_react17.default.createElement(
1946
- "path",
1947
- {
1948
- d: "m4.83 10.48 5.65-5.65a3 3 0 0 1 4.25 4.24L8 15.8a1.5 1.5 0 0 1-2.12-2.12l6-6.01a.5.5 0 1 0-.7-.71l-6 6.01a2.5 2.5 0 0 0 3.53 3.54l6.71-6.72a4 4 0 1 0-5.65-5.66L4.12 9.78a.5.5 0 0 0 .7.7Z",
1949
- fill: "currentColor"
1950
- }
1951
- )
1952
- );
1953
- }
1954
-
1955
- // src/components/sendbox/Toolbar.tsx
1956
- var import_classnames6 = __toESM(require_classnames());
1957
- var import_react18 = __toESM(require_react());
1958
-
1959
- // src/components/sendbox/Toolbar.module.css
1960
- var Toolbar_default = {
1961
- sendbox__toolbar: "Toolbar_sendbox__toolbar",
1962
- "sendbox__toolbar-button": "Toolbar_sendbox__toolbar-button",
1963
- "sendbox__toolbar-button--selected": "Toolbar_sendbox__toolbar-button--selected",
1964
- "sendbox__toolbar-separator": "Toolbar_sendbox__toolbar-separator"
1965
- };
1966
-
1967
- // src/components/sendbox/Toolbar.tsx
1968
- var preventDefaultHandler2 = (event) => event.preventDefault();
1969
- var ToolbarButton = (0, import_react18.memo)(
1970
- (props) => {
1971
- const classNames = useStyles_default(Toolbar_default);
1972
- return /* @__PURE__ */ import_react18.default.createElement(
1973
- "button",
1974
- {
1975
- "aria-label": props["aria-label"],
1976
- className: (0, import_classnames6.default)(classNames["sendbox__toolbar-button"], props.className, {
1977
- [classNames["sendbox__toolbar-button--selected"]]: props.selected
1978
- }),
1979
- "data-testid": props["data-testid"],
1980
- onClick: props.disabled ? preventDefaultHandler2 : props.onClick,
1981
- type: props.type === "submit" ? "submit" : "button",
1982
- ...props.disabled && {
1983
- "aria-disabled": "true",
1984
- tabIndex: -1
1985
- }
1986
- },
1987
- props.children
1988
- );
1989
- }
1990
- );
1991
- ToolbarButton.displayName = "ToolbarButton";
1992
- var Toolbar = (0, import_react18.memo)((props) => {
1993
- const classNames = useStyles_default(Toolbar_default);
1994
- return /* @__PURE__ */ import_react18.default.createElement("div", { className: (0, import_classnames6.default)(classNames["sendbox__toolbar"], props.className) }, props.children);
1995
- });
1996
- Toolbar.displayName = "Toolbar";
1997
- var ToolbarSeparator = (0, import_react18.memo)(
1998
- (props) => {
1999
- const classNames = useStyles_default(Toolbar_default);
2000
- return /* @__PURE__ */ import_react18.default.createElement(
2001
- "div",
2002
- {
2003
- "aria-orientation": "vertical",
2004
- className: (0, import_classnames6.default)(classNames["sendbox__toolbar-separator"], props.className),
2005
- role: "separator"
2006
- }
2007
- );
2008
- }
2009
- );
2010
- ToolbarSeparator.displayName = "ToolbarSeparator";
2011
-
2012
- // src/components/sendbox/AddAttachmentButton.module.css
2013
- var AddAttachmentButton_default = {
2014
- "sendbox__add-attachment": "AddAttachmentButton_sendbox__add-attachment",
2015
- "sendbox__add-attachment-input": "AddAttachmentButton_sendbox__add-attachment-input"
2016
- };
2017
-
2018
- // src/components/sendbox/AddAttachmentButton.tsx
2019
- var { useLocalizer: useLocalizer3, useStyleOptions: useStyleOptions2 } = import_botframework_webchat_component5.hooks;
2020
- function AddAttachmentButton(props) {
2021
- const inputRef = (0, import_react19.useRef)(null);
2022
- const classNames = useStyles_default(AddAttachmentButton_default);
2023
- const localize = useLocalizer3();
2024
- const [{ uploadAccept, uploadMultiple }] = useStyleOptions2();
2025
- const onFilesAddedRef = useRefFrom(props.onFilesAdded);
2026
- const handleClick = (0, import_react19.useCallback)(() => inputRef.current?.click(), [inputRef]);
2027
- const handleFileChange = (0, import_react19.useCallback)(
2028
- ({ target: { files } }) => {
2029
- if (files) {
2030
- onFilesAddedRef.current?.([...files]);
2031
- if (inputRef.current) {
2032
- inputRef.current.value = "";
2033
- }
2034
- }
2035
- },
2036
- [inputRef, onFilesAddedRef]
2037
- );
2038
- return /* @__PURE__ */ import_react19.default.createElement("div", { className: classNames["sendbox__add-attachment"] }, /* @__PURE__ */ import_react19.default.createElement(
2039
- "input",
2040
- {
2041
- accept: uploadAccept,
2042
- "aria-disabled": props.disabled,
2043
- "aria-hidden": "true",
2044
- className: classNames["sendbox__add-attachment-input"],
2045
- multiple: uploadMultiple,
2046
- onInput: props.disabled ? void 0 : handleFileChange,
2047
- readOnly: props.disabled,
2048
- ref: inputRef,
2049
- role: "button",
2050
- tabIndex: -1,
2051
- type: "file"
2052
- }
2053
- ), /* @__PURE__ */ import_react19.default.createElement(
2054
- ToolbarButton,
2055
- {
2056
- "aria-label": localize("TEXT_INPUT_UPLOAD_BUTTON_ALT"),
2057
- "data-testid": testIds_default.sendBoxUploadButton,
2058
- onClick: handleClick
2059
- },
2060
- /* @__PURE__ */ import_react19.default.createElement(AttachmentIcon, null)
2061
- ));
2062
- }
2063
- var AddAttachmentButton_default2 = (0, import_react19.memo)(AddAttachmentButton);
2064
-
2065
- // src/components/sendbox/Attachments.tsx
2066
- var import_botframework_webchat_component6 = __toESM(require_botframework_webchat_component());
2067
- var import_react20 = __toESM(require_react());
2068
- var import_classnames7 = __toESM(require_classnames());
2069
-
2070
- // src/components/sendbox/Attachments.module.css
2071
- var Attachments_default = {
2072
- sendbox__attachment: "Attachments_sendbox__attachment"
2073
- };
2074
-
2075
- // src/components/sendbox/Attachments.tsx
2076
- var { useLocalizer: useLocalizer4 } = import_botframework_webchat_component6.hooks;
2077
- var attachmentsPluralStringIds = {
2078
- one: "TEXT_INPUT_ATTACHMENTS_ONE",
2079
- two: "TEXT_INPUT_ATTACHMENTS_TWO",
2080
- few: "TEXT_INPUT_ATTACHMENTS_FEW",
2081
- many: "TEXT_INPUT_ATTACHMENTS_MANY",
2082
- other: "TEXT_INPUT_ATTACHMENTS_OTHER"
2083
- };
2084
- function Attachments({
2085
- attachments,
2086
- className
2087
- }) {
2088
- const classNames = useStyles_default(Attachments_default);
2089
- const localizeWithPlural = useLocalizer4({ plural: true });
2090
- return attachments.length ? /* @__PURE__ */ import_react20.default.createElement("div", { className: (0, import_classnames7.default)(classNames["sendbox__attachment"], className) }, localizeWithPlural(attachmentsPluralStringIds, attachments.length)) : null;
2091
- }
2092
- var Attachments_default2 = (0, import_react20.memo)(Attachments);
2093
-
2094
- // src/components/sendbox/ErrorMessage.tsx
2095
- var import_react21 = __toESM(require_react());
2096
-
2097
- // src/components/sendbox/ErrorMessage.module.css
2098
- var ErrorMessage_default = {
2099
- "sendbox__error-message": "ErrorMessage_sendbox__error-message"
2100
- };
2101
-
2102
- // src/components/sendbox/ErrorMessage.tsx
2103
- function ErrorMessage(props) {
2104
- const classNames = useStyles_default(ErrorMessage_default);
2105
- return (
2106
- // eslint-disable-next-line react/forbid-dom-props
2107
- /* @__PURE__ */ import_react21.default.createElement("span", { className: classNames["sendbox__error-message"], id: props.id, role: "alert" }, props.error)
2108
- );
2109
- }
2110
- var ErrorMessage_default2 = (0, import_react21.memo)(ErrorMessage);
2111
-
2112
- // src/components/sendbox/TelephoneKeypadToolbarButton.tsx
2113
- var import_react23 = __toESM(require_react());
2114
- var import_botframework_webchat_component7 = __toESM(require_botframework_webchat_component());
2115
-
2116
- // src/icons/TelephoneKeypad.tsx
2117
- var import_react22 = __toESM(require_react());
2118
- function TelephoneKeypadIcon(props) {
2119
- return /* @__PURE__ */ import_react22.default.createElement(
2120
- "svg",
2121
- {
2122
- "aria-hidden": "true",
2123
- className: props.className,
2124
- height: "1em",
2125
- viewBox: "0 0 20 20",
2126
- width: "1em",
2127
- xmlns: "http://www.w3.org/2000/svg"
2128
- },
2129
- /* @__PURE__ */ import_react22.default.createElement(
2130
- "path",
2131
- {
2132
- d: "M6 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Zm0 4a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM7.25 12a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM10 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM11.25 8a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM10 13.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM11.25 16a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM14 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM15.25 8a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM14 13.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z",
2133
- fill: "currentColor"
2134
- }
2135
- )
2136
- );
2137
- }
2138
-
2139
- // src/components/sendbox/TelephoneKeypadToolbarButton.tsx
2140
- var { useLocalizer: useLocalizer5 } = import_botframework_webchat_component7.hooks;
2141
- var TelephoneKeypadToolbarButton = (0, import_react23.memo)(() => {
2142
- const [telephoneKeypadShown, setTelephoneKeypadShown] = useShown();
2143
- const localize = useLocalizer5();
2144
- const handleClick = (0, import_react23.useCallback)(() => setTelephoneKeypadShown((shown) => !shown), [setTelephoneKeypadShown]);
2145
- return /* @__PURE__ */ import_react23.default.createElement(
2146
- ToolbarButton,
2147
- {
2148
- "aria-label": localize("TEXT_INPUT_TELEPHONE_KEYPAD_BUTTON_ALT"),
2149
- "data-testid": testIds_default.sendBoxTelephoneKeypadToolbarButton,
2150
- onClick: handleClick,
2151
- selected: telephoneKeypadShown
2152
- },
2153
- /* @__PURE__ */ import_react23.default.createElement(TelephoneKeypadIcon, null)
2154
- );
2155
- });
2156
- TelephoneKeypadToolbarButton.displayName = "SendBox.TelephoneKeypadToolbarButton";
2157
- var TelephoneKeypadToolbarButton_default = TelephoneKeypadToolbarButton;
2158
-
2159
- // src/components/sendbox/TextArea.tsx
2160
- var import_classnames8 = __toESM(require_classnames());
2161
- var import_react24 = __toESM(require_react());
2162
-
2163
- // src/components/sendbox/TextArea.module.css
2164
- var TextArea_default = {
2165
- "sendbox__text-area": "TextArea_sendbox__text-area",
2166
- "sendbox__text-area--hidden": "TextArea_sendbox__text-area--hidden",
2167
- "sendbox__text-area-shared": "TextArea_sendbox__text-area-shared",
2168
- "sendbox__text-area-doppelganger": "TextArea_sendbox__text-area-doppelganger",
2169
- "sendbox__text-area-input": "TextArea_sendbox__text-area-input",
2170
- "sendbox__text-area-input--scroll": "TextArea_sendbox__text-area-input--scroll"
2171
- };
2172
-
2173
- // src/components/sendbox/TextArea.tsx
2174
- var TextArea = (0, import_react24.forwardRef)((props, ref) => {
2175
- const classNames = useStyles_default(TextArea_default);
2176
- const handleKeyDown = (0, import_react24.useCallback)((event) => {
2177
- if (!event.shiftKey && event.key === "Enter") {
2178
- event.preventDefault();
2179
- if ("form" in event.target && event.target.form instanceof HTMLFormElement) {
2180
- event.target?.form?.requestSubmit();
2181
- }
2182
- }
2183
- }, []);
2184
- return /* @__PURE__ */ import_react24.default.createElement(
2185
- "div",
2186
- {
2187
- className: (0, import_classnames8.default)(
2188
- classNames["sendbox__text-area"],
2189
- {
2190
- [classNames["sendbox__text-area--hidden"]]: props.hidden
2191
- },
2192
- props.className
2193
- ),
2194
- role: props.hidden ? "hidden" : void 0
2195
- },
2196
- /* @__PURE__ */ import_react24.default.createElement(
2197
- "div",
2198
- {
2199
- className: (0, import_classnames8.default)(
2200
- classNames["sendbox__text-area-doppelganger"],
2201
- classNames["sendbox__text-area-shared"],
2202
- classNames["sendbox__text-area-input--scroll"]
2203
- )
2204
- },
2205
- props.value || props.placeholder,
2206
- " "
2207
- ),
2208
- /* @__PURE__ */ import_react24.default.createElement(
2209
- "textarea",
2210
- {
2211
- "aria-label": props["aria-label"],
2212
- className: (0, import_classnames8.default)(
2213
- classNames["sendbox__text-area-input"],
2214
- classNames["sendbox__text-area-shared"],
2215
- classNames["sendbox__text-area-input--scroll"]
2216
- ),
2217
- "data-testid": props["data-testid"],
2218
- onInput: props.onInput,
2219
- onKeyDown: handleKeyDown,
2220
- placeholder: props.placeholder,
2221
- ref,
2222
- rows: props.startRows ?? 1,
2223
- tabIndex: props.hidden ? -1 : void 0,
2224
- value: props.value
2225
- }
2226
- )
2227
- );
2228
- });
2229
- TextArea.displayName = "TextArea";
2230
- var TextArea_default2 = TextArea;
2231
-
2232
- // src/components/sendbox/private/useSubmitError.ts
2233
- var import_botframework_webchat_component8 = __toESM(require_botframework_webchat_component());
2234
- var import_react25 = __toESM(require_react());
2235
- var { useConnectivityStatus, useLocalizer: useLocalizer6 } = import_botframework_webchat_component8.hooks;
2236
- var useSubmitError = ({
2237
- attachments,
2238
- message
2239
- }) => {
2240
- const [connectivityStatus] = useConnectivityStatus();
2241
- const localize = useLocalizer6();
2242
- const submitErrorRef = useRefFrom(
2243
- connectivityStatus !== "connected" && connectivityStatus !== "reconnected" ? "offline" : !message && !attachments.length ? "empty" : void 0
2244
- );
2245
- const errorMessageStringMap = (0, import_react25.useMemo)(
2246
- () => Object.freeze(
2247
- (/* @__PURE__ */ new Map()).set("empty", localize("SEND_BOX_IS_EMPTY_TOOLTIP_ALT")).set("offline", localize("CONNECTIVITY_STATUS_ALT_FATAL"))
2248
- ),
2249
- [localize]
2250
- );
2251
- return (0, import_react25.useMemo)(
2252
- () => Object.freeze([submitErrorRef, submitErrorRef.current && errorMessageStringMap.get(submitErrorRef.current)]),
2253
- [errorMessageStringMap, submitErrorRef]
2254
- );
2255
- };
2256
- var useSubmitError_default = useSubmitError;
2257
-
2258
- // src/components/sendbox/private/useUniqueId.ts
2259
- var import_react26 = __toESM(require_react());
2260
- function useUniqueId(prefix) {
2261
- const id = (0, import_react26.useMemo)(() => Math.random().toString(36).substr(2, 5), []);
2262
- prefix = prefix ? `${prefix}--` : "";
2263
- return `${prefix}${id}`;
2264
- }
2265
-
2266
- // src/components/sendbox/index.module.css
2267
- var sendbox_default = {
2268
- sendbox: "sendbox_sendbox",
2269
- sendbox__sendbox: "sendbox_sendbox__sendbox",
2270
- "sendbox__attachment--in-grid": "sendbox_sendbox__attachment--in-grid",
2271
- "sendbox__text-area--in-grid": "sendbox_sendbox__text-area--in-grid",
2272
- "sendbox__sendbox-controls--in-grid": "sendbox_sendbox__sendbox-controls--in-grid",
2273
- "sendbox__telephone-keypad--in-grid": "sendbox_sendbox__telephone-keypad--in-grid",
2274
- "sendbox__sendbox-text": "sendbox_sendbox__sendbox-text",
2275
- "sendbox__sendbox-controls": "sendbox_sendbox__sendbox-controls",
2276
- "sendbox__text-counter": "sendbox_sendbox__text-counter",
2277
- "sendbox__text-counter--error": "sendbox_sendbox__text-counter--error"
2278
- };
2279
-
2280
- // src/components/sendbox/index.tsx
2281
- var { useStyleOptions: useStyleOptions3, useMakeThumbnail, useLocalizer: useLocalizer7, useSendBoxAttachments, useSendMessage } = import_botframework_webchat_component9.hooks;
2282
- function SendBox(props) {
2283
- const inputRef = (0, import_react27.useRef)(null);
2284
- const [message, setMessage] = (0, import_react27.useState)("");
2285
- const [attachments, setAttachments] = useSendBoxAttachments();
2286
- const [{ hideTelephoneKeypadButton, hideUploadButton, maxMessageLength }] = useStyleOptions3();
2287
- const isMessageLengthExceeded = !!maxMessageLength && message.length > maxMessageLength;
2288
- const classNames = useStyles_default(sendbox_default);
2289
- const localize = useLocalizer7();
2290
- const sendMessage = useSendMessage();
2291
- const makeThumbnail = useMakeThumbnail();
2292
- const errorMessageId = useUniqueId("sendbox__error-message-id");
2293
- const [errorRef, errorMessage] = useSubmitError_default({ message, attachments });
2294
- const [telephoneKeypadShown] = useShown();
2295
- const attachmentsRef = useRefFrom(attachments);
2296
- const messageRef = useRefFrom(message);
2297
- const handleSendBoxClick = (0, import_react27.useCallback)(
2298
- (event) => {
2299
- if ("tabIndex" in event.target && typeof event.target.tabIndex === "number" && event.target.tabIndex >= 0) {
2300
- return;
2301
- }
2302
- inputRef.current?.focus();
2303
- },
2304
- [inputRef]
2305
- );
2306
- const handleMessageChange = (0, import_react27.useCallback)(
2307
- (event) => setMessage(event.currentTarget.value),
2308
- [setMessage]
2309
- );
2310
- const handleAddFiles = (0, import_react27.useCallback)(
2311
- async (inputFiles) => {
2312
- const newAttachments = Object.freeze(
2313
- await Promise.all(
2314
- inputFiles.map(
2315
- (file) => makeThumbnail(file).then(
2316
- (thumbnailURL) => Object.freeze({
2317
- blob: file,
2318
- ...thumbnailURL && { thumbnailURL }
2319
- })
2320
- )
2321
- )
2322
- )
2323
- );
2324
- setAttachments(newAttachments);
2325
- },
2326
- [makeThumbnail, setAttachments]
2327
- );
2328
- const handleFormSubmit = (0, import_react27.useCallback)(
2329
- (event) => {
2330
- event.preventDefault();
2331
- if (errorRef.current !== "empty" && !isMessageLengthExceeded) {
2332
- sendMessage(messageRef.current, void 0, { attachments: attachmentsRef.current });
2333
- setMessage("");
2334
- setAttachments([]);
2335
- }
2336
- inputRef.current?.focus();
2337
- },
2338
- [attachmentsRef, messageRef, sendMessage, setAttachments, setMessage, isMessageLengthExceeded, errorRef, inputRef]
2339
- );
2340
- const handleTelephoneKeypadButtonClick = (0, import_react27.useCallback)(
2341
- // TODO: We need more official way of sending DTMF.
2342
- (dtmf) => sendMessage(`/DTMF ${dtmf}`),
2343
- [sendMessage]
2344
- );
2345
- const aria = {
2346
- "aria-invalid": "false",
2347
- ...errorMessage && {
2348
- "aria-invalid": "true",
2349
- "aria-errormessage": errorMessageId
2350
- }
2351
- };
2352
- return /* @__PURE__ */ import_react27.default.createElement("form", { ...aria, className: (0, import_classnames9.default)(classNames["sendbox"], props.className), onSubmit: handleFormSubmit }, /* @__PURE__ */ import_react27.default.createElement(SuggestedActions_default, null), /* @__PURE__ */ import_react27.default.createElement("div", { className: (0, import_classnames9.default)(classNames["sendbox__sendbox"]), onClickCapture: handleSendBoxClick }, /* @__PURE__ */ import_react27.default.createElement(
2353
- TextArea_default2,
2354
- {
2355
- "aria-label": isMessageLengthExceeded ? localize("TEXT_INPUT_LENGTH_EXCEEDED_ALT") : localize("TEXT_INPUT_ALT"),
2356
- className: (0, import_classnames9.default)(classNames["sendbox__sendbox-text"], classNames["sendbox__text-area--in-grid"]),
2357
- "data-testid": testIds_default.sendBoxTextBox,
2358
- hidden: telephoneKeypadShown,
2359
- onInput: handleMessageChange,
2360
- placeholder: props.placeholder ?? localize("TEXT_INPUT_PLACEHOLDER"),
2361
- ref: inputRef,
2362
- value: message
2363
- }
2364
- ), /* @__PURE__ */ import_react27.default.createElement(
2365
- Surrogate_default,
2366
- {
2367
- autoFocus: true,
2368
- className: classNames["sendbox__telephone-keypad--in-grid"],
2369
- isHorizontal: false,
2370
- onButtonClick: handleTelephoneKeypadButtonClick
2371
- }
2372
- ), /* @__PURE__ */ import_react27.default.createElement(Attachments_default2, { attachments, className: classNames["sendbox__attachment--in-grid"] }), /* @__PURE__ */ import_react27.default.createElement("div", { className: (0, import_classnames9.default)(classNames["sendbox__sendbox-controls"], classNames["sendbox__sendbox-controls--in-grid"]) }, !telephoneKeypadShown && maxMessageLength && /* @__PURE__ */ import_react27.default.createElement(
2373
- "div",
2374
- {
2375
- className: (0, import_classnames9.default)(classNames["sendbox__text-counter"], {
2376
- [classNames["sendbox__text-counter--error"]]: isMessageLengthExceeded
2377
- })
2378
- },
2379
- `${message.length}/${maxMessageLength}`
2380
- ), /* @__PURE__ */ import_react27.default.createElement(Toolbar, null, !hideTelephoneKeypadButton && /* @__PURE__ */ import_react27.default.createElement(TelephoneKeypadToolbarButton_default, null), !hideUploadButton && /* @__PURE__ */ import_react27.default.createElement(AddAttachmentButton_default2, { onFilesAdded: handleAddFiles }), /* @__PURE__ */ import_react27.default.createElement(ToolbarSeparator, null), /* @__PURE__ */ import_react27.default.createElement(
2381
- ToolbarButton,
2382
- {
2383
- "aria-label": localize("TEXT_INPUT_SEND_BUTTON_ALT"),
2384
- "data-testid": testIds_default.sendBoxSendButton,
2385
- disabled: isMessageLengthExceeded || telephoneKeypadShown,
2386
- type: "submit"
2387
- },
2388
- /* @__PURE__ */ import_react27.default.createElement(SendIcon, null)
2389
- ))), /* @__PURE__ */ import_react27.default.createElement(DropZone_default, { onFilesAdded: handleAddFiles }), /* @__PURE__ */ import_react27.default.createElement(ErrorMessage_default2, { error: errorMessage, id: errorMessageId })));
2390
- }
2391
- var sendbox_default2 = (0, import_react27.memo)(SendBox);
2392
-
2393
- // src/components/SendBox.tsx
2394
- var SendBox_default = sendbox_default2;
2395
-
2396
- // src/private/FluentThemeProvider.tsx
2397
- var { ThemeProvider } = import_botframework_webchat_component10.Components;
2398
- var sendBoxMiddleware = [() => () => () => SendBox_default];
2399
- var FluentThemeProvider = ({ children }) => /* @__PURE__ */ import_react28.default.createElement(WebchatTheme, null, /* @__PURE__ */ import_react28.default.createElement(Provider_default, null, /* @__PURE__ */ import_react28.default.createElement(ThemeProvider, { sendBoxMiddleware }, children)));
2400
- var FluentThemeProvider_default = (0, import_react28.memo)(FluentThemeProvider);
2401
-
2402
- // src/index.ts
2403
- injectMeta("botframework-webchat-fluent-theme:version", "4.17.0-main.20240425.edca85d");
2404
- injectStyles();
2405
-
2406
- // src/bundle.ts
2407
- globalThis.WebChat = {
2408
- ...globalThis.WebChat,
2409
- FluentThemeProvider: FluentThemeProvider_default,
2410
- testIds: {
2411
- ...globalThis.WebChat?.testIds,
2412
- ...testIds_default
2413
- }
2414
- };
2415
- })();
2416
- /*! Bundled license information:
2417
-
2418
- classnames/index.js:
2419
- (*!
2420
- Copyright (c) 2018 Jed Watson.
2421
- Licensed under the MIT License (MIT), see
2422
- http://jedwatson.github.io/classnames
2423
- *)
2424
- */
1
+ "use strict";(()=>{var Ba=Object.create;var $r=Object.defineProperty;var Na=Object.getOwnPropertyDescriptor;var Ea=Object.getOwnPropertyNames;var Fa=Object.getPrototypeOf,Ca=Object.prototype.hasOwnProperty;var a=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var Oa=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Ea(r))!Ca.call(e,n)&&n!==t&&$r(e,n,{get:()=>r[n],enumerable:!(o=Na(r,n))||o.enumerable});return e};var l=(e,r,t)=>(t=e!=null?Ba(Fa(e)):{},Oa(r||!e||!e.__esModule?$r(t,"default",{value:e,enumerable:!0}):t,e));var O=a((qd,Vr)=>{Vr.exports={Components:globalThis.WebChat.Components,hooks:globalThis.WebChat.hooks}});var f=a((Pd,Gr)=>{Gr.exports=globalThis.React});var q=a((Dd,ye)=>{(function(){"use strict";var e={}.hasOwnProperty;function r(){for(var n="",i=0;i<arguments.length;i++){var d=arguments[i];d&&(n=o(n,t(d)))}return n}function t(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var d in n)e.call(n,d)&&n[d]&&(i=o(i,d));return i}function o(n,i){return i?n?n+" "+i:n+i:n}typeof ye<"u"&&ye.exports?(r.default=r,ye.exports=r):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return r}):window.classNames=r})()});var R=a((Ke,Jr)=>{"use strict";var ne=function(e){return e&&e.Math===Math&&e};Jr.exports=ne(typeof globalThis=="object"&&globalThis)||ne(typeof window=="object"&&window)||ne(typeof self=="object"&&self)||ne(typeof global=="object"&&global)||ne(typeof Ke=="object"&&Ke)||function(){return this}()||Function("return this")()});var H=a((Hd,Qr)=>{"use strict";Qr.exports=function(e){try{return!!e()}catch{return!0}}});var ae=a((jd,et)=>{"use strict";var Ma=H();et.exports=!Ma(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var at=a((Kd,nt)=>{"use strict";var qa=ae(),ot=Function.prototype,rt=ot.apply,tt=ot.call;nt.exports=typeof Reflect=="object"&&Reflect.apply||(qa?tt.bind(rt):function(){return tt.apply(rt,arguments)})});var j=a((zd,lt)=>{"use strict";var it=ae(),st=Function.prototype,ze=st.call,Pa=it&&st.bind.bind(ze,ze);lt.exports=it?Pa:function(e){return function(){return ze.apply(e,arguments)}}});var Ue=a((Ud,ct)=>{"use strict";var dt=j(),Aa=dt({}.toString),La=dt("".slice);ct.exports=function(e){return La(Aa(e),8,-1)}});var We=a((Wd,ut)=>{"use strict";var Ra=Ue(),Da=j();ut.exports=function(e){if(Ra(e)==="Function")return Da(e)}});var K=a((Zd,pt)=>{"use strict";var Ze=typeof document=="object"&&document.all;pt.exports=typeof Ze>"u"&&Ze!==void 0?function(e){return typeof e=="function"||e===Ze}:function(e){return typeof e=="function"}});var z=a(($d,mt)=>{"use strict";var Ha=H();mt.exports=!Ha(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var we=a((Vd,ft)=>{"use strict";var ja=ae(),xe=Function.prototype.call;ft.exports=ja?xe.bind(xe):function(){return xe.apply(xe,arguments)}});var gt=a(vt=>{"use strict";var bt={}.propertyIsEnumerable,ht=Object.getOwnPropertyDescriptor,Ka=ht&&!bt.call({1:2},1);vt.f=Ka?function(r){var t=ht(this,r);return!!t&&t.enumerable}:bt});var $e=a((Xd,yt)=>{"use strict";yt.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var wt=a((Yd,xt)=>{"use strict";var za=j(),Ua=H(),Wa=Ue(),Ve=Object,Za=za("".split);xt.exports=Ua(function(){return!Ve("z").propertyIsEnumerable(0)})?function(e){return Wa(e)==="String"?Za(e,""):Ve(e)}:Ve});var Ge=a((Jd,Tt)=>{"use strict";Tt.exports=function(e){return e==null}});var Xe=a((Qd,kt)=>{"use strict";var $a=Ge(),Va=TypeError;kt.exports=function(e){if($a(e))throw new Va("Can't call method on "+e);return e}});var ie=a((ec,St)=>{"use strict";var Ga=wt(),Xa=Xe();St.exports=function(e){return Ga(Xa(e))}});var se=a((rc,_t)=>{"use strict";var Ya=K();_t.exports=function(e){return typeof e=="object"?e!==null:Ya(e)}});var Te=a((tc,Bt)=>{"use strict";Bt.exports={}});var Qe=a((oc,Et)=>{"use strict";var Ye=Te(),Je=R(),Ja=K(),Nt=function(e){return Ja(e)?e:void 0};Et.exports=function(e,r){return arguments.length<2?Nt(Ye[e])||Nt(Je[e]):Ye[e]&&Ye[e][r]||Je[e]&&Je[e][r]}});var Ct=a((nc,Ft)=>{"use strict";var Qa=j();Ft.exports=Qa({}.isPrototypeOf)});var It=a((ac,Ot)=>{"use strict";Ot.exports=typeof navigator<"u"&&String(navigator.userAgent)||""});var Dt=a((ic,Rt)=>{"use strict";var Lt=R(),er=It(),Mt=Lt.process,qt=Lt.Deno,Pt=Mt&&Mt.versions||qt&&qt.version,At=Pt&&Pt.v8,I,ke;At&&(I=At.split("."),ke=I[0]>0&&I[0]<4?1:+(I[0]+I[1]));!ke&&er&&(I=er.match(/Edge\/(\d+)/),(!I||I[1]>=74)&&(I=er.match(/Chrome\/(\d+)/),I&&(ke=+I[1])));Rt.exports=ke});var rr=a((sc,jt)=>{"use strict";var Ht=Dt(),ei=H(),ri=R(),ti=ri.String;jt.exports=!!Object.getOwnPropertySymbols&&!ei(function(){var e=Symbol("symbol detection");return!ti(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ht&&Ht<41})});var tr=a((lc,Kt)=>{"use strict";var oi=rr();Kt.exports=oi&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var or=a((dc,zt)=>{"use strict";var ni=Qe(),ai=K(),ii=Ct(),si=tr(),li=Object;zt.exports=si?function(e){return typeof e=="symbol"}:function(e){var r=ni("Symbol");return ai(r)&&ii(r.prototype,li(e))}});var Wt=a((cc,Ut)=>{"use strict";var di=String;Ut.exports=function(e){try{return di(e)}catch{return"Object"}}});var nr=a((uc,Zt)=>{"use strict";var ci=K(),ui=Wt(),pi=TypeError;Zt.exports=function(e){if(ci(e))return e;throw new pi(ui(e)+" is not a function")}});var Vt=a((pc,$t)=>{"use strict";var mi=nr(),fi=Ge();$t.exports=function(e,r){var t=e[r];return fi(t)?void 0:mi(t)}});var Xt=a((mc,Gt)=>{"use strict";var ar=we(),ir=K(),sr=se(),bi=TypeError;Gt.exports=function(e,r){var t,o;if(r==="string"&&ir(t=e.toString)&&!sr(o=ar(t,e))||ir(t=e.valueOf)&&!sr(o=ar(t,e))||r!=="string"&&ir(t=e.toString)&&!sr(o=ar(t,e)))return o;throw new bi("Can't convert object to primitive value")}});var Jt=a((fc,Yt)=>{"use strict";Yt.exports=!0});var ro=a((bc,eo)=>{"use strict";var Qt=R(),hi=Object.defineProperty;eo.exports=function(e,r){try{hi(Qt,e,{value:r,configurable:!0,writable:!0})}catch{Qt[e]=r}return r}});var lr=a((hc,no)=>{"use strict";var vi=Jt(),gi=R(),yi=ro(),to="__core-js_shared__",oo=no.exports=gi[to]||yi(to,{});(oo.versions||(oo.versions=[])).push({version:"3.36.1",mode:vi?"pure":"global",copyright:"\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"})});var dr=a((vc,io)=>{"use strict";var ao=lr();io.exports=function(e,r){return ao[e]||(ao[e]=r||{})}});var lo=a((gc,so)=>{"use strict";var xi=Xe(),wi=Object;so.exports=function(e){return wi(xi(e))}});var le=a((yc,co)=>{"use strict";var Ti=j(),ki=lo(),Si=Ti({}.hasOwnProperty);co.exports=Object.hasOwn||function(r,t){return Si(ki(r),t)}});var cr=a((xc,uo)=>{"use strict";var _i=j(),Bi=0,Ni=Math.random(),Ei=_i(1 .toString);uo.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Ei(++Bi+Ni,36)}});var fo=a((wc,mo)=>{"use strict";var Fi=R(),Ci=dr(),po=le(),Oi=cr(),Ii=rr(),Mi=tr(),J=Fi.Symbol,ur=Ci("wks"),qi=Mi?J.for||J:J&&J.withoutSetter||Oi;mo.exports=function(e){return po(ur,e)||(ur[e]=Ii&&po(J,e)?J[e]:qi("Symbol."+e)),ur[e]}});var go=a((Tc,vo)=>{"use strict";var Pi=we(),bo=se(),ho=or(),Ai=Vt(),Li=Xt(),Ri=fo(),Di=TypeError,Hi=Ri("toPrimitive");vo.exports=function(e,r){if(!bo(e)||ho(e))return e;var t=Ai(e,Hi),o;if(t){if(r===void 0&&(r="default"),o=Pi(t,e,r),!bo(o)||ho(o))return o;throw new Di("Can't convert object to primitive value")}return r===void 0&&(r="number"),Li(e,r)}});var pr=a((kc,yo)=>{"use strict";var ji=go(),Ki=or();yo.exports=function(e){var r=ji(e,"string");return Ki(r)?r:r+""}});var fr=a((Sc,wo)=>{"use strict";var zi=R(),xo=se(),mr=zi.document,Ui=xo(mr)&&xo(mr.createElement);wo.exports=function(e){return Ui?mr.createElement(e):{}}});var br=a((_c,To)=>{"use strict";var Wi=z(),Zi=H(),$i=fr();To.exports=!Wi&&!Zi(function(){return Object.defineProperty($i("div"),"a",{get:function(){return 7}}).a!==7})});var _o=a(So=>{"use strict";var Vi=z(),Gi=we(),Xi=gt(),Yi=$e(),Ji=ie(),Qi=pr(),es=le(),rs=br(),ko=Object.getOwnPropertyDescriptor;So.f=Vi?ko:function(r,t){if(r=Ji(r),t=Qi(t),rs)try{return ko(r,t)}catch{}if(es(r,t))return Yi(!Gi(Xi.f,r,t),r[t])}});var No=a((Nc,Bo)=>{"use strict";var ts=H(),os=K(),ns=/#|\.prototype\./,de=function(e,r){var t=is[as(e)];return t===ls?!0:t===ss?!1:os(r)?ts(r):!!r},as=de.normalize=function(e){return String(e).replace(ns,".").toLowerCase()},is=de.data={},ss=de.NATIVE="N",ls=de.POLYFILL="P";Bo.exports=de});var Co=a((Ec,Fo)=>{"use strict";var Eo=We(),ds=nr(),cs=ae(),us=Eo(Eo.bind);Fo.exports=function(e,r){return ds(e),r===void 0?e:cs?us(e,r):function(){return e.apply(r,arguments)}}});var hr=a((Fc,Oo)=>{"use strict";var ps=z(),ms=H();Oo.exports=ps&&ms(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Se=a((Cc,Io)=>{"use strict";var fs=se(),bs=String,hs=TypeError;Io.exports=function(e){if(fs(e))return e;throw new hs(bs(e)+" is not an object")}});var wr=a(qo=>{"use strict";var vs=z(),gs=br(),ys=hr(),_e=Se(),Mo=pr(),xs=TypeError,vr=Object.defineProperty,ws=Object.getOwnPropertyDescriptor,gr="enumerable",yr="configurable",xr="writable";qo.f=vs?ys?function(r,t,o){if(_e(r),t=Mo(t),_e(o),typeof r=="function"&&t==="prototype"&&"value"in o&&xr in o&&!o[xr]){var n=ws(r,t);n&&n[xr]&&(r[t]=o.value,o={configurable:yr in o?o[yr]:n[yr],enumerable:gr in o?o[gr]:n[gr],writable:!1})}return vr(r,t,o)}:vr:function(r,t,o){if(_e(r),t=Mo(t),_e(o),gs)try{return vr(r,t,o)}catch{}if("get"in o||"set"in o)throw new xs("Accessors not supported");return"value"in o&&(r[t]=o.value),r}});var Ao=a((Ic,Po)=>{"use strict";var Ts=z(),ks=wr(),Ss=$e();Po.exports=Ts?function(e,r,t){return ks.f(e,r,Ss(1,t))}:function(e,r,t){return e[r]=t,e}});var Do=a((Mc,Ro)=>{"use strict";var ce=R(),_s=at(),Bs=We(),Ns=K(),Es=_o().f,Fs=No(),Q=Te(),Cs=Co(),ee=Ao(),Lo=le();lr();var Os=function(e){var r=function(t,o,n){if(this instanceof r){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,o)}return new e(t,o,n)}return _s(e,this,arguments)};return r.prototype=e.prototype,r};Ro.exports=function(e,r){var t=e.target,o=e.global,n=e.stat,i=e.proto,d=o?ce:n?ce[t]:ce[t]&&ce[t].prototype,s=o?Q:Q[t]||ee(Q,t,{})[t],h=s.prototype,x,c,u,m,g,B,_,T,S;for(m in r)x=Fs(o?m:t+(n?".":"#")+m,e.forced),c=!x&&d&&Lo(d,m),B=s[m],c&&(e.dontCallGetSet?(S=Es(d,m),_=S&&S.value):_=d[m]),g=c&&_?_:r[m],!(!x&&!i&&typeof B==typeof g)&&(e.bind&&c?T=Cs(g,ce):e.wrap&&c?T=Os(g):i&&Ns(g)?T=Bs(g):T=g,(e.sham||g&&g.sham||B&&B.sham)&&ee(T,"sham",!0),ee(s,m,T),i&&(u=t+"Prototype",Lo(Q,u)||ee(Q,u,{}),ee(Q[u],m,g),e.real&&h&&(x||!h[m])&&ee(h,m,g)))}});var jo=a((qc,Ho)=>{"use strict";var Is=Math.ceil,Ms=Math.floor;Ho.exports=Math.trunc||function(r){var t=+r;return(t>0?Ms:Is)(t)}});var Tr=a((Pc,Ko)=>{"use strict";var qs=jo();Ko.exports=function(e){var r=+e;return r!==r||r===0?0:qs(r)}});var Uo=a((Ac,zo)=>{"use strict";var Ps=Tr(),As=Math.max,Ls=Math.min;zo.exports=function(e,r){var t=Ps(e);return t<0?As(t+r,0):Ls(t,r)}});var Zo=a((Lc,Wo)=>{"use strict";var Rs=Tr(),Ds=Math.min;Wo.exports=function(e){var r=Rs(e);return r>0?Ds(r,9007199254740991):0}});var Vo=a((Rc,$o)=>{"use strict";var Hs=Zo();$o.exports=function(e){return Hs(e.length)}});var Yo=a((Dc,Xo)=>{"use strict";var js=ie(),Ks=Uo(),zs=Vo(),Go=function(e){return function(r,t,o){var n=js(r),i=zs(n);if(i===0)return!e&&-1;var d=Ks(o,i),s;if(e&&t!==t){for(;i>d;)if(s=n[d++],s!==s)return!0}else for(;i>d;d++)if((e||d in n)&&n[d]===t)return e||d||0;return!e&&-1}};Xo.exports={includes:Go(!0),indexOf:Go(!1)}});var kr=a((Hc,Jo)=>{"use strict";Jo.exports={}});var rn=a((jc,en)=>{"use strict";var Us=j(),Sr=le(),Ws=ie(),Zs=Yo().indexOf,$s=kr(),Qo=Us([].push);en.exports=function(e,r){var t=Ws(e),o=0,n=[],i;for(i in t)!Sr($s,i)&&Sr(t,i)&&Qo(n,i);for(;r.length>o;)Sr(t,i=r[o++])&&(~Zs(n,i)||Qo(n,i));return n}});var _r=a((Kc,tn)=>{"use strict";tn.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var nn=a((zc,on)=>{"use strict";var Vs=rn(),Gs=_r();on.exports=Object.keys||function(r){return Vs(r,Gs)}});var sn=a(an=>{"use strict";var Xs=z(),Ys=hr(),Js=wr(),Qs=Se(),el=ie(),rl=nn();an.f=Xs&&!Ys?Object.defineProperties:function(r,t){Qs(r);for(var o=el(t),n=rl(t),i=n.length,d=0,s;i>d;)Js.f(r,s=n[d++],o[s]);return r}});var dn=a((Wc,ln)=>{"use strict";var tl=Qe();ln.exports=tl("document","documentElement")});var pn=a((Zc,un)=>{"use strict";var ol=dr(),nl=cr(),cn=ol("keys");un.exports=function(e){return cn[e]||(cn[e]=nl(e))}});var xn=a(($c,yn)=>{"use strict";var al=Se(),il=sn(),mn=_r(),sl=kr(),ll=dn(),dl=fr(),cl=pn(),fn=">",bn="<",Nr="prototype",Er="script",vn=cl("IE_PROTO"),Br=function(){},gn=function(e){return bn+Er+fn+e+bn+"/"+Er+fn},hn=function(e){e.write(gn("")),e.close();var r=e.parentWindow.Object;return e=null,r},ul=function(){var e=dl("iframe"),r="java"+Er+":",t;return e.style.display="none",ll.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(gn("document.F=Object")),t.close(),t.F},Be,Ne=function(){try{Be=new ActiveXObject("htmlfile")}catch{}Ne=typeof document<"u"?document.domain&&Be?hn(Be):ul():hn(Be);for(var e=mn.length;e--;)delete Ne[Nr][mn[e]];return Ne()};sl[vn]=!0;yn.exports=Object.create||function(r,t){var o;return r!==null?(Br[Nr]=al(r),o=new Br,Br[Nr]=null,o[vn]=r):o=Ne(),t===void 0?o:il.f(o,t)}});var wn=a(()=>{"use strict";var pl=Do(),ml=z(),fl=xn();pl({target:"Object",stat:!0,sham:!ml},{create:fl})});var kn=a((Xc,Tn)=>{"use strict";wn();var bl=Te(),hl=bl.Object;Tn.exports=function(r,t){return hl.create(r,t)}});var _n=a((Yc,Sn)=>{"use strict";var vl=kn();Sn.exports=vl});var Nn=a((Jc,Bn)=>{Bn.exports=_n()});function ve(e,r){try{if(typeof document>"u")return;var t=document.createElement("meta");t.setAttribute("name",e),r&&t.setAttribute("content",r),document.head.appendChild(t)}catch(o){console.error('inject-meta-tag: Failed to inject <meta name="'.concat(e,'"> tag.'),o)}}var Ta=l(O()),te=l(f());var D=l(f());var Xr=l(f()),Yr=(0,Xr.createContext)(new Proxy({},{get(){throw new Error("botframework-webchat: This hook can only used under its corresponding <Provider>.")}}));Yr.displayName="TelephoneKeypad.Context";var ge=Yr;var Ia=(0,D.memo)(({children:e})=>{let[r,t]=(0,D.useState)(!1),o=(0,D.useMemo)(()=>Object.freeze({setShown:t,shown:r}),[t,r]);return D.default.createElement(ge.Provider,{value:o},e)}),je=Ia;var Oe=l(f());var In=l(O()),Mn=l(q()),p=l(f());var En=l(Nn()),Ee=l(f());function k(e){var r=(0,Ee.useRef)(),t=(0,Ee.useMemo)(function(){return(0,En.default)({},{current:{get:function(){return r.current}}})},[r]);return r.current=e,t}var P=l(f());var Fn={"telephone-keypad__button":"r","telephone-keypad__button__ruby":"e","telephone-keypad__button__text":"o","telephone-keypad--horizontal":"l"};var yl=".webchat-fluent .r{-webkit-user-select:none;align-items:center;-webkit-appearance:none;appearance:none;background-color:#fff;border-radius:100%;border:solid 1px var(--webchat-colorNeutralStroke1);color:var(--webchat-colorGray200);font-weight:var(--webchat-fontWeightSemibold);cursor:pointer;display:flex;flex-direction:column;height:60px;opacity:.7;padding:0;position:relative;touch-action:none;user-select:none;width:60px}.webchat-fluent .r:hover{background-color:var(--webchat-colorGray30)}.webchat-fluent .e{color:var(--webchat-colorGray190);font-size:10px}.webchat-fluent .o{font-size:24px;margin-top:8px}.webchat-fluent .l .r{height:32px;justify-content:center;margin:8px 4px;width:32px}.webchat-fluent .l .e{display:none}.webchat-fluent .l .o{font-size:20px;margin-top:0}.webchat-fluent .c{align-items:center;background:var(--webchat-colorNeutralBackground1);border:none;border-radius:var(--webchat-borderRadiusXLarge);display:flex;flex-direction:column;font-family:var(--webchat-fontFamilyBase);justify-content:center}.webchat-fluent .n{box-sizing:border-box;display:grid;gap:16px;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(4,1fr);justify-items:center;padding:16px;width:100%}.webchat-fluent .d{align-items:center;color:var(--webchat-colorNeutralForeground4);display:flex;font-size:12px;gap:6px;margin-block-end:6px}.webchat-fluent .i{color:var(--webchat-colorBrandForegroundLink);text-decoration-color:transparent}.webchat-fluent .i:target{color:var(--webchat-colorBrandForegroundLinkSelected)}.webchat-fluent .i:hover{color:var(--webchat-colorBrandForegroundLinkHover);text-decoration:underline 1px currentColor}.webchat-fluent .i:active{color:var(--webchat-colorBrandForegroundLinkPressed)}.webchat-fluent .i:focus-visible{outline:none;text-decoration:underline 1px double var(--webchat-colorStrokeFocus2)}.webchat-fluent.a{display:contents;--webchat-colorNeutralForeground1: var(--colorNeutralForeground1, #242424);--webchat-colorNeutralForeground2: var(--colorNeutralForeground2, #424242);--webchat-colorNeutralForeground4: var(--colorNeutralForeground4, #707070);--webchat-colorNeutralForeground2BrandHover: var(--colorNeutralForeground2BrandHover, #02729c);--webchat-colorNeutralForeground2BrandPressed: var(--colorNeutralForeground2BrandPressed, #01678c);--webchat-colorNeutralForeground2BrandSelected: var(--colorNeutralForeground2BrandSelected, #067191);--webchat-colorNeutralForegroundDisabled: var(--colorNeutralForegroundDisabled, #bdbdbd);--webchat-colorNeutralBackground1: var(--colorNeutralBackground1, #ffffff);--webchat-colorNeutralBackground4: var(--colorNeutralBackground4, #f0f0f0);--webchat-colorNeutralBackground5: var(--colorNeutralBackground5, #ebebeb);--webchat-colorNeutralStroke1: var(--colorNeutralStroke1, #d1d1d1);--webchat-colorNeutralStroke2: var(--colorNeutralStroke2, #e0e0e0);--webchat-colorNeutralStroke1Selected: var(--colorNeutralStroke1Selected, #bdbdbd);--webchat-colorStrokeFocus2: var(--colorStrokeFocus2, #000000);--webchat-colorBrandStroke2: var(--colorBrandStroke2, #9edcf7);--webchat-colorBrandForeground2Hover: var(--colorBrandForeground2Hover, #015a7a);--webchat-colorBrandForeground2Pressed: var(--colorBrandForeground2Pressed, #01384d);--webchat-colorBrandForegroundLink: var(--colorBrandForegroundLink, #01678c);--webchat-colorBrandForegroundLinkHover: var(--colorBrandForegroundLinkHover, #015a7a);--webchat-colorBrandForegroundLinkPressed: var(--colorBrandForegroundLinkPressed, #014259);--webchat-colorBrandForegroundLinkSelected: var(--colorBrandForegroundLinkSelected, #01678c);--webchat-colorBrandBackground2Hover: var(--colorBrandBackground2Hover, #bee7fa);--webchat-colorBrandBackground2Pressed: var(--colorBrandBackground2Pressed, #7fd2f5);--webchat-colorCompoundBrandForeground1Hover: var(--colorCompoundBrandForeground1Hover, #02729c);--webchat-colorStatusDangerForeground1: var(--colorStatusDangerForeground1, #b10e1c);--webchat-colorGray30: var(--colorGray30, #edebe9);--webchat-colorGray160: var(--colorGray160, #323130);--webchat-colorGray190: var(--colorGray190, #201f1e);--webchat-colorGray200: var(--colorGray200, #1b1a19);--webchat-borderRadiusSmall: var(--borderRadiusSmall, 2px);--webchat-borderRadiusLarge: var(--borderRadiusLarge, 6px);--webchat-borderRadiusXLarge: var(--borderRadiusXLarge, 8px);--webchat-shadow16: var(--shadow16, 0 6.4px 14.4px 0 rgba(0, 0, 0, .132), 0 1.2px 3.6px 0 rgba(0, 0, 0, .108));--webchat-spacingHorizontalMNudge: var(--spacingHorizontalMNudge, 10px);--webchat-fontFamilyBase: var(--fontFamilyBase, \"Segoe UI\", \"Segoe UI Web (West European)\", -apple-system, BlinkMacSystemFont, Roboto, \"Helvetica Neue\", sans-serif);--webchat-fontFamilyNumeric: var(--fontFamilyNumeric, Bahnschrift, \"Segoe UI\", \"Segoe UI Web (West European)\", -apple-system, BlinkMacSystemFont, Roboto, \"Helvetica Neue\", sans-serif);--webchat-fontWeightSemibold: var(--fontWeightSemibold, 600);--webchat-strokeWidthThicker: var(--strokeWidthThicker, 3px);--webchat-durationUltraFast: var(--durationUltraFast, 0);--webchat-durationNormal: var(--durationNormal, .2s);--webchat-curveAccelerateMid: var(--curveAccelerateMid, cubic-bezier(1,0,1,1));--webchat-curveDecelerateMid: var(--curveDecelerateMid, cubic-bezier(0,0,0,1))}@media (prefers-reduced-motion){.webchat-fluent.a{--webchat-durationUltraFast: .01ms;--webchat-durationNormal: .01ms}}.webchat-fluent .b{background-color:var(--webchat-colorNeutralBackground4);border-radius:inherit;cursor:copy;display:grid;gap:8px;inset:0;place-content:center;place-items:center;position:absolute}.webchat-fluent .u{background-color:#e00;color:#fff}.webchat-fluent .h{height:36px;pointer-events:none;width:36px}.webchat-fluent .s{align-items:center;background:transparent;border-radius:8px;border:1px solid var(--webchat-colorBrandStroke2);color:currentColor;cursor:pointer;display:flex;font-size:12px;gap:4px;padding:4px 8px;text-align:start;transition:all .15s ease-out}@media (hover: hover){.webchat-fluent .s:not([aria-disabled=true]):hover{background-color:var(--webchat-colorBrandBackground2Hover);color:var(--webchat-colorBrandForeground2Hover)}}.webchat-fluent .s:not([aria-disabled=true]):active{background-color:var(--webchat-colorBrandBackground2Pressed);color:var(--webchat-colorBrandForeground2Pressed)}.webchat-fluent .s[aria-disabled=true]{color:var(--webchat-colorNeutralForegroundDisabled);cursor:not-allowed}.webchat-fluent .g{font-size:12px;height:1em;width:1em}.webchat-fluent .p{align-items:flex-end;align-self:flex-end;display:flex;flex-direction:column;gap:8px}.webchat-fluent .p:not(:empty){padding-block-end:8px;padding-inline-start:4px}.webchat-fluent .p.w{flex-direction:row;flex-wrap:wrap;justify-content:flex-end}.webchat-fluent .p.v{flex-direction:column}.webchat-fluent .f{display:flex;gap:4px;margin-inline-start:auto}.webchat-fluent .x{align-items:center;-webkit-appearance:none;appearance:none;aspect-ratio:1;background:transparent;border-radius:var(--webchat-borderRadiusSmall);border:none;color:currentColor;cursor:pointer;display:flex;justify-content:center;padding:3px;width:32px}.webchat-fluent .x>svg{font-size:20px;pointer-events:none}.webchat-fluent .x.k{color:var(--webchat-colorNeutralForeground2BrandSelected)}@media (hover: hover){.webchat-fluent .x:not([aria-disabled=true]):hover{color:var(--webchat-colorNeutralForeground2BrandHover)}}.webchat-fluent .x:not([aria-disabled=true]):active{color:var(--webchat-colorNeutralForeground2BrandPressed)}.webchat-fluent .x[aria-disabled=true]{color:var(--webchat-colorNeutralForegroundDisabled);cursor:not-allowed}.webchat-fluent .m{align-self:center;border-inline-end:1px solid var(--webchat-colorNeutralStroke2);height:28px}.webchat-fluent .m:is(:first-child,:last-child,:only-child){display:none}.webchat-fluent .B{display:grid}.webchat-fluent .F{font-size:0;height:0;opacity:0;width:0}.webchat-fluent .y{border-radius:var(--webchat-borderRadiusLarge);border:1px solid var(--webchat-colorNeutralStroke1);cursor:default;padding:6px 8px;width:fit-content}.webchat-fluent .N{color:transparent;font-size:0;height:0;left:0;position:absolute;top:0;width:0}.webchat-fluent .S{display:grid;grid-template-areas:\"main\";max-height:200px;overflow:hidden}.webchat-fluent .z{height:0;visibility:collapse}.webchat-fluent .L{border:none;font:inherit;grid-area:main;outline:inherit;overflow-wrap:anywhere;resize:inherit;scrollbar-gutter:stable}.webchat-fluent .H{overflow:hidden;visibility:hidden;white-space:pre-wrap}.webchat-fluent .W{background-color:inherit;color:currentColor;height:100%;padding:0}.webchat-fluent .P{scrollbar-color:unset;scrollbar-width:unset;-moz-scrollbar-color:var(--webchat-colorNeutralBackground5) var(--webchat-colorNeutralForeground2);-moz-scrollbar-width:thin}.webchat-fluent .P::-webkit-scrollbar{width:8px}.webchat-fluent .P::-webkit-scrollbar-track{background-color:var(--webchat-colorNeutralBackground5);border-radius:16px}.webchat-fluent .P::-webkit-scrollbar-thumb{background-color:var(--webchat-colorNeutralForeground2);border-radius:16px}.webchat-fluent .P::-webkit-scrollbar-corner{background-color:var(--webchat-colorNeutralBackground5)}.webchat-fluent .R{color:var(--webchat-colorNeutralForeground1);font-family:var(--webchat-fontFamilyBase);padding:0 10px 10px;text-rendering:optimizeLegibility;--webchat-sendbox-attachment-area-active: ;--webchat-sendbox-border-radius: var(--webchat-borderRadiusLarge)}.webchat-fluent .G{background-color:var(--webchat-colorNeutralBackground1);border-radius:var(--webchat-sendbox-border-radius);border:1px solid var(--webchat-colorNeutralStroke1);display:grid;font-family:var(--webchat-fontFamilyBase);font-size:14px;gap:6px;grid-template:[telephone-keypad-start] \"text-area\" [telephone-keypad-end] var(--webchat-sendbox-attachment-area-active) \"controls\" / [telephone-keypad] 1fr;line-height:20px;padding:8px;position:relative}.webchat-fluent .G:has(.t){--webchat-sendbox-attachment-area-active: \"attachment\" }.webchat-fluent .G:focus-within{border-color:var(--webchat-colorNeutralStroke1Selected)}.webchat-fluent .G:after{border-bottom-left-radius:var(--webchat-sendbox-border-radius);border-bottom-right-radius:var(--webchat-sendbox-border-radius);border-bottom:var(--webchat-strokeWidthThicker) solid var(--webchat-colorCompoundBrandForeground1Hover);bottom:-1px;clip-path:inset(calc(100% - var(--webchat-strokeWidthThicker)) 50% 0 50%);content:\"\";height:var(--webchat-sendbox-border-radius);left:-1px;position:absolute;right:-1px;transition:clip-path var(--webchat-durationUltraFast) var(--webchat-curveAccelerateMid)}.webchat-fluent .G:focus-within:after{clip-path:inset(calc(100% - var(--webchat-strokeWidthThicker)) 0 0 0);transition:clip-path var(--webchat-durationNormal) var(--webchat-curveDecelerateMid)}.webchat-fluent .G>.D{grid-area:text-area}.webchat-fluent .G>.t{grid-area:attachment}.webchat-fluent .G>.M{grid-area:controls}.webchat-fluent .G>.U{grid-area:telephone-keypad}.webchat-fluent .C{background-color:transparent;border:none;flex:auto;font-family:var(--webchat-fontFamilyBase);font-size:14px;line-height:20px;outline:none;padding:4px 4px 0;resize:none}.webchat-fluent .j{align-items:center;display:flex;padding-inline-start:4px}.webchat-fluent .T{color:var(--webchat-colorNeutralForeground4);cursor:default;font-family:var(--webchat-fontFamilyNumeric);font-size:10px;line-height:14px;margin-inline-end:4px}.webchat-fluent .I{color:var(--webchat-colorStatusDangerForeground1)}\n/*! For license information please see botframework-webchat-fluent-theme.development.css.LEGAL.txt */\n";function Fe(){if(globalThis.document){let e=document.createElement("style");e.append(document.createTextNode(yl)),document.head.appendChild(e)}}var Cn=l(f());function xl(e){return(0,Cn.useMemo)(()=>Object.freeze(Object.fromEntries(Object.entries(e).map(([r,t])=>[r,`${r} ${t}`]))),[e])}var v=xl;var On=(0,P.memo)((0,P.forwardRef)(({button:e,"data-testid":r,onClick:t,ruby:o},n)=>{let i=v(Fn),d=k(t),s=(0,P.useCallback)(()=>d.current?.(),[d]);return P.default.createElement("button",{className:i["telephone-keypad__button"],"data-testid":r,onClick:s,ref:n,type:"button"},P.default.createElement("span",{className:i["telephone-keypad__button__text"]},e==="star"?"\u2217":e==="pound"?"#":e),!!o&&P.default.createElement("ruby",{className:i["telephone-keypad__button__ruby"]},o))}));On.displayName="TelephoneKeypad.Button";var E=On;var wl={sendBoxDropZone:"send box drop zone",sendBoxSendButton:"send box send button",sendBoxTextBox:"send box text area",sendBoxTelephoneKeypadButton1:"send box telephone keypad button 1",sendBoxTelephoneKeypadButton2:"send box telephone keypad button 2",sendBoxTelephoneKeypadButton3:"send box telephone keypad button 3",sendBoxTelephoneKeypadButton4:"send box telephone keypad button 4",sendBoxTelephoneKeypadButton5:"send box telephone keypad button 5",sendBoxTelephoneKeypadButton6:"send box telephone keypad button 6",sendBoxTelephoneKeypadButton7:"send box telephone keypad button 7",sendBoxTelephoneKeypadButton8:"send box telephone keypad button 8",sendBoxTelephoneKeypadButton9:"send box telephone keypad button 9",sendBoxTelephoneKeypadButton0:"send box telephone keypad button 0",sendBoxTelephoneKeypadButtonStar:"send box telephone keypad button star",sendBoxTelephoneKeypadButtonPound:"send box telephone keypad button pound",sendBoxTelephoneKeypadToolbarButton:"send box telephone keypad toolbar button",sendBoxUploadButton:"send box upload button"},y=wl;var Ce=l(f());function A(){let{setShown:e,shown:r}=(0,Ce.useContext)(ge);return(0,Ce.useMemo)(()=>Object.freeze([r,e]),[r,e])}var Fr={"telephone-keypad":"c","telephone-keypad__box":"n","telephone-keypad__info-message":"d","telephone-keypad__info-message-link":"i"};var ue=l(f());function kl(e){return ue.default.createElement("svg",{"aria-hidden":"true",className:e.className,height:"1em",viewBox:"0 0 20 20",width:"1em",xmlns:"http://www.w3.org/2000/svg"},ue.default.createElement("path",{d:"M6 2a2 2 0 0 0-2 2v5.2c.32-.08.66-.15 1-.18V4a1 1 0 0 1 1-1h4v3.5c0 .83.67 1.5 1.5 1.5H15v8a1 1 0 0 1-1 1h-3.6c-.18.36-.4.7-.66 1H14a2 2 0 0 0 2-2V7.41c0-.4-.16-.78-.44-1.06l-3.91-3.91A1.5 1.5 0 0 0 10.59 2H6Zm8.8 5h-3.3a.5.5 0 0 1-.5-.5V3.2L14.8 7ZM10 14.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Zm-4-2a.5.5 0 0 0-1 0V14H3.5a.5.5 0 0 0 0 1H5v1.5a.5.5 0 0 0 1 0V15h1.5a.5.5 0 0 0 0-1H6v-1.5Z",fill:"currentColor"}))}var Cr=(0,ue.memo)(kl);var pe=l(f());function Sl(e){return pe.default.createElement("svg",{"aria-hidden":"true",className:e.className,height:"1em",viewBox:"0 0 20 20",width:"1em",xmlns:"http://www.w3.org/2000/svg"},pe.default.createElement("path",{d:"m4.83 10.48 5.65-5.65a3 3 0 0 1 4.25 4.24L8 15.8a1.5 1.5 0 0 1-2.12-2.12l6-6.01a.5.5 0 1 0-.7-.71l-6 6.01a2.5 2.5 0 0 0 3.53 3.54l6.71-6.72a4 4 0 1 0-5.65-5.66L4.12 9.78a.5.5 0 0 0 .7.7Z",fill:"currentColor"}))}var Or=(0,pe.memo)(Sl);var me=l(f());function _l(e){return me.default.createElement("svg",{"aria-hidden":"true",className:e.className,height:"1em",viewBox:"0 0 16 16",width:"1em",xmlns:"http://www.w3.org/2000/svg"},me.default.createElement("path",{d:"M8.5 7.5a.5.5 0 1 0-1 0v3a.5.5 0 0 0 1 0v-3Zm.25-2a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1ZM2 8a6 6 0 1 1 12 0A6 6 0 0 1 2 8Z",fill:"currentColor"}))}var Ir=(0,me.memo)(_l);var fe=l(f());function Bl(e){return fe.default.createElement("svg",{"aria-hidden":"true",className:e.className,height:"1em",viewBox:"0 0 20 20",width:"1em",xmlns:"http://www.w3.org/2000/svg"},fe.default.createElement("path",{d:"M2.18 2.11a.5.5 0 0 1 .54-.06l15 7.5a.5.5 0 0 1 0 .9l-15 7.5a.5.5 0 0 1-.7-.58L3.98 10 2.02 2.63a.5.5 0 0 1 .16-.52Zm2.7 8.39-1.61 6.06L16.38 10 3.27 3.44 4.88 9.5h6.62a.5.5 0 1 1 0 1H4.88Z",fill:"currentColor"}))}var Mr=(0,fe.memo)(Bl);var be=l(f());function Nl(e){return be.default.createElement("svg",{"aria-hidden":"true",className:e.className,height:"1em",viewBox:"0 0 20 20",width:"1em",xmlns:"http://www.w3.org/2000/svg"},be.default.createElement("path",{d:"M6 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Zm0 4a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM7.25 12a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM10 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM11.25 8a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM10 13.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM11.25 16a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM14 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM15.25 8a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM14 13.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z",fill:"currentColor"}))}var qr=(0,be.memo)(Nl);var{LocalizedString:El}=In.Components,qn=(0,p.memo)(({children:e,isHorizontal:r})=>{let t=v(Fr);return r?null:p.default.createElement("div",{className:t["telephone-keypad__box"]},e)});qn.displayName="TelephoneKeypad:Orientation";var Pn=(0,p.memo)(({autoFocus:e,className:r,onButtonClick:t,isHorizontal:o})=>{let n=k(e),i=v(Fr),d=(0,p.useRef)(null),s=k(t),[,h]=A(),x=(0,p.useCallback)(()=>s.current?.("1"),[s]),c=(0,p.useCallback)(()=>s.current?.("2"),[s]),u=(0,p.useCallback)(()=>s.current?.("3"),[s]),m=(0,p.useCallback)(()=>s.current?.("4"),[s]),g=(0,p.useCallback)(()=>s.current?.("5"),[s]),B=(0,p.useCallback)(()=>s.current?.("6"),[s]),_=(0,p.useCallback)(()=>s.current?.("7"),[s]),T=(0,p.useCallback)(()=>s.current?.("8"),[s]),S=(0,p.useCallback)(()=>s.current?.("9"),[s]),M=(0,p.useCallback)(()=>s.current?.("0"),[s]),V=(0,p.useCallback)(()=>s.current?.("star"),[s]),Y=(0,p.useCallback)(()=>s.current?.("pound"),[s]),Re=(0,p.useCallback)(De=>{De.key==="Escape"&&h(!1)},[h]);return(0,p.useEffect)(()=>{n.current&&d.current?.focus()},[n,d]),p.default.createElement("div",{className:(0,Mn.default)(i["telephone-keypad"],r),onKeyDown:Re},p.default.createElement(qn,{isHorizontal:o},p.default.createElement(E,{button:"1","data-testid":y.sendBoxTelephoneKeypadButton1,onClick:x,ref:d}),p.default.createElement(E,{button:"2","data-testid":y.sendBoxTelephoneKeypadButton2,onClick:c,ruby:"ABC"}),p.default.createElement(E,{button:"3","data-testid":y.sendBoxTelephoneKeypadButton3,onClick:u,ruby:"DEF"}),p.default.createElement(E,{button:"4","data-testid":y.sendBoxTelephoneKeypadButton4,onClick:m,ruby:"GHI"}),p.default.createElement(E,{button:"5","data-testid":y.sendBoxTelephoneKeypadButton5,onClick:g,ruby:"JKL"}),p.default.createElement(E,{button:"6","data-testid":y.sendBoxTelephoneKeypadButton6,onClick:B,ruby:"MNO"}),p.default.createElement(E,{button:"7","data-testid":y.sendBoxTelephoneKeypadButton7,onClick:_,ruby:"PQRS"}),p.default.createElement(E,{button:"8","data-testid":y.sendBoxTelephoneKeypadButton8,onClick:T,ruby:"TUV"}),p.default.createElement(E,{button:"9","data-testid":y.sendBoxTelephoneKeypadButton9,onClick:S,ruby:"WXYZ"}),p.default.createElement(E,{button:"star","data-testid":y.sendBoxTelephoneKeypadButtonStar,onClick:V}),p.default.createElement(E,{button:"0","data-testid":y.sendBoxTelephoneKeypadButton0,onClick:M,ruby:"+"}),p.default.createElement(E,{button:"pound","data-testid":y.sendBoxTelephoneKeypadButtonPound,onClick:Y})),p.default.createElement("div",{className:i["telephone-keypad__info-message"]},p.default.createElement(Ir,null),p.default.createElement(El,{linkClassName:i["telephone-keypad__info-message-link"],stringIds:"TELEPHONE_KEYPAD_INPUT_MESSAGE"})))});Pn.displayName="TelephoneKeypad";var An=Pn;var Ln=(0,Oe.memo)(e=>A()[0]?Oe.default.createElement(An,{...e}):null);Ln.displayName="TelephoneKeypad.Surrogate";var Pr=Ln;var Dn=l(f()),Hn=l(q());var Rn={theme:"a"};var Cl="webchat-fluent";function Ie(e){let r=v(Rn);return Dn.default.createElement("div",{className:(0,Hn.default)(Cl,r.theme)},e.children)}var wa=l(O()),re=l(q()),b=l(f());var zn=l(O()),Un=l(q()),F=l(f());var jn={"sendbox__attachment-drop-zone":"b","sendbox__attachment-drop-zone--droppable":"u","sendbox__attachment-drop-zone-icon":"h"};var{useLocalizer:Il}=zn.hooks,Ml=e=>{e.preventDefault()},Kn=e=>!!e.dataTransfer?.types?.some(r=>r.toLowerCase()==="files");function ql(e,r){let t=e.parentNode;for(;t;){if(t===r)return!0;t=t.parentNode}return!1}var Wn=e=>{let[r,t]=(0,F.useState)(!1),o=v(jn),n=(0,F.useRef)(null),i=Il(),d=k(e.onFilesAdded);(0,F.useEffect)(()=>{let h=0,x=u=>{h++,Kn(u)&&t(n.current&&(u.target===n.current||u.target instanceof HTMLElement&&ql(u.target,n.current))?"droppable":"visible")},c=()=>--h<=0&&t(!1);return document.addEventListener("dragenter",x,!1),document.addEventListener("dragleave",c,!1),()=>{document.removeEventListener("dragenter",x),document.removeEventListener("dragleave",c)}},[t]);let s=(0,F.useCallback)(h=>{h.preventDefault(),t(!1),Kn(h.nativeEvent)&&d.current([...h.dataTransfer.files])},[d,t]);return r?F.default.createElement("div",{className:(0,Un.default)(o["sendbox__attachment-drop-zone"],{[o["sendbox__attachment-drop-zone--droppable"]]:r==="droppable"}),"data-testid":y.sendBoxDropZone,onDragOver:Ml,onDrop:s,ref:n},F.default.createElement(Cr,{className:o["sendbox__attachment-drop-zone-icon"]}),i("TEXT_INPUT_DROP_ZONE")):null};Wn.displayName="DropZone";var Ar=(0,F.memo)(Wn);var ea=l(O()),ra=l(q()),L=l(f());var Yn=l(O()),Jn=l(q()),W=l(f());var Zn={"suggested-action":"s","suggested-action__image":"g"};var U=l(f()),Al=e=>e.preventDefault(),Ll=(0,U.forwardRef)(({"aria-hidden":e,children:r,disabled:t,onClick:o,tabIndex:n,...i},d)=>{let s=(0,U.useRef)(null);return U.default.createElement("button",{"aria-disabled":t?"true":"false","aria-hidden":e,onClick:t?Al:o,ref:d||s,tabIndex:n,...t&&{"aria-disabled":"true",tabIndex:-1},...i,type:"button"},r)}),$n=(0,U.memo)(Ll);var w=l(f()),Vn=(0,w.createContext)({itemEffector:()=>{throw new Error("botframework-webchat-fluent-theme rovingFocus: no provider for RovingFocusContext.")}});function Rl(e){let r=(0,w.useRef)(0),t=(0,w.useRef)([]),o=(0,w.useCallback)(({current:c},u)=>c&&(c.tabIndex=r.current===u?0:-1),[r]),n=(0,w.useCallback)(c=>{let u;typeof c=="number"?u=c:u=c(r.current),u&&!t.current.at(u)?.current&&(u=0),r.current!==u&&(r.current=u,t.current.forEach((m,g)=>o(m,g)),t.current.at(u)?.current?.focus())},[o,t,r]),i=(0,w.useCallback)(c=>{let{target:u}=c,m=t.current.findIndex(({current:g})=>g===u);m!==-1&&n(m)},[t,n]),d=(0,w.useCallback)(c=>u=>{let m=!e.direction,g=/up|down/iu.test(c)&&e.direction==="vertical",B=/left|right/iu.test(c)&&e.direction==="horizontal",_=/right|down/iu.test(c),T=m||g||B?_?1:-1:0,S=t.current.map((V,Y)=>Y),M=S.indexOf(u)+T;return S.at(M)??0},[e.direction]),s=(0,w.useCallback)(c=>{let{key:u}=c;switch(u){case"Up":case"ArrowUp":case"Left":case"ArrowLeft":case"Down":case"ArrowDown":case"Right":case"ArrowRight":n(d(u));break;case"Home":n(0);break;case"End":n(-1);break;case"Escape":e.onEscapeKey?.();break;default:return}c.preventDefault(),c.stopPropagation()},[n,d,e]),h=(0,w.useCallback)((c,u)=>{let{current:m}=c;return t.current[Number(u)]=c,m.addEventListener("focus",i),m.addEventListener("keydown",s),o(c,u),()=>{m.removeEventListener("focus",i),m.removeEventListener("keydown",s),delete t.current[Number(u)]}},[i,s,o,t]),x=(0,w.useMemo)(()=>({itemEffector:h}),[h]);return w.default.createElement(Vn.Provider,{value:x},e.children)}function Gn(e){let r=(0,w.useRef)(null),{itemEffector:t}=(0,w.useContext)(Vn);return(0,w.useEffect)(()=>t(r,e)),r}var Xn=(0,w.memo)(Rl);var{useDisabled:Dl,useFocus:Hl,usePerformCardAction:jl,useScrollToEnd:Kl,useStyleSet:zl,useSuggestedActions:Ul}=Yn.hooks;function Wl({buttonText:e,className:r,displayText:t,image:o,imageAlt:n,itemIndex:i,text:d,type:s,value:h}){let[x,c]=Ul(),[{suggestedAction:u}]=zl(),[m]=Dl(),g=Hl(),B=Gn(i),_=jl(),T=v(Zn),S=Kl(),M=(0,W.useCallback)(({target:V})=>{(async function(){await g("sendBoxWithoutKeyboard"),_({displayText:t,text:d,type:s,value:h},{target:V}),s==="openUrl"&&c([]),S()})()},[t,g,_,S,c,d,s,h]);return W.default.createElement($n,{className:(0,Jn.default)(T["suggested-action"],u+"",(r||"")+""),disabled:m,onClick:M,ref:B,type:"button"},o&&W.default.createElement("img",{alt:n,className:T["suggested-action__image"],src:o}),W.default.createElement("span",null,e))}var Qn=(0,W.memo)(Wl);function Lr(e){let{title:r}=e,{type:t,value:o}=e;return t==="messageBack"?r||e.displayText:r||(typeof o=="string"?o:JSON.stringify(o))}var Rr={"suggested-actions":"p","suggested-actions--flow":"w","suggested-actions--stacked":"v"};var{useFocus:$l,useLocalizer:Vl,useStyleOptions:Gl,useStyleSet:Xl,useSuggestedActions:Yl}=ea.hooks;function Jl(e){let[{suggestedActionLayout:r}]=Gl(),[{suggestedActions:t}]=Xl(),o=v(Rr);return L.default.createElement("div",{"aria-label":e["aria-label"],"aria-live":"polite","aria-orientation":"vertical",className:(0,ra.default)(o["suggested-actions"],t+"",{[o["suggested-actions--flow"]]:r==="flow",[o["suggested-actions--stacked"]]:r!=="flow"},e.className),role:"toolbar"},!!e.children&&!!L.default.Children.count(e.children)&&e.children)}function Ql(){let e=v(Rr),r=Vl(),[t]=Yl(),o=$l(),n=(0,L.useCallback)(()=>{o("sendBox")},[o]),i=t.map((d,s)=>{let{displayText:h,image:x,imageAltText:c,text:u,type:m,value:g}=d;return t?.length?L.default.createElement(Qn,{buttonText:Lr(d),displayText:h,image:x,imageAlt:x&&(c||u),itemIndex:s,key:s,text:u,type:m,value:g}):null});return L.default.createElement(Xn,{onEscapeKey:n},L.default.createElement(Jl,{"aria-label":r("SUGGESTED_ACTIONS_LABEL_ALT"),className:e["suggested-actions"]},i))}var Dr=(0,L.memo)(Ql);var oa=l(O()),C=l(f());var qe=l(q()),Z=l(f());var Me={sendbox__toolbar:"f","sendbox__toolbar-button":"x","sendbox__toolbar-button--selected":"k","sendbox__toolbar-separator":"m"};var rd=e=>e.preventDefault(),G=(0,Z.memo)(e=>{let r=v(Me);return Z.default.createElement("button",{"aria-label":e["aria-label"],className:(0,qe.default)(r["sendbox__toolbar-button"],e.className,{[r["sendbox__toolbar-button--selected"]]:e.selected}),"data-testid":e["data-testid"],onClick:e.disabled?rd:e.onClick,type:e.type==="submit"?"submit":"button",...e.disabled&&{"aria-disabled":"true",tabIndex:-1}},e.children)});G.displayName="ToolbarButton";var Hr=(0,Z.memo)(e=>{let r=v(Me);return Z.default.createElement("div",{className:(0,qe.default)(r.sendbox__toolbar,e.className)},e.children)});Hr.displayName="Toolbar";var jr=(0,Z.memo)(e=>{let r=v(Me);return Z.default.createElement("div",{"aria-orientation":"vertical",className:(0,qe.default)(r["sendbox__toolbar-separator"],e.className),role:"separator"})});jr.displayName="ToolbarSeparator";var ta={"sendbox__add-attachment":"B","sendbox__add-attachment-input":"F"};var{useLocalizer:od,useStyleOptions:nd}=oa.hooks;function ad(e){let r=(0,C.useRef)(null),t=v(ta),o=od(),[{uploadAccept:n,uploadMultiple:i}]=nd(),d=k(e.onFilesAdded),s=(0,C.useCallback)(()=>r.current?.click(),[r]),h=(0,C.useCallback)(({target:{files:x}})=>{x&&(d.current?.([...x]),r.current&&(r.current.value=""))},[r,d]);return C.default.createElement("div",{className:t["sendbox__add-attachment"]},C.default.createElement("input",{accept:n,"aria-disabled":e.disabled,"aria-hidden":"true",className:t["sendbox__add-attachment-input"],multiple:i,onInput:e.disabled?void 0:h,readOnly:e.disabled,ref:r,role:"button",tabIndex:-1,type:"file"}),C.default.createElement(G,{"aria-label":o("TEXT_INPUT_UPLOAD_BUTTON_ALT"),"data-testid":y.sendBoxUploadButton,onClick:s},C.default.createElement(Or,null)))}var na=(0,C.memo)(ad);var ia=l(O()),Pe=l(f()),sa=l(q());var aa={sendbox__attachment:"y"};var{useLocalizer:sd}=ia.hooks,ld={one:"TEXT_INPUT_ATTACHMENTS_ONE",two:"TEXT_INPUT_ATTACHMENTS_TWO",few:"TEXT_INPUT_ATTACHMENTS_FEW",many:"TEXT_INPUT_ATTACHMENTS_MANY",other:"TEXT_INPUT_ATTACHMENTS_OTHER"};function dd({attachments:e,className:r}){let t=v(aa),o=sd({plural:!0});return e.length?Pe.default.createElement("div",{className:(0,sa.default)(t.sendbox__attachment,r)},o(ld,e.length)):null}var la=(0,Pe.memo)(dd);var Ae=l(f());var da={"sendbox__error-message":"N"};function ud(e){let r=v(da);return Ae.default.createElement("span",{className:r["sendbox__error-message"],id:e.id,role:"alert"},e.error)}var ca=(0,Ae.memo)(ud);var X=l(f()),ua=l(O());var{useLocalizer:pd}=ua.hooks,pa=(0,X.memo)(()=>{let[e,r]=A(),t=pd(),o=(0,X.useCallback)(()=>r(n=>!n),[r]);return X.default.createElement(G,{"aria-label":t("TEXT_INPUT_TELEPHONE_KEYPAD_BUTTON_ALT"),"data-testid":y.sendBoxTelephoneKeypadToolbarButton,onClick:o,selected:e},X.default.createElement(qr,null))});pa.displayName="SendBox.TelephoneKeypadToolbarButton";var ma=pa;var Le=l(q()),$=l(f());var fa={"sendbox__text-area":"S","sendbox__text-area--hidden":"z","sendbox__text-area-shared":"L","sendbox__text-area-doppelganger":"H","sendbox__text-area-input":"W","sendbox__text-area-input--scroll":"P"};var ba=(0,$.forwardRef)((e,r)=>{let t=v(fa),o=(0,$.useCallback)(n=>{!n.shiftKey&&n.key==="Enter"&&(n.preventDefault(),"form"in n.target&&n.target.form instanceof HTMLFormElement&&n.target?.form?.requestSubmit())},[]);return $.default.createElement("div",{className:(0,Le.default)(t["sendbox__text-area"],{[t["sendbox__text-area--hidden"]]:e.hidden},e.className),role:e.hidden?"hidden":void 0},$.default.createElement("div",{className:(0,Le.default)(t["sendbox__text-area-doppelganger"],t["sendbox__text-area-shared"],t["sendbox__text-area-input--scroll"])},e.value||e.placeholder," "),$.default.createElement("textarea",{"aria-label":e["aria-label"],className:(0,Le.default)(t["sendbox__text-area-input"],t["sendbox__text-area-shared"],t["sendbox__text-area-input--scroll"]),"data-testid":e["data-testid"],onInput:e.onInput,onKeyDown:o,placeholder:e.placeholder,ref:r,rows:e.startRows??1,tabIndex:e.hidden?-1:void 0,value:e.value}))});ba.displayName="TextArea";var ha=ba;var va=l(O()),Kr=l(f());var{useConnectivityStatus:fd,useLocalizer:bd}=va.hooks,hd=({attachments:e,message:r})=>{let[t]=fd(),o=bd(),n=k(t!=="connected"&&t!=="reconnected"?"offline":!r&&!e.length?"empty":void 0),i=(0,Kr.useMemo)(()=>Object.freeze(new Map().set("empty",o("SEND_BOX_IS_EMPTY_TOOLTIP_ALT")).set("offline",o("CONNECTIVITY_STATUS_ALT_FATAL"))),[o]);return(0,Kr.useMemo)(()=>Object.freeze([n,n.current&&i.get(n.current)]),[i,n])},ga=hd;var ya=l(f());function zr(e){let r=(0,ya.useMemo)(()=>Math.random().toString(36).substr(2,5),[]);return e=e?`${e}--`:"",`${e}${r}`}var xa={sendbox:"R",sendbox__sendbox:"G","sendbox__attachment--in-grid":"t","sendbox__text-area--in-grid":"D","sendbox__sendbox-controls--in-grid":"M","sendbox__telephone-keypad--in-grid":"U","sendbox__sendbox-text":"C","sendbox__sendbox-controls":"j","sendbox__text-counter":"T","sendbox__text-counter--error":"I"};var{useFocus:gd,useLocalizer:yd,useMakeThumbnail:xd,useRegisterFocusSendBox:wd,useSendBoxAttachments:Td,useSendMessage:kd,useStyleOptions:Sd}=wa.hooks;function _d(e){let r=(0,b.useRef)(null),[t,o]=(0,b.useState)(""),[n,i]=Td(),[{hideTelephoneKeypadButton:d,hideUploadButton:s,maxMessageLength:h}]=Sd(),x=!!h&&t.length>h,c=v(xa),u=yd(),m=kd(),g=xd(),B=zr("sendbox__error-message-id"),[_,T]=ga({message:t,attachments:n}),[S]=A(),M=gd();wd((0,b.useCallback)(({noKeyboard:N,waitUntil:He})=>{r.current&&(N?He((async()=>{let oe=r.current?.getAttribute("readonly");r.current?.setAttribute("readonly","true"),await new Promise(he=>setTimeout(he,0)),r.current?.focus(),typeof oe!="string"?r.current?.removeAttribute("readonly"):r.current?.setAttribute("readonly",oe)})()):r.current?.focus())},[r]));let V=k(n),Y=k(t),Re=(0,b.useCallback)(N=>{"tabIndex"in N.target&&typeof N.target.tabIndex=="number"&&N.target.tabIndex>=0||M("sendBox")},[M]),De=(0,b.useCallback)(N=>o(N.currentTarget.value),[o]),Zr=(0,b.useCallback)(async N=>{let He=Object.freeze(await Promise.all(N.map(oe=>g(oe).then(he=>Object.freeze({blob:oe,...he&&{thumbnailURL:he}})))));i(He)},[g,i]),ka=(0,b.useCallback)(N=>{N.preventDefault(),_.current!=="empty"&&!x&&(m(Y.current,void 0,{attachments:V.current}),o(""),i([])),M("sendBox")},[V,Y,m,i,o,x,_,M]),Sa=(0,b.useCallback)(N=>m(`/DTMF ${N}`),[m]),_a={"aria-invalid":"false",...T&&{"aria-invalid":"true","aria-errormessage":B}};return b.default.createElement("form",{..._a,className:(0,re.default)(c.sendbox,e.className),onSubmit:ka},b.default.createElement(Dr,null),b.default.createElement("div",{className:(0,re.default)(c.sendbox__sendbox),onClickCapture:Re},b.default.createElement(ha,{"aria-label":u(x?"TEXT_INPUT_LENGTH_EXCEEDED_ALT":"TEXT_INPUT_ALT"),className:(0,re.default)(c["sendbox__sendbox-text"],c["sendbox__text-area--in-grid"]),"data-testid":y.sendBoxTextBox,hidden:S,onInput:De,placeholder:e.placeholder??u("TEXT_INPUT_PLACEHOLDER"),ref:r,value:t}),b.default.createElement(Pr,{autoFocus:!0,className:c["sendbox__telephone-keypad--in-grid"],isHorizontal:!1,onButtonClick:Sa}),b.default.createElement(la,{attachments:n,className:c["sendbox__attachment--in-grid"]}),b.default.createElement("div",{className:(0,re.default)(c["sendbox__sendbox-controls"],c["sendbox__sendbox-controls--in-grid"])},!S&&h&&b.default.createElement("div",{className:(0,re.default)(c["sendbox__text-counter"],{[c["sendbox__text-counter--error"]]:x})},`${t.length}/${h}`),b.default.createElement(Hr,null,!d&&b.default.createElement(ma,null),!s&&b.default.createElement(na,{onFilesAdded:Zr}),b.default.createElement(jr,null),b.default.createElement(G,{"aria-label":u("TEXT_INPUT_SEND_BUTTON_ALT"),"data-testid":y.sendBoxSendButton,disabled:x||S,type:"submit"},b.default.createElement(Mr,null)))),b.default.createElement(Ar,{onFilesAdded:Zr}),b.default.createElement(ca,{error:T,id:B})))}var Ur=(0,b.memo)(_d);var{ThemeProvider:Bd}=Ta.Components,Nd=[()=>()=>()=>Ur],Ed=({children:e})=>te.default.createElement(Ie,null,te.default.createElement(je,null,te.default.createElement(Bd,{sendBoxMiddleware:Nd},e))),Wr=(0,te.memo)(Ed);ve("botframework-webchat:fluent-theme","version=4.17.0-main.20240502.a8ff179; build-tool=tsup; module-format=esmodules");Fe();globalThis.WebChat={...globalThis.WebChat,FluentThemeProvider:Wr,testIds:{...globalThis.WebChat?.testIds,...y}};})();
2
+ /*! For license information please see botframework-webchat-fluent-theme.development.js.LEGAL.txt */
2425
3
  //# sourceMappingURL=botframework-webchat-fluent-theme.development.js.map