@quidgest/chatbot 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs ADDED
@@ -0,0 +1,4244 @@
1
+ import { defineComponent, h, getCurrentInstance, computed, inject, openBlock, createElementBlock, normalizeClass, normalizeStyle, withModifiers, createVNode, unref, createCommentVNode, createElementVNode, Fragment, createTextVNode, toDisplayString, renderSlot, toRef, mergeModels, useModel, createBlock, withCtx, renderList, resolveDynamicComponent, ref, normalizeProps, mergeProps, reactive, watch, onBeforeUnmount, onMounted, nextTick, Teleport, Transition, withKeys, createSlots, withDirectives, vModelDynamic, guardReactiveProps, provide, isRef } from "vue";
2
+ function bind(fn, thisArg) {
3
+ return function wrap() {
4
+ return fn.apply(thisArg, arguments);
5
+ };
6
+ }
7
+ const { toString } = Object.prototype;
8
+ const { getPrototypeOf } = Object;
9
+ const kindOf = /* @__PURE__ */ ((cache) => (thing) => {
10
+ const str = toString.call(thing);
11
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
12
+ })(/* @__PURE__ */ Object.create(null));
13
+ const kindOfTest = (type) => {
14
+ type = type.toLowerCase();
15
+ return (thing) => kindOf(thing) === type;
16
+ };
17
+ const typeOfTest = (type) => (thing) => typeof thing === type;
18
+ const { isArray } = Array;
19
+ const isUndefined = typeOfTest("undefined");
20
+ function isBuffer(val) {
21
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
22
+ }
23
+ const isArrayBuffer = kindOfTest("ArrayBuffer");
24
+ function isArrayBufferView(val) {
25
+ let result;
26
+ if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
27
+ result = ArrayBuffer.isView(val);
28
+ } else {
29
+ result = val && val.buffer && isArrayBuffer(val.buffer);
30
+ }
31
+ return result;
32
+ }
33
+ const isString = typeOfTest("string");
34
+ const isFunction = typeOfTest("function");
35
+ const isNumber = typeOfTest("number");
36
+ const isObject = (thing) => thing !== null && typeof thing === "object";
37
+ const isBoolean = (thing) => thing === true || thing === false;
38
+ const isPlainObject = (val) => {
39
+ if (kindOf(val) !== "object") {
40
+ return false;
41
+ }
42
+ const prototype2 = getPrototypeOf(val);
43
+ return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
44
+ };
45
+ const isDate = kindOfTest("Date");
46
+ const isFile = kindOfTest("File");
47
+ const isBlob = kindOfTest("Blob");
48
+ const isFileList = kindOfTest("FileList");
49
+ const isStream = (val) => isObject(val) && isFunction(val.pipe);
50
+ const isFormData = (thing) => {
51
+ let kind;
52
+ return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
53
+ kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
54
+ };
55
+ const isURLSearchParams = kindOfTest("URLSearchParams");
56
+ const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
57
+ function forEach(obj, fn, { allOwnKeys = false } = {}) {
58
+ if (obj === null || typeof obj === "undefined") {
59
+ return;
60
+ }
61
+ let i;
62
+ let l;
63
+ if (typeof obj !== "object") {
64
+ obj = [obj];
65
+ }
66
+ if (isArray(obj)) {
67
+ for (i = 0, l = obj.length; i < l; i++) {
68
+ fn.call(null, obj[i], i, obj);
69
+ }
70
+ } else {
71
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
72
+ const len = keys.length;
73
+ let key;
74
+ for (i = 0; i < len; i++) {
75
+ key = keys[i];
76
+ fn.call(null, obj[key], key, obj);
77
+ }
78
+ }
79
+ }
80
+ function findKey(obj, key) {
81
+ key = key.toLowerCase();
82
+ const keys = Object.keys(obj);
83
+ let i = keys.length;
84
+ let _key;
85
+ while (i-- > 0) {
86
+ _key = keys[i];
87
+ if (key === _key.toLowerCase()) {
88
+ return _key;
89
+ }
90
+ }
91
+ return null;
92
+ }
93
+ const _global = (() => {
94
+ if (typeof globalThis !== "undefined")
95
+ return globalThis;
96
+ return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
97
+ })();
98
+ const isContextDefined = (context) => !isUndefined(context) && context !== _global;
99
+ function merge() {
100
+ const { caseless } = isContextDefined(this) && this || {};
101
+ const result = {};
102
+ const assignValue = (val, key) => {
103
+ const targetKey = caseless && findKey(result, key) || key;
104
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
105
+ result[targetKey] = merge(result[targetKey], val);
106
+ } else if (isPlainObject(val)) {
107
+ result[targetKey] = merge({}, val);
108
+ } else if (isArray(val)) {
109
+ result[targetKey] = val.slice();
110
+ } else {
111
+ result[targetKey] = val;
112
+ }
113
+ };
114
+ for (let i = 0, l = arguments.length; i < l; i++) {
115
+ arguments[i] && forEach(arguments[i], assignValue);
116
+ }
117
+ return result;
118
+ }
119
+ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
120
+ forEach(b, (val, key) => {
121
+ if (thisArg && isFunction(val)) {
122
+ a[key] = bind(val, thisArg);
123
+ } else {
124
+ a[key] = val;
125
+ }
126
+ }, { allOwnKeys });
127
+ return a;
128
+ };
129
+ const stripBOM = (content) => {
130
+ if (content.charCodeAt(0) === 65279) {
131
+ content = content.slice(1);
132
+ }
133
+ return content;
134
+ };
135
+ const inherits = (constructor, superConstructor, props, descriptors2) => {
136
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
137
+ constructor.prototype.constructor = constructor;
138
+ Object.defineProperty(constructor, "super", {
139
+ value: superConstructor.prototype
140
+ });
141
+ props && Object.assign(constructor.prototype, props);
142
+ };
143
+ const toFlatObject = (sourceObj, destObj, filter2, propFilter) => {
144
+ let props;
145
+ let i;
146
+ let prop;
147
+ const merged = {};
148
+ destObj = destObj || {};
149
+ if (sourceObj == null)
150
+ return destObj;
151
+ do {
152
+ props = Object.getOwnPropertyNames(sourceObj);
153
+ i = props.length;
154
+ while (i-- > 0) {
155
+ prop = props[i];
156
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
157
+ destObj[prop] = sourceObj[prop];
158
+ merged[prop] = true;
159
+ }
160
+ }
161
+ sourceObj = filter2 !== false && getPrototypeOf(sourceObj);
162
+ } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype);
163
+ return destObj;
164
+ };
165
+ const endsWith = (str, searchString, position) => {
166
+ str = String(str);
167
+ if (position === void 0 || position > str.length) {
168
+ position = str.length;
169
+ }
170
+ position -= searchString.length;
171
+ const lastIndex = str.indexOf(searchString, position);
172
+ return lastIndex !== -1 && lastIndex === position;
173
+ };
174
+ const toArray = (thing) => {
175
+ if (!thing)
176
+ return null;
177
+ if (isArray(thing))
178
+ return thing;
179
+ let i = thing.length;
180
+ if (!isNumber(i))
181
+ return null;
182
+ const arr = new Array(i);
183
+ while (i-- > 0) {
184
+ arr[i] = thing[i];
185
+ }
186
+ return arr;
187
+ };
188
+ const isTypedArray = /* @__PURE__ */ ((TypedArray) => {
189
+ return (thing) => {
190
+ return TypedArray && thing instanceof TypedArray;
191
+ };
192
+ })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
193
+ const forEachEntry = (obj, fn) => {
194
+ const generator = obj && obj[Symbol.iterator];
195
+ const iterator = generator.call(obj);
196
+ let result;
197
+ while ((result = iterator.next()) && !result.done) {
198
+ const pair = result.value;
199
+ fn.call(obj, pair[0], pair[1]);
200
+ }
201
+ };
202
+ const matchAll = (regExp, str) => {
203
+ let matches;
204
+ const arr = [];
205
+ while ((matches = regExp.exec(str)) !== null) {
206
+ arr.push(matches);
207
+ }
208
+ return arr;
209
+ };
210
+ const isHTMLForm = kindOfTest("HTMLFormElement");
211
+ const toCamelCase = (str) => {
212
+ return str.toLowerCase().replace(
213
+ /[-_\s]([a-z\d])(\w*)/g,
214
+ function replacer(m, p1, p2) {
215
+ return p1.toUpperCase() + p2;
216
+ }
217
+ );
218
+ };
219
+ const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
220
+ const isRegExp = kindOfTest("RegExp");
221
+ const reduceDescriptors = (obj, reducer) => {
222
+ const descriptors2 = Object.getOwnPropertyDescriptors(obj);
223
+ const reducedDescriptors = {};
224
+ forEach(descriptors2, (descriptor, name) => {
225
+ let ret;
226
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
227
+ reducedDescriptors[name] = ret || descriptor;
228
+ }
229
+ });
230
+ Object.defineProperties(obj, reducedDescriptors);
231
+ };
232
+ const freezeMethods = (obj) => {
233
+ reduceDescriptors(obj, (descriptor, name) => {
234
+ if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
235
+ return false;
236
+ }
237
+ const value = obj[name];
238
+ if (!isFunction(value))
239
+ return;
240
+ descriptor.enumerable = false;
241
+ if ("writable" in descriptor) {
242
+ descriptor.writable = false;
243
+ return;
244
+ }
245
+ if (!descriptor.set) {
246
+ descriptor.set = () => {
247
+ throw Error("Can not rewrite read-only method '" + name + "'");
248
+ };
249
+ }
250
+ });
251
+ };
252
+ const toObjectSet = (arrayOrString, delimiter) => {
253
+ const obj = {};
254
+ const define = (arr) => {
255
+ arr.forEach((value) => {
256
+ obj[value] = true;
257
+ });
258
+ };
259
+ isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
260
+ return obj;
261
+ };
262
+ const noop = () => {
263
+ };
264
+ const toFiniteNumber = (value, defaultValue) => {
265
+ value = +value;
266
+ return Number.isFinite(value) ? value : defaultValue;
267
+ };
268
+ const ALPHA = "abcdefghijklmnopqrstuvwxyz";
269
+ const DIGIT = "0123456789";
270
+ const ALPHABET = {
271
+ DIGIT,
272
+ ALPHA,
273
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
274
+ };
275
+ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
276
+ let str = "";
277
+ const { length } = alphabet;
278
+ while (size--) {
279
+ str += alphabet[Math.random() * length | 0];
280
+ }
281
+ return str;
282
+ };
283
+ function isSpecCompliantForm(thing) {
284
+ return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
285
+ }
286
+ const toJSONObject = (obj) => {
287
+ const stack = new Array(10);
288
+ const visit = (source, i) => {
289
+ if (isObject(source)) {
290
+ if (stack.indexOf(source) >= 0) {
291
+ return;
292
+ }
293
+ if (!("toJSON" in source)) {
294
+ stack[i] = source;
295
+ const target = isArray(source) ? [] : {};
296
+ forEach(source, (value, key) => {
297
+ const reducedValue = visit(value, i + 1);
298
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
299
+ });
300
+ stack[i] = void 0;
301
+ return target;
302
+ }
303
+ }
304
+ return source;
305
+ };
306
+ return visit(obj, 0);
307
+ };
308
+ const isAsyncFn = kindOfTest("AsyncFunction");
309
+ const isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
310
+ const utils$1 = {
311
+ isArray,
312
+ isArrayBuffer,
313
+ isBuffer,
314
+ isFormData,
315
+ isArrayBufferView,
316
+ isString,
317
+ isNumber,
318
+ isBoolean,
319
+ isObject,
320
+ isPlainObject,
321
+ isUndefined,
322
+ isDate,
323
+ isFile,
324
+ isBlob,
325
+ isRegExp,
326
+ isFunction,
327
+ isStream,
328
+ isURLSearchParams,
329
+ isTypedArray,
330
+ isFileList,
331
+ forEach,
332
+ merge,
333
+ extend,
334
+ trim,
335
+ stripBOM,
336
+ inherits,
337
+ toFlatObject,
338
+ kindOf,
339
+ kindOfTest,
340
+ endsWith,
341
+ toArray,
342
+ forEachEntry,
343
+ matchAll,
344
+ isHTMLForm,
345
+ hasOwnProperty,
346
+ hasOwnProp: hasOwnProperty,
347
+ // an alias to avoid ESLint no-prototype-builtins detection
348
+ reduceDescriptors,
349
+ freezeMethods,
350
+ toObjectSet,
351
+ toCamelCase,
352
+ noop,
353
+ toFiniteNumber,
354
+ findKey,
355
+ global: _global,
356
+ isContextDefined,
357
+ ALPHABET,
358
+ generateString,
359
+ isSpecCompliantForm,
360
+ toJSONObject,
361
+ isAsyncFn,
362
+ isThenable
363
+ };
364
+ function AxiosError(message, code, config, request, response) {
365
+ Error.call(this);
366
+ if (Error.captureStackTrace) {
367
+ Error.captureStackTrace(this, this.constructor);
368
+ } else {
369
+ this.stack = new Error().stack;
370
+ }
371
+ this.message = message;
372
+ this.name = "AxiosError";
373
+ code && (this.code = code);
374
+ config && (this.config = config);
375
+ request && (this.request = request);
376
+ response && (this.response = response);
377
+ }
378
+ utils$1.inherits(AxiosError, Error, {
379
+ toJSON: function toJSON() {
380
+ return {
381
+ // Standard
382
+ message: this.message,
383
+ name: this.name,
384
+ // Microsoft
385
+ description: this.description,
386
+ number: this.number,
387
+ // Mozilla
388
+ fileName: this.fileName,
389
+ lineNumber: this.lineNumber,
390
+ columnNumber: this.columnNumber,
391
+ stack: this.stack,
392
+ // Axios
393
+ config: utils$1.toJSONObject(this.config),
394
+ code: this.code,
395
+ status: this.response && this.response.status ? this.response.status : null
396
+ };
397
+ }
398
+ });
399
+ const prototype$1 = AxiosError.prototype;
400
+ const descriptors = {};
401
+ [
402
+ "ERR_BAD_OPTION_VALUE",
403
+ "ERR_BAD_OPTION",
404
+ "ECONNABORTED",
405
+ "ETIMEDOUT",
406
+ "ERR_NETWORK",
407
+ "ERR_FR_TOO_MANY_REDIRECTS",
408
+ "ERR_DEPRECATED",
409
+ "ERR_BAD_RESPONSE",
410
+ "ERR_BAD_REQUEST",
411
+ "ERR_CANCELED",
412
+ "ERR_NOT_SUPPORT",
413
+ "ERR_INVALID_URL"
414
+ // eslint-disable-next-line func-names
415
+ ].forEach((code) => {
416
+ descriptors[code] = { value: code };
417
+ });
418
+ Object.defineProperties(AxiosError, descriptors);
419
+ Object.defineProperty(prototype$1, "isAxiosError", { value: true });
420
+ AxiosError.from = (error, code, config, request, response, customProps) => {
421
+ const axiosError = Object.create(prototype$1);
422
+ utils$1.toFlatObject(error, axiosError, function filter2(obj) {
423
+ return obj !== Error.prototype;
424
+ }, (prop) => {
425
+ return prop !== "isAxiosError";
426
+ });
427
+ AxiosError.call(axiosError, error.message, code, config, request, response);
428
+ axiosError.cause = error;
429
+ axiosError.name = error.name;
430
+ customProps && Object.assign(axiosError, customProps);
431
+ return axiosError;
432
+ };
433
+ const httpAdapter = null;
434
+ function isVisitable(thing) {
435
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
436
+ }
437
+ function removeBrackets(key) {
438
+ return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
439
+ }
440
+ function renderKey(path, key, dots) {
441
+ if (!path)
442
+ return key;
443
+ return path.concat(key).map(function each(token, i) {
444
+ token = removeBrackets(token);
445
+ return !dots && i ? "[" + token + "]" : token;
446
+ }).join(dots ? "." : "");
447
+ }
448
+ function isFlatArray(arr) {
449
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
450
+ }
451
+ const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
452
+ return /^is[A-Z]/.test(prop);
453
+ });
454
+ function toFormData(obj, formData, options) {
455
+ if (!utils$1.isObject(obj)) {
456
+ throw new TypeError("target must be an object");
457
+ }
458
+ formData = formData || new FormData();
459
+ options = utils$1.toFlatObject(options, {
460
+ metaTokens: true,
461
+ dots: false,
462
+ indexes: false
463
+ }, false, function defined(option, source) {
464
+ return !utils$1.isUndefined(source[option]);
465
+ });
466
+ const metaTokens = options.metaTokens;
467
+ const visitor = options.visitor || defaultVisitor;
468
+ const dots = options.dots;
469
+ const indexes = options.indexes;
470
+ const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
471
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
472
+ if (!utils$1.isFunction(visitor)) {
473
+ throw new TypeError("visitor must be a function");
474
+ }
475
+ function convertValue(value) {
476
+ if (value === null)
477
+ return "";
478
+ if (utils$1.isDate(value)) {
479
+ return value.toISOString();
480
+ }
481
+ if (!useBlob && utils$1.isBlob(value)) {
482
+ throw new AxiosError("Blob is not supported. Use a Buffer instead.");
483
+ }
484
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
485
+ return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
486
+ }
487
+ return value;
488
+ }
489
+ function defaultVisitor(value, key, path) {
490
+ let arr = value;
491
+ if (value && !path && typeof value === "object") {
492
+ if (utils$1.endsWith(key, "{}")) {
493
+ key = metaTokens ? key : key.slice(0, -2);
494
+ value = JSON.stringify(value);
495
+ } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
496
+ key = removeBrackets(key);
497
+ arr.forEach(function each(el, index) {
498
+ !(utils$1.isUndefined(el) || el === null) && formData.append(
499
+ // eslint-disable-next-line no-nested-ternary
500
+ indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]",
501
+ convertValue(el)
502
+ );
503
+ });
504
+ return false;
505
+ }
506
+ }
507
+ if (isVisitable(value)) {
508
+ return true;
509
+ }
510
+ formData.append(renderKey(path, key, dots), convertValue(value));
511
+ return false;
512
+ }
513
+ const stack = [];
514
+ const exposedHelpers = Object.assign(predicates, {
515
+ defaultVisitor,
516
+ convertValue,
517
+ isVisitable
518
+ });
519
+ function build(value, path) {
520
+ if (utils$1.isUndefined(value))
521
+ return;
522
+ if (stack.indexOf(value) !== -1) {
523
+ throw Error("Circular reference detected in " + path.join("."));
524
+ }
525
+ stack.push(value);
526
+ utils$1.forEach(value, function each(el, key) {
527
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
528
+ formData,
529
+ el,
530
+ utils$1.isString(key) ? key.trim() : key,
531
+ path,
532
+ exposedHelpers
533
+ );
534
+ if (result === true) {
535
+ build(el, path ? path.concat(key) : [key]);
536
+ }
537
+ });
538
+ stack.pop();
539
+ }
540
+ if (!utils$1.isObject(obj)) {
541
+ throw new TypeError("data must be an object");
542
+ }
543
+ build(obj);
544
+ return formData;
545
+ }
546
+ function encode$1(str) {
547
+ const charMap = {
548
+ "!": "%21",
549
+ "'": "%27",
550
+ "(": "%28",
551
+ ")": "%29",
552
+ "~": "%7E",
553
+ "%20": "+",
554
+ "%00": "\0"
555
+ };
556
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
557
+ return charMap[match];
558
+ });
559
+ }
560
+ function AxiosURLSearchParams(params, options) {
561
+ this._pairs = [];
562
+ params && toFormData(params, this, options);
563
+ }
564
+ const prototype = AxiosURLSearchParams.prototype;
565
+ prototype.append = function append(name, value) {
566
+ this._pairs.push([name, value]);
567
+ };
568
+ prototype.toString = function toString2(encoder) {
569
+ const _encode = encoder ? function(value) {
570
+ return encoder.call(this, value, encode$1);
571
+ } : encode$1;
572
+ return this._pairs.map(function each(pair) {
573
+ return _encode(pair[0]) + "=" + _encode(pair[1]);
574
+ }, "").join("&");
575
+ };
576
+ function encode(val) {
577
+ return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
578
+ }
579
+ function buildURL(url, params, options) {
580
+ if (!params) {
581
+ return url;
582
+ }
583
+ const _encode = options && options.encode || encode;
584
+ const serializeFn = options && options.serialize;
585
+ let serializedParams;
586
+ if (serializeFn) {
587
+ serializedParams = serializeFn(params, options);
588
+ } else {
589
+ serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
590
+ }
591
+ if (serializedParams) {
592
+ const hashmarkIndex = url.indexOf("#");
593
+ if (hashmarkIndex !== -1) {
594
+ url = url.slice(0, hashmarkIndex);
595
+ }
596
+ url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
597
+ }
598
+ return url;
599
+ }
600
+ class InterceptorManager {
601
+ constructor() {
602
+ this.handlers = [];
603
+ }
604
+ /**
605
+ * Add a new interceptor to the stack
606
+ *
607
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
608
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
609
+ *
610
+ * @return {Number} An ID used to remove interceptor later
611
+ */
612
+ use(fulfilled, rejected, options) {
613
+ this.handlers.push({
614
+ fulfilled,
615
+ rejected,
616
+ synchronous: options ? options.synchronous : false,
617
+ runWhen: options ? options.runWhen : null
618
+ });
619
+ return this.handlers.length - 1;
620
+ }
621
+ /**
622
+ * Remove an interceptor from the stack
623
+ *
624
+ * @param {Number} id The ID that was returned by `use`
625
+ *
626
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
627
+ */
628
+ eject(id) {
629
+ if (this.handlers[id]) {
630
+ this.handlers[id] = null;
631
+ }
632
+ }
633
+ /**
634
+ * Clear all interceptors from the stack
635
+ *
636
+ * @returns {void}
637
+ */
638
+ clear() {
639
+ if (this.handlers) {
640
+ this.handlers = [];
641
+ }
642
+ }
643
+ /**
644
+ * Iterate over all the registered interceptors
645
+ *
646
+ * This method is particularly useful for skipping over any
647
+ * interceptors that may have become `null` calling `eject`.
648
+ *
649
+ * @param {Function} fn The function to call for each interceptor
650
+ *
651
+ * @returns {void}
652
+ */
653
+ forEach(fn) {
654
+ utils$1.forEach(this.handlers, function forEachHandler(h2) {
655
+ if (h2 !== null) {
656
+ fn(h2);
657
+ }
658
+ });
659
+ }
660
+ }
661
+ const transitionalDefaults = {
662
+ silentJSONParsing: true,
663
+ forcedJSONParsing: true,
664
+ clarifyTimeoutError: false
665
+ };
666
+ const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
667
+ const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
668
+ const Blob$1 = typeof Blob !== "undefined" ? Blob : null;
669
+ const platform$1 = {
670
+ isBrowser: true,
671
+ classes: {
672
+ URLSearchParams: URLSearchParams$1,
673
+ FormData: FormData$1,
674
+ Blob: Blob$1
675
+ },
676
+ protocols: ["http", "https", "file", "blob", "url", "data"]
677
+ };
678
+ const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
679
+ const hasStandardBrowserEnv = ((product) => {
680
+ return hasBrowserEnv && ["ReactNative", "NativeScript", "NS"].indexOf(product) < 0;
681
+ })(typeof navigator !== "undefined" && navigator.product);
682
+ const hasStandardBrowserWebWorkerEnv = (() => {
683
+ return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
684
+ self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
685
+ })();
686
+ const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
687
+ __proto__: null,
688
+ hasBrowserEnv,
689
+ hasStandardBrowserEnv,
690
+ hasStandardBrowserWebWorkerEnv
691
+ }, Symbol.toStringTag, { value: "Module" }));
692
+ const platform = {
693
+ ...utils,
694
+ ...platform$1
695
+ };
696
+ function toURLEncodedForm(data, options) {
697
+ return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
698
+ visitor: function(value, key, path, helpers) {
699
+ if (platform.isNode && utils$1.isBuffer(value)) {
700
+ this.append(key, value.toString("base64"));
701
+ return false;
702
+ }
703
+ return helpers.defaultVisitor.apply(this, arguments);
704
+ }
705
+ }, options));
706
+ }
707
+ function parsePropPath(name) {
708
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
709
+ return match[0] === "[]" ? "" : match[1] || match[0];
710
+ });
711
+ }
712
+ function arrayToObject(arr) {
713
+ const obj = {};
714
+ const keys = Object.keys(arr);
715
+ let i;
716
+ const len = keys.length;
717
+ let key;
718
+ for (i = 0; i < len; i++) {
719
+ key = keys[i];
720
+ obj[key] = arr[key];
721
+ }
722
+ return obj;
723
+ }
724
+ function formDataToJSON(formData) {
725
+ function buildPath(path, value, target, index) {
726
+ let name = path[index++];
727
+ if (name === "__proto__")
728
+ return true;
729
+ const isNumericKey = Number.isFinite(+name);
730
+ const isLast = index >= path.length;
731
+ name = !name && utils$1.isArray(target) ? target.length : name;
732
+ if (isLast) {
733
+ if (utils$1.hasOwnProp(target, name)) {
734
+ target[name] = [target[name], value];
735
+ } else {
736
+ target[name] = value;
737
+ }
738
+ return !isNumericKey;
739
+ }
740
+ if (!target[name] || !utils$1.isObject(target[name])) {
741
+ target[name] = [];
742
+ }
743
+ const result = buildPath(path, value, target[name], index);
744
+ if (result && utils$1.isArray(target[name])) {
745
+ target[name] = arrayToObject(target[name]);
746
+ }
747
+ return !isNumericKey;
748
+ }
749
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
750
+ const obj = {};
751
+ utils$1.forEachEntry(formData, (name, value) => {
752
+ buildPath(parsePropPath(name), value, obj, 0);
753
+ });
754
+ return obj;
755
+ }
756
+ return null;
757
+ }
758
+ function stringifySafely(rawValue, parser, encoder) {
759
+ if (utils$1.isString(rawValue)) {
760
+ try {
761
+ (parser || JSON.parse)(rawValue);
762
+ return utils$1.trim(rawValue);
763
+ } catch (e) {
764
+ if (e.name !== "SyntaxError") {
765
+ throw e;
766
+ }
767
+ }
768
+ }
769
+ return (encoder || JSON.stringify)(rawValue);
770
+ }
771
+ const defaults = {
772
+ transitional: transitionalDefaults,
773
+ adapter: ["xhr", "http"],
774
+ transformRequest: [function transformRequest(data, headers) {
775
+ const contentType = headers.getContentType() || "";
776
+ const hasJSONContentType = contentType.indexOf("application/json") > -1;
777
+ const isObjectPayload = utils$1.isObject(data);
778
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
779
+ data = new FormData(data);
780
+ }
781
+ const isFormData2 = utils$1.isFormData(data);
782
+ if (isFormData2) {
783
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
784
+ }
785
+ if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data)) {
786
+ return data;
787
+ }
788
+ if (utils$1.isArrayBufferView(data)) {
789
+ return data.buffer;
790
+ }
791
+ if (utils$1.isURLSearchParams(data)) {
792
+ headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
793
+ return data.toString();
794
+ }
795
+ let isFileList2;
796
+ if (isObjectPayload) {
797
+ if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
798
+ return toURLEncodedForm(data, this.formSerializer).toString();
799
+ }
800
+ if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
801
+ const _FormData = this.env && this.env.FormData;
802
+ return toFormData(
803
+ isFileList2 ? { "files[]": data } : data,
804
+ _FormData && new _FormData(),
805
+ this.formSerializer
806
+ );
807
+ }
808
+ }
809
+ if (isObjectPayload || hasJSONContentType) {
810
+ headers.setContentType("application/json", false);
811
+ return stringifySafely(data);
812
+ }
813
+ return data;
814
+ }],
815
+ transformResponse: [function transformResponse(data) {
816
+ const transitional2 = this.transitional || defaults.transitional;
817
+ const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
818
+ const JSONRequested = this.responseType === "json";
819
+ if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
820
+ const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
821
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
822
+ try {
823
+ return JSON.parse(data);
824
+ } catch (e) {
825
+ if (strictJSONParsing) {
826
+ if (e.name === "SyntaxError") {
827
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
828
+ }
829
+ throw e;
830
+ }
831
+ }
832
+ }
833
+ return data;
834
+ }],
835
+ /**
836
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
837
+ * timeout is not created.
838
+ */
839
+ timeout: 0,
840
+ xsrfCookieName: "XSRF-TOKEN",
841
+ xsrfHeaderName: "X-XSRF-TOKEN",
842
+ maxContentLength: -1,
843
+ maxBodyLength: -1,
844
+ env: {
845
+ FormData: platform.classes.FormData,
846
+ Blob: platform.classes.Blob
847
+ },
848
+ validateStatus: function validateStatus(status) {
849
+ return status >= 200 && status < 300;
850
+ },
851
+ headers: {
852
+ common: {
853
+ "Accept": "application/json, text/plain, */*",
854
+ "Content-Type": void 0
855
+ }
856
+ }
857
+ };
858
+ utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
859
+ defaults.headers[method] = {};
860
+ });
861
+ const defaults$1 = defaults;
862
+ const ignoreDuplicateOf = utils$1.toObjectSet([
863
+ "age",
864
+ "authorization",
865
+ "content-length",
866
+ "content-type",
867
+ "etag",
868
+ "expires",
869
+ "from",
870
+ "host",
871
+ "if-modified-since",
872
+ "if-unmodified-since",
873
+ "last-modified",
874
+ "location",
875
+ "max-forwards",
876
+ "proxy-authorization",
877
+ "referer",
878
+ "retry-after",
879
+ "user-agent"
880
+ ]);
881
+ const parseHeaders = (rawHeaders) => {
882
+ const parsed = {};
883
+ let key;
884
+ let val;
885
+ let i;
886
+ rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
887
+ i = line.indexOf(":");
888
+ key = line.substring(0, i).trim().toLowerCase();
889
+ val = line.substring(i + 1).trim();
890
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) {
891
+ return;
892
+ }
893
+ if (key === "set-cookie") {
894
+ if (parsed[key]) {
895
+ parsed[key].push(val);
896
+ } else {
897
+ parsed[key] = [val];
898
+ }
899
+ } else {
900
+ parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
901
+ }
902
+ });
903
+ return parsed;
904
+ };
905
+ const $internals = Symbol("internals");
906
+ function normalizeHeader(header) {
907
+ return header && String(header).trim().toLowerCase();
908
+ }
909
+ function normalizeValue(value) {
910
+ if (value === false || value == null) {
911
+ return value;
912
+ }
913
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
914
+ }
915
+ function parseTokens(str) {
916
+ const tokens = /* @__PURE__ */ Object.create(null);
917
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
918
+ let match;
919
+ while (match = tokensRE.exec(str)) {
920
+ tokens[match[1]] = match[2];
921
+ }
922
+ return tokens;
923
+ }
924
+ const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
925
+ function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
926
+ if (utils$1.isFunction(filter2)) {
927
+ return filter2.call(this, value, header);
928
+ }
929
+ if (isHeaderNameFilter) {
930
+ value = header;
931
+ }
932
+ if (!utils$1.isString(value))
933
+ return;
934
+ if (utils$1.isString(filter2)) {
935
+ return value.indexOf(filter2) !== -1;
936
+ }
937
+ if (utils$1.isRegExp(filter2)) {
938
+ return filter2.test(value);
939
+ }
940
+ }
941
+ function formatHeader(header) {
942
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
943
+ return char.toUpperCase() + str;
944
+ });
945
+ }
946
+ function buildAccessors(obj, header) {
947
+ const accessorName = utils$1.toCamelCase(" " + header);
948
+ ["get", "set", "has"].forEach((methodName) => {
949
+ Object.defineProperty(obj, methodName + accessorName, {
950
+ value: function(arg1, arg2, arg3) {
951
+ return this[methodName].call(this, header, arg1, arg2, arg3);
952
+ },
953
+ configurable: true
954
+ });
955
+ });
956
+ }
957
+ class AxiosHeaders {
958
+ constructor(headers) {
959
+ headers && this.set(headers);
960
+ }
961
+ set(header, valueOrRewrite, rewrite) {
962
+ const self2 = this;
963
+ function setHeader(_value, _header, _rewrite) {
964
+ const lHeader = normalizeHeader(_header);
965
+ if (!lHeader) {
966
+ throw new Error("header name must be a non-empty string");
967
+ }
968
+ const key = utils$1.findKey(self2, lHeader);
969
+ if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
970
+ self2[key || _header] = normalizeValue(_value);
971
+ }
972
+ }
973
+ const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
974
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
975
+ setHeaders(header, valueOrRewrite);
976
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
977
+ setHeaders(parseHeaders(header), valueOrRewrite);
978
+ } else {
979
+ header != null && setHeader(valueOrRewrite, header, rewrite);
980
+ }
981
+ return this;
982
+ }
983
+ get(header, parser) {
984
+ header = normalizeHeader(header);
985
+ if (header) {
986
+ const key = utils$1.findKey(this, header);
987
+ if (key) {
988
+ const value = this[key];
989
+ if (!parser) {
990
+ return value;
991
+ }
992
+ if (parser === true) {
993
+ return parseTokens(value);
994
+ }
995
+ if (utils$1.isFunction(parser)) {
996
+ return parser.call(this, value, key);
997
+ }
998
+ if (utils$1.isRegExp(parser)) {
999
+ return parser.exec(value);
1000
+ }
1001
+ throw new TypeError("parser must be boolean|regexp|function");
1002
+ }
1003
+ }
1004
+ }
1005
+ has(header, matcher) {
1006
+ header = normalizeHeader(header);
1007
+ if (header) {
1008
+ const key = utils$1.findKey(this, header);
1009
+ return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
1010
+ }
1011
+ return false;
1012
+ }
1013
+ delete(header, matcher) {
1014
+ const self2 = this;
1015
+ let deleted = false;
1016
+ function deleteHeader(_header) {
1017
+ _header = normalizeHeader(_header);
1018
+ if (_header) {
1019
+ const key = utils$1.findKey(self2, _header);
1020
+ if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
1021
+ delete self2[key];
1022
+ deleted = true;
1023
+ }
1024
+ }
1025
+ }
1026
+ if (utils$1.isArray(header)) {
1027
+ header.forEach(deleteHeader);
1028
+ } else {
1029
+ deleteHeader(header);
1030
+ }
1031
+ return deleted;
1032
+ }
1033
+ clear(matcher) {
1034
+ const keys = Object.keys(this);
1035
+ let i = keys.length;
1036
+ let deleted = false;
1037
+ while (i--) {
1038
+ const key = keys[i];
1039
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
1040
+ delete this[key];
1041
+ deleted = true;
1042
+ }
1043
+ }
1044
+ return deleted;
1045
+ }
1046
+ normalize(format) {
1047
+ const self2 = this;
1048
+ const headers = {};
1049
+ utils$1.forEach(this, (value, header) => {
1050
+ const key = utils$1.findKey(headers, header);
1051
+ if (key) {
1052
+ self2[key] = normalizeValue(value);
1053
+ delete self2[header];
1054
+ return;
1055
+ }
1056
+ const normalized = format ? formatHeader(header) : String(header).trim();
1057
+ if (normalized !== header) {
1058
+ delete self2[header];
1059
+ }
1060
+ self2[normalized] = normalizeValue(value);
1061
+ headers[normalized] = true;
1062
+ });
1063
+ return this;
1064
+ }
1065
+ concat(...targets) {
1066
+ return this.constructor.concat(this, ...targets);
1067
+ }
1068
+ toJSON(asStrings) {
1069
+ const obj = /* @__PURE__ */ Object.create(null);
1070
+ utils$1.forEach(this, (value, header) => {
1071
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
1072
+ });
1073
+ return obj;
1074
+ }
1075
+ [Symbol.iterator]() {
1076
+ return Object.entries(this.toJSON())[Symbol.iterator]();
1077
+ }
1078
+ toString() {
1079
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
1080
+ }
1081
+ get [Symbol.toStringTag]() {
1082
+ return "AxiosHeaders";
1083
+ }
1084
+ static from(thing) {
1085
+ return thing instanceof this ? thing : new this(thing);
1086
+ }
1087
+ static concat(first, ...targets) {
1088
+ const computed2 = new this(first);
1089
+ targets.forEach((target) => computed2.set(target));
1090
+ return computed2;
1091
+ }
1092
+ static accessor(header) {
1093
+ const internals = this[$internals] = this[$internals] = {
1094
+ accessors: {}
1095
+ };
1096
+ const accessors = internals.accessors;
1097
+ const prototype2 = this.prototype;
1098
+ function defineAccessor(_header) {
1099
+ const lHeader = normalizeHeader(_header);
1100
+ if (!accessors[lHeader]) {
1101
+ buildAccessors(prototype2, _header);
1102
+ accessors[lHeader] = true;
1103
+ }
1104
+ }
1105
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
1106
+ return this;
1107
+ }
1108
+ }
1109
+ AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1110
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
1111
+ let mapped = key[0].toUpperCase() + key.slice(1);
1112
+ return {
1113
+ get: () => value,
1114
+ set(headerValue) {
1115
+ this[mapped] = headerValue;
1116
+ }
1117
+ };
1118
+ });
1119
+ utils$1.freezeMethods(AxiosHeaders);
1120
+ const AxiosHeaders$1 = AxiosHeaders;
1121
+ function transformData(fns, response) {
1122
+ const config = this || defaults$1;
1123
+ const context = response || config;
1124
+ const headers = AxiosHeaders$1.from(context.headers);
1125
+ let data = context.data;
1126
+ utils$1.forEach(fns, function transform(fn) {
1127
+ data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
1128
+ });
1129
+ headers.normalize();
1130
+ return data;
1131
+ }
1132
+ function isCancel(value) {
1133
+ return !!(value && value.__CANCEL__);
1134
+ }
1135
+ function CanceledError(message, config, request) {
1136
+ AxiosError.call(this, message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config, request);
1137
+ this.name = "CanceledError";
1138
+ }
1139
+ utils$1.inherits(CanceledError, AxiosError, {
1140
+ __CANCEL__: true
1141
+ });
1142
+ function settle(resolve, reject, response) {
1143
+ const validateStatus2 = response.config.validateStatus;
1144
+ if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
1145
+ resolve(response);
1146
+ } else {
1147
+ reject(new AxiosError(
1148
+ "Request failed with status code " + response.status,
1149
+ [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
1150
+ response.config,
1151
+ response.request,
1152
+ response
1153
+ ));
1154
+ }
1155
+ }
1156
+ const cookies = platform.hasStandardBrowserEnv ? (
1157
+ // Standard browser envs support document.cookie
1158
+ {
1159
+ write(name, value, expires, path, domain, secure) {
1160
+ const cookie = [name + "=" + encodeURIComponent(value)];
1161
+ utils$1.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
1162
+ utils$1.isString(path) && cookie.push("path=" + path);
1163
+ utils$1.isString(domain) && cookie.push("domain=" + domain);
1164
+ secure === true && cookie.push("secure");
1165
+ document.cookie = cookie.join("; ");
1166
+ },
1167
+ read(name) {
1168
+ const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
1169
+ return match ? decodeURIComponent(match[3]) : null;
1170
+ },
1171
+ remove(name) {
1172
+ this.write(name, "", Date.now() - 864e5);
1173
+ }
1174
+ }
1175
+ ) : (
1176
+ // Non-standard browser env (web workers, react-native) lack needed support.
1177
+ {
1178
+ write() {
1179
+ },
1180
+ read() {
1181
+ return null;
1182
+ },
1183
+ remove() {
1184
+ }
1185
+ }
1186
+ );
1187
+ function isAbsoluteURL(url) {
1188
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
1189
+ }
1190
+ function combineURLs(baseURL, relativeURL) {
1191
+ return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
1192
+ }
1193
+ function buildFullPath(baseURL, requestedURL) {
1194
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
1195
+ return combineURLs(baseURL, requestedURL);
1196
+ }
1197
+ return requestedURL;
1198
+ }
1199
+ const isURLSameOrigin = platform.hasStandardBrowserEnv ? (
1200
+ // Standard browser envs have full support of the APIs needed to test
1201
+ // whether the request URL is of the same origin as current location.
1202
+ function standardBrowserEnv() {
1203
+ const msie = /(msie|trident)/i.test(navigator.userAgent);
1204
+ const urlParsingNode = document.createElement("a");
1205
+ let originURL;
1206
+ function resolveURL(url) {
1207
+ let href = url;
1208
+ if (msie) {
1209
+ urlParsingNode.setAttribute("href", href);
1210
+ href = urlParsingNode.href;
1211
+ }
1212
+ urlParsingNode.setAttribute("href", href);
1213
+ return {
1214
+ href: urlParsingNode.href,
1215
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
1216
+ host: urlParsingNode.host,
1217
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
1218
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
1219
+ hostname: urlParsingNode.hostname,
1220
+ port: urlParsingNode.port,
1221
+ pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
1222
+ };
1223
+ }
1224
+ originURL = resolveURL(window.location.href);
1225
+ return function isURLSameOrigin2(requestURL) {
1226
+ const parsed = utils$1.isString(requestURL) ? resolveURL(requestURL) : requestURL;
1227
+ return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
1228
+ };
1229
+ }()
1230
+ ) : (
1231
+ // Non standard browser envs (web workers, react-native) lack needed support.
1232
+ /* @__PURE__ */ function nonStandardBrowserEnv() {
1233
+ return function isURLSameOrigin2() {
1234
+ return true;
1235
+ };
1236
+ }()
1237
+ );
1238
+ function parseProtocol(url) {
1239
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
1240
+ return match && match[1] || "";
1241
+ }
1242
+ function speedometer(samplesCount, min) {
1243
+ samplesCount = samplesCount || 10;
1244
+ const bytes = new Array(samplesCount);
1245
+ const timestamps = new Array(samplesCount);
1246
+ let head = 0;
1247
+ let tail = 0;
1248
+ let firstSampleTS;
1249
+ min = min !== void 0 ? min : 1e3;
1250
+ return function push(chunkLength) {
1251
+ const now = Date.now();
1252
+ const startedAt = timestamps[tail];
1253
+ if (!firstSampleTS) {
1254
+ firstSampleTS = now;
1255
+ }
1256
+ bytes[head] = chunkLength;
1257
+ timestamps[head] = now;
1258
+ let i = tail;
1259
+ let bytesCount = 0;
1260
+ while (i !== head) {
1261
+ bytesCount += bytes[i++];
1262
+ i = i % samplesCount;
1263
+ }
1264
+ head = (head + 1) % samplesCount;
1265
+ if (head === tail) {
1266
+ tail = (tail + 1) % samplesCount;
1267
+ }
1268
+ if (now - firstSampleTS < min) {
1269
+ return;
1270
+ }
1271
+ const passed = startedAt && now - startedAt;
1272
+ return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
1273
+ };
1274
+ }
1275
+ function progressEventReducer(listener, isDownloadStream) {
1276
+ let bytesNotified = 0;
1277
+ const _speedometer = speedometer(50, 250);
1278
+ return (e) => {
1279
+ const loaded = e.loaded;
1280
+ const total = e.lengthComputable ? e.total : void 0;
1281
+ const progressBytes = loaded - bytesNotified;
1282
+ const rate = _speedometer(progressBytes);
1283
+ const inRange = loaded <= total;
1284
+ bytesNotified = loaded;
1285
+ const data = {
1286
+ loaded,
1287
+ total,
1288
+ progress: total ? loaded / total : void 0,
1289
+ bytes: progressBytes,
1290
+ rate: rate ? rate : void 0,
1291
+ estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
1292
+ event: e
1293
+ };
1294
+ data[isDownloadStream ? "download" : "upload"] = true;
1295
+ listener(data);
1296
+ };
1297
+ }
1298
+ const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
1299
+ const xhrAdapter = isXHRAdapterSupported && function(config) {
1300
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
1301
+ let requestData = config.data;
1302
+ const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
1303
+ let { responseType, withXSRFToken } = config;
1304
+ let onCanceled;
1305
+ function done() {
1306
+ if (config.cancelToken) {
1307
+ config.cancelToken.unsubscribe(onCanceled);
1308
+ }
1309
+ if (config.signal) {
1310
+ config.signal.removeEventListener("abort", onCanceled);
1311
+ }
1312
+ }
1313
+ let contentType;
1314
+ if (utils$1.isFormData(requestData)) {
1315
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
1316
+ requestHeaders.setContentType(false);
1317
+ } else if ((contentType = requestHeaders.getContentType()) !== false) {
1318
+ const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
1319
+ requestHeaders.setContentType([type || "multipart/form-data", ...tokens].join("; "));
1320
+ }
1321
+ }
1322
+ let request = new XMLHttpRequest();
1323
+ if (config.auth) {
1324
+ const username = config.auth.username || "";
1325
+ const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
1326
+ requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password));
1327
+ }
1328
+ const fullPath = buildFullPath(config.baseURL, config.url);
1329
+ request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
1330
+ request.timeout = config.timeout;
1331
+ function onloadend() {
1332
+ if (!request) {
1333
+ return;
1334
+ }
1335
+ const responseHeaders = AxiosHeaders$1.from(
1336
+ "getAllResponseHeaders" in request && request.getAllResponseHeaders()
1337
+ );
1338
+ const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
1339
+ const response = {
1340
+ data: responseData,
1341
+ status: request.status,
1342
+ statusText: request.statusText,
1343
+ headers: responseHeaders,
1344
+ config,
1345
+ request
1346
+ };
1347
+ settle(function _resolve(value) {
1348
+ resolve(value);
1349
+ done();
1350
+ }, function _reject(err) {
1351
+ reject(err);
1352
+ done();
1353
+ }, response);
1354
+ request = null;
1355
+ }
1356
+ if ("onloadend" in request) {
1357
+ request.onloadend = onloadend;
1358
+ } else {
1359
+ request.onreadystatechange = function handleLoad() {
1360
+ if (!request || request.readyState !== 4) {
1361
+ return;
1362
+ }
1363
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
1364
+ return;
1365
+ }
1366
+ setTimeout(onloadend);
1367
+ };
1368
+ }
1369
+ request.onabort = function handleAbort() {
1370
+ if (!request) {
1371
+ return;
1372
+ }
1373
+ reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
1374
+ request = null;
1375
+ };
1376
+ request.onerror = function handleError() {
1377
+ reject(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request));
1378
+ request = null;
1379
+ };
1380
+ request.ontimeout = function handleTimeout() {
1381
+ let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
1382
+ const transitional2 = config.transitional || transitionalDefaults;
1383
+ if (config.timeoutErrorMessage) {
1384
+ timeoutErrorMessage = config.timeoutErrorMessage;
1385
+ }
1386
+ reject(new AxiosError(
1387
+ timeoutErrorMessage,
1388
+ transitional2.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
1389
+ config,
1390
+ request
1391
+ ));
1392
+ request = null;
1393
+ };
1394
+ if (platform.hasStandardBrowserEnv) {
1395
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
1396
+ if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(fullPath)) {
1397
+ const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
1398
+ if (xsrfValue) {
1399
+ requestHeaders.set(config.xsrfHeaderName, xsrfValue);
1400
+ }
1401
+ }
1402
+ }
1403
+ requestData === void 0 && requestHeaders.setContentType(null);
1404
+ if ("setRequestHeader" in request) {
1405
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
1406
+ request.setRequestHeader(key, val);
1407
+ });
1408
+ }
1409
+ if (!utils$1.isUndefined(config.withCredentials)) {
1410
+ request.withCredentials = !!config.withCredentials;
1411
+ }
1412
+ if (responseType && responseType !== "json") {
1413
+ request.responseType = config.responseType;
1414
+ }
1415
+ if (typeof config.onDownloadProgress === "function") {
1416
+ request.addEventListener("progress", progressEventReducer(config.onDownloadProgress, true));
1417
+ }
1418
+ if (typeof config.onUploadProgress === "function" && request.upload) {
1419
+ request.upload.addEventListener("progress", progressEventReducer(config.onUploadProgress));
1420
+ }
1421
+ if (config.cancelToken || config.signal) {
1422
+ onCanceled = (cancel) => {
1423
+ if (!request) {
1424
+ return;
1425
+ }
1426
+ reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
1427
+ request.abort();
1428
+ request = null;
1429
+ };
1430
+ config.cancelToken && config.cancelToken.subscribe(onCanceled);
1431
+ if (config.signal) {
1432
+ config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
1433
+ }
1434
+ }
1435
+ const protocol = parseProtocol(fullPath);
1436
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
1437
+ reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
1438
+ return;
1439
+ }
1440
+ request.send(requestData || null);
1441
+ });
1442
+ };
1443
+ const knownAdapters = {
1444
+ http: httpAdapter,
1445
+ xhr: xhrAdapter
1446
+ };
1447
+ utils$1.forEach(knownAdapters, (fn, value) => {
1448
+ if (fn) {
1449
+ try {
1450
+ Object.defineProperty(fn, "name", { value });
1451
+ } catch (e) {
1452
+ }
1453
+ Object.defineProperty(fn, "adapterName", { value });
1454
+ }
1455
+ });
1456
+ const renderReason = (reason) => `- ${reason}`;
1457
+ const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
1458
+ const adapters = {
1459
+ getAdapter: (adapters2) => {
1460
+ adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
1461
+ const { length } = adapters2;
1462
+ let nameOrAdapter;
1463
+ let adapter;
1464
+ const rejectedReasons = {};
1465
+ for (let i = 0; i < length; i++) {
1466
+ nameOrAdapter = adapters2[i];
1467
+ let id;
1468
+ adapter = nameOrAdapter;
1469
+ if (!isResolvedHandle(nameOrAdapter)) {
1470
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
1471
+ if (adapter === void 0) {
1472
+ throw new AxiosError(`Unknown adapter '${id}'`);
1473
+ }
1474
+ }
1475
+ if (adapter) {
1476
+ break;
1477
+ }
1478
+ rejectedReasons[id || "#" + i] = adapter;
1479
+ }
1480
+ if (!adapter) {
1481
+ const reasons = Object.entries(rejectedReasons).map(
1482
+ ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
1483
+ );
1484
+ let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
1485
+ throw new AxiosError(
1486
+ `There is no suitable adapter to dispatch the request ` + s,
1487
+ "ERR_NOT_SUPPORT"
1488
+ );
1489
+ }
1490
+ return adapter;
1491
+ },
1492
+ adapters: knownAdapters
1493
+ };
1494
+ function throwIfCancellationRequested(config) {
1495
+ if (config.cancelToken) {
1496
+ config.cancelToken.throwIfRequested();
1497
+ }
1498
+ if (config.signal && config.signal.aborted) {
1499
+ throw new CanceledError(null, config);
1500
+ }
1501
+ }
1502
+ function dispatchRequest(config) {
1503
+ throwIfCancellationRequested(config);
1504
+ config.headers = AxiosHeaders$1.from(config.headers);
1505
+ config.data = transformData.call(
1506
+ config,
1507
+ config.transformRequest
1508
+ );
1509
+ if (["post", "put", "patch"].indexOf(config.method) !== -1) {
1510
+ config.headers.setContentType("application/x-www-form-urlencoded", false);
1511
+ }
1512
+ const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
1513
+ return adapter(config).then(function onAdapterResolution(response) {
1514
+ throwIfCancellationRequested(config);
1515
+ response.data = transformData.call(
1516
+ config,
1517
+ config.transformResponse,
1518
+ response
1519
+ );
1520
+ response.headers = AxiosHeaders$1.from(response.headers);
1521
+ return response;
1522
+ }, function onAdapterRejection(reason) {
1523
+ if (!isCancel(reason)) {
1524
+ throwIfCancellationRequested(config);
1525
+ if (reason && reason.response) {
1526
+ reason.response.data = transformData.call(
1527
+ config,
1528
+ config.transformResponse,
1529
+ reason.response
1530
+ );
1531
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
1532
+ }
1533
+ }
1534
+ return Promise.reject(reason);
1535
+ });
1536
+ }
1537
+ const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;
1538
+ function mergeConfig(config1, config2) {
1539
+ config2 = config2 || {};
1540
+ const config = {};
1541
+ function getMergedValue(target, source, caseless) {
1542
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
1543
+ return utils$1.merge.call({ caseless }, target, source);
1544
+ } else if (utils$1.isPlainObject(source)) {
1545
+ return utils$1.merge({}, source);
1546
+ } else if (utils$1.isArray(source)) {
1547
+ return source.slice();
1548
+ }
1549
+ return source;
1550
+ }
1551
+ function mergeDeepProperties(a, b, caseless) {
1552
+ if (!utils$1.isUndefined(b)) {
1553
+ return getMergedValue(a, b, caseless);
1554
+ } else if (!utils$1.isUndefined(a)) {
1555
+ return getMergedValue(void 0, a, caseless);
1556
+ }
1557
+ }
1558
+ function valueFromConfig2(a, b) {
1559
+ if (!utils$1.isUndefined(b)) {
1560
+ return getMergedValue(void 0, b);
1561
+ }
1562
+ }
1563
+ function defaultToConfig2(a, b) {
1564
+ if (!utils$1.isUndefined(b)) {
1565
+ return getMergedValue(void 0, b);
1566
+ } else if (!utils$1.isUndefined(a)) {
1567
+ return getMergedValue(void 0, a);
1568
+ }
1569
+ }
1570
+ function mergeDirectKeys(a, b, prop) {
1571
+ if (prop in config2) {
1572
+ return getMergedValue(a, b);
1573
+ } else if (prop in config1) {
1574
+ return getMergedValue(void 0, a);
1575
+ }
1576
+ }
1577
+ const mergeMap = {
1578
+ url: valueFromConfig2,
1579
+ method: valueFromConfig2,
1580
+ data: valueFromConfig2,
1581
+ baseURL: defaultToConfig2,
1582
+ transformRequest: defaultToConfig2,
1583
+ transformResponse: defaultToConfig2,
1584
+ paramsSerializer: defaultToConfig2,
1585
+ timeout: defaultToConfig2,
1586
+ timeoutMessage: defaultToConfig2,
1587
+ withCredentials: defaultToConfig2,
1588
+ withXSRFToken: defaultToConfig2,
1589
+ adapter: defaultToConfig2,
1590
+ responseType: defaultToConfig2,
1591
+ xsrfCookieName: defaultToConfig2,
1592
+ xsrfHeaderName: defaultToConfig2,
1593
+ onUploadProgress: defaultToConfig2,
1594
+ onDownloadProgress: defaultToConfig2,
1595
+ decompress: defaultToConfig2,
1596
+ maxContentLength: defaultToConfig2,
1597
+ maxBodyLength: defaultToConfig2,
1598
+ beforeRedirect: defaultToConfig2,
1599
+ transport: defaultToConfig2,
1600
+ httpAgent: defaultToConfig2,
1601
+ httpsAgent: defaultToConfig2,
1602
+ cancelToken: defaultToConfig2,
1603
+ socketPath: defaultToConfig2,
1604
+ responseEncoding: defaultToConfig2,
1605
+ validateStatus: mergeDirectKeys,
1606
+ headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
1607
+ };
1608
+ utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
1609
+ const merge2 = mergeMap[prop] || mergeDeepProperties;
1610
+ const configValue = merge2(config1[prop], config2[prop], prop);
1611
+ utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
1612
+ });
1613
+ return config;
1614
+ }
1615
+ const VERSION = "1.6.7";
1616
+ const validators$1 = {};
1617
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
1618
+ validators$1[type] = function validator2(thing) {
1619
+ return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
1620
+ };
1621
+ });
1622
+ const deprecatedWarnings = {};
1623
+ validators$1.transitional = function transitional(validator2, version, message) {
1624
+ function formatMessage(opt, desc) {
1625
+ return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
1626
+ }
1627
+ return (value, opt, opts) => {
1628
+ if (validator2 === false) {
1629
+ throw new AxiosError(
1630
+ formatMessage(opt, " has been removed" + (version ? " in " + version : "")),
1631
+ AxiosError.ERR_DEPRECATED
1632
+ );
1633
+ }
1634
+ if (version && !deprecatedWarnings[opt]) {
1635
+ deprecatedWarnings[opt] = true;
1636
+ console.warn(
1637
+ formatMessage(
1638
+ opt,
1639
+ " has been deprecated since v" + version + " and will be removed in the near future"
1640
+ )
1641
+ );
1642
+ }
1643
+ return validator2 ? validator2(value, opt, opts) : true;
1644
+ };
1645
+ };
1646
+ function assertOptions(options, schema, allowUnknown) {
1647
+ if (typeof options !== "object") {
1648
+ throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
1649
+ }
1650
+ const keys = Object.keys(options);
1651
+ let i = keys.length;
1652
+ while (i-- > 0) {
1653
+ const opt = keys[i];
1654
+ const validator2 = schema[opt];
1655
+ if (validator2) {
1656
+ const value = options[opt];
1657
+ const result = value === void 0 || validator2(value, opt, options);
1658
+ if (result !== true) {
1659
+ throw new AxiosError("option " + opt + " must be " + result, AxiosError.ERR_BAD_OPTION_VALUE);
1660
+ }
1661
+ continue;
1662
+ }
1663
+ if (allowUnknown !== true) {
1664
+ throw new AxiosError("Unknown option " + opt, AxiosError.ERR_BAD_OPTION);
1665
+ }
1666
+ }
1667
+ }
1668
+ const validator = {
1669
+ assertOptions,
1670
+ validators: validators$1
1671
+ };
1672
+ const validators = validator.validators;
1673
+ class Axios {
1674
+ constructor(instanceConfig) {
1675
+ this.defaults = instanceConfig;
1676
+ this.interceptors = {
1677
+ request: new InterceptorManager(),
1678
+ response: new InterceptorManager()
1679
+ };
1680
+ }
1681
+ /**
1682
+ * Dispatch a request
1683
+ *
1684
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1685
+ * @param {?Object} config
1686
+ *
1687
+ * @returns {Promise} The Promise to be fulfilled
1688
+ */
1689
+ async request(configOrUrl, config) {
1690
+ try {
1691
+ return await this._request(configOrUrl, config);
1692
+ } catch (err) {
1693
+ if (err instanceof Error) {
1694
+ let dummy;
1695
+ Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
1696
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
1697
+ if (!err.stack) {
1698
+ err.stack = stack;
1699
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
1700
+ err.stack += "\n" + stack;
1701
+ }
1702
+ }
1703
+ throw err;
1704
+ }
1705
+ }
1706
+ _request(configOrUrl, config) {
1707
+ if (typeof configOrUrl === "string") {
1708
+ config = config || {};
1709
+ config.url = configOrUrl;
1710
+ } else {
1711
+ config = configOrUrl || {};
1712
+ }
1713
+ config = mergeConfig(this.defaults, config);
1714
+ const { transitional: transitional2, paramsSerializer, headers } = config;
1715
+ if (transitional2 !== void 0) {
1716
+ validator.assertOptions(transitional2, {
1717
+ silentJSONParsing: validators.transitional(validators.boolean),
1718
+ forcedJSONParsing: validators.transitional(validators.boolean),
1719
+ clarifyTimeoutError: validators.transitional(validators.boolean)
1720
+ }, false);
1721
+ }
1722
+ if (paramsSerializer != null) {
1723
+ if (utils$1.isFunction(paramsSerializer)) {
1724
+ config.paramsSerializer = {
1725
+ serialize: paramsSerializer
1726
+ };
1727
+ } else {
1728
+ validator.assertOptions(paramsSerializer, {
1729
+ encode: validators.function,
1730
+ serialize: validators.function
1731
+ }, true);
1732
+ }
1733
+ }
1734
+ config.method = (config.method || this.defaults.method || "get").toLowerCase();
1735
+ let contextHeaders = headers && utils$1.merge(
1736
+ headers.common,
1737
+ headers[config.method]
1738
+ );
1739
+ headers && utils$1.forEach(
1740
+ ["delete", "get", "head", "post", "put", "patch", "common"],
1741
+ (method) => {
1742
+ delete headers[method];
1743
+ }
1744
+ );
1745
+ config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
1746
+ const requestInterceptorChain = [];
1747
+ let synchronousRequestInterceptors = true;
1748
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
1749
+ if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
1750
+ return;
1751
+ }
1752
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
1753
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
1754
+ });
1755
+ const responseInterceptorChain = [];
1756
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
1757
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
1758
+ });
1759
+ let promise;
1760
+ let i = 0;
1761
+ let len;
1762
+ if (!synchronousRequestInterceptors) {
1763
+ const chain = [dispatchRequest.bind(this), void 0];
1764
+ chain.unshift.apply(chain, requestInterceptorChain);
1765
+ chain.push.apply(chain, responseInterceptorChain);
1766
+ len = chain.length;
1767
+ promise = Promise.resolve(config);
1768
+ while (i < len) {
1769
+ promise = promise.then(chain[i++], chain[i++]);
1770
+ }
1771
+ return promise;
1772
+ }
1773
+ len = requestInterceptorChain.length;
1774
+ let newConfig = config;
1775
+ i = 0;
1776
+ while (i < len) {
1777
+ const onFulfilled = requestInterceptorChain[i++];
1778
+ const onRejected = requestInterceptorChain[i++];
1779
+ try {
1780
+ newConfig = onFulfilled(newConfig);
1781
+ } catch (error) {
1782
+ onRejected.call(this, error);
1783
+ break;
1784
+ }
1785
+ }
1786
+ try {
1787
+ promise = dispatchRequest.call(this, newConfig);
1788
+ } catch (error) {
1789
+ return Promise.reject(error);
1790
+ }
1791
+ i = 0;
1792
+ len = responseInterceptorChain.length;
1793
+ while (i < len) {
1794
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
1795
+ }
1796
+ return promise;
1797
+ }
1798
+ getUri(config) {
1799
+ config = mergeConfig(this.defaults, config);
1800
+ const fullPath = buildFullPath(config.baseURL, config.url);
1801
+ return buildURL(fullPath, config.params, config.paramsSerializer);
1802
+ }
1803
+ }
1804
+ utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
1805
+ Axios.prototype[method] = function(url, config) {
1806
+ return this.request(mergeConfig(config || {}, {
1807
+ method,
1808
+ url,
1809
+ data: (config || {}).data
1810
+ }));
1811
+ };
1812
+ });
1813
+ utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
1814
+ function generateHTTPMethod(isForm) {
1815
+ return function httpMethod(url, data, config) {
1816
+ return this.request(mergeConfig(config || {}, {
1817
+ method,
1818
+ headers: isForm ? {
1819
+ "Content-Type": "multipart/form-data"
1820
+ } : {},
1821
+ url,
1822
+ data
1823
+ }));
1824
+ };
1825
+ }
1826
+ Axios.prototype[method] = generateHTTPMethod();
1827
+ Axios.prototype[method + "Form"] = generateHTTPMethod(true);
1828
+ });
1829
+ const Axios$1 = Axios;
1830
+ class CancelToken {
1831
+ constructor(executor) {
1832
+ if (typeof executor !== "function") {
1833
+ throw new TypeError("executor must be a function.");
1834
+ }
1835
+ let resolvePromise;
1836
+ this.promise = new Promise(function promiseExecutor(resolve) {
1837
+ resolvePromise = resolve;
1838
+ });
1839
+ const token = this;
1840
+ this.promise.then((cancel) => {
1841
+ if (!token._listeners)
1842
+ return;
1843
+ let i = token._listeners.length;
1844
+ while (i-- > 0) {
1845
+ token._listeners[i](cancel);
1846
+ }
1847
+ token._listeners = null;
1848
+ });
1849
+ this.promise.then = (onfulfilled) => {
1850
+ let _resolve;
1851
+ const promise = new Promise((resolve) => {
1852
+ token.subscribe(resolve);
1853
+ _resolve = resolve;
1854
+ }).then(onfulfilled);
1855
+ promise.cancel = function reject() {
1856
+ token.unsubscribe(_resolve);
1857
+ };
1858
+ return promise;
1859
+ };
1860
+ executor(function cancel(message, config, request) {
1861
+ if (token.reason) {
1862
+ return;
1863
+ }
1864
+ token.reason = new CanceledError(message, config, request);
1865
+ resolvePromise(token.reason);
1866
+ });
1867
+ }
1868
+ /**
1869
+ * Throws a `CanceledError` if cancellation has been requested.
1870
+ */
1871
+ throwIfRequested() {
1872
+ if (this.reason) {
1873
+ throw this.reason;
1874
+ }
1875
+ }
1876
+ /**
1877
+ * Subscribe to the cancel signal
1878
+ */
1879
+ subscribe(listener) {
1880
+ if (this.reason) {
1881
+ listener(this.reason);
1882
+ return;
1883
+ }
1884
+ if (this._listeners) {
1885
+ this._listeners.push(listener);
1886
+ } else {
1887
+ this._listeners = [listener];
1888
+ }
1889
+ }
1890
+ /**
1891
+ * Unsubscribe from the cancel signal
1892
+ */
1893
+ unsubscribe(listener) {
1894
+ if (!this._listeners) {
1895
+ return;
1896
+ }
1897
+ const index = this._listeners.indexOf(listener);
1898
+ if (index !== -1) {
1899
+ this._listeners.splice(index, 1);
1900
+ }
1901
+ }
1902
+ /**
1903
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
1904
+ * cancels the `CancelToken`.
1905
+ */
1906
+ static source() {
1907
+ let cancel;
1908
+ const token = new CancelToken(function executor(c) {
1909
+ cancel = c;
1910
+ });
1911
+ return {
1912
+ token,
1913
+ cancel
1914
+ };
1915
+ }
1916
+ }
1917
+ const CancelToken$1 = CancelToken;
1918
+ function spread(callback) {
1919
+ return function wrap(arr) {
1920
+ return callback.apply(null, arr);
1921
+ };
1922
+ }
1923
+ function isAxiosError(payload) {
1924
+ return utils$1.isObject(payload) && payload.isAxiosError === true;
1925
+ }
1926
+ const HttpStatusCode = {
1927
+ Continue: 100,
1928
+ SwitchingProtocols: 101,
1929
+ Processing: 102,
1930
+ EarlyHints: 103,
1931
+ Ok: 200,
1932
+ Created: 201,
1933
+ Accepted: 202,
1934
+ NonAuthoritativeInformation: 203,
1935
+ NoContent: 204,
1936
+ ResetContent: 205,
1937
+ PartialContent: 206,
1938
+ MultiStatus: 207,
1939
+ AlreadyReported: 208,
1940
+ ImUsed: 226,
1941
+ MultipleChoices: 300,
1942
+ MovedPermanently: 301,
1943
+ Found: 302,
1944
+ SeeOther: 303,
1945
+ NotModified: 304,
1946
+ UseProxy: 305,
1947
+ Unused: 306,
1948
+ TemporaryRedirect: 307,
1949
+ PermanentRedirect: 308,
1950
+ BadRequest: 400,
1951
+ Unauthorized: 401,
1952
+ PaymentRequired: 402,
1953
+ Forbidden: 403,
1954
+ NotFound: 404,
1955
+ MethodNotAllowed: 405,
1956
+ NotAcceptable: 406,
1957
+ ProxyAuthenticationRequired: 407,
1958
+ RequestTimeout: 408,
1959
+ Conflict: 409,
1960
+ Gone: 410,
1961
+ LengthRequired: 411,
1962
+ PreconditionFailed: 412,
1963
+ PayloadTooLarge: 413,
1964
+ UriTooLong: 414,
1965
+ UnsupportedMediaType: 415,
1966
+ RangeNotSatisfiable: 416,
1967
+ ExpectationFailed: 417,
1968
+ ImATeapot: 418,
1969
+ MisdirectedRequest: 421,
1970
+ UnprocessableEntity: 422,
1971
+ Locked: 423,
1972
+ FailedDependency: 424,
1973
+ TooEarly: 425,
1974
+ UpgradeRequired: 426,
1975
+ PreconditionRequired: 428,
1976
+ TooManyRequests: 429,
1977
+ RequestHeaderFieldsTooLarge: 431,
1978
+ UnavailableForLegalReasons: 451,
1979
+ InternalServerError: 500,
1980
+ NotImplemented: 501,
1981
+ BadGateway: 502,
1982
+ ServiceUnavailable: 503,
1983
+ GatewayTimeout: 504,
1984
+ HttpVersionNotSupported: 505,
1985
+ VariantAlsoNegotiates: 506,
1986
+ InsufficientStorage: 507,
1987
+ LoopDetected: 508,
1988
+ NotExtended: 510,
1989
+ NetworkAuthenticationRequired: 511
1990
+ };
1991
+ Object.entries(HttpStatusCode).forEach(([key, value]) => {
1992
+ HttpStatusCode[value] = key;
1993
+ });
1994
+ const HttpStatusCode$1 = HttpStatusCode;
1995
+ function createInstance(defaultConfig) {
1996
+ const context = new Axios$1(defaultConfig);
1997
+ const instance = bind(Axios$1.prototype.request, context);
1998
+ utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
1999
+ utils$1.extend(instance, context, null, { allOwnKeys: true });
2000
+ instance.create = function create(instanceConfig) {
2001
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
2002
+ };
2003
+ return instance;
2004
+ }
2005
+ const axios = createInstance(defaults$1);
2006
+ axios.Axios = Axios$1;
2007
+ axios.CanceledError = CanceledError;
2008
+ axios.CancelToken = CancelToken$1;
2009
+ axios.isCancel = isCancel;
2010
+ axios.VERSION = VERSION;
2011
+ axios.toFormData = toFormData;
2012
+ axios.AxiosError = AxiosError;
2013
+ axios.Cancel = axios.CanceledError;
2014
+ axios.all = function all(promises) {
2015
+ return Promise.all(promises);
2016
+ };
2017
+ axios.spread = spread;
2018
+ axios.isAxiosError = isAxiosError;
2019
+ axios.mergeConfig = mergeConfig;
2020
+ axios.AxiosHeaders = AxiosHeaders$1;
2021
+ axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
2022
+ axios.getAdapter = adapters.getAdapter;
2023
+ axios.HttpStatusCode = HttpStatusCode$1;
2024
+ axios.default = axios;
2025
+ function ye(t) {
2026
+ return t == null ? true : typeof t == "string" || Array.isArray(t) ? t.length === 0 : typeof t == "object" ? Object.keys(t).length === 0 : false;
2027
+ }
2028
+ function Be(t) {
2029
+ return t !== null && typeof t == "object" && !Array.isArray(t);
2030
+ }
2031
+ function ke(t = {}, o = {}) {
2032
+ const e = {};
2033
+ for (const n in t)
2034
+ e[n] = t[n];
2035
+ for (const n in o) {
2036
+ const l = t[n], s = o[n];
2037
+ if (Be(l) && Be(s)) {
2038
+ e[n] = ke(
2039
+ l,
2040
+ s
2041
+ );
2042
+ continue;
2043
+ }
2044
+ e[n] = s;
2045
+ }
2046
+ return e;
2047
+ }
2048
+ const we = "q-defaults";
2049
+ function Ye() {
2050
+ var s, r;
2051
+ const t = getCurrentInstance();
2052
+ if (!t)
2053
+ throw new Error("[Quidgest UI] useDefaults must be called from inside a setup function");
2054
+ const o = t.type.name ?? t.type.__name;
2055
+ if (!o)
2056
+ throw new Error("[Quidgest UI] Could not determine component name");
2057
+ const e = Oe(), n = (s = e.value) == null ? void 0 : s.Global, l = (r = e.value) == null ? void 0 : r[o];
2058
+ return computed(() => ke(n, l));
2059
+ }
2060
+ function Me(t) {
2061
+ if (ye(t))
2062
+ return;
2063
+ const o = Oe(), e = ref(t), n = computed(() => ye(e.value) ? o.value : ke(o.value, e.value));
2064
+ provide(we, n);
2065
+ }
2066
+ function Oe() {
2067
+ const t = inject(we, void 0);
2068
+ if (!t)
2069
+ throw new Error("[Quidgest UI] Could not find defaults instance");
2070
+ return t;
2071
+ }
2072
+ function Fe(t) {
2073
+ return t.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([0-9])([A-Za-z])/g, "$1-$2").replace(/([A-Za-z])([0-9])/g, "$1-$2").toLowerCase();
2074
+ }
2075
+ const at = /* @__PURE__ */ createElementVNode("svg", { viewBox: "25 25 50 50" }, [
2076
+ /* @__PURE__ */ createElementVNode("circle", {
2077
+ class: "path",
2078
+ cx: "50",
2079
+ cy: "50",
2080
+ r: "20",
2081
+ fill: "none",
2082
+ stroke: "currentColor",
2083
+ "stroke-width": "5",
2084
+ "stroke-miterlimit": "10"
2085
+ })
2086
+ ], -1), st = [
2087
+ at
2088
+ ], it = /* @__PURE__ */ defineComponent({
2089
+ __name: "QSpinnerLoader",
2090
+ props: {
2091
+ size: { default: 48 },
2092
+ class: { default: void 0 }
2093
+ },
2094
+ setup(t) {
2095
+ const o = t, e = computed(() => ({
2096
+ "font-size": o.size !== 48 ? `${o.size}px` : void 0
2097
+ }));
2098
+ return (n, l) => (openBlock(), createElementBlock("div", {
2099
+ class: normalizeClass(["q-spinner-loader", o.class]),
2100
+ style: normalizeStyle(e.value)
2101
+ }, st, 6));
2102
+ }
2103
+ });
2104
+ function rt(t, o) {
2105
+ var n;
2106
+ const e = Fe(o);
2107
+ return e ? typeof ((n = t.props) == null ? void 0 : n[e]) < "u" : false;
2108
+ }
2109
+ function S(t) {
2110
+ const o = t.setup;
2111
+ return o && (t.setup = (e, n) => {
2112
+ const l = Ye();
2113
+ if (ye(l.value))
2114
+ return o(e, n);
2115
+ const s = getCurrentInstance();
2116
+ if (s === null)
2117
+ return o(e, n);
2118
+ const r = new Proxy(e, {
2119
+ get(i, f) {
2120
+ var y;
2121
+ const L = Reflect.get(i, f), _ = (y = l.value) == null ? void 0 : y[f];
2122
+ return typeof f == "string" && !rt(s.vnode, f) ? _ ?? L : L;
2123
+ }
2124
+ });
2125
+ return o(r, n);
2126
+ }), t;
2127
+ }
2128
+ const $e = S(it), dt = ["disabled"], ut = {
2129
+ key: 0,
2130
+ class: "q-btn__spinner"
2131
+ }, ct = { class: "q-btn__content" }, ft = /* @__PURE__ */ defineComponent({
2132
+ __name: "QButton",
2133
+ props: {
2134
+ active: { type: Boolean },
2135
+ bStyle: { default: "secondary" },
2136
+ label: { default: "" },
2137
+ disabled: { type: Boolean },
2138
+ iconOnRight: { type: Boolean },
2139
+ borderless: { type: Boolean },
2140
+ elevated: { type: Boolean },
2141
+ block: { type: Boolean },
2142
+ loading: { type: Boolean },
2143
+ size: { default: "regular" },
2144
+ class: { default: void 0 }
2145
+ },
2146
+ emits: ["click"],
2147
+ setup(t, { emit: o }) {
2148
+ const e = t, n = o, l = computed(() => e.disabled || e.loading);
2149
+ function s(i) {
2150
+ l.value || n("click", i);
2151
+ }
2152
+ const r = computed(() => {
2153
+ const i = e.size !== "regular" ? `q-btn--${e.size}` : void 0;
2154
+ return [
2155
+ "q-btn",
2156
+ `q-btn--${e.bStyle}`,
2157
+ i,
2158
+ {
2159
+ "q-btn--active": e.active,
2160
+ "q-btn--borderless": e.borderless,
2161
+ "q-btn--elevated": e.elevated,
2162
+ "q-btn--block": e.block,
2163
+ "q-btn--loading": e.loading
2164
+ },
2165
+ e.class
2166
+ ];
2167
+ });
2168
+ return (i, f) => (openBlock(), createElementBlock("button", {
2169
+ type: "button",
2170
+ class: normalizeClass(r.value),
2171
+ disabled: l.value,
2172
+ onClick: withModifiers(s, ["stop", "prevent"])
2173
+ }, [
2174
+ i.loading ? (openBlock(), createElementBlock("div", ut, [
2175
+ createVNode(unref($e), { size: 20 })
2176
+ ])) : createCommentVNode("", true),
2177
+ createElementVNode("span", ct, [
2178
+ i.iconOnRight ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2179
+ createTextVNode(toDisplayString(e.label), 1)
2180
+ ], 64)) : createCommentVNode("", true),
2181
+ renderSlot(i.$slots, "default"),
2182
+ i.iconOnRight ? createCommentVNode("", true) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2183
+ createTextVNode(toDisplayString(e.label), 1)
2184
+ ], 64))
2185
+ ])
2186
+ ], 10, dt));
2187
+ }
2188
+ }), fe = S(ft), pt = /* @__PURE__ */ defineComponent({
2189
+ __name: "QButtonGroup",
2190
+ props: {
2191
+ disabled: { type: Boolean },
2192
+ borderless: { type: Boolean },
2193
+ elevated: { type: Boolean },
2194
+ class: { default: void 0 }
2195
+ },
2196
+ setup(t) {
2197
+ const o = t;
2198
+ return Me({
2199
+ QButton: {
2200
+ bStyle: "secondary",
2201
+ disabled: toRef(o, "disabled"),
2202
+ borderless: toRef(o, "borderless"),
2203
+ elevated: false
2204
+ }
2205
+ }), (e, n) => (openBlock(), createElementBlock("div", {
2206
+ class: normalizeClass([
2207
+ "q-btn-group",
2208
+ {
2209
+ "q-btn-group--elevated": o.elevated
2210
+ },
2211
+ o.class
2212
+ ])
2213
+ }, [
2214
+ renderSlot(e.$slots, "default")
2215
+ ], 2));
2216
+ }
2217
+ }), mt = S(pt), vt = /* @__PURE__ */ defineComponent({
2218
+ __name: "QButtonToggle",
2219
+ props: /* @__PURE__ */ mergeModels({
2220
+ options: {},
2221
+ disabled: { type: Boolean },
2222
+ borderless: { type: Boolean },
2223
+ elevated: { type: Boolean },
2224
+ required: { type: Boolean },
2225
+ class: {}
2226
+ }, {
2227
+ modelValue: {},
2228
+ modelModifiers: {}
2229
+ }),
2230
+ emits: ["update:modelValue"],
2231
+ setup(t) {
2232
+ const o = t, e = useModel(t, "modelValue");
2233
+ function n(l) {
2234
+ e.value === l.key && !o.required ? e.value = void 0 : e.value = l.key;
2235
+ }
2236
+ return (l, s) => (openBlock(), createBlock(unref(mt), {
2237
+ "b-style": "secondary",
2238
+ class: normalizeClass(o.class),
2239
+ disabled: o.disabled,
2240
+ borderless: o.borderless,
2241
+ elevated: o.elevated
2242
+ }, {
2243
+ default: withCtx(() => [
2244
+ (openBlock(true), createElementBlock(Fragment, null, renderList(o.options, (r) => (openBlock(), createBlock(unref(fe), {
2245
+ key: r.key,
2246
+ title: r.title,
2247
+ label: r.label,
2248
+ active: e.value === r.key,
2249
+ onClick: () => n(r)
2250
+ }, {
2251
+ default: withCtx(() => [
2252
+ renderSlot(l.$slots, r.key)
2253
+ ]),
2254
+ _: 2
2255
+ }, 1032, ["title", "label", "active", "onClick"]))), 128))
2256
+ ]),
2257
+ _: 3
2258
+ }, 8, ["class", "disabled", "borderless", "elevated"]));
2259
+ }
2260
+ });
2261
+ S(vt);
2262
+ const ht = /* @__PURE__ */ defineComponent({
2263
+ __name: "QIcon",
2264
+ props: {
2265
+ icon: {},
2266
+ type: { default: "svg" },
2267
+ size: { default: void 0 },
2268
+ class: { default: void 0 }
2269
+ },
2270
+ setup(t) {
2271
+ const o = t, e = computed(() => {
2272
+ switch (o.type) {
2273
+ case "svg":
2274
+ return It;
2275
+ case "font":
2276
+ return qt;
2277
+ case "img":
2278
+ return Lt;
2279
+ default:
2280
+ return;
2281
+ }
2282
+ });
2283
+ return (n, l) => (openBlock(), createBlock(resolveDynamicComponent(e.value), {
2284
+ class: normalizeClass(o.class),
2285
+ icon: o.icon,
2286
+ size: o.size
2287
+ }, null, 8, ["class", "icon", "size"]));
2288
+ }
2289
+ }), bt = /* @__PURE__ */ defineComponent({
2290
+ __name: "QIconFont",
2291
+ props: {
2292
+ icon: {},
2293
+ library: { default: "" },
2294
+ variant: { default: "" },
2295
+ size: { default: void 0 },
2296
+ class: { default: void 0 }
2297
+ },
2298
+ setup(t) {
2299
+ const o = t, e = computed(() => o.variant ? `${o.library}-${o.variant}` : o.library), n = computed(() => o.library && o.icon ? `${o.library}-${o.icon}` : o.icon), l = computed(() => ({
2300
+ "font-size": o.size !== void 0 ? `${o.size}px` : void 0
2301
+ }));
2302
+ return (s, r) => (openBlock(), createElementBlock("i", {
2303
+ class: normalizeClass(["q-icon", "q-icon__font", e.value, n.value, o.class]),
2304
+ style: normalizeStyle(l.value)
2305
+ }, null, 6));
2306
+ }
2307
+ }), yt = ["src"], gt = /* @__PURE__ */ defineComponent({
2308
+ __name: "QIconImg",
2309
+ props: {
2310
+ icon: {},
2311
+ size: {},
2312
+ class: {}
2313
+ },
2314
+ setup(t) {
2315
+ const o = t, e = computed(() => ({
2316
+ "font-size": o.size !== void 0 ? `${o.size}px` : void 0
2317
+ }));
2318
+ return (n, l) => (openBlock(), createElementBlock("img", {
2319
+ src: o.icon,
2320
+ class: normalizeClass(["q-icon", "q-icon__img", o.class]),
2321
+ style: normalizeStyle(e.value)
2322
+ }, null, 14, yt));
2323
+ }
2324
+ }), re = {}, _t = defineComponent({
2325
+ name: "InlineSvg",
2326
+ emits: {
2327
+ loaded: (t) => typeof t == "object",
2328
+ unloaded: () => true,
2329
+ error: (t) => typeof t == "object"
2330
+ },
2331
+ inheritAttrs: false,
2332
+ render() {
2333
+ if (!this.svgElSource)
2334
+ return null;
2335
+ const t = this.getSvgContent(this.svgElSource);
2336
+ if (!t)
2337
+ return h("div", this.$attrs);
2338
+ const o = {};
2339
+ return this.copySvgAttrs(o, this.svgElSource), this.copySvgAttrs(o, t), this.copyComponentAttrs(o, this.$attrs), o.innerHTML = t.innerHTML, h("svg", o);
2340
+ },
2341
+ props: {
2342
+ /**
2343
+ * The source URL of the SVG bundle.
2344
+ */
2345
+ src: {
2346
+ type: String,
2347
+ required: true
2348
+ },
2349
+ /**
2350
+ * The ID of the SVG symbol to be rendered.
2351
+ */
2352
+ symbol: {
2353
+ type: String,
2354
+ default: ""
2355
+ },
2356
+ /**
2357
+ * The title to be associated with the SVG.
2358
+ */
2359
+ title: {
2360
+ type: String,
2361
+ default: ""
2362
+ },
2363
+ /**
2364
+ * A function to transform the source SVG element before rendering.
2365
+ * If not provided, no transformation will be applied.
2366
+ */
2367
+ transformSource: {
2368
+ type: Function,
2369
+ default: void 0
2370
+ },
2371
+ /**
2372
+ * Determines whether to keep the existing SVG content visible during the loading of a new SVG.
2373
+ * Set to `false` to hide content during loading.
2374
+ */
2375
+ keepDuringLoading: {
2376
+ type: Boolean,
2377
+ default: true
2378
+ }
2379
+ },
2380
+ data() {
2381
+ return {
2382
+ /** @type SVGElement */
2383
+ svgElSource: null
2384
+ };
2385
+ },
2386
+ async mounted() {
2387
+ await this.getSource(this.src);
2388
+ },
2389
+ methods: {
2390
+ copySvgAttrs(t, o) {
2391
+ const e = o.attributes;
2392
+ if (e)
2393
+ for (const n of e)
2394
+ t[n.name] = n.value;
2395
+ },
2396
+ copyComponentAttrs(t, o) {
2397
+ for (const [e, n] of Object.entries(o))
2398
+ n !== false && n !== null && n !== void 0 && (t[e] = n);
2399
+ },
2400
+ getSvgContent(t) {
2401
+ return this.symbol && (t = t.getElementById(this.symbol), !t) ? null : (this.transformSource && (t = t.cloneNode(true), t = this.transformSource(t)), this.title && (this.transformSource || (t = t.cloneNode(true)), kt(t, this.title)), t);
2402
+ },
2403
+ /**
2404
+ * Get svgElSource
2405
+ * @param {string} src
2406
+ */
2407
+ async getSource(t) {
2408
+ try {
2409
+ re[t] || (re[t] = wt(this.download(t))), this.svgElSource && re[t].getIsPending() && !this.keepDuringLoading && (this.svgElSource = null, this.$emit("unloaded"));
2410
+ const o = await re[t];
2411
+ this.svgElSource = o, await this.$nextTick(), this.$emit("loaded", this.$el);
2412
+ } catch (o) {
2413
+ this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete re[t], this.$emit("error", o);
2414
+ }
2415
+ },
2416
+ /**
2417
+ * Get the contents of the SVG
2418
+ * @param {string} url
2419
+ * @returns {PromiseWithState<Element>}
2420
+ */
2421
+ async download(t) {
2422
+ const o = await fetch(t);
2423
+ if (!o.ok)
2424
+ throw new Error("Error loading SVG");
2425
+ const e = await o.text(), s = new DOMParser().parseFromString(e, "text/xml").getElementsByTagName("svg")[0];
2426
+ if (!s)
2427
+ throw new Error("Loaded file is not a valid SVG");
2428
+ return s;
2429
+ }
2430
+ },
2431
+ watch: {
2432
+ src(t) {
2433
+ this.getSource(t);
2434
+ }
2435
+ },
2436
+ expose: []
2437
+ });
2438
+ function kt(t, o) {
2439
+ const e = t.getElementsByTagName("title");
2440
+ if (e.length)
2441
+ e[0].textContent = o;
2442
+ else {
2443
+ const n = document.createElementNS("http://www.w3.org/2000/svg", "title");
2444
+ n.textContent = o, t.insertBefore(n, t.firstChild);
2445
+ }
2446
+ }
2447
+ function wt(t) {
2448
+ if (t.getIsPending)
2449
+ return t;
2450
+ let o = true;
2451
+ const e = t.then(
2452
+ (n) => (o = false, n),
2453
+ (n) => {
2454
+ throw o = false, n;
2455
+ }
2456
+ );
2457
+ return e.getIsPending = () => o, e;
2458
+ }
2459
+ const $t = /* @__PURE__ */ defineComponent({
2460
+ __name: "QIconSvg",
2461
+ props: {
2462
+ icon: {},
2463
+ bundle: { default: "" },
2464
+ size: { default: void 0 },
2465
+ class: { default: void 0 }
2466
+ },
2467
+ emits: ["loaded", "unloaded"],
2468
+ setup(t, { emit: o }) {
2469
+ const e = t, n = o, l = computed(() => ({
2470
+ "font-size": e.size !== void 0 ? `${e.size}px` : void 0
2471
+ }));
2472
+ function s(i) {
2473
+ n("loaded", i);
2474
+ }
2475
+ function r() {
2476
+ n("unloaded");
2477
+ }
2478
+ return (i, f) => (openBlock(), createBlock(unref(_t), {
2479
+ class: normalizeClass(["q-icon", "q-icon__svg", e.class]),
2480
+ src: e.bundle,
2481
+ symbol: e.icon,
2482
+ style: normalizeStyle(l.value),
2483
+ onLoaded: s,
2484
+ onUnloaded: r
2485
+ }, null, 8, ["class", "src", "symbol", "style"]));
2486
+ }
2487
+ }), ee = S(ht), qt = S(bt), Lt = S(gt), It = S($t), xt = /* @__PURE__ */ defineComponent({
2488
+ __name: "QList",
2489
+ props: /* @__PURE__ */ mergeModels({
2490
+ highlighted: { type: [String, Number, Boolean, Symbol], default: void 0 },
2491
+ items: {},
2492
+ groups: { default: () => [] },
2493
+ itemValue: { default: "key" },
2494
+ itemLabel: { default: "label" },
2495
+ disabled: { type: Boolean },
2496
+ class: { default: void 0 }
2497
+ }, {
2498
+ modelValue: {
2499
+ type: [String, Number, Boolean, Symbol]
2500
+ },
2501
+ modelModifiers: {}
2502
+ }),
2503
+ emits: ["update:modelValue"],
2504
+ setup(t, { expose: o }) {
2505
+ const e = t, n = useModel(t, "modelValue"), l = ref(false), s = computed(() => r.value.length > 1 ? "div" : "ul"), r = computed(() => e.groups.length ? e.groups.filter(
2506
+ (c) => e.items.some((b) => b.group === c.id)
2507
+ ) : [{ id: "", title: "" }]), i = ref(null);
2508
+ function f(c) {
2509
+ n.value = c;
2510
+ }
2511
+ function L() {
2512
+ l.value = true;
2513
+ }
2514
+ function _() {
2515
+ l.value = false;
2516
+ }
2517
+ function y(c) {
2518
+ var d;
2519
+ if ((d = i.value) != null && d.contains(c.relatedTarget))
2520
+ return;
2521
+ let b;
2522
+ n.value ? b = e.items.findIndex(($) => $[e.itemValue] === n.value) : b = j();
2523
+ const q = l.value;
2524
+ C(b, q);
2525
+ }
2526
+ function U(c) {
2527
+ switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(c.key) && c.preventDefault(), c.key) {
2528
+ case "ArrowDown":
2529
+ z("next");
2530
+ break;
2531
+ case "ArrowUp":
2532
+ z("prev");
2533
+ break;
2534
+ case "Home":
2535
+ z("first");
2536
+ break;
2537
+ case "End":
2538
+ z("last");
2539
+ break;
2540
+ }
2541
+ }
2542
+ function z(c) {
2543
+ switch (c) {
2544
+ case "next":
2545
+ case "prev":
2546
+ C(X(c));
2547
+ break;
2548
+ case "first":
2549
+ C(j());
2550
+ break;
2551
+ case "last":
2552
+ C(A());
2553
+ break;
2554
+ }
2555
+ }
2556
+ function C(c, b = false) {
2557
+ var d;
2558
+ (d = V()[c]) == null || d.focus({ preventScroll: b });
2559
+ }
2560
+ function V() {
2561
+ var b;
2562
+ const c = (b = i.value) == null ? void 0 : b.querySelectorAll("li");
2563
+ return c ? Array.from(c) : [];
2564
+ }
2565
+ function W(c) {
2566
+ return V()[c];
2567
+ }
2568
+ function le() {
2569
+ return V().indexOf(document.activeElement);
2570
+ }
2571
+ function j() {
2572
+ const c = V(), b = c.find((q) => P(q));
2573
+ return b ? c.indexOf(b) : -1;
2574
+ }
2575
+ function A() {
2576
+ const c = V(), b = [...c].reverse().find((q) => P(q));
2577
+ return b ? c.indexOf(b) : -1;
2578
+ }
2579
+ function Q(c, b, q) {
2580
+ return b === "prev" && c === 0 || b === "next" && c === q.length - 1;
2581
+ }
2582
+ function X(c) {
2583
+ const b = le();
2584
+ return N(b, c);
2585
+ }
2586
+ function N(c, b) {
2587
+ const q = V();
2588
+ if (Q(c, b, q))
2589
+ return c;
2590
+ let d = c + (b === "next" ? 1 : -1);
2591
+ for (; !P(q[d]); ) {
2592
+ if (Q(d, b, q))
2593
+ return c;
2594
+ d += b === "next" ? 1 : -1;
2595
+ }
2596
+ return d;
2597
+ }
2598
+ function P(c) {
2599
+ return c.tabIndex === -2;
2600
+ }
2601
+ function ae(c) {
2602
+ return c ? e.items.filter((b) => b.group === c) : e.items;
2603
+ }
2604
+ return o({
2605
+ focusItem: C,
2606
+ getItem: W,
2607
+ getAdjacentItemIndex: N,
2608
+ getFirstFocusableItemIndex: j,
2609
+ getLastFocusableItemIndex: A
2610
+ }), (c, b) => (openBlock(), createBlock(resolveDynamicComponent(s.value), {
2611
+ ref_key: "listRef",
2612
+ ref: i,
2613
+ class: normalizeClass(["q-list", { "q-list--disabled": e.disabled }, e.class]),
2614
+ role: "listbox",
2615
+ tabindex: e.disabled ? -1 : 0,
2616
+ onFocus: y,
2617
+ onMousedown: L,
2618
+ onMouseup: _,
2619
+ onKeydown: U
2620
+ }, {
2621
+ default: withCtx(() => [
2622
+ (openBlock(true), createElementBlock(Fragment, null, renderList(r.value, (q) => (openBlock(), createBlock(unref(Qt), {
2623
+ key: q.id,
2624
+ title: r.value.length === 1 ? void 0 : q.title,
2625
+ disabled: q.disabled
2626
+ }, {
2627
+ default: withCtx(() => [
2628
+ (openBlock(true), createElementBlock(Fragment, null, renderList(ae(q.id), (d) => (openBlock(), createBlock(unref(At), {
2629
+ key: d[e.itemValue],
2630
+ value: d[e.itemValue],
2631
+ label: d[e.itemLabel],
2632
+ icon: d.icon,
2633
+ disabled: e.disabled || d.disabled,
2634
+ highlighted: e.highlighted === d[e.itemValue],
2635
+ selected: n.value === d[e.itemValue],
2636
+ onSelect: f
2637
+ }, {
2638
+ default: withCtx(() => [
2639
+ renderSlot(c.$slots, "item", { item: d })
2640
+ ]),
2641
+ _: 2
2642
+ }, 1032, ["value", "label", "icon", "disabled", "highlighted", "selected"]))), 128))
2643
+ ]),
2644
+ _: 2
2645
+ }, 1032, ["title", "disabled"]))), 128))
2646
+ ]),
2647
+ _: 3
2648
+ }, 40, ["class", "tabindex"]));
2649
+ }
2650
+ });
2651
+ let Bt = 0;
2652
+ function me(t) {
2653
+ return t || `uid-${++Bt}`;
2654
+ }
2655
+ const St = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], Vt = { class: "q-list-item__check-container" }, Et = {
2656
+ check: {
2657
+ icon: "check"
2658
+ }
2659
+ }, Tt = /* @__PURE__ */ defineComponent({
2660
+ __name: "QListItem",
2661
+ props: {
2662
+ value: { type: [String, Number, Boolean, Symbol] },
2663
+ label: {},
2664
+ icon: { default: void 0 },
2665
+ selected: { type: Boolean },
2666
+ highlighted: { type: Boolean },
2667
+ icons: { default: () => Et },
2668
+ disabled: { type: Boolean }
2669
+ },
2670
+ emits: ["select"],
2671
+ setup(t, { emit: o }) {
2672
+ const e = t, n = o, l = me();
2673
+ function s() {
2674
+ e.disabled || n("select", e.value);
2675
+ }
2676
+ function r(i) {
2677
+ i.key === "Tab" && s(), (i.key === "Enter" || i.key === " ") && (i.preventDefault(), i.stopPropagation(), s());
2678
+ }
2679
+ return (i, f) => (openBlock(), createElementBlock("li", {
2680
+ id: unref(l),
2681
+ "data-key": e.value,
2682
+ role: "option",
2683
+ tabindex: e.disabled ? void 0 : -2,
2684
+ class: normalizeClass([
2685
+ "q-list-item",
2686
+ {
2687
+ "q-list-item--disabled": e.disabled,
2688
+ "q-list-item--selected": e.selected,
2689
+ "q-list-item--highlighted": e.highlighted
2690
+ }
2691
+ ]),
2692
+ "aria-label": e.label,
2693
+ "aria-selected": e.disabled ? void 0 : e.selected,
2694
+ onKeydown: r,
2695
+ onClick: withModifiers(s, ["stop", "prevent"])
2696
+ }, [
2697
+ renderSlot(i.$slots, "default", {}, () => [
2698
+ e.icon ? (openBlock(), createBlock(unref(ee), normalizeProps(mergeProps({ key: 0 }, e.icon)), null, 16)) : createCommentVNode("", true),
2699
+ createTextVNode(" " + toDisplayString(e.label), 1)
2700
+ ]),
2701
+ createElementVNode("div", Vt, [
2702
+ e.selected ? (openBlock(), createBlock(unref(ee), mergeProps({ key: 0 }, e.icons.check, { class: "q-list-item__check" }), null, 16)) : createCommentVNode("", true)
2703
+ ])
2704
+ ], 42, St));
2705
+ }
2706
+ }), Dt = ["aria-labelledby"], zt = ["id"], Ct = /* @__PURE__ */ defineComponent({
2707
+ __name: "QListItemGroup",
2708
+ props: {
2709
+ title: { default: "" },
2710
+ disabled: { type: Boolean }
2711
+ },
2712
+ setup(t) {
2713
+ const o = t, e = me();
2714
+ return (n, l) => (openBlock(), createElementBlock("ul", {
2715
+ class: "q-list-item-group",
2716
+ role: "group",
2717
+ "aria-labelledby": o.title ? unref(e) : void 0
2718
+ }, [
2719
+ o.title ? (openBlock(), createElementBlock("li", {
2720
+ key: 0,
2721
+ id: unref(e),
2722
+ class: "q-list-item-group__title",
2723
+ role: "presentation"
2724
+ }, toDisplayString(o.title), 9, zt)) : createCommentVNode("", true),
2725
+ renderSlot(n.$slots, "default")
2726
+ ], 8, Dt));
2727
+ }
2728
+ }), Re = S(xt), At = S(Tt), Qt = S(Ct);
2729
+ function Mt(t, o, e = "right", n) {
2730
+ const l = t.getBoundingClientRect(), s = l.x + window.scrollX, r = l.y + window.scrollY, i = o == null ? void 0 : o.getBoundingClientRect(), f = (i == null ? void 0 : i.width) ?? 0, L = (i == null ? void 0 : i.height) ?? 0;
2731
+ let _ = e;
2732
+ i && ge(l, i, _) !== 0 && (_ = Ot(l, i, _));
2733
+ const y = { x: 0, y: 0, placement: _ };
2734
+ switch (_) {
2735
+ case "top":
2736
+ n === "anchor" ? y.x = s : y.x = s + (l.width - f) / 2, y.y = r - L;
2737
+ break;
2738
+ case "bottom":
2739
+ n === "anchor" ? y.x = s : y.x = s + (l.width - f) / 2, y.y = r + l.height;
2740
+ break;
2741
+ case "left":
2742
+ y.x = s - f, y.y = r + l.height / 2 - L / 2;
2743
+ break;
2744
+ case "right":
2745
+ y.x = s + l.width, y.y = r + l.height / 2 - L / 2;
2746
+ break;
2747
+ }
2748
+ return y.x = Math.max(0, y.x), y.y = Math.max(0, y.y), n === "anchor" && l.width >= f && (y.width = l.width), y;
2749
+ }
2750
+ function ge(t, o, e) {
2751
+ let n = 0, l = 0;
2752
+ switch (e) {
2753
+ case "top":
2754
+ n = Te(t, o), l = t.top - o.height;
2755
+ break;
2756
+ case "bottom":
2757
+ n = Te(t, o), l = window.innerHeight - t.top - t.height - o.height;
2758
+ break;
2759
+ case "left":
2760
+ n = t.left - o.width, l = Ee(t, o);
2761
+ break;
2762
+ case "right":
2763
+ n = window.innerWidth - t.left - t.width - o.width, l = Ee(t, o);
2764
+ break;
2765
+ }
2766
+ return Math.min(0, Math.min(n, l));
2767
+ }
2768
+ function Ee(t, o) {
2769
+ return Math.min(
2770
+ window.innerHeight - t.top - t.height / 2 - o.height / 2,
2771
+ t.top + t.height / 2 - o.height / 2
2772
+ );
2773
+ }
2774
+ function Te(t, o) {
2775
+ return Math.min(
2776
+ window.innerWidth - t.left - t.width / 2 - o.width / 2,
2777
+ t.left + t.width / 2 - o.width / 2
2778
+ );
2779
+ }
2780
+ function Ot(t, o, e) {
2781
+ const n = {
2782
+ top: ["bottom", "left", "right"],
2783
+ bottom: ["top", "left", "right"],
2784
+ left: ["right", "top", "bottom"],
2785
+ right: ["left", "top", "bottom"]
2786
+ };
2787
+ let l = e, s = ge(t, o, e);
2788
+ for (const r of n[e]) {
2789
+ const i = ge(t, o, r);
2790
+ i > s && (s = i, l = r);
2791
+ }
2792
+ return l;
2793
+ }
2794
+ function Ft(t) {
2795
+ return typeof t == "string" ? document.querySelector(t) : t;
2796
+ }
2797
+ const Rt = ["role"], Ut = {
2798
+ key: 0,
2799
+ role: "presentation",
2800
+ class: "q-overlay__arrow"
2801
+ }, Nt = /* @__PURE__ */ defineComponent({
2802
+ inheritAttrs: false,
2803
+ __name: "QOverlay",
2804
+ props: /* @__PURE__ */ mergeModels({
2805
+ anchor: { default: void 0 },
2806
+ appearance: { default: "regular" },
2807
+ arrow: { type: Boolean },
2808
+ attach: { default: "body" },
2809
+ backdropBlur: { type: Boolean },
2810
+ delay: { default: 500 },
2811
+ scrollLock: { type: Boolean },
2812
+ offset: { default: 8 },
2813
+ persistent: { type: Boolean },
2814
+ placement: { default: "right" },
2815
+ spy: { type: Boolean },
2816
+ transition: { default: "fade" },
2817
+ trigger: { default: "click" },
2818
+ width: { default: "auto" },
2819
+ class: { default: void 0 }
2820
+ }, {
2821
+ modelValue: { type: Boolean },
2822
+ modelModifiers: {}
2823
+ }),
2824
+ emits: /* @__PURE__ */ mergeModels(["enter", "leave"], ["update:modelValue"]),
2825
+ setup(t, { emit: o }) {
2826
+ const e = t, n = o, l = useModel(t, "modelValue"), s = computed(() => [
2827
+ "q-overlay",
2828
+ `q-overlay--${i.placement}`,
2829
+ {
2830
+ "q-overlay--independent": e.anchor === void 0,
2831
+ "q-overlay--inverted": e.appearance === "inverted"
2832
+ },
2833
+ e.class
2834
+ ]), r = computed(
2835
+ () => (l.value || i.animating) && (e.anchor === void 0 || e.trigger === "click")
2836
+ ), i = reactive({
2837
+ animating: false,
2838
+ top: 0,
2839
+ left: 0,
2840
+ width: 0,
2841
+ placement: e.placement
2842
+ });
2843
+ watch(l, () => i.animating = true);
2844
+ const f = computed(() => {
2845
+ if (e.anchor === void 0)
2846
+ return;
2847
+ const p = ["top", "bottom"].includes(i.placement) ? i.width : void 0;
2848
+ return {
2849
+ top: `${i.top}px`,
2850
+ left: `${i.left}px`,
2851
+ width: p !== void 0 ? `${p}px` : void 0
2852
+ };
2853
+ }), L = ref(null);
2854
+ function _() {
2855
+ const p = A();
2856
+ if (!p)
2857
+ return;
2858
+ const M = Mt(p, L.value, e.placement, e.width);
2859
+ let R = 0, oe = 0;
2860
+ switch (M.placement) {
2861
+ case "top":
2862
+ oe = -(e.offset || 0);
2863
+ break;
2864
+ case "bottom":
2865
+ oe = e.offset || 0;
2866
+ break;
2867
+ case "left":
2868
+ R = -(e.offset || 0);
2869
+ break;
2870
+ case "right":
2871
+ R = e.offset || 0;
2872
+ break;
2873
+ }
2874
+ i.left = M.x + R, i.top = M.y + oe, i.width = M.width, i.placement = M.placement;
2875
+ }
2876
+ watch([l, () => e.placement], _);
2877
+ let y;
2878
+ function U() {
2879
+ C(0);
2880
+ }
2881
+ function z() {
2882
+ C(e.delay);
2883
+ }
2884
+ function C(p) {
2885
+ y || (y = window.setTimeout(() => {
2886
+ l.value = true;
2887
+ }, p));
2888
+ }
2889
+ function V() {
2890
+ clearTimeout(y), y = void 0, l.value = false, nextTick(() => {
2891
+ if (e.anchor && e.trigger === "click") {
2892
+ const p = A();
2893
+ p == null || p.focus();
2894
+ }
2895
+ });
2896
+ }
2897
+ let W;
2898
+ function le() {
2899
+ n("enter");
2900
+ }
2901
+ function j() {
2902
+ window.clearTimeout(W), W = window.setTimeout(() => i.animating = false, 200), n("leave");
2903
+ }
2904
+ function A() {
2905
+ return e.anchor ? Ft(e.anchor) : null;
2906
+ }
2907
+ let Q;
2908
+ function X() {
2909
+ nextTick(() => {
2910
+ const p = A();
2911
+ if (p)
2912
+ switch (Q = new MutationObserver(_), Q.observe(p, {
2913
+ attributes: false,
2914
+ childList: true,
2915
+ characterData: true,
2916
+ subtree: true
2917
+ }), e.trigger) {
2918
+ case "click":
2919
+ p.addEventListener("click", U);
2920
+ break;
2921
+ case "hover":
2922
+ p.addEventListener("mouseenter", z), p.addEventListener("mouseleave", V), p.addEventListener("focusin", U), p.addEventListener("focusout", V);
2923
+ break;
2924
+ }
2925
+ });
2926
+ }
2927
+ function N() {
2928
+ const p = A();
2929
+ if (p)
2930
+ switch (Q == null || Q.disconnect(), e.trigger) {
2931
+ case "click":
2932
+ p.removeEventListener("click", U);
2933
+ break;
2934
+ case "hover":
2935
+ p.removeEventListener("mouseenter", z), p.removeEventListener("mouseleave", V), p.removeEventListener("focusin", U), p.removeEventListener("focusout", V);
2936
+ break;
2937
+ }
2938
+ }
2939
+ function P() {
2940
+ nextTick(() => {
2941
+ window.addEventListener("resize", _), e.scrollLock || window.addEventListener("scroll", _), _();
2942
+ });
2943
+ }
2944
+ function ae() {
2945
+ window.removeEventListener("resize", _), e.scrollLock || window.removeEventListener("scroll", _);
2946
+ }
2947
+ let c;
2948
+ function b() {
2949
+ A() ? (_(), c = window.setTimeout(b, 100)) : V();
2950
+ }
2951
+ function q() {
2952
+ P(), e.spy && b(), e.scrollLock && document.body.classList.add("no-scroll"), nextTick(() => {
2953
+ var p;
2954
+ (e.anchor === void 0 || e.trigger === "click") && ((p = L.value) == null || p.focus());
2955
+ });
2956
+ }
2957
+ function d() {
2958
+ ae(), e.spy && (clearTimeout(c), c = void 0), e.scrollLock && document.body.classList.remove("no-scroll");
2959
+ }
2960
+ function $() {
2961
+ e.persistent || V();
2962
+ }
2963
+ return onBeforeUnmount(() => {
2964
+ N(), d();
2965
+ }), onMounted(() => {
2966
+ nextTick(() => {
2967
+ X(), _();
2968
+ });
2969
+ }), watch(
2970
+ l,
2971
+ (p) => {
2972
+ p ? q() : d();
2973
+ },
2974
+ { immediate: true }
2975
+ ), (p, M) => (openBlock(), createBlock(Teleport, {
2976
+ disabled: !l.value && !i.animating || !e.attach,
2977
+ to: e.attach
2978
+ }, [
2979
+ r.value ? (openBlock(), createElementBlock("div", {
2980
+ key: 0,
2981
+ class: normalizeClass([
2982
+ "q-overlay__underlay",
2983
+ { "q-overlay__underlay--blur": e.backdropBlur }
2984
+ ])
2985
+ }, null, 2)) : createCommentVNode("", true),
2986
+ createVNode(Transition, {
2987
+ name: e.transition,
2988
+ appear: "",
2989
+ onEnter: le,
2990
+ onLeave: j
2991
+ }, {
2992
+ default: withCtx(() => [
2993
+ l.value ? (openBlock(), createElementBlock("div", {
2994
+ key: 0,
2995
+ class: normalizeClass(s.value),
2996
+ style: normalizeStyle(f.value)
2997
+ }, [
2998
+ createElementVNode("div", mergeProps({
2999
+ class: "q-overlay__content",
3000
+ ref_key: "overlayRef",
3001
+ ref: L,
3002
+ tabindex: "-1",
3003
+ role: r.value ? "dialog" : void 0
3004
+ }, p.$attrs, {
3005
+ onKeydown: withKeys($, ["escape"]),
3006
+ onBlur: $
3007
+ }), [
3008
+ e.arrow ? (openBlock(), createElementBlock("div", Ut)) : createCommentVNode("", true),
3009
+ renderSlot(p.$slots, "default")
3010
+ ], 16, Rt)
3011
+ ], 6)) : createCommentVNode("", true)
3012
+ ]),
3013
+ _: 3
3014
+ }, 8, ["name"])
3015
+ ], 8, ["disabled", "to"]));
3016
+ }
3017
+ }), ve = S(Nt), Ht = ["id"], Kt = {
3018
+ key: 0,
3019
+ class: "q-field__label"
3020
+ }, Gt = ["for"], Wt = {
3021
+ key: 0,
3022
+ class: "q-field__prepend"
3023
+ }, jt = {
3024
+ key: 1,
3025
+ class: "q-field__append"
3026
+ }, Xt = {
3027
+ key: 1,
3028
+ class: "q-field__extras"
3029
+ }, Yt = /* @__PURE__ */ defineComponent({
3030
+ inheritAttrs: false,
3031
+ __name: "QField",
3032
+ props: {
3033
+ id: { default: void 0 },
3034
+ label: { default: "" },
3035
+ for: { default: void 0 },
3036
+ size: { default: "medium" },
3037
+ readonly: { type: Boolean },
3038
+ disabled: { type: Boolean },
3039
+ required: { type: Boolean },
3040
+ class: { default: void 0 }
3041
+ },
3042
+ setup(t, { expose: o }) {
3043
+ const e = t, n = me(e.id), l = ref(null), s = computed(() => e.required && !e.readonly && !e.disabled);
3044
+ return o({
3045
+ fieldRef: l
3046
+ }), (r, i) => (openBlock(), createElementBlock("div", {
3047
+ id: unref(n),
3048
+ class: normalizeClass([
3049
+ "q-field",
3050
+ `q-field--${e.size}`,
3051
+ {
3052
+ "q-field--readonly": e.readonly,
3053
+ "q-field--disabled": e.disabled,
3054
+ "q-field--required": s.value
3055
+ },
3056
+ e.class
3057
+ ])
3058
+ }, [
3059
+ e.label ? (openBlock(), createElementBlock("div", Kt, [
3060
+ renderSlot(r.$slots, "label.prepend"),
3061
+ createElementVNode("label", {
3062
+ for: e.for
3063
+ }, toDisplayString(e.label), 9, Gt),
3064
+ renderSlot(r.$slots, "label.append")
3065
+ ])) : createCommentVNode("", true),
3066
+ renderSlot(r.$slots, "control", {}, () => [
3067
+ createElementVNode("div", mergeProps({
3068
+ class: "q-field__control",
3069
+ ref_key: "fieldRef",
3070
+ ref: l
3071
+ }, r.$attrs), [
3072
+ r.$slots.prepend ? (openBlock(), createElementBlock("div", Wt, [
3073
+ renderSlot(r.$slots, "prepend")
3074
+ ])) : createCommentVNode("", true),
3075
+ renderSlot(r.$slots, "default"),
3076
+ r.$slots.append ? (openBlock(), createElementBlock("div", jt, [
3077
+ renderSlot(r.$slots, "append")
3078
+ ])) : createCommentVNode("", true)
3079
+ ], 16)
3080
+ ]),
3081
+ r.$slots.extras ? (openBlock(), createElementBlock("div", Xt, [
3082
+ renderSlot(r.$slots, "extras")
3083
+ ])) : createCommentVNode("", true)
3084
+ ], 10, Ht));
3085
+ }
3086
+ }), qe = S(Yt), Zt = ["id", "type", "role", "required", "placeholder", "readonly", "disabled", "maxlength"], Jt = /* @__PURE__ */ defineComponent({
3087
+ inheritAttrs: false,
3088
+ __name: "QTextField",
3089
+ props: /* @__PURE__ */ mergeModels({
3090
+ id: { default: void 0 },
3091
+ placeholder: { default: "" },
3092
+ label: { default: "" },
3093
+ size: { default: void 0 },
3094
+ maxLength: { default: void 0 },
3095
+ readonly: { type: Boolean },
3096
+ disabled: { type: Boolean },
3097
+ required: { type: Boolean },
3098
+ role: { default: void 0 },
3099
+ type: { default: "text" },
3100
+ class: { default: void 0 }
3101
+ }, {
3102
+ modelValue: {},
3103
+ modelModifiers: {}
3104
+ }),
3105
+ emits: ["update:modelValue"],
3106
+ setup(t, { expose: o }) {
3107
+ const e = t, n = useModel(t, "modelValue"), l = me(e.id), s = ref(null), r = ref(null), i = computed(
3108
+ () => e.readonly || e.disabled ? "" : e.placeholder
3109
+ );
3110
+ return o({
3111
+ fieldRef: computed(() => {
3112
+ var f;
3113
+ return (f = s.value) == null ? void 0 : f.fieldRef;
3114
+ }),
3115
+ inputRef: r
3116
+ }), (f, L) => (openBlock(), createBlock(unref(qe), {
3117
+ ref_key: "fieldRef",
3118
+ ref: s,
3119
+ class: normalizeClass(["q-text-field", e.class]),
3120
+ for: unref(l),
3121
+ label: e.label,
3122
+ size: e.size,
3123
+ readonly: e.readonly,
3124
+ disabled: e.disabled,
3125
+ required: e.required
3126
+ }, createSlots({
3127
+ "label.prepend": withCtx(() => [
3128
+ renderSlot(f.$slots, "label.prepend")
3129
+ ]),
3130
+ "label.append": withCtx(() => [
3131
+ renderSlot(f.$slots, "label.append")
3132
+ ]),
3133
+ default: withCtx(() => [
3134
+ withDirectives(createElementVNode("input", mergeProps({
3135
+ "onUpdate:modelValue": L[0] || (L[0] = (_) => n.value = _),
3136
+ ref_key: "inputRef",
3137
+ ref: r,
3138
+ id: unref(l),
3139
+ class: "q-text-field__input",
3140
+ type: e.type,
3141
+ role: e.role,
3142
+ required: e.required,
3143
+ placeholder: i.value,
3144
+ readonly: e.readonly,
3145
+ disabled: e.disabled,
3146
+ maxlength: e.maxLength
3147
+ }, f.$attrs), null, 16, Zt), [
3148
+ [vModelDynamic, n.value]
3149
+ ])
3150
+ ]),
3151
+ _: 2
3152
+ }, [
3153
+ f.$slots.prepend ? {
3154
+ name: "prepend",
3155
+ fn: withCtx(() => [
3156
+ renderSlot(f.$slots, "prepend")
3157
+ ]),
3158
+ key: "0"
3159
+ } : void 0,
3160
+ f.$slots.append ? {
3161
+ name: "append",
3162
+ fn: withCtx(() => [
3163
+ renderSlot(f.$slots, "append")
3164
+ ]),
3165
+ key: "1"
3166
+ } : void 0,
3167
+ f.$slots.extras ? {
3168
+ name: "extras",
3169
+ fn: withCtx(() => [
3170
+ renderSlot(f.$slots, "extras")
3171
+ ]),
3172
+ key: "2"
3173
+ } : void 0
3174
+ ]), 1032, ["class", "for", "label", "size", "readonly", "disabled", "required"]));
3175
+ }
3176
+ }), Pt = S(Jt), eo = ["data-key"], to = {
3177
+ key: 0,
3178
+ class: "q-select__loader"
3179
+ }, oo = {
3180
+ key: 2,
3181
+ class: "q-select__loader"
3182
+ }, no = {
3183
+ noData: "No data available"
3184
+ }, lo = {
3185
+ chevron: {
3186
+ icon: "chevron-down"
3187
+ },
3188
+ clear: {
3189
+ icon: "close"
3190
+ }
3191
+ }, ao = /* @__PURE__ */ defineComponent({
3192
+ __name: "QCombobox",
3193
+ props: /* @__PURE__ */ mergeModels({
3194
+ id: { default: void 0 },
3195
+ placeholder: { default: "" },
3196
+ selectionMode: { default: "automatic" },
3197
+ filterMode: { default: "builtin" },
3198
+ label: { default: "" },
3199
+ clearable: { type: Boolean },
3200
+ readonly: { type: Boolean },
3201
+ disabled: { type: Boolean },
3202
+ required: { type: Boolean },
3203
+ loading: { type: Boolean },
3204
+ items: {},
3205
+ groups: { default: () => [] },
3206
+ itemValue: { default: "key" },
3207
+ itemLabel: { default: "label" },
3208
+ emptyValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
3209
+ size: { default: void 0 },
3210
+ texts: { default: () => no },
3211
+ icons: { default: () => lo },
3212
+ class: { default: void 0 }
3213
+ }, {
3214
+ modelValue: {
3215
+ type: [String, Number, Boolean, Symbol]
3216
+ },
3217
+ modelModifiers: {},
3218
+ open: { type: Boolean },
3219
+ openModifiers: {},
3220
+ search: { default: "" },
3221
+ searchModifiers: {}
3222
+ }),
3223
+ emits: /* @__PURE__ */ mergeModels(["before-show", "before-hide", "show", "hide"], ["update:modelValue", "update:open", "update:search"]),
3224
+ setup(t, { expose: o, emit: e }) {
3225
+ const n = t, l = e, s = useModel(t, "modelValue"), r = useModel(t, "open"), i = useModel(t, "search"), f = ref(void 0), L = ref(null), _ = ref(null), y = ref(null);
3226
+ onMounted(Q);
3227
+ const U = computed(() => n.clearable && !n.readonly && !n.disabled), z = computed(() => {
3228
+ var a;
3229
+ return n.filterMode === "manual" || !j.value ? n.items : (a = n.items) == null ? void 0 : a.filter(
3230
+ (g) => g[n.itemLabel].toLowerCase().startsWith(i.value.toLowerCase())
3231
+ );
3232
+ }), C = computed(() => {
3233
+ var a;
3234
+ return (a = n.items) == null ? void 0 : a.find((g) => g[n.itemValue] === s.value);
3235
+ }), V = computed(() => C.value === void 0), W = computed(() => {
3236
+ const a = f.value;
3237
+ if (a !== void 0 && z.value[a])
3238
+ return z.value[a];
3239
+ }), le = computed(() => {
3240
+ var g;
3241
+ if (f.value === void 0)
3242
+ return;
3243
+ const a = (g = _.value) == null ? void 0 : g.getItem(f.value);
3244
+ return a == null ? void 0 : a.id;
3245
+ }), j = computed(() => {
3246
+ var a;
3247
+ return i.value.length > 0 && i.value !== ((a = C.value) == null ? void 0 : a[n.itemLabel]);
3248
+ });
3249
+ function A(a) {
3250
+ s.value = a, N();
3251
+ }
3252
+ function Q() {
3253
+ var g;
3254
+ const a = ((g = C.value) == null ? void 0 : g[n.itemLabel]) || "";
3255
+ i.value !== a && (i.value = a);
3256
+ }
3257
+ function X() {
3258
+ r.value || n.readonly || n.disabled || (l("before-show"), r.value = true, M());
3259
+ }
3260
+ function N() {
3261
+ r.value && (l("before-hide"), r.value = false, f.value = void 0);
3262
+ }
3263
+ function P() {
3264
+ r.value ? N() : c();
3265
+ }
3266
+ function ae() {
3267
+ U.value && (s.value = n.emptyValue, f.value = void 0, M());
3268
+ }
3269
+ function c() {
3270
+ if (X(), C.value !== void 0) {
3271
+ const a = z.value.indexOf(C.value);
3272
+ a !== -1 && nextTick(() => Le(a));
3273
+ }
3274
+ }
3275
+ function b(a) {
3276
+ var g, B;
3277
+ if (!(!a.key || n.readonly || n.disabled))
3278
+ if (["ArrowDown", "ArrowUp", "Home", "End"].includes(a.key) && (a.preventDefault(), a.stopPropagation()), a.key === "Escape")
3279
+ Q(), r.value && N();
3280
+ else if (["ArrowDown", "ArrowUp"].includes(a.key))
3281
+ r.value ? nextTick(() => {
3282
+ if (f.value === void 0)
3283
+ q();
3284
+ else {
3285
+ const O = a.key === "ArrowDown" ? "next" : "prev";
3286
+ $(f.value, O);
3287
+ }
3288
+ }) : (X(), nextTick(() => {
3289
+ a.key === "ArrowDown" ? q() : d();
3290
+ }));
3291
+ else if (a.key === "Enter") {
3292
+ if (W.value === void 0)
3293
+ return;
3294
+ A(W.value[n.itemValue]);
3295
+ } else
3296
+ a.key === "Home" ? f.value = (g = _.value) == null ? void 0 : g.getFirstFocusableItemIndex() : a.key === "End" ? f.value = (B = _.value) == null ? void 0 : B.getLastFocusableItemIndex() : (/^[a-z]$/i.test(a.key) || a.key === "Backspace") && X();
3297
+ }
3298
+ function q() {
3299
+ var a, g;
3300
+ if (V.value)
3301
+ f.value = (g = _.value) == null ? void 0 : g.getFirstFocusableItemIndex();
3302
+ else {
3303
+ const B = z.value.findIndex(
3304
+ (O) => O[n.itemValue] === s.value
3305
+ );
3306
+ B === -1 ? f.value = (a = _.value) == null ? void 0 : a.getFirstFocusableItemIndex() : f.value = B;
3307
+ }
3308
+ }
3309
+ function d() {
3310
+ var a;
3311
+ f.value = (a = _.value) == null ? void 0 : a.getLastFocusableItemIndex();
3312
+ }
3313
+ function $(a, g) {
3314
+ var B;
3315
+ f.value = (B = _.value) == null ? void 0 : B.getAdjacentItemIndex(a, g);
3316
+ }
3317
+ function p(a) {
3318
+ var g, B, O;
3319
+ !((g = y.value) != null && g.contains(a.relatedTarget)) && !((O = (B = L.value) == null ? void 0 : B.fieldRef) != null && O.contains(a.relatedTarget)) ? (N(), U.value && !i.value && (s.value = n.emptyValue), Q()) : (a.preventDefault(), a.stopPropagation());
3320
+ }
3321
+ function M() {
3322
+ var a, g;
3323
+ (g = (a = L.value) == null ? void 0 : a.inputRef) == null || g.focus();
3324
+ }
3325
+ function R() {
3326
+ M();
3327
+ }
3328
+ function oe() {
3329
+ l("show");
3330
+ }
3331
+ function Ue() {
3332
+ l("hide");
3333
+ }
3334
+ function Le(a) {
3335
+ var B;
3336
+ const g = (B = _.value) == null ? void 0 : B.getItem(a);
3337
+ _.value && (_.value.$el.scrollTop = g == null ? void 0 : g.offsetTop);
3338
+ }
3339
+ return watch(s, Q), watch(
3340
+ () => n.items,
3341
+ (a, g) => {
3342
+ if (!V.value) {
3343
+ const B = g.find((O) => O[n.itemValue] === s.value);
3344
+ i.value === (B == null ? void 0 : B[n.itemLabel]) && Q();
3345
+ }
3346
+ },
3347
+ { deep: true }
3348
+ ), watch(f, (a) => {
3349
+ a !== void 0 && Le(a);
3350
+ }), watch(i, (a) => {
3351
+ a && r.value && n.selectionMode === "automatic" && nextTick(q);
3352
+ }), watch(
3353
+ () => n.loading,
3354
+ (a) => {
3355
+ !a && r.value && nextTick(q);
3356
+ }
3357
+ ), o({
3358
+ triggerEl: L
3359
+ }), (a, g) => {
3360
+ var B;
3361
+ return openBlock(), createElementBlock(Fragment, null, [
3362
+ createVNode(unref(Pt), {
3363
+ modelValue: i.value,
3364
+ "onUpdate:modelValue": g[0] || (g[0] = (O) => i.value = O),
3365
+ id: n.id,
3366
+ label: n.label,
3367
+ required: n.required,
3368
+ ref_key: "triggerEl",
3369
+ ref: L,
3370
+ role: "combobox",
3371
+ placeholder: n.placeholder,
3372
+ class: normalizeClass([
3373
+ "q-combobox",
3374
+ {
3375
+ "q-combobox--readonly": n.readonly,
3376
+ "q-combobox--disabled": n.disabled,
3377
+ "q-combobox--expanded": r.value
3378
+ },
3379
+ n.class
3380
+ ]),
3381
+ readonly: n.readonly,
3382
+ disabled: n.disabled,
3383
+ "data-loading": n.loading,
3384
+ autocomplete: "off",
3385
+ "aria-expanded": r.value,
3386
+ "aria-haspopup": "listbox",
3387
+ "aria-autocomplete": "list",
3388
+ "aria-activedescendant": le.value,
3389
+ size: n.size,
3390
+ onClick: c,
3391
+ onFocusout: p,
3392
+ onKeydown: withModifiers(b, ["stop"])
3393
+ }, createSlots({
3394
+ "label.prepend": withCtx(() => [
3395
+ renderSlot(a.$slots, "label.prepend")
3396
+ ]),
3397
+ "label.append": withCtx(() => [
3398
+ renderSlot(a.$slots, "label.append")
3399
+ ]),
3400
+ append: withCtx(() => [
3401
+ renderSlot(a.$slots, "append"),
3402
+ U.value && i.value ? (openBlock(), createBlock(unref(fe), {
3403
+ key: 0,
3404
+ class: "q-combobox__clear",
3405
+ "b-style": "plain",
3406
+ borderless: "",
3407
+ tabindex: "-1",
3408
+ onClick: ae
3409
+ }, {
3410
+ default: withCtx(() => [
3411
+ createVNode(unref(ee), normalizeProps(guardReactiveProps(n.icons.clear)), null, 16)
3412
+ ]),
3413
+ _: 1
3414
+ })) : createCommentVNode("", true),
3415
+ n.readonly ? createCommentVNode("", true) : (openBlock(), createBlock(unref(fe), {
3416
+ key: 1,
3417
+ class: "q-combobox__chevron",
3418
+ "b-style": "plain",
3419
+ borderless: "",
3420
+ tabindex: "-1",
3421
+ disabled: n.disabled,
3422
+ onClick: P
3423
+ }, {
3424
+ default: withCtx(() => [
3425
+ createVNode(unref(ee), normalizeProps(guardReactiveProps(n.icons.chevron)), null, 16)
3426
+ ]),
3427
+ _: 1
3428
+ }, 8, ["disabled"]))
3429
+ ]),
3430
+ _: 2
3431
+ }, [
3432
+ a.$slots.prepend ? {
3433
+ name: "prepend",
3434
+ fn: withCtx(() => [
3435
+ renderSlot(a.$slots, "prepend")
3436
+ ]),
3437
+ key: "0"
3438
+ } : void 0,
3439
+ a.$slots.extras ? {
3440
+ name: "extras",
3441
+ fn: withCtx(() => [
3442
+ renderSlot(a.$slots, "extras")
3443
+ ]),
3444
+ key: "1"
3445
+ } : void 0
3446
+ ]), 1032, ["modelValue", "id", "label", "required", "placeholder", "class", "readonly", "disabled", "data-loading", "aria-expanded", "aria-activedescendant", "size"]),
3447
+ createVNode(unref(ve), {
3448
+ modelValue: r.value,
3449
+ "onUpdate:modelValue": g[2] || (g[2] = (O) => r.value = O),
3450
+ spy: "",
3451
+ trigger: "manual",
3452
+ placement: "bottom",
3453
+ width: "anchor",
3454
+ offset: 4,
3455
+ anchor: (B = L.value) == null ? void 0 : B.$el,
3456
+ onEnter: oe,
3457
+ onLeave: Ue
3458
+ }, {
3459
+ default: withCtx(() => {
3460
+ var O;
3461
+ return [
3462
+ createElementVNode("div", {
3463
+ ref_key: "contentRef",
3464
+ ref: y,
3465
+ "data-testid": "combobox-dropdown",
3466
+ "data-key": n.id,
3467
+ class: "q-select__body",
3468
+ onFocusout: p
3469
+ }, [
3470
+ renderSlot(a.$slots, "body.prepend"),
3471
+ n.loading ? (openBlock(), createElementBlock("div", to, [
3472
+ createVNode(unref($e), { size: 24 })
3473
+ ])) : z.value.length ? (openBlock(), createBlock(unref(Re), {
3474
+ key: 1,
3475
+ ref_key: "listRef",
3476
+ ref: _,
3477
+ class: "q-select__items",
3478
+ modelValue: s.value,
3479
+ "onUpdate:modelValue": [
3480
+ g[1] || (g[1] = (he) => s.value = he),
3481
+ A
3482
+ ],
3483
+ highlighted: (O = W.value) == null ? void 0 : O[n.itemValue],
3484
+ items: z.value,
3485
+ groups: a.groups,
3486
+ "item-label": n.itemLabel,
3487
+ "item-value": n.itemValue,
3488
+ onMouseup: R
3489
+ }, {
3490
+ item: withCtx(({ item: he }) => [
3491
+ renderSlot(a.$slots, "item", { item: he })
3492
+ ]),
3493
+ _: 3
3494
+ }, 8, ["modelValue", "highlighted", "items", "groups", "item-label", "item-value"])) : (openBlock(), createElementBlock("div", oo, toDisplayString(a.texts.noData), 1)),
3495
+ renderSlot(a.$slots, "body.append")
3496
+ ], 40, eo)
3497
+ ];
3498
+ }),
3499
+ _: 3
3500
+ }, 8, ["modelValue", "anchor"])
3501
+ ], 64);
3502
+ };
3503
+ }
3504
+ });
3505
+ S(ao);
3506
+ const so = {
3507
+ key: 0,
3508
+ class: "q-input-group__prepend"
3509
+ }, io = { key: 0 }, ro = {
3510
+ key: 1,
3511
+ class: "q-input-group__append"
3512
+ }, uo = { key: 0 }, co = /* @__PURE__ */ defineComponent({
3513
+ __name: "QInputGroup",
3514
+ props: {
3515
+ id: { default: void 0 },
3516
+ label: { default: "" },
3517
+ required: { type: Boolean },
3518
+ prependIcon: { default: void 0 },
3519
+ appendIcon: { default: void 0 },
3520
+ size: { default: "large" },
3521
+ class: { default: void 0 }
3522
+ },
3523
+ setup(t) {
3524
+ const o = t;
3525
+ return Me({
3526
+ QField: {
3527
+ size: "block"
3528
+ }
3529
+ }), (e, n) => (openBlock(), createBlock(unref(qe), {
3530
+ id: o.id,
3531
+ class: normalizeClass(["q-input-group", o.class]),
3532
+ label: o.label,
3533
+ required: o.required,
3534
+ size: o.size
3535
+ }, {
3536
+ default: withCtx(() => [
3537
+ e.$slots.prepend || o.prependIcon ? (openBlock(), createElementBlock("div", so, [
3538
+ o.prependIcon ? (openBlock(), createElementBlock("span", io, [
3539
+ createVNode(unref(ee), normalizeProps(guardReactiveProps(o.prependIcon)), null, 16)
3540
+ ])) : createCommentVNode("", true),
3541
+ renderSlot(e.$slots, "prepend")
3542
+ ])) : createCommentVNode("", true),
3543
+ renderSlot(e.$slots, "default"),
3544
+ e.$slots.append || o.appendIcon ? (openBlock(), createElementBlock("div", ro, [
3545
+ o.appendIcon ? (openBlock(), createElementBlock("span", uo, [
3546
+ createVNode(unref(ee), normalizeProps(guardReactiveProps(o.appendIcon)), null, 16)
3547
+ ])) : createCommentVNode("", true),
3548
+ renderSlot(e.$slots, "append")
3549
+ ])) : createCommentVNode("", true)
3550
+ ]),
3551
+ _: 3
3552
+ }, 8, ["id", "class", "label", "required", "size"]));
3553
+ }
3554
+ }), zo = S(co), fo = /* @__PURE__ */ defineComponent({
3555
+ __name: "QLineLoader",
3556
+ props: {
3557
+ class: { default: void 0 }
3558
+ },
3559
+ setup(t) {
3560
+ const o = t;
3561
+ return (e, n) => (openBlock(), createElementBlock("div", {
3562
+ class: normalizeClass(["q-line-loader", o.class])
3563
+ }, null, 2));
3564
+ }
3565
+ });
3566
+ S(fo);
3567
+ const po = {
3568
+ key: 0,
3569
+ class: "q-popover__header"
3570
+ }, mo = {
3571
+ key: 1,
3572
+ class: "q-popover__body"
3573
+ }, vo = ["innerHTML"], ho = { key: 1 }, bo = /* @__PURE__ */ defineComponent({
3574
+ inheritAttrs: false,
3575
+ __name: "QPopover",
3576
+ props: /* @__PURE__ */ mergeModels({
3577
+ anchor: {},
3578
+ arrow: { type: Boolean, default: true },
3579
+ attach: { default: "body" },
3580
+ disabled: { type: Boolean },
3581
+ html: { type: Boolean, default: true },
3582
+ placement: { default: "right" },
3583
+ text: {},
3584
+ title: {}
3585
+ }, {
3586
+ modelValue: { type: Boolean },
3587
+ modelModifiers: {}
3588
+ }),
3589
+ emits: ["update:modelValue"],
3590
+ setup(t) {
3591
+ const o = t, e = useModel(t, "modelValue");
3592
+ return (n, l) => (openBlock(), createBlock(unref(ve), {
3593
+ "model-value": e.value,
3594
+ class: "q-popover",
3595
+ trigger: "click",
3596
+ anchor: o.anchor,
3597
+ arrow: o.arrow,
3598
+ attach: o.attach,
3599
+ disabled: o.disabled,
3600
+ placement: o.placement
3601
+ }, {
3602
+ default: withCtx(() => [
3603
+ o.title || n.$slots.header ? (openBlock(), createElementBlock("h3", po, [
3604
+ createTextVNode(toDisplayString(o.title) + " ", 1),
3605
+ renderSlot(n.$slots, "header")
3606
+ ])) : createCommentVNode("", true),
3607
+ o.text || n.$slots.body ? (openBlock(), createElementBlock("div", mo, [
3608
+ o.html ? (openBlock(), createElementBlock("span", {
3609
+ key: 0,
3610
+ innerHTML: o.text
3611
+ }, null, 8, vo)) : (openBlock(), createElementBlock("span", ho, toDisplayString(o.text), 1)),
3612
+ renderSlot(n.$slots, "body")
3613
+ ])) : createCommentVNode("", true)
3614
+ ]),
3615
+ _: 3
3616
+ }, 8, ["model-value", "anchor", "arrow", "attach", "disabled", "placement"]));
3617
+ }
3618
+ });
3619
+ S(bo);
3620
+ const yo = {
3621
+ key: 0,
3622
+ class: "q-select__value"
3623
+ }, go = {
3624
+ key: 1,
3625
+ class: "q-select__placeholder"
3626
+ }, _o = ["data-key"], ko = {
3627
+ key: 0,
3628
+ class: "q-select__loader"
3629
+ }, wo = {
3630
+ placeholder: "Choose..."
3631
+ }, $o = {
3632
+ chevron: {
3633
+ icon: "chevron-down"
3634
+ },
3635
+ clear: {
3636
+ icon: "close"
3637
+ }
3638
+ }, qo = /* @__PURE__ */ defineComponent({
3639
+ __name: "QSelect",
3640
+ props: /* @__PURE__ */ mergeModels({
3641
+ id: { default: void 0 },
3642
+ label: { default: "" },
3643
+ clearable: { type: Boolean },
3644
+ readonly: { type: Boolean },
3645
+ disabled: { type: Boolean },
3646
+ required: { type: Boolean },
3647
+ loading: { type: Boolean },
3648
+ icons: { default: () => $o },
3649
+ items: {},
3650
+ groups: { default: () => [] },
3651
+ itemValue: { default: "key" },
3652
+ itemLabel: { default: "label" },
3653
+ emptyValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
3654
+ size: { default: void 0 },
3655
+ texts: { default: () => wo },
3656
+ class: { default: "" }
3657
+ }, {
3658
+ modelValue: {
3659
+ type: [String, Number, Boolean, Symbol]
3660
+ },
3661
+ modelModifiers: {}
3662
+ }),
3663
+ emits: /* @__PURE__ */ mergeModels(["before-show", "before-hide", "show", "hide"], ["update:modelValue"]),
3664
+ setup(t, { emit: o }) {
3665
+ const e = t, n = o, l = useModel(t, "modelValue"), s = ref(false), r = ref(""), i = ref(null), f = ref(null), L = ref(null), _ = computed(() => y.value === void 0), y = computed(
3666
+ () => {
3667
+ var d;
3668
+ return (d = e.items) == null ? void 0 : d.find(($) => $[e.itemValue] === l.value);
3669
+ }
3670
+ ), U = computed(
3671
+ () => y.value ? y.value[e.itemLabel] : ""
3672
+ ), z = computed(
3673
+ () => e.clearable && !e.readonly && !e.disabled && !e.loading
3674
+ );
3675
+ function C(d) {
3676
+ l.value = d, A();
3677
+ }
3678
+ function V() {
3679
+ z.value && C(e.emptyValue);
3680
+ }
3681
+ function W() {
3682
+ e.readonly || e.disabled || (s.value ? A() : j());
3683
+ }
3684
+ function le(d) {
3685
+ var $, p, M;
3686
+ !(($ = L.value) != null && $.contains(d.relatedTarget)) && !((M = (p = i.value) == null ? void 0 : p.fieldRef) != null && M.contains(d.relatedTarget)) && A();
3687
+ }
3688
+ function j() {
3689
+ s.value || (n("before-show"), s.value = true);
3690
+ }
3691
+ function A() {
3692
+ s.value && (n("before-hide"), s.value = false);
3693
+ }
3694
+ function Q() {
3695
+ s.value ? A() : j();
3696
+ }
3697
+ let X;
3698
+ function N(d) {
3699
+ if (!(!d.key || e.readonly || e.disabled)) {
3700
+ if (window.clearTimeout(X), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(d.key) && (d.preventDefault(), d.stopPropagation()), ["Enter", " "].includes(d.key) && (s.value = true), ["Escape", "Tab"].includes(d.key) && (s.value ? s.value = false : z.value && d.key === "Escape" && V()), d.key === "Delete" && e.clearable && V(), /^[a-z]$/i.test(d.key)) {
3701
+ r.value += d.key.toLowerCase();
3702
+ for (let $ = 0; $ < e.items.length; $++)
3703
+ if (e.items[$][e.itemLabel].toLowerCase().startsWith(r.value)) {
3704
+ q($);
3705
+ break;
3706
+ }
3707
+ }
3708
+ X = window.setTimeout(function() {
3709
+ r.value = "";
3710
+ }, 500);
3711
+ }
3712
+ }
3713
+ function P() {
3714
+ var d;
3715
+ e.loading ? (d = L.value) == null || d.focus() : b(), n("show");
3716
+ }
3717
+ function ae() {
3718
+ c(), n("hide");
3719
+ }
3720
+ function c() {
3721
+ var d, $;
3722
+ ($ = (d = i.value) == null ? void 0 : d.fieldRef) == null || $.focus();
3723
+ }
3724
+ function b() {
3725
+ var d;
3726
+ (d = f.value) == null || d.$el.focus();
3727
+ }
3728
+ function q(d) {
3729
+ var $;
3730
+ ($ = f.value) == null || $.focusItem(d);
3731
+ }
3732
+ return watch(
3733
+ () => e.loading,
3734
+ (d) => {
3735
+ !d && s.value && nextTick(b);
3736
+ }
3737
+ ), (d, $) => {
3738
+ var p, M;
3739
+ return openBlock(), createElementBlock(Fragment, null, [
3740
+ createVNode(unref(qe), {
3741
+ id: e.id,
3742
+ label: e.label,
3743
+ required: e.required,
3744
+ ref_key: "triggerEl",
3745
+ ref: i,
3746
+ role: "combobox",
3747
+ tabindex: e.disabled ? -1 : 0,
3748
+ class: normalizeClass([
3749
+ "q-select",
3750
+ {
3751
+ "q-select--readonly": e.readonly,
3752
+ "q-select--disabled": e.disabled,
3753
+ "q-select--expanded": s.value
3754
+ },
3755
+ e.class
3756
+ ]),
3757
+ readonly: e.readonly,
3758
+ disabled: e.disabled,
3759
+ "data-loading": e.loading,
3760
+ "aria-expanded": s.value,
3761
+ "aria-haspopup": "listbox",
3762
+ size: e.size,
3763
+ onClick: W,
3764
+ onKeydown: withModifiers(N, ["stop"])
3765
+ }, createSlots({
3766
+ append: withCtx(() => [
3767
+ renderSlot(d.$slots, "append"),
3768
+ z.value && l.value ? (openBlock(), createBlock(unref(fe), {
3769
+ key: 0,
3770
+ class: "q-select__clear",
3771
+ "b-style": "plain",
3772
+ borderless: "",
3773
+ tabindex: "-1",
3774
+ onClick: V
3775
+ }, {
3776
+ default: withCtx(() => [
3777
+ createVNode(unref(ee), normalizeProps(guardReactiveProps(e.icons.clear)), null, 16)
3778
+ ]),
3779
+ _: 1
3780
+ })) : createCommentVNode("", true),
3781
+ e.readonly ? createCommentVNode("", true) : (openBlock(), createBlock(unref(fe), {
3782
+ key: 1,
3783
+ class: "q-select__chevron",
3784
+ "b-style": "plain",
3785
+ borderless: "",
3786
+ tabindex: "-1",
3787
+ disabled: e.disabled,
3788
+ onClick: Q
3789
+ }, {
3790
+ default: withCtx(() => [
3791
+ createVNode(unref(ee), normalizeProps(guardReactiveProps(e.icons.chevron)), null, 16)
3792
+ ]),
3793
+ _: 1
3794
+ }, 8, ["disabled"]))
3795
+ ]),
3796
+ default: withCtx(() => [
3797
+ _.value ? (openBlock(), createElementBlock("span", go, [
3798
+ !e.readonly && !e.disabled ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3799
+ createTextVNode(toDisplayString(d.texts.placeholder), 1)
3800
+ ], 64)) : createCommentVNode("", true)
3801
+ ])) : (openBlock(), createElementBlock("span", yo, toDisplayString(U.value), 1))
3802
+ ]),
3803
+ _: 2
3804
+ }, [
3805
+ (p = y.value) != null && p.icon || d.$slots.prepend ? {
3806
+ name: "prepend",
3807
+ fn: withCtx(() => {
3808
+ var R, oe;
3809
+ return [
3810
+ renderSlot(d.$slots, "prepend"),
3811
+ (R = y.value) != null && R.icon ? (openBlock(), createBlock(unref(ee), normalizeProps(mergeProps({ key: 0 }, (oe = y.value) == null ? void 0 : oe.icon)), null, 16)) : createCommentVNode("", true)
3812
+ ];
3813
+ }),
3814
+ key: "0"
3815
+ } : void 0,
3816
+ d.$slots.extras ? {
3817
+ name: "extras",
3818
+ fn: withCtx(() => [
3819
+ renderSlot(d.$slots, "extras")
3820
+ ]),
3821
+ key: "1"
3822
+ } : void 0
3823
+ ]), 1032, ["id", "label", "required", "tabindex", "class", "readonly", "disabled", "data-loading", "aria-expanded", "size"]),
3824
+ createVNode(unref(ve), {
3825
+ modelValue: s.value,
3826
+ "onUpdate:modelValue": $[1] || ($[1] = (R) => s.value = R),
3827
+ spy: "",
3828
+ trigger: "manual",
3829
+ placement: "bottom",
3830
+ width: "anchor",
3831
+ "scroll-lock": "",
3832
+ anchor: (M = i.value) == null ? void 0 : M.$el,
3833
+ offset: 2,
3834
+ onEnter: P,
3835
+ onLeave: ae
3836
+ }, {
3837
+ default: withCtx(() => [
3838
+ createElementVNode("div", {
3839
+ ref_key: "contentRef",
3840
+ ref: L,
3841
+ "data-testid": "combobox-dropdown",
3842
+ "data-key": e.id,
3843
+ class: "q-select__body",
3844
+ tabindex: "-1",
3845
+ onFocusout: le,
3846
+ onKeydown: withModifiers(N, ["stop"])
3847
+ }, [
3848
+ renderSlot(d.$slots, "body.prepend"),
3849
+ e.loading ? (openBlock(), createElementBlock("div", ko, [
3850
+ createVNode(unref($e), { size: 24 })
3851
+ ])) : (openBlock(), createBlock(unref(Re), {
3852
+ key: 1,
3853
+ ref_key: "listRef",
3854
+ ref: f,
3855
+ class: "q-select__items",
3856
+ modelValue: l.value,
3857
+ "onUpdate:modelValue": [
3858
+ $[0] || ($[0] = (R) => l.value = R),
3859
+ C
3860
+ ],
3861
+ items: e.items,
3862
+ groups: d.groups,
3863
+ "item-label": e.itemLabel,
3864
+ "item-value": e.itemValue
3865
+ }, {
3866
+ item: withCtx(({ item: R }) => [
3867
+ renderSlot(d.$slots, "item", { item: R })
3868
+ ]),
3869
+ _: 3
3870
+ }, 8, ["modelValue", "items", "groups", "item-label", "item-value"])),
3871
+ renderSlot(d.$slots, "body.append")
3872
+ ], 40, _o)
3873
+ ]),
3874
+ _: 3
3875
+ }, 8, ["modelValue", "anchor"])
3876
+ ], 64);
3877
+ };
3878
+ }
3879
+ });
3880
+ S(qo);
3881
+ const Lo = /* @__PURE__ */ defineComponent({
3882
+ __name: "QThemeProvider",
3883
+ props: {
3884
+ theme: {}
3885
+ },
3886
+ setup(t) {
3887
+ const o = t;
3888
+ return (e, n) => (openBlock(), createElementBlock("div", {
3889
+ class: normalizeClass(["q-theme-provider", `q-theme--${o.theme}`])
3890
+ }, [
3891
+ renderSlot(e.$slots, "default")
3892
+ ], 2));
3893
+ }
3894
+ });
3895
+ S(Lo);
3896
+ const Io = ["innerHTML"], xo = { key: 1 }, Bo = /* @__PURE__ */ defineComponent({
3897
+ __name: "QTooltip",
3898
+ props: /* @__PURE__ */ mergeModels({
3899
+ id: { default: void 0 },
3900
+ anchor: {},
3901
+ appearance: { default: "inverted" },
3902
+ arrow: { type: Boolean, default: true },
3903
+ attach: { default: "body" },
3904
+ delay: { default: 500 },
3905
+ disabled: { type: Boolean },
3906
+ html: { type: Boolean, default: true },
3907
+ placement: { default: "right" },
3908
+ text: {},
3909
+ trigger: { default: "hover" },
3910
+ class: { default: void 0 }
3911
+ }, {
3912
+ modelValue: { type: Boolean },
3913
+ modelModifiers: {}
3914
+ }),
3915
+ emits: ["update:modelValue"],
3916
+ setup(t) {
3917
+ const o = t, e = useModel(t, "modelValue"), n = me(o.id);
3918
+ return (l, s) => (openBlock(), createElementBlock(Fragment, null, [
3919
+ renderSlot(l.$slots, "anchor", {
3920
+ props: { "aria-describedby": unref(n) }
3921
+ }),
3922
+ createVNode(unref(ve), {
3923
+ "model-value": e.value,
3924
+ anchor: o.anchor,
3925
+ role: "tooltip",
3926
+ id: unref(n),
3927
+ appearance: o.appearance,
3928
+ arrow: o.arrow,
3929
+ attach: o.attach,
3930
+ class: normalizeClass(["q-tooltip", o.class]),
3931
+ delay: o.delay,
3932
+ disabled: o.disabled,
3933
+ placement: o.placement,
3934
+ trigger: o.trigger
3935
+ }, {
3936
+ default: withCtx(() => [
3937
+ o.html ? (openBlock(), createElementBlock("span", {
3938
+ key: 0,
3939
+ innerHTML: o.text
3940
+ }, null, 8, Io)) : (openBlock(), createElementBlock("span", xo, toDisplayString(o.text), 1))
3941
+ ]),
3942
+ _: 1
3943
+ }, 8, ["model-value", "anchor", "id", "appearance", "arrow", "attach", "class", "delay", "disabled", "placement", "trigger"])
3944
+ ], 64));
3945
+ }
3946
+ });
3947
+ S(Bo);
3948
+ const ChatBotIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFIGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbn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{ class: "q-chatbot" };
3950
+ const _hoisted_2 = { class: "c-sidebar__subtitle" };
3951
+ const _hoisted_3 = ["src"];
3952
+ const _hoisted_4 = { class: "q-chatbot__message" };
3953
+ const _hoisted_5 = {
3954
+ key: 0,
3955
+ class: "q-chatbot__message-loading"
3956
+ };
3957
+ const _hoisted_6 = /* @__PURE__ */ createElementVNode("div", null, null, -1);
3958
+ const _hoisted_7 = /* @__PURE__ */ createElementVNode("div", null, null, -1);
3959
+ const _hoisted_8 = /* @__PURE__ */ createElementVNode("div", null, null, -1);
3960
+ const _hoisted_9 = [
3961
+ _hoisted_6,
3962
+ _hoisted_7,
3963
+ _hoisted_8
3964
+ ];
3965
+ const _hoisted_10 = {
3966
+ key: 0,
3967
+ class: "q-chatbot__sender"
3968
+ };
3969
+ const _hoisted_11 = {
3970
+ key: 1,
3971
+ class: "q-chatbot__timestamp"
3972
+ };
3973
+ const _hoisted_12 = ["innerHTML"];
3974
+ const _hoisted_13 = {
3975
+ key: 3,
3976
+ class: "q-chatbot__text"
3977
+ };
3978
+ const _sfc_main = /* @__PURE__ */ defineComponent({
3979
+ ...{ name: "ChatBot" },
3980
+ __name: "ChatBot",
3981
+ props: {
3982
+ apiEndpoint: { default: "http://localhost:3000" },
3983
+ texts: { default: () => ({
3984
+ chatbotTitle: "ChatBot",
3985
+ qButtonTitle: "Send message",
3986
+ placeholderMessage: "Type your message here...",
3987
+ initialMessage: "Howdy! I am GenioBot 👋, Quidgest's personal AI assistant! How can I help you?",
3988
+ loginError: "Uh oh, I could not authenticate with the Quidgest API endpoint 😓",
3989
+ botIsSick: "*cough cough* GenioBot is not feeling alright 🥴️🤒, looks like something failed!"
3990
+ }) },
3991
+ username: {}
3992
+ },
3993
+ setup(__props) {
3994
+ let messages = ref([]);
3995
+ let msgHistoryStack = [];
3996
+ let nextMessageId = 1;
3997
+ let userPrompt = ref("");
3998
+ let isChatDisabled = false;
3999
+ let isLoading = false;
4000
+ const messagesContainer = ref(null);
4001
+ const promptInput = ref(null);
4002
+ const props = __props;
4003
+ onMounted(() => {
4004
+ initChat();
4005
+ nextTick(scrollChatToBottom);
4006
+ });
4007
+ const getParsedEndpoint = computed(() => {
4008
+ try {
4009
+ let url = new URL(props.apiEndpoint).href;
4010
+ if (url.charAt(url.length - 1) == "/") {
4011
+ url = url.slice(0, -1);
4012
+ }
4013
+ return url;
4014
+ } catch (ex) {
4015
+ addChatMessage(props.texts.botIsSick);
4016
+ isChatDisabled = true;
4017
+ throw Error("Could not parse Endpoint URL:\n" + ex);
4018
+ }
4019
+ });
4020
+ const sortedMessages = computed(() => {
4021
+ return messages.value.toSorted((a, b) => {
4022
+ const diff = new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime();
4023
+ return diff !== 0 ? diff : a.sender === "user" ? -1 : 1;
4024
+ });
4025
+ });
4026
+ const userMessages = computed(() => {
4027
+ return messages.value.filter((m) => m.sender === "user");
4028
+ });
4029
+ function initChat() {
4030
+ axios.post(getParsedEndpoint.value + "/auth/login", {
4031
+ username: props.username,
4032
+ password: "test"
4033
+ }).then((response) => {
4034
+ if (response.status != 200 || !response.data.success) {
4035
+ isChatDisabled = true;
4036
+ addChatMessage(props.texts.loginError);
4037
+ return console.log(
4038
+ `Unsuccessful login, endpoint gave status ${response.status}`
4039
+ );
4040
+ }
4041
+ sendInitialMessage();
4042
+ }).catch((error) => {
4043
+ if (error) {
4044
+ isChatDisabled = true;
4045
+ addChatMessage(props.texts.loginError);
4046
+ console.log(
4047
+ "The following error ocurred while trying to login: \n" + error
4048
+ );
4049
+ }
4050
+ });
4051
+ }
4052
+ function addChatMessage(message, sender = "bot") {
4053
+ messages.value.push({
4054
+ id: nextMessageId++,
4055
+ text: message,
4056
+ timestamp: /* @__PURE__ */ new Date(),
4057
+ sender
4058
+ });
4059
+ }
4060
+ function getLastMessage() {
4061
+ return messages.value.find(
4062
+ (m) => m.id === nextMessageId - 1
4063
+ );
4064
+ }
4065
+ function sendInitialMessage() {
4066
+ addChatMessage(props.texts.initialMessage);
4067
+ }
4068
+ function resetChat() {
4069
+ messages.value = [];
4070
+ msgHistoryStack = [];
4071
+ userPrompt.value = "";
4072
+ isLoading = false;
4073
+ isChatDisabled = false;
4074
+ sendInitialMessage();
4075
+ }
4076
+ function scrollChatToBottom() {
4077
+ if (messagesContainer.value == null)
4078
+ return;
4079
+ const element = messagesContainer.value;
4080
+ setTimeout(
4081
+ () => element.scrollIntoView(false),
4082
+ 100
4083
+ );
4084
+ }
4085
+ function handleKey(event) {
4086
+ if (promptInput.value == null)
4087
+ return;
4088
+ if (event.key == "ArrowUp") {
4089
+ if (userMessages.value.length == 0)
4090
+ return;
4091
+ let lastMsgObj = userMessages.value[userMessages.value.length - 1 - msgHistoryStack.length];
4092
+ if (!lastMsgObj)
4093
+ return;
4094
+ msgHistoryStack.push(userPrompt.value);
4095
+ userPrompt.value = lastMsgObj.text;
4096
+ nextTick(
4097
+ () => setCursorPosition(
4098
+ promptInput.value,
4099
+ lastMsgObj.text.length
4100
+ )
4101
+ );
4102
+ } else if (event.key == "ArrowDown") {
4103
+ let previousHistoryText = msgHistoryStack.pop();
4104
+ if (!previousHistoryText) {
4105
+ userPrompt.value = "";
4106
+ return;
4107
+ }
4108
+ userPrompt.value = previousHistoryText;
4109
+ }
4110
+ }
4111
+ function sendMessage() {
4112
+ if (userPrompt.value.trim().length == 0 || isLoading || isChatDisabled)
4113
+ return;
4114
+ addChatMessage(userPrompt.value, "user");
4115
+ scrollChatToBottom();
4116
+ setChatPrompt(userPrompt.value);
4117
+ userPrompt.value = "";
4118
+ }
4119
+ function setChatPrompt(prompt) {
4120
+ addChatMessage("");
4121
+ let msg = getLastMessage();
4122
+ let params = {
4123
+ message: prompt,
4124
+ project: "GenIO",
4125
+ user: props.username
4126
+ };
4127
+ isLoading = true;
4128
+ axios({
4129
+ url: getParsedEndpoint.value + "/prompt/message",
4130
+ method: "POST",
4131
+ data: params,
4132
+ onDownloadProgress: (progressEvent) => {
4133
+ var _a, _b;
4134
+ const chunk = (_a = progressEvent.event) == null ? void 0 : _a.currentTarget.response;
4135
+ const status = (_b = progressEvent.event) == null ? void 0 : _b.currentTarget.status;
4136
+ if (status != 200)
4137
+ return;
4138
+ if (msg)
4139
+ msg.text = chunk;
4140
+ }
4141
+ }).then(({ data }) => {
4142
+ if (msg)
4143
+ msg.text = data;
4144
+ }).catch((error) => {
4145
+ addChatMessage(props.texts.botIsSick);
4146
+ isChatDisabled = true;
4147
+ console.log(error);
4148
+ }).finally(() => {
4149
+ isLoading = false;
4150
+ });
4151
+ }
4152
+ function getSenderName(sender) {
4153
+ return sender === "bot" ? "GenioBot" : "You";
4154
+ }
4155
+ function getConvertedTime(date) {
4156
+ return date.toLocaleString();
4157
+ }
4158
+ function setCursorPosition(elem, pos) {
4159
+ elem.focus();
4160
+ elem.setSelectionRange(pos, pos);
4161
+ }
4162
+ watch(() => props.apiEndpoint, () => {
4163
+ resetChat();
4164
+ });
4165
+ return (_ctx, _cache) => {
4166
+ return openBlock(), createElementBlock("div", _hoisted_1, [
4167
+ createElementVNode("div", _hoisted_2, [
4168
+ createElementVNode("span", null, toDisplayString(props.texts.chatbotTitle), 1)
4169
+ ]),
4170
+ createElementVNode("div", {
4171
+ class: "q-chatbot__content",
4172
+ ref_key: "messagesContainer",
4173
+ ref: messagesContainer
4174
+ }, [
4175
+ (openBlock(true), createElementBlock(Fragment, null, renderList(sortedMessages.value, (message) => {
4176
+ return openBlock(), createElementBlock("div", {
4177
+ key: message.id,
4178
+ class: normalizeClass([
4179
+ "q-chatbot__message-wrapper",
4180
+ {
4181
+ "q-chatbot__message-wrapper_right": message.sender == "user"
4182
+ }
4183
+ ])
4184
+ }, [
4185
+ message.sender == "bot" ? (openBlock(), createElementBlock("img", {
4186
+ key: 0,
4187
+ src: unref(ChatBotIcon),
4188
+ alt: "",
4189
+ class: "q-chatbot__profile"
4190
+ }, null, 8, _hoisted_3)) : createCommentVNode("", true),
4191
+ createElementVNode("div", _hoisted_4, [
4192
+ unref(isLoading) && !message.text ? (openBlock(), createElementBlock("div", _hoisted_5, _hoisted_9)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
4193
+ message.text && message.sender == "bot" ? (openBlock(), createElementBlock("div", _hoisted_10, toDisplayString(getSenderName(message.sender) + " " + getConvertedTime(message.timestamp)), 1)) : createCommentVNode("", true),
4194
+ message.text && message.sender == "user" ? (openBlock(), createElementBlock("div", _hoisted_11, toDisplayString(getConvertedTime(message.timestamp)), 1)) : createCommentVNode("", true),
4195
+ message.sender == "bot" ? (openBlock(), createElementBlock("div", {
4196
+ key: 2,
4197
+ class: "q-chatbot__text",
4198
+ innerHTML: message.text
4199
+ }, null, 8, _hoisted_12)) : (openBlock(), createElementBlock("div", _hoisted_13, toDisplayString(message.text), 1))
4200
+ ], 64))
4201
+ ])
4202
+ ], 2);
4203
+ }), 128))
4204
+ ], 512),
4205
+ createVNode(unref(zo), {
4206
+ size: "block",
4207
+ disabled: unref(isChatDisabled)
4208
+ }, {
4209
+ append: withCtx(() => [
4210
+ createVNode(unref(fe), {
4211
+ title: props.texts.qButtonTitle,
4212
+ "b-style": "primary",
4213
+ class: "q-chatbot__send",
4214
+ disabled: unref(isChatDisabled),
4215
+ onClick: sendMessage
4216
+ }, {
4217
+ default: withCtx(() => [
4218
+ createVNode(unref(ee), { icon: "send" })
4219
+ ]),
4220
+ _: 1
4221
+ }, 8, ["title", "disabled"])
4222
+ ]),
4223
+ default: withCtx(() => [
4224
+ createVNode(unref(Pt), {
4225
+ ref_key: "promptInput",
4226
+ ref: promptInput,
4227
+ modelValue: unref(userPrompt),
4228
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(userPrompt) ? userPrompt.value = $event : userPrompt = $event),
4229
+ class: "q-chatbot__input",
4230
+ placeholder: props.texts.placeholderMessage,
4231
+ disabled: unref(isChatDisabled),
4232
+ onKeyup: withKeys(sendMessage, ["enter"]),
4233
+ onKeydown: handleKey
4234
+ }, null, 8, ["modelValue", "placeholder", "disabled"])
4235
+ ]),
4236
+ _: 1
4237
+ }, 8, ["disabled"])
4238
+ ]);
4239
+ };
4240
+ }
4241
+ });
4242
+ export {
4243
+ _sfc_main as default
4244
+ };