@inploi/plugin-chatbot 3.11.0 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
6
6
  return value;
7
7
  };
8
8
  const sdk = require("@inploi/sdk");
9
- var n$2, l$4, u$3, t$3, i$3, o$4, r$4, f$3, e$3, c$3 = {}, s$3 = [], a$3 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, h$2 = Array.isArray;
9
+ var n$1, l$4, u$3, t$3, i$3, o$4, r$4, f$3, e$3, c$3 = {}, s$3 = [], a$3 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, h$2 = Array.isArray;
10
10
  function v$3(n2, l2) {
11
11
  for (var u2 in l2)
12
12
  n2[u2] = l2[u2];
@@ -20,7 +20,7 @@ function y$3(l2, u2, t2) {
20
20
  var i2, o2, r2, f2 = {};
21
21
  for (r2 in u2)
22
22
  "key" == r2 ? i2 = u2[r2] : "ref" == r2 ? o2 = u2[r2] : f2[r2] = u2[r2];
23
- if (arguments.length > 2 && (f2.children = arguments.length > 3 ? n$2.call(arguments, 2) : t2), "function" == typeof l2 && null != l2.defaultProps)
23
+ if (arguments.length > 2 && (f2.children = arguments.length > 3 ? n$1.call(arguments, 2) : t2), "function" == typeof l2 && null != l2.defaultProps)
24
24
  for (r2 in l2.defaultProps)
25
25
  void 0 === f2[r2] && (f2[r2] = l2.defaultProps[r2]);
26
26
  return d$4(l2, f2, i2, o2, null);
@@ -218,7 +218,7 @@ function N$2(l2, u2, t2, i2, o2, r2, f2, e2, s2) {
218
218
  if (null === k2)
219
219
  d2 === _2 || e2 && l2.data === _2 || (l2.data = _2);
220
220
  else {
221
- if (r2 = r2 && n$2.call(l2.childNodes), v2 = (d2 = t2.props || c$3).dangerouslySetInnerHTML, y2 = _2.dangerouslySetInnerHTML, !e2) {
221
+ if (r2 = r2 && n$1.call(l2.childNodes), v2 = (d2 = t2.props || c$3).dangerouslySetInnerHTML, y2 = _2.dangerouslySetInnerHTML, !e2) {
222
222
  if (null != r2)
223
223
  for (d2 = {}, b2 = 0; b2 < l2.attributes.length; b2++)
224
224
  d2[l2.attributes[b2].name] = l2.attributes[b2].value;
@@ -261,7 +261,7 @@ function B$3(n2, l2, u2) {
261
261
  }
262
262
  function D$1(u2, t2, i2) {
263
263
  var o2, r2, f2, e2;
264
- l$4.__ && l$4.__(u2, t2), r2 = (o2 = "function" == typeof i2) ? null : i2 && i2.__k || t2.__k, f2 = [], e2 = [], L$1(t2, u2 = (!o2 && i2 || t2).__k = y$3(k$3, null, [u2]), r2 || c$3, c$3, void 0 !== t2.ownerSVGElement, !o2 && i2 ? [i2] : r2 ? null : t2.firstChild ? n$2.call(t2.childNodes) : null, f2, !o2 && i2 ? i2 : r2 ? r2.__e : t2.firstChild, o2, e2), M$1(f2, u2, e2);
264
+ l$4.__ && l$4.__(u2, t2), r2 = (o2 = "function" == typeof i2) ? null : i2 && i2.__k || t2.__k, f2 = [], e2 = [], L$1(t2, u2 = (!o2 && i2 || t2).__k = y$3(k$3, null, [u2]), r2 || c$3, c$3, void 0 !== t2.ownerSVGElement, !o2 && i2 ? [i2] : r2 ? null : t2.firstChild ? n$1.call(t2.childNodes) : null, f2, !o2 && i2 ? i2 : r2 ? r2.__e : t2.firstChild, o2, e2), M$1(f2, u2, e2);
265
265
  }
266
266
  function E$3(n2, l2) {
267
267
  D$1(n2, l2, E$3);
@@ -270,7 +270,7 @@ function F$2(l2, u2, t2) {
270
270
  var i2, o2, r2, f2, e2 = v$3({}, l2.props);
271
271
  for (r2 in l2.type && l2.type.defaultProps && (f2 = l2.type.defaultProps), u2)
272
272
  "key" == r2 ? i2 = u2[r2] : "ref" == r2 ? o2 = u2[r2] : e2[r2] = void 0 === u2[r2] && void 0 !== f2 ? f2[r2] : u2[r2];
273
- return arguments.length > 2 && (e2.children = arguments.length > 3 ? n$2.call(arguments, 2) : t2), d$4(l2.type, e2, i2 || l2.key, o2 || l2.ref, null);
273
+ return arguments.length > 2 && (e2.children = arguments.length > 3 ? n$1.call(arguments, 2) : t2), d$4(l2.type, e2, i2 || l2.key, o2 || l2.ref, null);
274
274
  }
275
275
  function G$1(n2, l2) {
276
276
  var u2 = { __c: l2 = "__cC" + e$3++, __: n2, Consumer: function(n3, l3) {
@@ -293,7 +293,7 @@ function G$1(n2, l2) {
293
293
  } };
294
294
  return u2.Provider.__ = u2.Consumer.contextType = u2;
295
295
  }
296
- n$2 = s$3.slice, l$4 = { __e: function(n2, l2, u2, t2) {
296
+ n$1 = s$3.slice, l$4 = { __e: function(n2, l2, u2, t2) {
297
297
  for (var i2, o2, r2; l2 = l2.__; )
298
298
  if ((i2 = l2.__c) && !i2.__)
299
299
  try {
@@ -313,731 +313,507 @@ n$2 = s$3.slice, l$4 = { __e: function(n2, l2, u2, t2) {
313
313
  }, b$3.prototype.render = k$3, i$3 = [], r$4 = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, f$3 = function(n2, l2) {
314
314
  return n2.__v.__b - l2.__v.__b;
315
315
  }, x$4.__r = 0, e$3 = 0;
316
- var t$2, r$3, u$2, i$2, o$3 = 0, f$2 = [], c$2 = [], e$2 = l$4.__b, a$2 = l$4.__r, v$2 = l$4.diffed, l$3 = l$4.__c, m$2 = l$4.unmount;
317
- function d$3(t2, u2) {
318
- l$4.__h && l$4.__h(r$3, t2, o$3 || u2), o$3 = 0;
319
- var i2 = r$3.__H || (r$3.__H = { __: [], __h: [] });
320
- return t2 >= i2.__.length && i2.__.push({ __V: c$2 }), i2.__[t2];
321
- }
322
- function h$1(n2) {
323
- return o$3 = 1, s$2(B$2, n2);
324
- }
325
- function s$2(n2, u2, i2) {
326
- var o2 = d$3(t$2++, 2);
327
- if (o2.t = n2, !o2.__c && (o2.__ = [i2 ? i2(u2) : B$2(void 0, u2), function(n3) {
328
- var t2 = o2.__N ? o2.__N[0] : o2.__[0], r2 = o2.t(t2, n3);
329
- t2 !== r2 && (o2.__N = [r2, o2.__[1]], o2.__c.setState({}));
330
- }], o2.__c = r$3, !r$3.u)) {
331
- var f2 = function(n3, t2, r2) {
332
- if (!o2.__c.__H)
333
- return true;
334
- var u3 = o2.__c.__H.__.filter(function(n4) {
335
- return n4.__c;
336
- });
337
- if (u3.every(function(n4) {
338
- return !n4.__N;
339
- }))
340
- return !c2 || c2.call(this, n3, t2, r2);
341
- var i3 = false;
342
- return u3.forEach(function(n4) {
343
- if (n4.__N) {
344
- var t3 = n4.__[0];
345
- n4.__ = n4.__N, n4.__N = void 0, t3 !== n4.__[0] && (i3 = true);
346
- }
347
- }), !(!i3 && o2.__c.props === n3) && (!c2 || c2.call(this, n3, t2, r2));
348
- };
349
- r$3.u = true;
350
- var c2 = r$3.shouldComponentUpdate, e2 = r$3.componentWillUpdate;
351
- r$3.componentWillUpdate = function(n3, t2, r2) {
352
- if (this.__e) {
353
- var u3 = c2;
354
- c2 = void 0, f2(n3, t2, r2), c2 = u3;
355
- }
356
- e2 && e2.call(this, n3, t2, r2);
357
- }, r$3.shouldComponentUpdate = f2;
316
+ var ValiError = class extends Error {
317
+ /**
318
+ * Creates a Valibot error with useful information.
319
+ *
320
+ * @param issues The error issues.
321
+ */
322
+ constructor(issues) {
323
+ super(issues[0].message);
324
+ __publicField(this, "issues");
325
+ this.name = "ValiError";
326
+ this.issues = issues;
358
327
  }
359
- return o2.__N || o2.__;
360
- }
361
- function p$3(u2, i2) {
362
- var o2 = d$3(t$2++, 3);
363
- !l$4.__s && z$1(o2.__H, i2) && (o2.__ = u2, o2.i = i2, r$3.__H.__h.push(o2));
328
+ };
329
+ function coerce(schema, action) {
330
+ return {
331
+ ...schema,
332
+ _parse(input, info) {
333
+ return schema._parse(action(input), info);
334
+ }
335
+ };
364
336
  }
365
- function y$2(u2, i2) {
366
- var o2 = d$3(t$2++, 4);
367
- !l$4.__s && z$1(o2.__H, i2) && (o2.__ = u2, o2.i = i2, r$3.__h.push(o2));
337
+ function getIssues(issues) {
338
+ return { issues };
368
339
  }
369
- function _$4(n2) {
370
- return o$3 = 5, F$1(function() {
371
- return { current: n2 };
372
- }, []);
340
+ function getOutput(output) {
341
+ return { output };
373
342
  }
374
- function A$2(n2, t2, r2) {
375
- o$3 = 6, y$2(function() {
376
- return "function" == typeof n2 ? (n2(t2()), function() {
377
- return n2(null);
378
- }) : n2 ? (n2.current = t2(), function() {
379
- return n2.current = null;
380
- }) : void 0;
381
- }, null == r2 ? r2 : r2.concat(n2));
343
+ function getIssue(info, issue) {
344
+ return {
345
+ reason: info == null ? void 0 : info.reason,
346
+ validation: issue.validation,
347
+ origin: (info == null ? void 0 : info.origin) || "value",
348
+ message: issue.message,
349
+ input: issue.input,
350
+ path: issue.path,
351
+ abortEarly: info == null ? void 0 : info.abortEarly,
352
+ abortPipeEarly: info == null ? void 0 : info.abortPipeEarly,
353
+ skipPipe: info == null ? void 0 : info.skipPipe
354
+ };
382
355
  }
383
- function F$1(n2, r2) {
384
- var u2 = d$3(t$2++, 7);
385
- return z$1(u2.__H, r2) ? (u2.__V = n2(), u2.i = r2, u2.__h = n2, u2.__V) : u2.__;
356
+ function getPipeInfo(info, reason) {
357
+ return {
358
+ reason,
359
+ origin: info == null ? void 0 : info.origin,
360
+ abortEarly: info == null ? void 0 : info.abortEarly,
361
+ abortPipeEarly: info == null ? void 0 : info.abortPipeEarly,
362
+ skipPipe: info == null ? void 0 : info.skipPipe
363
+ };
386
364
  }
387
- function T$2(n2, t2) {
388
- return o$3 = 8, F$1(function() {
389
- return n2;
390
- }, t2);
365
+ function executePipe(input, pipe2, parseInfo, reason) {
366
+ if (!pipe2 || !pipe2.length || (parseInfo == null ? void 0 : parseInfo.skipPipe)) {
367
+ return getOutput(input);
368
+ }
369
+ let pipeInfo;
370
+ let issues;
371
+ let output = input;
372
+ for (const action of pipe2) {
373
+ const result = action._parse(output);
374
+ if (result.issues) {
375
+ pipeInfo = pipeInfo || getPipeInfo(parseInfo, reason);
376
+ for (const issueInfo of result.issues) {
377
+ const issue = getIssue(pipeInfo, issueInfo);
378
+ issues ? issues.push(issue) : issues = [issue];
379
+ }
380
+ if (pipeInfo.abortEarly || pipeInfo.abortPipeEarly) {
381
+ break;
382
+ }
383
+ } else {
384
+ output = result.output;
385
+ }
386
+ }
387
+ return issues ? getIssues(issues) : getOutput(output);
391
388
  }
392
- function q$1(n2) {
393
- var u2 = r$3.context[n2.__c], i2 = d$3(t$2++, 9);
394
- return i2.c = n2, u2 ? (null == i2.__ && (i2.__ = true, u2.sub(r$3)), u2.props.value) : n2.__;
389
+ function getDefaultArgs(arg1, arg2) {
390
+ return Array.isArray(arg1) ? [void 0, arg1] : [arg1, arg2];
395
391
  }
396
- function x$3(t2, r2) {
397
- l$4.useDebugValue && l$4.useDebugValue(r2 ? r2(t2) : t2);
392
+ function getErrorMessage(message) {
393
+ return typeof message === "function" ? message() : message;
398
394
  }
399
- function P$2(n2) {
400
- var u2 = d$3(t$2++, 10), i2 = h$1();
401
- return u2.__ = n2, r$3.componentDidCatch || (r$3.componentDidCatch = function(n3, t2) {
402
- u2.__ && u2.__(n3, t2), i2[1](n3);
403
- }), [i2[0], function() {
404
- i2[1](void 0);
405
- }];
395
+ function getPipeIssues(validation, message, input, requirement) {
396
+ return getIssues([
397
+ {
398
+ validation,
399
+ message: getErrorMessage(message),
400
+ input,
401
+ requirement
402
+ }
403
+ ]);
406
404
  }
407
- function V$1() {
408
- var n2 = d$3(t$2++, 11);
409
- if (!n2.__) {
410
- for (var u2 = r$3.__v; null !== u2 && !u2.__m && null !== u2.__; )
411
- u2 = u2.__;
412
- var i2 = u2.__m || (u2.__m = [0, 0]);
413
- n2.__ = "P" + i2[0] + "-" + i2[1]++;
405
+ function getRestAndDefaultArgs(arg1, arg2, arg3) {
406
+ if (!arg1 || typeof arg1 === "object" && !Array.isArray(arg1)) {
407
+ const [error2, pipe22] = getDefaultArgs(arg2, arg3);
408
+ return [arg1, error2, pipe22];
414
409
  }
415
- return n2.__;
410
+ const [error, pipe2] = getDefaultArgs(
411
+ arg1,
412
+ arg2
413
+ );
414
+ return [void 0, error, pipe2];
416
415
  }
417
- function b$2() {
418
- for (var t2; t2 = f$2.shift(); )
419
- if (t2.__P && t2.__H)
420
- try {
421
- t2.__H.__h.forEach(k$2), t2.__H.__h.forEach(w$3), t2.__H.__h = [];
422
- } catch (r2) {
423
- t2.__H.__h = [], l$4.__e(r2, t2.__v);
416
+ function getSchemaIssues(info, reason, validation, message, input, issues) {
417
+ return {
418
+ issues: [
419
+ {
420
+ reason,
421
+ validation,
422
+ origin: (info == null ? void 0 : info.origin) || "value",
423
+ message: getErrorMessage(message),
424
+ input,
425
+ issues,
426
+ abortEarly: info == null ? void 0 : info.abortEarly,
427
+ abortPipeEarly: info == null ? void 0 : info.abortPipeEarly,
428
+ skipPipe: info == null ? void 0 : info.skipPipe
424
429
  }
430
+ ]
431
+ };
425
432
  }
426
- l$4.__b = function(n2) {
427
- r$3 = null, e$2 && e$2(n2);
428
- }, l$4.__r = function(n2) {
429
- a$2 && a$2(n2), t$2 = 0;
430
- var i2 = (r$3 = n2.__c).__H;
431
- i2 && (u$2 === r$3 ? (i2.__h = [], r$3.__h = [], i2.__.forEach(function(n3) {
432
- n3.__N && (n3.__ = n3.__N), n3.__V = c$2, n3.__N = n3.i = void 0;
433
- })) : (i2.__h.forEach(k$2), i2.__h.forEach(w$3), i2.__h = [], t$2 = 0)), u$2 = r$3;
434
- }, l$4.diffed = function(t2) {
435
- v$2 && v$2(t2);
436
- var o2 = t2.__c;
437
- o2 && o2.__H && (o2.__H.__h.length && (1 !== f$2.push(o2) && i$2 === l$4.requestAnimationFrame || ((i$2 = l$4.requestAnimationFrame) || j$2)(b$2)), o2.__H.__.forEach(function(n2) {
438
- n2.i && (n2.__H = n2.i), n2.__V !== c$2 && (n2.__ = n2.__V), n2.i = void 0, n2.__V = c$2;
439
- })), u$2 = r$3 = null;
440
- }, l$4.__c = function(t2, r2) {
441
- r2.some(function(t3) {
442
- try {
443
- t3.__h.forEach(k$2), t3.__h = t3.__h.filter(function(n2) {
444
- return !n2.__ || w$3(n2);
445
- });
446
- } catch (u2) {
447
- r2.some(function(n2) {
448
- n2.__h && (n2.__h = []);
449
- }), r2 = [], l$4.__e(u2, t3.__v);
450
- }
451
- }), l$3 && l$3(t2, r2);
452
- }, l$4.unmount = function(t2) {
453
- m$2 && m$2(t2);
454
- var r2, u2 = t2.__c;
455
- u2 && u2.__H && (u2.__H.__.forEach(function(n2) {
456
- try {
457
- k$2(n2);
458
- } catch (n3) {
459
- r2 = n3;
433
+ function any(pipe2) {
434
+ return {
435
+ type: "any",
436
+ async: false,
437
+ pipe: pipe2,
438
+ _parse(input, info) {
439
+ return executePipe(input, this.pipe, info, "any");
460
440
  }
461
- }), u2.__H = void 0, r2 && l$4.__e(r2, u2.__v));
462
- };
463
- var g$3 = "function" == typeof requestAnimationFrame;
464
- function j$2(n2) {
465
- var t2, r2 = function() {
466
- clearTimeout(u2), g$3 && cancelAnimationFrame(t2), setTimeout(n2);
467
- }, u2 = setTimeout(r2, 100);
468
- g$3 && (t2 = requestAnimationFrame(r2));
469
- }
470
- function k$2(n2) {
471
- var t2 = r$3, u2 = n2.__c;
472
- "function" == typeof u2 && (n2.__c = void 0, u2()), r$3 = t2;
441
+ };
473
442
  }
474
- function w$3(n2) {
475
- var t2 = r$3;
476
- n2.__c = n2.__(), r$3 = t2;
477
- }
478
- function z$1(n2, t2) {
479
- return !n2 || n2.length !== t2.length || t2.some(function(t3, r2) {
480
- return t3 !== n2[r2];
481
- });
482
- }
483
- function B$2(n2, t2) {
484
- return "function" == typeof t2 ? t2(n2) : t2;
485
- }
486
- function i$1() {
487
- throw new Error("Cycle detected");
488
- }
489
- var t$1 = Symbol.for("preact-signals");
490
- function r$2() {
491
- if (!(v$1 > 1)) {
492
- var i2, t2 = false;
493
- while (void 0 !== f$1) {
494
- var r2 = f$1;
495
- f$1 = void 0;
496
- e$1++;
497
- while (void 0 !== r2) {
498
- var n2 = r2.o;
499
- r2.o = void 0;
500
- r2.f &= -3;
501
- if (!(8 & r2.f) && l$2(r2))
502
- try {
503
- r2.c();
504
- } catch (r3) {
505
- if (!t2) {
506
- i2 = r3;
507
- t2 = true;
443
+ function array(item, arg2, arg3) {
444
+ const [message = "Invalid type", pipe2] = getDefaultArgs(arg2, arg3);
445
+ return {
446
+ type: "array",
447
+ async: false,
448
+ item,
449
+ message,
450
+ pipe: pipe2,
451
+ _parse(input, info) {
452
+ if (!Array.isArray(input)) {
453
+ return getSchemaIssues(info, "type", "array", this.message, input);
454
+ }
455
+ let issues;
456
+ const output = [];
457
+ for (let key = 0; key < input.length; key++) {
458
+ const value2 = input[key];
459
+ const result = this.item._parse(value2, info);
460
+ if (result.issues) {
461
+ const pathItem = {
462
+ type: "array",
463
+ input,
464
+ key,
465
+ value: value2
466
+ };
467
+ for (const issue of result.issues) {
468
+ if (issue.path) {
469
+ issue.path.unshift(pathItem);
470
+ } else {
471
+ issue.path = [pathItem];
508
472
  }
473
+ issues == null ? void 0 : issues.push(issue);
509
474
  }
510
- r2 = n2;
475
+ if (!issues) {
476
+ issues = result.issues;
477
+ }
478
+ if (info == null ? void 0 : info.abortEarly) {
479
+ break;
480
+ }
481
+ } else {
482
+ output.push(result.output);
483
+ }
511
484
  }
485
+ return issues ? getIssues(issues) : executePipe(output, this.pipe, info, "array");
512
486
  }
513
- e$1 = 0;
514
- v$1--;
515
- if (t2)
516
- throw i2;
517
- } else
518
- v$1--;
487
+ };
519
488
  }
520
- function n$1(i2) {
521
- if (v$1 > 0)
522
- return i2();
523
- v$1++;
524
- try {
525
- return i2();
526
- } finally {
527
- r$2();
528
- }
489
+ function boolean(arg1, arg2) {
490
+ const [message = "Invalid type", pipe2] = getDefaultArgs(arg1, arg2);
491
+ return {
492
+ type: "boolean",
493
+ async: false,
494
+ message,
495
+ pipe: pipe2,
496
+ _parse(input, info) {
497
+ if (typeof input !== "boolean") {
498
+ return getSchemaIssues(info, "type", "boolean", this.message, input);
499
+ }
500
+ return executePipe(input, this.pipe, info, "boolean");
501
+ }
502
+ };
529
503
  }
530
- var o$2 = void 0;
531
- var f$1 = void 0, v$1 = 0, e$1 = 0, u$1 = 0;
532
- function c$1(i2) {
533
- if (void 0 !== o$2) {
534
- var t2 = i2.n;
535
- if (void 0 === t2 || t2.t !== o$2) {
536
- t2 = { i: 0, S: i2, p: o$2.s, n: void 0, t: o$2, e: void 0, x: void 0, r: t2 };
537
- if (void 0 !== o$2.s)
538
- o$2.s.n = t2;
539
- o$2.s = t2;
540
- i2.n = t2;
541
- if (32 & o$2.f)
542
- i2.S(t2);
543
- return t2;
544
- } else if (-1 === t2.i) {
545
- t2.i = 0;
546
- if (void 0 !== t2.n) {
547
- t2.n.p = t2.p;
548
- if (void 0 !== t2.p)
549
- t2.p.n = t2.n;
550
- t2.p = o$2.s;
551
- t2.n = void 0;
552
- o$2.s.n = t2;
553
- o$2.s = t2;
504
+ function number$1(arg1, arg2) {
505
+ const [message = "Invalid type", pipe2] = getDefaultArgs(arg1, arg2);
506
+ return {
507
+ type: "number",
508
+ async: false,
509
+ message,
510
+ pipe: pipe2,
511
+ _parse(input, info) {
512
+ if (typeof input !== "number" || isNaN(input)) {
513
+ return getSchemaIssues(info, "type", "number", this.message, input);
554
514
  }
555
- return t2;
515
+ return executePipe(input, this.pipe, info, "number");
556
516
  }
557
- }
517
+ };
558
518
  }
559
- function d$2(i2) {
560
- this.v = i2;
561
- this.i = 0;
562
- this.n = void 0;
563
- this.t = void 0;
519
+ function object(entries, arg2, arg3, arg4) {
520
+ const [rest, message = "Invalid type", pipe2] = getRestAndDefaultArgs(arg2, arg3, arg4);
521
+ let cachedEntries;
522
+ return {
523
+ type: "object",
524
+ async: false,
525
+ entries,
526
+ rest,
527
+ message,
528
+ pipe: pipe2,
529
+ _parse(input, info) {
530
+ if (!input || typeof input !== "object") {
531
+ return getSchemaIssues(info, "type", "object", this.message, input);
532
+ }
533
+ cachedEntries = cachedEntries || Object.entries(this.entries);
534
+ let issues;
535
+ const output = {};
536
+ for (const [key, schema] of cachedEntries) {
537
+ const value2 = input[key];
538
+ const result = schema._parse(value2, info);
539
+ if (result.issues) {
540
+ const pathItem = {
541
+ type: "object",
542
+ input,
543
+ key,
544
+ value: value2
545
+ };
546
+ for (const issue of result.issues) {
547
+ if (issue.path) {
548
+ issue.path.unshift(pathItem);
549
+ } else {
550
+ issue.path = [pathItem];
551
+ }
552
+ issues == null ? void 0 : issues.push(issue);
553
+ }
554
+ if (!issues) {
555
+ issues = result.issues;
556
+ }
557
+ if (info == null ? void 0 : info.abortEarly) {
558
+ break;
559
+ }
560
+ } else if (result.output !== void 0 || key in input) {
561
+ output[key] = result.output;
562
+ }
563
+ }
564
+ if (this.rest && !((info == null ? void 0 : info.abortEarly) && issues)) {
565
+ for (const key in input) {
566
+ if (!(key in this.entries)) {
567
+ const value2 = input[key];
568
+ const result = this.rest._parse(value2, info);
569
+ if (result.issues) {
570
+ const pathItem = {
571
+ type: "object",
572
+ input,
573
+ key,
574
+ value: value2
575
+ };
576
+ for (const issue of result.issues) {
577
+ if (issue.path) {
578
+ issue.path.unshift(pathItem);
579
+ } else {
580
+ issue.path = [pathItem];
581
+ }
582
+ issues == null ? void 0 : issues.push(issue);
583
+ }
584
+ if (!issues) {
585
+ issues = result.issues;
586
+ }
587
+ if (info == null ? void 0 : info.abortEarly) {
588
+ break;
589
+ }
590
+ } else {
591
+ output[key] = result.output;
592
+ }
593
+ }
594
+ }
595
+ }
596
+ return issues ? getIssues(issues) : executePipe(
597
+ output,
598
+ this.pipe,
599
+ info,
600
+ "object"
601
+ );
602
+ }
603
+ };
564
604
  }
565
- d$2.prototype.brand = t$1;
566
- d$2.prototype.h = function() {
567
- return true;
568
- };
569
- d$2.prototype.S = function(i2) {
570
- if (this.t !== i2 && void 0 === i2.e) {
571
- i2.x = this.t;
572
- if (void 0 !== this.t)
573
- this.t.e = i2;
574
- this.t = i2;
575
- }
576
- };
577
- d$2.prototype.U = function(i2) {
578
- if (void 0 !== this.t) {
579
- var t2 = i2.e, r2 = i2.x;
580
- if (void 0 !== t2) {
581
- t2.x = r2;
582
- i2.e = void 0;
605
+ function picklist(options, message = "Invalid type") {
606
+ return {
607
+ type: "picklist",
608
+ async: false,
609
+ options,
610
+ message,
611
+ _parse(input, info) {
612
+ if (!this.options.includes(input)) {
613
+ return getSchemaIssues(info, "type", "picklist", this.message, input);
614
+ }
615
+ return getOutput(input);
583
616
  }
584
- if (void 0 !== r2) {
585
- r2.e = t2;
586
- i2.x = void 0;
617
+ };
618
+ }
619
+ function string(arg1, arg2) {
620
+ const [message = "Invalid type", pipe2] = getDefaultArgs(arg1, arg2);
621
+ return {
622
+ type: "string",
623
+ async: false,
624
+ message,
625
+ pipe: pipe2,
626
+ _parse(input, info) {
627
+ if (typeof input !== "string") {
628
+ return getSchemaIssues(info, "type", "string", this.message, input);
629
+ }
630
+ return executePipe(input, this.pipe, info, "string");
587
631
  }
588
- if (i2 === this.t)
589
- this.t = r2;
632
+ };
633
+ }
634
+ function getRecordArgs(arg1, arg2, arg3, arg4) {
635
+ if (typeof arg2 === "object" && !Array.isArray(arg2)) {
636
+ const [message2, pipe22] = getDefaultArgs(arg3, arg4);
637
+ return [arg1, arg2, message2, pipe22];
590
638
  }
591
- };
592
- d$2.prototype.subscribe = function(i2) {
593
- var t2 = this;
594
- return O$2(function() {
595
- var r2 = t2.value, n2 = 32 & this.f;
596
- this.f &= -33;
597
- try {
598
- i2(r2);
599
- } finally {
600
- this.f |= n2;
601
- }
602
- });
603
- };
604
- d$2.prototype.valueOf = function() {
605
- return this.value;
606
- };
607
- d$2.prototype.toString = function() {
608
- return this.value + "";
609
- };
610
- d$2.prototype.toJSON = function() {
611
- return this.value;
612
- };
613
- d$2.prototype.peek = function() {
614
- return this.v;
615
- };
616
- Object.defineProperty(d$2.prototype, "value", { get: function() {
617
- var i2 = c$1(this);
618
- if (void 0 !== i2)
619
- i2.i = this.i;
620
- return this.v;
621
- }, set: function(t2) {
622
- if (o$2 instanceof _$3)
623
- !function() {
624
- throw new Error("Computed cannot have side-effects");
625
- }();
626
- if (t2 !== this.v) {
627
- if (e$1 > 100)
628
- i$1();
629
- this.v = t2;
630
- this.i++;
631
- u$1++;
632
- v$1++;
633
- try {
634
- for (var n2 = this.t; void 0 !== n2; n2 = n2.x)
635
- n2.t.N();
636
- } finally {
637
- r$2();
638
- }
639
- }
640
- } });
641
- function a$1(i2) {
642
- return new d$2(i2);
643
- }
644
- function l$2(i2) {
645
- for (var t2 = i2.s; void 0 !== t2; t2 = t2.n)
646
- if (t2.S.i !== t2.i || !t2.S.h() || t2.S.i !== t2.i)
647
- return true;
648
- return false;
639
+ const [message, pipe2] = getDefaultArgs(
640
+ arg2,
641
+ arg3
642
+ );
643
+ return [string(), arg1, message, pipe2];
649
644
  }
650
- function y$1(i2) {
651
- for (var t2 = i2.s; void 0 !== t2; t2 = t2.n) {
652
- var r2 = t2.S.n;
653
- if (void 0 !== r2)
654
- t2.r = r2;
655
- t2.S.n = t2;
656
- t2.i = -1;
657
- if (void 0 === t2.n) {
658
- i2.s = t2;
659
- break;
645
+ var BLOCKED_KEYS = ["__proto__", "prototype", "constructor"];
646
+ function record(arg1, arg2, arg3, arg4) {
647
+ const [key, value2, message = "Invalid type", pipe2] = getRecordArgs(arg1, arg2, arg3, arg4);
648
+ return {
649
+ type: "record",
650
+ async: false,
651
+ key,
652
+ value: value2,
653
+ message,
654
+ pipe: pipe2,
655
+ _parse(input, info) {
656
+ if (!input || typeof input !== "object") {
657
+ return getSchemaIssues(info, "type", "record", this.message, input);
658
+ }
659
+ let issues;
660
+ const output = {};
661
+ for (const [inputKey, inputValue] of Object.entries(input)) {
662
+ if (!BLOCKED_KEYS.includes(inputKey)) {
663
+ let pathItem;
664
+ const keyResult = this.key._parse(inputKey, {
665
+ origin: "key",
666
+ abortEarly: info == null ? void 0 : info.abortEarly,
667
+ abortPipeEarly: info == null ? void 0 : info.abortPipeEarly,
668
+ skipPipe: info == null ? void 0 : info.skipPipe
669
+ });
670
+ if (keyResult.issues) {
671
+ pathItem = {
672
+ type: "record",
673
+ input,
674
+ key: inputKey,
675
+ value: inputValue
676
+ };
677
+ for (const issue of keyResult.issues) {
678
+ issue.path = [pathItem];
679
+ issues == null ? void 0 : issues.push(issue);
680
+ }
681
+ if (!issues) {
682
+ issues = keyResult.issues;
683
+ }
684
+ if (info == null ? void 0 : info.abortEarly) {
685
+ break;
686
+ }
687
+ }
688
+ const valueResult = this.value._parse(inputValue, info);
689
+ if (valueResult.issues) {
690
+ pathItem = pathItem || {
691
+ type: "record",
692
+ input,
693
+ key: inputKey,
694
+ value: inputValue
695
+ };
696
+ for (const issue of valueResult.issues) {
697
+ if (issue.path) {
698
+ issue.path.unshift(pathItem);
699
+ } else {
700
+ issue.path = [pathItem];
701
+ }
702
+ issues == null ? void 0 : issues.push(issue);
703
+ }
704
+ if (!issues) {
705
+ issues = valueResult.issues;
706
+ }
707
+ if (info == null ? void 0 : info.abortEarly) {
708
+ break;
709
+ }
710
+ }
711
+ if (!keyResult.issues && !valueResult.issues) {
712
+ output[keyResult.output] = valueResult.output;
713
+ }
714
+ }
715
+ }
716
+ return issues ? getIssues(issues) : executePipe(
717
+ output,
718
+ this.pipe,
719
+ info,
720
+ "record"
721
+ );
660
722
  }
661
- }
723
+ };
662
724
  }
663
- function w$2(i2) {
664
- var t2 = i2.s, r2 = void 0;
665
- while (void 0 !== t2) {
666
- var n2 = t2.p;
667
- if (-1 === t2.i) {
668
- t2.S.U(t2);
669
- if (void 0 !== n2)
670
- n2.n = t2.n;
671
- if (void 0 !== t2.n)
672
- t2.n.p = n2;
673
- } else
674
- r2 = t2;
675
- t2.S.n = t2.r;
676
- if (void 0 !== t2.r)
677
- t2.r = void 0;
678
- t2 = n2;
725
+ function parse$1(schema, input, info) {
726
+ const result = schema._parse(input, info);
727
+ if (result.issues) {
728
+ throw new ValiError(result.issues);
679
729
  }
680
- i2.s = r2;
681
- }
682
- function _$3(i2) {
683
- d$2.call(this, void 0);
684
- this.x = i2;
685
- this.s = void 0;
686
- this.g = u$1 - 1;
687
- this.f = 4;
730
+ return result.output;
688
731
  }
689
- (_$3.prototype = new d$2()).h = function() {
690
- this.f &= -3;
691
- if (1 & this.f)
692
- return false;
693
- if (32 == (36 & this.f))
694
- return true;
695
- this.f &= -5;
696
- if (this.g === u$1)
697
- return true;
698
- this.g = u$1;
699
- this.f |= 1;
700
- if (this.i > 0 && !l$2(this)) {
701
- this.f &= -2;
702
- return true;
732
+ async function parseAsync(schema, input, info) {
733
+ const result = await schema._parse(input, info);
734
+ if (result.issues) {
735
+ throw new ValiError(result.issues);
703
736
  }
704
- var i2 = o$2;
705
- try {
706
- y$1(this);
707
- o$2 = this;
708
- var t2 = this.x();
709
- if (16 & this.f || this.v !== t2 || 0 === this.i) {
710
- this.v = t2;
711
- this.f &= -17;
712
- this.i++;
737
+ return result.output;
738
+ }
739
+ function transform(schema, action, arg1) {
740
+ return {
741
+ ...schema,
742
+ _parse(input, info) {
743
+ const result = schema._parse(input, info);
744
+ if (result.issues) {
745
+ return result;
746
+ }
747
+ const output = action(result.output);
748
+ if (arg1 && !Array.isArray(arg1)) {
749
+ return arg1._parse(output, info);
750
+ }
751
+ return executePipe(output, arg1, info, typeof output);
713
752
  }
714
- } catch (i3) {
715
- this.v = i3;
716
- this.f |= 16;
717
- this.i++;
718
- }
719
- o$2 = i2;
720
- w$2(this);
721
- this.f &= -2;
722
- return true;
723
- };
724
- _$3.prototype.S = function(i2) {
725
- if (void 0 === this.t) {
726
- this.f |= 36;
727
- for (var t2 = this.s; void 0 !== t2; t2 = t2.n)
728
- t2.S.S(t2);
729
- }
730
- d$2.prototype.S.call(this, i2);
731
- };
732
- _$3.prototype.U = function(i2) {
733
- if (void 0 !== this.t) {
734
- d$2.prototype.U.call(this, i2);
735
- if (void 0 === this.t) {
736
- this.f &= -33;
737
- for (var t2 = this.s; void 0 !== t2; t2 = t2.n)
738
- t2.S.U(t2);
753
+ };
754
+ }
755
+ var EMAIL_REGEX = /^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;
756
+ function email(message = "Invalid email") {
757
+ return {
758
+ type: "email",
759
+ async: false,
760
+ message,
761
+ requirement: EMAIL_REGEX,
762
+ _parse(input) {
763
+ return !this.requirement.test(input) ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
739
764
  }
740
- }
741
- };
742
- _$3.prototype.N = function() {
743
- if (!(2 & this.f)) {
744
- this.f |= 6;
745
- for (var i2 = this.t; void 0 !== i2; i2 = i2.x)
746
- i2.t.N();
747
- }
748
- };
749
- _$3.prototype.peek = function() {
750
- if (!this.h())
751
- i$1();
752
- if (16 & this.f)
753
- throw this.v;
754
- return this.v;
755
- };
756
- Object.defineProperty(_$3.prototype, "value", { get: function() {
757
- if (1 & this.f)
758
- i$1();
759
- var t2 = c$1(this);
760
- this.h();
761
- if (void 0 !== t2)
762
- t2.i = this.i;
763
- if (16 & this.f)
764
- throw this.v;
765
- return this.v;
766
- } });
767
- function p$2(i2) {
768
- return new _$3(i2);
765
+ };
769
766
  }
770
- function g$2(i2) {
771
- var t2 = i2.u;
772
- i2.u = void 0;
773
- if ("function" == typeof t2) {
774
- v$1++;
775
- var n2 = o$2;
776
- o$2 = void 0;
777
- try {
778
- t2();
779
- } catch (t3) {
780
- i2.f &= -2;
781
- i2.f |= 8;
782
- b$1(i2);
783
- throw t3;
784
- } finally {
785
- o$2 = n2;
786
- r$2();
767
+ function maxLength(requirement, message = "Invalid length") {
768
+ return {
769
+ type: "max_length",
770
+ async: false,
771
+ message,
772
+ requirement,
773
+ _parse(input) {
774
+ return input.length > this.requirement ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
787
775
  }
788
- }
776
+ };
789
777
  }
790
- function b$1(i2) {
791
- for (var t2 = i2.s; void 0 !== t2; t2 = t2.n)
792
- t2.S.U(t2);
793
- i2.x = void 0;
794
- i2.s = void 0;
795
- g$2(i2);
796
- }
797
- function x$2(i2) {
798
- if (o$2 !== this)
799
- throw new Error("Out-of-order effect");
800
- w$2(this);
801
- o$2 = i2;
802
- this.f &= -2;
803
- if (8 & this.f)
804
- b$1(this);
805
- r$2();
806
- }
807
- function E$2(i2) {
808
- this.x = i2;
809
- this.u = void 0;
810
- this.s = void 0;
811
- this.o = void 0;
812
- this.f = 32;
813
- }
814
- E$2.prototype.c = function() {
815
- var i2 = this.S();
816
- try {
817
- if (8 & this.f)
818
- return;
819
- if (void 0 === this.x)
820
- return;
821
- var t2 = this.x();
822
- if ("function" == typeof t2)
823
- this.u = t2;
824
- } finally {
825
- i2();
826
- }
827
- };
828
- E$2.prototype.S = function() {
829
- if (1 & this.f)
830
- i$1();
831
- this.f |= 1;
832
- this.f &= -9;
833
- g$2(this);
834
- y$1(this);
835
- v$1++;
836
- var t2 = o$2;
837
- o$2 = this;
838
- return x$2.bind(this, t2);
839
- };
840
- E$2.prototype.N = function() {
841
- if (!(2 & this.f)) {
842
- this.f |= 2;
843
- this.o = f$1;
844
- f$1 = this;
845
- }
846
- };
847
- E$2.prototype.d = function() {
848
- this.f |= 8;
849
- if (!(1 & this.f))
850
- b$1(this);
851
- };
852
- function O$2(i2) {
853
- var t2 = new E$2(i2);
854
- try {
855
- t2.c();
856
- } catch (i3) {
857
- t2.d();
858
- throw i3;
859
- }
860
- return t2.d.bind(t2);
861
- }
862
- var s$1;
863
- function l$1(n2, i2) {
864
- l$4[n2] = i2.bind(null, l$4[n2] || function() {
865
- });
866
- }
867
- function d$1(n2) {
868
- if (s$1)
869
- s$1();
870
- s$1 = n2 && n2.S();
871
- }
872
- function p$1(n2) {
873
- var r2 = this, f2 = n2.data, o2 = useSignal(f2);
874
- o2.value = f2;
875
- var e2 = F$1(function() {
876
- var n3 = r2.__v;
877
- while (n3 = n3.__)
878
- if (n3.__c) {
879
- n3.__c.__$f |= 4;
880
- break;
881
- }
882
- r2.__$u.c = function() {
883
- var n4;
884
- if (!t$3(e2.peek()) && 3 === (null == (n4 = r2.base) ? void 0 : n4.nodeType))
885
- r2.base.data = e2.peek();
886
- else {
887
- r2.__$f |= 1;
888
- r2.setState({});
889
- }
890
- };
891
- return p$2(function() {
892
- var n4 = o2.value.value;
893
- return 0 === n4 ? 0 : true === n4 ? "" : n4 || "";
894
- });
895
- }, []);
896
- return e2.value;
897
- }
898
- p$1.displayName = "_st";
899
- Object.defineProperties(d$2.prototype, { constructor: { configurable: true, value: void 0 }, type: { configurable: true, value: p$1 }, props: { configurable: true, get: function() {
900
- return { data: this };
901
- } }, __b: { configurable: true, value: 1 } });
902
- l$1("__b", function(n2, r2) {
903
- if ("string" == typeof r2.type) {
904
- var i2, t2 = r2.props;
905
- for (var f2 in t2)
906
- if ("children" !== f2) {
907
- var o2 = t2[f2];
908
- if (o2 instanceof d$2) {
909
- if (!i2)
910
- r2.__np = i2 = {};
911
- i2[f2] = o2;
912
- t2[f2] = o2.peek();
913
- }
914
- }
915
- }
916
- n2(r2);
917
- });
918
- l$1("__r", function(n2, r2) {
919
- d$1();
920
- var i2, t2 = r2.__c;
921
- if (t2) {
922
- t2.__$f &= -2;
923
- if (void 0 === (i2 = t2.__$u))
924
- t2.__$u = i2 = function(n3) {
925
- var r3;
926
- O$2(function() {
927
- r3 = this;
928
- });
929
- r3.c = function() {
930
- t2.__$f |= 1;
931
- t2.setState({});
932
- };
933
- return r3;
934
- }();
935
- }
936
- d$1(i2);
937
- n2(r2);
938
- });
939
- l$1("__e", function(n2, r2, i2, t2) {
940
- d$1();
941
- n2(r2, i2, t2);
942
- });
943
- l$1("diffed", function(n2, r2) {
944
- d$1();
945
- var i2;
946
- if ("string" == typeof r2.type && (i2 = r2.__e)) {
947
- var t2 = r2.__np, f2 = r2.props;
948
- if (t2) {
949
- var o2 = i2.U;
950
- if (o2)
951
- for (var e2 in o2) {
952
- var u2 = o2[e2];
953
- if (void 0 !== u2 && !(e2 in t2)) {
954
- u2.d();
955
- o2[e2] = void 0;
956
- }
957
- }
958
- else
959
- i2.U = o2 = {};
960
- for (var a2 in t2) {
961
- var c2 = o2[a2], s2 = t2[a2];
962
- if (void 0 === c2) {
963
- c2 = _$2(i2, a2, s2, f2);
964
- o2[a2] = c2;
965
- } else
966
- c2.o(s2, f2);
967
- }
968
- }
969
- }
970
- n2(r2);
971
- });
972
- function _$2(n2, r2, i2, t2) {
973
- var f2 = r2 in n2 && void 0 === n2.ownerSVGElement, o2 = a$1(i2);
974
- return { o: function(n3, r3) {
975
- o2.value = n3;
976
- t2 = r3;
977
- }, d: O$2(function() {
978
- var i3 = o2.value.value;
979
- if (t2[r2] !== i3) {
980
- t2[r2] = i3;
981
- if (f2)
982
- n2[r2] = i3;
983
- else if (i3)
984
- n2.setAttribute(r2, i3);
985
- else
986
- n2.removeAttribute(r2);
778
+ function minLength(requirement, message = "Invalid length") {
779
+ return {
780
+ type: "min_length",
781
+ async: false,
782
+ message,
783
+ requirement,
784
+ _parse(input) {
785
+ return input.length < this.requirement ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
987
786
  }
988
- }) };
787
+ };
989
788
  }
990
- l$1("unmount", function(n2, r2) {
991
- if ("string" == typeof r2.type) {
992
- var i2 = r2.__e;
993
- if (i2) {
994
- var t2 = i2.U;
995
- if (t2) {
996
- i2.U = void 0;
997
- for (var f2 in t2) {
998
- var o2 = t2[f2];
999
- if (o2)
1000
- o2.d();
1001
- }
1002
- }
789
+ function regex(requirement, message = "Invalid regex") {
790
+ return {
791
+ type: "regex",
792
+ async: false,
793
+ message,
794
+ requirement,
795
+ _parse(input) {
796
+ return !this.requirement.test(input) ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
1003
797
  }
1004
- } else {
1005
- var e2 = r2.__c;
1006
- if (e2) {
1007
- var u2 = e2.__$u;
1008
- if (u2) {
1009
- e2.__$u = void 0;
1010
- u2.d();
798
+ };
799
+ }
800
+ function url(message = "Invalid URL") {
801
+ return {
802
+ type: "url",
803
+ async: false,
804
+ message,
805
+ requirement(input) {
806
+ try {
807
+ new URL(input);
808
+ return true;
809
+ } catch {
810
+ return false;
1011
811
  }
812
+ },
813
+ _parse(input) {
814
+ return !this.requirement(input) ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
1012
815
  }
1013
- }
1014
- n2(r2);
1015
- });
1016
- l$1("__h", function(n2, r2, i2, t2) {
1017
- if (t2 < 3 || 9 === t2)
1018
- r2.__$f |= 2;
1019
- n2(r2, i2, t2);
1020
- });
1021
- b$3.prototype.shouldComponentUpdate = function(n2, r2) {
1022
- var i2 = this.__$u;
1023
- if (!(i2 && void 0 !== i2.s || 4 & this.__$f))
1024
- return true;
1025
- if (3 & this.__$f)
1026
- return true;
1027
- for (var t2 in r2)
1028
- return true;
1029
- for (var f2 in n2)
1030
- if ("__source" !== f2 && n2[f2] !== this.props[f2])
1031
- return true;
1032
- for (var o2 in this.props)
1033
- if (!(o2 in n2))
1034
- return true;
1035
- return false;
1036
- };
1037
- function useSignal(n2) {
1038
- return F$1(function() {
1039
- return a$1(n2);
1040
- }, []);
816
+ };
1041
817
  }
1042
818
  var exhaustive = (value) => {
1043
819
  throw new Error(`Unhandled discriminated union member: ${JSON.stringify(value)}`);
@@ -1065,37 +841,207 @@ function _extends() {
1065
841
  };
1066
842
  return _extends.apply(this, arguments);
1067
843
  }
1068
- function g$1(n2, t2) {
1069
- for (var e2 in t2)
1070
- n2[e2] = t2[e2];
1071
- return n2;
1072
- }
1073
- function C(n2, t2) {
1074
- for (var e2 in n2)
1075
- if ("__source" !== e2 && !(e2 in t2))
1076
- return true;
1077
- for (var r2 in t2)
1078
- if ("__source" !== r2 && n2[r2] !== t2[r2])
1079
- return true;
1080
- return false;
1081
- }
1082
- function E$1(n2, t2) {
1083
- return n2 === t2 && (0 !== n2 || 1 / n2 == 1 / t2) || n2 != n2 && t2 != t2;
844
+ var t$2, r$3, u$2, i$2, o$3 = 0, f$2 = [], c$2 = [], e$2 = l$4.__b, a$2 = l$4.__r, v$2 = l$4.diffed, l$3 = l$4.__c, m$2 = l$4.unmount;
845
+ function d$3(t2, u2) {
846
+ l$4.__h && l$4.__h(r$3, t2, o$3 || u2), o$3 = 0;
847
+ var i2 = r$3.__H || (r$3.__H = { __: [], __h: [] });
848
+ return t2 >= i2.__.length && i2.__.push({ __V: c$2 }), i2.__[t2];
1084
849
  }
1085
- function w$1(n2) {
1086
- this.props = n2;
850
+ function h$1(n2) {
851
+ return o$3 = 1, s$2(B$2, n2);
1087
852
  }
1088
- function x$1(n2, e2) {
1089
- function r2(n3) {
1090
- var t2 = this.props.ref, r3 = t2 == n3.ref;
1091
- return !r3 && t2 && (t2.call ? t2(null) : t2.current = null), e2 ? !e2(this.props, n3) || !r3 : C(this.props, n3);
1092
- }
1093
- function u2(e3) {
1094
- return this.shouldComponentUpdate = r2, y$3(n2, e3);
1095
- }
853
+ function s$2(n2, u2, i2) {
854
+ var o2 = d$3(t$2++, 2);
855
+ if (o2.t = n2, !o2.__c && (o2.__ = [i2 ? i2(u2) : B$2(void 0, u2), function(n3) {
856
+ var t2 = o2.__N ? o2.__N[0] : o2.__[0], r2 = o2.t(t2, n3);
857
+ t2 !== r2 && (o2.__N = [r2, o2.__[1]], o2.__c.setState({}));
858
+ }], o2.__c = r$3, !r$3.u)) {
859
+ var f2 = function(n3, t2, r2) {
860
+ if (!o2.__c.__H)
861
+ return true;
862
+ var u3 = o2.__c.__H.__.filter(function(n4) {
863
+ return n4.__c;
864
+ });
865
+ if (u3.every(function(n4) {
866
+ return !n4.__N;
867
+ }))
868
+ return !c2 || c2.call(this, n3, t2, r2);
869
+ var i3 = false;
870
+ return u3.forEach(function(n4) {
871
+ if (n4.__N) {
872
+ var t3 = n4.__[0];
873
+ n4.__ = n4.__N, n4.__N = void 0, t3 !== n4.__[0] && (i3 = true);
874
+ }
875
+ }), !(!i3 && o2.__c.props === n3) && (!c2 || c2.call(this, n3, t2, r2));
876
+ };
877
+ r$3.u = true;
878
+ var c2 = r$3.shouldComponentUpdate, e2 = r$3.componentWillUpdate;
879
+ r$3.componentWillUpdate = function(n3, t2, r2) {
880
+ if (this.__e) {
881
+ var u3 = c2;
882
+ c2 = void 0, f2(n3, t2, r2), c2 = u3;
883
+ }
884
+ e2 && e2.call(this, n3, t2, r2);
885
+ }, r$3.shouldComponentUpdate = f2;
886
+ }
887
+ return o2.__N || o2.__;
888
+ }
889
+ function p$3(u2, i2) {
890
+ var o2 = d$3(t$2++, 3);
891
+ !l$4.__s && z$1(o2.__H, i2) && (o2.__ = u2, o2.i = i2, r$3.__H.__h.push(o2));
892
+ }
893
+ function y$2(u2, i2) {
894
+ var o2 = d$3(t$2++, 4);
895
+ !l$4.__s && z$1(o2.__H, i2) && (o2.__ = u2, o2.i = i2, r$3.__h.push(o2));
896
+ }
897
+ function _$4(n2) {
898
+ return o$3 = 5, F$1(function() {
899
+ return { current: n2 };
900
+ }, []);
901
+ }
902
+ function A$2(n2, t2, r2) {
903
+ o$3 = 6, y$2(function() {
904
+ return "function" == typeof n2 ? (n2(t2()), function() {
905
+ return n2(null);
906
+ }) : n2 ? (n2.current = t2(), function() {
907
+ return n2.current = null;
908
+ }) : void 0;
909
+ }, null == r2 ? r2 : r2.concat(n2));
910
+ }
911
+ function F$1(n2, r2) {
912
+ var u2 = d$3(t$2++, 7);
913
+ return z$1(u2.__H, r2) ? (u2.__V = n2(), u2.i = r2, u2.__h = n2, u2.__V) : u2.__;
914
+ }
915
+ function T$2(n2, t2) {
916
+ return o$3 = 8, F$1(function() {
917
+ return n2;
918
+ }, t2);
919
+ }
920
+ function q$1(n2) {
921
+ var u2 = r$3.context[n2.__c], i2 = d$3(t$2++, 9);
922
+ return i2.c = n2, u2 ? (null == i2.__ && (i2.__ = true, u2.sub(r$3)), u2.props.value) : n2.__;
923
+ }
924
+ function x$3(t2, r2) {
925
+ l$4.useDebugValue && l$4.useDebugValue(r2 ? r2(t2) : t2);
926
+ }
927
+ function P$2(n2) {
928
+ var u2 = d$3(t$2++, 10), i2 = h$1();
929
+ return u2.__ = n2, r$3.componentDidCatch || (r$3.componentDidCatch = function(n3, t2) {
930
+ u2.__ && u2.__(n3, t2), i2[1](n3);
931
+ }), [i2[0], function() {
932
+ i2[1](void 0);
933
+ }];
934
+ }
935
+ function V$1() {
936
+ var n2 = d$3(t$2++, 11);
937
+ if (!n2.__) {
938
+ for (var u2 = r$3.__v; null !== u2 && !u2.__m && null !== u2.__; )
939
+ u2 = u2.__;
940
+ var i2 = u2.__m || (u2.__m = [0, 0]);
941
+ n2.__ = "P" + i2[0] + "-" + i2[1]++;
942
+ }
943
+ return n2.__;
944
+ }
945
+ function b$2() {
946
+ for (var t2; t2 = f$2.shift(); )
947
+ if (t2.__P && t2.__H)
948
+ try {
949
+ t2.__H.__h.forEach(k$2), t2.__H.__h.forEach(w$3), t2.__H.__h = [];
950
+ } catch (r2) {
951
+ t2.__H.__h = [], l$4.__e(r2, t2.__v);
952
+ }
953
+ }
954
+ l$4.__b = function(n2) {
955
+ r$3 = null, e$2 && e$2(n2);
956
+ }, l$4.__r = function(n2) {
957
+ a$2 && a$2(n2), t$2 = 0;
958
+ var i2 = (r$3 = n2.__c).__H;
959
+ i2 && (u$2 === r$3 ? (i2.__h = [], r$3.__h = [], i2.__.forEach(function(n3) {
960
+ n3.__N && (n3.__ = n3.__N), n3.__V = c$2, n3.__N = n3.i = void 0;
961
+ })) : (i2.__h.forEach(k$2), i2.__h.forEach(w$3), i2.__h = [], t$2 = 0)), u$2 = r$3;
962
+ }, l$4.diffed = function(t2) {
963
+ v$2 && v$2(t2);
964
+ var o2 = t2.__c;
965
+ o2 && o2.__H && (o2.__H.__h.length && (1 !== f$2.push(o2) && i$2 === l$4.requestAnimationFrame || ((i$2 = l$4.requestAnimationFrame) || j$2)(b$2)), o2.__H.__.forEach(function(n2) {
966
+ n2.i && (n2.__H = n2.i), n2.__V !== c$2 && (n2.__ = n2.__V), n2.i = void 0, n2.__V = c$2;
967
+ })), u$2 = r$3 = null;
968
+ }, l$4.__c = function(t2, r2) {
969
+ r2.some(function(t3) {
970
+ try {
971
+ t3.__h.forEach(k$2), t3.__h = t3.__h.filter(function(n2) {
972
+ return !n2.__ || w$3(n2);
973
+ });
974
+ } catch (u2) {
975
+ r2.some(function(n2) {
976
+ n2.__h && (n2.__h = []);
977
+ }), r2 = [], l$4.__e(u2, t3.__v);
978
+ }
979
+ }), l$3 && l$3(t2, r2);
980
+ }, l$4.unmount = function(t2) {
981
+ m$2 && m$2(t2);
982
+ var r2, u2 = t2.__c;
983
+ u2 && u2.__H && (u2.__H.__.forEach(function(n2) {
984
+ try {
985
+ k$2(n2);
986
+ } catch (n3) {
987
+ r2 = n3;
988
+ }
989
+ }), u2.__H = void 0, r2 && l$4.__e(r2, u2.__v));
990
+ };
991
+ var g$3 = "function" == typeof requestAnimationFrame;
992
+ function j$2(n2) {
993
+ var t2, r2 = function() {
994
+ clearTimeout(u2), g$3 && cancelAnimationFrame(t2), setTimeout(n2);
995
+ }, u2 = setTimeout(r2, 100);
996
+ g$3 && (t2 = requestAnimationFrame(r2));
997
+ }
998
+ function k$2(n2) {
999
+ var t2 = r$3, u2 = n2.__c;
1000
+ "function" == typeof u2 && (n2.__c = void 0, u2()), r$3 = t2;
1001
+ }
1002
+ function w$3(n2) {
1003
+ var t2 = r$3;
1004
+ n2.__c = n2.__(), r$3 = t2;
1005
+ }
1006
+ function z$1(n2, t2) {
1007
+ return !n2 || n2.length !== t2.length || t2.some(function(t3, r2) {
1008
+ return t3 !== n2[r2];
1009
+ });
1010
+ }
1011
+ function B$2(n2, t2) {
1012
+ return "function" == typeof t2 ? t2(n2) : t2;
1013
+ }
1014
+ function g$2(n2, t2) {
1015
+ for (var e2 in t2)
1016
+ n2[e2] = t2[e2];
1017
+ return n2;
1018
+ }
1019
+ function C(n2, t2) {
1020
+ for (var e2 in n2)
1021
+ if ("__source" !== e2 && !(e2 in t2))
1022
+ return true;
1023
+ for (var r2 in t2)
1024
+ if ("__source" !== r2 && n2[r2] !== t2[r2])
1025
+ return true;
1026
+ return false;
1027
+ }
1028
+ function E$2(n2, t2) {
1029
+ return n2 === t2 && (0 !== n2 || 1 / n2 == 1 / t2) || n2 != n2 && t2 != t2;
1030
+ }
1031
+ function w$2(n2) {
1032
+ this.props = n2;
1033
+ }
1034
+ function x$2(n2, e2) {
1035
+ function r2(n3) {
1036
+ var t2 = this.props.ref, r3 = t2 == n3.ref;
1037
+ return !r3 && t2 && (t2.call ? t2(null) : t2.current = null), e2 ? !e2(this.props, n3) || !r3 : C(this.props, n3);
1038
+ }
1039
+ function u2(e3) {
1040
+ return this.shouldComponentUpdate = r2, y$3(n2, e3);
1041
+ }
1096
1042
  return u2.displayName = "Memo(" + (n2.displayName || n2.name) + ")", u2.prototype.isReactComponent = true, u2.__f = true, u2;
1097
1043
  }
1098
- (w$1.prototype = new b$3()).isPureReactComponent = true, w$1.prototype.shouldComponentUpdate = function(n2, t2) {
1044
+ (w$2.prototype = new b$3()).isPureReactComponent = true, w$2.prototype.shouldComponentUpdate = function(n2, t2) {
1099
1045
  return C(this.props, n2) || C(this.state, t2);
1100
1046
  };
1101
1047
  var R = l$4.__b;
@@ -1105,14 +1051,14 @@ l$4.__b = function(n2) {
1105
1051
  var N$1 = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.forward_ref") || 3911;
1106
1052
  function k$1(n2) {
1107
1053
  function t2(t3) {
1108
- var e2 = g$1({}, t3);
1054
+ var e2 = g$2({}, t3);
1109
1055
  return delete e2.ref, n2(e2, t3.ref || null);
1110
1056
  }
1111
1057
  return t2.$$typeof = N$1, t2.render = t2, t2.prototype.isReactComponent = t2.__f = true, t2.displayName = "ForwardRef(" + (n2.displayName || n2.name) + ")", t2;
1112
1058
  }
1113
1059
  var A$1 = function(n2, t2) {
1114
1060
  return null == n2 ? null : S$1(S$1(n2).map(t2));
1115
- }, O$1 = { map: A$1, forEach: A$1, count: function(n2) {
1061
+ }, O$2 = { map: A$1, forEach: A$1, count: function(n2) {
1116
1062
  return n2 ? S$1(n2).length : 0;
1117
1063
  }, only: function(n2) {
1118
1064
  var t2 = S$1(n2);
@@ -1132,7 +1078,7 @@ var I = l$4.unmount;
1132
1078
  function L(n2, t2, e2) {
1133
1079
  return n2 && (n2.__c && n2.__c.__H && (n2.__c.__H.__.forEach(function(n3) {
1134
1080
  "function" == typeof n3.__c && n3.__c();
1135
- }), n2.__c.__H = null), null != (n2 = g$1({}, n2)).__c && (n2.__c.__P === e2 && (n2.__c.__P = t2), n2.__c = null), n2.__k = n2.__k && n2.__k.map(function(n3) {
1081
+ }), n2.__c.__H = null), null != (n2 = g$2({}, n2)).__c && (n2.__c.__P === e2 && (n2.__c.__P = t2), n2.__c = null), n2.__k = n2.__k && n2.__k.map(function(n3) {
1136
1082
  return L(n3, t2, e2);
1137
1083
  })), n2;
1138
1084
  }
@@ -1347,20 +1293,20 @@ var Sn = y$2;
1347
1293
  function gn(n2, t2) {
1348
1294
  var e2 = t2(), r2 = h$1({ h: { __: e2, v: t2 } }), u2 = r2[0].h, o2 = r2[1];
1349
1295
  return y$2(function() {
1350
- u2.__ = e2, u2.v = t2, E$1(u2.__, t2()) || o2({ h: u2 });
1296
+ u2.__ = e2, u2.v = t2, E$2(u2.__, t2()) || o2({ h: u2 });
1351
1297
  }, [n2, e2, t2]), p$3(function() {
1352
- return E$1(u2.__, u2.v()) || o2({ h: u2 }), n2(function() {
1353
- E$1(u2.__, u2.v()) || o2({ h: u2 });
1298
+ return E$2(u2.__, u2.v()) || o2({ h: u2 }), n2(function() {
1299
+ E$2(u2.__, u2.v()) || o2({ h: u2 });
1354
1300
  });
1355
1301
  }, [n2]), e2;
1356
1302
  }
1357
- var Cn = { useState: h$1, useId: V$1, useReducer: s$2, useEffect: p$3, useLayoutEffect: y$2, useInsertionEffect: Sn, useTransition: bn, useDeferredValue: _n, useSyncExternalStore: gn, startTransition: yn, useRef: _$4, useImperativeHandle: A$2, useMemo: F$1, useCallback: T$2, useContext: q$1, useDebugValue: x$3, version: "17.0.2", Children: O$1, render: G, hydrate: J, unmountComponentAtNode: hn, createPortal: z, createElement: y$3, createContext: G$1, createFactory: fn, cloneElement: sn, createRef: _$5, Fragment: k$3, isValidElement: an, findDOMNode: vn, Component: b$3, PureComponent: w$1, memo: x$1, forwardRef: k$1, flushSync: pn, unstable_batchedUpdates: dn, StrictMode: mn, Suspense: D, SuspenseList: V, lazy: M, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ln };
1303
+ var Cn = { useState: h$1, useId: V$1, useReducer: s$2, useEffect: p$3, useLayoutEffect: y$2, useInsertionEffect: Sn, useTransition: bn, useDeferredValue: _n, useSyncExternalStore: gn, startTransition: yn, useRef: _$4, useImperativeHandle: A$2, useMemo: F$1, useCallback: T$2, useContext: q$1, useDebugValue: x$3, version: "17.0.2", Children: O$2, render: G, hydrate: J, unmountComponentAtNode: hn, createPortal: z, createElement: y$3, createContext: G$1, createFactory: fn, cloneElement: sn, createRef: _$5, Fragment: k$3, isValidElement: an, findDOMNode: vn, Component: b$3, PureComponent: w$2, memo: x$2, forwardRef: k$1, flushSync: pn, unstable_batchedUpdates: dn, StrictMode: mn, Suspense: D, SuspenseList: V, lazy: M, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ln };
1358
1304
  const $2AODx$react = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1359
1305
  __proto__: null,
1360
- Children: O$1,
1306
+ Children: O$2,
1361
1307
  Component: b$3,
1362
1308
  Fragment: k$3,
1363
- PureComponent: w$1,
1309
+ PureComponent: w$2,
1364
1310
  StrictMode: mn,
1365
1311
  Suspense: D,
1366
1312
  SuspenseList: V,
@@ -1378,7 +1324,7 @@ const $2AODx$react = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
1378
1324
  hydrate: J,
1379
1325
  isValidElement: an,
1380
1326
  lazy: M,
1381
- memo: x$1,
1327
+ memo: x$2,
1382
1328
  render: G,
1383
1329
  startTransition: yn,
1384
1330
  unmountComponentAtNode: hn,
@@ -1592,14 +1538,14 @@ function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp, onChange }) {
1592
1538
  }
1593
1539
  const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /* @__PURE__ */ k$1((props, forwardedRef) => {
1594
1540
  const { children, ...slotProps } = props;
1595
- const childrenArray = O$1.toArray(children);
1541
+ const childrenArray = O$2.toArray(children);
1596
1542
  const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
1597
1543
  if (slottable) {
1598
1544
  const newElement = slottable.props.children;
1599
1545
  const newChildren = childrenArray.map((child) => {
1600
1546
  if (child === slottable) {
1601
- if (O$1.count(newElement) > 1)
1602
- return O$1.only(null);
1547
+ if (O$2.count(newElement) > 1)
1548
+ return O$2.only(null);
1603
1549
  return /* @__PURE__ */ an(newElement) ? newElement.props.children : null;
1604
1550
  } else
1605
1551
  return child;
@@ -1620,7 +1566,7 @@ const $5e63c961fc1ce211$var$SlotClone = /* @__PURE__ */ k$1((props, forwardedRef
1620
1566
  ...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
1621
1567
  ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) : children.ref
1622
1568
  });
1623
- return O$1.count(children) > 1 ? O$1.only(null) : null;
1569
+ return O$2.count(children) > 1 ? O$2.only(null) : null;
1624
1570
  });
1625
1571
  $5e63c961fc1ce211$var$SlotClone.displayName = "SlotClone";
1626
1572
  const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children }) => {
@@ -2185,7 +2131,7 @@ const $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props) => {
2185
2131
  const presence = $921a889cee6df7e8$var$usePresence(present);
2186
2132
  const child = typeof children === "function" ? children({
2187
2133
  present: presence.isPresent
2188
- }) : O$1.only(children);
2134
+ }) : O$2.only(children);
2189
2135
  const ref = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(presence.ref, child.ref);
2190
2136
  const forceMount = typeof children === "function";
2191
2137
  return forceMount || presence.isPresent ? /* @__PURE__ */ sn(child, {
@@ -2511,7 +2457,7 @@ var RemoveScroll = k$1(function(props, parentRef) {
2511
2457
  k$3,
2512
2458
  null,
2513
2459
  enabled && y$3(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref }),
2514
- forwardProps ? sn(O$1.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : y$3(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
2460
+ forwardProps ? sn(O$2.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : y$3(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
2515
2461
  );
2516
2462
  });
2517
2463
  RemoveScroll.defaultProps = {
@@ -2603,7 +2549,7 @@ var zeroGap = {
2603
2549
  right: 0,
2604
2550
  gap: 0
2605
2551
  };
2606
- var parse$1 = function(x2) {
2552
+ var parse = function(x2) {
2607
2553
  return parseInt(x2 || "", 10) || 0;
2608
2554
  };
2609
2555
  var getOffset = function(gapMode) {
@@ -2611,7 +2557,7 @@ var getOffset = function(gapMode) {
2611
2557
  var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
2612
2558
  var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
2613
2559
  var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
2614
- return [parse$1(left), parse$1(top), parse$1(right)];
2560
+ return [parse(left), parse(top), parse(right)];
2615
2561
  };
2616
2562
  var getGapWidth = function(gapMode) {
2617
2563
  if (gapMode === void 0) {
@@ -3539,17 +3485,17 @@ const getValueAsType = (value, type) => {
3539
3485
  return type && typeof value === "number" ? type.transform(value) : value;
3540
3486
  };
3541
3487
  const clamp = (min, max, v2) => Math.min(Math.max(v2, min), max);
3542
- const number$1 = {
3488
+ const number = {
3543
3489
  test: (v2) => typeof v2 === "number",
3544
3490
  parse: parseFloat,
3545
3491
  transform: (v2) => v2
3546
3492
  };
3547
3493
  const alpha = {
3548
- ...number$1,
3494
+ ...number,
3549
3495
  transform: (v2) => clamp(0, 1, v2)
3550
3496
  };
3551
3497
  const scale = {
3552
- ...number$1,
3498
+ ...number,
3553
3499
  default: 1
3554
3500
  };
3555
3501
  const sanitize = (v2) => Math.round(v2 * 1e5) / 1e5;
@@ -3575,7 +3521,7 @@ const progressPercentage = {
3575
3521
  transform: (v2) => percent.transform(v2 * 100)
3576
3522
  };
3577
3523
  const int = {
3578
- ...number$1,
3524
+ ...number,
3579
3525
  transform: Math.round
3580
3526
  };
3581
3527
  const numberValueTypes = {
@@ -4723,7 +4669,7 @@ const splitColor = (aName, bName, cName) => (v2) => {
4723
4669
  };
4724
4670
  const clampRgbUnit = (v2) => clamp(0, 255, v2);
4725
4671
  const rgbUnit = {
4726
- ...number$1,
4672
+ ...number,
4727
4673
  transform: (v2) => Math.round(clampRgbUnit(v2))
4728
4674
  };
4729
4675
  const rgba = {
@@ -4869,7 +4815,7 @@ const numberTokeniser = {
4869
4815
  regex: floatRegex,
4870
4816
  countKey: "Numbers",
4871
4817
  token: "${n}",
4872
- parse: number$1.parse
4818
+ parse: number.parse
4873
4819
  };
4874
4820
  function tokenise(info, { regex: regex2, countKey, token, parse: parse2 }) {
4875
4821
  const matches = info.tokenised.match(regex2);
@@ -6188,7 +6134,7 @@ const auto = {
6188
6134
  test: (v2) => v2 === "auto",
6189
6135
  parse: (v2) => v2
6190
6136
  };
6191
- const dimensionValueTypes = [number$1, px, percent, degrees, vw, vh, auto];
6137
+ const dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];
6192
6138
  const findDimensionValueType = (v2) => dimensionValueTypes.find(testValueType(v2));
6193
6139
  const valueTypes = [...dimensionValueTypes, color, complex];
6194
6140
  const findValueType = (v2) => valueTypes.find(testValueType(v2));
@@ -6690,7 +6636,7 @@ const isPositionalKey = (key) => positionalKeys.has(key);
6690
6636
  const hasPositionalKey = (target) => {
6691
6637
  return Object.keys(target).some(isPositionalKey);
6692
6638
  };
6693
- const isNumOrPxType = (v2) => v2 === number$1 || v2 === px;
6639
+ const isNumOrPxType = (v2) => v2 === number || v2 === px;
6694
6640
  const getPosFromMatrix = (matrix, pos) => parseFloat(matrix.split(", ")[pos]);
6695
6641
  const getTranslateFromMatrix = (pos2, pos3) => (_bbox, { transform: transform2 }) => {
6696
6642
  if (transform2 === "none" || !transform2)
@@ -7510,7 +7456,7 @@ function updateChildLookup(children, allChildren) {
7510
7456
  }
7511
7457
  function onlyElements(children) {
7512
7458
  const filtered = [];
7513
- O$1.forEach(children, (child) => {
7459
+ O$2.forEach(children, (child) => {
7514
7460
  if (an(child))
7515
7461
  filtered.push(child);
7516
7462
  });
@@ -7621,13 +7567,13 @@ const domAnimation = {
7621
7567
  ...animations,
7622
7568
  ...gestureAnimations
7623
7569
  };
7624
- const t = Symbol.for("@ts-pattern/matcher"), e = Symbol.for("@ts-pattern/isVariadic"), n = "@ts-pattern/anonymous-select-key", r$1 = (t2) => Boolean(t2 && "object" == typeof t2), i = (e2) => e2 && !!e2[t], s = (n2, o2, c2) => {
7625
- if (i(n2)) {
7626
- const e2 = n2[t](), { matched: r2, selections: i2 } = e2.match(o2);
7570
+ const t$1 = Symbol.for("@ts-pattern/matcher"), e$1 = Symbol.for("@ts-pattern/isVariadic"), n = "@ts-pattern/anonymous-select-key", r$2 = (t2) => Boolean(t2 && "object" == typeof t2), i$1 = (e2) => e2 && !!e2[t$1], s$1 = (n2, o2, c2) => {
7571
+ if (i$1(n2)) {
7572
+ const e2 = n2[t$1](), { matched: r2, selections: i2 } = e2.match(o2);
7627
7573
  return r2 && i2 && Object.keys(i2).forEach((t2) => c2(t2, i2[t2])), r2;
7628
7574
  }
7629
- if (r$1(n2)) {
7630
- if (!r$1(o2))
7575
+ if (r$2(n2)) {
7576
+ if (!r$2(o2))
7631
7577
  return false;
7632
7578
  if (Array.isArray(n2)) {
7633
7579
  if (!Array.isArray(o2))
@@ -7635,7 +7581,7 @@ const t = Symbol.for("@ts-pattern/matcher"), e = Symbol.for("@ts-pattern/isVaria
7635
7581
  let t2 = [], r2 = [], a2 = [];
7636
7582
  for (const s2 of n2.keys()) {
7637
7583
  const o3 = n2[s2];
7638
- i(o3) && o3[e] ? a2.push(o3) : a2.length ? r2.push(o3) : t2.push(o3);
7584
+ i$1(o3) && o3[e$1] ? a2.push(o3) : a2.length ? r2.push(o3) : t2.push(o3);
7639
7585
  }
7640
7586
  if (a2.length) {
7641
7587
  if (a2.length > 1)
@@ -7643,124 +7589,124 @@ const t = Symbol.for("@ts-pattern/matcher"), e = Symbol.for("@ts-pattern/isVaria
7643
7589
  if (o2.length < t2.length + r2.length)
7644
7590
  return false;
7645
7591
  const e2 = o2.slice(0, t2.length), n3 = 0 === r2.length ? [] : o2.slice(-r2.length), i2 = o2.slice(t2.length, 0 === r2.length ? Infinity : -r2.length);
7646
- return t2.every((t3, n4) => s(t3, e2[n4], c2)) && r2.every((t3, e3) => s(t3, n3[e3], c2)) && (0 === a2.length || s(a2[0], i2, c2));
7592
+ return t2.every((t3, n4) => s$1(t3, e2[n4], c2)) && r2.every((t3, e3) => s$1(t3, n3[e3], c2)) && (0 === a2.length || s$1(a2[0], i2, c2));
7647
7593
  }
7648
- return n2.length === o2.length && n2.every((t3, e2) => s(t3, o2[e2], c2));
7594
+ return n2.length === o2.length && n2.every((t3, e2) => s$1(t3, o2[e2], c2));
7649
7595
  }
7650
7596
  return Object.keys(n2).every((e2) => {
7651
7597
  const r2 = n2[e2];
7652
- return (e2 in o2 || i(a2 = r2) && "optional" === a2[t]().matcherType) && s(r2, o2[e2], c2);
7598
+ return (e2 in o2 || i$1(a2 = r2) && "optional" === a2[t$1]().matcherType) && s$1(r2, o2[e2], c2);
7653
7599
  var a2;
7654
7600
  });
7655
7601
  }
7656
7602
  return Object.is(o2, n2);
7657
- }, o$1 = (e2) => {
7603
+ }, o$2 = (e2) => {
7658
7604
  var n2, s2, a2;
7659
- return r$1(e2) ? i(e2) ? null != (n2 = null == (s2 = (a2 = e2[t]()).getSelectionKeys) ? void 0 : s2.call(a2)) ? n2 : [] : Array.isArray(e2) ? c(e2, o$1) : c(Object.values(e2), o$1) : [];
7660
- }, c = (t2, e2) => t2.reduce((t3, n2) => t3.concat(e2(n2)), []);
7661
- function a(...t2) {
7605
+ return r$2(e2) ? i$1(e2) ? null != (n2 = null == (s2 = (a2 = e2[t$1]()).getSelectionKeys) ? void 0 : s2.call(a2)) ? n2 : [] : Array.isArray(e2) ? c$1(e2, o$2) : c$1(Object.values(e2), o$2) : [];
7606
+ }, c$1 = (t2, e2) => t2.reduce((t3, n2) => t3.concat(e2(n2)), []);
7607
+ function a$1(...t2) {
7662
7608
  if (1 === t2.length) {
7663
7609
  const [e2] = t2;
7664
- return (t3) => s(e2, t3, () => {
7610
+ return (t3) => s$1(e2, t3, () => {
7665
7611
  });
7666
7612
  }
7667
7613
  if (2 === t2.length) {
7668
7614
  const [e2, n2] = t2;
7669
- return s(e2, n2, () => {
7615
+ return s$1(e2, n2, () => {
7670
7616
  });
7671
7617
  }
7672
7618
  throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t2.length}.`);
7673
7619
  }
7674
- function u(t2) {
7675
- return Object.assign(t2, { optional: () => l(t2), and: (e2) => m(t2, e2), or: (e2) => y(t2, e2), select: (e2) => void 0 === e2 ? p(t2) : p(e2, t2) });
7620
+ function u$1(t2) {
7621
+ return Object.assign(t2, { optional: () => l$2(t2), and: (e2) => m(t2, e2), or: (e2) => y$1(t2, e2), select: (e2) => void 0 === e2 ? p$2(t2) : p$2(e2, t2) });
7676
7622
  }
7677
7623
  function h(t2) {
7678
7624
  return Object.assign(((t3) => Object.assign(t3, { *[Symbol.iterator]() {
7679
- yield Object.assign(t3, { [e]: true });
7680
- } }))(t2), { optional: () => h(l(t2)), select: (e2) => h(void 0 === e2 ? p(t2) : p(e2, t2)) });
7625
+ yield Object.assign(t3, { [e$1]: true });
7626
+ } }))(t2), { optional: () => h(l$2(t2)), select: (e2) => h(void 0 === e2 ? p$2(t2) : p$2(e2, t2)) });
7681
7627
  }
7682
- function l(e2) {
7683
- return u({ [t]: () => ({ match: (t2) => {
7628
+ function l$2(e2) {
7629
+ return u$1({ [t$1]: () => ({ match: (t2) => {
7684
7630
  let n2 = {};
7685
7631
  const r2 = (t3, e3) => {
7686
7632
  n2[t3] = e3;
7687
7633
  };
7688
- return void 0 === t2 ? (o$1(e2).forEach((t3) => r2(t3, void 0)), { matched: true, selections: n2 }) : { matched: s(e2, t2, r2), selections: n2 };
7689
- }, getSelectionKeys: () => o$1(e2), matcherType: "optional" }) });
7634
+ return void 0 === t2 ? (o$2(e2).forEach((t3) => r2(t3, void 0)), { matched: true, selections: n2 }) : { matched: s$1(e2, t2, r2), selections: n2 };
7635
+ }, getSelectionKeys: () => o$2(e2), matcherType: "optional" }) });
7690
7636
  }
7691
- const f = (t2, e2) => {
7637
+ const f$1 = (t2, e2) => {
7692
7638
  for (const n2 of t2)
7693
7639
  if (!e2(n2))
7694
7640
  return false;
7695
7641
  return true;
7696
- }, g = (t2, e2) => {
7642
+ }, g$1 = (t2, e2) => {
7697
7643
  for (const [n2, r2] of t2.entries())
7698
7644
  if (!e2(r2, n2))
7699
7645
  return false;
7700
7646
  return true;
7701
7647
  };
7702
7648
  function m(...e2) {
7703
- return u({ [t]: () => ({ match: (t2) => {
7649
+ return u$1({ [t$1]: () => ({ match: (t2) => {
7704
7650
  let n2 = {};
7705
7651
  const r2 = (t3, e3) => {
7706
7652
  n2[t3] = e3;
7707
7653
  };
7708
- return { matched: e2.every((e3) => s(e3, t2, r2)), selections: n2 };
7709
- }, getSelectionKeys: () => c(e2, o$1), matcherType: "and" }) });
7654
+ return { matched: e2.every((e3) => s$1(e3, t2, r2)), selections: n2 };
7655
+ }, getSelectionKeys: () => c$1(e2, o$2), matcherType: "and" }) });
7710
7656
  }
7711
- function y(...e2) {
7712
- return u({ [t]: () => ({ match: (t2) => {
7657
+ function y$1(...e2) {
7658
+ return u$1({ [t$1]: () => ({ match: (t2) => {
7713
7659
  let n2 = {};
7714
7660
  const r2 = (t3, e3) => {
7715
7661
  n2[t3] = e3;
7716
7662
  };
7717
- return c(e2, o$1).forEach((t3) => r2(t3, void 0)), { matched: e2.some((e3) => s(e3, t2, r2)), selections: n2 };
7718
- }, getSelectionKeys: () => c(e2, o$1), matcherType: "or" }) });
7663
+ return c$1(e2, o$2).forEach((t3) => r2(t3, void 0)), { matched: e2.some((e3) => s$1(e3, t2, r2)), selections: n2 };
7664
+ }, getSelectionKeys: () => c$1(e2, o$2), matcherType: "or" }) });
7719
7665
  }
7720
- function d(e2) {
7721
- return { [t]: () => ({ match: (t2) => ({ matched: Boolean(e2(t2)) }) }) };
7666
+ function d$2(e2) {
7667
+ return { [t$1]: () => ({ match: (t2) => ({ matched: Boolean(e2(t2)) }) }) };
7722
7668
  }
7723
- function p(...e2) {
7669
+ function p$2(...e2) {
7724
7670
  const r2 = "string" == typeof e2[0] ? e2[0] : void 0, i2 = 2 === e2.length ? e2[1] : "string" == typeof e2[0] ? void 0 : e2[0];
7725
- return u({ [t]: () => ({ match: (t2) => {
7671
+ return u$1({ [t$1]: () => ({ match: (t2) => {
7726
7672
  let e3 = { [null != r2 ? r2 : n]: t2 };
7727
- return { matched: void 0 === i2 || s(i2, t2, (t3, n2) => {
7673
+ return { matched: void 0 === i2 || s$1(i2, t2, (t3, n2) => {
7728
7674
  e3[t3] = n2;
7729
7675
  }), selections: e3 };
7730
- }, getSelectionKeys: () => [null != r2 ? r2 : n].concat(void 0 === i2 ? [] : o$1(i2)) }) });
7676
+ }, getSelectionKeys: () => [null != r2 ? r2 : n].concat(void 0 === i2 ? [] : o$2(i2)) }) });
7731
7677
  }
7732
- function v(t2) {
7678
+ function v$1(t2) {
7733
7679
  return "number" == typeof t2;
7734
7680
  }
7735
- function b(t2) {
7681
+ function b$1(t2) {
7736
7682
  return "string" == typeof t2;
7737
7683
  }
7738
- function w(t2) {
7684
+ function w$1(t2) {
7739
7685
  return "bigint" == typeof t2;
7740
7686
  }
7741
- const S = u(d(function(t2) {
7687
+ const S = u$1(d$2(function(t2) {
7742
7688
  return true;
7743
- })), O = S, j = (t2) => Object.assign(u(t2), { startsWith: (e2) => {
7744
- return j(m(t2, (n2 = e2, d((t3) => b(t3) && t3.startsWith(n2)))));
7689
+ })), O$1 = S, j = (t2) => Object.assign(u$1(t2), { startsWith: (e2) => {
7690
+ return j(m(t2, (n2 = e2, d$2((t3) => b$1(t3) && t3.startsWith(n2)))));
7745
7691
  var n2;
7746
7692
  }, endsWith: (e2) => {
7747
- return j(m(t2, (n2 = e2, d((t3) => b(t3) && t3.endsWith(n2)))));
7693
+ return j(m(t2, (n2 = e2, d$2((t3) => b$1(t3) && t3.endsWith(n2)))));
7748
7694
  var n2;
7749
- }, minLength: (e2) => j(m(t2, ((t3) => d((e3) => b(e3) && e3.length >= t3))(e2))), maxLength: (e2) => j(m(t2, ((t3) => d((e3) => b(e3) && e3.length <= t3))(e2))), includes: (e2) => {
7750
- return j(m(t2, (n2 = e2, d((t3) => b(t3) && t3.includes(n2)))));
7695
+ }, minLength: (e2) => j(m(t2, ((t3) => d$2((e3) => b$1(e3) && e3.length >= t3))(e2))), maxLength: (e2) => j(m(t2, ((t3) => d$2((e3) => b$1(e3) && e3.length <= t3))(e2))), includes: (e2) => {
7696
+ return j(m(t2, (n2 = e2, d$2((t3) => b$1(t3) && t3.includes(n2)))));
7751
7697
  var n2;
7752
7698
  }, regex: (e2) => {
7753
- return j(m(t2, (n2 = e2, d((t3) => b(t3) && Boolean(t3.match(n2))))));
7699
+ return j(m(t2, (n2 = e2, d$2((t3) => b$1(t3) && Boolean(t3.match(n2))))));
7754
7700
  var n2;
7755
- } }), E = j(d(b)), K = (t2) => Object.assign(u(t2), { between: (e2, n2) => K(m(t2, ((t3, e3) => d((n3) => v(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => K(m(t2, ((t3) => d((e3) => v(e3) && e3 < t3))(e2))), gt: (e2) => K(m(t2, ((t3) => d((e3) => v(e3) && e3 > t3))(e2))), lte: (e2) => K(m(t2, ((t3) => d((e3) => v(e3) && e3 <= t3))(e2))), gte: (e2) => K(m(t2, ((t3) => d((e3) => v(e3) && e3 >= t3))(e2))), int: () => K(m(t2, d((t3) => v(t3) && Number.isInteger(t3)))), finite: () => K(m(t2, d((t3) => v(t3) && Number.isFinite(t3)))), positive: () => K(m(t2, d((t3) => v(t3) && t3 > 0))), negative: () => K(m(t2, d((t3) => v(t3) && t3 < 0))) }), A = K(d(v)), x = (t2) => Object.assign(u(t2), { between: (e2, n2) => x(m(t2, ((t3, e3) => d((n3) => w(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => x(m(t2, ((t3) => d((e3) => w(e3) && e3 < t3))(e2))), gt: (e2) => x(m(t2, ((t3) => d((e3) => w(e3) && e3 > t3))(e2))), lte: (e2) => x(m(t2, ((t3) => d((e3) => w(e3) && e3 <= t3))(e2))), gte: (e2) => x(m(t2, ((t3) => d((e3) => w(e3) && e3 >= t3))(e2))), positive: () => x(m(t2, d((t3) => w(t3) && t3 > 0))), negative: () => x(m(t2, d((t3) => w(t3) && t3 < 0))) }), P = x(d(w)), T = u(d(function(t2) {
7701
+ } }), E$1 = j(d$2(b$1)), K = (t2) => Object.assign(u$1(t2), { between: (e2, n2) => K(m(t2, ((t3, e3) => d$2((n3) => v$1(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => K(m(t2, ((t3) => d$2((e3) => v$1(e3) && e3 < t3))(e2))), gt: (e2) => K(m(t2, ((t3) => d$2((e3) => v$1(e3) && e3 > t3))(e2))), lte: (e2) => K(m(t2, ((t3) => d$2((e3) => v$1(e3) && e3 <= t3))(e2))), gte: (e2) => K(m(t2, ((t3) => d$2((e3) => v$1(e3) && e3 >= t3))(e2))), int: () => K(m(t2, d$2((t3) => v$1(t3) && Number.isInteger(t3)))), finite: () => K(m(t2, d$2((t3) => v$1(t3) && Number.isFinite(t3)))), positive: () => K(m(t2, d$2((t3) => v$1(t3) && t3 > 0))), negative: () => K(m(t2, d$2((t3) => v$1(t3) && t3 < 0))) }), A = K(d$2(v$1)), x$1 = (t2) => Object.assign(u$1(t2), { between: (e2, n2) => x$1(m(t2, ((t3, e3) => d$2((n3) => w$1(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => x$1(m(t2, ((t3) => d$2((e3) => w$1(e3) && e3 < t3))(e2))), gt: (e2) => x$1(m(t2, ((t3) => d$2((e3) => w$1(e3) && e3 > t3))(e2))), lte: (e2) => x$1(m(t2, ((t3) => d$2((e3) => w$1(e3) && e3 <= t3))(e2))), gte: (e2) => x$1(m(t2, ((t3) => d$2((e3) => w$1(e3) && e3 >= t3))(e2))), positive: () => x$1(m(t2, d$2((t3) => w$1(t3) && t3 > 0))), negative: () => x$1(m(t2, d$2((t3) => w$1(t3) && t3 < 0))) }), P = x$1(d$2(w$1)), T = u$1(d$2(function(t2) {
7756
7702
  return "boolean" == typeof t2;
7757
- })), k = u(d(function(t2) {
7703
+ })), k = u$1(d$2(function(t2) {
7758
7704
  return "symbol" == typeof t2;
7759
- })), B = u(d(function(t2) {
7705
+ })), B = u$1(d$2(function(t2) {
7760
7706
  return null == t2;
7761
7707
  }));
7762
- var _$1 = { __proto__: null, matcher: t, optional: l, array: function(...e2) {
7763
- return h({ [t]: () => ({ match: (t2) => {
7708
+ var _$3 = { __proto__: null, matcher: t$1, optional: l$2, array: function(...e2) {
7709
+ return h({ [t$1]: () => ({ match: (t2) => {
7764
7710
  if (!Array.isArray(t2))
7765
7711
  return { matched: false };
7766
7712
  if (0 === e2.length)
@@ -7768,16 +7714,16 @@ var _$1 = { __proto__: null, matcher: t, optional: l, array: function(...e2) {
7768
7714
  const n2 = e2[0];
7769
7715
  let r2 = {};
7770
7716
  if (0 === t2.length)
7771
- return o$1(n2).forEach((t3) => {
7717
+ return o$2(n2).forEach((t3) => {
7772
7718
  r2[t3] = [];
7773
7719
  }), { matched: true, selections: r2 };
7774
7720
  const i2 = (t3, e3) => {
7775
7721
  r2[t3] = (r2[t3] || []).concat([e3]);
7776
7722
  };
7777
- return { matched: t2.every((t3) => s(n2, t3, i2)), selections: r2 };
7778
- }, getSelectionKeys: () => 0 === e2.length ? [] : o$1(e2[0]) }) });
7723
+ return { matched: t2.every((t3) => s$1(n2, t3, i2)), selections: r2 };
7724
+ }, getSelectionKeys: () => 0 === e2.length ? [] : o$2(e2[0]) }) });
7779
7725
  }, set: function(...e2) {
7780
- return u({ [t]: () => ({ match: (t2) => {
7726
+ return u$1({ [t$1]: () => ({ match: (t2) => {
7781
7727
  if (!(t2 instanceof Set))
7782
7728
  return { matched: false };
7783
7729
  let n2 = {};
@@ -7788,10 +7734,10 @@ var _$1 = { __proto__: null, matcher: t, optional: l, array: function(...e2) {
7788
7734
  const r2 = (t3, e3) => {
7789
7735
  n2[t3] = (n2[t3] || []).concat([e3]);
7790
7736
  }, i2 = e2[0];
7791
- return { matched: f(t2, (t3) => s(i2, t3, r2)), selections: n2 };
7792
- }, getSelectionKeys: () => 0 === e2.length ? [] : o$1(e2[0]) }) });
7737
+ return { matched: f$1(t2, (t3) => s$1(i2, t3, r2)), selections: n2 };
7738
+ }, getSelectionKeys: () => 0 === e2.length ? [] : o$2(e2[0]) }) });
7793
7739
  }, map: function(...e2) {
7794
- return u({ [t]: () => ({ match: (t2) => {
7740
+ return u$1({ [t$1]: () => ({ match: (t2) => {
7795
7741
  if (!(t2 instanceof Map))
7796
7742
  return { matched: false };
7797
7743
  let n2 = {};
@@ -7806,20 +7752,20 @@ var _$1 = { __proto__: null, matcher: t, optional: l, array: function(...e2) {
7806
7752
  if (1 === e2.length)
7807
7753
  throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${null == (i2 = e2[0]) ? void 0 : i2.toString()}`);
7808
7754
  const [o2, c2] = e2;
7809
- return { matched: g(t2, (t3, e3) => {
7810
- const n3 = s(o2, e3, r2), i3 = s(c2, t3, r2);
7755
+ return { matched: g$1(t2, (t3, e3) => {
7756
+ const n3 = s$1(o2, e3, r2), i3 = s$1(c2, t3, r2);
7811
7757
  return n3 && i3;
7812
7758
  }), selections: n2 };
7813
- }, getSelectionKeys: () => 0 === e2.length ? [] : [...o$1(e2[0]), ...o$1(e2[1])] }) });
7814
- }, intersection: m, union: y, not: function(e2) {
7815
- return u({ [t]: () => ({ match: (t2) => ({ matched: !s(e2, t2, () => {
7759
+ }, getSelectionKeys: () => 0 === e2.length ? [] : [...o$2(e2[0]), ...o$2(e2[1])] }) });
7760
+ }, intersection: m, union: y$1, not: function(e2) {
7761
+ return u$1({ [t$1]: () => ({ match: (t2) => ({ matched: !s$1(e2, t2, () => {
7816
7762
  }) }), getSelectionKeys: () => [], matcherType: "not" }) });
7817
- }, when: d, select: p, any: S, _: O, string: E, number: A, bigint: P, boolean: T, symbol: k, nullish: B, instanceOf: function(t2) {
7818
- return u(d(function(t3) {
7763
+ }, when: d$2, select: p$2, any: S, _: O$1, string: E$1, number: A, bigint: P, boolean: T, symbol: k, nullish: B, instanceOf: function(t2) {
7764
+ return u$1(d$2(function(t3) {
7819
7765
  return (e2) => e2 instanceof t3;
7820
7766
  }(t2)));
7821
7767
  }, shape: function(t2) {
7822
- return u(d(a(t2)));
7768
+ return u$1(d$2(a$1(t2)));
7823
7769
  } };
7824
7770
  const W = { matched: false, value: void 0 };
7825
7771
  function N(t2) {
@@ -7838,7 +7784,7 @@ class $ {
7838
7784
  let o2 = false, c2 = {};
7839
7785
  const a2 = (t3, e3) => {
7840
7786
  o2 = true, c2[t3] = e3;
7841
- }, u2 = !r2.some((t3) => s(t3, this.input, a2)) || i2 && !Boolean(i2(this.input)) ? W : { matched: true, value: e2(o2 ? n in c2 ? c2[n] : c2 : this.input, this.input) };
7787
+ }, u2 = !r2.some((t3) => s$1(t3, this.input, a2)) || i2 && !Boolean(i2(this.input)) ? W : { matched: true, value: e2(o2 ? n in c2 ? c2[n] : c2 : this.input, this.input) };
7842
7788
  return new $(this.input, u2);
7843
7789
  }
7844
7790
  when(t2, e2) {
@@ -7876,1225 +7822,1426 @@ const ERROR_MESSAGES = {
7876
7822
  no_submissions: "Application ended without any fields submitted",
7877
7823
  invalid_state: "Invalid state"
7878
7824
  };
7879
- function promisifyRequest(request) {
7880
- return new Promise((resolve, reject) => {
7881
- request.oncomplete = request.onsuccess = () => resolve(request.result);
7882
- request.onabort = request.onerror = () => reject(request.error);
7883
- });
7825
+ function i() {
7826
+ throw new Error("Cycle detected");
7884
7827
  }
7885
- function createStore(dbName, storeName) {
7886
- const request = indexedDB.open(dbName);
7887
- request.onupgradeneeded = () => request.result.createObjectStore(storeName);
7888
- const dbp = promisifyRequest(request);
7889
- return (txMode, callback) => dbp.then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));
7828
+ var t = Symbol.for("preact-signals");
7829
+ function r$1() {
7830
+ if (!(v > 1)) {
7831
+ var i2, t2 = false;
7832
+ while (void 0 !== f) {
7833
+ var r2 = f;
7834
+ f = void 0;
7835
+ e++;
7836
+ while (void 0 !== r2) {
7837
+ var n2 = r2.o;
7838
+ r2.o = void 0;
7839
+ r2.f &= -3;
7840
+ if (!(8 & r2.f) && l$1(r2))
7841
+ try {
7842
+ r2.c();
7843
+ } catch (r3) {
7844
+ if (!t2) {
7845
+ i2 = r3;
7846
+ t2 = true;
7847
+ }
7848
+ }
7849
+ r2 = n2;
7850
+ }
7851
+ }
7852
+ e = 0;
7853
+ v--;
7854
+ if (t2)
7855
+ throw i2;
7856
+ } else
7857
+ v--;
7890
7858
  }
7891
- let defaultGetStoreFunc;
7892
- function defaultGetStore() {
7893
- if (!defaultGetStoreFunc) {
7894
- defaultGetStoreFunc = createStore("keyval-store", "keyval");
7859
+ var o$1 = void 0;
7860
+ var f = void 0, v = 0, e = 0, u = 0;
7861
+ function c(i2) {
7862
+ if (void 0 !== o$1) {
7863
+ var t2 = i2.n;
7864
+ if (void 0 === t2 || t2.t !== o$1) {
7865
+ t2 = { i: 0, S: i2, p: o$1.s, n: void 0, t: o$1, e: void 0, x: void 0, r: t2 };
7866
+ if (void 0 !== o$1.s)
7867
+ o$1.s.n = t2;
7868
+ o$1.s = t2;
7869
+ i2.n = t2;
7870
+ if (32 & o$1.f)
7871
+ i2.S(t2);
7872
+ return t2;
7873
+ } else if (-1 === t2.i) {
7874
+ t2.i = 0;
7875
+ if (void 0 !== t2.n) {
7876
+ t2.n.p = t2.p;
7877
+ if (void 0 !== t2.p)
7878
+ t2.p.n = t2.n;
7879
+ t2.p = o$1.s;
7880
+ t2.n = void 0;
7881
+ o$1.s.n = t2;
7882
+ o$1.s = t2;
7883
+ }
7884
+ return t2;
7885
+ }
7895
7886
  }
7896
- return defaultGetStoreFunc;
7897
- }
7898
- function get(key, customStore = defaultGetStore()) {
7899
- return customStore("readonly", (store2) => promisifyRequest(store2.get(key)));
7900
7887
  }
7901
- function set(key, value, customStore = defaultGetStore()) {
7902
- return customStore("readwrite", (store2) => {
7903
- store2.put(value, key);
7904
- return promisifyRequest(store2.transaction);
7905
- });
7888
+ function d$1(i2) {
7889
+ this.v = i2;
7890
+ this.i = 0;
7891
+ this.n = void 0;
7892
+ this.t = void 0;
7906
7893
  }
7907
- const store = typeof window === "undefined" ? void 0 : createStore("inploi", "applications");
7908
- const idb = {
7909
- getApplicationData: async (application2) => {
7910
- const key = getCacheKey(application2);
7911
- return await get(key, store);
7912
- },
7913
- setApplicationData: async (params) => {
7914
- const key = getCacheKey(params.application);
7915
- return await set(key, params.data, store);
7916
- }
7894
+ d$1.prototype.brand = t;
7895
+ d$1.prototype.h = function() {
7896
+ return true;
7917
7897
  };
7918
- const getChatbotFlowProgress = (nodes, node, onCalculate, stepsMade = 0) => {
7919
- if (!node.nextId) {
7920
- onCalculate(node.id, {
7921
- stepsMade,
7922
- remainingSteps: 0
7923
- });
7924
- return {
7925
- stepsMade,
7926
- remainingSteps: 0
7927
- };
7928
- }
7929
- const nextNode = nodes.find((newNode) => newNode.id === node.nextId);
7930
- if (nextNode === void 0) {
7931
- return {
7932
- stepsMade,
7933
- remainingSteps: 0
7934
- };
7898
+ d$1.prototype.S = function(i2) {
7899
+ if (this.t !== i2 && void 0 === i2.e) {
7900
+ i2.x = this.t;
7901
+ if (void 0 !== this.t)
7902
+ this.t.e = i2;
7903
+ this.t = i2;
7935
7904
  }
7936
- const branchId = node.type === "if-block" ? node.branchId : void 0;
7937
- const branchNode = nodes.find((node2) => node2.id === branchId);
7938
- const increment = node.type.includes("question") ? 1 : 0;
7939
- if (branchNode) {
7940
- const remainingSteps2 = increment + Math.max(getChatbotFlowProgress(nodes, nextNode, onCalculate, stepsMade + increment).remainingSteps, getChatbotFlowProgress(nodes, branchNode, onCalculate, stepsMade + increment).remainingSteps);
7941
- onCalculate(node.id, {
7942
- stepsMade,
7943
- remainingSteps: remainingSteps2
7944
- });
7945
- return {
7946
- stepsMade,
7947
- remainingSteps: remainingSteps2
7948
- };
7905
+ };
7906
+ d$1.prototype.U = function(i2) {
7907
+ if (void 0 !== this.t) {
7908
+ var t2 = i2.e, r2 = i2.x;
7909
+ if (void 0 !== t2) {
7910
+ t2.x = r2;
7911
+ i2.e = void 0;
7912
+ }
7913
+ if (void 0 !== r2) {
7914
+ r2.e = t2;
7915
+ i2.x = void 0;
7916
+ }
7917
+ if (i2 === this.t)
7918
+ this.t = r2;
7949
7919
  }
7950
- const remainingSteps = increment + getChatbotFlowProgress(nodes, nextNode, onCalculate, stepsMade + increment).remainingSteps;
7951
- onCalculate(node.id, {
7952
- stepsMade,
7953
- remainingSteps
7954
- });
7955
- return {
7956
- stepsMade,
7957
- remainingSteps
7958
- };
7959
7920
  };
7960
- const getNodesProgress = (nodes) => {
7961
- const nodeIdToProgress = {};
7962
- const firstNode = nodes.find((node) => node.isHead);
7963
- if (!firstNode)
7964
- return nodeIdToProgress;
7965
- getChatbotFlowProgress(nodes, firstNode, (nodeId, progress2) => {
7966
- nodeIdToProgress[nodeId] = progress2;
7921
+ d$1.prototype.subscribe = function(i2) {
7922
+ var t2 = this;
7923
+ return O(function() {
7924
+ var r2 = t2.value, n2 = 32 & this.f;
7925
+ this.f &= -33;
7926
+ try {
7927
+ i2(r2);
7928
+ } finally {
7929
+ this.f |= n2;
7930
+ }
7967
7931
  });
7968
- return nodeIdToProgress;
7969
7932
  };
7970
- const getCacheKey = (application2) => [application2.job.id, application2.flow.id, application2.flow.version].join("/");
7971
- const viewState = a$1("maximised");
7972
- const inputHeight = a$1(53);
7973
- const currentApplication = a$1({
7974
- state: "idle"
7975
- });
7976
- const updateApplicationData = (updateFn) => {
7977
- const {
7978
- state,
7979
- application: application2
7980
- } = currentApplication.value;
7981
- if (state !== "loaded")
7982
- return;
7983
- invariant$1(application2, "No application to update");
7984
- const newData = updateFn(application2.data);
7985
- const newApplication = {
7986
- ...application2,
7987
- data: newData
7988
- };
7989
- currentApplication.value = {
7990
- state,
7991
- application: newApplication
7992
- };
7993
- idb.setApplicationData({
7994
- application: application2,
7995
- data: newData
7996
- });
7933
+ d$1.prototype.valueOf = function() {
7934
+ return this.value;
7997
7935
  };
7998
- const application = {
7999
- current$: currentApplication,
8000
- start: async (application2) => {
8001
- const data = await idb.getApplicationData(application2) ?? createNewApplicationData();
8002
- const nodeIdToProgress = getNodesProgress(application2.flow.nodes);
8003
- currentApplication.value = {
8004
- state: "loaded",
8005
- application: {
8006
- ...application2,
8007
- data,
8008
- startedAt: /* @__PURE__ */ new Date(),
8009
- nodeIdToProgress
8010
- }
8011
- };
8012
- idb.setApplicationData({
8013
- application: application2,
8014
- data
8015
- });
8016
- },
8017
- cancel: () => {
8018
- currentApplication.value = {
8019
- state: "idle"
8020
- };
8021
- },
8022
- markAsFinished: () => updateApplicationData((data) => ({
8023
- ...data,
8024
- isFinished: true
8025
- })),
8026
- setCurrentNodeId: (currentNodeId) => updateApplicationData((data) => ({
8027
- ...data,
8028
- currentNodeId
8029
- })),
8030
- restart: () => {
8031
- const {
8032
- state,
8033
- application: application2
8034
- } = currentApplication.value;
8035
- if (state !== "loaded")
8036
- throw new Error("Application cannot be restarted: not in valid state");
8037
- const data = createNewApplicationData();
8038
- currentApplication.value = {
8039
- state,
8040
- application: {
8041
- ...application2,
8042
- data,
8043
- startedAt: /* @__PURE__ */ new Date()
8044
- }
8045
- };
8046
- idb.setApplicationData({
8047
- application: application2,
8048
- data
8049
- });
8050
- },
8051
- addMessage: (message, groupId) => {
8052
- const newMessage = {
8053
- ...message,
8054
- groupId
8055
- };
8056
- return updateApplicationData((data) => ({
8057
- ...data,
8058
- messages: [...data.messages, newMessage]
8059
- }));
8060
- },
8061
- /** Removes from the last message backwards, all the messages that have the groupId passed, until it reaches one that doesn't */
8062
- removeLastGroupMessagesById: (groupId) => {
8063
- var _a;
8064
- const {
8065
- state,
8066
- application: application2
8067
- } = currentApplication.value;
8068
- invariant$1(state === "loaded", "Application not loaded");
8069
- const messages = [...application2.data.messages];
8070
- let i2 = messages.length - 1;
8071
- while (i2 >= 0 && messages[i2] && ((_a = messages[i2]) == null ? void 0 : _a.groupId) === groupId) {
8072
- messages.pop();
8073
- i2--;
8074
- }
8075
- application2.data.messages = messages;
8076
- idb.setApplicationData({
8077
- application: application2,
8078
- data: application2.data
8079
- });
8080
- },
8081
- setSubmission: (fieldKey, submission) => updateApplicationData((data) => {
8082
- const newSubmissions = {
8083
- ...data.submissions
8084
- };
8085
- if (submission === null) {
8086
- delete newSubmissions[fieldKey];
8087
- } else {
8088
- newSubmissions[fieldKey] = submission;
7936
+ d$1.prototype.toString = function() {
7937
+ return this.value + "";
7938
+ };
7939
+ d$1.prototype.toJSON = function() {
7940
+ return this.value;
7941
+ };
7942
+ d$1.prototype.peek = function() {
7943
+ return this.v;
7944
+ };
7945
+ Object.defineProperty(d$1.prototype, "value", { get: function() {
7946
+ var i2 = c(this);
7947
+ if (void 0 !== i2)
7948
+ i2.i = this.i;
7949
+ return this.v;
7950
+ }, set: function(t2) {
7951
+ if (o$1 instanceof _$2)
7952
+ !function() {
7953
+ throw new Error("Computed cannot have side-effects");
7954
+ }();
7955
+ if (t2 !== this.v) {
7956
+ if (e > 100)
7957
+ i();
7958
+ this.v = t2;
7959
+ this.i++;
7960
+ u++;
7961
+ v++;
7962
+ try {
7963
+ for (var n2 = this.t; void 0 !== n2; n2 = n2.x)
7964
+ n2.t.N();
7965
+ } finally {
7966
+ r$1();
8089
7967
  }
8090
- return {
8091
- ...data,
8092
- submissions: newSubmissions
8093
- };
8094
- }),
8095
- setInput: (input) => updateApplicationData((data) => ({
8096
- ...data,
8097
- currentInput: input
8098
- }))
7968
+ }
7969
+ } });
7970
+ function a(i2) {
7971
+ return new d$1(i2);
7972
+ }
7973
+ function l$1(i2) {
7974
+ for (var t2 = i2.s; void 0 !== t2; t2 = t2.n)
7975
+ if (t2.S.i !== t2.i || !t2.S.h() || t2.S.i !== t2.i)
7976
+ return true;
7977
+ return false;
7978
+ }
7979
+ function y(i2) {
7980
+ for (var t2 = i2.s; void 0 !== t2; t2 = t2.n) {
7981
+ var r2 = t2.S.n;
7982
+ if (void 0 !== r2)
7983
+ t2.r = r2;
7984
+ t2.S.n = t2;
7985
+ t2.i = -1;
7986
+ if (void 0 === t2.n) {
7987
+ i2.s = t2;
7988
+ break;
7989
+ }
7990
+ }
7991
+ }
7992
+ function w(i2) {
7993
+ var t2 = i2.s, r2 = void 0;
7994
+ while (void 0 !== t2) {
7995
+ var n2 = t2.p;
7996
+ if (-1 === t2.i) {
7997
+ t2.S.U(t2);
7998
+ if (void 0 !== n2)
7999
+ n2.n = t2.n;
8000
+ if (void 0 !== t2.n)
8001
+ t2.n.p = n2;
8002
+ } else
8003
+ r2 = t2;
8004
+ t2.S.n = t2.r;
8005
+ if (void 0 !== t2.r)
8006
+ t2.r = void 0;
8007
+ t2 = n2;
8008
+ }
8009
+ i2.s = r2;
8010
+ }
8011
+ function _$2(i2) {
8012
+ d$1.call(this, void 0);
8013
+ this.x = i2;
8014
+ this.s = void 0;
8015
+ this.g = u - 1;
8016
+ this.f = 4;
8017
+ }
8018
+ (_$2.prototype = new d$1()).h = function() {
8019
+ this.f &= -3;
8020
+ if (1 & this.f)
8021
+ return false;
8022
+ if (32 == (36 & this.f))
8023
+ return true;
8024
+ this.f &= -5;
8025
+ if (this.g === u)
8026
+ return true;
8027
+ this.g = u;
8028
+ this.f |= 1;
8029
+ if (this.i > 0 && !l$1(this)) {
8030
+ this.f &= -2;
8031
+ return true;
8032
+ }
8033
+ var i2 = o$1;
8034
+ try {
8035
+ y(this);
8036
+ o$1 = this;
8037
+ var t2 = this.x();
8038
+ if (16 & this.f || this.v !== t2 || 0 === this.i) {
8039
+ this.v = t2;
8040
+ this.f &= -17;
8041
+ this.i++;
8042
+ }
8043
+ } catch (i3) {
8044
+ this.v = i3;
8045
+ this.f |= 16;
8046
+ this.i++;
8047
+ }
8048
+ o$1 = i2;
8049
+ w(this);
8050
+ this.f &= -2;
8051
+ return true;
8099
8052
  };
8100
- const genRandomId = () => typeof crypto !== "undefined" && "randomUUID" in crypto ? crypto.randomUUID() : Math.random().toString(36).slice(2);
8101
- const createNewApplicationData = () => ({
8102
- messages: [],
8103
- submissions: {},
8104
- currentNodeId: null,
8105
- isFinished: false,
8106
- sequence: 0,
8107
- flowSessionId: genRandomId()
8108
- });
8109
- var _ = 0;
8110
- function o(o2, e2, n2, t2, f2, l2) {
8111
- var s2, u2, a2 = {};
8112
- for (u2 in e2)
8113
- "ref" == u2 ? s2 = e2[u2] : a2[u2] = e2[u2];
8114
- var i2 = { type: o2, props: a2, key: n2, ref: s2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --_, __source: f2, __self: l2 };
8115
- if ("function" == typeof o2 && (s2 = o2.defaultProps))
8116
- for (u2 in s2)
8117
- void 0 === a2[u2] && (a2[u2] = s2[u2]);
8118
- return l$4.vnode && l$4.vnode(i2), i2;
8053
+ _$2.prototype.S = function(i2) {
8054
+ if (void 0 === this.t) {
8055
+ this.f |= 36;
8056
+ for (var t2 = this.s; void 0 !== t2; t2 = t2.n)
8057
+ t2.S.S(t2);
8058
+ }
8059
+ d$1.prototype.S.call(this, i2);
8060
+ };
8061
+ _$2.prototype.U = function(i2) {
8062
+ if (void 0 !== this.t) {
8063
+ d$1.prototype.U.call(this, i2);
8064
+ if (void 0 === this.t) {
8065
+ this.f &= -33;
8066
+ for (var t2 = this.s; void 0 !== t2; t2 = t2.n)
8067
+ t2.S.U(t2);
8068
+ }
8069
+ }
8070
+ };
8071
+ _$2.prototype.N = function() {
8072
+ if (!(2 & this.f)) {
8073
+ this.f |= 6;
8074
+ for (var i2 = this.t; void 0 !== i2; i2 = i2.x)
8075
+ i2.t.N();
8076
+ }
8077
+ };
8078
+ _$2.prototype.peek = function() {
8079
+ if (!this.h())
8080
+ i();
8081
+ if (16 & this.f)
8082
+ throw this.v;
8083
+ return this.v;
8084
+ };
8085
+ Object.defineProperty(_$2.prototype, "value", { get: function() {
8086
+ if (1 & this.f)
8087
+ i();
8088
+ var t2 = c(this);
8089
+ this.h();
8090
+ if (void 0 !== t2)
8091
+ t2.i = this.i;
8092
+ if (16 & this.f)
8093
+ throw this.v;
8094
+ return this.v;
8095
+ } });
8096
+ function p$1(i2) {
8097
+ return new _$2(i2);
8119
8098
  }
8120
- const ChatError = ({
8121
- message
8122
- }) => {
8123
- return o("div", {
8124
- class: "flex flex-grow flex-col items-center justify-center",
8125
- children: [o("svg", {
8126
- class: "text-error-9 h-16 w-16",
8127
- fill: "none",
8128
- xmlns: "http://www.w3.org/2000/svg",
8129
- "stroke-width": "2",
8130
- stroke: "currentColor",
8131
- "stroke-linecap": "round",
8132
- viewBox: "0 0 96 96",
8133
- children: [o("path", {
8134
- d: "M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",
8135
- fill: "#fff"
8136
- }), o("path", {
8137
- d: "M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"
8138
- }), o("line", {
8139
- x1: "36.7",
8140
- y1: "39.3",
8141
- x2: "44.8",
8142
- y2: "47.4"
8143
- }), o("line", {
8144
- x1: "52.2",
8145
- y1: "39.3",
8146
- x2: "60.3",
8147
- y2: "47.4"
8148
- }), o("line", {
8149
- x1: "44.7",
8150
- y1: "39.2",
8151
- x2: "36.6",
8152
- y2: "47.3"
8153
- }), o("line", {
8154
- x1: "60.2",
8155
- y1: "39.2",
8156
- x2: "52.1",
8157
- y2: "47.3"
8158
- }), o("path", {
8159
- d: "M38 56h19"
8160
- })]
8161
- }), o("div", {
8162
- class: "flex flex-col gap-2 text-center",
8163
- children: [o("p", {
8164
- class: "text-error-11 font-bold",
8165
- children: "Something unexpected happened"
8166
- }), message && o("p", {
8167
- class: "text-neutral-9 text-sm",
8168
- children: message
8169
- })]
8170
- })]
8171
- });
8172
- };
8173
- const LoadingIndicator = (props) => o("svg", {
8174
- role: "img",
8175
- viewBox: "0 0 24 24",
8176
- ...props,
8177
- children: [o("title", {
8178
- children: "Loading"
8179
- }), o("style", {
8180
- children: `#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}`
8181
- }), o("g", {
8182
- id: "s1",
8183
- transform: "translate(12,0)",
8184
- children: o("g", {
8185
- id: "s2",
8186
- transform: "scale(0,0)",
8187
- children: o("circle", {
8188
- r: "6.5",
8189
- transform: "translate(0,0)",
8190
- fill: "currentColor"
8191
- })
8192
- })
8193
- }), o("g", {
8194
- id: "s3",
8195
- transform: "translate(12,12)",
8196
- children: o("g", {
8197
- id: "s4",
8198
- transform: "scale(1,1)",
8199
- children: o("circle", {
8200
- r: "6.5",
8201
- transform: "translate(0,0)",
8202
- fill: "currentColor"
8203
- })
8204
- })
8205
- }), o("g", {
8206
- id: "s5",
8207
- transform: "translate(12,0)",
8208
- children: o("g", {
8209
- id: "s6",
8210
- transform: "scale(0,0)",
8211
- children: o("path", {
8212
- d: "M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",
8213
- transform: "translate(-6.5,-6.5)",
8214
- "clip-rule": "evenodd",
8215
- fill: "currentColor",
8216
- "fill-rule": "evenodd"
8217
- })
8218
- })
8219
- }), o("g", {
8220
- id: "s7",
8221
- transform: "translate(12,0)",
8222
- children: o("g", {
8223
- id: "s8",
8224
- transform: "scale(0,0)",
8225
- children: o("path", {
8226
- d: "M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",
8227
- transform: "translate(-6.5,-9.25)",
8228
- fill: "currentColor"
8229
- })
8230
- })
8231
- })]
8232
- });
8233
- const ChatLoading = () => o("div", {
8234
- class: "flex flex-grow flex-col items-center justify-center",
8235
- children: o(LoadingIndicator, {
8236
- class: "text-neutral-6 h-8 w-8"
8237
- })
8238
- });
8239
- function r(e2) {
8240
- var t2, f2, n2 = "";
8241
- if ("string" == typeof e2 || "number" == typeof e2)
8242
- n2 += e2;
8243
- else if ("object" == typeof e2)
8244
- if (Array.isArray(e2))
8245
- for (t2 = 0; t2 < e2.length; t2++)
8246
- e2[t2] && (f2 = r(e2[t2])) && (n2 && (n2 += " "), n2 += f2);
8247
- else
8248
- for (t2 in e2)
8249
- e2[t2] && (n2 && (n2 += " "), n2 += t2);
8250
- return n2;
8251
- }
8252
- function clsx() {
8253
- for (var e2, t2, f2 = 0, n2 = ""; f2 < arguments.length; )
8254
- (e2 = arguments[f2++]) && (t2 = r(e2)) && (n2 && (n2 += " "), n2 += t2);
8255
- return n2;
8256
- }
8257
- const optimisticProgress = (progress2) => {
8258
- const prefilled = 0.1;
8259
- const unitProgress = progress2 / 100;
8260
- const concavity = 1.3;
8261
- if (progress2 < 0)
8262
- return "0%";
8263
- if (progress2 > 100)
8264
- return "100%";
8265
- return `${Math.round((1 - (1 - prefilled) * Math.pow(1 - unitProgress, concavity)) * 100)}%`;
8266
- };
8267
- const StatusbarIconButton = ({
8268
- class: className,
8269
- children,
8270
- ...props
8271
- }) => {
8272
- return o("button", {
8273
- class: clsx("touch-hitbox text-interactive-copy hover:text-interactive-copy-hover active:text-interactive-copy-active hover:bg-interactive-bg-hover active:bg-interactive-bg-active fr relative rounded-full p-2 transition-all", className),
8274
- ...props,
8275
- children: o("svg", {
8276
- class: "block",
8277
- width: "16",
8278
- height: "16",
8279
- viewBox: "0 0 16 16",
8280
- fill: "none",
8281
- stroke: "currentColor",
8282
- "stroke-width": "1.5",
8283
- "stroke-linecap": "round",
8284
- xmlns: "http://www.w3.org/2000/svg",
8285
- children
8286
- })
8287
- });
8288
- };
8289
- const ProgressBar = () => {
8290
- if (application.current$.value.state !== "loaded")
8291
- return null;
8292
- const nodeIdToProgress = application.current$.value.application.nodeIdToProgress;
8293
- const currentNodeId = application.current$.value.application.data.currentNodeId;
8294
- if (currentNodeId === null)
8295
- return null;
8296
- const currentProgress = nodeIdToProgress[currentNodeId];
8297
- if (currentProgress === void 0)
8298
- return null;
8299
- const percentage = 100 * (currentProgress.stepsMade / (currentProgress.remainingSteps + currentProgress.stepsMade));
8300
- return o("div", {
8301
- style: {
8302
- width: optimisticProgress(percentage)
8303
- },
8304
- class: "bg-accent-8 h-[2px] transition-all duration-1000"
8305
- });
8306
- };
8307
- const StatusBar = ({
8308
- children
8309
- }) => {
8310
- const view = viewState.value;
8311
- return o(k$3, {
8312
- children: o("header", {
8313
- class: "ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",
8314
- children: [o("div", {
8315
- class: "flex h-[var(--header-height)] gap-2",
8316
- children: [o("p", {
8317
- id: "chatbot-status-bar",
8318
- class: "sr-only",
8319
- children
8320
- }), o("button", {
8321
- tabIndex: -1,
8322
- "aria-hidden": true,
8323
- onClick: () => {
8324
- if (view === "minimised") {
8325
- viewState.value = "maximised";
8326
- } else {
8327
- viewState.value = "minimised";
8328
- }
8329
- },
8330
- class: "h-full flex-grow overflow-hidden px-4 py-1",
8331
- children: o("p", {
8332
- "aria-hidden": true,
8333
- class: "text-neutral-12 truncate text-sm font-bold tracking-tight",
8334
- children
8335
- })
8336
- }), o("div", {
8337
- class: "flex flex-shrink-0 items-center gap-3 p-1.5",
8338
- children: viewState.value === "minimised" ? o(k$3, {
8339
- children: [o(StatusbarIconButton, {
8340
- "aria-label": "Maximise job application",
8341
- onClick: () => viewState.value = "maximised",
8342
- children: o("path", {
8343
- d: "M12.5 9.5L8 5L3.5 9.5"
8344
- })
8345
- }, "minmax"), o(StatusbarIconButton, {
8346
- "aria-label": "Close application",
8347
- onClick: application.cancel,
8348
- children: o("path", {
8349
- d: "M12.5 6.5L8 11L3.5 6.5"
8350
- })
8351
- }, "close")]
8352
- }) : o(k$3, {
8353
- children: [application.current$.value.state === "loaded" && o(StatusbarIconButton, {
8354
- "aria-label": "Restart",
8355
- onClick: () => {
8356
- application.restart();
8357
- },
8358
- children: [o("path", {
8359
- d: "M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"
8360
- }), o("path", {
8361
- d: "M8 7L10 4.5L8 2.5"
8362
- })]
8363
- }, "restart"), o(StatusbarIconButton, {
8364
- "aria-label": "Minimise application",
8365
- onClick: () => viewState.value = "minimised",
8366
- children: o("path", {
8367
- d: "M12.5 6.5L8 11L3.5 6.5"
8368
- })
8369
- }, "minmax")]
8370
- })
8371
- })]
8372
- }), o(ProgressBar, {})]
8373
- })
8374
- });
8375
- };
8376
- const JobApplicationContent = M(() => Promise.resolve().then(() => require("./job-application-content-69860abf.cjs")).then((module2) => module2.JobApplicationContent));
8377
- const MotionProvider = ({
8378
- children
8379
- }) => {
8380
- return o(LazyMotion, {
8381
- features: domAnimation,
8382
- children
8383
- });
8384
- };
8385
- const chatbotVariants = {
8386
- closed: {
8387
- y: "calc(100% + 1rem)",
8388
- height: HEADER_HEIGHT
8389
- },
8390
- maximised: {
8391
- y: 0,
8392
- height: "75vh"
8393
- },
8394
- minimised: {
8395
- y: 0,
8396
- height: HEADER_HEIGHT
8397
- }
8398
- };
8399
- const Chatbot = ({
8400
- logger,
8401
- apiClient,
8402
- analytics
8403
- }) => {
8404
- const {
8405
- state,
8406
- application: currentApplication2,
8407
- error
8408
- } = application.current$.value;
8409
- const view = viewState.value;
8410
- const isApplying = state !== "idle" && view === "maximised";
8411
- const drawerRef = _$4(null);
8412
- return o(MotionProvider, {
8413
- children: o($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9, {
8414
- open: isApplying,
8415
- modal: isApplying,
8416
- children: o(AnimatePresence, {
8417
- children: [o($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff, {
8418
- forceMount: true,
8419
- asChild: true,
8420
- children: isApplying && o(m$1.div, {
8421
- initial: {
8422
- opacity: 0
8423
- },
8424
- animate: {
8425
- opacity: 1
8426
- },
8427
- exit: {
8428
- opacity: 0
8429
- },
8430
- class: "bg-overlay fixed inset-0"
8431
- })
8432
- }, "bg"), o($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2, {
8433
- forceMount: true,
8434
- asChild: true,
8435
- children: o(m$1.div, {
8436
- ref: drawerRef,
8437
- "aria-modal": "true",
8438
- role: "dialog",
8439
- "aria-labelledby": "chatbot-status-bar",
8440
- variants: chatbotVariants,
8441
- initial: "closed",
8442
- animate: N({
8443
- state,
8444
- view
8445
- }).with({
8446
- state: "idle"
8447
- }, () => "closed").with({
8448
- state: _$1.union("loaded", "error", "loading")
8449
- }, ({
8450
- view: view2
8451
- }) => view2).exhaustive(),
8452
- exit: "closed",
8453
- style: {
8454
- "--header-height": `${HEADER_HEIGHT}px`
8455
- },
8456
- class: "selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none",
8457
- children: o("div", {
8458
- class: "outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",
8459
- children: [o(StatusBar, {
8460
- children: currentApplication2 ? `Applying for “${currentApplication2.job.title}” at ${currentApplication2.company.name}` : "inploi chatbot: " + state
8461
- }), (() => {
8462
- switch (state) {
8463
- case "idle":
8464
- return null;
8465
- case "loading":
8466
- return o(ChatLoading, {}, "loading");
8467
- case "loaded":
8468
- if (view !== "maximised")
8469
- return null;
8470
- return o(D, {
8471
- fallback: o(ChatLoading, {}, "loading"),
8472
- children: o(JobApplicationContent, {
8473
- analytics,
8474
- currentApplication: currentApplication2,
8475
- apiClient,
8476
- logger
8477
- })
8478
- });
8479
- case "error":
8480
- return o(ChatError, {
8481
- message: error
8482
- });
8483
- default:
8484
- exhaustive(state);
8485
- }
8486
- })()]
8487
- })
8488
- }, "content")
8489
- })]
8490
- })
8491
- })
8492
- });
8493
- };
8494
- function flatten$1(arg1) {
8495
- return (Array.isArray(arg1) ? arg1 : arg1.issues).reduce(
8496
- (flatErrors, issue) => {
8497
- if (issue.path) {
8498
- if (issue.path.every(
8499
- ({ key }) => typeof key === "string" || typeof key === "number"
8500
- )) {
8501
- const path = issue.path.map(({ key }) => key).join(".");
8502
- if (flatErrors.nested[path]) {
8503
- flatErrors.nested[path].push(issue.message);
8504
- } else {
8505
- flatErrors.nested[path] = [issue.message];
8506
- }
8507
- }
8508
- } else {
8509
- if (flatErrors.root) {
8510
- flatErrors.root.push(issue.message);
8511
- } else {
8512
- flatErrors.root = [issue.message];
8513
- }
8514
- }
8515
- return flatErrors;
8516
- },
8517
- { nested: {} }
8518
- );
8519
- }
8520
- var ValiError = class extends Error {
8521
- /**
8522
- * Creates a Valibot error with useful information.
8523
- *
8524
- * @param issues The error issues.
8525
- */
8526
- constructor(issues) {
8527
- super(issues[0].message);
8528
- __publicField(this, "issues");
8529
- this.name = "ValiError";
8530
- this.issues = issues;
8531
- }
8532
- };
8533
- function coerce(schema, action) {
8534
- return {
8535
- ...schema,
8536
- _parse(input, info) {
8537
- return schema._parse(action(input), info);
8538
- }
8539
- };
8540
- }
8541
- function getIssues(issues) {
8542
- return { issues };
8543
- }
8544
- function getOutput(output) {
8545
- return { output };
8546
- }
8547
- function getIssue(info, issue) {
8548
- return {
8549
- reason: info == null ? void 0 : info.reason,
8550
- validation: issue.validation,
8551
- origin: (info == null ? void 0 : info.origin) || "value",
8552
- message: issue.message,
8553
- input: issue.input,
8554
- path: issue.path,
8555
- abortEarly: info == null ? void 0 : info.abortEarly,
8556
- abortPipeEarly: info == null ? void 0 : info.abortPipeEarly,
8557
- skipPipe: info == null ? void 0 : info.skipPipe
8558
- };
8559
- }
8560
- function getPipeInfo(info, reason) {
8561
- return {
8562
- reason,
8563
- origin: info == null ? void 0 : info.origin,
8564
- abortEarly: info == null ? void 0 : info.abortEarly,
8565
- abortPipeEarly: info == null ? void 0 : info.abortPipeEarly,
8566
- skipPipe: info == null ? void 0 : info.skipPipe
8567
- };
8568
- }
8569
- function executePipe(input, pipe2, parseInfo, reason) {
8570
- if (!pipe2 || !pipe2.length || (parseInfo == null ? void 0 : parseInfo.skipPipe)) {
8571
- return getOutput(input);
8572
- }
8573
- let pipeInfo;
8574
- let issues;
8575
- let output = input;
8576
- for (const action of pipe2) {
8577
- const result = action._parse(output);
8578
- if (result.issues) {
8579
- pipeInfo = pipeInfo || getPipeInfo(parseInfo, reason);
8580
- for (const issueInfo of result.issues) {
8581
- const issue = getIssue(pipeInfo, issueInfo);
8582
- issues ? issues.push(issue) : issues = [issue];
8583
- }
8584
- if (pipeInfo.abortEarly || pipeInfo.abortPipeEarly) {
8585
- break;
8586
- }
8587
- } else {
8588
- output = result.output;
8589
- }
8590
- }
8591
- return issues ? getIssues(issues) : getOutput(output);
8592
- }
8593
- function getDefaultArgs(arg1, arg2) {
8594
- return Array.isArray(arg1) ? [void 0, arg1] : [arg1, arg2];
8595
- }
8596
- function getErrorMessage(message) {
8597
- return typeof message === "function" ? message() : message;
8598
- }
8599
- function getPipeIssues(validation, message, input, requirement) {
8600
- return getIssues([
8601
- {
8602
- validation,
8603
- message: getErrorMessage(message),
8604
- input,
8605
- requirement
8099
+ function g(i2) {
8100
+ var t2 = i2.u;
8101
+ i2.u = void 0;
8102
+ if ("function" == typeof t2) {
8103
+ v++;
8104
+ var n2 = o$1;
8105
+ o$1 = void 0;
8106
+ try {
8107
+ t2();
8108
+ } catch (t3) {
8109
+ i2.f &= -2;
8110
+ i2.f |= 8;
8111
+ b(i2);
8112
+ throw t3;
8113
+ } finally {
8114
+ o$1 = n2;
8115
+ r$1();
8606
8116
  }
8607
- ]);
8608
- }
8609
- function getRestAndDefaultArgs(arg1, arg2, arg3) {
8610
- if (!arg1 || typeof arg1 === "object" && !Array.isArray(arg1)) {
8611
- const [error2, pipe22] = getDefaultArgs(arg2, arg3);
8612
- return [arg1, error2, pipe22];
8613
8117
  }
8614
- const [error, pipe2] = getDefaultArgs(
8615
- arg1,
8616
- arg2
8617
- );
8618
- return [void 0, error, pipe2];
8619
8118
  }
8620
- function getSchemaIssues(info, reason, validation, message, input, issues) {
8621
- return {
8622
- issues: [
8623
- {
8624
- reason,
8625
- validation,
8626
- origin: (info == null ? void 0 : info.origin) || "value",
8627
- message: getErrorMessage(message),
8628
- input,
8629
- issues,
8630
- abortEarly: info == null ? void 0 : info.abortEarly,
8631
- abortPipeEarly: info == null ? void 0 : info.abortPipeEarly,
8632
- skipPipe: info == null ? void 0 : info.skipPipe
8633
- }
8634
- ]
8635
- };
8119
+ function b(i2) {
8120
+ for (var t2 = i2.s; void 0 !== t2; t2 = t2.n)
8121
+ t2.S.U(t2);
8122
+ i2.x = void 0;
8123
+ i2.s = void 0;
8124
+ g(i2);
8636
8125
  }
8637
- function getDefault(schema) {
8638
- return typeof schema.default === "function" ? schema.default() : schema.default;
8126
+ function x(i2) {
8127
+ if (o$1 !== this)
8128
+ throw new Error("Out-of-order effect");
8129
+ w(this);
8130
+ o$1 = i2;
8131
+ this.f &= -2;
8132
+ if (8 & this.f)
8133
+ b(this);
8134
+ r$1();
8639
8135
  }
8640
- function any(pipe2) {
8641
- return {
8642
- type: "any",
8643
- async: false,
8644
- pipe: pipe2,
8645
- _parse(input, info) {
8646
- return executePipe(input, this.pipe, info, "any");
8647
- }
8648
- };
8136
+ function E(i2) {
8137
+ this.x = i2;
8138
+ this.u = void 0;
8139
+ this.s = void 0;
8140
+ this.o = void 0;
8141
+ this.f = 32;
8649
8142
  }
8650
- function array(item, arg2, arg3) {
8651
- const [message = "Invalid type", pipe2] = getDefaultArgs(arg2, arg3);
8652
- return {
8653
- type: "array",
8654
- async: false,
8655
- item,
8656
- message,
8657
- pipe: pipe2,
8658
- _parse(input, info) {
8659
- if (!Array.isArray(input)) {
8660
- return getSchemaIssues(info, "type", "array", this.message, input);
8661
- }
8662
- let issues;
8663
- const output = [];
8664
- for (let key = 0; key < input.length; key++) {
8665
- const value2 = input[key];
8666
- const result = this.item._parse(value2, info);
8667
- if (result.issues) {
8668
- const pathItem = {
8669
- type: "array",
8670
- input,
8671
- key,
8672
- value: value2
8673
- };
8674
- for (const issue of result.issues) {
8675
- if (issue.path) {
8676
- issue.path.unshift(pathItem);
8677
- } else {
8678
- issue.path = [pathItem];
8679
- }
8680
- issues == null ? void 0 : issues.push(issue);
8681
- }
8682
- if (!issues) {
8683
- issues = result.issues;
8684
- }
8685
- if (info == null ? void 0 : info.abortEarly) {
8686
- break;
8687
- }
8688
- } else {
8689
- output.push(result.output);
8690
- }
8691
- }
8692
- return issues ? getIssues(issues) : executePipe(output, this.pipe, info, "array");
8693
- }
8694
- };
8143
+ E.prototype.c = function() {
8144
+ var i2 = this.S();
8145
+ try {
8146
+ if (8 & this.f)
8147
+ return;
8148
+ if (void 0 === this.x)
8149
+ return;
8150
+ var t2 = this.x();
8151
+ if ("function" == typeof t2)
8152
+ this.u = t2;
8153
+ } finally {
8154
+ i2();
8155
+ }
8156
+ };
8157
+ E.prototype.S = function() {
8158
+ if (1 & this.f)
8159
+ i();
8160
+ this.f |= 1;
8161
+ this.f &= -9;
8162
+ g(this);
8163
+ y(this);
8164
+ v++;
8165
+ var t2 = o$1;
8166
+ o$1 = this;
8167
+ return x.bind(this, t2);
8168
+ };
8169
+ E.prototype.N = function() {
8170
+ if (!(2 & this.f)) {
8171
+ this.f |= 2;
8172
+ this.o = f;
8173
+ f = this;
8174
+ }
8175
+ };
8176
+ E.prototype.d = function() {
8177
+ this.f |= 8;
8178
+ if (!(1 & this.f))
8179
+ b(this);
8180
+ };
8181
+ function O(i2) {
8182
+ var t2 = new E(i2);
8183
+ try {
8184
+ t2.c();
8185
+ } catch (i3) {
8186
+ t2.d();
8187
+ throw i3;
8188
+ }
8189
+ return t2.d.bind(t2);
8695
8190
  }
8696
- function boolean(arg1, arg2) {
8697
- const [message = "Invalid type", pipe2] = getDefaultArgs(arg1, arg2);
8698
- return {
8699
- type: "boolean",
8700
- async: false,
8701
- message,
8702
- pipe: pipe2,
8703
- _parse(input, info) {
8704
- if (typeof input !== "boolean") {
8705
- return getSchemaIssues(info, "type", "boolean", this.message, input);
8706
- }
8707
- return executePipe(input, this.pipe, info, "boolean");
8708
- }
8709
- };
8191
+ var s;
8192
+ function l(n2, i2) {
8193
+ l$4[n2] = i2.bind(null, l$4[n2] || function() {
8194
+ });
8710
8195
  }
8711
- function number(arg1, arg2) {
8712
- const [message = "Invalid type", pipe2] = getDefaultArgs(arg1, arg2);
8713
- return {
8714
- type: "number",
8715
- async: false,
8716
- message,
8717
- pipe: pipe2,
8718
- _parse(input, info) {
8719
- if (typeof input !== "number" || isNaN(input)) {
8720
- return getSchemaIssues(info, "type", "number", this.message, input);
8721
- }
8722
- return executePipe(input, this.pipe, info, "number");
8723
- }
8724
- };
8196
+ function d(n2) {
8197
+ if (s)
8198
+ s();
8199
+ s = n2 && n2.S();
8725
8200
  }
8726
- function object(entries, arg2, arg3, arg4) {
8727
- const [rest, message = "Invalid type", pipe2] = getRestAndDefaultArgs(arg2, arg3, arg4);
8728
- let cachedEntries;
8729
- return {
8730
- type: "object",
8731
- async: false,
8732
- entries,
8733
- rest,
8734
- message,
8735
- pipe: pipe2,
8736
- _parse(input, info) {
8737
- if (!input || typeof input !== "object") {
8738
- return getSchemaIssues(info, "type", "object", this.message, input);
8201
+ function p(n2) {
8202
+ var r2 = this, f2 = n2.data, o2 = useSignal(f2);
8203
+ o2.value = f2;
8204
+ var e2 = F$1(function() {
8205
+ var n3 = r2.__v;
8206
+ while (n3 = n3.__)
8207
+ if (n3.__c) {
8208
+ n3.__c.__$f |= 4;
8209
+ break;
8739
8210
  }
8740
- cachedEntries = cachedEntries || Object.entries(this.entries);
8741
- let issues;
8742
- const output = {};
8743
- for (const [key, schema] of cachedEntries) {
8744
- const value2 = input[key];
8745
- const result = schema._parse(value2, info);
8746
- if (result.issues) {
8747
- const pathItem = {
8748
- type: "object",
8749
- input,
8750
- key,
8751
- value: value2
8752
- };
8753
- for (const issue of result.issues) {
8754
- if (issue.path) {
8755
- issue.path.unshift(pathItem);
8756
- } else {
8757
- issue.path = [pathItem];
8758
- }
8759
- issues == null ? void 0 : issues.push(issue);
8760
- }
8761
- if (!issues) {
8762
- issues = result.issues;
8763
- }
8764
- if (info == null ? void 0 : info.abortEarly) {
8765
- break;
8766
- }
8767
- } else if (result.output !== void 0 || key in input) {
8768
- output[key] = result.output;
8211
+ r2.__$u.c = function() {
8212
+ var n4;
8213
+ if (!t$3(e2.peek()) && 3 === (null == (n4 = r2.base) ? void 0 : n4.nodeType))
8214
+ r2.base.data = e2.peek();
8215
+ else {
8216
+ r2.__$f |= 1;
8217
+ r2.setState({});
8218
+ }
8219
+ };
8220
+ return p$1(function() {
8221
+ var n4 = o2.value.value;
8222
+ return 0 === n4 ? 0 : true === n4 ? "" : n4 || "";
8223
+ });
8224
+ }, []);
8225
+ return e2.value;
8226
+ }
8227
+ p.displayName = "_st";
8228
+ Object.defineProperties(d$1.prototype, { constructor: { configurable: true, value: void 0 }, type: { configurable: true, value: p }, props: { configurable: true, get: function() {
8229
+ return { data: this };
8230
+ } }, __b: { configurable: true, value: 1 } });
8231
+ l("__b", function(n2, r2) {
8232
+ if ("string" == typeof r2.type) {
8233
+ var i2, t2 = r2.props;
8234
+ for (var f2 in t2)
8235
+ if ("children" !== f2) {
8236
+ var o2 = t2[f2];
8237
+ if (o2 instanceof d$1) {
8238
+ if (!i2)
8239
+ r2.__np = i2 = {};
8240
+ i2[f2] = o2;
8241
+ t2[f2] = o2.peek();
8769
8242
  }
8770
8243
  }
8771
- if (this.rest && !((info == null ? void 0 : info.abortEarly) && issues)) {
8772
- for (const key in input) {
8773
- if (!(key in this.entries)) {
8774
- const value2 = input[key];
8775
- const result = this.rest._parse(value2, info);
8776
- if (result.issues) {
8777
- const pathItem = {
8778
- type: "object",
8779
- input,
8780
- key,
8781
- value: value2
8782
- };
8783
- for (const issue of result.issues) {
8784
- if (issue.path) {
8785
- issue.path.unshift(pathItem);
8786
- } else {
8787
- issue.path = [pathItem];
8788
- }
8789
- issues == null ? void 0 : issues.push(issue);
8790
- }
8791
- if (!issues) {
8792
- issues = result.issues;
8793
- }
8794
- if (info == null ? void 0 : info.abortEarly) {
8795
- break;
8796
- }
8797
- } else {
8798
- output[key] = result.output;
8799
- }
8244
+ }
8245
+ n2(r2);
8246
+ });
8247
+ l("__r", function(n2, r2) {
8248
+ d();
8249
+ var i2, t2 = r2.__c;
8250
+ if (t2) {
8251
+ t2.__$f &= -2;
8252
+ if (void 0 === (i2 = t2.__$u))
8253
+ t2.__$u = i2 = function(n3) {
8254
+ var r3;
8255
+ O(function() {
8256
+ r3 = this;
8257
+ });
8258
+ r3.c = function() {
8259
+ t2.__$f |= 1;
8260
+ t2.setState({});
8261
+ };
8262
+ return r3;
8263
+ }();
8264
+ }
8265
+ d(i2);
8266
+ n2(r2);
8267
+ });
8268
+ l("__e", function(n2, r2, i2, t2) {
8269
+ d();
8270
+ n2(r2, i2, t2);
8271
+ });
8272
+ l("diffed", function(n2, r2) {
8273
+ d();
8274
+ var i2;
8275
+ if ("string" == typeof r2.type && (i2 = r2.__e)) {
8276
+ var t2 = r2.__np, f2 = r2.props;
8277
+ if (t2) {
8278
+ var o2 = i2.U;
8279
+ if (o2)
8280
+ for (var e2 in o2) {
8281
+ var u2 = o2[e2];
8282
+ if (void 0 !== u2 && !(e2 in t2)) {
8283
+ u2.d();
8284
+ o2[e2] = void 0;
8800
8285
  }
8801
8286
  }
8287
+ else
8288
+ i2.U = o2 = {};
8289
+ for (var a2 in t2) {
8290
+ var c2 = o2[a2], s2 = t2[a2];
8291
+ if (void 0 === c2) {
8292
+ c2 = _$1(i2, a2, s2, f2);
8293
+ o2[a2] = c2;
8294
+ } else
8295
+ c2.o(s2, f2);
8802
8296
  }
8803
- return issues ? getIssues(issues) : executePipe(
8804
- output,
8805
- this.pipe,
8806
- info,
8807
- "object"
8808
- );
8809
8297
  }
8810
- };
8298
+ }
8299
+ n2(r2);
8300
+ });
8301
+ function _$1(n2, r2, i2, t2) {
8302
+ var f2 = r2 in n2 && void 0 === n2.ownerSVGElement, o2 = a(i2);
8303
+ return { o: function(n3, r3) {
8304
+ o2.value = n3;
8305
+ t2 = r3;
8306
+ }, d: O(function() {
8307
+ var i3 = o2.value.value;
8308
+ if (t2[r2] !== i3) {
8309
+ t2[r2] = i3;
8310
+ if (f2)
8311
+ n2[r2] = i3;
8312
+ else if (i3)
8313
+ n2.setAttribute(r2, i3);
8314
+ else
8315
+ n2.removeAttribute(r2);
8316
+ }
8317
+ }) };
8811
8318
  }
8812
- function optional(wrapped, default_) {
8813
- return {
8814
- type: "optional",
8815
- async: false,
8816
- wrapped,
8817
- default: default_,
8818
- _parse(input, info) {
8819
- if (input === void 0) {
8820
- const override = getDefault(this);
8821
- if (override === void 0) {
8822
- return getOutput(input);
8319
+ l("unmount", function(n2, r2) {
8320
+ if ("string" == typeof r2.type) {
8321
+ var i2 = r2.__e;
8322
+ if (i2) {
8323
+ var t2 = i2.U;
8324
+ if (t2) {
8325
+ i2.U = void 0;
8326
+ for (var f2 in t2) {
8327
+ var o2 = t2[f2];
8328
+ if (o2)
8329
+ o2.d();
8823
8330
  }
8824
- input = override;
8825
8331
  }
8826
- return this.wrapped._parse(input, info);
8827
8332
  }
8828
- };
8829
- }
8830
- function picklist(options, message = "Invalid type") {
8831
- return {
8832
- type: "picklist",
8833
- async: false,
8834
- options,
8835
- message,
8836
- _parse(input, info) {
8837
- if (!this.options.includes(input)) {
8838
- return getSchemaIssues(info, "type", "picklist", this.message, input);
8333
+ } else {
8334
+ var e2 = r2.__c;
8335
+ if (e2) {
8336
+ var u2 = e2.__$u;
8337
+ if (u2) {
8338
+ e2.__$u = void 0;
8339
+ u2.d();
8839
8340
  }
8840
- return getOutput(input);
8841
8341
  }
8842
- };
8342
+ }
8343
+ n2(r2);
8344
+ });
8345
+ l("__h", function(n2, r2, i2, t2) {
8346
+ if (t2 < 3 || 9 === t2)
8347
+ r2.__$f |= 2;
8348
+ n2(r2, i2, t2);
8349
+ });
8350
+ b$3.prototype.shouldComponentUpdate = function(n2, r2) {
8351
+ var i2 = this.__$u;
8352
+ if (!(i2 && void 0 !== i2.s || 4 & this.__$f))
8353
+ return true;
8354
+ if (3 & this.__$f)
8355
+ return true;
8356
+ for (var t2 in r2)
8357
+ return true;
8358
+ for (var f2 in n2)
8359
+ if ("__source" !== f2 && n2[f2] !== this.props[f2])
8360
+ return true;
8361
+ for (var o2 in this.props)
8362
+ if (!(o2 in n2))
8363
+ return true;
8364
+ return false;
8365
+ };
8366
+ function useSignal(n2) {
8367
+ return F$1(function() {
8368
+ return a(n2);
8369
+ }, []);
8843
8370
  }
8844
- function string(arg1, arg2) {
8845
- const [message = "Invalid type", pipe2] = getDefaultArgs(arg1, arg2);
8846
- return {
8847
- type: "string",
8848
- async: false,
8849
- message,
8850
- pipe: pipe2,
8851
- _parse(input, info) {
8852
- if (typeof input !== "string") {
8853
- return getSchemaIssues(info, "type", "string", this.message, input);
8854
- }
8855
- return executePipe(input, this.pipe, info, "string");
8856
- }
8857
- };
8371
+ const instanceOfAny = (object2, constructors) => constructors.some((c2) => object2 instanceof c2);
8372
+ let idbProxyableTypes;
8373
+ let cursorAdvanceMethods;
8374
+ function getIdbProxyableTypes() {
8375
+ return idbProxyableTypes || (idbProxyableTypes = [
8376
+ IDBDatabase,
8377
+ IDBObjectStore,
8378
+ IDBIndex,
8379
+ IDBCursor,
8380
+ IDBTransaction
8381
+ ]);
8858
8382
  }
8859
- function getRecordArgs(arg1, arg2, arg3, arg4) {
8860
- if (typeof arg2 === "object" && !Array.isArray(arg2)) {
8861
- const [message2, pipe22] = getDefaultArgs(arg3, arg4);
8862
- return [arg1, arg2, message2, pipe22];
8863
- }
8864
- const [message, pipe2] = getDefaultArgs(
8865
- arg2,
8866
- arg3
8867
- );
8868
- return [string(), arg1, message, pipe2];
8383
+ function getCursorAdvanceMethods() {
8384
+ return cursorAdvanceMethods || (cursorAdvanceMethods = [
8385
+ IDBCursor.prototype.advance,
8386
+ IDBCursor.prototype.continue,
8387
+ IDBCursor.prototype.continuePrimaryKey
8388
+ ]);
8869
8389
  }
8870
- var BLOCKED_KEYS = ["__proto__", "prototype", "constructor"];
8871
- function record(arg1, arg2, arg3, arg4) {
8872
- const [key, value2, message = "Invalid type", pipe2] = getRecordArgs(arg1, arg2, arg3, arg4);
8873
- return {
8874
- type: "record",
8875
- async: false,
8876
- key,
8877
- value: value2,
8878
- message,
8879
- pipe: pipe2,
8880
- _parse(input, info) {
8881
- if (!input || typeof input !== "object") {
8882
- return getSchemaIssues(info, "type", "record", this.message, input);
8883
- }
8884
- let issues;
8885
- const output = {};
8886
- for (const [inputKey, inputValue] of Object.entries(input)) {
8887
- if (!BLOCKED_KEYS.includes(inputKey)) {
8888
- let pathItem;
8889
- const keyResult = this.key._parse(inputKey, {
8890
- origin: "key",
8891
- abortEarly: info == null ? void 0 : info.abortEarly,
8892
- abortPipeEarly: info == null ? void 0 : info.abortPipeEarly,
8893
- skipPipe: info == null ? void 0 : info.skipPipe
8894
- });
8895
- if (keyResult.issues) {
8896
- pathItem = {
8897
- type: "record",
8898
- input,
8899
- key: inputKey,
8900
- value: inputValue
8901
- };
8902
- for (const issue of keyResult.issues) {
8903
- issue.path = [pathItem];
8904
- issues == null ? void 0 : issues.push(issue);
8905
- }
8906
- if (!issues) {
8907
- issues = keyResult.issues;
8908
- }
8909
- if (info == null ? void 0 : info.abortEarly) {
8910
- break;
8911
- }
8912
- }
8913
- const valueResult = this.value._parse(inputValue, info);
8914
- if (valueResult.issues) {
8915
- pathItem = pathItem || {
8916
- type: "record",
8917
- input,
8918
- key: inputKey,
8919
- value: inputValue
8920
- };
8921
- for (const issue of valueResult.issues) {
8922
- if (issue.path) {
8923
- issue.path.unshift(pathItem);
8924
- } else {
8925
- issue.path = [pathItem];
8926
- }
8927
- issues == null ? void 0 : issues.push(issue);
8928
- }
8929
- if (!issues) {
8930
- issues = valueResult.issues;
8931
- }
8932
- if (info == null ? void 0 : info.abortEarly) {
8933
- break;
8934
- }
8935
- }
8936
- if (!keyResult.issues && !valueResult.issues) {
8937
- output[keyResult.output] = valueResult.output;
8938
- }
8939
- }
8390
+ const transactionDoneMap = /* @__PURE__ */ new WeakMap();
8391
+ const transformCache = /* @__PURE__ */ new WeakMap();
8392
+ const reverseTransformCache = /* @__PURE__ */ new WeakMap();
8393
+ function promisifyRequest(request) {
8394
+ const promise = new Promise((resolve, reject) => {
8395
+ const unlisten = () => {
8396
+ request.removeEventListener("success", success);
8397
+ request.removeEventListener("error", error);
8398
+ };
8399
+ const success = () => {
8400
+ resolve(wrap(request.result));
8401
+ unlisten();
8402
+ };
8403
+ const error = () => {
8404
+ reject(request.error);
8405
+ unlisten();
8406
+ };
8407
+ request.addEventListener("success", success);
8408
+ request.addEventListener("error", error);
8409
+ });
8410
+ reverseTransformCache.set(promise, request);
8411
+ return promise;
8412
+ }
8413
+ function cacheDonePromiseForTransaction(tx) {
8414
+ if (transactionDoneMap.has(tx))
8415
+ return;
8416
+ const done = new Promise((resolve, reject) => {
8417
+ const unlisten = () => {
8418
+ tx.removeEventListener("complete", complete);
8419
+ tx.removeEventListener("error", error);
8420
+ tx.removeEventListener("abort", error);
8421
+ };
8422
+ const complete = () => {
8423
+ resolve();
8424
+ unlisten();
8425
+ };
8426
+ const error = () => {
8427
+ reject(tx.error || new DOMException("AbortError", "AbortError"));
8428
+ unlisten();
8429
+ };
8430
+ tx.addEventListener("complete", complete);
8431
+ tx.addEventListener("error", error);
8432
+ tx.addEventListener("abort", error);
8433
+ });
8434
+ transactionDoneMap.set(tx, done);
8435
+ }
8436
+ let idbProxyTraps = {
8437
+ get(target, prop, receiver) {
8438
+ if (target instanceof IDBTransaction) {
8439
+ if (prop === "done")
8440
+ return transactionDoneMap.get(target);
8441
+ if (prop === "store") {
8442
+ return receiver.objectStoreNames[1] ? void 0 : receiver.objectStore(receiver.objectStoreNames[0]);
8940
8443
  }
8941
- return issues ? getIssues(issues) : executePipe(
8942
- output,
8943
- this.pipe,
8944
- info,
8945
- "record"
8946
- );
8947
8444
  }
8948
- };
8445
+ return wrap(target[prop]);
8446
+ },
8447
+ set(target, prop, value) {
8448
+ target[prop] = value;
8449
+ return true;
8450
+ },
8451
+ has(target, prop) {
8452
+ if (target instanceof IDBTransaction && (prop === "done" || prop === "store")) {
8453
+ return true;
8454
+ }
8455
+ return prop in target;
8456
+ }
8457
+ };
8458
+ function replaceTraps(callback) {
8459
+ idbProxyTraps = callback(idbProxyTraps);
8949
8460
  }
8950
- function parse(schema, input, info) {
8951
- const result = schema._parse(input, info);
8952
- if (result.issues) {
8953
- throw new ValiError(result.issues);
8461
+ function wrapFunction(func) {
8462
+ if (getCursorAdvanceMethods().includes(func)) {
8463
+ return function(...args) {
8464
+ func.apply(unwrap(this), args);
8465
+ return wrap(this.request);
8466
+ };
8954
8467
  }
8955
- return result.output;
8468
+ return function(...args) {
8469
+ return wrap(func.apply(unwrap(this), args));
8470
+ };
8956
8471
  }
8957
- async function parseAsync(schema, input, info) {
8958
- const result = await schema._parse(input, info);
8959
- if (result.issues) {
8960
- throw new ValiError(result.issues);
8472
+ function transformCachableValue(value) {
8473
+ if (typeof value === "function")
8474
+ return wrapFunction(value);
8475
+ if (value instanceof IDBTransaction)
8476
+ cacheDonePromiseForTransaction(value);
8477
+ if (instanceOfAny(value, getIdbProxyableTypes()))
8478
+ return new Proxy(value, idbProxyTraps);
8479
+ return value;
8480
+ }
8481
+ function wrap(value) {
8482
+ if (value instanceof IDBRequest)
8483
+ return promisifyRequest(value);
8484
+ if (transformCache.has(value))
8485
+ return transformCache.get(value);
8486
+ const newValue = transformCachableValue(value);
8487
+ if (newValue !== value) {
8488
+ transformCache.set(value, newValue);
8489
+ reverseTransformCache.set(newValue, value);
8490
+ }
8491
+ return newValue;
8492
+ }
8493
+ const unwrap = (value) => reverseTransformCache.get(value);
8494
+ function openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {
8495
+ const request = indexedDB.open(name, version);
8496
+ const openPromise = wrap(request);
8497
+ if (upgrade) {
8498
+ request.addEventListener("upgradeneeded", (event) => {
8499
+ upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);
8500
+ });
8961
8501
  }
8962
- return result.output;
8502
+ if (blocked) {
8503
+ request.addEventListener("blocked", (event) => blocked(
8504
+ // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
8505
+ event.oldVersion,
8506
+ event.newVersion,
8507
+ event
8508
+ ));
8509
+ }
8510
+ openPromise.then((db2) => {
8511
+ if (terminated)
8512
+ db2.addEventListener("close", () => terminated());
8513
+ if (blocking) {
8514
+ db2.addEventListener("versionchange", (event) => blocking(event.oldVersion, event.newVersion, event));
8515
+ }
8516
+ }).catch(() => {
8517
+ });
8518
+ return openPromise;
8963
8519
  }
8964
- function transform(schema, action, arg1) {
8965
- return {
8966
- ...schema,
8967
- _parse(input, info) {
8968
- const result = schema._parse(input, info);
8969
- if (result.issues) {
8970
- return result;
8971
- }
8972
- const output = action(result.output);
8973
- if (arg1 && !Array.isArray(arg1)) {
8974
- return arg1._parse(output, info);
8975
- }
8976
- return executePipe(output, arg1, info, typeof output);
8977
- }
8520
+ const readMethods = ["get", "getKey", "getAll", "getAllKeys", "count"];
8521
+ const writeMethods = ["put", "add", "delete", "clear"];
8522
+ const cachedMethods = /* @__PURE__ */ new Map();
8523
+ function getMethod(target, prop) {
8524
+ if (!(target instanceof IDBDatabase && !(prop in target) && typeof prop === "string")) {
8525
+ return;
8526
+ }
8527
+ if (cachedMethods.get(prop))
8528
+ return cachedMethods.get(prop);
8529
+ const targetFuncName = prop.replace(/FromIndex$/, "");
8530
+ const useIndex = prop !== targetFuncName;
8531
+ const isWrite = writeMethods.includes(targetFuncName);
8532
+ if (
8533
+ // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
8534
+ !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) || !(isWrite || readMethods.includes(targetFuncName))
8535
+ ) {
8536
+ return;
8537
+ }
8538
+ const method = async function(storeName, ...args) {
8539
+ const tx = this.transaction(storeName, isWrite ? "readwrite" : "readonly");
8540
+ let target2 = tx.store;
8541
+ if (useIndex)
8542
+ target2 = target2.index(args.shift());
8543
+ return (await Promise.all([
8544
+ target2[targetFuncName](...args),
8545
+ isWrite && tx.done
8546
+ ]))[0];
8978
8547
  };
8548
+ cachedMethods.set(prop, method);
8549
+ return method;
8979
8550
  }
8980
- var EMAIL_REGEX = /^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;
8981
- function email(message = "Invalid email") {
8982
- return {
8983
- type: "email",
8984
- async: false,
8985
- message,
8986
- requirement: EMAIL_REGEX,
8987
- _parse(input) {
8988
- return !this.requirement.test(input) ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
8551
+ replaceTraps((oldTraps) => ({
8552
+ ...oldTraps,
8553
+ get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),
8554
+ has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop)
8555
+ }));
8556
+ const advanceMethodProps = ["continue", "continuePrimaryKey", "advance"];
8557
+ const methodMap = {};
8558
+ const advanceResults = /* @__PURE__ */ new WeakMap();
8559
+ const ittrProxiedCursorToOriginalProxy = /* @__PURE__ */ new WeakMap();
8560
+ const cursorIteratorTraps = {
8561
+ get(target, prop) {
8562
+ if (!advanceMethodProps.includes(prop))
8563
+ return target[prop];
8564
+ let cachedFunc = methodMap[prop];
8565
+ if (!cachedFunc) {
8566
+ cachedFunc = methodMap[prop] = function(...args) {
8567
+ advanceResults.set(this, ittrProxiedCursorToOriginalProxy.get(this)[prop](...args));
8568
+ };
8989
8569
  }
8990
- };
8570
+ return cachedFunc;
8571
+ }
8572
+ };
8573
+ async function* iterate(...args) {
8574
+ let cursor = this;
8575
+ if (!(cursor instanceof IDBCursor)) {
8576
+ cursor = await cursor.openCursor(...args);
8577
+ }
8578
+ if (!cursor)
8579
+ return;
8580
+ cursor = cursor;
8581
+ const proxiedCursor = new Proxy(cursor, cursorIteratorTraps);
8582
+ ittrProxiedCursorToOriginalProxy.set(proxiedCursor, cursor);
8583
+ reverseTransformCache.set(proxiedCursor, unwrap(cursor));
8584
+ while (cursor) {
8585
+ yield proxiedCursor;
8586
+ cursor = await (advanceResults.get(proxiedCursor) || cursor.continue());
8587
+ advanceResults.delete(proxiedCursor);
8588
+ }
8589
+ }
8590
+ function isIteratorProp(target, prop) {
8591
+ return prop === Symbol.asyncIterator && instanceOfAny(target, [IDBIndex, IDBObjectStore, IDBCursor]) || prop === "iterate" && instanceOfAny(target, [IDBIndex, IDBObjectStore]);
8592
+ }
8593
+ replaceTraps((oldTraps) => ({
8594
+ ...oldTraps,
8595
+ get(target, prop, receiver) {
8596
+ if (isIteratorProp(target, prop))
8597
+ return iterate;
8598
+ return oldTraps.get(target, prop, receiver);
8599
+ },
8600
+ has(target, prop) {
8601
+ return isIteratorProp(target, prop) || oldTraps.has(target, prop);
8602
+ }
8603
+ }));
8604
+ const kbToReadableSize = (kb) => N(kb).with(_$3.number.lte(1e3), () => `${Math.round(kb)}KB`).with(_$3.number.lt(1e3 * 10), () => `${(kb / 1e3).toFixed(1)}MB`).otherwise(() => `${Math.round(kb / 1e3)}MB`);
8605
+ const getHeadOrThrow = (nodes) => {
8606
+ const head = nodes.find((n2) => n2.isHead);
8607
+ if (!head)
8608
+ throw new Error("No head node found");
8609
+ return head;
8610
+ };
8611
+ const getFlowSubmissionsPayload = (submissions) => {
8612
+ const payload = Object.entries(submissions).reduce((acc, [key, submission]) => {
8613
+ acc[key] = submission.value;
8614
+ return acc;
8615
+ }, {});
8616
+ return payload;
8617
+ };
8618
+ const isSubmissionOfType = (type) => (submission) => {
8619
+ if (!submission)
8620
+ return false;
8621
+ return submission.type === type;
8622
+ };
8623
+ class AbortedError extends Error {
8624
+ constructor() {
8625
+ super("Aborted");
8626
+ }
8991
8627
  }
8992
- function maxLength(requirement, message = "Invalid length") {
8993
- return {
8994
- type: "max_length",
8995
- async: false,
8996
- message,
8997
- requirement,
8998
- _parse(input) {
8999
- return input.length > this.requirement ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
9000
- }
8628
+ function debounce(func, timeout = 300) {
8629
+ let timer = void 0;
8630
+ return (...args) => {
8631
+ clearTimeout(timer);
8632
+ timer = setTimeout(() => {
8633
+ func.apply(this, args);
8634
+ }, timeout);
9001
8635
  };
9002
8636
  }
9003
- function minLength(requirement, message = "Invalid length") {
8637
+ const db = typeof window === "undefined" ? void 0 : openDB("inploi-chatbot", 2, {
8638
+ upgrade(db2) {
8639
+ try {
8640
+ db2.deleteObjectStore("state");
8641
+ } catch {
8642
+ }
8643
+ db2.createObjectStore("state");
8644
+ }
8645
+ });
8646
+ const idb = {
8647
+ getStateData: async (flow, flowKeys) => {
8648
+ var _a;
8649
+ const key = getCacheKey({
8650
+ ...flow,
8651
+ flowKeys
8652
+ });
8653
+ return (_a = await db) == null ? void 0 : _a.get("state", key);
8654
+ },
8655
+ setStateData: debounce(async (params) => {
8656
+ var _a;
8657
+ const key = getCacheKey(params);
8658
+ return (_a = await db) == null ? void 0 : _a.put("state", params.data, key);
8659
+ }, 1e3)
8660
+ };
8661
+ const getChatbotFlowProgress = (nodes, node, onCalculate, stepsMade = 0) => {
8662
+ if (!node.nextId) {
8663
+ onCalculate(node.id, {
8664
+ stepsMade,
8665
+ remainingSteps: 0
8666
+ });
8667
+ return {
8668
+ stepsMade,
8669
+ remainingSteps: 0
8670
+ };
8671
+ }
8672
+ const nextNode = nodes.find((newNode) => newNode.id === node.nextId);
8673
+ if (nextNode === void 0) {
8674
+ return {
8675
+ stepsMade,
8676
+ remainingSteps: 0
8677
+ };
8678
+ }
8679
+ const branchId = node.type === "if-block" ? node.branchId : void 0;
8680
+ const branchNode = nodes.find((node2) => node2.id === branchId);
8681
+ const increment = node.type.includes("question") ? 1 : 0;
8682
+ if (branchNode) {
8683
+ const remainingSteps2 = increment + Math.max(getChatbotFlowProgress(nodes, nextNode, onCalculate, stepsMade + increment).remainingSteps, getChatbotFlowProgress(nodes, branchNode, onCalculate, stepsMade + increment).remainingSteps);
8684
+ onCalculate(node.id, {
8685
+ stepsMade,
8686
+ remainingSteps: remainingSteps2
8687
+ });
8688
+ return {
8689
+ stepsMade,
8690
+ remainingSteps: remainingSteps2
8691
+ };
8692
+ }
8693
+ const remainingSteps = increment + getChatbotFlowProgress(nodes, nextNode, onCalculate, stepsMade + increment).remainingSteps;
8694
+ onCalculate(node.id, {
8695
+ stepsMade,
8696
+ remainingSteps
8697
+ });
9004
8698
  return {
9005
- type: "min_length",
9006
- async: false,
9007
- message,
9008
- requirement,
9009
- _parse(input) {
9010
- return input.length < this.requirement ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
9011
- }
8699
+ stepsMade,
8700
+ remainingSteps
9012
8701
  };
9013
- }
9014
- function regex(requirement, message = "Invalid regex") {
9015
- return {
9016
- type: "regex",
9017
- async: false,
9018
- message,
9019
- requirement,
9020
- _parse(input) {
9021
- return !this.requirement.test(input) ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
9022
- }
8702
+ };
8703
+ const getNodesProgress = (nodes) => {
8704
+ const nodeIdToProgress = {};
8705
+ const firstNode = nodes.find((node) => node.isHead);
8706
+ if (!firstNode)
8707
+ return nodeIdToProgress;
8708
+ getChatbotFlowProgress(nodes, firstNode, (nodeId, progress2) => {
8709
+ nodeIdToProgress[nodeId] = progress2;
8710
+ });
8711
+ return nodeIdToProgress;
8712
+ };
8713
+ const getCacheKey = (flow) => [...flow.flowKeys, flow.id, flow.version].join("/");
8714
+ const currentFlow = a({
8715
+ state: "idle"
8716
+ });
8717
+ const updateFlowState = (updateFn) => {
8718
+ const {
8719
+ state,
8720
+ flow
8721
+ } = currentFlow.value;
8722
+ if (state !== "loaded")
8723
+ return;
8724
+ invariant$1(flow, "No flow to update");
8725
+ const newData = updateFn(flow.data);
8726
+ flow.data = newData;
8727
+ currentFlow.value = {
8728
+ state,
8729
+ flow
9023
8730
  };
9024
- }
9025
- function url(message = "Invalid URL") {
9026
- return {
9027
- type: "url",
9028
- async: false,
9029
- message,
9030
- requirement(input) {
9031
- try {
9032
- new URL(input);
9033
- return true;
9034
- } catch {
9035
- return false;
8731
+ idb.setStateData(flow);
8732
+ };
8733
+ const store = {
8734
+ current$: currentFlow,
8735
+ viewState$: a("maximised"),
8736
+ inputHeight$: a(53),
8737
+ startFlow: async ({
8738
+ flow,
8739
+ context,
8740
+ flowKeys,
8741
+ title
8742
+ }) => {
8743
+ const data = await idb.getStateData(flow, flowKeys) ?? initialiseFlowStateData();
8744
+ const startedFlow = {
8745
+ data,
8746
+ startedAt: /* @__PURE__ */ new Date(),
8747
+ nodeIdToProgress: getNodesProgress(flow.nodes),
8748
+ flowKeys,
8749
+ id: flow.id,
8750
+ version: flow.version,
8751
+ nodes: flow.nodes,
8752
+ context,
8753
+ title
8754
+ };
8755
+ currentFlow.value = {
8756
+ state: "loaded",
8757
+ flow: startedFlow
8758
+ };
8759
+ idb.setStateData(startedFlow);
8760
+ },
8761
+ cancelCurrentFlow: () => {
8762
+ currentFlow.value = {
8763
+ state: "idle"
8764
+ };
8765
+ },
8766
+ markAsFinished: () => updateFlowState((data) => ({
8767
+ ...data,
8768
+ isFinished: true
8769
+ })),
8770
+ setCurrentNodeId: (currentNodeId) => updateFlowState((data) => {
8771
+ data.nodeHistory.push(currentNodeId);
8772
+ return data;
8773
+ }),
8774
+ restart: () => {
8775
+ const {
8776
+ state,
8777
+ flow
8778
+ } = currentFlow.value;
8779
+ if (state !== "loaded")
8780
+ throw new Error("Flow cannot be restarted: not in valid state");
8781
+ const data = initialiseFlowStateData();
8782
+ currentFlow.value = {
8783
+ state,
8784
+ flow: {
8785
+ ...flow,
8786
+ data,
8787
+ startedAt: /* @__PURE__ */ new Date()
9036
8788
  }
9037
- },
9038
- _parse(input) {
9039
- return !this.requirement(input) ? getPipeIssues(this.type, this.message, input, this.requirement) : getOutput(input);
8789
+ };
8790
+ idb.setStateData(flow);
8791
+ },
8792
+ addMessage: (message, groupId) => {
8793
+ const newMessage = {
8794
+ ...message,
8795
+ groupId
8796
+ };
8797
+ return updateFlowState((data) => {
8798
+ data.messages.push(newMessage);
8799
+ return data;
8800
+ });
8801
+ },
8802
+ /** Removes messages from nodeId, all the messages that have the groupId passed, until it reaches one that doesn't */
8803
+ removeMessagesSentByNodeIds: (nodeIds) => {
8804
+ const {
8805
+ state,
8806
+ flow
8807
+ } = currentFlow.value;
8808
+ invariant$1(state === "loaded", "Application not loaded");
8809
+ const messages = flow.data.messages.filter((message) => !message.groupId || !nodeIds.includes(message.groupId));
8810
+ flow.data.messages = messages;
8811
+ idb.setStateData(flow);
8812
+ },
8813
+ setSubmission: (fieldKey, submission) => updateFlowState((data) => {
8814
+ if (submission === null) {
8815
+ delete data.submissions[fieldKey];
8816
+ } else {
8817
+ data.submissions[fieldKey] = submission;
9040
8818
  }
9041
- };
8819
+ return data;
8820
+ }),
8821
+ setInput: (input) => updateFlowState((data) => ({
8822
+ ...data,
8823
+ currentInput: input ?? null
8824
+ }))
8825
+ };
8826
+ const genRandomId = () => typeof crypto !== "undefined" && "randomUUID" in crypto ? crypto.randomUUID() : Math.random().toString(36).slice(2);
8827
+ const initialiseFlowStateData = () => ({
8828
+ messages: [],
8829
+ submissions: {},
8830
+ currentInput: null,
8831
+ nodeHistory: [],
8832
+ isFinished: false,
8833
+ sequence: 0,
8834
+ flowSessionId: genRandomId()
8835
+ });
8836
+ var _ = 0;
8837
+ function o(o2, e2, n2, t2, f2, l2) {
8838
+ var s2, u2, a2 = {};
8839
+ for (u2 in e2)
8840
+ "ref" == u2 ? s2 = e2[u2] : a2[u2] = e2[u2];
8841
+ var i2 = { type: o2, props: a2, key: n2, ref: s2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --_, __source: f2, __self: l2 };
8842
+ if ("function" == typeof o2 && (s2 = o2.defaultProps))
8843
+ for (u2 in s2)
8844
+ void 0 === a2[u2] && (a2[u2] = s2[u2]);
8845
+ return l$4.vnode && l$4.vnode(i2), i2;
8846
+ }
8847
+ const ChatError = ({
8848
+ message
8849
+ }) => {
8850
+ return o("div", {
8851
+ class: "flex flex-grow flex-col items-center justify-center",
8852
+ children: [o("svg", {
8853
+ class: "text-error-9 h-16 w-16",
8854
+ fill: "none",
8855
+ xmlns: "http://www.w3.org/2000/svg",
8856
+ "stroke-width": "2",
8857
+ stroke: "currentColor",
8858
+ "stroke-linecap": "round",
8859
+ viewBox: "0 0 96 96",
8860
+ children: [o("path", {
8861
+ d: "M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",
8862
+ fill: "#fff"
8863
+ }), o("path", {
8864
+ d: "M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"
8865
+ }), o("line", {
8866
+ x1: "36.7",
8867
+ y1: "39.3",
8868
+ x2: "44.8",
8869
+ y2: "47.4"
8870
+ }), o("line", {
8871
+ x1: "52.2",
8872
+ y1: "39.3",
8873
+ x2: "60.3",
8874
+ y2: "47.4"
8875
+ }), o("line", {
8876
+ x1: "44.7",
8877
+ y1: "39.2",
8878
+ x2: "36.6",
8879
+ y2: "47.3"
8880
+ }), o("line", {
8881
+ x1: "60.2",
8882
+ y1: "39.2",
8883
+ x2: "52.1",
8884
+ y2: "47.3"
8885
+ }), o("path", {
8886
+ d: "M38 56h19"
8887
+ })]
8888
+ }), o("div", {
8889
+ class: "flex flex-col gap-2 text-center",
8890
+ children: [o("p", {
8891
+ class: "text-error-11 font-bold",
8892
+ children: "Something unexpected happened"
8893
+ }), message && o("p", {
8894
+ class: "text-neutral-9 text-sm",
8895
+ children: message
8896
+ })]
8897
+ })]
8898
+ });
8899
+ };
8900
+ const LoadingIndicator = (props) => o("svg", {
8901
+ role: "img",
8902
+ viewBox: "0 0 24 24",
8903
+ ...props,
8904
+ children: [o("title", {
8905
+ children: "Loading"
8906
+ }), o("style", {
8907
+ children: `#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}`
8908
+ }), o("g", {
8909
+ id: "s1",
8910
+ transform: "translate(12,0)",
8911
+ children: o("g", {
8912
+ id: "s2",
8913
+ transform: "scale(0,0)",
8914
+ children: o("circle", {
8915
+ r: "6.5",
8916
+ transform: "translate(0,0)",
8917
+ fill: "currentColor"
8918
+ })
8919
+ })
8920
+ }), o("g", {
8921
+ id: "s3",
8922
+ transform: "translate(12,12)",
8923
+ children: o("g", {
8924
+ id: "s4",
8925
+ transform: "scale(1,1)",
8926
+ children: o("circle", {
8927
+ r: "6.5",
8928
+ transform: "translate(0,0)",
8929
+ fill: "currentColor"
8930
+ })
8931
+ })
8932
+ }), o("g", {
8933
+ id: "s5",
8934
+ transform: "translate(12,0)",
8935
+ children: o("g", {
8936
+ id: "s6",
8937
+ transform: "scale(0,0)",
8938
+ children: o("path", {
8939
+ d: "M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",
8940
+ transform: "translate(-6.5,-6.5)",
8941
+ "clip-rule": "evenodd",
8942
+ fill: "currentColor",
8943
+ "fill-rule": "evenodd"
8944
+ })
8945
+ })
8946
+ }), o("g", {
8947
+ id: "s7",
8948
+ transform: "translate(12,0)",
8949
+ children: o("g", {
8950
+ id: "s8",
8951
+ transform: "scale(0,0)",
8952
+ children: o("path", {
8953
+ d: "M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",
8954
+ transform: "translate(-6.5,-9.25)",
8955
+ fill: "currentColor"
8956
+ })
8957
+ })
8958
+ })]
8959
+ });
8960
+ const ChatLoading = () => o("div", {
8961
+ class: "flex flex-grow flex-col items-center justify-center",
8962
+ children: o(LoadingIndicator, {
8963
+ class: "text-neutral-6 h-8 w-8"
8964
+ })
8965
+ });
8966
+ function r(e2) {
8967
+ var t2, f2, n2 = "";
8968
+ if ("string" == typeof e2 || "number" == typeof e2)
8969
+ n2 += e2;
8970
+ else if ("object" == typeof e2)
8971
+ if (Array.isArray(e2))
8972
+ for (t2 = 0; t2 < e2.length; t2++)
8973
+ e2[t2] && (f2 = r(e2[t2])) && (n2 && (n2 += " "), n2 += f2);
8974
+ else
8975
+ for (t2 in e2)
8976
+ e2[t2] && (n2 && (n2 += " "), n2 += t2);
8977
+ return n2;
8978
+ }
8979
+ function clsx() {
8980
+ for (var e2, t2, f2 = 0, n2 = ""; f2 < arguments.length; )
8981
+ (e2 = arguments[f2++]) && (t2 = r(e2)) && (n2 && (n2 += " "), n2 += t2);
8982
+ return n2;
9042
8983
  }
9043
- const ApplicationSchema = object({
9044
- job: object({
9045
- id: coerce(string(), String),
9046
- title: string()
9047
- }),
8984
+ const optimisticProgress = (progress2) => {
8985
+ const prefilled = 0.1;
8986
+ const unitProgress = progress2 / 100;
8987
+ const concavity = 1.3;
8988
+ if (progress2 < 0)
8989
+ return "0%";
8990
+ if (progress2 > 100)
8991
+ return "100%";
8992
+ return `${Math.round((1 - (1 - prefilled) * Math.pow(1 - unitProgress, concavity)) * 100)}%`;
8993
+ };
8994
+ const StatusbarIconButton = ({
8995
+ class: className,
8996
+ children,
8997
+ ...props
8998
+ }) => {
8999
+ return o("button", {
9000
+ class: clsx("touch-hitbox text-interactive-copy hover:text-interactive-copy-hover active:text-interactive-copy-active hover:bg-interactive-bg-hover active:bg-interactive-bg-active fr relative rounded-full p-2 transition-all", className),
9001
+ ...props,
9002
+ children: o("svg", {
9003
+ class: "block",
9004
+ width: "16",
9005
+ height: "16",
9006
+ viewBox: "0 0 16 16",
9007
+ fill: "none",
9008
+ stroke: "currentColor",
9009
+ "stroke-width": "1.5",
9010
+ "stroke-linecap": "round",
9011
+ xmlns: "http://www.w3.org/2000/svg",
9012
+ children
9013
+ })
9014
+ });
9015
+ };
9016
+ const ProgressBar = () => {
9017
+ if (store.current$.value.state !== "loaded")
9018
+ return null;
9019
+ const nodeIdToProgress = store.current$.value.flow.nodeIdToProgress;
9020
+ const currentNodeId = store.current$.value.flow.data.nodeHistory.at(-1);
9021
+ if (currentNodeId === void 0)
9022
+ return null;
9023
+ const currentProgress = nodeIdToProgress[currentNodeId];
9024
+ if (currentProgress === void 0)
9025
+ return null;
9026
+ const percentage = 100 * (currentProgress.stepsMade / (currentProgress.remainingSteps + currentProgress.stepsMade));
9027
+ return o("div", {
9028
+ style: {
9029
+ width: optimisticProgress(percentage)
9030
+ },
9031
+ class: "bg-accent-9 h-[2px] transition-all duration-1000"
9032
+ });
9033
+ };
9034
+ const StatusBar = ({
9035
+ children
9036
+ }) => {
9037
+ const view = store.viewState$;
9038
+ return o(k$3, {
9039
+ children: o("header", {
9040
+ class: "ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",
9041
+ children: [o("div", {
9042
+ class: "flex h-[var(--header-height)] gap-2",
9043
+ children: [o("p", {
9044
+ id: "chatbot-status-bar",
9045
+ class: "sr-only",
9046
+ children
9047
+ }), o("button", {
9048
+ tabIndex: -1,
9049
+ "aria-hidden": true,
9050
+ onClick: () => {
9051
+ if (view.value === "minimised") {
9052
+ view.value = "maximised";
9053
+ } else {
9054
+ view.value = "minimised";
9055
+ }
9056
+ },
9057
+ class: "h-full flex-grow overflow-hidden px-4 py-1",
9058
+ children: o("p", {
9059
+ "aria-hidden": true,
9060
+ class: "text-neutral-12 truncate text-sm font-bold tracking-tight",
9061
+ children
9062
+ })
9063
+ }), o("div", {
9064
+ class: "flex flex-shrink-0 items-center gap-3 p-1.5",
9065
+ children: view.value === "minimised" ? o(k$3, {
9066
+ children: [o(StatusbarIconButton, {
9067
+ "aria-label": "Maximise job application",
9068
+ onClick: () => view.value = "maximised",
9069
+ children: o("path", {
9070
+ d: "M12.5 9.5L8 5L3.5 9.5"
9071
+ })
9072
+ }, "minmax"), o(StatusbarIconButton, {
9073
+ "aria-label": "Close application",
9074
+ onClick: store.cancelCurrentFlow,
9075
+ children: o("path", {
9076
+ d: "M12.5 6.5L8 11L3.5 6.5"
9077
+ })
9078
+ }, "close")]
9079
+ }) : o(k$3, {
9080
+ children: [store.current$.value.state === "loaded" && o(StatusbarIconButton, {
9081
+ "aria-label": "Restart",
9082
+ onClick: () => {
9083
+ store.restart();
9084
+ },
9085
+ children: [o("path", {
9086
+ d: "M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"
9087
+ }), o("path", {
9088
+ d: "M8 7L10 4.5L8 2.5"
9089
+ })]
9090
+ }, "restart"), o(StatusbarIconButton, {
9091
+ "aria-label": "Minimise application",
9092
+ onClick: () => view.value = "minimised",
9093
+ children: o("path", {
9094
+ d: "M12.5 6.5L8 11L3.5 6.5"
9095
+ })
9096
+ }, "minmax")]
9097
+ })
9098
+ })]
9099
+ }), o(ProgressBar, {})]
9100
+ })
9101
+ });
9102
+ };
9103
+ const ChatbotBody = M(() => Promise.resolve().then(() => require("./chatbot-body-a6d50df4.cjs")).then((module2) => module2.ChatbotBody));
9104
+ const MotionProvider = ({
9105
+ children
9106
+ }) => {
9107
+ return o(LazyMotion, {
9108
+ features: domAnimation,
9109
+ children
9110
+ });
9111
+ };
9112
+ const chatbotVariants = {
9113
+ closed: {
9114
+ y: "calc(100% + 1rem)",
9115
+ height: HEADER_HEIGHT
9116
+ },
9117
+ maximised: {
9118
+ y: 0,
9119
+ height: "75vh"
9120
+ },
9121
+ minimised: {
9122
+ y: 0,
9123
+ height: HEADER_HEIGHT
9124
+ }
9125
+ };
9126
+ const Chatbot = ({
9127
+ logger,
9128
+ apiClient,
9129
+ analytics
9130
+ }) => {
9131
+ const {
9132
+ state,
9133
+ flow,
9134
+ error
9135
+ } = store.current$.value;
9136
+ const view = store.viewState$.value;
9137
+ const isApplying = state !== "idle" && view === "maximised";
9138
+ const drawerRef = _$4(null);
9139
+ return o(MotionProvider, {
9140
+ children: o($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9, {
9141
+ open: isApplying,
9142
+ modal: isApplying,
9143
+ children: o(AnimatePresence, {
9144
+ children: [o($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff, {
9145
+ forceMount: true,
9146
+ asChild: true,
9147
+ children: isApplying && o(m$1.div, {
9148
+ initial: {
9149
+ opacity: 0
9150
+ },
9151
+ animate: {
9152
+ opacity: 1
9153
+ },
9154
+ exit: {
9155
+ opacity: 0
9156
+ },
9157
+ class: "bg-overlay fixed inset-0"
9158
+ })
9159
+ }, "bg"), o($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2, {
9160
+ forceMount: true,
9161
+ asChild: true,
9162
+ children: o(m$1.div, {
9163
+ ref: drawerRef,
9164
+ "aria-modal": "true",
9165
+ role: "dialog",
9166
+ "aria-labelledby": "chatbot-status-bar",
9167
+ variants: chatbotVariants,
9168
+ initial: "closed",
9169
+ animate: N({
9170
+ state,
9171
+ view
9172
+ }).with({
9173
+ state: "idle"
9174
+ }, () => "closed").with({
9175
+ state: _$3.union("loaded", "error", "loading")
9176
+ }, ({
9177
+ view: view2
9178
+ }) => view2).exhaustive(),
9179
+ exit: "closed",
9180
+ style: {
9181
+ "--header-height": `${HEADER_HEIGHT}px`
9182
+ },
9183
+ class: "selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none",
9184
+ children: o("div", {
9185
+ class: "outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",
9186
+ children: [o(StatusBar, {
9187
+ children: flow == null ? void 0 : flow.title
9188
+ }), (() => {
9189
+ if (view !== "maximised")
9190
+ return null;
9191
+ switch (state) {
9192
+ case "idle":
9193
+ return null;
9194
+ case "loading":
9195
+ return o(ChatLoading, {}, "loading");
9196
+ case "loaded":
9197
+ return o(D, {
9198
+ fallback: o(ChatLoading, {}, "loading"),
9199
+ children: o(ChatbotBody, {
9200
+ analytics,
9201
+ apiClient,
9202
+ logger
9203
+ })
9204
+ });
9205
+ case "error":
9206
+ return o(ChatError, {
9207
+ message: error
9208
+ });
9209
+ default:
9210
+ exhaustive(state);
9211
+ }
9212
+ })()]
9213
+ })
9214
+ }, "content")
9215
+ })]
9216
+ })
9217
+ })
9218
+ });
9219
+ };
9220
+ const FlowSchema = object({
9221
+ id: coerce(string(), String),
9222
+ version: number$1(),
9223
+ nodes: array(any())
9224
+ });
9225
+ const FlowByIdPayloadSchema = object({
9226
+ flow: FlowSchema
9227
+ });
9228
+ const FlowByJobPayloadSchema = object({
9048
9229
  company: object({
9049
- name: string(),
9050
- logo: optional(string())
9230
+ name: string()
9051
9231
  }),
9052
- flow: object({
9232
+ flow: FlowSchema,
9233
+ job: object({
9053
9234
  id: coerce(string(), String),
9054
- version: number(),
9055
- nodes: array(any())
9235
+ title: string()
9056
9236
  })
9057
9237
  });
9058
- async function getApplicationData({
9059
- jobId,
9060
- apiClient,
9061
- logger
9062
- }) {
9063
- try {
9064
- const rawData = await apiClient.fetch(`/flow/job/${jobId}`);
9065
- return {
9066
- ok: true,
9067
- value: parse(ApplicationSchema, rawData)
9068
- };
9069
- } catch (e2) {
9070
- if (e2 instanceof ValiError) {
9071
- logger.error(flatten$1(e2).nested);
9072
- return {
9073
- ok: false,
9074
- error: "API error: Invalid application data received"
9075
- };
9076
- }
9077
- if (e2 instanceof sdk.NotFoundError) {
9078
- return {
9079
- ok: false,
9080
- error: "Application flow not found."
9081
- };
9082
- }
9083
- if (e2 instanceof Error) {
9084
- logger.error(e2);
9085
- return {
9086
- ok: false,
9087
- error: e2.message
9088
- };
9089
- }
9090
- logger.error(e2);
9091
- return {
9092
- ok: false,
9093
- error: "Unknown error"
9094
- };
9095
- }
9096
- }
9097
- const tailwind = "#isdk {\n position: relative;\n z-index: 99999;\n font-size: 16px;\n font-family: sans-serif;\n\n /* Lowest colour */\n --i-lowest: 0 0% 100%;\n\n /** Error colours */\n --i-e-1: 340 100% 99%;\n --i-e-2: 353 100% 98%;\n --i-e-3: 351 91% 96%;\n --i-e-4: 351 100% 93%;\n --i-e-5: 350 100% 90%;\n --i-e-6: 351 80% 86%;\n --i-e-7: 349 68% 81%;\n --i-e-8: 348 61% 74%;\n --i-e-9: 348 75% 59%;\n --i-e-10: 347 70% 55%;\n --i-e-11: 345 70% 47%;\n --i-e-12: 344 63% 24%;\n --tw-content: '';\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n Segoe UI,\n Roboto,\n Oxygen,\n Ubuntu,\n Cantarell,\n Open Sans,\n Helvetica Neue,\n sans-serif;\n}\n\n #isdk * {\n box-sizing: border-box;\n border-style: solid;\n border-width: 0;\n -webkit-tap-highlight-color: transparent;\n }\n\n #isdk ::before,\n #isdk ::after {\n box-sizing: border-box;\n }\n\n #isdk :is(ul, ol) {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n\n #isdk :is(p) {\n margin: 0;\n padding: 0;\n }\n\n #isdk :is(li) {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n #isdk :is(button) {\n margin: 0;\n padding: 0;\n border: unset;\n background: unset;\n text-align: unset;\n }\n\n #isdk *, #isdk ::before, #isdk ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n #isdk ::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n #isdk .container {\n width: 100%;\n}\n\n @media (min-width: 640px) {\n\n #isdk .container {\n max-width: 640px;\n }\n}\n\n @media (min-width: 768px) {\n\n #isdk .container {\n max-width: 768px;\n }\n}\n\n @media (min-width: 1024px) {\n\n #isdk .container {\n max-width: 1024px;\n }\n}\n\n @media (min-width: 1280px) {\n\n #isdk .container {\n max-width: 1280px;\n }\n}\n\n @media (min-width: 1536px) {\n\n #isdk .container {\n max-width: 1536px;\n }\n}\n\n #isdk .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n #isdk .visible {\n visibility: visible;\n}\n\n #isdk .collapse {\n visibility: collapse;\n}\n\n #isdk .static {\n position: static;\n}\n\n #isdk .fixed {\n position: fixed;\n}\n\n #isdk .absolute {\n position: absolute;\n}\n\n #isdk .relative {\n position: relative;\n}\n\n #isdk .sticky {\n position: sticky;\n}\n\n #isdk .inset-0 {\n inset: 0px;\n}\n\n #isdk .bottom-0 {\n bottom: 0px;\n}\n\n #isdk .bottom-2 {\n bottom: 0.5rem;\n}\n\n #isdk .left-0 {\n left: 0px;\n}\n\n #isdk .left-2 {\n left: 0.5rem;\n}\n\n #isdk .right-0 {\n right: 0px;\n}\n\n #isdk .right-2 {\n right: 0.5rem;\n}\n\n #isdk .top-0 {\n top: 0px;\n}\n\n #isdk .isolate {\n isolation: isolate;\n}\n\n #isdk .z-20 {\n z-index: 20;\n}\n\n #isdk .mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n\n #isdk .mb-1 {\n margin-bottom: 0.25rem;\n}\n\n #isdk .ml-auto {\n margin-left: auto;\n}\n\n #isdk .block {\n display: block;\n}\n\n #isdk .inline-block {\n display: inline-block;\n}\n\n #isdk .inline {\n display: inline;\n}\n\n #isdk .flex {\n display: flex;\n}\n\n #isdk .inline-flex {\n display: inline-flex;\n}\n\n #isdk .table {\n display: table;\n}\n\n #isdk .table-row {\n display: table-row;\n}\n\n #isdk .flow-root {\n display: flow-root;\n}\n\n #isdk .grid {\n display: grid;\n}\n\n #isdk .inline-grid {\n display: inline-grid;\n}\n\n #isdk .contents {\n display: contents;\n}\n\n #isdk .list-item {\n display: list-item;\n}\n\n #isdk .\\!hidden {\n display: none !important;\n}\n\n #isdk .hidden {\n display: none;\n}\n\n #isdk .h-1 {\n height: 0.25rem;\n}\n\n #isdk .h-1\\.5 {\n height: 0.375rem;\n}\n\n #isdk .h-16 {\n height: 4rem;\n}\n\n #isdk .h-4 {\n height: 1rem;\n}\n\n #isdk .h-48 {\n height: 12rem;\n}\n\n #isdk .h-8 {\n height: 2rem;\n}\n\n #isdk .h-\\[2px\\] {\n height: 2px;\n}\n\n #isdk .h-\\[var\\(--header-height\\)\\] {\n height: var(--header-height);\n}\n\n #isdk .h-full {\n height: 100%;\n}\n\n #isdk .max-h-full {\n max-height: 100%;\n}\n\n #isdk .min-h-\\[36px\\] {\n min-height: 36px;\n}\n\n #isdk .w-1 {\n width: 0.25rem;\n}\n\n #isdk .w-1\\.5 {\n width: 0.375rem;\n}\n\n #isdk .w-16 {\n width: 4rem;\n}\n\n #isdk .w-4 {\n width: 1rem;\n}\n\n #isdk .w-8 {\n width: 2rem;\n}\n\n #isdk .w-full {\n width: 100%;\n}\n\n #isdk .min-w-0 {\n min-width: 0px;\n}\n\n #isdk .min-w-\\[2rem\\] {\n min-width: 2rem;\n}\n\n #isdk .max-w-\\[450px\\] {\n max-width: 450px;\n}\n\n #isdk .max-w-\\[min\\(100\\%\\2c 24rem\\)\\] {\n max-width: min(100%,24rem);\n}\n\n #isdk .max-w-full {\n max-width: 100%;\n}\n\n #isdk .flex-1 {\n flex: 1 1 0%;\n}\n\n #isdk .flex-none {\n flex: none;\n}\n\n #isdk .flex-shrink {\n flex-shrink: 1;\n}\n\n #isdk .flex-shrink-0 {\n flex-shrink: 0;\n}\n\n #isdk .shrink {\n flex-shrink: 1;\n}\n\n #isdk .flex-grow {\n flex-grow: 1;\n}\n\n #isdk .grow {\n flex-grow: 1;\n}\n\n #isdk .border-collapse {\n border-collapse: collapse;\n}\n\n #isdk .translate-y-0 {\n --tw-translate-y: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n #isdk .translate-y-8 {\n --tw-translate-y: 2rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n #isdk .scale-0 {\n --tw-scale-x: 0;\n --tw-scale-y: 0;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n #isdk .transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n @keyframes bounce {\n\n 0%, 100% {\n transform: translateY(-25%);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n #isdk .animate-bounce {\n animation: bounce 1s infinite;\n}\n\n #isdk .cursor-pointer {\n cursor: pointer;\n}\n\n #isdk .select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n #isdk .resize {\n resize: both;\n}\n\n #isdk .flex-col {\n flex-direction: column;\n}\n\n #isdk .flex-wrap {\n flex-wrap: wrap;\n}\n\n #isdk .items-center {\n align-items: center;\n}\n\n #isdk .justify-end {\n justify-content: flex-end;\n}\n\n #isdk .justify-center {\n justify-content: center;\n}\n\n #isdk .gap-0 {\n gap: 0px;\n}\n\n #isdk .gap-1 {\n gap: 0.25rem;\n}\n\n #isdk .gap-1\\.5 {\n gap: 0.375rem;\n}\n\n #isdk .gap-2 {\n gap: 0.5rem;\n}\n\n #isdk .gap-3 {\n gap: 0.75rem;\n}\n\n #isdk .gap-4 {\n gap: 1rem;\n}\n\n #isdk .gap-px {\n gap: 1px;\n}\n\n #isdk .overflow-hidden {\n overflow: hidden;\n}\n\n #isdk .overflow-y-auto {\n overflow-y: auto;\n}\n\n #isdk .overflow-y-scroll {\n overflow-y: scroll;\n}\n\n #isdk .truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n #isdk .break-words {\n overflow-wrap: break-word;\n}\n\n #isdk .rounded {\n border-radius: 0.25rem;\n}\n\n #isdk .rounded-2xl {\n border-radius: 1rem;\n}\n\n #isdk .rounded-3xl {\n border-radius: 1.5rem;\n}\n\n #isdk .rounded-\\[18px\\] {\n border-radius: 18px;\n}\n\n #isdk .rounded-full {\n border-radius: 9999px;\n}\n\n #isdk .rounded-lg {\n border-radius: 0.5rem;\n}\n\n #isdk .rounded-md {\n border-radius: 0.375rem;\n}\n\n #isdk .rounded-xl {\n border-radius: 0.75rem;\n}\n\n #isdk .rounded-b-3xl {\n border-bottom-right-radius: 1.5rem;\n border-bottom-left-radius: 1.5rem;\n}\n\n #isdk .rounded-bl-md {\n border-bottom-left-radius: 0.375rem;\n}\n\n #isdk .rounded-br-md {\n border-bottom-right-radius: 0.375rem;\n}\n\n #isdk .border {\n border-width: 1px;\n}\n\n #isdk .border-t {\n border-top-width: 1px;\n}\n\n #isdk .border-dashed {\n border-style: dashed;\n}\n\n #isdk .border-divider {\n border-color: var(--i-color-divider);\n}\n\n #isdk .border-neutral-8 {\n border-color: var(--i-color-n-8);\n}\n\n #isdk .bg-accent-1 {\n background-color: var(--i-color-a-1);\n}\n\n #isdk .bg-accent-3 {\n background-color: var(--i-color-a-3);\n}\n\n #isdk .bg-accent-8 {\n background-color: var(--i-color-a-8);\n}\n\n #isdk .bg-accent-9 {\n background-color: var(--i-color-a-9);\n}\n\n #isdk .bg-bubble-weak-bg {\n background-color: var(--i-bubble-weak-bg);\n}\n\n #isdk .bg-lowest {\n background-color: var(--i-color-lowest);\n}\n\n #isdk .bg-neutral-1 {\n background-color: var(--i-color-n-1);\n}\n\n #isdk .bg-neutral-2 {\n background-color: var(--i-color-n-2);\n}\n\n #isdk .bg-overlay {\n background-color: var(--i-overlay-bg);\n}\n\n #isdk .bg-statusbar {\n background-color: var(--i-status-bar-bg);\n}\n\n #isdk .bg-transparent {\n background-color: transparent;\n}\n\n #isdk .p-1 {\n padding: 0.25rem;\n}\n\n #isdk .p-1\\.5 {\n padding: 0.375rem;\n}\n\n #isdk .p-2 {\n padding: 0.5rem;\n}\n\n #isdk .p-2\\.5 {\n padding: 0.625rem;\n}\n\n #isdk .p-4 {\n padding: 1rem;\n}\n\n #isdk .px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n\n #isdk .px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n\n #isdk .px-2\\.5 {\n padding-left: 0.625rem;\n padding-right: 0.625rem;\n}\n\n #isdk .px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n\n #isdk .px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n #isdk .py-0 {\n padding-top: 0px;\n padding-bottom: 0px;\n}\n\n #isdk .py-0\\.5 {\n padding-top: 0.125rem;\n padding-bottom: 0.125rem;\n}\n\n #isdk .py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n\n #isdk .py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n #isdk .py-2\\.5 {\n padding-top: 0.625rem;\n padding-bottom: 0.625rem;\n}\n\n #isdk .py-\\[6px\\] {\n padding-top: 6px;\n padding-bottom: 6px;\n}\n\n #isdk .pb-2 {\n padding-bottom: 0.5rem;\n}\n\n #isdk .pb-6 {\n padding-bottom: 1.5rem;\n}\n\n #isdk .pl-2 {\n padding-left: 0.5rem;\n}\n\n #isdk .pl-4 {\n padding-left: 1rem;\n}\n\n #isdk .pr-1 {\n padding-right: 0.25rem;\n}\n\n #isdk .pr-2 {\n padding-right: 0.5rem;\n}\n\n #isdk .pr-2\\.5 {\n padding-right: 0.625rem;\n}\n\n #isdk .pr-3 {\n padding-right: 0.75rem;\n}\n\n #isdk .pr-4 {\n padding-right: 1rem;\n}\n\n #isdk .pt-5 {\n padding-top: 1.25rem;\n}\n\n #isdk .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\] {\n padding-top: calc(var(--header-height) + 1rem);\n}\n\n #isdk .text-center {\n text-align: center;\n}\n\n #isdk .text-justify {\n text-align: justify;\n}\n\n #isdk .text-\\[10px\\] {\n font-size: 10px;\n}\n\n #isdk .text-\\[11px\\] {\n font-size: 11px;\n}\n\n #isdk .text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n\n #isdk .text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n\n #isdk .text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n #isdk .font-bold {\n font-weight: 700;\n}\n\n #isdk .uppercase {\n text-transform: uppercase;\n}\n\n #isdk .lowercase {\n text-transform: lowercase;\n}\n\n #isdk .capitalize {\n text-transform: capitalize;\n}\n\n #isdk .italic {\n font-style: italic;\n}\n\n #isdk .ordinal {\n --tw-ordinal: ordinal;\n font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);\n}\n\n #isdk .leading-snug {\n line-height: 1.375;\n}\n\n #isdk .tracking-\\[-0\\.01em\\] {\n letter-spacing: -0.01em;\n}\n\n #isdk .tracking-tight {\n letter-spacing: -0.025em;\n}\n\n #isdk .tracking-wide {\n letter-spacing: 0.025em;\n}\n\n #isdk .tracking-widest {\n letter-spacing: 0.1em;\n}\n\n #isdk .text-\\[\\#4CAF50\\] {\n --tw-text-opacity: 1;\n color: rgb(76 175 80 / var(--tw-text-opacity));\n}\n\n #isdk .text-\\[\\#FFC107\\] {\n --tw-text-opacity: 1;\n color: rgb(255 193 7 / var(--tw-text-opacity));\n}\n\n #isdk .text-accent-11 {\n color: var(--i-color-a-11);\n}\n\n #isdk .text-accent-12 {\n color: var(--i-color-a-12);\n}\n\n #isdk .text-accent-9 {\n color: var(--i-color-a-9);\n}\n\n #isdk .text-error-11 {\n color: var(--i-color-e-11);\n}\n\n #isdk .text-error-9 {\n color: var(--i-color-e-9);\n}\n\n #isdk .text-interactive-copy {\n color: var(--i-interactive-copy);\n}\n\n #isdk .text-neutral-10 {\n color: var(--i-color-n-10);\n}\n\n #isdk .text-neutral-11 {\n color: var(--i-color-n-11);\n}\n\n #isdk .text-neutral-12 {\n color: var(--i-color-n-12);\n}\n\n #isdk .text-neutral-6 {\n color: var(--i-color-n-6);\n}\n\n #isdk .text-neutral-8 {\n color: var(--i-color-n-8);\n}\n\n #isdk .text-neutral-9 {\n color: var(--i-color-n-9);\n}\n\n #isdk .text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n #isdk .underline {\n text-decoration-line: underline;\n}\n\n #isdk .no-underline {\n text-decoration-line: none;\n}\n\n #isdk .underline-offset-2 {\n text-underline-offset: 2px;\n}\n\n #isdk .caret-accent-9 {\n caret-color: var(--i-color-a-9);\n}\n\n #isdk .opacity-0 {\n opacity: 0;\n}\n\n #isdk .opacity-100 {\n opacity: 1;\n}\n\n #isdk .shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n #isdk .shadow-surface-md {\n --tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / 0.03), 0px 6px 4px 0px oklch(0% 0 0 / 0.02), 0px 6px 4px 0px oklch(0% 0 0 / 0.01);\n --tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n #isdk .shadow-surface-sm {\n --tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / 0.03), 0px 4px 4px 0px oklch(0% 0 0 / 0.02);\n --tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n #isdk .shadow-bubble-strong-shadow {\n --tw-shadow-color: var(--i-bubble-strong-shadow);\n --tw-shadow: var(--tw-shadow-colored);\n}\n\n #isdk .outline {\n outline-style: solid;\n}\n\n #isdk .outline-1 {\n outline-width: 1px;\n}\n\n #isdk .outline-2 {\n outline-width: 2px;\n}\n\n #isdk .outline-accent-4 {\n outline-color: var(--i-color-a-4);\n}\n\n #isdk .outline-bubble-weak {\n outline-color: var(--i-bubble-weak-outline);\n}\n\n #isdk .outline-divider {\n outline-color: var(--i-color-divider);\n}\n\n #isdk .outline-neutral-3 {\n outline-color: var(--i-color-n-3);\n}\n\n #isdk .outline-neutral-6 {\n outline-color: var(--i-color-n-6);\n}\n\n #isdk .ring-0 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .ring-2 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .ring-accent-6 {\n --tw-ring-color: var(--i-color-a-6);\n}\n\n #isdk .ring-divider {\n --tw-ring-color: var(--i-color-divider);\n}\n\n #isdk .ring-lowest {\n --tw-ring-color: var(--i-color-lowest);\n}\n\n #isdk .ring-transparent {\n --tw-ring-color: transparent;\n}\n\n #isdk .blur {\n --tw-blur: blur(8px);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .drop-shadow {\n --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\] {\n --tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .grayscale {\n --tw-grayscale: grayscale(100%);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .invert {\n --tw-invert: invert(100%);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .sepia {\n --tw-sepia: sepia(100%);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .backdrop-blur-md {\n --tw-backdrop-blur: blur(12px);\n -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n}\n\n #isdk .backdrop-saturate-150 {\n --tw-backdrop-saturate: saturate(1.5);\n -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n}\n\n #isdk .backdrop-filter {\n -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n}\n\n #isdk .transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n #isdk .transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n #isdk .duration-1000 {\n transition-duration: 1000ms;\n}\n\n #isdk .ease-expo-out {\n transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n #isdk .ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n #isdk .text-wrap-balance {\n text-wrap: balance;\n}\n\n #isdk .fr {\n outline: none;\n}\n\n #isdk .fr:focus {\n outline: none;\n}\n\n #isdk .fr:focus-visible {\n outline: none;\n --tw-ring-offset-width: 1px;\n --tw-ring-offset-color: var(--i-color-lowest);\n --tw-ring-opacity: 1;\n --tw-ring-color: var(--i-color-a-9);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .gutter-stable {\n scrollbar-gutter: stable;\n}\n\n #isdk .hide-scrollbars::-webkit-scrollbar {\n display: none;\n}\n\n #isdk .hide-scrollbars {\n scrollbar-width: none;\n -ms-overflow-style: none;\n}\n\n #isdk .touch-hitbox::before {\n content: '';\n position: absolute;\n display: block;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n min-height: 44px;\n min-width: 44px;\n z-index: 9999;\n}\n\n #isdk .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\] {\n a-z-a--z0-9-_: .$@?;\n}\n\n #isdk .\\[text-wrap\\:pretty\\] {\n text-wrap: pretty;\n}\n\n #isdk .selection\\:bg-accent-4 *::-moz-selection {\n background-color: var(--i-color-a-4);\n}\n\n #isdk .selection\\:bg-accent-4 *::selection {\n background-color: var(--i-color-a-4);\n}\n\n #isdk .selection\\:bg-transparent *::-moz-selection {\n background-color: transparent;\n}\n\n #isdk .selection\\:bg-transparent *::selection {\n background-color: transparent;\n}\n\n #isdk .selection\\:text-accent-12 *::-moz-selection {\n color: var(--i-color-a-12);\n}\n\n #isdk .selection\\:text-accent-12 *::selection {\n color: var(--i-color-a-12);\n}\n\n #isdk .selection\\:bg-accent-4::-moz-selection {\n background-color: var(--i-color-a-4);\n}\n\n #isdk .selection\\:bg-accent-4::selection {\n background-color: var(--i-color-a-4);\n}\n\n #isdk .selection\\:bg-transparent::-moz-selection {\n background-color: transparent;\n}\n\n #isdk .selection\\:bg-transparent::selection {\n background-color: transparent;\n}\n\n #isdk .selection\\:text-accent-12::-moz-selection {\n color: var(--i-color-a-12);\n}\n\n #isdk .selection\\:text-accent-12::selection {\n color: var(--i-color-a-12);\n}\n\n #isdk .placeholder\\:text-neutral-10::-moz-placeholder {\n color: var(--i-color-n-10);\n}\n\n #isdk .placeholder\\:text-neutral-10::placeholder {\n color: var(--i-color-n-10);\n}\n\n #isdk .hover\\:bg-interactive-bg-hover:hover {\n background-color: var(--i-interactive-bg-hover);\n}\n\n #isdk .hover\\:text-interactive-copy-hover:hover {\n color: var(--i-interactive-copy-hover);\n}\n\n #isdk .hover\\:ring-accent-8:hover {\n --tw-ring-color: var(--i-color-a-8);\n}\n\n #isdk .focus\\:outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n #isdk .focus-visible\\:outline-accent-7:focus-visible {\n outline-color: var(--i-color-a-7);\n}\n\n #isdk .focus-visible\\:ring-4:focus-visible {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .focus-visible\\:ring-offset-2:focus-visible {\n --tw-ring-offset-width: 2px;\n}\n\n #isdk .active\\:bg-accent-10:active {\n background-color: var(--i-color-a-10);\n}\n\n #isdk .active\\:bg-accent-2:active {\n background-color: var(--i-color-a-2);\n}\n\n #isdk .active\\:bg-interactive-bg-active:active {\n background-color: var(--i-interactive-bg-active);\n}\n\n #isdk .active\\:text-accent-10:active {\n color: var(--i-color-a-10);\n}\n\n #isdk .active\\:text-accent-11:active {\n color: var(--i-color-a-11);\n}\n\n #isdk .active\\:text-interactive-copy-active:active {\n color: var(--i-interactive-copy-active);\n}\n\n #isdk .active\\:outline-neutral-10:active {\n outline-color: var(--i-color-n-10);\n}\n\n #isdk .active\\:ring-accent-7:active {\n --tw-ring-color: var(--i-color-a-7);\n}\n\n #isdk .disabled\\:cursor-not-allowed:disabled {\n cursor: not-allowed;\n}\n\n #isdk .disabled\\:opacity-50:disabled {\n opacity: 0.5;\n}\n\n #isdk .peer:checked ~ .peer-checked\\:bg-accent-2 {\n background-color: var(--i-color-a-2);\n}\n\n #isdk .peer:checked ~ .peer-checked\\:text-accent-9 {\n color: var(--i-color-a-9);\n}\n\n #isdk .peer:checked ~ .peer-checked\\:outline-accent-7 {\n outline-color: var(--i-color-a-7);\n}\n\n #isdk .peer:focus-visible ~ .peer-focus-visible\\:ring-4 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .peer:focus-visible ~ .peer-focus-visible\\:ring-accent-7 {\n --tw-ring-color: var(--i-color-a-7);\n}\n\n #isdk .peer:focus-visible ~ .peer-focus-visible\\:ring-offset-2 {\n --tw-ring-offset-width: 2px;\n}\n\n @media (pointer: coarse) {\n\n #isdk .pointer-coarse\\:touch-hitbox\\:\\:before::before {\n content: '';\n position: absolute;\n display: block;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n min-height: 44px;\n min-width: 44px;\n z-index: 9999;\n }\n}\n";
9238
+ const StartFlowSchema = object({
9239
+ flow: FlowSchema,
9240
+ title: string(),
9241
+ flowKeys: array(string()),
9242
+ context: record(string(), any())
9243
+ });
9244
+ const tailwind = "#isdk {\n position: relative;\n z-index: 99999;\n font-size: 16px;\n font-family: sans-serif;\n\n /* Lowest colour */\n --i-lowest: 0 0% 100%;\n\n /** Error colours */\n --i-e-1: 340 100% 99%;\n --i-e-2: 353 100% 98%;\n --i-e-3: 351 91% 96%;\n --i-e-4: 351 100% 93%;\n --i-e-5: 350 100% 90%;\n --i-e-6: 351 80% 86%;\n --i-e-7: 349 68% 81%;\n --i-e-8: 348 61% 74%;\n --i-e-9: 348 75% 59%;\n --i-e-10: 347 70% 55%;\n --i-e-11: 345 70% 47%;\n --i-e-12: 344 63% 24%;\n --tw-content: '';\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n Segoe UI,\n Roboto,\n Oxygen,\n Ubuntu,\n Cantarell,\n Open Sans,\n Helvetica Neue,\n sans-serif;\n}\n\n #isdk * {\n font-weight: inherit;\n font-style: inherit;\n box-sizing: border-box;\n font-family: inherit;\n border-style: solid;\n border-width: 0;\n -webkit-tap-highlight-color: transparent;\n }\n\n #isdk ::before,\n #isdk ::after {\n box-sizing: border-box;\n }\n\n #isdk :is(ul, ol) {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n\n #isdk :is(p) {\n margin: 0;\n padding: 0;\n }\n\n #isdk :is(li) {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n #isdk :is(button) {\n margin: 0;\n padding: 0;\n border: unset;\n background: unset;\n text-align: unset;\n }\n\n #isdk *, #isdk ::before, #isdk ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n #isdk ::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n #isdk .container {\n width: 100%;\n}\n\n @media (min-width: 640px) {\n\n #isdk .container {\n max-width: 640px;\n }\n}\n\n @media (min-width: 768px) {\n\n #isdk .container {\n max-width: 768px;\n }\n}\n\n @media (min-width: 1024px) {\n\n #isdk .container {\n max-width: 1024px;\n }\n}\n\n @media (min-width: 1280px) {\n\n #isdk .container {\n max-width: 1280px;\n }\n}\n\n @media (min-width: 1536px) {\n\n #isdk .container {\n max-width: 1536px;\n }\n}\n\n #isdk .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n #isdk .visible {\n visibility: visible;\n}\n\n #isdk .collapse {\n visibility: collapse;\n}\n\n #isdk .static {\n position: static;\n}\n\n #isdk .fixed {\n position: fixed;\n}\n\n #isdk .absolute {\n position: absolute;\n}\n\n #isdk .relative {\n position: relative;\n}\n\n #isdk .sticky {\n position: sticky;\n}\n\n #isdk .inset-0 {\n inset: 0px;\n}\n\n #isdk .bottom-0 {\n bottom: 0px;\n}\n\n #isdk .bottom-2 {\n bottom: 0.5rem;\n}\n\n #isdk .bottom-\\[2px\\] {\n bottom: 2px;\n}\n\n #isdk .left-0 {\n left: 0px;\n}\n\n #isdk .left-2 {\n left: 0.5rem;\n}\n\n #isdk .right-0 {\n right: 0px;\n}\n\n #isdk .right-2 {\n right: 0.5rem;\n}\n\n #isdk .top-0 {\n top: 0px;\n}\n\n #isdk .top-\\[-2px\\] {\n top: -2px;\n}\n\n #isdk .isolate {\n isolation: isolate;\n}\n\n #isdk .z-20 {\n z-index: 20;\n}\n\n #isdk .mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n\n #isdk .mb-1 {\n margin-bottom: 0.25rem;\n}\n\n #isdk .ml-auto {\n margin-left: auto;\n}\n\n #isdk .block {\n display: block;\n}\n\n #isdk .inline-block {\n display: inline-block;\n}\n\n #isdk .inline {\n display: inline;\n}\n\n #isdk .flex {\n display: flex;\n}\n\n #isdk .inline-flex {\n display: inline-flex;\n}\n\n #isdk .table {\n display: table;\n}\n\n #isdk .table-row {\n display: table-row;\n}\n\n #isdk .flow-root {\n display: flow-root;\n}\n\n #isdk .grid {\n display: grid;\n}\n\n #isdk .inline-grid {\n display: inline-grid;\n}\n\n #isdk .contents {\n display: contents;\n}\n\n #isdk .list-item {\n display: list-item;\n}\n\n #isdk .\\!hidden {\n display: none !important;\n}\n\n #isdk .hidden {\n display: none;\n}\n\n #isdk .h-1 {\n height: 0.25rem;\n}\n\n #isdk .h-1\\.5 {\n height: 0.375rem;\n}\n\n #isdk .h-16 {\n height: 4rem;\n}\n\n #isdk .h-4 {\n height: 1rem;\n}\n\n #isdk .h-48 {\n height: 12rem;\n}\n\n #isdk .h-8 {\n height: 2rem;\n}\n\n #isdk .h-\\[2px\\] {\n height: 2px;\n}\n\n #isdk .h-\\[var\\(--header-height\\)\\] {\n height: var(--header-height);\n}\n\n #isdk .h-full {\n height: 100%;\n}\n\n #isdk .max-h-full {\n max-height: 100%;\n}\n\n #isdk .min-h-\\[36px\\] {\n min-height: 36px;\n}\n\n #isdk .w-1 {\n width: 0.25rem;\n}\n\n #isdk .w-1\\.5 {\n width: 0.375rem;\n}\n\n #isdk .w-16 {\n width: 4rem;\n}\n\n #isdk .w-4 {\n width: 1rem;\n}\n\n #isdk .w-8 {\n width: 2rem;\n}\n\n #isdk .w-full {\n width: 100%;\n}\n\n #isdk .min-w-0 {\n min-width: 0px;\n}\n\n #isdk .min-w-\\[2rem\\] {\n min-width: 2rem;\n}\n\n #isdk .max-w-\\[450px\\] {\n max-width: 450px;\n}\n\n #isdk .max-w-\\[min\\(100\\%\\2c 24rem\\)\\] {\n max-width: min(100%,24rem);\n}\n\n #isdk .max-w-full {\n max-width: 100%;\n}\n\n #isdk .flex-1 {\n flex: 1 1 0%;\n}\n\n #isdk .flex-none {\n flex: none;\n}\n\n #isdk .flex-shrink {\n flex-shrink: 1;\n}\n\n #isdk .flex-shrink-0 {\n flex-shrink: 0;\n}\n\n #isdk .shrink {\n flex-shrink: 1;\n}\n\n #isdk .flex-grow {\n flex-grow: 1;\n}\n\n #isdk .grow {\n flex-grow: 1;\n}\n\n #isdk .border-collapse {\n border-collapse: collapse;\n}\n\n #isdk .translate-y-0 {\n --tw-translate-y: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n #isdk .translate-y-8 {\n --tw-translate-y: 2rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n #isdk .translate-y-full {\n --tw-translate-y: 100%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n #isdk .scale-0 {\n --tw-scale-x: 0;\n --tw-scale-y: 0;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n #isdk .transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n @keyframes bounce {\n\n 0%, 100% {\n transform: translateY(-25%);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n #isdk .animate-bounce {\n animation: bounce 1s infinite;\n}\n\n #isdk .cursor-pointer {\n cursor: pointer;\n}\n\n #isdk .select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n #isdk .resize {\n resize: both;\n}\n\n #isdk .flex-col {\n flex-direction: column;\n}\n\n #isdk .flex-wrap {\n flex-wrap: wrap;\n}\n\n #isdk .items-center {\n align-items: center;\n}\n\n #isdk .justify-end {\n justify-content: flex-end;\n}\n\n #isdk .justify-center {\n justify-content: center;\n}\n\n #isdk .gap-0 {\n gap: 0px;\n}\n\n #isdk .gap-1 {\n gap: 0.25rem;\n}\n\n #isdk .gap-1\\.5 {\n gap: 0.375rem;\n}\n\n #isdk .gap-2 {\n gap: 0.5rem;\n}\n\n #isdk .gap-3 {\n gap: 0.75rem;\n}\n\n #isdk .gap-4 {\n gap: 1rem;\n}\n\n #isdk .gap-px {\n gap: 1px;\n}\n\n #isdk .overflow-hidden {\n overflow: hidden;\n}\n\n #isdk .overflow-y-auto {\n overflow-y: auto;\n}\n\n #isdk .overflow-y-scroll {\n overflow-y: scroll;\n}\n\n #isdk .truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n #isdk .break-words {\n overflow-wrap: break-word;\n}\n\n #isdk .rounded {\n border-radius: 0.25rem;\n}\n\n #isdk .rounded-2xl {\n border-radius: 1rem;\n}\n\n #isdk .rounded-3xl {\n border-radius: 1.5rem;\n}\n\n #isdk .rounded-\\[18px\\] {\n border-radius: 18px;\n}\n\n #isdk .rounded-full {\n border-radius: 9999px;\n}\n\n #isdk .rounded-lg {\n border-radius: 0.5rem;\n}\n\n #isdk .rounded-md {\n border-radius: 0.375rem;\n}\n\n #isdk .rounded-xl {\n border-radius: 0.75rem;\n}\n\n #isdk .rounded-b-3xl {\n border-bottom-right-radius: 1.5rem;\n border-bottom-left-radius: 1.5rem;\n}\n\n #isdk .rounded-bl-md {\n border-bottom-left-radius: 0.375rem;\n}\n\n #isdk .rounded-br-md {\n border-bottom-right-radius: 0.375rem;\n}\n\n #isdk .border {\n border-width: 1px;\n}\n\n #isdk .border-t {\n border-top-width: 1px;\n}\n\n #isdk .border-solid {\n border-style: solid;\n}\n\n #isdk .border-dashed {\n border-style: dashed;\n}\n\n #isdk .border-accent-9 {\n border-color: var(--i-color-a-9);\n}\n\n #isdk .border-divider {\n border-color: var(--i-color-divider);\n}\n\n #isdk .border-neutral-8 {\n border-color: var(--i-color-n-8);\n}\n\n #isdk .bg-accent-1 {\n background-color: var(--i-color-a-1);\n}\n\n #isdk .bg-accent-3 {\n background-color: var(--i-color-a-3);\n}\n\n #isdk .bg-accent-9 {\n background-color: var(--i-color-a-9);\n}\n\n #isdk .bg-bubble-weak-bg {\n background-color: var(--i-bubble-weak-bg);\n}\n\n #isdk .bg-lowest {\n background-color: var(--i-color-lowest);\n}\n\n #isdk .bg-neutral-1 {\n background-color: var(--i-color-n-1);\n}\n\n #isdk .bg-neutral-2 {\n background-color: var(--i-color-n-2);\n}\n\n #isdk .bg-overlay {\n background-color: var(--i-overlay-bg);\n}\n\n #isdk .bg-statusbar {\n background-color: var(--i-status-bar-bg);\n}\n\n #isdk .bg-transparent {\n background-color: transparent;\n}\n\n #isdk .p-1 {\n padding: 0.25rem;\n}\n\n #isdk .p-1\\.5 {\n padding: 0.375rem;\n}\n\n #isdk .p-2 {\n padding: 0.5rem;\n}\n\n #isdk .p-2\\.5 {\n padding: 0.625rem;\n}\n\n #isdk .p-4 {\n padding: 1rem;\n}\n\n #isdk .px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n\n #isdk .px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n\n #isdk .px-2\\.5 {\n padding-left: 0.625rem;\n padding-right: 0.625rem;\n}\n\n #isdk .px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n\n #isdk .px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n #isdk .px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n\n #isdk .py-0 {\n padding-top: 0px;\n padding-bottom: 0px;\n}\n\n #isdk .py-0\\.5 {\n padding-top: 0.125rem;\n padding-bottom: 0.125rem;\n}\n\n #isdk .py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n\n #isdk .py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n #isdk .py-2\\.5 {\n padding-top: 0.625rem;\n padding-bottom: 0.625rem;\n}\n\n #isdk .py-3 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n\n #isdk .py-\\[6px\\] {\n padding-top: 6px;\n padding-bottom: 6px;\n}\n\n #isdk .pb-2 {\n padding-bottom: 0.5rem;\n}\n\n #isdk .pb-6 {\n padding-bottom: 1.5rem;\n}\n\n #isdk .pl-2 {\n padding-left: 0.5rem;\n}\n\n #isdk .pl-4 {\n padding-left: 1rem;\n}\n\n #isdk .pr-1 {\n padding-right: 0.25rem;\n}\n\n #isdk .pr-2 {\n padding-right: 0.5rem;\n}\n\n #isdk .pr-2\\.5 {\n padding-right: 0.625rem;\n}\n\n #isdk .pr-3 {\n padding-right: 0.75rem;\n}\n\n #isdk .pr-4 {\n padding-right: 1rem;\n}\n\n #isdk .pt-5 {\n padding-top: 1.25rem;\n}\n\n #isdk .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\] {\n padding-top: calc(var(--header-height) + 1rem);\n}\n\n #isdk .text-center {\n text-align: center;\n}\n\n #isdk .text-right {\n text-align: right;\n}\n\n #isdk .text-justify {\n text-align: justify;\n}\n\n #isdk .text-\\[10px\\] {\n font-size: 10px;\n}\n\n #isdk .text-\\[11px\\] {\n font-size: 11px;\n}\n\n #isdk .text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n\n #isdk .text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n\n #isdk .text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n #isdk .font-bold {\n font-weight: 700;\n}\n\n #isdk .font-medium {\n font-weight: 500;\n}\n\n #isdk .uppercase {\n text-transform: uppercase;\n}\n\n #isdk .lowercase {\n text-transform: lowercase;\n}\n\n #isdk .capitalize {\n text-transform: capitalize;\n}\n\n #isdk .italic {\n font-style: italic;\n}\n\n #isdk .ordinal {\n --tw-ordinal: ordinal;\n font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);\n}\n\n #isdk .leading-snug {\n line-height: 1.375;\n}\n\n #isdk .tracking-\\[-0\\.01em\\] {\n letter-spacing: -0.01em;\n}\n\n #isdk .tracking-tight {\n letter-spacing: -0.025em;\n}\n\n #isdk .tracking-wide {\n letter-spacing: 0.025em;\n}\n\n #isdk .tracking-widest {\n letter-spacing: 0.1em;\n}\n\n #isdk .text-\\[\\#4CAF50\\] {\n --tw-text-opacity: 1;\n color: rgb(76 175 80 / var(--tw-text-opacity));\n}\n\n #isdk .text-\\[\\#FFC107\\] {\n --tw-text-opacity: 1;\n color: rgb(255 193 7 / var(--tw-text-opacity));\n}\n\n #isdk .text-accent-11 {\n color: var(--i-color-a-11);\n}\n\n #isdk .text-accent-12 {\n color: var(--i-color-a-12);\n}\n\n #isdk .text-accent-9 {\n color: var(--i-color-a-9);\n}\n\n #isdk .text-error-11 {\n color: var(--i-color-e-11);\n}\n\n #isdk .text-error-9 {\n color: var(--i-color-e-9);\n}\n\n #isdk .text-interactive-copy {\n color: var(--i-interactive-copy);\n}\n\n #isdk .text-neutral-10 {\n color: var(--i-color-n-10);\n}\n\n #isdk .text-neutral-11 {\n color: var(--i-color-n-11);\n}\n\n #isdk .text-neutral-12 {\n color: var(--i-color-n-12);\n}\n\n #isdk .text-neutral-6 {\n color: var(--i-color-n-6);\n}\n\n #isdk .text-neutral-8 {\n color: var(--i-color-n-8);\n}\n\n #isdk .text-neutral-9 {\n color: var(--i-color-n-9);\n}\n\n #isdk .text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n #isdk .underline {\n text-decoration-line: underline;\n}\n\n #isdk .no-underline {\n text-decoration-line: none;\n}\n\n #isdk .underline-offset-2 {\n text-underline-offset: 2px;\n}\n\n #isdk .caret-accent-9 {\n caret-color: var(--i-color-a-9);\n}\n\n #isdk .opacity-0 {\n opacity: 0;\n}\n\n #isdk .opacity-100 {\n opacity: 1;\n}\n\n #isdk .shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n #isdk .shadow-\\[inset_0px_-6px_2px_-1px_oklch\\(100_0_0\\/\\.45\\)\\2c inset_0px_1px_1px_oklch\\(100_0_0\\/\\.3\\)\\] {\n --tw-shadow: inset 0px -6px 2px -1px oklch(100 0 0/.45),inset 0px 1px 1px oklch(100 0 0/.3);\n --tw-shadow-colored: inset 0px -6px 2px -1px var(--tw-shadow-color), inset 0px 1px 1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n #isdk .shadow-surface-md {\n --tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / 0.03), 0px 6px 4px 0px oklch(0% 0 0 / 0.02), 0px 6px 4px 0px oklch(0% 0 0 / 0.01);\n --tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n #isdk .shadow-surface-sm {\n --tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / 0.03), 0px 4px 4px 0px oklch(0% 0 0 / 0.02);\n --tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n #isdk .shadow-bubble-strong-shadow {\n --tw-shadow-color: var(--i-bubble-strong-shadow);\n --tw-shadow: var(--tw-shadow-colored);\n}\n\n #isdk .outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n #isdk .outline {\n outline-style: solid;\n}\n\n #isdk .outline-1 {\n outline-width: 1px;\n}\n\n #isdk .outline-2 {\n outline-width: 2px;\n}\n\n #isdk .outline-accent-4 {\n outline-color: var(--i-color-a-4);\n}\n\n #isdk .outline-bubble-weak {\n outline-color: var(--i-bubble-weak-outline);\n}\n\n #isdk .outline-divider {\n outline-color: var(--i-color-divider);\n}\n\n #isdk .outline-neutral-3 {\n outline-color: var(--i-color-n-3);\n}\n\n #isdk .outline-neutral-6 {\n outline-color: var(--i-color-n-6);\n}\n\n #isdk .ring-0 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .ring-2 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .ring-accent-6 {\n --tw-ring-color: var(--i-color-a-6);\n}\n\n #isdk .ring-divider {\n --tw-ring-color: var(--i-color-divider);\n}\n\n #isdk .ring-lowest {\n --tw-ring-color: var(--i-color-lowest);\n}\n\n #isdk .ring-transparent {\n --tw-ring-color: transparent;\n}\n\n #isdk .ring-offset-\\[1\\.5px\\] {\n --tw-ring-offset-width: 1.5px;\n}\n\n #isdk .ring-offset-neutral-1 {\n --tw-ring-offset-color: var(--i-color-n-1);\n}\n\n #isdk .blur {\n --tw-blur: blur(8px);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .drop-shadow {\n --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\] {\n --tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .grayscale {\n --tw-grayscale: grayscale(100%);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .invert {\n --tw-invert: invert(100%);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .sepia {\n --tw-sepia: sepia(100%);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n #isdk .backdrop-blur-md {\n --tw-backdrop-blur: blur(12px);\n -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n}\n\n #isdk .backdrop-saturate-150 {\n --tw-backdrop-saturate: saturate(1.5);\n -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n}\n\n #isdk .backdrop-filter {\n -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n}\n\n #isdk .transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n #isdk .transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n #isdk .duration-1000 {\n transition-duration: 1000ms;\n}\n\n #isdk .duration-300 {\n transition-duration: 300ms;\n}\n\n #isdk .ease-expo-out {\n transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n #isdk .ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n #isdk .text-wrap-balance {\n text-wrap: balance;\n}\n\n #isdk .fr {\n outline: none;\n}\n\n #isdk .fr:focus {\n outline: none;\n}\n\n #isdk .fr:focus-visible {\n outline: none;\n --tw-ring-offset-width: 1px;\n --tw-ring-offset-color: var(--i-color-lowest);\n --tw-ring-opacity: 1;\n --tw-ring-color: var(--i-color-a-9);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .gutter-stable {\n scrollbar-gutter: stable;\n}\n\n #isdk .hide-scrollbars::-webkit-scrollbar {\n display: none;\n}\n\n #isdk .hide-scrollbars {\n scrollbar-width: none;\n -ms-overflow-style: none;\n}\n\n #isdk .touch-hitbox::before {\n content: '';\n position: absolute;\n display: block;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n min-height: 44px;\n min-width: 44px;\n z-index: 9999;\n}\n\n #isdk .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\] {\n a-z-a--z0-9-_: .$@?;\n}\n\n #isdk .\\[text-wrap\\:pretty\\] {\n text-wrap: pretty;\n}\n\n #isdk .selection\\:bg-accent-4 *::-moz-selection {\n background-color: var(--i-color-a-4);\n}\n\n #isdk .selection\\:bg-accent-4 *::selection {\n background-color: var(--i-color-a-4);\n}\n\n #isdk .selection\\:bg-transparent *::-moz-selection {\n background-color: transparent;\n}\n\n #isdk .selection\\:bg-transparent *::selection {\n background-color: transparent;\n}\n\n #isdk .selection\\:text-accent-12 *::-moz-selection {\n color: var(--i-color-a-12);\n}\n\n #isdk .selection\\:text-accent-12 *::selection {\n color: var(--i-color-a-12);\n}\n\n #isdk .selection\\:bg-accent-4::-moz-selection {\n background-color: var(--i-color-a-4);\n}\n\n #isdk .selection\\:bg-accent-4::selection {\n background-color: var(--i-color-a-4);\n}\n\n #isdk .selection\\:bg-transparent::-moz-selection {\n background-color: transparent;\n}\n\n #isdk .selection\\:bg-transparent::selection {\n background-color: transparent;\n}\n\n #isdk .selection\\:text-accent-12::-moz-selection {\n color: var(--i-color-a-12);\n}\n\n #isdk .selection\\:text-accent-12::selection {\n color: var(--i-color-a-12);\n}\n\n #isdk .placeholder\\:text-neutral-10::-moz-placeholder {\n color: var(--i-color-n-10);\n}\n\n #isdk .placeholder\\:text-neutral-10::placeholder {\n color: var(--i-color-n-10);\n}\n\n #isdk .hover\\:border-accent-10:hover {\n border-color: var(--i-color-a-10);\n}\n\n #isdk .hover\\:bg-accent-10:hover {\n background-color: var(--i-color-a-10);\n}\n\n #isdk .hover\\:bg-interactive-bg-hover:hover {\n background-color: var(--i-interactive-bg-hover);\n}\n\n #isdk .hover\\:text-interactive-copy-hover:hover {\n color: var(--i-interactive-copy-hover);\n}\n\n #isdk .hover\\:text-neutral-12:hover {\n color: var(--i-color-n-12);\n}\n\n #isdk .hover\\:ring-accent-8:hover {\n --tw-ring-color: var(--i-color-a-8);\n}\n\n #isdk .focus\\:outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n #isdk .focus-visible\\:outline-2:focus-visible {\n outline-width: 2px;\n}\n\n #isdk .focus-visible\\:outline-accent-7:focus-visible {\n outline-color: var(--i-color-a-7);\n}\n\n #isdk .focus-visible\\:outline-accent-8:focus-visible {\n outline-color: var(--i-color-a-8);\n}\n\n #isdk .focus-visible\\:ring-4:focus-visible {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .focus-visible\\:ring-offset-2:focus-visible {\n --tw-ring-offset-width: 2px;\n}\n\n #isdk .active\\:border-submit-bg-active:active {\n border-color: var(--i-submit-button-bg-active);\n}\n\n #isdk .active\\:bg-accent-10:active {\n background-color: var(--i-color-a-10);\n}\n\n #isdk .active\\:bg-accent-2:active {\n background-color: var(--i-color-a-2);\n}\n\n #isdk .active\\:bg-interactive-bg-active:active {\n background-color: var(--i-interactive-bg-active);\n}\n\n #isdk .active\\:bg-submit-bg-active:active {\n background-color: var(--i-submit-button-bg-active);\n}\n\n #isdk .active\\:text-accent-10:active {\n color: var(--i-color-a-10);\n}\n\n #isdk .active\\:text-accent-11:active {\n color: var(--i-color-a-11);\n}\n\n #isdk .active\\:text-interactive-copy-active:active {\n color: var(--i-interactive-copy-active);\n}\n\n #isdk .active\\:shadow-\\[inset_0px_0px_2px_-1px_oklch\\(100_0_0\\/\\.45\\)\\2c inset_0px_3px_1px_\\.5px_oklch\\(0_0_0\\/\\.08\\)\\]:active {\n --tw-shadow: inset 0px 0px 2px -1px oklch(100 0 0/.45),inset 0px 3px 1px .5px oklch(0 0 0/.08);\n --tw-shadow-colored: inset 0px 0px 2px -1px var(--tw-shadow-color), inset 0px 3px 1px .5px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n #isdk .active\\:outline-neutral-10:active {\n outline-color: var(--i-color-n-10);\n}\n\n #isdk .active\\:ring-2:active {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .active\\:ring-accent-7:active {\n --tw-ring-color: var(--i-color-a-7);\n}\n\n #isdk .active\\:ring-offset-2:active {\n --tw-ring-offset-width: 2px;\n}\n\n #isdk .disabled\\:cursor-not-allowed:disabled {\n cursor: not-allowed;\n}\n\n #isdk .disabled\\:opacity-50:disabled {\n opacity: 0.5;\n}\n\n #isdk .group:active .group-active\\:bottom-0 {\n bottom: 0px;\n}\n\n #isdk .group:active .group-active\\:top-0 {\n top: 0px;\n}\n\n #isdk .peer:checked ~ .peer-checked\\:bg-accent-2 {\n background-color: var(--i-color-a-2);\n}\n\n #isdk .peer:checked ~ .peer-checked\\:text-accent-9 {\n color: var(--i-color-a-9);\n}\n\n #isdk .peer:checked ~ .peer-checked\\:outline-accent-7 {\n outline-color: var(--i-color-a-7);\n}\n\n #isdk .peer:focus-visible ~ .peer-focus-visible\\:ring-4 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n #isdk .peer:focus-visible ~ .peer-focus-visible\\:ring-accent-7 {\n --tw-ring-color: var(--i-color-a-7);\n}\n\n #isdk .peer:focus-visible ~ .peer-focus-visible\\:ring-offset-2 {\n --tw-ring-offset-width: 2px;\n}\n\n @media (pointer: coarse) {\n\n #isdk .pointer-coarse\\:touch-hitbox\\:\\:before::before {\n content: '';\n position: absolute;\n display: block;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n min-height: 44px;\n min-width: 44px;\n z-index: 9999;\n }\n}\n";
9098
9245
  const createChatbotDomManager = () => {
9099
9246
  return {
9100
9247
  getOrCreateChatbotElement: () => {
@@ -9120,7 +9267,7 @@ var OKLCH_PRESETS = {
9120
9267
  "7": [80.5, 0.08],
9121
9268
  "8": [74, 0.11],
9122
9269
  "9": [60, 0.22],
9123
- "10": [60.5, 0.2],
9270
+ "10": [56, 0.23],
9124
9271
  "11": [50, 0.19],
9125
9272
  "12": [25, 0.18]
9126
9273
  },
@@ -9318,6 +9465,9 @@ const tokens = designTokens().core(({
9318
9465
  "bg-button": transparent,
9319
9466
  "bg-button-hover": withOpacity("n-10", 0.4),
9320
9467
  "bg-button-active": withOpacity("n-10", 0.5)
9468
+ },
9469
+ "submit-button": {
9470
+ "bg-active": core(theme.mode === "dark" ? "color.a-9" : "color.a-10")
9321
9471
  }
9322
9472
  };
9323
9473
  });
@@ -9360,7 +9510,7 @@ const chatbotPlugin = ({
9360
9510
  prepared = true;
9361
9511
  };
9362
9512
  return {
9363
- /** Optionally eagerly renders the interface ahead of application requests. */
9513
+ /** Optionally eagerly renders the interface ahead of needing the chatbot. */
9364
9514
  prepare: async () => {
9365
9515
  if (typeof window === "undefined")
9366
9516
  return;
@@ -9370,52 +9520,75 @@ const chatbotPlugin = ({
9370
9520
  renderAndPrepare();
9371
9521
  logger.info("Chatbot plugin prepared");
9372
9522
  } catch (error) {
9373
- console.error(error);
9374
9523
  logger.error("Error preparing chatbot plugin", error);
9375
9524
  }
9376
9525
  },
9377
- startApplication: async ({
9378
- jobId
9379
- }) => {
9526
+ /** Fetches a flow by job ID.
9527
+ * @param jobId - The job ID to fetch the flow for. This is the job ID according to the **ATS**, and not the inploi job ID.
9528
+ */
9529
+ fetchFlowByJobId: async (jobId) => apiClient.fetch(`/flow/job/${jobId}`).then((res) => {
9530
+ const data = parse$1(FlowByJobPayloadSchema, res);
9531
+ return {
9532
+ context: {
9533
+ job_id: data.job.id,
9534
+ flow_id: data.flow.id
9535
+ },
9536
+ flow: data.flow,
9537
+ title: `Applying for “${data.job.title}”`,
9538
+ flowKeys: [data.job.id]
9539
+ };
9540
+ }),
9541
+ fetchFlowById: async (flowId) => apiClient.fetch(`/flow/${flowId}`).then((res) => {
9542
+ const data = parse$1(FlowByIdPayloadSchema, res);
9543
+ return {
9544
+ flow: data.flow,
9545
+ context: {
9546
+ flow_id: data.flow.id
9547
+ },
9548
+ title: "Chatbot",
9549
+ flowKeys: []
9550
+ };
9551
+ }),
9552
+ open: async (params) => {
9380
9553
  if (typeof window === "undefined")
9381
9554
  return;
9382
9555
  try {
9383
- application.cancel();
9384
- n$1(() => {
9385
- viewState.value = "maximised";
9386
- application.current$.value = {
9556
+ store.cancelCurrentFlow();
9557
+ store.viewState$.value = "maximised";
9558
+ if (params instanceof Promise) {
9559
+ store.current$.value = {
9387
9560
  state: "loading"
9388
9561
  };
9389
- });
9390
- getApplicationData({
9391
- jobId,
9392
- apiClient,
9393
- logger
9394
- }).then(async (res) => {
9395
- if (res.ok) {
9396
- application.start(res.value);
9397
- } else {
9398
- application.current$.value = {
9562
+ params.then(async (params2) => {
9563
+ const parsedParams = parse$1(StartFlowSchema, params2);
9564
+ store.startFlow(parsedParams);
9565
+ }).catch((error) => {
9566
+ const message = error instanceof Error ? error.message : "An error occurred";
9567
+ store.current$.value = {
9399
9568
  state: "error",
9400
- error: res.error
9569
+ error: message
9401
9570
  };
9402
- }
9403
- });
9404
- if (!prepared)
9405
- renderAndPrepare();
9571
+ });
9572
+ } else {
9573
+ store.startFlow(params);
9574
+ }
9406
9575
  } catch (error) {
9407
- console.error(error);
9408
- logger.error("Error starting application", error);
9576
+ logger.error("Error starting flow", error);
9409
9577
  }
9410
9578
  },
9411
- closeApplication: async () => {
9579
+ /** @deprecated - Please use `open` instead. */
9580
+ startApplication: void 0,
9581
+ /** @deprecated - Please use `close` instead */
9582
+ closeApplication: void 0,
9583
+ close: async () => {
9412
9584
  if (typeof window === "undefined")
9413
9585
  return;
9414
- logger.info("Closing application from an external source");
9415
- application.cancel();
9586
+ store.cancelCurrentFlow();
9587
+ logger.info("Closed flow from an external source");
9416
9588
  }
9417
9589
  };
9418
9590
  });
9591
+ exports.AbortedError = AbortedError;
9419
9592
  exports.AnimatePresence = AnimatePresence;
9420
9593
  exports.Cn = Cn;
9421
9594
  exports.ERROR_MESSAGES = ERROR_MESSAGES;
@@ -9423,31 +9596,34 @@ exports.F = F$1;
9423
9596
  exports.N = N;
9424
9597
  exports.T = T$2;
9425
9598
  exports.ValiError = ValiError;
9426
- exports._ = _$1;
9599
+ exports._ = _$3;
9427
9600
  exports._$1 = _$4;
9428
- exports.application = application;
9601
+ exports.a = a;
9429
9602
  exports.boolean = boolean;
9430
9603
  exports.chatbotPlugin = chatbotPlugin;
9431
9604
  exports.clsx = clsx;
9432
9605
  exports.email = email;
9606
+ exports.getFlowSubmissionsPayload = getFlowSubmissionsPayload;
9607
+ exports.getHeadOrThrow = getHeadOrThrow;
9433
9608
  exports.h = h$1;
9434
9609
  exports.hasProp = hasProp;
9435
- exports.inputHeight = inputHeight;
9436
9610
  exports.invariant = invariant$1;
9611
+ exports.isSubmissionOfType = isSubmissionOfType;
9437
9612
  exports.k = k$3;
9613
+ exports.kbToReadableSize = kbToReadableSize;
9438
9614
  exports.m = m$1;
9439
9615
  exports.maxLength = maxLength;
9440
9616
  exports.minLength = minLength;
9441
9617
  exports.o = o;
9442
9618
  exports.object = object;
9443
9619
  exports.p = p$3;
9444
- exports.parse = parse;
9620
+ exports.parse = parse$1;
9445
9621
  exports.parseAsync = parseAsync;
9446
9622
  exports.picklist = picklist;
9447
9623
  exports.record = record;
9448
9624
  exports.regex = regex;
9625
+ exports.store = store;
9449
9626
  exports.string = string;
9450
9627
  exports.transform = transform;
9451
9628
  exports.url = url;
9452
- exports.viewState = viewState;
9453
9629
  exports.y = y$2;